Re: Regex performance regression induced by match-all code

2021-05-01 Thread Joel Jacobson
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. > fix-exponential-cost-of-checkmatchall-1.patch I've successfully tested the patch on

Re: Some oversights in query_id calculation

2021-05-01 Thread Julien Rouhaud
Hi Aleksander, On Wed, Apr 28, 2021 at 03:22:39PM +0300, Aleksander Alekseev wrote: > Hi Julien, > > > You should see failures doing a check-world or simply a make -C > > contrib/pg_stat_statements check > > Sorry, my bad. I was running make check-world, but did it with -j4 flag > which was a

Re: WIP: WAL prefetch (another approach)

2021-05-01 Thread Tom Lane
Thomas Munro writes: > On Thu, Apr 29, 2021 at 4:45 AM Tom Lane wrote: >> Andres Freund writes: >>> Tom, any chance you could check if your machine repros the issue before >>> these commits? >> Wilco, but it'll likely take a little while to get results ... > FWIW I also chewed through many

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

2021-05-01 Thread Alvaro Herrera
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 mentioned in the error message. Why not? We've done it before, I'm

Re: Granting control of SUSET gucs to non-superusers

2021-05-01 Thread Michael Banck
Hi, On Fri, Apr 30, 2021 at 04:19:22PM -0700, Mark Dilger wrote: > PostgreSQL defines a number of GUCs that can only be set by > superusers. I would like to support granting privileges on subsets of > these to non-superuser roles, inspired by Stephen Frost's recent work > on pg_read_all_data and

Re: performance benchmark

2021-05-01 Thread Yu Zhao
On Sat, May 1, 2021 at 12:55 AM Yu Zhao wrote: > > Greetings, > > We are proposing a patchset to the Linux kernel, which brings very > promising performance improvements under memory pressure. I'm > wondering if anybody would be interested in benchmarking it on top of > the latest 5.12 kernel. >

Re: Re: Perform COPY FROM encoding conversions in larger chunks

2021-05-01 Thread Chapman Flack
On 04/01/21 05:27, Heikki Linnakangas wrote: > I read through the patches one more time, made a few small comment fixes, > and pushed. Wow, this whole thread escaped my attention at the time, though my ears would have perked right up if the subject had been something like 'improve encoding

Regex performance regression induced by match-all code

2021-05-01 Thread Tom Lane
I found a nasty performance problem in commit 824bf7190: given the right sort of regex, checkmatchall() takes an unreasonable amount of time. For example, regression=# SELECT regexp_matches('', '(.|){20}',''); regexp_matches {""} (1 row) Time: 129.213 ms regression=# SELECT

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

2021-05-01 Thread Bharath Rupireddy
On Sat, May 1, 2021, 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 change

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

2021-05-01 Thread Alvaro Herrera
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 change for the first part. > > > > Looks good to me. I would only add

Re: [PATCH] Identify LWLocks in tracepoints

2021-05-01 Thread Dmitry Dolgov
> On Fri, Apr 30, 2021 at 11:23:56AM +0800, Craig Ringer wrote: > On Wed, 14 Apr 2021, 22:29 Robert Haas, wrote: > > > > I'm actually inclined to revise the patch I sent in order to *remove* > > > the LWLock name from the tracepoint argument. > > > Reducing the overheads is good, but I have no

Re: Dump public schema ownership & seclabels

2021-05-01 Thread Zhihong Yu
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: tested, passed > Documentation:not tested > >

Re: Granting control of SUSET gucs to non-superusers

2021-05-01 Thread Chapman Flack
On 05/01/21 12:13, Mark Dilger wrote: > Extra syntax for use by the service provider seems much easier to justify. > > If the service provider can install extra role-aware check_hooks for gucs, > and if the include directive for postgresql.conf can specify a role under > which a

Re: Transactions involving multiple postgres foreign servers, take 2

2021-05-01 Thread Zhihong Yu
On Fri, Apr 30, 2021 at 9:09 PM Masahiko Sawada wrote: > On Wed, Mar 17, 2021 at 6:03 PM Zhihong Yu wrote: > > > > Hi, > > For v35-0007-Prepare-foreign-transactions-at-commit-time.patch : > > Thank you for reviewing the patch! > > > > > With this commit, the foreign server modified within the

Re: Granting control of SUSET gucs to non-superusers

2021-05-01 Thread Mark Dilger
> On May 1, 2021, at 7:07 AM, Chapman Flack wrote: > > On 04/30/21 22:00, Mark Dilger wrote: >> Viewing all of this in terms of which controls allow the tenant to escape >> a hypothetical sandbox seems like the wrong approach. Shouldn't we let >> service providers decide which controls would

Re: function for testing that causes the backend to terminate

2021-05-01 Thread Andrew Dunstan
On 4/29/21 4:16 PM, Joe Conway wrote: > On 4/29/21 6:56 AM, Dave Cramer wrote: >> For testing unusual situations I'd like to be able to cause a backend >> to terminate due to something like a segfault. Do we currently have >> this in testing ? > > If you can run SQL as a superuser from that

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

2021-05-01 Thread Bharath Rupireddy
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 attached patch. > Thoughts? Thanks! v4 basically LGTM. Can we park this

Re: Dump public schema ownership & seclabels

2021-05-01 Thread Asif Rehman
The following review has been posted through the commitfest application: make installcheck-world: tested, passed Implements feature: tested, passed Spec compliant: tested, passed Documentation:not tested Hi, I have tested this patch. This patch still applies and it

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

2021-05-01 Thread Bharath Rupireddy
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: - /* * Common option parsing function for CREATE and ALTER SUBSCRIPTION commands. *

Re: Granting control of SUSET gucs to non-superusers

2021-05-01 Thread Chapman Flack
On 04/30/21 22:00, Mark Dilger wrote: > Viewing all of this in terms of which controls allow the tenant to escape > a hypothetical sandbox seems like the wrong approach. Shouldn't we let > service providers decide which controls would allow the tenant to escape > the specific sandbox the provider

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

2021-05-01 Thread vignesh C
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 change for the first part. > > Looks good to me. I would only add parser_errposition() to the few > error sites missing

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

2021-05-01 Thread vignesh C
On Sat, May 1, 2021 at 10:47 AM Dilip Kumar wrote: > > On Sat, May 1, 2021 at 10:43 AM Bharath Rupireddy > wrote: > > > > On Fri, Apr 30, 2021 at 2:49 PM Dilip Kumar wrote: > > > Looking into this again, why not as shown below? IMHO, this way the > > > code will be logically the same as it was

Re: Incorrect snapshots while promoting hot standby node when 2PC is used

2021-05-01 Thread Andrey Borodin
Hi Andres! > 23 апр. 2021 г., в 01:36, Andres Freund написал(а): > > So snapshots within that window will always be "empty", i.e. xmin is > latestCompletedXid and xmax is latestCompletedXid + 1. Once we reach 3), we'll > look at the procarray, which then leads xmin going back to 588. > > > I

Hook for extensible parsing.

2021-05-01 Thread Julien Rouhaud
Hi, Being able to extend core parser has been requested multiple times, and AFAICT all previous attempts were rejected not because this isn't wanted but because the proposed implementations required plugins to reimplement all of the core grammar with their own changes, as bison generated parsers

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

2021-05-01 Thread vignesh C
On Tue, Apr 13, 2021 at 8:01 PM Bharath Rupireddy wrote: > > On Tue, Apr 13, 2021 at 6:22 PM vignesh C wrote: > > > 2) How about > > > + Specifies whether the subscriber must verify the > > > publications that are > > > + being subscribed to are present in the publisher. By