From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Andres Freund <andres(at)anarazel(dot)de> |
Cc: | Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>, Michael Paquier <michael(dot)paquier(at)gmail(dot)com>, kunschikov(at)gmail(dot)com, PostgreSQL mailing lists <pgsql-bugs(at)postgresql(dot)org> |
Subject: | Re: BUG #13888: pg_dump write error |
Date: | 2016-02-02 22:32:22 |
Message-ID: | 21643.1454452342@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-bugs |
Andres Freund <andres(at)anarazel(dot)de> writes:
> On February 2, 2016 10:12:54 PM GMT+01:00, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
>> ie, assume a short write implies out-of-disk-space. I believe that
>> is what we do in most (hopefully all) cases in the backend; see for
>> example UpdateControlFile() in xlog.c.
> There's an exception: when writing WAL we intentionally retry on short writes. IIRC Heikki added that after we found a case where large writes returned short, but non zero, and trying again to finish the rest works. I'm nor sure of there aren't other cases where that should be done, die to large writes.
I could support making pg_dump do that if there's a way to do it when
writing through zlib (which is probably the normal case these days).
I'm not at all sure that gzwrite() is retryable after a partial write;
that would likely have consequences for the internal state of the
compressor.
In any case, if you get nbytes == 0 and errno == 0, substituting ENOSPC
seems like the right thing.
regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2016-02-02 22:52:16 | Re: BUG #13908: Query returns too few rows |
Previous Message | Alvaro Herrera | 2016-02-02 22:31:35 | Re: BUG #13908: Query returns too few rows |