Re: bug: virtual generated column can be partition key

2025-04-22 Thread Ashutosh Bapat
Sorry I missed this email while sending the patches - our emails crossed in the air. On Tue, Apr 22, 2025 at 2:15 PM jian he wrote: > On Tue, Apr 22, 2025 at 3:02 PM jian he > wrote: > > Other than that, it looks good to me for fixing this bug. > > The error message seems not that intuitive. >

amcheck support for BRIN indexes

2025-04-22 Thread Arseniy Mukhin
Hi, It's not for v18, just wanted to share with the community and register it in the upcoming Commitfest 2025-07. Here is the patch with amcheck support for BRIN indexes. Patch uses amcheck common infrastructure that was introduced in [1]. It works and I deleted all the code that I copied from b

Re: Check for tuplestorestate nullness before dereferencing

2025-04-22 Thread Nikolay Shaplov
В письме от пятница, 18 октября 2024 г. 02:28:22 MSK пользователь David Rowley написал: > It would be good to know if the optimisation added in d2c555ee5 ever > applies with today's code. If it does apply, we should likely add a > test case for it and if it never does, then we should just remove

Re: [PATCH] Check for TupleTableSlot nullness before dereferencing

2025-04-22 Thread Nikolay Shaplov
В письме от пятница, 13 декабря 2024 г. 11:54:35 MSK пользователь Alexander Kuznetsov написал: > Hello, > > ping. What do you think about reasoning below? Maybe we should consider > proposing different patch for removing redundant check there? Hi! Please, pay attention that commitfest entry for

Re: jsonapi: scary new warnings with LTO enabled

2025-04-22 Thread Daniel Gustafsson
> On 21 Apr 2025, at 20:58, Jacob Champion > wrote: > Personally, I'm fine with can't-fail APIs, as long as they're > documented as such. (I think the deferred error API was probably > chosen so that src/common JSON clients could be written without a lot > of pain?) My preference is that no ope

Re: pgsql: Add function to get memory context stats for processes

2025-04-22 Thread Daniel Gustafsson
> On 17 Apr 2025, at 16:42, Robert Haas wrote: > > On Tue, Apr 15, 2025 at 6:11 AM Andres Freund wrote: >> There very well could be a CFI - but it better be somewhere where the >> in-memory state is consistent. Otherwise an error inside raised in the CFI >> would lead the in-memory state inconsi

disallow alter individual column if partition key contains wholerow reference

2025-04-22 Thread jian he
hi. while reviewing disallow generated column as partition key in [1], I found out this bug. demo: drop table if exists t4; CREATE TABLE t4(f1 int, f2 bigint) PARTITION BY list ((t4)); create table t4_1 partition of t4 for values in ((1,2)); alter table t4 alter column f2 set data type text using

Re: Large expressions in indexes can't be stored (non-TOASTable)

2025-04-22 Thread Nisha Moond
On Mon, Apr 21, 2025 at 9:26 PM Nathan Bossart wrote: > > Apparently replication origins in tests are supposed to be prefixed with > "regress_". Here is a new patch with that fixed. > Hi Nathan, Thanks for the patch! I tested it for functionality and here are a few comments: 1) While testing, I

Re: bug: virtual generated column can be partition key

2025-04-22 Thread jian he
On Tue, Apr 22, 2025 at 3:02 PM jian he wrote: > Other than that, it looks good to me for fixing this bug. The error message seems not that intuitive. +CREATE TABLE gtest_part_key (f1 date NOT NULL, f2 bigint, f3 bigint GENERATED ALWAYS AS (f2 * 2) VIRTUAL) PARTITION BY RANGE ((gtest_part_key));

Re: bug: virtual generated column can be partition key

2025-04-22 Thread Ashutosh Bapat
Thanks Jian for your review. On Tue, Apr 22, 2025 at 12:32 PM jian he wrote: > On Tue, Apr 22, 2025 at 11:45 AM Ashutosh Bapat > wrote: > > > > I have included your original tests, but ended up rewriting code. Please > let me know what do you think. > > > > + if (attno < 0) > + ereport(ERROR, >

Re: Fix slot synchronization with two_phase decoding enabled

2025-04-22 Thread shveta malik
On Fri, Apr 11, 2025 at 1:03 PM Nisha Moond wrote: > > > Patch "v5_aprch_3-0001" implements the above Approach 3. > > Thanks Hou-san for implementing approach-2 and providing the patch. > I find Approach 2 better than Approach1. Yet to review Approach3. Please find my initial comments: Approach

Re: Fix slot synchronization with two_phase decoding enabled

2025-04-22 Thread Amit Kapila
On Mon, Apr 21, 2025 at 8:44 AM Zhijie Hou (Fujitsu) wrote: > > On Sat, Apr 19, 2025 at 2:19 AM Masahiko Sawada wrote: > > > > On Tue, Apr 8, 2025 at 10:14 PM Zhijie Hou (Fujitsu) > > wrote: > > > > > > > > > -- > > > Approach 2 > > > -- > > > > > > Instead of disallowing the use

Re: [PoC] Federated Authn/z with OAUTHBEARER

2025-04-22 Thread Daniel Gustafsson
> On 22 Apr 2025, at 01:19, Jacob Champion > wrote: > v8 also makes the following changes: Thanks for this version, a few small comments: + if oauth_flow_supported +cdata.set('USE_LIBCURL', 1) + elif libcurlopt.enabled() +error('client OAuth is not supported on this platform') + end

Re: bug: virtual generated column can be partition key

2025-04-22 Thread jian he
On Tue, Apr 22, 2025 at 11:45 AM Ashutosh Bapat wrote: > > I have included your original tests, but ended up rewriting code. Please let > me know what do you think. > + if (attno < 0) + ereport(ERROR, + (errcode(ERRCODE_INVALID_OBJECT_DEFINITION), + errmsg("partition key expressions cannot conta

Fix premature xmin advancement during fast forward decoding

2025-04-22 Thread Zhijie Hou (Fujitsu)
Hi, When analyzing some issues in another thread[1], I found a bug that fast forward decoding could lead to premature advancement of catalog_xmin, resulting in required catalog data being removed by vacuum. The issue arises because we do not build a base snapshot when decoding changes during fast

Re: [BUG] temporary file usage report with extended protocol and unnamed portals

2025-04-22 Thread Frédéric Yhuel
On 4/21/25 07:46, Frédéric Yhuel wrote: On 4/20/25 00:42, Sami Imseih wrote: (In my testing, the "temporary file:" message comes out without any attached STATEMENT most of the time already, so this isn't losing much as far as that's concerned.) Indeed, this happens when using autocommit /

Re: Proposal: Filter irrelevant change before reassemble transactions during logical decoding

2025-04-22 Thread Peter Smith
Hi Ajin, Some review comments for patch v17-0001 == Commit message 1. Additionally, transactions containing WAL records (INTERNAL_SNAPSHOT, COMMAND_ID, or INVALIDATION) that modify the historical snapshot constructed during logical decoding are deemed unfilterable. This is necessary because

Re: Proposal: Adding compression of temporary files

2025-04-22 Thread Filip Janus
Since the patch was prepared months ago, it needs to be rebased. -Filip- ne 13. 4. 2025 v 21:53 odesílatel Dmitry Dolgov <9erthali...@gmail.com> napsal: > > On Fri, Mar 28, 2025 at 09:23:13AM GMT, Filip Janus wrote: > > > +else > > > +if (nbytesOriginal - file->pos != 0) > > > +

Allow to collect statistics on virtual generated columns

2025-04-22 Thread Yugo Nagata
Hi hackers, Hi hackers, Now we can create a table with a virtual generated column, but when a condition in WHERE clause contains virtual generated column, estimated rows are not correct since no statistics on this is collectef. [Ex.1] test=# CREATE TABLE t (i int, v int GENERATED ALWAYS AS (i+

Re: What's our minimum supported Python version?

2025-04-22 Thread Daniel Gustafsson
> On 19 Apr 2025, at 18:17, Tom Lane wrote: > The reason I bring this up is that I found out the hard way > that src/test/modules/oauth_validator fails on RHEL8, because > its oauth_server.py script is not compatible with the 3.6.8 > version of Python supplied by this distro. Do you have the err

Re: Cygwin support

2025-04-22 Thread Aleksander Alekseev
Hi Andrew, > Last year the old Windows machine where I was running the buildfarm > member lorikeet died, and since then we've had no buildfarm coverage for > Cygwin. I now have a new (but slow) W11pro machine and I have been > testing out Cygwin builds on it. I wanted to have it running the TAP >

Re: Adding pg_dump flag for parallel export to pipes

2025-04-22 Thread Hannu Krosing
If there are no objections we will add this to the commitfest On Mon, Apr 7, 2025 at 9:48 PM Hannu Krosing wrote: > > > Just to bring this out separately : Does anybody have any idea why pipe > commands close inside tests ? > > Re: 003-pg_dump_basic_tests has a few basic validation tests for > c

Re: Cygwin support

2025-04-22 Thread Tom Lane
Andrew Dunstan writes: > I agree that I would not normally use Cygwin to run a Postgres instance. > But its psql is nicer than others on Windows because unlike the native > builds we build it with readline. That's why I've kept a buildfarm > animal going all these years. If the maintenance burd

Re: Add Pipelining support in psql

2025-04-22 Thread Anthonin Bonnefoy
On Tue, Apr 22, 2025 at 2:06 AM Michael Paquier wrote: > I am wondering if we could not be smarter with the handling of > the counters, but I really doubt that there is much more we can do > under a PGRES_FATAL_ERROR. One thing that bothers me is that the reported error is silently discarded with

Re: Cygwin support

2025-04-22 Thread Andrew Dunstan
On 2025-04-22 Tu 8:10 AM, Aleksander Alekseev wrote: Hi Andrew, Last year the old Windows machine where I was running the buildfarm member lorikeet died, and since then we've had no buildfarm coverage for Cygwin. I now have a new (but slow) W11pro machine and I have been testing out Cygwin bu

Re: Fortify float4 and float8 regression tests by ordering test results

2025-04-22 Thread Tom Lane
Pavel Borisov writes: > It's not a big problem, but propose a simple fix for the tests. It > just adds ORDER BY 1 to all relevant float4 and floa8 queries. You do realize that this problem is hardly confined to the float4 and float8 tests? To a first approximation, a table AM that fails to prese

Re: Check for tuplestorestate nullness before dereferencing

2025-04-22 Thread Nikolay Shaplov
В письме от вторник, 22 апреля 2025 г. 18:50:49 MSK пользователь Tom Lane написал: > The reason that the subsequent bit of code is safe is that !forward > should not possibly be true unless EXEC_FLAG_BACKWARD was given, > which'd cause us to create a tuplestore. So if we were going > to change a

Re: Cygwin support

2025-04-22 Thread Andrew Dunstan
On 2025-04-22 Tu 10:26 AM, Tom Lane wrote: Andrew Dunstan writes: I agree that I would not normally use Cygwin to run a Postgres instance. But its psql is nicer than others on Windows because unlike the native builds we build it with readline. That's why I've kept a buildfarm animal going all

Re: Fortify float4 and float8 regression tests by ordering test results

2025-04-22 Thread Pavel Borisov
On Tue, 22 Apr 2025 at 18:40, Pavel Borisov wrote: > > Hi, Tom! > > On Tue, 22 Apr 2025 at 18:23, Tom Lane wrote: > > > > Pavel Borisov writes: > > > It's not a big problem, but propose a simple fix for the tests. It > > > just adds ORDER BY 1 to all relevant float4 and floa8 queries. > > > > Yo

Re: What's our minimum supported Python version?

2025-04-22 Thread Tom Lane
Daniel Gustafsson writes: >> On 19 Apr 2025, at 18:17, Tom Lane wrote: >> The reason I bring this up is that I found out the hard way >> that src/test/modules/oauth_validator fails on RHEL8, because >> its oauth_server.py script is not compatible with the 3.6.8 >> version of Python supplied by th

Re: [BUG] temporary file usage report with extended protocol and unnamed portals

2025-04-22 Thread Sami Imseih
> In any case, my v3 patch seems to fix all these cases. > > (I'm not saying it's good enough to be committed as is. I think I should > at least add some comments. Anything else?) the patch relies on looking up queryDesc->sourceText inside DropPortal, which Tom raised concerns about earlier in the

Re: Fortify float4 and float8 regression tests by ordering test results

2025-04-22 Thread Aleksander Alekseev
Hi Pavel, > It's not a big problem, but propose a simple fix for the tests. It > just adds ORDER BY 1 to all relevant float4 and floa8 queries. Thanks for the patch. That's a good change IMO. > I don't > have a strong opinion about backpatching this, but as the patch > changes only regression te

Re: [PATCH] contrib/xml2: xslt_process() should report XSLT-related error details

2025-04-22 Thread Robin Haberkorn
I forgot the patch of course... -- Robin Haberkorn Senior Software Engineer B1 Systems GmbH Osterfeldstraße 7 / 85088 Vohburg / https://www.b1-systems.de GF: Ralph Dehner / Unternehmenssitz: Vohburg / AG: Ingolstadt, HRB 3537 From cc5be302aa4305403b8131f6c22c39e4dfb75bd1 Mon Sep 17 00:00:00 2001

Re: Large expressions in indexes can't be stored (non-TOASTable)

2025-04-22 Thread Nathan Bossart
On Tue, Apr 22, 2025 at 05:17:17PM +0530, Nisha Moond wrote: > Thanks for the patch! I tested it for functionality and here are a few > comments: Thank you for reviewing. > 1) While testing, I noticed an unexpected behavior with the new 512 > byte length restriction in place. Since there´s no ex

Re: long-standing data loss bug in initial sync of logical replication

2025-04-22 Thread Masahiko Sawada
On Tue, Mar 18, 2025 at 2:55 AM Amit Kapila wrote: > > On Mon, Mar 17, 2025 at 4:56 PM Hayato Kuroda (Fujitsu) > wrote: > > > > > Regarding the PG13, it cannot be > > > applied > > > as-is thus some adjustments are needed. I will share it in upcoming posts. > > > > Here is a patch set for PG13. A

Re: Fortify float4 and float8 regression tests by ordering test results

2025-04-22 Thread Pavel Borisov
Hi, Tom! On Tue, 22 Apr 2025 at 21:13, Tom Lane wrote: > > Pavel Borisov writes: > > On Tue, 22 Apr 2025 at 20:22, Alexander Korotkov > > wrote: > >> On Tue, Apr 22, 2025 at 7:20 PM Tom Lane wrote: > >>> Alexander Korotkov writes: > I'd like to add that float4.out not only assumes that

Re: What's our minimum supported Python version?

2025-04-22 Thread Tom Lane
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 for it. I'm also not excited by

Re: Fortify float4 and float8 regression tests by ordering test results

2025-04-22 Thread Alexander Korotkov
On Tue, Apr 22, 2025 at 5:57 PM Pavel Borisov wrote: > On Tue, 22 Apr 2025 at 18:40, Pavel Borisov wrote: > > On Tue, 22 Apr 2025 at 18:23, Tom Lane wrote: > > > > > > Pavel Borisov writes: > > > > It's not a big problem, but propose a simple fix for the tests. It > > > > just adds ORDER BY 1 t

Re: What's our minimum supported Python version?

2025-04-22 Thread Tom Lane
Jacob Champion writes: > On Tue, Apr 22, 2025 at 9:04 AM Tom Lane wrote: >> But RHEL8 is widespread >> enough that I think we need to keep making the effort for 3.6.8. > Even if we can get side-by-side versions working? That would be off-loading our problem onto the users (and the buildfarm own

Re: Fortify float4 and float8 regression tests by ordering test results

2025-04-22 Thread Pavel Borisov
Hi! On Tue, 22 Apr 2025 at 20:22, Alexander Korotkov wrote: > > On Tue, Apr 22, 2025 at 7:20 PM Tom Lane wrote: > > Alexander Korotkov writes: > > > I'd like to add that float4.out not only assumes that insert-ordering is > > > preserved (this could be more-or-less portable between table AMs).

Fortify float4 and float8 regression tests by ordering test results

2025-04-22 Thread Pavel Borisov
Hi, hackers! I noticed that SELECT results in float4 and float8 tests lack ORDER BY clauses. This makes test results depend on the current heap/MVCC implementation. If I try to run the float8 test on a table created with a different access method provided by an extension, I'm getting results orde

Re: Fortify float4 and float8 regression tests by ordering test results

2025-04-22 Thread Pavel Borisov
Hi, Tom! On Tue, 22 Apr 2025 at 18:23, Tom Lane wrote: > > Pavel Borisov writes: > > It's not a big problem, but propose a simple fix for the tests. It > > just adds ORDER BY 1 to all relevant float4 and floa8 queries. > > You do realize that this problem is hardly confined to the > float4 and f

Re: [PATCH] contrib/xml2: xslt_process() should report XSLT-related error details

2025-04-22 Thread Tom Lane
"Robin Haberkorn" writes: > I forgot the patch of course... Hi Robin, thank you for the patch! This has arrived too late to be considered for PG v18, but please add the thread to the open commitfest https://commitfest.postgresql.org/53/ so that we don't forget about it for v19, and so that it

Re: What's our minimum supported Python version?

2025-04-22 Thread Jacob Champion
On Tue, Apr 22, 2025 at 8:05 AM Tom Lane wrote: > The first problem is that this Python version seems not to > like assignments embedded in if statements: [...] > > I was able to work around that with the attached quick hack. > But then I get [...] Thanks, I'll put a patch together. Sorry -- IIRC

Re: Fortify float4 and float8 regression tests by ordering test results

2025-04-22 Thread Alexander Korotkov
On Tue, Apr 22, 2025 at 7:20 PM Tom Lane wrote: > Alexander Korotkov writes: > > I'd like to add that float4.out not only assumes that insert-ordering is > > preserved (this could be more-or-less portable between table AMs). It also > > assumes the way UPDATE moves updated rows. That seems quit

Re: ZStandard (with dictionaries) compression support for TOAST compression

2025-04-22 Thread Andres Freund
Hi, On 2025-04-18 12:22:18 -0400, Robert Haas wrote: > On Tue, Apr 15, 2025 at 2:13 PM Nikhil Kumar Veldanda > wrote: > > Addressing Compressed Datum Leaks problem (via CTAS, INSERT INTO ... SELECT > > ...) > > > > As compressed datums can be copied to other unrelated tables via CTAS, > > INSERT

Re: index prefetching

2025-04-22 Thread Peter Geoghegan
On Tue, Apr 22, 2025 at 6:46 AM Tomas Vondra wrote: > here's an improved (rebased + updated) version of the patch series, with > some significant fixes and changes. The patch adds infrastructure and > modifies btree indexes to do prefetching - and AFAIK it passes all tests > (no results, correct r

Re: Fortify float4 and float8 regression tests by ordering test results

2025-04-22 Thread Tom Lane
Alexander Korotkov writes: > I'd like to add that float4.out not only assumes that insert-ordering is > preserved (this could be more-or-less portable between table AMs). It also > assumes the way UPDATE moves updated rows. That seems quite > heap-specific. You can see in the following fragment

Re: What's our minimum supported Python version?

2025-04-22 Thread Jacob Champion
On Tue, Apr 22, 2025 at 9:04 AM Tom Lane wrote: > I'm also not excited by the idea that an incidental > test script gets to dictate what the cutoff is. I agree, and I don't intend for the script to dictate that. > Maybe it's sufficient to make a documentation change here, and > say we support Py

Re: High CPU consumption in cascade replication with large number of walsenders and ConditionVariable broadcast issues

2025-04-22 Thread Alexey Makhmutov
After playing with the patch a little more, we’ve come to the conclusion, that the idea to signal CV broadcast from the timer handler is a risky one, as it creates a large number of execution paths, which are not present in current code base. It's hard to prove correctness of application behavi

[PATCH] contrib/xml2: xslt_process() should report XSLT-related error details

2025-04-22 Thread Robin Haberkorn
Dear PG hackers, here is a patch that improves the xslt_process() error handling. Error handling was one of the points criticized earlier [1] and as far as I understand it is one of the reasons that xslt_process() was never adopted into core and contrib/xml2 is considered deprecated since PG 8. Ho

Re: Vacuum statistics

2025-04-22 Thread Andrei Lepikhov
On 10/28/24 14:40, Alexander Korotkov wrote: On Sun, Aug 25, 2024 at 6:59 PM Alena Rybakina If I missed something or misunderstood, can you explain in more detail? Actually, I mean why do we need a possibility to return statistics for all tables/indexes in one function call? User anyway is su

Re: Fortify float4 and float8 regression tests by ordering test results

2025-04-22 Thread Tom Lane
Pavel Borisov writes: > On Tue, 22 Apr 2025 at 21:13, Tom Lane wrote: >> BTW, you forgot to update expected/float4-misrounded-input.out. > Added in v3. Thanks for a mention! v3 LGTM, pushed. regards, tom lane

Re: Fortify float4 and float8 regression tests by ordering test results

2025-04-22 Thread Pavel Borisov
On Tue, 22 Apr 2025 at 22:25, Tom Lane wrote: > > Pavel Borisov writes: > > On Tue, 22 Apr 2025 at 21:13, Tom Lane wrote: > >> BTW, you forgot to update expected/float4-misrounded-input.out. > > > Added in v3. Thanks for a mention! > > v3 LGTM, pushed. Thank you! Regards, Pavel

Re: index prefetching

2025-04-22 Thread Tomas Vondra
On 4/22/25 18:26, Peter Geoghegan wrote: > On Tue, Apr 22, 2025 at 6:46 AM Tomas Vondra wrote: >> here's an improved (rebased + updated) version of the patch series, with >> some significant fixes and changes. The patch adds infrastructure and >> modifies btree indexes to do prefetching - and A

Re: Proposal: Filter irrelevant change before reassemble transactions during logical decoding

2025-04-22 Thread Peter Smith
Hi Ajin. Here are some v17-0003 review comments (aka some v16-0003 comments that were not yet addressed or rejected) On Fri, Apr 11, 2025 at 4:05 PM Peter Smith wrote: ... > == > Commit message > > 2. missing commit message Not yet addressed. > ~~~ > > 8. > # Insert, delete, and update tes

Re: Recent pg_rewind test failures in buildfarm

2025-04-22 Thread Michael Paquier
On Tue, Apr 22, 2025 at 06:22:51AM +, Bertrand Drouvot wrote: > Yeah, unless that might come from fc415edf8ca but I don't think that's the > case. I've been eyeing this whole area of the code for a few hours to convince myself on HEAD, and I cannot really find a defect directly related to it.

Re: Correct documentation for protocol version

2025-04-22 Thread Dave Cramer
On Fri, 11 Apr 2025 at 11:02, Jelte Fennema-Nio wrote: > On Fri, 11 Apr 2025 at 22:57, Dave Cramer wrote: > > Well this isn't quite true since if you request 3.0 and have invalid > options it will return 3.0, which is not the highest supported minor > version. > > Probably good to update this se

Re: Check for tuplestorestate nullness before dereferencing

2025-04-22 Thread Tom Lane
Nikolay Shaplov writes: > В письме от пятница, 18 октября 2024 г. 02:28:22 MSK пользователь David > Rowley > написал: >> It would be good to know if the optimisation added in d2c555ee5 ever >> applies with today's code. If it does apply, we should likely add a >> test case for it and if it neve

Re: [BUG] temporary file usage report with extended protocol and unnamed portals

2025-04-22 Thread Sami Imseih
> So, It seems to me we are better off just setting debug_query_string > to NULL in DropPortal, or alternatively why not just log the statement > automatically at the start of execution whenever we have log_temp_files > 0. > That will allow us to safely capture the statement to blame for the > temp

Re: long-standing data loss bug in initial sync of logical replication

2025-04-22 Thread Amit Kapila
On Tue, Apr 22, 2025 at 10:57 PM Masahiko Sawada wrote: > > On Tue, Mar 18, 2025 at 2:55 AM Amit Kapila wrote: > > > > On Mon, Mar 17, 2025 at 4:56 PM Hayato Kuroda (Fujitsu) > > wrote: > > > > > > > Regarding the PG13, it cannot be > > > > applied > > > > as-is thus some adjustments are needed.

Re: Fix premature xmin advancement during fast forward decoding

2025-04-22 Thread shveta malik
On Tue, Apr 22, 2025 at 12:36 PM Zhijie Hou (Fujitsu) wrote: > > Hi, > > To fix this, I think we can allow the base snapshot to be built during fast > forward decoding, as implemented in the patch 0001 (We already built base > snapshot in fast-forward mode for logical message in logicalmsg_decode(

Re: pgsql: Update guidance for running vacuumdb after pg_upgrade.

2025-04-22 Thread Nathan Bossart
On Tue, Apr 22, 2025 at 09:43:56PM +0200, Christoph Berg wrote: > Re: Nathan Bossart >> Update guidance for running vacuumdb after pg_upgrade. >> >> Now that pg_upgrade can carry over most optimizer statistics, we >> should recommend using vacuumdb's new --missing-stats-only option >> to only anal

Re: pgsql: Update guidance for running vacuumdb after pg_upgrade.

2025-04-22 Thread Christoph Berg
Re: Nathan Bossart > In any case, IMO it's unfortunate > that we might end up recommending roughly the same post-upgrade steps as > before even though the optimizer statistics are carried over. Maybe the docs (and the pg_upgrade scripts) should recommend the old procedure by default until this gap

Re: What's our minimum supported Python version?

2025-04-22 Thread Jelte Fennema-Nio
tl;dr I think requiring support of Python 3.9 for PG18 would probably be reasonable and save us a bunch of maintenance burden over the next 5 years. On Tue, 22 Apr 2025 at 21:41, Tom Lane wrote: > Yeah, that. The distros that are still shipping older Pythons > are LTS distros where part of the d

Re: [PoC] Federated Authn/z with OAUTHBEARER

2025-04-22 Thread Ivan Kush
Hi Jacob, thank you for detailed explanation and links! Am I right that classic OAuth flow "create user account based on a token" is implemented using custom validators? 1) In pg_hba.conf set user to all and  "delegate_ident_mapping=1" "local all all oauth issuer=$issuer scope=$scope delegate

Re: pgsql: Update guidance for running vacuumdb after pg_upgrade.

2025-04-22 Thread Nathan Bossart
On Tue, Apr 22, 2025 at 11:03:29PM +0200, Christoph Berg wrote: > Re: Nathan Bossart >> In any case, IMO it's unfortunate >> that we might end up recommending roughly the same post-upgrade steps as >> before even though the optimizer statistics are carried over. > > Maybe the docs (and the pg_upgr

Re: What's our minimum supported Python version?

2025-04-22 Thread Christoph Berg
Re: Jelte Fennema-Nio > - Ubuntu 20.04 can easily install Python3.9 from the official package > repos. Currently this is still supported by Cristoph his pgdg repos, > but looks like that support might be removed before PG18 given it's > transition to "Expanded Security Maintenance" next month. 20.

Re: [PATCH] contrib/xml2: xslt_process() should report XSLT-related error details

2025-04-22 Thread Robin Haberkorn
Hello Tom! On Tue Apr 22, 2025 at 18:29:02 GMT +03, Tom Lane wrote: > Hi Robin, thank you for the patch! This has arrived too late to > be considered for PG v18, but please add the thread to the open > commitfest I will do that. But what about the other changes I proposed (xml data type and hsto

Re: [PATCH] Support older Pythons in oauth_server.py

2025-04-22 Thread Renan Alves Fonseca
Jacob Champion writes: > > This is tested against Python 3.6.15 (3.6 went EOL at the end of > 2021). I'm working on getting Rocky 8 installed locally to test > against. If it's decided we want to support downwards to 3.5, I will > test there too (but I hope we don't; see parent thread). > I did

Re: [PoC] Federated Authn/z with OAUTHBEARER

2025-04-22 Thread Jacob Champion
On Tue, Apr 22, 2025 at 3:02 AM Daniel Gustafsson wrote: > + if oauth_flow_supported > +cdata.set('USE_LIBCURL', 1) > + elif libcurlopt.enabled() > +error('client OAuth is not supported on this platform') > + endif > We already know that libcurlopt.enabled() is true here so maybe just d

DOCS - create publication (tweak for generated columns)

2025-04-22 Thread Peter Smith
Hi, While re-reading documentation about logical replication of generated columns, I came across this paragraph in the CREATE PUBLICATION ... FOR TABLE description [1]. When a column list is specified, only the named columns are replicated. The column list can contain stored generated column

Re: jsonapi: scary new warnings with LTO enabled

2025-04-22 Thread Jacob Champion
On Tue, Apr 22, 2025 at 3:10 AM Daniel Gustafsson wrote: > My preference is that no operation can silently work on a failed object, but > it's not a hill (even more so given where we are in the cycle). Hm, okay. Something to talk about with Andrew and Peter, maybe. > The attached > v3 allocates

Re: pgsql: Add function to get memory context stats for processes

2025-04-22 Thread Andres Freund
Hi, On 2025-04-17 10:42:45 -0400, Robert Haas wrote: > On Tue, Apr 15, 2025 at 6:11 AM Andres Freund wrote: > > There very well could be a CFI - but it better be somewhere where the > > in-memory state is consistent. Otherwise an error inside raised in the CFI > > would lead the in-memory state i

Re: Cygwin support

2025-04-22 Thread Laurenz Albe
On Tue, 2025-04-22 at 10:26 -0400, Tom Lane wrote: > I vaguely recall some discussion about whether building with readline > has become possible under MSVC. I think it'd make a lot of people > happy if that could happen (but I hasten to add that I'm not > volunteering). https://postgr.es/m/CACLU5

Re: Fortify float4 and float8 regression tests by ordering test results

2025-04-22 Thread Tom Lane
Pavel Borisov writes: > On Tue, 22 Apr 2025 at 20:22, Alexander Korotkov wrote: >> On Tue, Apr 22, 2025 at 7:20 PM Tom Lane wrote: >>> Alexander Korotkov writes: I'd like to add that float4.out not only assumes that insert-ordering is preserved (this could be more-or-less portable bet

Re: Logical Replication of sequences

2025-04-22 Thread Peter Smith
Hi Vignesh. Review comments for patch v20250422-0001. == Commit message 1. This patch introduces a new function: pg_sequence_state function allows retrieval of sequence values including LSN. SUGGESTION This patch introduces a new function, 'pg_sequence_state', which allows retrieval of sequ

Re: What's our minimum supported Python version?

2025-04-22 Thread Renan Alves Fonseca
Tom Lane writes: > Florents Tselai writes: >> On 19 Apr 2025, at 7:17 PM, Tom Lane wrote: >>> I think we need to do some combination of moving our >>> minimum-supported-version goalposts forward, making sure that >>> whatever we claim is the minimum Python version is actually >>> being tested i

Re: [PATCH] Support older Pythons in oauth_server.py

2025-04-22 Thread Jacob Champion
On Tue, Apr 22, 2025 at 2:43 PM Renan Alves Fonseca wrote: > I did a quick test on 3.5. Thanks! > It seems to work after removing > f-strings... At this point, I would be really happy with 3.6. Ah, makes sense. Well, I'm starting with the 3.6 fix regardless, since it's preventing RHEL8 testing.

Re: What's our minimum supported Python version?

2025-04-22 Thread Tom Lane
Jelte Fennema-Nio writes: > I totally agree that "security" is not the discussion that we should > be having here. I think the Python version decision (or really any > minimum version decision) should be based on some analysis of costs to > us for maintaining support vs benefits to the users. [ s

Re: What's our minimum supported Python version?

2025-04-22 Thread Jacob Champion
On Tue, Apr 22, 2025 at 2:28 PM Jelte Fennema-Nio wrote: > I'm pretty sure most users of RHEL expect most modern software not to > compile/work completely effortlessly on their distros without some > effort on their part or on the part of RHEL packagers. That's kinda > what you're signing up for i

Re: DOCS - create publication (tweak for generated columns)

2025-04-22 Thread David G. Johnston
On Tuesday, April 22, 2025, Peter Smith wrote: > Hi, > > While re-reading documentation about logical replication of generated > columns, I came across this paragraph in the CREATE PUBLICATION ... > FOR TABLE description [1]. > > > When a column list is specified, only the named columns are

Re: Row pattern recognition

2025-04-22 Thread Tatsuo Ishii
> Attached are the v30 patches, just adding a patch to change the > default io_method parameter to sync, expecting this affects something > to the recent CFbot failure. > https://commitfest.postgresql.org/patch/4460/ > https://cirrus-ci.com/task/6078653164945408 > which is similar to: > https://www

Re: Allow database owners to CREATE EVENT TRIGGER

2025-04-22 Thread David G. Johnston
On Tuesday, April 22, 2025, Steve Chavez wrote: > > alter event trigger command which doesn’t need to be exercised here > > That part does need to be tested, I modified `AlterEventTriggerOwner_internal` > to allow altering owners to regular users. Before it was only restricted to > superusers. >

Re: Allow database owners to CREATE EVENT TRIGGER

2025-04-22 Thread David G. Johnston
On Tuesday, April 22, 2025, David G. Johnston wrote: > On Tuesday, April 22, 2025, Steve Chavez wrote: > >> > alter event trigger command which doesn’t need to be exercised here >> >> That part does need to be tested, I modified >> `AlterEventTriggerOwner_internal` to allow altering owners to r

Re: Allow database owners to CREATE EVENT TRIGGER

2025-04-22 Thread David G. Johnston
On Tuesday, April 22, 2025, David G. Johnston wrote: > On Tuesday, April 22, 2025, David G. Johnston > wrote: > >> On Tuesday, April 22, 2025, Steve Chavez wrote: >> >>> > alter event trigger command which doesn’t need to be exercised here >>> >>> That part does need to be tested, I modified >

Re: disabled SSL log_like tests

2025-04-22 Thread Tom Lane
I wrote: > The fact that mamba hasn't been failing on the other affected > tests is a bit puzzling. mamba isn't running kerberos or ldap > or oauth_validator, so the lack of failures there is expected. > authentication/t/001_password.pl appears accidentally not vulnerable: > it's not using log_lik

Re: [PATCH] Support older Pythons in oauth_server.py

2025-04-22 Thread Jacob Champion
On Tue, Apr 22, 2025 at 12:36 PM Tom Lane wrote: > Thanks! I confirm this works for me on RHEL8 with 3.6.8. Great, thanks for the quick review! I'm considering committing this myself. Do you mind if it takes a day or so to get this in, while I quadruple-check everything, or are you blocked on t

Re: Cygwin support

2025-04-22 Thread Andrew Dunstan
On 2025-04-22 Tu 12:55 PM, Laurenz Albe wrote: On Tue, 2025-04-22 at 10:26 -0400, Tom Lane wrote: I vaguely recall some discussion about whether building with readline has become possible under MSVC. I think it'd make a lot of people happy if that could happen (but I hasten to add that I'm not

Re: AIO v2.5

2025-04-22 Thread Tomas Vondra
On 3/18/25 21:12, Andres Freund wrote: > Hi, > > Attached is v2.10, with the following changes: > > ... > > - committed io_method=worker > There's an open item related to this commit (247ce06b883d), based on: For now the default io_method is changed to "worker". We should re- evaluat

Re: [PATCH] Support older Pythons in oauth_server.py

2025-04-22 Thread Jacob Champion
On Tue, Apr 22, 2025 at 3:17 PM Jelte Fennema-Nio wrote: > The way you replaced this does not have the same behaviour in the case > where the prefix/suffix is not part of the string. removeprefix/suffix > will not remove any characters in that case, but your code will always > remove the number of

Re: [PATCH] Support older Pythons in oauth_server.py

2025-04-22 Thread Tom Lane
Jacob Champion writes: > I'm considering committing this myself. Please do. > Do you mind if it takes a day > or so to get this in, while I quadruple-check everything, or are you > blocked on this? I'm not in a hurry. Push when you're ready. regards, tom lane

Re: [PATCH] Support older Pythons in oauth_server.py

2025-04-22 Thread Tom Lane
Jacob Champion writes: > This is tested against Python 3.6.15 (3.6 went EOL at the end of > 2021). I'm working on getting Rocky 8 installed locally to test > against. If it's decided we want to support downwards to 3.5, I will > test there too (but I hope we don't; see parent thread). Thanks! I

Re: What's our minimum supported Python version?

2025-04-22 Thread Jacob Champion
On Tue, Apr 22, 2025 at 12:09 PM Renan Alves Fonseca wrote: > The oldest non EOL version is 3.9 right now. My suggestion is to follow > the official supported releases. I think this policy is too aggressive. Many operating systems we support are going to ship Python versions past their EOL date (

[PATCH] Support older Pythons in oauth_server.py

2025-04-22 Thread Jacob Champion
On Tue, Apr 22, 2025 at 8:29 AM Jacob Champion wrote: > On Tue, Apr 22, 2025 at 8:05 AM Tom Lane wrote: > > The first problem is that this Python version seems not to > > like assignments embedded in if statements: [...] > > > > I was able to work around that with the attached quick hack. > > But

Re: What's our minimum supported Python version?

2025-04-22 Thread Tom Lane
Jacob Champion writes: > On Tue, Apr 22, 2025 at 12:09 PM Renan Alves Fonseca > wrote: >> The oldest non EOL version is 3.9 right now. My suggestion is to follow >> the official supported releases. > I think this policy is too aggressive. Many operating systems we > support are going to ship Pyt

Re: [PATCH] Support older Pythons in oauth_server.py

2025-04-22 Thread Jelte Fennema-Nio
On Tue, 22 Apr 2025 at 21:26, Jacob Champion wrote: > - str.removeprefix/suffix() (3.9) The way you replaced this does not have the same behaviour in the case where the prefix/suffix is not part of the string. removeprefix/suffix will not remove any characters in that case, but your code will alw

Re: Enable data checksums by default

2025-04-22 Thread Tomas Vondra
On 10/16/24 08:54, Peter Eisentraut wrote: > On 14.10.24 11:28, Peter Eisentraut wrote: >> On 03.10.24 23:13, Nathan Bossart wrote: >>> On Tue, Oct 01, 2024 at 11:15:02AM -0400, Peter Eisentraut wrote: I have committed 0001 (the new option) and 0004 (the docs tweak).  I think there i

Re: What's our minimum supported Python version?

2025-04-22 Thread Jacob Champion
On Tue, Apr 22, 2025 at 3:04 PM Tom Lane wrote: > The fact that Jacob was able to fix > oauth_server.py without (it seemed like) very much work seems to > bear out that opinion. I think my ability to do it should not be used as evidence of "ease". I knew where to download 3.6, that I should buil

Re: Allow database owners to CREATE EVENT TRIGGER

2025-04-22 Thread Steve Chavez
> alter event trigger command which doesn’t need to be exercised here That part does need to be tested, I modified `AlterEventTriggerOwner_internal` to allow altering owners to regular users. Before it was only restricted to superusers. > Actually, leave the other member around, but not granted

  1   2   >