Re: [HACKERS] TODO item

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Hiroshi Inoue <Inoue(at)tpf(dot)co(dot)jp>
Cc: Tatsuo Ishii <t-ishii(at)sra(dot)co(dot)jp>, pgsql-hackers(at)postgreSQL(dot)org, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Subject: Re: [HACKERS] TODO item
Date: 2000-02-08 03:00:40
Message-ID: 200002080300.WAA05584@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

> > > * open and fsync each segment of each rel that I'm trying to commit
> > > (or maybe just the dirtied segments, if we want to do the bookkeeping
> > > at that level of detail);
> >
> > By fsync'ing on close, we can not worry about file descriptors that were
> > forced out of the file descriptor cache during the transaction.
> >
> > If we dirty a buffer, we have to mark the buffer as dirty, and the file
> > descriptor associated with that buffer needing fsync. If someone else
>
> What is the file descriptors associated with buffers ?
> Would you call heap_open() etc each time when a buffer is about
> to be dirtied?

WriteBuffer -> FlushBuffer to flush buffer. Buffer can be either marked
dirty or written/fsync to disk.

If written/fsync, smgr_flush -> mdflush -> _mdfd_getseg gets MdfdVec
structure of file descriptor.

When doing flush here, mark MdfdVec structure new element needs_fsync to
true. Don't do fsync yet.

If just marked dirty, also mark MdfdVec.needs_fsync as true.

Do we currently all write dirty buffers on transaction commit? We
certainly must already do that in fsync mode.

On commit, run through virtial file descriptor table and do fsyncs on
file descriptors. No need to find the buffers attached to file
descriptors. They have already been written by other code. They just
need fsync.

> There's already -F option for speeding up.
> Who would want non-WAL mode with strict reliabilty after WAL
> is implemented ?

Let's see what Vadim says. Seems like a nice performance boost and 7.0
could be 6 months away. If we didn't ship with fsync enabled, I
wouldn't care. Also, Vadim has a new job, so we really can't be sure
about WAL in 7.1.

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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2000-02-08 03:26:19 Re: [HACKERS] TODO item
Previous Message Tom Lane 2000-02-08 03:00:35 Re: [HACKERS] TODO item