pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
Logs vanish after partial log destination change
3+ messages / 2 participants
[nested] [flat]

* Logs vanish after partial log destination change
@ 2021-09-05 11:28  hubert depesz lubaczewski <depesz@depesz.com>
  0 siblings, 1 reply; 3+ messages in thread

From: hubert depesz lubaczewski @ 2021-09-05 11:28 UTC (permalink / raw)
  To: PostgreSQL mailing lists <pgsql-bugs@lists.postgresql.org>

Hi,
I'm not entirely sure if it's a bug, or what, but it caught me by
surprise.

Tested it on Linux, on 12.6 and 15devel.

I start with:
log_destination = 'syslog'
logging_collector = false

Logs to to syslog, all is well.

Then, I chance log_destination to 'csvlog' and logging_collector to
'on'.

And then I reload config.

I know I can chance log_destination, but I can't change
logging_collector. I assumed it means that logging will go to where they
did before.

But - logs are gone.
They are not in syslog. They are not in the new location.

When I tried it on test system with 15devel, I noticed by chance that
logs were redirected to terminal from which I issued `pg_ctl reload`
from. Well, that's hardly useful.

I'm not entirely sure what Pg should do in such case, perhaps just
restrict changing any log_* if one of changed gucs require restart?

But, it caught me by surprise, and figured that it might be problematic
for others too.

Best regards,

depesz






^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: Logs vanish after partial log destination change
@ 2021-09-05 14:24  Tom Lane <tgl@sss.pgh.pa.us>
  parent: hubert depesz lubaczewski <depesz@depesz.com>
  0 siblings, 1 reply; 3+ messages in thread

From: Tom Lane @ 2021-09-05 14:24 UTC (permalink / raw)
  To: depesz@depesz.com; +Cc: PostgreSQL mailing lists <pgsql-bugs@lists.postgresql.org>

hubert depesz lubaczewski <depesz@depesz.com> writes:
> I start with:
> log_destination = 'syslog'
> logging_collector = false

> Logs to to syslog, all is well.

> Then, I chance log_destination to 'csvlog' and logging_collector to
> 'on'.

> And then I reload config.

> I know I can chance log_destination, but I can't change
> logging_collector. I assumed it means that logging will go to where they
> did before.

No.  You effectively set log_destination to empty, since the csvlog
item is ignored if the logging collector isn't active.  That's not
a case that we should disallow, IMO.  I do not think there's anything
that we can do here that wouldn't make other use-cases worse.

			regards, tom lane





^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: Logs vanish after partial log destination change
@ 2021-09-06 07:57  hubert depesz lubaczewski <depesz@depesz.com>
  parent: Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 3+ messages in thread

From: hubert depesz lubaczewski @ 2021-09-06 07:57 UTC (permalink / raw)
  To: Tom Lane <tgl@sss.pgh.pa.us>; +Cc: PostgreSQL mailing lists <pgsql-bugs@lists.postgresql.org>

On Sun, Sep 05, 2021 at 10:24:35AM -0400, Tom Lane wrote:
> > I know I can chance log_destination, but I can't change
> > logging_collector. I assumed it means that logging will go to where they
> > did before.
> No.  You effectively set log_destination to empty, since the csvlog
> item is ignored if the logging collector isn't active.  That's not
> a case that we should disallow, IMO.  I do not think there's anything
> that we can do here that wouldn't make other use-cases worse.

Well, OK. Thanks,

depesz





^ permalink  raw  reply  [nested|flat] 3+ messages in thread


end of thread, other threads:[~2021-09-06 07:57 UTC | newest]

Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2021-09-05 11:28 Logs vanish after partial log destination change hubert depesz lubaczewski <depesz@depesz.com>
2021-09-05 14:24 ` Tom Lane <tgl@sss.pgh.pa.us>
2021-09-06 07:57   ` hubert depesz lubaczewski <depesz@depesz.com>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox