Re: Feature request -- Log Database Name

From: ohp(at)pyrenet(dot)fr
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Robert Treat <xzilla(at)users(dot)sourceforge(dot)net>, Larry Rosenman <ler(at)lerctr(dot)org>, Josh Berkus <josh(at)agliodbs(dot)com>, pgsql-hackers list <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Feature request -- Log Database Name
Date: 2003-07-30 14:00:53
Message-ID: Pine.UW2.4.53.0307301553230.20499@server.pyrenet.fr
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Mon, 28 Jul 2003, Tom Lane wrote:

> Date: Mon, 28 Jul 2003 21:39:23 -0400
> From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
> To: Robert Treat <xzilla(at)users(dot)sourceforge(dot)net>
> Cc: ohp(at)pyrenet(dot)fr, Larry Rosenman <ler(at)lerctr(dot)org>,
> Josh Berkus <josh(at)agliodbs(dot)com>,
> pgsql-hackers list <pgsql-hackers(at)postgresql(dot)org>
> Subject: Re: [HACKERS] Feature request -- Log Database Name
>
> Robert Treat <xzilla(at)users(dot)sourceforge(dot)net> writes:
> > I think better would be a GUC "log_to_table" which wrote all standard
> > out/err to a pg_log table. of course, I doubt you could make this
> > foolproof (how to log startup errors in this table?) but it could be a
> > start.
>
> How would a failed transaction make any entries in such a table? How
> would you handle maintenance operations on the table that require
> exclusive lock? (vacuum full, reindex, etc)
>
> It seems possible that you could make this work if you piped stderr to a
> buffering process that was itself a database client, and issued INSERTs
> to put the rows into the table, and could buffer pending data whenever
> someone else had the table locked (eg for vacuum). I'd not care to try
> to get backends to do it locally.
>
> regards, tom lane
Not quite, my goal is to have a log per database, the stderr dosn't
contain enough information to split it.

As an ISP, I would like that each customer having one or more databases
being able to see any error on their database.
I imagine have a log file per database would be toot complicated...
>

--
Olivier PRENANT Tel: +33-5-61-50-97-00 (Work)
6, Chemin d'Harraud Turrou +33-5-61-50-97-01 (Fax)
31190 AUTERIVE +33-6-07-63-80-64 (GSM)
FRANCE Email: ohp(at)pyrenet(dot)fr
------------------------------------------------------------------------------
Make your life a dream, make your dream a reality. (St Exupery)

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2003-07-30 14:39:21 Re: using adbin, conbin, etc.
Previous Message Patrick Welche 2003-07-30 13:50:11 Re: Upgrading my BSDI box, again