PostgreSQL 문서에는 SELECT를 포함한 모든 SQL이 트랜잭션 (BEGIN ~ COMMIT) 내에서 실행된다고 하네요
PostgreSQL actually treats every SQL statement as being executed within a transaction. If you do not issue a BEGIN command, then each individual statement has an implicit BEGIN and (if successful) COMMIT wrapped around it. A group of statements surrounded by BEGIN and COMMIT is sometimes called a transaction block.
https://www.postgresql.org/docs/13/tutorial-transactions.html
pg_stat_database에서 xact_commit 값을 참고하시면 좋을 듯 합니다.
postgres=# select xact_commit from pg_stat_database where datname='postgres' postgres-# ; xact_commit ------------- 850753 (1 row) postgres=# select xact_commit from pg_stat_database where datname='postgres' ; xact_commit ------------- 850754 (1 row)