Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1aUmVV-0006AW-NK for pgsql-hackers@arkaria.postgresql.org; Sun, 14 Feb 2016 02:33:53 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84) (envelope-from ) id 1aUmVV-000660-6b for pgsql-hackers@arkaria.postgresql.org; Sun, 14 Feb 2016 02:33:53 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84) (envelope-from ) id 1aUmUA-0004bm-TW for pgsql-hackers@postgresql.org; Sun, 14 Feb 2016 02:32:31 +0000 Received: from tamriel.snowman.net ([2001:4830:167b::11]) by makus.postgresql.org with esmtp (Exim 4.84) (envelope-from ) id 1aUmU7-0001T5-Hc for pgsql-hackers@postgresql.org; Sun, 14 Feb 2016 02:32:29 +0000 Received: by tamriel.snowman.net (Postfix, from userid 1000) id B7C275F798; Sat, 13 Feb 2016 21:32:25 -0500 (EST) Date: Sat, 13 Feb 2016 21:32:25 -0500 From: Stephen Frost To: Craig Ringer Cc: Robert Haas , Tom Lane , "pgsql-hackers@postgresql.org" Subject: Re: Re: [COMMITTERS] pgsql: Introduce group locking to prevent parallel processes from deadl Message-ID: <20160214023225.GG3331@tamriel.snowman.net> References: <27041.1455388321@sss.pgh.pa.us> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="qq/nmn35hA65zZ5G" Content-Disposition: inline In-Reply-To: X-Editor: Vim http://www.vim.org/ X-Info: http://www.snowman.net X-Operating-System: Linux/3.13.0-61-generic (x86_64) X-Uptime: 21:29:34 up 193 days, 11:00, 9 users, load average: 0.13, 0.06, 0.05 User-Agent: Mutt/1.5.21 (2010-09-15) X-Pg-Spam-Score: -1.9 (-) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-hackers Precedence: bulk Sender: pgsql-hackers-owner@postgresql.org --qq/nmn35hA65zZ5G Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable * Craig Ringer (craig@2ndquadrant.com) wrote: > On 14 February 2016 at 08:05, Robert Haas 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. >=20 > 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 t= he > 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 --qq/nmn35hA65zZ5G Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAEBCgAGBQJWv+c5AAoJEO1sijiDR2RVuXkQALh/WkNNB6uz6uKRwedFgMDh nMKBDUtcHGAxP8WieFnQ7/If4yWljeSK9NS9HQ8rJ3xiMNf4cUO9poBS3CG6e1VY WO+40aEUWFx45ILJf/sv5g6pncr7rZEO7Z6ooLGp62foFAMLQiwPTrHR7hZWTi8z 0nAoW2GYTY65jYUBeHyYDO5Ue6fjPR1NKv48lFHRMoJL/fyomVUJ0JvEZKWA2rA/ mJuOKUs7rW02sqE48ZDuQL0FMArE5AuNYGdbfBpDHaDDqIrq4dmpK1B/47jrue8u pxDdnrhQXNi5wWPSA0YRGYSGOIbSwuRy/IiPHQkGYDpVQLSINvevkkjYd1Tea06c 4VVB2IEnATIo0Zp1jDcL1MC1WHqqPjbT68prRkoxhTIymAyCtWsHji5+P8SQBLcs OVxbQVcoUp2sjGu+8vJALHxqb3GXGrRv9ZEH6iUF+06uRfFZgNDj1Ru0s/IAyxhl UQGyN/oBAgV1crfQBodLnMA0VESVemNCHsMoOBh+M8jGR5BQPEeIZvReQLXsdhRt ylsVvDvn7+gzXMd0nSQYwQ79lNbyqDwvPMliicJMYU3uJ4tZpbZQFgiDkYcKp5FG 6CTQKTdlFor+yWBu/wEcMFTX95L01ar1QMX2nu0OShPQpQb9zLoWXg1g+3Svmnr0 nm8clUUAsnDZ+ddRKywF =yw21 -----END PGP SIGNATURE----- --qq/nmn35hA65zZ5G--