Re: LOCK for non-tables

Поиск
Список
Период
Сортировка
От Simon Riggs
Тема Re: LOCK for non-tables
Дата
Msg-id 1294420662.19612.18331.camel@ebony
обсуждение исходный текст
Ответ на LOCK for non-tables  (Robert Haas <robertmhaas@gmail.com>)
Ответы Re: LOCK for non-tables  (Robert Haas <robertmhaas@gmail.com>)
Список pgsql-hackers
On Fri, 2011-01-07 at 08:16 -0500, Robert Haas wrote:

> One of the things that I ripped out of the SQL/MED syntax patch before
> committing it was the hack that made LOCK TABLE also work on FOREIGN
> TABLEs.  Since we're treating a foreign table as a different kind of
> object than a TABLE in some places, we shouldn't confuse the two
> things elsewhere, at least in my opinion.  I also noticed that pg_dump
> has the following comment:
> 
>               * NOTE: it'd be kinda nice to lock other relations
> too, not only
>                  * plain tables, but the backend doesn't presently
> allow that.
> 
> This is pretty trivial from a backend point of view, especially with
> the new objectaddress.c machinery. 

I'm not clear why we'd want to do that. We shouldn't just be adding
things because we can do them easily, we should be adding things with a
clear use case or a standardization requirement.

If anyone suggested tuning some aspect of the code, yet offered no
evidence that it was ever important, it would get shot down. Why is this
any different?

Allowing LOCK on views would significantly undermine admin structures
where the only access to a table is via a view. This would allow people
to lock objects they didn't previously have access to and seems likely
to introduce more contention into applications as a result.

-- Simon Riggs           http://www.2ndQuadrant.com/books/PostgreSQL Development, 24x7 Support, Training and Services



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

Предыдущее
От: Robert Haas
Дата:
Сообщение: Re: Re: [COMMITTERS] pgsql: New system view pg_stat_replication displays activity of wal sen
Следующее
От: "Jehan-Guillaume (ioguix) de Rorthais"
Дата:
Сообщение: Re: some comments rewording in recovery.conf.sample about SR