PostgreSQL Source Code
git master
|
#include "access/xlogdefs.h"
#include "catalog/genbki.h"
#include "catalog/pg_subscription_d.h"
#include "lib/stringinfo.h"
#include "nodes/pg_list.h"
Go to the source code of this file.
Data Structures | |
struct | Subscription |
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, pg_subscription, btree(oid oid_ops)) | |
DECLARE_UNIQUE_INDEX (pg_subscription_subname_index, 6115, SubscriptionNameIndexId, pg_subscription, btree(subdbid oid_ops, subname name_ops)) | |
MAKE_SYSCACHE (SUBSCRIPTIONOID, pg_subscription_oid_index, 4) | |
MAKE_SYSCACHE (SUBSCRIPTIONNAME, pg_subscription_subname_index, 4) | |
Subscription * | GetSubscription (Oid subid, bool missing_ok) |
void | FreeSubscription (Subscription *sub) |
void | DisableSubscription (Oid subid) |
int | CountDBSubscriptions (Oid dbid) |
void | GetPublicationsStr (List *publications, StringInfo dest, bool quote_literal) |
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 |
bool | subfailover |
FormData_pg_subscription | |
Definition at line 99 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 154 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 | , | ||
pg_subscription | , | ||
btree(subdbid oid_ops, subname name_ops) | |||
) |
DECLARE_UNIQUE_INDEX_PKEY | ( | pg_subscription_oid_index | , |
6114 | , | ||
SubscriptionObjectIndexId | , | ||
pg_subscription | , | ||
btree(oid oid_ops) | |||
) |
void DisableSubscription | ( | Oid | subid | ) |
Definition at line 200 of file pg_subscription.c.
References AccessShareLock, BoolGetDatum(), CatalogTupleUpdate(), elog, ERROR, heap_freetuple(), heap_modify_tuple(), HeapTupleIsValid, LockSharedObject(), NoLock, ObjectIdGetDatum(), RelationGetDescr, RowExclusiveLock, SearchSysCacheCopy1, HeapTupleData::t_self, table_close(), table_open(), and values.
Referenced by DisableSubscriptionAndExit().
void FreeSubscription | ( | Subscription * | sub | ) |
Definition at line 186 of file pg_subscription.c.
References Subscription::conninfo, list_free_deep(), Subscription::name, pfree(), Subscription::publications, and Subscription::slotname.
Referenced by maybe_reread_subscription().
void GetPublicationsStr | ( | List * | publications, |
StringInfo | dest, | ||
bool | quote_literal | ||
) |
Definition at line 41 of file pg_subscription.c.
References appendStringInfoChar(), appendStringInfoString(), Assert, generate_unaccent_rules::dest, lfirst, NIL, quote_literal(), quote_literal_cstr(), and strVal.
Referenced by check_publications(), check_publications_origin(), fetch_remote_table_info(), and fetch_table_list().
Subscription* GetSubscription | ( | Oid | subid, |
bool | missing_ok | ||
) |
Definition at line 72 of file pg_subscription.c.
References Subscription::binary, Subscription::conninfo, DatumGetArrayTypeP, DatumGetName(), Subscription::dbid, Subscription::disableonerr, elog, Subscription::enabled, ERROR, Subscription::failover, GETSTRUCT, HeapTupleIsValid, Subscription::name, NameStr, ObjectIdGetDatum(), Subscription::oid, Subscription::origin, Subscription::owner, Subscription::ownersuperuser, palloc(), Subscription::passwordrequired, pstrdup(), Subscription::publications, ReleaseSysCache(), Subscription::runasowner, SearchSysCache1(), Subscription::skiplsn, Subscription::slotname, Subscription::stream, superuser_arg(), Subscription::synccommit, SysCacheGetAttr(), SysCacheGetAttrNotNull(), textarray_to_stringlist(), TextDatumGetCString, and Subscription::twophasestate.
Referenced by AlterSubscription(), InitializeLogRepWorker(), and maybe_reread_subscription().
MAKE_SYSCACHE | ( | SUBSCRIPTIONNAME | , |
pg_subscription_subname_index | , | ||
4 | |||
) |
MAKE_SYSCACHE | ( | SUBSCRIPTIONOID | , |
pg_subscription_oid_index | , | ||
4 | |||
) |
SubscriptionRelation_Rowtype_Id BKI_SCHEMA_MACRO |
Definition at line 43 of file pg_subscription.h.
FormData_pg_subscription |
Definition at line 97 of file pg_subscription.h.
bool subbinary |
Definition at line 60 of file pg_subscription.h.
bool subdisableonerr |
Definition at line 68 of file pg_subscription.h.
bool subenabled |
Definition at line 57 of file pg_subscription.h.
bool subfailover |
Definition at line 76 of file pg_subscription.h.
NameData subname |
Definition at line 53 of file pg_subscription.h.
Referenced by AddAcl(), binary_upgrade_add_sub_rel_state(), binary_upgrade_replorigin_advance(), buildACLCommands(), check_publications_origin(), drop_existing_subscriptions(), DropSubscription(), dumpACL(), enable_subscription(), get_subscription_name(), get_subscription_oid(), getObjectDescription(), getObjectIdentityParts(), logicalrep_worker_launch(), merge_publications(), parseAclItem(), plperl_create_sub(), set_replication_progress(), setup_publisher(), and store_pub_sub_info().
bool subpasswordrequired |
Definition at line 71 of file pg_subscription.h.
bool subrunasowner |
Definition at line 73 of file pg_subscription.h.
XLogRecPtr subskiplsn |
Definition at line 50 of file pg_subscription.h.
char substream |
Definition at line 63 of file pg_subscription.h.
char subtwophasestate |
Definition at line 66 of file pg_subscription.h.