public inbox for [email protected]
help / color / mirror / Atom feedFrom: Kyotaro Horiguchi <[email protected]>
To: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Subject: Re: [BUG] Logical replication failure "ERROR: could not map filenode "base/13237/442428" to relation OID" with catalog modifying txns
Date: Wed, 03 Aug 2022 10:20:27 +0900 (JST)
Message-ID: <[email protected]> (raw)
In-Reply-To: <CAA4eK1LUis6LrKDi=VAWhP-0OniC4ThbXueAhdaQHpdCg4MvRg@mail.gmail.com>
References: <CAA4eK1KiiXHtj641_G2v7s+S33CVPG9k3OBMVHb3hn+f9YBC7A@mail.gmail.com>
<[email protected]>
<CAA4eK1LUis6LrKDi=VAWhP-0OniC4ThbXueAhdaQHpdCg4MvRg@mail.gmail.com>
At Tue, 2 Aug 2022 13:54:43 +0530, Amit Kapila <[email protected]> wrote in
> On Tue, Aug 2, 2022 at 12:00 PM Kyotaro Horiguchi
> <[email protected]> wrote:
> >
> > + {
> > + int save_errno = errno;
> > +
> > + CloseTransientFile(fd);
> > +
> > + if (readBytes < 0)
> > + {
> > + errno = save_errno;
> > + ereport(ERROR,
> >
> > Do we need the CloseTransientFile(fd) there? This call requires errno
> > to be remembered but anyway OpenTransientFile'd files are to be close
> > at transaction end. Actually CloseTransientFile() is not called
> > before error'ing-out at error in other places.
..
> We just moved it to a separate function as the same code is being
> duplicated to multiple places.
There are code paths that doesn't CloseTransientFile() explicitly,
too. If there were no need of save_errno there, that'd be fine. But
otherwise I guess we prefer to let the orphan fds closed by ERROR and
I don't think we need to preserve the less-preferred code pattern (if
we actually prefer not to have the explicit call).
regards.
--
Kyotaro Horiguchi
NTT Open Source Software Center
view thread (136+ messages) latest in thread
reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: [email protected]
Cc: [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected]
Subject: Re: [BUG] Logical replication failure "ERROR: could not map filenode "base/13237/442428" to relation OID" with catalog modifying txns
In-Reply-To: <[email protected]>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox