Re: [HACKERS] why not parallel seq scan for slow functions

2017-07-11 Thread Amit Kapila
On Wed, Jul 12, 2017 at 1:50 AM, Jeff Janes wrote: > On Mon, Jul 10, 2017 at 9:51 PM, Dilip Kumar wrote: >> >> So because of this high projection cost the seqpath and parallel path >> both have fuzzily same cost but seqpath is winning because it's >>

Re: [HACKERS] pgsql 10: hash indexes testing

2017-07-11 Thread Amit Kapila
On Tue, Jul 11, 2017 at 11:08 PM, Alvaro Herrera wrote: > Amit Kapila wrote: > >> Yes, I also think the same idea can be used, in fact, I have mentioned >> it [1] as soon as you have committed that patch. Do we want to do >> anything at this stage for PG-10? I don't

Re: [HACKERS] Minor style cleanup in tab-complete.c

2017-07-11 Thread Michael Paquier
On Wed, Jul 12, 2017 at 11:19 AM, Thomas Munro wrote: > From the triviality department: I noticed some branches in > tab-complete.c's gargantuan if statement, mostly brand new, that break > from the established brace style. Should we fix that like this? For

Re: [HACKERS] New partitioning - some feedback

2017-07-11 Thread Amit Langote
On 2017/07/12 12:47, Ashutosh Bapat wrote: > On Wed, Jul 12, 2017 at 8:23 AM, Amit Langote > wrote: >> On 2017/07/11 18:57, Ashutosh Bapat wrote: >>> On Tue, Jul 11, 2017 at 4:16 AM, David Fetter wrote: So whatever we land on needs to mention

Re: [HACKERS] New partitioning - some feedback

2017-07-11 Thread Ashutosh Bapat
On Wed, Jul 12, 2017 at 8:23 AM, Amit Langote wrote: > On 2017/07/11 18:57, Ashutosh Bapat wrote: >> On Tue, Jul 11, 2017 at 4:16 AM, David Fetter wrote: >>> So whatever we land on needs to mention partition_of and >>> has_partitions. Is that

Re: [HACKERS] New partitioning - some feedback

2017-07-11 Thread Amit Langote
On 2017/07/11 13:34, Alvaro Herrera wrote: > Robert Haas wrote: >> On Mon, Jul 10, 2017 at 2:15 AM, Amit Langote >> wrote: > >>> Actually, if \d had shown RELKIND_PARTITIONED_TABLE tables as of Type >>> "partitioned table", we wouldn't need a separate flag for

Re: [HACKERS] New partitioning - some feedback

2017-07-11 Thread Amit Langote
On 2017/07/11 18:57, Ashutosh Bapat wrote: > On Tue, Jul 11, 2017 at 4:16 AM, David Fetter wrote: >> So whatever we land on needs to mention partition_of and >> has_partitions. Is that latter just its immediate partitions? >> Recursion all the way down? Somewhere in between?

[HACKERS] Minor style cleanup in tab-complete.c

2017-07-11 Thread Thomas Munro
Hi, >From the triviality department: I noticed some branches in tab-complete.c's gargantuan if statement, mostly brand new, that break from the established brace style. Should we fix that like this? -- Thomas Munro http://www.enterprisedb.com remove-extraneous-braces-from-tab-complete.patch

Re: [HACKERS] Subscription code improvements

2017-07-11 Thread Masahiko Sawada
On Sat, Jul 8, 2017 at 5:19 AM, Petr Jelinek wrote: > Hi, > > I have done some review of subscription handling (well self-review) and > here is the result of that (It's slightly improved version from another > thread [1]). Thank you for working on this and patches!

Re: [HACKERS] Multi column range partition table

2017-07-11 Thread Amit Langote
On 2017/07/12 4:24, Dean Rasheed wrote: > On 11 July 2017 at 13:29, Ashutosh Bapat > wrote: >> Most of the patch seems to be replacing "content" with "kind", >> RangeDatumContent with PartitionRangeDatumKind and RANGE_DATUM_FINITE >> with

Re: [HACKERS] A bug in mapping attributes in ATExecAttachPartition()

2017-07-11 Thread Amit Langote
On 2017/07/11 19:49, Ashutosh Bapat wrote: > On Tue, Jul 4, 2017 at 9:51 AM, Amit Langote > wrote: > >> >> Attached updated patches. > > There's an extra "we" in > +* Note that attachRel's OID is in this list. If it's partitioned, we > +* we don't

[HACKERS] Finding the min bounding box of an Index leaf page

2017-07-11 Thread Amira Shawky
Greetings, I have SPGist and Gist index are built on 2d points. I'm wondering does spgist/gist track the bounding box of each leaf page (data block)? and if yes, how can I access it Best Regards --- Amira Shawky Mohamed TA at Computer Dept. Faculty of Engineering Cairo University

Re: [HACKERS] GSoC 2017: Foreign Key Arrays

2017-07-11 Thread Alvaro Herrera
Mark Rofail wrote: >- now the RI checks utilise the @>(anyarray, anyelement) > - however there's a small problem: > operator does not exist: integer[] @> smallint > I assume that external casting would be required here. But how can I > downcast smallint to integer or

Re: [HACKERS] GSoC 2017: Foreign Key Arrays

2017-07-11 Thread Mark Rofail
here are the modifications to ri_triggers.c On Wed, Jul 12, 2017 at 12:26 AM, Mark Rofail wrote: > > *What I did * > >- now the RI checks utilise the @>(anyarray, anyelement) > > Best Regards, > Mark Rofail > diff --git a/src/backend/utils/adt/ri_triggers.c

Re: [HACKERS] GSoC 2017: Foreign Key Arrays

2017-07-11 Thread Mark Rofail
On Sun, Jul 9, 2017 at 7:42 PM, Alexander Korotkov wrote: > We may document that GIN index is required to accelerate RI queries for > array FKs. And users are encouraged to manually define them. > It's also possible to define new option when index on referencing >

Re: [HACKERS] why not parallel seq scan for slow functions

2017-07-11 Thread Jeff Janes
On Mon, Jul 10, 2017 at 9:51 PM, Dilip Kumar wrote: > > > In below function, we always multiply the target->cost.per_tuple with > path->rows, but in case of gather it should multiply this with > subpath->rows > > apply_projection_to_path() > > > path->startup_cost +=

Re: [HACKERS] Multi column range partition table

2017-07-11 Thread Dean Rasheed
On 11 July 2017 at 13:29, Ashutosh Bapat wrote: > + > + Also note that some element types, such as timestamp, > + have a notion of "infinity", which is just another value that can > + be stored. This is different from MINVALUE and > +

[HACKERS] Domains and arrays and composites, oh my

2017-07-11 Thread Tom Lane
I started to look into allowing domains over composite types, which is another never-implemented case that there's no very good reason not to allow. Well, other than the argument that the SQL standard only allows domains over "predefined" (built-in) types ... but we blew past that restriction

Re: [HACKERS] Arrays of domains

2017-07-11 Thread Andrew Dunstan
On 07/11/2017 12:44 PM, Tom Lane wrote: > > Can anyone think of a reason not to pursue that? > > I'm all for it. cheers andrew -- Andrew Dunstanhttps://www.2ndQuadrant.com PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services -- Sent via

Re: [HACKERS] Arrays of domains

2017-07-11 Thread David Fetter
On Tue, Jul 11, 2017 at 12:44:33PM -0400, Tom Lane wrote: > Over in > https://www.postgresql.org/message-id/877ezgyn60@metapensiero.it > there's a gripe about array_agg() not working for a domain type. > It fails because we don't create an array type over a domain type, > so the parser can't

Re: [HACKERS] pgsql 10: hash indexes testing

2017-07-11 Thread Alvaro Herrera
Amit Kapila wrote: > Yes, I also think the same idea can be used, in fact, I have mentioned > it [1] as soon as you have committed that patch. Do we want to do > anything at this stage for PG-10? I don't think we should attempt > something this late unless people feel this is a show-stopper

Fwd: [HACKERS] Vacuum: allow usage of more than 1GB of work mem

2017-07-11 Thread Claudio Freire
Resending without the .tar.bz2 that get blocked Sorry for the delay, I had extended vacations that kept me away from my test rigs, and afterward testing too, liteally, a few weeks. I built a more thoroguh test script that produced some interesting results. Will attach the results. For now, to

[HACKERS] Arrays of domains

2017-07-11 Thread Tom Lane
Over in https://www.postgresql.org/message-id/877ezgyn60@metapensiero.it there's a gripe about array_agg() not working for a domain type. It fails because we don't create an array type over a domain type, so the parser can't identify a suitable output type for the polymorphic aggregate. We

[HACKERS] GSoC 2017: weekly progress reports (week 6)

2017-07-11 Thread Shubham Barai
Project: Explicitly support predicate locks in index AMs besides b-tree I have done following tasks during this week. 1) worked on how to detect rw conflicts when fast update is enabled 2) created tests for different gin operators 3) went through some patches on commitfest to review 4)

Re: [HACKERS] Multi column range partition table

2017-07-11 Thread Ashutosh Bapat
On Sun, Jul 9, 2017 at 1:12 PM, Dean Rasheed wrote: > On 6 July 2017 at 22:43, Joe Conway wrote: >> I agree we should get this right the first time and I also agree with >> Dean's proposal, so I guess I'm a +2 >> > > On 7 July 2017 at 03:21, Amit

Re: [HACKERS] pgsql 10: hash indexes testing

2017-07-11 Thread Amit Kapila
On Tue, Jul 11, 2017 at 8:10 AM, Alvaro Herrera wrote: > Amit Kapila wrote: >> On Tue, Jul 11, 2017 at 6:51 AM, AP wrote: >> > On Fri, Jul 07, 2017 at 05:58:25PM +0530, Amit Kapila wrote: > >> >> I can understand your concerns. To address first concern

Re: [HACKERS] pgsql 10: hash indexes testing

2017-07-11 Thread AP
On Fri, Jul 07, 2017 at 05:58:25PM +0530, Amit Kapila wrote: > On Fri, Jul 7, 2017 at 8:22 AM, AP wrote: > > On Thu, Jul 06, 2017 at 05:19:59PM +0530, Amit Kapila wrote: > >> I think if you are under development, it is always advisable to create > >> indexes after initial bulk

Re: [HACKERS] A bug in mapping attributes in ATExecAttachPartition()

2017-07-11 Thread Ashutosh Bapat
On Tue, Jul 4, 2017 at 9:51 AM, Amit Langote wrote: > > Attached updated patches. There's an extra "we" in +* Note that attachRel's OID is in this list. If it's partitioned, we +* we don't need to schedule it to be scanned (would be a noop anyway

Re: [HACKERS] New partitioning - some feedback

2017-07-11 Thread Ashutosh Bapat
On Tue, Jul 11, 2017 at 4:16 AM, David Fetter wrote: > On Mon, Jul 10, 2017 at 05:33:34PM -0500, Robert Haas wrote: >> On Mon, Jul 10, 2017 at 2:15 AM, Amit Langote >> wrote: >> > I posted a patch upthread which makes \d hide partitions >> >

Re: [HACKERS] asynchronous execution

2017-07-11 Thread Antonin Houska
Kyotaro HORIGUCHI wrote: > > Just one idea that I had while reading the code. > > > > In ExecAsyncEventLoop you iterate estate->es_pending_async, then move the > > complete requests to the end and finaly adjust estate->es_num_pending_async > > so > > that the

[HACKERS] Typo in backend/storage/ipc/standby.c

2017-07-11 Thread Kyotaro HORIGUCHI
Hello. I noticed that a comment above StandbyAcquireAccessExclusiveLock in backend/storage/ipc/standby.c using wrong names of a variable and a type. The attached patch fixes it. The same mistake is found in older versions back to 9.0. fix_typo_of_standby_c_10_master.patch is for 10 and master

Re: [HACKERS] Multi column range partition table

2017-07-11 Thread Noah Misch
On Sun, Jul 09, 2017 at 08:42:32AM +0100, Dean Rasheed wrote: > On 6 July 2017 at 22:43, Joe Conway wrote: > > I agree we should get this right the first time and I also agree with > > Dean's proposal, so I guess I'm a +2 > > > > On 7 July 2017 at 03:21, Amit Langote