Claudio Freire wrote:
> On Thu, Jan 25, 2018 at 4:11 AM, Thomas Munro
> <thomas.munro@enterprisedb.com> wrote:
> > *** 128,134 ****
> > SELECT pg_relation_size('vactst', 'main');
> > pg_relation_size
> > ------------------
> > ! 0
> > (1 row)
> >
> > SELECT count(*) FROM vactst;
> > --- 128,134 ----
> > SELECT pg_relation_size('vactst', 'main');
> > pg_relation_size
> > ------------------
> > ! 8192
> > (1 row)
> However, shouldn't an empty relation have an initial page anyway? In
> that case shouldn't the correct value be 8192?
No, it's legal for an empty table to have size 0 on disk.
--
Álvaro Herrera https://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services