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: cherio@gmail.com
Subject: BUG #17810: Update from 13.09 to 13.10 breaks SQLs with VACUUM
Date: Mon, 27 Feb 2023 15:27:42 +0000
Message-ID: <17810-8eb7b4e1b7a68e1a@postgresql.org> (raw)

The following bug has been logged on the website:

Bug reference:      17810
Logged by:          Yuri Cherio
Email address:      cherio@gmail.com
PostgreSQL version: 13.10
Operating system:   Ubuntu Linux 20.04.5 LTS
Description:        

My system has numerous SQL scripts (each script contains multiple SQL
statements). Many of them look like

UPDATE ...
INSERT ...
...
VACUUM ...

These scripts are being run from a Java program, with AutoCommit=true, via
JDBC as:

Statement statement = connection.createStatement();
connection.setAutoCommit(true);
statement.execute(sql);
...
statement.getMoreResults();
...

This worked well for years until the server (not the client program) was
upgraded to 13.10. After the upgrade all compound SQL statements with VACUUM
at the end fail with this error:

09:48:56.585 SEVERE Script processing failed:
org.postgresql.util.PSQLException: ERROR: VACUUM cannot be executed within a
pipeline
        at
org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2675)
        at
org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:2365)
        at
org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:355)
        at
org.postgresql.jdbc.PgStatement.executeInternal(PgStatement.java:490)
        at org.postgresql.jdbc.PgStatement.execute(PgStatement.java:408)
        at
org.postgresql.jdbc.PgStatement.executeWithFlags(PgStatement.java:329)
        at
org.postgresql.jdbc.PgStatement.executeCachedSql(PgStatement.java:315)
        at
org.postgresql.jdbc.PgStatement.executeWithFlags(PgStatement.java:291)
        at org.postgresql.jdbc.PgStatement.execute(PgStatement.java:286)
 
JDBC driver version is 42.3.3 (i tried the latest 42.5.4 and it doesn't make
a difference).
The same SQL scripts are still working with the latest postgresql 14.7



view thread (14+ messages)  latest in thread

Message-ID: <17810-8eb7b4e1b7a68e1a@postgresql.org>
Permalink:  ../17810-8eb7b4e1b7a68e1a@postgresql.org/
Also on:    postgresql.org/message-id/17810-8eb7b4e1b7a68e1a@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, cherio@gmail.com
  Subject: Re: BUG #17810: Update from 13.09 to 13.10 breaks SQLs with VACUUM
  In-Reply-To: <17810-8eb7b4e1b7a68e1a@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