Re: Cleanup gcc trick with varattrib_1b_e in VARATT_EXTERNAL_GET_POINTER()

2025-06-10 Thread Peter Eisentraut
On 09.06.25 10:21, Michael Paquier wrote: Back in b89e151054a0, the following macro has been introduced to retrieve the varatt_external of an on-disk external TOAST Datum, stuff now in detoast.h: /* * Macro to fetch the possibly-unaligned contents of an EXTERNAL datum * into a local "struct v

Re: Remaining dependency on setlocale()

2025-06-10 Thread Peter Eisentraut
On 07.06.25 00:23, Jeff Davis wrote: On Thu, 2025-06-05 at 22:15 -0700, Jeff Davis wrote: To continue this thread, I did a symbol search in the meson build directory like (patterns.txt attached): Attached a rough patch series which does what everyone seemed to agree on: * Change some trivi

pg_dump/pg_dumpall help synopses and terminology

2025-06-10 Thread Peter Eisentraut
The pg_dump and pg_dumpall help synopses could use some refinements. PG17: pg_dump --help: pg_dump dumps a database as a text file or to other formats. pg_dumpall --help: pg_dumpall extracts a PostgreSQL database cluster into an SQL script file. man pages: pg_dump - extract a PostgreSQL databa

Re: macos exported symbols list not used for loadable modules

2025-06-09 Thread Peter Eisentraut
On 05.06.25 19:28, Jacob Champion wrote: On Tue, Jun 3, 2025 at 12:48 AM Peter Eisentraut wrote: On macOS, when building with the make system, the exported symbols list (SHLIB_EXPORTS) is ignored. I don't think that is intentional. It was probably just forgotten, since that combinatio

Re: What's our minimum supported Python version?

2025-06-07 Thread Peter Eisentraut
On 06.06.25 17:46, Jacob Champion wrote: On Fri, Jun 6, 2025 at 7:17 AM Tom Lane wrote: Peter Eisentraut writes: Since we now require Python 3.6, we can also remove PL/Python test alternative expected files for earlier Python versions. See attached patch. +1. So nice to get rid of src/pl

Re: Unnecessary connection overhead due copy-on-write (mainly openssl)

2025-06-06 Thread Peter Eisentraut
On 05.06.25 21:58, Andres Freund wrote: The reason for this difference is that by default openssl registers an atexit handler that frees a lot of memory that was initialized in postmaster. That in turn triggers page-faults due to the relevant pages now differing in child processes. Which a) isn't

Re: Enable data checksums by default

2025-06-06 Thread Peter Eisentraut
On 05.06.25 12:37, Christoph Berg wrote: Maybe it would be enough if the initdb options used to create a cluster would be stored in some file in the data dir. That probably wouldn't help if the default behavior changed, as in the current case.

pg_dump --with-* options

2025-06-06 Thread Peter Eisentraut
I'm looking at the new in PG18 pg_dump --with-* options, and I'm having trouble understanding them. (I did not look into the source code or the git or mailing list history for this, to try to understand it as a user.) We have -a, --data-only dump only the data, not the schema or statis

Re: Update Windows CI Task Names: Server 2022 + VS 2022 Upgrade

2025-06-05 Thread Peter Eisentraut
On 05.06.25 12:42, Thomas Munro wrote: I think on your C11 thread I might have been confused about that, since there was an implication that 2019 might support , but it looks like 2019 added language stuff while 2022 added the library stuff. But yeah, given your proposal that MSVC 2019 should be

Re: What's our minimum supported Python version?

2025-06-05 Thread Peter Eisentraut
earlier Python versions. See attached patch. From f3f155e62db55c8782abe084d9ba46925c068cda Mon Sep 17 00:00:00 2001 From: Peter Eisentraut Date: Thu, 5 Jun 2025 09:47:15 +0200 Subject: [PATCH] plpython: Remove obsolete test expected file Move plpython_error_5.out to plpython_error.out, since the pre

Re: [PATCH] Split varlena.c into varlena.c and bytea.c

2025-06-05 Thread Peter Eisentraut
On 31.03.25 17:29, Aleksander Alekseev wrote: The proposed patch extracts the code dealing with bytea from varlena.c into a separate file, as proposed previously [1]. It merely changes the location of the existing functions. There are no other changes. Rebased. I think this is reasonable. va

Re: Possibly hard-to-read message

2025-06-05 Thread Peter Eisentraut
On 07.04.25 02:55, Daniel Gustafsson wrote: On 7 Apr 2025, at 02:43, David G. Johnston wrote: How about: + "if set to a number, overrides the default two second \\watch interval\n" I do like the consistency of "if set" even though most of the others are booleans. Ah yes, number is be

Re: pg18: Virtual generated columns are not (yet) safe when superuser selects from them

2025-06-05 Thread Peter Eisentraut
ever. From 0a6fd83bc1b96a0a6a465d64ef06bec4f0a3e824 Mon Sep 17 00:00:00 2001 From: Peter Eisentraut Date: Thu, 5 Jun 2025 12:35:38 +0200 Subject: [PATCH] Restrict virtual columns to use built-in functions Just like selecting from a view is exploitable (CVE-2024-7348), selecting from a table with virtual generat

Re: [PATCH] Proposal: Improvements to PDF stylesheet and table column widths

2025-06-05 Thread Peter Eisentraut
On 30.05.25 01:06, Noboru Saito wrote: I suggest setting both body.start.indent and body.end.indent to 0 in stylesheet-fo.xsl as follows: 0 0 This change maximizes the usable width of each page in the generated PDF documentation. As a result, the total number of pages is reduced from 3095 to 29

Re: Update Windows CI Task Names: Server 2022 + VS 2022 Upgrade

2025-06-05 Thread Peter Eisentraut
On 05.06.25 10:04, Nazir Bilal Yavuz wrote: Thomas Munro off-list mentioned that the Windows CI image is actually running on Server 2022, even though the task name still refers to Server 2019. He also suggested upgrading the compiler from Visual Studio 2019 to Visual Studio 2022. Some of the ta

Re: [19] Proposal: function markers to indicate collation/ctype sensitivity

2025-06-05 Thread Peter Eisentraut
On 04.06.25 17:53, Jeff Davis wrote: On Wed, 2025-06-04 at 11:33 -0400, David E. Wheeler wrote: I understand the need to trace these dependencies, but as a function developer with relatively modest understanding of collation nuances, I’m wondering how I’d know I needed these markers. It seems co

Re: [19] Proposal: function markers to indicate collation/ctype sensitivity

2025-06-05 Thread Peter Eisentraut
On 04.06.25 05:22, Jeff Davis wrote: This proposal would add that dependency information, and importantly, would be careful about which dependency entries are required for particular expressions and which are not. Introduce three new options when creating or altering a function, operator or in

Re: Missing program_XXX calling in pgbench tests

2025-06-05 Thread Peter Eisentraut
On 05.06.25 05:00, Hayato Kuroda (Fujitsu) wrote: Dear Fujii-san, A bit similar discussion came up before regarding pgbench and program_xxx_ok in [1], but it seems that change was never applied. I didn't know that, thanks for sharing. ISTM, it tried to extend function to test the shorter opt

Re: Add --system-identifier / -s option to pg_resetwal

2025-06-04 Thread Peter Eisentraut
On 04.06.25 20:46, Nikolay Samokhvalov wrote: - Simplified logic, getting rid of '-' check (negative numbers) -- decided to accept negative input values (they wrap to valid positive uint64) That doesn't seem like a good idea to me.

Re: Enhance pg_createsubscriber to create required standby.

2025-06-04 Thread Peter Eisentraut
On 04.06.25 11:56, Amit Kapila wrote: It's not clear to me how this change now would substantially improve the user experience. The number of characters you type is approximately the same. You still need to support the old mode because the backup might not come from pg_basebackup. In the curr

Re: pg_upgrade: warn about roles with md5 passwords

2025-06-04 Thread Peter Eisentraut
On 02.06.25 17:32, Nathan Bossart wrote: Since MD5 passwords are slated to be marked as deprecated in v18, I figured it might be a good idea to add a check for roles with MD5 passwords to pg_upgrade. I'm tempted to suggest that we apply this to v18, but I'm content to leave it for v19 if nobody

Re: doc pg_constraint.convalidated column description need update

2025-06-04 Thread Peter Eisentraut
On 03.05.25 17:42, Robert Treat wrote: I actually think this mix of VALID / ENFORCED is a little convoluted for end users, but I don't think the system catalog documentation is the best place to work that out, and I see we've also not added this type of extra information to other columns in the t

Re: Enhance pg_createsubscriber to create required standby.

2025-06-04 Thread Peter Eisentraut
On 04.06.25 05:56, Shubham Khanna wrote: Currently, pg_createsubscriber is designed to convert an existing physical replica into a logical subscriber. To use it, the user must manually set up a standby node beforehand, ensure that physical replication is active, and only then run pg_createsubscri

Re: Enable data checksums by default

2025-06-04 Thread Peter Eisentraut
On 23.05.25 11:43, Tomas Vondra wrote: We don't currently have anything in the release notes that calls this out as a potential upgrading issue, so I propose the attached patch. Seems reasonable, although maybe it should say ... so if the old cluster does not have checksums enabled ... ins

Re: Custom Glibc collation version strings under LOCPATH

2025-06-04 Thread Peter Eisentraut
On 04.06.25 06:03, Thomas Munro wrote: One way to move to a newer glibc-based Linux distribution but keep the locales working the same* without keeping the associated zombie C code alive is to find the source system's collation definition source files, compile them with the localedef on the targe

Re: C11 / VS 2019

2025-06-03 Thread Peter Eisentraut
On 03.06.25 10:01, Yura Sokolov wrote: Will it mean we can implement atomics in term of C11 atomics? Aside for VS 2019, which has no support for. (But VS 2022 already has.) So instead of numerous variants we could just differ VS2019 vs plain C11. I wrote: """ GCC details: The oldest gcc versio

Re: C11 / VS 2019

2025-06-03 Thread Peter Eisentraut
posal to commit early in PG19. From 0e2e4f6dd4dc4250f48736ec5a1b9bd40aad4fff Mon Sep 17 00:00:00 2001 From: Peter Eisentraut Date: Wed, 4 Jun 2025 07:09:42 +0200 Subject: [PATCH] Enable MSVC conforming preprocessor Switch MSVC to use the conforming preprocessor, using the /Zc:preprocessor option. This allows us to dro

Re: Add --system-identifier / -s option to pg_resetwal

2025-06-03 Thread Peter Eisentraut
On 31.05.25 20:52, Nikolay Samokhvalov wrote: the attached patch adds a new -s / --system-identifier option to pg_resetwal that allows users to change the database cluster's system identifier; it can be useful when you need to make a restored cluster distinct from the original, or when cloning

macos exported symbols list not used for loadable modules

2025-06-03 Thread Peter Eisentraut
code match the layout for other platforms.From 9122943d8e15497254f2f40c55b38ebbbf13241f Mon Sep 17 00:00:00 2001 From: Peter Eisentraut Date: Tue, 3 Jun 2025 09:41:51 +0200 Subject: [PATCH 1/2] Use exported symbols list on macOS for loadable modules as well --- src/Makefile.shlib | 2 +- 1 file

Re: SQL:2011 application time

2025-06-02 Thread Peter Eisentraut
On 26.05.25 23:18, Paul A Jungwirth wrote: On Sun, May 25, 2025 at 10:57 PM Peter Eisentraut wrote: Here we added a gist support function that we internally refer to by the symbol GIST_STRATNUM_PROC. This translated from "well-known" strategy numbers to opfamily-specific strate

Re: Add “FOR UPDATE NOWAIT” lock details to the log.

2025-06-01 Thread Peter Eisentraut
On 30.05.25 18:12, Fujii Masao wrote: On 2025/05/31 0:28, Fujii Masao wrote:   Otherwise, maybe "log_lock_failures" would be better. Yes, this seems better for consistency with log_lock_waits. Patch attached. This looks good to me.

C11 / VS 2019

2025-06-01 Thread Peter Eisentraut
I propose that we raise the baseline C standard for PostgreSQL to C11 for PostgreSQL 19. This will allow us to make use of some new features, clear away a bunch of backward compatibility cruft, unify use of compiler-specific extensions, and narrow the range of compatibility concerns for some e

Re: Add “FOR UPDATE NOWAIT” lock details to the log.

2025-05-30 Thread Peter Eisentraut
On 14.03.25 16:07, Fujii Masao wrote: Instead, wouldn't it be simpler to update LockAcquireExtended() to take a new argument, like logLockFailure, to control whether a lock failure should be logged directly? I’ve adjusted the patch accordingly and attached it. Please let me know what you think!

Re: Suggestion : support for environment variable in initdb to set the superuser password

2025-05-28 Thread Peter Eisentraut
On 27.05.25 11:43, Reda Agaoua wrote: I do believe it can be useful in a variety of settings, but I'm not sure whether this is secure. Specifically, the documentation advises against using PGPASSWORD for connecting to postgres : "Use of this environment variable is not recommended for security

Re: Standardize the definition of the subtype field of AlterDomainStmt

2025-05-28 Thread Peter Eisentraut
On 27.05.25 05:06, Quan Zongliang wrote: I noticed that the subtype of AlterDomainStmt is directly using constants in the code. It is not conducive to the maintenance and reading of the code. Based on the definition of AlterTableType, use "AD_" as the prefix. Define several macros to replace th

Re: SQL:2011 application time

2025-05-25 Thread Peter Eisentraut
On 17.09.24 11:45, Peter Eisentraut wrote: On 05.09.24 14:09, Peter Eisentraut wrote: On 07.08.24 22:54, Paul Jungwirth wrote: Here are some fixes based on outstanding feedback (some old some new). I have studied your patches v39-0001 through v39-0004, which correspond to what had been

Re: Update LDAP Protocol in fe-connect.c to v3

2025-05-23 Thread Peter Eisentraut
On 15.05.25 14:54, Pavel Seleznev wrote: I applied your patch. I ran extended application tests relative to vanilla ones, which include various scenarios of working with LDAP and I think that we can safely apply the patch in the PG18. I did not see the need for additional LDAP tests, since com

Re: Enable data checksums by default

2025-05-23 Thread Peter Eisentraut
de workflow in significant ways, so I don't think this would be appropriate to change now. So far I haven't heard any feedback about this, so I'm content with a documentation change. From e16a2db21688b14bfc9394a22d7bff2e2d445c5b Mon Sep 17 00:00:00 2001 From: Peter Eisentraut

Re: PATCH: jsonpath string methods: lower, upper, initcap, l/r/btrim, replace, split_part

2025-05-22 Thread Peter Eisentraut
On 09.05.25 21:50, Robert Haas wrote: I always struggle a bit to remember our policy on these issues -- to the best of my knowledge, we haven't documented it anywhere, and I think we probably should. I believe the way it works is that whenever a function depends on the operating system's timestam

Re: Log connection establishment timings

2025-05-22 Thread Peter Eisentraut
On 20.05.25 17:16, Melanie Plageman wrote: In src/backend/tcop/postgres.c, there is a call          SetConfigOption("log_connections", "true", context, source); that could be adjusted. Do you think the debug option should be 'all' or a list of the options covered by "true" (whic

Re: Log connection establishment timings

2025-05-22 Thread Peter Eisentraut
On 21.05.25 21:53, Melanie Plageman wrote: On Tue, May 20, 2025 at 11:16 AM Melanie Plageman wrote: In earlier versions of my patch, I played around with replacing these references in the docs. I ended up not doing it because I wasn't sure we had consensus on deprecating the "on", "true", "ye

Re: [PATCH] avoid double scanning in function byteain

2025-05-21 Thread Peter Eisentraut
The relationship between patch 0001 and 0002 is unclear to me. Are these incremental or alternatives? The description doesn't make this clear. Some of the changes in patch 0002 just appear to move code and comments around without changing anything substantial. It's not clear why that is don

Re: Add comment explaining why queryid is int64 in pg_stat_statements

2025-05-21 Thread Peter Eisentraut
On 20.05.25 08:38, Michael Paquier wrote: On Tue, May 20, 2025 at 05:51:51PM +1200, David Rowley wrote: Given the planId stuff is new and has the same issue, I think that pushes me towards thinking now is better than later for fixing both. I'm happy to adjust my patch unless you've started work

Re: Log connection establishment timings

2025-05-20 Thread Peter Eisentraut
On 12.03.25 16:43, Melanie Plageman wrote: On Tue, Mar 11, 2025 at 6:27 PM Melanie Plageman wrote: I did more manual testing of my patches, and I think they are mostly ready for commit except for the IsConnectionBackend() macro (if we have something to change it to). I've committed this and

Re: Add comment explaining why queryid is int64 in pg_stat_statements

2025-05-19 Thread Peter Eisentraut
On 17.05.25 14:49, Michael Paquier wrote: On Fri, May 16, 2025 at 04:05:01PM +0530, Shaik Mohammad Mujeeb wrote: This conversion is intentional - most likely to match the bigint type of the queryid column in pg_stat_statements. However, without an explicit comment, this can be misleading. A begi

Re: extension_control_path and "directory"

2025-05-02 Thread Peter Eisentraut
On 29.04.25 17:06, Matheus Alcantara wrote: On Tue, Apr 29, 2025 at 11:08 AM David E. Wheeler wrote: Right. My point is a minor one, but I thin you can use an if/ else there: ```c if (strcmp(piece, "$system") == 0) { /* Substitute the path macro if needed */ mangled = substit

Re: RFC: Additional Directory for Extensions

2025-05-01 Thread Peter Eisentraut
On 01.05.25 16:31, David E. Wheeler wrote: On May 1, 2025, at 07:50, Peter Eisentraut wrote: The documentation in config.sgml says: Note that the path elements should typically end in extension if the normal installation layouts are followed. So I think your change here between

Re: RFC: Additional Directory for Extensions

2025-05-01 Thread Peter Eisentraut
On 28.04.25 23:14, David E. Wheeler wrote: On Apr 25, 2025, at 15:23, David E. Wheeler wrote: Thank you for the review. Here’s v3*. V4 removes “/extension” from the end of the `extension_control_path` value. The documentation in config.sgml says: Note that the path elements should typ

Re: Fix outdated comments for IndexInfo

2025-05-01 Thread Peter Eisentraut
On 30.04.25 17:48, Japin Li wrote: While working on [1], I found outdated comments in IndexInfo. The attached patch corrects them. [1] https://www.postgresql.org/message-id/2A40921D-83AB-411E-ADA6-7E509A46F1E4%40logansw.com Maybe these per-column comments should be moved inline, similar to, f

Re: Doc: fix the rewrite condition when executing ALTER TABLE ADD COLUMN

2025-05-01 Thread Peter Eisentraut
On 30.04.25 17:17, Robert Treat wrote: On Wed, Apr 30, 2025 at 5:15 AM Peter Eisentraut wrote: On 28.04.25 18:56, Álvaro Herrera wrote: On 2025-Apr-23, Nathan Bossart wrote: On Mon, Mar 24, 2025 at 11:37:20AM +0100, Álvaro Herrera wrote: I'd add a note about these two things to the

Re: alphabetize long options in pg_dump[all] docs

2025-04-30 Thread Peter Eisentraut
On 29.04.25 23:54, Nathan Bossart wrote: On Tue, Apr 29, 2025 at 11:45:11PM +0200, Álvaro Herrera wrote: I think the concept here is that all short options go first in alphabetical order, then the long options in their own alphabetical order, and if one option has both, then the short option tak

Re: Enhancing Memory Context Statistics Reporting

2025-04-30 Thread Peter Eisentraut
On 29.04.25 15:13, Rahila Syed wrote: Please find attached a patch with some comments and documentation changes. Additionaly, added a missing '\0' termination to "Remaining Totals" string. I think this became necessary after we replaced dsa_allocate0() with dsa_allocate() is the latest version.

Re: Doc: fix the rewrite condition when executing ALTER TABLE ADD COLUMN

2025-04-30 Thread Peter Eisentraut
h that includes some text about virtual generated columns and also fixes up a small mistake in the previous patch (confused identity and generated columns) and improves the wording and formatting a bit more. From 33fb59c94ae3dbf6367e36c79f71dc9e291423d8 Mon Sep 17 00:00:00 2001 From: Peter Eise

Re: What's our minimum supported Python version?

2025-04-29 Thread Peter Eisentraut
On 29.04.25 17:16, Tom Lane wrote: Peter Eisentraut writes: On 24.04.25 18:20, Jacob Champion wrote: Seems like no one is pushing hard for an earlier version, yet, so here's a patch with your suggested wording from upthread. I'm not sure if this meets Peter's request for pre

Re: allow changing autovacuum_max_workers without restarting

2025-04-28 Thread Peter Eisentraut
On 28.04.25 16:41, Nathan Bossart wrote: On Mon, Apr 28, 2025 at 09:14:54AM -0400, Tom Lane wrote: Peter Eisentraut writes: This initdb output seems, well, kinda fake, which it is by its own admission. Agreed. Could we do this less fake maybe like this: selecting default

Re: What's our minimum supported Python version?

2025-04-28 Thread Peter Eisentraut
On 24.04.25 18:20, Jacob Champion wrote: On Thu, Apr 24, 2025 at 7:59 AM Tom Lane wrote: I'm still content with the idea of deciding that 3.6 is now our cutoff. Seems like no one is pushing hard for an earlier version, yet, so here's a patch with your suggested wording from upthread. I'm not

Re: allow changing autovacuum_max_workers without restarting

2025-04-28 Thread Peter Eisentraut
On 07.01.25 18:23, Nathan Bossart wrote: + /* +* We chose the default for autovacuum_worker_slots during the +* max_connections tests above, but we print a progress message anyway. +*/ + printf(_("selecting default \"autovacuum_worker_slots\" ... %d\n"), +

Re: sslmode=secure by default (Re: Making sslrootcert=system work on Windows psql)

2025-04-24 Thread Peter Eisentraut
On 24.04.25 12:53, Christoph Berg wrote: Now you can say `psql -h db.example.com -p 5433 dbfoo`, but for specifying the sslmode, you have to rewrite at least the last argument to use connection string syntax, `psql "dbname=dbfoo sslmode=verify-full`. This needs be be less cumbersome. (And the nam

Re: What's our minimum supported Python version?

2025-04-24 Thread Peter Eisentraut
On 24.04.25 13:16, Jelte Fennema-Nio wrote: On Thu, 24 Apr 2025 at 10:54, Peter Eisentraut wrote: The cut-off in practice for these things is usually RHEL. PG18 currently still supports RHEL 7, which appears to come with Python 3.6. Seeing that the small problem with the test script was

Re: Enable data checksums by default

2025-04-24 Thread Peter Eisentraut
On 23.04.25 00:24, Tomas Vondra wrote: The patch that flips the default has been committed. I also started a PG18 open items page and made a note that we follow up on the upgrade experience, as was discussed in this thread. https://wiki.postgresql.org/wiki/PostgreSQL_18_Open_Items Regarding t

Re: What's our minimum supported Python version?

2025-04-24 Thread Peter Eisentraut
On 22.04.25 18:04, Tom Lane wrote: Jacob Champion writes: As for picking a version... 3.6 will have been EOL for almost three years by the time 18 releases. It seems like we would drop it happily, were it not for RHEL8. Agreed, but RHEL8 is out there and I don't think we can just drop support

Re: [PoC] Federated Authn/z with OAUTHBEARER

2025-04-15 Thread Peter Eisentraut
On 10.04.25 01:08, Jacob Champion wrote: Christoph noted that this was also confusing from the packaging side, earlier, and Daniel proposed -Doauth-client/--with-oauth-client as the feature switch name instead. Any objections? Unfortunately it would mean a buildfarm email is in order, so we shoul

Re: [PoC] Federated Authn/z with OAUTHBEARER

2025-04-11 Thread Peter Eisentraut
On 08.04.25 19:44, Jacob Champion wrote: Would anybody following along be opposed to a situation where - dynamiclib builds go through the dlopen() shim - staticlib builds always rely on statically linked symbols If this can be implemented in a straightforward way, that would be the best way, I

someone else to do the list of acknowledgments

2025-04-11 Thread Peter Eisentraut
I would like for someone else to prepare the list of acknowledgments in the release notes this year. I have been preparing the list of acknowledgments in the release notes (example: [0]) since PostgreSQL 10 (launched from discussions at PGCon 2017 [1]). I'm looking to hand this off now, so that

Re: Add missing PGDLLIMPORT markings

2025-04-11 Thread Peter Eisentraut
On 09.04.25 12:02, Peter Eisentraut wrote: I ran src/tools/mark_pgdllimport.pl and it detected a few new global variables with missing markings.  See attached patch.  Please point out if any of these should not be marked or if they are special cases in some other way.  I'm Cc'i

Re: Improve a few appendStringInfo calls new to v18

2025-04-11 Thread Peter Eisentraut
On 10.04.25 05:51, David Rowley wrote: Looks like v18 has grown a few appendStringInfo misusages, e.g. using appendStringInfo() when no formatting is needed or just using format "%s" instead of using appendStringInfoString(). Would it be useful to augment appendStringInfo() something like this:

Re: Consistently use macro HeapTupleIsValid to check the validity of tuples in tablecmds.c

2025-04-10 Thread Peter Eisentraut
On 09.04.25 16:23, Tom Lane wrote: Heikki Linnakangas writes: Inconsistency is not good either though. I'm not sure it's worth the churn, but I could get on board a patch to actually replace all HeapTupleIsValid(tuple) calls with plain "tuple != NULL" checks. Keep HeapTupleIsValid() just for co

Re: Consistently use macro HeapTupleIsValid to check the validity of tuples in tablecmds.c

2025-04-10 Thread Peter Eisentraut
On 09.04.25 14:26, Heikki Linnakangas wrote: It's a matter of taste, but personally I find 'if (tuple != NULL)' more clear than 'if (HeapTupleIsValid(tuple))'. The presence of a macro suggests that there might be other kinds of invalid tuples than a NULL pointer, which just adds mental load.

Add missing PGDLLIMPORT markings

2025-04-09 Thread Peter Eisentraut
Btw., this new variable in memutils.h extern dsa_area *area; could probably do with a less generic name? From e9d868a38b50c1fa449258926c40cef88bd73045 Mon Sep 17 00:00:00 2001 From: Peter Eisentraut Date: Wed, 9 Apr 2025 11:55:48 +0200 Subject: [PATCH] WIP: Add missing PGDLLIMPORT markings

Build macOS shared modules as dylib rather than bundle

2025-04-09 Thread Peter Eisentraut
an't backpatch this because of the ABI change, so once PG18 ships the window is over. For the -bundle -> -dynamiclib change, I don't have any particular urgency right now. From 57de7451676506f79a99681338efcb0a1f956c3c Mon Sep 17 00:00:00 2001 From: Peter Eisentraut Date: We

Re: Cleaning up ERRCODE usage in our XML code

2025-04-09 Thread Peter Eisentraut
On 14.09.24 21:14, Tom Lane wrote: +Section: Class 10 - XQuery Error + +# recent SQL versions define quite a few codes in this class, but for now +# we are only using this generic one +10608EERRCODE_INVALID_ARGUMENT_FOR_XQUERY invalid_argument_for_xquery Coul

Re: Remove unnecessary static type qualifiers

2025-04-08 Thread Peter Eisentraut
On 08.04.25 14:22, Junwang Zhao wrote: When I read the libpq source code, I found unnecessary static type qualifiers in PQsetClientEncoding(). diff --git a/src/interfaces/libpq/fe-connect.c b/src/interfaces/libpq/fe-connect.c index 0258d9ace3c..300ddfffd55 100644 --- a/src/interfaces/libpq/fe-c

Re: Feature freeze

2025-04-08 Thread Peter Eisentraut
On 08.04.25 16:59, Bruce Momjian wrote: On Tue, Apr 8, 2025 at 10:36:45AM -0400, Bruce Momjian wrote: Since we recorded feature freeze as April 8, 2025 0:00 AoE (anywhere on Earth): https://wiki.postgresql.org/wiki/PostgreSQL_18_Open_Items#Important_Dates https://www.timeandda

Re: [PoC] Federated Authn/z with OAUTHBEARER

2025-04-07 Thread Peter Eisentraut
On 07.04.25 16:43, Andres Freund wrote: While I was looking into this I found that Debian's going to use the existence of an SONAME to check other things, which I assume will make Christoph's life harder. I have switched over to 'libpq-oauth-.so', without any SONAME or symlinks. Yes, this is cor

Re: [PoC] Federated Authn/z with OAUTHBEARER

2025-04-07 Thread Peter Eisentraut
On 05.04.25 02:27, Jacob Champion wrote: On Tue, Apr 1, 2025 at 3:40 PM Jacob Champion wrote: Maybe a better idea would be to ship an SONAME of `libpq-oauth.so.0.`, without any symlinks, so that there's never any ambiguity about which module belongs with which libpq. While I was looking into

Re: Thread-safe nl_langinfo() and localeconv()

2025-04-05 Thread Peter Eisentraut
On 28.03.25 09:13, Peter Eisentraut wrote: About patch 0003: I had previously pointed out that the canonicalization might have been intentional, and that we have canonicalization of ICU locale names. But we don't have to keep the setlocale()-based locale checking implementation just for

Support "make check" for PGXS extensions

2025-04-05 Thread Peter Eisentraut
ation for what you can implement yourself in your extension's makefile. From d08218d36d4590f80c2d46f3d7c30bee3e35b7e2 Mon Sep 17 00:00:00 2001 From: Peter Eisentraut Date: Thu, 20 Mar 2025 14:00:18 +0100 Subject: [PATCH v0] WIP: Support "make check" for PGXS extensions --- s

Re: Index AM API cleanup

2025-04-05 Thread Peter Eisentraut
I have committed these four patches (squashed into three). I made the error handling change in 0003 that you requested, and also the error handling change in 0002 discussed in an adjacent message. On 12.03.25 16:52, Mark Dilger wrote: On Wed, Mar 12, 2025 at 7:00 AM Peter Eisentraut

Re: doc: Mention clock synchronization recommendation for hot_standby_feedback

2025-04-04 Thread Peter Eisentraut
On 24.03.25 10:24, Jakub Wartak wrote: On Fri, Mar 14, 2025 at 11:31 AM vignesh C wrote: On Wed, 5 Mar 2025 at 11:46, Amit Kapila wrote: On Tue, Mar 4, 2025 at 4:44 PM Jakub Wartak I can go with the last patch as you observed that in a real-world case, and we can look at others (if any) on

Re: Index AM API cleanup

2025-04-04 Thread Peter Eisentraut
On 12.03.25 17:08, Mark Dilger wrote: On Wed, Mar 12, 2025 at 7:25 AM Tom Lane <mailto:t...@sss.pgh.pa.us>> wrote: Peter Eisentraut mailto:pe...@eisentraut.org>> writes: > 0002: Add get_opfamily_member_for_cmptype().  This was called > get_opmethod_membe

Re: Index AM API cleanup

2025-04-04 Thread Peter Eisentraut
On 04.04.25 14:17, Andres Freund wrote: skink/valgrind just started to die during the main regression tests: https://buildfarm.postgresql.org/cgi-bin/show_log.pl?nm=skink&dt=2025-04-04%2011%3A01%3A56 Thanks, fix is on the way. The set of commits seem to point to the changes made as part of th

Re: Thread-safe nl_langinfo() and localeconv()

2025-04-04 Thread Peter Eisentraut
On 31.03.25 15:52, Tom Lane wrote: Peter Eisentraut writes: I'm not sure what to do with this. If setlocale() and newlocale() indeed behave differently in what set of locale names they accept, then technically we ought to test both of them, since we do use both of them later on. Or may

Re: Update Unicode data to Unicode 16.0.0

2025-04-03 Thread Peter Eisentraut
On 17.03.25 19:54, Jeff Davis wrote: On Thu, 2025-03-13 at 14:49 +0100, Peter Eisentraut wrote: I think these test result changes are incorrect.  AFAICT, nothing has changed in the upstream data that would explain such a change. I didn't get such test differences in my original patch.  Di

Re: Support NOT VALID / VALIDATE constraint options for named NOT NULL constraints

2025-04-03 Thread Peter Eisentraut
On 03.04.25 10:07, Alvaro Herrera wrote: The new flag is there for quick access by get_relation_info. We could easily not have it otherwise, because clients don't need it, but its lack would probably make planning measurably slower because it'd have to do syscache access for every single not-nul

Re: Update LDAP Protocol in fe-connect.c to v3

2025-04-03 Thread Peter Eisentraut
nch right now is that we should probably take the patch that sets the version option and consider it for backpatching. The patch with the tests can be held for detailed review later. From c1e85711e1b0c7efcd1fa55cc46db959e12d6cfb Mon Sep 17 00:00:00 2001 From: Peter Eisentraut Date: Thu, 3 Apr 202

Re: Support NOT VALID / VALIDATE constraint options for named NOT NULL constraints

2025-04-03 Thread Peter Eisentraut
It occurred to me that we will also want to have NOT NULL NOT ENFORCED constraints eventually. As we have discussed elsewhere, the NOT ENFORCED state is closely related to the NOT VALID state. So that should probably be considered in the design here. Reading up on this again now, I'm confuse

Re: pg_upgrade: Support for upgrading to checksums enabled

2025-04-03 Thread Peter Eisentraut
On 11.03.25 11:42, Peter Eisentraut wrote: Here is an updated patch that works more along those lines.  It adds a pg_upgrade option --update-checksums, which activates the code to rewrite the checksums.  You must specify this option if the source and target clusters have different checksum

Re: NOT ENFORCED constraint feature

2025-04-02 Thread Peter Eisentraut
On 28.03.25 14:27, Amul Sul wrote: On Fri, Mar 28, 2025 at 3:34 PM Ashutosh Bapat wrote: On Thu, Mar 27, 2025 at 6:25 PM Amul Sul wrote: I am not sure how to make such tests stable enough since the trigger name involves OIDs. In count check, I tried adjusting the join condition to ensure t

Re: macOS 15.4 versus strchrnul()

2025-04-01 Thread Peter Eisentraut
ritten away from that it's a glibc-specific extension. From e12c5d224a195b893f79c470bc4f21de1585c808 Mon Sep 17 00:00:00 2001 From: Peter Eisentraut Date: Tue, 1 Apr 2025 19:00:39 +0200 Subject: [PATCH] WIP: Fix AC_CHECK_DECLS equivalent in meson --- meson.build | 19

Re: PRI?64 vs Visual Studio (2022)

2025-04-01 Thread Peter Eisentraut
On 31.03.25 08:28, Kyotaro Horiguchi wrote: If you're already aware of this and have taken it into account, please feel free to ignore this. As described in the recent commit a0ed19e0a9e, many %ll? format specifiers are being replaced with %. I hadn’t paid much attention to this before, but I h

Re: Index AM API cleanup

2025-04-01 Thread Peter Eisentraut
On 20.03.25 12:59, Peter Eisentraut wrote: v22-0006-Convert-from-StrategyNumber-to-CompareType.patch This is all that remains now.  I think with a bit more polishing around the edges, some comment updates, etc., this is close to ready. Here is an updated version of this patch. I have left

Re: 64 bit numbers vs format strings

2025-03-29 Thread Peter Eisentraut
On 10.03.25 10:49, Peter Eisentraut wrote: On 02.03.25 22:08, Thomas Munro wrote: On Mon, Mar 3, 2025 at 6:21 AM Peter Eisentraut wrote: On 05.12.24 23:18, Thomas Munro wrote:   Old: errmsg("hello %llu", (unsigned long long) x)   New: errmsg("hello %" PRIu64, x

Re: On non-Windows, hard depend on uselocale(3)

2025-03-28 Thread Peter Eisentraut
On 28.03.25 17:32, Peter Eisentraut wrote: On 28.03.25 17:14, Masahiko Sawada wrote: On Fri, Mar 28, 2025 at 8:30 AM Peter Eisentraut wrote: On 09.02.25 08:32, Peter Eisentraut wrote: Checking the status of this thread ... The patches that removed the configure checks for

Re: On non-Windows, hard depend on uselocale(3)

2025-03-28 Thread Peter Eisentraut
On 28.03.25 17:14, Masahiko Sawada wrote: On Fri, Mar 28, 2025 at 8:30 AM Peter Eisentraut wrote: On 09.02.25 08:32, Peter Eisentraut wrote: Checking the status of this thread ... The patches that removed the configure checks for _configthreadlocale(), and related cleanup, have been

Re: On non-Windows, hard depend on uselocale(3)

2025-03-28 Thread Peter Eisentraut
On 09.02.25 08:32, Peter Eisentraut wrote: Checking the status of this thread ... The patches that removed the configure checks for _configthreadlocale(), and related cleanup, have been committed. The original patch to "Tidy up locale thread safety in ECPG library" is still o

Re: support virtual generated column not null constraint

2025-03-28 Thread Peter Eisentraut
On 24.03.25 04:26, jian he wrote: rebase, and some minor code comments change. I have committed this. I did a bit more editing on the naming of various things. In terms of functionality, in ExecConstraints() notnull_virtual_attrs and virtual_notnull_check were redundant, so I simplified tha

Re: 64 bit numbers vs format strings

2025-03-28 Thread Peter Eisentraut
On 02.03.25 22:08, Thomas Munro wrote: And one more thing like that: in a couple of places we see warnings on macOS CI that I'd missed: when printing the result of i64abs() as PRId64, because it happens to use labs() and it happens to define int64_t as long long, [...]. I suppose we should cast

Re: Thread-safe nl_langinfo() and localeconv()

2025-03-28 Thread Peter Eisentraut
On 27.03.25 11:16, Peter Eisentraut wrote: Patch 0002 also looks okay, except that the error handling could be unified with existing code, as I had previously pointed out.  Patch 0005 fixes that. I plan to commit this one next, after the above had a bit of time to stew. also done About

Re: Support "make check" for PGXS extensions

2025-03-27 Thread Peter Eisentraut
On 20.03.25 18:20, David E. Wheeler wrote: On Mar 20, 2025, at 09:06, Peter Eisentraut wrote: This is a quick follow-up to the extension_control_path patch. With this little additional patch, you can now run "make check" in PGXS-using extensions (instead of having to do make ins

Re: Thread-safe nl_langinfo() and localeconv()

2025-03-27 Thread Peter Eisentraut
On 14.02.25 15:13, Peter Eisentraut wrote: On 09.02.25 15:52, Peter Eisentraut wrote: This patch set is still desirable.  Here is a rebased version of the v5 patches.  I haven't applied any corrections or review comments. Here is the same patch set with some review comments. Patch 0001

  1   2   3   4   5   6   7   8   9   10   >