mirror of https://github.com/postgres/postgres.git
From: Bryan Henderson <bryanh@giraffe.netgate.net>
The attached patch makes elog() write the message to stderr if there is no frontend to talk to.REL6_4
parent
8d0fe2d0d4
commit
213d7b1ae3
|
|
@ -7,7 +7,7 @@
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
* IDENTIFICATION
|
* IDENTIFICATION
|
||||||
* $Header: /cvsroot/pgsql/src/backend/utils/error/elog.c,v 1.19 1997/09/08 02:31:27 momjian Exp $
|
* $Header: /cvsroot/pgsql/src/backend/utils/error/elog.c,v 1.20 1997/11/09 04:43:35 scrappy Exp $
|
||||||
*
|
*
|
||||||
*-------------------------------------------------------------------------
|
*-------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
|
|
@ -162,6 +162,12 @@ elog(int lev, const char *fmt,...)
|
||||||
pq_putstr(line);
|
pq_putstr(line);
|
||||||
pq_flush();
|
pq_flush();
|
||||||
}
|
}
|
||||||
|
if (Pfout == NULL) {
|
||||||
|
/* There is no socket. One explanation for this is we are running
|
||||||
|
as the Postmaster. So we'll write the message to stderr.
|
||||||
|
*/
|
||||||
|
fputs(line, stderr);
|
||||||
|
}
|
||||||
#endif /* !PG_STANDALONE */
|
#endif /* !PG_STANDALONE */
|
||||||
|
|
||||||
if (lev == WARN)
|
if (lev == WARN)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue