Replace replication slot's invalidated_at LSN with an enum
Andres Freund <andres@anarazel.de>
Replace replication slot's invalidated_at LSN with an enum This is mainly useful because the upcoming logical-decoding-on-standby feature adds further reasons for invalidating slots, and we don't want to end up with multiple invalidated_* fields, or check different attributes. Eventually we should consider not resetting restart_lsn when invalidating a slot due to max_slot_wal_keep_size. But that's a user visible change, so left for later. Increases SLOT_VERSION, due to the changed field (with a different alignment, no less). Reviewed-by: "Drouvot, Bertrand" <bertranddrouvot.pg@gmail.com> Reviewed-by: Alvaro Herrera <alvherre@alvh.no-ip.org> Reviewed-by: Melanie Plageman <melanieplageman@gmail.com> Discussion: https://postgr.es/m/20230407075009.igg7be27ha2htkbt@awork3.anarazel.de
Files
| Path | Change | +/− |
|---|---|---|
| src/backend/replication/slot.c | modified | +24 −4 |
| src/backend/replication/slotfuncs.c | modified | +3 −5 |
| src/include/replication/slot.h | modified | +13 −2 |
| src/tools/pgindent/typedefs.list | modified | +1 −0 |
Discussion
- Minimal logical decoding on standbys 360 messages · 2018-12-12 → 2023-04-12