Re: log_destination reload/restart doesn't stop file creation

From: Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>
To: Thom Brown <thom(at)linux(dot)com>
Cc: PostgreSQL Bugs <pgsql-bugs(at)postgresql(dot)org>
Subject: Re: log_destination reload/restart doesn't stop file creation
Date: 2018-09-18 08:43:18
Message-ID: CAA4eK1L95f5F6w1Nc-P3_iww7rEst4ymJNX4XddKt8oPYKCB5Q@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

On Tue, Aug 14, 2018 at 6:03 PM Thom Brown <thom(at)linux(dot)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

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Terence Zekveld 2018-09-18 10:32:02 RE: BUG #15384: dropping views and materialized views
Previous Message Tom Lane 2018-09-18 03:45:05 Re: BUG #15388: time convert error when use AT TIME ZONE '+8'