Re: data race in libpq process-global variables (static_client_encoding / static_std_strings) when connections are established concurrently

From: shihao zhong <zhong950419(at)gmail(dot)com>
To: Yuriy Osadchyy <yuriy_osadchyy(at)trimble(dot)com>
Cc: pgsql-bugs(at)lists(dot)postgresql(dot)org
Subject: Re: data race in libpq process-global variables (static_client_encoding / static_std_strings) when connections are established concurrently
Date: 2026-11-03 03:29:24
Message-ID: CAGRkXqQBxj+_z5Y48Zy89KiwWySapeTTYxUhS8DWQGrTA3WQLw@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Hi Yuriy,

This was discussed before [1][2]. The real problem is that
PQescapeString() and PQescapeBytea() only work right with one
connection, and atomics would not fix that.

[1] https://www.postgresql.org/message-id/30214.1510586603@sss.pgh.pa.us
[2] https://www.postgresql.org/message-id/22989.1580402784@sss.pgh.pa.us

Thanks,
Shihao

>

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message shihao zhong 2026-11-03 03:40:47 Re: [Bug] Heap use-after-free in COPY FROM error context after ON_ERROR ignore skips a row
Previous Message Tom Lane 2026-11-03 03:03:47 Re: BUG #19826: corr()/regr_r2() of constant input: NULL serially, 1 with partial aggregation