Re: Feature request -- Log Database Name - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Feature request -- Log Database Name
Date
Msg-id 17252.1059442763@sss.pgh.pa.us
Whole thread Raw
In response to Re: Feature request -- Log Database Name  (Robert Treat <xzilla@users.sourceforge.net>)
Responses Re: Feature request -- Log Database Name  (ohp@pyrenet.fr)
List pgsql-hackers
Robert Treat <xzilla@users.sourceforge.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


pgsql-hackers by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: Regression test failure date.
Next
From: "Shridhar Daithankar"
Date:
Subject: Re: Doubt w.r.t vacuum