Re: identifying the backend that owns a temporary schema

2022-09-29 Thread Nathan Bossart
On Thu, Sep 29, 2022 at 10:47:06AM -0400, Tom Lane wrote: > OK. Will push shortly. Thanks! -- Nathan Bossart Amazon Web Services: https://aws.amazon.com

Re: identifying the backend that owns a temporary schema

2022-09-29 Thread Tom Lane
Nathan Bossart writes: > On Wed, Sep 28, 2022 at 06:56:20PM -0400, Tom Lane wrote: >> A point that still bothers me a bit about pg_stat_get_backend_idset is >> that it could miss or duplicate some backend IDs if the user calls >> pg_stat_clear_snapshot() partway through the SRF's run, and we reloa

Re: identifying the backend that owns a temporary schema

2022-09-28 Thread Nathan Bossart
On Wed, Sep 28, 2022 at 06:56:20PM -0400, Tom Lane wrote: > I reviewed this and made some changes, some cosmetic some less so. Thanks for the detailed review. > A point that still bothers me a bit about pg_stat_get_backend_idset is > that it could miss or duplicate some backend IDs if the user ca

Re: identifying the backend that owns a temporary schema

2022-09-28 Thread Tom Lane
Nathan Bossart writes: > Thanks for the suggestion. I used it in v4 of the patch. I reviewed this and made some changes, some cosmetic some less so. Notably, I was bemused that of the four calls of pgstat_fetch_stat_local_beentry, three tested for a NULL result even though they cannot get one,

Re: identifying the backend that owns a temporary schema

2022-09-26 Thread Nathan Bossart
On Mon, Sep 26, 2022 at 03:50:09PM -0400, Tom Lane wrote: > Nathan Bossart writes: >> On Sat, Sep 24, 2022 at 01:41:38PM -0400, Tom Lane wrote: >>> One thing I don't like about it documentation-wise is that it leaves >>> the concept of backend ID pretty much completely undefined. > >> How specifi

Re: identifying the backend that owns a temporary schema

2022-09-26 Thread Tom Lane
Nathan Bossart writes: > On Sat, Sep 24, 2022 at 01:41:38PM -0400, Tom Lane wrote: >> One thing I don't like about it documentation-wise is that it leaves >> the concept of backend ID pretty much completely undefined. > How specific do you think this definition ought to be? Fairly specific, I th

Re: identifying the backend that owns a temporary schema

2022-09-26 Thread Nathan Bossart
On Sat, Sep 24, 2022 at 01:41:38PM -0400, Tom Lane wrote: > One thing I don't like about it documentation-wise is that it leaves > the concept of backend ID pretty much completely undefined. How specific do you think this definition ought to be? All I've come up with so far is "internal identifie

Re: identifying the backend that owns a temporary schema

2022-09-24 Thread Tom Lane
Nathan Bossart writes: > On Tue, Aug 23, 2022 at 10:29:05AM +0100, Greg Stark wrote: >> Alternately should pg_stat_activity show the actual temp schema name >> instead of the id? I don't recall if it's visible outside the backend >> but if it is, could pg_stat_activity show whether the temp schema

Re: identifying the backend that owns a temporary schema

2022-08-29 Thread Nathan Bossart
On Tue, Aug 23, 2022 at 10:29:05AM +0100, Greg Stark wrote: > Having this function would be great (I admit I never responded because > I never figured out if your suggestion was right or not:). But should > it also be added to the pg_stat_activity view? Perhaps even just in > the SQL view using the

Re: identifying the backend that owns a temporary schema

2022-08-23 Thread Isaac Morland
On Tue, 23 Aug 2022 at 05:29, Greg Stark wrote: > Having this function would be great (I admit I never responded because > I never figured out if your suggestion was right or not:). But should > it also be added to the pg_stat_activity view? Perhaps even just in > the SQL view using the function.

Re: identifying the backend that owns a temporary schema

2022-08-23 Thread Greg Stark
Having this function would be great (I admit I never responded because I never figured out if your suggestion was right or not:). But should it also be added to the pg_stat_activity view? Perhaps even just in the SQL view using the function. Alternately should pg_stat_activity show the actual temp

Re: identifying the backend that owns a temporary schema

2022-08-23 Thread Kyotaro Horiguchi
At Tue, 16 Aug 2022 16:04:23 -0700, Nathan Bossart wrote in > On Mon, Aug 15, 2022 at 02:47:25PM -0700, Jeremy Schneider wrote: > > I'll take a look at the patch if I can... and I'm hopeful that we're > > able to move this idea forward and get this little gap in PG filled once > > and for all! >

Re: identifying the backend that owns a temporary schema

2022-08-16 Thread Nathan Bossart
On Mon, Aug 15, 2022 at 02:47:25PM -0700, Jeremy Schneider wrote: > I'll take a look at the patch if I can... and I'm hopeful that we're > able to move this idea forward and get this little gap in PG filled once > and for all! Thanks! I noticed that the "result" variable in pg_stat_get_backend_id