Re: Allowing DML RULEs that produce Read Only actions during RO xacts

Поиск
Список
Период
Сортировка
От Simon Riggs
Тема Re: Allowing DML RULEs that produce Read Only actions during RO xacts
Дата
Msg-id 1260115758.13774.45417.camel@ebony
обсуждение исходный текст
Ответ на Re: Allowing DML RULEs that produce Read Only actions during RO xacts  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
On Sun, 2009-12-06 at 10:26 -0500, Tom Lane wrote:
> 
> > +     /*
> > +      * If we're running a SELECT, allow it. This ensures that a
> > +      * write rule such as ON INSERT DO SELECT can be executed in
> > +      * a read-only session.
> > +      */
> > +     if (plannedstmt->commandType == CMD_SELECT)
> > +             return;
> 
> This will fail, very nastily, in writable-CTE cases.

If the feature is not able to be added easily, then I'm not interested
either. It's a nice-to-have and I have no time for anything more, so if
it gives problems in other areas, I would not pursue further.

One question: would a writable-CTE be running in a read-only xact?

-- Simon Riggs           www.2ndQuadrant.com



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

Предыдущее
От: Simon Riggs
Дата:
Сообщение: Error message translation, with variable reason text
Следующее
От: Simon Riggs
Дата:
Сообщение: Re: Hot standby, recent changes