AW: AW: AW: WAL-based allocation of XIDs is insecure

Поиск
Список
Период
Сортировка
От Zeugswetter Andreas SB
Тема AW: AW: AW: WAL-based allocation of XIDs is insecure
Дата
Msg-id 11C1E6749A55D411A9670001FA687963368228@sdexcsrv1.f000.d0188.sd.spardat.at
обсуждение исходный текст
Ответы Re: AW: AW: AW: WAL-based allocation of XIDs is insecure  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
> >> Hmm.  Actually, what is written to the log is the *modified* page not
> >> its original contents.
> > Well, that sure is not what was discussed on the list for implementation !!
> > I thus really doubt above statement.
> 
> Read the code.

Ok, sad.

> 
> > Each page about to be modified should be written to the txlog once,
> > and only once before the first modification after each checkpoint.
> 
> Yes, there's only one page dump per page per checkpoint.  But the
> sequence is (1) make the modification in shmem buffers then (2) make
> the XLOG entry. 
> 
> I believe this is OK since the XLOG entry is flushed before any of
> the pages it affects are written out from shmem.  Since we have not
> changed the storage management policy, it's OK if heap pages contain
> changes from uncommitted transactions

Sure, but the other way would be a lot less complex.
> --- all we must avoid is
> inconsistencies (eg not all three pages of a btree split written out),
> and redo of the XLOG entry will ensure that for us.

Is it so hard to swap ? First write page to log then modify in shmem. 
Then those pages would have additional value, because
then utilities could do all sorts of things with those pages.

1. Create a consistent state of the db by only applying "physical log" pagesafter checkpoint (in case a complete WAL
rollforwardbails out)
 
2. Create a consistent online backup snapshot, by first doing something like an ordinary tar, and after that save all
"physicallog" pages.
 

Andreas


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Zeugswetter Andreas SB
Дата:
Сообщение: AW: AW: WAL-based allocation of XIDs is insecure
Следующее
От: Peter Eisentraut
Дата:
Сообщение: Re: How to shoot yourself in the foot: kill -9 postmaster