Re: [PROPOSAL] new diagnostic items for the dynamic sql

2021-11-07 Thread Zhihong Yu
On Sun, Nov 7, 2021 at 5:23 AM Dinesh Chemuduru wrote: > Hi Pavel, > > On Sun, 7 Nov 2021 at 12:53, Pavel Stehule > wrote: > >> Hi >> >> pá 5. 11. 2021 v 19:27 odesílatel Dinesh Chemuduru < >> dinesh.ku...@migops.com> napsal: >> >>> Hi Daniel, >>> >>> Thank you for your follow up, and attaching

Re: Commitfest 2021-11 Patch Triage - Part 1

2021-11-07 Thread Daniel Gustafsson
> On 6 Nov 2021, at 02:12, Andy Fan wrote: > >> 1741: Index Skip Scan >> = >> An often requested feature which has proven hard to reach consensus on an >> implementation for. The thread(s) have stalled since May, > > This statement is not accurate. Peter started a new

Re: Predefined role pg_maintenance for VACUUM, ANALYZE, CHECKPOINT.

2021-11-07 Thread Andres Freund
On 2021-11-05 08:42:58 -0400, Robert Haas wrote: > On Thu, Nov 4, 2021 at 7:38 PM Jeff Davis wrote: > > It seems like this specific approach has been mostly shot down already. > > But out of curiosity, are you intending to run CHECKPOINT during > > bootstrap or something? > > Imagine a system

Re: postgres_fdw: commit remote (sub)transactions in parallel during pre-commit

2021-11-07 Thread Etsuro Fujita
On Tue, Nov 2, 2021 at 7:47 AM David Zhang wrote: > Followed your instructions, I performed some basic tests to compare the > performance between before and after. In my testing environment (two > foreign servers on the same local machine), the performance varies, > sometimes the time spent on

Re: Skipping logical replication transactions on subscriber side

2021-11-07 Thread Masahiko Sawada
On Fri, Nov 5, 2021 at 12:57 AM vignesh C wrote: > > On Fri, Oct 29, 2021 at 10:55 AM Masahiko Sawada > wrote: > > > > On Thu, Oct 28, 2021 at 7:40 PM Amit Kapila wrote: > > > > > > On Thu, Oct 28, 2021 at 10:36 AM Masahiko Sawada > > > wrote: > > > > > > > > On Wed, Oct 27, 2021 at 7:02 PM

Re: Skipping logical replication transactions on subscriber side

2021-11-07 Thread Masahiko Sawada
On Wed, Nov 3, 2021 at 12:41 PM Amit Kapila wrote: > > On Tue, Nov 2, 2021 at 2:17 PM Masahiko Sawada wrote: > > > > On Tue, Nov 2, 2021 at 2:35 PM Amit Kapila wrote: > > > > > > On Mon, Nov 1, 2021 at 7:18 AM Masahiko Sawada > > > wrote: > > > > > > > > On Fri, Oct 29, 2021 at 8:20 PM Amit

Re: Commitfest 2021-11 Patch Triage - Part 1

2021-11-07 Thread Daniel Gustafsson
> On 7 Nov 2021, at 10:26, Etsuro Fujita wrote: > > On Sat, Nov 6, 2021 at 6:16 AM Daniel Gustafsson wrote: >> 2601: Fast COPY FROM command for the foreign tables >> === >> This approach taken in this patch has stabilized and the benchmarks posted

Re: Predefined role pg_maintenance for VACUUM, ANALYZE, CHECKPOINT.

2021-11-07 Thread Andres Freund
Hi, On 2021-11-05 08:54:37 -0400, Robert Haas wrote: > On Thu, Nov 4, 2021 at 6:46 PM Andres Freund wrote: > > What about extending GRANT to allow to grant rights on commands? Yes, it'd > > be > > a bit of work to make that work in the catalogs, but it doesn't seem too > > hard > > to tackle.

Re: Commitfest 2021-11 Patch Triage - Part 1

2021-11-07 Thread Daniel Gustafsson
> On 6 Nov 2021, at 17:20, Tomas Vondra wrote: > > On 11/5/21 22:15, Daniel Gustafsson wrote: >> ... >> 1651: GROUP BY optimization >> === >> This is IMO a desired optimization, and after all the heavy lifting by Tomas >> the patch seems to be in pretty good shape. > > I

Re: [PROPOSAL] new diagnostic items for the dynamic sql

2021-11-07 Thread Dinesh Chemuduru
Hi Pavel, On Sun, 7 Nov 2021 at 12:53, Pavel Stehule wrote: > Hi > > pá 5. 11. 2021 v 19:27 odesílatel Dinesh Chemuduru < > dinesh.ku...@migops.com> napsal: > >> Hi Daniel, >> >> Thank you for your follow up, and attaching a new patch which addresses >> Pavel's comments. >> Let me know If I

Re: GiST operator class for bool

2021-11-07 Thread Tom Lane
Tomas Vondra writes: > Pushed, after adding some simple EXPLAIN to the regression test. skink is reporting that this has some valgrind issues [1]. I suspect sloppy conversion between bool and Datum, but didn't go looking. ==1805451== VALGRINDERROR-BEGIN ==1805451== Uninitialised byte(s) found

Re: amcheck's verify_heapam(), and HOT chain verification

2021-11-07 Thread Mark Dilger
> On Nov 6, 2021, at 3:09 PM, Peter Geoghegan wrote: > > I am quite willing to help out with all this, if you're interested. Yes, I am quite interested, though I will have to alternate between this work and the various patch sets that I've already submitted for this development cycle. I

Re: to be a multirange or not be, that's the question

2021-11-07 Thread David G. Johnston
On Saturday, November 6, 2021, Jaime Casanova wrote: > Ok, subject was a bit philosophical but this message I just found is > quite confusing. > > """ > regression=# select cast(null as anyrange) &> cast(null as anymultirange); > ERROR: argument declared anymultirange is not a multirange type

Re: [PROPOSAL] new diagnostic items for the dynamic sql

2021-11-07 Thread Pavel Stehule
Hi pá 5. 11. 2021 v 19:27 odesílatel Dinesh Chemuduru napsal: > Hi Daniel, > > Thank you for your follow up, and attaching a new patch which addresses > Pavel's comments. > Let me know If I miss anything here. > > > On Thu, 4 Nov 2021 at 17:40, Daniel Gustafsson wrote: > >> > On 9 Sep 2021, at

Re: Commitfest 2021-11 Patch Triage - Part 1

2021-11-07 Thread Etsuro Fujita
On Sat, Nov 6, 2021 at 6:16 AM Daniel Gustafsson wrote: > 2601: Fast COPY FROM command for the foreign tables > === > This approach taken in this patch has stabilized and the benchmarks posted are > very promising. It seems pretty uncontroversial

to be a multirange or not be, that's the question

2021-11-07 Thread Jaime Casanova
Ok, subject was a bit philosophical but this message I just found is quite confusing. """ regression=# select cast(null as anyrange) &> cast(null as anymultirange); ERROR: argument declared anymultirange is not a multirange type but type anymultirange """ -- Jaime Casanova Director de

Re: postgres_fdw: commit remote (sub)transactions in parallel during pre-commit

2021-11-07 Thread Etsuro Fujita
On Mon, Nov 1, 2021 at 3:22 PM Fujii Masao wrote: > On 2021/10/31 18:05, Etsuro Fujita wrote: > > The patch is pretty simple: if a server option added > > by the patch “parallel_commit” is enabled, > > Could you tell me why the parameter is necessary? > Can't we always enable the feature? I

Re: Slow standby snapshot

2021-11-07 Thread Andrey Borodin
Sorry for so late reply. I've been thinking about possible approaches. KnownAssignedXids over hashtable in fact was implemented long before and rejected [0]. > 3 авг. 2021 г., в 22:35, Andres Freund написал(а): > > On 2021-08-03 10:33:50 +0500, Andrey Borodin wrote: >>> 3 авг. 2021 г., в

Re: jsonb crash

2021-11-07 Thread David Rowley
On Sat, 6 Nov 2021 at 11:38, Justin Pryzby wrote: > > On Tue, Oct 26, 2021 at 07:07:01PM +1300, David Rowley wrote: > > Does anyone have any thoughts on the proposed fixes? > > I don't have any thoughts, but I want to be sure it isn't forgotten. Not forgotten. I was just hoping to get some

Re: GiST operator class for bool

2021-11-07 Thread Tomas Vondra
Hi, On 11/7/21 17:44, Tom Lane wrote: Tomas Vondra writes: Pushed, after adding some simple EXPLAIN to the regression test. skink is reporting that this has some valgrind issues [1]. I suspect sloppy conversion between bool and Datum, but didn't go looking. It's actually a bit worse than

Re: Schema variables - new implementation for Postgres 15

2021-11-07 Thread Tomas Vondra
On 11/6/21 16:40, Pavel Stehule wrote: so 6. 11. 2021 v 15:57 odesílatel Justin Pryzby > napsal: On Sat, Nov 06, 2021 at 04:45:19AM +0100, Pavel Stehule wrote: > st 3. 11. 2021 v 14:05 odesílatel Tomas Vondra mailto:tomas.von...@enterprisedb.com>>

Re: Commitfest 2021-11 Patch Triage - Part 1

2021-11-07 Thread Alvaro Herrera
On 2021-Nov-05, Daniel Gustafsson wrote: > 2716: fix spinlock contention in LogwrtResult > = > This addresses a bottleneck which definitely seems like one we want to fix, I > don't have a hard time imagining it impacting other production usecases then >

Re: lastOverflowedXid does not handle transaction ID wraparound

2021-11-07 Thread Kyotaro Horiguchi
At Sat, 6 Nov 2021 19:16:09 +0300, Alexander Korotkov wrote in > Pushed! Thanks! -- Kyotaro Horiguchi NTT Open Source Software Center

Re: Schema variables - new implementation for Postgres 15

2021-11-07 Thread Tomas Vondra
On 11/6/21 04:45, Pavel Stehule wrote: Hi st 3. 11. 2021 v 14:05 odesílatel Tomas Vondra mailto:tomas.von...@enterprisedb.com>> napsal: Hi, I took a quick look at the latest patch version. In general the patch looks pretty complete and clean, and for now I have only some basic

Re: [PATCH] postgres_fdw: suppress explicit casts in text:text comparisons (was: column option to override foreign types)

2021-11-07 Thread Dian M Fay
On Tue Nov 2, 2021 at 7:10 PM EDT, Tom Lane wrote: > I wrote: > > Now that I've looked this over I'm starting to feel uncomfortable > > again, because we can't actually be quite sure about how the remote > > parser's heuristic will act. > > Actually ... we could make that a lot safer by insisting

Re: GiST operator class for bool

2021-11-07 Thread Tomas Vondra
On 11/7/21 20:53, Tomas Vondra wrote: Hi, On 11/7/21 17:44, Tom Lane wrote: Tomas Vondra writes: Pushed, after adding some simple EXPLAIN to the regression test. skink is reporting that this has some valgrind issues [1]. I suspect sloppy conversion between bool and Datum, but didn't go

Re: Allow escape in application_name

2021-11-07 Thread Kyotaro Horiguchi
At Sun, 7 Nov 2021 13:35:39 +0900, Fujii Masao wrote in > > > On 2021/11/05 12:17, Kyotaro Horiguchi wrote: > If possible, I'd like to see this change as a separate patch > and commt it first because this is the description for > the existing parameter postgres_fdw.application_name. Fair

Re: pg_upgrade test for binary compatibility of core data types

2021-11-07 Thread Justin Pryzby
On Mon, Oct 11, 2021 at 02:38:12PM +0900, Michael Paquier wrote: > On Fri, Oct 01, 2021 at 04:58:41PM +0900, Michael Paquier wrote: > > I was looking at this CF entry, and what you are doing in 0004 to move > > the tweaks from pg_upgrade's test.sh to a separate SQL script that > > uses psql's

Re: Schema variables - new implementation for Postgres 15

2021-11-07 Thread Pavel Stehule
ne 7. 11. 2021 v 22:36 odesílatel Tomas Vondra < tomas.von...@enterprisedb.com> napsal: > On 11/6/21 04:45, Pavel Stehule wrote: > > Hi > > > > st 3. 11. 2021 v 14:05 odesílatel Tomas Vondra > > mailto:tomas.von...@enterprisedb.com>> > > napsal: > > > > Hi, > > > > I took a quick look at

Re: [PATCH] pg_stat_statements Configuration Parameters Documentation

2021-11-07 Thread Fujii Masao
On 2021/11/08 15:12, Ken Kato wrote: Hi, Configuration parameters for pg_stat_statements were not in the index, so I added them just like auto_explain configuration parameters. Thanks for the patch! LGTM. Regards, -- Fujii Masao Advanced Computing Technology Center Research and

Re: jsonb crash

2021-11-07 Thread Tom Lane
David Rowley writes: > I've now pushed the fix to restrict v14 to only allow Memoize when the > left and right types are the same. For master, since it's possible to > add a field to RestrictInfo, I've changed that to cache the left and > right hash equality operators. If you were going to push

Re: Question about psql meta-command with schema option doesn't use visibilityrule

2021-11-07 Thread David G. Johnston
On Sunday, November 7, 2021, Tatsuro Yamada wrote: > > According to the source code [1], there is no check if a schema > option is added. As a result, a role that is not granted can see > other roles' object names. > We might say it's okay because it's a name, not contents (data), > but It seems

Re: pg_upgrade test for binary compatibility of core data types

2021-11-07 Thread Michael Paquier
On Sun, Nov 07, 2021 at 01:22:00PM -0600, Justin Pryzby wrote: > That may be good enough for test.sh, but if the kludges were moved to a .sql > script which was also run by the buildfarm (in stead of its hardcoded > kludges), then > it might be necessary to handle the additional stuff my patch

Re: [PROPOSAL] new diagnostic items for the dynamic sql

2021-11-07 Thread Pavel Stehule
> > > > +set_errcurrent_query (const char *query) > > You can remove the space prior to (. > I wonder if the new field can be named current_err_query because that's > what the setter implies. > current_query may give the impression that the field can store normal > query (which doesn't cause

Re: [PROPOSAL] new diagnostic items for the dynamic sql

2021-11-07 Thread Pavel Stehule
po 8. 11. 2021 v 5:07 odesílatel Pavel Stehule napsal: > >> >> +set_errcurrent_query (const char *query) >> >> You can remove the space prior to (. >> I wonder if the new field can be named current_err_query because that's >> what the setter implies. >> current_query may give the impression that

Re: removing global variable ThisTimeLineID

2021-11-07 Thread Michael Paquier
On Tue, Nov 02, 2021 at 08:45:57AM -0400, Robert Haas wrote: > Also, XLogCtl->ThisTimeLineID isn't set until the end of recovery, so > calling this function during recovery would be a mistake. There seem > to be a number of interface functions in xlog.c that should only be > called when not in

Re: XLogReadRecord() error in XlogReadTwoPhaseData()

2021-11-07 Thread Michael Paquier
On Sat, Nov 06, 2021 at 06:31:57PM -0700, Noah Misch wrote: > As a first step, let's report the actual XLogReadRecord() error message. > Attached. Good catch! This looks good. > All the other sites that expect no error already do this. Indeed. Looking closer, I think that we'd better improve

Re: Make mesage at end-of-recovery less scary.

2021-11-07 Thread Kyotaro Horiguchi
At Fri, 22 Oct 2021 17:54:40 +, "Bossart, Nathan" wrote in > On 3/4/21, 10:50 PM, "Kyotaro Horiguchi" wrote: > > As the result, the following messages are emitted with the attached. > > I'd like to voice my support for this effort, and I intend to help > review the patch. It looks like

Re: Commitfest 2021-11 Patch Triage - Part 1

2021-11-07 Thread Kyotaro Horiguchi
Thanks for the summary. At Fri, 5 Nov 2021 22:15:49 +0100, Daniel Gustafsson wrote in > 2490: Make message at end-of-recovery less scary > > This thread stalled, but has had recent interest. The patch no longer applies > so while the patch has

Question about psql meta-command with schema option doesn't use visibilityrule

2021-11-07 Thread Tatsuro Yamada
Hi, I have a question that is a specification of permission check (visibilityrule) for psql meta-command with schema option. According to the source code [1], there is no check if a schema option is added. As a result, a role that is not granted can see other roles' object names. We might say

Re: jsonb crash

2021-11-07 Thread David Rowley
On Mon, 8 Nov 2021 at 15:38, Tom Lane wrote: > > David Rowley writes: > > I've now pushed the fix to restrict v14 to only allow Memoize when the > > left and right types are the same. For master, since it's possible to > > add a field to RestrictInfo, I've changed that to cache the left and > >

Re: [PROPOSAL] new diagnostic items for the dynamic sql

2021-11-07 Thread Pavel Stehule
po 8. 11. 2021 v 5:24 odesílatel Pavel Stehule napsal: > > > po 8. 11. 2021 v 5:07 odesílatel Pavel Stehule > napsal: > >> >>> >>> +set_errcurrent_query (const char *query) >>> >>> You can remove the space prior to (. >>> I wonder if the new field can be named current_err_query because that's

Re: Commitfest 2021-11 Patch Triage - Part 1

2021-11-07 Thread Michael Paquier
On Fri, Nov 05, 2021 at 10:15:49PM +0100, Daniel Gustafsson wrote: > 2161: standby recovery fails when re-replaying due to missing directory which > was removed in previous replay. > = > Tom and Robert seem to be in

Re: Failed transaction statistics to measure the logical replication progress

2021-11-07 Thread vignesh C
On Fri, Nov 5, 2021 at 1:42 PM osumi.takami...@fujitsu.com wrote: > > On Thursday, November 4, 2021 9:54 AM Greg Nancarrow > wrote: > > On Tue, Nov 2, 2021 at 12:18 AM osumi.takami...@fujitsu.com > > wrote: > > > > > > On Thursday, October 28, 2021 11:19 PM I wrote: > > > > I've created a new

RE: row filtering for logical replication

2021-11-07 Thread houzj.f...@fujitsu.com
On Fri, Nov 5, 2021 1:14 PM Peter Smith wrote: > PSA new set of v37* patches. Thanks for updating the patches. Few comments: 1) v37-0001 I think it might be better to also show the filter expression in '\d+ tablename' command after publication description. 2) v37-0004 + /* Scan the

Re: [PATCH] pg_stat_statements Configuration Parameters Documentation

2021-11-07 Thread Julien Rouhaud
On Mon, Nov 8, 2021 at 3:19 PM Fujii Masao wrote: > > On 2021/11/08 15:12, Ken Kato wrote: > > Hi, > > > > Configuration parameters for pg_stat_statements were not in the index, > > so I added them just like auto_explain configuration parameters. > > Thanks for the patch! LGTM. +1, patch looks

Re: Question about psql meta-command with schema option doesn't use visibilityrule

2021-11-07 Thread David G. Johnston
On Sunday, November 7, 2021, Tatsuro Yamada wrote: > > I have a question that is a specification of permission check > (visibilityrule) for psql meta-command with schema option. > > From the above results, I expected "\dX s_a.*" doesn't show any info > as same as "\dX". but info is displayed.

Re: prevent immature WAL streaming

2021-11-07 Thread Alexander Lakhin
Hello Alvaro, 14.10.2021 01:09, Alvaro Herrera wrote: >> Yea, let's go for your patch then. I've verified that at least locally it >> passes under valgrind. > Ah great, thanks. Pushed then. > While translating messages I've noticed that the version of the patch ported to

Re: postgres_fdw: commit remote (sub)transactions in parallel during pre-commit

2021-11-07 Thread Fujii Masao
On 2021/11/07 18:06, Etsuro Fujita wrote: On Mon, Nov 1, 2021 at 3:22 PM Fujii Masao wrote: On 2021/10/31 18:05, Etsuro Fujita wrote: The patch is pretty simple: if a server option added by the patch “parallel_commit” is enabled, Could you tell me why the parameter is necessary? Can't we

Re: Commitfest 2021-11 Patch Triage - Part 1

2021-11-07 Thread Kyotaro Horiguchi
At Mon, 8 Nov 2021 14:43:43 +0900, Michael Paquier wrote in > On Fri, Nov 05, 2021 at 10:15:49PM +0100, Daniel Gustafsson wrote: > > 2161: standby recovery fails when re-replaying due to missing directory > > which > > was removed in previous replay. > >

Re: Question about psql meta-command with schema option doesn't use visibilityrule

2021-11-07 Thread Tatsuro Yamada
Hi David, I have a question that is a specification of permission check (visibilityrule) for psql meta-command with schema option. Visibility means search_path, not permission.  If s_a is not in the search_paths it objects are not visible unqualified but can be seen (catalog) when

[PATCH] pg_stat_statements Configuration Parameters Documentation

2021-11-07 Thread Ken Kato
Hi, Configuration parameters for pg_stat_statements were not in the index, so I added them just like auto_explain configuration parameters. Best wishes, -- Ken Kato Advanced Computing Technology Center Research and Development Headquarters NTT DATA CORPORATIONdiff --git

Re: Skipping logical replication transactions on subscriber side

2021-11-07 Thread Greg Nancarrow
On Mon, Nov 8, 2021 at 1:20 AM Masahiko Sawada wrote: > > I've attached an updated patch. In this version patch, subscription > worker statistics are collected per-database and handled in a similar > way to tables and functions. I think perhaps we still need to discuss > details of how the

SSL compression

2021-11-07 Thread Michael J. Baars
Hi All, While I was searching for methods to send the result of a query to the other side of the world, because it might be nice to go there once in a while, I noticed my best option, SSL compression, has been disabled as of version 14. Could someone please explain to me, why compression is