mirror of
https://github.com/postgres/postgres.git
synced 2025-05-29 16:21:20 +03:00
pg_dump: Have _EndLO report errno after CFH->write_func() failure
Other callers of that function do things this way, but this one didn't get the memo.
This commit is contained in:
parent
69c430626b
commit
98bd4c72fd
@ -697,7 +697,13 @@ _EndLO(ArchiveHandle *AH, TocEntry *te, Oid oid)
|
||||
/* register the LO in blobs.toc */
|
||||
len = snprintf(buf, sizeof(buf), "%u blob_%u.dat\n", oid, oid);
|
||||
if (!CFH->write_func(buf, len, CFH))
|
||||
pg_fatal("could not write to LOs TOC file");
|
||||
{
|
||||
/* if write didn't set errno, assume problem is no disk space */
|
||||
if (errno == 0)
|
||||
errno = ENOSPC;
|
||||
pg_fatal("could not write to LOs TOC file: %s",
|
||||
CFH->get_error_func(CFH));
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
|
Loading…
x
Reference in New Issue
Block a user