Re: Improve LWLock tranche name visibility across backends - Mailing list pgsql-hackers

From Sami Imseih
Subject Re: Improve LWLock tranche name visibility across backends
Date
Msg-id CAA5RZ0vb_CVR7SuCpHrLbV4yDQJ8o9WUudz51YRjUr4PLiDMYg@mail.gmail.com
Whole thread Raw
In response to Re: Improve LWLock tranche name visibility across backends  (Nathan Bossart <nathandbossart@gmail.com>)
Responses Re: Improve LWLock tranche name visibility across backends
List pgsql-hackers
> Ah, I missed the problem with postmaster.  Could we have the first backend
> that needs to access the table be responsible for creating it and
> populating it with the built-in/requested-at-startup entries?

We can certainly maintain a flag in the shared state that is set once
the first backend loads all the tranches in shared memory. That did not
cross my mind, but it feels wrong to offload such responsibility to a
normal backend.

> Also, is there any chance that postmaster might need to access the
> tranche names?

A postmaster does not currently have a reason to lookup
a tranche name, afaict. This only occurs when looking up wait events
or if lwlock tracing is enabled.

--
Sami



pgsql-hackers by date:

Previous
From: Nathan Bossart
Date:
Subject: fix organization wording in psql's \copyright command
Next
From: Dean Rasheed
Date:
Subject: Re: Improving and extending int128.h to more of numeric.c