pgsql: Fix use-after-free issue in slot synchronization.

2025-09-02 Thread Amit Kapila
Fix use-after-free issue in slot synchronization. Author: Shlok Kyal Reviewed-by: Daniel Gustafsson Reviewed-by: Amit Kapila Backpatch-through: 18, where it was introduced Discussion: https://postgr.es/m/canhcyexmrcedzj-rngjam0njhm4y+ttdwsgucfmxcim7bnk...@mail.gmail.com Branch -- master

pgsql: libpq: Fix PQtrace() format for non-printable characters

2025-09-02 Thread Michael Paquier
libpq: Fix PQtrace() format for non-printable characters PQtrace() was generating its output for non-printable characters without casting the characters printed with unsigned char, leading to some extra "\xff" generated in the output due to the fact that char may be signed. Oversights introdu

pgsql: libpq: Fix PQtrace() format for non-printable characters

2025-09-02 Thread Michael Paquier
libpq: Fix PQtrace() format for non-printable characters PQtrace() was generating its output for non-printable characters without casting the characters printed with unsigned char, leading to some extra "\xff" generated in the output due to the fact that char may be signed. Oversights introdu

pgsql: libpq: Fix PQtrace() format for non-printable characters

2025-09-02 Thread Michael Paquier
libpq: Fix PQtrace() format for non-printable characters PQtrace() was generating its output for non-printable characters without casting the characters printed with unsigned char, leading to some extra "\xff" generated in the output due to the fact that char may be signed. Oversights introdu

pgsql: libpq: Fix PQtrace() format for non-printable characters

2025-09-02 Thread Michael Paquier
libpq: Fix PQtrace() format for non-printable characters PQtrace() was generating its output for non-printable characters without casting the characters printed with unsigned char, leading to some extra "\xff" generated in the output due to the fact that char may be signed. Oversights introdu

pgsql: libpq: Fix PQtrace() format for non-printable characters

2025-09-02 Thread Michael Paquier
libpq: Fix PQtrace() format for non-printable characters PQtrace() was generating its output for non-printable characters without casting the characters printed with unsigned char, leading to some extra "\xff" generated in the output due to the fact that char may be signed. Oversights introdu

pgsql: libpq: Fix PQtrace() format for non-printable characters

2025-09-02 Thread Michael Paquier
libpq: Fix PQtrace() format for non-printable characters PQtrace() was generating its output for non-printable characters without casting the characters printed with unsigned char, leading to some extra "\xff" generated in the output due to the fact that char may be signed. Oversights introdu

pgsql: Add HINT for COPY TO when WHERE clause is used.

2025-09-02 Thread Fujii Masao
Add HINT for COPY TO when WHERE clause is used. COPY TO does not support a WHERE clause, and currently fails with the error: ERROR: WHERE clause not allowed with COPY TO Since the intended behavior can be achieved by using COPY (SELECT ... WHERE ...) TO, this commit adds a HINT to the error

pgsql: Update outdated references to the SLRU ControlLock

2025-09-02 Thread Michael Paquier
Update outdated references to the SLRU ControlLock SLRU bank locks are referred as "bank locks" or "SLRU bank locks" in the code comments. The comments updated in this commit use the latter term. Oversight in 53c2a97a9266, that has replaced the single ControlLock by the bank control locks. Auth

pgsql: Update outdated references to the SLRU ControlLock

2025-09-02 Thread Michael Paquier
Update outdated references to the SLRU ControlLock SLRU bank locks are referred as "bank locks" or "SLRU bank locks" in the code comments. The comments updated in this commit use the latter term. Oversight in 53c2a97a9266, that has replaced the single ControlLock by the bank control locks. Auth

pgsql: Tag refs/tags/REL_18_RC1 was created

2025-09-02 Thread noreply
Tag refs/tags/REL_18_RC1 was created.

pgsql: Change ReplicationSlotPersistentData's "synced" member to a bool

2025-09-02 Thread Nathan Bossart
Change ReplicationSlotPersistentData's "synced" member to a bool. Note that this doesn't require bumping SLOT_VERSION because we require sizeof(bool) == 1, thanks to commit 97525bc5c8. Overight in commit ddd5f4f54a. Discussion: Ranier Vilela Branch -- master Details --- https://git.po

pgsql: Improve error message for duplicate labels when creating an enum

2025-09-02 Thread Tom Lane
Improve error message for duplicate labels when creating an enum type. Previously, duplicate labels in CREATE TYPE AS ENUM were caught by the unique index on pg_enum, resulting in a generic error message. While this was evidently intentional, it's not terribly user-friendly, nor consistent with th

Re: pgsql: Fix .gitignore for src/interfaces/libpq-oauth.

2025-09-02 Thread Jacob Champion
On Fri, Aug 29, 2025 at 9:06 AM Tom Lane wrote: > > Fix .gitignore for src/interfaces/libpq-oauth. > > This missed files created when running the oauth tests. Thanks for the fix! > Branch > -- > REL_18_STABLE Note that 18 doesn't have a `check` target yet -- I backported the build fixes, bu

pgsql: Generate pgstat_count_slru*() functions for slru using macros

2025-09-02 Thread Michael Paquier
Generate pgstat_count_slru*() functions for slru using macros This change replaces seven functions definitions by macros, reducing a bit some repetitive patterns in the code. An interesting side effect is that this removes an inconsistency in the naming of SLRU increment functions with the field