Re: POC, WIP: OR-clause support for indexes

2023-11-27 Thread Andrei Lepikhov
On 25/11/2023 08:23, Alexander Korotkov wrote: I think patch certainly gets better in this aspect. One thing I can't understand is why do we use home-grown code for resolving hash-collisions. You can just define custom hash and match functions in HASHCTL. Even if we need to avoid repeated Jumb

Re: Synchronizing slots from primary to standby

2023-11-27 Thread Drouvot, Bertrand
Hi, On 11/27/23 7:02 AM, Zhijie Hou (Fujitsu) wrote: On Monday, November 27, 2023 12:03 PM Zhijie Hou (Fujitsu) wrote: Attach the V38 patch set which addressed all comments in [1][2] except for the ones that mentioned above. [1] https://www.postgresql.org/message-id/CAHut%2BPv-yu71ogj_hRi6c

Re: Synchronizing slots from primary to standby

2023-11-27 Thread shveta malik
On Mon, Nov 27, 2023 at 2:15 PM Drouvot, Bertrand wrote: > > Hi, > > On 11/27/23 7:02 AM, Zhijie Hou (Fujitsu) wrote: > > On Monday, November 27, 2023 12:03 PM Zhijie Hou (Fujitsu) > > wrote: > >> > >> Attach the V38 patch set which addressed all comments in [1][2] except for > >> the > >> ones

Re: How to accurately determine when a relation should use local buffers?

2023-11-27 Thread Давыдов Виталий
Hi Aleksander, Well even assuming this patch will make it to the upstream some day, which I seriously doubt, it will take somewhere between 2 and 5 years. Personally I would recommend reconsidering this design. I understand what you are saying. I have no plans to create a patch for this issue. I

Re: [PATCH] Add CHECK_FOR_INTERRUPTS in scram_SaltedPassword loop.

2023-11-27 Thread Daniel Gustafsson
> On 25 Nov 2023, at 02:20, Michael Paquier wrote: > > On Thu, Nov 23, 2023 at 11:19:51AM +0300, Aleksander Alekseev wrote: I don't think it would be useful to limit this at an arbitrary point, iteration count can be set per password and if someone wants a specific password to >>

Mentor PostgreSQL at CodePeak 2023!

2023-11-27 Thread gautam . sharma
Title: Your Email Content Greetings from the community of programmers of IIT Guwahati and IIT Patna! This is Gautam Sharma, pursuing a BTech in the Department of Computer Science and Engineering at the Indian Institute of Technology, Guwahati. I am also Competit

How to get started with contributions

2023-11-27 Thread Kirtika Gautam
Respected team, I am Kirtika Gautam, a third year civil engineering grad from NIT Durgapur. I am new to open source contributions but I am well aware of the technologies like C++/C,javascript,node.js,react.Basically I'm a MERN Stack developer and I love to learn new technologies. I would love to co

Re: How to get started with contributions

2023-11-27 Thread Bharath Rupireddy
On Mon, Nov 27, 2023 at 2:41 PM Kirtika Gautam wrote: > > Respected team, > I am Kirtika Gautam, a third year civil engineering grad from NIT Durgapur. I > am new to open source contributions but I am well aware of the technologies > like C++/C,javascript,node.js,react.Basically I'm a MERN Stack

Re: How to get started with contributions

2023-11-27 Thread Ashutosh Bapat
Hi Kirtika, Thanks for your interest in the project. You may want to start at https://wiki.postgresql.org/wiki/So,_you_want_to_be_a_developer%3F. On Mon, Nov 27, 2023 at 2:41 PM Kirtika Gautam wrote: > > Respected team, > I am Kirtika Gautam, a third year civil engineering grad from NIT Durgapur

Re: pg_upgrade and logical replication

2023-11-27 Thread vignesh C
On Sat, 25 Nov 2023 at 17:50, Amit Kapila wrote: > > On Sat, Nov 25, 2023 at 7:21 AM vignesh C wrote: > > > > Few comments on v19: > == > 1. > + > + The subscriptions will be migrated to the new cluster in a disabled > state. > + After migration, do this: > + > +

Re: remaining sql/json patches

2023-11-27 Thread Amit Langote
On Fri, Nov 24, 2023 at 9:28 PM Alvaro Herrera wrote: > Some quick grepping gave me this table, > > YYLAST YYNTOKENS YYNNTS YYNRULES YYNSTATES YYMAXUTOK > REL9_1_STABLE 69680429 546 22184179666 > REL9_2_STABLE 73834432 5

Re: logical decoding and replication of sequences, take 2

2023-11-27 Thread Amit Kapila
On Mon, Nov 27, 2023 at 11:34 AM Amit Kapila wrote: > > On Mon, Nov 27, 2023 at 6:41 AM Tomas Vondra > wrote: > > > > While going over 0001, I realized there might be an optimization for > > ReorderBufferSequenceIsTransactional. As coded in 0001, it always > > searches through all top-level trans

Re: strange para/programlisting pattern in sgml docs

2023-11-27 Thread Peter Eisentraut
On 25.11.23 21:44, Tomas Vondra wrote: while working on a patch I noticed we do this in the SGML docs (for example in indexam.sgml and a bunch of other files): ... some text ... some code ... description of the code. That is, the program listing is in a paragraph tha

Re: New instability in stats regression test

2023-11-27 Thread Bharath Rupireddy
On Mon, Nov 27, 2023 at 8:26 AM Michael Paquier wrote: > > I was ready to argue that we'd better keep this test and keep it close > to the end of stats.sql while documenting why things are kept in this > order, It's easy for someone to come and add pg_stat_reset_shared() before the end without no

Re: brininsert optimization opportunity

2023-11-27 Thread Tomas Vondra
On 11/27/23 08:37, Richard Guo wrote: > > On Mon, Nov 27, 2023 at 1:53 PM Soumyadeep Chakraborty > mailto:soumyadeep2...@gmail.com>> wrote: > > On Sun, Nov 26, 2023 at 9:28 PM Richard Guo > wrote: > > It seems that we have an oversight in this commit

Re: Synchronizing slots from primary to standby

2023-11-27 Thread Amit Kapila
On Mon, Nov 27, 2023 at 2:27 PM Zhijie Hou (Fujitsu) wrote: > > Here is the updated version(v39_2) which include all the changes made in 0002. > Please use for review, and sorry for the confusion. > --- a/src/backend/replication/logical/launcher.c +++ b/src/backend/replication/logical/launcher.c

Re: remaining sql/json patches

2023-11-27 Thread Alvaro Herrera
On 2023-Nov-27, Amit Langote wrote: > > For example, the jump between 13 and 14 looks worse. > > (I do wonder what happened there.) > > The following commit sounds like it might be related? Yes, but not only that one. I did some more trolling in the commit log for the 14 timeframe further and

Re: logical decoding and replication of sequences, take 2

2023-11-27 Thread Tomas Vondra
On 11/27/23 11:13, Amit Kapila wrote: > On Mon, Nov 27, 2023 at 11:34 AM Amit Kapila wrote: >> >> On Mon, Nov 27, 2023 at 6:41 AM Tomas Vondra >> wrote: >>> >>> While going over 0001, I realized there might be an optimization for >>> ReorderBufferSequenceIsTransactional. As coded in 0001, it a

Re: PATCH: Add REINDEX tag to event triggers

2023-11-27 Thread Ajin Cherian
On Mon, Nov 27, 2023 at 11:00 AM jian he wrote: > > On Fri, Nov 24, 2023 at 10:44 AM Michael Paquier wrote: > hi. > v5-0001. changed the REINDEX command tag from event_trigger_ok: false > to event_trigger_ok: true. > Move ReindexStmt moves from standard_ProcessUtility to ProcessUtilitySlow. > By

Re: Do away with a few backwards compatibility macros

2023-11-27 Thread Bharath Rupireddy
On Tue, Nov 21, 2023 at 9:22 PM Nathan Bossart wrote: > > On Tue, Nov 21, 2023 at 12:05:36AM -0500, Tom Lane wrote: > > No objection here, but should we try to establish some sort of project > > policy around this sort of change (ie, removal of backwards-compatibility > > support)? "Once it no lo

Re: logical decoding and replication of sequences, take 2

2023-11-27 Thread Amit Kapila
On Mon, Nov 27, 2023 at 4:17 PM Tomas Vondra wrote: > > On 11/27/23 11:13, Amit Kapila wrote: > > On Mon, Nov 27, 2023 at 11:34 AM Amit Kapila > > wrote: > >> > >> On Mon, Nov 27, 2023 at 6:41 AM Tomas Vondra > >> wrote: > >>> > >>> While going over 0001, I realized there might be an optimizati

Re: Simplify xlogreader.c with XLogRec* macros

2023-11-27 Thread Bharath Rupireddy
On Fri, Nov 3, 2023 at 12:01 AM Bharath Rupireddy wrote: > > On Tue, Oct 31, 2023 at 4:12 PM 邱宇航 wrote: > > > > > > > > I thought these can also be rewrite to: > > > > > > if (!XLogRecHasBlockRef(record, block_id)) > > > > Oops, I missed that. New version is attached. > > +1. Indeed a reasonable

Re: logical decoding and replication of sequences, take 2

2023-11-27 Thread Amit Kapila
On Mon, Nov 27, 2023 at 4:41 PM Amit Kapila wrote: > > On Mon, Nov 27, 2023 at 4:17 PM Tomas Vondra > wrote: > > > > > FWIW I think one of the earlier patch versions did something like this, > > by adding a "created" flag in the xlog record. And we concluded doing > > this on the decoding side is

Re: pg_upgrade and logical replication

2023-11-27 Thread Amit Kapila
On Mon, Nov 27, 2023 at 3:18 PM vignesh C wrote: > > On Sat, 25 Nov 2023 at 17:50, Amit Kapila wrote: > > > > On Sat, Nov 25, 2023 at 7:21 AM vignesh C wrote: > > > > > > > Few comments on v19: > > == > > 1. > > + > > + The subscriptions will be migrated to the new cluste

Re: Random pg_upgrade test failure on drongo

2023-11-27 Thread Alexander Lakhin
Hello Kuroda-san, 25.11.2023 18:19, Hayato Kuroda (Fujitsu) wrote: Thanks for attaching a program. This helps us to understand the issue. I wanted to confirm your env - this failure was occurred on windows server , right? I see that behavior on: Windows 10 Version 1607 (OS Build 14393.0)

Re: Synchronizing slots from primary to standby

2023-11-27 Thread Drouvot, Bertrand
Hi, On 11/6/23 2:30 AM, Zhijie Hou (Fujitsu) wrote: On Friday, November 3, 2023 7:32 PM Amit Kapila I don't see a corresponding change in repl_gram.y. I think the following part of the code needs to be changed: /* CREATE_REPLICATION_SLOT slot [TEMPORARY] LOGICAL plugin [options] */ | K_CREATE

RE: Synchronizing slots from primary to standby

2023-11-27 Thread Zhijie Hou (Fujitsu)
On Monday, November 27, 2023 8:05 PM Drouvot, Bertrand wrote: Hi, > On 11/6/23 2:30 AM, Zhijie Hou (Fujitsu) wrote: > > On Friday, November 3, 2023 7:32 PM Amit Kapila > > >> > >> I don't see a corresponding change in repl_gram.y. I think the following > >> part > of > >> the code needs to be

Re: Random pg_upgrade test failure on drongo

2023-11-27 Thread Andrew Dunstan
On 2023-11-27 Mo 07:00, Alexander Lakhin wrote: Hello Kuroda-san, 25.11.2023 18:19, Hayato Kuroda (Fujitsu) wrote: Thanks for attaching a program. This helps us to understand the issue. I wanted to confirm your env - this failure was occurred on windows server , right? I see that behav

Re: Synchronizing slots from primary to standby

2023-11-27 Thread Drouvot, Bertrand
Hi, On 11/27/23 1:23 PM, Zhijie Hou (Fujitsu) wrote: On Monday, November 27, 2023 8:05 PM Drouvot, Bertrand wrote: Did not look in details but it looks like there is more to do here as this is failing (with v39_2): " postgres@primary: psql replication=database psql (17devel) Type "help" for

Re: Testing autovacuum wraparound (including failsafe)

2023-11-27 Thread Masahiko Sawada
On Fri, Sep 29, 2023 at 7:17 PM Daniel Gustafsson wrote: > > > On 27 Sep 2023, at 14:39, Masahiko Sawada wrote: > > > I've attached new version patches. 0001 patch adds an option to > > background_psql to specify the timeout seconds, and 0002 patch is the > > main regression test patch. > > -=ite

Re: Optimizing nbtree ScalarArrayOp execution, allowing multi-column ordered scans, skip scan

2023-11-27 Thread Heikki Linnakangas
On 21/11/2023 04:52, Peter Geoghegan wrote: Attached is v7. First, some high-level reactions before looking at the patch very closely: - +1 on the general idea. Hard to see any downsides if implemented right. - This changes the meaning of amsearcharray==true to mean that the ordering is pres

Re: Testing autovacuum wraparound (including failsafe)

2023-11-27 Thread Daniel Gustafsson
> On 27 Nov 2023, at 14:06, Masahiko Sawada wrote: > Is it true that we can modify the timeout after creating > BackgroundPsql object? If so, it seems we don't need to introduce the > new timeout argument. But how? I can't remember if that's leftovers that incorrectly remains from an earlier ver

Re: logical decoding and replication of sequences, take 2

2023-11-27 Thread Tomas Vondra
On 11/27/23 12:11, Amit Kapila wrote: > On Mon, Nov 27, 2023 at 4:17 PM Tomas Vondra > wrote: >> >> On 11/27/23 11:13, Amit Kapila wrote: >>> On Mon, Nov 27, 2023 at 11:34 AM Amit Kapila >>> wrote: On Mon, Nov 27, 2023 at 6:41 AM Tomas Vondra wrote: > > While going ove

Re: logical decoding and replication of sequences, take 2

2023-11-27 Thread Tomas Vondra
On 11/27/23 13:08, Hayato Kuroda (Fujitsu) wrote: > Dear Amit, Tomas, > I am wondering that instead of building the infrastructure to know whether a particular change is transactional on the decoding side, can't we have some flag in the WAL record to note whether the change >>>

Re: remaining sql/json patches

2023-11-27 Thread Andrew Dunstan
On 2023-11-27 Mo 05:42, Alvaro Herrera wrote: On 2023-Nov-27, Amit Langote wrote: For example, the jump between 13 and 14 looks worse. (I do wonder what happened there.) The following commit sounds like it might be related? Yes, but not only that one. I did some more trolling in the comm

Re: Random pg_upgrade test failure on drongo

2023-11-27 Thread Andrew Dunstan
On 2023-11-27 Mo 07:39, Andrew Dunstan wrote: On 2023-11-27 Mo 07:00, Alexander Lakhin wrote: Hello Kuroda-san, 25.11.2023 18:19, Hayato Kuroda (Fujitsu) wrote: Thanks for attaching a program. This helps us to understand the issue. I wanted to confirm your env - this failure was occurred on

Re: remaining sql/json patches

2023-11-27 Thread Alvaro Herrera
On 2023-Nov-27, Andrew Dunstan wrote: > Interesting. But inferring a speed effect from such changes is difficult. I > don't have a good idea about measuring parser speed, but a tool to do that > would be useful. Amit has made a start on such measurements, but it's only a > start. I'd prefer to hav

Re: Synchronizing slots from primary to standby

2023-11-27 Thread Drouvot, Bertrand
Hi, On 11/27/23 1:23 PM, Zhijie Hou (Fujitsu) wrote: On Monday, November 27, 2023 8:05 PM Drouvot, Bertrand wrote: Hi, On 11/6/23 2:30 AM, Zhijie Hou (Fujitsu) wrote: On Friday, November 3, 2023 7:32 PM Amit Kapila I don't see a corresponding change in repl_gram.y. I think the followin

Re: pgoutput incorrectly replaces missing values with NULL since PostgreSQL 15

2023-11-27 Thread Nikhil Benesch
Thank you for turning this around so quickly!

Re: Questions regarding Index AMs and natural ordering

2023-11-27 Thread Matthias van de Meent
On Fri, 24 Nov 2023, 19:58 Tom Lane, wrote: > > Peter Geoghegan writes: > > On Fri, Nov 24, 2023 at 8:44 AM Matthias van de Meent > > wrote: > >> Yes, the part where btree opclasses determine a type's ordering is > >> clear. But what I'm looking for is "how do I, as an index AM > >> implementati

Re: Add semi-join pushdown to postgres_fdw

2023-11-27 Thread Alexander Pyhalov
Alexander Korotkov писал(а) 2023-11-27 03:49: Thank you for the revision. I've revised the patch myself. I've replaced StringInfo with additional conds into a list of strings as I proposed before. I think the code became much clearer. Also, it gets rid of some unnecessary allocations. I thi

Re: brininsert optimization opportunity

2023-11-27 Thread Tomas Vondra
On 11/27/23 11:34, Tomas Vondra wrote: > > > On 11/27/23 08:37, Richard Guo wrote: >> >> On Mon, Nov 27, 2023 at 1:53 PM Soumyadeep Chakraborty >> mailto:soumyadeep2...@gmail.com>> wrote: >> >> On Sun, Nov 26, 2023 at 9:28 PM Richard Guo > > wrote: >> >

Re: walwriter interacts quite badly with synchronous_commit=off

2023-11-27 Thread Heikki Linnakangas
On 25/10/2023 21:59, Andres Freund wrote: See attached. It's the same logic as in your patch, just formulatd more clearly IMHO. Yep, makes sense! Pushed this. Thanks for the investigation! -- Heikki Linnakangas Neon (https://neon.tech)

Re: Improve tab completion for ALTER DEFAULT PRIVILEGE and ALTER TABLE

2023-11-27 Thread vignesh C
On Fri, 24 Nov 2023 at 18:37, Shubham Khanna wrote: > > n Fri, Nov 24, 2023 at 6:33 PM vignesh C wrote: > > > > Hi, > > > > Improved tab completion for "ALTER DEFAULT PRIVILEGE" and "ALTER TABLE": > > 1) GRANT, REVOKE and FOR USER keyword was not displayed in tab > > completion of alter default p

Re: PATCH: Add REINDEX tag to event triggers

2023-11-27 Thread jian he
On Mon, Nov 27, 2023 at 6:58 PM Ajin Cherian wrote: > > I just started reviewing the patch. Some minor comments: > In patch 0001: > In standard_ProcessUtility(), since you are unconditionally calling > ProcessUtilitySlow() in case of T_ReindexStmt, you really don't need > the case statement for T_

Re: Missing docs on AT TIME ZONE precedence?

2023-11-27 Thread Alvaro Herrera
On 2023-Nov-26, Tom Lane wrote: > I am, however, feeling a little bit on the warpath about the > grammar comments for the SQL/JSON keyword precedences: > > /* SQL/JSON related keywords */ > %nonassoc UNIQUE JSON > %nonassoc KEYS OBJECT_P SCALAR VALUE_P > %nonassoc WITH WITHOUT > > Ev

Re: walwriter interacts quite badly with synchronous_commit=off

2023-11-27 Thread Andres Freund
On 2023-11-27 17:55:34 +0200, Heikki Linnakangas wrote: > On 25/10/2023 21:59, Andres Freund wrote: > > > See attached. It's the same logic as in your patch, just formulatd more > > > clearly IMHO. > > Yep, makes sense! > > Pushed this. Thanks for the investigation! Thanks!

Re: Missing docs on AT TIME ZONE precedence?

2023-11-27 Thread Alvaro Herrera
We could do something like this. Is this good? I tried to merge WITH and WITHOUT with the precedence class immediately above, but that failed: the main grammar compiles fine and no tests fail, but ECPG does fail to compile the sqljson.pgc test, so there's some problem there. Now, the ecpg gramma

Re: remaining sql/json patches

2023-11-27 Thread Andres Freund
Hi, On 2023-11-27 15:06:12 +0100, Alvaro Herrera wrote: > On 2023-Nov-27, Andrew Dunstan wrote: > > > Interesting. But inferring a speed effect from such changes is difficult. I > > don't have a good idea about measuring parser speed, but a tool to do that > > would be useful. Amit has made a star

Re: New instability in stats regression test

2023-11-27 Thread Andres Freund
Hi, On 2023-11-27 15:49:01 +0530, Bharath Rupireddy wrote: > On Mon, Nov 27, 2023 at 8:26 AM Michael Paquier wrote: > > but two resets done on the same shared stats type would still > > be prone to race conditions without all the previous activity done in > > the tests (like pg_stat_wal). > > Ca

Re: New instability in stats regression test

2023-11-27 Thread Andres Freund
Hi, On 2023-11-27 11:56:19 +0900, Michael Paquier wrote: > I was ready to argue that we'd better keep this test and keep it close > to the end of stats.sql while documenting why things are kept in this > order, but two resets done on the same shared stats type would still > be prone to race condit

SSL tests fail on OpenSSL v3.2.0

2023-11-27 Thread Nazir Bilal Yavuz
Hi, SSL tests fail on OpenSSL v3.2.0. I tested both on macOS (CI) and debian (my local) and both failed with the same errors. To trigger these errors on CI, you may need to clear the repository cache; otherwise macOS won't install the v3.2.0 of the OpenSSL. 001_ssltests: psql exited with signal 6

Re: Assert failure on 'list_member_ptr(rel->joininfo, restrictinfo)'

2023-11-27 Thread Andres Freund
On 2023-11-27 11:29:48 +0530, Ashutosh Bapat wrote: > How do we ensure that we are not making unnecessary copies of Bitmapsets? We don't - but that's not specific to this patch. Bitmapsets typically aren't very large, I doubt that it's a significant proportion of the memory usage. Adding refcounts

Re: SSL tests fail on OpenSSL v3.2.0

2023-11-27 Thread Tristan Partin
Nazir, Thanks for opening a thread. Was just about to start one, here what we came up with so far. Homebrew users discovered a regression[0] when using Postgres compiled and linked against OpenSSL version 3.2. $ psql "postgresql://$DB?sslmode=require" psql: error: connection to server at "r

Re: SSL tests fail on OpenSSL v3.2.0

2023-11-27 Thread Tristan Partin
Here is a v2 which adds back a comment that was not meant to be removed. -- Tristan Partin Neon (https://neon.tech) From 4bcb73eab9ceba950581a890c52820a81134f7e4 Mon Sep 17 00:00:00 2001 From: Tristan Partin Date: Mon, 27 Nov 2023 11:49:52 -0600 Subject: [PATCH v2] Use BIO_{get,set}_app_data() i

Re: Assert failure on 'list_member_ptr(rel->joininfo, restrictinfo)'

2023-11-27 Thread Alexander Korotkov
On Mon, Nov 27, 2023 at 8:07 PM Andres Freund wrote: > > On 2023-11-27 11:29:48 +0530, Ashutosh Bapat wrote: > > How do we ensure that we are not making unnecessary copies of Bitmapsets? > > We don't - but that's not specific to this patch. Bitmapsets typically aren't > very large, I doubt that it

Re: Add recovery to pg_control and remove backup_label

2023-11-27 Thread Robert Haas
On Sun, Nov 26, 2023 at 3:42 AM Stephen Frost wrote: > What would really be helpful would be hearing from these individuals > directly as to what the issues are with the changes, such that perhaps > we can do things better in the future to avoid whatever the issue is > they're having with the chan

Re: New instability in stats regression test

2023-11-27 Thread Tom Lane
Andres Freund writes: > I am probably under-caffeinated: What precisely is the potential race? Just > that the timestamps on some system might not be granular enough? The problem as I see it is that this test: SELECT :io_stats_post_reset < :io_stats_pre_reset; requires an assumption that less I

Re: trying again to get incremental backup

2023-11-27 Thread Robert Haas
On Thu, Nov 23, 2023 at 11:18 PM Thomas Munro wrote: > Robert pinged me to see if I had any ideas. Thanks, Thomas. > The reason it fails on Windows is because there is a special code path > for WIN32 in the patch's src/bin/pg_combinebackup/copy_file.c, but it > is incomplete: it returns early wi

proposal: change behavior on collation version mismatch

2023-11-27 Thread Jeremy Schneider
I had some interesting conversations with a couple PostgreSQL community members at PASS Data Summit the week before last about the collation problem, and then - just in this last week - I saw two more people on public channels hitting corruption problems. One person on the public PostgreSQL Slack,

Re: Partial aggregates pushdown

2023-11-27 Thread Robert Haas
On Wed, Nov 22, 2023 at 1:32 AM Alexander Pyhalov wrote: > Hi. HAVING is also a problem. Consider the following query > > SELECT count(a) FROM t HAVING count(a) > 10 - we can't push it down to > foreign server as HAVING needs full aggregate result, but foreign server > don't know it. I don't see

Re: Do away with a few backwards compatibility macros

2023-11-27 Thread Nathan Bossart
On Mon, Nov 27, 2023 at 04:29:18PM +0530, Bharath Rupireddy wrote: > I think it's easy to miss/enforce a documented policy. IMV, moving > towards pg_attribute_deprecated as Alvaro Herrera said in the other > thread > https://www.postgresql.org/message-id/202311141920.edtj56saukiv%40alvherre.pgsql

Re: proposal: change behavior on collation version mismatch

2023-11-27 Thread Laurenz Albe
On Mon, 2023-11-27 at 11:06 -0800, Jeremy Schneider wrote: > First: I'd suggest that a collation version mismatch should cause an > ERROR rather than a WARNING by default. If we want to have a GUC that > allows warning behavior, I think that's OK but I think it should be > superuser-only and docume

Re: proposal: change behavior on collation version mismatch

2023-11-27 Thread Laurenz Albe
I forgot to add that the problem will remain a problem until the day we start keeping our own copy of the ICU library in the source tree... Yours, Laurenz Albe

Re: Partial aggregates pushdown

2023-11-27 Thread Robert Haas
On Wed, Nov 22, 2023 at 5:16 AM fujii.y...@df.mitsubishielectric.co.jp wrote: > I did not choose Approach2 because I was not confident that the disadvantage > mentioned in 2.(2)(a) > would be accepted by the PostgreSQL development community. > If it is accepted, I think Approach 2 is smarter. > C

Re: Table AM Interface Enhancements

2023-11-27 Thread Mark Dilger
> On Nov 25, 2023, at 9:47 AM, Alexander Korotkov wrote: > >> Should the patch at least document which parts of the EState are expected to >> be in which states, and which parts should be viewed as undefined? If the >> implementors of table AMs rely on any/all aspects of EState, doesn't tha

Re: proposal: change behavior on collation version mismatch

2023-11-27 Thread Jeff Davis
On Mon, 2023-11-27 at 11:06 -0800, Jeremy Schneider wrote: > I've been tracking the discussions around collation here on the lists > and I've had a number of conversations with folks working deeply in > this > area inside and outside of AWS, and I was part of the effort to > address > it at AWS sin

Re: Missing docs on AT TIME ZONE precedence?

2023-11-27 Thread Tom Lane
Alvaro Herrera writes: > (TBH I don't think the added comments really explain the problems fully. > That's most likely because I don't actually understand what the problems > are.) The actual problem is that nobody has applied a cluestick to the SQL committee about writing an unambiguous grammar

Re: proposal: change behavior on collation version mismatch

2023-11-27 Thread Jeff Davis
On Mon, 2023-11-27 at 20:19 +0100, Laurenz Albe wrote: > I forgot to add that the problem will remain a problem until the > day we start keeping our own copy of the ICU library in the source > tree... Another option is for packagers to keep specific ICU versions around for an extended time, and ma

Re: Partial aggregates pushdown

2023-11-27 Thread Tom Lane
Robert Haas writes: > Also, I want to make one other point here about security and > reliability. Right now, there is no way for a user to feed arbitrary > data to a deserialization function. Since serialization and > deserialization functions are only used in the context of parallel > query, we a

Re: locked reads for atomics

2023-11-27 Thread Nathan Bossart
Here's a v2 of the patch set in which I've attempted to address all feedback. I've also added a pg_write_membarrier_u* pair of functions that provide an easy way to write to an atomic variable with full barrier semantics. In the generic implementation, these are just aliases for an atomic exchang

Re: POC, WIP: OR-clause support for indexes

2023-11-27 Thread Robert Haas
On Mon, Nov 27, 2023 at 3:02 AM Andrei Lepikhov wrote: > On 25/11/2023 08:23, Alexander Korotkov wrote: > > I think patch certainly gets better in this aspect. One thing I can't > > understand is why do we use home-grown code for resolving > > hash-collisions. You can just define custom hash and

Re: Missing docs on AT TIME ZONE precedence?

2023-11-27 Thread Andrew Dunstan
On 2023-11-27 Mo 15:34, Tom Lane wrote: Alvaro Herrera writes: (TBH I don't think the added comments really explain the problems fully. That's most likely because I don't actually understand what the problems are.) The actual problem is that nobody has applied a cluestick to the SQL committe

Dynamically generate a nested JSON file

2023-11-27 Thread Rushabh Shah
Hi, I want to dynamically generate a nested json file. I have written a function for it in PL/PGSQL that accepts 3 arrays. First one is an array of all json fields, second one is an array of all json fields with columns from tables present in db, third one mentions the type for all the fields insi

Re: Partial aggregates pushdown

2023-11-27 Thread Robert Haas
On Mon, Nov 27, 2023 at 3:59 PM Tom Lane wrote: > Even if the partial-aggregate serialization value isn't "internal" > but some more-narrowly-defined type, it is still an internal > implementation detail of the aggregate. You have no right to assume > that the remote server implements the aggrega

Re: autovectorize page checksum code included elsewhere

2023-11-27 Thread Nathan Bossart
On Sat, Nov 25, 2023 at 02:09:14PM +0700, John Naylor wrote: > On Thu, Nov 23, 2023 at 11:51 PM Nathan Bossart > wrote: >> >> On Thu, Nov 23, 2023 at 05:50:48PM +0700, John Naylor wrote: >> > On Thu, Nov 23, 2023 at 1:49 AM Nathan Bossart >> > wrote: >> >> One half-formed idea I have is to intro

Re: Partial aggregates pushdown

2023-11-27 Thread Tom Lane
Robert Haas writes: > On Mon, Nov 27, 2023 at 3:59 PM Tom Lane wrote: >> TBH, I think this entire proposal is dead in the water. Which is >> sad from a performance standpoint, but I can't see any way that >> we would not regret shipping a feature that makes such assumptions. > I think it's ridi

Re: proposal: change behavior on collation version mismatch

2023-11-27 Thread Magnus Hagander
On Mon, Nov 27, 2023 at 9:30 PM Jeff Davis wrote: > > On Mon, 2023-11-27 at 11:06 -0800, Jeremy Schneider wrote: > > If we want to have a GUC that > > allows warning behavior, I think that's OK but I think it should be > > superuser-only and documented as a "developer" setting similar to > > zero_

Re: Don't use bms_membership in places where it's not needed

2023-11-27 Thread David Rowley
On Fri, 24 Nov 2023 at 19:54, Richard Guo wrote: > +1 to the idea. > > I think you have a typo in distribute_restrictinfo_to_rels. We should > remove the call of bms_singleton_member and use relid instead. Thanks for reviewing. I've now pushed this. David

Re: logical decoding and replication of sequences, take 2

2023-11-27 Thread Peter Smith
FWIW, here are some more minor review comments for v20231127-3-0001 == doc/src/sgml/logicaldecoding.sgml 1. + The txn parameter contains meta information about + the transaction the sequence change is part of. Note however that for + non-transactional updates, the transaction m

Re: POC, WIP: OR-clause support for indexes

2023-11-27 Thread Peter Geoghegan
On Mon, Nov 27, 2023 at 1:04 PM Robert Haas wrote: > The use of op_mergejoinable() seems pretty random to me. Why should we > care about that? If somebody writes a<1 or a<2 or a<3 or a<4, you can > transform that to a good idea, but I think it's a legal transformation. That kind of transformation

Re: common signal handler protection

2023-11-27 Thread Nathan Bossart
Thanks for taking a look. On Wed, Nov 22, 2023 at 02:59:45PM -0800, Andres Freund wrote: > On 2023-11-22 15:59:44 -0600, Nathan Bossart wrote: >> +/* >> + * Except when called with SIG_IGN or SIG_DFL, pqsignal() sets up this >> function >> + * as the handler for all signals. This wrapper handler

Re: Don't use bms_membership in places where it's not needed

2023-11-27 Thread Andres Freund
Hi, On 2023-11-24 17:06:25 +1300, David Rowley wrote: > While working on the patch in [1], I noticed that ever since > 00b41463c, it's now suboptimal to do the following: > > switch (bms_membership(relids)) > { > case BMS_EMPTY_SET: >/* handle empty set */ >break; > case B

Re: proposal: change behavior on collation version mismatch

2023-11-27 Thread Jeff Davis
On Mon, 2023-11-27 at 22:37 +0100, Magnus Hagander wrote: > That is, set it to "warnings only", insert a single row into the > table > with an "unlucky" key, set it back to "errors always" and you now > have > a corrupt database, but your setting reflects that it shouldn't be > corrupt. You would

Re: autovectorize page checksum code included elsewhere

2023-11-27 Thread Nathan Bossart
On Mon, Nov 27, 2023 at 03:21:53PM -0600, Nathan Bossart wrote: > On Sat, Nov 25, 2023 at 02:09:14PM +0700, John Naylor wrote: >> Sorry, I wasn't clear, I mean: detect that a packager passed >> "-march=x86_64-v2" in the CFLAGS, so that a symbol in header files >> would cause inlining of functions c

Re: Dynamically generate a nested JSON file

2023-11-27 Thread David G. Johnston
On Mon, Nov 27, 2023 at 2:10 PM Rushabh Shah wrote: > > I want to dynamically generate a nested json file. I have written a > function for it in PL/PGSQL that accepts 3 arrays. First one is an array of > all json fields, second one is an array of all json fields with columns > from tables present

Re: Adding facility for injection points (or probe points?) for more advanced tests

2023-11-27 Thread Michael Paquier
On Mon, Nov 27, 2023 at 12:14:05PM +0530, Ashutosh Bapat wrote: > Since you wroten "(still need to improve ...) I thought you are > working on v6. No problem. Sorry for the confusion. I see why my previous message could be confusing. Sorry about that. -- Michael signature.asc Description: PGP s

Re: New instability in stats regression test

2023-11-27 Thread Michael Paquier
On Mon, Nov 27, 2023 at 02:01:51PM -0500, Tom Lane wrote: > The problem as I see it is that this test: > > SELECT :io_stats_post_reset < :io_stats_pre_reset; > > requires an assumption that less I/O has happened since the commanded > reset action than happened before it (extending back to the pre

Re: GUC names in messages

2023-11-27 Thread Michael Paquier
On Mon, Nov 27, 2023 at 01:35:44AM -0500, Tom Lane wrote: > Laurenz Albe writes: > > On Mon, 2023-11-27 at 13:41 +1100, Peter Smith wrote: >>> In the documentation and in the guc_tables.c they are all described in >>> MixedCase (e.g. "DateStyle" instead of "datestyle"), so I felt the >>> messages

Re: Don't use bms_membership in places where it's not needed

2023-11-27 Thread David Rowley
On Tue, 28 Nov 2023 at 11:21, Andres Freund wrote: > Hm, does this ever matter from a performance POV? The current code does look > simpler to read to me. If the overhead is relevant, I'd instead just move the > code into a static inline? I didn't particularly find the code in examine_variable()

Re: proposal: change behavior on collation version mismatch

2023-11-27 Thread Jeremy Schneider
On 11/27/23 12:29 PM, Jeff Davis wrote: >> 2) "most users would rather have ease-of-use than 100% safety, since >> it's uncommon" >> >> And I think this led to the current behavior of issuing a warning >> rather >> than an error > The elevel trade-off is *availability* vs safety, not ease-of-use vs

Re: [PATCH] Add CHECK_FOR_INTERRUPTS in scram_SaltedPassword loop.

2023-11-27 Thread Michael Paquier
On Mon, Nov 27, 2023 at 10:05:49AM +0100, Daniel Gustafsson wrote: > I don't see any reason to backpatch further down than 16 given how low the > hardcoded value is set there, scanning the archives I see no complaints about > it either. As a reference, CREATE ROLE using 4096 iterations takes 14ms

Re: Incorrect comment in tableam.h regarding GetHeapamTableAmRoutine()

2023-11-27 Thread Michael Paquier
On Mon, Nov 27, 2023 at 02:14:32PM +0800, Richard Guo wrote: > +1. Nice catch. Thanks, applied it. -- Michael signature.asc Description: PGP signature

Re: Partial aggregates pushdown

2023-11-27 Thread Robert Haas
First of all, that last email of mine was snippy, and I apologize for it. Sorry. That said: On Mon, Nov 27, 2023 at 4:23 PM Tom Lane wrote: > Well, one of the founding principles of postgres_fdw was to be able > to talk to PG servers that are not of the same version as yours. > If we break that

Re: SSL tests fail on OpenSSL v3.2.0

2023-11-27 Thread Michael Paquier
On Mon, Nov 27, 2023 at 12:33:49PM -0600, Tristan Partin wrote: > - res = secure_raw_read(((Port *) BIO_get_data(h)), buf, size); > + res = secure_raw_read(((Port *) BIO_get_app_data(h)), buf, > size); > BIO_clear_retry_flags(h); > if (res <= 0)

Re: SSL tests fail on OpenSSL v3.2.0

2023-11-27 Thread Tristan Partin
On Mon Nov 27, 2023 at 5:53 PM CST, Michael Paquier wrote: On Mon, Nov 27, 2023 at 12:33:49PM -0600, Tristan Partin wrote: > -#ifndef HAVE_BIO_GET_DATA > -#define BIO_get_data(bio) (bio->ptr) > -#define BIO_set_data(bio, data) (bio->ptr = data) > -#endif Shouldn't this patch do a refresh of conf

Re: POC, WIP: OR-clause support for indexes

2023-11-27 Thread Matthias van de Meent
On Mon, 27 Nov 2023, 23:16 Peter Geoghegan, wrote: > On Mon, Nov 27, 2023 at 1:04 PM Robert Haas wrote: > > The use of op_mergejoinable() seems pretty random to me. Why should we > > care about that? If somebody writes a<1 or a<2 or a<3 or a<4, you can > > transform that to a > good idea, but I

Re: POC, WIP: OR-clause support for indexes

2023-11-27 Thread Robert Haas
On Mon, Nov 27, 2023 at 5:16 PM Peter Geoghegan wrote: > [ various observations ] This all seems to make sense but I don't have anything particular to say about it. > I am sure that there is a great deal of truth to this. The general > conclusion about parse analysis being the wrong place for th

Re: SSL tests fail on OpenSSL v3.2.0

2023-11-27 Thread Tom Lane
Michael Paquier writes: > Interesting. I have yet to look at that in details, but > BIO_get_app_data() exists down to 0.9.8, which is the oldest version > we need to support for stable branches. So that looks like a safe > bet. What about LibreSSL? In general, I'm not too pleased with just ass

Re: SSL tests fail on OpenSSL v3.2.0

2023-11-27 Thread Tristan Partin
On Mon Nov 27, 2023 at 6:21 PM CST, Tom Lane wrote: Michael Paquier writes: > Interesting. I have yet to look at that in details, but > BIO_get_app_data() exists down to 0.9.8, which is the oldest version > we need to support for stable branches. So that looks like a safe > bet. What about Li

  1   2   >