Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1YLUak-0004Cx-Eb for pgsql-sql@arkaria.postgresql.org; Wed, 11 Feb 2015 10:32:22 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1YLUaj-00038c-MK for pgsql-sql@arkaria.postgresql.org; Wed, 11 Feb 2015 10:32:21 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1YLUai-00038V-Jx for pgsql-sql@postgresql.org; Wed, 11 Feb 2015 10:32:20 +0000 Received: from tkt-001-i374.relay.mailchannels.net ([174.136.5.177] helo=relay.mailchannels.net) by makus.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1YLUaf-0003xC-0H for pgsql-sql@postgresql.org; Wed, 11 Feb 2015 10:32:18 +0000 X-Sender-Id: hostpapa|x-authuser|tompaynter@tdpe.co.uk Received: from hp139.hostpapa.com (ip-10-213-14-133.us-west-2.compute.internal [10.213.14.133]) by relay.mailchannels.net (Postfix) with ESMTPA id 8F49E1006F9 for ; Wed, 11 Feb 2015 10:32:13 +0000 (UTC) X-Sender-Id: hostpapa|x-authuser|tompaynter@tdpe.co.uk Received: from hp139.hostpapa.com (hp139.hostpapa.com [10.254.82.95]) (using TLSv1 with cipher DHE-RSA-AES256-SHA) by 0.0.0.0:2500 (trex/5.4.3); Wed, 11 Feb 2015 10:32:13 GMT X-MC-Relay: Neutral X-MailChannels-SenderId: hostpapa|x-authuser|tompaynter@tdpe.co.uk X-MailChannels-Auth-Id: hostpapa X-MC-Loop-Signature: 1423650733759:1703369594 X-MC-Ingress-Time: 1423650733759 Received: from localhost ([127.0.0.1]:53839 helo=webmail.tdpe.co.uk) by hp139.hostpapa.com with esmtpa (Exim 4.84) (envelope-from ) id 1YLUab-003AKN-TB for pgsql-sql@postgresql.org; Wed, 11 Feb 2015 10:32:14 +0000 Received: from 213.218.193.226 ([213.218.193.226]) (proxying for 213.218.193.226) (SquirrelMail authenticated user tompaynter@tdpe.co.uk) by webmail.tdpe.co.uk with HTTP; Wed, 11 Feb 2015 10:32:13 -0000 Message-ID: Date: Wed, 11 Feb 2015 10:32:13 -0000 Subject: Advisory locks From: "Tom Paynter" To: pgsql-sql@postgresql.org User-Agent: SquirrelMail/1.5.2 [SVN] MIME-Version: 1.0 Content-Type: text/plain;charset=iso-8859-1 X-OutGoing-Spam-Status: No, score=-2.9 X-AuthUser: tompaynter@tdpe.co.uk Content-Transfer-Encoding: quoted-printable X-Pg-Spam-Score: 0.8 (/) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-sql Precedence: bulk Sender: pgsql-sql-owner@postgresql.org Hello All, I have a quick question about advisory locks, that I have not been able to figure out from the documentation. Say I have two tables: CREATE TABLE table_a ( table_a_id serial primary key, some more rows.... ); CREATE TABLE table_b ( table_b_id serial primary key, some more rows.... ); And I execute the following lines (from separate sessions): SELECT pg_advisory_lock(table_a_id) FROM table_a WHERE table_a_id=3D5; SELECT pg_advisory_lock(table_b_id) FROM table_b WHERE table_b_id=3D5; Will this try to acquire the same lock? Or is the id tied to the table somehow? Thanks for your time. Tom --=20 Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-sql