From 7ce822372f2b701f5e7140e3275e0fa21b0fbe63 Mon Sep 17 00:00:00 2001 From: Bruce Momjian Date: Tue, 23 Mar 2004 05:27:02 +0000 Subject: [PATCH] fflush() FILE buffer to descriptor so stat call gets proper size in fseeko.c. Fixed problem with pg_dump tar backups. Only happens on platforms that use our port/fseeko.c, which is currently BSD/OS and NetBSD. --- src/port/fseeko.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/port/fseeko.c b/src/port/fseeko.c index 3b43d3051b9..ac18d7bfa0e 100644 --- a/src/port/fseeko.c +++ b/src/port/fseeko.c @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/port/fseeko.c,v 1.12 2003/08/04 02:40:20 momjian Exp $ + * $PostgreSQL: pgsql/src/port/fseeko.c,v 1.12.4.1 2004/03/23 05:27:02 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -68,6 +68,7 @@ fseeko(FILE *stream, off_t offset, int whence) #ifdef bsdi flockfile(stream); #endif + fflush(stream); /* force writes to fd for stat() */ if (fstat(fileno(stream), &filestat) != 0) goto failure; floc = filestat.st_size; -- 2.39.5