13
13
*
14
14
*Copyright (c) 2001-2004, PostgreSQL Global Development Group
15
15
*
16
- *$PostgreSQL: pgsql/src/backend/postmaster/pgstat.c,v 1.85 2004/11/17 00:14:12 tgl Exp $
16
+ *$PostgreSQL: pgsql/src/backend/postmaster/pgstat.c,v 1.86 2004/12/20 19:17:56 tgl Exp $
17
17
* ----------
18
18
*/
19
19
#include "postgres.h"
@@ -379,7 +379,7 @@ pgstat_init(void)
379
379
* errno will not be set meaningfully here, so don't use it.
380
380
*/
381
381
ereport (LOG ,
382
- (ERRCODE_CONNECTION_FAILURE ,
382
+ (errcode ( ERRCODE_CONNECTION_FAILURE ) ,
383
383
errmsg ("test message did not get through on socket for statistics collector" )));
384
384
closesocket (pgStatSock );
385
385
pgStatSock = -1 ;
@@ -401,7 +401,7 @@ pgstat_init(void)
401
401
if (test_byte != TESTBYTEVAL )/* strictly paranoia ... */
402
402
{
403
403
ereport (LOG ,
404
- (ERRCODE_INTERNAL_ERROR ,
404
+ (errcode ( ERRCODE_INTERNAL_ERROR ) ,
405
405
errmsg ("incorrect test message transmission on socket for statistics collector" )));
406
406
closesocket (pgStatSock );
407
407
pgStatSock = -1 ;
@@ -414,12 +414,7 @@ pgstat_init(void)
414
414
415
415
/* Did we find a working address? */
416
416
if (!addr || pgStatSock < 0 )
417
- {
418
- ereport (LOG ,
419
- (errcode_for_socket_access (),
420
- errmsg ("disabling statistics collector for lack of working socket" )));
421
417
gotostartup_failed ;
422
- }
423
418
424
419
/*
425
420
* Set the socket to non-blocking IO. This ensures that if the
@@ -440,6 +435,9 @@ pgstat_init(void)
440
435
return ;
441
436
442
437
startup_failed :
438
+ ereport (LOG ,
439
+ (errmsg ("disabling statistics collector for lack of working socket" )));
440
+
443
441
if (addrs )
444
442
freeaddrinfo_all (hints .ai_family ,addrs );
445
443