pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/databases/postgresql80 Expose a new variable PGSQL_BLC...
details: https://anonhg.NetBSD.org/pkgsrc/rev/3a55d910237c
branches: trunk
changeset: 497973:3a55d910237c
user: jlam <jlam%pkgsrc.org@localhost>
date: Mon Aug 08 23:19:26 2005 +0000
description:
Expose a new variable PGSQL_BLCKSZ for package builders to tweak so
as to optimize PostgreSQL performance. This is a fairly expert option
and represents the size in bytes of a PostgreSQL disk page, defaulting
to 8K.
diffstat:
databases/postgresql80/Makefile.common | 20 +++++++++++++++++++-
1 files changed, 19 insertions(+), 1 deletions(-)
diffs (31 lines):
diff -r 3e9ad6484935 -r 3a55d910237c databases/postgresql80/Makefile.common
--- a/databases/postgresql80/Makefile.common Mon Aug 08 23:09:43 2005 +0000
+++ b/databases/postgresql80/Makefile.common Mon Aug 08 23:19:26 2005 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile.common,v 1.7 2005/08/08 22:20:34 jlam Exp $
+# $NetBSD: Makefile.common,v 1.8 2005/08/08 23:19:26 jlam Exp $
#
# This Makefile fragment is included by all PostgreSQL packages built from
# the main sources of the PostgreSQL distribution except jdbc-postgresql.
@@ -135,3 +135,21 @@
>${WRKSRC}/src/backend/port/dynloader/$$template.c
fi
.endif
+
+# PGSQL_BLCKSZ is the size in bytes of a PostgreSQL disk page or block.
+# This also limits the size of a tuple. The valid values are powers
+# of 2 up to 32768, and the default size is 8196 (hardcoded in the
+# PostgreSQL sources). Please don't change this value unless you know
+# what you are doing.
+#
+BUILD_DEFS+= PGSQL_BLCKSZ
+
+.if defined(PGSQL_BLCKSZ)
+.PHONY: pgsql-blcksz
+pre-configure: pgsql-blcksz
+pgsql-blcksz:
+ for file in ${WRKSRC}/src/include/pg_config_manual.h; do \
+ ${SED} -e "/^#define[ ]*BLCKSZ[ ]*/s/^\(#define[ ]*BLCKSZ\).*/\1 ${PGSQL_BLCKSZ}/" $$file > $$file.new; \
+ ${MV} -f $$file.new $$file; \
+ done
+.endif
Home |
Main Index |
Thread Index |
Old Index