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

2024-07-25 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-25 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 patch

Re: Conflict detection and logging in logical replication

2024-07-25 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 primary

Re: Conflict detection and logging in logical replication

2024-07-25 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 set

Re: Logical Replication of sequences

2024-07-25 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 contai

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

2024-07-25 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-25 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 and

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 workar

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 is

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 values(1,1

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, f

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 nit

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 i

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: See

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 discussi

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? Ye

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: https://buildfarm.postgresql.org/cgi-bin/show_log.pl?nm=crake&dt=2024-07-2

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 h

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 >> FOR

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 b

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&dt=2024-07-25%2013%3A27%3A02 Oh, I see it: the lo

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 nothi

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 mus

[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 t

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 ca

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 fai

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 simple

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 r

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 ste

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&dt=2024-05-22%2021%3A55%3A03 https://buildfarm.postgresql.o

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 sha

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 settin

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 La

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 i

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, indicatin

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 i

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. H

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 en

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, with

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 ha

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 fix

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 ma

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 reasona

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 completio

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 3223

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 > upd

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 (jsexpr-

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, c

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 c951e9

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 e

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$:&l + + 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 anyth

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 fre

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 p

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 t

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 / pg_amcheck/005_o

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 pur

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 appl

Remove duplicate table scan in logical apply worker and code refactoring

2024-07-25 Thread Zhijie Hou (Fujitsu)
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. I am attaching the patch 0001 to remove this duplicate table scan. The test shows that it brings noticeable improvement: Steps - Pub: create table

Re: Add 64-bit XIDs into PostgreSQL 15

2024-07-25 Thread Peter Eisentraut
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 that are counted in terms of transactions, and transaction numbers are 64-bit i

Re: Logical Replication of sequences

2024-07-25 Thread shveta malik
On Thu, Jul 25, 2024 at 12:08 PM shveta malik wrote: > > On Thu, Jul 25, 2024 at 9:06 AM vignesh C wrote: > > > > The attached v20240725 version patch has the changes for the same. > > Thank You for addressing the comments. Please review below issues: > > 1) Sub ahead of pub due to wrong initial

Re: why there is not VACUUM FULL CONCURRENTLY?

2024-07-25 Thread Kirill Reshke
Hi! On Tue, 30 Jan 2024 at 15:31, Alvaro Herrera wrote: > FWIW a newer, more modern and more trustworthy alternative to pg_repack > is pg_squeeze, which I discovered almost by random chance, and soon > discovered I liked it much more. Can you please clarify this a bit more? What is the exact re

RE: Parallel heap vacuum

2024-07-25 Thread Hayato Kuroda (Fujitsu)
Dear Sawada-san, > Thank you for the test! > > I could reproduce this issue and it's a bug; it skipped even > non-all-visible pages. I've attached the new version patch. > > BTW since we compute the number of parallel workers for the heap scan > based on the table size, it's possible that we lau

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

2024-07-25 Thread Daniel Gustafsson
> On 25 Jul 2024, at 04:58, Nathan Bossart wrote: > > On Mon, Jul 22, 2024 at 03:07:10PM -0500, Nathan Bossart wrote: >> Here is a new patch set. I've included the latest revision of the patch to >> fix get_db_subscription_count() from the other thread [0] as 0001 since I >> expect that to be co

Re: improve ssl error code, 2147483650

2024-07-25 Thread Daniel Gustafsson
> On 24 Jul 2024, at 15:32, Peter Eisentraut wrote: > > On 25.06.24 16:21, Tom Lane wrote: >> Peter Eisentraut writes: >>> On 21.06.24 16:53, Tom Lane wrote: Most of libpq gets at strerror_r via SOCK_STRERROR for Windows portability. Is that relevant here? >>> Looking inside the OpenS

Re: REINDEX not updating partition progress

2024-07-25 Thread 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 being created. + OID of the table on which the com

Re: PG buildfarm member cisticola

2024-07-25 Thread Michael Paquier
On Wed, Jul 24, 2024 at 01:09:22PM +0200, Alvaro Herrera wrote: > Hmm, it appears that these symbols did not exist in 1.1.1g, and since > neither of them is invoked directly by the Postgres code, maybe the > reason for this is that the OpenSSL headers being used do not correspond > to the library b

Re: Support prepared statement invalidation when result types change

2024-07-25 Thread Jelte Fennema-Nio
On Wed, 24 Jul 2024 at 17:39, Tom Lane wrote: > > This patch starts to allow a prepared statement to continue to work even > > when the result type changes. > > What this is is a wire protocol break. Yeah that's what I realised as well in my latest email. I withdrew this patch from the commitfest

Re: Can we rely on the ordering of paths in pathlist?

2024-07-25 Thread wenhui qiu
Hi Richard Guo Is it necessary to add some comments here? + if (!innerpath->parallel_safe || + !bms_is_empty(PATH_REQ_OUTER(innerpath))) + continue; + + if (matched_path != NULL && + compare_path_costs(matched_path, innerpath, TOTAL_COST) <= 0) + continue; + + matched_path = innerpath; Richa

Re: pg_upgrade and logical replication

2024-07-25 Thread Michael Paquier
On Wed, Jul 24, 2024 at 10:16:51PM -0500, Nathan Bossart wrote: > On Thu, Jul 25, 2024 at 08:43:03AM +0530, Amit Kapila wrote: >>> Shall we close the open items? >> >> Sorry for the typo. There is only one open item corresponding to this: >> "Subscription and slot information retrieval inefficienc

Re: Convert node test compile-time settings into run-time parameters

2024-07-25 Thread Peter Eisentraut
On 24.05.24 16:39, Tom Lane wrote: Maybe not three settings, but a single setting, with multiple values, like debug_io_direct? Yeah, good idea. Let's get some more feedback on this before I code up a complicated list parser. Kinda doubt it's worth the trouble, either to code the GUC support or

rare crash - FailedAssertion snapbuild.c Line: 580

2024-07-25 Thread Pradeep Kumar
Hello all, Message Id: https://www.postgresql.org/message-id/flat/3808dc548e144c860fc3fe57de013809%40xs4all.nl#72629a188e99e14387230fccc8eef518 Actually I'm also facing this issue. Any solution regarding this? .Kindly give me the explanation of why this error occurs. Thanks and regards Pradeep

Re: Logical Replication of sequences

2024-07-25 Thread Peter Smith
Hi, here are more review comments for patch v20240720-0003. == src/backend/catalog/pg_subscription.c (Numbers are starting at #4 because this is a continuation of the docs review) 4. GetSubscriptionRelations nitpick - rearranged the function header comment ~ 5. TBH, I'm thinking that just