On Thu, Nov 4, 2021 at 9:35 AM Bharath Rupireddy
<bharath.rupireddyforpostgres@gmail.com> wrote:
> > I think the reason we need to do this is not that aux processes have
> > the invalid backend id (=InvalidBackendId) but that "some" auxiliary
> > processes may have a broken proc->backendId in regard to
> > SendProcSignal (we know that's the startup for now.).
>
> I wanted to not have any problems signalling the startup process with
> the current code. Yes, the startup process is the only auxiliary
> process that has a valid backind id and we have other threads fixing
> it. Let's keep the way it is in the v1 patch. Based on whichever patch
> gets in we can modify the code.
I added a note there (with XXX) describing the fact that we explicitly
need to send invalid backend id to SendProcSignal.
> > +SELECT pg_log_backend_memory_contexts(memcxt_get_proc_pid('autovacuum launcher'+SELECT
pg_log_backend_memory_contexts(memcxt_get_proc_pid('logicalreplication launcher'));
> > ...
> >
> > Maybe we can reduce (a quite bit of) run time of the test by
> > loopingover the processes but since the test only checks if the
> > function doesn't fail to send a signal, I'm not sure we need to
> > perform the test for all of the processes here.
>
> Okay, let me choose the checkpointer for this test, I will remove other tests.
I retained the test case just for the checkpointer.
> > On the other hand,
> > the test is missing the most significant target of the startup
> > process.
>
> If we were to have tests for the startup process, then it needs to be
> in TAP tests as we have to start a hot standby where the startup
> process will be in continuous mode. Is there any other way that we can
> add the test case in a .sql file? Do we need to get into this much
> complexity for the test case?
I've not added a TAP test case for the startup process, I see it as
unnecessary. I've tested the startup process case manually here which
just works.
PSA v2 patch and review it.
Regards,
Bharath Rupireddy.