postgresql/src/backend
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
..
access Fix typo in rewriteheap.c. 2022-01-11 10:50:18 +05:30
bootstrap Update copyright for 2022 2022-01-07 19:04:57 -05:00
catalog Update copyright for 2022 2022-01-07 19:04:57 -05:00
commands Improve error message for missing extension. 2022-01-11 14:22:00 -05:00
executor Update copyright for 2022 2022-01-07 19:04:57 -05:00
foreign Update copyright for 2022 2022-01-07 19:04:57 -05:00
jit Update copyright for 2022 2022-01-07 19:04:57 -05:00
lib Update copyright for 2022 2022-01-07 19:04:57 -05:00
libpq Clean up messy API for src/port/thread.c. 2022-01-11 13:46:20 -05:00
main Update copyright for 2022 2022-01-07 19:04:57 -05:00
nodes Make pg_get_expr() more bulletproof. 2022-01-09 12:43:09 -05:00
optimizer Make pg_get_expr() more bulletproof. 2022-01-09 12:43:09 -05:00
parser Update copyright for 2022 2022-01-07 19:04:57 -05:00
partitioning Update copyright for 2022 2022-01-07 19:04:57 -05:00
po Translation updates 2021-06-21 12:33:50 +02:00
port Update copyright for 2022 2022-01-07 19:04:57 -05:00
postmaster Enhance pg_log_backend_memory_contexts() for auxiliary processes. 2022-01-11 23:19:59 +09:00
regex Update copyright for 2022 2022-01-07 19:04:57 -05:00
replication Improve error handling of cryptohash computations 2022-01-11 09:55:16 +09:00
rewrite Update copyright for 2022 2022-01-07 19:04:57 -05:00
snowball Update copyright for 2022 2022-01-07 19:04:57 -05:00
statistics Update copyright for 2022 2022-01-07 19:04:57 -05:00
storage Improve warning message in pg_signal_backend() 2022-01-11 12:56:26 -05:00
tcop Update copyright for 2022 2022-01-07 19:04:57 -05:00
tsearch Update copyright for 2022 2022-01-07 19:04:57 -05:00
utils Refactor set of routines specific to elog.c 2022-01-12 14:16:59 +09:00
.gitignore Add .gitignore entries for AIX-specific intermediate build artifacts. 2015-07-08 20:44:22 -04:00
common.mk Remove PARTIAL_LINKING build mode. 2018-03-30 17:33:04 -07:00
Makefile Update copyright for 2022 2022-01-07 19:04:57 -05:00
nls.mk Report progress of startup operations that take a long time. 2021-10-25 11:51:57 -04:00