From: | Mladen Gogala <gogala(dot)mladen(at)gmail(dot)com> |
---|---|
To: | pgsql-admin(at)lists(dot)postgresql(dot)org |
Subject: | Re: vacuumlo |
Date: | 2021-08-30 17:38:14 |
Message-ID: | edb97021-ca64-a0e2-0181-f1eb280c9c58@gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-admin pgsql-general |
That can be verified by checking RELFILENODE of the table. VACUUM FULL
changes RELFILENODE:
|mgogala=# select relfilenode from pg_class where relname='emp';
relfilenode
-------------
52178
(1 row)
mgogala=# vacuum full emp;
VACUUM
mgogala=# select relfilenode from pg_class where relname='emp';
relfilenode
-------------
52182
(1 row)
|
According to unsubstantiated rumors from
https://www.postgresql.org/docs/13/catalog-pg-class.html, the definition
of RELFILENODE column is as follows:
relfilenode oid
Name of the on-disk file of this relation; zero means this is a “mapped”
relation whose disk file name is determined by low-level state
||Change of the RELFILENODE means that the relation has got a new file.
And that means that vacuum full rewrites the table, just as Laurenz has
said. Note that OID itself is NOT changed.
||
On 8/30/21 1:15 PM, Laurenz Albe wrote:
> VACUUM (FULL) will write a compact copy of the table, then delete the old one,
> so it temporarily needs more space. It may be a good idea to put "pg_wal" into
> a different file system, so that WAL space cannot run out even if the data files
> fill the file system. Then PostgreSQL won't crash, and the files will be removed.
--
Mladen Gogala
Database Consultant
Tel: (347) 321-1217
https://dbwhisperer.wordpress.com
From | Date | Subject | |
---|---|---|---|
Next Message | Laurenz Albe | 2021-08-30 19:17:15 | Re: vacuumlo |
Previous Message | Laurenz Albe | 2021-08-30 17:15:07 | Re: vacuumlo |
From | Date | Subject | |
---|---|---|---|
Next Message | Vijaykumar Jain | 2021-08-30 17:42:41 | vacuum full |
Previous Message | Tom Lane | 2021-08-30 17:33:42 | Re: Can we get rid of repeated queries from pg_dump? |