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