pgsql: Rename PageData to GenericXLogPageData

2024-10-04 Thread Peter Eisentraut
Rename PageData to GenericXLogPageData In the PostgreSQL C type naming schema, the type PageData should be what the pointer of type Page points to. But in this case it's actually an unrelated type local to generic_xlog.c. Rename that to a more specific name. This makes room to possible add a Pa

pgsql: Simplify checking for xlocale.h

2024-10-01 Thread Peter Eisentraut
Simplify checking for xlocale.h Instead of XXX_IN_XLOCALE_H for several features XXX, let's just include if HAVE_XLOCALE_H. The reason for the extra complication was apparently that some old glibc systems also had an , and you weren't supposed to include it directly, but it's gone now (as far as

pgsql: jit: Use opaque pointers in all supported LLVM versions.

2024-10-01 Thread Peter Eisentraut
the wild yet, we can be more aggressive. We can rip out the support code and build system clutter that made opaque pointer use optional. Author: Thomas Munro Reviewed-by: Peter Eisentraut Discussions: https://postgr.es/m/CA%2BhUKGLhNs5geZaVNj2EJ79Dx9W8fyWUU3HxcpZy55sMGcY%3DiA%40mail.gmail.com B

pgsql: initdb: Add new option "--no-data-checksums"

2024-10-01 Thread Peter Eisentraut
initdb: Add new option "--no-data-checksums" Right now this does nothing except override any earlier --data-checksums option. But the idea is that --data-checksums could become the default, and then this option would allow forcing it off instead. Author: Greg Sabino Mullane Discussion: https:/

pgsql: jit: Require at least LLVM 14, if enabled.

2024-10-01 Thread Peter Eisentraut
jit: Require at least LLVM 14, if enabled. Remove support for LLVM versions 10-13. The default on all non-EOL'd OSes represented in our build farm will be at least LLVM 14 when PostgreSQL 18 ships. Author: Thomas Munro Reviewed-by: Peter Eisentraut Discussion: https://postgr.es

pgsql: Use macro to define the number of enum values

2024-10-01 Thread Peter Eisentraut
clause. Aleksander Alekseev, reviewed by Michael Paquier, Dean Rasheed, Peter Eisentraut Discussion: https://postgr.es/m/CAJ7c6TMsiaV5urU_Pq6zJ2tXPDwk69-NKVh4AMN5XrRiM7N%2BGA%40mail.gmail.com Branch -- master Details --- https://git.postgresql.org/pg/commitdiff

pgsql: Tweak docs to reduce possible impact of data checksums

2024-10-01 Thread Peter Eisentraut
Tweak docs to reduce possible impact of data checksums Author: Greg Sabino Mullane Discussion: https://www.postgresql.org/message-id/flat/cakanmmkwimhik5ahmbedf5vqzbobbcwepho4-pioweabzwc...@mail.gmail.com Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/efd72a3d422

Re: pgsql: jit: Require at least LLVM 14, if enabled.

2024-10-01 Thread Peter Eisentraut
On 01.10.24 11:00, Peter Eisentraut wrote: jit: Require at least LLVM 14, if enabled. This is affecting at least one buildfarm member so far. I'll let this run for a bit and then contact those buildfarm owners.

Re: pgsql: Convert some extern variables to static

2024-09-24 Thread Peter Eisentraut
On 20.09.24 01:48, Thomas Munro wrote: On Fri, Sep 20, 2024 at 11:15 AM Tom Lane wrote: Peter Eisentraut writes: Convert some extern variables to static I'm surprised it took me so long to notice, but this commit makes headerscheck unhappy: Also discussed at: https://www.postgresq

pgsql: Add further excludes to headerscheck

2024-09-24 Thread Peter Eisentraut
Add further excludes to headerscheck Some header files under contrib/isn/ are not meant to be included independently, and they fail -Wmissing-variable-declarations when doing so. Reported-by: Thomas Munro Discussion: https://www.postgresql.org/message-id/flat/CA%2BhUKG%2BYVt5MBD-w0HyHpsGb4U8RNg

pgsql: Translation updates

2024-09-23 Thread Peter Eisentraut
Translation updates Source-Git-URL: https://git.postgresql.org/git/pgtranslation/messages.git Source-Git-Hash: 4b069f67b5be4227eb620a74c9900f079f2e59f4 Branch -- REL_17_STABLE Details --- https://git.postgresql.org/pg/commitdiff/29d483fb33229f4322ca6cd040422ac508c678c1 Modified Files --

pgsql: Update list of acknowledgments in release notes

2024-09-18 Thread Peter Eisentraut
Update list of acknowledgments in release notes current through 2370582ab14 Branch -- REL_17_STABLE Details --- https://git.postgresql.org/pg/commitdiff/633b609e1c239968e80a645951a28fcded53e44b Modified Files -- doc/src/sgml/release-17.sgml | 6 ++ 1 file changed, 6 inser

pgsql: Add temporal PRIMARY KEY and UNIQUE constraints

2024-09-17 Thread Peter Eisentraut
al PK/UQs, unlike the original patch (above). Documentation and tests for this are added. But this could conceivably be extended by introducing some more general support for the notion of "empty" for other types. Author: Paul A. Jungwirth Reviewed-by: Peter Eisentraut Reviewed-by: ji

pgsql: Add stratnum GiST support function

2024-09-17 Thread Peter Eisentraut
mmitted as 6db4598fcb8, reverted by 8aee330af55; this is essentially unchanged from those) Author: Paul A. Jungwirth Reviewed-by: Peter Eisentraut Reviewed-by: jian he Discussion: https://www.postgresql.org/message-id/flat/CA+renyUApHgSZF9-nd-a0+OPGharLQLO=mdhcy4_qq0+noc...@mail.gmail.com Branch ---

pgsql: Add temporal FOREIGN KEY contraints

2024-09-17 Thread Peter Eisentraut
ssentially unchanged from those) Author: Paul A. Jungwirth Reviewed-by: Peter Eisentraut Reviewed-by: jian he Discussion: https://www.postgresql.org/message-id/flat/CA+renyUApHgSZF9-nd-a0+OPGharLQLO=mdhcy4_qq0+noc...@mail.gmail.com Branch -- master Details --- https://git.pos

pgsql: Remove separate locale_is_c arguments

2024-09-13 Thread Peter Eisentraut
Remove separate locale_is_c arguments Since e9931bfb751, ctype_is_c is part of pg_locale_t. Some functions passed a pg_locale_t and a bool argument separately. This can now be combined into one argument. Since some callers call MatchText() with locale 0, it is a bit confusing whether this is al

pgsql: Remove hardcoded hash opclass function signature exceptions

2024-09-12 Thread Peter Eisentraut
Remove hardcoded hash opclass function signature exceptions hashvalidate(), which validates the signatures of support functions for the hash AM, contained several hardcoded exceptions. For example, hash/date_ops support function 1 was hashint4(), which would ordinarily fail validation because the

pgsql: Don't overwrite scan key in systable_beginscan()

2024-09-12 Thread Peter Eisentraut
Don't overwrite scan key in systable_beginscan() When systable_beginscan() and systable_beginscan_ordered() choose an index scan, they remap the attribute numbers in the passed-in scan keys to the attribute numbers of the index, and then write those remapped attribute numbers back into the scan ke

pgsql: Replace gratuitous memmove() with memcpy()

2024-09-11 Thread Peter Eisentraut
Replace gratuitous memmove() with memcpy() The index access methods all had similar code that copied the passed-in scan keys to local storage. They all used memmove() for that, which is not wrong, but it seems confusing not to use memcpy() when that would work. Presumably, this was all once copi

pgsql: Remove obsolete unconstify()

2024-09-11 Thread Peter Eisentraut
Remove obsolete unconstify() This is no longer needed as of OpenSSL 1.1.0 (the current minimum version). LibreSSL made the same change around the same time as well. Reviewed-by: Daniel Gustafsson Discussion: https://www.postgresql.org/message-id/20463f79-a7b0-4bba-a178-d805f99c02f9%40eisentrau

pgsql: Update .gitignore

2024-09-11 Thread Peter Eisentraut
Update .gitignore for commit 0785d1b8b2 Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/6b25c57a2dd61a44bdb60d5424d4aaa7e0f14334 Modified Files -- src/test/modules/test_json_parser/.gitignore | 1 + 1 file changed, 1 insertion(+)

pgsql: common/jsonapi: support libpq as a client

2024-09-11 Thread Peter Eisentraut
: Michael Paquier Co-authored-by: Daniel Gustafsson Reviewed-by: Peter Eisentraut Discussion: https://www.postgresql.org/message-id/flat/d1b467a78e0e36ed85a09adf979d04cf124a9d4b.ca...@vmware.com Branch -- master Details --- https://git.postgresql.org/pg/commitdiff

pgsql: Add amgettreeheight index AM API routine

2024-09-10 Thread Peter Eisentraut
Add amgettreeheight index AM API routine The only current implementation is for btree where it calls _bt_getrootheight(). Other index types can now also use this to pass information to their amcostestimate routine. Previously, btree was hardcoded and other index types could not hook into the opt

pgsql: Remove useless unconstify

2024-09-06 Thread Peter Eisentraut
Remove useless unconstify Digging into the history, this was not necessary even when it was added, but might have been some time before that. In any case, there is no use for this now. Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/9e43ab3dd79ddb5a6a3f7cdb5b1d6dff

pgsql: Fix misleading error message context

2024-09-05 Thread Peter Eisentraut
Fix misleading error message context Author: Pavel Stehule Reviewed-by: Stepan Neretin Discussion: https://www.postgresql.org/message-id/flat/CAFj8pRAw+OkVW=FgMKHKyvY3CgtWy3cWdY7XT+S5TJaTttu=o...@mail.gmail.com Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/4af1

pgsql: Remove a couple of strerror() calls

2024-09-04 Thread Peter Eisentraut
Remove a couple of strerror() calls Change to using %m in the error message string. We need to be a bit careful here to preserve errno until we need to print it. This change avoids the use of not-thread-safe strerror() and unifies some error message strings, and maybe makes the code appear more

pgsql: Add const qualifiers to XLogRegister*() functions

2024-09-02 Thread Peter Eisentraut
Add const qualifiers to XLogRegister*() functions Add const qualifiers to XLogRegisterData() and XLogRegisterBufData(). Several unconstify() calls can be removed. Reviewed-by: Aleksander Alekseev Discussion: https://www.postgresql.org/message-id/dd889784-9ce7-436a-b4f1-52e4a5e57...@eisentraut.o

Re: pgsql: Translation updates

2024-09-02 Thread Peter Eisentraut
On 02.09.24 17:18, Tom Lane wrote: Peter Eisentraut writes: Translation updates I'm seeing build warnings with this: /usr/bin/msgfmt: po/fr.po: warning: PO file header fuzzy warning: older versions of msgfmt will give an error on this /usr/bin/msgfmt: po/

pgsql: Fix warnings from msgfmt

2024-09-02 Thread Peter Eisentraut
Fix warnings from msgfmt /usr/bin/msgfmt: po/fr.po: warning: PO file header fuzzy warning: older versions of msgfmt will give an error on this Apparently, not all versions of msgfmt produce this. Quick fix for now, more to be researched later. Branch -- REL_17_ST

pgsql: Fix rarely-run test for message wording change

2024-09-02 Thread Peter Eisentraut
Fix rarely-run test for message wording change fixup for 2e6a8047f0 Reported-by: Nazir Bilal Yavuz Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/2befd22790ef32bbe3cbfc8b4b826e8a1286afbd Modified Files -- src/test/modules/xid_wraparound/t/002_limits.

pgsql: Fix rarely-run test for message wording change

2024-09-02 Thread Peter Eisentraut
Fix rarely-run test for message wording change fixup for 2e6a8047f0 Reported-by: Nazir Bilal Yavuz Branch -- REL_17_STABLE Details --- https://git.postgresql.org/pg/commitdiff/e6ec1d6aabe024d0789fe53c711cd5cae47d30ea Modified Files -- src/test/modules/xid_wraparound/t/002_

pgsql: Translation updates

2024-09-02 Thread Peter Eisentraut
Translation updates Source-Git-URL: https://git.postgresql.org/git/pgtranslation/messages.git Source-Git-Hash: d0110df9f34c2d32cb2652d4477c3135dabe84f7 Branch -- REL_17_STABLE Details --- https://git.postgresql.org/pg/commitdiff/986a3ac497fddac717d40b7cd90296af27f07526 Modified Files --

pgsql: More use of getpwuid_r() directly

2024-09-02 Thread Peter Eisentraut
More use of getpwuid_r() directly Remove src/port/user.c, call getpwuid_r() directly. This reduces some complexity and allows better control of the error behavior. For example, the old code would in some circumstances silently truncate the result string, or produce error message strings that the

Re: pgsql: Implement pg_wal_replay_wait() stored procedure

2024-08-30 Thread Peter Eisentraut
ed-by: Michael Paquier, Peter Eisentraut, Dilip Kumar, Amit Kapila Reviewed-by: Alexander Lakhin, Bharath Rupireddy, Euler Taveira Reviewed-by: Heikki Linnakangas, Kyotaro Horiguchi Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/3c5db1d6b01642bcd8dbf5e34b68f034365

pgsql: Update list of acknowledgments in release notes

2024-08-30 Thread Peter Eisentraut
Update list of acknowledgments in release notes current through df80b1d6cd Branch -- REL_17_STABLE Details --- https://git.postgresql.org/pg/commitdiff/df51201f34f21ae313076e8f1a475c59a2ff2f5f Modified Files -- doc/src/sgml/release-17.sgml | 12 1 file changed, 1

pgsql: Remove duplicate name from list of acknowledgments

2024-08-29 Thread Peter Eisentraut
Remove duplicate name from list of acknowledgments Reported-by: m.zhi...@postgrespro.ru Branch -- REL_17_STABLE Details --- https://git.postgresql.org/pg/commitdiff/df80b1d6cd36c6cc6be7529895c0434e90e911cc Modified Files -- doc/src/sgml/release-17.sgml | 1 - 1 file changed,

pgsql: Correct name in list of acknowledgments

2024-08-29 Thread Peter Eisentraut
Correct name in list of acknowledgments Reported-by: Etsuro Fujita Branch -- REL_17_STABLE Details --- https://git.postgresql.org/pg/commitdiff/47b92f8fc522d3c1a75a955c32c492d752316584 Modified Files -- doc/src/sgml/release-17.sgml | 2 +- 1 file changed, 1 insertion(+), 1 d

pgsql: Message style improvements

2024-08-29 Thread Peter Eisentraut
Message style improvements Branch -- REL_17_STABLE Details --- https://git.postgresql.org/pg/commitdiff/f2353dd71724c0d18d5912e105f034b50494bfe9 Modified Files -- src/backend/access/transam/varsup.c| 6 +-- src/backend/access/transam/xact.c |

pgsql: Message style improvements

2024-08-29 Thread Peter Eisentraut
Message style improvements Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/edee0c621de6f334c94c0ed8649d31ceba7401c8 Modified Files -- src/backend/access/transam/varsup.c| 6 +-- src/backend/access/transam/xact.c | 2 +- s

Re: pgsql: Restrict accesses to non-system views and foreign tables during

2024-08-29 Thread Peter Eisentraut
On 27.08.24 22:02, Masahiko Sawada wrote: On Tue, Aug 27, 2024 at 6:29 AM Tom Lane wrote: Peter Eisentraut writes: Maybe in the documentation it would also be appropriate to mention that this is meant to be used by pg_dump, not for general use -- unless it is? I'd vote against tha

pgsql: Put generated_stored test objects in a schema

2024-08-29 Thread Peter Eisentraut
Put generated_stored test objects in a schema This avoids naming conflicts with concurrent tests with similarly named objects. Currently, there are none, but a tests for virtual generated columns are planned to be added. Reviewed-by: Corey Huinker Reviewed-by: Tomasz Rybak Discussion: https:/

pgsql: Rename regress test generated to generated_stored

2024-08-29 Thread Peter Eisentraut
Rename regress test generated to generated_stored This makes naming room to have another test file for virtual generated columns. Reviewed-by: Corey Huinker Reviewed-by: Tomasz Rybak Discussion: https://www.postgresql.org/message-id/flat/a368248e-69e4-40be-9c07-6c3b5880b...@eisentraut.org Bra

pgsql: Disallow USING clause when altering type of generated column

2024-08-29 Thread Peter Eisentraut
Disallow USING clause when altering type of generated column This does not make sense. It would write the output of the USING clause into the converted column, which would violate the generation expression. This adds a check to error out if this is specified. There was a test for this, but that

pgsql: Disallow USING clause when altering type of generated column

2024-08-29 Thread Peter Eisentraut
Disallow USING clause when altering type of generated column This does not make sense. It would write the output of the USING clause into the converted column, which would violate the generation expression. This adds a check to error out if this is specified. There was a test for this, but that

pgsql: Disallow USING clause when altering type of generated column

2024-08-29 Thread Peter Eisentraut
Disallow USING clause when altering type of generated column This does not make sense. It would write the output of the USING clause into the converted column, which would violate the generation expression. This adds a check to error out if this is specified. There was a test for this, but that

pgsql: Disallow USING clause when altering type of generated column

2024-08-29 Thread Peter Eisentraut
Disallow USING clause when altering type of generated column This does not make sense. It would write the output of the USING clause into the converted column, which would violate the generation expression. This adds a check to error out if this is specified. There was a test for this, but that

pgsql: Disallow USING clause when altering type of generated column

2024-08-29 Thread Peter Eisentraut
Disallow USING clause when altering type of generated column This does not make sense. It would write the output of the USING clause into the converted column, which would violate the generation expression. This adds a check to error out if this is specified. There was a test for this, but that

pgsql: Disallow USING clause when altering type of generated column

2024-08-29 Thread Peter Eisentraut
Disallow USING clause when altering type of generated column This does not make sense. It would write the output of the USING clause into the converted column, which would violate the generation expression. This adds a check to error out if this is specified. There was a test for this, but that

pgsql: Disallow USING clause when altering type of generated column

2024-08-29 Thread Peter Eisentraut
Disallow USING clause when altering type of generated column This does not make sense. It would write the output of the USING clause into the converted column, which would violate the generation expression. This adds a check to error out if this is specified. There was a test for this, but that

pgsql: Fixup for prefetching support on macOS

2024-08-28 Thread Peter Eisentraut
Fixup for prefetching support on macOS The new code path (commit 6654bb92047) should call FileAccess() first, like the posix_fadvise() path. Reported-by: Thomas Munro Discussion: https://www.postgresql.org/message-id/flat/0827edec-1317-4917-a186-035eb1e3241d%40eisentraut.org Branch -- mast

pgsql: Add prefetching support on macOS

2024-08-27 Thread Peter Eisentraut
Add prefetching support on macOS macOS doesn't have posix_fadvise(), but fcntl() with the F_RDADVISE command does the same thing. Some related documentation has been generalized to not mention posix_advise() specifically anymore. Reviewed-by: Thomas Munro Discussion: https://www.postgresql.org

pgsql: Message style improvements

2024-08-27 Thread Peter Eisentraut
Message style improvements Branch -- REL_17_STABLE Details --- https://git.postgresql.org/pg/commitdiff/0be079ec9706eb80f0142b0d7deba245024acdce Modified Files -- src/bin/pg_amcheck/pg_amcheck.c | 4 ++-- src/bin/pg_amcheck/t/003_check.pl | 2 +- src/bin

pgsql: Message style improvements

2024-08-27 Thread Peter Eisentraut
Message style improvements Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/2e6a8047f0c94b4ac1c3e80faecd628ae552a6c3 Modified Files -- src/bin/pg_amcheck/pg_amcheck.c | 4 ++-- src/bin/pg_amcheck/t/003_check.pl | 2 +- src/bin/pg_com

pgsql: Fix misplaced translator comments

2024-08-27 Thread Peter Eisentraut
Fix misplaced translator comments They did not immediately precede the code they were applying to. Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/dc26ff2f228174efed9bf285ee8f8065ea295799 Modified Files -- src/backend/replication/logical/slotsync.c | 11

pgsql: Fix misplaced translator comments

2024-08-27 Thread Peter Eisentraut
Fix misplaced translator comments They did not immediately precede the code they were applying to. Branch -- REL_17_STABLE Details --- https://git.postgresql.org/pg/commitdiff/203b5ceee88c377110260e8c69083ef24b54fc68 Modified Files -- src/backend/replication/logical/slotsync

Re: pgsql: Restrict accesses to non-system views and foreign tables during

2024-08-27 Thread Peter Eisentraut
On 26.08.24 21:05, Masahiko Sawada wrote: Maybe using the word "prohibit" makes it a bit clear? For example, I think that would be much clearer, yes. In guc_tables.c: Prohibits access to non-system relations of specified kinds End with period. In doc: Set relation kinds of non-system rela

Re: pgsql: Restrict accesses to non-system views and foreign tables during

2024-08-26 Thread Peter Eisentraut
On 05.08.24 15:07, Masahiko Sawada wrote: To address this, pg_dump now utilizes the newly introduced restrict_nonsystem_relation_kind GUC parameter to restrict the accesses to non-system views and foreign tables during the dump process. This new GUC parameter is added to back branches too, but th

pgsql: pg_upgrade: Message style improvements

2024-08-26 Thread Peter Eisentraut
pg_upgrade: Message style improvements Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/dbe37f1adb9fd10dc273ccf50816895360bcbc15 Modified Files -- src/bin/pg_upgrade/check.c| 8 src/bin/pg_upgrade/info.c | 4 ++-- sr

pgsql: pg_upgrade: Message style improvements

2024-08-26 Thread Peter Eisentraut
pg_upgrade: Message style improvements Branch -- REL_17_STABLE Details --- https://git.postgresql.org/pg/commitdiff/5e58107b0bb5a10b36ba4af4a9f82e6254d75e9f Modified Files -- src/bin/pg_upgrade/check.c| 8 src/bin/pg_upgrade/info.c | 4

pgsql: Add list of acknowledgments to release notes

2024-08-24 Thread Peter Eisentraut
Add list of acknowledgments to release notes This contains all individuals mentioned in the commit messages during PostgreSQL 17 development. current through REL_17_BETA3 Branch -- REL_17_STABLE Details --- https://git.postgresql.org/pg/commitdiff/29e125319896aa5567d5274e8185bb7088e101a

pgsql: pg_createsubscriber: Message style improvements

2024-08-24 Thread Peter Eisentraut
pg_createsubscriber: Message style improvements Branch -- REL_17_STABLE Details --- https://git.postgresql.org/pg/commitdiff/bf886dfdd444ffa8b8bbddd2015de893a6aefb96 Modified Files -- doc/src/sgml/ref/pg_createsubscriber.sgml | 5 +-- src/bin/pg_basebackup/pg_createsubscrib

pgsql: pg_createsubscriber: Message style improvements

2024-08-24 Thread Peter Eisentraut
pg_createsubscriber: Message style improvements Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/6e8a0317b4c062d4d524b916e10ca7f351ed0793 Modified Files -- doc/src/sgml/ref/pg_createsubscriber.sgml | 5 +-- src/bin/pg_basebackup/pg_createsubscriber.c |

pgsql: thread-safety: gmtime_r(), localtime_r()

2024-08-22 Thread Peter Eisentraut
thread-safety: gmtime_r(), localtime_r() Use gmtime_r() and localtime_r() instead of gmtime() and localtime(), for thread-safety. There are a few affected calls in libpq and ecpg's libpgtypes, which are probably effectively bugs, because those libraries already claim to be thread-safe. There is

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: 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...

pgsql: Remove incidental md5() function use from test

2024-08-16 Thread Peter Eisentraut
Remove incidental md5() function use from test To allow test to pass in OpenSSL FIPS mode, similar to 657f5f223e, for a new test that has been added since. Reviewed-by: Tomas Vondra Discussion: https://www.postgresql.org/message-id/86763810-70a1-4872-8ba7-1676f788e...@eisentraut.org Branch ---

pgsql: Remove incidental md5() function use from test

2024-08-16 Thread Peter Eisentraut
Remove incidental md5() function use from test To allow test to pass in OpenSSL FIPS mode, similar to 657f5f223e, for a new test that has been added since. Reviewed-by: Tomas Vondra Discussion: https://www.postgresql.org/message-id/86763810-70a1-4872-8ba7-1676f788e...@eisentraut.org Branch ---

pgsql: libpq: Fix minor TOCTOU violation

2024-08-15 Thread Peter Eisentraut
libpq: Fix minor TOCTOU violation libpq checks the permissions of the password file before opening it. The way this is done in two separate operations, a static analyzer would flag as a time-of-check-time-of-use violation. In practice, you can't do anything with that, but it still seems better st

pgsql: Variable renaming in dbcommands.c

2024-08-14 Thread Peter Eisentraut
Variable renaming in dbcommands.c There were several sets of very similar local variable names, such as "downer" and "dbowner", which was very confusing and error-prone. Rename the former to "ownerEl" and so on, similar to collationcmds.c and typecmds.c. Reviewed-by: Daniel Gustafsson Discussion

pgsql: Apply PGDLLIMPORT markings to some GUC variables

2024-08-14 Thread Peter Eisentraut
Apply PGDLLIMPORT markings to some GUC variables According to the commit message in 8ec569479, we must have all variables in header files marked with PGDLLIMPORT. In commit d3cc5ffe81f6 some variables were moved from launch_backend.c file to several header files. This adds PGDLLIMPORT to moved va

pgsql: Remove TRACE_SORT macro

2024-08-13 Thread Peter Eisentraut
Remove TRACE_SORT macro The TRACE_SORT macro guarded the availability of the trace_sort GUC setting. But it has been enabled by default ever since it was introduced in PostgreSQL 8.1, and there have been no reports that someone wanted to disable it. So just remove the macro to simplify things.

pgsql: Use errmsg_internal for debug messages

2024-08-13 Thread Peter Eisentraut
Use errmsg_internal for debug messages Some newer code was applying this inconsistently. Branch -- REL_17_STABLE Details --- https://git.postgresql.org/pg/commitdiff/253c49e07599b8df5a51af69035f7d136de55c3a Modified Files -- src/backend/postmaster/walsummarizer.c | 24 ++

pgsql: Use errmsg_internal for debug messages

2024-08-13 Thread Peter Eisentraut
Use errmsg_internal for debug messages Some newer code was applying this inconsistently. Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/93660d1c27b1b85e84621326c0e2c89e00c3fc6f Modified Files -- src/backend/postmaster/walsummarizer.c | 24 -

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

2024-08-12 Thread Peter Eisentraut
On 12.08.24 23:35, Alexander Korotkov wrote: On Fri, Aug 9, 2024 at 4:09 PM Peter Eisentraut wrote: On 08.08.24 01:15, Michael Paquier wrote:  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 ta

pgsql: Rename C23 keyword

2024-08-12 Thread Peter Eisentraut
Rename C23 keyword constexpr is a keyword in C23. Rename a conflicting identifier for future-proofing. Reviewed-by: Robert Haas Discussion: https://www.postgresql.org/message-id/flat/08abc832-1384-4aca-a535-1a79765b565e%40eisentraut.org Branch -- master Details --- https://git.postgr

pgsql: Remove dead code

2024-08-12 Thread Peter Eisentraut
Remove dead code After e9931bfb751, the locale argument of SB_lower_char() is never NULL, so the branch that deals with NULL can be removed (similar to how e9931bfb751 for example removed those branches in str_tolower()). Reviewed-by: Jeff Davis Discussion: https://www.postgresql.org/message-id

pgsql: Remove fe_memutils from libpgcommon_shlib

2024-08-11 Thread Peter Eisentraut
Remove fe_memutils from libpgcommon_shlib libpq must not use palloc/pfree. It's not allowed to exit on allocation failure, and mixing the frontend pfree with malloc is architecturally unsound. Remove fe_memutils from the shlib build entirely, to keep devs from accidentally depending on it in the

pgsql: Remove support for old realpath() API

2024-08-11 Thread Peter Eisentraut
Remove support for old realpath() API The now preferred way to call realpath() is by passing NULL as the second argument and get a malloc'ed result. We still supported the old way of providing our own buffer as a second argument, for some platforms that didn't support the new way yet. Those were

pgsql: Fix inappropriate uses of atol()

2024-08-09 Thread Peter Eisentraut
Fix inappropriate uses of atol() Some code using atol() would not work correctly if sizeof(long)==4: - src/bin/pg_basebackup/pg_basebackup.c: Would miscount size of a tablespace over 2 TB. - src/bin/pg_basebackup/streamutil.c: Would truncate a timeline ID beyond INT32_MAX. - src/bin/pg_rewi

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

2024-08-09 Thread Peter Eisentraut
On 08.08.24 01:15, Michael Paquier wrote:  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

pgsql: Remove obsolete RECHECK keyword completely

2024-08-08 Thread Peter Eisentraut
Remove obsolete RECHECK keyword completely This used to be part of CREATE OPERATOR CLASS and ALTER OPERATOR FAMILY, but it has done nothing (except issue a NOTICE) since PostgreSQL 8.4. Commit 30e7c175b81 removed support for dumping from pre-9.2 servers, so this no longer serves any need. This n

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: 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

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

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: Translation updates

2024-08-05 Thread Peter Eisentraut
Translation updates Source-Git-URL: https://git.postgresql.org/git/pgtranslation/messages.git Source-Git-Hash: 1b16f532c5e3688b4439a2769cef003b17946667 Branch -- REL_13_STABLE Details --- https://git.postgresql.org/pg/commitdiff/1d454d45c8b5db2d02157ffe3b5b17aa25b26f5b Modified Files --

pgsql: Translation updates

2024-08-05 Thread Peter Eisentraut
Translation updates Source-Git-URL: https://git.postgresql.org/git/pgtranslation/messages.git Source-Git-Hash: f1fa38f3bf3e0a5d3a95304dcf6a11acf304577c Branch -- REL_17_STABLE Details --- https://git.postgresql.org/pg/commitdiff/91099bb287ff71c970c72b81e6a190d80a92e760 Modified Files --

pgsql: Translation updates

2024-08-05 Thread Peter Eisentraut
Translation updates Source-Git-URL: https://git.postgresql.org/git/pgtranslation/messages.git Source-Git-Hash: 03e32419667b55fd8088a8238177d5b4c20f2b56 Branch -- REL_12_STABLE Details --- https://git.postgresql.org/pg/commitdiff/c2916c0933d190da323a01658b3ac4c332767adf Modified Files --

pgsql: Translation updates

2024-08-05 Thread Peter Eisentraut
Translation updates Source-Git-URL: https://git.postgresql.org/git/pgtranslation/messages.git Source-Git-Hash: 4040aedd08d20b68c9840873bded5493b136a4a9 Branch -- REL_14_STABLE Details --- https://git.postgresql.org/pg/commitdiff/426a224a6cb8f41776949eb20e40457150e8ee6e Modified Files --

pgsql: Translation updates

2024-08-05 Thread Peter Eisentraut
Translation updates Source-Git-URL: https://git.postgresql.org/git/pgtranslation/messages.git Source-Git-Hash: 2a4e0c192e2738ce2451e6d6970dcb2210d31800 Branch -- REL_16_STABLE Details --- https://git.postgresql.org/pg/commitdiff/d0311064041ad02b488b19caa7dd830ffd8e912a Modified Files --

pgsql: Translation updates

2024-08-05 Thread Peter Eisentraut
Translation updates Source-Git-URL: https://git.postgresql.org/git/pgtranslation/messages.git Source-Git-Hash: 09a5036e19350293c332e686d66c636762f7a454 Branch -- REL_15_STABLE Details --- https://git.postgresql.org/pg/commitdiff/8b57eb67e8428d93f42f603a917e610477a08821 Modified Files --

pgsql: Use CXXFLAGS instead of CFLAGS for linking C++ code

2024-08-04 Thread Peter Eisentraut
Use CXXFLAGS instead of CFLAGS for linking C++ code Otherwise, this would break if using C and C++ compilers from different families and they understand different options. It already used the right flags for compiling, this is only for linking. Also, the meson setup already did this correctly.

pgsql: Add -Wmissing-variable-declarations to the standard compilation

2024-08-03 Thread Peter Eisentraut
Add -Wmissing-variable-declarations to the standard compilation flags This warning flag detects global variables not declared in header files. This is similar to what -Wmissing-prototypes does for functions. (More correctly, it is similar to what -Wmissing-declarations does for functions, but -W

pgsql: Include bison header files into implementation files

2024-08-02 Thread Peter Eisentraut
Include bison header files into implementation files Before Bison 3.4, the generated parser implementation files run afoul of -Wmissing-variable-declarations (in spite of commit ab61c40bfa2) because declarations for yylval and possibly yylloc are missing. The generated header files contain an ext

pgsql: Convert some extern variables to static, Windows code

2024-08-01 Thread Peter Eisentraut
Convert some extern variables to static, Windows code Similar to 720b0eaae9b, discovered by MinGW. Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/c27090bd605a54d00c808ce1656a097fddd118f7 Modified Files -- src/bin/pg_upgrade/parallel.c | 8 src/

  1   2   3   4   5   6   7   8   9   10   >