Re: [HACKERS] Broken hint bits (freeze) - Mailing list pgsql-hackers

From Amit Kapila
Subject Re: [HACKERS] Broken hint bits (freeze)
Date
Msg-id CAA4eK1LQT5LQcGB5Hq+e4Vfb2bc5MCM6_WBbi9arecuAB-6m7g@mail.gmail.com
Whole thread Raw
In response to Re: [HACKERS] Broken hint bits (freeze)  (Bruce Momjian <bruce@momjian.us>)
List pgsql-hackers
On Thu, Jun 29, 2017 at 6:57 AM, Bruce Momjian <bruce@momjian.us> wrote:
> On Sat, Jun 24, 2017 at 09:24:21AM +0530, Amit Kapila wrote:
>> > I was not clear.  I was not saying there can be only one extra WAL file.
>> > I am saying the "Latest checkpoint location" should be one WAL file
>> > farther on the master.  I think the big problem is that we need a full
>> > replay of that WAL file, not just having it one less than the master.
>> >
>>
>> If the user has properly shutdown, then that last file should only
>> have checkpoint record, is it safe to proceed with upgrade without
>> actually copying that file?
>
> Yes, but how do we know they processed all the records in the
> second-to-last WAL file (in WAL shipping mode).
>

I don't see any straightforward way to know the same except that user
gets the latest WAL location (replay or flush) and then verify it
against last wal file (maybe by using something like pg_waldump).  I
think the another problem as pointed by Sergey up thread is how to
ensure all the buffers that contain changes are flushed to disk.

-- 
With Regards,
Amit Kapila.
EnterpriseDB: http://www.enterprisedb.com



pgsql-hackers by date:

Previous
From: Amit Kapila
Date:
Subject: [HACKERS] hash index on unlogged tables doesn't behave as expected
Next
From: Amit Langote
Date:
Subject: Re: [HACKERS] Multi column range partition table