Re: LOCK TABLE HELP

From: luca(dot)ciciriello(at)email(dot)it
To: Alvaro Herrera <alvherre(at)commandprompt(dot)com>, Richard Huxton <dev(at)archonet(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: LOCK TABLE HELP
Date: 2008-03-17 07:51:36
Message-ID: 5ff66fb34ebe46a5a11bca1db080cc14@85.18.140.153
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Sorry for delay in my answer.&nbsp;The problem is that with the lock
instructions my app remain in a freeze state. It resembling a MUTEX
deadlock.Anyway, as soon as possible I&#39;ll test yuor idea to use a
separate PQexec.

Thanks.Luca.&nbsp; --------- Original Message -------- Da: &quot;Alvaro
Herrera&quot; &lt;alvherre(at)commandprompt(dot)com&gt; To: &quot;Richard
Huxton&quot; &lt;dev(at)archonet(dot)com&gt; Cc:
pgsql-general(at)postgresql(dot)org Oggetto: Re: [GENERAL] LOCK TABLE HELP Data:
14/03/08 17:51 &gt; luca(dot)ciciriello(at)email(dot)it wrote: &gt; My action
are: &gt; &gt; void *Execute(void *pParam) &gt; { &gt;
........................................ &gt;
........................................ &gt; &gt; &amp; nbsp; string
tableLock = &quot;BEGIN WORK;&quot;; &gt; tableLock.append(&quot;
LOCK TABLE &quot;); &gt; tableLock.append(actorTable); &gt;
tableLock.append(&quot; IN ACCESS EXCLUSIVE MODE;&quot;); &gt; res =
PQexec(connection, tableLock.c_str()); &gt; Well, all this doesn&#39;t
work (the connection is th e always the same in &gt; all methods and
functions). Have I to Lock the table, perform some &gt; operation on this
table, and unlock the table all in the same function &gt; scope? What do
you mean it doesn&#39;t work? How exactly it fails? If anything, I&#39;d
suggest to send the LOCK TABLE in a separate PQexec() call from BEGIN WORK.
-- Alvaro Herrera
http://www.CommandPrompt.com/ PostgreSQL Replication, Consulting, Custom
Development, 24x7 support -- Sent via pgsql-general mailing list
(pgsql-general(at)postgresql(dot)org) To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general
--
Email.it, the professional e-mail, gratis per te: http://www.email.it/f

Sponsor:
Scopri le tue passioni con Leonardo.it!

Clicca qui: http://adv.email.it/cgi-bin/foclick.cgi?mid=7615&d=20080317

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Albe Laurenz 2008-03-17 08:05:31 Re: How to silence psql notices, warnings, etc.?
Previous Message Adam Rich 2008-03-17 07:13:55 8.3.0 upgrade