what's the exact command definition in read committed isolation level? - Mailing list pgsql-general

From Jinhua Luo
Subject what's the exact command definition in read committed isolation level?
Date
Msg-id CAAc9rOz1TMme7NTb3NkvHiPjX0ckmC5UmFhadPdmXkmxagco7w@mail.gmail.com
Whole thread Raw
Responses Re: what's the exact command definition in read committed isolation level?
List 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 by date:

Previous
From: Adrian Klaver
Date:
Subject: Re: pg_basebackup: return value 1: reason?
Next
From: Jony Cohen
Date:
Subject: Re: understanding postgres backend process memory usage