Re: [HACKERS] TODO item - Mailing list pgsql-hackers

From Bruce Momjian
Subject Re: [HACKERS] TODO item
Date
Msg-id 200002080007.TAA28292@candle.pha.pa.us
Whole thread Raw
In response to RE: [HACKERS] TODO item  ("Hiroshi Inoue" <Inoue@tpf.co.jp>)
Responses Re: [HACKERS] TODO item  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
> > So, I think we are safe if we can either keep that file descriptor open
> > until commit, or re-open it and fsync it on commit.  That assume a
> > re-open is hitting the same file.  My opinion is that we should just
> > fsync it on close and not worry about a reopen.
> >
> 
> I asked about this question 4 months ago but got no answer.
> Obviouly this needs not only md/fd stuff changes but also bufmgr
> changes.  Keeping dirtied list of segments of each backend seems
> to work. But I'm afraid of other oversights.

I don't think so.  We can just mark file descriptors as needing fsync().
By doing that, we can spin through the buffer cache for each need_fsync
file desciptor, perform any writes needed, and fsync the descriptor. 
Seems like little redesign needed, except for adding the need_fsync
flag.  Should be no more than about 20 lines.

--  Bruce Momjian                        |  http://www.op.net/~candle pgman@candle.pha.pa.us               |  (610)
853-3000+  If your life is a hard drive,     |  830 Blythe Avenue +  Christ can be your backup.        |  Drexel Hill,
Pennsylvania19026
 


pgsql-hackers by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: [HACKERS] network_ops in 7.0 and pg_dump question
Next
From: Tom Lane
Date:
Subject: Re: [HACKERS] psql and libpq fixes