Re: Temp table handling after anti-wraparound shutdown (Was: BUG #15840) - Mailing list pgsql-hackers

From Masahiko Sawada
Subject Re: Temp table handling after anti-wraparound shutdown (Was: BUG #15840)
Date
Msg-id CAD21AoDVqebWy6dOWV5iNsh8O_CT2ZDAGHQcX-W13OAW+XC2tA@mail.gmail.com
Whole thread Raw
In response to Re: Temp table handling after anti-wraparound shutdown (Was: BUG#15840)  (Andres Freund <andres@anarazel.de>)
List pgsql-hackers
On Sat, Jun 8, 2019 at 9:26 AM Andres Freund <andres@anarazel.de> wrote:
>
>
> A more aggressive approach would be to teach vac_update_datfrozenxid()
> to ignore orphaned temp tables - perhaps even by heap_inplace'ing an
> orphaned table's relfrozenxid/relminmxid with InvalidTransactionId. We'd
> not want to do that in do_autovacuum() - otherwise the schema won't get
> cleaned up, but for database widevacuums that seems like it could be
> good approach.
>

FWIW I like this approach. We don't need to calculate new datfrozenxid
while including orphaned temp tables. It both improves behavior and
fixes this issue. Also with that approach we will not need stop
database cluster and do vacuuming in single user mode. The making the
vacuum command cleanup orphaned temp tables would be helpful in the
case where we reached to wraparound while having active temp tables,
it doesn't happen in normal use case though.


Regards,

--
Masahiko Sawada
NIPPON TELEGRAPH AND TELEPHONE CORPORATION
NTT Open Source Software Center



pgsql-hackers by date:

Previous
From: Dmitry Dolgov
Date:
Subject: Re: fix psql \conninfo & \connect when using hostaddr
Next
From: Pavlo Golub
Date:
Subject: ReplicationSlotCtl: undefined reference