From: | Magnus Hagander <magnus(at)hagander(dot)net> |
---|---|
To: | Michael Paquier <michael(at)paquier(dot)xyz> |
Cc: | Andrew Gierth <andrew(at)tao11(dot)riddles(dot)org(dot)uk>, "Tsunakawa, Takayuki" <tsunakawa(dot)takay(at)jp(dot)fujitsu(dot)com>, James Sewell <james(dot)sewell(at)jirotech(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Reaping Temp tables to avoid XID wraparound |
Date: | 2019-02-13 16:48:39 |
Message-ID: | CABUevExz456ZuujwX_2W5EoZ4D0OFW4q9gwUM1ekgGbh8A6RVw@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Wed, Feb 13, 2019 at 2:26 AM Michael Paquier <michael(at)paquier(dot)xyz> wrote:
> On Wed, Feb 13, 2019 at 12:38:51AM +0000, Andrew Gierth wrote:
> > Doesn't work - that function's idea of "backend id" doesn't match the
> > real one, since it's looking at a local copy of the stats from which
> > unused slots have been removed.
>
> The temporary namespace OID is added to PGPROC since v11, so it could
> be easy enough to add a system function which maps a temp schema to a
> PID. Now, it could actually make sense to add this information into
> pg_stat_get_activity() and that would be cheaper.
>
>
I think that would be useful and make sense.
And while at it, what would in this particular case have been even more
useful to the OP would be to actually identify that there is a temp table
*and which xid it's blocking at*. For regular transactions we can look at
backend_xid, but IIRC that doesn't work for temp tables (unless they are
inside a transaction). Maybe we can find a way to expose that type of
relevant information at a similar level while poking around that code?
//Magnus
From | Date | Subject | |
---|---|---|---|
Next Message | Abhishek Agrawal | 2019-02-13 16:56:03 | Regarding participating in GSOC 2019 with PostgreSQL |
Previous Message | Tom Lane | 2019-02-13 15:58:50 | Re: reducing isolation tests runtime |