pg_replication_slot_advance to return NULL instead of 0/0 if slot not advanced
Michael Paquier <michael@paquier.xyz>
From: Michael Paquier <michael@paquier.xyz>
To: Postgres hackers <pgsql-hackers@postgresql.org>
Date: 2018-05-25T05:28:05Z
Lists: pgsql-hackers
Attachments
- slot-advance-null.patch (text/x-diff) patch
Hi all,
When attempting to use multiple times pg_replication_slot_advance on a
slot, then the caller gets back directly InvalidXLogRecPtr as result,
for example:
=# select * from pg_replication_slot_advance('popo', 'FF/0');
slot_name | end_lsn
-----------+-----------
popo | 0/60021E0
(1 row)
=# select * from pg_replication_slot_advance('popo', 'FF/0');
slot_name | end_lsn
-----------+---------
popo | 0/0
(1 row)
Wouldn't it be more simple to return NULL to mean that the slot could
not be moved forward? That would be easier to parse for clients.
Please see the attached.
Thanks,
--
Michael
Commits
-
Fix a couple of bugs with replication slot advancing feature
- f731cfa94c00 11.0 landed
-
Fix and document lock handling for in-memory replication slot data
- 9e149c847f39 11.0 landed