4 Quick perl script intended to be used to transplant PostgreSQL server settings from one conf file or server to another.
6 Primarily intended for copying current settings in postgresql.conf into the default copy provided by a newer version to maintain information regarding new settings and defaults. The script can also read via SQL and apply settings via ALTER SYSTEM if required.
8 To transplant settings from one file to another, e.g. for upgrading and keeping the default comments in the new version:
11 $ ./pg_upgrade_conf.pl -f ../old/postgresql.conf -F ../new/postgresql.conf
14 Also take into account values set by ALTER SYSTEM on old server:
18 $ ./pg_upgrade_conf.pl -f ../old/postgresql.conf -a ../old/postgresql.auto.conf -F ../new/postgresql.conf
21 Apply settings via ALTER SYSTEM
24 $ ./pg_upgrade_conf.pl -f ../old/postgresql.conf -a ../old/postgresql.auto.conf -C 'dbname=TEST host=localhost port=5432 user=postgres'
27 Read settings via SQL and apply to new postgresql.conf:
31 $ ./pg_upgrade_conf.pl -c 'dbname=TEST host=localhost port=5433 user=postgres' -F ../new/postgresql.conf
34 Read settings via SQL and apply settings via ALTER SYSTEM:
37 $ ./pg_upgrade_conf.pl -c 'dbname=TEST host=localhost port=5433 user=postgres' -C 'dbname=TEST host=localhost port=5432 user=postgres'