public inbox for [email protected]
help / color / mirror / Atom feedFrom: Amit Kapila <[email protected]>
To: Alvaro Herrera <[email protected]>
Cc: Zhijie Hou (Fujitsu) <[email protected]>
Cc: Thomas Munro <[email protected]>
Cc: pgsql-hackers <[email protected]>
Subject: Re: subscription/015_stream sometimes breaks
Date: Fri, 25 Aug 2023 15:45:17 +0530
Message-ID: <CAA4eK1Jg32htSrjKCAcrvFu+bztUNhdWem8RubuTwgABKjXGDg@mail.gmail.com> (raw)
In-Reply-To: <CAA4eK1JQEaHra+of4eQFyBFzONLhXNscT0miCVHeqgQp7+00AQ@mail.gmail.com>
References: <CAA4eK1KEYtgC3mB683iEq-CQUUSA8=3ZRYB9ZMbWHaU8hey2uA@mail.gmail.com>
<[email protected]>
<CAA4eK1JQEaHra+of4eQFyBFzONLhXNscT0miCVHeqgQp7+00AQ@mail.gmail.com>
On Thu, Aug 24, 2023 at 3:48 PM Amit Kapila <[email protected]> wrote:
>
> On Thu, Aug 24, 2023 at 1:20 PM Alvaro Herrera <[email protected]> wrote:
> >
> > On 2023-Aug-24, Amit Kapila wrote:
> >
> > > On Wed, Aug 23, 2023 at 1:31 PM Alvaro Herrera <[email protected]> wrote:
> >
> > > > Hmm, I think if worker->in_use is false, we shouldn't consult the rest
> > > > of the struct at all, so I propose to add the attached 0001 as a minimal
> > > > fix.
> > >
> > > I think that way we may need to add the check for in_use before
> > > accessing each of the LogicalRepWorker struct fields or form some rule
> > > about which fields (or places) are okay to access without checking
> > > in_use field.
> >
> > As far as I realize, we have that rule already. It's only a few
> > relatively new places that have broken it. I understand that the in_use
> > concept comes from the one of the same name in ReplicationSlot, except
> > that it is not at all documented in worker_internal.h.
> >
> > So I propose we do both: apply Zhijie's patch and my 0001 now; and
> > somebody gets to document the locking design for LogicalRepWorker.
> >
>
> Agreed.
>
Pushed both the patches.
--
With Regards,
Amit Kapila.
view thread (4+ 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]
Subject: Re: subscription/015_stream sometimes breaks
In-Reply-To: <CAA4eK1Jg32htSrjKCAcrvFu+bztUNhdWem8RubuTwgABKjXGDg@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