====== PostgreSQL mentés és helyreállítás ====== ==== Előkészítő műveletek ==== A mentés és helyreállítás gyakorlásához szükség van egy telepített és inicializált PostgreSQL adatbázis példányra. Mentések a pg01 (192.168.100.71) gépről készülnek. Helyreállításhoz a pg03 (192.168.100.73) gépet használjuk. A hozzáférések ''trust'' típusú hozzáférések, a gépek jelszó nélkül érik el egymást. ===== Teljes mentés és helyreállítás ===== ==== Elsődleges gép beállítása ==== === Telepített komponensek ellenőrzése === [root@pg01 ~]# rpm -qa | grep postgresql postgresql18-libs-18.3-1PGDG.rhel9.7.x86_64 postgresql18-18.3-1PGDG.rhel9.7.x86_64 postgresql18-server-18.3-1PGDG.rhel9.7.x86_64 === Adatbázis inicializálás === Az inicializálás során megadjuk az adatbázis alap kódkészletét és a WAL szegmensek méretét. Ezek a paraméterek utólag nem módosíthatók. [postgres@pg01 ~]$ /usr/pgsql-18/bin/initdb --encoding=UTF8 --locale=en_US.UTF-8 --wal-segsize=32 -D /var/lib/pgsql/18/data 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.UTF-8". The default text search configuration will be set to "english". Data page checksums are enabled. fixing permissions on existing directory /var/lib/pgsql/18/data ... ok creating subdirectories ... ok selecting dynamic shared memory implementation ... posix selecting default "max_connections" ... 100 selecting default "shared_buffers" ... 128MB selecting default time zone ... Europe/Budapest 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 initdb: hint: 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: /usr/pgsql-18/bin/pg_ctl -D /var/lib/pgsql/18/data -l logfile start === Konfiguráció módosítása === [postgres@pg01 ~]$ echo $PGDATA /var/lib/pgsql/18/data [postgres@pg01 ~]$ cp -a $PGDATA/pg_hba.conf $PGDATA/pg_hba.conf.orig [postgres@pg01 ~]$ cp -a $PGDATA/postgresql.conf $PGDATA/postgresql.conf.orig [postgres@pg01 ~]$ cat > $PGDATA/pg_hba.conf <<'EOF' # TYPE DATABASE USER ADDRESS METHOD local all all trust host all all 192.168.100.73/32 trust host all all 127.0.0.1/32 trust host all all ::1/128 trust local replication all trust host replication all 192.168.100.73/32 trust host replication all 127.0.0.1/32 trust host replication all ::1/128 trust EOF [postgres@pg01 ~]$ cat > $PGDATA/postgresql.conf <<'EOF' listen_addresses = '*' port = 5432 max_connections = 1000 shared_buffers = 128MB dynamic_shared_memory_type = posix max_wal_size = 2GB min_wal_size = 160MB log_destination = 'stderr' logging_collector = on log_directory = 'log' log_filename = 'postgresql-%a.log' log_rotation_age = 1d log_rotation_size = 0 log_truncate_on_rotation = on log_line_prefix = '%m [%p] ' log_timezone = 'Europe/Budapest' autovacuum_worker_slots = 16 datestyle = 'iso, mdy' timezone = 'Europe/Budapest' lc_messages = 'en_US.UTF-8' lc_monetary = 'en_US.UTF-8' lc_numeric = 'en_US.UTF-8' lc_time = 'en_US.UTF-8' default_text_search_config = 'pg_catalog.english' EOF === Ellenőrzés ==== [root@pg01 ~]# systemctl start postgresql-18 [root@pg01 ~]# psql -U postgres -l List of databases Name | Owner | Encoding | Locale Provider | Collate | Ctype | Locale | ICU Rules | Access privileges -----------+----------+----------+-----------------+-------------+-------------+ --------+-----------+----------------------- postgres | postgres | UTF8 | libc | en_US.UTF-8 | en_US.UTF-8 | | | template0 | postgres | UTF8 | libc | en_US.UTF-8 | en_US.UTF-8 | | | =c/postgres + | | | | | | | | postgres=CTc/postgres template1 | postgres | UTF8 | libc | en_US.UTF-8 | en_US.UTF-8 | | | =c/postgres + | | | | | | | | postgres=CTc/postgres (3 rows) Amennyiben tűzfal védi a gépet, engedélyezni kell a PostgreSQL forgalmat a mentő gépről. ==== Mentő gép beállítása ==== === Telepített komponensek ellenőrzése === [root@pg03 ~]# rpm -qa | grep postgresql postgresql18-libs-18.3-1PGDG.rhel9.7.x86_64 postgresql18-18.3-1PGDG.rhel9.7.x86_64 postgresql18-server-18.3-1PGDG.rhel9.7.x86_64 === Alap mentés készítése === Az ''$PGDATA'' adatbázis könyvtárnak üresnek kell lennie. Ha nem üres, akkor az adatbázis leállítása után töröljük a tartalmát. [root@pg03 ~]# systemctl stop postgresql-18 [root@pg03 ~]# rm -rf /var/lib/pgsql/18/data/* === Kapcsolat tesztelése === [postgres@pg03 ~]$ /usr/pgsql-18/bin/psql -h pg01 -U postgres -c 'SELECT now()' now ------------------------------- 2026-04-29 09:35:25.404765+02 (1 row) === Alap mentés === Mentéshez a ''pg_basebackup'' programot használjuk. [postgres@pg03 ~]$ /usr/pgsql-18/bin/pg_basebackup --host=pg01 --username=postgres --format=p --wal-method=stream --checkpoint=fast --progress --pgdata=/var/lib/pgsql/18/backups/backup-full-$(date +'%Y%m%dT%H%M%S') 23708/23708 kB (100%), 1/1 tablespace Ugyanez a mentés rövid kapcsolókkal [postgres@pg03 ~]$ /usr/pgsql-18/bin/pg_basebackup -h pg01 -U postgres -F p -X s -c fast -P -D /var/lib/pgsql/18/backups/backup-full-$(date +'%Y%m%dT%H%M%S') 23709/23709 kB (100%), 1/1 tablespace === Mentés helyreállítása === A mentés helyreállításához a mentés könyvtár tartalmát át kell másolni a ''$PGDATA'' könvtárba. [postgres@pg03 ~]$ cp -a /var/lib/pgsql/18/backups/backup-full-20260429T094626/* /var/lib/pgsql/18/data/ El kell indítani a ''postgresql'' szolgáltatást. [root@pg03 ~]# systemctl restart postgresql-18 Ellenőrizni kell az adatbázis állapotát [root@pg03 ~]# psql -U postgres -l List of databases Name | Owner | Encoding | Locale Provider | Collate | Ctype | Locale | ICU Rules | Access privileges -----------+----------+----------+-----------------+-------------+-------------+ --------+-----------+----------------------- postgres | postgres | UTF8 | libc | en_US.UTF-8 | en_US.UTF-8 | | | template0 | postgres | UTF8 | libc | en_US.UTF-8 | en_US.UTF-8 | | | =c/postgres + | | | | | | | | postgres=CTc/postgres template1 | postgres | UTF8 | libc | en_US.UTF-8 | en_US.UTF-8 | | | =c/postgres + | | | | | | | | postgres=CTc/postgres (3 rows) [root@pg03 ~]# cat /var/lib/pgsql/18/data/log/postgresql-Wed.log 2026-04-29 09:55:20.315 CEST [432] LOG: starting PostgreSQL 18.3 on x86_64-pc-linux-gnu, compiled by gcc (GCC) 11.5.0 20240719 (Red Hat 11.5.0-11), 64-bit 2026-04-29 09:55:20.315 CEST [432] LOG: listening on IPv4 address "0.0.0.0", port 5432 2026-04-29 09:55:20.315 CEST [432] LOG: listening on IPv6 address "::", port 5432 2026-04-29 09:55:20.316 CEST [432] LOG: listening on Unix socket "/run/postgresql/.s.PGSQL.5432" 2026-04-29 09:55:20.317 CEST [432] LOG: listening on Unix socket "/tmp/.s.PGSQL.5432" 2026-04-29 09:55:20.320 CEST [439] LOG: database system was interrupted; last known up at 2026-04-29 09:46:26 CEST 2026-04-29 09:55:20.395 CEST [439] LOG: starting backup recovery with redo LSN 0/A000028, checkpoint LSN 0/A000080, on timeline ID 1 2026-04-29 09:55:20.398 CEST [439] LOG: redo starts at 0/A000028 2026-04-29 09:55:20.398 CEST [439] LOG: completed backup recovery with redo LSN 0/A000028 and end LSN 0/A000120 2026-04-29 09:55:20.398 CEST [439] LOG: consistent recovery state reached at 0/A000120 2026-04-29 09:55:20.398 CEST [439] LOG: redo done at 0/A000120 system usage: CPU: user: 0.00 s, system: 0.00 s, elapsed: 0.00 s 2026-04-29 09:55:20.409 CEST [437] LOG: checkpoint starting: end-of-recovery immediate wait 2026-04-29 09:55:20.416 CEST [437] LOG: checkpoint complete: wrote 0 buffers (0.0%), wrote 3 SLRU buffers; 0 WAL file(s) added, 0 removed, 2 recycled; write=0.002 s, sync=0.001 s, total=0.008 s; sync files=2, longest=0.001 s, average=0.001 s; distance=16384 kB, estimate=16384 kB; lsn=0/B000028, redo lsn=0/B000028 2026-04-29 09:55:20.418 CEST [432] LOG: database system is ready to accept connections ===== Archív WAL mentés és helyreállítás ===== ==== Elsődleges gép beállítása ==== Az elsődleges gépen a korábbi beállítások mellett meg kell adnunk az archiválási utasításokat. Ezek a ''$PGDATA/postgresql.conf'' fájl módosításával vagy SQL utasítások segítségével valósítható meg. Az alábbi módszerek közül, csak az egyiket kell alkalmazni! === Közvetlen fájl szerkesztés ==== [postgres@pg01 ~]$ echo "archive_mode = 'on'" >> $PGDATA/postgresql.conf [postgres@pg01 ~]$ echo "archive_command = 'test ! -f /var/lib/pgsql/18/backups/%f && cp %p /var/lib/pgsql/18/backups/%f'" >> $PGDATA/postgresql.conf [postgres@pg01 ~]$ tail -n 2 $PGDATA/postgresql.conf archive_mode = 'on' archive_command = 'test ! -f /var/lib/pgsql/18/backups/%f && cp %p /var/lib/pgsql/18/backups/%f' === SQL utasítások használata === [postgres@pg01 ~]$ cat $PGDATA/postgresql.auto.conf # Do not edit this file manually! # It will be overwritten by the ALTER SYSTEM command. [postgres@pg01 ~]$ psql -c "ALTER SYSTEM SET archive_mode = 'on'" ALTER SYSTEM [postgres@pg01 ~]$ psql -c "ALTER SYSTEM SET archive_command = 'test ! -f /var/lib/pgsql/18/backups/%f && cp %p /var/lib/pgsql/18/backups/%f'" ALTER SYSTEM [postgres@pg01 ~]$ cat $PGDATA/postgresql.auto.conf # Do not edit this file manually! # It will be overwritten by the ALTER SYSTEM command. archive_mode = 'on' archive_command = 'test ! -f /var/lib/pgsql/18/backups/%f && cp %p /var/lib/pgsql/18/backups/%f' A módosítások után újra kell indítani a ''postgresql'' szolgáltatást. [root@pg01 ~]# systemctl restart postgresql-18 Ellenőrizni kell a beállítások érvényességét. [postgres@pg01 ~]$ psql psql (18.3) Type "help" for help. postgres=# SHOW archive_mode; archive_mode -------------- on (1 row) postgres=# SHOW archive_command; archive_command ------------------------------------------------------------------------------ test ! -f /var/lib/pgsql/18/backups/%f && cp %p /var/lib/pgsql/18/backups/%f (1 row) postgres=# exit ==== Teszt adatok létrehozása ==== [postgres@pg01 ~]$ createuser test [postgres@pg01 ~]$ createdb -O test test [postgres@pg01 ~]$ psql -U test -d test -c 'CREATE TABLE test (id INT, data TEXT)' CREATE TABLE [postgres@pg01 ~]$ psql -U test -d test -c "INSERT INTO test (id, data) VALUES (1, 'backup előtt')" INSERT 0 1 [postgres@pg01 ~]$ psql -U test -d test -c "SELECT now()" now ------------------------------- 2026-04-29 13:22:50.856461+02 (1 row) A mentő gépen készíteni kell egy alap mentést [postgres@pg03 ~]$ /usr/pgsql-18/bin/pg_basebackup -h pg01 -U postgres -F p -X s -c fast -P -D /var/lib/pgsql/18/backups/backup-full-$(date +'%Y%m%d') 31410/31410 kB (100%), 1/1 tablespace Az elsődleges gépen adjunk hozzá további adatokat a táblához. [postgres@pg01 ~]$ psql -U test -d test -c "INSERT INTO test (id, data) VALUES (2, 'backup után')" INSERT 0 1 [postgres@pg01 ~]$ psql -U test -d test -c "SELECT now()" now ------------------------------- 2026-04-29 13:24:15.571397+02 (1 row) [postgres@pg01 ~]$ psql -U test -d test -c "INSERT INTO test (id, data) VALUES (3, 'törlés előtt')" INSERT 0 1 [postgres@pg01 ~]$ psql -U test -d test -c "SELECT now()" now ------------------------------- 2026-04-29 13:24:36.372224+02 (1 row) Újabb adat kerül a táblába, mielőtt véletlen tábla törlés történik. [postgres@pg01 ~]$ psql -U test -d test -c "INSERT INTO test (id, data) VALUES (3, 'törlés előtt')" INSERT 0 1 [postgres@pg01 ~]$ psql -U test -d test -c "SELECT now()" now ------------------------------- 2026-04-29 13:24:36.372224+02 (1 row) [postgres@pg01 ~]$ psql -U test -d test -c "DROP TABLE test" DROP TABLE [postgres@pg01 ~]$ psql -U test -d test -c "SELECT now()" now ------------------------------- 2026-04-29 13:25:17.096924+02 (1 row) [postgres@pg01 ~]$ psql -c "SELECT * FROM test" ERROR: relation "test" does not exist LINE 1: SELECT * FROM test ^ A tábla törlésre került, az adatok elvesztek. Minden módosítás a WAL állományokban található, amelyeket a mentő gépre kell továbbítani a helyreállításhoz. Ehhez az ''rsync'' utasítást használjuk. ==== Mentő gép előkészítése ==== A mentő gépen le kell állítani a ''postgresql'' szolgáltatást. [root@pg03 ~]# systemctl stop postgresql-18 Utasítani kell az elsődleges gépet, hogy archiválja a WAL állományokat, amelyekben a változások vannak. [root@pg03 ~]# psql -h pg01 -U postgres -d postgres -c "SELECT pg_switch_wal()" pg_switch_wal --------------- 0/603D708 (1 row) ==== Adatok helyreállítása ==== === Előkészítő műveletek === WAL állományok szinkronizálása [root@pg03 ~]# rsync -a root@pg01:/var/lib/pgsql/18/backups/ /var/lib/pgsql/18/backups/ root@pg01's password: Alap mentés helyreállítása [root@pg03 ~]# rm -rf /var/lib/pgsql/18/data/* [root@pg03 ~]# cp -a /var/lib/pgsql/18/backups/backup-full-20260429/* /var/lib/pgsql/18/data/ Törölni kell az az archiválás beállításait a ''$PGDATA/postgresql.conf'' vagy a ''$PGDATA/postgresql.auto.conf'' fájlokban. Ezen kívül érdemes a felesleges állományokat törölni. [root@pg03 ~]# sed -i '/archive_mode =/d' /var/lib/pgsql/18/data/postgresql.conf [root@pg03 ~]# sed -i '/archive_mode =/d' /var/lib/pgsql/18/data/postgresql.auto.conf [root@pg03 ~]# sed -i '/archive_command =/d' /var/lib/pgsql/18/data/postgresql.conf [root@pg03 ~]# sed -i '/archive_command =/d' /var/lib/pgsql/18/data/postgresql.auto.conf [root@pg03 ~]# rm -rf /var/lib/pgsql/18/data/log/* ==== Visszaállás megadott időpontra ==== Hozzá kell adni a ''$PGDATA/postgresql.conf'' VAGY a ''$PGDATA/postgresql.auto.conf'' fájlhoz az helyreállításhoz szükséges adatokat és létre kell hozni a ''$PGDATA/recovery.signal'' állományt. A példában a tábla törlését megelőző pillanatot adtam meg. [root@pg03 ~]# cat /var/lib/pgsql/18/data/postgresql.auto.conf # Do not edit this file manually! # It will be overwritten by the ALTER SYSTEM command. [root@pg03 ~]# export RECOVERY_TIMESTAMP='2026-04-29 13:24:36.372224+02' [root@pg03 ~]# cat >> /var/lib/pgsql/18/data/postgresql.auto.conf < Adatbázis kezelő indítása [root@pg03 ~]# systemctl restart postgresql-18 [root@pg03 ~]# psql -U test -d test -c "SELECT * FROM test" id | data ----+-------------- 1 | backup előtt 2 | backup után 3 | törlés előtt (3 rows) [root@pg03 ~]# cat /var/lib/pgsql/18/data/log/postgresql-Wed.log 2026-04-29 13:28:29.087 CEST [1687] LOG: starting PostgreSQL 18.3 on x86_64-pc-linux-gnu, compiled by gcc (GCC) 11.5.0 20240719 (Red Hat 11.5.0-11), 64-bit 2026-04-29 13:28:29.087 CEST [1687] LOG: listening on IPv4 address "0.0.0.0", port 5432 2026-04-29 13:28:29.087 CEST [1687] LOG: listening on IPv6 address "::", port 5432 2026-04-29 13:28:29.088 CEST [1687] LOG: listening on Unix socket "/run/postgresql/.s.PGSQL.5432" 2026-04-29 13:28:29.089 CEST [1687] LOG: listening on Unix socket "/tmp/.s.PGSQL.5432" 2026-04-29 13:28:29.092 CEST [1694] LOG: database system was interrupted; last known up at 2026-04-29 13:23:46 CEST cp: cannot stat '/var/lib/pgsql/18/backups/00000002.history': No such file or directory 2026-04-29 13:28:29.193 CEST [1694] LOG: starting backup recovery with redo LSN 0/4000028, checkpoint LSN 0/4000080, on timeline ID 1 2026-04-29 13:28:29.205 CEST [1694] LOG: restored log file "000000010000000000000002" from archive 2026-04-29 13:28:29.219 CEST [1694] LOG: starting point-in-time recovery to 2026-04-29 13:24:36.372224+02 2026-04-29 13:28:29.221 CEST [1694] LOG: redo starts at 0/4000028 2026-04-29 13:28:29.232 CEST [1694] LOG: restored log file "000000010000000000000003" from archive 2026-04-29 13:28:29.243 CEST [1694] LOG: completed backup recovery with redo LSN 0/4000028 and end LSN 0/4000158 2026-04-29 13:28:29.243 CEST [1694] LOG: consistent recovery state reached at 0/4000158 2026-04-29 13:28:29.243 CEST [1687] LOG: database system is ready to accept read-only connections cp: cannot stat '/var/lib/pgsql/18/backups/000000010000000000000004': No such file or directory 2026-04-29 13:28:29.247 CEST [1694] LOG: recovery stopping before commit of transaction 769, time 2026-04-29 13:25:09.539651+02 2026-04-29 13:28:29.247 CEST [1694] LOG: redo done at 0/603D270 system usage: CPU: user: 0.00 s, system: 0.00 s, elapsed: 0.02 s 2026-04-29 13:28:29.247 CEST [1694] LOG: last completed transaction was at log time 2026-04-29 13:24:26.07963+02 2026-04-29 13:28:29.257 CEST [1694] LOG: restored log file "000000010000000000000003" from archive cp: cannot stat '/var/lib/pgsql/18/backups/00000002.history': No such file or directory 2026-04-29 13:28:29.273 CEST [1694] LOG: selected new timeline ID: 2 cp: cannot stat '/var/lib/pgsql/18/backups/00000001.history': No such file or directory 2026-04-29 13:28:29.304 CEST [1694] LOG: archive recovery complete 2026-04-29 13:28:29.305 CEST [1692] LOG: checkpoint starting: end-of-recovery immediate wait 2026-04-29 13:28:29.312 CEST [1692] LOG: checkpoint complete: wrote 39 buffers (0.2%), wrote 3 SLRU buffers; 0 WAL file(s) added, 0 removed, 1 recycled; write=0.002 s, sync=0.002 s, total=0.009 s; sync files=14, longest=0.001 s, average=0.001 s; distance=33012 kB, estimate=33012 kB; lsn=0/603D270, redo lsn=0/603D270 2026-04-29 13:28:29.315 CEST [1687] LOG: database system is ready to accept connections 2026-04-29 13:33:29.338 CEST [1692] LOG: checkpoint starting: time 2026-04-29 13:33:29.757 CEST [1692] LOG: checkpoint complete: wrote 4 buffers (0.0%), wrote 0 SLRU buffers; 0 WAL file(s) added, 0 removed, 0 recycled; write=0.403 s, sync=0.011 s, total=0.419 s; sync files=4, longest=0.011 s, average=0.003 s; distance=17 kB, estimate=29713 kB; lsn=0/6041970, redo lsn=0/6041918 Tipikus helyzetek * Az archiválás nem tartalmazza a szükséges WAL-t ezért nem tudunk visszaállni egy megadott időpontra. Ilyenkor a forrás oldalon futtatni kell a ''psql -c "SELECT pg_switch_wal()"'' utasítást és újra áttölteni a helyreállító gépre. * Ha nem hozzuk létre a '' recovery.signal '' állományt, akkor a pg_basebackup állaporta tér vissza és nem foglalkozik a recovery_target_time értékével. * A recovery_target_action meghatározza, milyen állapotba kerüljön a postgresql a recovery során. ==== Ellenőrzés ==== Ha nincsenek pontos időadatok, akkor a WAL fájlok ellenőrzése lehet a megoldás. Ilyenkor nem a '' recovery_target_time = '' paramétert, hanem a '' recovery_target_lsn = '' értékét adjuk meg. A ''pg_waldump'' program segít az LSN értékének meghatározásában. [root@pg03 ~]# /usr/pgsql-18/bin/pg_waldump /var/lib/pgsql/18/backups/000000010000000000000003 rmgr: XLOG len (rec/tot): 49/ 1413, tx: 0, lsn: 0/06000028, prev 0/04000158, desc: FPI_FOR_HINT , blkref #0: rel 1663/16385/1259 blk 0 FPW rmgr: Heap len (rec/tot): 54/ 182, tx: 767, lsn: 0/060005B0, prev 0/06000028, desc: INSERT off: 2, flags: 0x00, blkref #0: rel 1663/16385/16386 blk 0 FPW rmgr: Transaction len (rec/tot): 34/ 34, tx: 767, lsn: 0/06000668, prev 0/060005B0, desc: COMMIT 2026-04-29 13:24:10.043118 CEST rmgr: Standby len (rec/tot): 50/ 50, tx: 0, lsn: 0/06000690, prev 0/06000668, desc: RUNNING_XACTS nextXid 768 latestCompletedXid 767 oldestRunningXid 768 rmgr: Heap len (rec/tot): 75/ 75, tx: 768, lsn: 0/060006C8, prev 0/06000690, desc: INSERT off: 3, flags: 0x00, blkref #0: rel 1663/16385/16386 blk 0 rmgr: Transaction len (rec/tot): 34/ 34, tx: 768, lsn: 0/06000718, prev 0/060006C8, desc: COMMIT 2026-04-29 13:24:26.079630 CEST rmgr: Heap2 len (rec/tot): 57/ 341, tx: 0, lsn: 0/06000740, prev 0/06000718, desc: PRUNE_VACUUM_SCAN snapshotConflictHorizon: 756, isCatalogRel: F, blkref #0: rel 1663/1/2619 blk 0 FPW rmgr: XLOG len (rec/tot): 49/ 6637, tx: 0, lsn: 0/06000898, prev 0/06000740, desc: FPI_FOR_HINT , blkref #0: rel 1663/1/2619 blk 1 FPW rmgr: Heap2 len (rec/tot): 90/ 90, tx: 0, lsn: 0/060022A0, prev 0/06000898, desc: PRUNE_VACUUM_SCAN snapshotConflictHorizon: 757, isCatalogRel: F, nplans: 2, nredirected: 1, ndead: 0, nunused: 0, plans: [{ xmax: 0, infomask: 11009, infomask2: 32799, ntuples: 1, offsets: [30] }, { xmax: 0, infomask: 11011, infomask2: 32799, ntuples: 1, offsets: [31] }], redirected: [27->31], blkref #0: rel 1663/1/2619 blk 1 rmgr: Heap2 len (rec/tot): 57/ 2293, tx: 0, lsn: 0/06002300, prev 0/060022A0, desc: PRUNE_VACUUM_SCAN snapshotConflictHorizon: 757, isCatalogRel: F, blkref #0: rel 1663/1/2619 blk 2 FPW rmgr: XLOG len (rec/tot): 49/ 8217, tx: 0, lsn: 0/06002BF8, prev 0/06002300, desc: FPI_FOR_HINT , blkref #0: rel 1663/1/2619 blk 3 FPW rmgr: Heap2 len (rec/tot): 56/ 56, tx: 0, lsn: 0/06004C30, prev 0/06002BF8, desc: PRUNE_VACUUM_SCAN snapshotConflictHorizon: 758, isCatalogRel: F, nplans: 0, nredirected: 0, ndead: 1, nunused: 0, dead: [16], blkref #0: rel 1663/1/2619 blk 3 rmgr: XLOG len (rec/tot): 49/ 8193, tx: 0, lsn: 0/06004C68, prev 0/06004C30, desc: FPI_FOR_HINT , blkref #0: rel 1663/1/2619 blk 5 FPW rmgr: Heap2 len (rec/tot): 110/ 110, tx: 0, lsn: 0/06006C88, prev 0/06004C68, desc: PRUNE_VACUUM_SCAN snapshotConflictHorizon: 758, isCatalogRel: F, nplans: 0, nredirected: 0, ndead: 28, nunused: 0, dead: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28], blkref #0: rel 1663/1/2619 blk 5 rmgr: XLOG len (rec/tot): 49/ 4425, tx: 0, lsn: 0/06006CF8, prev 0/06006C88, desc: FPI_FOR_HINT , blkref #0: rel 1663/1/2619 blk 6 FPW rmgr: Heap2 len (rec/tot): 106/ 106, tx: 0, lsn: 0/06007E48, prev 0/06006CF8, desc: PRUNE_VACUUM_SCAN snapshotConflictHorizon: 760, isCatalogRel: F, nplans: 3, nredirected: 1, ndead: 0, nunused: 0, plans: [{ xmax: 0, infomask: 11009, infomask2: 32799, ntuples: 1, offsets: [19] }, { xmax: 0, infomask: 11011, infomask2: 32799, ntuples: 2, offsets: [20, 22] }, { xmax: 0, infomask: 11015, infomask2: 32799, ntuples: 1, offsets: [21] }], redirected: [18->22], blkref #0: rel 1663/1/2619 blk 6 rmgr: XLOG len (rec/tot): 49/ 8225, tx: 0, lsn: 0/06007EB8, prev 0/06007E48, desc: FPI_FOR_HINT , blkref #0: rel 1663/1/2619 blk 7 FPW rmgr: Heap2 len (rec/tot): 128/ 128, tx: 0, lsn: 0/06009EF8, prev 0/06007EB8, desc: PRUNE_VACUUM_SCAN snapshotConflictHorizon: 760, isCatalogRel: F, nplans: 1, nredirected: 1, ndead: 25, nunused: 0, plans: [{ xmax: 0, infomask: 11009, infomask2: 32799, ntuples: 1, offsets: [28] }], redirected: [21->28], dead: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 22, 23, 24, 25, 26], blkref #0: rel 1663/1/2619 blk 7 rmgr: XLOG len (rec/tot): 49/ 8177, tx: 0, lsn: 0/06009F78, prev 0/06009EF8, desc: FPI_FOR_HINT , blkref #0: rel 1663/1/2619 blk 8 FPW rmgr: Heap2 len (rec/tot): 56/ 56, tx: 0, lsn: 0/0600BF88, prev 0/06009F78, desc: PRUNE_VACUUM_SCAN snapshotConflictHorizon: 760, isCatalogRel: F, nplans: 0, nredirected: 0, ndead: 1, nunused: 0, dead: [1], blkref #0: rel 1663/1/2619 blk 8 rmgr: XLOG len (rec/tot): 49/ 6861, tx: 0, lsn: 0/0600BFC0, prev 0/0600BF88, desc: FPI_FOR_HINT , blkref #0: rel 1663/1/2619 blk 13 FPW rmgr: Heap2 len (rec/tot): 106/ 106, tx: 0, lsn: 0/0600DAA8, prev 0/0600BFC0, desc: PRUNE_VACUUM_SCAN snapshotConflictHorizon: 762, isCatalogRel: F, nplans: 2, nredirected: 3, ndead: 1, nunused: 0, plans: [{ xmax: 0, infomask: 11009, infomask2: 32799, ntuples: 1, offsets: [22] }, { xmax: 0, infomask: 11011, infomask2: 32799, ntuples: 3, offsets: [23, 24, 25] }], redirected: [16->23, 17->24, 18->25], dead: [19], blkref #0: rel 1663/1/2619 blk 13 rmgr: XLOG len (rec/tot): 49/ 8105, tx: 0, lsn: 0/0600DB18, prev 0/0600DAA8, desc: FPI_FOR_HINT , blkref #0: rel 1663/1/2619 blk 14 FPW rmgr: Heap2 len (rec/tot): 56/ 56, tx: 0, lsn: 0/0600FAE0, prev 0/0600DB18, desc: PRUNE_VACUUM_SCAN snapshotConflictHorizon: 763, isCatalogRel: F, nplans: 0, nredirected: 0, ndead: 1, nunused: 0, dead: [18], blkref #0: rel 1663/1/2619 blk 14 rmgr: XLOG len (rec/tot): 49/ 8173, tx: 0, lsn: 0/0600FB18, prev 0/0600FAE0, desc: FPI_FOR_HINT , blkref #0: rel 1663/1/2619 blk 15 FPW rmgr: Heap2 len (rec/tot): 66/ 66, tx: 0, lsn: 0/06011B20, prev 0/0600FB18, desc: PRUNE_VACUUM_SCAN snapshotConflictHorizon: 763, isCatalogRel: F, nplans: 0, nredirected: 0, ndead: 6, nunused: 0, dead: [1, 2, 3, 4, 5, 6], blkref #0: rel 1663/1/2619 blk 15 rmgr: XLOG len (rec/tot): 49/ 8137, tx: 0, lsn: 0/06011B68, prev 0/06011B20, desc: FPI_FOR_HINT , blkref #0: rel 1663/1/2619 blk 16 FPW rmgr: Heap2 len (rec/tot): 80/ 80, tx: 0, lsn: 0/06013B50, prev 0/06011B68, desc: PRUNE_VACUUM_SCAN snapshotConflictHorizon: 764, isCatalogRel: F, nplans: 1, nredirected: 0, ndead: 4, nunused: 0, plans: [{ xmax: 0, infomask: 11011, infomask2: 31, ntuples: 1, offsets: [36] }], dead: [5, 6, 7, 8], blkref #0: rel 1663/1/2619 blk 16 rmgr: XLOG len (rec/tot): 49/ 7809, tx: 0, lsn: 0/06013BA0, prev 0/06013B50, desc: FPI_FOR_HINT , blkref #0: rel 1663/1/2619 blk 17 FPW rmgr: Heap2 len (rec/tot): 134/ 134, tx: 0, lsn: 0/06015A40, prev 0/06013BA0, desc: PRUNE_VACUUM_SCAN snapshotConflictHorizon: 766, isCatalogRel: F, nplans: 2, nredirected: 6, ndead: 3, nunused: 0, plans: [{ xmax: 0, infomask: 11011, infomask2: 31, ntuples: 3, offsets: [15, 16, 17] }, { xmax: 0, infomask: 11011, infomask2: 32799, ntuples: 7, offsets: [18, 19, 20, 21, 22, 23, 24] }], redirected: [6->19, 8->20, 9->21, 10->22, 11->23, 12->24], dead: [7, 13, 14], blkref #0: rel 1663/1/2619 blk 17 rmgr: XLOG len (rec/tot): 49/ 8197, tx: 0, lsn: 0/06015AC8, prev 0/06015A40, desc: FPI_FOR_HINT , blkref #0: rel 1663/1/2619 blk 18 FPW rmgr: Heap2 len (rec/tot): 84/ 84, tx: 0, lsn: 0/06017AE8, prev 0/06015AC8, desc: PRUNE_VACUUM_SCAN snapshotConflictHorizon: 766, isCatalogRel: F, nplans: 1, nredirected: 0, ndead: 3, nunused: 0, plans: [{ xmax: 0, infomask: 11011, infomask2: 31, ntuples: 4, offsets: [20, 21, 22, 23] }], dead: [1, 2, 3], blkref #0: rel 1663/1/2619 blk 18 rmgr: XLOG len (rec/tot): 49/ 8213, tx: 0, lsn: 0/06017B40, prev 0/06017AE8, desc: FPI_FOR_HINT , blkref #0: rel 1663/1/2619 blk 19 FPW rmgr: Heap2 len (rec/tot): 134/ 134, tx: 0, lsn: 0/06019B70, prev 0/06017B40, desc: PRUNE_VACUUM_SCAN snapshotConflictHorizon: 760, isCatalogRel: F, nplans: 2, nredirected: 0, ndead: 0, nunused: 0, plans: [{ xmax: 0, infomask: 11009, infomask2: 31, ntuples: 2, offsets: [22, 23] }, { xmax: 0, infomask: 11011, infomask2: 31, ntuples: 25, offsets: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 24, 25, 26, 27] }], blkref #0: rel 1663/1/2619 blk 19 rmgr: Heap2 len (rec/tot): 64/ 8256, tx: 0, lsn: 0/06019BF8, prev 0/06019B70, desc: VISIBLE snapshotConflictHorizon: 0, flags: 0x03, blkref #0: rel 1663/1/2619 fork vm blk 0 FPW, blkref #1: rel 1663/1/2619 blk 19 rmgr: XLOG len (rec/tot): 49/ 8209, tx: 0, lsn: 0/0601BC50, prev 0/06019BF8, desc: FPI_FOR_HINT , blkref #0: rel 1663/1/2619 blk 20 FPW rmgr: Heap2 len (rec/tot): 144/ 144, tx: 0, lsn: 0/0601DC80, prev 0/0601BC50, desc: PRUNE_VACUUM_SCAN snapshotConflictHorizon: 758, isCatalogRel: F, nplans: 3, nredirected: 0, ndead: 0, nunused: 0, plans: [{ xmax: 0, infomask: 11009, infomask2: 31, ntuples: 4, offsets: [20, 22, 23, 24] }, { xmax: 0, infomask: 11011, infomask2: 31, ntuples: 21, offsets: [2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 21, 25, 26] }, { xmax: 0, infomask: 11015, infomask2: 31, ntuples: 1, offsets: [1] }], blkref #0: rel 1663/1/2619 blk 20 rmgr: Heap2 len (rec/tot): 59/ 59, tx: 0, lsn: 0/0601DD10, prev 0/0601DC80, desc: VISIBLE snapshotConflictHorizon: 0, flags: 0x03, blkref #0: rel 1663/1/2619 fork vm blk 0, blkref #1: rel 1663/1/2619 blk 20 rmgr: XLOG len (rec/tot): 49/ 8089, tx: 0, lsn: 0/0601DD50, prev 0/0601DD10, desc: FPI_FOR_HINT , blkref #0: rel 1663/1/2619 blk 21 FPW rmgr: Heap2 len (rec/tot): 132/ 132, tx: 0, lsn: 0/0601FD08, prev 0/0601DD50, desc: PRUNE_VACUUM_SCAN snapshotConflictHorizon: 760, isCatalogRel: F, nplans: 1, nredirected: 0, ndead: 0, nunused: 0, plans: [{ xmax: 0, infomask: 11011, infomask2: 31, ntuples: 32, offsets: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32] }], blkref #0: rel 1663/1/2619 blk 21 rmgr: Heap2 len (rec/tot): 59/ 59, tx: 0, lsn: 0/0601FD90, prev 0/0601FD08, desc: VISIBLE snapshotConflictHorizon: 0, flags: 0x03, blkref #0: rel 1663/1/2619 fork vm blk 0, blkref #1: rel 1663/1/2619 blk 21 rmgr: XLOG len (rec/tot): 49/ 8213, tx: 0, lsn: 0/0601FDD0, prev 0/0601FD90, desc: FPI_FOR_HINT , blkref #0: rel 1663/1/2619 blk 22 FPW rmgr: Heap2 len (rec/tot): 130/ 130, tx: 0, lsn: 0/06021E00, prev 0/0601FDD0, desc: PRUNE_VACUUM_SCAN snapshotConflictHorizon: 760, isCatalogRel: F, nplans: 3, nredirected: 0, ndead: 0, nunused: 0, plans: [{ xmax: 0, infomask: 11009, infomask2: 31, ntuples: 1, offsets: [5] }, { xmax: 0, infomask: 11011, infomask2: 31, ntuples: 17, offsets: [1, 3, 4, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19] }, { xmax: 0, infomask: 11015, infomask2: 31, ntuples: 1, offsets: [2] }], blkref #0: rel 1663/1/2619 blk 22 rmgr: Heap2 len (rec/tot): 59/ 59, tx: 0, lsn: 0/06021E88, prev 0/06021E00, desc: VISIBLE snapshotConflictHorizon: 0, flags: 0x03, blkref #0: rel 1663/1/2619 fork vm blk 0, blkref #1: rel 1663/1/2619 blk 22 rmgr: XLOG len (rec/tot): 49/ 8041, tx: 0, lsn: 0/06021EC8, prev 0/06021E88, desc: FPI_FOR_HINT , blkref #0: rel 1663/1/2619 blk 23 FPW rmgr: Heap2 len (rec/tot): 124/ 124, tx: 0, lsn: 0/06023E50, prev 0/06021EC8, desc: PRUNE_VACUUM_SCAN snapshotConflictHorizon: 763, isCatalogRel: F, nplans: 3, nredirected: 0, ndead: 0, nunused: 0, plans: [{ xmax: 0, infomask: 11009, infomask2: 31, ntuples: 5, offsets: [2, 3, 4, 5, 6] }, { xmax: 0, infomask: 11011, infomask2: 31, ntuples: 10, offsets: [1, 7, 8, 9, 10, 11, 12, 13, 14, 16] }, { xmax: 0, infomask: 11015, infomask2: 31, ntuples: 1, offsets: [15] }], blkref #0: rel 1663/1/2619 blk 23 rmgr: Heap2 len (rec/tot): 59/ 59, tx: 0, lsn: 0/06023ED0, prev 0/06023E50, desc: VISIBLE snapshotConflictHorizon: 0, flags: 0x03, blkref #0: rel 1663/1/2619 fork vm blk 0, blkref #1: rel 1663/1/2619 blk 23 rmgr: XLOG len (rec/tot): 49/ 7721, tx: 0, lsn: 0/06023F10, prev 0/06023ED0, desc: FPI_FOR_HINT , blkref #0: rel 1663/1/2619 blk 24 FPW rmgr: Heap2 len (rec/tot): 96/ 96, tx: 0, lsn: 0/06025D58, prev 0/06023F10, desc: PRUNE_VACUUM_SCAN snapshotConflictHorizon: 765, isCatalogRel: F, nplans: 1, nredirected: 0, ndead: 0, nunused: 0, plans: [{ xmax: 0, infomask: 11011, infomask2: 31, ntuples: 14, offsets: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14] }], blkref #0: rel 1663/1/2619 blk 24 rmgr: Heap2 len (rec/tot): 59/ 59, tx: 0, lsn: 0/06025DB8, prev 0/06025D58, desc: VISIBLE snapshotConflictHorizon: 0, flags: 0x03, blkref #0: rel 1663/1/2619 fork vm blk 0, blkref #1: rel 1663/1/2619 blk 24 rmgr: XLOG len (rec/tot): 49/ 5193, tx: 0, lsn: 0/06025DF8, prev 0/06025DB8, desc: FPI_FOR_HINT , blkref #0: rel 1663/1/2619 blk 25 FPW rmgr: Heap2 len (rec/tot): 92/ 92, tx: 0, lsn: 0/06027260, prev 0/06025DF8, desc: PRUNE_VACUUM_SCAN snapshotConflictHorizon: 766, isCatalogRel: F, nplans: 2, nredirected: 0, ndead: 0, nunused: 0, plans: [{ xmax: 0, infomask: 11009, infomask2: 31, ntuples: 1, offsets: [5] }, { xmax: 0, infomask: 11011, infomask2: 31, ntuples: 5, offsets: [1, 2, 3, 4, 6] }], blkref #0: rel 1663/1/2619 blk 25 rmgr: Heap2 len (rec/tot): 59/ 59, tx: 0, lsn: 0/060272C0, prev 0/06027260, desc: VISIBLE snapshotConflictHorizon: 0, flags: 0x03, blkref #0: rel 1663/1/2619 fork vm blk 0, blkref #1: rel 1663/1/2619 blk 25 rmgr: XLOG len (rec/tot): 49/ 8241, tx: 0, lsn: 0/06027300, prev 0/060272C0, desc: FPI_FOR_HINT , blkref #0: rel 1663/1/2619 fork fsm blk 2 FPW rmgr: Btree len (rec/tot): 55/ 3435, tx: 0, lsn: 0/06029350, prev 0/06027300, desc: VACUUM ndeleted: 0, nupdated: 46, blkref #0: rel 1663/1/2696 blk 1 FPW rmgr: Btree len (rec/tot): 55/ 1075, tx: 0, lsn: 0/0602A0D8, prev 0/06029350, desc: VACUUM ndeleted: 9, nupdated: 0, blkref #0: rel 1663/1/2696 blk 2 FPW rmgr: Btree len (rec/tot): 55/ 4055, tx: 0, lsn: 0/0602A510, prev 0/0602A0D8, desc: VACUUM ndeleted: 43, nupdated: 8, blkref #0: rel 1663/1/2696 blk 4 FPW rmgr: Heap2 len (rec/tot): 86/ 86, tx: 0, lsn: 0/0602B4E8, prev 0/0602A510, desc: PRUNE_VACUUM_CLEANUP , isCatalogRel: F, nplans: 0, nredirected: 0, ndead: 0, nunused: 18, unused: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18], blkref #0: rel 1663/1/2619 blk 0 rmgr: Heap2 len (rec/tot): 59/ 59, tx: 0, lsn: 0/0602B540, prev 0/0602B4E8, desc: VISIBLE snapshotConflictHorizon: 0, flags: 0x03, blkref #0: rel 1663/1/2619 fork vm blk 0, blkref #1: rel 1663/1/2619 blk 0 rmgr: Heap2 len (rec/tot): 76/ 76, tx: 0, lsn: 0/0602B580, prev 0/0602B540, desc: PRUNE_VACUUM_CLEANUP , isCatalogRel: F, nplans: 0, nredirected: 0, ndead: 0, nunused: 13, unused: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 13, 14], blkref #0: rel 1663/1/2619 blk 1 rmgr: Heap2 len (rec/tot): 59/ 59, tx: 0, lsn: 0/0602B5D0, prev 0/0602B580, desc: VISIBLE snapshotConflictHorizon: 0, flags: 0x03, blkref #0: rel 1663/1/2619 fork vm blk 0, blkref #1: rel 1663/1/2619 blk 1 rmgr: Heap2 len (rec/tot): 98/ 98, tx: 0, lsn: 0/0602B610, prev 0/0602B5D0, desc: PRUNE_VACUUM_CLEANUP , isCatalogRel: F, nplans: 0, nredirected: 0, ndead: 0, nunused: 24, unused: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24], blkref #0: rel 1663/1/2619 blk 2 rmgr: Heap2 len (rec/tot): 59/ 59, tx: 0, lsn: 0/0602B678, prev 0/0602B610, desc: VISIBLE snapshotConflictHorizon: 0, flags: 0x03, blkref #0: rel 1663/1/2619 fork vm blk 0, blkref #1: rel 1663/1/2619 blk 2 rmgr: Heap2 len (rec/tot): 52/ 52, tx: 0, lsn: 0/0602B6B8, prev 0/0602B678, desc: PRUNE_VACUUM_CLEANUP , isCatalogRel: F, nplans: 0, nredirected: 0, ndead: 0, nunused: 1, unused: [16], blkref #0: rel 1663/1/2619 blk 3 rmgr: Heap2 len (rec/tot): 59/ 59, tx: 0, lsn: 0/0602B6F0, prev 0/0602B6B8, desc: VISIBLE snapshotConflictHorizon: 0, flags: 0x03, blkref #0: rel 1663/1/2619 fork vm blk 0, blkref #1: rel 1663/1/2619 blk 3 rmgr: Heap2 len (rec/tot): 106/ 106, tx: 0, lsn: 0/0602B730, prev 0/0602B6F0, desc: PRUNE_VACUUM_CLEANUP , isCatalogRel: F, nplans: 0, nredirected: 0, ndead: 0, nunused: 28, unused: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28], blkref #0: rel 1663/1/2619 blk 5 rmgr: Heap2 len (rec/tot): 59/ 59, tx: 0, lsn: 0/0602B7A0, prev 0/0602B730, desc: VISIBLE snapshotConflictHorizon: 0, flags: 0x03, blkref #0: rel 1663/1/2619 fork vm blk 0, blkref #1: rel 1663/1/2619 blk 5 rmgr: Heap2 len (rec/tot): 68/ 68, tx: 0, lsn: 0/0602B7E0, prev 0/0602B7A0, desc: PRUNE_VACUUM_CLEANUP , isCatalogRel: F, nplans: 0, nredirected: 0, ndead: 0, nunused: 9, unused: [1, 2, 3, 4, 7, 8, 10, 11, 12], blkref #0: rel 1663/1/2619 blk 6 rmgr: Heap2 len (rec/tot): 59/ 59, tx: 0, lsn: 0/0602B828, prev 0/0602B7E0, desc: VISIBLE snapshotConflictHorizon: 0, flags: 0x03, blkref #0: rel 1663/1/2619 fork vm blk 0, blkref #1: rel 1663/1/2619 blk 6 rmgr: Heap2 len (rec/tot): 100/ 100, tx: 0, lsn: 0/0602B868, prev 0/0602B828, desc: PRUNE_VACUUM_CLEANUP , isCatalogRel: F, nplans: 0, nredirected: 0, ndead: 0, nunused: 25, unused: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 22, 23, 24, 25, 26], blkref #0: rel 1663/1/2619 blk 7 rmgr: Heap2 len (rec/tot): 59/ 59, tx: 0, lsn: 0/0602B8D0, prev 0/0602B868, desc: VISIBLE snapshotConflictHorizon: 0, flags: 0x03, blkref #0: rel 1663/1/2619 fork vm blk 0, blkref #1: rel 1663/1/2619 blk 7 rmgr: Heap2 len (rec/tot): 52/ 52, tx: 0, lsn: 0/0602B910, prev 0/0602B8D0, desc: PRUNE_VACUUM_CLEANUP , isCatalogRel: F, nplans: 0, nredirected: 0, ndead: 0, nunused: 1, unused: [1], blkref #0: rel 1663/1/2619 blk 8 rmgr: Heap2 len (rec/tot): 59/ 59, tx: 0, lsn: 0/0602B948, prev 0/0602B910, desc: VISIBLE snapshotConflictHorizon: 0, flags: 0x03, blkref #0: rel 1663/1/2619 fork vm blk 0, blkref #1: rel 1663/1/2619 blk 8 rmgr: Heap2 len (rec/tot): 66/ 66, tx: 0, lsn: 0/0602B988, prev 0/0602B948, desc: PRUNE_VACUUM_CLEANUP , isCatalogRel: F, nplans: 0, nredirected: 0, ndead: 0, nunused: 8, unused: [8, 9, 10, 11, 12, 13, 14, 19], blkref #0: rel 1663/1/2619 blk 13 rmgr: Heap2 len (rec/tot): 59/ 59, tx: 0, lsn: 0/0602B9D0, prev 0/0602B988, desc: VISIBLE snapshotConflictHorizon: 0, flags: 0x03, blkref #0: rel 1663/1/2619 fork vm blk 0, blkref #1: rel 1663/1/2619 blk 13 rmgr: Heap2 len (rec/tot): 52/ 52, tx: 0, lsn: 0/0602BA10, prev 0/0602B9D0, desc: PRUNE_VACUUM_CLEANUP , isCatalogRel: F, nplans: 0, nredirected: 0, ndead: 0, nunused: 1, unused: [18], blkref #0: rel 1663/1/2619 blk 14 rmgr: Heap2 len (rec/tot): 59/ 59, tx: 0, lsn: 0/0602BA48, prev 0/0602BA10, desc: VISIBLE snapshotConflictHorizon: 0, flags: 0x03, blkref #0: rel 1663/1/2619 fork vm blk 0, blkref #1: rel 1663/1/2619 blk 14 rmgr: Heap2 len (rec/tot): 62/ 62, tx: 0, lsn: 0/0602BA88, prev 0/0602BA48, desc: PRUNE_VACUUM_CLEANUP , isCatalogRel: F, nplans: 0, nredirected: 0, ndead: 0, nunused: 6, unused: [1, 2, 3, 4, 5, 6], blkref #0: rel 1663/1/2619 blk 15 rmgr: Heap2 len (rec/tot): 59/ 59, tx: 0, lsn: 0/0602BAC8, prev 0/0602BA88, desc: VISIBLE snapshotConflictHorizon: 0, flags: 0x03, blkref #0: rel 1663/1/2619 fork vm blk 0, blkref #1: rel 1663/1/2619 blk 15 rmgr: Heap2 len (rec/tot): 58/ 58, tx: 0, lsn: 0/0602BB08, prev 0/0602BAC8, desc: PRUNE_VACUUM_CLEANUP , isCatalogRel: F, nplans: 0, nredirected: 0, ndead: 0, nunused: 4, unused: [5, 6, 7, 8], blkref #0: rel 1663/1/2619 blk 16 rmgr: Heap2 len (rec/tot): 59/ 59, tx: 0, lsn: 0/0602BB48, prev 0/0602BB08, desc: VISIBLE snapshotConflictHorizon: 0, flags: 0x03, blkref #0: rel 1663/1/2619 fork vm blk 0, blkref #1: rel 1663/1/2619 blk 16 rmgr: Heap2 len (rec/tot): 64/ 64, tx: 0, lsn: 0/0602BB88, prev 0/0602BB48, desc: PRUNE_VACUUM_CLEANUP , isCatalogRel: F, nplans: 0, nredirected: 0, ndead: 0, nunused: 7, unused: [1, 2, 3, 5, 7, 13, 14], blkref #0: rel 1663/1/2619 blk 17 rmgr: Heap2 len (rec/tot): 59/ 59, tx: 0, lsn: 0/0602BBC8, prev 0/0602BB88, desc: VISIBLE snapshotConflictHorizon: 0, flags: 0x03, blkref #0: rel 1663/1/2619 fork vm blk 0, blkref #1: rel 1663/1/2619 blk 17 rmgr: Heap2 len (rec/tot): 56/ 56, tx: 0, lsn: 0/0602BC08, prev 0/0602BBC8, desc: PRUNE_VACUUM_CLEANUP , isCatalogRel: F, nplans: 0, nredirected: 0, ndead: 0, nunused: 3, unused: [1, 2, 3], blkref #0: rel 1663/1/2619 blk 18 rmgr: Heap2 len (rec/tot): 59/ 59, tx: 0, lsn: 0/0602BC40, prev 0/0602BC08, desc: VISIBLE snapshotConflictHorizon: 0, flags: 0x03, blkref #0: rel 1663/1/2619 fork vm blk 0, blkref #1: rel 1663/1/2619 blk 18 rmgr: XLOG len (rec/tot): 49/ 8241, tx: 0, lsn: 0/0602BC80, prev 0/0602BC40, desc: FPI_FOR_HINT , blkref #0: rel 1663/1/2619 fork fsm blk 1 FPW rmgr: XLOG len (rec/tot): 49/ 8241, tx: 0, lsn: 0/0602DCD0, prev 0/0602BC80, desc: FPI_FOR_HINT , blkref #0: rel 1663/1/2619 fork fsm blk 0 FPW rmgr: Heap len (rec/tot): 119/ 8243, tx: 0, lsn: 0/0602FD20, prev 0/0602DCD0, desc: INPLACE off: 38; relcache init file inval dbid 1 tsid 1663; inval msgs: catcache 57 catcache 56 relcache 2696, blkref #0: rel 1663/1/1259 blk 3 FPW rmgr: Heap len (rec/tot): 119/ 779, tx: 0, lsn: 0/06031D70, prev 0/0602FD20, desc: INPLACE off: 46; relcache init file inval dbid 1 tsid 1663; inval msgs: catcache 57 catcache 56 relcache 2619, blkref #0: rel 1663/1/1259 blk 0 FPW rmgr: Standby len (rec/tot): 138/ 138, tx: 0, lsn: 0/06032098, prev 0/06031D70, desc: INVALIDATIONS ; relcache init file inval dbid 1 tsid 1663; inval msgs: catcache 57 catcache 56 catcache 57 catcache 56 relcache 2696 relcache 2619 rmgr: Standby len (rec/tot): 50/ 50, tx: 0, lsn: 0/06032128, prev 0/06032098, desc: RUNNING_XACTS nextXid 769 latestCompletedXid 768 oldestRunningXid 769 rmgr: Standby len (rec/tot): 42/ 42, tx: 769, lsn: 0/06032160, prev 0/06032128, desc: LOCK xid 769 db 16385 rel 16386 rmgr: XLOG len (rec/tot): 49/ 6945, tx: 769, lsn: 0/06032190, prev 0/06032160, desc: FPI_FOR_HINT , blkref #0: rel 1663/16385/2608 blk 3 FPW rmgr: XLOG len (rec/tot): 49/ 8233, tx: 769, lsn: 0/06033CB8, prev 0/06032190, desc: FPI_FOR_HINT , blkref #0: rel 1663/16385/2608 blk 2 FPW rmgr: Standby len (rec/tot): 42/ 42, tx: 769, lsn: 0/06035D00, prev 0/06033CB8, desc: LOCK xid 769 db 16385 rel 16389 rmgr: Standby len (rec/tot): 42/ 42, tx: 769, lsn: 0/06035D30, prev 0/06035D00, desc: LOCK xid 769 db 16385 rel 16390 rmgr: XLOG len (rec/tot): 49/ 4021, tx: 769, lsn: 0/06035D60, prev 0/06035D30, desc: FPI_FOR_HINT , blkref #0: rel 1663/16385/1247 blk 14 FPW rmgr: XLOG len (rec/tot): 49/ 8013, tx: 769, lsn: 0/06036D30, prev 0/06035D60, desc: FPI_FOR_HINT , blkref #0: rel 1663/16385/2610 blk 0 FPW rmgr: XLOG len (rec/tot): 49/ 8193, tx: 769, lsn: 0/06038C98, prev 0/06036D30, desc: FPI_FOR_HINT , blkref #0: rel 1663/16385/1249 blk 16 FPW rmgr: XLOG len (rec/tot): 49/ 7633, tx: 769, lsn: 0/0603ACB8, prev 0/06038C98, desc: FPI_FOR_HINT , blkref #0: rel 1663/16385/1249 blk 54 FPW rmgr: Heap len (rec/tot): 54/ 54, tx: 769, lsn: 0/0603CAA8, prev 0/0603ACB8, desc: DELETE xmax: 769, off: 36, infobits: [KEYS_UPDATED], flags: 0x00, blkref #0: rel 1663/16385/2610 blk 0 rmgr: Heap len (rec/tot): 54/ 54, tx: 769, lsn: 0/0603CAE0, prev 0/0603CAA8, desc: DELETE xmax: 769, off: 53, infobits: [KEYS_UPDATED], flags: 0x00, blkref #0: rel 1663/16385/1249 blk 54 rmgr: Heap len (rec/tot): 54/ 54, tx: 769, lsn: 0/0603CB18, prev 0/0603CAE0, desc: DELETE xmax: 769, off: 54, infobits: [KEYS_UPDATED], flags: 0x00, blkref #0: rel 1663/16385/1249 blk 54 rmgr: Heap len (rec/tot): 54/ 54, tx: 769, lsn: 0/0603CB50, prev 0/0603CB18, desc: DELETE xmax: 769, off: 4, infobits: [KEYS_UPDATED], flags: 0x00, blkref #0: rel 1663/16385/1259 blk 0 rmgr: Heap len (rec/tot): 54/ 54, tx: 769, lsn: 0/0603CB88, prev 0/0603CB50, desc: DELETE xmax: 769, off: 9, infobits: [KEYS_UPDATED], flags: 0x00, blkref #0: rel 1663/16385/2608 blk 3 rmgr: Heap len (rec/tot): 54/ 54, tx: 769, lsn: 0/0603CBC0, prev 0/0603CB88, desc: DELETE xmax: 769, off: 12, infobits: [KEYS_UPDATED], flags: 0x00, blkref #0: rel 1663/16385/2608 blk 3 rmgr: Heap len (rec/tot): 54/ 54, tx: 769, lsn: 0/0603CBF8, prev 0/0603CBC0, desc: DELETE xmax: 769, off: 41, infobits: [KEYS_UPDATED], flags: 0x00, blkref #0: rel 1663/16385/1249 blk 16 rmgr: Heap len (rec/tot): 54/ 54, tx: 769, lsn: 0/0603CC30, prev 0/0603CBF8, desc: DELETE xmax: 769, off: 40, infobits: [KEYS_UPDATED], flags: 0x00, blkref #0: rel 1663/16385/1249 blk 16 rmgr: Heap len (rec/tot): 54/ 54, tx: 769, lsn: 0/0603CC68, prev 0/0603CC30, desc: DELETE xmax: 769, off: 39, infobits: [KEYS_UPDATED], flags: 0x00, blkref #0: rel 1663/16385/1249 blk 16 rmgr: Heap len (rec/tot): 54/ 54, tx: 769, lsn: 0/0603CCA0, prev 0/0603CC68, desc: DELETE xmax: 769, off: 38, infobits: [KEYS_UPDATED], flags: 0x00, blkref #0: rel 1663/16385/1249 blk 16 rmgr: Heap len (rec/tot): 54/ 54, tx: 769, lsn: 0/0603CCD8, prev 0/0603CCA0, desc: DELETE xmax: 769, off: 36, infobits: [KEYS_UPDATED], flags: 0x00, blkref #0: rel 1663/16385/1249 blk 16 rmgr: Heap len (rec/tot): 54/ 54, tx: 769, lsn: 0/0603CD10, prev 0/0603CCD8, desc: DELETE xmax: 769, off: 35, infobits: [KEYS_UPDATED], flags: 0x00, blkref #0: rel 1663/16385/1249 blk 16 rmgr: Heap len (rec/tot): 54/ 54, tx: 769, lsn: 0/0603CD48, prev 0/0603CD10, desc: DELETE xmax: 769, off: 32, infobits: [KEYS_UPDATED], flags: 0x00, blkref #0: rel 1663/16385/1249 blk 16 rmgr: Heap len (rec/tot): 54/ 54, tx: 769, lsn: 0/0603CD80, prev 0/0603CD48, desc: DELETE xmax: 769, off: 33, infobits: [KEYS_UPDATED], flags: 0x00, blkref #0: rel 1663/16385/1249 blk 16 rmgr: Heap len (rec/tot): 54/ 54, tx: 769, lsn: 0/0603CDB8, prev 0/0603CD80, desc: DELETE xmax: 769, off: 34, infobits: [KEYS_UPDATED], flags: 0x00, blkref #0: rel 1663/16385/1249 blk 16 rmgr: Heap len (rec/tot): 54/ 54, tx: 769, lsn: 0/0603CDF0, prev 0/0603CDB8, desc: DELETE xmax: 769, off: 3, infobits: [KEYS_UPDATED], flags: 0x00, blkref #0: rel 1663/16385/1259 blk 0 rmgr: Heap len (rec/tot): 54/ 54, tx: 769, lsn: 0/0603CE28, prev 0/0603CDF0, desc: DELETE xmax: 769, off: 15, infobits: [KEYS_UPDATED], flags: 0x00, blkref #0: rel 1663/16385/2608 blk 3 rmgr: Heap len (rec/tot): 54/ 54, tx: 769, lsn: 0/0603CE60, prev 0/0603CE28, desc: DELETE xmax: 769, off: 21, infobits: [KEYS_UPDATED], flags: 0x00, blkref #0: rel 1663/16385/1247 blk 14 rmgr: Heap len (rec/tot): 54/ 54, tx: 769, lsn: 0/0603CE98, prev 0/0603CE60, desc: DELETE xmax: 769, off: 3, infobits: [KEYS_UPDATED], flags: 0x00, blkref #0: rel 1663/16385/2608 blk 3 rmgr: Heap len (rec/tot): 54/ 54, tx: 769, lsn: 0/0603CED0, prev 0/0603CE98, desc: DELETE xmax: 769, off: 20, infobits: [KEYS_UPDATED], flags: 0x00, blkref #0: rel 1663/16385/1247 blk 14 rmgr: Heap len (rec/tot): 54/ 54, tx: 769, lsn: 0/0603CF08, prev 0/0603CED0, desc: DELETE xmax: 769, off: 136, infobits: [KEYS_UPDATED], flags: 0x00, blkref #0: rel 1663/16385/2608 blk 2 rmgr: Heap len (rec/tot): 54/ 54, tx: 769, lsn: 0/0603CF40, prev 0/0603CF08, desc: DELETE xmax: 769, off: 31, infobits: [KEYS_UPDATED], flags: 0x00, blkref #0: rel 1663/16385/1249 blk 16 rmgr: Heap len (rec/tot): 54/ 54, tx: 769, lsn: 0/0603CF78, prev 0/0603CF40, desc: DELETE xmax: 769, off: 30, infobits: [KEYS_UPDATED], flags: 0x00, blkref #0: rel 1663/16385/1249 blk 16 rmgr: Heap len (rec/tot): 54/ 54, tx: 769, lsn: 0/0603CFB0, prev 0/0603CF78, desc: DELETE xmax: 769, off: 29, infobits: [KEYS_UPDATED], flags: 0x00, blkref #0: rel 1663/16385/1249 blk 16 rmgr: Heap len (rec/tot): 54/ 54, tx: 769, lsn: 0/0603CFE8, prev 0/0603CFB0, desc: DELETE xmax: 769, off: 28, infobits: [KEYS_UPDATED], flags: 0x00, blkref #0: rel 1663/16385/1249 blk 16 rmgr: Heap len (rec/tot): 54/ 54, tx: 769, lsn: 0/0603D020, prev 0/0603CFE8, desc: DELETE xmax: 769, off: 27, infobits: [KEYS_UPDATED], flags: 0x00, blkref #0: rel 1663/16385/1249 blk 16 rmgr: Heap len (rec/tot): 54/ 54, tx: 769, lsn: 0/0603D058, prev 0/0603D020, desc: DELETE xmax: 769, off: 26, infobits: [KEYS_UPDATED], flags: 0x00, blkref #0: rel 1663/16385/1249 blk 16 rmgr: Heap len (rec/tot): 54/ 54, tx: 769, lsn: 0/0603D090, prev 0/0603D058, desc: DELETE xmax: 769, off: 24, infobits: [KEYS_UPDATED], flags: 0x00, blkref #0: rel 1663/16385/1249 blk 16 rmgr: Heap len (rec/tot): 54/ 54, tx: 769, lsn: 0/0603D0C8, prev 0/0603D090, desc: DELETE xmax: 769, off: 25, infobits: [KEYS_UPDATED], flags: 0x00, blkref #0: rel 1663/16385/1249 blk 16 rmgr: Heap len (rec/tot): 54/ 54, tx: 769, lsn: 0/0603D100, prev 0/0603D0C8, desc: DELETE xmax: 769, off: 5, infobits: [KEYS_UPDATED], flags: 0x00, blkref #0: rel 1663/16385/1259 blk 0 rmgr: Heap len (rec/tot): 54/ 54, tx: 769, lsn: 0/0603D138, prev 0/0603D100, desc: DELETE xmax: 769, off: 6, infobits: [KEYS_UPDATED], flags: 0x00, blkref #0: rel 1663/16385/2608 blk 3 rmgr: XLOG len (rec/tot): 49/ 193, tx: 769, lsn: 0/0603D170, prev 0/0603D138, desc: FPI_FOR_HINT , blkref #0: rel 1664/0/1214 blk 0 FPW rmgr: Heap len (rec/tot): 54/ 54, tx: 769, lsn: 0/0603D238, prev 0/0603D170, desc: DELETE xmax: 769, off: 2, infobits: [KEYS_UPDATED], flags: 0x00, blkref #0: rel 1664/0/1214 blk 0 rmgr: Transaction len (rec/tot): 1089/ 1089, tx: 769, lsn: 0/0603D270, prev 0/0603D238, desc: COMMIT 2026-04-29 13:25:09.539651 CEST; rels: base/16385/16386 base/16385/16389 base/16385/16390; dropped stats: 2/16385/16390 2/16385/16389 2/16385/16386; inval msgs: catcache 34 catcache 7 catcache 6 catcache 7 catcache 6 catcache 57 catcache 56 catcache 7 catcache 6 catcache 7 catcache 6 catcache 7 catcache 6 catcache 7 catcache 6 catcache 7 catcache 6 catcache 7 catcache 6 catcache 7 catcache 6 catcache 7 catcache 6 catcache 7 catcache 6 catcache 57 catcache 56 catcache 82 catcache 81 catcache 82 catcache 81 catcache 7 catcache 6 catcache 7 catcache 6 catcache 7 catcache 6 catcache 7 catcache 6 catcache 7 catcache 6 catcache 7 catcache 6 catcache 7 catcache 6 catcache 7 catcache 6 catcache 57 catcache 56 relcache 16390 relcache 16389 snapshot 2608 relcache 16389 snapshot 2608 snapshot 2608 snapshot 2608 relcache 16386 snapshot 2608 snapshot 1214 rmgr: Standby len (rec/tot): 50/ 50, tx: 0, lsn: 0/0603D6B8, prev 0/0603D270, desc: RUNNING_XACTS nextXid 770 latestCompletedXid 769 oldestRunningXid 770 rmgr: XLOG len (rec/tot): 24/ 24, tx: 0, lsn: 0/0603D6F0, prev 0/0603D6B8, desc: SWITCH ==== Visszaállás megadott LSN-re ==== Hozzá kell adni a ''$PGDATA/postgresql.conf'' VAGY a ''$PGDATA/postgresql.auto.conf'' fájlhoz az helyreállításhoz szükséges adatokat és létre kell hozni a ''$PGDATA/recovery.signal'' állományt. A példában a tábla törlését megelőző pillanatot adtam meg. [root@pg03 ~]# cat /var/lib/pgsql/18/data/postgresql.auto.conf # Do not edit this file manually! # It will be overwritten by the ALTER SYSTEM command. [root@pg03 ~]# export RECOVERY_LSN='0/0603CAA8' [root@pg03 ~]# cat >>/var/lib/pgsql/18/data/postgresql.auto.conf < Adatbázis kezelő indítása [root@pg03 ~]# systemctl restart postgresql-18 Adatok ellenőrzése [root@pg03 ~]# psql -U test -d test -c "SELECT * FROM test" id | data ----+-------------- 1 | backup előtt 2 | backup után 3 | törlés előtt (3 rows) ===== WAL állományok ellenőrzése ===== A WAL ellenőrzése kritikus a sikeres helyreállításhoz. Az alábbi lépések segítségével meggyőződhetünk arról, hogy helyreállítható-e a rendszer. Archiver állapotának lekérdezése. [root@pg01 ~]# psql -U postgres -x -c "SELECT archived_count, last_archived_wal, last_archived_time, failed_count, last_failed_wal, last_failed_time FROM pg_stat_archiver" -[ RECORD 1 ]------+------------------------------ archived_count | 4 last_archived_wal | 000000010000000000000003 last_archived_time | 2026-04-29 13:26:05.951808+02 failed_count | 0 last_failed_wal | last_failed_time | A ''000000010000000000000003'' előtti fájlokra nincs szükség amennyiben a legutóbbi ''pg_basebackup'' futtatása utáni állapotra kell visszaállni.