33 #define CHECK_IS_BINARY_UPGRADE \
35 if (!IsBinaryUpgrade) \
37 (errcode(ERRCODE_CANT_CHANGE_RUNTIME_PARAM), \
38 errmsg("function can only be called when server is in binary upgrade mode"))); \
192 List *requiredExtensions;
201 elog(
ERROR,
"null argument to binary_upgrade_create_empty_extension is not allowed");
218 requiredExtensions =
NIL;
227 for (
i = 0;
i < ndatums;
i++)
232 requiredExtensions =
lappend_oid(requiredExtensions, extOid);
288 bool found_pending_wal;
338 elog(
ERROR,
"null argument to binary_upgrade_add_sub_rel_state is not allowed");
384 elog(
ERROR,
"null argument to binary_upgrade_replorigin_advance is not allowed");
bool binary_upgrade_record_init_privs
#define PG_GETARG_ARRAYTYPE_P(n)
void deconstruct_array_builtin(ArrayType *array, Oid elmtype, Datum **elemsp, bool **nullsp, int *nelemsp)
Oid binary_upgrade_next_pg_tablespace_oid
void ReplicationOriginNameForLogicalRep(Oid suboid, Oid relid, char *originname, Size szoriginname)
#define TextDatumGetCString(d)
#define Assert(condition)
ObjectAddress InsertExtensionTuple(const char *extName, Oid extOwner, Oid schemaOid, bool relocatable, const char *extVersion, Datum extConfig, Datum extCondition, List *requiredExtensions)
Oid get_extension_oid(const char *extname, bool missing_ok)
#define PG_GETARG_TEXT_PP(n)
#define PG_GETARG_CHAR(n)
#define PG_GETARG_DATUM(n)
#define PG_GETARG_NAME(n)
#define PG_GETARG_BOOL(n)
#define PG_RETURN_BOOL(x)
#define PG_GETARG_TEXT_P(n)
void SetAttrMissing(Oid relid, char *attname, char *value)
RelFileNumber binary_upgrade_next_heap_pg_class_relfilenumber
RelFileNumber binary_upgrade_next_toast_pg_class_relfilenumber
Oid binary_upgrade_next_toast_pg_class_oid
Oid binary_upgrade_next_heap_pg_class_oid
RelFileNumber binary_upgrade_next_index_pg_class_relfilenumber
Oid binary_upgrade_next_index_pg_class_oid
List * lappend_oid(List *list, Oid datum)
void UnlockRelationOid(Oid relid, LOCKMODE lockmode)
void LockRelationOid(Oid relid, LOCKMODE lockmode)
bool LogicalReplicationSlotHasPendingWal(XLogRecPtr end_of_wal)
Oid get_subscription_oid(const char *subname, bool missing_ok)
bool has_rolreplication(Oid roleid)
Oid get_namespace_oid(const char *nspname, bool missing_ok)
RepOriginId replorigin_by_name(const char *roname, bool missing_ok)
void replorigin_advance(RepOriginId node, XLogRecPtr remote_commit, XLogRecPtr local_commit, bool go_backward, bool wal_log)
Oid binary_upgrade_next_pg_enum_oid
void AddSubscriptionRelState(Oid subid, Oid relid, char state, XLogRecPtr sublsn, bool retain_lock)
Oid binary_upgrade_next_pg_type_oid
Datum binary_upgrade_set_next_heap_pg_class_oid(PG_FUNCTION_ARGS)
Datum binary_upgrade_set_next_multirange_pg_type_oid(PG_FUNCTION_ARGS)
Datum binary_upgrade_set_next_pg_enum_oid(PG_FUNCTION_ARGS)
Datum binary_upgrade_set_next_index_pg_class_oid(PG_FUNCTION_ARGS)
Datum binary_upgrade_set_next_array_pg_type_oid(PG_FUNCTION_ARGS)
Datum binary_upgrade_set_next_toast_relfilenode(PG_FUNCTION_ARGS)
Datum binary_upgrade_set_next_pg_authid_oid(PG_FUNCTION_ARGS)
Datum binary_upgrade_set_record_init_privs(PG_FUNCTION_ARGS)
#define CHECK_IS_BINARY_UPGRADE
Datum binary_upgrade_add_sub_rel_state(PG_FUNCTION_ARGS)
Datum binary_upgrade_set_next_multirange_array_pg_type_oid(PG_FUNCTION_ARGS)
Datum binary_upgrade_logical_slot_has_caught_up(PG_FUNCTION_ARGS)
Datum binary_upgrade_set_next_pg_tablespace_oid(PG_FUNCTION_ARGS)
Datum binary_upgrade_set_next_heap_relfilenode(PG_FUNCTION_ARGS)
Datum binary_upgrade_set_next_index_relfilenode(PG_FUNCTION_ARGS)
Datum binary_upgrade_set_missing_value(PG_FUNCTION_ARGS)
Datum binary_upgrade_create_empty_extension(PG_FUNCTION_ARGS)
Datum binary_upgrade_set_next_pg_type_oid(PG_FUNCTION_ARGS)
Datum binary_upgrade_replorigin_advance(PG_FUNCTION_ARGS)
Datum binary_upgrade_set_next_toast_pg_class_oid(PG_FUNCTION_ARGS)
static Datum PointerGetDatum(const void *X)
void ReplicationSlotAcquire(const char *name, bool nowait)
ReplicationSlot * MyReplicationSlot
void ReplicationSlotRelease(void)
#define SlotIsLogical(slot)
void relation_close(Relation relation, LOCKMODE lockmode)
Relation relation_open(Oid relationId, LOCKMODE lockmode)
ReplicationSlotInvalidationCause invalidated
ReplicationSlotPersistentData data
void table_close(Relation relation, LOCKMODE lockmode)
Relation table_open(Oid relationId, LOCKMODE lockmode)
Oid binary_upgrade_next_mrng_array_pg_type_oid
Oid binary_upgrade_next_mrng_pg_type_oid
Oid binary_upgrade_next_array_pg_type_oid
Oid binary_upgrade_next_pg_authid_oid
char * text_to_cstring(const text *t)
XLogRecPtr GetFlushRecPtr(TimeLineID *insertTLI)
#define InvalidXLogRecPtr