pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: David G. Johnston <david.g.johnston@gmail.com>
To: Marc Millas <marc.millas@mokadb.com>
Cc: pgsql-general@lists.postgresql.org <pgsql-general@lists.postgresql.org>
Subject: Re: locks within select
Date: Tue, 14 Dec 2021 06:20:19 -0700
Message-ID: <CAKFQuwYZRteawdWqqTeP9Kj8M8pvEbdiJotLDjTOgOiSAGS++g@mail.gmail.com> (raw)
In-Reply-To: <CADX_1abCAs4airzsqdjY_=gK2nUQkuWodCifWeAgY31Ft88zbw@mail.gmail.com>
References: <CADX_1abA6Ykusa4m2WPv6wHfH1ZoCG=gZ+VJS2EFe0HaGB_1Rw@mail.gmail.com>
	<CAKFQuwbPCNFALoj5vsR5ONYfMEUwzgP8OTjT1Ud=bvZZQLDWag@mail.gmail.com>
	<CADX_1abCAs4airzsqdjY_=gK2nUQkuWodCifWeAgY31Ft88zbw@mail.gmail.com>

On Tuesday, December 14, 2021, Marc Millas <marc.millas@mokadb.com> wrote:
>
>
> So, if its not a locking scheme, what can block hundreds of transaction to
> get to the secondary ???
>

The transactions are present on the secondary.  It just realizes that
applying them may cause problems (think drop table or truncate) and so it
chooses not to until local queries have completed.  Since WAL is strictly
linear all sessions are affected.  There is no locking needed, or IIUC even
possible, and MVCC is not applicable as it only concerns itself with the
behavior lf the writable primary system.

I suspect there are better attempts at describing this than my
half-conscious effort here, though I’ve captured the crux of it - streaming
WAL is its own unique thing.

David J.

view thread (6+ messages)  latest in thread

Message-ID: <CAKFQuwYZRteawdWqqTeP9Kj8M8pvEbdiJotLDjTOgOiSAGS++g@mail.gmail.com>
Permalink:  ../CAKFQuwYZRteawdWqqTeP9Kj8M8pvEbdiJotLDjTOgOiSAGS++g@mail.gmail.com/
Also on:    postgresql.org/message-id/CAKFQuwYZRteawdWqqTeP9Kj8M8pvEbdiJotLDjTOgOiSAGS++g@mail.gmail.com

 · 

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-general@postgresql.org
  Cc: david.g.johnston@gmail.com, marc.millas@mokadb.com
  Subject: Re: locks within select
  In-Reply-To: <CAKFQuwYZRteawdWqqTeP9Kj8M8pvEbdiJotLDjTOgOiSAGS++g@mail.gmail.com>
  References: <CADX_1abA6Ykusa4m2WPv6wHfH1ZoCG=gZ+VJS2EFe0HaGB_1Rw@mail.gmail.com> <CAKFQuwbPCNFALoj5vsR5ONYfMEUwzgP8OTjT1Ud=bvZZQLDWag@mail.gmail.com> <CADX_1abCAs4airzsqdjY_=gK2nUQkuWodCifWeAgY31Ft88zbw@mail.gmail.com> <CAKFQuwYZRteawdWqqTeP9Kj8M8pvEbdiJotLDjTOgOiSAGS++g@mail.gmail.com>

* 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