Re: Suspicious behaviour on applying XLOG_HEAP2_VISIBLE.

From: Simon Riggs <simon(at)2ndQuadrant(dot)com>
To: Simon Riggs <simon(at)2ndquadrant(dot)com>
Cc: Michael Paquier <michael(dot)paquier(at)gmail(dot)com>, Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>, Andres Freund <andres(at)anarazel(dot)de>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Robert Haas <robertmhaas(at)gmail(dot)com>, Noah Misch <noah(at)leadboat(dot)com>, Masahiko Sawada <sawada(dot)mshk(at)gmail(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Suspicious behaviour on applying XLOG_HEAP2_VISIBLE.
Date: 2016-04-24 21:10:19
Message-ID: CANP8+j+js54hyKnoQ+DYjyYe7hWKgc+bCohw2Bu19k8SWVpduw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 18 April 2016 at 13:15, Simon Riggs <simon(at)2ndquadrant(dot)com> wrote:

> On 18 April 2016 at 12:43, Michael Paquier <michael(dot)paquier(at)gmail(dot)com>
> wrote:
>
>> On Sat, Apr 16, 2016 at 5:37 AM, Alvaro Herrera
>> <alvherre(at)2ndquadrant(dot)com> wrote:
>> > Andres Freund wrote:
>> >> On 2016-04-15 15:26:17 -0400, Tom Lane wrote:
>> >> > I think the bottom line is that we misdesigned the WAL representation
>> >> > by assuming that this sort of info could always be piggybacked on a
>> >> > transaction commit record. It's time to fix that.
>> >>
>> >> I think we got to piggyback it onto a commit record, as long as there's
>> >> one. Otherwise it's going to be more complex (queuing messages when
>> >> reading an inval record) and slower (more wal records). I can easily
>> >> develop a patch for that, the question is what we do on the back
>> >> branches...
>> >
>> > We have introduced new wal records in back branches previously --
>> > nothing new (c.f. 8e9a16ab8f7f0e5813644975cc3f336e5b064b6e). The user
>> > just needs to make sure to upgrade the standbys first. If they don't,
>> > they would die upon replay of the first such record, which they can take
>> > as an indication that they need to be upgraded; the standby is down for
>> > some time, but there is no data loss or corruption.
>>
>> Yeah, introducing a new WAL record to address this issue in
>> back-branches would not be an issue, and that's what we should do. For
>> HEAD, let's add that in the commit record.
>>
>
> (non-reply just because of travel)
>
> OK, I'll write up a patch today to fix, with a view to backpatching.
>

Patch from Tuesday. On various planes.

--
Simon Riggs http://www.2ndQuadrant.com/
<http://www.2ndquadrant.com/>
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

Attachment Content-Type Size
inval_only.v1.patch application/octet-stream 7.3 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Simon Riggs 2016-04-24 21:14:13 Re: Proposed change to make cancellations safe
Previous Message Christian Ullrich 2016-04-24 19:56:17 Re: pgsql: Add putenv support for msvcrt from Visual Studio 2013