PostgreSQL Source Code
git master
|
#include "access/xlogdefs.h"
#include "catalog/genbki.h"
#include "catalog/pg_subscription_d.h"
#include "nodes/pg_list.h"
Go to the source code of this file.
Data Structures | |
struct | Subscription |
Macros | |
#define | LOGICALREP_TWOPHASE_STATE_DISABLED 'd' |
#define | LOGICALREP_TWOPHASE_STATE_PENDING 'p' |
#define | LOGICALREP_TWOPHASE_STATE_ENABLED 'e' |
#define | LOGICALREP_ORIGIN_NONE "none" |
#define | LOGICALREP_ORIGIN_ANY "any" |
#define | LOGICALREP_STREAM_OFF 'f' |
#define | LOGICALREP_STREAM_ON 't' |
#define | LOGICALREP_STREAM_PARALLEL 'p' |
Typedefs | |
typedef FormData_pg_subscription * | Form_pg_subscription |
typedef struct Subscription | Subscription |
Functions | |
CATALOG (pg_subscription, 6100, SubscriptionRelationId) BKI_SHARED_RELATION BKI_ROWTYPE_OID(6101 | |
Oid subdbid | BKI_LOOKUP (pg_database) |
Oid subowner | BKI_LOOKUP (pg_authid) |
DECLARE_TOAST_WITH_MACRO (pg_subscription, 4183, 4184, PgSubscriptionToastTable, PgSubscriptionToastIndex) | |
DECLARE_UNIQUE_INDEX_PKEY (pg_subscription_oid_index, 6114, SubscriptionObjectIndexId, on pg_subscription using btree(oid oid_ops)) | |
DECLARE_UNIQUE_INDEX (pg_subscription_subname_index, 6115, SubscriptionNameIndexId, on pg_subscription using btree(subdbid oid_ops, subname name_ops)) | |
Subscription * | GetSubscription (Oid subid, bool missing_ok) |
void | FreeSubscription (Subscription *sub) |
void | DisableSubscription (Oid subid) |
int | CountDBSubscriptions (Oid dbid) |
Variables | |
SubscriptionRelation_Rowtype_Id | BKI_SCHEMA_MACRO |
XLogRecPtr | subskiplsn |
NameData | subname |
bool | subenabled |
bool | subbinary |
char | substream |
char | subtwophasestate |
bool | subdisableonerr |
bool | subpasswordrequired |
bool | subrunasowner |
FormData_pg_subscription | |
#define LOGICALREP_ORIGIN_ANY "any" |
Definition at line 44 of file pg_subscription.h.
#define LOGICALREP_ORIGIN_NONE "none" |
Definition at line 38 of file pg_subscription.h.
#define LOGICALREP_STREAM_OFF 'f' |
Definition at line 150 of file pg_subscription.h.
#define LOGICALREP_STREAM_ON 't' |
Definition at line 156 of file pg_subscription.h.
#define LOGICALREP_STREAM_PARALLEL 'p' |
Definition at line 162 of file pg_subscription.h.
#define LOGICALREP_TWOPHASE_STATE_DISABLED 'd' |
Definition at line 30 of file pg_subscription.h.
#define LOGICALREP_TWOPHASE_STATE_ENABLED 'e' |
Definition at line 32 of file pg_subscription.h.
#define LOGICALREP_TWOPHASE_STATE_PENDING 'p' |
Definition at line 31 of file pg_subscription.h.
Definition at line 114 of file pg_subscription.h.
typedef struct Subscription Subscription |
Oid subowner BKI_LOOKUP | ( | pg_authid | ) |
Oid subdbid BKI_LOOKUP | ( | pg_database | ) |
CATALOG | ( | pg_subscription | , |
6100 | , | ||
SubscriptionRelationId | |||
) |
int CountDBSubscriptions | ( | Oid | dbid | ) |
Definition at line 121 of file pg_subscription.c.
References BTEqualStrategyNumber, HeapTupleIsValid, InvalidOid, NoLock, ObjectIdGetDatum(), RowExclusiveLock, ScanKeyInit(), systable_beginscan(), systable_endscan(), systable_getnext(), table_close(), and table_open().
Referenced by dropdb().
DECLARE_TOAST_WITH_MACRO | ( | pg_subscription | , |
4183 | , | ||
4184 | , | ||
PgSubscriptionToastTable | , | ||
PgSubscriptionToastIndex | |||
) |
DECLARE_UNIQUE_INDEX | ( | pg_subscription_subname_index | , |
6115 | , | ||
SubscriptionNameIndexId | , | ||
on pg_subscription using | btreesubdbid oid_ops, subname name_ops | ||
) |
DECLARE_UNIQUE_INDEX_PKEY | ( | pg_subscription_oid_index | , |
6114 | , | ||
SubscriptionObjectIndexId | , | ||
on pg_subscription using | btreeoid oid_ops | ||
) |
void DisableSubscription | ( | Oid | subid | ) |
Definition at line 167 of file pg_subscription.c.
References AccessShareLock, BoolGetDatum(), CatalogTupleUpdate(), elog(), ERROR, heap_freetuple(), heap_modify_tuple(), HeapTupleIsValid, LockSharedObject(), NoLock, ObjectIdGetDatum(), RelationGetDescr, RowExclusiveLock, SearchSysCacheCopy1, SUBSCRIPTIONOID, HeapTupleData::t_self, table_close(), table_open(), and values.
Referenced by DisableSubscriptionAndExit().
void FreeSubscription | ( | Subscription * | sub | ) |
Definition at line 153 of file pg_subscription.c.
References Subscription::conninfo, list_free_deep(), Subscription::name, pfree(), Subscription::publications, and Subscription::slotname.
Referenced by maybe_reread_subscription().
Subscription* GetSubscription | ( | Oid | subid, |
bool | missing_ok | ||
) |
Definition at line 43 of file pg_subscription.c.
References Subscription::binary, Subscription::conninfo, DatumGetArrayTypeP, DatumGetName(), Subscription::dbid, Subscription::disableonerr, elog(), Subscription::enabled, ERROR, GETSTRUCT, HeapTupleIsValid, Subscription::name, NameStr, ObjectIdGetDatum(), Subscription::oid, Subscription::origin, Subscription::owner, palloc(), Subscription::passwordrequired, pstrdup(), Subscription::publications, ReleaseSysCache(), Subscription::runasowner, SearchSysCache1(), Subscription::skiplsn, Subscription::slotname, Subscription::stream, SUBSCRIPTIONOID, Subscription::synccommit, SysCacheGetAttr(), SysCacheGetAttrNotNull(), textarray_to_stringlist(), TextDatumGetCString, and Subscription::twophasestate.
Referenced by AlterSubscription(), InitializeApplyWorker(), and maybe_reread_subscription().
SubscriptionRelation_Rowtype_Id BKI_SCHEMA_MACRO |
Definition at line 63 of file pg_subscription.h.
FormData_pg_subscription |
Definition at line 112 of file pg_subscription.h.
bool subbinary |
Definition at line 80 of file pg_subscription.h.
bool subdisableonerr |
Definition at line 88 of file pg_subscription.h.
bool subenabled |
Definition at line 77 of file pg_subscription.h.
NameData subname |
Definition at line 73 of file pg_subscription.h.
Referenced by AddAcl(), buildACLCommands(), check_publications_origin(), DropSubscription(), dumpACL(), get_subscription_name(), get_subscription_oid(), getObjectDescription(), getObjectIdentityParts(), logicalrep_worker_launch(), merge_publications(), parseAclItem(), and plperl_create_sub().
bool subpasswordrequired |
Definition at line 91 of file pg_subscription.h.
bool subrunasowner |
Definition at line 93 of file pg_subscription.h.
XLogRecPtr subskiplsn |
Definition at line 70 of file pg_subscription.h.
char substream |
Definition at line 83 of file pg_subscription.h.
char subtwophasestate |
Definition at line 86 of file pg_subscription.h.