Alexander Lakhin <exclus...@gmail.com> writes: > I've reproduced this behavior with two reduced sqls. > prepared_xacts.sql: > BEGIN TRANSACTION ISOLATION LEVEL SERIALIZABLE; > CREATE TABLE pxtest4 (a int); > PREPARE TRANSACTION 'regress_sub2'; > \c - > COMMIT PREPARED 'regress_sub2'; > -- the script ends prematurely and doesn't reach COMMIT when \c fails due > -- to the "too many clients" error.
Hmm, okay. Not really a bug, or at least I don't see much we could do about it. It does seem odd that a prepared transaction --- which, at least in theory, we should know won't do anything more --- can block other serializable transactions. Maybe that could be improved, but it sounds like a research project not a bug fix. regards, tom lane