pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: David G. Johnston <david.g.johnston@gmail.com>
Cc: Wing Kin Chong <Wing.Chong@mii.com>
Cc: pgsql-bugs@postgresql.org <pgsql-bugs@postgresql.org>
Subject: Re: using TEMP with the VACUUM function
Date: Mon, 01 Jul 2024 10:32:42 -0400
Message-ID: <2738306.1719844362@sss.pgh.pa.us> (raw)
In-Reply-To: <CAKFQuwaWgynmS6WV7kAx5eVFz9rv6j45wZ0-nWPwqCzU_1G-kQ@mail.gmail.com>
References: <CO1P222MB0354E02401C26FB28AA7761E8CD32@CO1P222MB0354.NAMP222.PROD.OUTLOOK.COM>
	<CAKFQuwaWgynmS6WV7kAx5eVFz9rv6j45wZ0-nWPwqCzU_1G-kQ@mail.gmail.com>

"David G. Johnston" <david.g.johnston@gmail.com> writes:
> On Sunday, June 30, 2024, Wing Kin Chong <Wing.Chong@mii.com> wrote:
>> Allow the VACUUM function using the system Environment Variables "TEMP" or
>> "TMP" please.

> The vacuum full command is what you are describing, right?

> Not going to happen - the added space is not for temporary data, it’s for
> the real new table being built.  We’d have to move the data at the end of
> the command if it was anywhere besides the data directory.

Also, this would do exactly nothing to reduce the peak disk space
usage.  The fundamental problem for VACUUM FULL is that it can't
safely unlink the old table/index files until the new ones are fully
built and fsync'd.  Having a temporary copy somewhere else doesn't
alleviate that.  (In fact, if the "somewhere else" isn't on a
physically different file system, the third copy would make things
very much worse.)

			regards, tom lane





view thread (4+ messages)  latest in thread

Message-ID: <2738306.1719844362@sss.pgh.pa.us>
Permalink:  ../2738306.1719844362@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/2738306.1719844362@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-bugs@postgresql.org
  Cc: tgl@sss.pgh.pa.us, david.g.johnston@gmail.com, Wing.Chong@mii.com
  Subject: Re: using TEMP with the VACUUM function
  In-Reply-To: <2738306.1719844362@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox