Re: Enhanced error message to include hint messages for redundant options error

2021-05-02 Thread Bharath Rupireddy
On Sun, May 2, 2021 at 8:44 PM vignesh C wrote: > > On Sat, May 1, 2021 at 9:02 PM Bharath Rupireddy > wrote: > > > > On Sat, May 1, 2021 at 7:25 PM vignesh C wrote: > > > > > I'm not attaching above one line change as a patch, maybe Vignesh can > > > > > merge this into the main patch. > > > >

Re: Logical Replication - behavior of TRUNCATE ... CASCADE

2021-05-02 Thread Dilip Kumar
On Mon, May 3, 2021 at 10:42 AM Bharath Rupireddy wrote: > > Hi, > > In apply_handle_truncate, the following comment before ExecuteTruncateGuts > says that it defaults to RESTRICT even if the CASCADE option has been > specified in publisher's TRUNCATE command. > /* > * Even if we used C

Re: Dump public schema ownership & seclabels

2021-05-02 Thread Noah Misch
On Sat, May 01, 2021 at 09:43:36AM -0700, Zhihong Yu wrote: > On Sat, May 1, 2021 at 8:16 AM Asif Rehman wrote: > > The following review has been posted through the commitfest application: > > make installcheck-world: tested, passed > > Implements feature: tested, passed > > Spec compliant:

Re: WIP: WAL prefetch (another approach)

2021-05-02 Thread Thomas Munro
On Sun, May 2, 2021 at 3:16 PM Tom Lane wrote: > That last point means that there was some hard-to-hit problem even > before any of the recent WAL-related changes. However, 323cbe7c7 > (Remove read_page callback from XLogReader) increased the failure > rate by at least a factor of 5, and 1d257577

Re: Identify missing publications from publisher while create/alter subscription.

2021-05-02 Thread Bharath Rupireddy
On Sun, May 2, 2021 at 10:04 PM vignesh C wrote: > > 5) Instead of adding a new file 021_validate_publications.pl for > > tests, spawning a new test database which would make the overall > > regression slower, can't we add with the existing database nodes in > > 0001_rep_changes.pl? I would sugges

Re: Replication slot stats misgivings

2021-05-02 Thread Amit Kapila
On Fri, Apr 30, 2021 at 1:47 PM Amit Kapila wrote: > > LGTM. I have slightly edited the comments in the attached. I'll push > this early next week unless there are more comments. > Pushed. -- With Regards, Amit Kapila.

Re: Replication slot stats misgivings

2021-05-02 Thread Amit Kapila
On Thu, Apr 29, 2021 at 10:37 AM Amit Kapila wrote: > > On Wed, Apr 28, 2021 at 7:43 PM Masahiko Sawada wrote: > > > > On Wed, Apr 28, 2021 at 3:25 PM Amit Kapila wrote: > > > > > > > > I am not sure if any of these alternatives are a good idea. What do > > > you think? Do you have any other ide

Re: Identify missing publications from publisher while create/alter subscription.

2021-05-02 Thread Dilip Kumar
On Sun, May 2, 2021 at 10:04 PM vignesh C wrote: > > Thanks for the comments. > The Attached patch has the fixes for the same. I was reviewing the documentation part, I think in the below paragraph we should include validate_publication as well? connect (boolean)

Logical Replication - behavior of TRUNCATE ... CASCADE

2021-05-02 Thread Bharath Rupireddy
Hi, In apply_handle_truncate, the following comment before ExecuteTruncateGuts says that it defaults to RESTRICT even if the CASCADE option has been specified in publisher's TRUNCATE command. /* * Even if we used CASCADE on the upstream primary we explicitly default * to replaying ch

Re: Remove redundant variable from transformCreateStmt

2021-05-02 Thread Amul Sul
On Fri, Apr 30, 2021 at 10:49 AM Bharath Rupireddy wrote: > > On Fri, Apr 30, 2021 at 7:07 AM Justin Pryzby wrote: > > > > On Thu, Apr 29, 2021 at 02:39:42PM -0400, Alvaro Herrera wrote: > > > On 2021-Apr-29, Tom Lane wrote: > > > > Alvaro Herrera writes: > > > > > I'd do it like this. Note I r

Re: WIP: WAL prefetch (another approach)

2021-05-02 Thread Thomas Munro
On Thu, Apr 29, 2021 at 12:24 PM Tom Lane wrote: > Andres Freund writes: > > On 2021-04-28 19:24:53 -0400, Tom Lane wrote: > >> IOW, we've spent over twice as many CPU cycles shipping data to the > >> standby as we did in applying the WAL on the standby. > > > I don't really know how the time cal

Re: pg_upgrade not preserving comments on predefined roles

2021-05-02 Thread Tom Lane
Chapman Flack writes: > Is there an inherent technical or policy reason for pg_upgrade not to > preserve comments on predefined roles (or on predefined objects generally)? I think this is absolutely out of scope for pg_dump. We generally expect that system objects' properties are not dumped, bec

pg_upgrade not preserving comments on predefined roles

2021-05-02 Thread Chapman Flack
Hi hackers, I recently did a pg_upgrade to 13 at $work, and noticed it did not preserve the comments I had added locally on the pg_* predefined roles. We have a bgworker that runs periodically and makes a report of existing roles, memberships, and grants, showing the comments on the roles, so I h

Re: websearch_to_tsquery() returns queries that don't match to_tsvector()

2021-05-02 Thread Alexander Korotkov
On Sun, May 2, 2021 at 9:37 PM Tom Lane wrote: > Alexander Korotkov writes: > > On Sun, May 2, 2021 at 9:04 PM Tom Lane wrote: > >> - state.in_quotes = false; > >> > >> This change seems wrong/unsafe too. > > > It seems OK, because this patch removes in_quotes field altogether. > > Oh, sor

Re: websearch_to_tsquery() returns queries that don't match to_tsvector()

2021-05-02 Thread Tom Lane
Alexander Korotkov writes: > On Sun, May 2, 2021 at 9:04 PM Tom Lane wrote: >> - state.in_quotes = false; >> >> This change seems wrong/unsafe too. > It seems OK, because this patch removes in_quotes field altogether. Oh, sorry, I misread the patch --- I thought that earlier hunk was rem

Re: websearch_to_tsquery() returns queries that don't match to_tsvector()

2021-05-02 Thread Alexander Korotkov
On Sun, May 2, 2021 at 9:17 PM Zhihong Yu wrote: > One minor comment: > + /* iterate to the closing quotes or end of the string*/ > > closing quotes -> closing quote Yep, I've missed the third place to change from plural to single form :) -- Regards, Alexander Korotkov 00

Re: websearch_to_tsquery() returns queries that don't match to_tsvector()

2021-05-02 Thread Zhihong Yu
On Sun, May 2, 2021 at 11:12 AM Alexander Korotkov wrote: > On Sun, May 2, 2021 at 9:06 PM Zhihong Yu wrote: > > + /* Everything is quotes is processed as a single > token */ > > > > is quotes -> in quotes > > > > + /* iterate to the closing quotes or end of t

Re: websearch_to_tsquery() returns queries that don't match to_tsvector()

2021-05-02 Thread Alexander Korotkov
On Sun, May 2, 2021 at 9:06 PM Zhihong Yu wrote: > + /* Everything is quotes is processed as a single token */ > > is quotes -> in quotes > > + /* iterate to the closing quotes or end of the string*/ > > closing quotes -> closing quote > > + /*

Re: websearch_to_tsquery() returns queries that don't match to_tsvector()

2021-05-02 Thread Alexander Korotkov
On Sun, May 2, 2021 at 9:04 PM Tom Lane wrote: > Alexander Korotkov writes: > > Ooops, I've included this by oversight. The next revision is attached. > > Anything besides that? > > Some quick eyeball review: > > +/* Everything is quotes is processed as a single token */ > >

Re: websearch_to_tsquery() returns queries that don't match to_tsvector()

2021-05-02 Thread Zhihong Yu
On Sun, May 2, 2021 at 10:57 AM Alexander Korotkov wrote: > On Sun, May 2, 2021 at 8:52 PM Tom Lane wrote: > > Alexander Korotkov writes: > > > It seems there is another bug with phrase search and query parsing. > > > It seems to me that since 0c4f355c6a websearch_to_tsquery() should > > > just

Re: websearch_to_tsquery() returns queries that don't match to_tsvector()

2021-05-02 Thread Tom Lane
Alexander Korotkov writes: > Ooops, I've included this by oversight. The next revision is attached. > Anything besides that? Some quick eyeball review: +/* Everything is quotes is processed as a single token */ Should read "Everything in quotes ..." -/*

Re: websearch_to_tsquery() returns queries that don't match to_tsvector()

2021-05-02 Thread Alexander Korotkov
On Sun, May 2, 2021 at 8:52 PM Tom Lane wrote: > Alexander Korotkov writes: > > It seems there is another bug with phrase search and query parsing. > > It seems to me that since 0c4f355c6a websearch_to_tsquery() should > > just parse text in quotes as a single token. Besides fixing this bug, > >

Re: websearch_to_tsquery() returns queries that don't match to_tsvector()

2021-05-02 Thread Tom Lane
Alexander Korotkov writes: > It seems there is another bug with phrase search and query parsing. > It seems to me that since 0c4f355c6a websearch_to_tsquery() should > just parse text in quotes as a single token. Besides fixing this bug, > it simplifies the code. OK ... > Trying to fix this bug

Re: websearch_to_tsquery() returns queries that don't match to_tsvector()

2021-05-02 Thread Alexander Korotkov
Hi! On Mon, Apr 19, 2021 at 9:57 AM Valentin Gatien-Baron wrote: > Looking at the tsvector and tsquery, we can see that the problem is > that the ":" counts as one position for the ts_query but not the > ts_vector: > > select to_tsvector('english', 'aaa: bbb'), websearch_to_tsquery('english', >

Re: Regex performance regression induced by match-all code

2021-05-02 Thread Tom Lane
"Joel Jacobson" writes: > On Sat, May 1, 2021, at 21:46, Tom Lane wrote: >> I found a nasty performance problem in commit 824bf7190: given the >> right sort of regex, checkmatchall() takes an unreasonable amount >> of time. > Nice catch. > I've successfully tested the patch on the regex corpus:

Re: Identify missing publications from publisher while create/alter subscription.

2021-05-02 Thread vignesh C
On Sat, May 1, 2021 at 7:58 PM Bharath Rupireddy wrote: > > On Sat, May 1, 2021 at 12:49 PM vignesh C wrote: > > Thanks for the comments, Attached patch has the fixes for the same. > > Thoughts? > > Few more comments on v5: > > 1) Deletion of below empty new line is spurious: > - > /* > * Comm

Re: Enhanced error message to include hint messages for redundant options error

2021-05-02 Thread vignesh C
On Sat, May 1, 2021 at 9:02 PM Bharath Rupireddy wrote: > > On Sat, May 1, 2021 at 7:25 PM vignesh C wrote: > > > > I'm not attaching above one line change as a patch, maybe Vignesh can > > > > merge this into the main patch. > > > > Thanks for the comments. I have merged the change into the atta

Re: Enhanced error message to include hint messages for redundant options error

2021-05-02 Thread vignesh C
On Sat, May 1, 2021 at 10:54 PM Alvaro Herrera wrote: > > On 2021-May-01, vignesh C wrote: > > > On Thu, Apr 29, 2021 at 10:44 PM Alvaro Herrera > > wrote: > > > > > > On 2021-Apr-29, vignesh C wrote: > > > > > > > Thanks for the comments, please find the attached v3 patch which has > > > > the

Re: Enhanced error message to include hint messages for redundant options error

2021-05-02 Thread Julien Rouhaud
Le dim. 2 mai 2021 à 18:31, vignesh C a écrit : > On Sun, May 2, 2021 at 4:27 AM Alvaro Herrera > wrote: > > > > On 2021-May-01, Bharath Rupireddy wrote: > > > > > IMO, it's not good to change the function API just for showing up > > > parse_position (which is there for cosmetic reasons I feel)

Re: Enhanced error message to include hint messages for redundant options error

2021-05-02 Thread vignesh C
On Sun, May 2, 2021 at 4:27 AM Alvaro Herrera wrote: > > On 2021-May-01, Bharath Rupireddy wrote: > > > IMO, it's not good to change the function API just for showing up > > parse_position (which is there for cosmetic reasons I feel) in an error > > which actually has the option name clearly menti