We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see ourdocumentation.
There was an error while loading.Please reload this page.
1 parente52c4a6 commit053981fCopy full SHA for 053981f
contrib/pg_standby/pg_standby.c
@@ -264,10 +264,15 @@ CustomizableCleanupPriorWALFiles(void)
264
#else
265
snprintf(WALFilePath,MAXPGPATH,"%s/%s",archiveLocation,xlde->d_name);
266
#endif
267
-rc=unlink(WALFilePath);
268
269
if (debug)
270
-fprintf(stderr,"\npg_standby: removed \"%s\"\n",WALFilePath);
+fprintf(stderr,"\npg_standby: removing \"%s\"\n",WALFilePath);
+
271
+rc=unlink(WALFilePath);
272
+if (rc!=0 )
273
+fprintf(stderr,"\npg_standby: ERROR failed to remove \"%s\" because %s\n",WALFilePath,strerror(errno));
274
275
276
}
277
278
@@ -315,7 +320,7 @@ CheckForExternalTrigger(void)
315
320
rc=unlink(triggerPath);
316
321
if (rc!=0)
317
322
{
318
-fprintf(stderr,"\n ERROR: unable to remove \"%s\",rc=%d",triggerPath,rc);
323
+fprintf(stderr,"\n ERROR: unable to remove \"%s\",because %s",triggerPath,strerror(errno));
319
324
fflush(stderr);
325
exit(rc);
326