ZhangZhihui's Blog  

 

zzh@ZZHPC:~$ docker run --name postgres16 -p 5432:5432 -e POSTGRES_USER=root -e POSTGRES_PASSWORD=aaa -d postgres:alpine
8e36b7bdc47572723a416c319b83f20b2eac7ef25adb3ac1a875e909f45ebdb6
zzh@ZZHPC:~$ docker exec -it postgres16 createdb --username=root --owner=root simple_bank
zzh@ZZHPC:~$ docker exec -it postgres16 psql -U root simple_bank
psql (16.1)
Type "help" for help.

simple_bank=# show transaction isolation level;
 transaction_isolation 
-----------------------
 read committed
(1 row)

simple_bank=# begin;
BEGIN
simple_bank=*# set transaction isolation level repeatable read;
SET
simple_bank=*# show transaction isolation level;
 transaction_isolation 
-----------------------
 repeatable read
(1 row)

simple_bank=*# set transaction isolation level serializable;
SET
simple_bank=*# show transaction isolation level;
 transaction_isolation 
-----------------------
 serializable
(1 row)

simple_bank=*#

 

 

 

posted on 2023-11-20 19:08  ZhangZhihuiAAA  阅读(42)  评论(0编辑  收藏  举报