postgresql/src/include/utils
Michael Paquier ac7c80758a Refactor set of routines specific to elog.c
This refactors the following routines and facilities coming from
elog.c, to ease their use across multiple log destinations:
- Start timestamp, including its reset, to store when a process has been
started.
- The log timestamp, associated to an entry (the same timestamp is used
when logging across multiple destinations).
- Routine deciding if a query can be logged or not.
- The backend type names, depending on the process that logs any
information (postmaster, bgworker name or just GetBackendTypeDesc() with
a regular backend).
- Write of logs using the logging piped protocol, with the log collector
enabled.
- Error severity converted to a string.

These refactored routines will be used for some follow-up changes
to move all the csvlog logic into its own file and to potentially add
JSON as log destination, reducing the overall size of elog.c as the end
result.

Author: Michael Paquier, Sehrope Sarkuni
Reviewed-by: Nathan Bossart
Discussion: https://postgr.es/m/CAH7T-aqswBM6JWe4pDehi1uOiufqe06DJWaU5=X7dDLyqUExHg@mail.gmail.com
2022-01-12 14:16:59 +09:00
..
.gitignore Revert "Add gitignore entries for jsonpath_gram.h" 2019-03-23 00:19:34 +01:00
acl.h Update copyright for 2022 2022-01-07 19:04:57 -05:00
aclchk_internal.h Update copyright for 2022 2022-01-07 19:04:57 -05:00
array.h Update copyright for 2022 2022-01-07 19:04:57 -05:00
arrayaccess.h Update copyright for 2022 2022-01-07 19:04:57 -05:00
ascii.h Update copyright for 2022 2022-01-07 19:04:57 -05:00
attoptcache.h Update copyright for 2022 2022-01-07 19:04:57 -05:00
backend_progress.h Update copyright for 2022 2022-01-07 19:04:57 -05:00
backend_status.h Update copyright for 2022 2022-01-07 19:04:57 -05:00
builtins.h Update copyright for 2022 2022-01-07 19:04:57 -05:00
bytea.h Update copyright for 2022 2022-01-07 19:04:57 -05:00
cash.h Phase 2 of pgindent updates. 2017-06-21 15:19:25 -04:00
catcache.h Update copyright for 2022 2022-01-07 19:04:57 -05:00
combocid.h Update copyright for 2022 2022-01-07 19:04:57 -05:00
date.h Update copyright for 2022 2022-01-07 19:04:57 -05:00
datetime.h Update copyright for 2022 2022-01-07 19:04:57 -05:00
datum.h Update copyright for 2022 2022-01-07 19:04:57 -05:00
dsa.h Update copyright for 2022 2022-01-07 19:04:57 -05:00
dynahash.h Update copyright for 2022 2022-01-07 19:04:57 -05:00
elog.h Refactor set of routines specific to elog.c 2022-01-12 14:16:59 +09:00
evtcache.h Update copyright for 2022 2022-01-07 19:04:57 -05:00
expandeddatum.h Update copyright for 2022 2022-01-07 19:04:57 -05:00
expandedrecord.h Update copyright for 2022 2022-01-07 19:04:57 -05:00
float.h Update copyright for 2022 2022-01-07 19:04:57 -05:00
fmgrtab.h Update copyright for 2022 2022-01-07 19:04:57 -05:00
formatting.h Update copyright for 2022 2022-01-07 19:04:57 -05:00
freepage.h Update copyright for 2022 2022-01-07 19:04:57 -05:00
geo_decls.h Update copyright for 2022 2022-01-07 19:04:57 -05:00
guc.h Update copyright for 2022 2022-01-07 19:04:57 -05:00
guc_tables.h Update copyright for 2022 2022-01-07 19:04:57 -05:00
help_config.h Update copyright for 2022 2022-01-07 19:04:57 -05:00
hsearch.h Update copyright for 2022 2022-01-07 19:04:57 -05:00
index_selfuncs.h Update copyright for 2022 2022-01-07 19:04:57 -05:00
inet.h Update copyright for 2022 2022-01-07 19:04:57 -05:00
int8.h Update copyright for 2022 2022-01-07 19:04:57 -05:00
inval.h Update copyright for 2022 2022-01-07 19:04:57 -05:00
json.h Update copyright for 2022 2022-01-07 19:04:57 -05:00
jsonb.h Update copyright for 2022 2022-01-07 19:04:57 -05:00
jsonfuncs.h Update copyright for 2022 2022-01-07 19:04:57 -05:00
jsonpath.h Update copyright for 2022 2022-01-07 19:04:57 -05:00
logtape.h Update copyright for 2022 2022-01-07 19:04:57 -05:00
lsyscache.h Update copyright for 2022 2022-01-07 19:04:57 -05:00
memdebug.h Update copyright for 2022 2022-01-07 19:04:57 -05:00
memutils.h Update copyright for 2022 2022-01-07 19:04:57 -05:00
multirangetypes.h Update copyright for 2022 2022-01-07 19:04:57 -05:00
numeric.h Update copyright for 2022 2022-01-07 19:04:57 -05:00
old_snapshot.h Update copyright for 2022 2022-01-07 19:04:57 -05:00
palloc.h Update copyright for 2022 2022-01-07 19:04:57 -05:00
partcache.h Update copyright for 2022 2022-01-07 19:04:57 -05:00
pg_crc.h Update copyright for 2022 2022-01-07 19:04:57 -05:00
pg_locale.h Update copyright for 2022 2022-01-07 19:04:57 -05:00
pg_lsn.h Update copyright for 2022 2022-01-07 19:04:57 -05:00
pg_rusage.h Update copyright for 2022 2022-01-07 19:04:57 -05:00
pidfile.h Update copyright for 2022 2022-01-07 19:04:57 -05:00
plancache.h Update copyright for 2022 2022-01-07 19:04:57 -05:00
portal.h Update copyright for 2022 2022-01-07 19:04:57 -05:00
ps_status.h Refactor ps_status.c API 2020-03-11 16:38:31 +01:00
queryenvironment.h Update copyright for 2022 2022-01-07 19:04:57 -05:00
queryjumble.h Update copyright for 2022 2022-01-07 19:04:57 -05:00
rangetypes.h Update copyright for 2022 2022-01-07 19:04:57 -05:00
regproc.h Update copyright for 2022 2022-01-07 19:04:57 -05:00
rel.h Update copyright for 2022 2022-01-07 19:04:57 -05:00
relcache.h Update copyright for 2022 2022-01-07 19:04:57 -05:00
relfilenodemap.h Update copyright for 2022 2022-01-07 19:04:57 -05:00
relmapper.h Update copyright for 2022 2022-01-07 19:04:57 -05:00
relptr.h Update copyright for 2022 2022-01-07 19:04:57 -05:00
reltrigger.h Update copyright for 2022 2022-01-07 19:04:57 -05:00
resowner.h Update copyright for 2022 2022-01-07 19:04:57 -05:00
resowner_private.h Update copyright for 2022 2022-01-07 19:04:57 -05:00
rls.h Update copyright for 2022 2022-01-07 19:04:57 -05:00
ruleutils.h Update copyright for 2022 2022-01-07 19:04:57 -05:00
sampling.h Update copyright for 2022 2022-01-07 19:04:57 -05:00
selfuncs.h Update copyright for 2022 2022-01-07 19:04:57 -05:00
sharedtuplestore.h Update copyright for 2022 2022-01-07 19:04:57 -05:00
snapmgr.h Update copyright for 2022 2022-01-07 19:04:57 -05:00
snapshot.h Update copyright for 2022 2022-01-07 19:04:57 -05:00
sortsupport.h Update copyright for 2022 2022-01-07 19:04:57 -05:00
spccache.h Update copyright for 2022 2022-01-07 19:04:57 -05:00
syscache.h Update copyright for 2022 2022-01-07 19:04:57 -05:00
timeout.h Update copyright for 2022 2022-01-07 19:04:57 -05:00
timestamp.h Update copyright for 2022 2022-01-07 19:04:57 -05:00
tuplesort.h Update copyright for 2022 2022-01-07 19:04:57 -05:00
tuplestore.h Update copyright for 2022 2022-01-07 19:04:57 -05:00
typcache.h Update copyright for 2022 2022-01-07 19:04:57 -05:00
tzparser.h Update copyright for 2022 2022-01-07 19:04:57 -05:00
uuid.h Update copyright for 2022 2022-01-07 19:04:57 -05:00
varbit.h Update copyright for 2022 2022-01-07 19:04:57 -05:00
varlena.h Update copyright for 2022 2022-01-07 19:04:57 -05:00
wait_event.h Update copyright for 2022 2022-01-07 19:04:57 -05:00
xid8.h Update copyright for 2022 2022-01-07 19:04:57 -05:00
xml.h Update copyright for 2022 2022-01-07 19:04:57 -05:00