]> git.8kb.co.uk Git - postgresql/pg_upgrade_conf/blob - README.md
Fix mapping for max_wal_size: introduced in 9.5 not 9.3
[postgresql/pg_upgrade_conf] / README.md
1 pg_pgrade_conf
2 ==============
3
4 Quick perl script intended to be used to transplant PostgreSQL server settings from one conf file or server to another.
5
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.
7
8 To transplant settings from one file to another, e.g. for upgrading and keeping the default comments in the new version:
9
10 ```bash
11 $ ./pg_upgrade_conf.pl -f ../old/postgresql.conf -F ../new/postgresql.conf
12 ```
13
14 Also take into account values set by ALTER SYSTEM on old server:
15
16
17 ```bash
18 $ ./pg_upgrade_conf.pl -f ../old/postgresql.conf -a ../old/postgresql.auto.conf -F ../new/postgresql.conf
19 ```
20
21 Apply settings via ALTER SYSTEM
22
23 ```bash
24 $ ./pg_upgrade_conf.pl -f ../old/postgresql.conf -a ../old/postgresql.auto.conf -C 'dbname=TEST host=localhost port=5432 user=postgres'
25 ```
26
27 Read settings via SQL and apply to new postgresql.conf:
28
29
30 ```bash
31 $ ./pg_upgrade_conf.pl -c 'dbname=TEST host=localhost port=5433 user=postgres' -F ../new/postgresql.conf
32 ```
33
34 Read settings via SQL and apply settings via ALTER SYSTEM:
35  
36 ```bash
37 $ ./pg_upgrade_conf.pl -c 'dbname=TEST host=localhost port=5433 user=postgres' -C 'dbname=TEST host=localhost port=5432 user=postgres' 
38 ```