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

2024-09-03 Thread jian he
On Tue, Sep 3, 2024 at 5:41 PM Peter Eisentraut wrote: > > > I like this patch version (v4). It's the simplest, probably also > easiest to backpatch. > I am actually confused. In this email thread [1], I listed 3 corn cases. I thought all these 3 corner cases should not be allowed. but V4 didn'

Commit Timestamp and LSN Inversion issue

2024-09-03 Thread shveta malik
Hello hackers, (Cc people involved in the earlier discussion) I would like to discuss the $Subject. While discussing Logical Replication's Conflict Detection and Resolution (CDR) design in [1] , it came to our notice that the commit LSN and timestamp may not correlate perfectly i.e. commits may

Re: Parallel workers stats in pg_stat_database

2024-09-03 Thread Bertrand Drouvot
Hi, On Tue, Sep 03, 2024 at 02:34:06PM +0200, Benoit Lobréau wrote: > I noticed that the tests are still not stable. I tried using tenk2 > but fail to have stable plans. I'd love to have pointers on that front. What about moving the tests to places where it's "guaranteed" to get parallel workers

Re: Add callbacks for fixed-numbered stats flush in pgstats

2024-09-03 Thread Bertrand Drouvot
Hi, On Wed, Sep 04, 2024 at 03:12:37PM +0900, Michael Paquier wrote: > On Wed, Sep 04, 2024 at 05:28:56AM +, Bertrand Drouvot wrote: > > On Wed, Sep 04, 2024 at 02:05:46PM +0900, Kyotaro Horiguchi wrote: > >> The generalization sounds good to me, and hiding the private flags in > >> private pl

Re: Add callbacks for fixed-numbered stats flush in pgstats

2024-09-03 Thread Michael Paquier
On Wed, Sep 04, 2024 at 05:28:56AM +, Bertrand Drouvot wrote: > On Wed, Sep 04, 2024 at 02:05:46PM +0900, Kyotaro Horiguchi wrote: >> The generalization sounds good to me, and hiding the private flags in >> private places also seems good. > > +1 on the idea. Thanks for the feedback. >> Regar

Re: DOCS - pg_replication_slot . Fix the 'inactive_since' description

2024-09-03 Thread David G. Johnston
On Tuesday, September 3, 2024, Kyotaro Horiguchi wrote: > At Tue, 3 Sep 2024 10:43:14 +0530, Amit Kapila > wrote in > > On Mon, Sep 2, 2024 at 9:14 AM shveta malik > wrote: > > > > > > On Mon, Sep 2, 2024 at 5:47 AM Peter Smith > wrote: > > > > > > > > > > > > To summarize, the current de

Re: Add callback in pgstats for backend initialization

2024-09-03 Thread Michael Paquier
On Wed, Sep 04, 2024 at 02:15:43PM +0900, Kyotaro Horiguchi wrote: > The name "init_backend" makes it sound like the function initializes > the backend. backend_init might be a better choice, but I'm not sure. We (kind of) tend to prefer $verb_$thing-or-action_cb for the name of the callbacks, whi

Re: GUC names in messages

2024-09-03 Thread Michael Paquier
On Wed, Sep 04, 2024 at 09:17:15AM +1000, Peter Smith wrote: > I have merged the patches 0001-0004 as suggested. Please see v11 attachments. Thanks. It took me some time to go through the whole tree for more inconsistencies. In 0001, search_path was missing quotes in vacuumlo.c and oid2name.c. N

Re: Add memory/disk usage for WindowAgg nodes in EXPLAIN

2024-09-03 Thread Maxim Orlov
On Wed, 4 Sept 2024 at 03:07, Tatsuo Ishii wrote: > > Agreed. Probably add to explain.sql? > Yeah, I think this is an appropriate place. -- Best regards, Maxim Orlov.

Re: DOCS - pg_replication_slot . Fix the 'inactive_since' description

2024-09-03 Thread Kyotaro Horiguchi
At Tue, 3 Sep 2024 10:43:14 +0530, Amit Kapila wrote in > On Mon, Sep 2, 2024 at 9:14 AM shveta malik wrote: > > > > On Mon, Sep 2, 2024 at 5:47 AM Peter Smith wrote: > > > > > > > > > To summarize, the current description wrongly describes the field as a > > > time duration: > > > "The t

Re: Add callbacks for fixed-numbered stats flush in pgstats

2024-09-03 Thread Bertrand Drouvot
Hi, On Wed, Sep 04, 2024 at 02:05:46PM +0900, Kyotaro Horiguchi wrote: > At Tue, 3 Sep 2024 13:48:59 +0900, Michael Paquier > wrote in > > Hi all, > > > > The last TODO item I had in my bucket about the generalization of > > pgstats is the option to a better control on the flush of the stats >

Re: Add callback in pgstats for backend initialization

2024-09-03 Thread Kyotaro Horiguchi
At Tue, 3 Sep 2024 05:00:54 +, Bertrand Drouvot wrote in > Hi, > > On Tue, Sep 03, 2024 at 10:52:20AM +0900, Michael Paquier wrote: > > Hi all, > > > > Currently, the backend-level initialization of pgstats happens in > > pgstat_initialize(), where we are using a shortcut for the WAL stats

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

2024-09-03 Thread Jeff Davis
On Wed, 2024-08-28 at 18:43 +0200, Andreas Karlsson wrote: > On 8/15/24 12:55 AM, Jeff Davis wrote: > > This overlaps a bit with what Peter already proposed here: > > > > https://www.postgresql.org/message-id/4f562d84-87f4-44dc-8946-01d6c437936f%40eisentraut.org > > > > right? > > Maybe I am mis

Re: DOCS - pg_replication_slot . Fix the 'inactive_since' description

2024-09-03 Thread Peter Smith
On Tue, Sep 3, 2024 at 4:12 PM shveta malik wrote: > ... > Shall we make the change in code-comment as well: > > typedef struct ReplicationSlot > { > ... > /* The time since the slot has become inactive */ > TimestampTz inactive_since; > } > Hi Shveta, Yes, I think so. I hadn't b

Re: Collect statistics about conflicts in logical replication

2024-09-03 Thread Amit Kapila
On Wed, Sep 4, 2024 at 9:17 AM Peter Smith wrote: > > On Tue, Sep 3, 2024 at 9:23 PM Zhijie Hou (Fujitsu) > wrote: > > > > I confirmed that it only increased the testing time by 1 second on my > > machine. > > > > It seems a pity to throw away perfectly good test cases just because > they increa

Re: broken devel package for rocky linux

2024-09-03 Thread Zaid Shabbir
Got it, Thank you. On Tue, Sep 3, 2024 at 3:55 PM Devrim Gündüz wrote: > Hi, > > On Tue, 2024-09-03 at 15:48 +0500, Zaid Shabbir wrote: > > This information is missing on the PostgreSQL packages installation > > configuration page. I think it's helpful if we provide the information > > on > > th

Re: per backend I/O statistics

2024-09-03 Thread Bertrand Drouvot
Hi, On Tue, Sep 03, 2024 at 04:07:58PM +0900, Kyotaro Horiguchi wrote: > At Tue, 03 Sep 2024 15:37:49 +0900 (JST), Kyotaro Horiguchi > wrote in > > When I first looked at this patch, my initial thought was whether we > > should let these stats stay "fixed." The reason why the current > > PGSTAT

Re: Inconsistency between try_mergejoin_path and create_mergejoin_plan

2024-09-03 Thread Richard Guo
On Tue, Sep 3, 2024 at 5:51 PM Richard Guo wrote: > The new test case fails starting from adf97c156, and we have to > install a hash opfamily and a hash function for the hacked int8alias1 > type to make the test case work again. > > Now, I'm more dubious about whether we really need to add a test

Re: Eager aggregation, take 3

2024-09-03 Thread Tender Wang
Richard Guo 于2024年8月21日周三 15:11写道: > On Fri, Aug 16, 2024 at 4:14 PM Richard Guo > wrote: > > I had a self-review of this patchset and made some refactoring, > > especially to the function that creates the RelAggInfo structure for a > > given relation. While there were no major changes, the cod

Re: Collect statistics about conflicts in logical replication

2024-09-03 Thread Peter Smith
On Tue, Sep 3, 2024 at 9:23 PM Zhijie Hou (Fujitsu) wrote: > > On Tuesday, September 3, 2024 7:12 PM Amit Kapila > wrote: > > > > Testing the stats for all types of conflicts is not required for this patch > > especially because they increase the timings by 3-4s. We can add tests for > > one >

Re: Introduce XID age and inactive timeout based replication slot invalidation

2024-09-03 Thread shveta malik
On Tue, Sep 3, 2024 at 3:01 PM shveta malik wrote: > > > 1) > I see that ReplicationSlotAlter() will error out if the slot is > invalidated due to timeout. I have not tested it myself, but do you > know if slot-alter errors out for other invalidation causes as well? > Just wanted to confirm that

Re: Improving the latch handling between logical replication launcher and worker processes.

2024-09-03 Thread Kyotaro Horiguchi
At Tue, 3 Sep 2024 09:10:07 +0530, vignesh C wrote in > The attached v2 version patch has the changes for the same. Sorry for jumping in at this point. I've just reviewed the latest patch (v2), and the frequent Own/Disown-Latch operations caught my attention. Additionally, handling multiple conc

Re: optimizing pg_upgrade's once-in-each-database steps

2024-09-03 Thread Nathan Bossart
On Wed, Sep 04, 2024 at 12:28:23AM +0100, Ilya Gladyshev wrote: > The fix looks right to me, but I got confused by the skip_wait and this > `if`: > > +    if (PQstatus(slot->conn) != CONNECTION_OK) > +    return; > > This branch checks connection status that hasn't been refres

Re: Typos in the code and README

2024-09-03 Thread Michael Paquier
On Tue, Sep 03, 2024 at 12:00:13PM +0200, Daniel Gustafsson wrote: > I see your v17 typo fixes, and raise you a few more. Commit 31a98934d169 from > just now contains 2 (out of 3) sets of typos introduced in v17 so they should > follow along when you push the ones mentioned here. Is that really m

Re: Wrong results with grouping sets

2024-09-03 Thread Richard Guo
On Tue, Aug 6, 2024 at 4:17 PM Richard Guo wrote: > I fixed this issue in v13 by performing the replacement of GROUP Vars > after we've done with expression preprocessing on targetlist and > havingQual. An ensuing effect of this approach is that a HAVING > clause may contain expressions that are

Re: Test 041_checkpoint_at_promote.pl faild in installcheck due to missing injection_points

2024-09-03 Thread Michael Paquier
On Mon, Sep 02, 2024 at 09:53:30AM +0900, Michael Paquier wrote: > REL_17_STABLE is frozen for a few more days, so I'll address all the > items of this thread that once the release of this week is tagged: the > export duplicates and the installcheck issue. These are staged on a > local branch for

Re: Add memory/disk usage for WindowAgg nodes in EXPLAIN

2024-09-03 Thread Tatsuo Ishii
> Hi! > > +1 for the idea of the patch. Consider it useful. > > I looked at the patch set and don't see any obvious defects. It applies > without any problems and looks pretty good for me. Thank you for reviewing my patch. > Only one thing is left to do. Add basic tests for the added functional

Re: optimizing pg_upgrade's once-in-each-database steps

2024-09-03 Thread Ilya Gladyshev
On 01.09.2024 22:05, Nathan Bossart wrote: I think we can actually just use PQstatus() here. But furthermore, I think the way I was initiating connections was completely bogus. IIUC before calling PQconnectPoll() the first time, we should wait for a write indicator from select(), and then we s

Re: GUC names in messages

2024-09-03 Thread Peter Smith
On Tue, Sep 3, 2024 at 4:35 PM Michael Paquier wrote: > > On Tue, Sep 03, 2024 at 12:00:19PM +1000, Peter Smith wrote: > > Here is the rebased patch set v10*. Everything is the same as before > > except now there are only 7 patches instead of 8. The previous v9-0001 > > ("bool") patch no longer ex

Re: [PATCH] pg_stat_activity: make slow/hanging authentication more visible

2024-09-03 Thread Jacob Champion
On Sun, Sep 1, 2024 at 5:10 PM Michael Paquier wrote: > On Fri, Aug 30, 2024 at 04:10:32PM -0400, Andrew Dunstan wrote: > > Patch 0001 looks sane to me. > So does 0002 to me. Thanks both! > I'm not much a fan of the addition of > pgstat_bestart_pre_auth(), which is just a shortcut to set a diffe

Re: race condition in pg_class

2024-09-03 Thread Noah Misch
On Tue, Sep 03, 2024 at 09:24:52PM +0530, Nitin Motiani wrote: > On Sat, Aug 31, 2024 at 6:40 AM Noah Misch wrote: > > On Thu, Aug 29, 2024 at 09:08:43PM +0530, Nitin Motiani wrote: > > > On Thu, Aug 29, 2024 at 8:11 PM Noah Misch wrote: > > > > - In the cancel case, call both systable_inplace_up

Re: [PATCH] Add min/max aggregate functions to BYTEA

2024-09-03 Thread Tom Lane
"Andrey M. Borodin" writes: > 0. Please write more descriptive commit message akin to [0] > 1. Use oids from development range 8000- Yeah, we don't try anymore to manually select permanent oids [1]. > 2. Replace VARDATA_ANY\memcmp dance with a call to varstrfastcmp_c(). I don't agree with t

Re: Pgstattuple on Sequences: Seeking Community Feedback on Potential Patch

2024-09-03 Thread Nathan Bossart
On Tue, Sep 03, 2024 at 10:19:33PM +0200, Matthias van de Meent wrote: > On Fri, 30 Aug 2024, 23:06 Nathan Bossart, wrote: >> Another related inconsistency I just noticed in pageinspect: >> >> postgres=# select t_data from heap_page_items(get_raw_page('s', 0)); >> t_data >>

Re: Optimize mul_var() for var1ndigits >= 8

2024-09-03 Thread Tom Lane
Dean Rasheed writes: > Ah, OK. I've pushed a fix. There is an open CF entry pointing at this thread [1]. Shouldn't it be marked committed now? regards, tom lane [1] https://commitfest.postgresql.org/49/5115/

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 issuing read-ahead advice"

Re: Pgstattuple on Sequences: Seeking Community Feedback on Potential Patch

2024-09-03 Thread Matthias van de Meent
On Fri, 30 Aug 2024, 23:06 Nathan Bossart, wrote: > > On Fri, Aug 30, 2024 at 04:07:30PM -0400, Robert Haas wrote: > > On Thu, Aug 29, 2024 at 1:36 PM Nathan Bossart > > wrote: > >> Thanks. Robert, do you have any concerns with this? > > > > I don't know if I'm exactly concerned but I don't und

Re: Pgstattuple on Sequences: Seeking Community Feedback on Potential Patch

2024-09-03 Thread Nathan Bossart
Here is roughly what I had in mind to commit, but I'm not sure there's a consensus on doing this. -- nathan >From 97e670e2e0b53a9dc91c5932ccb34bb1fd7eae6b Mon Sep 17 00:00:00 2001 From: Nathan Bossart Date: Tue, 3 Sep 2024 14:49:24 -0500 Subject: [PATCH v3 1/1] Reintroduce support for sequences

Re: Use read streams in pg_visibility

2024-09-03 Thread Nazir Bilal Yavuz
Hi, On Tue, 3 Sept 2024 at 22:20, Noah Misch wrote: > > On Tue, Sep 03, 2024 at 10:50:11AM -0700, Noah Misch wrote: > > On Mon, Sep 02, 2024 at 03:20:12PM +0300, Nazir Bilal Yavuz wrote: > > > Thanks, updated patches are attached. > > > > > +/* > > > + * Ask the callback which block it would like

Re: Set log_lock_waits=on by default

2024-09-03 Thread Christoph Berg
Re: Jakub Wartak > 1. dev/testing DBs: where frankly speaking nobody cares about such DBs > until they stop/crash; this also includes DBs from new users on dev > laptops too > 2. production systems: where it matters to have log_lock_waits=on (and > people may start getting nervous if they don't hav

Re: Use read streams in pg_visibility

2024-09-03 Thread Noah Misch
On Tue, Sep 03, 2024 at 10:50:11AM -0700, Noah Misch wrote: > On Mon, Sep 02, 2024 at 03:20:12PM +0300, Nazir Bilal Yavuz wrote: > > Thanks, updated patches are attached. > > > +/* > > + * Ask the callback which block it would like us to read next, with a small > > + * buffer in front to allow rea

Re: optimizing pg_upgrade's once-in-each-database steps

2024-09-03 Thread Nathan Bossart
In v12, I've moved the "queries" PQExpBuffer up to the UpgradeTask struct so that we don't need to rebuild it for every database. I think this patch set is in reasonable state, and I still plan to commit it this month. -- nathan >From 7b3a26bb8e418bdf1920f5fe9fe97afd2939d33a Mon Sep 17 00:00:00

Re: Minor cleanups in the SSL tests

2024-09-03 Thread Daniel Gustafsson
> On 17 May 2024, at 09:58, Daniel Gustafsson wrote: > >> On 17 May 2024, at 07:57, Peter Eisentraut wrote: >> >> On 16.05.24 23:27, Daniel Gustafsson wrote: On 16 May 2024, at 11:43, Peter Eisentraut wrote: You might want to run your patch through pgperltidy. The result doesn't >>

Re: list of acknowledgments for PG17

2024-09-03 Thread Matthias van de Meent
On Sat, 24 Aug 2024, 16:27 Peter Eisentraut, wrote: > > 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=ref

Re: Use read streams in pg_visibility

2024-09-03 Thread Noah Misch
On Mon, Sep 02, 2024 at 03:20:12PM +0300, Nazir Bilal Yavuz wrote: > Thanks, updated patches are attached. > +/* > + * Ask the callback which block it would like us to read next, with a small > + * buffer in front to allow read_stream_unget_block() to work and to allow > the > + * fast path to sk

Re: Index AM API cleanup

2024-09-03 Thread Mark Dilger
> 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 ever want > to change the A

Re: Proposal for implementing OCSP Stapling in PostgreSQL

2024-09-03 Thread Jacob Champion
On Mon, Sep 2, 2024 at 5:55 AM Daniel Gustafsson wrote: > I guess they prefer that orgs transition back to just using CRL's. >From a practical perspective, I don't think anyone but browsers can do that right now. Best I can tell, there's no CRLite client other than Firefox, and Google's CRLSets l

Re: Index AM API cleanup

2024-09-03 Thread Peter Eisentraut
On 26.08.24 17:10, Mark Dilger wrote: To make a dent, I picked out something that should be mostly harmless: Stop calling directly into _bt_getrootheight() (patch 0004). I think this patch is ok, but I might call the API function amgettreeheight instead of amgetrootheight. The former seems m

Re: Inline non-SQL SRFs using SupportRequestSimplify

2024-09-03 Thread Tom Lane
Paul Jungwirth writes: > Here are new patches using a new SupportRequestInlineSRF request type. They > include patches and > documentation. I took a look through this. I feel like we're still some way away from having something committable. I've got two main complaint areas: 1. It doesn't se

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

2024-09-03 Thread Jonathan S. Katz
Hi, I ran into an issue (previously discussed[1]; quoting Andres out of context that not addressing it then would "[a]ll but guarantee that we'll have this discussion again"[2]) when trying to build a very large expression index that did not fit within the page boundary. The real-world use ca

Re: scalability bottlenecks with (many) partitions (and more)

2024-09-03 Thread Tomas Vondra
On 9/3/24 17:06, Robert Haas wrote: > On Mon, Sep 2, 2024 at 1:46 PM Tomas Vondra wrote: >> The one argument to not tie this to max_locks_per_transaction is the >> vastly different "per element" memory requirements. If you add one entry >> to max_locks_per_transaction, that adds LOCK which is a wh

Re: race condition in pg_class

2024-09-03 Thread Nitin Motiani
On Sat, Aug 31, 2024 at 6:40 AM Noah Misch wrote: > > On Thu, Aug 29, 2024 at 09:08:43PM +0530, Nitin Motiani wrote: > > On Thu, Aug 29, 2024 at 8:11 PM Noah Misch wrote: > > > On Tue, Aug 20, 2024 at 11:59:45AM +0300, Heikki Linnakangas wrote: > > > > My order of preference is: 2, 1, 3. > > > >

Re: Jargon and acronyms on this mailing list

2024-09-03 Thread Nathan Bossart
On Fri, Aug 30, 2024 at 12:01:42PM -0400, Greg Sabino Mullane wrote: > I normally wouldn't mention my blog entries here, but this one was about > the hackers mailing list, so wanted to let people know about it in case you > don't follow Planet Postgres. I scanned the last year's worth of posts and

Re: [PATCH] Add roman support for to_number function

2024-09-03 Thread Maciek Sakrejda
On Tue, Sep 3, 2024 at 6:29 AM Hunaid Sohail wrote: > I submitted the patch on Aug 30 because I read that new patches should be > submitted in CF with "Open" status. Oh my bad! I missed that you had submitted it to the September CF: https://commitfest.postgresql.org/49/5221/ I don't see a way t

Re: First draft of PG 17 release notes

2024-09-03 Thread Nathan Bossart
While freely acknowledging that I am biased because I wrote it, I am a bit surprised to see the DSM registry left out of the release notes (commit 8b2bcf3, docs are here [0]). This feature is intended to allow modules to allocate shared memory after startup, i.e., without requiring the module to b

Re: Partitioned tables and [un]loggedness

2024-09-03 Thread Nathan Bossart
On Tue, Sep 03, 2024 at 04:59:18PM +0900, Michael Paquier wrote: > An idea is attached. The pgbench bit was unexpected. This works correctly for CREATE TABLE, but ALTER TABLE still succeeds. Interestingly, it doesn't seem to actually change relpersistence for partitioned tables. I think we might

Re: JIT: The nullness of casetest.value can be determined at the JIT compile time.

2024-09-03 Thread Xing Guo
On Tue, Sep 3, 2024 at 8:09 PM Andreas Karlsson wrote: > > On 8/31/24 10:04 AM, Xing Guo wrote: > > The nullness of casetest.value can be determined at the JIT compile > > time. We can emit fewer codes by utilizing this property. The attached > > patch is trying to fix it. > > I have not reviewed

Re: scalability bottlenecks with (many) partitions (and more)

2024-09-03 Thread Robert Haas
On Mon, Sep 2, 2024 at 1:46 PM Tomas Vondra wrote: > The one argument to not tie this to max_locks_per_transaction is the > vastly different "per element" memory requirements. If you add one entry > to max_locks_per_transaction, that adds LOCK which is a whopping 152B. > OTOH one fast-path entry i

Re: query_id, pg_stat_activity, extended query protocol

2024-09-03 Thread Andrei Lepikhov
On 14/8/2024 23:05, Imseih (AWS), Sami wrote: There are no tests as this requires more discussion in a separate thread(?) Unfortunately, TAP tests don't allow us to keep a connection and manually permutate the order of queries sent to different connections. But isolation tests are designed to d

Re: [PATCH] Add CANONICAL option to xmlserialize

2024-09-03 Thread Jim Jones
v13 attached removes two variables that were left unused after refactoring parsenodes.h and primnodes.h, both booleans related to the INDENT feature of xmlserialize. On 30.08.24 08:05, Jim Jones wrote: > > On 30.08.24 06:46, Pavel Stehule wrote: >> >> čt 29. 8. 2024 v 23:54 odesílatel Jim Jones >>

Re: AIO v2.0

2024-09-03 Thread Andres Freund
Hi, On 2024-09-02 13:03:07 +0300, Heikki Linnakangas wrote: > On 01/09/2024 09:27, Andres Freund wrote: > > In the next few days I'll add a bunch more documentation and comments as > > well > > as some better perf numbers (assuming my workstation survived...). > > Yeah, a high-level README would

Re: Add memory/disk usage for WindowAgg nodes in EXPLAIN

2024-09-03 Thread Maxim Orlov
Hi! +1 for the idea of the patch. Consider it useful. I looked at the patch set and don't see any obvious defects. It applies without any problems and looks pretty good for me. Only one thing is left to do. Add basic tests for the added functionality to make it committable. For example, as in th

Re: Set log_lock_waits=on by default

2024-09-03 Thread Jakub Wartak
On Fri, Jul 19, 2024 at 5:13 PM Robert Haas wrote: > > On Fri, Jul 19, 2024 at 10:22 AM Christoph Berg wrote: [..] > > Let's fix the default. People who have a problem can still disable it, > > but then everyone else gets the useful messages in the first iteration. > > Reasonable. > I have feeli

Re: POC: make mxidoff 64 bits

2024-09-03 Thread Alexander Korotkov
On Tue, Sep 3, 2024 at 4:30 PM Maxim Orlov wrote: > Here is rebase. Apparently I'll have to do it often, since the > CATALOG_VERSION_NO changed in the patch. I don't think you need to maintain CATALOG_VERSION_NO change in your patch for the exact reason you have mentioned: patch will get confli

Re: POC: make mxidoff 64 bits

2024-09-03 Thread Maxim Orlov
Here is rebase. Apparently I'll have to do it often, since the CATALOG_VERSION_NO changed in the patch. -- Best regards, Maxim Orlov. v2-0001-Use-64-bit-format-output-for-multixact-offsets.patch Description: Binary data v2-0003-Make-pg_upgrade-convert-multixact-offsets.patch Description: Bin

Re: [PATCH] Add roman support for to_number function

2024-09-03 Thread Hunaid Sohail
On Mon, Sep 2, 2024 at 11:41 PM Maciek Sakrejda wrote: > Thanks for the contribution. > > I took a look at the patch, and it works as advertised. It's too late > for the September commitfest, but I took the liberty of registering > your patch for the November CF [1]. In the course of that, I foun

Re: using extended statistics to improve join estimates

2024-09-03 Thread Andrei Lepikhov
On 17/6/2024 18:10, Tomas Vondra wrote: Let me quickly go through the original parts - most of this is already in the "review" patches, but it's better to quote the main points here to start a discussion. I'll omit some of the smaller suggestions, so please look at the 'review' patches. v202406

Re: Parallel workers stats in pg_stat_database

2024-09-03 Thread Benoit Lobréau
Hi, This new version avoids updating the stats for non parallel queries. I noticed that the tests are still not stable. I tried using tenk2 but fail to have stable plans. I'd love to have pointers on that front. -- Benoit Lobréau Consultant http://dalibo.comFrom 5e4401c865f77ed447b8b3f25aac0ffa

Re: [PATCH] Avoid mixing custom and OpenSSL BIO functions

2024-09-03 Thread Daniel Gustafsson
> On 19 May 2024, at 22:32, Daniel Gustafsson wrote: > >> On 19 May 2024, at 22:21, Peter Eisentraut wrote: > >> Whoever commits these should be sure to coordinate this. > > Thanks for the reminder. I have this patchset, the OCSP stapling patchset and > the multiple-cert one on my radar for w

Re: JIT: The nullness of casetest.value can be determined at the JIT compile time.

2024-09-03 Thread Andreas Karlsson
On 8/31/24 10:04 AM, Xing Guo wrote: The nullness of casetest.value can be determined at the JIT compile time. We can emit fewer codes by utilizing this property. The attached patch is trying to fix it. I have not reviewed the code yet but the idea seems good. But I wonder if we shouldn't inst

RE: Collect statistics about conflicts in logical replication

2024-09-03 Thread Zhijie Hou (Fujitsu)
On Tuesday, September 3, 2024 7:23 PM Zhijie Hou (Fujitsu) wrote: > > On Tuesday, September 3, 2024 7:12 PM Amit Kapila > wrote: > > > > On Fri, Aug 30, 2024 at 12:15 PM Zhijie Hou (Fujitsu) > > > > wrote: > > > > > > Here is V5 patch which addressed above and Shveta's[1] comments. > > > > > >

RE: Collect statistics about conflicts in logical replication

2024-09-03 Thread Zhijie Hou (Fujitsu)
On Tuesday, September 3, 2024 7:12 PM Amit Kapila wrote: > > On Fri, Aug 30, 2024 at 12:15 PM Zhijie Hou (Fujitsu) > wrote: > > > > Here is V5 patch which addressed above and Shveta's[1] comments. > > > > Testing the stats for all types of conflicts is not required for this patch > especially

Re: Collect statistics about conflicts in logical replication

2024-09-03 Thread Amit Kapila
On Fri, Aug 30, 2024 at 12:15 PM Zhijie Hou (Fujitsu) wrote: > > Here is V5 patch which addressed above and Shveta's[1] comments. > Testing the stats for all types of conflicts is not required for this patch especially because they increase the timings by 3-4s. We can add tests for one or two typ

Re: broken devel package for rocky linux

2024-09-03 Thread Devrim Gündüz
Hi, On Tue, 2024-09-03 at 15:48 +0500, Zaid Shabbir wrote: > This information is missing on the PostgreSQL packages installation > configuration page. I think it's helpful if we provide the information > on > the relevant page. > https://www.postgresql.org/download/linux/redhat/ That page is not

Re: broken devel package for rocky linux

2024-09-03 Thread Pavel Stehule
Hi út 3. 9. 2024 v 12:38 odesílatel Devrim Gündüz napsal: > Hi Pavel, > > On Tue, 2024-09-03 at 12:34 +0200, Pavel Stehule wrote: > > Hi > > > > I try to install devel package > > > > [student@localhost ~]$ LANG=C sudo dnf install postgresql15-devel > > Last metadata expiration check: 0:23:04 ag

Re: broken devel package for rocky linux

2024-09-03 Thread Devrim Gündüz
Hi Pavel, On Tue, 2024-09-03 at 12:34 +0200, Pavel Stehule wrote: > Hi > > I try to install devel package > > [student@localhost ~]$ LANG=C sudo dnf install postgresql15-devel > Last metadata expiration check: 0:23:04 ago on Tue Sep  3 06:08:29 > 2024. > Error: >  Problem: cannot install the bes

broken devel package for rocky linux

2024-09-03 Thread Pavel Stehule
Hi I try to install devel package [student@localhost ~]$ LANG=C sudo dnf install postgresql15-devel Last metadata expiration check: 0:23:04 ago on Tue Sep 3 06:08:29 2024. Error: Problem: cannot install the best candidate for the job - nothing provides perl(IPC::Run) needed by postgresql15-de

Re: Conflict Detection and Resolution

2024-09-03 Thread vignesh C
On Fri, 30 Aug 2024 at 11:01, Nisha Moond wrote: > > Here is the v11 patch-set. Changes are: > 1) Updated conflict type names in accordance with the recent commit[1] as - > update_differ --> update_origin_differs > delete_differ --> delete_origin_differs > > 2) patch-001: > - Implemented the

Re: Typos in the code and README

2024-09-03 Thread Daniel Gustafsson
> On 3 Sep 2024, at 07:51, Michael Paquier wrote: > > On Tue, Sep 03, 2024 at 02:24:32PM +0900, Michael Paquier wrote: >> On Mon, Sep 02, 2024 at 09:00:00PM +0300, Alexander Lakhin wrote: >>> I've gathered another bunch of defects with the possible substitutions. >>> Please take a look: >>> pgsta

Re: [BUG] Fix DETACH with FK pointing to a partitioned table fails

2024-09-03 Thread Tender Wang
Jehan-Guillaume de Rorthais 于2024年9月3日周二 17:26写道: > Hi Tender, > > On Tue, 3 Sep 2024 10:16:44 +0800 > Tender Wang wrote: > > > Jehan-Guillaume de Rorthais 于2024年9月3日周二 05:02写道: > […] > > > * Constraint & trigger catalog cleanup [1] (this thread) > > > * FK broken after DETACH [2] > > > * Maint

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

2024-09-03 Thread Andrei Lepikhov
On 26/8/2024 12:41, Alena Rybakina wrote: On 26.08.2024 06:12, jian he wrote: On Fri, Aug 23, 2024 at 8:58 PM Alexander Korotkov wrote: + int indexnum; /* index of the matching index */ + int colnum; /* index of the matching column */ I am not 100% sure about the comments. indexnum: index of

Re: Inconsistency between try_mergejoin_path and create_mergejoin_plan

2024-09-03 Thread Richard Guo
On Fri, Jul 26, 2024 at 3:56 PM Richard Guo wrote: > Do you think it works if we place this test in equivclass.sql and > write a comment explaining why it's there, like attached? Now I’m > also starting to wonder if this change actually warrants such a test. The new test case fails starting from

Re: Conflict Detection and Resolution

2024-09-03 Thread vignesh C
On Fri, 30 Aug 2024 at 11:01, Nisha Moond wrote: > > Here is the v11 patch-set. Changes are: 1) This command crashes: ALTER SUBSCRIPTION name RESET CONFLICT RESOLVER FOR NULL; #0 __strcmp_avx2 () at ../sysdeps/x86_64/multiarch/strcmp-avx2.S:116 #1 0x55c67270600a in ResetConflictResolver (su

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: Introduce XID age and inactive timeout based replication slot invalidation

2024-09-03 Thread shveta malik
On Sat, Aug 31, 2024 at 1:45 PM Bharath Rupireddy wrote: > > Hi, > > > Please find the attached v44 patch with the above changes. I will > include the 0002 xid_age based invalidation patch later. > Thanks for the patch Bharath. My review and testing is WIP, but please find few comments and querie

Re: [BUG] Fix DETACH with FK pointing to a partitioned table fails

2024-09-03 Thread Jehan-Guillaume de Rorthais
Hi Tender, On Tue, 3 Sep 2024 10:16:44 +0800 Tender Wang wrote: > Jehan-Guillaume de Rorthais 于2024年9月3日周二 05:02写道: […] > > * Constraint & trigger catalog cleanup [1] (this thread) > > * FK broken after DETACH [2] > > * Maintenance consideration about self referencing FK between partitions > >

Re: pgsql: Add more SQL/JSON constructor functions

2024-09-03 Thread jian he
On Mon, Sep 2, 2024 at 4:18 PM Amit Langote wrote: > > > See 0001. > > > > > > See 0002. > > > > I'm also attaching 0003 to fix a minor annoyance that JSON_TABLE() > > columns' default ON ERROR, ON EMPTY behaviors are unnecessarily > > emitted in the deparsed output when the top-level ON ERROR be

Re: Use XLOG_CONTROL_FILE macro everywhere?

2024-09-03 Thread Anton A. Melnikov
On 03.09.2024 08:37, Kyotaro Horiguchi wrote: At Mon, 2 Sep 2024 15:44:45 +0200, Daniel Gustafsson wrote in Summarizing the thread it seems consensus is using XLOG_CONTROL_FILE consistently as per the original patch. 1) A few comments on the patch though: - * reads the data from $PGDATA/gl

Re: Remove no-op PlaceHolderVars

2024-09-03 Thread Richard Guo
On Tue, Sep 3, 2024 at 11:31 AM Tom Lane wrote: > Yeah. I've been mulling over how we could do this, and the real > problem is that the expression containing the PHV *has* been fully > preprocessed by the time we get to outer join strength reduction > (cf. file header comment in prepjointree.c).

Re: DOCS - pg_replication_slot . Fix the 'inactive_since' description

2024-09-03 Thread Bertrand Drouvot
Hi, On Tue, Sep 03, 2024 at 05:52:53PM +1000, Peter Smith wrote: > On Tue, Sep 3, 2024 at 4:35 PM Bertrand Drouvot > wrote: > > > > Hi, > > > > On Tue, Sep 03, 2024 at 10:43:14AM +0530, Amit Kapila wrote: > > > On Mon, Sep 2, 2024 at 9:14 AM shveta malik > > > wrote: > > > > > > > > On Mon, Sep

Re: Partitioned tables and [un]loggedness

2024-09-03 Thread Michael Paquier
On Mon, Sep 02, 2024 at 08:35:15PM -0500, Nathan Bossart wrote: > On Tue, Sep 03, 2024 at 09:22:58AM +0900, Michael Paquier wrote: >> Okay. This is going to be disruptive if we do nothing about pg_dump, >> unfortunately. How about tweaking dumpTableSchema() so as we'd never >> issue UNLOGGED for

Re: DOCS - pg_replication_slot . Fix the 'inactive_since' description

2024-09-03 Thread Peter Smith
On Tue, Sep 3, 2024 at 4:35 PM Bertrand Drouvot wrote: > > Hi, > > On Tue, Sep 03, 2024 at 10:43:14AM +0530, Amit Kapila wrote: > > On Mon, Sep 2, 2024 at 9:14 AM shveta malik wrote: > > > > > > On Mon, Sep 2, 2024 at 5:47 AM Peter Smith wrote: > > > > > > > > > > > > To summarize, the curr

Re: SQLFunctionCache and generic plans

2024-09-03 Thread Alexander Pyhalov
Tom Lane писал(а) 2023-02-07 18:29: Ronan Dunklau writes: The following comment can be found in functions.c, about the SQLFunctionCache: * Note that currently this has only the lifespan of the calling query. * Someday we should rewrite this code to use plancache.c to save parse/plan * r

Re: per backend I/O statistics

2024-09-03 Thread Bertrand Drouvot
Hi, On Tue, Sep 03, 2024 at 03:37:49PM +0900, Kyotaro Horiguchi wrote: > At Mon, 2 Sep 2024 14:55:52 +, Bertrand Drouvot > wrote in > > Hi hackers, > > > > Please find attached a patch to implement $SUBJECT. > > > > While pg_stat_io provides cluster-wide I/O statistics, this patch adds a

Re: not null constraints, again

2024-09-03 Thread Tender Wang
Alvaro Herrera 于2024年8月31日周六 11:59写道: > Hello > > Here I present another attempt at making not-null constraints be > catalogued. This is largely based on the code reverted at 9ce04b50e120, > except that we now have a not-null constraint automatically created for > every column of a primary key,

Re: per backend I/O statistics

2024-09-03 Thread Kyotaro Horiguchi
At Tue, 03 Sep 2024 15:37:49 +0900 (JST), Kyotaro Horiguchi wrote in > When I first looked at this patch, my initial thought was whether we > should let these stats stay "fixed." The reason why the current > PGSTAT_KIND_IO is fixed is that there is only one global statistics > storage for the en