Re: [HACKERS] TODO item

Поиск
Список
Период
Сортировка
От Bruce Momjian
Тема Re: [HACKERS] TODO item
Дата
Msg-id 200002071631.LAA02832@candle.pha.pa.us
обсуждение исходный текст
Ответ на Re: [HACKERS] TODO item  (Tatsuo Ishii <t-ishii@sra.co.jp>)
Ответы Re: [HACKERS] TODO item  (Tom Lane <tgl@sss.pgh.pa.us>)
Re: [HACKERS] TODO item  (Don Baccus <dhogaza@pacifier.com>)
Список pgsql-hackers
> BTW, Hiroshi has noticed me an excellent point #3:
> 
> >Session-1
> >begin;
> >update A ...;
> >
> >Session-2
> >begin;
> >select * fromB ..;
> >    There's no PostgreSQL shared buffer available.
> >    This backend has to force the flush of a free buffer
> >    page. Unfortunately the page was dirtied by the
> >    above operation of Session-1 and calls pg_fsync()
> >    for the table A. However fsync() is postponed until
> >    commit of this backend.
> >
> >Session-1
> >commit;
> >    There's no dirty buffer page for the table A.
> >    So pg_fsync() isn't called for the table A.
> 
> Seems there's no easy solution for this. Maybe now is the time to give
> up my idea...

I hate to see you give up on this.  

Don't tell me we fsync on every buffer write, and not just at
transaction commit?  That is terrible.

What if we set a flag on the file descriptor stating we dirtied/wrote
one of its buffers during the transaction, and cycle through the file
descriptors on buffer commit and fsync all involved in the transaction. 
We also fsync if we close a file descriptor and it was involved in the
transaction.  We clear the "involved in this transaction" flag on commit
too.

--  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 по дате отправления:

Предыдущее
От: Bruce Momjian
Дата:
Сообщение: Re: [HACKERS] New Globe
Следующее
От: Bruce Momjian
Дата:
Сообщение: Inprise/Corel merger