*** pgsql/src/backend/access/transam/xlog.c 2008/05/12 19:45:23 1.307 --- pgsql/src/backend/access/transam/xlog.c 2008/05/13 20:53:52 1.308 *************** *** 7,13 **** * Portions Copyright (c) 1996-2008, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * ! * $PostgreSQL: pgsql/src/backend/access/transam/xlog.c,v 1.306 2008/05/12 16:06:09 alvherre Exp $ * *------------------------------------------------------------------------- */ --- 7,13 ---- * Portions Copyright (c) 1996-2008, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * ! * $PostgreSQL: pgsql/src/backend/access/transam/xlog.c,v 1.307 2008/05/12 19:45:23 mha Exp $ * *------------------------------------------------------------------------- */ *************** got_record:; *** 3334,3341 **** return (XLogRecord *) buffer; next_record_is_invalid:; ! close(readFile); ! readFile = -1; nextRecord = NULL; return NULL; } --- 3334,3344 ---- return (XLogRecord *) buffer; next_record_is_invalid:; ! if (readFile >= 0) ! { ! close(readFile); ! readFile = -1; ! } nextRecord = NULL; return NULL; }