-----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-----


-- 
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs

Reply via email to