PostgreSQL Source Code  git master
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros
globals.c File Reference
#include "postgres.h"
#include "libpq/libpq-be.h"
#include "libpq/pqcomm.h"
#include "miscadmin.h"
#include "storage/backendid.h"
Include dependency graph for globals.c:

Go to the source code of this file.

Variables

ProtocolVersion FrontendProtocol
 
volatile bool InterruptPending = false
 
volatile bool QueryCancelPending = false
 
volatile bool ProcDiePending = false
 
volatile bool ClientConnectionLost = false
 
volatile bool IdleInTransactionSessionTimeoutPending = false
 
volatile uint32 InterruptHoldoffCount = 0
 
volatile uint32 QueryCancelHoldoffCount = 0
 
volatile uint32 CritSectionCount = 0
 
int MyProcPid
 
pg_time_t MyStartTime
 
struct PortMyProcPort
 
int32 MyCancelKey
 
int MyPMChildSlot
 
struct LatchMyLatch
 
char * DataDir = NULL
 
char OutputFileName [MAXPGPATH]
 
char my_exec_path [MAXPGPATH]
 
char pkglib_path [MAXPGPATH]
 
BackendId MyBackendId = InvalidBackendId
 
BackendId ParallelMasterBackendId = InvalidBackendId
 
Oid MyDatabaseId = InvalidOid
 
Oid MyDatabaseTableSpace = InvalidOid
 
char * DatabasePath = NULL
 
pid_t PostmasterPid = 0
 
bool IsPostmasterEnvironment = false
 
bool IsUnderPostmaster = false
 
bool IsBinaryUpgrade = false
 
bool IsBackgroundWorker = false
 
bool ExitOnAnyError = false
 
int DateStyle = USE_ISO_DATES
 
int DateOrder = DATEORDER_MDY
 
int IntervalStyle = INTSTYLE_POSTGRES
 
bool enableFsync = true
 
bool allowSystemTableMods = false
 
int work_mem = 1024
 
int maintenance_work_mem = 16384
 
int replacement_sort_tuples = 150000
 
int NBuffers = 1000
 
int MaxConnections = 90
 
int max_worker_processes = 8
 
int max_parallel_workers = 8
 
int MaxBackends = 0
 
int VacuumCostPageHit = 1
 
int VacuumCostPageMiss = 10
 
int VacuumCostPageDirty = 20
 
int VacuumCostLimit = 200
 
int VacuumCostDelay = 0
 
int VacuumPageHit = 0
 
int VacuumPageMiss = 0
 
int VacuumPageDirty = 0
 
int VacuumCostBalance = 0
 
bool VacuumCostActive = false
 

Variable Documentation

volatile bool ClientConnectionLost = false

Definition at line 32 of file globals.c.

Referenced by internal_flush(), and ProcessInterrupts().

int DateOrder = DATEORDER_MDY
bool ExitOnAnyError = false

Definition at line 104 of file globals.c.

Referenced by BackgroundWriterMain(), CheckpointerMain(), and errstart().

volatile bool IdleInTransactionSessionTimeoutPending = false

Definition at line 33 of file globals.c.

Referenced by IdleInTransactionSessionTimeoutHandler(), and ProcessInterrupts().

volatile uint32 InterruptHoldoffCount = 0

Definition at line 34 of file globals.c.

Referenced by errfinish(), proc_exit_prepare(), and ProcessInterrupts().

int IntervalStyle = INTSTYLE_POSTGRES
bool IsUnderPostmaster = false

Definition at line 100 of file globals.c.

Referenced by _PG_init(), AutoVacuumShmemInit(), AuxiliaryProcessMain(), BackendRandomShmemInit(), BackgroundWorkerShmemInit(), bootstrap_signals(), BootstrapModeMain(), BTreeShmemInit(), CheckMyDatabase(), CheckRecoveryConsistency(), CommitTsShmemInit(), CreateLWLocks(), CreateSharedMemoryAndSemaphores(), DebugFileOpen(), dsm_attach(), dsm_create(), dsm_postmaster_startup(), EventTriggerDDLCommandEnd(), EventTriggerDDLCommandStart(), EventTriggerSQLDrop(), EventTriggerTableRewrite(), ForgetDatabaseFsyncRequests(), ForgetRelationFsyncRequests(), ForwardFsyncRequest(), GetNewMultiXactId(), GetNewTransactionId(), HandleStartupProcInterrupts(), heap_create_with_catalog(), init_ps_display(), InitCommunication(), InitializeSessionUserId(), InitializeSessionUserIdStandalone(), InitPostgres(), InitPostmasterChild(), InitProcess(), LWLockAcquire(), mdinit(), MultiXactShmemInit(), pg_backend_random(), PGSemaphoreCreate(), PGSharedMemoryNoReAttach(), PGSharedMemoryReAttach(), pgss_shmem_startup(), PostgresMain(), process_postgres_switches(), process_settings(), ProcKill(), readRecoveryCommandFile(), register_unlink(), RegisterBackgroundWorker(), RegisterDynamicBackgroundWorker(), RequestAddinShmemSpace(), RequestNamedLWLockTranche(), SendPostmasterSignal(), set_config_option(), set_config_sourcefile(), set_ps_display(), SetMultiXactIdLimit(), SetTransactionIdLimit(), ShmemInitStruct(), SimpleLruInit(), standard_planner(), StartupXLOG(), superuser_arg(), SyncScanShmemInit(), TwoPhaseShmemInit(), verify_dictoptions(), XLogArchiveNotify(), and XLogWrite().

int max_parallel_workers = 8

Definition at line 125 of file globals.c.

Referenced by RegisterDynamicBackgroundWorker().

Oid MyDatabaseId = InvalidOid

Definition at line 76 of file globals.c.

Referenced by AfterTriggerSetState(), AlterDatabase(), AlterObjectRename_internal(), AlterPublicationOwner_internal(), AlterSchemaOwner_internal(), AlterSubscription(), AlterSubscriptionOwner(), analyze_rel(), asyncQueueNotificationToEntry(), asyncQueueProcessPageEntries(), AutoVacuumRequestWork(), backend_read_statsfile(), CacheInvalidateCatalog(), CacheInvalidateHeapTuple(), CacheInvalidateRelcache(), CacheInvalidateRelcacheByTuple(), CheckLogicalDecodingRequirements(), CheckMyDatabase(), checkSharedDependencies(), classIdGetDbId(), CreateDecodingContext(), CreateInitDecodingContext(), CreateProceduralLanguage(), CreatePublication(), CreateSchemaCommand(), CreateSubscription(), current_database(), database_to_xml_internal(), DeconstructQualifiedName(), do_analyze_rel(), do_autovacuum(), dropdb(), DropSubscription(), Exec_ListenPreCommit(), exec_object_restorecon(), exec_replication_command(), ExpandColumnRefStar(), ExportSnapshot(), get_subscription_oid(), GetCurrentVirtualXIDs(), GetNewRelFileNode(), GetOldestXmin(), IdentifySystem(), ImportSnapshot(), InitializeParallelDSM(), InitPostgres(), InitTempTableNamespace(), lazy_vacuum_rel(), libpqrcv_exec(), LocalExecuteInvalidationMessage(), LockDatabaseObject(), LockGXact(), logical_heap_rewrite_flush_mappings(), logical_rewrite_log_mapping(), LogLogicalMessage(), LogStandbyInvalidations(), map_sql_catalog_to_xmlschema_types(), map_sql_schema_to_xmlschema_types(), map_sql_table_to_xmlschema(), map_sql_type_to_xml_name(), movedb(), perform_relmap_update(), perform_work_item(), pg_namespace_aclmask(), pg_relation_filepath(), pgss_store(), pgstat_beshutdown_hook(), pgstat_bestart(), pgstat_fetch_stat_funcentry(), pgstat_fetch_stat_tabentry(), pgstat_report_analyze(), pgstat_report_deadlock(), pgstat_report_recovery_conflict(), pgstat_report_stat(), pgstat_report_tempfile(), pgstat_report_vacuum(), pgstat_reset_counters(), pgstat_reset_single_counter(), pgstat_send_funcstats(), pgstat_vacuum_stat(), PrepareToInvalidateCacheTuple(), PrepareTransaction(), ProcArrayInstallImportedXmin(), ProcArrayInstallRestoredXmin(), RangeVarGetAndCheckCreationNamespace(), RangeVarGetCreationNamespace(), RangeVarGetRelidExtended(), ReindexMultipleTables(), RelationInitLockInfo(), RelationInitPhysicalAddr(), RelationMapFinishBootstrap(), RenameDatabase(), RenameSchema(), ReplicationSlotCreate(), ScanPgRelation(), sepgsql_schema_post_create(), SetLocktagRelationOid(), shdepDropOwned(), shdepReassignOwned(), table_recheck_autovac(), transformColumnRef(), UnlockDatabaseObject(), UpdateLogicalMappings(), vac_truncate_clog(), vac_update_datfrozenxid(), vacuum_rel(), and XactLogCommitRecord().

struct Latch* MyLatch

Definition at line 51 of file globals.c.

Referenced by ArchSigHupHandler(), ArchSigTermHandler(), AutoVacLauncherMain(), av_sighup_handler(), avl_sigterm_handler(), avl_sigusr2_handler(), BackgroundWriterMain(), be_tls_open_server(), BgSigHupHandler(), CheckDeadLockAlert(), CheckpointerMain(), ChkptSigHupHandler(), die(), gather_readnext(), handle_sig_alarm(), handle_sigterm(), HandleCatchupInterrupt(), HandleNotifyInterrupt(), HandleParallelMessageInterrupt(), IdleInTransactionSessionTimeoutHandler(), InitPostmasterChild(), InitStandaloneProcess(), logicalrep_worker_sighup(), logicalrep_worker_sigterm(), pg_sleep(), pgarch_MainLoop(), pgarch_waken(), pgarch_waken_stop(), pgfdw_get_result(), pgstat_exit(), pgstat_sighup_handler(), PgstatCollectorMain(), pq_init(), procsignal_sigusr1_handler(), ProcSleep(), ProcWaitForSignal(), RecoveryConflictInterrupt(), ReqCheckpointHandler(), ReqShutdownHandler(), secure_read(), secure_write(), shm_mq_receive_bytes(), shm_mq_send_bytes(), shm_mq_wait_internal(), sigHupHandler(), SigHupHandler(), sigUsr1Handler(), StatementCancelHandler(), SwitchBackToLocalLatch(), SwitchToSharedLatch(), SyncRepWaitForLSN(), SysLoggerMain(), test_shm_mq_pipelined(), throttle(), wait_for_workers_to_become_ready(), WaitForBackgroundWorkerStartup(), WaitForReplicationWorkerAttach(), WalShutdownHandler(), WalSigHupHandler(), WalSndLastCycleHandler(), WalSndLoop(), WalSndSigHupHandler(), WalSndWaitForWal(), WalSndWriteData(), WalWriterMain(), worker_spi_sighup(), and worker_spi_sigterm().

char OutputFileName[MAXPGPATH]

Definition at line 61 of file globals.c.

Referenced by AuxiliaryProcessMain(), DebugFileOpen(), and process_postgres_switches().

BackendId ParallelMasterBackendId = InvalidBackendId

Definition at line 74 of file globals.c.

Referenced by ParallelWorkerMain().

char pkglib_path[MAXPGPATH]

Definition at line 64 of file globals.c.

Referenced by getInstallationPaths(), InitStandaloneProcess(), and substitute_libpath_macro().

pid_t PostmasterPid = 0
volatile uint32 QueryCancelHoldoffCount = 0

Definition at line 35 of file globals.c.

Referenced by errfinish(), and ProcessInterrupts().

int replacement_sort_tuples = 150000

Definition at line 114 of file globals.c.

Referenced by useselection().

bool VacuumCostActive = false
int VacuumCostBalance = 0
int VacuumCostDelay = 0
int VacuumCostLimit = 200
int VacuumCostPageDirty = 20

Definition at line 130 of file globals.c.

Referenced by MarkBufferDirty(), and MarkBufferDirtyHint().

int VacuumCostPageHit = 1

Definition at line 128 of file globals.c.

Referenced by ReadBuffer_common().

int VacuumCostPageMiss = 10

Definition at line 129 of file globals.c.

Referenced by ReadBuffer_common().

int VacuumPageDirty = 0

Definition at line 136 of file globals.c.

Referenced by lazy_vacuum_rel(), MarkBufferDirty(), MarkBufferDirtyHint(), and vacuum().

int VacuumPageHit = 0

Definition at line 134 of file globals.c.

Referenced by lazy_vacuum_rel(), ReadBuffer_common(), and vacuum().

int VacuumPageMiss = 0

Definition at line 135 of file globals.c.

Referenced by lazy_vacuum_rel(), ReadBuffer_common(), and vacuum().

int work_mem = 1024

Definition at line 112 of file globals.c.

Referenced by _bt_spoolinit(), begin_partition(), brin_page_items(), BuildTupleHashTable(), choose_hashed_setop(), collectMatchBitmap(), connectby(), consider_groupingsets_paths(), cost_material(), cost_rescan(), create_distinct_paths(), create_gather_merge_path(), create_grouping_paths(), create_groupingsets_path(), create_merge_append_path(), create_sort_path(), create_unique_path(), crosstab(), dblink_get_notify(), deflist_to_tuplestore(), each_worker(), each_worker_jsonb(), elements_worker(), elements_worker_jsonb(), exec_init_tuple_store(), ExecChooseHashTableSize(), ExecHashTableCreate(), ExecInitCteScan(), ExecInitRecursiveUnion(), ExecMakeTableFunctionResult(), ExecMaterial(), ExecRecursiveUnion(), ExecSort(), final_cost_mergejoin(), fmgr_sql(), get_crosstab_tuplestore(), GetTriggerTransitionTuplestore(), ginInsertCleanup(), initial_cost_mergejoin(), initialize_aggregate(), initialize_phase(), label_sort_with_costsize(), libpqrcv_processTuples(), materializeQueryResult(), materializeResult(), MultiExecBitmapIndexScan(), MultiExecBitmapOr(), ordered_set_startup(), pg_available_extension_versions(), pg_available_extensions(), pg_config(), pg_cursor(), pg_event_trigger_ddl_commands(), pg_event_trigger_dropped_objects(), pg_extension_update_paths(), pg_get_replication_slots(), pg_hba_file_rules(), pg_logical_slot_get_changes_guts(), pg_prepared_statement(), pg_show_replication_origin_status(), pg_stat_get_activity(), pg_stat_get_progress_info(), pg_stat_get_subscription(), pg_stat_get_wal_senders(), pg_stat_statements_internal(), pg_stop_backup_v2(), plperl_return_next(), pltcl_init_tuple_store(), populate_recordset_worker(), PortalCreateHoldStore(), show_all_file_settings(), storeRow(), subplan_is_hashable(), tfuncFetchRows(), and xpath_table().