G
G
greenmapc2018-12-05 19:32:24
PostgreSQL
greenmapc, 2018-12-05 19:32:24

How to demonstrate MVCC in Postgresql?

I need to demonstrate how MVCC works in Postgresql using several parallel sessions working with the same data in a table.
Can you suggest how to do this or throw off a link to a resource explaining this?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
Melkij, 2018-12-05
@melkij

t1
begin;
t2
begin;
update tablename set foo = 10;
t1
select * from tablename; -- do not wait for the lock, do not see the results of changes from t2. This only happens in MVCC.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question