PostgreSQL
Check-in [21141da95f]
Not logged in

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Fix test_decoding test case's check that slot has been dropped. pg_stat_replication shows connected replication clients. The ddl test case never has any replication clients connected, so querying pg_stat_replication is pointless. To check that a slot has been dropped correctly, query pg_replication_slots instead. Andres Freund
Timelines: family | ancestors | descendants | both | trunk | WIN32_DEV | REL9_0_ALPHA4_BRANCH
Files: files | file ages | folders
SHA1:21141da95f02bba3e544e387386e99ebd509c695
User & Date: heikki.linnakangas@iki.fi 2014-05-16 08:34:46
Context
2014-05-16
08:34
Add test case for logical decoding of prepared transactions. Andres Freund check-in: 96f4eeef2c user: heikki.linnakangas@iki.fi tags: trunk, WIN32_DEV, REL9_0_ALPHA4_BRANCH
08:34
Fix test_decoding test case's check that slot has been dropped. pg_stat_replication shows connected replication clients. The ddl test case never has any replication clients connected, so querying pg_... check-in: 21141da95f user: heikki.linnakangas@iki.fi tags: trunk, WIN32_DEV, REL9_0_ALPHA4_BRANCH
07:53
Fix thinko in logical decoding of commit-prepared records. The decoding of prepared transaction commits accidentally used the XID of the transaction performing the COMMIT PREPARED, not the XID of the... check-in: ee35441ec9 user: heikki.linnakangas@iki.fi tags: trunk, WIN32_DEV, REL9_0_ALPHA4_BRANCH
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to contrib/test_decoding/expected/ddl.out.

cannot compute difference between binary files

Changes to contrib/test_decoding/sql/ddl.sql.

327
328
329
330
331
332
333

334
335
336

337
-- make sure we decode correctly even if the toast table is gone
DROP TABLE toasttable;

SELECT data FROM pg_logical_slot_get_changes('regression_slot', NULL, NULL, 'include-xids', '0');

-- done, free logical replication slot
SELECT data FROM pg_logical_slot_get_changes('regression_slot', NULL, NULL, 'include-xids', '0');

SELECT pg_drop_replication_slot('regression_slot');

/* check that we aren't visible anymore now */

SELECT * FROM pg_stat_replication;







>


<
>
|
327
328
329
330
331
332
333
334
335
336

337
338
-- make sure we decode correctly even if the toast table is gone
DROP TABLE toasttable;

SELECT data FROM pg_logical_slot_get_changes('regression_slot', NULL, NULL, 'include-xids', '0');

-- done, free logical replication slot
SELECT data FROM pg_logical_slot_get_changes('regression_slot', NULL, NULL, 'include-xids', '0');

SELECT pg_drop_replication_slot('regression_slot');


/* check that the slot is gone */
SELECT * FROM pg_replication_slots;