Re: Support to define custom wait events for extensions
Michael Paquier <michael@paquier.xyz>
From: Michael Paquier <michael@paquier.xyz>
To: Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>
Cc: Masahiro Ikeda <ikedamsh@oss.nttdata.com>, Tristan Partin <tristan@neon.tech>, andres@anarazel.de, pgsql-hackers@lists.postgresql.org
Date: 2023-07-31T06:55:51Z
Lists: pgsql-hackers
On Mon, Jul 31, 2023 at 12:07:40PM +0530, Bharath Rupireddy wrote: > We're not giving up and returning an unknown state in the v10 patch > unlike v9, no? This comment needs to change. Right. Better to be consistent with lwlock.c here. >> No, it cannot because we need the custom wait event string to be >> loaded in the same connection as the one querying pg_stat_activity. >> A different thing that can be done here is to use background_psql() >> with a query_until(), though I am not sure that this is worth doing >> here. > > -1 to go to the background_psql and query_until route. However, > enhancing the comment might help "we need the custom wait event string > to be loaded in the same connection as .....". Having said this, I > don't quite understand the point of having worker_spi_init() when we > say clearly how to use shmem hooks and custom wait events. If its > intention is to show loading of shared memory to a backend via a > function, do we really need it in worker_spi? I don't mind removing it > if it's not adding any significant value. It seems to initialize the state of the worker_spi, so attaching a function to this stuff makes sense to me, just for the sake of testing all that. -- Michael
Commits
-
Change custom wait events to use dynamic shared hash tables
- af720b4c50a1 17.0 landed
-
Support custom wait events for wait event type "Extension"
- c9af05465307 17.0 landed
-
Add WAIT_EVENT_{CLASS,ID}_MASK in wait_event.c
- 7395a90db87b 17.0 landed
-
worker_spi: Switch to TAP tests
- 320c311fda91 17.0 cited
-
Simplify some conditions related to [LW]Lock in generate-wait_event_types.pl
- c17164aec88c 17.0 landed