Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1YM2Xw-0005xq-7F for pgsql-sql@arkaria.postgresql.org; Thu, 12 Feb 2015 22:47:44 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1YM2Xv-00058B-6i for pgsql-sql@arkaria.postgresql.org; Thu, 12 Feb 2015 22:47:43 +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 1YLUis-0005S5-Nr for pgsql-sql@postgresql.org; Wed, 11 Feb 2015 10:40:46 +0000 Received: from mail-wg0-x234.google.com ([2a00:1450:400c:c00::234]) by makus.postgresql.org with esmtps (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.80) (envelope-from ) id 1YLUio-00048V-Ul for pgsql-sql@postgresql.org; Wed, 11 Feb 2015 10:40:44 +0000 Received: by mail-wg0-f52.google.com with SMTP id z12so2488915wgg.11 for ; Wed, 11 Feb 2015 02:40:40 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=content-type:mime-version:content-transfer-encoding:message-id:date :subject:from:in-reply-to:references:to; bh=AqG4Pylxe11I11LsL/m3sbdJ+XGwRA1XJACZMghynTU=; b=qJUZSw4fBEEh1rUq7uRqU0cYAHjwqKAXw2UD93VmMN8hRtMgpbwy4sTWrnoMje5JtA 3Tz/Jj1x9j40E8ba0JXKqK4IduUj0Ku6+k8kxBpLk9KBHpFzpCq/I4Mg4RQW5kGmtANy hGC6098Ntm7e2RW1d+9+wMv0ptaNHEAzyGe98otMx9QU0wLSW6nvzppOtCJjTr9meQeM sb2aoB4QvpGEzfO5M7aLuNgET8/rt2pDyp/EZjxMCfw9eQtphEDbBWT6MWevaCczK/0N Yg+Rp7HGIfUKjfrdqQwGljKWAktqUSS2ILHtxumtq66FdtHpKwJTzLNtIO7TVQPrGlWM Wh3g== X-Received: by 10.194.81.1 with SMTP id v1mr59032483wjx.50.1423651239596; Wed, 11 Feb 2015 02:40:39 -0800 (PST) Received: from [127.0.0.1] (BC9CE653.mobile.pool.telekom.hu. [188.156.230.83]) by mx.google.com with ESMTPSA id v16sm6245257wib.5.2015.02.11.02.40.38 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 11 Feb 2015 02:40:39 -0800 (PST) Content-Type: text/plain; charset="iso-8859-1" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Mailer: BlackBerry Email (10.2.1.3442) Message-ID: <20150211104038.5402756.43145.2247@gmail.com> Date: Wed, 11 Feb 2015 11:40:38 +0100 Subject: Re: Advisory locks From: daku.sandor@gmail.com In-Reply-To: References: To: Tom Paynter , pgsql-sql@postgresql.org X-Pg-Spam-Score: -2.7 (--) 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 The parameter of the pg_advisory_lock is a simple bigint and of course it i= s completely unaware of the source of the value. Regards, S=E1ndor Daku =A0 Original Message =A0 From: Tom Paynter Sent: 2015. febru=E1r 11., szerda 11:33 To: pgsql-sql@postgresql.org Subject: [SQL] Advisory locks 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 --=20 Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-sql