PGCES-02 · Question #125
There is a table "tb1" that has a column "c1" defined as type TEXT. The following SQL is executed while client "A" is connected. BEGIN; LOCK TABLE tb1 IN ACCESS EXCLUSIVE MODE; SELECT * FROM tb1…
The correct answer is B. The process for client "B" is blocked until the current transaction for client "A" is finished. E. The process of client"B" will not affect the SELECT result of client "A". See the full explanation below for the reasoning.
Question
There is a table "tb1" that has a column "c1" defined as type TEXT. The following SQL is executed while client "A" is connected. BEGIN; LOCK TABLE tb1 IN ACCESS EXCLUSIVE MODE; SELECT * FROM tb1; While the above 'SELECT' statement is being executed, client "B" connects to the same database and executes the following SQL. Select two correct statements describing the behavior of PostgreSQL. INSERT INTO tb1 (c1) VALUES ('new line'); Note: the default transaction isolation level is set to "read committed".
Options
- AThe process for client "B" is blocked until the current connection for client "A" is finished.
- BThe process for client "B" is blocked until the current transaction for client "A" is finished.
- CThe process for client "B" will be deleted regardless of the condition of client "A".
- DThe process of client"B" will affect the SELECT result of client "A".
- EThe process of client"B" will not affect the SELECT result of client "A".
How the community answered
(65 responses)- A3% (2)
- B83% (54)
- C5% (3)
- D9% (6)
Community Discussion
No community discussion yet for this question.