Re: LOCK TABLE HELP

Поиск
Список
Период
Сортировка
От luca.ciciriello@email.it
Тема Re: LOCK TABLE HELP
Дата
Msg-id 5ff66fb34ebe46a5a11bca1db080cc14@85.18.140.153
обсуждение исходный текст
Ответ на LOCK TABLE HELP  (luca.ciciriello@email.it)
Ответы Re: LOCK TABLE HELP  (Alvaro Herrera <alvherre@commandprompt.com>)
Список pgsql-general
Sorry for delay in my answer. 
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'll test yuor idea to use a separate PQexec.

Thanks.

Luca. 

--------- Original Message --------
Da: "Alvaro Herrera" <alvherre@commandprompt.com>
To: "Richard Huxton" <dev@archonet.com>
Cc: pgsql-general@postgresql.org
Oggetto: Re: [GENERAL] LOCK TABLE HELP
Data: 14/03/08 17:51




> luca.ciciriello@email.it wrote:

> My action are:
>
> void *Execute(void *pParam)
> {
> ........................................
> ........................................
>
> & nbsp; string tableLock = "BEGIN WORK;";
> tableLock.append(" LOCK TABLE ");
> tableLock.append(actorTable);
> tableLock.append(" IN ACCESS EXCLUSIVE MODE;");
> res = PQexec(connection, tableLock.c_str());


> Well, all this doesn't work (the connection is th e always the same in
> all methods and functions). Have I to Lock the table, perform some
> operation on this table, and unlock the table all in the same function
> scope?

What do you mean it doesn't work? How exactly it fails?

If anything, I'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@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

----
Email.it, the professional e-mail, gratis per te: clicca qui

Sponsor:
Scopri le tue passioni con Leonardo.it!
Clicca qui

В списке pgsql-general по дате отправления:

Предыдущее
От: "Daniel Verite"
Дата:
Сообщение: Re: Updating
Следующее
От: "Pavan Deolasee"
Дата:
Сообщение: Re: 8.3.0 upgrade