Re: Bgwriter behavior

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Gavin Sherry <swm(at)linuxworld(dot)com(dot)au>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Bgwriter behavior
Date: 2004-12-23 16:16:18
Message-ID: 200412231616.iBNGGIG08618@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-patches

Tom Lane wrote:
> Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> writes:
> > I remember the other difference between 8.0 and pre-8.0. When a backend
> > has to write a block in 8.0, it does a write _plus_ fsync(), while in
> > pre-8.0 it did only a write. There was a proposal to pass backend write
> > information to the background writer so it would know to fsync at
> > checkpoint, but it was decided that backend writing would be rare. I
> > think we have to rethink that assumption.
>
> No, just read the code. The above assertions are all wet.

Oh, I forgot you added that array to pass fsync info.

Shouldn't we send a log message when the array gets full in md.c:

{
if (ForwardFsyncRequest(reln->smgr_rnode, seg->mdfd_segno))
return true;
}

if (FileSync(seg->mdfd_vfd) < 0)
return false;

Seems that could fill up quickly. I see no checking for existing
matching records in the array.

--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Sibtay Abbas 2004-12-23 19:57:09 CreateFunctionStmt struct
Previous Message Tom Lane 2004-12-23 16:05:35 Re: Bgwriter behavior

Browse pgsql-patches by date

  From Date Subject
Next Message Simon Riggs 2004-12-23 21:26:16 Re: Bgwriter behavior
Previous Message Tom Lane 2004-12-23 16:05:35 Re: Bgwriter behavior