Re: VACUUM FULL vs dropped columns

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Andrew Dunstan <andrew(dot)dunstan(at)2ndquadrant(dot)com>
Cc: PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: VACUUM FULL vs dropped columns
Date: 2018-03-10 23:19:31
Message-ID: 18375.1520723971@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Andrew Dunstan <andrew(dot)dunstan(at)2ndquadrant(dot)com> writes:
> Why does VACUUM FULL cause the size of this table with a single
> dropped column (1 out of 1000) cause the table size to double?

VACUUM FULL will rewrite the tuples with a null bitmap where they
had none before (cf reform_and_rewrite_tuple). That's only a rather
marginal increase in the tuple size, but in this particular example,
it pushes the tuples from just under half a page to just over, so
that you go from 2 tuples/page to 1.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Andrew Dunstan 2018-03-10 23:24:28 Re: VACUUM FULL vs dropped columns
Previous Message Tomas Vondra 2018-03-10 23:11:57 Re: Parallel Aggregates for string_agg and array_agg