Re: A micro-optimisation for ProcSendSignal()

From: Soumyadeep Chakraborty <soumyadeep2007(at)gmail(dot)com>
To: Thomas Munro <thomas(dot)munro(at)gmail(dot)com>
Cc: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>, ashwinstar(at)gmail(dot)com
Subject: Re: A micro-optimisation for ProcSendSignal()
Date: 2021-07-17 18:57:39
Message-ID: CAE-ML+8mZfCFEnDuBFF-+-xpCOPVZxrPnJFbT7Ft5L_en4m84A@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi Thomas,

You might have missed a spot to initialize SERIALIZABLE_XACT->pgprocno in
InitPredicateLocks(), so:

+ PredXact->OldCommittedSxact->pgprocno = INVALID_PGPROCNO;

Slightly tangential: we should add a comment to PGPROC.pgprocno, for more
immediate understandability:

+ int pgprocno; /* index of this PGPROC in ProcGlobal->allProcs */

Also, why don't we take the opportunity to get rid of SERIALIZABLEXACT->pid? We
took a stab. Attached is v2 of your patch with these changes.

Regards,
Ashwin and Deep

Attachment Content-Type Size
v2-0001-Optimize-ProcSendSignal.patch application/x-patch 12.9 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Andy Fan 2021-07-17 19:38:58 Re: UniqueKey on Partitioned table.
Previous Message Tom Lane 2021-07-17 16:06:59 Re: postgres_fdw - make cached connection functions tests meaningful