summaryrefslogtreecommitdiff
path: root/databases/postgresql80
diff options
context:
space:
mode:
authorjlam <jlam@pkgsrc.org>2005-08-08 23:19:26 +0000
committerjlam <jlam@pkgsrc.org>2005-08-08 23:19:26 +0000
commit7bbcf099d1f3ebd054bc653ddd05f34b2c6c40e3 (patch)
tree654a368de8441b0897be1562378f284b04473463 /databases/postgresql80
parent731d929219d362a674661d0af6dfaea93f1c9ab5 (diff)
downloadpkgsrc-7bbcf099d1f3ebd054bc653ddd05f34b2c6c40e3.tar.gz
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 (limited to 'databases/postgresql80')
-rw-r--r--databases/postgresql80/Makefile.common20
1 files changed, 19 insertions, 1 deletions
diff --git a/databases/postgresql80/Makefile.common b/databases/postgresql80/Makefile.common
index 33b16a29acc..90c60be4838 100644
--- a/databases/postgresql80/Makefile.common
+++ b/databases/postgresql80/Makefile.common
@@ -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 @@ post-extract:
>${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