diff options
| author | Andres Freund <andres@anarazel.de> | 2015-08-11 12:32:48 +0200 |
|---|---|---|
| committer | Andres Freund <andres@anarazel.de> | 2015-08-11 12:32:48 +0200 |
| commit | 093d0c83c1d210167d122da92459a0677e04ffc9 (patch) | |
| tree | 11784342960a18a5c75bad85a864adca143513e8 /src/include | |
| parent | 3b425b7c02ccdabe3fb3a538d9174273a15f1e2e (diff) | |
| download | postgresql-093d0c83c1d210167d122da92459a0677e04ffc9.tar.gz | |
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
Diffstat (limited to 'src/include')
| -rw-r--r-- | src/include/replication/slot.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/include/replication/slot.h b/src/include/replication/slot.h index 78cff07abf..367ef0a38d 100644 --- a/src/include/replication/slot.h +++ b/src/include/replication/slot.h @@ -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. */ |
