postgresql/src/backend
Michael Paquier 9989d37d1c Remove XLogFileNameP() from the tree
XLogFileNameP() is a wrapper routine able to build a palloc'd string for
a WAL segment name, which is used for error string generation.  There
were several code paths where it gets called in a critical section,
where memory allocation is not allowed.  This results in triggering
an assertion failure instead of generating the wanted error message.

Another, more annoying, problem is that if the allocation to generate
the WAL segment name fails on OOM, then the failure would be escalated
to a PANIC.

This removes the routine and all its callers are replaced with a logic
using a fixed-size buffer.  This way, all the existing mistakes are
fixed and future ones are prevented.

Author: Masahiko Sawada
Reviewed-by: Michael Paquier, Álvaro Herrera
Discussion: https://postgr.es/m/CA+fd4k5gC9H4uoWMLg9K_QfNrnkkdEw+-AFveob9YX7z8JnKTA@mail.gmail.com
2019-12-03 15:06:04 +09:00
..
access Remove XLogFileNameP() from the tree 2019-12-03 15:06:04 +09:00
bootstrap Remove configure --disable-float4-byval 2019-11-21 18:29:21 +01:00
catalog Fix misbehavior with expression indexes on ON COMMIT DELETE ROWS tables. 2019-12-01 13:09:26 -05:00
commands Add error position to an error message 2019-11-29 09:10:17 +01:00
executor Remove useless "return;" lines 2019-11-28 16:48:37 -03:00
foreign Split all OBJS style lines in makefiles into one-line-per-entry style. 2019-11-05 14:41:07 -08:00
jit Remove useless "return;" lines 2019-11-28 16:48:37 -03:00
lib Make StringInfo available to frontend code. 2019-11-05 14:56:40 -08:00
libpq Remove useless "return;" lines 2019-11-28 16:48:37 -03:00
main Split all OBJS style lines in makefiles into one-line-per-entry style. 2019-11-05 14:41:07 -08:00
nodes Add a reverse-translation column number array to struct AppendRelInfo. 2019-12-02 18:05:29 -05:00
optimizer Fix EXPLAIN's column alias output for mismatched child tables. 2019-12-02 19:08:10 -05:00
parser Allow ALTER VIEW command to rename the column in the view. 2019-11-21 19:55:13 +09:00
partitioning Make the order of the header file includes consistent in backend modules. 2019-11-12 08:30:16 +05:30
po Translation updates 2019-06-17 15:30:20 +02:00
port Split all OBJS style lines in makefiles into one-line-per-entry style. 2019-11-05 14:41:07 -08:00
postmaster Use procsignal_sigusr1_handler for auxiliary processes. 2019-11-25 16:16:27 -05:00
regex Split all OBJS style lines in makefiles into one-line-per-entry style. 2019-11-05 14:41:07 -08:00
replication Remove XLogFileNameP() from the tree 2019-12-03 15:06:04 +09:00
rewrite Remove useless "return;" lines 2019-11-28 16:48:37 -03:00
snowball Split all OBJS style lines in makefiles into one-line-per-entry style. 2019-11-05 14:41:07 -08:00
statistics Remove unnecessary clauses_attnums variable 2019-11-28 23:25:14 +01:00
storage Add safeguards for pg_fsync() called with incorrectly-opened fds 2019-11-26 13:32:52 +09:00
tcop Stabilize NOTIFY behavior by transmitting notifies before ReadyForQuery. 2019-11-24 14:42:59 -05:00
tsearch Make the order of the header file includes consistent in backend modules. 2019-11-12 08:30:16 +05:30
utils Add a reverse-translation column number array to struct AppendRelInfo. 2019-12-02 18:05:29 -05:00
.gitignore
common.mk
Makefile Split all OBJS style lines in makefiles into one-line-per-entry style. 2019-11-05 14:41:07 -08:00
nls.mk