B
B
beduin012018-04-09 19:01:58
PostgreSQL
beduin01, 2018-04-09 19:01:58

Who can explain the essence of PostgreSQL locks on the fingers?

I read several articles on Habré, but for myself I did not understand the problems with locks. If the situation when someone writes, a situation may arise when someone tries to read, I still understand, then some other cases do not come to my mind. Can you explain them?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
F
Falseclock, 2018-04-09
@Falseclock

A typical case is a transaction.
You start doing a big update that will take, say, 3 minutes, while someone else is trying to change it. The table is locked for modification until the long transaction ends. And if you do select ... for update, then the table will be locked even for selects.
Rare case - alteration.
You modify the table by adding or deleting a field, and at that moment an analytical report occurs. At this point, the table is locked.
https://postgrespro.ru/docs/postgrespro/10/explici...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question