From: | Kyotaro Horiguchi <horikyota(dot)ntt(at)gmail(dot)com> |
---|---|
To: | michael(at)paquier(dot)xyz |
Cc: | hjp-pgsql(at)hjp(dot)at, pgsql-general(at)lists(dot)postgresql(dot)org, pgsql-hackers(at)lists(dot)postgresql(dot)org |
Subject: | Re: pg_restore: could not close data file: Success |
Date: | 2020-04-16 09:19:45 |
Message-ID: | 20200416.181945.759179589924840062.horikyota.ntt@gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general pgsql-hackers |
At Thu, 16 Apr 2020 14:40:09 +0900, Michael Paquier <michael(at)paquier(dot)xyz> wrote in
> On Thu, Apr 16, 2020 at 12:08:09PM +0900, Kyotaro Horiguchi wrote:
> > I'm surprised to find an old thread about the same issue.
> >
> > https://www.postgresql.org/message-id/20160307.174354.251049100.horiguchi.kyotaro%40lab.ntt.co.jp
> >
> > But I don't think it's not acceptable that use fake errno for gzclose,
> > but cfclose properly passes-through the error code from gzclose, so it
> > is enought that the caller should recognize the difference.
>
> A problem with this patch is that we may forget again to add this
> special error handling if more code paths use cfclose().
Definitely. The reason for the patch is the error codes are diffrent
according to callers and some of callers don't even checking the error
(seemingly intentionally).
> As of HEAD, there are three code paths where cfclose() is called but
> it does not generate an error: two when ending a blob and one when
> ending a data file. Perhaps it would make sense to just move all this
> error within the routine itself? Note that it would also mean
> registering file names in lclContext or equivalent as that's an
> important piece of the error message.
Hmm. Sounds reasonable. I'm going to do that. Thanks!
regards.
--
Kyotaro Horiguchi
NTT Open Source Software Center
From | Date | Subject | |
---|---|---|---|
Next Message | Rob Northcott | 2020-04-16 12:48:56 | RE: Recursive Queries |
Previous Message | Niels Jespersen | 2020-04-16 08:37:39 | SV: timestamp and timestamptz |
From | Date | Subject | |
---|---|---|---|
Next Message | Etsuro Fujita | 2020-04-16 09:20:53 | Re: [HACKERS] advanced partition matching algorithm for partition-wise join |
Previous Message | yuzuko | 2020-04-16 09:16:45 | Re: Autovacuum on partitioned table (autoanalyze) |