Re: serializable read only deferrable

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: serializable read only deferrable
Дата
Msg-id 20059.1291838768@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: serializable read only deferrable  ("Kevin Grittner" <Kevin.Grittner@wicourts.gov>)
Ответы Re: serializable read only deferrable  ("Kevin Grittner" <Kevin.Grittner@wicourts.gov>)
Список pgsql-hackers
"Kevin Grittner" <Kevin.Grittner@wicourts.gov> writes:
> Tom Lane <tgl@sss.pgh.pa.us> wrote:
>> So the implementation I had in mind would allow SET TRANSACTION
>> operations to occur later in a subxact, as long as they were
>> redundant and weren't actually trying to change the active value.
> It's easy to see how I can allow changes in the subtransaction as
> long as they don't specify READ WRITE when the top level is READ
> ONLY, but it isn't obvious to me how to only allow it at the start
> of the subtransaction.  I'm OK with taking the easy route on this
> aspect of things, but if someone needs READ ONLY to "stick" for the
> duration of a subtransaction, I'm not sure how to do that.  (And I'm
> not sure you were actually suggesting that, either.)

What I suggested was to not allow read-only -> read-write state
transitions except (1) before first snapshot in the main xact
and (2) at subxact exit (the OVERRIDE case).  That seems to accomplish
the goal.  Now it will also allow dropping down to read-only
mid-subtransaction, but I don't think forbidding that case is worth
extra complexity.
        regards, tom lane


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

Предыдущее
От: Dimitri Fontaine
Дата:
Сообщение: Re: Review: Extensions Patch
Следующее
От: Jan Urbański
Дата:
Сообщение: Re: Solving sudoku using SQL