Created
July 6, 2021 17:11
-
-
Save cabecada/306e74a4f721d4af5edeffe5a54b416c to your computer and use it in GitHub Desktop.
pg_13_rewind_and_back
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
postgres@db:~/playground/rewinddemo$ initdb -D primary | |
The files belonging to this database system will be owned by user "postgres". | |
This user must also own the server process. | |
The database cluster will be initialized with locale "en_US.utf8". | |
The default database encoding has accordingly been set to "UTF8". | |
The default text search configuration will be set to "english". | |
Data page checksums are disabled. | |
creating directory primary ... ok | |
creating subdirectories ... ok | |
selecting dynamic shared memory implementation ... posix | |
selecting default max_connections ... 100 | |
selecting default shared_buffers ... 128MB | |
selecting default time zone ... Asia/Kolkata | |
creating configuration files ... ok | |
running bootstrap script ... ok | |
performing post-bootstrap initialization ... ok | |
syncing data to disk ... ok | |
initdb: warning: enabling "trust" authentication for local connections | |
You can change this by editing pg_hba.conf or using the option -A, or | |
--auth-local and --auth-host, the next time you run initdb. | |
Success. You can now start the database server using: | |
pg_ctl -D primary -l logfile start | |
postgres@db:~/playground/rewinddemo$ vim primary/postgresql.conf | |
postgres@db:~/playground/rewinddemo$ printf "wal_log_hints=on \n port=5432" >> primary/postgresql.conf | |
postgres@db:~/playground/rewinddemo$ pg_ctl -D primary -l logfile start | |
waiting for server to start.... done | |
server started | |
postgres@db:~/playground/rewinddemo$ psql -p 5432 | |
psql (14beta1) | |
Type "help" for help. | |
postgres=# show wal_log_hints; | |
wal_log_hints | |
--------------- | |
on | |
(1 row) | |
postgres=# \i data.sql | |
CREATE TABLE | |
INSERT 0 1 | |
postgres=# \q | |
postgres@db:~/playground/rewinddemo$ pg_basebackup -D replica -R -X stream -c fast -C -P -S replica -v -d "port=5432" -p 5432 -h 127.0.0.1 -U postgres | |
pg_basebackup: initiating base backup, waiting for checkpoint to complete | |
pg_basebackup: checkpoint completed | |
pg_basebackup: write-ahead log start point: 0/2000028 on timeline 1 | |
pg_basebackup: starting background WAL receiver | |
pg_basebackup: created replication slot "replica" | |
25464/25464 kB (100%), 1/1 tablespace | |
pg_basebackup: write-ahead log end point: 0/2000100 | |
pg_basebackup: waiting for background process to finish streaming ... | |
pg_basebackup: syncing data to disk ... | |
pg_basebackup: renaming backup_manifest.tmp to backup_manifest | |
pg_basebackup: base backup completed | |
postgres@db:~/playground/rewinddemo$ cat replica/postgresql.auto.conf | |
# Do not edit this file manually! | |
# It will be overwritten by the ALTER SYSTEM command. | |
primary_conninfo = 'user=postgres passfile=''/home/postgres/.pgpass'' channel_binding=prefer host=127.0.0.1 port=5432 sslmode=prefer sslcompression=0 sslsni=1 ssl_min_protocol_version=TLSv1.2 gssencmode=disable krbsrvname=postgres target_session_attrs=any' | |
primary_slot_name = 'replica' | |
postgres@db:~/playground/rewinddemo$ vim replica/postgresql.conf | |
postgres@db:~/playground/rewinddemo$ printf "wal_log_hints=on \n port=5433" >> replica/postgresql.conf | |
postgres@db:~/playground/rewinddemo$ pg_ctl -D replica -l logfile2 start | |
waiting for server to start.... stopped waiting | |
pg_ctl: could not start server | |
Examine the log output. | |
postgres@db:~/playground/rewinddemo$ vim logfile2 | |
postgres@db:~/playground/rewinddemo$ vim replica/postgresql.conf | |
postgres@db:~/playground/rewinddemo$ pg_ctl -D replica -l logfile2 start | |
waiting for server to start.... done | |
server started | |
postgres@db:~/playground/rewinddemo$ psql -Ppager -p 5433 -c 'select count(1) from t;' | |
count | |
------- | |
1 | |
(1 row) | |
postgres@db:~/playground/rewinddemo$ pg_ctl -D primary -l logfile stop | |
waiting for server to shut down.... done | |
server stopped | |
postgres@db:~/playground/rewinddemo$ psql -p 5433 -c 'select pg_promote();' | |
pg_promote | |
------------ | |
t | |
(1 row) | |
postgres@db:~/playground/rewinddemo$ psql -p 5433 -c 'insert into t values (2);' | |
INSERT 0 1 | |
postgres@db:~/playground/rewinddemo$ pg_rewind --target-pgdata primary --source-server "port=5433 user=postgres" --progress -R --debug | |
pg_rewind: connected to server | |
pg_rewind: fetched file "global/pg_control", length 8192 | |
pg_rewind: fetched file "pg_wal/00000002.history", length 41 | |
pg_rewind: Source timeline history: | |
pg_rewind: Target timeline history: | |
pg_rewind: 1: 0/0 - 0/0 | |
pg_rewind: servers diverged at WAL location 0/30000D8 on timeline 1 | |
pg_rewind: no rewind required | |
postgres@db:~/playground/rewinddemo$ cat primary/postgresql.auto.conf | |
# Do not edit this file manually! | |
# It will be overwritten by the ALTER SYSTEM command. | |
primary_conninfo = 'user=postgres passfile=''/home/postgres/.pgpass'' channel_binding=prefer port=5433 sslmode=prefer sslcompression=0 sslsni=1 ssl_min_protocol_version=TLSv1.2 gssencmode=disable krbsrvname=postgres target_session_attrs=any' | |
postgres@db:~/playground/rewinddemo$ echo "primary_slot_name = 'replica'" >> primary/postgresql.auto.conf | |
postgres@db:~/playground/rewinddemo$ touch primary/standby.signal | |
postgres@db:~/playground/rewinddemo$ psql -p 5433 -c "select pg_create_physical_replication_slot('replica');" | |
pg_create_physical_replication_slot | |
------------------------------------- | |
(replica,) | |
(1 row) | |
postgres@db:~/playground/rewinddemo$ pg_ctl -D primary -l logfile start | |
waiting for server to start.... done | |
server started | |
postgres@db:~/playground/rewinddemo$ psql -p 5432 -c 'select count(1) from t;' | |
count | |
------- | |
2 | |
(1 row) | |
postgres@db:~/playground/rewinddemo$ psql -p 5432 | |
psql (14beta1) | |
Type "help" for help. | |
postgres=# show transaction_read_only; | |
transaction_read_only | |
----------------------- | |
on | |
(1 row) | |
postgres=# \q | |
postgres@db:~/playground/rewinddemo$ pg_ctl -D replica -l logfile2 stop | |
waiting for server to shut down.... done | |
server stopped | |
postgres@db:~/playground/rewinddemo$ pg_rewind --target-pgdata replica --source-server "port=5432 user=postgres" --progress -R --debug | |
pg_rewind: connected to server | |
pg_rewind: fetched file "global/pg_control", length 8192 | |
pg_rewind: Source timeline history: | |
pg_rewind: Target timeline history: | |
pg_rewind: 1: 0/0 - 0/30000D8 | |
pg_rewind: 2: 0/30000D8 - 0/0 | |
pg_rewind: servers diverged at WAL location 0/30000D8 on timeline 1 | |
pg_rewind: rewinding from last common checkpoint at 0/3000060 on timeline 1 | |
pg_rewind: reading source file list | |
pg_rewind: reading target file list | |
pg_rewind: reading WAL in target | |
pg_rewind: entry "postmaster.opts" excluded from source file list | |
pg_rewind: entry "pg_replslot/replica/state" excluded from source file list | |
pg_rewind: entry "pg_subtrans/0000" excluded from source file list | |
pg_rewind: entry "backup_manifest" excluded from source file list | |
pg_rewind: entry "base/14008/pg_internal.init" excluded from source file list | |
pg_rewind: entry "postmaster.pid" excluded from source file list | |
pg_rewind: entry "pg_replslot/replica" excluded from source file list | |
pg_rewind: entry "global/pg_internal.init" excluded from source file list | |
pg_rewind: base/1/1247_fsm (COPY) | |
pg_rewind: base/1/1247_vm (COPY) | |
pg_rewind: base/1/1249_fsm (COPY) | |
pg_rewind: base/1/1249_vm (COPY) | |
pg_rewind: base/1/1255_fsm (COPY) | |
pg_rewind: base/1/1255_vm (COPY) | |
pg_rewind: base/1/1259_fsm (COPY) | |
pg_rewind: base/1/1259_vm (COPY) | |
pg_rewind: base/1/13826_fsm (COPY) | |
pg_rewind: base/1/13826_vm (COPY) | |
pg_rewind: base/1/13831_fsm (COPY) | |
pg_rewind: base/1/13831_vm (COPY) | |
pg_rewind: base/1/13836_fsm (COPY) | |
pg_rewind: base/1/13836_vm (COPY) | |
pg_rewind: base/1/13841_fsm (COPY) | |
pg_rewind: base/1/13841_vm (COPY) | |
pg_rewind: base/1/2600_fsm (COPY) | |
pg_rewind: base/1/2600_vm (COPY) | |
pg_rewind: base/1/2601_fsm (COPY) | |
pg_rewind: base/1/2601_vm (COPY) | |
pg_rewind: base/1/2602_fsm (COPY) | |
pg_rewind: base/1/2602_vm (COPY) | |
pg_rewind: base/1/2603_fsm (COPY) | |
pg_rewind: base/1/2603_vm (COPY) | |
pg_rewind: base/1/2605_fsm (COPY) | |
pg_rewind: base/1/2605_vm (COPY) | |
pg_rewind: base/1/2606_fsm (COPY) | |
pg_rewind: base/1/2606_vm (COPY) | |
pg_rewind: base/1/2607_fsm (COPY) | |
pg_rewind: base/1/2607_vm (COPY) | |
pg_rewind: base/1/2608_fsm (COPY) | |
pg_rewind: base/1/2608_vm (COPY) | |
pg_rewind: base/1/2609_fsm (COPY) | |
pg_rewind: base/1/2609_vm (COPY) | |
pg_rewind: base/1/2610_fsm (COPY) | |
pg_rewind: base/1/2610_vm (COPY) | |
pg_rewind: base/1/2612_fsm (COPY) | |
pg_rewind: base/1/2612_vm (COPY) | |
pg_rewind: base/1/2615_fsm (COPY) | |
pg_rewind: base/1/2615_vm (COPY) | |
pg_rewind: base/1/2616_fsm (COPY) | |
pg_rewind: base/1/2616_vm (COPY) | |
pg_rewind: base/1/2617_fsm (COPY) | |
pg_rewind: base/1/2617_vm (COPY) | |
pg_rewind: base/1/2618_fsm (COPY) | |
pg_rewind: base/1/2618_vm (COPY) | |
pg_rewind: base/1/2619_fsm (COPY) | |
pg_rewind: base/1/2619_vm (COPY) | |
pg_rewind: base/1/2673_fsm (COPY) | |
pg_rewind: base/1/2674_fsm (COPY) | |
pg_rewind: base/1/2753_fsm (COPY) | |
pg_rewind: base/1/2753_vm (COPY) | |
pg_rewind: base/1/2836_fsm (COPY) | |
pg_rewind: base/1/2836_vm (COPY) | |
pg_rewind: base/1/2838_fsm (COPY) | |
pg_rewind: base/1/2838_vm (COPY) | |
pg_rewind: base/1/2840_fsm (COPY) | |
pg_rewind: base/1/2840_vm (COPY) | |
pg_rewind: base/1/3079_fsm (COPY) | |
pg_rewind: base/1/3079_vm (COPY) | |
pg_rewind: base/1/3394_fsm (COPY) | |
pg_rewind: base/1/3394_vm (COPY) | |
pg_rewind: base/1/3456_fsm (COPY) | |
pg_rewind: base/1/3456_vm (COPY) | |
pg_rewind: base/1/3541_fsm (COPY) | |
pg_rewind: base/1/3541_vm (COPY) | |
pg_rewind: base/1/3600_fsm (COPY) | |
pg_rewind: base/1/3600_vm (COPY) | |
pg_rewind: base/1/3601_fsm (COPY) | |
pg_rewind: base/1/3601_vm (COPY) | |
pg_rewind: base/1/3602_fsm (COPY) | |
pg_rewind: base/1/3602_vm (COPY) | |
pg_rewind: base/1/3603_fsm (COPY) | |
pg_rewind: base/1/3603_vm (COPY) | |
pg_rewind: base/1/3764_fsm (COPY) | |
pg_rewind: base/1/3764_vm (COPY) | |
pg_rewind: base/1/pg_filenode.map (COPY) | |
pg_rewind: base/14007/1247_fsm (COPY) | |
pg_rewind: base/14007/1247_vm (COPY) | |
pg_rewind: base/14007/1249_fsm (COPY) | |
pg_rewind: base/14007/1249_vm (COPY) | |
pg_rewind: base/14007/1255_fsm (COPY) | |
pg_rewind: base/14007/1255_vm (COPY) | |
pg_rewind: base/14007/1259_fsm (COPY) | |
pg_rewind: base/14007/1259_vm (COPY) | |
pg_rewind: base/14007/13826_fsm (COPY) | |
pg_rewind: base/14007/13826_vm (COPY) | |
pg_rewind: base/14007/13831_fsm (COPY) | |
pg_rewind: base/14007/13831_vm (COPY) | |
pg_rewind: base/14007/13836_fsm (COPY) | |
pg_rewind: base/14007/13836_vm (COPY) | |
pg_rewind: base/14007/13841_fsm (COPY) | |
pg_rewind: base/14007/13841_vm (COPY) | |
pg_rewind: base/14007/2600_fsm (COPY) | |
pg_rewind: base/14007/2600_vm (COPY) | |
pg_rewind: base/14007/2601_fsm (COPY) | |
pg_rewind: base/14007/2601_vm (COPY) | |
pg_rewind: base/14007/2602_fsm (COPY) | |
pg_rewind: base/14007/2602_vm (COPY) | |
pg_rewind: base/14007/2603_fsm (COPY) | |
pg_rewind: base/14007/2603_vm (COPY) | |
pg_rewind: base/14007/2605_fsm (COPY) | |
pg_rewind: base/14007/2605_vm (COPY) | |
pg_rewind: base/14007/2606_fsm (COPY) | |
pg_rewind: base/14007/2606_vm (COPY) | |
pg_rewind: base/14007/2607_fsm (COPY) | |
pg_rewind: base/14007/2607_vm (COPY) | |
pg_rewind: base/14007/2608_fsm (COPY) | |
pg_rewind: base/14007/2608_vm (COPY) | |
pg_rewind: base/14007/2609_fsm (COPY) | |
pg_rewind: base/14007/2609_vm (COPY) | |
pg_rewind: base/14007/2610_fsm (COPY) | |
pg_rewind: base/14007/2610_vm (COPY) | |
pg_rewind: base/14007/2612_fsm (COPY) | |
pg_rewind: base/14007/2612_vm (COPY) | |
pg_rewind: base/14007/2615_fsm (COPY) | |
pg_rewind: base/14007/2615_vm (COPY) | |
pg_rewind: base/14007/2616_fsm (COPY) | |
pg_rewind: base/14007/2616_vm (COPY) | |
pg_rewind: base/14007/2617_fsm (COPY) | |
pg_rewind: base/14007/2617_vm (COPY) | |
pg_rewind: base/14007/2618_fsm (COPY) | |
pg_rewind: base/14007/2618_vm (COPY) | |
pg_rewind: base/14007/2619_fsm (COPY) | |
pg_rewind: base/14007/2619_vm (COPY) | |
pg_rewind: base/14007/2673_fsm (COPY) | |
pg_rewind: base/14007/2674_fsm (COPY) | |
pg_rewind: base/14007/2753_fsm (COPY) | |
pg_rewind: base/14007/2753_vm (COPY) | |
pg_rewind: base/14007/2836_fsm (COPY) | |
pg_rewind: base/14007/2836_vm (COPY) | |
pg_rewind: base/14007/2838_fsm (COPY) | |
pg_rewind: base/14007/2838_vm (COPY) | |
pg_rewind: base/14007/2840_fsm (COPY) | |
pg_rewind: base/14007/2840_vm (COPY) | |
pg_rewind: base/14007/3079_fsm (COPY) | |
pg_rewind: base/14007/3079_vm (COPY) | |
pg_rewind: base/14007/3394_fsm (COPY) | |
pg_rewind: base/14007/3394_vm (COPY) | |
pg_rewind: base/14007/3456_fsm (COPY) | |
pg_rewind: base/14007/3456_vm (COPY) | |
pg_rewind: base/14007/3541_fsm (COPY) | |
pg_rewind: base/14007/3541_vm (COPY) | |
pg_rewind: base/14007/3600_fsm (COPY) | |
pg_rewind: base/14007/3600_vm (COPY) | |
pg_rewind: base/14007/3601_fsm (COPY) | |
pg_rewind: base/14007/3601_vm (COPY) | |
pg_rewind: base/14007/3602_fsm (COPY) | |
pg_rewind: base/14007/3602_vm (COPY) | |
pg_rewind: base/14007/3603_fsm (COPY) | |
pg_rewind: base/14007/3603_vm (COPY) | |
pg_rewind: base/14007/3764_fsm (COPY) | |
pg_rewind: base/14007/3764_vm (COPY) | |
pg_rewind: base/14007/pg_filenode.map (COPY) | |
pg_rewind: base/14008/1247_fsm (COPY) | |
pg_rewind: base/14008/1247_vm (COPY) | |
pg_rewind: base/14008/1249_fsm (COPY) | |
pg_rewind: base/14008/1249_vm (COPY) | |
pg_rewind: base/14008/1255_fsm (COPY) | |
pg_rewind: base/14008/1255_vm (COPY) | |
pg_rewind: base/14008/1259_fsm (COPY) | |
pg_rewind: base/14008/1259_vm (COPY) | |
pg_rewind: base/14008/13826_fsm (COPY) | |
pg_rewind: base/14008/13826_vm (COPY) | |
pg_rewind: base/14008/13831_fsm (COPY) | |
pg_rewind: base/14008/13831_vm (COPY) | |
pg_rewind: base/14008/13836_fsm (COPY) | |
pg_rewind: base/14008/13836_vm (COPY) | |
pg_rewind: base/14008/13841_fsm (COPY) | |
pg_rewind: base/14008/13841_vm (COPY) | |
pg_rewind: base/14008/2600_fsm (COPY) | |
pg_rewind: base/14008/2600_vm (COPY) | |
pg_rewind: base/14008/2601_fsm (COPY) | |
pg_rewind: base/14008/2601_vm (COPY) | |
pg_rewind: base/14008/2602_fsm (COPY) | |
pg_rewind: base/14008/2602_vm (COPY) | |
pg_rewind: base/14008/2603_fsm (COPY) | |
pg_rewind: base/14008/2603_vm (COPY) | |
pg_rewind: base/14008/2605_fsm (COPY) | |
pg_rewind: base/14008/2605_vm (COPY) | |
pg_rewind: base/14008/2606_fsm (COPY) | |
pg_rewind: base/14008/2606_vm (COPY) | |
pg_rewind: base/14008/2607_fsm (COPY) | |
pg_rewind: base/14008/2607_vm (COPY) | |
pg_rewind: base/14008/2608_fsm (COPY) | |
pg_rewind: base/14008/2608_vm (COPY) | |
pg_rewind: base/14008/2609_fsm (COPY) | |
pg_rewind: base/14008/2609_vm (COPY) | |
pg_rewind: base/14008/2610_fsm (COPY) | |
pg_rewind: base/14008/2610_vm (COPY) | |
pg_rewind: base/14008/2612_fsm (COPY) | |
pg_rewind: base/14008/2612_vm (COPY) | |
pg_rewind: base/14008/2615_fsm (COPY) | |
pg_rewind: base/14008/2615_vm (COPY) | |
pg_rewind: base/14008/2616_fsm (COPY) | |
pg_rewind: base/14008/2616_vm (COPY) | |
pg_rewind: base/14008/2617_fsm (COPY) | |
pg_rewind: base/14008/2617_vm (COPY) | |
pg_rewind: base/14008/2618_fsm (COPY) | |
pg_rewind: base/14008/2618_vm (COPY) | |
pg_rewind: base/14008/2619_fsm (COPY) | |
pg_rewind: base/14008/2619_vm (COPY) | |
pg_rewind: base/14008/2673_fsm (COPY) | |
pg_rewind: base/14008/2674_fsm (COPY) | |
pg_rewind: base/14008/2753_fsm (COPY) | |
pg_rewind: base/14008/2753_vm (COPY) | |
pg_rewind: base/14008/2836_fsm (COPY) | |
pg_rewind: base/14008/2836_vm (COPY) | |
pg_rewind: base/14008/2838_fsm (COPY) | |
pg_rewind: base/14008/2838_vm (COPY) | |
pg_rewind: base/14008/2840_fsm (COPY) | |
pg_rewind: base/14008/2840_vm (COPY) | |
pg_rewind: base/14008/3079_fsm (COPY) | |
pg_rewind: base/14008/3079_vm (COPY) | |
pg_rewind: base/14008/3394_fsm (COPY) | |
pg_rewind: base/14008/3394_vm (COPY) | |
pg_rewind: base/14008/3456_fsm (COPY) | |
pg_rewind: base/14008/3456_vm (COPY) | |
pg_rewind: base/14008/3541_fsm (COPY) | |
pg_rewind: base/14008/3541_vm (COPY) | |
pg_rewind: base/14008/3600_fsm (COPY) | |
pg_rewind: base/14008/3600_vm (COPY) | |
pg_rewind: base/14008/3601_fsm (COPY) | |
pg_rewind: base/14008/3601_vm (COPY) | |
pg_rewind: base/14008/3602_fsm (COPY) | |
pg_rewind: base/14008/3602_vm (COPY) | |
pg_rewind: base/14008/3603_fsm (COPY) | |
pg_rewind: base/14008/3603_vm (COPY) | |
pg_rewind: base/14008/3764_fsm (COPY) | |
pg_rewind: base/14008/3764_vm (COPY) | |
pg_rewind: base/14008/pg_filenode.map (COPY) | |
pg_rewind: global/1213_fsm (COPY) | |
pg_rewind: global/1213_vm (COPY) | |
pg_rewind: global/1214_fsm (COPY) | |
pg_rewind: global/1214_vm (COPY) | |
pg_rewind: global/1260_fsm (COPY) | |
pg_rewind: global/1260_vm (COPY) | |
pg_rewind: global/1261_fsm (COPY) | |
pg_rewind: global/1261_vm (COPY) | |
pg_rewind: global/1262_fsm (COPY) | |
pg_rewind: global/1262_vm (COPY) | |
pg_rewind: global/2396_fsm (COPY) | |
pg_rewind: global/2396_vm (COPY) | |
pg_rewind: global/pg_filenode.map (COPY) | |
pg_rewind: pg_hba.conf (COPY) | |
pg_rewind: pg_ident.conf (COPY) | |
pg_rewind: pg_logical/replorigin_checkpoint (COPY) | |
pg_rewind: pg_multixact/members/0000 (COPY) | |
pg_rewind: pg_multixact/offsets/0000 (COPY) | |
pg_rewind: pg_wal/000000010000000000000003 (COPY) | |
pg_rewind: pg_wal/00000002.history (COPY) | |
pg_rewind: pg_wal/000000020000000000000003 (COPY) | |
pg_rewind: pg_wal/000000020000000000000004 (COPY) | |
pg_rewind: pg_wal/archive_status/000000010000000000000003.done (COPY) | |
pg_rewind: pg_wal/archive_status/00000002.history.done (COPY) | |
pg_rewind: pg_xact/0000 (COPY) | |
pg_rewind: postgresql.auto.conf (COPY) | |
pg_rewind: postgresql.conf (COPY) | |
pg_rewind: standby.signal (COPY) | |
pg_rewind: base/14008/16384 (NONE) | |
pg_rewind: block 0 | |
pg_rewind: postmaster.opts (REMOVE) | |
pg_rewind: pg_subtrans/0000 (REMOVE) | |
pg_rewind: pg_stat/global.stat (REMOVE) | |
pg_rewind: pg_stat/db_14008.stat (REMOVE) | |
pg_rewind: pg_stat/db_0.stat (REMOVE) | |
pg_rewind: pg_replslot/replica/state (REMOVE) | |
pg_rewind: pg_replslot/replica (REMOVE) | |
pg_rewind: global/pg_internal.init (REMOVE) | |
pg_rewind: base/14008/pg_internal.init (REMOVE) | |
pg_rewind: backup_manifest (REMOVE) | |
pg_rewind: backup_label.old (REMOVE) | |
pg_rewind: need to copy 51 MB (total source directory size is 72 MB) | |
pg_rewind: getting 302 file chunks | |
pg_rewind: received chunk for file "base/1/1247_fsm", offset 0, size 24576 | |
pg_rewind: received chunk for file "base/1/1247_vm", offset 0, size 8192 | |
pg_rewind: received chunk for file "base/1/1249_fsm", offset 0, size 24576 | |
pg_rewind: received chunk for file "base/1/1249_vm", offset 0, size 8192 | |
pg_rewind: received chunk for file "base/1/1255_fsm", offset 0, size 24576 | |
pg_rewind: received chunk for file "base/1/1255_vm", offset 0, size 8192 | |
pg_rewind: received chunk for file "base/1/1259_fsm", offset 0, size 24576 | |
pg_rewind: received chunk for file "base/1/1259_vm", offset 0, size 8192 | |
pg_rewind: received chunk for file "base/1/13826_fsm", offset 0, size 24576 | |
pg_rewind: received chunk for file "base/1/13826_vm", offset 0, size 8192 | |
pg_rewind: received chunk for file "base/1/13831_fsm", offset 0, size 24576 | |
pg_rewind: received chunk for file "base/1/13831_vm", offset 0, size 8192 | |
pg_rewind: received chunk for file "base/1/13836_fsm", offset 0, size 24576 | |
pg_rewind: received chunk for file "base/1/13836_vm", offset 0, size 8192 | |
pg_rewind: received chunk for file "base/1/13841_fsm", offset 0, size 24576 | |
pg_rewind: received chunk for file "base/1/13841_vm", offset 0, size 8192 | |
pg_rewind: received chunk for file "base/1/2600_fsm", offset 0, size 24576 | |
pg_rewind: received chunk for file "base/1/2600_vm", offset 0, size 8192 | |
pg_rewind: received chunk for file "base/1/2601_fsm", offset 0, size 24576 | |
pg_rewind: received chunk for file "base/1/2601_vm", offset 0, size 8192 | |
pg_rewind: received chunk for file "base/1/2602_fsm", offset 0, size 24576 | |
pg_rewind: received chunk for file "base/1/2602_vm", offset 0, size 8192 | |
pg_rewind: received chunk for file "base/1/2603_fsm", offset 0, size 24576 | |
pg_rewind: received chunk for file "base/1/2603_vm", offset 0, size 8192 | |
pg_rewind: received chunk for file "base/1/2605_fsm", offset 0, size 24576 | |
pg_rewind: received chunk for file "base/1/2605_vm", offset 0, size 8192 | |
pg_rewind: received chunk for file "base/1/2606_fsm", offset 0, size 24576 | |
pg_rewind: received chunk for file "base/1/2606_vm", offset 0, size 8192 | |
pg_rewind: received chunk for file "base/1/2607_fsm", offset 0, size 24576 | |
pg_rewind: received chunk for file "base/1/2607_vm", offset 0, size 8192 | |
pg_rewind: received chunk for file "base/1/2608_fsm", offset 0, size 24576 | |
pg_rewind: received chunk for file "base/1/2608_vm", offset 0, size 8192 | |
pg_rewind: received chunk for file "base/1/2609_fsm", offset 0, size 24576 | |
pg_rewind: received chunk for file "base/1/2609_vm", offset 0, size 8192 | |
pg_rewind: received chunk for file "base/1/2610_fsm", offset 0, size 24576 | |
pg_rewind: received chunk for file "base/1/2610_vm", offset 0, size 8192 | |
pg_rewind: received chunk for file "base/1/2612_fsm", offset 0, size 24576 | |
pg_rewind: received chunk for file "base/1/2612_vm", offset 0, size 8192 | |
pg_rewind: received chunk for file "base/1/2615_fsm", offset 0, size 24576 | |
pg_rewind: received chunk for file "base/1/2615_vm", offset 0, size 8192 | |
pg_rewind: received chunk for file "base/1/2616_fsm", offset 0, size 24576 | |
pg_rewind: received chunk for file "base/1/2616_vm", offset 0, size 8192 | |
pg_rewind: received chunk for file "base/1/2617_fsm", offset 0, size 24576 | |
pg_rewind: received chunk for file "base/1/2617_vm", offset 0, size 8192 | |
pg_rewind: received chunk for file "base/1/2618_fsm", offset 0, size 24576 | |
pg_rewind: received chunk for file "base/1/2618_vm", offset 0, size 8192 | |
pg_rewind: received chunk for file "base/1/2619_fsm", offset 0, size 24576 | |
pg_rewind: received chunk for file "base/1/2619_vm", offset 0, size 8192 | |
pg_rewind: received chunk for file "base/1/2673_fsm", offset 0, size 24576 | |
pg_rewind: received chunk for file "base/1/2674_fsm", offset 0, size 24576 | |
pg_rewind: received chunk for file "base/1/2753_fsm", offset 0, size 24576 | |
pg_rewind: received chunk for file "base/1/2753_vm", offset 0, size 8192 | |
pg_rewind: received chunk for file "base/1/2836_fsm", offset 0, size 24576 | |
pg_rewind: received chunk for file "base/1/2836_vm", offset 0, size 8192 | |
pg_rewind: received chunk for file "base/1/2838_fsm", offset 0, size 24576 | |
pg_rewind: received chunk for file "base/1/2838_vm", offset 0, size 8192 | |
pg_rewind: received chunk for file "base/1/2840_fsm", offset 0, size 24576 | |
pg_rewind: received chunk for file "base/1/2840_vm", offset 0, size 8192 | |
pg_rewind: received chunk for file "base/1/3079_fsm", offset 0, size 24576 | |
pg_rewind: received chunk for file "base/1/3079_vm", offset 0, size 8192 | |
pg_rewind: received chunk for file "base/1/3394_fsm", offset 0, size 24576 | |
pg_rewind: received chunk for file "base/1/3394_vm", offset 0, size 8192 | |
pg_rewind: received chunk for file "base/1/3456_fsm", offset 0, size 24576 | |
pg_rewind: received chunk for file "base/1/3456_vm", offset 0, size 8192 | |
pg_rewind: received chunk for file "base/1/3541_fsm", offset 0, size 24576 | |
pg_rewind: received chunk for file "base/1/3541_vm", offset 0, size 8192 | |
pg_rewind: received chunk for file "base/1/3600_fsm", offset 0, size 24576 | |
pg_rewind: received chunk for file "base/1/3600_vm", offset 0, size 8192 | |
pg_rewind: received chunk for file "base/1/3601_fsm", offset 0, size 24576 | |
pg_rewind: received chunk for file "base/1/3601_vm", offset 0, size 8192 | |
pg_rewind: received chunk for file "base/1/3602_fsm", offset 0, size 24576 | |
pg_rewind: received chunk for file "base/1/3602_vm", offset 0, size 8192 | |
pg_rewind: received chunk for file "base/1/3603_fsm", offset 0, size 24576 | |
pg_rewind: received chunk for file "base/1/3603_vm", offset 0, size 8192 | |
pg_rewind: received chunk for file "base/1/3764_fsm", offset 0, size 24576 | |
pg_rewind: received chunk for file "base/1/3764_vm", offset 0, size 8192 | |
pg_rewind: received chunk for file "base/1/pg_filenode.map", offset 0, size 512 | |
pg_rewind: received chunk for file "base/14007/1247_fsm", offset 0, size 24576 | |
pg_rewind: received chunk for file "base/14007/1247_vm", offset 0, size 8192 | |
pg_rewind: received chunk for file "base/14007/1249_fsm", offset 0, size 24576 | |
pg_rewind: received chunk for file "base/14007/1249_vm", offset 0, size 8192 | |
pg_rewind: received chunk for file "base/14007/1255_fsm", offset 0, size 24576 | |
pg_rewind: received chunk for file "base/14007/1255_vm", offset 0, size 8192 | |
pg_rewind: received chunk for file "base/14007/1259_fsm", offset 0, size 24576 | |
pg_rewind: received chunk for file "base/14007/1259_vm", offset 0, size 8192 | |
pg_rewind: received chunk for file "base/14007/13826_fsm", offset 0, size 24576 | |
pg_rewind: received chunk for file "base/14007/13826_vm", offset 0, size 8192 | |
pg_rewind: received chunk for file "base/14007/13831_fsm", offset 0, size 24576 | |
pg_rewind: received chunk for file "base/14007/13831_vm", offset 0, size 8192 | |
pg_rewind: received chunk for file "base/14007/13836_fsm", offset 0, size 24576 | |
pg_rewind: received chunk for file "base/14007/13836_vm", offset 0, size 8192 | |
pg_rewind: received chunk for file "base/14007/13841_fsm", offset 0, size 24576 | |
pg_rewind: received chunk for file "base/14007/13841_vm", offset 0, size 8192 | |
pg_rewind: received chunk for file "base/14007/2600_fsm", offset 0, size 24576 | |
pg_rewind: received chunk for file "base/14007/2600_vm", offset 0, size 8192 | |
pg_rewind: received chunk for file "base/14007/2601_fsm", offset 0, size 24576 | |
pg_rewind: received chunk for file "base/14007/2601_vm", offset 0, size 8192 | |
pg_rewind: received chunk for file "base/14007/2602_fsm", offset 0, size 24576 | |
pg_rewind: received chunk for file "base/14007/2602_vm", offset 0, size 8192 | |
pg_rewind: received chunk for file "base/14007/2603_fsm", offset 0, size 24576 | |
pg_rewind: received chunk for file "base/14007/2603_vm", offset 0, size 8192 | |
pg_rewind: received chunk for file "base/14007/2605_fsm", offset 0, size 24576 | |
pg_rewind: received chunk for file "base/14007/2605_vm", offset 0, size 8192 | |
pg_rewind: received chunk for file "base/14007/2606_fsm", offset 0, size 24576 | |
pg_rewind: received chunk for file "base/14007/2606_vm", offset 0, size 8192 | |
pg_rewind: received chunk for file "base/14007/2607_fsm", offset 0, size 24576 | |
pg_rewind: received chunk for file "base/14007/2607_vm", offset 0, size 8192 | |
pg_rewind: received chunk for file "base/14007/2608_fsm", offset 0, size 24576 | |
pg_rewind: received chunk for file "base/14007/2608_vm", offset 0, size 8192 | |
pg_rewind: received chunk for file "base/14007/2609_fsm", offset 0, size 24576 | |
pg_rewind: received chunk for file "base/14007/2609_vm", offset 0, size 8192 | |
pg_rewind: received chunk for file "base/14007/2610_fsm", offset 0, size 24576 | |
pg_rewind: received chunk for file "base/14007/2610_vm", offset 0, size 8192 | |
pg_rewind: received chunk for file "base/14007/2612_fsm", offset 0, size 24576 | |
pg_rewind: received chunk for file "base/14007/2612_vm", offset 0, size 8192 | |
pg_rewind: received chunk for file "base/14007/2615_fsm", offset 0, size 24576 | |
pg_rewind: received chunk for file "base/14007/2615_vm", offset 0, size 8192 | |
pg_rewind: received chunk for file "base/14007/2616_fsm", offset 0, size 24576 | |
pg_rewind: received chunk for file "base/14007/2616_vm", offset 0, size 8192 | |
pg_rewind: received chunk for file "base/14007/2617_fsm", offset 0, size 24576 | |
pg_rewind: received chunk for file "base/14007/2617_vm", offset 0, size 8192 | |
pg_rewind: received chunk for file "base/14007/2618_fsm", offset 0, size 24576 | |
pg_rewind: received chunk for file "base/14007/2618_vm", offset 0, size 8192 | |
pg_rewind: received chunk for file "base/14007/2619_fsm", offset 0, size 24576 | |
pg_rewind: received chunk for file "base/14007/2619_vm", offset 0, size 8192 | |
pg_rewind: received chunk for file "base/14007/2673_fsm", offset 0, size 24576 | |
pg_rewind: received chunk for file "base/14007/2674_fsm", offset 0, size 24576 | |
pg_rewind: received chunk for file "base/14007/2753_fsm", offset 0, size 24576 | |
pg_rewind: received chunk for file "base/14007/2753_vm", offset 0, size 8192 | |
pg_rewind: received chunk for file "base/14007/2836_fsm", offset 0, size 24576 | |
pg_rewind: received chunk for file "base/14007/2836_vm", offset 0, size 8192 | |
pg_rewind: received chunk for file "base/14007/2838_fsm", offset 0, size 24576 | |
pg_rewind: received chunk for file "base/14007/2838_vm", offset 0, size 8192 | |
pg_rewind: received chunk for file "base/14007/2840_fsm", offset 0, size 24576 | |
pg_rewind: received chunk for file "base/14007/2840_vm", offset 0, size 8192 | |
pg_rewind: received chunk for file "base/14007/3079_fsm", offset 0, size 24576 | |
pg_rewind: received chunk for file "base/14007/3079_vm", offset 0, size 8192 | |
pg_rewind: received chunk for file "base/14007/3394_fsm", offset 0, size 24576 | |
pg_rewind: received chunk for file "base/14007/3394_vm", offset 0, size 8192 | |
pg_rewind: received chunk for file "base/14007/3456_fsm", offset 0, size 24576 | |
pg_rewind: received chunk for file "base/14007/3456_vm", offset 0, size 8192 | |
pg_rewind: received chunk for file "base/14007/3541_fsm", offset 0, size 24576 | |
pg_rewind: received chunk for file "base/14007/3541_vm", offset 0, size 8192 | |
pg_rewind: received chunk for file "base/14007/3600_fsm", offset 0, size 24576 | |
pg_rewind: received chunk for file "base/14007/3600_vm", offset 0, size 8192 | |
pg_rewind: received chunk for file "base/14007/3601_fsm", offset 0, size 24576 | |
pg_rewind: received chunk for file "base/14007/3601_vm", offset 0, size 8192 | |
pg_rewind: received chunk for file "base/14007/3602_fsm", offset 0, size 24576 | |
pg_rewind: received chunk for file "base/14007/3602_vm", offset 0, size 8192 | |
pg_rewind: received chunk for file "base/14007/3603_fsm", offset 0, size 24576 | |
pg_rewind: received chunk for file "base/14007/3603_vm", offset 0, size 8192 | |
pg_rewind: received chunk for file "base/14007/3764_fsm", offset 0, size 24576 | |
pg_rewind: received chunk for file "base/14007/3764_vm", offset 0, size 8192 | |
pg_rewind: received chunk for file "base/14007/pg_filenode.map", offset 0, size 512 | |
pg_rewind: received chunk for file "base/14008/1247_fsm", offset 0, size 24576 | |
pg_rewind: received chunk for file "base/14008/1247_vm", offset 0, size 8192 | |
pg_rewind: received chunk for file "base/14008/1249_fsm", offset 0, size 24576 | |
pg_rewind: received chunk for file "base/14008/1249_vm", offset 0, size 8192 | |
pg_rewind: received chunk for file "base/14008/1255_fsm", offset 0, size 24576 | |
pg_rewind: received chunk for file "base/14008/1255_vm", offset 0, size 8192 | |
pg_rewind: received chunk for file "base/14008/1259_fsm", offset 0, size 24576 | |
pg_rewind: received chunk for file "base/14008/1259_vm", offset 0, size 8192 | |
pg_rewind: received chunk for file "base/14008/13826_fsm", offset 0, size 24576 | |
pg_rewind: received chunk for file "base/14008/13826_vm", offset 0, size 8192 | |
pg_rewind: received chunk for file "base/14008/13831_fsm", offset 0, size 24576 | |
pg_rewind: received chunk for file "base/14008/13831_vm", offset 0, size 8192 | |
pg_rewind: received chunk for file "base/14008/13836_fsm", offset 0, size 24576 | |
pg_rewind: received chunk for file "base/14008/13836_vm", offset 0, size 8192 | |
pg_rewind: received chunk for file "base/14008/13841_fsm", offset 0, size 24576 | |
pg_rewind: received chunk for file "base/14008/13841_vm", offset 0, size 8192 | |
pg_rewind: received chunk for file "base/14008/2600_fsm", offset 0, size 24576 | |
pg_rewind: received chunk for file "base/14008/2600_vm", offset 0, size 8192 | |
pg_rewind: received chunk for file "base/14008/2601_fsm", offset 0, size 24576 | |
pg_rewind: received chunk for file "base/14008/2601_vm", offset 0, size 8192 | |
pg_rewind: received chunk for file "base/14008/2602_fsm", offset 0, size 24576 | |
pg_rewind: received chunk for file "base/14008/2602_vm", offset 0, size 8192 | |
pg_rewind: received chunk for file "base/14008/2603_fsm", offset 0, size 24576 | |
pg_rewind: received chunk for file "base/14008/2603_vm", offset 0, size 8192 | |
pg_rewind: received chunk for file "base/14008/2605_fsm", offset 0, size 24576 | |
pg_rewind: received chunk for file "base/14008/2605_vm", offset 0, size 8192 | |
pg_rewind: received chunk for file "base/14008/2606_fsm", offset 0, size 24576 | |
pg_rewind: received chunk for file "base/14008/2606_vm", offset 0, size 8192 | |
pg_rewind: received chunk for file "base/14008/2607_fsm", offset 0, size 24576 | |
pg_rewind: received chunk for file "base/14008/2607_vm", offset 0, size 8192 | |
pg_rewind: received chunk for file "base/14008/2608_fsm", offset 0, size 24576 | |
pg_rewind: received chunk for file "base/14008/2608_vm", offset 0, size 8192 | |
pg_rewind: received chunk for file "base/14008/2609_fsm", offset 0, size 24576 | |
pg_rewind: received chunk for file "base/14008/2609_vm", offset 0, size 8192 | |
pg_rewind: received chunk for file "base/14008/2610_fsm", offset 0, size 24576 | |
pg_rewind: received chunk for file "base/14008/2610_vm", offset 0, size 8192 | |
pg_rewind: received chunk for file "base/14008/2612_fsm", offset 0, size 24576 | |
pg_rewind: received chunk for file "base/14008/2612_vm", offset 0, size 8192 | |
pg_rewind: received chunk for file "base/14008/2615_fsm", offset 0, size 24576 | |
pg_rewind: received chunk for file "base/14008/2615_vm", offset 0, size 8192 | |
pg_rewind: received chunk for file "base/14008/2616_fsm", offset 0, size 24576 | |
pg_rewind: received chunk for file "base/14008/2616_vm", offset 0, size 8192 | |
pg_rewind: received chunk for file "base/14008/2617_fsm", offset 0, size 24576 | |
pg_rewind: received chunk for file "base/14008/2617_vm", offset 0, size 8192 | |
pg_rewind: received chunk for file "base/14008/2618_fsm", offset 0, size 24576 | |
pg_rewind: received chunk for file "base/14008/2618_vm", offset 0, size 8192 | |
pg_rewind: received chunk for file "base/14008/2619_fsm", offset 0, size 24576 | |
pg_rewind: received chunk for file "base/14008/2619_vm", offset 0, size 8192 | |
pg_rewind: received chunk for file "base/14008/2673_fsm", offset 0, size 24576 | |
pg_rewind: received chunk for file "base/14008/2674_fsm", offset 0, size 24576 | |
pg_rewind: received chunk for file "base/14008/2753_fsm", offset 0, size 24576 | |
pg_rewind: received chunk for file "base/14008/2753_vm", offset 0, size 8192 | |
pg_rewind: received chunk for file "base/14008/2836_fsm", offset 0, size 24576 | |
pg_rewind: received chunk for file "base/14008/2836_vm", offset 0, size 8192 | |
pg_rewind: received chunk for file "base/14008/2838_fsm", offset 0, size 24576 | |
pg_rewind: received chunk for file "base/14008/2838_vm", offset 0, size 8192 | |
pg_rewind: received chunk for file "base/14008/2840_fsm", offset 0, size 24576 | |
pg_rewind: received chunk for file "base/14008/2840_vm", offset 0, size 8192 | |
pg_rewind: received chunk for file "base/14008/3079_fsm", offset 0, size 24576 | |
pg_rewind: received chunk for file "base/14008/3079_vm", offset 0, size 8192 | |
pg_rewind: received chunk for file "base/14008/3394_fsm", offset 0, size 24576 | |
pg_rewind: received chunk for file "base/14008/3394_vm", offset 0, size 8192 | |
pg_rewind: received chunk for file "base/14008/3456_fsm", offset 0, size 24576 | |
pg_rewind: received chunk for file "base/14008/3456_vm", offset 0, size 8192 | |
pg_rewind: received chunk for file "base/14008/3541_fsm", offset 0, size 24576 | |
pg_rewind: received chunk for file "base/14008/3541_vm", offset 0, size 8192 | |
pg_rewind: received chunk for file "base/14008/3600_fsm", offset 0, size 24576 | |
pg_rewind: received chunk for file "base/14008/3600_vm", offset 0, size 8192 | |
pg_rewind: received chunk for file "base/14008/3601_fsm", offset 0, size 24576 | |
pg_rewind: received chunk for file "base/14008/3601_vm", offset 0, size 8192 | |
pg_rewind: received chunk for file "base/14008/3602_fsm", offset 0, size 24576 | |
pg_rewind: received chunk for file "base/14008/3602_vm", offset 0, size 8192 | |
pg_rewind: received chunk for file "base/14008/3603_fsm", offset 0, size 24576 | |
pg_rewind: received chunk for file "base/14008/3603_vm", offset 0, size 8192 | |
pg_rewind: received chunk for file "base/14008/3764_fsm", offset 0, size 24576 | |
pg_rewind: received chunk for file "base/14008/3764_vm", offset 0, size 8192 | |
pg_rewind: received chunk for file "base/14008/pg_filenode.map", offset 0, size 512 | |
pg_rewind: received chunk for file "global/1213_fsm", offset 0, size 24576 | |
pg_rewind: received chunk for file "global/1213_vm", offset 0, size 8192 | |
pg_rewind: received chunk for file "global/1214_fsm", offset 0, size 24576 | |
pg_rewind: received chunk for file "global/1214_vm", offset 0, size 8192 | |
pg_rewind: received chunk for file "global/1260_fsm", offset 0, size 24576 | |
pg_rewind: received chunk for file "global/1260_vm", offset 0, size 8192 | |
pg_rewind: received chunk for file "global/1261_fsm", offset 0, size 24576 | |
pg_rewind: received chunk for file "global/1261_vm", offset 0, size 8192 | |
pg_rewind: received chunk for file "global/1262_fsm", offset 0, size 24576 | |
pg_rewind: received chunk for file "global/1262_vm", offset 0, size 8192 | |
pg_rewind: received chunk for file "global/2396_fsm", offset 0, size 24576 | |
pg_rewind: received chunk for file "global/2396_vm", offset 0, size 8192 | |
pg_rewind: received chunk for file "global/pg_filenode.map", offset 0, size 512 | |
pg_rewind: received chunk for file "pg_hba.conf", offset 0, size 4789 | |
pg_rewind: received chunk for file "pg_ident.conf", offset 0, size 1636 | |
pg_rewind: received chunk for file "pg_logical/replorigin_checkpoint", offset 0, size 8 | |
pg_rewind: received chunk for file "pg_multixact/members/0000", offset 0, size 8192 | |
pg_rewind: received chunk for file "pg_multixact/offsets/0000", offset 0, size 8192 | |
pg_rewind: received chunk for file "pg_wal/000000010000000000000003", offset 0, size 1048576 | |
pg_rewind: received chunk for file "pg_wal/000000010000000000000003", offset 1048576, size 1048576 | |
pg_rewind: received chunk for file "pg_wal/000000010000000000000003", offset 2097152, size 1048576 | |
pg_rewind: received chunk for file "pg_wal/000000010000000000000003", offset 3145728, size 1048576 | |
pg_rewind: received chunk for file "pg_wal/000000010000000000000003", offset 4194304, size 1048576 | |
pg_rewind: received chunk for file "pg_wal/000000010000000000000003", offset 5242880, size 1048576 | |
pg_rewind: received chunk for file "pg_wal/000000010000000000000003", offset 6291456, size 1048576 | |
pg_rewind: received chunk for file "pg_wal/000000010000000000000003", offset 7340032, size 1048576 | |
pg_rewind: received chunk for file "pg_wal/000000010000000000000003", offset 8388608, size 1048576 | |
pg_rewind: received chunk for file "pg_wal/000000010000000000000003", offset 9437184, size 1048576 | |
pg_rewind: received chunk for file "pg_wal/000000010000000000000003", offset 10485760, size 1048576 | |
pg_rewind: received chunk for file "pg_wal/000000010000000000000003", offset 11534336, size 1048576 | |
pg_rewind: received chunk for file "pg_wal/000000010000000000000003", offset 12582912, size 1048576 | |
pg_rewind: received chunk for file "pg_wal/000000010000000000000003", offset 13631488, size 1048576 | |
pg_rewind: received chunk for file "pg_wal/000000010000000000000003", offset 14680064, size 1048576 | |
pg_rewind: received chunk for file "pg_wal/000000010000000000000003", offset 15728640, size 1048576 | |
pg_rewind: received chunk for file "pg_wal/00000002.history", offset 0, size 41 | |
pg_rewind: received chunk for file "pg_wal/000000020000000000000003", offset 0, size 1048576 | |
pg_rewind: received chunk for file "pg_wal/000000020000000000000003", offset 1048576, size 1048576 | |
pg_rewind: received chunk for file "pg_wal/000000020000000000000003", offset 2097152, size 1048576 | |
pg_rewind: received chunk for file "pg_wal/000000020000000000000003", offset 3145728, size 1048576 | |
pg_rewind: received chunk for file "pg_wal/000000020000000000000003", offset 4194304, size 1048576 | |
pg_rewind: received chunk for file "pg_wal/000000020000000000000003", offset 5242880, size 1048576 | |
pg_rewind: received chunk for file "pg_wal/000000020000000000000003", offset 6291456, size 1048576 | |
pg_rewind: received chunk for file "pg_wal/000000020000000000000003", offset 7340032, size 1048576 | |
pg_rewind: received chunk for file "pg_wal/000000020000000000000003", offset 8388608, size 1048576 | |
pg_rewind: received chunk for file "pg_wal/000000020000000000000003", offset 9437184, size 1048576 | |
pg_rewind: received chunk for file "pg_wal/000000020000000000000003", offset 10485760, size 1048576 | |
pg_rewind: received chunk for file "pg_wal/000000020000000000000003", offset 11534336, size 1048576 | |
pg_rewind: received chunk for file "pg_wal/000000020000000000000003", offset 12582912, size 1048576 | |
pg_rewind: received chunk for file "pg_wal/000000020000000000000003", offset 13631488, size 1048576 | |
pg_rewind: received chunk for file "pg_wal/000000020000000000000003", offset 14680064, size 1048576 | |
pg_rewind: received chunk for file "pg_wal/000000020000000000000003", offset 15728640, size 1048576 | |
pg_rewind: received chunk for file "pg_wal/000000020000000000000004", offset 0, size 1048576 | |
pg_rewind: received chunk for file "pg_wal/000000020000000000000004", offset 1048576, size 1048576 | |
pg_rewind: received chunk for file "pg_wal/000000020000000000000004", offset 2097152, size 1048576 | |
pg_rewind: received chunk for file "pg_wal/000000020000000000000004", offset 3145728, size 1048576 | |
pg_rewind: received chunk for file "pg_wal/000000020000000000000004", offset 4194304, size 1048576 | |
pg_rewind: received chunk for file "pg_wal/000000020000000000000004", offset 5242880, size 1048576 | |
pg_rewind: received chunk for file "pg_wal/000000020000000000000004", offset 6291456, size 1048576 | |
pg_rewind: received chunk for file "pg_wal/000000020000000000000004", offset 7340032, size 1048576 | |
pg_rewind: received chunk for file "pg_wal/000000020000000000000004", offset 8388608, size 1048576 | |
pg_rewind: received chunk for file "pg_wal/000000020000000000000004", offset 9437184, size 1048576 | |
pg_rewind: received chunk for file "pg_wal/000000020000000000000004", offset 10485760, size 1048576 | |
pg_rewind: received chunk for file "pg_wal/000000020000000000000004", offset 11534336, size 1048576 | |
pg_rewind: received chunk for file "pg_wal/000000020000000000000004", offset 12582912, size 1048576 | |
pg_rewind: received chunk for file "pg_wal/000000020000000000000004", offset 13631488, size 1048576 | |
pg_rewind: received chunk for file "pg_wal/000000020000000000000004", offset 14680064, size 1048576 | |
pg_rewind: received chunk for file "pg_wal/000000020000000000000004", offset 15728640, size 1048576 | |
pg_rewind: received chunk for file "pg_xact/0000", offset 0, size 8192 | |
pg_rewind: received chunk for file "postgresql.auto.conf", offset 0, size 360 | |
pg_rewind: received chunk for file "postgresql.conf", offset 0, size 28815 | |
pg_rewind: received chunk for file "base/14008/16384", offset 0, size 8192 | |
53108/53108 kB (100%) copied | |
pg_rewind: fetched file "global/pg_control", length 8192 | |
pg_rewind: creating backup label and updating control file | |
pg_rewind: syncing target data directory | |
pg_rewind: Done! | |
postgres@db:~/playground/rewinddemo$ cat replica/postgresql.auto.conf | |
# Do not edit this file manually! | |
# It will be overwritten by the ALTER SYSTEM command. | |
primary_conninfo = 'user=postgres passfile=''/home/postgres/.pgpass'' channel_binding=prefer port=5433 sslmode=prefer sslcompression=0 sslsni=1 ssl_min_protocol_version=TLSv1.2 gssencmode=disable krbsrvname=postgres target_session_attrs=any' | |
primary_slot_name = 'replica' | |
primary_conninfo = 'user=postgres passfile=''/home/postgres/.pgpass'' channel_binding=prefer port=5432 sslmode=prefer sslcompression=0 sslsni=1 ssl_min_protocol_version=TLSv1.2 gssencmode=disable krbsrvname=postgres target_session_attrs=any' | |
postgres@db:~/playground/rewinddemo$ vim replica/postgresql.auto.conf | |
postgres@db:~/playground/rewinddemo$ cat replica/postgresql.auto.conf | |
# Do not edit this file manually! | |
# It will be overwritten by the ALTER SYSTEM command. | |
primary_slot_name = 'replica' | |
primary_conninfo = 'user=postgres passfile=''/home/postgres/.pgpass'' channel_binding=prefer port=5432 sslmode=prefer sslcompression=0 sslsni=1 ssl_min_protocol_version=TLSv1.2 gssencmode=disable krbsrvname=postgres target_session_attrs=any' | |
postgres@db:~/playground/rewinddemo$ touch replica/standby.signal | |
postgres@db:~/playground/rewinddemo$ psql -p 5432 -c "select pg_create_physical_replication_slot('replica');" | |
ERROR: replication slot "replica" already exists | |
postgres@db:~/playground/rewinddemo$ psql -p 5432 -c "select pg_drop_replication_slot('replica');" | |
pg_drop_replication_slot | |
-------------------------- | |
(1 row) | |
postgres@db:~/playground/rewinddemo$ psql -p 5432 -c "select pg_create_physical_replication_slot('replica');" | |
pg_create_physical_replication_slot | |
------------------------------------- | |
(replica,) | |
(1 row) | |
postgres@db:~/playground/rewinddemo$ psql -p 5432 -c 'select pg_promote();' | |
pg_promote | |
------------ | |
t | |
(1 row) | |
postgres@db:~/playground/rewinddemo$ grep port replica/postgresql.conf | |
#port = 5432 # (change requires restart) | |
#ssl_passphrase_command_supports_reload = off | |
# supported by the operating system: | |
# supported by the operating system: | |
# supported by the operating system: | |
# %r = remote host and port | |
port=5432 | |
postgres@db:~/playground/rewinddemo$ vim replica/postgresql.conf | |
postgres@db:~/playground/rewinddemo$ vim replica/postgresql.auto.conf | |
postgres@db:~/playground/rewinddemo$ touch replica/standby.signal | |
postgres@db:~/playground/rewinddemo$ pg_ctl -D replica -l logfile2 start | |
waiting for server to start.... done | |
server started | |
postgres@db:~/playground/rewinddemo$ psql -Ppager -p 5432 -c 'select * from pg_replication_slots;' | |
slot_name | plugin | slot_type | datoid | database | temporary | active | active_pid | xmin | catalog_xmin | restart_lsn | confirmed_flush_lsn | wal_status | safe_wal_size | two_phase | |
-----------+--------+-----------+--------+----------+-----------+--------+------------+------+--------------+-------------+---------------------+------------+---------------+----------- | |
replica | | physical | | | f | t | 4386 | | | 0/3000478 | | reserved | | f | |
(1 row) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment