mirror of
https://github.com/postgres/postgres.git
synced 2025-09-02 04:21:28 +03:00
Introduce macros determining if a replication slot is physical or logical.
These make the code a bit easier to read, and make it easier to add a more explicit notion of a slot's type at some point in the future. Author: Gurjeet Singh Discussion: CABwTF4Wh_dBCzTU=49pFXR6coR4NW1ynb+vBqT+Po=7fuq5iCw@mail.gmail.com
This commit is contained in:
@@ -125,6 +125,9 @@ typedef struct ReplicationSlot
|
||||
XLogRecPtr candidate_restart_lsn;
|
||||
} ReplicationSlot;
|
||||
|
||||
#define SlotIsPhysical(slot) (slot->data.database == InvalidOid)
|
||||
#define SlotIsLogical(slot) (slot->data.database != InvalidOid)
|
||||
|
||||
/*
|
||||
* Shared memory control area for all of replication slots.
|
||||
*/
|
||||
|
Reference in New Issue
Block a user