pgsql: Use streaming read I/O in SP-GiST vacuuming

2025-03-21 Thread Melanie Plageman
Use streaming read I/O in SP-GiST vacuuming Like 69273b818b1df did for GiST vacuuming, make SP-GiST vacuum use the read stream API for vacuuming physically contiguous index pages. Concurrent insertions may cause SP-GiST index tuples to be redirected. While vacuuming, these are added to a pending

pgsql: Fix ps display for IO workers.

2025-03-21 Thread Thomas Munro
Fix ps display for IO workers. This code must have missed a memo about the backend type description being supplied automatically these days, and was duplicating that information. Before: "io worker io worker: N" After: "io worker N" Branch -- master Details --- https://git.postgresql.o

pgsql: Fix plpgsql's handling of simple expressions in scrollable curso

2025-03-21 Thread Tom Lane
Fix plpgsql's handling of simple expressions in scrollable cursors. exec_save_simple_expr did not account for the possibility that standard_planner would stick a Materialize node atop the plan of even a simple Result, if CURSOR_OPT_SCROLL is set. This led to an "unexpected plan node type" error.

pgsql: Add GUC option to control maximum active replication origins.

2025-03-21 Thread Masahiko Sawada
Add GUC option to control maximum active replication origins. This commit introduces a new GUC option max_active_replication_origins to control the maximum number of active replication origins. Previously, this was controlled by 'max_replication_slots'. Having a separate GUC option provides better

pgsql: Place "extern" declaration in the right part of pg_class.h.

2025-03-21 Thread Tom Lane
Place "extern" declaration in the right part of pg_class.h. errdetail_relkind_not_supported() was declared within EXPOSE_TO_CLIENT_CODE, which is mistaken since that function isn't available client-side. While relatively harmless, this isn't good precedent. Discussion: https://postgr.es/m/113456

pgsql: Use streaming read I/O in GiST vacuuming

2025-03-21 Thread Melanie Plageman
Use streaming read I/O in GiST vacuuming Like c5c239e26e387 did for btree vacuuming, make GiST vacuum use the read stream API for sequentially processed pages. Because it is possible for concurrent insertions to relocate unprocessed index entries to already vacuumed pages, GiST vacuum must backtr

pgsql: Assorted trivial cleanup of c5c239e26e

2025-03-21 Thread Melanie Plageman
Assorted trivial cleanup of c5c239e26e c5c239e26e made btree vacuum use the read stream API. Though it used functions declared in read_stream.h, it relied on transitively including it. Explicitly include that file. Also remove an extraneous newline and decrease the scope of one of the local variab

pgsql: Fix plpgsql's handling of simple expressions in scrollable curso

2025-03-21 Thread Tom Lane
Fix plpgsql's handling of simple expressions in scrollable cursors. exec_save_simple_expr did not account for the possibility that standard_planner would stick a Materialize node atop the plan of even a simple Result, if CURSOR_OPT_SCROLL is set. This led to an "unexpected plan node type" error.

Re: pgsql: Add vacuum_truncate configuration parameter.

2025-03-21 Thread David G. Johnston
On Thu, Mar 20, 2025 at 4:07 PM David Rowley wrote: > On Fri, 21 Mar 2025 at 04:30, Tom Lane wrote: > > > > Nathan Bossart writes: > > > Since there's presently no way to determine whether a Boolean > > > storage parameter is explicitly set or has just picked up the > > > default value, this co

pgsql: Fix plpgsql's handling of simple expressions in scrollable curso

2025-03-21 Thread Tom Lane
Fix plpgsql's handling of simple expressions in scrollable cursors. exec_save_simple_expr did not account for the possibility that standard_planner would stick a Materialize node atop the plan of even a simple Result, if CURSOR_OPT_SCROLL is set. This led to an "unexpected plan node type" error.

pgsql: Fix plpgsql's handling of simple expressions in scrollable curso

2025-03-21 Thread Tom Lane
Fix plpgsql's handling of simple expressions in scrollable cursors. exec_save_simple_expr did not account for the possibility that standard_planner would stick a Materialize node atop the plan of even a simple Result, if CURSOR_OPT_SCROLL is set. This led to an "unexpected plan node type" error.

pgsql: Fix plpgsql's handling of simple expressions in scrollable curso

2025-03-21 Thread Tom Lane
Fix plpgsql's handling of simple expressions in scrollable cursors. exec_save_simple_expr did not account for the possibility that standard_planner would stick a Materialize node atop the plan of even a simple Result, if CURSOR_OPT_SCROLL is set. This led to an "unexpected plan node type" error.

pgsql: pg_createsubscriber: Add -R publications option.

2025-03-21 Thread Amit Kapila
pg_createsubscriber: Add -R publications option. This patch introduces a new '-R'/'--remove' option in the 'pg_createsubscriber' utility to specify the object types to be removed from the subscriber. Currently, we add support to specify 'publications' as an object type. In the future, other object