Re: Load distributed checkpoint - Mailing list pgsql-hackers

From Takayuki Tsunakawa
Subject Re: Load distributed checkpoint
Date
Msg-id 023201c724ea$dbe3b8f0$19527c0a@OPERAO
Whole thread Raw
In response to Re: Load distributed checkpoint  (ITAGAKI Takahiro <itagaki.takahiro@oss.ntt.co.jp>)
List pgsql-hackers
To: "Takayuki Tsunakawa" <tsunakawa.takay@jp.fujitsu.com>
Cc: <pgsql-hackers@postgresql.org>
Sent: Thursday, December 21, 2006 6:46 PM
Subject: Re: [HACKERS] Load distributed checkpoint


>
From: "ITAGAKI Takahiro" <itagaki.takahiro@oss.ntt.co.jp>
> "Takayuki Tsunakawa" <tsunakawa.takay@jp.fujitsu.com> wrote:
>> Oh, really, what an evil fsync is!  Yes, I sometimes saw a backend
>> waiting for lseek() to complete when it committed.  But why does
the
>> backend which is syncing WAL/pg_control have to wait for syncing
the
>> data file?  They are, not to mention, different files, and WAL and
>> data files are stored on separate disks.
>
> Backends call lseek() in planning, so they have to wait fsync() to
> the table that they will access. Even if all of data in the file is
in
> the cache, lseek() conflict with fsync(). You can see a lot of
backends
> are waiting in planning phase in checkpoints, not executing phase.

I see.  I found one backend like the following.  But one in my case
one out of 16 backends.  Most of others are waiting to acquire
WALWRITE lock.

#0  0x0000003a629c6902 in __lseek_nocancel () from
/lib64/tls/libc.so.6
#1  0x000000000056789f in FileSeek ()
#2  0x0000000000574053 in mdnblocks ()
#3  0x0000000000574f4a in smgrnblocks ()
#4  0x00000000005489e8 in estimate_rel_size ()
#5  0x0000000000548bee in get_relation_info ()
#6  0x000000000054aa3d in build_simple_rel ()
#7  0x0000000000539c6b in add_base_rels_to_query ()
#8  0x000000000053b955 in query_planner ()
#9  0x000000000053c1c9 in grouping_planner ()
#10 0x000000000053d3b4 in subquery_planner ()
#11 0x000000000053d5b3 in planner ()
#12 0x00000000005778fc in pg_plan_query ()
#13 0x000000000057798c in pg_plan_queries ()
#14 0x0000000000577c53 in exec_simple_query ()





pgsql-hackers by date:

Previous
From: ITAGAKI Takahiro
Date:
Subject: Re: Load distributed checkpoint
Next
From: Martijn van Oosterhout
Date:
Subject: Re: Load distributed checkpoint