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

From James Sewell
Subject Reaping Temp tables to avoid XID wraparound
Date
Msg-id CAANVwEveL6k+n7p+f_tY8s=Vnc6Acpjn1NyOxMPOCJAZXFrF6w@mail.gmail.com
Whole thread Raw
Responses RE: Reaping Temp tables to avoid XID wraparound
List pgsql-hackers
Hi all,

I hit an issue yesterday where I was quickly nearing XID wraparound on a database due to a temp table being created in a session which was then left IDLE out of transaction for 6 days.

I solved the issue by tracing the owner of the temp table back to a session and terminating it - in my case I was just lucky that there was one session for that user.

I'm looking for a way to identify the PID of the backend which owns a temp table identified as being an issue so I can terminate it.

From the temp table namespace I can get the backend ID using a regex - but I have no idea how I can map that to a PID - any thoughts?

Cheers,

James Sewell,



Suite 112, Jones Bay Wharf, 26-32 Pirrama Road, Pyrmont NSW 2009


The contents of this email are confidential and may be subject to legal or professional privilege and copyright. No representation is made that this email is free of viruses or other defects. If you have received this communication in error, you may not copy or distribute any part of it or otherwise disclose its contents to anyone. Please advise the sender of your incorrect receipt of this correspondence.

pgsql-hackers by date:

Previous
From: Alvaro Herrera
Date:
Subject: Re: Statement-level rollback
Next
From: "Tsunakawa, Takayuki"
Date:
Subject: RE: Protect syscache from bloating with negative cache entries