pgsql: Small code simplification

2024-08-21 Thread Richard Guo
Small code simplification Apply the same code simplification to ATExecAddColumn as was done in 7ff9afbbd: apply GETSTRUCT() once instead of doing it repeatedly in the same function. Author: Tender Wang Discussion: https://postgr.es/m/cahewxnko9+u437jvkt14s0mcu6qpf6g-p2mzk5j9mai4chd...@mail.gmail

pgsql: Create syscache entries for pg_extension

2024-08-21 Thread Michael Paquier
Create syscache entries for pg_extension Two syscache identifiers are added for extension names and OIDs. Shared libraries of extensions might want to invalidate or update their own caches whenever a CREATE, ALTER or DROP EXTENSION command is run for their extension (in any backend). Right now t

Re: pgsql: Add injection-point test for new multixact CV usage

2024-08-21 Thread Alexander Korotkov
On Tue, Aug 20, 2024 at 9:35 PM Alvaro Herrera wrote: > Add injection-point test for new multixact CV usage > > Before commit a0e0fb1ba56f, multixact.c contained a case in the > multixact-read path where it would loop sleeping 1ms each time until > another multixact-create path completed, which wa

pgsql: Fix obsolete comments in varstr_cmp().

2024-08-21 Thread Jeff Davis
Fix obsolete comments in varstr_cmp(). Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/a8395677840c37f6988d7d6420d551d0b744e6bd Modified Files -- src/backend/utils/adt/varlena.c | 18 ++ 1 file changed, 6 insertions(+), 12 deletions(-)

pgsql: Disallow creating binary-coercible casts involving range types.

2024-08-21 Thread Tom Lane
Disallow creating binary-coercible casts involving range types. For a long time we have forbidden binary-coercible casts to or from composite and array types, because such a cast cannot work correctly: the type OID embedded in the value would need to change, but it won't in a binary coercion. Tha

pgsql: Disallow creating binary-coercible casts involving range types.

2024-08-21 Thread Tom Lane
Disallow creating binary-coercible casts involving range types. For a long time we have forbidden binary-coercible casts to or from composite and array types, because such a cast cannot work correctly: the type OID embedded in the value would need to change, but it won't in a binary coercion. Tha

pgsql: Show number of disabled nodes in EXPLAIN ANALYZE output.

2024-08-21 Thread Robert Haas
Show number of disabled nodes in EXPLAIN ANALYZE output. Now that disable_cost is not included in the cost estimate, there's no visible sign in EXPLAIN output of which plan nodes are disabled. Fix that by propagating the number of disabled nodes from Path to Plan, and then showing it in the EXPLAI

pgsql: Treat number of disabled nodes in a path as a separate cost metr

2024-08-21 Thread Robert Haas
Treat number of disabled nodes in a path as a separate cost metric. Previously, when a path type was disabled by e.g. enable_seqscan=false, we either avoided generating that path type in the first place, or more commonly, we added a large constant, called disable_cost, to the estimated startup cos

pgsql: Fix pgindent damage

2024-08-21 Thread Robert Haas
Fix pgindent damage Oversight in commit a95ff1fe2eb4926b13e0940ad1f37d048704bdb0 Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/2b03cfeea47834913ff769124f4deba88140f662 Modified Files -- src/backend/utils/adt/varlena.c | 20 ++-- 1 file

pgsql: doc: remove llvm-config search from configure documentation

2024-08-21 Thread Peter Eisentraut
doc: remove llvm-config search from configure documentation As of 4dd29b6833, we no longer attempt to locate any other llvm-config variant than plain llvm-config in configure-based builds; update the documentation accordingly. (For Meson-based builds, we still use Meson's LLVMDependencyConfigTool

pgsql: doc: remove llvm-config search from configure documentation

2024-08-21 Thread Peter Eisentraut
doc: remove llvm-config search from configure documentation As of 4dd29b6833, we no longer attempt to locate any other llvm-config variant than plain llvm-config in configure-based builds; update the documentation accordingly. (For Meson-based builds, we still use Meson's LLVMDependencyConfigTool

pgsql: Fix typos in 9758174e2e.

2024-08-21 Thread Amit Kapila
Fix typos in 9758174e2e. Reported off-list by Erik Rijkers Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/d43b8bb6b8f56cda59d14b5040496e266b0d9d25 Modified Files -- doc/src/sgml/logical-replication.sgml | 4 ++-- 1 file changed, 2 insertions(+), 2 delet

pgsql: Small code simplification

2024-08-21 Thread Peter Eisentraut
Small code simplification Apply GETSTRUCT() once instead of doing it repeatedly in the same function. This simplifies the notation and makes the function's structure more similar to the surrounding ones. Discussion: https://www.postgresql.org/message-id/flat/a368248e-69e4-40be-9c07-6c3b5880b...