PostgreSQL Source Code
git master
|
#include "access/xlogdefs.h"
#include "catalog/genbki.h"
#include "catalog/pg_subscription_rel_d.h"
#include "nodes/pg_list.h"
Go to the source code of this file.
Data Structures | |
struct | SubscriptionRelState |
Typedefs | |
typedef FormData_pg_subscription_rel * | Form_pg_subscription_rel |
typedef struct SubscriptionRelState | SubscriptionRelState |
Functions | |
CATALOG (pg_subscription_rel, 6102, SubscriptionRelRelationId) | |
DECLARE_UNIQUE_INDEX_PKEY (pg_subscription_rel_srrelid_srsubid_index, 6117, SubscriptionRelSrrelidSrsubidIndexId, pg_subscription_rel, btree(srrelid oid_ops, srsubid oid_ops)) | |
MAKE_SYSCACHE (SUBSCRIPTIONRELMAP, pg_subscription_rel_srrelid_srsubid_index, 64) | |
void | AddSubscriptionRelState (Oid subid, Oid relid, char state, XLogRecPtr sublsn, bool retain_lock) |
void | UpdateSubscriptionRelState (Oid subid, Oid relid, char state, XLogRecPtr sublsn) |
char | GetSubscriptionRelState (Oid subid, Oid relid, XLogRecPtr *sublsn) |
void | RemoveSubscriptionRel (Oid subid, Oid relid) |
bool | HasSubscriptionRelations (Oid subid) |
List * | GetSubscriptionRelations (Oid subid, bool not_ready) |
Variables | |
FormData_pg_subscription_rel | |
Definition at line 50 of file pg_subscription_rel.h.
typedef struct SubscriptionRelState SubscriptionRelState |
void AddSubscriptionRelState | ( | Oid | subid, |
Oid | relid, | ||
char | state, | ||
XLogRecPtr | sublsn, | ||
bool | retain_lock | ||
) |
Definition at line 267 of file pg_subscription.c.
References AccessShareLock, CatalogTupleInsert(), CharGetDatum(), elog, ERROR, heap_form_tuple(), heap_freetuple(), HeapTupleIsValid, InvalidXLogRecPtr, LockSharedObject(), LSNGetDatum(), NoLock, ObjectIdGetDatum(), RelationGetDescr, RowExclusiveLock, SearchSysCacheCopy2, table_close(), table_open(), UnlockSharedObject(), and values.
Referenced by AlterSubscription_refresh(), binary_upgrade_add_sub_rel_state(), and CreateSubscription().
CATALOG | ( | pg_subscription_rel | , |
6102 | , | ||
SubscriptionRelRelationId | |||
) |
DECLARE_UNIQUE_INDEX_PKEY | ( | pg_subscription_rel_srrelid_srsubid_index | , |
6117 | , | ||
SubscriptionRelSrrelidSrsubidIndexId | , | ||
pg_subscription_rel | , | ||
btree(srrelid oid_ops, srsubid oid_ops) | |||
) |
Definition at line 532 of file pg_subscription.c.
References AccessShareLock, BTEqualStrategyNumber, CharGetDatum(), DatumGetLSN(), GETSTRUCT, HeapTupleIsValid, InvalidOid, InvalidXLogRecPtr, lappend(), SubscriptionRelState::lsn, NIL, ObjectIdGetDatum(), palloc(), SubscriptionRelState::relid, res, ScanKeyInit(), SubscriptionRelState::state, SysCacheGetAttr(), systable_beginscan(), systable_endscan(), systable_getnext(), table_close(), and table_open().
Referenced by AlterSubscription_refresh(), DropSubscription(), and FetchTableStates().
char GetSubscriptionRelState | ( | Oid | subid, |
Oid | relid, | ||
XLogRecPtr * | sublsn | ||
) |
Definition at line 372 of file pg_subscription.c.
References AccessShareLock, DatumGetLSN(), GETSTRUCT, HeapTupleIsValid, InvalidXLogRecPtr, ObjectIdGetDatum(), ReleaseSysCache(), SearchSysCache2(), SysCacheGetAttr(), table_close(), and table_open().
Referenced by AlterSubscription_refresh(), logicalrep_rel_open(), LogicalRepSyncTableStart(), and wait_for_relation_state_change().
Definition at line 497 of file pg_subscription.c.
References AccessShareLock, BTEqualStrategyNumber, HeapTupleIsValid, InvalidOid, ObjectIdGetDatum(), ScanKeyInit(), systable_beginscan(), systable_endscan(), systable_getnext(), table_close(), and table_open().
Referenced by FetchTableStates().
MAKE_SYSCACHE | ( | SUBSCRIPTIONRELMAP | , |
pg_subscription_rel_srrelid_srsubid_index | , | ||
64 | |||
) |
Definition at line 422 of file pg_subscription.c.
References BTEqualStrategyNumber, CatalogTupleDelete(), ereport, errcode(), errdetail(), errhint(), errmsg(), ERROR, ForwardScanDirection, get_rel_name(), get_subscription_name(), GETSTRUCT, heap_getnext(), HeapTupleIsValid, ObjectIdGetDatum(), OidIsValid, RowExclusiveLock, ScanKeyInit(), HeapTupleData::t_self, table_beginscan_catalog(), table_close(), table_endscan(), and table_open().
Referenced by AlterSubscription_refresh(), DropSubscription(), and heap_drop_with_catalog().
void UpdateSubscriptionRelState | ( | Oid | subid, |
Oid | relid, | ||
char | state, | ||
XLogRecPtr | sublsn | ||
) |
Definition at line 321 of file pg_subscription.c.
References AccessShareLock, CatalogTupleUpdate(), CharGetDatum(), elog, ERROR, heap_modify_tuple(), HeapTupleIsValid, InvalidXLogRecPtr, LockSharedObject(), LSNGetDatum(), NoLock, ObjectIdGetDatum(), RelationGetDescr, RowExclusiveLock, SearchSysCacheCopy2, HeapTupleData::t_self, table_close(), table_open(), and values.
Referenced by LogicalRepSyncTableStart(), process_syncing_tables_for_apply(), and process_syncing_tables_for_sync().
FormData_pg_subscription_rel |
Definition at line 48 of file pg_subscription_rel.h.