pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Andres Freund <andres@2ndquadrant.com>
To: digoal@126.com
Cc: pgsql-bugs@postgresql.org
Subject: Re: BUG #8697: checkpoint cann't flush unlogged table's dirty page to disk.
Date: Tue, 24 Dec 2013 13:11:35 +0100
Message-ID: <20131224121135.GE26564@alap2.anarazel.de> (raw)
In-Reply-To: <E1Vv20Z-0005H0-QA@wrigleys.postgresql.org>
References: <E1Vv20Z-0005H0-QA@wrigleys.postgresql.org>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-bugs>

Hi,

On 2013-12-23 09:41:07 +0000, digoal@126.com wrote:
> checkpoint cann't flush unlogged table's dirty page to disk.

> digoal=# create table u(id int);
> digoal=# update pg_class set relpersistence ='u' where relname='u';
> digoal=# insert into u select generate_series(1,100000);
> digoal=# checkpoint;
> digoal=# select * from pg_stat_file(pg_relation_filepath('u')),
> pg_relation_filepath('u');
>   size   |         access         |      modification      |         change 
>        | creation | isdir | pg_relation_filepath 
> ---------+------------------------+------------------------+------------------------+----------+-------+----------------------
>  3629056 | 2013-12-23 17:36:54+08 | 2013-12-23 17:37:02+08 | 2013-12-23
> 17:37:02+08 |          | f     | base/16399/122891
> (1 row)
> -- then change table u to normal table
> digoal=# update pg_class set relpersistence ='p' where relname='u';
> digoal=# insert into u select generate_series(1,100000);
> digoal=# checkpoint;
> digoal=# select * from pg_stat_file(pg_relation_filepath('u')),
> pg_relation_filepath('u');
>   size   |         access         |      modification      |         change 
>        | creation | isdir | pg_relation_filepath 
> ---------+------------------------+------------------------+------------------------+----------+-------+----------------------
>  7249920 | 2013-12-23 17:36:54+08 | 2013-12-23 17:37:29+08 | 2013-12-23
> 17:37:29+08 |          | f     | base/16399/122891
> (1 row)

I am confused. It certainly isn't allowed to simply update random
pg_catalog.* tables - it will frequently break stuff. Why are you
expecting that to work?
Or are you simply trying to prove some other point?

Greetings,

Andres Freund

-- 
 Andres Freund	                   http://www.2ndQuadrant.com/
 PostgreSQL Development, 24x7 Support, Training & Services


-- 
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs



view thread (2+ messages)

Message-ID: <20131224121135.GE26564@alap2.anarazel.de>
Permalink:  ../20131224121135.GE26564@alap2.anarazel.de/
Also on:    postgresql.org/message-id/20131224121135.GE26564@alap2.anarazel.de

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-bugs@postgresql.org
  Cc: andres@2ndquadrant.com, digoal@126.com
  Subject: Re: BUG #8697: checkpoint cann't flush unlogged table's dirty page to disk.
  In-Reply-To: <20131224121135.GE26564@alap2.anarazel.de>
  References: <E1Vv20Z-0005H0-QA@wrigleys.postgresql.org> <20131224121135.GE26564@alap2.anarazel.de>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox