pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Stephen Frost <sfrost@snowman.net>
To: Craig Ringer <craig@2ndquadrant.com>
Cc: Robert Haas <robertmhaas@gmail.com>
Cc: Tom Lane <tgl@sss.pgh.pa.us>
Cc: pgsql-hackers@postgresql.org <pgsql-hackers@postgresql.org>
Subject: Re: Re: [COMMITTERS] pgsql: Introduce group locking to prevent parallel processes from deadl
Date: Sat, 13 Feb 2016 21:32:25 -0500
Message-ID: <20160214023225.GG3331@tamriel.snowman.net> (raw)
In-Reply-To: <CAMsr+YH2-NKD=7XR3kkQHtHk1w-C+y5Qrsjzq8ni_MtAoaTUvQ@mail.gmail.com>
References: <E1aSRBD-0006kV-CQ@gemulon.postgresql.org>
	<27041.1455388321@sss.pgh.pa.us>
	<CA+TgmoZZ4jDSxwYpr-EG+pxjt=3wU2UTwBQuOJ6HkmJawuZEmw@mail.gmail.com>
	<CAMsr+YH2-NKD=7XR3kkQHtHk1w-C+y5Qrsjzq8ni_MtAoaTUvQ@mail.gmail.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-hackers>

* Craig Ringer (craig@2ndquadrant.com) wrote:
> On 14 February 2016 at 08:05, Robert Haas <robertmhaas@gmail.com> wrote:
> > First, the overall concept here is that processes can either be a
> > member of a lock group or a member of no lock group.  The concept of a
> > lock group is formally separate from the concept of a parallel group
> > created by a ParallelContext, but it is not clear that there will ever
> > be any other context in which a lock group will be a good idea.  It is
> > not impossible to imagine: for example, suppose you had a group of
> > backends that all had TCP client connections, and those processes all
> > wanted to ingest data and stuff it in a table but without allowing any
> > unrelated process to touch the table, say because it was going to be
> > inconsistent during the operation and until indexes were afterwards
> > rebuilt.
> 
> The case that comes to mind for me is in logical decoding, for decoding
> prepared xacts. Being able to make the prepared xact a member of a "lock
> group" along with the decoding session's xact may provide a solution to the
> locking-related challenges there.

I was thinking this would be the way to address the current issues with
parallel pg_dump and having a shared snpashot.

> I haven't looked closely at what's involved in the decoding prepared xact
> locking issues yet, just an idea.

Yeah, don't have much more than it being an idea to use this for the
pg_dump case.  I do know that's a case which has been brought up a
couple of times before.

> To do this it'd have to be possible to add an existing session/xact to a
> lock group (or make it the leader of a new lock group then join that
> group). Do you think that's practical with your design?

Seems like the same question applies to the pg_dump case.

Thanks!

Stephen

Attachments:

  signature.asc (application/pgp-signature, 818B) download

view thread (25+ messages)  latest in thread

Message-ID: <20160214023225.GG3331@tamriel.snowman.net>
Permalink:  ../20160214023225.GG3331@tamriel.snowman.net/
Also on:    postgresql.org/message-id/20160214023225.GG3331@tamriel.snowman.net

 · 

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-committers@postgresql.org
  Cc: sfrost@snowman.net, craig@2ndquadrant.com, robertmhaas@gmail.com, tgl@sss.pgh.pa.us, pgsql-hackers@postgresql.org
  Subject: Re: [COMMITTERS] pgsql: Introduce group locking to prevent parallel processes from deadl
  In-Reply-To: <20160214023225.GG3331@tamriel.snowman.net>
  References: <E1aSRBD-0006kV-CQ@gemulon.postgresql.org> <27041.1455388321@sss.pgh.pa.us> <CA+TgmoZZ4jDSxwYpr-EG+pxjt=3wU2UTwBQuOJ6HkmJawuZEmw@mail.gmail.com> <CAMsr+YH2-NKD=7XR3kkQHtHk1w-C+y5Qrsjzq8ni_MtAoaTUvQ@mail.gmail.com> <20160214023225.GG3331@tamriel.snowman.net>

* 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