On Tue, Aug 14, 2018 at 6:03 PM Thom Brown <thom@linux.com> wrote:
>
> Hi,
>
> I've tested the following on git head. When changing log_destination
> and reloading, the old destination file continues to be made, just not
> populated with anything. That means at every file rotation, 2 files
> are created.
>
> For example:
>
> log_destination = 'stderr'
>
> I get this in my log directory:
>
> postgresql-2018-08-14_131640.log
>
> If I change it to csvlog and reload, I end up with:
>
> 0 -rw------- 1 thom thom 0 Aug 14 13:19 postgresql-2018-08-14_131900.log
> 4 -rw------- 1 thom thom 194 Aug 14 13:19 postgresql-2018-08-14_131900.csv
>
> So I get the csv file, but it's still producing the .log file which
> remains 0 bytes. The same happens in reverse. (i.e. I end up with an
> empty .csv file and a populated .log file).
>
I don't see this problem happening when you are changing
log_destination from csvlog to stderr and reload the conf via
pg_reload_conf(). The reason why it is happening when log_destination
is set to csvlog is that there are some cases as explained in Kuntal's
email when we can only write in the log file. So, I don't see any bug
here, but I might be missing something here.
--
With Regards,
Amit Kapila.
EnterpriseDB: http://www.enterprisedb.com