From: Tom Lane <tgl@sss.pgh.pa.us>
To: Robert Haas <robertmhaas@gmail.com>
Cc: Simon Riggs <simon@2ndquadrant.com>
Cc: Jeff Janes <jeff.janes@gmail.com>
Cc: PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Subject: Re: StandbyAcquireAccessExclusiveLock doesn't necessarily
Date: Tue, 11 Sep 2018 11:33:02 -0400
Message-ID: <26562.1536679982@sss.pgh.pa.us> (raw)
In-Reply-To: <CA+Tgmobu67L=9Y9NwxCLy5CzZUrBJ_UO1SOU_eiGf=N-+9heRQ@mail.gmail.com>
References: <6202.1536359835@sss.pgh.pa.us>
<CA+TgmoasJ8xBt2F2QXRaf1q8+9auXFi2QT_fWMrWpCX837mkxw@mail.gmail.com>
<CANP8+jLttaWVs+Dn+inyrqB4attSKaywavFEkOCO5eQN91DT8A@mail.gmail.com>
<22379.1536675935@sss.pgh.pa.us>
<CA+Tgmobu67L=9Y9NwxCLy5CzZUrBJ_UO1SOU_eiGf=N-+9heRQ@mail.gmail.com>
Robert Haas <robertmhaas@gmail.com> writes:
> On Tue, Sep 11, 2018 at 10:25 AM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>> The point of the previous coding here was that perhaps there's some
>> range of number-of-locks-needed where kicking hot-standby queries
>> off of locks would allow recovery to proceed. However, it is (as
>> far as I know) unproven that that actually works, let alone is
>> effective enough to justify maintaining very-hard-to-test code for.
> I think, though, that it is pretty obvious that the intermediate zone
> which you refer to as "perhaps" existing does indeed exist. Queries
> running on the standby consume lock table slots, and killing them
> frees up those slots. Q.E.D.
Sounds like lock whack-a-mole to me. If there are enough standby queries
running to create the problem, there's probably a continuous inbound
query stream; you aren't going to be able to free up locktable space on
net without some way of suppressing new lock acquisitions altogether.
That's still more mechanism that'd have to be designed, written, and
tested. And believe you me, I will insist on a test case, now that we
know this has been broken for at least two years with nobody noticing.
regards, tom lane
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-hackers@postgresql.org
Cc: tgl@sss.pgh.pa.us, robertmhaas@gmail.com, simon@2ndquadrant.com, jeff.janes@gmail.com
Subject: Re: StandbyAcquireAccessExclusiveLock doesn't necessarily
In-Reply-To: <26562.1536679982@sss.pgh.pa.us>
References: <6202.1536359835@sss.pgh.pa.us> <CA+TgmoasJ8xBt2F2QXRaf1q8+9auXFi2QT_fWMrWpCX837mkxw@mail.gmail.com> <CANP8+jLttaWVs+Dn+inyrqB4attSKaywavFEkOCO5eQN91DT8A@mail.gmail.com> <22379.1536675935@sss.pgh.pa.us> <CA+Tgmobu67L=9Y9NwxCLy5CzZUrBJ_UO1SOU_eiGf=N-+9heRQ@mail.gmail.com> <26562.1536679982@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox