? pg_standby.c.patch
Index: pg_standby.c
===================================================================
RCS file: /projects/cvsroot/pgsql/contrib/pg_standby/pg_standby.c,v
retrieving revision 1.2
diff -u -c -r1.2 pg_standby.c
*** pg_standby.c	10 Feb 2007 19:52:45 -0000	1.2
--- pg_standby.c	20 Feb 2007 19:58:04 -0000
***************
*** 264,273 ****
  #else
  					snprintf(WALFilePath, MAXPGPATH, "%s/%s", archiveLocation, xlde->d_name);
  #endif
- 					rc = unlink(WALFilePath);
  
  					if (debug)
! 					   	fprintf(stderr, "\npg_standby: removed \"%s\"\n", WALFilePath);
  				}
  			}
  		}
--- 264,278 ----
  #else
  					snprintf(WALFilePath, MAXPGPATH, "%s/%s", archiveLocation, xlde->d_name);
  #endif
  
  					if (debug)
! 					   	fprintf(stderr, "\npg_standby: removing \"%s\"\n", WALFilePath);
! 
! 					rc = unlink(WALFilePath);
! 					if (rc !=0 )
! 						fprintf(stderr, "\npg_standby: ERROR failed to remove \"%s\" because %s\n", WALFilePath,  strerror(errno));
! 
! 
  				}
  			}
  		}
***************
*** 315,321 ****
  		rc = unlink(triggerPath);
  		if (rc != 0)
  		{
! 			fprintf(stderr, "\n ERROR: unable to remove \"%s\", rc=%d", triggerPath, rc);
  			fflush(stderr);
  			exit(rc);
  		}
--- 320,326 ----
  		rc = unlink(triggerPath);
  		if (rc != 0)
  		{
! 			fprintf(stderr, "\n ERROR: unable to remove \"%s\", because %s", triggerPath, strerror(errno));
  			fflush(stderr);
  			exit(rc);
  		}
