Re: Transaction issue

Karsten Hilbert <karsten.hilbert@gmx.net>

From: Karsten Hilbert <Karsten.Hilbert@gmx.net>
To: pgsql-general@lists.postgresql.org, pgsql-general@postgresql.org
Date: 2024-06-20T12:44:40Z
Lists: pgsql-general
Am Wed, Jun 19, 2024 at 02:32:07PM -0700 schrieb Rich Shepard:

> Yes, I see how this works if the transaction is committed. But before I
> commit the transaction I run a select statement to ensure the rows added are
> correct. Can I rollback a commited transaction? I've assumed not, so I won't
> commit the transaction without testing. And I'm not getting a detailed error
> message.

Shot in the dark: are you be any chance using tab-completion
when running the SELECT before the COMMIT ?

I've seen it happen a few times that tab completion ran
queries behind the scenes which failed and thereby set the
open transaction to abort state ...

And, no, I can't reproduce :/

Karsten
--
GPG  40BE 5B0E C98E 1713 AFA6  5BC0 3BEA AC80 7D4F C89B