Re: BUG #7890: wrong behaviour using pg_rotate_logfile() with parameter log_truncate_on_rotation = on

Поиск
Список
Период
Сортировка
От Rafael Martinez
Тема Re: BUG #7890: wrong behaviour using pg_rotate_logfile() with parameter log_truncate_on_rotation = on
Дата
Msg-id 51224180.6030500@usit.uio.no
обсуждение исходный текст
Ответ на Re: BUG #7890: wrong behaviour using pg_rotate_logfile() with parameter log_truncate_on_rotation = on  (Amit Kapila <amit.kapila@huawei.com>)
Ответы Re: BUG #7890: wrong behaviour using pg_rotate_logfile() with parameter log_truncate_on_rotation = on  (Amit Kapila <amit.kapila@huawei.com>)
Список pgsql-bugs
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 02/18/2013 03:41 PM, Amit Kapila wrote:
[...........]
> Why you think this is wrong behavior, do you expect any time you
> call pg_rotate_logfile(), it should truncate the file if
> log_truncate_on_rotation is on? I think if you are expecting such
> behavior, it might not be right expectation, because it considers
> the the time and log_filename format as well.
>

Hello

I agree with Sari in this report.

If you call pg_rotate_logfile() AND log_truncate_on_rotation is on,
the logfile should be truncated. This should happen even if the
logfile name does not change during rotation, and even if
log_rotation_age / log_rotation_size are defined.

According to the documentation:

"log_truncate_on_rotation ... When logging_collector is enabled, this
parameter will cause PostgreSQL to truncate (overwrite), rather than
append to, any existing log file of the same name ..."

"... pg_rotate_logfile signals the log-file manager to switch to a new
output file immediately"

regards,
- --
 Rafael Martinez Guerrero
 Center for Information Technology
 University of Oslo, Norway

 PGP Public Key: http://folk.uio.no/rafael/
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.14 (GNU/Linux)

iEYEARECAAYFAlEiQX8ACgkQBhuKQurGihRJLwCeIrZFkLDuAIOK21k5Ez4jIV2x
WgcAnAxJYJkfH2+uzb778AH8QL1qGRjq
=a4kS
-----END PGP SIGNATURE-----

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

Предыдущее
От: Amit Kapila
Дата:
Сообщение: Re: BUG #7890: wrong behaviour using pg_rotate_logfile() with parameter log_truncate_on_rotation = on
Следующее
От: Peter Kroon
Дата:
Сообщение: Nested xmlagg doesn't give a result 9.2.3