pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: PG Bug reporting form <noreply@postgresql.org>
To: pgsql-bugs@lists.postgresql.org
Cc: obouda@gk-software.com
Subject: BUG #18294: Manual savepoints do not work with JDBC param cleanupSavepoints=true
Date: Mon, 15 Jan 2024 10:30:45 +0000
Message-ID: <18294-65a4754c8e42a477@postgresql.org> (raw)

The following bug has been logged on the website:

Bug reference:      18294
Logged by:          Ondrej Bouda
Email address:      obouda@gk-software.com
PostgreSQL version: 16.1
Operating system:   Linux
Description:        

We come across a bug when it is not possible to roll back to a manual
savepoint.
The rollback fails with error: Error during rollback to savepoint.
org.postgresql.util.PSQLException: ERROR: savepoint "SAVE_TEST_01" does not
exist

Steps to reproduce:
1/ Connect via JDBC with JDBC params
autosave=always&cleanupSavepoints=true.
2/ Create a manual savepoint: savepoint SAVE_TEST_01;
3/ Try to roll back => error: rollback to SAVE_TEST_01;

Reproduced with:
* JDBC driver ver. 42.7.1
* PostgreSQL ver. 16.1 + 15.5 + 14.10

The error occurs when using SQL statements as well as when using the JDBC
API for savepoint/rollback (Connection.setSavepoint +
Connection.rollback).

The documentation for the cleanupSavepoints parameter reads: "Determines if
the SAVEPOINT created in autosave mode is released prior to the
statement."
* https://jdbc.postgresql.org/documentation/use/
* I would understand the doc in the way that it should affect just and only
the savepoint created by the driver due to the autosave=true param
(therefore, manual savepoints should not be affected).



view thread (3+ messages)  latest in thread

Message-ID: <18294-65a4754c8e42a477@postgresql.org>
Permalink:  ../18294-65a4754c8e42a477@postgresql.org/
Also on:    postgresql.org/message-id/18294-65a4754c8e42a477@postgresql.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-bugs@postgresql.org
  Cc: noreply@postgresql.org, pgsql-bugs@lists.postgresql.org, obouda@gk-software.com
  Subject: Re: BUG #18294: Manual savepoints do not work with JDBC param cleanupSavepoints=true
  In-Reply-To: <18294-65a4754c8e42a477@postgresql.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox