You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi
when I tested the builting pool, I found a dirty reading
The test scenario is :
1. pool setting
session_pool_size = 1
session_pool_ports = 1
2. session A
update data and not commit,exiting the session A
[postgres@builtin_pool ~]$ psql -d test -p 5433
psql (11devel)
Type "help" for help.
test=# create table tbl1(id int);
CREATE TABLE
test=# insert into tbl1 select 1;
INSERT 0 1
test=# begin ;
BEGIN
test=# update tbl1 set id = 2;
UPDATE 1
test=# \q
[postgres@builtin_pool ~]$
3. session B
connect to the test database in session B ,you can see the data of an uncommitted transaction in session A,and can commit the transaction !!!
[postgres@builtin_pool pgdata]$ psql -p 5433 -d test
psql (11devel)
Type "help" for help.
test=# select * from tbl1 ;
id
----
2
(1 row)
test=# end;
COMMIT
4. session B
update data not commit , exit the session B
test=# begin ;
BEGIN
test=# update tbl1 set id = 3;
UPDATE 1
test=# select * from tbl1;
id
----
3
(1 row)
test=#
test=#
test=# \q
5. session A
Connect to another database in session A
[postgres@builtin_pool ~]$ psql -d postgres -p 5433
psql: FATAL: Failed to open session (dbname=postgres user=postgres) in backend 25752 (dbname=test user=postgres)
6. session B
the not commit transaction is rollback
[postgres@builtin_pool pgdata]$ psql -p 5433 -d test
psql (11devel)
Type "help" for help.
test=# select * from tbl1;
id
----
2
(1 row)
test=# end;
WARNING: there is no transaction in progress
COMMIT
The text was updated successfully, but these errors were encountered:
Sorry, it is known limitation: it is possible to connect to each session pool (port) only using one database/user pair. Attempt to connect using some other database will cause "Failed to open session" error.
Uh oh!
There was an error while loading. Please reload this page.
Hi
when I tested the builting pool, I found a dirty reading
The test scenario is :
1. pool setting
2. session A
3. session B
4. session B
5. session A
6. session B
The text was updated successfully, but these errors were encountered: