Re: Rename PageData to XLogPageData

2024-10-04 Thread Peter Eisentraut
On 04.10.24 05:55, Michael Paquier wrote: On Thu, Oct 03, 2024 at 01:31:19PM +0200, Peter Eisentraut wrote: Sounds good. Here is an updated version. Good idea. What you have sent here looks good to me. committed

Re: Rename PageData to XLogPageData

2024-10-03 Thread Peter Eisentraut
ion. From 988094723e5b98ef89c5bdacde665cd51bc0e766 Mon Sep 17 00:00:00 2001 From: Peter Eisentraut Date: Thu, 3 Oct 2024 13:14:33 +0200 Subject: [PATCH v2] 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

Rename PageData to XLogPageData

2024-10-02 Thread Peter Eisentraut
909c03f5462cf912bb71249545 Mon Sep 17 00:00:00 2001 From: Peter Eisentraut Date: Wed, 2 Oct 2024 07:16:55 -0400 Subject: [PATCH] Rename PageData to XLogPageData 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

Re: Requiring LLVM 14+ in PostgreSQL 18

2024-10-01 Thread Peter Eisentraut
On 21.08.24 16:00, Peter Eisentraut wrote: On 17.05.24 00:54, Thomas Munro wrote: On Fri, May 17, 2024 at 3:17 AM Nazir Bilal Yavuz wrote: Actually, 32 bit builds are working but the Perl version needs to be updated to 'perl5.36-i386-linux-gnu' in .cirrus.tasks.yml. I changed 000

Re: [PATCH] Replace magic constant 3 with NUM_MERGE_MATCH_KINDS

2024-10-01 Thread Peter Eisentraut
On 13.05.24 12:22, Aleksander Alekseev wrote: Hi, Thanks. I see a few pieces of code that use special FOO_NUMBER enum values instead of a macro. Should we refactor these pieces accordingly? PFA another patch. I think this is a sensible improvement. But please keep the trailing commas on the

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

2024-10-01 Thread Peter Eisentraut
On 28.08.24 20:50, Peter Eisentraut wrote: I suggest that the simplification of the xlocale.h configure tests could be committed separately.  This would also be useful independent of this, and it's a sizeable chunk of this patch. To keep this moving along a bit, I have extracted this par

Re: Enable data checksums by default

2024-10-01 Thread Peter Eisentraut
On 27.08.24 17:26, Nathan Bossart wrote: On Tue, Aug 27, 2024 at 05:16:51PM +0200, Peter Eisentraut wrote: On 27.08.24 15:44, Greg Sabino Mullane wrote: On Mon, Aug 26, 2024 at 3:46 PM Nathan Bossart mailto:nathandboss...@gmail.com>> wrote: Should we error if both --data-checks

Re: information_schema.view attgenerated

2024-09-29 Thread Peter Eisentraut
On 18.09.24 10:23, jian he wrote: On Wed, Sep 18, 2024 at 4:09 PM Peter Eisentraut wrote: i guess, it will have some minor speed up, also more accurate. I'm having a hard time interpreting this report. Could you be more clear about what is the existing code, and what is the code yo

Re: Add contrib/pg_logicalsnapinspect

2024-09-25 Thread Peter Eisentraut
Is there a reason for this elaborate error handling: + fd = OpenTransientFile(path, O_RDONLY | PG_BINARY); + + if (fd < 0 && errno == ENOENT) + ereport(ERROR, + errmsg("file \"%s\" does not exist", path)); + else if (fd < 0) +

Re: Add support to TLS 1.3 cipher suites and curves lists

2024-09-25 Thread Peter Eisentraut
On 18.09.24 22:48, Jacob Champion wrote: +#ssl_ciphers = 'HIGH:MEDIUM:+3DES:!aNULL' # allowed TLSv1.2 ciphers +#ssl_cipher_suites = ''# allowed TLSv1.3 cipher suites, blank for default After marinating on this a bit... I think the naming may result in some "who's on first" miscommunications

Re: Proposal to Enable/Disable Index using ALTER INDEX

2024-09-24 Thread Peter Eisentraut
On 24.09.24 02:30, David Rowley wrote: I understand the last discussion went down that route too. For me, it seems strange that adding some global variable is seen as cleaner than storing the property in the same location as all the other index properties. It's arguably not actually a property

Re: Proposal to Enable/Disable Index using ALTER INDEX

2024-09-24 Thread Peter Eisentraut
On 23.09.24 22:51, Shayon Mukherjee wrote: I am happy to draft a patch for this as well. I think I have a working idea so far of where the necessary checks might go. However if you don’t mind, can you elaborate further on how the effect would be similar to enable_indexscan? Planner settings l

Re: Index AM API cleanup

2024-09-24 Thread Peter Eisentraut
Next, I have reviewed patches v17-0010-Track-sort-direction-in-SortGroupClause.patch v17-0011-Track-scan-reversals-in-MergeJoin.patch Both of these seem ok and sensible to me. They take the concept of the "reverse" flag that already exists in the affected code and just apply it more consistent

Re: Proposal to Enable/Disable Index using ALTER INDEX

2024-09-23 Thread Peter Eisentraut
On 09.09.24 23:38, Shayon Mukherjee wrote: *Problem*: Adding and removing indexes is a common operation in PostgreSQL. On larger databases, however, these operations can be resource-intensive. When evaluating the performance impact of one or more indexes, dropping them might not be ideal since

Re: Converting README documentation to Markdown

2024-09-23 Thread Peter Eisentraut
e we should look for different approaches there. Maybe there are some easy changes that could be extracted from this patch, but the whitespace and list issue needs more consideration. From 990329d7a8e6110ecf099162680f6c0eaf38ea14 Mon Sep 17 00:00:00 2001 From: Peter Eisentraut Date: Mon, 23 Se

Re: Detailed release notes

2024-09-18 Thread Peter Eisentraut
On 18.09.24 02:54, Bruce Momjian wrote: On Tue, Sep 17, 2024 at 08:22:41PM -0400, Tom Lane wrote: Bruce Momjian writes: On Tue, Sep 17, 2024 at 03:29:54PM -0300, Marcos Pegoraro wrote: Em ter., 17 de set. de 2024 às 05:12, Alvaro Herrera Add backend support for injection points (Michael Paq

Re: [PATCH] WIP: replace method for jsonpath

2024-09-18 Thread Peter Eisentraut
On 17.09.24 21:16, David E. Wheeler wrote: On Sep 17, 2024, at 15:03, Florents Tselai wrote: Fallback scenario: make this an extension, but in a first pass I didn’t find any convenient hooks. One has to create a whole new scanner, grammar etc. Yeah, it got me thinking about the RFC-9535 JSO

Re: information_schema.view attgenerated

2024-09-18 Thread Peter Eisentraut
On 16.09.24 06:12, jian he wrote: hi. one minor issue in src/backend/catalog/information_schema.sql /* * 6.22 * COLUMNS view */ CREATE VIEW columns CAST(CASE WHEN a.attgenerated = '' THEN pg_get_expr(ad.adbin, ad.adrelid) END AS character_data) AS column_default, can change to CAST(C

Re: define pg_structiszero(addr, s, r)

2024-09-18 Thread Peter Eisentraut
On 18.09.24 06:16, Bertrand Drouvot wrote: +#define pg_structiszero(addr, s, r) \ + do { \ +

Re: Remove shadowed declaration warnings

2024-09-18 Thread Peter Eisentraut
On 12.09.24 04:25, David Rowley wrote: On Thu, 12 Sept 2024 at 14:03, Tom Lane wrote: I do grant that sometimes shadowing of locals can cause bugs. I don't recall right now why we opted for -Wshadow=compatible-local over -Wshadow=local, but we could certainly take another look at that. I don

Re: Remove useless GROUP BY columns considering unique index

2024-09-18 Thread Peter Eisentraut
On 12.09.24 03:43, David Rowley wrote: On Sat, 30 Dec 2023 at 04:05, Zhang Mingli wrote: So my patch make it easy: check unique index’s columns, it’s a valid candidate if all of that have NOT NULL constraint. And we choose a best one who has the least column numbers in get_min_unique_not_null

Re: SQL:2011 application time

2024-09-17 Thread Peter Eisentraut
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 reverted plus the new empty range check plus

Re: SQL:2023 JSON simplified accessor support

2024-09-16 Thread Peter Eisentraut
On 29.08.24 18:33, Alexandra Wang wrote: I’ve implemented the member and array accessors and attached two alternative patches: 1. v1-0001-Add-JSON-JSONB-simplified-accessor.patch: This patch enables dot access to JSON object fields and subscript access to indexed JSON array elements by convertin

Re: Support LIKE with nondeterministic collations

2024-09-15 Thread Peter Eisentraut
Here is an updated patch. It is rebased over the various recent changes in the locale APIs. No other changes. On 30.07.24 21:46, Peter Eisentraut wrote: On 27.07.24 00:32, Paul A Jungwirth wrote: On Thu, Jun 27, 2024 at 11:31 PM Peter Eisentraut wrote: Here is an updated patch for this

Re: tiny step toward threading: reduce dependence on setlocale()

2024-09-13 Thread Peter Eisentraut
On 12.09.24 22:01, Jeff Davis wrote: On Mon, 2024-09-09 at 15:37 +0200, Peter Eisentraut wrote: In the end, I figured the best thing to do here is to add an explicit locale argument to MATCH_LOWER() and GETCHAR() so one can actually understand this code by reading it.  New patch attached

Re: json_query conditional wrapper bug

2024-09-11 Thread Peter Eisentraut
On 11.09.24 13:25, Amit Langote wrote: On Wed, Sep 11, 2024 at 6:57 PM Peter Eisentraut wrote: On 11.09.24 09:51, Amit Langote wrote: I've updated your patch to include updated test outputs and a nearby code comment expanded. Do you intend to commit it or do you prefer that I do?

Re: Document DateStyle effect on jsonpath string()

2024-09-11 Thread Peter Eisentraut
On 10.09.24 22:16, Tom Lane wrote: Peter Eisentraut writes: These JSON path functions are specified by the SQL standard, so they shouldn't depend on PostgreSQL-specific settings. At least in new functionality we should avoid that, no? Hmm ... but does the standard precisely defin

Re: json_query conditional wrapper bug

2024-09-11 Thread Peter Eisentraut
On 11.09.24 09:51, Amit Langote wrote: I've updated your patch to include updated test outputs and a nearby code comment expanded. Do you intend to commit it or do you prefer that I do? This change looks unrelated: -ERROR: new row for relation "test_jsonb_constraints" violates check constrai

Re: [PoC] Federated Authn/z with OAUTHBEARER

2024-09-11 Thread Peter Eisentraut
On 04.09.24 11:28, Peter Eisentraut wrote: On 03.09.24 22:56, Jacob Champion wrote: The parse_strval field could use a better explanation. I actually don't understand the need for this field.  AFAICT, this is just used to record whether strval is valid. No, it's meant to track th

Re: json_query conditional wrapper bug

2024-09-10 Thread Peter Eisentraut
On 10.09.24 10:00, Amit Langote wrote: Sorry for missing this report and thanks Andrew for the offlist heads up. On Wed, Sep 4, 2024 at 7:16 PM Peter Eisentraut wrote: On 28.08.24 11:21, Peter Eisentraut wrote: These are ok: select json_query('{"a": 1, "b": 42}&#

Re: Document DateStyle effect on jsonpath string()

2024-09-10 Thread Peter Eisentraut
Isn't this behavior actually a bug that should be fixed rather than documented? These JSON path functions are specified by the SQL standard, so they shouldn't depend on PostgreSQL-specific settings. At least in new functionality we should avoid that, no? On 10.09.24 21:43, David E. Wheeler

Re: Index AM API cleanup

2024-09-10 Thread Peter Eisentraut
On 03.09.24 19:26, Mark Dilger wrote: On Sep 3, 2024, at 9:52 AM, Peter Eisentraut wrote: Here is a cleaned-up version of the v17-0004 patch. I have applied the renaming discussed above. I have also made a wrapper function btgettreeheight() that calls _bt_getrootheight(). That way, if we

Re: Cutting support for OpenSSL 1.0.1 and 1.0.2 in 17~?

2024-09-10 Thread Peter Eisentraut
imum LibreSSL version, but the change is about as old as the OpenSSL change. From 91550eaac4883113b9e85361c5c049a6555cd2f3 Mon Sep 17 00:00:00 2001 From: Peter Eisentraut Date: Tue, 10 Sep 2024 09:53:32 +0200 Subject: [PATCH] Remove obsolete unconstify() This is no longer needed as of OpenSSL

Re: tiny step toward threading: reduce dependence on setlocale()

2024-09-09 Thread Peter Eisentraut
On 08.08.24 22:00, Jeff Davis wrote: On Wed, 2024-08-07 at 22:44 +0200, Peter Eisentraut wrote: But after this patch set, locale cannot be NULL anymore, so the third branch is obsolete. ... Second, there are a number of functions in like.c like the above that take separate arguments like

Re: Remove hardcoded hash opclass function signature exceptions

2024-09-09 Thread Peter Eisentraut
On 06.09.24 21:43, Tom Lane wrote: Peter Eisentraut writes: hashvalidate(), which validates the signatures of support functions for the hash AM, contains several hardcoded exceptions. ... This patch removes those exceptions by providing new support functions that have the proper declared

Re: Virtual generated columns

2024-09-08 Thread Peter Eisentraut
On 05.09.24 10:27, jian he wrote: On Wed, Sep 4, 2024 at 4:40 PM Peter Eisentraut wrote: Here is an implementation of this. It's much nicer! It also appears to fix all the additional test cases that have been presented. (I haven't integrated them into the patch set yet.) I lef

Re: Virtual generated columns

2024-09-08 Thread Peter Eisentraut
On 04.09.24 12:33, Dean Rasheed wrote: I left the 0001 patch alone for now and put the new rewriting implementation into 0002. (Unfortunately, the diff is kind of useless for visual inspection.) Let me know if this matches what you had in mind, please. Also, is this the right place in fireRIRr

Re: json_query conditional wrapper bug

2024-09-05 Thread Peter Eisentraut
On 05.09.24 17:01, Andrew Dunstan wrote: On 2024-09-04 We 4:10 PM, Andrew Dunstan wrote: On 2024-09-04 We 6:16 AM, Peter Eisentraut wrote: On 28.08.24 11:21, Peter Eisentraut wrote: These are ok: select json_query('{"a": 1, "b": 42}'::jsonb, 'lax $.

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

2024-09-05 Thread Peter Eisentraut
On 12.08.24 09:44, Peter Eisentraut wrote: On 09.08.24 06:55, Tom Lane wrote: Noah Misch writes: On Thu, Aug 08, 2024 at 08:46:35AM +0200, Peter Eisentraut wrote: I propose to fix that by making a copy of the scan keys passed by the caller and make the modifications there. No objection

Re: strange context message in spi.c?

2024-09-05 Thread Peter Eisentraut
On 03.08.24 07:43, Umar Hayat wrote: The following review has been posted through the commitfest application: make installcheck-world: tested, failed Implements feature: tested, failed Spec compliant: tested, failed Documentation:tested, failed As tree is branched ou

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

2024-09-05 Thread Peter Eisentraut
On 19.08.24 08:29, Thomas Munro wrote: Here is a slightly better version of patch 0003. I removed some unnecessary refactoring, making the patch smaller. FTR I wrote a small program[1] for CI to test the assumptions about Windows in 0001. I printed out the addresses of the objects, to confirm

Re: SQL:2011 application time

2024-09-05 Thread Peter Eisentraut
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 reverted plus the new empty range check plus various minor fixes. This looks good to me now

meson vs. llvm bitcode files

2024-09-05 Thread Peter Eisentraut
The meson build currently does not produce llvm bitcode (.bc) files. AFAIK, this is the last major regression for using meson for production builds. Is anyone working on that? I vaguely recall that some in-progress code was shared a couple of years ago, but I haven't seen anything since. It

Re: thread-safety: strerror_r()

2024-09-04 Thread Peter Eisentraut
On 02.09.24 21:56, Tom Lane wrote: Peter Eisentraut writes: I think we can apply these patches now to check this off the list of not-thread-safe functions to check. +1 for the first patch. I'm less happy with - static char errbuf[36]; + static char errbuf[128]; As a

Re: json_query conditional wrapper bug

2024-09-04 Thread Peter Eisentraut
On 28.08.24 11:21, Peter Eisentraut wrote: These are ok: select json_query('{"a": 1, "b": 42}'::jsonb, 'lax $.b' without wrapper);  json_query  42 select json_query('{"a": 1, "b": 42}'::jsonb, 'lax $.b

Re: [PoC] Federated Authn/z with OAUTHBEARER

2024-09-04 Thread Peter Eisentraut
On 03.09.24 22:56, Jacob Champion wrote: The parse_strval field could use a better explanation. I actually don't understand the need for this field. AFAICT, this is just used to record whether strval is valid. No, it's meant to track the value of the need_escapes argument to the constructor. I

Re: list of acknowledgments for PG17

2024-09-04 Thread Peter Eisentraut
On 03.09.24 19:59, Matthias van de Meent wrote: I've done a small check of the list (search for first names in the document), and found the following curiosities: I see various cases where what seem to be names with Chinese origin are styled differently between this list and the feature list.

Re: macOS prefetching support

2024-09-03 Thread Peter Eisentraut
On 03.09.24 03:47, Thomas Munro wrote: On Mon, Aug 19, 2024 at 1:35 AM Peter Eisentraut wrote: On 17.08.24 00:01, Thomas Munro wrote: I think that's fine. I don't really like the word "prefetch", could mean many different things. What about "requires OS support for

Re: Index AM API cleanup

2024-09-03 Thread Peter Eisentraut
m 739bb4f6e84b937a35b1c76d7c90df5c90ac3cbd Mon Sep 17 00:00:00 2001 From: Peter Eisentraut Date: Tue, 3 Sep 2024 17:17:33 +0200 Subject: [PATCH v17.1] Add amgettreeheight index AM API routine The only current implementation is for btree where it calls _bt_getrootheight(). Other index types

Re: altering a column's collation leaves an invalid foreign key

2024-09-03 Thread Peter Eisentraut
On 07.06.24 08:39, jian he wrote: On Sat, Apr 13, 2024 at 9:13 PM jian he wrote: Here is a patch implementing this. It was a bit more fuss than I expected, so maybe someone has a better way. I think I found a simple way. the logic is: * ATExecAlterColumnType changes one column once at a ti

Re: Add const qualifiers to XLogRegister*() functions

2024-09-02 Thread Peter Eisentraut
On 28.08.24 12:04, Aleksander Alekseev wrote: Hi, On 04.10.23 16:37, Peter Eisentraut wrote: On 03.10.23 13:28, Aleksander Alekseev wrote: While examining the code for similar places I noticed that the following functions can also be const'ified: - XLogRegisterData (?) I don&#x

thread-safety: strerror_r()

2024-09-02 Thread Peter Eisentraut
patches now to check this off the list of not-thread-safe functions to check.From c2ce542d61d5e86ab138b72e2e0d74fdac589f04 Mon Sep 17 00:00:00 2001 From: Peter Eisentraut Date: Mon, 2 Sep 2024 11:02:22 +0200 Subject: [PATCH 1/2] Remove a couple of strerror() calls Change to using %m in the error

Re: thread-safety: getpwuid_r()

2024-09-02 Thread Peter Eisentraut
On 26.08.24 19:54, Heikki Linnakangas wrote: On 26/08/2024 20:38, Peter Eisentraut wrote: On 24.08.24 15:55, Heikki Linnakangas wrote: Come to think of it, the pg_get_user_name() function is just a thin wrapper around getpwuid_r(). It doesn't provide a lot of value. Perhaps we should r

Re: [PoC] Federated Authn/z with OAUTHBEARER

2024-08-30 Thread Peter Eisentraut
On 28.08.24 18:31, Jacob Champion wrote: On Mon, Aug 26, 2024 at 4:23 PM Jacob Champion wrote: I was having trouble reasoning about the palloc-that-isn't-palloc code during the first few drafts, so I will try a round with the jsonapi_ prefix. v27 takes a stab at that. I have kept the ALLOC/FR

Re: consider -Wmissing-variable-declarations

2024-08-30 Thread Peter Eisentraut
On 28.08.24 05:31, Thomas Munro wrote: On Wed, Jun 19, 2024 at 3:02 AM Andres Freund wrote: -const char *EAN13_range[][2] = { +static const char *EAN13_range[][2] = { {"000", "019"}, /* GS1 US */ {"020", "029"}, /* Restricted distrib

Re: list of acknowledgments for PG17

2024-08-29 Thread Peter Eisentraut
On 27.08.24 11:26, Etsuro Fujita wrote: On Sat, Aug 24, 2024 at 11:27 PM Peter Eisentraut wrote: As usual, please check for problems such as wrong sorting, duplicate names in different variants, or names in the wrong order etc. I think Japanese names are in the right order except “Sutou

Re: Disallow USING clause when altering type of generated column

2024-08-29 Thread Peter Eisentraut
On 22.08.24 10:49, Peter Eisentraut wrote: On 22.08.24 09:59, Yugo NAGATA wrote: Although ERRCODE_INVALID_TABLE_DEFINITION is used for en error on changing type of inherited column, I guess that is because it prevents from breaking consistency between inherited and inheriting tables as a

Re: macOS prefetching support

2024-08-28 Thread Peter Eisentraut
On 29.08.24 03:22, Thomas Munro wrote: Oh, I missed something: I think we're missing FileAcces(), in case the vfd has to be re-opened, no? Fixed, thanks.

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

2024-08-28 Thread Peter Eisentraut
On 16.08.24 02:48, Thomas Munro wrote: 2. A similar argument applies to Windows canonicalisation. CREATE COLLATION isn't doing it. CREATE DATABASE is, but again, what is the point? See previous. I don't really know about Windows locales. But we are doing canonicalization of ICU locale nam

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

2024-08-28 Thread Peter Eisentraut
On 11.08.24 00:11, Thomas Munro wrote: v4 adds error handling, in case newlocale("C") fails. I created CF entry #5166 for this. I took a look at this. It was quite a complicated discussion that led to this, but I agree with the solution that was arrived at. I suggest that the simplificatio

json_query conditional wrapper bug

2024-08-28 Thread Peter Eisentraut
These are ok: select json_query('{"a": 1, "b": 42}'::jsonb, 'lax $.b' without wrapper); json_query 42 select json_query('{"a": 1, "b": 42}'::jsonb, 'lax $.b' with unconditional wrapper); json_query [42] But this appears to be wrong: select json_query('{"a": 1, "

Re: [PATCH] Support systemd readiness notifications on reload

2024-08-28 Thread Peter Eisentraut
On 26.08.24 18:03, mr.trub...@icloud.com wrote: This is my first time contribution to the PostgreSQL, so I’m not really familiar with the whole process. The attached patch adds basic support for Type=notify-reload systemd services, that is, sends readiness notifications on service reload. This al

Re: Detailed release notes

2024-08-28 Thread Peter Eisentraut
On 22.08.24 19:27, Tom Lane wrote: Marcos Pegoraro writes: Well, a process which does this automatically would be cool, but a modified version of release notes for version 17 was done manually and seems fine. So, why not commit this version and later for version 18 then create this process ?

Add const qualifiers to XLogRegister*() functions

2024-08-28 Thread Peter Eisentraut
On 04.10.23 16:37, Peter Eisentraut wrote: On 03.10.23 13:28, Aleksander Alekseev wrote: While examining the code for similar places I noticed that the following functions can also be const'ified: - XLogRegisterData (?) I don't think this would work, at least without further work

Re: macOS prefetching support

2024-08-27 Thread Peter Eisentraut
On 26.08.24 07:54, Thomas Munro wrote: On Sat, Aug 24, 2024 at 12:28 AM Peter Eisentraut wrote: In terms of $subject, this patch seems sufficient for now. WFM. I noticed you don't have an EINTR retry loop, but the man page doesn't say you need one, so overall this

Re: Enable data checksums by default

2024-08-27 Thread Peter Eisentraut
On 27.08.24 15:44, Greg Sabino Mullane wrote: On Mon, Aug 26, 2024 at 3:46 PM Nathan Bossart > wrote: Should we error if both --data-checksum and --no-data-checksums are specified?  IIUC with 0001, we'll use whichever is specified last. Hmmm, that is a

Re: Convert sepgsql tests to TAP

2024-08-27 Thread Peter Eisentraut
was. It lists several steps in the test procedure that I didn't need to do. Someone who knows more about the whole picture would need to look at that in more detail. From 2fe3e9020fe11ed5e86432d98f1c7283668654e4 Mon Sep 17 00:00:00 2001 From: Peter Eisentraut Date: Tue, 27 Aug 2024 09:48:47 +02

Re: thread-safety: getpwuid_r()

2024-08-26 Thread Peter Eisentraut
hardcoding that. This should be no worse than what the code is currently handling. From 36a1e9a3860edfa8fedbeb8abfd2b0f0db2a0676 Mon Sep 17 00:00:00 2001 From: Peter Eisentraut Date: Mon, 26 Aug 2024 19:28:08 +0200 Subject: [PATCH v2] More use of getpwuid_r() directly Remove src/port/user.c, call

Re: Redundant Result node

2024-08-26 Thread Peter Eisentraut
On 23.08.24 10:27, Richard Guo wrote: On Fri, Aug 23, 2024 at 11:56 AM Tom Lane wrote: Richard Guo writes: I agree that it’s always desirable to postpone work from path-creation time to plan-creation time. In this case, however, it’s a little different. The projection step could actually be

Re: Index AM API cleanup

2024-08-26 Thread Peter Eisentraut
On 21.08.24 21:25, Mark Dilger wrote: The next twenty patches are a mix of fixes of various layering violations, such as not allowing non-core index AMs from use in replica identity full, or for speculative insertion, or for foreign key constraints, or as part of merge join; with updates to the "

Re: [PoC] Federated Authn/z with OAUTHBEARER

2024-08-26 Thread Peter Eisentraut
On 13.08.24 23:11, Jacob Champion wrote: On Sun, Aug 11, 2024 at 11:37 PM Peter Eisentraut wrote: I have committed 0002 now. Thanks Peter! Rebased over both in v26. I have looked again at the jsonapi memory management patch (v26-0001). As previously mentioned, I think adding a third or

pg_upgrade: Support for upgrading to checksums enabled

2024-08-25 Thread Peter Eisentraut
Sep 17 00:00:00 2001 From: Peter Eisentraut Date: Thu, 22 Aug 2024 07:56:04 +0200 Subject: [PATCH v1] pg_upgrade: Support for upgrading to checksums enabled When upgrading between instances with different checksum settings, the --copy (default) mode automatically sets (or unsets) the checksum on the

Support POSITION with nondeterministic collations

2024-08-25 Thread Peter Eisentraut
00:00 2001 From: Peter Eisentraut Date: Mon, 26 Aug 2024 08:02:54 +0200 Subject: [PATCH v1] Support POSITION with nondeterministic collations This allows using text position search functions with nondeterministic collations. These functions are - position, strpos - replace - split_part - strin

list of acknowledgments for PG17

2024-08-24 Thread Peter Eisentraut
The list of acknowledgments for the PG17 release notes has been committed. You can see it here: https://git.postgresql.org/gitweb/?p=postgresql.git;a=blob;f=doc/src/sgml/release-17.sgml;h=08a479807ca2933668dede22e4e6f464b937ee45;hb=refs/heads/REL_17_STABLE#l3229 As usual, please check for prob

Re: Official devcontainer config

2024-08-24 Thread Peter Eisentraut
On 24.08.24 14:49, Junwang Zhao wrote: What I haven't addressed is that the repo still uses specific local paths, I think this is ok since the code is not going into the core. I'm not among the target users of this, but I imagine that that would significantly reduce the utility of this for eve

thread-safety: getpwuid_r()

2024-08-24 Thread Peter Eisentraut
backend use, so it's also nicer to use the same function for consistency. From 090c800afd6271885d345f72bbd1d3b535dd6886 Mon Sep 17 00:00:00 2001 From: Peter Eisentraut Date: Sat, 24 Aug 2024 10:35:56 +0200 Subject: [PATCH] thread-safety: getpwuid_r() There was one getpwuid() call in the ba

Re: Enable data checksums by default

2024-08-23 Thread Peter Eisentraut
On 08.08.24 19:19, Greg Sabino Mullane wrote: Thank you for the feedback. Please find attached three separate patches. One to add a new flag to initdb (--no-data-checksums), one to adjust the tests to use this flag as needed, and the final to make the actual switch of the default value (along w

Re: replace magic num in struct cachedesc with CATCACHE_MAXKEYS

2024-08-23 Thread Peter Eisentraut
On 15.08.24 12:25, Junwang Zhao wrote: I noticed that there is a magic number which can be replaced by CATCACHE_MAXKEYS in struct cachedesc, I checked some other struct like CatCache, CatCTup, they all use CATCACHE_MAXKEYS. The "syscache" is the only user of the "catcache" right now. But I th

Re: gamma() and lgamma() functions

2024-08-23 Thread Peter Eisentraut
On 01.07.24 12:33, Dean Rasheed wrote: Attached is a patch adding support for the gamma and log-gamma functions. See, for example: https://en.wikipedia.org/wiki/Gamma_function I think these are very useful general-purpose mathematical functions. They're part of C99, and they're commonly include

Re: macOS prefetching support

2024-08-23 Thread Peter Eisentraut
On 18.08.24 15:35, Peter Eisentraut wrote: On 17.08.24 00:01, Thomas Munro wrote: Hmm.  fd.h and fd.c test for F_NOCACHE, which is pretty closely related.  Now I'm wondering why we actually need this in pg_config_manual.h at all.  Who would turn it off at compile time, and why would they n

Re: pg_combinebackup --clone doesn't work

2024-08-23 Thread Peter Eisentraut
On 30.06.24 20:58, Tomas Vondra wrote: I've pushed the first three patches, fixing the headers, adding the --copy option and PG_TEST_PG_COMBINEBACKUP_MODE variable. I haven't pushed the CI changes, I'm not sure if there's a clear consensus on which combination to test. It's something we can twea

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

2024-08-22 Thread Peter Eisentraut
On 19.08.24 11:43, Peter Eisentraut wrote: On 16.08.24 23:01, Thomas Munro wrote: On Sat, Aug 17, 2024 at 3:43 AM Peter Eisentraut  wrote: I moved the _POSIX_C_SOURCE definition for MinGW from the header file to a command-line option (-D_POSIX_C_SOURCE).  This matches the treatment of

Re: Redundant Result node

2024-08-22 Thread Peter Eisentraut
On 22.08.24 09:34, Richard Guo wrote: I looked into this a little bit and found that in function create_ordered_paths, we decide whether a projection step is needed based on a simple pointer comparison between sorted_path->pathtarget and final_target. /* Add projection step if needed */

Re: Disallow USING clause when altering type of generated column

2024-08-22 Thread Peter Eisentraut
On 22.08.24 09:59, Yugo NAGATA wrote: Although ERRCODE_INVALID_TABLE_DEFINITION is used for en error on changing type of inherited column, I guess that is because it prevents from breaking consistency between inherited and inheriting tables as a result of the command. In this sense, maybe, ERRCO

Re: Disallow USING clause when altering type of generated column

2024-08-22 Thread Peter Eisentraut
On 22.08.24 08:15, Yugo Nagata wrote: On Thu, 22 Aug 2024 11:38:49 +0800 jian he wrote: On Wed, Aug 21, 2024 at 4:57 PM Peter Eisentraut wrote: + /* + * Cannot specify USING when altering type of a generated column, because + * that would violate the generation expression. + */ + if

Re: Enable data checksums by default

2024-08-21 Thread Peter Eisentraut
On 15.08.24 08:38, Peter Eisentraut wrote: On 08.08.24 19:42, Robert Haas wrote: I'm thinking pg_upgrade could have a mode where it adds the checksum during the upgrade as it copies the files (essentially a subset of pg_checksums).  I think that would be useful for that middle tier of user

Re: [PATCH] Add get_bytes() and set_bytes() functions

2024-08-21 Thread Peter Eisentraut
On 19.08.24 16:10, Aleksander Alekseev wrote: To clarify, supporting bytea<->integer (and/or bytea<->numeric) casts doesn't strike me as a terrible idea but it doesn't address the issue I'm proposing to solve. What is the issue you are proposing to solve? You linked to a couple of threads and

Re: Requiring LLVM 14+ in PostgreSQL 18

2024-08-21 Thread Peter Eisentraut
On 17.05.24 00:54, Thomas Munro wrote: On Fri, May 17, 2024 at 3:17 AM Nazir Bilal Yavuz wrote: Actually, 32 bit builds are working but the Perl version needs to be updated to 'perl5.36-i386-linux-gnu' in .cirrus.tasks.yml. I changed 0001 with the working version of 32 bit builds [1] and the re

Re: Cirrus CI for macOS branches 16 and 15 broken

2024-08-21 Thread Peter Eisentraut
On 21.08.24 11:28, Thomas Munro wrote: On Wed, Aug 21, 2024 at 9:04 PM Peter Eisentraut wrote: REL_15_STABLE is fixed now. REL_16_STABLE now fails with another thing: ... line 6: meson: command not found Huh. I don't see that in my own account. And postgres/postgres is currently o

Re: Requiring LLVM 14+ in PostgreSQL 18

2024-08-21 Thread Peter Eisentraut
On 19.05.24 00:46, Ole Peder Brandtzæg wrote: On Wed, May 15, 2024 at 07:20:09AM +0200, Peter Eisentraut wrote: Yes, let's get that v3-0001 patch into PG17. Upon seeing this get committed in 4dd29b6833, I noticed that the docs still advertise the llvm-config-$version search dance. T

Re: Cutting support for OpenSSL 1.0.1 and 1.0.2 in 17~?

2024-08-21 Thread Peter Eisentraut
On 07.08.24 15:49, Daniel Gustafsson wrote: On 5 Aug 2024, at 15:36, Joe Conway wrote: It would not shock me to see complaints from others after we rip out support for 1.0.2, but maybe not ¯\_(ツ)_/¯ I think it's highly likely that we will see complaints for any support we deprecate. OpenS

Re: Cirrus CI for macOS branches 16 and 15 broken

2024-08-21 Thread Peter Eisentraut
On 19.08.24 01:44, Thomas Munro wrote: On Mon, Aug 19, 2024 at 10:55 AM Tom Lane wrote: Thomas Munro writes: I still don't know what's happening. In case it helps someone else see it, the error comes from "sudo port unsetrequested installed". But in any case, switching to 2.10.1 seems to do

Re: Disallow USING clause when altering type of generated column

2024-08-21 Thread Peter Eisentraut
On 21.08.24 09:14, Yugo Nagata wrote: On Wed, 21 Aug 2024 08:17:45 +0200 Peter Eisentraut wrote: A USING clause when altering the type of a generated column does not make sense. It would write the output of the USING clause into the converted column, which would violate the generation

Re: Virtual generated columns

2024-08-21 Thread Peter Eisentraut
On 08.08.24 20:22, Dean Rasheed wrote: Looking at the rewriter changes, it occurred to me that it could perhaps be done more simply using ReplaceVarsFromTargetList() for each RTE with virtual generated columns. That function already has the required wholerow handling code, so there'd be less code

Disallow USING clause when altering type of generated column

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

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

2024-08-19 Thread Peter Eisentraut
On 16.08.24 23:01, Thomas Munro wrote: On Sat, Aug 17, 2024 at 3:43 AM Peter Eisentraut wrote: I moved the _POSIX_C_SOURCE definition for MinGW from the header file to a command-line option (-D_POSIX_C_SOURCE). This matches the treatment of _GNU_SOURCE and similar. I was trying to figure out

Re: Apply PGDLLIMPORT markings to some GUC variables

2024-08-19 Thread Peter Eisentraut
On 19.08.24 08:18, Michael Paquier wrote: On Tue, Aug 13, 2024 at 03:00:00PM -0400, Robert Haas wrote: This seems correct to me. It is not the first time that this happens in recent history. Would it be worth automating that? I would guess a TAP test that takes a copy of the headers, applies

Cirrus CI for macOS branches 16 and 15 broken

2024-08-18 Thread Peter Eisentraut
The Cirrus CI for REL_16_STABLE and REL_15_STABLE for macOS is apparently broken right now. Here is a log example: [13:57:11.305] sh src/tools/ci/ci_macports_packages.sh \ [13:57:11.305] ccache \ [13:57:11.305] icu \ [13:57:11.305] kerberos5 \ [13:57:11.305] lz4 \ [13:57:11.305] meson

Re: macOS prefetching support

2024-08-18 Thread Peter Eisentraut
On 17.08.24 00:01, Thomas Munro wrote: On Sat, Aug 17, 2024 at 6:58 AM Peter Eisentraut wrote: What to do about the order of the symbols and include files. I threw something into src/include/port/darwin.h, but I'm not sure if that's good. Alternatively, we could not use __da

Re: macOS prefetching support

2024-08-16 Thread Peter Eisentraut
On 14.08.24 16:39, Peter Eisentraut wrote: On 14.08.24 14:36, Thomas Munro wrote: On Wed, Aug 14, 2024 at 7:04 PM Peter Eisentraut wrote: Attached is a patch to implement this.  It seems to work, but of course it's kind of hard to tell whether it actually does anything useful. Header

  1   2   3   4   5   6   7   8   9   10   >