pgsql: Fix syslogger so that log_truncate_on_rotation works in the firs

Поиск
Список
Период
Сортировка
От Tom Lane
Тема pgsql: Fix syslogger so that log_truncate_on_rotation works in the firs
Дата
Msg-id E1SwHKU-0007pX-QI@gemulon.postgresql.org
обсуждение исходный текст
Список pgsql-committers
Fix syslogger so that log_truncate_on_rotation works in the first rotation.

In the original coding of the log rotation stuff, we did not bother to make
the truncation logic work for the very first rotation after postmaster
start (or after a syslogger crash and restart).  It just always appended
in that case.  It did not seem terribly important at the time, but we've
recently had two separate complaints from people who expected it to work
unsurprisingly.  (Both users tend to restart the postmaster about as often
as a log rotation is configured to happen, which is maybe not typical use,
but still...)  Since the initial log file is opened in the postmaster,
fixing this requires passing down some more state to the syslogger child
process.

It's always been like this, so back-patch to all supported branches.

Branch
------
REL8_3_STABLE

Details
-------
http://git.postgresql.org/pg/commitdiff/8a88e57ee2bd19a8be37d2726a6f21e2ee57bd2d

Modified Files
--------------
src/backend/postmaster/postmaster.c |    6 ++++-
src/backend/postmaster/syslogger.c  |   42 ++++++++++++++++++++++++----------
2 files changed, 34 insertions(+), 14 deletions(-)


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

Предыдущее
От: Alvaro Herrera
Дата:
Сообщение: pgsql: pg_basebackup: stylistic adjustments
Следующее
От: Tom Lane
Дата:
Сообщение: pgsql: Fix syslogger so that log_truncate_on_rotation works in the firs