Re: statement_timeout doesn't work

Поиск
Список
Период
Сортировка
От David G Johnston
Тема Re: statement_timeout doesn't work
Дата
Msg-id 1405962979850-5812243.post@n5.nabble.com
обсуждение исходный текст
Ответ на Re: statement_timeout doesn't work  (Sergey Konoplev <gray.ru@gmail.com>)
Ответы Re: statement_timeout doesn't work  (Sergey Konoplev <gray.ru@gmail.com>)
Список pgsql-general
Sergey Konoplev-2 wrote
> On Fri, Jul 18, 2014 at 6:15 PM, David G Johnston
> <

> david.g.johnston@

> > wrote:
>>>   query       | BEGIN;
>>> SET LOCAL statement_timeout TO 1000;
>>> DROP INDEX public.idx1;
>>> ALTER INDEX public.idx2 RENAME TO idx1;
>>> END;
>>
>> If I read this correctly you sent the entire begin...end as a single
>> compound statement and so, depending on how you did this, the actual SET
>> LOCAL command never got executed since the entire command is waiting for
>> the
>> necessary locks before it can be executed.
>
> Right, I send it as a single command.
>
>> Your sample test doesn't appear to correctly exercise this behavior.  Are
>> you maybe using -c in the problem case?  Or a client library besides psql
>> that would behave in this manner?
>
> In this case I use DBD::Pg, but I haven't found any notes about such
> kind of behavior.
>
>> Note that the fact that "query" is a compound statement is why I claim
>> the
>> above...
>
> So, If I separate the commands everything will will work as expected,
> correct?

I would assume so.

If you wait to send the DROP/ALTER index commands until the SET LOCAL
command returns successfully then both of those commands will die if they
exceed the timeout specified.

Dave




--
View this message in context:
http://postgresql.1045698.n5.nabble.com/statement-timeout-doesn-t-work-tp5811704p5812243.html
Sent from the PostgreSQL - general mailing list archive at Nabble.com.


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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: postgres_fdw - push down conditionals for ENUMs
Следующее
От: David G Johnston
Дата:
Сообщение: Re: cursor return null