From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Shira Bezalel <shira(at)sfei(dot)org> |
Cc: | pgsql-novice(at)postgresql(dot)org |
Subject: | Re: question about logging_collector |
Date: | 2012-08-29 15:03:15 |
Message-ID: | 10044.1346252595@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-novice |
Shira Bezalel <shira(at)sfei(dot)org> writes:
> The documentation states about the logging collector:
> "Note: It is possible to log to stderr without using the logging collector; the log messages will just go to wherever the server's stderr is directed. However, that method is only suitable for low log volumes, since it provides no convenient way to rotate log files. Also, on some platforms not using the logging collector can result in lost or garbled log output, because multiple processes writing concurrently to the same log file can overwrite each other's output."
> (From here: http://www.postgresql.org/docs/9.1/interactive/runtime-config-logging.html)
> By "multiple processes", does this refer to multiple postgresql servers running on the same machine?
No, it's referring to the fact that the server is made up of multiple
processes.
If you log to stderr without any collector, you almost certainly will
sometimes get garbled output (e.g. messages from different subprocesses
getting interleaved). IME this is not a big deal if you're only
occasionally inspecting the log by eyeball --- I generally run all
my development servers that way, and seldom see the problem. However,
if you're ever trying to machine-parse the logs, say with pgfouine,
even infrequent interleavings can be a problem.
regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | Bruce Momjian | 2012-08-29 16:40:55 | Re: using index "pg_toast_..." despite IgnoreSystemIndexes |
Previous Message | Abhijeet R | 2012-08-29 13:58:24 | Batch updates to 1 column using python-pgsql in multiple rows |