Re: [PATCH] unalias of ACL_SELECT_FOR_UPDATE

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: [PATCH] unalias of ACL_SELECT_FOR_UPDATE
Дата
Msg-id 20069.1239977115@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: [PATCH] unalias of ACL_SELECT_FOR_UPDATE  (KaiGai Kohei <kaigai@ak.jp.nec.com>)
Ответы Re: [PATCH] unalias of ACL_SELECT_FOR_UPDATE  (KaiGai Kohei <kaigai@kaigai.gr.jp>)
Список pgsql-hackers
KaiGai Kohei <kaigai@ak.jp.nec.com> writes:
> Heikki Linnakangas wrote:
>> What's the point of doing SELECT FOR UPDATE if you're not actually going
>> to UPDATE the row? Having separate permissions for SELECT FOR UPDATE and
>> UPDATE seems useless.

> I wonder why SELECT FOR UPDATE need ACL_UPDATE, although the statement
> itself does not modify any of the given relation.

Because it blocks competing transactions in exactly the same way as an
UPDATE does.  I agree with Heikki --- there is no apparent value in
having a separate permission bit for this.  Given that AclMode is 3/4ths
full already, I'm not for inventing new privilege types without a very
strong use-case.

A separate bit for SELECT FOR SHARE might possibly make sense given the
strength-of-locking argument.  But doing both would eat half of the
available bits, and bring nearer the day that we need a different
representation for AclMode.
        regards, tom lane


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

Предыдущее
От: Sam Mason
Дата:
Сообщение: Re: Unicode string literals versus the world
Следующее
От: Tom Lane
Дата:
Сообщение: Re: [PATCH] SE-PostgreSQL for v8.5 development (r1819)