Fix for fseeko.c and pg_dump -Ft

Started by Bruce Momjianover 22 years ago1 messagespatches
Jump to latest
#1Bruce Momjian
bruce@momjian.us

I just fixed a problem with our port/fseeko.c code.

I added an fflush() so the FILE buffer would update the file descriptor
so stat() gets proper size in fseeko.c.

This fixes a problem with pg_dump tar backups. Only happens on
platforms that use our port/fseeko.c, which is currently BSD/OS and
NetBSD. The error would be:

$ pg_dump -Ft test >/dev/null
pg_dump: [tar archiver] actual file length (2171) does not match
expected (2171)

Backpatched to 7.4.X too.

-- 
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 359-1001
  +  If your life is a hard drive,     |  13 Roberts Road
  +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073

Attachments:

/bjm/difftext/plainDownload+1-0