waiting for server to start.... done server started CREATE DATABASE lab_invoice_031; CREATE DATABASE CREATE TABLE invoice (id integer PRIMARY KEY, amount integer NOT NULL); CREATE TABLE INSERT INTO invoice VALUES (101, 7), (203, 11), (407, 19); INSERT 0 3 waiting for server to start.... done server started SELECT id, amount FROM invoice ORDER BY id; id | amount -----+-------- 101 | 7 203 | 11 407 | 19 (3 rows) SELECT pg_wal_replay_pause(); pg_wal_replay_pause --------------------- (1 row) DROP DATABASE lab_invoice_031; DROP DATABASE SELECT count(*) AS primary_database_count FROM pg_database WHERE datname = 'lab_invoice_031'; primary_database_count ------------------------ 0 (1 row) SELECT pg_last_wal_receive_lsn() >= '0/3000610'::pg_lsn AS received_through_drop, pg_last_wal_replay_lsn() < '0/3000610'::pg_lsn AS replay_still_behind, pg_is_wal_replay_paused() AS pause_requested; received_through_drop | replay_still_behind | pause_requested -----------------------+---------------------+----------------- t | t | t (1 row) SELECT id, amount FROM invoice ORDER BY id; id | amount -----+-------- 101 | 7 203 | 11 407 | 19 (3 rows) CREATE DATABASE lab_audited_restore; CREATE DATABASE SELECT id, amount FROM invoice ORDER BY id; id | amount -----+-------- 101 | 7 203 | 11 407 | 19 (3 rows) SELECT count(*) AS rows_restored, sum(amount) AS amount_total FROM invoice; rows_restored | amount_total ---------------+-------------- 3 | 37 (1 row) PASS version=10.15 replay_before=0/3000000 primary_postdrop_flush=0/3000610 all_three_rows_match waiting for server to shut down.... done server stopped waiting for server to shut down.... done server stopped