Re: BUG #13920: pg_try_advisory_xact_lock bigint trouble

Поиск
Список
Период
Сортировка
От David G. Johnston
Тема Re: BUG #13920: pg_try_advisory_xact_lock bigint trouble
Дата
Msg-id CAKFQuwbq_y=b1xB9Phusvf5tOqs2RbFYW8E2_gL4r5cdJzd0Cg@mail.gmail.com
обсуждение исходный текст
Ответ на Re: BUG #13920: pg_try_advisory_xact_lock bigint trouble  ("David G. Johnston" <david.g.johnston@gmail.com>)
Ответы Re: BUG #13920: pg_try_advisory_xact_lock bigint trouble
Список pgsql-bugs
On Monday, February 8, 2016, David G. Johnston <david.g.johnston@gmail.com>
wrote:

> On Friday, February 5, 2016, <mtakvel@gmail.com
> <javascript:_e(%7B%7D,'cvml','mtakvel@gmail.com');>> wrote:
>
>> The following bug has been logged on the website:
>>
>> Bug reference:      13920
>> Logged by:          Valeriy
>> Email address:      mtakvel@gmail.com
>> PostgreSQL version: 9.5.0
>> Operating system:   Ubuntu
>> Description:
>>
>> Hello, I have few high load big tables. My logic calls
>> pg_try_advisory_xact_lock(bitint) for locking row in current table. As I
>> see
>> with bigint param pg_try_advisory_xact_lock lock same ids for all my
>> tables.
>> Insthead lock only row in one current table. Looks like this is bug and
>> will
>> be cool if you fix it.
>>
>>
> Likely working as designed.  If you wish to provide an example of what you
> are doing we can probably explain your misunderstanding.  Basically,
> though, there is nothing about the ID you pass to the advisory lock
> functions that cause them to be associated with a table.  The ID is simply
> a number.   You should try the two-key version and associate the first key
> with the table (probably oid) and the second with the row on that table.
>
>
Though the two-arg uses Integer so maybe not...

You should poprobably explain your use case a bit on the -general list if
you'd like to discuss alternatives.  But the behavior described is how
things work right now.

 David J.

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

Предыдущее
От: "David G. Johnston"
Дата:
Сообщение: Re: BUG #13918: Simple query with Having clause returns incorrect results
Следующее
От: Michael Paquier
Дата:
Сообщение: Re: BUG #13928: Initdb.bat will not install if path has a space.