public inbox for [email protected]  
help / color / mirror / Atom feed
From: Tatsuo Ishii <[email protected]>
To: [email protected]
Cc: [email protected]
Subject: Re: FATAL: simple query "BEGIN" arrived before ending an extended query message
Date: Thu, 10 Jul 2025 11:55:35 +0900 (JST)
Message-ID: <[email protected]> (raw)
In-Reply-To: <CAGXsc+YizFbO1kOhnNq_oRz9F2iDtjCGGq0oNA+BjcQPqJy8tg@mail.gmail.com>
References: <CAGXsc+YizFbO1kOhnNq_oRz9F2iDtjCGGq0oNA+BjcQPqJy8tg@mail.gmail.com>

> Hi all,
> 
> Recently we started seeing errors from pgpool-II stating 'FATAL: simple
> query "BEGIN" arrived before ending an extended query message'. These
> errors started occurring after upgrading PgJDBC from 42.7.5 to 42.7.7. I've
> created the following ticket at PgJDBC:
> https://github.com/pgjdbc/pgjdbc/issues/3724 . It was closed as a duplicate
> of https://github.com/pgjdbc/pgjdbc/issues/3107 , which describes a similar
> issue and was opened by Tatsuo Ishii.
> 
> The problem however, is that previously the error was only triggered when
> using autosave, which is not a common setup, but now the error is triggered
> even when using default configuration. This makes it impossible to combine
> PgJDBC 42.7.6 and up with pgpool-II. I do not know what the plans are on
> this from the side of PostgreSQL and PgJDBC, but I just wanted to raise
> some awareness on this issue here. IMHO PostgreSQL should either explicitly
> allow this (in which case pgpool-II needs to be fixed) or explicitly
> disallow it (in which case PgJDBC needs to be fixed).

As far as I know about PostgreSQL's side, Tom Lane said about this:
https://www.postgresql.org/message-id/[email protected]

> I think it's poor practice, at best.  You should end the
> extended-protocol query cycle before invoking simple query.
> 
> I'm disinclined to document, or make any promises about,
> what happens if you mix the protocols.

In my understanding he does not say PostgreSQL explicitely allows this
(mixing extended and simple protocol message).

>  The current situation
> is no good as we now simply cannot upgrade PgJDBC anymore (and the same
> will be true for all other users of pgpool-II).

Yeah.

What I don't understand is, why PgJDBC decided to make it default
(sending simple protocol query after extended query protocl without
sync) even without autosave being set when they update PgJDBC to
42.7.7.

Best regards,
--
Tatsuo Ishii
SRA OSS K.K.
English: http://www.sraoss.co.jp/index_en/
Japanese:http://www.sraoss.co.jp





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: [email protected]
  Cc: [email protected], [email protected], [email protected]
  Subject: Re: FATAL: simple query "BEGIN" arrived before ending an extended query message
  In-Reply-To: <[email protected]>

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

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