pgsql: Move InitXLogInsert() call from InitXLOGAccess() to BaseInit().

Поиск
Список
Период
Сортировка
От Robert Haas
Тема pgsql: Move InitXLogInsert() call from InitXLOGAccess() to BaseInit().
Дата
Msg-id E1mmzqL-0006zh-Us@gemulon.postgresql.org
обсуждение исходный текст
Список pgsql-committers
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

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/e51c46991f0ee99cca222305619dee5543a1290a

Modified Files
--------------
src/backend/access/transam/xlog.c | 13 -------------
src/backend/utils/init/postinit.c |  6 ++++++
2 files changed, 6 insertions(+), 13 deletions(-)


В списке pgsql-committers по дате отправления:

Предыдущее
От: Amit Kapila
Дата:
Сообщение: pgsql: Invalidate relcache when changing REPLICA IDENTITY index.
Следующее
От: Alvaro Herrera
Дата:
Сообщение: pgsql: Fix headerscheck failure in replication/worker_internal.h