RE: Reaping Temp tables to avoid XID wraparound - Mailing list pgsql-hackers

From Tsunakawa, Takayuki
Subject RE: Reaping Temp tables to avoid XID wraparound
Date
Msg-id 0A3221C70F24FB45833433255569204D1FB97C75@G01JPEXMBYT05
Whole thread Raw
In response to Re: Reaping Temp tables to avoid XID wraparound  (Michael Paquier <michael@paquier.xyz>)
List pgsql-hackers
From: Andrew Gierth [mailto:andrew@tao11.riddles.org.uk]
>  Tsunakawa> SELECT pg_stat_get_backend_pid(backendid);
> 
> 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.

Ouch, the argument of pg_stat_get_backend_pid() and the number in pg_temp_N are both backend IDs, but they are
allocatedfrom two different data structures.  Confusing.
 


From: Michael Paquier [mailto:michael@paquier.xyz]
> 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.

That sounds good.


Regards
Takayuki Tsunakawa




pgsql-hackers by date:

Previous
From: Michael Paquier
Date:
Subject: Re: pg_basebackup ignores the existing data directory permissions
Next
From: "Tsunakawa, Takayuki"
Date:
Subject: RE: Protect syscache from bloating with negative cache entries