pgsql: ecpg: Catch zero-length Unicode identifiers correctly

2022-01-12 Thread Peter Eisentraut
ecpg: Catch zero-length Unicode identifiers correctly The previous code to detect a zero-length identifier when using Unicode identifiers such as exec sql select u&""; did not work. This fixes that. Reviewed-by: Tom Lane Discussion: https://www.postgresql.org/message-id/flat/82fafa79-331c-9d

pgsql: Include permissive/enforcing state in sepgsql log messages.

2022-01-12 Thread Tom Lane
Include permissive/enforcing state in sepgsql log messages. SELinux itself does this (at least in modern releases), and it seems like a good idea to reduce confusion. Dave Page Discussion: https://postgr.es/m/CA+OCxowsQoLEYc=jN7OtNvOdX0Jg5L7nMYt++=k0x78hgq-...@mail.gmail.com Branch -- mast

pgsql: Add index on pg_publication_rel.prpubid

2022-01-12 Thread Alvaro Herrera
Add index on pg_publication_rel.prpubid This should have been added for the benefit of GetPublicationRelations; let's add it now. I couldn't measure a performance difference in the TAP tests, but that may be because the tests use very few publications. Discussion: https://postgr.es/m/20220112004

pgsql: Consider fractional paths in generate_orderedappend_paths

2022-01-12 Thread Tomas Vondra
Consider fractional paths in generate_orderedappend_paths When building append paths, we've been looking only at startup and total costs for the paths. When building fractional paths that may eliminate the cheapest one, because it may be dominated by two separate paths (one for startup, one for to

pgsql: vacuumlazy.c: fix "garbage tuples" reference.

2022-01-12 Thread Peter Geoghegan
vacuumlazy.c: fix "garbage tuples" reference. Another minor oversight in commit 4f8d9d12. Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/e9b873f667681232469007d755d0c163a63ea978 Modified Files -- src/backend/access/heap/vacuumlazy.c | 8 +++- 1 file

pgsql: Fix memory leak in indexUnchanged hint mechanism.

2022-01-12 Thread Peter Geoghegan
Fix memory leak in indexUnchanged hint mechanism. Commit 9dc718bd added a "logically unchanged by UPDATE" hinting mechanism, which is currently used within nbtree indexes only (see commit d168b666). This mechanism determined whether or not the incoming item is a logically unchanged duplicate (a d

pgsql: Fix memory leak in indexUnchanged hint mechanism.

2022-01-12 Thread Peter Geoghegan
Fix memory leak in indexUnchanged hint mechanism. Commit 9dc718bd added a "logically unchanged by UPDATE" hinting mechanism, which is currently used within nbtree indexes only (see commit d168b666). This mechanism determined whether or not the incoming item is a logically unchanged duplicate (a d

pgsql: Fix incorrect comments in hmac.c and hmac_openssl.c

2022-01-12 Thread Michael Paquier
Fix incorrect comments in hmac.c and hmac_openssl.c Both files referred to pg_hmac_ctx->data, which, I guess, comes from the early versions of the patch that has resulted in commit e6bdfd9. Author: Sergey Shinderuk Discussion: https://postgr.es/m/8cbb56dd-63d6-a581-7a65-25a97ac4b...@postgrespro.

pgsql: Fix incorrect comments in hmac.c and hmac_openssl.c

2022-01-12 Thread Michael Paquier
Fix incorrect comments in hmac.c and hmac_openssl.c Both files referred to pg_hmac_ctx->data, which, I guess, comes from the early versions of the patch that has resulted in commit e6bdfd9. Author: Sergey Shinderuk Discussion: https://postgr.es/m/8cbb56dd-63d6-a581-7a65-25a97ac4b...@postgrespro.

pgsql: doc: Add "(process)" to the term "WAL receiver" in glossary.

2022-01-12 Thread Fujii Masao
doc: Add "(process)" to the term "WAL receiver" in glossary. This commit changes the term "WAL receiver" to "WAL receiver (process)" in the glossary, so that users can easily understand WAL receiver is obviously a process. Author: Fujii Masao Reviewed-by: Tom Lane Discussion: https://postgr.es/m

pgsql: Improve error handling of HMAC computations

2022-01-12 Thread Michael Paquier
Improve error handling of HMAC computations This is similar to b69aba7, except that this completes the work for HMAC with a new routine called pg_hmac_error() that would provide more context about the type of error that happened during a HMAC computation: - The fallback HMAC implementation in hmac