Re: pgsql: Use appropriate wait event when sending data in the apply worker

From: Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: Amit Kapila <akapila(at)postgresql(dot)org>, "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: pgsql: Use appropriate wait event when sending data in the apply worker
Date: 2023-02-10 02:06:25
Message-ID: CAA4eK1LTud4FLRbS0QqdZ-pjSxwfFLHC1Dx=6Q7nyROCvvPSfw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers pgsql-hackers

On Thu, Feb 9, 2023 at 7:56 PM Robert Haas <robertmhaas(at)gmail(dot)com> wrote:
>
> On Mon, Feb 6, 2023 at 11:40 PM Amit Kapila <akapila(at)postgresql(dot)org> wrote:
> > Use appropriate wait event when sending data in the apply worker.
> >
> > Currently, we reuse WAIT_EVENT_LOGICAL_PARALLEL_APPLY_STATE_CHANGE in the
> > apply worker while sending data to the parallel apply worker via a shared
> > memory queue. This is not appropriate as one won't be able to distinguish
> > whether the worker is waiting for sending data or for the state change.
> >
> > To patch instead uses the wait event WAIT_EVENT_MQ_SEND which has been
> > already used in blocking mode while sending data via a shared memory
> > queue.
>
> This is not right at all. You should invent a new wait state if you're
> waiting in a new place.
>

This is a misunderstanding on my part to reuse the wait_event for a
similar kind of wait but I got your point and will take care of this.

--
With Regards,
Amit Kapila.

In response to

Browse pgsql-committers by date

  From Date Subject
Next Message Andres Freund 2023-02-10 06:24:44 pgsql: pgstat: Track more detailed relation IO statistics
Previous Message Andrew Dunstan 2023-02-09 18:33:48 pgsql: Fix help text spacing in pgindent

Browse pgsql-hackers by date

  From Date Subject
Next Message Michael Paquier 2023-02-10 02:28:53 Re: Generating code for query jumbling through gen_node_support.pl
Previous Message Kyotaro Horiguchi 2023-02-10 01:42:44 Re: Is psSocketPoll doing the right thing?