public inbox for [email protected]  
help / color / mirror / Atom feed
Migrating from 10 -> 16, PreparedStatements disabled in JDBC and pgbouncer, I am getting : bind <unnamed>/C_5
3+ messages / 3 participants
[nested] [flat]

* Migrating from 10 -> 16, PreparedStatements disabled in JDBC and pgbouncer, I am getting : bind <unnamed>/C_5
@ 2024-10-18 10:11  Achilleas Mantzios - cloud <[email protected]>
  0 siblings, 1 reply; 3+ messages in thread

From: Achilleas Mantzios - cloud @ 2024-10-18 10:11 UTC (permalink / raw)
  To: [email protected]; +Cc: Achilleas Mantzios <[email protected]>

Hi All

We have disabled prepared statements in the JDBC settings 
(prepareThreshold=0) and in pgbouncer (max_prepared_statements=0).

I have noticed in the pgsql 16.4 logs some lines with this pattern :

10.9.0.110(45201) [4079203] 67122b3b.3e3e63 2024-10-18 12:32:44.260 EEST 
SMA  amantzio@dynacom line:35 LOG:  duration: 0.166 ms  parse <unnamed>: 
SELECT work_status FROM company_stuff WHERE ldap_cn = $
1
10.9.0.110(45201) [4079203] 67122b3b.3e3e63 2024-10-18 12:32:44.261 EEST 
SMA  amantzio@dynacom line:36 LOG:  duration: 0.553 ms  bind 
<unnamed>/C_5: SELECT work_status FROM company_stuff WHERE ldap_cn
= $1
10.9.0.110(45201) [4079203] 67122b3b.3e3e63 2024-10-18 12:32:44.261 EEST 
SMA  amantzio@dynacom line:38 LOG:  duration: 0.036 ms  execute 
<unnamed>/C_5: SELECT work_status FROM company_stuff WHERE ldap_
cn = $1

So the parse is done on an unnamed prepared statement, however the bind 
and the execute show this : /C_5 after<unnamed>. We haven't got any log 
entries with this /C_* pattern on the "parse" phase, only on "bind" and 
"execute". I am curious what those represent.

Thank you


^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: Migrating from 10 -> 16, PreparedStatements disabled in JDBC and pgbouncer, I am getting : bind <unnamed>/C_5
@ 2024-10-18 14:36  Tom Lane <[email protected]>
  parent: Achilleas Mantzios - cloud <[email protected]>
  0 siblings, 1 reply; 3+ messages in thread

From: Tom Lane @ 2024-10-18 14:36 UTC (permalink / raw)
  To: Achilleas Mantzios - cloud <[email protected]>; +Cc: [email protected]; Achilleas Mantzios <[email protected]>

Achilleas Mantzios - cloud <[email protected]> writes:
> I have noticed in the pgsql 16.4 logs some lines with this pattern :

> 10.9.0.110(45201) [4079203] 67122b3b.3e3e63 2024-10-18 12:32:44.260 EEST 
> SMA  amantzio@dynacom line:35 LOG:  duration: 0.166 ms  parse <unnamed>: 
> SELECT work_status FROM company_stuff WHERE ldap_cn = $
> 1
> 10.9.0.110(45201) [4079203] 67122b3b.3e3e63 2024-10-18 12:32:44.261 EEST 
> SMA  amantzio@dynacom line:36 LOG:  duration: 0.553 ms  bind 
> <unnamed>/C_5: SELECT work_status FROM company_stuff WHERE ldap_cn
> = $1
> 10.9.0.110(45201) [4079203] 67122b3b.3e3e63 2024-10-18 12:32:44.261 EEST 
> SMA  amantzio@dynacom line:38 LOG:  duration: 0.036 ms  execute 
> <unnamed>/C_5: SELECT work_status FROM company_stuff WHERE ldap_
> cn = $1

> So the parse is done on an unnamed prepared statement, however the bind 
> and the execute show this : /C_5 after<unnamed>. We haven't got any log 
> entries with this /C_* pattern on the "parse" phase, only on "bind" and 
> "execute". I am curious what those represent.

Here C_5 would be a portal name, identifying the bound-and-ready-
to-execute query.  See

https://www.postgresql.org/docs/current/protocol-flow.html#PROTOCOL-FLOW-EXT-QUERY

			regards, tom lane





^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: Migrating from 10 -> 16, PreparedStatements disabled in JDBC and pgbouncer, I am getting : bind <unnamed>/C_5
@ 2024-10-18 15:05  Achilleas Mantzios <[email protected]>
  parent: Tom Lane <[email protected]>
  0 siblings, 0 replies; 3+ messages in thread

From: Achilleas Mantzios @ 2024-10-18 15:05 UTC (permalink / raw)
  To: Tom Lane <[email protected]>; +Cc: Achilleas Mantzios <[email protected]>; [email protected]

Thanks Tom, sorry for the business-style reply (top post).
The _C* log entries appeared only when we had specified in JDBC : DefaultRowFetchSize . Once we disabled this, it reverted back to "normal" binds and executes in the log.
e.g. retrying the same app now we get : (omitting param values)

10.9.0.110(52027) [4107694] 6712788f.3eadae 2024-10-18 18:03:17.355 EEST SMA  amantzio@dynacom line:43 LOG:  duration: 0.212 ms  parse <unnamed>: SELECT work_status FROM company_stuff WHERE ldap_cn = $1
10.9.0.110(52027) [4107694] 6712788f.3eadae 2024-10-18 18:03:17.356 EEST SMA  amantzio@dynacom line:44 LOG:  duration: 0.638 ms  bind <unnamed>: SELECT work_status FROM company_stuff WHERE ldap_cn = $1
10.9.0.110(52027) [4107694] 6712788f.3eadae 2024-10-18 18:03:17.356 EEST SMA  amantzio@dynacom line:46 LOG:  duration: 0.046 ms  execute <unnamed>: SELECT work_status FROM company_stuff WHERE ldap_cn = $1

----- Original Message -----
From: "Tom Lane" <[email protected]>
To: "Achilleas Mantzios" <[email protected]>
Cc: [email protected], "ITDEV" <[email protected]>
Sent: Friday, 18 October, 2024 17:36:34
Subject: Re: Migrating from 10 -> 16, PreparedStatements disabled in JDBC and pgbouncer, I am getting : bind <unnamed>/C_5

Achilleas Mantzios - cloud <[email protected]> writes:
> I have noticed in the pgsql 16.4 logs some lines with this pattern :

> 10.9.0.110(45201) [4079203] 67122b3b.3e3e63 2024-10-18 12:32:44.260 EEST 
> SMA  amantzio@dynacom line:35 LOG:  duration: 0.166 ms  parse <unnamed>: 
> SELECT work_status FROM company_stuff WHERE ldap_cn = $
> 1
> 10.9.0.110(45201) [4079203] 67122b3b.3e3e63 2024-10-18 12:32:44.261 EEST 
> SMA  amantzio@dynacom line:36 LOG:  duration: 0.553 ms  bind 
> <unnamed>/C_5: SELECT work_status FROM company_stuff WHERE ldap_cn
> = $1
> 10.9.0.110(45201) [4079203] 67122b3b.3e3e63 2024-10-18 12:32:44.261 EEST 
> SMA  amantzio@dynacom line:38 LOG:  duration: 0.036 ms  execute 
> <unnamed>/C_5: SELECT work_status FROM company_stuff WHERE ldap_
> cn = $1

> So the parse is done on an unnamed prepared statement, however the bind 
> and the execute show this : /C_5 after<unnamed>. We haven't got any log 
> entries with this /C_* pattern on the "parse" phase, only on "bind" and 
> "execute". I am curious what those represent.

Here C_5 would be a portal name, identifying the bound-and-ready-
to-execute query.  See

https://www.postgresql.org/docs/current/protocol-flow.html#PROTOCOL-FLOW-EXT-QUERY

			regards, tom lane






^ permalink  raw  reply  [nested|flat] 3+ messages in thread


end of thread, other threads:[~2024-10-18 15:05 UTC | newest]

Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2024-10-18 10:11 Migrating from 10 -> 16, PreparedStatements disabled in JDBC and pgbouncer, I am getting : bind <unnamed>/C_5 Achilleas Mantzios - cloud <[email protected]>
2024-10-18 14:36 ` Tom Lane <[email protected]>
2024-10-18 15:05   ` Achilleas Mantzios <[email protected]>

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