Other callers of that function do things this way, but this one didn't
get the memo.
/* 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));
+ }
}
/*