Re: Changing WAL Header to reduce contention duringReserveXLogInsertLocation()

Поиск
Список
Период
Сортировка
Искать
От
Tomas Vondra
Тема
Re: Changing WAL Header to reduce contention duringReserveXLogInsertLocation()
Дата
Msg-id
37d0d88b-8c89-4c86-4431-4f34eab0b86d@2ndquadrant.com
Ответ на
Список
Дерево обсуждения
Changing WAL Header to reduce contention during ReserveXLogInsertLocation() Simon Riggs <simon@2ndquadrant.com>
Re: Changing WAL Header to reduce contention during ReserveXLogInsertLocation() Robert Haas <robertmhaas@gmail.com>
Re: Changing WAL Header to reduce contention during ReserveXLogInsertLocation() Tom Lane <tgl@sss.pgh.pa.us>
Re: Changing WAL Header to reduce contention duringReserveXLogInsertLocation() Andres Freund <andres@anarazel.de>
Re: Changing WAL Header to reduce contention during ReserveXLogInsertLocation() Tom Lane <tgl@sss.pgh.pa.us>
Re: Changing WAL Header to reduce contention duringReserveXLogInsertLocation() Andres Freund <andres@anarazel.de>
Re: Changing WAL Header to reduce contention during ReserveXLogInsertLocation() Tom Lane <tgl@sss.pgh.pa.us>
Re: Changing WAL Header to reduce contention duringReserveXLogInsertLocation() Andres Freund <andres@anarazel.de>
Re: Changing WAL Header to reduce contention during ReserveXLogInsertLocation() Tom Lane <tgl@sss.pgh.pa.us>
Re: Changing WAL Header to reduce contention during ReserveXLogInsertLocation() Simon Riggs <simon@2ndquadrant.com>
Re: Changing WAL Header to reduce contention duringReserveXLogInsertLocation() Michael Paquier <michael.paquier@gmail.com>
Re: Changing WAL Header to reduce contention during ReserveXLogInsertLocation() Pavan Deolasee <pavan.deolasee@gmail.com>
Re: Changing WAL Header to reduce contention during ReserveXLogInsertLocation() Robert Haas <robertmhaas@gmail.com>
Re: Changing WAL Header to reduce contention during ReserveXLogInsertLocation() Simon Riggs <simon@2ndquadrant.com>
Re: Changing WAL Header to reduce contention duringReserveXLogInsertLocation() Michael Paquier <michael.paquier@gmail.com>
Re: Changing WAL Header to reduce contention during ReserveXLogInsertLocation() Simon Riggs <simon@2ndquadrant.com>
Re: Changing WAL Header to reduce contention duringReserveXLogInsertLocation() Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
Re: Changing WAL Header to reduce contention during ReserveXLogInsertLocation() Pavan Deolasee <pavan.deolasee@gmail.com>
Re: Changing WAL Header to reduce contention during ReserveXLogInsertLocation() Simon Riggs <simon@2ndquadrant.com>
Re: Changing WAL Header to reduce contention duringReserveXLogInsertLocation() Michael Paquier <michael@paquier.xyz>
Re: Changing WAL Header to reduce contention during ReserveXLogInsertLocation() Simon Riggs <simon@2ndquadrant.com>
Re: Changing WAL Header to reduce contention duringReserveXLogInsertLocation() Andres Freund <andres@anarazel.de>
Re: Changing WAL Header to reduce contention duringReserveXLogInsertLocation() Michael Paquier <michael@paquier.xyz>
Re: Changing WAL Header to reduce contention during ReserveXLogInsertLocation() Simon Riggs <simon@2ndquadrant.com>
Re: Changing WAL Header to reduce contention during ReserveXLogInsertLocation() Robert Haas <robertmhaas@gmail.com>
Re: Changing WAL Header to reduce contention during ReserveXLogInsertLocation() Pavan Deolasee <pavan.deolasee@gmail.com>
Re: Changing WAL Header to reduce contention during ReserveXLogInsertLocation() Andrew Dunstan <andrew.dunstan@2ndquadrant.com>
Re: Changing WAL Header to reduce contention during ReserveXLogInsertLocation() Robert Haas <robertmhaas@gmail.com>
Re: Changing WAL Header to reduce contention during ReserveXLogInsertLocation() Tom Lane <tgl@sss.pgh.pa.us>
Re: Changing WAL Header to reduce contention during ReserveXLogInsertLocation() Pavan Deolasee <pavan.deolasee@gmail.com>
Re: Changing WAL Header to reduce contention during ReserveXLogInsertLocation() Tom Lane <tgl@sss.pgh.pa.us>
Re: Changing WAL Header to reduce contention during ReserveXLogInsertLocation() Robert Haas <robertmhaas@gmail.com>
Re: Changing WAL Header to reduce contention during ReserveXLogInsertLocation() Tom Lane <tgl@sss.pgh.pa.us>
Re: Changing WAL Header to reduce contention duringReserveXLogInsertLocation() Michael Paquier <michael@paquier.xyz>
Re: Changing WAL Header to reduce contention during ReserveXLogInsertLocation() Robert Haas <robertmhaas@gmail.com>
Re: Changing WAL Header to reduce contention duringReserveXLogInsertLocation() Michael Paquier <michael@paquier.xyz>
Re: Changing WAL Header to reduce contention during ReserveXLogInsertLocation() Andrew Dunstan <andrew.dunstan@2ndquadrant.com>
Re: Changing WAL Header to reduce contention duringReserveXLogInsertLocation() Michael Paquier <michael@paquier.xyz>
Re: Changing WAL Header to reduce contention during ReserveXLogInsertLocation() Pavan Deolasee <pavan.deolasee@gmail.com>
Re: Changing WAL Header to reduce contention during ReserveXLogInsertLocation() Robert Haas <robertmhaas@gmail.com>
Re: Changing WAL Header to reduce contention duringReserveXLogInsertLocation() Michael Paquier <michael@paquier.xyz>
Re: Changing WAL Header to reduce contention during ReserveXLogInsertLocation() Simon Riggs <simon@2ndquadrant.com>
Re: Changing WAL Header to reduce contention during ReserveXLogInsertLocation() Tom Lane <tgl@sss.pgh.pa.us>
Re: Changing WAL Header to reduce contention duringReserveXLogInsertLocation() Tomas Vondra <tomas.vondra@2ndquadrant.com>
Re: Changing WAL Header to reduce contention during ReserveXLogInsertLocation() Tom Lane <tgl@sss.pgh.pa.us>
Re: Changing WAL Header to reduce contention duringReserveXLogInsertLocation() Tomas Vondra <tomas.vondra@2ndquadrant.com>
Re: Changing WAL Header to reduce contention during ReserveXLogInsertLocation() Simon Riggs <simon@2ndquadrant.com>
Re: Changing WAL Header to reduce contention during ReserveXLogInsertLocation() Robert Haas <robertmhaas@gmail.com>
Re: Changing WAL Header to reduce contention during ReserveXLogInsertLocation() Robert Haas <robertmhaas@gmail.com>
Re: Changing WAL Header to reduce contention duringReserveXLogInsertLocation() Tomas Vondra <tomas.vondra@2ndquadrant.com>
Re: Changing WAL Header to reduce contention during ReserveXLogInsertLocation() Simon Riggs <simon@2ndquadrant.com>
Re: Changing WAL Header to reduce contention during ReserveXLogInsertLocation() Simon Riggs <simon@2ndquadrant.com>
Re: Changing WAL Header to reduce contention during ReserveXLogInsertLocation() Simon Riggs <simon@2ndquadrant.com>
Re: Changing WAL Header to reduce contention duringReserveXLogInsertLocation() Heikki Linnakangas <hlinnaka@iki.fi>
Re: Changing WAL Header to reduce contention during ReserveXLogInsertLocation() Tom Lane <tgl@sss.pgh.pa.us>
Re: Changing WAL Header to reduce contention duringReserveXLogInsertLocation() Andres Freund <andres@anarazel.de>
Re: Changing WAL Header to reduce contention duringReserveXLogInsertLocation() Heikki Linnakangas <hlinnaka@iki.fi>
Re: Changing WAL Header to reduce contention duringReserveXLogInsertLocation() Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
Re: Changing WAL Header to reduce contention during ReserveXLogInsertLocation() Simon Riggs <simon@2ndquadrant.com>
Re: Changing WAL Header to reduce contention duringReserveXLogInsertLocation() Heikki Linnakangas <hlinnaka@iki.fi>
Re: Changing WAL Header to reduce contention during ReserveXLogInsertLocation() Andrew Dunstan <andrew.dunstan@2ndquadrant.com>
Re: Changing WAL Header to reduce contention during ReserveXLogInsertLocation() Simon Riggs <simon@2ndquadrant.com>
Re: Changing WAL Header to reduce contention during ReserveXLogInsertLocation() Tom Lane <tgl@sss.pgh.pa.us>
Re: Changing WAL Header to reduce contention during ReserveXLogInsertLocation() Simon Riggs <simon@2ndquadrant.com>
Re: Changing WAL Header to reduce contention during ReserveXLogInsertLocation() Robert Haas <robertmhaas@gmail.com>
Re: Changing WAL Header to reduce contention during ReserveXLogInsertLocation() Simon Riggs <simon@2ndquadrant.com>
Re: Changing WAL Header to reduce contention duringReserveXLogInsertLocation() Michael Paquier <michael@paquier.xyz>
Re: Changing WAL Header to reduce contention during ReserveXLogInsertLocation() Robert Haas <robertmhaas@gmail.com>
Re: Changing WAL Header to reduce contention during ReserveXLogInsertLocation() Pavan Deolasee <pavan.deolasee@gmail.com>
Re: Changing WAL Header to reduce contention duringReserveXLogInsertLocation() Michael Paquier <michael@paquier.xyz>
Re: Changing WAL Header to reduce contention during ReserveXLogInsertLocation() Claudio Freire <klaussfreire@gmail.com>
Re: Changing WAL Header to reduce contention during ReserveXLogInsertLocation() Tom Lane <tgl@sss.pgh.pa.us>
Re: Changing WAL Header to reduce contention during ReserveXLogInsertLocation() Claudio Freire <klaussfreire@gmail.com>
Re: Changing WAL Header to reduce contention during ReserveXLogInsertLocation() Claudio Freire <klaussfreire@gmail.com>
Re: Changing WAL Header to reduce contention during ReserveXLogInsertLocation() Alexander Kuzmenkov <a.kuzmenkov@postgrespro.ru>
On 03/29/2018 06:42 PM, Tom Lane wrote:
> Simon Riggs  writes:
>> I know the approach is new and surprising but I thought about it a lot
>> before proposing it and I couldn't see any holes; still can't. Please
>> give this some thought so we can get comfortable with this idea and
>> increase performance as a result. Thanks.
> 
> The long and the short of it is that this is a very dangerous-looking
> proposal, we are at the tail end of a development cycle, and there are
> ~100 other patches remaining in the commitfest that also have claims
> on our attention in the short time that's left.  If you're expecting
> people to spend more time thinking about this now, I feel you're being
> unreasonable.
> 

I agree.

> Also, I will say it once more: this change DOES decrease robustness.
> It's like blockchain without the chain aspect, or git commits without
> a parent pointer.  We are not only interested in whether individual
> WAL records are valid, but whether they form a consistent series.
> Cross-checking xl_prev provides some measure of confidence about that;
> xl_curr offers none.
> 

Not sure.

If each WAL record has xl_curr, then we know to which position the
record belongs (after verifying the checksum). And we do know the size
of each WAL record, so we should be able to deduce if two records are
immediately after each other. Which I think is enough to rebuild the
chain of WAL records.

To defeat this, this would need to happen:

a) the WAL record gets written to a different location
b) the xl_curr gets corrupted in sync with (a)
c) the WAL checksum gets corrupted in sync with (b)
d) the record overwrites existing record (same size/boundaries)

That seems very much like xl_prev.


regards
-- 
Tomas Vondra                  http://www.2ndQuadrant.com
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

В списке pgsql-hackers по дате отправления
От: Magnus Hagander
Дата:
От: Jeremy Finzel
Дата:
FAQ