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

From James Sewell
Subject Re: Reaping Temp tables to avoid XID wraparound
Date
Msg-id CAANVwEvJUpqibNisD_3ebUapdG1AXp8cAkbECMM-8T3mDBjO+w@mail.gmail.com
Whole thread Raw
In response to Re: Reaping Temp tables to avoid XID wraparound  (Michael Paquier <michael@paquier.xyz>)
Responses Re: Reaping Temp tables to avoid XID wraparound
List pgsql-hackers
On Mon, 18 Feb 2019 at 12:31, Michael Paquier <michael@paquier.xyz> wrote:
On Sun, Feb 17, 2019 at 05:47:09PM +0100, Magnus Hagander wrote:
> We could I guess add a field specifically for temp_namespace_xid or such.
> The question is if it's worth the overhead to do that.

That would mean an extra 4 bytes in PGPROC, which is something we
could live with, still the use-case looks rather narrow to me to
justify that.

I agree the use case is narrow - but it's also pretty critical. 

This is a very real way that transaction wraparound can be hit, with no automated or manual way of solving it (apart from randomly terminating backends (you have to search via user and hope there is only one, and that it matches the temp table owner) or restarting Postgres).

I suppose an in-core way of disconnecting idle sessions after x time would work too - but that seems like a sledgehammer approach.

-- 
James
 


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: David Rowley
Date:
Subject: Re: Speed up transaction completion faster after many relations areaccessed in a transaction
Next
From: Andres Freund
Date:
Subject: Re: Speed up transaction completion faster after many relations areaccessed in a transaction