Re: Conflict detection and logging in logical replication

2024-07-26 Thread Amit Kapila
On Fri, Jul 26, 2024 at 3:37 PM shveta malik wrote: > > On Fri, Jul 26, 2024 at 3:03 PM Nisha Moond wrote: > > > > On Thu, Jul 25, 2024 at 12:04 PM Zhijie Hou (Fujitsu) > > wrote: > > > Here is the V6 patch set which addressed Shveta and Nisha's comments > > > in [1][2][3][4]. > > > > Thanks

Re: Conflict detection and logging in logical replication

2024-07-26 Thread shveta malik
On Fri, Jul 26, 2024 at 3:03 PM Nisha Moond wrote: > > On Thu, Jul 25, 2024 at 12:04 PM Zhijie Hou (Fujitsu) > wrote: > > Here is the V6 patch set which addressed Shveta and Nisha's comments > > in [1][2][3][4]. > > Thanks for the patch. > I tested the v6-0001 patch with partition table

Re: Allow logical failover slots to wait on synchronous replication

2024-07-26 Thread shveta malik
On Tue, Jul 23, 2024 at 10:35 AM Amit Kapila wrote: > > On Tue, Jul 9, 2024 at 12:39 AM John H wrote: > > > > > Out of curiosity, did you compare with standby_slot_names_from_syncrep > > > set to off > > > and standby_slot_names not empty? > > > > I didn't think 'standby_slot_names' would

Re: Reuse child_relids in try_partitionwise_join was Re: Assert failure on bms_equal(child_joinrel->relids, child_joinrelids)

2024-07-26 Thread Richard Guo
On Wed, Jul 24, 2024 at 3:30 PM Ashutosh Bapat wrote: > Done. Are you suggesting it for aesthetic purposes or there's > something else (read, less defragmentation, performance gain etc.)? I > am curious. I think it's just for readability. > PFA patches: > 0001 - same as previous one > 0002 -

Re: Conflict detection and logging in logical replication

2024-07-26 Thread Nisha Moond
On Thu, Jul 25, 2024 at 12:04 PM Zhijie Hou (Fujitsu) wrote: > Here is the V6 patch set which addressed Shveta and Nisha's comments > in [1][2][3][4]. Thanks for the patch. I tested the v6-0001 patch with partition table scenarios. Please review the following scenario where Pub updates a tuple,

Re: Possible null pointer dereference in afterTriggerAddEvent()

2024-07-26 Thread Alexander Kuznetsov
25.07.2024 20:07, Alvaro Herrera wrote: Maybe for sanity (and perhaps for Svace compliance) we could do it the other way around, i.e. by testing events->tail for nullness instead of events->head, then add the assertion: if (events->tail == NULL) {

Re: WIP: parallel GiST index builds

2024-07-26 Thread Andreas Karlsson
On 7/22/24 2:08 PM, Andrey M. Borodin wrote: During inserting tuples we need NSN on page. For NSN we can use just a counter, generated by gistGetFakeLSN() which in turn will call GetFakeLSNForUnloggedRel(). Or any other shared counter. After inserting tuples we call log_newpage_range() to

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

2024-07-26 Thread Tender Wang
Junwang Zhao 于2024年7月26日周五 14:57写道: > > There is a bug report[0] Tender comments might be the same > issue as this one, but I tried Alvaro's and mine patch, neither > could solve that problem, I did not tried Tender's earlier patch > thought. I post the test script below in case you are

Re: consider -Wmissing-variable-declarations

2024-07-26 Thread Peter Eisentraut
I have committed all of the fixes that I had previously posted, but before actually activating the warning option, I found another small hiccup with the Bison files. Before Bison 3.4, the generated parser implementation files run afoul of -Wmissing-variable-declarations (in spite of commit

Re: [PATCH] Add crc32(text) & crc32(bytea)

2024-07-26 Thread Aleksander Alekseev
Hi, > This sounds generally reasonable to me, especially given the apparent > demand. Should we also introduce crc32c() while we're at it? Might be a good idea. However I didn't see a demand for crc32c() SQL function yet. Also I'm not sure whether the best interface for it would be crc32c() or

Re: Make COPY format extendable: Extract COPY TO format implementations

2024-07-26 Thread Li, Yong
> On Jul 25, 2024, at 12:51, Sutou Kouhei wrote: > > Hi, > > THREAD SUMMARY: Very nice summary. > > Implementation: > > The v18 patch set is the latest patch set. [6] > It includes the following patches: > > 0001: This adds a basic feature (Copy{From,To}Routine) > (This isn't enough

Re: Remove duplicate table scan in logical apply worker and code refactoring

2024-07-26 Thread Ashutosh Bapat
On Thu, Jul 25, 2024 at 5:56 PM Kirill Reshke wrote: > > +/* > > + * If the tuple to be modified could not be found, a log message is > > emitted. > > + */ > > +static void > > +report_tuple_not_found(CmdType cmd, Relation targetrel, bool is_partition) > > +{ > > + Assert(cmd == CMD_UPDATE ||

Re: pgsql: Add more SQL/JSON constructor functions

2024-07-26 Thread Amit Langote
On Fri, Jul 26, 2024 at 11:12 AM Amit Langote wrote: > On Thu, Jul 25, 2024 at 11:16 PM Amit Langote wrote: > > On Wed, Jul 24, 2024 at 3:25 PM jian he wrote: > > > 2. domain over jsonb should fail just like domain over other types? > > > RETURNING djs keep quotes DEFAULT '"11"' ON empty > > >

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

2024-07-26 Thread Alvaro Herrera
On 2024-Jul-26, Junwang Zhao wrote: > There is a bug report[0] Tender comments might be the same > issue as this one, but I tried Alvaro's and mine patch, neither > could solve that problem, I did not tried Tender's earlier patch > thought. I post the test script below in case you are interested.

Re: Restart pg_usleep when interrupted

2024-07-26 Thread Bertrand Drouvot
Hi, On Thu, Jul 25, 2024 at 05:27:15PM -0500, Sami Imseih wrote: > I am attaching v3 of the patch which addresses the comments made > earlier by Bertrand about the comment in the patch [1]. Thanks! Looking at it: 1 === + struct instr_time start_time; I think we can get rid of the

Re: DRAFT: Pass sk_attno to consistent function

2024-07-26 Thread Michał Kłeczek
> On 26 Jul 2024, at 01:28, Matthias van de Meent > wrote: > > All in all, this still seems like a very (very) specific optimization, > of which I'm not sure that it is generalizable. However, array > introspection and filtering for SAOP equality checks feel like a > relatively easy (?)

RE: [Proposal] Add foreign-server health checks infrastructure

2024-07-26 Thread Hayato Kuroda (Fujitsu)
Dear Fujii-san, Just in case - based on the agreement in [1], I updated patches to keep them consistent. We can use same pictures for further discussions... IIUC, the patch which adds user_name attribute to get_connection() can be discussed in later stage, is it right? [1]:

Re: Inconsistency between try_mergejoin_path and create_mergejoin_plan

2024-07-26 Thread Richard Guo
On Thu, Jul 25, 2024 at 12:07 AM Tom Lane wrote: > I took a brief look at this. I think the basic idea is sound, > but I have a couple of nits: Thank you for reviewing this patch! > * It's not entirely obvious that the checks preceding these additions > are sufficient to ensure that the

Re: Separate HEAP WAL replay logic into its own file

2024-07-26 Thread Li, Yong
> On Jul 23, 2024, at 09:54, Sutou Kouhei wrote: > > > Here are my comments for your patch: > > 1. Could you create your patch by "git format-patch -vN master" > or something? If you create your patch by "git format-patch", > we can apply your patch by "git am XXX.patch". > Thanks for your

Re: warning: dereferencing type-punned pointer

2024-07-26 Thread Tatsuo Ishii
Sorry, I forgot to attach the file... > I don't agree. I think the compiler just dislike that nodeTag macro's > argument is a pointer created by '&' operator in this case: > > #define nodeTag(nodeptr) (((const Node*)(nodeptr))->type) > > If we just give a pointer variable either it's type is

Re: warning: dereferencing type-punned pointer

2024-07-26 Thread Tatsuo Ishii
> On 24.07.24 20:09, Tom Lane wrote: >> Peter Eisentraut writes: >>> On 24.07.24 16:05, Tom Lane wrote: I'm not very thrilled with these changes. It's not apparent why your compiler is warning about these usages of IsA and not any other ones, >>> I think one difference is that

EphemeralNamedRelation and materialized view

2024-07-26 Thread Yugo Nagata
Hi, While looking into the commit b4da732fd64e936970f38c792f8b32c4bdf2bcd5, I noticed that we can create a materialized view using Ephemeral Named Relation in PostgreSQL 16 or earler. postgres=# create table tbl (i int); CREATE TABLE ^

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

2024-07-26 Thread Junwang Zhao
On Fri, Jul 26, 2024 at 2:36 PM Junwang Zhao wrote: > > On Mon, Jul 22, 2024 at 1:52 PM Tender Wang wrote: > > > > > > > > Alvaro Herrera 于2024年7月19日周五 21:18写道: > >> > >> Hello, > >> > >> I think the fix for the check triggers should be as the attached. Very > >> close to what you did, but you

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

2024-07-26 Thread Junwang Zhao
On Mon, Jul 22, 2024 at 1:52 PM Tender Wang wrote: > > > > Alvaro Herrera 于2024年7月19日周五 21:18写道: >> >> Hello, >> >> I think the fix for the check triggers should be as the attached. Very >> close to what you did, but you were skipping some operations that needed >> to be kept. AFAICS this

Re: Conflict detection and logging in logical replication

2024-07-26 Thread Amit Kapila
On Fri, Jul 26, 2024 at 9:39 AM shveta malik wrote: > > On Thu, Jul 11, 2024 at 7:47 AM Zhijie Hou (Fujitsu) > wrote: > > > > On Wednesday, July 10, 2024 5:39 PM shveta malik > > wrote: > > > > > > > 2) > > > Another case which might confuse user: > > > > > > CREATE TABLE t1 (pk integer

Re: Conflict detection and logging in logical replication

2024-07-26 Thread shveta malik
On Thu, Jul 25, 2024 at 12:04 PM Zhijie Hou (Fujitsu) wrote: > > On Monday, July 22, 2024 5:03 PM shveta malik wrote: > > > > On Fri, Jul 19, 2024 at 2:06 PM shveta malik wrote: > > > > > > On Thu, Jul 18, 2024 at 7:52 AM Zhijie Hou (Fujitsu) > > > wrote: > > > > > > > > Attach the V5 patch

Re: Logical Replication of sequences

2024-07-26 Thread Peter Smith
Hi Vignesh, There are still pending changes from my previous review of the 0720-0003 patch [1], but here are some new review comments for your latest patch v20240525-0003. == doc/src/sgml/catalogs.sgml nitpick - fix plurals and tweak the description. ~~~ 1. - This catalog only

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

2024-07-26 Thread Jeff Davis
On Wed, 2024-06-19 at 11:15 +0200, Peter Eisentraut wrote: > > * v2-0001-Make-database-default-collation-internal-to-pg_lo.patch > > > > +void > > +pg_init_database_collation() > > > > The function argument should be (void). > > > > The prefix pg_ makes it sound like it's a user-facing function

Is it necessary to keep am routine finish_bulk_insert?

2024-07-26 Thread Zhang Mingli
Hi, We got some trouble when using bulk_insert  of COPY FROM around CopyMultiInsertInfoFlush(), the target table is our own access method storage. The reason is we mistakenly set am routine finish_bulk_insert() to clean some resources or context. We thought it’s used as normal insert_finish

Re: [Proposal] Add foreign-server health checks infrastructure

2024-07-25 Thread Fujii Masao
On 2024/07/26 12:15, Hayato Kuroda (Fujitsu) wrote: Agreed to add the table. I ran a proofreading tool, and it said below points. You can revise if they are acceptable. Yes, I'm okay with these changes. Thanks for the review! I’ve also made several code improvements, for example adding a

Re: Incremental backup from a streaming replication standby fails

2024-07-25 Thread Laurenz Albe
On Thu, 2024-07-25 at 16:12 -0400, Robert Haas wrote: > On Thu, Jul 25, 2024 at 8:51 AM Laurenz Albe wrote: > > The attached patch uses your wording for the first sentence. > > > > I left out the last sentence from your suggestion, because it sounded > > like it is likely to confuse the reader.

Re: How to check if issue is solved?

2024-07-25 Thread Tom Lane
Mohab Yaser writes: > I wrote a simple script to get all issues from the pgsql-bugs list that are > reported by the form (basically getting just the issues without any replies > to them) and now while searching through these issues I can't know directly > whether it is solved or not, just a

Re: First draft of PG 17 release notes

2024-07-25 Thread Yugo Nagata
Hi, On Thu, 9 May 2024 00:03:50 -0400 Bruce Momjian wrote: > I have committed the first draft of the PG 17 release notes; you can > see the results here: > > https://momjian.us/pgsql_docs/release-17.html > > It will be improved until the final release. The item count is 188, > which

Re: Conflict detection and logging in logical replication

2024-07-25 Thread shveta malik
On Thu, Jul 11, 2024 at 7:47 AM Zhijie Hou (Fujitsu) wrote: > > On Wednesday, July 10, 2024 5:39 PM shveta malik > wrote: > > > > 2) > > Another case which might confuse user: > > > > CREATE TABLE t1 (pk integer primary key, val1 integer, val2 integer); > > > > On PUB: insert into t1

Re: MAINTAIN privilege -- what do we need to un-revert it?

2024-07-25 Thread Yugo Nagata
Hi, On Sat, 13 Jul 2024 14:47:48 -0700 Noah Misch wrote: > On Fri, Jul 12, 2024 at 04:50:17PM -0700, Jeff Davis wrote: > > On Fri, 2024-07-12 at 16:11 -0700, Noah Misch wrote: > > > Since refresh->relation is a RangeVar, this departs from the standard > > > against > > > repeated name lookups,

RE: [Proposal] Add foreign-server health checks infrastructure

2024-07-25 Thread Hayato Kuroda (Fujitsu)
I apologize to post incomplete message, here is a correct version. Dear Fujii-san, > Thanks for updating the patches! > > I’ve created a new base patch and split the v42-0001 patch into two parts > to implement the feature and improvements step by step. After pushing these > patches, I’ll focus

Re: Logical Replication of sequences

2024-07-25 Thread Peter Smith
Here are some review comments for latest patch v20240725-0002 == doc/src/sgml/ref/create_publication.sgml nitpick - tweak to the description of the example. == src/backend/parser/gram.y preprocess_pub_all_objtype_list: nitpick - typo "allbjects_list" nitpick - reword function header

RE: [Proposal] Add foreign-server health checks infrastructure

2024-07-25 Thread Hayato Kuroda (Fujitsu)
Dear Fujii-san, > > Thanks for updating the patches! > > I’ve created a new base patch and split the v42-0001 patch into two parts > to implement the feature and improvements step by step. After pushing these > patches, I’ll focus on the v42-0002 patch next. Best regards, Hayato Kuroda FUJITSU

Re: pgsql: Add more SQL/JSON constructor functions

2024-07-25 Thread Amit Langote
On Thu, Jul 25, 2024 at 11:16 PM Amit Langote wrote: > On Wed, Jul 24, 2024 at 3:25 PM jian he wrote: > > 2. domain over jsonb should fail just like domain over other types? > > RETURNING djs keep quotes DEFAULT '"11"' ON empty > > should fail as > > ERROR: could not coerce ON EMPTY expression

Re: CREATE TABLE creates a composite type corresponding to the table row, which is and is not there

2024-07-25 Thread Erik Wienhold
On 2024-07-25 22:29 +0200, Tom Lane wrote: > Erik Wienhold writes: > > Thanks, I didn't know that guideline. Both fixed in v6. > > This still isn't following our usual message style IMO. Here's a > proposed v7 that outputs > > -ERROR: type stuff is not a composite type > +ERROR: type stuff

Re: How to check if issue is solved?

2024-07-25 Thread David G. Johnston
On Thursday, July 25, 2024, Mohab Yaser wrote: > I wrote a simple script to get all issues from the pgsql-bugs list that > are reported by the form (basically getting just the issues without any > replies to them) and now while searching through these issues I can't know > directly whether it is

Re: xid_wraparound tests intermittent failure.

2024-07-25 Thread Andrew Dunstan
On 2024-07-25 Th 3:40 PM, Masahiko Sawada wrote: On Thu, Jul 25, 2024 at 11:06 AM Masahiko Sawada wrote: On Thu, Jul 25, 2024 at 10:56 AM Andrew Dunstan wrote: On 2024-07-23 Tu 6:59 PM, Masahiko Sawada wrote:

How to check if issue is solved?

2024-07-25 Thread Mohab Yaser
I wrote a simple script to get all issues from the pgsql-bugs list that are reported by the form (basically getting just the issues without any replies to them) and now while searching through these issues I can't know directly whether it is solved or not, just a workaround is checking any

Re: XID formatting and SLRU refactorings (was: Add 64-bit XIDs into PostgreSQL 15)

2024-07-25 Thread Noah Misch
On Thu, Jul 25, 2024 at 10:52:13AM +0900, Michael Paquier wrote: > On Wed, Jul 24, 2024 at 06:00:59AM -0700, Noah Misch wrote: > > I'm still seeing need for s/int/int64/ at: > I am attaching a patch for all these you have spotted, switching the > logs to use %llx. Does that look fine for you?

Re: change regexp_substr first argument make tests more easier to understand.

2024-07-25 Thread jian he
On Fri, Jul 19, 2024 at 5:49 AM Tomas Vondra wrote: > > Hi, > > If I understand correctly, the problem is that it's not clear which of > the 'abc' substrings is matched/returned by the function, right? > > I wonder if this is a problem only for understanding the test, or if it > makes the tests a

Re: DRAFT: Pass sk_attno to consistent function

2024-07-25 Thread Matthias van de Meent
On Fri, 22 Mar 2024, 01:29 Michał Kłeczek, wrote: > On 21 Mar 2024, at 23:42, Matthias van de Meent > wrote: >> On Tue, 19 Mar 2024 at 17:00, Michał Kłeczek wrote: >>> With this operator we can write our queries like: >>> >>> account_number ||= [list of account numbers] AND >>> account_number

Re: Recent 027_streaming_regress.pl hangs

2024-07-25 Thread Andrew Dunstan
On 2024-07-25 Th 5:14 PM, Tom Lane wrote: I wrote: I'm confused by crake's buildfarm logs. AFAICS it is not running recovery-check at all in most of the runs; at least there is no mention of that step, for example here:

Re: Restart pg_usleep when interrupted

2024-07-25 Thread Sami Imseih
v3-0001-vaccum_delay-with-absolute-time-nanosleep.patch Description: Binary data attaching the patch again. Something is strange with my email client. Regards, Sami

Re: Restart pg_usleep when interrupted

2024-07-25 Thread Sami Imseih
I am attaching v3 of the patch which addresses the comments madeearlier by Bertrand about the comment in the patch [1]. Also I will stick withvacuum_sleep as the name as the function will be inside vacuum.c. I am notsure we should make this function available outside of vacuum, but I would liketo

Re: Recent 027_streaming_regress.pl hangs

2024-07-25 Thread Thomas Munro
On Fri, Jul 26, 2024 at 9:14 AM Tom Lane wrote: > Based on this, it seems fairly likely that crake is simply timing out > as a consequence of intermittent heavy background activity. Would it be better to keep going as long as progress is being made? I.e. time out only when the relevant LSN stops

Re: Protocol question regarding Portal vs Cursor

2024-07-25 Thread Dave Cramer
On Thu, 25 Jul 2024 at 16:19, David G. Johnston wrote: > On Thursday, July 25, 2024, Dave Cramer wrote: > > May not make a difference but… > > >> 2024-07-25 15:55:39 FINEST org.postgresql.core.v3.QueryExecutorImpl >> sendSimpleQuery FE=> SimpleQuery(query="declare C_3 CURSOR WITHOUT HOLD >>

Re: REINDEX not updating partition progress

2024-07-25 Thread Ilya Gladyshev
25 июля 2024 г., в 09:55, Michael Paquier написал(а): On Sun, Jul 21, 2024 at 11:41:43AM +0100, Ilya Gladyshev wrote: Forgot to update partition_relid in reindex_index in the second patch. Fixed in attachment.    relid oid       -   OID of the table on which the index is

Re: Recent 027_streaming_regress.pl hangs

2024-07-25 Thread Tom Lane
I wrote: > I'm confused by crake's buildfarm logs. AFAICS it is not running > recovery-check at all in most of the runs; at least there is no > mention of that step, for example here: > https://buildfarm.postgresql.org/cgi-bin/show_log.pl?nm=crake=2024-07-25%2013%3A27%3A02 Oh, I see it: the log

Re: [PATCH] Fix docs to use canonical links

2024-07-25 Thread Tom Lane
Daniel Gustafsson writes: > On 1 Jul 2024, at 13:09, Joel Jacobson wrote: >> However, I think David J had another good argument: >> "If we are making wikipedia our authority we might as well use their >> standard for naming." > It's a moving target, but so is most if not all links. I see

Re: CREATE TABLE creates a composite type corresponding to the table row, which is and is not there

2024-07-25 Thread Tom Lane
Erik Wienhold writes: > Thanks, I didn't know that guideline. Both fixed in v6. This still isn't following our usual message style IMO. Here's a proposed v7 that outputs -ERROR: type stuff is not a composite type +ERROR: type stuff is the row type of another table +DETAIL: A typed table

[18] separate collation and ctype versions, and cleanup of pg_database locale fields

2024-07-25 Thread Jeff Davis
Definitions: - collation is text ordering and comparison - ctype affects case mapping (e.g. LOWER()) and pattern matching/regexes Currently, there is only one version field, and it represents the version of the collation. So, if your provider is libc and datcollate is "C" and datctype is

Re: Protocol question regarding Portal vs Cursor

2024-07-25 Thread David G. Johnston
On Thursday, July 25, 2024, Dave Cramer wrote: May not make a difference but… > 2024-07-25 15:55:39 FINEST org.postgresql.core.v3.QueryExecutorImpl > sendSimpleQuery FE=> SimpleQuery(query="declare C_3 CURSOR WITHOUT HOLD > FOR SELECT * FROM testsps WHERE id = 2") > You named the cursor c_3

Re: Protocol question regarding Portal vs Cursor

2024-07-25 Thread Dave Cramer
Hi Tom, On Wed, 8 Nov 2023 at 06:02, Dave Cramer wrote: > > Dave Cramer > > > On Tue, 7 Nov 2023 at 10:26, Tom Lane wrote: > >> Dave Cramer writes: >> > If we use a Portal it is possible to open the portal and do a describe >> and >> > then Fetch N records. >> >> > Using a Cursor we open

Re: Incremental backup from a streaming replication standby fails

2024-07-25 Thread Robert Haas
On Thu, Jul 25, 2024 at 8:51 AM Laurenz Albe wrote: > The attached patch uses your wording for the first sentence. > > I left out the last sentence from your suggestion, because it sounded > like it is likely to confuse the reader. I think you just wanted to > say that there are other possible

Re: Add minimal C example and SQL registration example for custom table access methods.

2024-07-25 Thread Tom Lane
I noticed that there were two CF entries pointing at this thread: https://commitfest.postgresql.org/48/4655/ https://commitfest.postgresql.org/48/4973/ That doesn't seem helpful, so I've marked the second one "Withdrawn". regards, tom lane

Re: xid_wraparound tests intermittent failure.

2024-07-25 Thread Masahiko Sawada
On Thu, Jul 25, 2024 at 11:06 AM Masahiko Sawada wrote: > > On Thu, Jul 25, 2024 at 10:56 AM Andrew Dunstan wrote: > > > > > > On 2024-07-23 Tu 6:59 PM, Masahiko Sawada wrote: > > > > See > > > > > > > > The

Re: Statistics Import and Export

2024-07-25 Thread Jeff Davis
On Tue, 2024-07-23 at 17:48 -0400, Corey Huinker wrote: > Two functions: I see that you moved back to a combination function to serve both the "restore" use case as well as the "ad-hoc stats hacking" use case. The "restore" use case is the primary point of your patch, and that should be as

Re: Recent 027_streaming_regress.pl hangs

2024-07-25 Thread Tom Lane
Andrew Dunstan writes: > But yes we do seem to have seen a lot of recovery_check failures on > crake in the last 8 days, which is roughly when I changed PG_TEST_EXTRA > to get more coverage. I'm confused by crake's buildfarm logs. AFAICS it is not running recovery-check at all in most of the

Re: add function argument names to regex* functions.

2024-07-25 Thread Tom Lane
I wrote: > I haven't heard any further bikeshedding on the argument names, > so I'll move forward with committing this soon. Pushed, after a little further fooling with the documentation. regards, tom lane

Re: [Proposal] Add foreign-server health checks infrastructure

2024-07-25 Thread Fujii Masao
On 2024/07/24 20:40, Hayato Kuroda (Fujitsu) wrote: Attached patches contain above fixes and comment improvements per request from GPT-4o. Thanks for updating the patches! I’ve created a new base patch and split the v42-0001 patch into two parts to implement the feature and improvements

Re: Recent 027_streaming_regress.pl hangs

2024-07-25 Thread Andrew Dunstan
On 2024-07-25 Th 12:00 AM, Alexander Lakhin wrote: Hello Andrew, 04.06.2024 13:00, Alexander Lakhin wrote: Also, 027_stream_regress still fails due to the same reason: https://buildfarm.postgresql.org/cgi-bin/show_log.pl?nm=serinus=2024-05-22%2021%3A55%3A03

Re: xid_wraparound tests intermittent failure.

2024-07-25 Thread Masahiko Sawada
On Thu, Jul 25, 2024 at 10:56 AM Andrew Dunstan wrote: > > > On 2024-07-23 Tu 6:59 PM, Masahiko Sawada wrote: > > See > > > > The failure logs are from a run where both tests 1 and 2 failed. > > Thank you for

Re: Serverside SNI support in libpq

2024-07-25 Thread Jacob Champion
On Fri, May 24, 2024 at 12:55 PM Cary Huang wrote: > pg_hosts should also have sslpassword_command just like in the > postgresql.conf in > case the sslkey for a particular host is encrypted with a different password. Good point. There is also the HBA-related handling of client certificate

Re: xid_wraparound tests intermittent failure.

2024-07-25 Thread Andrew Dunstan
On 2024-07-23 Tu 6:59 PM, Masahiko Sawada wrote: See The failure logs are from a run where both tests 1 and 2 failed. Thank you for sharing the logs. I think that the problem seems to match what Alexander

Re: Serverside SNI support in libpq

2024-07-25 Thread Jacob Champion
On Fri, May 10, 2024 at 7:23 AM Daniel Gustafsson wrote: > The way multiple certificates are handled is that libpq creates one SSL_CTX > for > each at startup, and switch to the appropriate one when the connection is > inspected. I fell in a rabbit hole while testing this patch, so this review

Re: DRAFT: Pass sk_attno to consistent function

2024-07-25 Thread Michał Kłeczek
Hi Tom, Thanks for looking at it. > On 24 Jul 2024, at 22:19, Tom Lane wrote: > > =?utf-8?Q?Micha=C5=82_K=C5=82eczek?= writes: >> I understand extensibility of GIST makes many operators opaque to the >> planner and it is the “consistent” function that can perform optimisations >> (or we can

Re: Possible null pointer dereference in afterTriggerAddEvent()

2024-07-25 Thread Alvaro Herrera
On 2024-Jul-25, Alexander Kuznetsov wrote: Hello Alexander, > In src/backend/commands/trigger.c:4031, there is an > afterTriggerAddEvent() function. The variable chunk is assigned the > value of events->tail at line 4050. Subsequently, chunk is compared to > NULL at lines 4051 and 4079,

Re: Sporadic connection-setup-related test failures on Cygwin in v15-

2024-07-25 Thread Alexander Lakhin
25.07.2024 19:25, Andrew Dunstan wrote: +1. I'm not planning to back-patch that work. Perhaps lorikeet could stop testing releases < 16? They don't work and it's not our bug[1]. We decided not to drop Cygwin support[2], but I don't think we're learning anything from investigating that noise

Possible null pointer dereference in afterTriggerAddEvent()

2024-07-25 Thread Alexander Kuznetsov
Hello everyone, In src/backend/commands/trigger.c:4031, there is an afterTriggerAddEvent() function. The variable chunk is assigned the value of events->tail at line 4050. Subsequently, chunk is compared to NULL at lines 4051 and 4079, indicating that events->tail could potentially be NULL.

Re: Support logical replication of DDLs

2024-07-25 Thread Konstantin Berkaev
чт, 25 июл. 2024 г. в 12:35, Amit Kapila : > On Thu, Mar 28, 2024 at 5:31 PM Andrey M. Borodin > wrote: > > > > This thread is registered on CF [0] but is not active since 2023. Is > anyone working on this? I understand that this is a nice feature. Should we > move it to next CF or withdraw CF

Re: Sporadic connection-setup-related test failures on Cygwin in v15-

2024-07-25 Thread Andrew Dunstan
On 2024-07-24 We 4:58 PM, Thomas Munro wrote: On Thu, Jul 25, 2024 at 1:00 AM Alexander Lakhin wrote: The important fact here is that this failure is not reproduced after 7389aad63 (in v16), so it seems that it's somehow related to signal processing. Given that, I'm inclined to stop here,

Re: Reducing the log spam

2024-07-25 Thread Laurenz Albe
Thanks for the review! On Wed, 2024-07-24 at 15:27 +0200, Rafia Sabih wrote: > I liked the idea for this patch. I will also go for the default being > an empty string. > I went through this patch and have some comments on the code, > > 1. In general, I don't like the idea of goto, maybe we can

Re: CREATE MATERIALIZED VIEW

2024-07-25 Thread Nathan Bossart
On Thu, Jul 25, 2024 at 04:10:37PM +0100, Dagfinn Ilmari Mannsåker wrote: > Done: https://commitfest.postgresql.org/49/5139/ > > I've taken the liberty of setting you as the committer, and the target > version to 17 even though it turns out to be an older bug, since it's > arguably a follow-on

Re: [PATCH] Add crc32(text) & crc32(bytea)

2024-07-25 Thread Nathan Bossart
On Thu, Jul 18, 2024 at 02:24:23PM +0300, Aleksander Alekseev wrote: > I vaguely recall that I faced this problem before. Supporting crc32 > was requested on the mailing list [2] and a number of workarounds > exist in PL/pgSQL [3][4]. Since there seems to be a demand and it > costs us nothing to

Re: CREATE MATERIALIZED VIEW

2024-07-25 Thread Dagfinn Ilmari Mannsåker
Nathan Bossart writes: > On Thu, Jul 25, 2024 at 03:49:02PM +0100, Dagfinn Ilmari Mannsåker wrote: >> Nathan Bossart writes: >>> However, since it looks like the feature was never actually supported in a >>> release, and the revert has been in place for over a decade, I think it'd >>> be

Re: CREATE MATERIALIZED VIEW

2024-07-25 Thread Nathan Bossart
On Thu, Jul 25, 2024 at 03:49:02PM +0100, Dagfinn Ilmari Mannsåker wrote: > Nathan Bossart writes: >> However, since it looks like the feature was never actually supported in a >> release, and the revert has been in place for over a decade, I think it'd >> be reasonable to remove the tab

Re: CREATE MATERIALIZED VIEW

2024-07-25 Thread Dagfinn Ilmari Mannsåker
Nathan Bossart writes: > On Thu, Jul 25, 2024 at 03:09:09PM +0100, Dagfinn Ilmari Mannsåker wrote: >> Scratch that, I misread the diff. The tab completion has been there >> since matviews were added in commit 3bf3ab8c5636, but the restriction on >> unlogged matviews was added later in commit

Re: CREATE MATERIALIZED VIEW

2024-07-25 Thread Nathan Bossart
On Thu, Jul 25, 2024 at 03:09:09PM +0100, Dagfinn Ilmari Mannsåker wrote: > Scratch that, I misread the diff. The tab completion has been there > since matviews were added in commit 3bf3ab8c5636, but the restriction on > unlogged matviews was added later in commit 3223b25ff73, which failed to >

Re: pgsql: Add more SQL/JSON constructor functions

2024-07-25 Thread Amit Langote
On Wed, Jul 24, 2024 at 3:25 PM jian he wrote: > transformJsonFuncExpr we have: > case JSON_QUERY_OP: > if (jsexpr->returning->typid != JSONBOID || jsexpr->omit_quotes) > jsexpr->use_json_coercion = true; > > case JSON_VALUE_OP: > if

Re: CREATE MATERIALIZED VIEW

2024-07-25 Thread Dagfinn Ilmari Mannsåker
Dagfinn Ilmari Mannsåker writes: > px shi writes: > >> Hi, I see that materialized view cannot be unlogged now, but when I use >> psql and type CREATE UNLOGGED, pressing the Tab key for auto-completion >> suggests `TABLE` and MATERIALIZED VIEW. >> Shouldn't `MATERIALIZED VIEW ` be suggested? >

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

2024-07-25 Thread Alena Rybakina
On 22.07.2024 03:52, Alexander Korotkov wrote: Hi, Alena! Let me answer to some of your findings. On Mon, Jul 22, 2024 at 12:53 AM Alena Rybakina wrote: To be honest,I saw a larger problem. Look at the query bellow: master: alena@postgres=# create table t (a int not null, b int not null,

Re: CREATE MATERIALIZED VIEW

2024-07-25 Thread Dagfinn Ilmari Mannsåker
px shi writes: > Hi, I see that materialized view cannot be unlogged now, but when I use > psql and type CREATE UNLOGGED, pressing the Tab key for auto-completion > suggests `TABLE` and MATERIALIZED VIEW. > Shouldn't `MATERIALIZED VIEW ` be suggested? That's my fault, I added it in commit

Re: Add 64-bit XIDs into PostgreSQL 15

2024-07-25 Thread wenhui qiu
Maybe a setting similar to max_wal_size could be better for that? +1 Thanks Peter Eisentraut 于2024年7月25日周四 21:31写道: > On 25.07.24 13:09, Heikki Linnakangas wrote: > >> However, if there is no more disaster threshold at 2^31, what is the > >> guidance for setting these? Or more radically, why

Re: proposal: schema variables

2024-07-25 Thread Laurenz Albe
Thanks for the updated patch set. I found a problem in 0019-transactional-variables.patch: --- a/doc/src/sgml/catalogs.sgml +++ b/doc/src/sgml/catalogs.sgml @@ -9851,6 +9851,17 @@ SCRAM-SHA-256$iteration count: + + varistransact + boolean + + +

Re: Typos in the code and README

2024-07-25 Thread Daniel Gustafsson
> On 4 Jul 2024, at 19:00, Alexander Lakhin wrote: > Please look at another bunch of inconsistencies/orphaned entities I found > in the tree, with the possible substitutions: Thanks for these, and sorry for the delay in processing them (summer happened etc). I've started to go through them and

Re: add function argument names to regex* functions.

2024-07-25 Thread Peter Eisentraut
On 15.07.24 16:52, Chapman Flack wrote: On 07/15/24 10:46, Chapman Flack wrote: Ah, I may have mistaken which functions the patch meant to apply to. ... Any choice to use similar argument names in the regexp_* functions would be a matter of consistency with the analogous ISO functions, not

Re: Add 64-bit XIDs into PostgreSQL 15

2024-07-25 Thread Peter Eisentraut
On 25.07.24 13:09, Heikki Linnakangas wrote: However, if there is no more disaster threshold at 2^31, what is the guidance for setting these?  Or more radically, why even run transaction-count-based vacuum at all? To allow the CLOG to be truncated. There's no disaster anymore, but without

Re: Incremental backup from a streaming replication standby fails

2024-07-25 Thread Laurenz Albe
On Wed, 2024-07-24 at 15:27 -0400, Robert Haas wrote: > On Wed, Jul 24, 2024 at 6:46 AM Laurenz Albe wrote: > >    An incremental backup is only possible if replay would begin from a later > >    checkpoint than the checkpoint that started the previous backup upon > > which > >    it depends. >

Re: Remove duplicate table scan in logical apply worker and code refactoring

2024-07-25 Thread Kirill Reshke
Hi! > When reviewing the code in logical/worker.c, I noticed that when applying a > cross-partition update action, it scans the old partition twice. Nice catch! > -/* > - * Workhorse for apply_handle_update() > - * relinfo is for the relation we're actually updating in > - * (could be a child

Re: Add 64-bit XIDs into PostgreSQL 15

2024-07-25 Thread Chris Travers
On Thu, Jul 25, 2024 at 5:19 PM Peter Eisentraut wrote: > On 23.07.24 11:13, Aleksander Alekseev wrote: > >> Here is the fix. It can be tested like this: > >> [...] > > > > PFA the rebased patchset. > > I'm wondering about the 64-bit GUCs. > > At first, it makes sense that if there are settings

Re: fairywren timeout failures on the pg_amcheck/005_opclass_damage test

2024-07-25 Thread Andrew Dunstan
On 2024-07-25 Th 8:00 AM, Alexander Lakhin wrote: Hello hackers, Please take a look at today's failure [1], that raises several questions at once: 117/244 postgresql:pg_upgrade / pg_upgrade/002_pg_upgrade TIMEOUT    3001.48s   exit status 1 180/244 postgresql:pg_amcheck /

fairywren timeout failures on the pg_amcheck/005_opclass_damage test

2024-07-25 Thread Alexander Lakhin
Hello hackers, Please take a look at today's failure [1], that raises several questions at once: 117/244 postgresql:pg_upgrade / pg_upgrade/002_pg_upgrade TIMEOUT    3001.48s   exit status 1 180/244 postgresql:pg_amcheck / pg_amcheck/005_opclass_damage TIMEOUT    3001.43s   exit status

CREATE MATERIALIZED VIEW

2024-07-25 Thread px shi
Hi, I see that materialized view cannot be unlogged now, but when I use psql and type CREATE UNLOGGED, pressing the Tab key for auto-completion suggests `TABLE` and MATERIALIZED VIEW. Shouldn't `MATERIALIZED VIEW ` be suggested?

Re: Add 64-bit XIDs into PostgreSQL 15

2024-07-25 Thread Heikki Linnakangas
On 25/07/2024 13:19, Peter Eisentraut wrote: I'm wondering about the 64-bit GUCs. At first, it makes sense that if there are settings that are counted in terms of transactions, and transaction numbers are 64-bit integers, then those settings should accept 64-bit integers. But what is the

Re: Conflict detection and logging in logical replication

2024-07-25 Thread Amit Kapila
On Thu, Jul 25, 2024 at 12:04 PM Zhijie Hou (Fujitsu) wrote: > > Here is the V6 patch set which addressed Shveta and Nisha's comments > in [1][2][3][4]. > Do we need an option detect_conflict for logging conflicts? The possible reason to include such an option is to avoid any overhead during

<    2   3   4   5   6   7   8   9   10   11   >