Re: pg15b3: recovery fails with wal prefetch enabled

Thomas Munro <thomas.munro@gmail.com>

From: Thomas Munro <thomas.munro@gmail.com>
To: Justin Pryzby <pryzby@telsasoft.com>
Cc: Kyotaro Horiguchi <horikyota.ntt@gmail.com>, "Shinoda, Noriyoshi (PN Japan FSIP)" <noriyoshi.shinoda@hpe.com>, Tomas Vondra <tomas.vondra@enterprisedb.com>, Stephen Frost <sfrost@snowman.net>, Andres Freund <andres@anarazel.de>, Jakub Wartak <Jakub.Wartak@tomtom.com>, Alvaro Herrera <alvherre@2ndquadrant.com>, Tomas Vondra <tomas.vondra@2ndquadrant.com>, Dmitry Dolgov <9erthalion6@gmail.com>, David Steele <david@pgmasters.net>, pgsql-hackers <pgsql-hackers@postgresql.org>
Date: 2022-09-02T06:20:42Z
Lists: pgsql-hackers
On Thu, Sep 1, 2022 at 11:18 PM Thomas Munro <thomas.munro@gmail.com> wrote:
> Ahh, problem repro'd here with WAL compression.  More soon.

I followed some false pistes for a while there, but I finally figured
it out what's happening here after Justin kindly shared some files
with me.  The active ingredient here is a setting of
maintenance_io_concurency=0, which runs into a dumb accounting problem
of the fencepost variety and incorrectly concludes it's reached the
end early.  Setting it to 3 or higher allows his system to complete
recovery.  I'm working on a fix ASAP.



Commits

  1. Fix recovery_prefetch with low maintenance_io_concurrency.

  2. doc: warn of SECURITY DEFINER schemas for non-sql_body functions