TEST SCENARIO Purpose: To observe that the patch v14 code execution during DropSubscription Note: The "!!>>" is extra logging added for testing, not a normal part of PG. Steps: 1. CREATE PUBLICATION for some table T1 2. CREATE SUBSCRIPTION for that publication 3. Pause the tablesync worker in CATCHUP state (so there would be a tablesync slot in need of cleanup) 4. Show the slots 5. Stop the publisher PG instance (to break the connection) 6. ALTER SUBSCRIPTION ... DISABLE; 7. ALTER SUBSCRIPTION ... SET (slot_name = NONE) (to disassociate the name from the slot) 8. DROP SUBSCRIPTION // Expect: // since slot name is NONE it will allow the DROP SUBSCRIPTION to complete even though there is no connection // But because there is a tablesyc slot to be cleaned up still, a WARNING wil be logged. 9. Restart the publisher PG instance and see the slots are still there. ================== ## ## Normal PUBLICATION of a table ## [postgres@CentOS7-x64 ~]$ psql -d test_pub -c "CREATE PUBLICATION tap_pub FOR TABLE test_tab;" CREATE PUBLICATION ## ## Create subscription, and pause the when gets to CATCHUP state ## [postgres@CentOS7-x64 ~]$ psql -d test_sub -p 54321 -c "CREATE SUBSCRIPTION tap_sub CONNECTION 'host=localhost dbname=test_pub application_name=tap_sub' PUBLICATION tap_pub;" 2021-01-12 21:41:59.129 AEDT [12237] LOG: logical decoding found consistent point at 0/162E0B8 2021-01-12 21:41:59.129 AEDT [12237] DETAIL: There are no running transactions. 2021-01-12 21:41:59.129 AEDT [12237] STATEMENT: CREATE_REPLICATION_SLOT "tap_sub" LOGICAL pgoutput NOEXPORT_SNAPSHOT NOTICE: created replication slot "tap_sub" on publisher CREATE SUBSCRIPTION 2021-01-12 21:41:59.141 AEDT [12238] LOG: logical replication apply worker for subscription "tap_sub" has started 2021-01-12 21:41:59.142 AEDT [12238] LOG: !!>> The apply worker process has PID = 12238 [postgres@CentOS7-x64 ~]$ 2021-01-12 21:41:59.148 AEDT [12245] LOG: starting logical decoding for slot "tap_sub" 2021-01-12 21:41:59.148 AEDT [12245] DETAIL: Streaming transactions committing after 0/162E0F0, reading WAL from 0/162E0B8. 2021-01-12 21:41:59.148 AEDT [12245] STATEMENT: START_REPLICATION SLOT "tap_sub" LOGICAL 0/0 (proto_version '2', publication_names '"tap_pub"') 2021-01-12 21:41:59.148 AEDT [12245] LOG: logical decoding found consistent point at 0/162E0B8 2021-01-12 21:41:59.148 AEDT [12245] DETAIL: There are no running transactions. 2021-01-12 21:41:59.148 AEDT [12245] STATEMENT: START_REPLICATION SLOT "tap_sub" LOGICAL 0/0 (proto_version '2', publication_names '"tap_pub"') 2021-01-12 21:41:59.148 AEDT [12238] LOG: !!>> apply worker: LogicalRepApplyLoop 2021-01-12 21:41:59.148 AEDT [12238] LOG: !!>> apply worker: called process_syncing_tables 2021-01-12 21:41:59.152 AEDT [12246] LOG: logical replication table synchronization worker for subscription "tap_sub", table "test_tab" has started 2021-01-12 21:41:59.152 AEDT [12246] LOG: !!>> The tablesync worker process has PID = 12246 2021-01-12 21:41:59.152 AEDT [12246] LOG: !!>> Sleeping 30 secs. For debugging, attach to process 12246 now! 2021-01-12 21:42:00.170 AEDT [12238] LOG: !!>> apply worker: LogicalRepApplyLoop 2021-01-12 21:42:00.170 AEDT [12238] LOG: !!>> apply worker: called process_syncing_tables 2021-01-12 21:42:01.170 AEDT [12238] LOG: !!>> apply worker: LogicalRepApplyLoop 2021-01-12 21:42:01.170 AEDT [12238] LOG: !!>> apply worker: called process_syncing_tables 2021-01-12 21:42:02.172 AEDT [12238] LOG: !!>> apply worker: LogicalRepApplyLoop 2021-01-12 21:42:02.172 AEDT [12238] LOG: !!>> apply worker: called process_syncing_tables 2021-01-12 21:42:03.174 AEDT [12238] LOG: !!>> apply worker: LogicalRepApplyLoop 2021-01-12 21:42:03.174 AEDT [12238] LOG: !!>> apply worker: called process_syncing_tables 2021-01-12 21:42:04.177 AEDT [12238] LOG: !!>> apply worker: LogicalRepApplyLoop 2021-01-12 21:42:04.177 AEDT [12238] LOG: !!>> apply worker: called process_syncing_tables 2021-01-12 21:42:05.180 AEDT [12238] LOG: !!>> apply worker: LogicalRepApplyLoop 2021-01-12 21:42:05.180 AEDT [12238] LOG: !!>> apply worker: called process_syncing_tables 2021-01-12 21:42:06.193 AEDT [12238] LOG: !!>> apply worker: LogicalRepApplyLoop 2021-01-12 21:42:06.194 AEDT [12238] LOG: !!>> apply worker: called process_syncing_tables 2021-01-12 21:42:07.195 AEDT [12238] LOG: !!>> apply worker: LogicalRepApplyLoop 2021-01-12 21:42:07.195 AEDT [12238] LOG: !!>> apply worker: called process_syncing_tables 2021-01-12 21:42:08.202 AEDT [12238] LOG: !!>> apply worker: LogicalRepApplyLoop 2021-01-12 21:42:08.202 AEDT [12238] LOG: !!>> apply worker: called process_syncing_tables 2021-01-12 21:42:09.204 AEDT [12238] LOG: !!>> apply worker: LogicalRepApplyLoop 2021-01-12 21:42:09.204 AEDT [12238] LOG: !!>> apply worker: called process_syncing_tables 2021-01-12 21:42:10.206 AEDT [12238] LOG: !!>> apply worker: LogicalRepApplyLoop 2021-01-12 21:42:10.206 AEDT [12238] LOG: !!>> apply worker: called process_syncing_tables 2021-01-12 21:42:11.213 AEDT [12238] LOG: !!>> apply worker: LogicalRepApplyLoop 2021-01-12 21:42:11.213 AEDT [12238] LOG: !!>> apply worker: called process_syncing_tables 2021-01-12 21:42:12.220 AEDT [12238] LOG: !!>> apply worker: LogicalRepApplyLoop 2021-01-12 21:42:12.220 AEDT [12238] LOG: !!>> apply worker: called process_syncing_tables 2021-01-12 21:42:13.222 AEDT [12238] LOG: !!>> apply worker: LogicalRepApplyLoop 2021-01-12 21:42:13.222 AEDT [12238] LOG: !!>> apply worker: called process_syncing_tables 2021-01-12 21:42:14.224 AEDT [12238] LOG: !!>> apply worker: LogicalRepApplyLoop 2021-01-12 21:42:14.224 AEDT [12238] LOG: !!>> apply worker: called process_syncing_tables 2021-01-12 21:42:15.224 AEDT [12238] LOG: !!>> apply worker: LogicalRepApplyLoop 2021-01-12 21:42:15.224 AEDT [12238] LOG: !!>> apply worker: called process_syncing_tables 2021-01-12 21:42:16.244 AEDT [12238] LOG: !!>> apply worker: LogicalRepApplyLoop 2021-01-12 21:42:16.244 AEDT [12238] LOG: !!>> apply worker: called process_syncing_tables 2021-01-12 21:42:17.259 AEDT [12238] LOG: !!>> apply worker: LogicalRepApplyLoop 2021-01-12 21:42:17.259 AEDT [12238] LOG: !!>> apply worker: called process_syncing_tables 2021-01-12 21:42:18.260 AEDT [12238] LOG: !!>> apply worker: LogicalRepApplyLoop 2021-01-12 21:42:18.260 AEDT [12238] LOG: !!>> apply worker: called process_syncing_tables 2021-01-12 21:42:19.263 AEDT [12238] LOG: !!>> apply worker: LogicalRepApplyLoop 2021-01-12 21:42:19.263 AEDT [12238] LOG: !!>> apply worker: called process_syncing_tables 2021-01-12 21:42:20.272 AEDT [12238] LOG: !!>> apply worker: LogicalRepApplyLoop 2021-01-12 21:42:20.273 AEDT [12238] LOG: !!>> apply worker: called process_syncing_tables 2021-01-12 21:42:21.275 AEDT [12238] LOG: !!>> apply worker: LogicalRepApplyLoop 2021-01-12 21:42:21.275 AEDT [12238] LOG: !!>> apply worker: called process_syncing_tables 2021-01-12 21:42:22.276 AEDT [12238] LOG: !!>> apply worker: LogicalRepApplyLoop 2021-01-12 21:42:22.276 AEDT [12238] LOG: !!>> apply worker: called process_syncing_tables 2021-01-12 21:42:23.277 AEDT [12238] LOG: !!>> apply worker: LogicalRepApplyLoop 2021-01-12 21:42:23.277 AEDT [12238] LOG: !!>> apply worker: called process_syncing_tables 2021-01-12 21:42:24.282 AEDT [12238] LOG: !!>> apply worker: LogicalRepApplyLoop 2021-01-12 21:42:24.282 AEDT [12238] LOG: !!>> apply worker: called process_syncing_tables 2021-01-12 21:42:25.283 AEDT [12238] LOG: !!>> apply worker: LogicalRepApplyLoop 2021-01-12 21:42:25.283 AEDT [12238] LOG: !!>> apply worker: called process_syncing_tables 2021-01-12 21:42:26.285 AEDT [12238] LOG: !!>> apply worker: LogicalRepApplyLoop 2021-01-12 21:42:26.285 AEDT [12238] LOG: !!>> apply worker: called process_syncing_tables 2021-01-12 21:42:27.288 AEDT [12238] LOG: !!>> apply worker: LogicalRepApplyLoop 2021-01-12 21:42:27.288 AEDT [12238] LOG: !!>> apply worker: called process_syncing_tables 2021-01-12 21:42:28.290 AEDT [12238] LOG: !!>> apply worker: LogicalRepApplyLoop 2021-01-12 21:42:28.291 AEDT [12238] LOG: !!>> apply worker: called process_syncing_tables 2021-01-12 21:42:29.153 AEDT [12246] LOG: !!>> tablesync worker: About to call LogicalRepSyncTableStart to do initial syncing 2021-01-12 21:42:29.291 AEDT [12238] LOG: !!>> apply worker: LogicalRepApplyLoop 2021-01-12 21:42:29.291 AEDT [12238] LOG: !!>> apply worker: called process_syncing_tables 2021-01-12 21:42:29.292 AEDT [12238] LOG: !!>> apply worker: LogicalRepApplyLoop 2021-01-12 21:42:29.292 AEDT [12238] LOG: !!>> apply worker: called process_syncing_tables 2021-01-12 21:42:30.292 AEDT [12238] LOG: !!>> apply worker: LogicalRepApplyLoop 2021-01-12 21:42:30.292 AEDT [12238] LOG: !!>> apply worker: called process_syncing_tables 2021-01-12 21:42:31.294 AEDT [12238] LOG: !!>> apply worker: LogicalRepApplyLoop 2021-01-12 21:42:31.294 AEDT [12238] LOG: !!>> apply worker: called process_syncing_tables 2021-01-12 21:42:32.294 AEDT [12238] LOG: !!>> apply worker: LogicalRepApplyLoop 2021-01-12 21:42:32.294 AEDT [12238] LOG: !!>> apply worker: called process_syncing_tables 2021-01-12 21:42:33.296 AEDT [12238] LOG: !!>> apply worker: LogicalRepApplyLoop 2021-01-12 21:42:33.296 AEDT [12238] LOG: !!>> apply worker: called process_syncing_tables 2021-01-12 21:42:34.297 AEDT [12238] LOG: !!>> apply worker: LogicalRepApplyLoop 2021-01-12 21:42:34.297 AEDT [12238] LOG: !!>> apply worker: called process_syncing_tables 2021-01-12 21:42:35.299 AEDT [12238] LOG: !!>> apply worker: LogicalRepApplyLoop 2021-01-12 21:42:35.299 AEDT [12238] LOG: !!>> apply worker: called process_syncing_tables 2021-01-12 21:42:36.302 AEDT [12238] LOG: !!>> apply worker: LogicalRepApplyLoop 2021-01-12 21:42:36.302 AEDT [12238] LOG: !!>> apply worker: called process_syncing_tables 2021-01-12 21:42:37.307 AEDT [12238] LOG: !!>> apply worker: LogicalRepApplyLoop 2021-01-12 21:42:37.307 AEDT [12238] LOG: !!>> apply worker: called process_syncing_tables 2021-01-12 21:42:38.311 AEDT [12238] LOG: !!>> apply worker: LogicalRepApplyLoop 2021-01-12 21:42:38.311 AEDT [12238] LOG: !!>> apply worker: called process_syncing_tables 2021-01-12 21:42:39.312 AEDT [12238] LOG: !!>> apply worker: LogicalRepApplyLoop 2021-01-12 21:42:39.312 AEDT [12238] LOG: !!>> apply worker: called process_syncing_tables 2021-01-12 21:42:40.313 AEDT [12238] LOG: !!>> apply worker: LogicalRepApplyLoop 2021-01-12 21:42:40.313 AEDT [12238] LOG: !!>> apply worker: called process_syncing_tables 2021-01-12 21:42:41.320 AEDT [12238] LOG: !!>> apply worker: LogicalRepApplyLoop 2021-01-12 21:42:41.320 AEDT [12238] LOG: !!>> apply worker: called process_syncing_tables 2021-01-12 21:42:42.328 AEDT [12238] LOG: !!>> apply worker: LogicalRepApplyLoop 2021-01-12 21:42:42.328 AEDT [12238] LOG: !!>> apply worker: called process_syncing_tables 2021-01-12 21:42:43.329 AEDT [12238] LOG: !!>> apply worker: LogicalRepApplyLoop 2021-01-12 21:42:43.329 AEDT [12238] LOG: !!>> apply worker: called process_syncing_tables 2021-01-12 21:42:44.331 AEDT [12238] LOG: !!>> apply worker: LogicalRepApplyLoop 2021-01-12 21:42:44.331 AEDT [12238] LOG: !!>> apply worker: called process_syncing_tables 2021-01-12 21:42:45.340 AEDT [12238] LOG: !!>> apply worker: LogicalRepApplyLoop 2021-01-12 21:42:45.340 AEDT [12238] LOG: !!>> apply worker: called process_syncing_tables 2021-01-12 21:42:46.351 AEDT [12238] LOG: !!>> apply worker: LogicalRepApplyLoop 2021-01-12 21:42:46.351 AEDT [12238] LOG: !!>> apply worker: called process_syncing_tables 2021-01-12 21:42:47.366 AEDT [12238] LOG: !!>> apply worker: LogicalRepApplyLoop 2021-01-12 21:42:47.367 AEDT [12238] LOG: !!>> apply worker: called process_syncing_tables 2021-01-12 21:42:48.378 AEDT [12238] LOG: !!>> apply worker: LogicalRepApplyLoop 2021-01-12 21:42:48.378 AEDT [12238] LOG: !!>> apply worker: called process_syncing_tables 2021-01-12 21:42:49.381 AEDT [12238] LOG: !!>> apply worker: LogicalRepApplyLoop 2021-01-12 21:42:49.381 AEDT [12238] LOG: !!>> apply worker: called process_syncing_tables 2021-01-12 21:42:50.382 AEDT [12238] LOG: !!>> apply worker: LogicalRepApplyLoop 2021-01-12 21:42:50.382 AEDT [12238] LOG: !!>> apply worker: called process_syncing_tables 2021-01-12 21:42:50.572 AEDT [12246] LOG: !!>> LogicalRepSyncTableStart: walrcv_create_slot for "pg_16409_sync_16385". 2021-01-12 21:42:50.596 AEDT [12259] LOG: logical decoding found consistent point at 0/162E0F0 2021-01-12 21:42:50.596 AEDT [12259] DETAIL: There are no running transactions. 2021-01-12 21:42:50.596 AEDT [12259] STATEMENT: CREATE_REPLICATION_SLOT "pg_16409_sync_16385" LOGICAL pgoutput USE_SNAPSHOT 2021-01-12 21:42:50.599 AEDT [12238] LOG: !!>> apply worker: LogicalRepApplyLoop 2021-01-12 21:42:50.599 AEDT [12238] LOG: !!>> apply worker: called process_syncing_tables 2021-01-12 21:42:50.609 AEDT [12246] LOG: !!>> LogicalRepSyncTableStart: 1 replorigin_create "pg_16409_16385". 2021-01-12 21:42:50.609 AEDT [12246] LOG: !!>> LogicalRepSyncTableStart: 1 replorigin_session_setup "pg_16409_16385". 2021-01-12 21:42:50.609 AEDT [12246] LOG: !!>> LogicalRepSyncTableStart: 1 replorigin_advance "pg_16409_16385". 2021-01-12 21:42:50.610 AEDT [12246] LOG: LogicalRepSyncTableStart: 'pg_16409_16385' origin_startpos lsn 0/162E128 2021-01-12 21:42:50.610 AEDT [12246] LOG: !!>> tablesync worker: wait for CATCHUP state notification 2021-01-12 21:42:50.610 AEDT [12238] LOG: !!>> apply worker: LogicalRepApplyLoop 2021-01-12 21:42:50.610 AEDT [12238] LOG: !!>> apply worker: called process_syncing_tables ## ## Show the slots ## psql -d test_pub -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 ---------------------+----------+-----------+--------+----------+-----------+--------+------------+----- -+--------------+-------------+---------------------+------------+--------------- tap_sub | pgoutput | logical | 16384 | test_pub | f | t | 12245 | | 523 | 0/162E128 | 0/162E128 | reserved | pg_16409_sync_16385 | pgoutput | logical | 16384 | test_pub | f | f | | | 523 | 0/162E0F0 | 0/162E128 | reserved | (2 rows) ## ## Stop the publisher instance (e.g. break the connection) ## [postgres@CentOS7-x64 ~]$ pg_ctl -D ./MYDATAOSS_2PC_PUB/ stop waiting for server to shut down....2021-01-12 21:45:37.223 AEDT [7119] LOG: received fast shutdown request 2021-01-12 21:45:37.228 AEDT [7119] LOG: aborting any active transactions 2021-01-12 21:45:37.229 AEDT [7119] LOG: background worker "logical replication launcher" (PID 7126) exited with exit code 1 2021-01-12 21:45:37.230 AEDT [7121] LOG: shutting down 2021-01-12 21:45:37.231 AEDT [12259] FATAL: terminating connection due to administrator command ........................................ ## ## It gets a bit messy here because the publisher instance doesn't want to terminated ## while the debugger is still holding the other process, and also I was trying to ## execute some SQL commands erroneously... ## ## But the mess does not really matter - the point here is to break the connection ## while the tablesync slot still exists, and that has been achieved... ## psql -d test_sub -p 54321 -c "ALTER SUBSCRIPTION tap_sub SET (slot_name = NONE);". .................. failed pg_ctl: server does not shut down [postgres@CentOS7-x64 ~]$ psql -d test_sub -p 54321 -c "ALTER SUBSCRIPTION tap_sub SET (slot_name = NONE);" 2021-01-12 21:46:37.980 AEDT [12358] ERROR: cannot set slot_name = NONE for enabled subscription 2021-01-12 21:46:37.980 AEDT [12358] STATEMENT: ALTER SUBSCRIPTION tap_sub SET (slot_name = NONE); ERROR: cannot set slot_name = NONE for enabled subscription [postgres@CentOS7-x64 ~]$ 2021-01-12 21:46:38.684 AEDT [12246] LOG: !!>> tablesync worker: received CATCHUP state notification 2021-01-12 21:46:38.684 AEDT [12246] LOG: !!>> tablesync worker: Returned from LogicalRepSyncTableStart 2021-01-12 21:46:38.684 AEDT [12246] ERROR: could not start WAL streaming: server closed the connection unexpectedly This probably means the server terminated abnormally before or while processing the request. 2021-01-12 21:46:38.685 AEDT [7135] LOG: background worker "logical replication worker" (PID 12246) exited with exit code 1 2021-01-12 21:46:38.685 AEDT [12238] LOG: !!>> apply worker: LogicalRepApplyLoop 2021-01-12 21:46:38.686 AEDT [12238] LOG: !!>> apply worker: called process_syncing_tables 2021-01-12 21:46:38.690 AEDT [12369] LOG: logical replication table synchronization worker for subscription "tap_sub", table "test_tab" has started 2021-01-12 21:46:38.690 AEDT [12369] LOG: !!>> The tablesync worker process has PID = 12369 2021-01-12 21:46:38.690 AEDT [12369] LOG: !!>> Sleeping 30 secs. For debugging, attach to process 12369 now! 2021-01-12 21:46:38.704 AEDT [12238] LOG: !!>> apply worker: LogicalRepApplyLoop 2021-01-12 21:46:38.705 AEDT [12238] LOG: data stream from publisher has ended 2021-01-12 21:46:38.705 AEDT [12238] LOG: !!>> apply worker: called process_syncing_tables 2021-01-12 21:46:38.705 AEDT [12238] ERROR: could not send end-of-streaming message to primary: no COPY in progress 2021-01-12 21:46:38.706 AEDT [7135] LOG: background worker "logical replication worker" (PID 12238) exited with exit code 1 2021-01-12 21:46:38.711 AEDT [12370] LOG: logical replication apply worker for subscription "tap_sub" has started 2021-01-12 21:46:38.711 AEDT [12370] LOG: !!>> The apply worker process has PID = 12370 2021-01-12 21:46:38.714 AEDT [12371] FATAL: the database system is shutting down 2021-01-12 21:46:38.714 AEDT [12370] ERROR: could not connect to the publisher: FATAL: the database system is shutting down 2021-01-12 21:46:38.716 AEDT [7135] LOG: background worker "logical replication worker" (PID 12370) exited with exit code 1 2021-01-12 21:46:38.727 AEDT [7119] LOG: database system is shut down 2021-01-12 21:46:43.734 AEDT [12372] LOG: logical replication apply worker for subscription "tap_sub" has started 2021-01-12 21:46:43.734 AEDT [12372] LOG: !!>> The apply worker process has PID = 12372 2021-01-12 21:46:43.737 AEDT [12372] ERROR: could not connect to the publisher: could not connect to server: Connection refused Is the server running on host "localhost" (::1) and accepting TCP/IP connections on port 5432? could not connect to server: Connection refused Is the server running on host "localhost" (127.0.0.1) and accepting TCP/IP connections on port 5432? 2021-01-12 21:46:43.739 AEDT [7135] LOG: background worker "logical replication worker" (PID 12372) exited with exit code 1 [etc...] ## ## Disassociate the slot_name ## ## To do this first the subscription needed to be DISABLED ## psql -d test_sub -p 54321 -c "ALTER SUBSCRIPTION tap_sub DISABLE;" ALTER SUBSCRIPTION [postgres@CentOS7-x64 ~]$ psql -d test_sub -p 54321 -c "ALTER SUBSCRIPTION tap_sub SET (slot_name = NONE);" ALTER SUBSCRIPTION ## ## Now DROP the subscription. ## ## Even though there is no connection, this is allowed now. ## And because it knows there is a remaining tablesync slot, there is a WARNING about it ## [postgres@CentOS7-x64 ~]$ psql -d test_sub -p 54321 -c "DROP SUBSCRIPTION tap_sub;" 2021-01-12 21:50:45.922 AEDT [12649] WARNING: no connection; cannot drop tablesync slot "pg_16409_sync_16385". 2021-01-12 21:50:45.922 AEDT [12649] LOG: DropSubscription: dropping origin tracking for "pg_16409_16385" 2021-01-12 21:50:45.922 AEDT [12649] STATEMENT: DROP SUBSCRIPTION tap_sub; 2021-01-12 21:50:45.922 AEDT [12649] LOG: !!>> DropSubscription: dropped origin tracking for "pg_16409_16385" 2021-01-12 21:50:45.922 AEDT [12649] STATEMENT: DROP SUBSCRIPTION tap_sub; WARNING: no connection; cannot drop tablesync slot "pg_16409_sync_16385". DROP SUBSCRIPTION ## ## Restart the publisher instance again to see the slots that now need to be manually deleted ## ## tap_sub - because the slt_name was deliberately disassociated ## pg_16409_sync_16385 - the leftover tablesync slot which was unable to be dropped due to broken connection ## [postgres@CentOS7-x64 ~]$ pg_ctl -D ./MYDATAOSS_2PC_PUB/ start waiting for server to start....2021-01-12 21:55:39.057 AEDT [12994] LOG: starting PostgreSQL 14devel on x86_64-pc-linux-gnu, compiled by gcc (GCC) 4.8.5 20150623 (Red Hat 4.8.5-36), 64-bit 2021-01-12 21:55:39.060 AEDT [12994] LOG: listening on IPv6 address "::1", port 5432 2021-01-12 21:55:39.060 AEDT [12994] LOG: listening on IPv4 address "127.0.0.1", port 5432 2021-01-12 21:55:39.066 AEDT [12994] LOG: listening on Unix socket "/tmp/.s.PGSQL.5432" 2021-01-12 21:55:39.071 AEDT [12995] LOG: database system was shut down at 2021-01-12 21:46:38 AEDT 2021-01-12 21:55:39.078 AEDT [12994] LOG: database system is ready to accept connections done server started [postgres@CentOS7-x64 ~]$ psql -d test_pub -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 ---------------------+----------+-----------+--------+----------+-----------+--------+------------+----- -+--------------+-------------+---------------------+------------+--------------- tap_sub | pgoutput | logical | 16384 | test_pub | f | f | | | 523 | 0/162E1D8 | 0/162E1D8 | reserved | pg_16409_sync_16385 | pgoutput | logical | 16384 | test_pub | f | f | | | 523 | 0/162E0F0 | 0/162E128 | reserved | (2 rows) [postgres@CentOS7-x64 ~]$ [END]