Re: BUG #8697: checkpoint cann't flush unlogged table's dirty page to disk.

From: Andres Freund <andres(at)2ndquadrant(dot)com>
To: digoal(at)126(dot)com
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #8697: checkpoint cann't flush unlogged table's dirty page to disk.
Date: 2013-12-24 12:11:35
Message-ID: 20131224121135.GE26564@alap2.anarazel.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Hi,

On 2013-12-23 09:41:07 +0000, digoal(at)126(dot)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

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Jeff Davis 2013-12-24 18:59:00 assertion failure in WITHIN GROUP patch
Previous Message Tom Lane 2013-12-24 03:20:31 Re: BUG #8684: Tables with custom range domain type cannot be analyzed