pgsql: Revert ECPG's use of pnstrdup()

2024-08-07 Thread Peter Eisentraut
Revert ECPG's use of pnstrdup() Commit 0b9466fce added a dependency on fe_memutils' pnstrdup() inside informix.c. This adds an exit() path in a library, which we don't want. (Unlike libpq, the ecpg libraries don't have an automated check for that, but it makes sense to keep them to a similar sta

pgsql: Revert ECPG's use of pnstrdup()

2024-08-07 Thread Peter Eisentraut
Revert ECPG's use of pnstrdup() Commit 0b9466fce added a dependency on fe_memutils' pnstrdup() inside informix.c. This adds an exit() path in a library, which we don't want. (Unlike libpq, the ecpg libraries don't have an automated check for that, but it makes sense to keep them to a similar sta

pgsql: Revert ECPG's use of pnstrdup()

2024-08-07 Thread Peter Eisentraut
Revert ECPG's use of pnstrdup() Commit 0b9466fce added a dependency on fe_memutils' pnstrdup() inside informix.c. This adds an exit() path in a library, which we don't want. (Unlike libpq, the ecpg libraries don't have an automated check for that, but it makes sense to keep them to a similar sta

pgsql: Revert ECPG's use of pnstrdup()

2024-08-07 Thread Peter Eisentraut
Revert ECPG's use of pnstrdup() Commit 0b9466fce added a dependency on fe_memutils' pnstrdup() inside informix.c. This adds an exit() path in a library, which we don't want. (Unlike libpq, the ecpg libraries don't have an automated check for that, but it makes sense to keep them to a similar sta

pgsql: Revert ECPG's use of pnstrdup()

2024-08-07 Thread Peter Eisentraut
Revert ECPG's use of pnstrdup() Commit 0b9466fce added a dependency on fe_memutils' pnstrdup() inside informix.c. This adds an exit() path in a library, which we don't want. (Unlike libpq, the ecpg libraries don't have an automated check for that, but it makes sense to keep them to a similar sta

Re: pgsql: Introduce hash_search_with_hash_value() function

2024-08-07 Thread Pavel Stehule
st 7. 8. 2024 v 22:25 odesílatel Alexander Korotkov napsal: > On Wed, Aug 7, 2024 at 1:34 PM Pavel Stehule > wrote: > > st 7. 8. 2024 v 12:22 odesílatel Alexander Korotkov < > aekorot...@gmail.com> napsal: > >> Thank you. > >> Please see 40064a8ee1 takes special efforts to match HTAB hash > >> f

Re: pgsql: Fix more holes with SLRU code in need of int64 for segment numbe

2024-08-07 Thread Michael Paquier
 > On Aug 8, 2024, at 5:05, Alexander Korotkov wrote: > On Wed, Aug 7, 2024 at 10:52 PM Peter Eisentraut > wrote: >> It looks like the commit I'm talking about here is a subset of v55-0001 >> from that thread? > > Yes, looks like this. > >> So why is some of this being committed now into v17

Re: pgsql: Introduce hash_search_with_hash_value() function

2024-08-07 Thread Alexander Korotkov
On Wed, Aug 7, 2024 at 1:34 PM Pavel Stehule wrote: > st 7. 8. 2024 v 12:22 odesílatel Alexander Korotkov > napsal: >> Thank you. >> Please see 40064a8ee1 takes special efforts to match HTAB hash >> function to syscache hash function. By default, their hash values >> don't match and you can't s

Re: pgsql: Introduce hash_search_with_hash_value() function

2024-08-07 Thread Alexander Korotkov
On Wed, Aug 7, 2024 at 7:30 PM Robert Haas wrote: > On Wed, Aug 7, 2024 at 11:55 AM Alexander Korotkov > wrote: > > On Wed, Aug 7, 2024 at 3:24 PM Robert Haas wrote: > > > You may have already realized this, but the name of the function the > > > patch adds is not the same as the name that appe

Re: pgsql: Fix more holes with SLRU code in need of int64 for segment numbe

2024-08-07 Thread Alexander Korotkov
On Wed, Aug 7, 2024 at 10:52 PM Peter Eisentraut wrote: > On 07.08.24 17:53, Alexander Korotkov wrote: > > On Wed, Aug 7, 2024 at 12:07 PM Peter Eisentraut > > wrote: > >> On 27.07.24 00:24, Michael Paquier wrote: > >>> Fix more holes with SLRU code in need of int64 for segment numbers > >>> > >

Re: pgsql: Fix more holes with SLRU code in need of int64 for segment numbe

2024-08-07 Thread Peter Eisentraut
On 07.08.24 17:53, Alexander Korotkov wrote: On Wed, Aug 7, 2024 at 12:07 PM Peter Eisentraut wrote: On 27.07.24 00:24, Michael Paquier wrote: Fix more holes with SLRU code in need of int64 for segment numbers This is a continuation of 3937cadfd438, taking care of more areas I have managed to

pgsql: Teach RPM the package name provided in Perl alias packages.

2024-08-07 Thread Noah Misch
Teach RPM the package name provided in Perl alias packages. When commit 1185be355462d1dc7e2950a7e52eb7ca0cb6f3c8 introduced installation of a file containing "use PostgreSQL::Test::Utils", the RPM Package Manager said "nothing provides perl(PostgreSQL::Test::Utils)". Discussed on pgsql-packagers.

pgsql: Fix names of "Visual Studio" and Meson in a documentation senten

2024-08-07 Thread Noah Misch
Fix names of "Visual Studio" and Meson in a documentation sentence. Commit 3cffe7946c268be91a340ec9a27081cb93d67d35 missed this. Back-patch to v17, which introduced this. Discussion: https://postgr.es/m/caj7c6tm7ct0ejocqalsvyoxxnew4xcufebwj77gktwsqedy...@mail.gmail.com Branch -- REL_17_STA

pgsql: Teach RPM the package name provided in Perl alias packages.

2024-08-07 Thread Noah Misch
Teach RPM the package name provided in Perl alias packages. When commit 1185be355462d1dc7e2950a7e52eb7ca0cb6f3c8 introduced installation of a file containing "use PostgreSQL::Test::Utils", the RPM Package Manager said "nothing provides perl(PostgreSQL::Test::Utils)". Discussed on pgsql-packagers.

pgsql: Fix names of "Visual Studio" and Meson in a documentation senten

2024-08-07 Thread Noah Misch
Fix names of "Visual Studio" and Meson in a documentation sentence. Commit 3cffe7946c268be91a340ec9a27081cb93d67d35 missed this. Back-patch to v17, which introduced this. Discussion: https://postgr.es/m/caj7c6tm7ct0ejocqalsvyoxxnew4xcufebwj77gktwsqedy...@mail.gmail.com Branch -- master De

pgsql: Teach RPM the package name provided in Perl alias packages.

2024-08-07 Thread Noah Misch
Teach RPM the package name provided in Perl alias packages. When commit 1185be355462d1dc7e2950a7e52eb7ca0cb6f3c8 introduced installation of a file containing "use PostgreSQL::Test::Utils", the RPM Package Manager said "nothing provides perl(PostgreSQL::Test::Utils)". Discussed on pgsql-packagers.

pgsql: Fix edge case in plpgsql's make_callstmt_target().

2024-08-07 Thread Tom Lane
Fix edge case in plpgsql's make_callstmt_target(). If the plancache entry for the CALL statement is already stale, it's possible for us to fetch an old procedure OID out of it, and then fail with "cache lookup failed for function NNN". In ordinary usage this never happens because make_callstmt_tar

pgsql: Fix edge case in plpgsql's make_callstmt_target().

2024-08-07 Thread Tom Lane
Fix edge case in plpgsql's make_callstmt_target(). If the plancache entry for the CALL statement is already stale, it's possible for us to fetch an old procedure OID out of it, and then fail with "cache lookup failed for function NNN". In ordinary usage this never happens because make_callstmt_tar

pgsql: Fix edge case in plpgsql's make_callstmt_target().

2024-08-07 Thread Tom Lane
Fix edge case in plpgsql's make_callstmt_target(). If the plancache entry for the CALL statement is already stale, it's possible for us to fetch an old procedure OID out of it, and then fail with "cache lookup failed for function NNN". In ordinary usage this never happens because make_callstmt_tar

pgsql: Fix edge case in plpgsql's make_callstmt_target().

2024-08-07 Thread Tom Lane
Fix edge case in plpgsql's make_callstmt_target(). If the plancache entry for the CALL statement is already stale, it's possible for us to fetch an old procedure OID out of it, and then fail with "cache lookup failed for function NNN". In ordinary usage this never happens because make_callstmt_tar

pgsql: Fix edge case in plpgsql's make_callstmt_target().

2024-08-07 Thread Tom Lane
Fix edge case in plpgsql's make_callstmt_target(). If the plancache entry for the CALL statement is already stale, it's possible for us to fetch an old procedure OID out of it, and then fail with "cache lookup failed for function NNN". In ordinary usage this never happens because make_callstmt_tar

Re: pgsql: Introduce hash_search_with_hash_value() function

2024-08-07 Thread Robert Haas
On Wed, Aug 7, 2024 at 11:55 AM Alexander Korotkov wrote: > On Wed, Aug 7, 2024 at 3:24 PM Robert Haas wrote: > > You may have already realized this, but the name of the function the > > patch adds is not the same as the name that appears in the commit > > message. > > :sigh: > I didn't realize t

Re: pgsql: Introduce hash_search_with_hash_value() function

2024-08-07 Thread Alexander Korotkov
On Wed, Aug 7, 2024 at 3:24 PM Robert Haas wrote: > You may have already realized this, but the name of the function the > patch adds is not the same as the name that appears in the commit > message. :sigh: I didn't realize that before your message. That would be another item for my checklist: e

Re: pgsql: Fix more holes with SLRU code in need of int64 for segment numbe

2024-08-07 Thread Alexander Korotkov
On Wed, Aug 7, 2024 at 12:07 PM Peter Eisentraut wrote: > On 27.07.24 00:24, Michael Paquier wrote: > > Fix more holes with SLRU code in need of int64 for segment numbers > > > > This is a continuation of 3937cadfd438, taking care of more areas I have > > managed to miss previously. > > > > Report

pgsql: Refactor/reword some error messages to avoid duplicates

2024-08-07 Thread Alvaro Herrera
Refactor/reword some error messages to avoid duplicates Also, remove brackets around "EMPTY [ ARRAY ]". An error message is not the place to state that a keyword is optional. Backpatch to 17. Branch -- REL_17_STABLE Details --- https://git.postgresql.org/pg/commitdiff/899f39ea25f2ee63a

pgsql: Refactor/reword some error messages to avoid duplicates

2024-08-07 Thread Alvaro Herrera
Refactor/reword some error messages to avoid duplicates Also, remove brackets around "EMPTY [ ARRAY ]". An error message is not the place to state that a keyword is optional. Backpatch to 17. Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/2bb969f3998489e5dc4fe9f2

pgsql: Improve file header comments for astramer code.

2024-08-07 Thread Robert Haas
Improve file header comments for astramer code. Make it clear that "astreamer" stands for "archive streamer". Generalize comments that still believe this code can only be used by pg_basebackup. Add some comments explaining the asymmetry between the gzip, lz4, and zstd astreamers, in the hopes of m

Re: pgsql: Introduce hash_search_with_hash_value() function

2024-08-07 Thread Robert Haas
You may have already realized this, but the name of the function the patch adds is not the same as the name that appears in the commit message. ...Robert

Re: pgsql: Introduce hash_search_with_hash_value() function

2024-08-07 Thread Pavel Stehule
st 7. 8. 2024 v 12:22 odesílatel Alexander Korotkov napsal: > On Wed, Aug 7, 2024 at 1:03 PM Pavel Stehule > wrote: > > > > st 7. 8. 2024 v 10:52 odesílatel Alexander Korotkov < > aekorot...@gmail.com> napsal: > >> > >> Hi, Pavel! > >> > >> On Wed, Aug 7, 2024 at 9:35 AM Pavel Stehule > wrote:

Re: pgsql: Introduce hash_search_with_hash_value() function

2024-08-07 Thread Alexander Korotkov
On Wed, Aug 7, 2024 at 1:03 PM Pavel Stehule wrote: > > st 7. 8. 2024 v 10:52 odesílatel Alexander Korotkov > napsal: >> >> Hi, Pavel! >> >> On Wed, Aug 7, 2024 at 9:35 AM Pavel Stehule wrote: >> > st 7. 8. 2024 v 6:08 odesílatel Alexander Korotkov >> > napsal: >> >> >> >> Introduce hash_sear

Re: pgsql: Introduce hash_search_with_hash_value() function

2024-08-07 Thread Pavel Stehule
st 7. 8. 2024 v 10:52 odesílatel Alexander Korotkov napsal: > Hi, Pavel! > > On Wed, Aug 7, 2024 at 9:35 AM Pavel Stehule > wrote: > > st 7. 8. 2024 v 6:08 odesílatel Alexander Korotkov < > akorot...@postgresql.org> napsal: > >> > >> Introduce hash_search_with_hash_value() function > >> > >> Thi

Re: pgsql: Fix more holes with SLRU code in need of int64 for segment numbe

2024-08-07 Thread Peter Eisentraut
On 27.07.24 00:24, Michael Paquier wrote: Fix more holes with SLRU code in need of int64 for segment numbers This is a continuation of 3937cadfd438, taking care of more areas I have managed to miss previously. Reported-by: Noah Misch Reviewed-by: Noah Misch Discussion: https://postgr.es/m/20240

Re: pgsql: Introduce hash_search_with_hash_value() function

2024-08-07 Thread Alexander Korotkov
Hi, Pavel! On Wed, Aug 7, 2024 at 9:35 AM Pavel Stehule wrote: > st 7. 8. 2024 v 6:08 odesílatel Alexander Korotkov > napsal: >> >> Introduce hash_search_with_hash_value() function >> >> This new function iterates hash entries with given hash values. This >> function >> is designed to avoid f

pgsql: Make fallback MD5 implementation thread-safe on big-endian syste

2024-08-07 Thread Heikki Linnakangas
Make fallback MD5 implementation thread-safe on big-endian systems Replace a static scratch buffer with a local variable, because a static buffer makes the function not thread-safe. This function is used in client-code in libpq, so it needs to be thread-safe. It was until commit b67b57a966, which

pgsql: Make fallback MD5 implementation thread-safe on big-endian syste

2024-08-07 Thread Heikki Linnakangas
Make fallback MD5 implementation thread-safe on big-endian systems Replace a static scratch buffer with a local variable, because a static buffer makes the function not thread-safe. This function is used in client-code in libpq, so it needs to be thread-safe. It was until commit b67b57a966, which

pgsql: Make fallback MD5 implementation thread-safe on big-endian syste

2024-08-07 Thread Heikki Linnakangas
Make fallback MD5 implementation thread-safe on big-endian systems Replace a static scratch buffer with a local variable, because a static buffer makes the function not thread-safe. This function is used in client-code in libpq, so it needs to be thread-safe. It was until commit b67b57a966, which

pgsql: Make fallback MD5 implementation thread-safe on big-endian syste

2024-08-07 Thread Heikki Linnakangas
Make fallback MD5 implementation thread-safe on big-endian systems Replace a static scratch buffer with a local variable, because a static buffer makes the function not thread-safe. This function is used in client-code in libpq, so it needs to be thread-safe. It was until commit b67b57a966, which

pgsql: Make fallback MD5 implementation thread-safe on big-endian syste

2024-08-07 Thread Heikki Linnakangas
Make fallback MD5 implementation thread-safe on big-endian systems Replace a static scratch buffer with a local variable, because a static buffer makes the function not thread-safe. This function is used in client-code in libpq, so it needs to be thread-safe. It was until commit b67b57a966, which

pgsql: Revert ECPG's use of pnstrdup()

2024-08-07 Thread Peter Eisentraut
Revert ECPG's use of pnstrdup() Commit 0b9466fce added a dependency on fe_memutils' pnstrdup() inside informix.c. This adds an exit() path in a library, which we don't want. (Unlike libpq, the ecpg libraries don't have an automated check for that, but it makes sense to keep them to a similar sta