Re: pgsql: make dist uses git archive

2024-03-26 Thread Peter Eisentraut
On 25.03.24 23:20, Andrew Dunstan wrote: The problem occurs because except in vpath mode the buildfarm operates on a copy of the code, and for efficiency reasons we don't copy the ,git directory. The simplest fix is probably to change the machine's config to use a vpath build. In the config

pgsql: Message fixes for pg_createsubscriber

2024-03-26 Thread Peter Eisentraut
Message fixes for pg_createsubscriber Author: Kyotaro Horiguchi Discussion: https://www.postgresql.org/message-id/20240326.140116.1116279856046587865.horikyota@gmail.com Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/8c4f2d5475b9f0411baf38590c054ba1fb566780

Re: pgsql: pg_createsubscriber: creates a new logical replica from a standb

2024-03-26 Thread Peter Eisentraut
I have committed your patch to tidy this up. Thanks. On 26.03.24 06:01, Kyotaro Horiguchi wrote: Hello. This commit added the following error message: pg_createsubscriber.c: 375 pg_fatal("could not access directory \"%s\": %s", datadir,

Re: pgsql: make dist uses git archive

2024-03-26 Thread Andrew Dunstan
On Tue, Mar 26, 2024 at 3:20 AM Peter Eisentraut wrote: > On 25.03.24 23:20, Andrew Dunstan wrote: > > The problem occurs because except in vpath mode the buildfarm operates > > on a copy of the code, and for efficiency reasons we don't copy the ,git > > directory. > > > > The simplest fix is pro

Re: pgsql: make dist uses git archive

2024-03-26 Thread Magnus Hagander
On Tue, Mar 26, 2024 at 9:13 AM Andrew Dunstan wrote: > > > On Tue, Mar 26, 2024 at 3:20 AM Peter Eisentraut > wrote: > >> On 25.03.24 23:20, Andrew Dunstan wrote: >> > The problem occurs because except in vpath mode the buildfarm operates >> > on a copy of the code, and for efficiency reasons w

pgsql: Remove ObjectClass type

2024-03-26 Thread Peter Eisentraut
Remove ObjectClass type ObjectClass is an enum whose values correspond to catalog OIDs. But the extra layer of redirection, which is used only in small parts of the code, and the similarity to ObjectType, are confusing and cumbersome. One advantage has been that some switches processing the OCLA

Re: pgsql: make dist uses git archive

2024-03-26 Thread Andrew Dunstan
On Tue, Mar 26, 2024 at 5:15 AM Magnus Hagander wrote: > > > On Tue, Mar 26, 2024 at 9:13 AM Andrew Dunstan > wrote: > >> >> >> On Tue, Mar 26, 2024 at 3:20 AM Peter Eisentraut >> wrote: >> >>> On 25.03.24 23:20, Andrew Dunstan wrote: >>> > The problem occurs because except in vpath mode the bu

Re: pgsql: make dist uses git archive

2024-03-26 Thread Andrew Dunstan
On Tue, Mar 26, 2024 at 6:10 AM Andrew Dunstan wrote: > > > On Tue, Mar 26, 2024 at 5:15 AM Magnus Hagander > wrote: > >> >> >> On Tue, Mar 26, 2024 at 9:13 AM Andrew Dunstan >> wrote: >> >>> >>> >>> On Tue, Mar 26, 2024 at 3:20 AM Peter Eisentraut >>> wrote: >>> On 25.03.24 23:20, Andrew

Re: pgsql: make dist uses git archive

2024-03-26 Thread Magnus Hagander
On Tue, Mar 26, 2024 at 12:09 PM Andrew Dunstan wrote: > > > On Tue, Mar 26, 2024 at 6:10 AM Andrew Dunstan > wrote: > >> >> >> On Tue, Mar 26, 2024 at 5:15 AM Magnus Hagander >> wrote: >> >>> >>> >>> On Tue, Mar 26, 2024 at 9:13 AM Andrew Dunstan >>> wrote: >>> On Tue, Mar 26,

pgsql: Allow "make check"-style testing to work with musl C library.

2024-03-26 Thread Tom Lane
Allow "make check"-style testing to work with musl C library. The musl dynamic linker saves a pointer to the process' environment value of LD_LIBRARY_PATH very early in startup. When we move/clobber the environment to make more room for ps status strings, we clobber that value and thereby prevent

pgsql: Allow "make check"-style testing to work with musl C library.

2024-03-26 Thread Tom Lane
Allow "make check"-style testing to work with musl C library. The musl dynamic linker saves a pointer to the process' environment value of LD_LIBRARY_PATH very early in startup. When we move/clobber the environment to make more room for ps status strings, we clobber that value and thereby prevent

pgsql: Allow "make check"-style testing to work with musl C library.

2024-03-26 Thread Tom Lane
Allow "make check"-style testing to work with musl C library. The musl dynamic linker saves a pointer to the process' environment value of LD_LIBRARY_PATH very early in startup. When we move/clobber the environment to make more room for ps status strings, we clobber that value and thereby prevent

pgsql: Allow "make check"-style testing to work with musl C library.

2024-03-26 Thread Tom Lane
Allow "make check"-style testing to work with musl C library. The musl dynamic linker saves a pointer to the process' environment value of LD_LIBRARY_PATH very early in startup. When we move/clobber the environment to make more room for ps status strings, we clobber that value and thereby prevent

pgsql: Allow "make check"-style testing to work with musl C library.

2024-03-26 Thread Tom Lane
Allow "make check"-style testing to work with musl C library. The musl dynamic linker saves a pointer to the process' environment value of LD_LIBRARY_PATH very early in startup. When we move/clobber the environment to make more room for ps status strings, we clobber that value and thereby prevent

pgsql: Allow "make check"-style testing to work with musl C library.

2024-03-26 Thread Tom Lane
Allow "make check"-style testing to work with musl C library. The musl dynamic linker saves a pointer to the process' environment value of LD_LIBRARY_PATH very early in startup. When we move/clobber the environment to make more room for ps status strings, we clobber that value and thereby prevent

pgsql: C comment: mention no doc for negative start of substring(text)

2024-03-26 Thread Bruce Momjian
C comment: mention no doc for negative start of substring(text) Also add URL to hackers discussion. Backpatch-through: master Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/e648e77e25708874196326b6e4da30e7717156ab Modified Files -- src/backend/utils/

pgsql: Propagate pathkeys from CTEs up to the outer query.

2024-03-26 Thread Tom Lane
Propagate pathkeys from CTEs up to the outer query. If we know the sort order of a CTE's output, and it is relevant to the outer query, label the CTE's outer-query access path using those pathkeys. This may enable optimizations such as avoiding a sort in the outer query. The code for hoisting pa

pgsql: Micro-optimize pg_lfind32().

2024-03-26 Thread Nathan Bossart
Micro-optimize pg_lfind32(). This commit improves the performance of pg_lfind32() in many cases by modifying it to process the remaining "tail" of elements with SIMD instructions instead of processing them one-by-one. Since the SIMD code processes a large block of elements, this means that we wil

pgsql: Fix failure of ALTER FOREIGN TABLE SET SCHEMA to move sequences.

2024-03-26 Thread Tom Lane
Fix failure of ALTER FOREIGN TABLE SET SCHEMA to move sequences. Ordinary ALTER TABLE SET SCHEMA will also move any owned sequences into the new schema. We failed to do likewise for foreign tables, because AlterTableNamespaceInternal believed that only certain relkinds could have indexes, owned s

pgsql: Fix failure of ALTER FOREIGN TABLE SET SCHEMA to move sequences.

2024-03-26 Thread Tom Lane
Fix failure of ALTER FOREIGN TABLE SET SCHEMA to move sequences. Ordinary ALTER TABLE SET SCHEMA will also move any owned sequences into the new schema. We failed to do likewise for foreign tables, because AlterTableNamespaceInternal believed that only certain relkinds could have indexes, owned s

pgsql: Fix failure of ALTER FOREIGN TABLE SET SCHEMA to move sequences.

2024-03-26 Thread Tom Lane
Fix failure of ALTER FOREIGN TABLE SET SCHEMA to move sequences. Ordinary ALTER TABLE SET SCHEMA will also move any owned sequences into the new schema. We failed to do likewise for foreign tables, because AlterTableNamespaceInternal believed that only certain relkinds could have indexes, owned s

pgsql: Fix failure of ALTER FOREIGN TABLE SET SCHEMA to move sequences.

2024-03-26 Thread Tom Lane
Fix failure of ALTER FOREIGN TABLE SET SCHEMA to move sequences. Ordinary ALTER TABLE SET SCHEMA will also move any owned sequences into the new schema. We failed to do likewise for foreign tables, because AlterTableNamespaceInternal believed that only certain relkinds could have indexes, owned s

pgsql: Fix failure of ALTER FOREIGN TABLE SET SCHEMA to move sequences.

2024-03-26 Thread Tom Lane
Fix failure of ALTER FOREIGN TABLE SET SCHEMA to move sequences. Ordinary ALTER TABLE SET SCHEMA will also move any owned sequences into the new schema. We failed to do likewise for foreign tables, because AlterTableNamespaceInternal believed that only certain relkinds could have indexes, owned s

pgsql: Fix failure of ALTER FOREIGN TABLE SET SCHEMA to move sequences.

2024-03-26 Thread Tom Lane
Fix failure of ALTER FOREIGN TABLE SET SCHEMA to move sequences. Ordinary ALTER TABLE SET SCHEMA will also move any owned sequences into the new schema. We failed to do likewise for foreign tables, because AlterTableNamespaceInternal believed that only certain relkinds could have indexes, owned s

pgsql: Optimize roles_is_member_of() with a Bloom filter.

2024-03-26 Thread Nathan Bossart
Optimize roles_is_member_of() with a Bloom filter. When the list of roles gathered by roles_is_member_of() grows very large, a Bloom filter is created to help avoid some linear searches through the list. The threshold for creating the Bloom filter is set arbitrarily high and may require future ad

pgsql: Remove some redundant set_cheapest() calls.

2024-03-26 Thread Tom Lane
Remove some redundant set_cheapest() calls. Commit e2fa76d80 centralized the responsibility for doing set_cheapest() for a baserel, but these functions added later seemingly didn't get the memo. There's no apparent reason why we need the cheapest path for these relation types to be available any

pgsql: Add commit 64e401b62b to .git-blame-ignore-revs.

2024-03-26 Thread Nathan Bossart
Add commit 64e401b62b to .git-blame-ignore-revs. Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/ffa9bb53ecb1cec14039d0c78e6f941565e8f986 Modified Files -- .git-blame-ignore-revs | 3 +++ 1 file changed, 3 insertions(+)

pgsql: Fix compiler warning for pg_lfind32().

2024-03-26 Thread Nathan Bossart
Fix compiler warning for pg_lfind32(). The newly-introduced "one_by_one" label produces -Wunused-label warnings when building without SIMD support. To fix, move the label into the SIMD section of this function. Oversight in commit 7644a7340c. Reported-by: Tom Lane Discussion: https://postgr.es/

pgsql: Allow specifying initial and maximum segment sizes for DSA.

2024-03-26 Thread Masahiko Sawada
Allow specifying initial and maximum segment sizes for DSA. Previously, the DSA segment size always started with 1MB and grew up to DSA_MAX_SEGMENT_SIZE. It was inconvenient in certain scenarios, such as when the caller desired a soft constraint on the total DSA segment size, limiting it to less t

pgsql: Change last_inactive_time to inactive_since in pg_replication_sl

2024-03-26 Thread Amit Kapila
Change last_inactive_time to inactive_since in pg_replication_slots. Commit a11f330b55 added last_inactive_time to show the last time the slot was inactive. But, it tells the last time that a currently-inactive slot previously *WAS* active. This could be unclear, so we changed the name to inactive