Re: buildfarm instance bichir stuck

2021-04-07 Thread Robins Tharakan
Hi Thomas, Thanks for taking a look at this promptly. On Wed, 7 Apr 2021 at 16:17, Thomas Munro wrote: > On Wed, Apr 7, 2021 at 5:44 PM Robins Tharakan wrote: > > It is interesting that that commit's a month old and probably no other client has complained since, but diving in, I can see that i

RE: psql - add SHOW_ALL_RESULTS option

2021-04-07 Thread shiy.f...@fujitsu.com
Hi I met a problem after commit 3a51306722. While executing a SQL statement with psql, I can't interrupt it by pressing ctrl+c. For example: postgres=# insert into test select generate_series(1,1000); ^C^CINSERT 0 1000 Press ctrl+c before finishing INSERT, and psql still continuing t

missing documentation for streaming in-progress transactions

2021-04-07 Thread Ajin Cherian
Hi, Found that some documentation hasn't been updated for the changes made as part of streaming large in-progress transactions. Attached a patch that adds the missing changes. Let me know if anything more needs to be added or any comments on this change. regards, Ajin Cherian Fujitsu Australia

Re: Wired if-statement in gen_partprune_steps_internal

2021-04-07 Thread David Rowley
On Thu, 4 Mar 2021 at 19:03, Amit Langote wrote: > > On Tue, Oct 20, 2020 at 9:46 PM Amit Langote wrote: > > I had updated the patch last week to address Horiguchi-san's comments > > but didn't manage to post a polished-enough version. I will try again > > this week. > > Sorry, this seems to hav

Re: New IndexAM API controlling index vacuum strategies

2021-04-07 Thread Masahiko Sawada
On Wed, Apr 7, 2021 at 12:16 PM Peter Geoghegan wrote: > > On Tue, Apr 6, 2021 at 7:05 AM Matthias van de Meent > wrote: > > If you have updated patches, I'll try to check them this evening (CEST). > > Here is v11, which is not too different from v10 as far as the > truncation stuff goes. > > Mas

Re: ModifyTable overheads in generic plans

2021-04-07 Thread Amit Langote
On Wed, Apr 7, 2021 at 8:24 AM Tom Lane wrote: > Amit Langote writes: > > On Mon, Apr 5, 2021 at 1:43 AM Tom Lane wrote: > >> OK. Do you want to pull out the bits of the patch that we can still > >> do without postponing BeginDirectModify? > > > I ended up with the attached, whereby ExecInitRes

Re: [PATCH] Tracking statements entry timestamp in pg_stat_statements

2021-04-07 Thread Seino Yuki
2021-03-23 23:08 に Andrei Zubkov さんは書きました: Dear Kuroda, I don't like the idea because such a column has no meaning for the specific row. I prefer storing timestamp if GetCurrentTimestamp() is cheap. I agree. New version attached. Thanks for posting the patch. I agree with this content. Is i

Re: Truncate in synchronous logical replication failed

2021-04-07 Thread Amit Kapila
On Wed, Apr 7, 2021 at 12:26 PM tanghy.f...@fujitsu.com wrote: > > Hi > > I met a problem in synchronous logical replication. The client hangs when > TRUNCATE TABLE at publisher. > Can you please check if the behavior is the same for PG-13? This is just to ensure that we have not introduced any

RE: Truncate in synchronous logical replication failed

2021-04-07 Thread tanghy.f...@fujitsu.com
On Wednesday, April 7, 2021 5:28 PM Amit Kapila wrote >Can you please check if the behavior is the same for PG-13? This is >just to ensure that we have not introduced any bug in PG-14. Yes, same failure happens at PG-13, too. Regards, Tang

Re: Remove page-read callback from XLogReaderState.

2021-04-07 Thread Kyotaro Horiguchi
At Tue, 6 Apr 2021 16:09:55 -0700, Andres Freund wrote in > Hi, > > > XLogPageRead(XLogReaderState *xlogreader, XLogRecPtr targetPagePtr, int > > reqLen, > > XLogRecPtr targetRecPtr, char *readBuf) > > { > > @@ -12170,7 +12169,8 @@ retry: > > readLen =

Re: Wired if-statement in gen_partprune_steps_internal

2021-04-07 Thread Amit Langote
On Wed, Apr 7, 2021 at 4:43 PM David Rowley wrote: > On Thu, 4 Mar 2021 at 19:03, Amit Langote wrote: > > On Tue, Oct 20, 2020 at 9:46 PM Amit Langote > > wrote: > > > I had updated the patch last week to address Horiguchi-san's comments > > > but didn't manage to post a polished-enough version

Re: GSoc Applicant

2021-04-07 Thread Mohamed Mansour
Thank you, I will do that. *Eng. Mohamed Mansour(EG+) 20 112 003 3329(EG+) 20 106 352 6328Data Engineer* On Tue, Apr 6, 2021 at 7:39 PM Mark Wong wrote: > Hello, > > On Mon, Apr 05, 2021 at 11:46:36PM +0200, Mohamed Mansour wrote: > > Greetings, > > > > I'm Mohamed Mansour, a Data Engineer

Re: Replication slot stats misgivings

2021-04-07 Thread vignesh C
On Tue, Apr 6, 2021 at 12:19 PM Amit Kapila wrote: > > On Mon, Apr 5, 2021 at 8:51 PM vignesh C wrote: > > > > Few comments on the latest patches: > Comments on 0001 > > 1. > @@ -659,6 +661,8 @@ ReorderBufferTXNByXid(ReorderBuffer *rb, > TransactionId xid, bool cr

Re: Implementing Incremental View Maintenance

2021-04-07 Thread Yugo NAGATA
Hi, I rebased the patch because the cfbot failed. Regards, Yugo Nagata On Tue, 9 Mar 2021 17:27:50 +0900 Yugo NAGATA wrote: > On Tue, 9 Mar 2021 09:20:49 +0900 > Yugo NAGATA wrote: > > > On Mon, 8 Mar 2021 15:42:00 -0500 > > Andrew Dunstan wrote: > > > > > > > > On 2/18/21 9:01 PM, Yugo

Re: Wired if-statement in gen_partprune_steps_internal

2021-04-07 Thread David Rowley
On Wed, 7 Apr 2021 at 21:04, Amit Langote wrote: > > On Wed, Apr 7, 2021 at 4:43 PM David Rowley wrote: > > However, it does change the meaning of what PARTCLAUSE_MATCH_STEPS > > does. If we ever needed to expand what PARTCLAUSE_MATCH_STEPS does, > > then we'll have less flexibility with the newl

Set access strategy for parallel vacuum workers

2021-04-07 Thread Amit Kapila
During recent developments in the vacuum, it has been noticed [1] that parallel vacuum workers don't use any buffer access strategy. I think we can fix it either by propagating the required information from the leader or just get the access strategy in each worker separately. The patches for both a

Re: New IndexAM API controlling index vacuum strategies

2021-04-07 Thread Amit Kapila
On Tue, Apr 6, 2021 at 5:49 AM Peter Geoghegan wrote: > > On Mon, Apr 5, 2021 at 5:09 PM Peter Geoghegan wrote: > > Oh yeah. "static BufferAccessStrategy vac_strategy" is guaranteed to > > be initialized to 0, simply because it's static and global. That > > explains it. > > So do we need to alloc

Re: Yet another fast GiST build

2021-04-07 Thread Heikki Linnakangas
On 07/04/2021 09:00, Heikki Linnakangas wrote: On 08/03/2021 19:06, Andrey Borodin wrote: There were numerous GiST-build-related patches in this thread. Yet uncommitted is a patch with sortsupport routines for btree_gist contrib module. Here's its version which needs review. Committed with sm

CREATE SEQUENCE with RESTART option

2021-04-07 Thread Bharath Rupireddy
Hi, It looks like we do allow $subject which has following behaviour: create sequence myseq restart 200;--> sequence is starting from restart value overriding start value create sequence myseq start 100 restart 200; --> sequence is starting from restart value overriding start value create sequ

Why is specifying oids = false multiple times in create table is silently ignored?

2021-04-07 Thread Bharath Rupireddy
Hi, We generally throw an error when create table options are specified more than once, see below: postgres=# create table t1(a1 int) with (fillfactor = 10, fillfactor = 15); ERROR: parameter "fillfactor" specified more than once Although "with oids" support is removed by the commit 578b229718 a

Re: New predefined roles- 'pg_read/write_all_data'

2021-04-07 Thread Michael Banck
Hi, On Thu, Apr 01, 2021 at 04:00:06PM -0400, Stephen Frost wrote: > diff --git a/doc/src/sgml/user-manag.sgml b/doc/src/sgml/user-manag.sgml > index d171b13236..fe0bdb7599 100644 > --- a/doc/src/sgml/user-manag.sgml > +++ b/doc/src/sgml/user-manag.sgml > @@ -518,6 +518,24 @@ DROP ROLE doomed_role

Re: [PATCH] Tracking statements entry timestamp in pg_stat_statements

2021-04-07 Thread Andrei Zubkov
On Wed, 2021-04-07 at 17:26 +0900, Seino Yuki wrote: > Is it necessary to update the version of pg_stat_statements now that > the > release is targeted for PG15? I think, yes, version of pg_stat_statements is need to be updated. Is it will be 1.10 in PG15? Regards, -- Andrei Zubkov Postgres Pr

Re: [PATCH] PREPARE TRANSACTION unexpected behavior with TEMP TABLE

2021-04-07 Thread vignesh C
On Tue, Apr 6, 2021 at 8:18 PM Himanshu Upadhyaya wrote: > > Hi, > > While working on one of the issue, I have noticed below unexpected behavior > with "PREPARE TRANSACTION". > > We are getting this unexpected behavior with PREPARE TRANSACTION when it is > mixed with Temporary Objects. Please co

Re: Why is specifying oids = false multiple times in create table is silently ignored?

2021-04-07 Thread Michael Paquier
On Wed, Apr 07, 2021 at 04:00:46PM +0530, Bharath Rupireddy wrote: > And also, the commit 578b229718 talks about removing "with (oids = > false)" someday. Is it the time now to remove that and error out with > "unrecognized parameter "oids""? Nope, and I think that it will remain around for some t

hba.c:3160:18: warning: comparison of unsigned enum expression

2021-04-07 Thread Erik Rijkers
Recently (last day or so), I get this warning from gcc 10.2: - hba.c:3160:18: warning: comparison of unsigned enum expression < 0 is always false [-Wtautological-compare] if (auth_method < 0 || USER_AUTH_LAST < auth_method) ~~~ ^ ~ 1 warning generated. - Erik

Re: hba.c:3160:18: warning: comparison of unsigned enum expression

2021-04-07 Thread Magnus Hagander
On Wed, Apr 7, 2021 at 1:01 PM Erik Rijkers wrote: > > Recently (last day or so), I get this warning from gcc 10.2: > > - > hba.c:3160:18: warning: comparison of unsigned enum expression < 0 is always > false [-Wtautological-compare] > if (auth_method < 0 || USER_AUTH_LAST < auth_meth

Re: hba.c:3160:18: warning: comparison of unsigned enum expression

2021-04-07 Thread Magnus Hagander
On Wed, Apr 7, 2021 at 1:24 PM Magnus Hagander wrote: > > On Wed, Apr 7, 2021 at 1:01 PM Erik Rijkers wrote: > > > > Recently (last day or so), I get this warning from gcc 10.2: > > > > - > > hba.c:3160:18: warning: comparison of unsigned enum expression < 0 is > > always false [-Wtautologic

Re: Set access strategy for parallel vacuum workers

2021-04-07 Thread Masahiko Sawada
On Wed, Apr 7, 2021 at 7:00 PM Amit Kapila wrote: > > During recent developments in the vacuum, it has been noticed [1] that > parallel vacuum workers don't use any buffer access strategy. I think > we can fix it either by propagating the required information from the > leader or just get the acce

Re: MultiXact\SLRU buffers configuration

2021-04-07 Thread Andrey Borodin
> 7 апр. 2021 г., в 08:59, Thomas Munro написал(а): > > The remaining thing that bothers me about this patch set is that there is > still a linear search in the replacement algorithm, and it runs with an > exclusive lock. That creates a serious problem for large caches that still > aren't

Re: Wired if-statement in gen_partprune_steps_internal

2021-04-07 Thread David Rowley
On Wed, 7 Apr 2021 at 21:53, David Rowley wrote: > If canonicalize_qual() had been unable to rewrite that WHERE clause > then I could see that we might want to combine steps from other > recursive quals. I'm thinking right now that I'm glad > canonicalize_qual() does that hard work for us. (I thi

Re: buildfarm instance bichir stuck

2021-04-07 Thread Andrew Dunstan
On 4/7/21 2:16 AM, Thomas Munro wrote: > On Wed, Apr 7, 2021 at 5:44 PM Robins Tharakan wrote: >> Bichir's been stuck for the past month and is unable to run regression tests >> since 6a2a70a02018d6362f9841cc2f499cc45405e86b. > Hrmph. That's "Use signalfd(2) for epoll latches." I had a simila

Re: [PATCH] New default role allowing to change per-role/database settings

2021-04-07 Thread Michael Banck
Hi, Am Dienstag, den 06.04.2021, 15:37 +0200 schrieb Michael Banck: > Am Montag, den 05.04.2021, 14:33 -0400 schrieb Stephen Frost: > > Should drop the 'DEFAULT_' to match the others since the rename to > > 'predefined' roles went in. > > Right, will send a rebased patch ASAP. Here's a rebased v

Re: Yet another fast GiST build

2021-04-07 Thread Heikki Linnakangas
On 07/04/2021 09:00, Heikki Linnakangas wrote: On 08/03/2021 19:06, Andrey Borodin wrote: There were numerous GiST-build-related patches in this thread. Yet uncommitted is a patch with sortsupport routines for btree_gist contrib module. Here's its version which needs review. Reviewing this no

Re: hba.c:3160:18: warning: comparison of unsigned enum expression

2021-04-07 Thread Michael Paquier
On Wed, Apr 07, 2021 at 01:24:01PM +0200, Magnus Hagander wrote: > On Wed, Apr 7, 2021 at 1:01 PM Erik Rijkers wrote: > > Recently (last day or so), I get this warning from gcc 10.2: Same compiler version here, but I did not get warned. Are you using any particular flag? > But that also highlig

Re: hba.c:3160:18: warning: comparison of unsigned enum expression

2021-04-07 Thread Magnus Hagander
On Wed, Apr 7, 2021 at 1:57 PM Michael Paquier wrote: > > On Wed, Apr 07, 2021 at 01:24:01PM +0200, Magnus Hagander wrote: > > On Wed, Apr 7, 2021 at 1:01 PM Erik Rijkers wrote: > > > Recently (last day or so), I get this warning from gcc 10.2: > > Same compiler version here, but I did not get wa

[PATCH] Improve treatment of page special and page header alignment during page init.

2021-04-07 Thread Pavel Borisov
I was looking at changes in Sp-Gist by commit 4c0239cb7a7775e3183cb575e62703d71bf3302d (discussion https://postgr.es/m/CALj2ACViOo2qyaPT7krWm4LRyRTw9kOXt+g6PfNmYuGA=yh...@mail.gmail.com ) and realized that during PageInit, both page header and page special are expected to be maxaligned but in reali

Re: Can we remove extra memset in BloomInitPage, GinInitPage and SpGistInitPage when we have it in PageInit?

2021-04-07 Thread Pavel Borisov
ср, 7 апр. 2021 г. в 10:18, Bharath Rupireddy < bharath.rupireddyforpostg...@gmail.com>: > On Wed, Apr 7, 2021 at 11:44 AM Michael Paquier > wrote: > > > > On Wed, Apr 07, 2021 at 06:31:19AM +0530, Bharath Rupireddy wrote: > > > Setting p->pd_flags = 0; is unnecessary and redundant after memsetti

Re: Any objections to implementing LogicalDecodeMessageCB for pgoutput?

2021-04-07 Thread Euler Taveira
On Wed, Apr 7, 2021, at 2:20 AM, Amit Kapila wrote: > I have pushed this work and updated the CF entry accordingly. Great. Thank you. -- Euler Taveira EDB https://www.enterprisedb.com/

Re: Yet another fast GiST build

2021-04-07 Thread Andrey Borodin
> 7 апр. 2021 г., в 13:23, Heikki Linnakangas написал(а): > > Committed with small fixes. Thanks! > 7 апр. 2021 г., в 14:56, Heikki Linnakangas написал(а): > > Ok, I think I understand that now. In btree_gist, the *_cmp() function > operates on non-leaf values, and *_lt(), *_gt() et al op

Re: MultiXact\SLRU buffers configuration

2021-04-07 Thread Andrey Borodin
> 7 апр. 2021 г., в 14:44, Andrey Borodin написал(а): > > Maybe instead of fully associative cache with random replacement we could use > 1-associative cache? > i.e. each page can reside only in one spcific buffer slot. If there's > something else - evict it. > I think this would be as effic

Re: missing documentation for streaming in-progress transactions

2021-04-07 Thread Amit Kapila
On Wed, Apr 7, 2021 at 1:11 PM Ajin Cherian wrote: > > Hi, > > Found that some documentation hasn't been updated for the changes made as > part of > streaming large in-progress transactions. Attached a patch that adds the > missing changes. Let me know if anything more needs to be added or any

Re: hba.c:3160:18: warning: comparison of unsigned enum expression

2021-04-07 Thread Michael Paquier
On Wed, Apr 07, 2021 at 02:01:42PM +0200, Magnus Hagander wrote: > That's very close to mine (see one email later). Let's bikeshed about > the details. I think it's basically the same for current usecases, but > that taking the UserAuth as the parameter is cleaner and potentially > more useful for

Re: hba.c:3160:18: warning: comparison of unsigned enum expression

2021-04-07 Thread Erik Rijkers
> On 2021.04.07. 13:57 Michael Paquier wrote: > > > On Wed, Apr 07, 2021 at 01:24:01PM +0200, Magnus Hagander wrote: > > On Wed, Apr 7, 2021 at 1:01 PM Erik Rijkers wrote: > > > Recently (last day or so), I get this warning from gcc 10.2: > [gcc-hba-warning.patch] FWIW, this fixes the warnin

Re: hba.c:3160:18: warning: comparison of unsigned enum expression

2021-04-07 Thread Magnus Hagander
On Wed, Apr 7, 2021 at 2:17 PM Michael Paquier wrote: > > On Wed, Apr 07, 2021 at 02:01:42PM +0200, Magnus Hagander wrote: > > That's very close to mine (see one email later). Let's bikeshed about > > the details. I think it's basically the same for current usecases, but > > that taking the UserAu

Re: hba.c:3160:18: warning: comparison of unsigned enum expression

2021-04-07 Thread Michael Paquier
On Wed, Apr 07, 2021 at 02:20:25PM +0200, Magnus Hagander wrote: > Ok, I'll go ahead and push it. Thanks for confirming the fix! Cool. Thanks! -- Michael signature.asc Description: PGP signature

Re: CREATE SEQUENCE with RESTART option

2021-04-07 Thread Ashutosh Bapat
On Wed, Apr 7, 2021 at 3:56 PM Bharath Rupireddy wrote: > > Hi, > > It looks like we do allow $subject which has following behaviour: > create sequence myseq restart 200;--> sequence is starting from > restart value overriding start value > create sequence myseq start 100 restart 200; --> sequ

Re: Feature improvement: can we add queryId for pg_catalog.pg_stat_activity view?

2021-04-07 Thread Nitin Jadhav
> > > > > 1. > > +void > > +pgstat_report_queryid(uint64 queryId, bool force) > > +{ > > + volatile PgBackendStatus *beentry = MyBEEntry; > > + > > + if (!beentry) > > + return; > > + > > + /* > > + * if track_activities is disabled, st_queryid should already have been > > + * reset > > + */ > > +

Re: Feature improvement: can we add queryId for pg_catalog.pg_stat_activity view?

2021-04-07 Thread Nitin Jadhav
> > On Tue, Apr 06, 2021 at 11:41:52AM -0400, Alvaro Herrera wrote: > > On 2021-Apr-06, Nitin Jadhav wrote: > > > > > I have reviewed the code. Here are a few minor comments. > > > > > > 1. > > > +void > > > +pgstat_report_queryid(uint64 queryId, bool force) > > > +{ > > > + volatile PgBackendStatu

Re: Wired if-statement in gen_partprune_steps_internal

2021-04-07 Thread Amit Langote
On Wed, Apr 7, 2021 at 8:44 PM David Rowley wrote: > On Wed, 7 Apr 2021 at 21:53, David Rowley wrote: > > If canonicalize_qual() had been unable to rewrite that WHERE clause > > then I could see that we might want to combine steps from other > > recursive quals. I'm thinking right now that I'm gl

Re: buildfarm instance bichir stuck

2021-04-07 Thread Robins Tharakan
Thanks Andrew. The build's still running but the CPPFLAGS hint does seem to have helped (see below). Unless advised otherwise, I intend to let that option be, so as to get bichir back online. If a future commit 'fixes' things, I could rollback this flag to test things out (or try out other option

Re: Feature improvement: can we add queryId for pg_catalog.pg_stat_activity view?

2021-04-07 Thread Julien Rouhaud
On Wed, Apr 07, 2021 at 06:15:27PM +0530, Nitin Jadhav wrote: > > I feel we should merge both of the conditions as it is done in > pgstat_report_xact_timestamp(). Probably we can write a common comment to > explain both the conditions. > > [...] > > Thanks for the explanation. Please add a comme

Re: Yet another fast GiST build

2021-04-07 Thread Heikki Linnakangas
On 07/04/2021 15:12, Andrey Borodin wrote: 7 апр. 2021 г., в 14:56, Heikki Linnakangas написал(а): Ok, I think I understand that now. In btree_gist, the *_cmp() function operates on non-leaf values, and *_lt(), *_gt() et al operate on leaf values. For all other datatypes, the leaf and non-leaf

Re: CREATE SEQUENCE with RESTART option

2021-04-07 Thread Bharath Rupireddy
On Wed, Apr 7, 2021 at 6:04 PM Ashutosh Bapat wrote: > At best CREATE SEQUENCE START ... RESTART ... can be a shorthand > for CREATE SEQUENCE ... START; ALTER SEQUENCE ... RESTART run back to > back. So it looks useful but in rare cases. I personally feel that let's not mix up START and REST

Re: Why is specifying oids = false multiple times in create table is silently ignored?

2021-04-07 Thread Bharath Rupireddy
On Wed, Apr 7, 2021 at 4:20 PM Michael Paquier wrote: > > On Wed, Apr 07, 2021 at 04:00:46PM +0530, Bharath Rupireddy wrote: > > And also, the commit 578b229718 talks about removing "with (oids = > > false)" someday. Is it the time now to remove that and error out with > > "unrecognized parameter

Re: SSL SNI

2021-04-07 Thread Peter Eisentraut
On 18.03.21 12:27, Peter Eisentraut wrote: On 25.02.21 19:36, Jacob Champion wrote: On Thu, 2021-02-25 at 17:00 +0100, Peter Eisentraut wrote: Just as additional data points, it has come to my attention that both the Go driver ("lib/pq") and the JDBC environment already send SNI automatically. 

Re: Increase value of OUTER_VAR

2021-04-07 Thread Peter Eisentraut
On 06.03.21 15:59, Tom Lane wrote: Peter Eisentraut writes: On 04.03.21 20:01, Tom Lane wrote: (2) Does that datatype change need to propagate anywhere besides what I touched here? I did not make any effort to search for other places. I think Var.varnosyn CurrentOfExpr.cvarno should

Re: Increase value of OUTER_VAR

2021-04-07 Thread Tom Lane
Peter Eisentraut writes: > Can we move forward with this? > I suppose there was still some uncertainty about whether all the places > that need changing have been identified, but do we have a better idea > how to find them? We could just push the change and see what happens. But I was thinkin

Re: Set access strategy for parallel vacuum workers

2021-04-07 Thread Bharath Rupireddy
On Wed, Apr 7, 2021 at 3:30 PM Amit Kapila wrote: > > During recent developments in the vacuum, it has been noticed [1] that > parallel vacuum workers don't use any buffer access strategy. I think > we can fix it either by propagating the required information from the > leader or just get the acce

Re: [PATCH] Improve treatment of page special and page header alignment during page init.

2021-04-07 Thread Bharath Rupireddy
On Wed, Apr 7, 2021 at 5:32 PM Pavel Borisov wrote: > > I was looking at changes in Sp-Gist by commit > 4c0239cb7a7775e3183cb575e62703d71bf3302d > (discussion > https://postgr.es/m/CALj2ACViOo2qyaPT7krWm4LRyRTw9kOXt+g6PfNmYuGA=yh...@mail.gmail.com > ) and realized that during PageInit, both page

RE: psql - add SHOW_ALL_RESULTS option

2021-04-07 Thread Fabien COELHO
Hello, I met a problem after commit 3a51306722. While executing a SQL statement with psql, I can't interrupt it by pressing ctrl+c. For example: postgres=# insert into test select generate_series(1,1000); ^C^CINSERT 0 1000 Press ctrl+c before finishing INSERT, and psql still conti

Cost model improvement for run-time partition prune

2021-04-07 Thread Andy Fan
Currently the cost model ignores the initial partition prune and run time partition prune totally. This impacts includes: 1). The cost of Nest Loop path is highly overrated. 2). And the rows estimator can be very wrong as well some time. We can use the following cases to demonstrate. CREATE TABLE

Re: Wired if-statement in gen_partprune_steps_internal

2021-04-07 Thread Amit Langote
On Wed, Apr 7, 2021 at 6:53 PM David Rowley wrote: > On Wed, 7 Apr 2021 at 21:04, Amit Langote wrote: > > > > On Wed, Apr 7, 2021 at 4:43 PM David Rowley wrote: > > > However, it does change the meaning of what PARTCLAUSE_MATCH_STEPS > > > does. If we ever needed to expand what PARTCLAUSE_MATCH_

Re: Why is specifying oids = false multiple times in create table is silently ignored?

2021-04-07 Thread Euler Taveira
On Wed, Apr 7, 2021, at 10:25 AM, Bharath Rupireddy wrote: > On Wed, Apr 7, 2021 at 4:20 PM Michael Paquier > wrote: > > > > On Wed, Apr 07, 2021 at 04:00:46PM +0530, Bharath Rupireddy wrote: > > > And also, the commit 578b229718 talks about removing "with (oids = > >

Re: PostgreSQL log query's result size

2021-04-07 Thread Hellmuth Vargas
?? Well, the truth does not show the data that I request, what I request is that by configuring some parameter, the size of the obtained records can be obtained from the execution of a query something similar to the log_min_duration_statement parameter Now I think it is pertinent to write here bec

Re: PostgreSQL log query's result size

2021-04-07 Thread David G. Johnston
On Wed, Apr 7, 2021 at 7:13 AM Hellmuth Vargas wrote: > > ?? Well, the truth does not show the data that I request, what I request > is that by configuring some parameter, the size of the obtained records can > be obtained from the execution of a query something similar to the > log_min_duration_

Re: multi-install PostgresNode fails with older postgres versions

2021-04-07 Thread Jehan-Guillaume de Rorthais
Hi all, First, sorry to step in this discussion this late. I didn't noticed it before :( I did some work about these compatibility issues in late 2020 to use PostgresNode in the check_pgactivity TAP tests. See https://github.com/ioguix/check_pgactivity/tree/tests/t/lib PostgresNode.pm, TestLib.

Re: PostgreSQL log query's result size

2021-04-07 Thread Hellmuth Vargas
Thank you for the clarification. El mié, 7 de abr. de 2021 a la(s) 09:20, David G. Johnston ( david.g.johns...@gmail.com) escribió: > On Wed, Apr 7, 2021 at 7:13 AM Hellmuth Vargas wrote: > >> >> ?? Well, the truth does not show the data that I request, what I request >> is that by configuring s

Re: [PATCH] Improve treatment of page special and page header alignment during page init.

2021-04-07 Thread Pavel Borisov
ср, 7 апр. 2021 г. в 17:55, Bharath Rupireddy < bharath.rupireddyforpostg...@gmail.com>: > On Wed, Apr 7, 2021 at 5:32 PM Pavel Borisov > wrote: > > > > I was looking at changes in Sp-Gist by commit > 4c0239cb7a7775e3183cb575e62703d71bf3302d > > (discussion > > > https://postgr.es/m/CALj2ACViOo2q

Re: Tightening up allowed custom GUC names

2021-04-07 Thread Tom Lane
I wrote: > We can't allow '-', for the specific reason that it won't work as a -c > argument (thanks to -c's translation of '-' to '_'). The whole point here > is to prevent corner cases like that. ':' would be all right, but I think > it's a lot simpler to explain and a lot harder to break in fu

Re: WIP: WAL prefetch (another approach)

2021-04-07 Thread Tomas Vondra
On 4/7/21 1:24 PM, Thomas Munro wrote: > Here's rebase, on top of Horiguchi-san's v19 patch set. My patches > start at 0007. Previously, there was a "nowait" flag that was passed > into all the callbacks so that XLogReader could wait for new WAL in > some cases but not others. This new version u

Re: [PATCH] Improve treatment of page special and page header alignment during page init.

2021-04-07 Thread Tom Lane
Pavel Borisov writes: >> How can we say that in PageInit the SizeOfPageHeaderData is expected >> to be max aligned? Am I missing something? There are lots of other >> places where SizeOfPageHeaderData is used, not >> MAXALIGN(SizeOfPageHeaderData). > Its maxalign is ensured by its size of 24bytes

Re: Autovacuum on partitioned table (autoanalyze)

2021-04-07 Thread yuzuko
Hi, I fixed the patch according to the following comments. Attach the latest patch. It is based on v14 patch Alvaro attached before. On Mon, Apr 5, 2021 at 4:08 AM Tomas Vondra wrote: > > On 4/3/21 9:42 PM, Alvaro Herrera wrote: > > Thanks for the quick rework. I like this design much better a

Re: multi-install PostgresNode fails with older postgres versions

2021-04-07 Thread Andrew Dunstan
On 4/7/21 1:03 AM, Mark Dilger wrote: > The v1 patch supported postgres versions back to 8.4, but v2 pushes that back > to 8.1. > > The version of PostgresNode currently committed relies on IPC::Run in a way > that is subtly wrong. The first time IPC::Run::run(X, ...) is called, it > uses the

Re: New IndexAM API controlling index vacuum strategies

2021-04-07 Thread Peter Geoghegan
On Wed, Apr 7, 2021 at 12:50 AM Masahiko Sawada wrote: > Thank you for updating the patches! > > I've done the final round of review: All of the changes from your fixup patch are clear improvements, and so I'll include them in the final commit. Thanks! > For 0001 patch, we call PageTruncateLineP

Re: multi-install PostgresNode fails with older postgres versions

2021-04-07 Thread Andrew Dunstan
On 4/7/21 10:37 AM, Jehan-Guillaume de Rorthais wrote: > Hi all, > > First, sorry to step in this discussion this late. I didn't noticed it before > :( > > I did some work about these compatibility issues in late 2020 to use > PostgresNode in the check_pgactivity TAP tests. > > See https://githu

Re: multi-install PostgresNode fails with older postgres versions

2021-04-07 Thread Mark Dilger
> On Apr 7, 2021, at 7:37 AM, Jehan-Guillaume de Rorthais > wrote: > > Hi all, > > First, sorry to step in this discussion this late. I didn't noticed it before > :( Not a problem. > I did some work about these compatibility issues in late 2020 to use > PostgresNode in the check_pgactivit

Re: [PATCH] Improve treatment of page special and page header alignment during page init.

2021-04-07 Thread Pavel Borisov
> No, that's wrong. What follows the page header is the line pointer > array, which is only int-aligned. We need to maxalign the special > space because tuples are stored working backwards from that, and > we want maxalignment for tuples. > Ok, I realized. Thanks! Then I'd call off the proposal.

Re: [PATCH] PREPARE TRANSACTION unexpected behavior with TEMP TABLE

2021-04-07 Thread Himanshu Upadhyaya
Hi Vignesh, Thanks for sharing the review comments. Please find my response below. > 1) We can drop the table after this test. > Done. > 2) +-- Test for accessing Temporary table > +-- in prepare transaction. > can be changed to > -- Test for accessing cached temporary table in a prepared transac

Re: multi-install PostgresNode fails with older postgres versions

2021-04-07 Thread Jehan-Guillaume de Rorthais
On Wed, 7 Apr 2021 11:54:36 -0400 Andrew Dunstan wrote: > On 4/7/21 10:37 AM, Jehan-Guillaume de Rorthais wrote: > > Hi all, > > > > First, sorry to step in this discussion this late. I didn't noticed it > > before :( > > > > I did some work about these compatibility issues in late 2020 to use >

Re: multi-install PostgresNode fails with older postgres versions

2021-04-07 Thread Jehan-Guillaume de Rorthais
On Wed, 7 Apr 2021 09:08:31 -0700 Mark Dilger wrote: > > On Apr 7, 2021, at 7:37 AM, Jehan-Guillaume de Rorthais > > And here is a demo test file: > > https://github.com/ioguix/check_pgactivity/blob/tests/t/01-streaming_delta.t > > > > My limited set of tests are working with versions back to

Need help!

2021-04-07 Thread FATIHI Ayoub
Hi postgres community, I am willing to participate in GSoC to speed up the build of the gist index in postgis, which is based on postgresql. And I need to know *everything* about the GiST API. To do so I need to acquire the necessary theory and concepts to start this journey. I do not have a comput

Re: ModifyTable overheads in generic plans

2021-04-07 Thread Tom Lane
Amit Langote writes: > Also, I think we should update the commentary around ri_projectNew a > bit to make it clear that noplace beside ExecGet{Insert|Update}Tuple > should be touching it and the associated slots. Hm. I pushed your comment fixes in nodeModifyTable.c, but not this change, because

Re: Need help!

2021-04-07 Thread David G. Johnston
On Wed, Apr 7, 2021, 09:29 FATIHI Ayoub wrote: > Hi postgres community, > I am willing to participate in GSoC to speed up the build of the gist > index in postgis, which is based on postgresql. > You should mention and link to where you cross-posted this to Reddit.

Re: multi-install PostgresNode fails with older postgres versions

2021-04-07 Thread Alvaro Herrera
On 2021-Apr-07, Jehan-Guillaume de Rorthais wrote: > When I'm creating a new node, I'm using the "pgaTester" factory class. It > relies on PATH to check the major version using pg_config, then loads the > appropriate class. >From a code cleanliness point of view, I agree that having separate clas

Re: why pg_walfile_name() cannot be executed during recovery?

2021-04-07 Thread Jehan-Guillaume de Rorthais
On Fri, 2 Apr 2021 08:22:09 -0400 Robert Haas wrote: > On Fri, Apr 2, 2021 at 4:23 AM SATYANARAYANA NARLAPURAM > wrote: > > Why pg_walfile_name() can't be executed under recovery? > > I believe the issue is that the backend executing the function might > not have an accurate idea about which

Re: multi-install PostgresNode fails with older postgres versions

2021-04-07 Thread Mark Dilger
> On Apr 7, 2021, at 9:26 AM, Jehan-Guillaume de Rorthais > wrote: > > On Wed, 7 Apr 2021 09:08:31 -0700 > Mark Dilger wrote: > >>> On Apr 7, 2021, at 7:37 AM, Jehan-Guillaume de Rorthais > >>> And here is a demo test file: >>> https://github.com/ioguix/check_pgactivity/blob/tests/t/01-st

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

2021-04-07 Thread vignesh C
On Thu, Mar 4, 2021 at 1:04 PM Bharath Rupireddy wrote: > > On Wed, Mar 3, 2021 at 8:59 AM Euler Taveira wrote: > > > > On Wed, Feb 3, 2021, at 2:13 AM, Bharath Rupireddy wrote: > > > > On Mon, Jan 25, 2021 at 10:32 PM vignesh C wrote: > > > > > If a publication which does not exist is specified

Re: buildfarm instance bichir stuck

2021-04-07 Thread Tom Lane
Robins Tharakan writes: > Not sure if many agree but 2 things stood out here: > 1) Buildfarm never got the message that a commit broke an instance. Ideally > I'd have expected buildfarm to have an optimistic timeout that could have > helped - for e.g. right now, the CREATE DATABASE is still stuck

Re: Minimal logical decoding on standbys

2021-04-07 Thread Andres Freund
Hi, I think I'll remove the "Catalog xmins should advance after standby logical slot fetches the changes." test. For one, it takes a long time (due to the 2000 psqls). But more importantly, it's simply not testing anything that's reliable: 1) There's no guarantee that I can see that catalog_xmin

dump cannot be restored if schema permissions revoked

2021-04-07 Thread Richard Yen
Hello hackers, I noticed that in some situations involving the use of REVOKE ON SCHEMA, pg_dump can produce a dump that cannot be restored. This prevents successful pg_restore (and by corollary, pg_upgrade). An example shell script to recreate this problem is attached. The error output appears

Re: multi-install PostgresNode fails with older postgres versions

2021-04-07 Thread Jehan-Guillaume de Rorthais
On Wed, 7 Apr 2021 12:51:55 -0400 Alvaro Herrera wrote: > On 2021-Apr-07, Jehan-Guillaume de Rorthais wrote: > > > When I'm creating a new node, I'm using the "pgaTester" factory class. It > > relies on PATH to check the major version using pg_config, then loads the > > appropriate class. > >

Re: multi-install PostgresNode fails with older postgres versions

2021-04-07 Thread Alvaro Herrera
On 2021-Apr-07, Jehan-Guillaume de Rorthais wrote: > Yes, it would be much saner to make PostgresNode the factory class. Plus, some > more logic could be injected there to either auto-detect the version (current > behavior) or eg. use a given path to the binaries as Mark did in its patch. I'm not

Re: multi-install PostgresNode fails with older postgres versions

2021-04-07 Thread Andrew Dunstan
On 4/7/21 1:19 PM, Jehan-Guillaume de Rorthais wrote: > On Wed, 7 Apr 2021 12:51:55 -0400 > Alvaro Herrera wrote: > >> On 2021-Apr-07, Jehan-Guillaume de Rorthais wrote: >> >>> When I'm creating a new node, I'm using the "pgaTester" factory class. It >>> relies on PATH to check the major version

Re: Need help!

2021-04-07 Thread Giuseppe Broccolo
Hi Ayoub, Il giorno mer 7 apr 2021 alle ore 17:29 FATIHI Ayoub < ayoubfatihi1...@gmail.com> ha scritto: > Hi postgres community, > I am willing to participate in GSoC to speed up the build of the gist > index in postgis, which is based on postgresql. > And I need to know *everything* about the Gi

Re: ModifyTable overheads in generic plans

2021-04-07 Thread Robert Haas
On Wed, Apr 7, 2021 at 12:34 PM Tom Lane wrote: > > v13.2 > > 64 323127472217 > > 128 152812691121 > > 256 709 652 491 > > 102496 78 67 > > > v14dev HEAD > > 64 14835 14360 14563 > > 128 9469

Re: multi-install PostgresNode fails with older postgres versions

2021-04-07 Thread Mark Dilger
> On Apr 7, 2021, at 10:36 AM, Alvaro Herrera wrote: > >> Yes, it would be much saner to make PostgresNode the factory class. Plus, >> some >> more logic could be injected there to either auto-detect the version (current >> behavior) or eg. use a given path to the binaries as Mark did in its

Re: Binary search in ScalarArrayOpExpr for OR'd constant arrays

2021-04-07 Thread Tomas Vondra
On 4/6/21 5:58 AM, David Rowley wrote: > On Sat, 20 Mar 2021 at 09:41, James Coleman wrote: >> I've attached a cleaned up patch. Last CF it was listed in is >> https://commitfest.postgresql.org/29/2542/ -- what's the appropriate >> step to take here given it's an already existing patch, but not

Re: ModifyTable overheads in generic plans

2021-04-07 Thread Tom Lane
Robert Haas writes: > On Wed, Apr 7, 2021 at 12:34 PM Tom Lane wrote: >> Indeed, that's a pretty impressive comparison. > +1. That looks like a big improvement. > In a vacuum, you'd hope that partitioning a table would make things > faster rather than slower, when only one partition is implicat

Re: multi-install PostgresNode fails with older postgres versions

2021-04-07 Thread Jehan-Guillaume de Rorthais
On Wed, 7 Apr 2021 13:36:31 -0400 Alvaro Herrera wrote: > On 2021-Apr-07, Jehan-Guillaume de Rorthais wrote: > > > Yes, it would be much saner to make PostgresNode the factory class. Plus, > > some more logic could be injected there to either auto-detect the version > > (current behavior) or eg.

Re: Feature improvement: can we add queryId for pg_catalog.pg_stat_activity view?

2021-04-07 Thread Bruce Momjian
On Wed, Apr 7, 2021 at 08:57:26PM +0800, Julien Rouhaud wrote: > On Wed, Apr 07, 2021 at 06:15:27PM +0530, Nitin Jadhav wrote: > > > > I feel we should merge both of the conditions as it is done in > > pgstat_report_xact_timestamp(). Probably we can write a common comment to > > explain both the

  1   2   3   >