Re: improve predefined roles documentation

2024-06-24 Thread Nathan Bossart
On Mon, Jun 24, 2024 at 02:44:33PM -0400, Robert Haas wrote: > I think the first two cases could be made more like each other by > changing the varlistentires that are just about one setting to use the > second format instead of the first, e.g. pg_checkpoint allows > executing the CHECKPOINT comman

[PATCH] Fix type redefinition build errors with macOS SDK 15.0

2024-06-24 Thread Stan Hu
Prior to macOS SDK 15, there were include guards in $SDK_ROOT/usr/include/xlocale/_regex.h: #ifndef _REGEX_H_ #include <_regex.h> #endif // _REGEX_H_ #include <_xlocale.h> In macOS SDK 15, these include guards are gone: #include <_regex.h> #include <_xlocale.h> Because _REGEX_H_ was

Re: speed up a logical replica setup

2024-06-24 Thread Noah Misch
On Mon, Jun 24, 2024 at 05:20:21PM +0530, Amit Kapila wrote: > On Sun, Jun 23, 2024 at 11:52 AM Noah Misch wrote: > > > > > +static void > > > +create_publication(PGconn *conn, struct LogicalRepInfo *dbinfo) > > > +{ > > > > > + appendPQExpBuffer(str, "CREATE PUBLICATION %s FOR ALL TABLES", >

[PATCH v3] Fix type redefinition build errors with macOS SDK 15.0

2024-06-24 Thread Stan Hu
Prior to macOS SDK 15, there were include guards in $SDK_ROOT/usr/include/xlocale/_regex.h: #ifndef _REGEX_H_ #include <_regex.h> #endif // _REGEX_H_ #include <_xlocale.h> In macOS SDK 15, these include guards are gone: #include <_regex.h> #include <_xlocale.h> Because _REGEX_H_ was

Re: [PATCH] Add ACL (Access Control List) acronym

2024-06-24 Thread Joel Jacobson
On Mon, Jun 24, 2024, at 23:15, David G. Johnston wrote: > I really dislike "For avoidance of doubt and clarity" - and in terms of > being equivalent the following seems like a more accurate description > of reality. > > The PostgreSQL documentation, and code, refers to the specifications > with

Re: improve predefined roles documentation

2024-06-24 Thread David G. Johnston
On Mon, Jun 24, 2024 at 2:53 PM Nathan Bossart wrote: > On Mon, Jun 24, 2024 at 02:44:33PM -0400, Robert Haas wrote: > > > I don't know what to do about pg_database_owner. I almost wonder if > > that should be moved out of the table and documented as a special > > case. Or maybe some more wordsmi

Re: Apparent bug in WAL summarizer process (hung state)

2024-06-24 Thread Michael Paquier
On Mon, Jun 24, 2024 at 02:56:00PM -0300, Israel Barth Rubio wrote: > I've been playing a bit with the incremental backup feature which might > come as > part of the 17 release, and I think I hit a possible bug in the WAL > summarizer > process. Thanks for testing new features and for this report!

Re: Add pg_get_acl() function get the ACL for a database object

2024-06-24 Thread Joel Jacobson
On Mon, Jun 24, 2024, at 01:46, Michael Paquier wrote: > Rather unrelated to this patch, still this patch makes the situation > more complicated in the docs, but wouldn't it be better to add ACL as > a term in acronyms.sql, and reuse it here? It would be a doc-only > patch that applies on top of t

Re: Support "Right Semi Join" plan shapes

2024-06-24 Thread Japin Li
On Mon, 24 Jun 2024 at 17:59, Richard Guo wrote: > Thank you for reviewing. > > On Mon, Jun 24, 2024 at 1:27 PM Li Japin wrote: >> + /* >> +* For now we do not support RIGHT_SEMI join in mergejoin or nestloop >> +* join. >> +*/ >> + if (jointype == JOIN_RIGHT_S

Re: 001_rep_changes.pl fails due to publisher stuck on shutdown

2024-06-24 Thread Kyotaro Horiguchi
At Fri, 21 Jun 2024 11:48:22 +0530, Amit Kapila wrote in > On Wed, Jun 19, 2024 at 10:44 AM Hayato Kuroda (Fujitsu) > wrote: > > > > Dear Horiguchi-san, > > > > Thanks for sharing the patch! I agree this approach (ensure WAL records are > > flushed) > > Is more proper than others. > > > > I ha

Re: Track the amount of time waiting due to cost_delay

2024-06-24 Thread Imseih (AWS), Sami
>> 2. the leader being interrupted while waiting is also already happening on >> master >> due to the pgstat_progress_parallel_incr_param() calls in >> parallel_vacuum_process_one_index() (that have been added in >> 46ebdfe164). It has been the case "only" 36 times during my test case. 46ebdfe164

Re: Issues with ON CONFLICT UPDATE and REINDEX CONCURRENTLY

2024-06-24 Thread Michael Paquier
On Fri, Jun 21, 2024 at 11:31:21AM +0200, Michail Nikolaev wrote: > Yes, I also have tried that approach, but it doesn't work, unfortunately. > You may fail test increasing number of connections: > > '--no-vacuum --client=10 -j 2 --transactions=1000', > > The source of the issue is not the swap o

Re: Vacuum ERRORs out considering freezing dead tuples from before OldestXmin

2024-06-24 Thread Noah Misch
On Mon, Jun 24, 2024 at 04:51:24PM -0400, Peter Geoghegan wrote: > On Mon, Jun 24, 2024 at 4:36 PM Robert Haas wrote: > > I'm not sure I understand. The most important thing here is fixing the > > bug. But if we have a choice of how to fix the bug, I'd prefer to do > > it by having the pruning cod

Re: Vacuum ERRORs out considering freezing dead tuples from before OldestXmin

2024-06-24 Thread Peter Geoghegan
On Mon, Jun 24, 2024 at 9:30 PM Noah Misch wrote: > On Mon, Jun 24, 2024 at 03:23:39PM -0400, Melanie Plageman wrote: > > Right now, in master, we do use a single horizon when determining what > > is pruned -- that from GlobalVisState. OldestXmin is only used for > > freezing and full page visibil

Re: Add pg_get_acl() function get the ACL for a database object

2024-06-24 Thread Michael Paquier
On Tue, Jun 25, 2024 at 01:21:14AM +0200, Joel Jacobson wrote: > Good idea, I've started a separate thread for this: > > https://postgr.es/m/9253b872-dbb1-42a6-a79e-b1e96effc857%40app.fastmail.com > > This patch now assumes ACL will be supported. Thanks for doing that! That helps in making revi

Re: [PATCH] Fix type redefinition build errors with macOS SDK 15.0

2024-06-24 Thread Michael Paquier
On Mon, Jun 24, 2024 at 02:58:47PM -0700, Stan Hu wrote: > Prior to macOS SDK 15, there were include guards in > $SDK_ROOT/usr/include/xlocale/_regex.h: > > #ifndef _REGEX_H_ > #include <_regex.h> > #endif // _REGEX_H_ > #include <_xlocale.h> Ugh. Which means that you are testing macOS S

Re: Vacuum ERRORs out considering freezing dead tuples from before OldestXmin

2024-06-24 Thread Noah Misch
On Mon, Jun 24, 2024 at 09:49:53PM -0400, Peter Geoghegan wrote: > On Mon, Jun 24, 2024 at 9:30 PM Noah Misch wrote: > > On Mon, Jun 24, 2024 at 03:23:39PM -0400, Melanie Plageman wrote: > > > Right now, in master, we do use a single horizon when determining what > > > is pruned -- that from Globa

Re: Injection point locking

2024-06-24 Thread Michael Paquier
On Mon, Jun 24, 2024 at 01:29:38PM +0300, Heikki Linnakangas wrote: > InjectionPointRun() acquires InjectionPointLock, looks up the hash entry, > and releases the lock: > > > LWLockAcquire(InjectionPointLock, LW_SHARED); > > entry_by_name = (InjectionPointEntry *) > > hash_sear

Re: [PATCH] Fix type redefinition build errors with macOS SDK 15.0

2024-06-24 Thread Tom Lane
Michael Paquier writes: > Ugh. Which means that you are testing macOS Sequoia still in beta > phase? Thanks for the report. > Perhaps we should wait for the actual release before seeing if this is > still an issue and see if this is still a problem? Tom is a heavy > macOS user, I'm still under

RE: New standby_slot_names GUC in PG 17

2024-06-24 Thread Zhijie Hou (Fujitsu)
On Saturday, June 22, 2024 5:47 PM Amit Kapila wrote: > > On Sat, Jun 22, 2024 at 1:49 AM Nathan Bossart > wrote: > > > > On Fri, Jun 21, 2024 at 03:50:00PM -0400, Tom Lane wrote: > > > Allow specification of physical standbys that must be > > > synchronized before they are visible to su

Re: Injection point locking

2024-06-24 Thread Noah Misch
On Mon, Jun 24, 2024 at 11:03:09AM -0400, Tom Lane wrote: > Heikki Linnakangas writes: > > ... I can't do that, because InjectionPointRun() requires a PGPROC > > entry, because it uses an LWLock. That also makes it impossible to use > > injection points in the postmaster. Any chance we could all

Re: Injection point locking

2024-06-24 Thread Michael Paquier
On Mon, Jun 24, 2024 at 11:03:09AM -0400, Tom Lane wrote: > Given your point that the existing locking is just a fig leaf > anyway, maybe we could simply not have any? Then it's on the > test author to be sure that the injection point won't be > getting invoked when it's about to be removed. That

Re: New standby_slot_names GUC in PG 17

2024-06-24 Thread Masahiko Sawada
On Tue, Jun 25, 2024 at 11:21 AM Zhijie Hou (Fujitsu) wrote: > > On Saturday, June 22, 2024 5:47 PM Amit Kapila > wrote: > > > > On Sat, Jun 22, 2024 at 1:49 AM Nathan Bossart > > wrote: > > > > > > On Fri, Jun 21, 2024 at 03:50:00PM -0400, Tom Lane wrote: > > > > Allow specification of phy

Re: Support "Right Semi Join" plan shapes

2024-06-24 Thread wenhui qiu
Hi Japin Li Thank you for your reviewing ,This way the notes are more accurate and complete. Thanks also to the author for updating the patch ,I also tested the new patch ,It looks good to me Regrads Japin Li 于2024年6月25日周二 08:51写道: > On Mon, 24 Jun 2024 at 17:59, Richard Guo wrote: > > T

Re: sql/json miscellaneous issue

2024-06-24 Thread jian he
On Mon, Jun 24, 2024 at 7:46 PM Amit Langote wrote: > > Hi, > > On Mon, Jun 24, 2024 at 7:04 PM jian he wrote: > > > > hi. > > the following two queries should return the same result? > > > > SELECT * FROM JSON_query (jsonb 'null', '$' returning jsonb); > > SELECT * FROM JSON_value (jsonb 'null',

Re: sql/json miscellaneous issue

2024-06-24 Thread Amit Langote
On Tue, Jun 25, 2024 at 12:18 PM jian he wrote: > On Mon, Jun 24, 2024 at 7:46 PM Amit Langote wrote: > > On Mon, Jun 24, 2024 at 7:04 PM jian he wrote: > > > > > > hi. > > > the following two queries should return the same result? > > > > > > SELECT * FROM JSON_query (jsonb 'null', '$' returnin

Re: Patch bug: Fix jsonpath .* on Arrays

2024-06-24 Thread Степан Неретин
  >Вторник, 25 июня 2024, 11:17 +07:00 от David E. Wheeler >: >  >On Jun 7, 2024, at 10:23, David E. Wheeler < da...@justatheory.com > wrote: >  >> Rebased and moved the new tests to the end of the file. >Bah, sorry, that was the previous patch. Here’s v3. > >D >      Hi! Looks good to me, bu

Re: [PATCH] Fix type redefinition build errors with macOS SDK 15.0

2024-06-24 Thread Stan Hu
Thanks, Tom and Michael. I've submitted a bug report via Apple's Feedback Assistant. It's filed under FB14047412. If anyone happens to know the right person at Apple to look at this, please direct them there. On Mon, Jun 24, 2024 at 7:15 PM Tom Lane wrote: > > Michael Paquier writes: > > Ugh.

Re: sql/json miscellaneous issue

2024-06-24 Thread jian he
On Tue, Jun 25, 2024 at 11:23 AM Amit Langote wrote: > > On Tue, Jun 25, 2024 at 12:18 PM jian he wrote: > > On Mon, Jun 24, 2024 at 7:46 PM Amit Langote > > wrote: > > > On Mon, Jun 24, 2024 at 7:04 PM jian he > > > wrote: > > > > > > > > hi. > > > > the following two queries should return t

Re: New standby_slot_names GUC in PG 17

2024-06-24 Thread Amit Kapila
On Tue, Jun 25, 2024 at 8:20 AM Masahiko Sawada wrote: > > On Tue, Jun 25, 2024 at 11:21 AM Zhijie Hou (Fujitsu) > wrote: > > > > I agree the current name seems too generic and the suggested ' > > synchronized_standby_slots ' > > is better than the current one. > > > > Some other ideas could be:

Re: [EXTERNAL] Re: Add non-blocking version of PQcancel

2024-06-24 Thread Alexander Lakhin
24.06.2024 01:59, Jelte Fennema-Nio wrote: On Sat, 22 Jun 2024 at 17:00, Alexander Lakhin wrote: @@ -2775,6 +2775,7 @@ SET LOCAL statement_timeout = '10ms'; select count(*) from ft1 CROSS JOIN ft2 CROSS JOIN ft4 CROSS JOIN ft5; -- this takes very long ERROR: canceling statement due t

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

2024-06-24 Thread Amit Kapila
On Mon, Jun 24, 2024 at 8:06 PM Tomas Vondra wrote: > > On 6/24/24 12:54, Amit Kapila wrote: > > ... > >> > I'm not sure there are any cases where using SRE instead of AE would > cause > problems for logical decoding, but it seems very hard to prove. I'd be > very > surp

Re: [PATCH] Add ACL (Access Control List) acronym

2024-06-24 Thread Michael Paquier
On Tue, Jun 25, 2024 at 12:20:20AM +0200, Joel Jacobson wrote: > Thanks, much better. New version attached. + The PostgreSQL documentation, and code, refers + to the specifications within the ACL as "privileges". This has the same + meaning as "permissions" on the linked page. Gen

Re: Add pg_get_acl() function get the ACL for a database object

2024-06-24 Thread Joel Jacobson
On Tue, Jun 25, 2024, at 03:57, Michael Paquier wrote: > On Tue, Jun 25, 2024 at 01:21:14AM +0200, Joel Jacobson wrote: >> Good idea, I've started a separate thread for this: >> >> https://postgr.es/m/9253b872-dbb1-42a6-a79e-b1e96effc857%40app.fastmail.com >> >> This patch now assumes ACL will be

Re: [PATCH] Add ACL (Access Control List) acronym

2024-06-24 Thread Joel Jacobson
On Tue, Jun 25, 2024, at 07:11, Michael Paquier wrote: > On Tue, Jun 25, 2024 at 12:20:20AM +0200, Joel Jacobson wrote: >> Thanks, much better. New version attached. > > + The PostgreSQL documentation, and code, > refers > + to the specifications within the ACL as "privileges". This has

Re: speed up a logical replica setup

2024-06-24 Thread Amit Kapila
On Tue, Jun 25, 2024 at 3:38 AM Noah Misch wrote: > > On Mon, Jun 24, 2024 at 05:20:21PM +0530, Amit Kapila wrote: > > On Sun, Jun 23, 2024 at 11:52 AM Noah Misch wrote: > > > > > > > +static void > > > > +create_publication(PGconn *conn, struct LogicalRepInfo *dbinfo) > > > > +{ > > > > > > > +

Re: Pgoutput not capturing the generated columns

2024-06-24 Thread Peter Smith
Here are some review comments for the patch v10-0002. == Commit Message 1. Note that we don't copy columns when the subscriber-side column is also generated. Those will be filled as normal with the subscriber-side computed or default data. ~ Now this patch also introduced some errors etc, s

RE: Partial aggregates pushdown

2024-06-24 Thread fujii.y...@df.mitsubishielectric.co.jp
Hi Jelte, hackers. Thank you for explanations. Actually, I have other tasks about "PARTIAL_AGGREAGATE" keyword to respond Requirement1 and Requirement2 in the following mail. https://www.postgresql.org/message-id/TYAPR01MB3088755F2281D41F5EEF06D495F92%40TYAPR01MB3088.jpnprd01.prod.outlook.com Af

Re: New standby_slot_names GUC in PG 17

2024-06-24 Thread Bertrand Drouvot
Hi, On Tue, Jun 25, 2024 at 10:24:41AM +0530, Amit Kapila wrote: > On Tue, Jun 25, 2024 at 8:20 AM Masahiko Sawada wrote: > > > > On Tue, Jun 25, 2024 at 11:21 AM Zhijie Hou (Fujitsu) > > wrote: > > > > > > I agree the current name seems too generic and the suggested ' > > > synchronized_standb

Re: Add pg_get_acl() function get the ACL for a database object

2024-06-24 Thread Michael Paquier
On Tue, Jun 25, 2024 at 08:06:41AM +0200, Joel Jacobson wrote: > Not sure if I see how to implement it for pg_get_acl() though. > > I've had a look at how pg_describe_object() works for this case: > > SELECT pg_describe_object(0,'t'::regclass::oid,0); > ERROR: unsupported object class: 0 > > I

Doc Rework: Section 9.16.13 SQL/JSON Query Functions

2024-06-24 Thread David G. Johnston
Hey! Lots of SQL/JSON threads going about. This one is less about technical correctness and more about usability of the documentation. Though in writing this I am finding some things that aren't quite clear. I'm going to come back with those on a follow-on post once I get a chance to make my se

<    1   2