Re: A reloption for partitioned tables - parallel_workers

2021-09-04 Thread Daniel Gustafsson
> On 4 Sep 2021, at 01:17, Amit Langote wrote: > On Sat, Sep 4, 2021 at 3:10 Laurenz Albe > wrote: > On Fri, 2021-09-03 at 18:24 +0200, Daniel Gustafsson wrote: > > This thread has stalled and the patch no longer applies. I propose that we > > mark this

Re: A reloption for partitioned tables - parallel_workers

2021-09-03 Thread Amit Langote
On Sat, Sep 4, 2021 at 3:10 Laurenz Albe wrote: > On Fri, 2021-09-03 at 18:24 +0200, Daniel Gustafsson wrote: > > > On 6 Apr 2021, at 09:46, Amit Langote wrote: > > > On Fri, Apr 2, 2021 at 11:36 PM Laurenz Albe > wrote: > > > > > > I don't know if Seamus is still working on that; if not, we

Re: A reloption for partitioned tables - parallel_workers

2021-09-03 Thread Laurenz Albe
On Fri, 2021-09-03 at 18:24 +0200, Daniel Gustafsson wrote: > > On 6 Apr 2021, at 09:46, Amit Langote wrote: > > On Fri, Apr 2, 2021 at 11:36 PM Laurenz Albe > > wrote: > > > > I don't know if Seamus is still working on that; if not, we might > > > mark it as "returned with feedback". > > > >

Re: A reloption for partitioned tables - parallel_workers

2021-09-03 Thread Daniel Gustafsson
> On 6 Apr 2021, at 09:46, Amit Langote wrote: > On Fri, Apr 2, 2021 at 11:36 PM Laurenz Albe wrote: >> I don't know if Seamus is still working on that; if not, we might >> mark it as "returned with feedback". > > I have to agree given the time left. This thread has stalled and the patch no

Re: A reloption for partitioned tables - parallel_workers

2021-04-06 Thread Amit Langote
On Fri, Apr 2, 2021 at 11:36 PM Laurenz Albe wrote: > On Wed, 2021-03-24 at 14:14 +1300, David Rowley wrote: > > On Fri, 19 Mar 2021 at 02:07, Amit Langote wrote: > > > Attached a new version rebased over c8f78b616, with the grouping > > > relation partitioning enhancements as a separate patch

Re: A reloption for partitioned tables - parallel_workers

2021-04-02 Thread Laurenz Albe
On Wed, 2021-03-24 at 14:14 +1300, David Rowley wrote: > On Fri, 19 Mar 2021 at 02:07, Amit Langote wrote: > > Attached a new version rebased over c8f78b616, with the grouping > > relation partitioning enhancements as a separate patch 0001. Sorry > > about the delay. > > I had a quick look at

Re: A reloption for partitioned tables - parallel_workers

2021-03-23 Thread David Rowley
On Fri, 19 Mar 2021 at 02:07, Amit Langote wrote: > Attached a new version rebased over c8f78b616, with the grouping > relation partitioning enhancements as a separate patch 0001. Sorry > about the delay. I had a quick look at this and wondered if the partitioned table's parallel workers

Re: A reloption for partitioned tables - parallel_workers

2021-03-18 Thread Amit Langote
On Fri, Mar 5, 2021 at 11:06 PM Laurenz Albe wrote: > On Fri, 2021-03-05 at 22:55 +0900, Amit Langote wrote: > > On Fri, Mar 5, 2021 at 10:47 PM Laurenz Albe > > wrote: > > > On Wed, 2021-03-03 at 17:58 +0900, Amit Langote wrote: > > > > For example, with the attached PoC patch: > > > > > > I

Re: A reloption for partitioned tables - parallel_workers

2021-03-05 Thread Laurenz Albe
On Fri, 2021-03-05 at 22:55 +0900, Amit Langote wrote: > On Fri, Mar 5, 2021 at 10:47 PM Laurenz Albe wrote: > > On Wed, 2021-03-03 at 17:58 +0900, Amit Langote wrote: > > > For example, with the attached PoC patch: > > > > I have incorporated your POC patch and added a regression test. > > > >

Re: A reloption for partitioned tables - parallel_workers

2021-03-05 Thread Amit Langote
On Fri, Mar 5, 2021 at 10:47 PM Laurenz Albe wrote: > On Wed, 2021-03-03 at 17:58 +0900, Amit Langote wrote: > > For example, with the attached PoC patch: > > I have incorporated your POC patch and added a regression test. > > I didn't test it thoroughly though. Thanks. Although, I wonder if we

Re: A reloption for partitioned tables - parallel_workers

2021-03-05 Thread Laurenz Albe
On Wed, 2021-03-03 at 17:58 +0900, Amit Langote wrote: > For example, with the attached PoC patch: I have incorporated your POC patch and added a regression test. I didn't test it thoroughly though. Yours, Laurenz Albe From 34f7da98b34bc1dbf7daca9e2ca6055c80d77f43 Mon Sep 17 00:00:00 2001 From:

Re: A reloption for partitioned tables - parallel_workers

2021-03-03 Thread Laurenz Albe
On Wed, 2021-03-03 at 17:58 +0900, Amit Langote wrote: > On Tue, Mar 2, 2021 at 5:47 PM Laurenz Albe wrote: > > On Tue, 2021-03-02 at 11:23 +0900, Amit Langote wrote: > > > I got the same result with my implementation, but I am wondering if > > > setting parallel_workers=0 on the parent table

Re: A reloption for partitioned tables - parallel_workers

2021-03-03 Thread Amit Langote
On Tue, Mar 2, 2021 at 5:47 PM Laurenz Albe wrote: > On Tue, 2021-03-02 at 11:23 +0900, Amit Langote wrote: > > +ALTER TABLE pagg_tab_ml SET (parallel_workers = 0); > > +EXPLAIN (COSTS OFF) > > +SELECT a FROM pagg_tab_ml WHERE b = 42; > > +QUERY PLAN > >

Re: A reloption for partitioned tables - parallel_workers

2021-03-02 Thread Laurenz Albe
On Tue, 2021-03-02 at 11:23 +0900, Amit Langote wrote: > +ALTER TABLE pagg_tab_ml SET (parallel_workers = 0); > +EXPLAIN (COSTS OFF) > +SELECT a FROM pagg_tab_ml WHERE b = 42; > +QUERY PLAN > +--- > + Append > + -> Seq Scan on

Re: A reloption for partitioned tables - parallel_workers

2021-03-01 Thread Amit Langote
On Tue, Mar 2, 2021 at 12:10 AM Laurenz Albe wrote: > Here is an updated patch with this fix. Thanks for updating the patch. I was about to post an updated version myself but you beat me to it. > I added regression tests and adapted the documentation a bit. > > I also added support for

Re: A reloption for partitioned tables - parallel_workers

2021-03-01 Thread Laurenz Albe
On Mon, 2021-03-01 at 17:39 +0900, Amit Langote wrote: > > I am not sure. > > IMO, for normal table, we use the following macro to get the > > parallel_workers: > > -- > > /* > > * RelationGetParallelWorkers > > * Returns the relation's parallel_workers

Re: A reloption for partitioned tables - parallel_workers

2021-03-01 Thread Amit Langote
On Tue, Feb 23, 2021 at 7:24 PM houzj.f...@fujitsu.com wrote: > > > It seems the patch does not include the code that get the > > > parallel_workers from new struct " PartitionedTableRdOptions ", Did I miss > > something ? > > > > Aren't the following hunks in the v2 patch what you meant? > > > >

RE: A reloption for partitioned tables - parallel_workers

2021-02-23 Thread houzj.f...@fujitsu.com
> > It seems the patch does not include the code that get the > > parallel_workers from new struct " PartitionedTableRdOptions ", Did I miss > something ? > > Aren't the following hunks in the v2 patch what you meant? > > diff --git a/src/backend/access/common/reloptions.c >

Re: A reloption for partitioned tables - parallel_workers

2021-02-23 Thread Amit Langote
Hi, On Tue, Feb 23, 2021 at 3:12 PM houzj.f...@fujitsu.com wrote: > > Here is an updated version of the Seamus' patch that takes into account > > these > > and other comments received on this thread so far. > > Maybe warrants adding some tests too but I haven't. > > > > Seamus, please register

RE: A reloption for partitioned tables - parallel_workers

2021-02-22 Thread houzj.f...@fujitsu.com
> > 4. Maybe it also doesn't make sense to consider the parent relation's > > parallel_workers if Parallel Append is disabled > > (enable_parallel_append = off). That's because with a simple > > (non-parallel) Append running under Gather, all launched parallel > > workers process the same

Re: A reloption for partitioned tables - parallel_workers

2021-02-19 Thread Laurenz Albe
On Fri, 2021-02-19 at 16:30 +0900, Amit Langote wrote: > On Tue, Feb 16, 2021 at 1:35 AM Seamus Abshere wrote: > > > Here we go, my first patch... solves > > > https://www.postgresql.org/message-id/7d6fdc20-857c-4cbe-ae2e-c0ff9520e...@www.fastmail.com > > Here is an updated version of the

Re: A reloption for partitioned tables - parallel_workers

2021-02-19 Thread Amit Langote
On Fri, Feb 19, 2021 at 11:54 PM Seamus Abshere wrote: > On Fri, Feb 19, 2021, at 2:30 AM, Amit Langote wrote: > > Here is an updated version of the Seamus' patch that takes into > > account these and other comments received on this thread so far. > > Maybe warrants adding some tests too but I

Re: A reloption for partitioned tables - parallel_workers

2021-02-19 Thread Seamus Abshere
hi Amit, Thanks so much for doing this. I had created https://commitfest.postgresql.org/32/2987/ and it looks like it now shows your patch as the one to use. Let me know if I should do anything else. Best, Seamus On Fri, Feb 19, 2021, at 2:30 AM, Amit Langote wrote: > On Tue, Feb 16, 2021 at

Re: A reloption for partitioned tables - parallel_workers

2021-02-18 Thread Amit Langote
On Tue, Feb 16, 2021 at 3:05 PM Amit Langote wrote: > On Tue, Feb 16, 2021 at 1:35 AM Seamus Abshere wrote: > > Here we go, my first patch... solves > > https://www.postgresql.org/message-id/7d6fdc20-857c-4cbe-ae2e-c0ff9520e...@www.fastmail.com > > Thanks for sending the patch here. > > It

Re: A reloption for partitioned tables - parallel_workers

2021-02-18 Thread Amit Langote
On Thu, Feb 18, 2021 at 6:06 PM Hou, Zhijie wrote: > > Here we go, my first patch... solves > > https://www.postgresql.org/message-id/7d6fdc20-857c-4cbe-ae2e-c0ff9520 > > e...@www.fastmail.com > > > > Hi, > > partitioned_table_reloptions(Datum reloptions, bool validate) > { > + static

RE: A reloption for partitioned tables - parallel_workers

2021-02-18 Thread Hou, Zhijie
> hi, > > Here we go, my first patch... solves > https://www.postgresql.org/message-id/7d6fdc20-857c-4cbe-ae2e-c0ff9520 > e...@www.fastmail.com > Hi, partitioned_table_reloptions(Datum reloptions, bool validate) { + static const relopt_parse_elt tab[] = { +

Re: A reloption for partitioned tables - parallel_workers

2021-02-17 Thread Amit Langote
On Tue, Feb 16, 2021 at 11:02 PM Laurenz Albe wrote: > On Tue, 2021-02-16 at 16:29 +0900, Amit Langote wrote: > > > I am +1 on allowing to override the degree of parallelism on a parallel > > > append. If "parallel_workers" on the partitioned table is an option for > > > that, it might be a

Re: A reloption for partitioned tables - parallel_workers

2021-02-16 Thread Laurenz Albe
On Tue, 2021-02-16 at 16:29 +0900, Amit Langote wrote: > > I am +1 on allowing to override the degree of parallelism on a parallel > > append. If "parallel_workers" on the partitioned table is an option for > > that, it might be a simple solution. On the other hand, perhaps it would > > be less

Re: A reloption for partitioned tables - parallel_workers

2021-02-15 Thread Amit Langote
Hi, On Tue, Feb 16, 2021 at 1:06 AM Laurenz Albe wrote: > On Mon, 2021-02-15 at 17:53 +0900, Amit Langote wrote: > > On Mon, Feb 15, 2021 at 5:28 PM Seamus Abshere wrote: > > > It turns out parallel_workers may be a useful reloption for certain uses > > > of partitioned tables, > > > at least

Re: A reloption for partitioned tables - parallel_workers

2021-02-15 Thread Amit Langote
Hi Seamus, Please see my reply below. On Tue, Feb 16, 2021 at 1:35 AM Seamus Abshere wrote: > On Mon, Feb 15, 2021, at 3:53 AM, Amit Langote wrote: > > On Mon, Feb 15, 2021 at 5:28 PM Seamus Abshere wrote: > > > It turns out parallel_workers may be a useful reloption for certain uses > > > of

Re: A reloption for partitioned tables - parallel_workers

2021-02-15 Thread Seamus Abshere
hi, Here we go, my first patch... solves https://www.postgresql.org/message-id/7d6fdc20-857c-4cbe-ae2e-c0ff9520e...@www.fastmail.com Best, Seamus On Mon, Feb 15, 2021, at 3:53 AM, Amit Langote wrote: > Hi Seamus, > > On Mon, Feb 15, 2021 at 5:28 PM Seamus Abshere wrote: > > It turns out

Re: A reloption for partitioned tables - parallel_workers

2021-02-15 Thread Laurenz Albe
On Mon, 2021-02-15 at 17:53 +0900, Amit Langote wrote: > On Mon, Feb 15, 2021 at 5:28 PM Seamus Abshere wrote: > > It turns out parallel_workers may be a useful reloption for certain uses of > > partitioned tables, > > at least if they're made up of fancy column store partitions (see > > > >

Re: A reloption for partitioned tables - parallel_workers

2021-02-15 Thread Amit Langote
Hi Seamus, On Mon, Feb 15, 2021 at 5:28 PM Seamus Abshere wrote: > It turns out parallel_workers may be a useful reloption for certain uses of > partitioned tables, at least if they're made up of fancy column store > partitions (see >