Re: WAL consistency check facility - Mailing list pgsql-hackers
From | Simon Riggs |
---|---|
Subject | Re: WAL consistency check facility |
Date | |
Msg-id | CANP8+j+PAuraRBFRdHSPNKed1v89POfZYTcCyUy44EvupJXFXA@mail.gmail.com Whole thread Raw |
In response to | Re: WAL consistency check facility (Robert Haas <robertmhaas@gmail.com>) |
Responses |
Re: WAL consistency check facility
|
List | pgsql-hackers |
On 1 September 2016 at 11:16, Robert Haas <robertmhaas@gmail.com> wrote: > On Wed, Aug 31, 2016 at 7:02 PM, Simon Riggs <simon@2ndquadrant.com> wrote: >> I'd prefer a solution that was not dependent upon RmgrID at all. >> >> If there are various special cases that we need to cater for, ISTM >> they would be flaws in the existing WAL implementation rather than >> anything we would want to perpetuate. I hope we'll spend time fixing >> them rather than add loads of weird code to work around the >> imperfections. >> >> Underdocumented special case code is going to be unbelievably >> difficult to get right in the long term. > > It seems to me that you may be conflating the issue of which changes > should be masked out as hints (which is, indeed, special case code, > whether underdocumented or not) with the issue of which rmgrs the user > may want to verify (which is just a case of matching the rmgr ID in > the WAL record against a list provided by the user, and is not special > case code at all). Yep, it seems entirely likely that I am misunderstanding what is happening here. I'd like to see an analysis/discussion before we write code. As you might expect, I'm excited by this feature and the discoveries it appears likely to bring. We've got wal_log_hints and that causes lots of extra traffic. I'm happy with assuming that is switched on in this case also. (Perhaps we might have a wal_log_level with various levels of logging.) So in my current understanding, a hinted change has by definition no WAL record, so we just ship a FPW. A non-hint change has a WAL record and it is my (possibly naive) hope that all changes to a page are reflected in the WAL record/replay, so we can just make a simple comparison without caring what is the rmgr of the WAL record. If we can start by discussing which special cases we know about that require extra code, that will help. We can then decide whether to fix the WAL record/replay or fix the comparison logic, possibly on a case by case basis. My current preference is to generate lots of small fixes to existing WAL code and then have a very, very simple patch for this actual feature, but am willing to discuss alternate approaches. IMV this would be a feature certain users would want turned on all the time for everything. So I'm not bothered much about making this feature settable by rmgr. I might question why this particular feature would be settable by rmgr, when features like wal_log_hints and wal_compression are not, but such discussion is a minor point in comparison to discussing the main feature. -- Simon Riggs http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
pgsql-hackers by date: