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, on pg_subscription_rel using btree(srrelid oid_ops, srsubid oid_ops)) | |
void | AddSubscriptionRelState (Oid subid, Oid relid, char state, XLogRecPtr sublsn) |
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) |
List * | GetSubscriptionNotReadyRelations (Oid subid) |
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 | ||
) |
Definition at line 280 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, SUBSCRIPTIONRELMAP, table_close(), table_open(), and values.
Referenced by AlterSubscription_refresh(), and CreateSubscription().
CATALOG | ( | pg_subscription_rel | , |
6102 | , | ||
SubscriptionRelRelationId | |||
) |
DECLARE_UNIQUE_INDEX_PKEY | ( | pg_subscription_rel_srrelid_srsubid_index | , |
6117 | , | ||
SubscriptionRelSrrelidSrsubidIndexId | , | ||
on pg_subscription_rel using | btreesrrelid oid_ops, srsubid oid_ops | ||
) |
Definition at line 588 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, SUBSCRIPTIONRELMAP, SysCacheGetAttr(), systable_beginscan(), systable_endscan(), systable_getnext(), table_close(), and table_open().
Referenced by DropSubscription(), and FetchTableStates().
Definition at line 535 of file pg_subscription.c.
References AccessShareLock, BTEqualStrategyNumber, DatumGetLSN, GETSTRUCT, HeapTupleIsValid, InvalidOid, InvalidXLogRecPtr, lappend(), SubscriptionRelState::lsn, NIL, ObjectIdGetDatum, palloc(), SubscriptionRelState::relid, res, ScanKeyInit(), SubscriptionRelState::state, SUBSCRIPTIONRELMAP, SysCacheGetAttr(), systable_beginscan(), systable_endscan(), systable_getnext(), table_close(), and table_open().
Referenced by AlterSubscription_refresh().
char GetSubscriptionRelState | ( | Oid | subid, |
Oid | relid, | ||
XLogRecPtr * | sublsn | ||
) |
Definition at line 377 of file pg_subscription.c.
References AccessShareLock, DatumGetLSN, GETSTRUCT, HeapTupleIsValid, InvalidXLogRecPtr, ObjectIdGetDatum, ReleaseSysCache(), SearchSysCache2(), SUBSCRIPTIONRELMAP, SysCacheGetAttr(), table_close(), and table_open().
Referenced by AlterSubscription_refresh(), logicalrep_rel_open(), LogicalRepSyncTableStart(), and wait_for_relation_state_change().
Definition at line 502 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().
Definition at line 427 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 326 of file pg_subscription.c.
References AccessShareLock, CatalogTupleUpdate(), CharGetDatum, elog, ERROR, heap_modify_tuple(), HeapTupleIsValid, InvalidXLogRecPtr, LockSharedObject(), LSNGetDatum, NoLock, ObjectIdGetDatum, RelationGetDescr, RowExclusiveLock, SearchSysCacheCopy2, SUBSCRIPTIONRELMAP, 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.