public inbox for [email protected]
help / color / mirror / Atom feedFrom: =?utf-8?B?Y2NhNTUwNw==?= <[email protected]>
To: =?utf-8?B?RnVqaWkgTWFzYW8=?= <[email protected]>
Cc: =?utf-8?B?U2hpbnlhIEthdG8=?= <[email protected]>
Cc: =?utf-8?B?UG9zdGdyZVNRTC1kZXZlbG9wbWVudA==?= <[email protected]>
Subject: Re: Call EndCopyFrom() after initial table sync in logical replication
Date: Fri, 8 May 2026 12:46:14 +0800
Message-ID: <[email protected]> (raw)
In-Reply-To: <CAHGQGwHfdbfRRVdQjYRZmT94UMqE1W4MENiaseVtsHWmzkWxBQ@mail.gmail.com>
References: <CAOzEurQKuy3RiPkd=25PEwEzaqHuGvEOf=X7vaVzhgNjaukYzA@mail.gmail.com>
<CAHGQGwEpwuq9U=Hhx3BbfGY-RrJ5rFvdQopO+0xyAuLVsMdfWA@mail.gmail.com>
<[email protected]>
<CAHGQGwHfdbfRRVdQjYRZmT94UMqE1W4MENiaseVtsHWmzkWxBQ@mail.gmail.com>
> > Maybe we want to add "free_parsestate(pstate);" after the "EndCopyFrom()" as well?
>
> What actual issue could occur if free_parsestate() is not called there?
>
> Since pstate->p_target_relation does not seem to be used afterward,
> omitting free_parsestate() appears mostly harmless to me. Bascailly
> calling free_parsestate() after make_parsestate() seems intuitive,
> but from a quick grep I found several places that call make_parsestate()
> without a corresponding free_parsestate().
Yeah, I agree that it's harmless. I just noticed the comment above make_parsestate():
Caller should eventually release the ParseState via free_parsestate().
Not sure whether it's worth to fix all of these places.
--
Regards,
ChangAo Chen
view thread (11+ 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]
Subject: Re: Call EndCopyFrom() after initial table sync in logical replication
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