pg_total_relation_size() and CHECKPOINT

From: "Zubkovsky, Sergey" <Sergey(dot)Zubkovsky(at)transas(dot)com>
To: <pgsql-docs(at)postgresql(dot)org>
Subject: pg_total_relation_size() and CHECKPOINT
Date: 2008-03-13 19:49:58
Message-ID: 528853D3C5ED2C4AA8990B504BA7FB850106DF10@sol.transas.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-docs pgsql-hackers

Hello,

I've detected that a result value of pg_total_relation_size() for an
actively updated table might be significantly differ from a result that
is returned after explicit CHECKPOINT command execution.

select version();

"PostgreSQL 8.2.6 on i686-pc-mingw32, compiled by GCC gcc.exe (GCC)
3.4.2 (mingw-special)"

I understand the reasons of such behavior: cache buffers must be flushed
in order to be sure that pg_total_relation_size() result will be like we
expect.

Is this right?

If so I think it would be very useful to add a description of this
peculiarity to the PG documentation.

Thanks in advance,

Zubkovsky Sergey

Responses

Browse pgsql-docs by date

  From Date Subject
Next Message Tom Lane 2008-03-13 20:20:30 Re: pg_total_relation_size() and CHECKPOINT
Previous Message Scott Marlowe 2008-03-11 18:18:44 Re: order of entries in admin docs

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2008-03-13 20:18:13 Re: aclitem out/in don't "work"
Previous Message Meetesh Karia 2008-03-13 18:06:31 Re: Encoding problems with migration from 8.0.14 to 8.3.0 on Windows