Re: pg_total_relation_size() and CHECKPOINT - Mailing list pgsql-docs

From Tom Lane
Subject Re: pg_total_relation_size() and CHECKPOINT
Date
Msg-id 439.1205439630@sss.pgh.pa.us
Whole thread Raw
In response to pg_total_relation_size() and CHECKPOINT  ("Zubkovsky, Sergey" <Sergey.Zubkovsky@transas.com>)
Responses Re: pg_total_relation_size() and CHECKPOINT
List pgsql-docs
"Zubkovsky, Sergey" <Sergey.Zubkovsky@transas.com> writes:
> 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.

Uh, can you show a specific example of what you mean?

> 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.

I wouldn't think so.  The space for a page is allocated immediately when
needed --- its *contents* might not be up to date, but that shouldn't
affect pg_total_relation_size.

            regards, tom lane

pgsql-docs by date:

Previous
From: "Zubkovsky, Sergey"
Date:
Subject: pg_total_relation_size() and CHECKPOINT
Next
From: "Zubkovsky, Sergey"
Date:
Subject: Re: pg_total_relation_size() and CHECKPOINT