Re: potential stuck lock in SaveSlotToPath()

From: Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>
To: Andres Freund <andres(at)anarazel(dot)de>
Cc: Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: potential stuck lock in SaveSlotToPath()
Date: 2020-03-18 19:54:19
Message-ID: 20200318195419.GA7549@alvherre.pgsql
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 2020-Mar-18, Andres Freund wrote:

> Hi,
>
> On 2020-03-18 16:46:23 +0100, Peter Eisentraut wrote:
> > When SaveSlotToPath() is called with elevel=LOG, the early exits don't
> > release the slot's io_in_progress_lock. Fix attached.
>
> I'm a bit confused as to why we we ever call it with elevel = LOG
> (i.e. why we have the elevel parameter at all). That seems to have been
> there from the start, so it's either me or Robert that's to blame. But I
> can't immediately see a reason for it?

I guess you didn't want failure to save a slot be a reason to abort a
checkpoint.

--
Álvaro Herrera https://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Laurenz Albe 2020-03-18 19:55:30 Re: Berserk Autovacuum (let's save next Mandrill)
Previous Message Alvaro Herrera 2020-03-18 19:50:38 Re: Minimal logical decoding on standbys