pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Andy Shellam <andy.shellam-lists@mailnetwork.co.uk>
Cc: pgsql-admin@postgresql.org
Subject: Re: 8.3 RC1 - Logging and filenames
Date: Thu, 10 Jan 2008 19:08:57 -0500
Message-ID: <12716.1200010137@sss.pgh.pa.us> (raw)
In-Reply-To: <33671a790801101445j7f3c8644wf41c1e6fced8bedc@mail.gmail.com>
References: <33671a790801101445j7f3c8644wf41c1e6fced8bedc@mail.gmail.com>

"Andy Shellam" <andy.shellam-lists@mailnetwork.co.uk> writes:
> What I want PostgreSQL to do is put a log file "postgresql.log" in
> "/var/log/pgsql" - I have an application that handles log rotations, so
> would prefer to do it with that, rather than have PostgreSQL do the
> rotation.

You don't really have any choice about the matter --- Postgres will not
use a single fixed filename because that would be guaranteed to lose log
entries across a rotation.

> I would have thought my config shown below would have made this happen, but
> it doesn't appear so.  Instead PostgreSQL creates a file called "
> postgresql.log.1200003749" in /var/log/pgsql.

> Best of it is, I cannot work out what those numbers mean.

Per the documentation, Postgres appends the Unix epoch of the file's
creation time if the given pattern hasn't got any %-escapes.
Looks like that corresponds to Thu Jan 10 2008, 17:22:29 EST.

			regards, tom lane



view thread (6+ messages)  latest in thread

Message-ID: <12716.1200010137@sss.pgh.pa.us>
Permalink:  ../12716.1200010137@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/12716.1200010137@sss.pgh.pa.us

 · 

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 using the --to and --cc options:
  reply via email

  To: pgsql-admin@postgresql.org
  Cc: tgl@sss.pgh.pa.us, andy.shellam-lists@mailnetwork.co.uk
  Subject: Re: 8.3 RC1 - Logging and filenames
  In-Reply-To: <12716.1200010137@sss.pgh.pa.us>

* 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