what's the exact command definition in read committed isolation level?

Поиск
Список
Период
Сортировка
От Jinhua Luo
Тема what's the exact command definition in read committed isolation level?
Дата
Msg-id CAAc9rOz1TMme7NTb3NkvHiPjX0ckmC5UmFhadPdmXkmxagco7w@mail.gmail.com
обсуждение исходный текст
Ответы Re: what's the exact command definition in read committed isolation level?  (Albe Laurenz <laurenz.albe@wien.gv.at>)
Список pgsql-general
Hi All,

The document said, "Read Committed mode starts each command with a new
snapshot that includes all transactions committed up to that instant".

But what about the embedded commands within the outer command itself?
Do they share the same snapshot with the outer command?

a) trigger

This is the case I am sure it would break/extend the read committed
isolation level. When the outer command triggers a trigger function,
each command within the function would own new snapshot that includes
all transactions committed up to that instant, that means it would see
new data beyond the transaction of the outer command.

b) CTE

It seems that all WITH sub-queries share the same snapshot of the main
query, but I am not sure.

c) other forms of sub-query

e.g. sub-query in WHERE part,

select * from foo where col1 > any(select col1 from bar where ....);

If some other transaction committed after the second run of subquery,
which modified table bar, does the third run of subquery see the new
data?

I could not find any answer from the official documents, so could
anybody help to answer them?

Thanks!

Regards,
Jinhua Luo


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

Предыдущее
От: Adrian Klaver
Дата:
Сообщение: Re: pg_basebackup: return value 1: reason?
Следующее
От: Jony Cohen
Дата:
Сообщение: Re: understanding postgres backend process memory usage