Skip to content

Commit 3c093ff

Browse files
committed
Clarify some error messages
1 parent 5c398e6 commit 3c093ff

File tree

5 files changed

+19
-19
lines changed

5 files changed

+19
-19
lines changed

src/backend/port/win32/security.c

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
* Portions Copyright (c) 1996-2004, PostgreSQL Global Development Group
77
*
88
* IDENTIFICATION
9-
* $PostgreSQL: pgsql/src/backend/port/win32/security.c,v 1.5 2004/10/12 21:54:39 petere Exp $
9+
* $PostgreSQL: pgsql/src/backend/port/win32/security.c,v 1.6 2004/11/09 13:01:25 petere Exp $
1010
*
1111
*-------------------------------------------------------------------------
1212
*/
@@ -36,7 +36,7 @@ pgwin32_is_admin(void)
3636

3737
if (!OpenProcessToken(GetCurrentProcess(), TOKEN_READ, &AccessToken))
3838
{
39-
write_stderr("could not open process token: %d\n",
39+
write_stderr("could not open process token: error code %d\n",
4040
(int) GetLastError());
4141
exit(1);
4242
}
@@ -49,7 +49,7 @@ pgwin32_is_admin(void)
4949

5050
if (GetLastError() != ERROR_INSUFFICIENT_BUFFER)
5151
{
52-
write_stderr("could not get token information: %d\n",
52+
write_stderr("could not get token information: error code %d\n",
5353
(int) GetLastError());
5454
exit(1);
5555
}
@@ -66,7 +66,7 @@ pgwin32_is_admin(void)
6666
if (!GetTokenInformation(AccessToken, TokenGroups, InfoBuffer,
6767
InfoBufferSize, &InfoBufferSize))
6868
{
69-
write_stderr("could not get token information: %d\n",
69+
write_stderr("could not get token information: error code %d\n",
7070
(int) GetLastError());
7171
exit(1);
7272
}
@@ -77,7 +77,7 @@ pgwin32_is_admin(void)
7777
SECURITY_BUILTIN_DOMAIN_RID, DOMAIN_ALIAS_RID_ADMINS, 0, 0, 0, 0, 0,
7878
0, &AdministratorsSid))
7979
{
80-
write_stderr("could not get SID for Administrators group: %d\n",
80+
write_stderr("could not get SID for Administrators group: error code %d\n",
8181
(int) GetLastError());
8282
exit(1);
8383
}
@@ -86,7 +86,7 @@ pgwin32_is_admin(void)
8686
SECURITY_BUILTIN_DOMAIN_RID, DOMAIN_ALIAS_RID_POWER_USERS, 0, 0, 0, 0, 0,
8787
0, &PowerUsersSid))
8888
{
89-
write_stderr("could not get SID for PowerUsers group: %d\n",
89+
write_stderr("could not get SID for PowerUsers group: error code %d\n",
9090
(int) GetLastError());
9191
exit(1);
9292
}
@@ -146,15 +146,15 @@ pgwin32_is_service(void)
146146

147147
if (!OpenProcessToken(GetCurrentProcess(), TOKEN_READ, &AccessToken))
148148
{
149-
fprintf(stderr, "could not open process token: %d\n",
149+
fprintf(stderr, "could not open process token: error code %d\n",
150150
(int) GetLastError());
151151
return -1;
152152
}
153153

154154
/* First check for local system */
155155
if (!GetTokenInformation(AccessToken, TokenUser, InfoBuffer, 1024, &InfoBufferSize))
156156
{
157-
fprintf(stderr, "could not get token information: %d\n",
157+
fprintf(stderr, "could not get token information: error code %d\n",
158158
(int) GetLastError());
159159
return -1;
160160
}
@@ -181,7 +181,7 @@ pgwin32_is_service(void)
181181
/* Now check for group SID */
182182
if (!GetTokenInformation(AccessToken, TokenGroups, InfoBuffer, 1024, &InfoBufferSize))
183183
{
184-
fprintf(stderr, "could not get token information: %d\n",
184+
fprintf(stderr, "could not get token information: error code %d\n",
185185
(int) GetLastError());
186186
return -1;
187187
}

src/backend/port/win32/signal.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
* Portions Copyright (c) 1996-2004, PostgreSQL Global Development Group
77
*
88
* IDENTIFICATION
9-
* $PostgreSQL: pgsql/src/backend/port/win32/signal.c,v 1.8 2004/10/12 21:54:39 petere Exp $
9+
* $PostgreSQL: pgsql/src/backend/port/win32/signal.c,v 1.9 2004/11/09 13:01:25 petere Exp $
1010
*
1111
*-------------------------------------------------------------------------
1212
*/
@@ -224,7 +224,7 @@ pg_signal_thread(LPVOID param)
224224
PIPE_UNLIMITED_INSTANCES, 16, 16, 1000, NULL);
225225
if (pipe == INVALID_HANDLE_VALUE)
226226
{
227-
write_stderr("could not create signal listener pipe: %d; retrying\n", (int) GetLastError());
227+
write_stderr("could not create signal listener pipe: error code %d; retrying\n", (int) GetLastError());
228228
SleepEx(500, FALSE);
229229
continue;
230230
}
@@ -236,7 +236,7 @@ pg_signal_thread(LPVOID param)
236236
(LPTHREAD_START_ROUTINE) pg_signal_dispatch_thread,
237237
(LPVOID) pipe, 0, NULL);
238238
if (hThread == INVALID_HANDLE_VALUE)
239-
write_stderr("could not create signal dispatch thread: %d\n",
239+
write_stderr("could not create signal dispatch thread: error code %d\n",
240240
(int) GetLastError());
241241
else
242242
CloseHandle(hThread);

src/backend/postmaster/pgarch.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
*
2020
*
2121
* IDENTIFICATION
22-
* $PostgreSQL: pgsql/src/backend/postmaster/pgarch.c,v 1.9 2004/08/29 05:06:46 momjian Exp $
22+
* $PostgreSQL: pgsql/src/backend/postmaster/pgarch.c,v 1.10 2004/11/09 13:01:26 petere Exp $
2323
*
2424
*-------------------------------------------------------------------------
2525
*/
@@ -389,7 +389,7 @@ pgarch_ArchiverCopyLoop(void)
389389
if (++failures >= NUM_ARCHIVE_RETRIES)
390390
{
391391
ereport(WARNING,
392-
(errmsg("transaction log file \"%s\" could not be archived",
392+
(errmsg("transaction log file \"%s\" could not be archived: too many failures",
393393
xlog)));
394394
return; /* give up archiving for now */
395395
}

src/backend/postmaster/postmaster.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
*
3838
*
3939
* IDENTIFICATION
40-
* $PostgreSQL: pgsql/src/backend/postmaster/postmaster.c,v 1.436 2004/11/02 03:34:50 momjian Exp $
40+
* $PostgreSQL: pgsql/src/backend/postmaster/postmaster.c,v 1.437 2004/11/09 13:01:26 petere Exp $
4141
*
4242
* NOTES
4343
*
@@ -2847,7 +2847,7 @@ internal_forkexec(int argc, char *argv[], Port *port)
28472847
if (execv(postgres_exec_path, argv) < 0)
28482848
{
28492849
ereport(LOG,
2850-
(errmsg("could not exec backend process \"%s\": %m",
2850+
(errmsg("could not execute server process \"%s\": %m",
28512851
postgres_exec_path)));
28522852
/* We're already in the child process here, can't return */
28532853
exit(1);
@@ -3760,7 +3760,7 @@ win32_sigchld_waiter(LPVOID param)
37603760
if (r == WAIT_OBJECT_0)
37613761
pg_queue_signal(SIGCHLD);
37623762
else
3763-
write_stderr("could not wait on child process handle: %d\n",
3763+
write_stderr("could not wait on child process handle: error code %d\n",
37643764
(int) GetLastError());
37653765
CloseHandle(procHandle);
37663766
return 0;

src/backend/postmaster/syslogger.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
*
1919
*
2020
* IDENTIFICATION
21-
* $PostgreSQL: pgsql/src/backend/postmaster/syslogger.c,v 1.10 2004/10/12 21:54:40 petere Exp $
21+
* $PostgreSQL: pgsql/src/backend/postmaster/syslogger.c,v 1.11 2004/11/09 13:01:27 petere Exp $
2222
*
2323
*-------------------------------------------------------------------------
2424
*/
@@ -416,7 +416,7 @@ SysLogger_Start(void)
416416
if (!CreatePipe(&syslogPipe[0], &syslogPipe[1], &sa, 32768))
417417
ereport(FATAL,
418418
(errcode_for_file_access(),
419-
(errmsg("could not create pipe for syslogging: %m"))));
419+
(errmsg("could not create pipe for syslog: %m"))));
420420
}
421421
#endif
422422

0 commit comments

Comments
 (0)