[BackendXidGetPid] only access allProcs when xid matches - Mailing list pgsql-hackers

From Junwang Zhao
Subject [BackendXidGetPid] only access allProcs when xid matches
Date
Msg-id CAEG8a3+i9gtqF65B+g_puVaCQuf0rZC-EMqMyEjGFJYOqUUWfA@mail.gmail.com
Whole thread Raw
Responses Re: [BackendXidGetPid] only access allProcs when xid matches
List pgsql-hackers
In function `BackendXidGetPid`, when looping every proc's
    TransactionId, there is no need to access its PGPROC since there
    is shared memory access: `arrayP->pgprocnos[index]`.

    Though the compiler can optimize this kind of inefficiency, I
    believe we should ship with better code.


-- 
Regards
Junwang Zhao

Attachment

pgsql-hackers by date:

Previous
From: "Rui Zhao"
Date:
Subject: Re: pg_upgrade fails with in-place tablespace
Next
From: Peter Geoghegan
Date:
Subject: Re: pg15: reltuples stuck at -1 after pg_upgrade and VACUUM