Re: subscription/015_stream sometimes breaks

Поиск
Список
Период
Сортировка
От Amit Kapila
Тема Re: subscription/015_stream sometimes breaks
Дата
Msg-id CAA4eK1JQEaHra+of4eQFyBFzONLhXNscT0miCVHeqgQp7+00AQ@mail.gmail.com
обсуждение исходный текст
Ответ на Re: subscription/015_stream sometimes breaks  (Alvaro Herrera <alvherre@alvh.no-ip.org>)
Ответы Re: subscription/015_stream sometimes breaks  (Peter Smith <smithpb2250@gmail.com>)
Re: subscription/015_stream sometimes breaks  (Amit Kapila <amit.kapila16@gmail.com>)
Список pgsql-hackers
On Thu, Aug 24, 2023 at 1:20 PM Alvaro Herrera <alvherre@alvh.no-ip.org> wrote:
>
> On 2023-Aug-24, Amit Kapila wrote:
>
> > On Wed, Aug 23, 2023 at 1:31 PM Alvaro Herrera <alvherre@alvh.no-ip.org> 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.

--
With Regards,
Amit Kapila.



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Daniel Gustafsson
Дата:
Сообщение: Re: Adding argument names to aggregate functions
Следующее
От: Ashutosh Bapat
Дата:
Сообщение: Re: Report planning memory in EXPLAIN ANALYZE