Received: from localhost (unknown [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id C99562E0065 for ; Thu, 13 Mar 2008 16:50:16 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 44470-04 for ; Thu, 13 Mar 2008 16:50:11 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.5 Received: from mail.transas.com (mail.transas.com [82.140.75.150]) by postgresql.org (Postfix) with ESMTP id D4FAB2E0063 for ; Thu, 13 Mar 2008 16:50:10 -0300 (ADT) Received: from sol.transas.com (sol.transas.com [10.10.0.20]) by mail.transas.com (Postfix) with ESMTP id 76E684FFFC8 for ; Thu, 13 Mar 2008 22:50:03 +0300 (MSK) Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----_=_NextPart_001_01C88543.6B301A08" X-MimeOLE: Produced By Microsoft Exchange V6.5 Subject: pg_total_relation_size() and CHECKPOINT Date: Thu, 13 Mar 2008 22:49:58 +0300 Message-ID: <528853D3C5ED2C4AA8990B504BA7FB850106DF10@sol.transas.com> X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: pg_total_relation_size() and CHECKPOINT Thread-Index: AciFQ2qohm2MQ5OPQVW+cl9KEijFhA== From: "Zubkovsky, Sergey" To: X-Transas-MailScanner: Found to be clean X-Transas-MailScanner-From: sergey.zubkovsky@transas.com X-Transas-MailScanner-To: pgsql-docs@postgresql.org X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200803/40 X-Sequence-Number: 4852 This is a multi-part message in MIME format. ------_=_NextPart_001_01C88543.6B301A08 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Hello, =20 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. =20 select version();=20 "PostgreSQL 8.2.6 on i686-pc-mingw32, compiled by GCC gcc.exe (GCC) 3.4.2 (mingw-special)" =20 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. =20 =20 Thanks in advance, Zubkovsky Sergey ------_=_NextPart_001_01C88543.6B301A08 Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable

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

------_=_NextPart_001_01C88543.6B301A08--