pgsql: backend launchers void * arguments for binary data

2025-02-20 Thread Peter Eisentraut
backend launchers void * arguments for binary data Change backend launcher functions to take void * for binary data instead of char *. This removes the need for numerous casts. Reviewed-by: Dagfinn Ilmari Mannsåker Discussion: https://www.postgresql.org/message-id/flat/fd1fcedb-3492-4fc8-9e3e-

pgsql: Fix for pg_restore_attribute_stats().

2025-02-20 Thread Jeff Davis
Fix for pg_restore_attribute_stats(). Use RelationGetIndexExpressions() rather than rd_indexprs directly. Author: Corey Huinker Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/b50a554cc84066577f0f0a3baafe2f1fac302006 Modified Files -- src/backend/stat

pgsql: Fix explicit valgrind interaction in read_stream.c.

2025-02-20 Thread Thomas Munro
Fix explicit valgrind interaction in read_stream.c. This is a back-patch of commits 2a8a0067 and 2509b857 into REL_17_STABLE. It's doesn't fix any known live bug in PostgreSQL v17 itself, but an extension could in theory have used the per-buffer data feature and seen spurious errors under Valgrin

pgsql: psql: Add support for pipelines

2025-02-20 Thread Michael Paquier
psql: Add support for pipelines With \bind, \parse, \bind_named and \close, it is possible to issue queries from psql using the extended protocol. However, it was not possible to send these queries using libpq's pipeline mode. This feature has two advantages: - Testing. Pipeline tests were only

pgsql: Add braces for if block with large comment in psql's common.c

2025-02-20 Thread Michael Paquier
Add braces for if block with large comment in psql's common.c A patch touching this area of the code is under review, and this format makes the readability of the code slightly harder to parse. Extracted from a larger patch by the same author. Author: Anthonin Bonnefoy Discussion: https://post

Re: pgsql: Trial fix for old cross-version upgrades.

2025-02-20 Thread Jeff Davis
On Thu, 2025-02-20 at 18:30 +, Jeff Davis wrote: > Trial fix for old cross-version upgrades. That fixed one problem, but there are other problems with 9.2 upgrades. And it looks like there's also a problem with upgrades from 12. Investigating... Regards, Jeff Davis

pgsql: Add missing entry to oauth_validator test .gitignore

2025-02-20 Thread Daniel Gustafsson
Add missing entry to oauth_validator test .gitignore Commit b3f0be788 accidentally missed adding the oauth client test binary to the relevant .gitignore. Reported-by: Tom Lane Discussion: https://postgr.es/m/2839306.1740082...@sss.pgh.pa.us Branch -- master Details --- https://git.post

pgsql: Trial fix for old cross-version upgrades.

2025-02-20 Thread Jeff Davis
Trial fix for old cross-version upgrades. Per buildfarm and reports, it seems that 9.X to 18 upgrades were failing after commit 1fd1bd8710 due to an incorrect regex. Loosen the regex to accommodate older versions. Reported-by: vignesh C Reported-by: Andrew Dunstan Discussion: https://postgr.es

pgsql: Remove various unnecessary (char *) casts

2025-02-20 Thread Peter Eisentraut
Remove various unnecessary (char *) casts Remove a number of (char *) casts that are unnecessary. Or in some cases, rewrite the code to make the purpose of the cast clearer. Reviewed-by: Dagfinn Ilmari Mannsåker Discussion: https://www.postgresql.org/message-id/flat/fd1fcedb-3492-4fc8-9e3e-74b

pgsql: Ignore blank lines in pgindent exclude files

2025-02-20 Thread Andrew Dunstan
Ignore blank lines in pgindent exclude files Currently a blank line matches everything, which is almost never what someone would want. If they really want that they can use a wildcard regex to do it. Author: Zsolt Parragi Discussion: https://postgr.es/m/CAN4CZFNka+2q3=-dithr4w65rjfwpav92t62spe

pgsql: Add support for OAUTHBEARER SASL mechanism

2025-02-20 Thread Daniel Gustafsson
Add support for OAUTHBEARER SASL mechanism This commit implements OAUTHBEARER, RFC 7628, and OAuth 2.0 Device Authorization Grants, RFC 8628. In order to use this there is a new pg_hba auth method called oauth. When speaking to a OAuth- enabled server, it looks a bit like this: $ psql 'host=e

pgsql: cirrus: Temporarily fix libcurl link error

2025-02-20 Thread Daniel Gustafsson
cirrus: Temporarily fix libcurl link error On FreeBSD the ftp/curl port appears to be missing a minimum version dependency on libssh2, so the following starts showing up after upgrading to curl 8.11.1_1: libcurl.so.4: Undefined symbol "libssh2_session_callback_set2" Awaiting an upgrade of the

pgsql: Transfer statistics during pg_upgrade.

2025-02-20 Thread Jeff Davis
Transfer statistics during pg_upgrade. Add support to pg_dump for dumping stats, and use that during pg_upgrade so that statistics are transferred during upgrade. In most cases this removes the need for a costly re-analyze after upgrade. Some statistics are not transferred, such as extended stati

pgsql: Improve errdetail message added by ac0e33136a.

2025-02-20 Thread Amit Kapila
Improve errdetail message added by ac0e33136a. Make it consistent with other similar messages. Author: Kyotaro Horiguchi Reviewed-by: Hayato Kuroda Discussion: https://postgr.es/m/20250220.140839.1444694904721968348.horikyota@gmail.com Branch -- master Details --- https://git.pos

pgsql: Don't lock partitions pruned by initial pruning

2025-02-20 Thread Amit Langote
Don't lock partitions pruned by initial pruning Before executing a cached generic plan, AcquireExecutorLocks() in plancache.c locks all relations in a plan's range table to ensure the plan is safe for execution. However, this locks runtime-prunable relations that will later be pruned during "initi