patch 28d49d60af27d438e0d2404b1ca493a12531ad40
Author: "Karl O. Pinc" <kop@meme.com>
Date: Mon Aug 13 15:31:37 EDT 2018
* db/INSTALL: New file to explain cluster installation
addfile ./db/INSTALL
hunk ./db/INSTALL 1
+Cluster installation on Debian/Ubuntu as as follows:
+
+# For Ubuntu 16/fb-gombemi-dev-1:
+#
+# Note that after creating the cluster it would not hurt to add
+# the following comments into postgresql.conf as appropriate.
+#
+# Checksum because data integrity is very important
+# Likewise, the serializable transaction isolation level provides the
+# highest data integrity.
+# Use scram-sha-256 by default for passwords, although there's a lot of
+# md5 at present. (md5 in pg_hba.conf accepts scram-sha-256 also.)
+# Set work_mem fairly high because we don't anticipate a lot of concurrent
+# queries.
+# Likewise, there will be idle time. Set maintenance_work_mem high
+# and use more RAM during maintenance to finish quickly.
+# Set max_stack_depth high to allow for complexity. (The current max
+# seems to be 8M. This could be frobbed via pam_limits -- I think.)
+# Pretend effective_io_concurrency is 8, we don't really know.
+# Set effective_cache_size high and do more index scanning because we've
+# got 4G of ram.
+# Tables are not updated a lot so it's safe to collect fine-grained statistics
+# because we don't collect statistics often. We want good stats because
+# of all the table querying done.
+# Collect status on pl/pgsql functions with track_functions.
+# Current box has 4G of ram, use 40% for shared memory
+# (Docs recommend starting at 25% of ram and sharing up to 40%. Go
+# straight to 40%.)
+
+pg_createcluster -o password_encryption=scram-sha-256 \
+ -o default_transaction_isolation=serializable \
+ -o shared_buffers=1600MB \
+ -o work_mem=128MB \
+ -o maintenance_work_mem=200MB \
+ -o max_stack_depth=5MB \
+ -o effective_io_concurrency=8 \
+ -o effective_cache_size=800MB \
+ -o default_statistics_target=1000 \
+ -o track_functions=pl \
+ 10 gombemi -- \
+ --locale=C --encoding SQL_ASCII --auth peer --data-checksums