Re: current postgresql logfile being written to?

From: Lucas Possamai <drum(dot)lucas(at)gmail(dot)com>
To: hvjunk <hvjunk(at)gmail(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: current postgresql logfile being written to?
Date: 2017-06-22 02:06:10
Message-ID: CAE_gQfXzCiMmWO3Kvaf0i_=J-q2KbZygbS9D5kZaXPkAUKbneg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

2017-06-22 13:54 GMT+12:00 hvjunk <hvjunk(at)gmail(dot)com>:

> Hi there,
>
> I was hoping for a method (like archive_command) to handle logfile
> processing/archiving/compression, but unless doing it the logrotate way,
> I don’t see anything that postgresql provides. Is that correct?
>
> The closest I could find is: pg_rotate_logfile()… but here my question is
> where do I find the current active logfile(s) that postgresql is currently
> writing to?
> (At least that way I can handle all the files that that postgresql is not
> writing to :) )
>
> Hendrik
>
>
>
I use logging_collector + log_rotation_age + log_filename +
log_min_duration_statement
[1]

Using those options PG automatically rotates and keep them for a week or
more if you specified it.

[1] https://www.postgresql.org/docs/9.6/static/runtime-config-logging.html

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message hvjunk 2017-06-22 02:16:54 Re: current postgresql logfile being written to?
Previous Message Maeldron T. 2017-06-22 02:04:19 Fwd: Streaming replication bandwith per table