Re: Allow single table VACUUM in transaction block - Mailing list pgsql-hackers

From Simon Riggs
Subject Re: Allow single table VACUUM in transaction block
Date
Msg-id CANbhV-E0cTitQNU1esGw+KyGcZfbn_cpteSGrht-j8kVAh4UcA@mail.gmail.com
Whole thread Raw
In response to Re: Allow single table VACUUM in transaction block  (Simon Riggs <simon.riggs@enterprisedb.com>)
Responses Re: Allow single table VACUUM in transaction block
List pgsql-hackers
On Mon, 7 Nov 2022 at 08:20, Simon Riggs <simon.riggs@enterprisedb.com> wrote:

> Temp tables are actually easier, since we don't need any of the
> concurrency features we get with lazy vacuum. So the answer is to
> always run a VACUUM FULL on temp tables since this skips any issues
> with indexes etc..

So I see 3 options for what to do next

1. Force the FULL option for all tables, when executed in a
transaction block. This gets round the reasonable objections to
running a concurrent vacuum in a shared xact block. As Justin points
out, CLUSTER is already supported, which uses the same code.

2. Force the FULL option for temp tables, when executed in a
transaction block. In a later patch, queue up an autovacuum run for
regular tables.

3. Return with feedback this patch. (But then what happens with temp tables?)

Thoughts?

--
Simon Riggs                http://www.EnterpriseDB.com/



pgsql-hackers by date:

Previous
From: "wangw.fnst@fujitsu.com"
Date:
Subject: RE: Logical replication timeout problem
Next
From: Laurenz Albe
Date:
Subject: Re: New docs chapter on Transaction Management and related changes