BUG #14228: replication slot catalog_xmin not cleared on slot reuse

From: andrew(at)tao11(dot)riddles(dot)org(dot)uk
To: pgsql-bugs(at)postgresql(dot)org
Subject: BUG #14228: replication slot catalog_xmin not cleared on slot reuse
Date: 2016-07-05 17:35:02
Message-ID: 20160705173502.1398.70934@wrigleys.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

The following bug has been logged on the website:

Bug reference: 14228
Logged by: Andrew Gierth
Email address: andrew(at)tao11(dot)riddles(dot)org(dot)uk
PostgreSQL version: 9.6beta2
Operating system: any
Description:

[My analysis of a bug reported on IRC; please CC original reporter: md at
chewy dot com]

Reported on pg 9.4.6 but also reproduced on 9.6beta2

When creating a physical replication slot, the catalog_xmin field of the new
slot is not initialized. If the slot storage had previously been used for a
logical slot, the old catalog_xmin will remain in place and interfere with
vacuum.

Trivially reproducible:

select pg_create_logical_replication_slot('test','test_decoding');
select pg_drop_replication_slot('test');
select pg_create_physical_replication_slot('test');
select * from pg_replication_slots;
slot_name | plugin | slot_type | datoid | database | active | active_pid |
xmin | catalog_xmin | restart_lsn | confirmed_flush_lsn
-----------+--------+-----------+--------+----------+--------+------------+------+--------------+-------------+---------------------
test | | physical | | | f | |
| 546 | | 0/1525438
(1 row)

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Alvaro Herrera 2016-07-05 22:00:31 Re: BUG #13681: Serialization failures caused by new multixact code of 9.3 (back-patch request)
Previous Message Tom Lane 2016-07-05 15:33:09 Re: Too slow "Analyze" for the table with data in Thai language