pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Andres Freund <andres@anarazel.de>
Cc: Simon Riggs <simon@2ndquadrant.com>
Cc: Robert Haas <robertmhaas@gmail.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 12:03:44 -0400
Message-ID: <28427.1536681824@sss.pgh.pa.us> (raw)
In-Reply-To: <20180911152929.7xo4qgb3eyz6djfu@alap3.anarazel.de>
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>
	<CANP8+jL8qfE+dnGuC6ySBX_cqoHy3TBJ=O6dOFX9dQCA5N_jTA@mail.gmail.com>
	<20180911152929.7xo4qgb3eyz6djfu@alap3.anarazel.de>

Andres Freund <andres@anarazel.de> writes:
> On 2018-09-11 16:23:44 +0100, Simon Riggs wrote:
>> It's hard to see how any reasonable workload would affect the standby. And
>> if it did, you'd change the parameter and restart, just like you already
>> have to do if someone changes max_connections on master first.

> Isn't one of the most common ways to run into "out of shared memory"
> "You might need to increase max_locks_per_transaction." to run pg_dump?
> And that's pretty commonly done against standbys?

If the startup process has acquired enough AELs to approach locktable
full, any concurrent pg_dump has probably failed already, because it'd
be trying to share-lock every table and so would have a huge conflict
cross-section; it's hard to believe it wouldn't get cancelled pretty
early in that process.  (Again, if you think this scenario is probable,
you have to explain the lack of field complaints.)

The case where this behavior might really be of some use, IMO, is the
lots-of-small-transactions scenario --- but we lack the stop-new-locks
mechanism that would be needed to make the behavior actually effective
for that case.

			regards, tom lane




view thread (19+ messages)  latest in thread

Message-ID: <28427.1536681824@sss.pgh.pa.us>
Permalink:  ../28427.1536681824@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/28427.1536681824@sss.pgh.pa.us

 · 

reply

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, andres@anarazel.de, simon@2ndquadrant.com, robertmhaas@gmail.com, jeff.janes@gmail.com
  Subject: Re: StandbyAcquireAccessExclusiveLock doesn't necessarily
  In-Reply-To: <28427.1536681824@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> <CANP8+jL8qfE+dnGuC6ySBX_cqoHy3TBJ=O6dOFX9dQCA5N_jTA@mail.gmail.com> <20180911152929.7xo4qgb3eyz6djfu@alap3.anarazel.de> <28427.1536681824@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