From: | Michael Glaesemann <grzm(at)seespotcode(dot)net> |
---|---|
To: | Takahiro Itagaki <itagaki(dot)takahiro(at)oss(dot)ntt(dot)co(dot)jp> |
Cc: | "Kevin Grittner" <Kevin(dot)Grittner(at)wicourts(dot)gov>, <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Additional startup logging |
Date: | 2010-07-01 03:39:42 |
Message-ID: | 476C109A-ADF9-4549-800A-50BF139D159A@seespotcode.net |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Jun 30, 2010, at 22:43 , Takahiro Itagaki wrote:
>
> "Kevin Grittner" <Kevin(dot)Grittner(at)wicourts(dot)gov> wrote:
>
>> It seems potentially useful to LOG the version() string in the log
>> file during startup. It might also help to LOG any settings which
>> might result in the loss of committed transactions or in database
>> corruption during startup. (After a crash, the postgresql.conf file
>> might not show the values which were in effect during startup, and
>> it is too late to "show" the values.)
>
> I think such logs depends on purposes, so they should be customizable.
>
> You could write a module, that is registered in 'shared_preload_libraries'
> and logs internal information you want from _PG_init() or shmem_startup_hook.
For long-running systems, you may not have the beginning of the log file. Perhaps a method of dumping the version and/or setting information on demand (or perhaps at the beginning of each log file?): Shouldn't be too hard to put together a function which prints out such information via RAISE even now using PL/pgSQL.
Michael Glaesemann
grzm seespotcode net
From | Date | Subject | |
---|---|---|---|
Next Message | Fujii Masao | 2010-07-01 04:09:37 | Re: Streaming Replication: Checkpoint_segment and wal_keep_segments on standby |
Previous Message | Mark Wong | 2010-07-01 03:24:18 | Re: parallelizing subplan execution (was: explain and PARAM_EXEC) |