public inbox for [email protected]  
help / color / mirror / Atom feed
From: Fujii Masao <[email protected]>
To: cca5507 <[email protected]>
Cc: Shinya Kato <[email protected]>
Cc: PostgreSQL-development <[email protected]>
Subject: Re: Call EndCopyFrom() after initial table sync in logical replication
Date: Fri, 8 May 2026 13:21:31 +0900
Message-ID: <CAHGQGwHfdbfRRVdQjYRZmT94UMqE1W4MENiaseVtsHWmzkWxBQ@mail.gmail.com> (raw)
In-Reply-To: <[email protected]>
References: <CAOzEurQKuy3RiPkd=25PEwEzaqHuGvEOf=X7vaVzhgNjaukYzA@mail.gmail.com>
	<CAHGQGwEpwuq9U=Hhx3BbfGY-RrJ5rFvdQopO+0xyAuLVsMdfWA@mail.gmail.com>
	<[email protected]>

On Fri, May 8, 2026 at 11:34 AM cca5507 <[email protected]> wrote:
>
> Hi,
>
> 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().

Regards,

-- 
Fujii Masao





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: <CAHGQGwHfdbfRRVdQjYRZmT94UMqE1W4MENiaseVtsHWmzkWxBQ@mail.gmail.com>

* 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