diff options
author | Robert Haas <rhaas@postgresql.org> | 2021-11-16 09:43:17 -0500 |
---|---|---|
committer | Robert Haas <rhaas@postgresql.org> | 2021-11-16 09:43:17 -0500 |
commit | e51c46991f0ee99cca222305619dee5543a1290a (patch) | |
tree | 1a3a0cff28fc4578bf70972897529526a15d478a /src/backend/utils/adt/ruleutils.c | |
parent | 354a1f8d220fbbb07b0ded32c5ade72646afb801 (diff) | |
download | postgresql-e51c46991f0ee99cca222305619dee5543a1290a.tar.gz postgresql-e51c46991f0ee99cca222305619dee5543a1290a.zip |
Move InitXLogInsert() call from InitXLOGAccess() to BaseInit().
At present, there is an undocumented coding rule that you must call
RecoveryInProgress(), or do something else that results in a call
to InitXLogInsert(), before trying to write WAL. Otherwise, the
WAL construction buffers won't be initialized, resulting in
failures.
Since it's not good to rely on a status inquiry function like
RecoveryInProgress() having the side effect of initializing
critical data structures, instead do the initialization eariler,
when the backend first starts up.
Patch by me. Reviewed by Nathan Bossart and Michael Paquier.
Discussion: http://postgr.es/m/CA+TgmoY7b65qRjzHN_tWUk8B4sJqk1vj1d31uepVzmgPnZKeLg@mail.gmail.com
Diffstat (limited to 'src/backend/utils/adt/ruleutils.c')
0 files changed, 0 insertions, 0 deletions