pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Josh Berkus <josh@agliodbs.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Mark Kirkwood <mark.kirkwood@catalyst.net.nz>
Cc: pgsql-bugs@postgresql.org
Subject: Re: log_collector doesn't respond to reloads
Date: Thu, 26 Apr 2012 19:10:31 -0700
Message-ID: <4F9A0017.2070404@agliodbs.com> (raw)
In-Reply-To: <20084.1335491774@sss.pgh.pa.us>
References: <4F99E37E.30904@agliodbs.com>
	<18699.1335487841@sss.pgh.pa.us>
	<4F99F24A.3030507@agliodbs.com>
	<4F99F610.60109@catalyst.net.nz>
	<20084.1335491774@sss.pgh.pa.us>


> Whoever wrote that thought that Log_RotationAge/Log_RotationSize would
> get reset to normal values during SIGHUP, but it's far from clear to me
> that any such thing would actually happen.  However, this would only
> apply to Josh's problem if he was trying to set a bogus new value of
> log_directory, eg not there or not writable by postgres.  In any case,
> if this is the locus of the problem, there ought to be instances of that
> log message in the active log file.  (Josh?)

Aha.

Yeah, the problem is, directory permissions to the contrary, something
is preventing the logger from writing to that directory even though I
can do so as the logged-in postgres user.  I'll bet it's their SAN
dynamic mounter thing, given the trouble it's been before. *sigh*.

So this is an issue peculiar to their system, and not a general case.
Sorry for the noise.  I've seen transitory behavior like this before and
had hoped that I'd found a reproduceable test case.  But no.

We do have one piece of unituitive behavior here though, which forms a
bit of a catch-22:

1. DBA changes the log directory
2. Log directory is unwriteable
3. Postgres continues writing to the old log_directory
4. SHOW log_directory displays the *new* log_directory

I think (4) here needs to change.  We shouldn't be showing a different
log directory in pg_settings than we're actually writing to, ever.

Now, here's the Catch-22:

Consider the case that time elapses before anyone discovers that logs
are not being written to the new location, and you change personnel; how
would the new DBA have any idea where the old log was so that he could
read the log message about the unwriteable directory?

-- 
Josh Berkus
PostgreSQL Experts Inc.
http://pgexperts.com



view thread (16+ messages)  latest in thread

Message-ID: <4F9A0017.2070404@agliodbs.com>
Permalink:  ../4F9A0017.2070404@agliodbs.com/
Also on:    postgresql.org/message-id/4F9A0017.2070404@agliodbs.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-bugs@postgresql.org
  Cc: josh@agliodbs.com, tgl@sss.pgh.pa.us, mark.kirkwood@catalyst.net.nz
  Subject: Re: log_collector doesn't respond to reloads
  In-Reply-To: <4F9A0017.2070404@agliodbs.com>
  References: <4F99E37E.30904@agliodbs.com> <18699.1335487841@sss.pgh.pa.us> <4F99F24A.3030507@agliodbs.com> <4F99F610.60109@catalyst.net.nz> <20084.1335491774@sss.pgh.pa.us> <4F9A0017.2070404@agliodbs.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

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