@@ -140,7 +140,7 @@ init_parallel_dump_utils(void)
140140 err = WSAStartup (MAKEWORD (2 , 2 ), & wsaData );
141141 if (err != 0 )
142142 {
143- fprintf (stderr , _ ("WSAStartup failed: %d\n" ), err );
143+ fprintf (stderr , _ ("%s: WSAStartup failed: %d\n" ), progname , err );
144144 exit_nicely (1 );
145145 }
146146 on_exit_nicely (shutdown_parallel_dump_utils , NULL );
@@ -532,7 +532,7 @@ ParallelBackupStart(ArchiveHandle *AH, RestoreOptions *ropt)
532532
533533 if (pgpipe (pipeMW ) < 0 || pgpipe (pipeWM ) < 0 )
534534 exit_horribly (modulename ,
535- "Cannot create communication channels: %s\n" ,
535+ "could not create communication channels: %s\n" ,
536536 strerror (errno ));
537537
538538 pstate -> parallelSlot [i ].workerStatus = WRKR_IDLE ;
@@ -819,7 +819,7 @@ lockTableNoWait(ArchiveHandle *AH, TocEntry *te)
819819
820820 if (!res || PQresultStatus (res ) != PGRES_TUPLES_OK )
821821 exit_horribly (modulename ,
822- "could not get relation name for oid %d : %s\n" ,
822+ "could not get relation name for OID %u : %s\n" ,
823823 te -> catalogId .oid , PQerrorMessage (AH -> connection ));
824824
825825 resetPQExpBuffer (query );
@@ -836,9 +836,9 @@ lockTableNoWait(ArchiveHandle *AH, TocEntry *te)
836836
837837 if (!res || PQresultStatus (res ) != PGRES_COMMAND_OK )
838838 exit_horribly (modulename ,
839- "could not obtain lock on relation \"%s\". This "
840- " usually means that someone requested an ACCESS EXCLUSIVE lock "
841- "on the table after the pg_dump parent process has gotten the "
839+ "could not obtain lock on relation \"%s\"\n "
840+ "This usually means that someone requested an ACCESS EXCLUSIVE lock "
841+ "on the table after the pg_dump parent process had gotten the "
842842 "initial ACCESS SHARE lock on the table.\n" , qualId );
843843
844844 PQclear (res );
@@ -920,7 +920,7 @@ WaitForCommands(ArchiveHandle *AH, int pipefd[2])
920920 }
921921 else
922922 exit_horribly (modulename ,
923- "Unknown command on communication channel: %s\n" ,
923+ "unrecognized command on communication channel: %s\n" ,
924924 command );
925925 }
926926}
@@ -950,7 +950,7 @@ ListenToWorkers(ArchiveHandle *AH, ParallelState *pstate, bool do_wait)
950950 if (!msg )
951951 {
952952 if (do_wait )
953- exit_horribly (modulename , "A worker process died unexpectedly\n" );
953+ exit_horribly (modulename , "a worker process died unexpectedly\n" );
954954 return ;
955955 }
956956
@@ -977,7 +977,7 @@ ListenToWorkers(ArchiveHandle *AH, ParallelState *pstate, bool do_wait)
977977 }
978978 else
979979 exit_horribly (modulename ,
980- "Invalid message received from worker: %s\n" , msg );
980+ "invalid message received from worker: %s\n" , msg );
981981 }
982982 else if (messageStartsWith (msg , "ERROR " ))
983983 {
@@ -986,7 +986,7 @@ ListenToWorkers(ArchiveHandle *AH, ParallelState *pstate, bool do_wait)
986986 exit_horribly (modulename , "%s" , msg + strlen ("ERROR " ));
987987 }
988988 else
989- exit_horribly (modulename , "Invalid message received from worker: %s\n" , msg );
989+ exit_horribly (modulename , "invalid message received from worker: %s\n" , msg );
990990
991991 /* both Unix and Win32 return pg_malloc()ed space, so we free it */
992992 free (msg );
@@ -1035,7 +1035,7 @@ EnsureIdleWorker(ArchiveHandle *AH, ParallelState *pstate)
10351035 while ((ret_worker = ReapWorkerStatus (pstate , & work_status )) != NO_SLOT )
10361036 {
10371037 if (work_status != 0 )
1038- exit_horribly (modulename , "Error processing a parallel work item. \n" );
1038+ exit_horribly (modulename , "error processing a parallel work item\n" );
10391039
10401040 nTerm ++ ;
10411041 }
@@ -1079,7 +1079,7 @@ EnsureWorkersFinished(ArchiveHandle *AH, ParallelState *pstate)
10791079 ListenToWorkers (AH , pstate , true);
10801080 else if (work_status != 0 )
10811081 exit_horribly (modulename ,
1082- "Error processing a parallel work item\n" );
1082+ "error processing a parallel work item\n" );
10831083 }
10841084}
10851085
@@ -1107,7 +1107,7 @@ sendMessageToMaster(int pipefd[2], const char *str)
11071107
11081108 if (pipewrite (pipefd [PIPE_WRITE ], str , len ) != len )
11091109 exit_horribly (modulename ,
1110- "Error writing to the communication channel: %s\n" ,
1110+ "could not write to the communication channel: %s\n" ,
11111111 strerror (errno ));
11121112}
11131113
@@ -1208,7 +1208,7 @@ getMessageFromWorker(ParallelState *pstate, bool do_wait, int *worker)
12081208 }
12091209
12101210 if (i < 0 )
1211- exit_horribly (modulename , "Error in ListenToWorkers(): %s" , strerror (errno ));
1211+ exit_horribly (modulename , "error in ListenToWorkers(): %s\n " , strerror (errno ));
12121212
12131213 for (i = 0 ; i < pstate -> numWorkers ; i ++ )
12141214 {
@@ -1245,7 +1245,7 @@ sendMessageToWorker(ParallelState *pstate, int worker, const char *str)
12451245 if (!aborting )
12461246#endif
12471247 exit_horribly (modulename ,
1248- "Error writing to the communication channel: %s\n" ,
1248+ "could not write to the communication channel: %s\n" ,
12491249 strerror (errno ));
12501250 }
12511251}
@@ -1319,7 +1319,7 @@ pgpipe(int handles[2])
13191319
13201320 if ((s = socket (AF_INET , SOCK_STREAM , 0 )) == INVALID_SOCKET )
13211321 {
1322- write_msg (modulename , "pgpipe could not create socket: %ui " ,
1322+ write_msg (modulename , "pgpipe: could not create socket: error code %d\n " ,
13231323 WSAGetLastError ());
13241324 return -1 ;
13251325 }
@@ -1330,43 +1330,43 @@ pgpipe(int handles[2])
13301330 serv_addr .sin_addr .s_addr = htonl (INADDR_LOOPBACK );
13311331 if (bind (s , (SOCKADDR * ) & serv_addr , len ) == SOCKET_ERROR )
13321332 {
1333- write_msg (modulename , "pgpipe could not bind: %ui " ,
1333+ write_msg (modulename , "pgpipe: could not bind: error code %d\n " ,
13341334 WSAGetLastError ());
13351335 closesocket (s );
13361336 return -1 ;
13371337 }
13381338 if (listen (s , 1 ) == SOCKET_ERROR )
13391339 {
1340- write_msg (modulename , "pgpipe could not listen: %ui " ,
1340+ write_msg (modulename , "pgpipe: could not listen: error code %d\n " ,
13411341 WSAGetLastError ());
13421342 closesocket (s );
13431343 return -1 ;
13441344 }
13451345 if (getsockname (s , (SOCKADDR * ) & serv_addr , & len ) == SOCKET_ERROR )
13461346 {
1347- write_msg (modulename , "pgpipe could not getsockname: %ui " ,
1347+ write_msg (modulename , "pgpipe: getsockname() failed: error code %d\n " ,
13481348 WSAGetLastError ());
13491349 closesocket (s );
13501350 return -1 ;
13511351 }
13521352 if ((handles [1 ] = socket (PF_INET , SOCK_STREAM , 0 )) == INVALID_SOCKET )
13531353 {
1354- write_msg (modulename , "pgpipe could not create socket 2: %ui " ,
1354+ write_msg (modulename , "pgpipe: could not create second socket: error code %d\n " ,
13551355 WSAGetLastError ());
13561356 closesocket (s );
13571357 return -1 ;
13581358 }
13591359
13601360 if (connect (handles [1 ], (SOCKADDR * ) & serv_addr , len ) == SOCKET_ERROR )
13611361 {
1362- write_msg (modulename , "pgpipe could not connect socket: %ui " ,
1362+ write_msg (modulename , "pgpipe: could not connect socket: error code %d\n " ,
13631363 WSAGetLastError ());
13641364 closesocket (s );
13651365 return -1 ;
13661366 }
13671367 if ((handles [0 ] = accept (s , (SOCKADDR * ) & serv_addr , & len )) == INVALID_SOCKET )
13681368 {
1369- write_msg (modulename , "pgpipe could not accept socket: %ui " ,
1369+ write_msg (modulename , "pgpipe: could not accept connection: error code %d\n " ,
13701370 WSAGetLastError ());
13711371 closesocket (handles [1 ]);
13721372 handles [1 ] = INVALID_SOCKET ;
0 commit comments