CATALOG(pg_authid,1260,AuthIdRelationId) BKI_SHARED_RELATION BKI_ROWTYPE_OID(2842,AuthIdRelation_Rowtype_Id) BKI_SCHEMA_MACRO { Oid oid; /* oid */ NameData rolname; /* name of role */ bool rolsuper; /* read this field via superuser() only! */ bool rolinherit; /* inherit privileges from other roles? */ bool rolcreaterole; /* allowed to create more roles? */ bool rolcreatedb; /* allowed to create databases? */ bool rolcanlogin; /* allowed to log in as session user? */ bool rolreplication; /* role used for streaming replication */ bool rolbypassrls; /* bypasses row level security? */ int32 rolconnlimit; /* max connections allowed (-1=no limit) */
/* remaining fields may be null; use heap_getattr to read them! */ #ifdef CATALOG_VARLEN /* variable-length fields start here */ text rolpassword; /* password, if any */ timestamptz rolvaliduntil; /* password expiration time, if any */ #endif } FormData_pg_authid;
create pg_authid 1260 shared_relation rowtype_oid 2842 ( oid = oid , rolname = name , rolsuper = bool , rolinherit = bool , rolcreaterole = bool , rolcreatedb = bool , rolcanlogin = bool , rolreplication = bool , rolbypassrls = bool , rolconnlimit = int4 , rolpassword = text , rolvaliduntil = timestamptz ) open pg_authid insert ( 10 POSTGRES t t t t t t t -1 _null_ _null_ ) insert ( 3373 pg_monitor f t f f f f f -1 _null_ _null_ ) insert ( 3374 pg_read_all_settings f t f f f f f -1 _null_ _null_ ) insert ( 3375 pg_read_all_stats f t f f f f f -1 _null_ _null_ ) insert ( 3377 pg_stat_scan_tables f t f f f f f -1 _null_ _null_ ) insert ( 4569 pg_read_server_files f t f f f f f -1 _null_ _null_ ) insert ( 4570 pg_write_server_files f t f f f f f -1 _null_ _null_ ) insert ( 4571 pg_execute_server_program f t f f f f f -1 _null_ _null_ ) insert ( 4200 pg_signal_backend f t f f f f f -1 _null_ _null_ ) close pg_authid
/* * Auxiliary-process type identifiers. These used to be in bootstrap.h * but it seems saner to have them here, with the ProcessingMode stuff. * The MyAuxProcType global is defined and set in bootstrap.c. */
switch (MyAuxProcType) { case CheckerProcess: /* don't set signals, they're useless here */ CheckerModeMain(); proc_exit(1); /* should never return */
case BootstrapProcess:
/* * There was a brief instant during which mode was Normal; this is * okay. We need to be in bootstrap mode during BootStrapXLOG for * the sake of multixact initialization. */ SetProcessingMode(BootstrapProcessing); bootstrap_signals(); BootStrapXLOG(); BootstrapModeMain(); proc_exit(1); /* should never return */ ... } }
/* * The main entry point for running the backend in bootstrap mode * * The bootstrap mode is used to initialize the template database. * The bootstrap backend doesn't speak SQL, but instead expects * commands in a special bootstrap language. */ staticvoid BootstrapModeMain(void) { int i;
/* * To ensure that src/common/link-canary.c is linked into the backend, we * must call it from somewhere. Here is as good as anywhere. */ if (pg_link_canary_is_frontend()) elog(ERROR, "backend is incorrectly linked to frontend functions");
/* * Do backend-like initialization for bootstrap mode */ InitProcess();
/* * The catalogs that use the relation mapper are the * bootstrap catalogs plus the shared catalogs. If this * ever gets more complicated, we should invent a BKI * keyword to mark the mapped catalogs, but for now a * quick hack seems the most appropriate thing. Note in * particular that all "nailed" heap rels (see formrdesc * in relcache.c) must be mapped. */ mapped_relation = ($4 || shared_relation);
if ($4) { TransactionId relfrozenxid; MultiXactId relminmxid;
if (boot_reldesc) { elog(DEBUG4, "create bootstrap: warning, open relation exists, closing first"); closerel(NULL); }