RE: xlog checkpoint depends on sync() ... seems unsafe
От | Mikheev, Vadim |
---|---|
Тема | RE: xlog checkpoint depends on sync() ... seems unsafe |
Дата | |
Msg-id | 8F4C99C66D04D4118F580090272A7A234D3316@sectorbase1.sectorbase.com обсуждение исходный текст |
Ответ на | xlog checkpoint depends on sync() ... seems unsafe (Tom Lane <tgl@sss.pgh.pa.us>) |
Ответы |
Re: xlog checkpoint depends on sync() ... seems unsafe
Re: RE: xlog checkpoint depends on sync() ... seems unsafe |
Список | pgsql-hackers |
> The more I think about this, the more disturbed I get. It seems clear > that this sequence is capable of writing out the checkpoint record > before all dirty data pages have reached disk. If we suffer a crash > before the data pages do reach disk, then on restart we will > not realize we need to redo the changes to those pages. > This seems an awfully large hole for what is claimed to be > a bulletproof xlog technology. > > I feel that checkpoint should not use sync(2) at all, but > should instead depend on fsync'ing the data files --- since > fsync doesn't return until the write is done, this is considerably > more secure. I never was happy about sync() of course. This is just another reason to re-write smgr. I don't know how useful is second sync() call, but on Solaris (and I believe on many other *NIXes) rc0 calls it three times, -:) Why? Maybe now, with two checkpoints in log, we should start redo from oldest one? This will increase recovery time of course -:( Vadim
В списке pgsql-hackers по дате отправления: