66#include "utils/fmgroids.h"
276 rlocator.
dbOid = dbid;
295 for (blkno = 0; blkno < nblocks; blkno++)
430 elog(
ERROR,
"relation with OID %u does not have a valid relfilenumber",
440 relinfo->rlocator.dbOid = dbid;
441 relinfo->rlocator.relNumber = relfilenumber;
479 errmsg(
"could not create directory \"%s\": %m",
dbpath)));
531 xlrec.tablespace_id = tsid;
626 xlrec.src_db_id = src_dboid;
780 else if (
strcmp(
defel->defname,
"builtin_locale") == 0)
786 else if (
strcmp(
defel->defname,
"lc_collate") == 0)
798 else if (
strcmp(
defel->defname,
"icu_locale") == 0)
810 else if (
strcmp(
defel->defname,
"locale_provider") == 0)
816 else if (
strcmp(
defel->defname,
"is_template") == 0)
822 else if (
strcmp(
defel->defname,
"allow_connections") == 0)
828 else if (
strcmp(
defel->defname,
"connection_limit") == 0)
834 else if (
strcmp(
defel->defname,
"collation_version") == 0)
844 errmsg(
"LOCATION is not supported anymore"),
845 errhint(
"Consider using tablespaces instead."),
881 errmsg(
"option \"%s\" not recognized",
defel->defname),
901 errmsg(
"%d is not a valid encoding code",
912 errmsg(
"%s is not a valid encoding name",
946 errmsg(
"unrecognized locale provider: %s",
980 errmsg(
"permission denied to create database")));
1004 errmsg(
"template database \"%s\" does not exist",
1015 errhint(
"Use DROP DATABASE to drop invalid databases."));
1026 errmsg(
"permission denied to copy database \"%s\"",
1043 errmsg(
"invalid create database strategy \"%s\"", strategy),
1044 errhint(
"Valid strategies are \"wal_log\" and \"file_copy\".")));
1074 errhint(
"If the locale name is specific to the builtin provider, use BUILTIN_LOCALE.")));
1079 errhint(
"If the locale name is specific to the ICU provider, use ICU_LOCALE.")));
1092 errhint(
"If the locale name is specific to the builtin provider, use BUILTIN_LOCALE.")));
1097 errhint(
"If the locale name is specific to the ICU provider, use ICU_LOCALE.")));
1114 errmsg(
"BUILTIN_LOCALE cannot be specified unless locale provider is builtin")));
1122 errmsg(
"ICU locale cannot be specified unless locale provider is ICU")));
1127 errmsg(
"ICU rules cannot be specified unless locale provider is ICU")));
1140 errmsg(
"LOCALE or BUILTIN_LOCALE must be specified")));
1149 errmsg(
"encoding \"%s\" is not supported with ICU provider",
1159 errmsg(
"LOCALE or ICU_LOCALE must be specified")));
1174 (
errmsg(
"using standard form \"%s\" for ICU locale \"%s\"",
1203 errmsg(
"new encoding (%s) is incompatible with the encoding of the template database (%s)",
1206 errhint(
"Use the same encoding as in the template database, or use template0 as template.")));
1211 errmsg(
"new collation (%s) is incompatible with the collation of the template database (%s)",
1213 errhint(
"Use the same collation as in the template database, or use template0 as template.")));
1218 errmsg(
"new LC_CTYPE (%s) is incompatible with the LC_CTYPE of the template database (%s)",
1220 errhint(
"Use the same LC_CTYPE as in the template database, or use template0 as template.")));
1225 errmsg(
"new locale provider (%s) does not match locale provider of the template database (%s)",
1227 errhint(
"Use the same locale provider as in the template database, or use template0 as template.")));
1239 errmsg(
"new ICU locale (%s) is incompatible with the ICU locale of the template database (%s)",
1241 errhint(
"Use the same ICU locale as in the template database, or use template0 as template.")));
1252 errmsg(
"new ICU collation rules (%s) are incompatible with the ICU collation rules of the template database (%s)",
1254 errhint(
"Use the same ICU collation rules as in the template database, or use template0 as template.")));
1283 (
errmsg(
"template database \"%s\" has a collation version, but no actual collation version could be determined",
1288 (
errmsg(
"template database \"%s\" has a collation version mismatch",
1290 errdetail(
"The template database was created using collation version %s, "
1291 "but the operating system provides version %s.",
1293 errhint(
"Rebuild all objects in the template database that use the default collation and run "
1294 "ALTER DATABASE %s REFRESH COLLATION VERSION, "
1295 "or build PostgreSQL with the right library version.",
1322 char *tablespacename;
1338 errmsg(
"pg_global cannot be used as default tablespace")));
1364 errmsg(
"cannot assign new default tablespace \"%s\"",
1366 errdetail(
"There is a conflict because database \"%s\" already has some tables in this tablespace.",
1383#ifdef ENFORCE_REGRESSION_TEST_NAME_RESTRICTIONS
1385 elog(
WARNING,
"databases created by regression test cases should have names including \"regression\"");
1410 errmsg(
"source database \"%s\" is being accessed by other users",
1432 errmsg(
"database OID %u is already in use by database \"%s\"",
1438 errmsg(
"data directory with the specified OID %u already exists", dboid));
1534 fparms.src_dboid = src_dboid;
1535 fparms.dest_dboid = dboid;
1611 errmsg(
"encoding \"%s\" does not match locale \"%s\"",
1614 errdetail(
"The chosen LC_CTYPE setting requires encoding \"%s\".",
1626 errmsg(
"encoding \"%s\" does not match locale \"%s\"",
1629 errdetail(
"The chosen LC_COLLATE setting requires encoding \"%s\".",
1699 &
db_istemplate,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL))
1712 (
errmsg(
"database \"%s\" does not exist, skipping",
1736 errmsg(
"cannot drop a template database")));
1742 errmsg(
"cannot drop the currently open database")));
1755 errmsg(
"database \"%s\" is used by an active logical replication slot",
1758 "There are %d active slots.",
1771 errmsg(
"database \"%s\" is being used by logical replication subscription",
1774 "There are %d subscriptions.",
1794 errmsg(
"database \"%s\" is being accessed by other users",
1837 elog(
ERROR,
"cache lookup failed for database %u", db_id);
1920 NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL))
1934 errmsg(
"permission denied to rename database")));
1940#ifdef ENFORCE_REGRESSION_TEST_NAME_RESTRICTIONS
1942 elog(
WARNING,
"databases created by regression test cases should have names including \"regression\"");
1952 errmsg(
"database \"%s\" already exists", newname)));
1963 errmsg(
"current database cannot be renamed")));
1974 errmsg(
"database \"%s\" is being accessed by other users",
1981 elog(
ERROR,
"cache lookup failed for database %u", db_id);
2032 NULL,
NULL,
NULL,
NULL, &
src_tblspcoid,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL))
2059 errmsg(
"cannot change the tablespace of the currently open database")));
2081 errmsg(
"pg_global cannot be used as default tablespace")));
2103 errmsg(
"database \"%s\" is being accessed by other users",
2165 errmsg(
"some relations of database \"%s\" are already in tablespace \"%s\"",
2167 errhint(
"You must move them back to the database's default tablespace before using this command.")));
2177 elog(
ERROR,
"could not remove directory \"%s\": %m",
2187 fparms.dest_dboid = db_id;
2209 xlrec.src_db_id = db_id;
2296 (
errmsg(
"some useless files may be left behind in old database directory \"%s\"",
2306 xlrec.ntablespaces = 1;
2348 foreach(
lc,
stmt->options)
2357 errmsg(
"unrecognized %s option \"%s\"",
2358 "DROP DATABASE", opt->
defname),
2401 else if (
strcmp(
defel->defname,
"allow_connections") == 0)
2407 else if (
strcmp(
defel->defname,
"connection_limit") == 0)
2413 else if (
strcmp(
defel->defname,
"tablespace") == 0)
2422 errmsg(
"option \"%s\" not recognized",
defel->defname),
2436 errmsg(
"option \"%s\" cannot be specified with other options",
2474 errmsg(
"database \"%s\" does not exist",
stmt->dbname)));
2484 errmsg(
"cannot alter invalid database \"%s\"",
stmt->dbname),
2485 errhint(
"Use DROP DATABASE to drop invalid databases."));
2501 errmsg(
"cannot disallow connections for current database")));
2567 errmsg(
"database \"%s\" does not exist",
stmt->dbname)));
2584 elog(
ERROR,
"unexpected null in pg_database");
2590 elog(
ERROR,
"unexpected null in pg_database");
2598 elog(
ERROR,
"invalid collation version change");
2607 (
errmsg(
"changing version from %s to %s",
2620 (
errmsg(
"version has not changed")));
2731 errmsg(
"permission denied to change owner of database")));
2790 errmsg(
"database with OID %u does not exist", dbid)));
2831 bool result =
false;
2982 bool result =
false;
3014 Oid *tablespace_ids;
3040 (
errmsg(
"some useless files may be left behind in old database directory \"%s\"",
3076 pfree(tablespace_ids);
3097 bool result =
false;
3146 errdetail(
"There are %d other session(s) and %d prepared transaction(s) using the database.",
3150 "There are %d other sessions using the database.",
3155 "There are %d prepared transactions using the database.",
3202 errmsg(
"database \"%s\" does not exist",
3233 elog(
ERROR,
"cache lookup failed for database %u", dboid);
3264 if (
stat(path, &st) == 0)
3268 elog(
PANIC,
"requested to created invalid directory: %s", path);
3272 errmsg(
"missing directory \"%s\"", path));
3275 "creating missing directory: %s", path);
3279 errmsg(
"could not create missing directory \"%s\": %m", path));
3316 (
errmsg(
"some useless files may be left behind in old database directory \"%s\"",
3330 errmsg(
"could not stat directory \"%s\": %m",
3423 for (
i = 0;
i <
xlrec->ntablespaces;
i++)
3430 (
errmsg(
"some useless files may be left behind in old database directory \"%s\"",
3448 elog(
PANIC,
"dbase_redo: unknown op code %u", info);
Acl * aclnewowner(const Acl *old_acl, Oid oldOwnerId, Oid newOwnerId)
Oid get_role_oid(const char *rolname, bool missing_ok)
void check_can_set_role(Oid member, Oid role)
void aclcheck_error(AclResult aclerr, ObjectType objtype, const char *objectname)
AclResult object_aclcheck(Oid classid, Oid objectid, Oid roleid, AclMode mode)
bool object_ownercheck(Oid classid, Oid objectid, Oid roleid)
bool directory_is_empty(const char *path)
Oid get_tablespace_oid(const char *tablespacename, bool missing_ok)
bool allow_in_place_tablespaces
static Datum values[MAXATTR]
void DropDatabaseBuffers(Oid dbid)
BlockNumber BufferGetBlockNumber(Buffer buffer)
void CreateAndCopyRelationData(RelFileLocator src_rlocator, RelFileLocator dst_rlocator, bool permanent)
void UnlockReleaseBuffer(Buffer buffer)
Buffer ReadBufferWithoutRelcache(RelFileLocator rlocator, ForkNumber forkNum, BlockNumber blockNum, ReadBufferMode mode, BufferAccessStrategy strategy, bool permanent)
void FlushDatabaseBuffers(Oid dbid)
static Page BufferGetPage(Buffer buffer)
static void LockBuffer(Buffer buffer, BufferLockMode mode)
static bool PageIsEmpty(const PageData *page)
static bool PageIsNew(const PageData *page)
static ItemId PageGetItemId(Page page, OffsetNumber offsetNumber)
static void * PageGetItem(PageData *page, const ItemIdData *itemId)
static OffsetNumber PageGetMaxOffsetNumber(const PageData *page)
#define CStringGetTextDatum(s)
#define TextDatumGetCString(d)
#define Assert(condition)
TransactionId MultiXactId
#define OidIsValid(objectId)
Oid GetNewOidWithIndex(Relation relation, Oid indexId, AttrNumber oidcolumn)
void RequestCheckpoint(int flags)
void copydir(const char *fromdir, const char *todir, bool recurse)
static void remove_dbtablespaces(Oid db_id)
static void CreateDirAndVersionFile(char *dbpath, Oid dbid, Oid tsid, bool isRedo)
ObjectAddress AlterDatabaseRefreshColl(AlterDatabaseRefreshCollStmt *stmt)
bool have_createdb_privilege(void)
ObjectAddress RenameDatabase(const char *oldname, const char *newname)
Oid get_database_oid(const char *dbname, bool missing_ok)
static void movedb_failure_callback(int code, Datum arg)
static void CreateDatabaseUsingWalLog(Oid src_dboid, Oid dst_dboid, Oid src_tsid, Oid dst_tsid)
static List * ScanSourceDatabasePgClass(Oid tbid, Oid dbid, char *srcpath)
static void recovery_create_dbdir(char *path, bool only_tblspc)
ObjectAddress AlterDatabaseOwner(const char *dbname, Oid newOwnerId)
bool database_is_invalid_form(Form_pg_database datform)
Datum pg_database_collation_actual_version(PG_FUNCTION_ARGS)
static void movedb(const char *dbname, const char *tblspcname)
static List * ScanSourceDatabasePgClassPage(Page page, Buffer buf, Oid tbid, Oid dbid, char *srcpath, List *rlocatorlist, Snapshot snapshot)
void check_encoding_locale_matches(int encoding, const char *collate, const char *ctype)
Oid createdb(ParseState *pstate, const CreatedbStmt *stmt)
Oid AlterDatabase(ParseState *pstate, AlterDatabaseStmt *stmt, bool isTopLevel)
static int errdetail_busy_db(int notherbackends, int npreparedxacts)
static CreateDBRelInfo * ScanSourceDatabasePgClassTuple(HeapTupleData *tuple, Oid tbid, Oid dbid, char *srcpath)
static bool check_db_file_conflict(Oid db_id)
void dbase_redo(XLogReaderState *record)
static void CreateDatabaseUsingFileCopy(Oid src_dboid, Oid dst_dboid, Oid src_tsid, Oid dst_tsid)
void DropDatabase(ParseState *pstate, DropdbStmt *stmt)
void dropdb(const char *dbname, bool missing_ok, bool force)
Oid AlterDatabaseSet(AlterDatabaseSetStmt *stmt)
static bool get_db_info(const char *name, LOCKMODE lockmode, Oid *dbIdP, Oid *ownerIdP, int *encodingP, bool *dbIsTemplateP, bool *dbAllowConnP, bool *dbHasLoginEvtP, TransactionId *dbFrozenXidP, MultiXactId *dbMinMultiP, Oid *dbTablespace, char **dbCollate, char **dbCtype, char **dbLocale, char **dbIcurules, char *dbLocProvider, char **dbCollversion)
static void createdb_failure_callback(int code, Datum arg)
bool database_is_invalid_oid(Oid dboid)
#define XLOG_DBASE_CREATE_WAL_LOG
#define MinSizeOfDbaseDropRec
#define XLOG_DBASE_CREATE_FILE_COPY
int32 defGetInt32(DefElem *def)
char * defGetString(DefElem *def)
bool defGetBoolean(DefElem *def)
void errorConflictingDefElem(DefElem *defel, ParseState *pstate)
Oid defGetObjectId(DefElem *def)
int errcode_for_file_access(void)
int errdetail(const char *fmt,...)
int errdetail_plural(const char *fmt_singular, const char *fmt_plural, unsigned long n,...)
int errhint(const char *fmt,...)
int errcode(int sqlerrcode)
int errmsg(const char *fmt,...)
#define ereport(elevel,...)
bool is_encoding_supported_by_icu(int encoding)
int MakePGDirectory(const char *directoryName)
int CloseTransientFile(int fd)
void fsync_fname(const char *fname, bool isdir)
int data_sync_elevel(int elevel)
DIR * AllocateDir(const char *dirname)
struct dirent * ReadDir(DIR *dir, const char *dirname)
int OpenTransientFile(const char *fileName, int fileFlags)
#define palloc_object(type)
static char dstpath[MAXPGPATH]
#define DirectFunctionCall1(func, arg1)
#define PG_RETURN_TEXT_P(x)
BufferAccessStrategy GetAccessStrategy(BufferAccessStrategyType btype)
void systable_endscan(SysScanDesc sysscan)
void systable_inplace_update_begin(Relation relation, Oid indexId, bool indexOK, Snapshot snapshot, int nkeys, const ScanKeyData *key, HeapTuple *oldtupcopy, void **state)
void systable_inplace_update_finish(void *state, HeapTuple tuple)
HeapTuple systable_getnext(SysScanDesc sysscan)
SysScanDesc systable_beginscan(Relation heapRelation, Oid indexId, bool indexOK, Snapshot snapshot, int nkeys, ScanKey key)
bool allowSystemTableMods
HeapTuple heap_getnext(TableScanDesc sscan, ScanDirection direction)
bool HeapTupleSatisfiesVisibility(HeapTuple htup, Snapshot snapshot, Buffer buffer)
HeapTuple heap_modify_tuple(HeapTuple tuple, TupleDesc tupleDesc, const Datum *replValues, const bool *replIsnull, const bool *doReplace)
HeapTuple heap_form_tuple(TupleDesc tupleDescriptor, const Datum *values, const bool *isnull)
void heap_freetuple(HeapTuple htup)
HeapTupleHeaderData * HeapTupleHeader
#define HeapTupleIsValid(tuple)
static Datum heap_getattr(HeapTuple tup, int attnum, TupleDesc tupleDesc, bool *isnull)
static void * GETSTRUCT(const HeapTupleData *tuple)
void CatalogTupleUpdate(Relation heapRel, const ItemPointerData *otid, HeapTuple tup)
void CatalogTupleInsert(Relation heapRel, HeapTuple tup)
void CatalogTupleDelete(Relation heapRel, const ItemPointerData *tid)
#define PG_ENSURE_ERROR_CLEANUP(cleanup_function, arg)
#define PG_END_ENSURE_ERROR_CLEANUP(cleanup_function, arg)
invalidindex index d is invalid
#define ItemIdGetLength(itemId)
#define ItemIdIsNormal(itemId)
#define ItemIdIsDead(itemId)
#define ItemIdIsUsed(itemId)
#define ItemIdIsRedirected(itemId)
static void ItemPointerSet(ItemPointerData *pointer, BlockNumber blockNumber, OffsetNumber offNum)
List * lappend(List *list, void *datum)
List * lappend_oid(List *list, Oid datum)
void list_free(List *list)
void list_free_deep(List *list)
void UnlockTuple(Relation relation, const ItemPointerData *tid, LOCKMODE lockmode)
void LockSharedObject(Oid classid, Oid objid, uint16 objsubid, LOCKMODE lockmode)
void UnlockSharedObjectForSession(Oid classid, Oid objid, uint16 objsubid, LOCKMODE lockmode)
void UnlockRelationId(LockRelId *relid, LOCKMODE lockmode)
void LockTuple(Relation relation, const ItemPointerData *tid, LOCKMODE lockmode)
void UnlockSharedObject(Oid classid, Oid objid, uint16 objsubid, LOCKMODE lockmode)
void LockSharedObjectForSession(Oid classid, Oid objid, uint16 objsubid, LOCKMODE lockmode)
void LockRelationId(LockRelId *relid, LOCKMODE lockmode)
#define AccessExclusiveLock
#define InplaceUpdateTupleLock
char * get_database_name(Oid dbid)
char * pstrdup(const char *in)
void pfree(void *pointer)
void ForgetDatabaseSyncRequests(Oid dbid)
#define START_CRIT_SECTION()
#define CHECK_FOR_INTERRUPTS()
#define END_CRIT_SECTION()
#define InvalidMultiXactId
void namestrcpy(Name name, const char *str)
Datum namein(PG_FUNCTION_ARGS)
#define IsA(nodeptr, _type_)
#define InvokeObjectPostCreateHook(classId, objectId, subId)
#define InvokeObjectPostAlterHook(classId, objectId, subId)
#define InvokeObjectDropHook(classId, objectId, subId)
#define ObjectAddressSet(addr, class_id, object_id)
#define OffsetNumberNext(offsetNumber)
#define FirstOffsetNumber
int parser_errposition(ParseState *pstate, int location)
FormData_pg_authid * Form_pg_authid
FormData_pg_class * Form_pg_class
FormData_pg_database * Form_pg_database
#define DATCONNLIMIT_INVALID_DB
#define DATCONNLIMIT_UNLIMITED
void DropSetting(Oid databaseid, Oid roleid)
void AlterSetting(Oid databaseid, Oid roleid, VariableSetStmt *setstmt)
static int list_length(const List *l)
void icu_validate_locale(const char *loc_str)
char * get_collation_actual_version(char collprovider, const char *collcollate)
char * icu_language_tag(const char *loc_str, int elevel)
const char * builtin_validate_locale(int encoding, const char *locale)
bool check_locale(int category, const char *locale, char **canonname)
void dropDatabaseDependencies(Oid databaseId)
void changeDependencyOnOwner(Oid classId, Oid objectId, Oid newOwnerId)
void copyTemplateDependencies(Oid templateDbId, Oid newDbId)
void recordDependencyOnOwner(Oid classId, Oid objectId, Oid owner)
void shdepLockAndCheckObject(Oid classId, Oid objectId)
int CountDBSubscriptions(Oid dbid)
FormData_pg_tablespace * Form_pg_tablespace
static char buf[DEFAULT_XLOG_SEG_SIZE]
#define PG_VALID_BE_ENCODING(_enc)
#define pg_encoding_to_char
#define pg_valid_server_encoding
void pgstat_drop_database(Oid databaseid)
int pg_mkdir_p(char *path, int omode)
int pg_strcasecmp(const char *s1, const char *s2)
void get_parent_directory(char *path)
int pg_get_encoding_from_locale(const char *ctype, bool write_message)
static Datum PointerGetDatum(const void *X)
static Datum TransactionIdGetDatum(TransactionId X)
static Datum BoolGetDatum(bool X)
static Datum ObjectIdGetDatum(Oid X)
static Pointer DatumGetPointer(Datum X)
static Datum CStringGetDatum(const char *X)
static Datum Int32GetDatum(int32 X)
static Datum CharGetDatum(char X)
static int fd(const char *x, int i)
void TerminateOtherDBBackends(Oid databaseId)
bool CountOtherDBBackends(Oid databaseId, int *nbackends, int *nprepared)
#define INVALID_PROC_NUMBER
void WaitForProcSignalBarrier(uint64 generation)
uint64 EmitProcSignalBarrier(ProcSignalBarrierType type)
@ PROCSIGNAL_BARRIER_SMGRRELEASE
#define RelationGetDescr(relation)
RelFileNumber RelationMapOidToFilenumberForDatabase(char *dbpath, Oid relationId)
void RelationMapCopy(Oid dbid, Oid tsid, char *srcdbpath, char *dstdbpath)
char * GetDatabasePath(Oid dbOid, Oid spcOid)
#define PG_TBLSPC_DIR_SLASH
#define InvalidRelFileNumber
#define RelFileNumberIsValid(relnumber)
bool rmtree(const char *path, bool rmtopdir)
const char * quote_identifier(const char *ident)
void ScanKeyInit(ScanKey entry, AttrNumber attributeNumber, StrategyNumber strategy, RegProcedure procedure, Datum argument)
void DeleteSharedSecurityLabel(Oid objectId, Oid classId)
bool ReplicationSlotsCountDBSlots(Oid dboid, int *nslots, int *nactive)
void ReplicationSlotsDropDBSlots(Oid dboid)
BlockNumber smgrnblocks(SMgrRelation reln, ForkNumber forknum)
SMgrRelation smgropen(RelFileLocator rlocator, ProcNumber backend)
void smgrclose(SMgrRelation reln)
Snapshot GetLatestSnapshot(void)
void UnregisterSnapshot(Snapshot snapshot)
Snapshot RegisterSnapshot(Snapshot snapshot)
void PopActiveSnapshot(void)
void ResolveRecoveryConflictWithDatabase(Oid dbid)
#define BTEqualStrategyNumber
CreateDBStrategy strategy
void ReleaseSysCache(HeapTuple tuple)
HeapTuple SearchSysCacheLockedCopy1(int cacheId, Datum key1)
HeapTuple SearchSysCache1(int cacheId, Datum key1)
Datum SysCacheGetAttr(int cacheId, HeapTuple tup, AttrNumber attributeNumber, bool *isNull)
Datum SysCacheGetAttrNotNull(int cacheId, HeapTuple tup, AttrNumber attributeNumber)
void table_close(Relation relation, LOCKMODE lockmode)
Relation table_open(Oid relationId, LOCKMODE lockmode)
TableScanDesc table_beginscan_catalog(Relation relation, int nkeys, ScanKeyData *key)
static void table_endscan(TableScanDesc scan)
#define InvalidTransactionId
#define FirstNormalObjectId
text * cstring_to_text(const char *s)
static void pgstat_report_wait_start(uint32 wait_event_info)
static void pgstat_report_wait_end(void)
void PreventInTransactionBlock(bool isTopLevel, const char *stmtType)
void StartTransactionCommand(void)
void ForceSyncCommit(void)
void CommitTransactionCommand(void)
bool RecoveryInProgress(void)
XLogRecPtr XactLastRecEnd
void XLogFlush(XLogRecPtr record)
#define CHECKPOINT_FLUSH_UNLOGGED
XLogRecPtr XLogInsert(RmgrId rmid, uint8 info)
void XLogRegisterData(const void *data, uint32 len)
void XLogBeginInsert(void)
#define XLogRecGetInfo(decoder)
#define XLogRecGetData(decoder)
#define XLogRecHasAnyBlockRefs(decoder)
#define XLR_SPECIAL_REL_UPDATE
void XLogDropDatabase(Oid dbid)