Drop Trigger Mechanism with Detached partitions

2019-09-30 Thread M Beena Emerson
| | plain | | c2 | integer | | | | plain | | Access method: heap -- Beena Emerson EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company

Re: Pluggable Storage - Andres's take

2018-09-11 Thread Beena Emerson
Hello, On Mon, 10 Sep 2018, 19:33 Amit Kapila, wrote: > On Mon, Sep 10, 2018 at 1:12 PM Haribabu Kommi > wrote: > > > > On Wed, Sep 5, 2018 at 2:04 PM Haribabu Kommi > wrote: > >> > > pg_stat_get_tuples_hot_updated and others: > > /* > > * Counter tuples_hot_updated stores number of hot update

Re: [HACKERS] Runtime Partition Pruning

2018-04-03 Thread Beena Emerson
Hi David, On Wed, Apr 4, 2018 at 7:57 AM, David Rowley wrote: > On 4 April 2018 at 05:50, Beena Emerson wrote: >> With Amit's v46 patch, the following query in partition_prune was >> crashing during make check. >> explain (analyze, costs off, summary off, timing off)

Re: [HACKERS] Runtime Partition Pruning

2018-04-03 Thread Beena Emerson
regress/results/inherit.out > With Amit's v46 patch, the following query in partition_prune was crashing during make check. explain (analyze, costs off, summary off, timing off) execute ab_q1 (2, 2, 3); -- Beena Emerson EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company

Re: [HACKERS] Runtime Partition Pruning

2018-01-09 Thread Beena Emerson
Hi, The mail was accidently sent before I could complete. On Tue, Jan 9, 2018 at 2:24 PM, Beena Emerson wrote: > Hello, > > The pruning does not work well with char type: > > Case 2: Case with optimizer pruning > drop table ab_c; > create table ab_c (a int not null, b int

Re: [HACKERS] Runtime Partition Pruning

2018-01-09 Thread Beena Emerson
ver executed) Filter: ((a >= $1) AND (a <= $2) AND (b = ANY ('{3,2}'::integer[]))) -> Seq Scan on abc_a2_b3 (never executed) Filter: ((a >= $1) AND (a <= $2) AND (b = ANY ('{3,2}'::integer[]))) -> Seq Scan on abc_a3_b2 (never executed) Filter: ((a >= $1) AND (a <= $2) AND (b = ANY ('{3,2}'::integer[]))) -> Seq Scan on abc_a3_b3 (never executed) Filter: ((a >= $1) AND (a <= $2) AND (b = ANY ('{3,2}'::integer[]))) (13 rows) postgres=# explain (analyze, costs off, summary off, timing off) execute abc_q1 (1, 2); ERROR: partition missing from Append subplans -- Beena Emerson EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company

Re: [HACKERS] Runtime Partition Pruning

2018-01-05 Thread Beena Emerson
Scan on abc_a3_b1 (actual rows=0 loops=1) Filter: ((a >= $1) AND (a <= $2) AND (b <= $3)) -> Seq Scan on abc_a3_b2 (never executed) Filter: ((a >= $1) AND (a <= $2) AND (b <= $3)) -> Seq Scan on abc_a3_b3 (never executed) Filter: ((

Re: [HACKERS] Runtime Partition Pruning

2017-12-31 Thread Beena Emerson
off) SELECT * FROM prun_test_part WHERE sal < (SELECT sal FROM prun_test_part WHERE sal = 200); server closed the connection unexpectedly This probably means the server terminated abnormally before or while processing the request. The connection to the server was lost. Attempting reset: Failed. -- Beena Emerson EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company

Re: [HACKERS] Runtime Partition Pruning

2017-12-21 Thread Beena Emerson
scan. I will try and post the patch tomorrow. If there is more suggestions, you can give it over that; otherwise it seems like duplicating efforts. -- Beena Emerson EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company

Re: [HACKERS] Runtime Partition Pruning

2017-12-21 Thread Beena Emerson
Hello, On Thu, Dec 21, 2017 at 6:30 PM, David Rowley wrote: > On 22 December 2017 at 01:43, Beena Emerson wrote: >>> I wonder if Robert understands the extent of the problem. The patch >>> will be useful to prune away partitions when the partitioned table is >>> on

Re: [HACKERS] Runtime Partition Pruning

2017-12-21 Thread Beena Emerson
Hello, On Thu, Dec 21, 2017 at 6:01 PM, David Rowley wrote: > On 21 December 2017 at 23:51, Beena Emerson wrote: >> On Thu, Dec 21, 2017 at 2:31 PM, David Rowley >> wrote: >>> On 19 December 2017 at 21:54, Beena Emerson wrote: >> >>> The problem is

Re: [HACKERS] Runtime Partition Pruning

2017-12-21 Thread Beena Emerson
Hello David, On Thu, Dec 21, 2017 at 2:31 PM, David Rowley wrote: > On 19 December 2017 at 21:54, Beena Emerson wrote: > The problem is down to the logic in choose_custom_plan() only choosing > a generic plan if the average cost of the generic plan is less than > the average cust

Re: [HACKERS] Runtime Partition Pruning

2017-12-19 Thread Beena Emerson
to be used multiple times with different parameters, so > we really don't want to repeat any work that we don't have to here. > I agree. It would be better to avoid building the structure during execution. PFA the updated patch. -- Beena Emerson EnterpriseDB: http://www.

Re: [HACKERS] Runtime Partition Pruning

2017-12-19 Thread Beena Emerson
Hi David, Thank you for reviewing and looking at this. I have attached the WIP patch which incorporates some of Robert's comments and is rebased over Amit's v14 patch. On Sat, Dec 16, 2017 at 11:35 AM, David Rowley wrote: > On 13 December 2017 at 00:33, Beena Emerson wrote: >&

Re: [HACKERS] Runtime Partition Pruning

2017-12-12 Thread Beena Emerson
Hello Jesper, On Tue, Dec 12, 2017 at 4:04 PM, Jesper Pedersen wrote: > Hi Beena, > > On 12/07/2017 02:22 AM, Beena Emerson wrote: >> >> I have added the partition quals that are used for pruning. >> >> PFA the updated patch. I have changed the names of variabl

Re: [HACKERS] Runtime Partition Pruning

2017-12-12 Thread Beena Emerson
Hello, On Fri, Dec 8, 2017 at 3:37 AM, David Rowley wrote: > On 7 December 2017 at 23:56, Beena Emerson wrote: >> Currently Amit's v13 patches do not apply on the HEAD and I was >> working on 487a0c1518af2f3ae2d05b7fd23d636d687f28f3 which is the last >> commit wh

Re: [HACKERS] Runtime Partition Pruning

2017-12-12 Thread Beena Emerson
On Tue, Dec 12, 2017 at 4:57 PM, Beena Emerson wrote: > Hello Robert, > Thank you for the comments. I have started working on it. > > On Fri, Dec 8, 2017 at 9:27 PM, Robert Haas wrote: >> On Thu, Dec 7, 2017 at 2:22 AM, Beena Emerson >> wrote: >>> I have added

Re: [HACKERS] Runtime Partition Pruning

2017-12-12 Thread Beena Emerson
Hello Robert, Thank you for the comments. I have started working on it. On Fri, Dec 8, 2017 at 9:27 PM, Robert Haas wrote: > On Thu, Dec 7, 2017 at 2:22 AM, Beena Emerson wrote: >> I have added the partition quals that are used for pruning. >> >> PFA the updated patch. I h

Re: [HACKERS] Runtime Partition Pruning

2017-12-07 Thread Beena Emerson
Hello, On Thu, Dec 7, 2017 at 12:52 PM, Beena Emerson wrote: > > 1. Only runtime pruning - David's case1 > explain analyse execute ab_q1 (2,3); >

Re: [HACKERS] Runtime Partition Pruning

2017-12-07 Thread Beena Emerson
Hello David, On Thu, Dec 7, 2017 at 4:07 PM, David Rowley wrote: > On 7 December 2017 at 20:22, Beena Emerson wrote: >> PFA the updated patch. > > Hi Beena, > > Thanks for updating this. > > Can you list the patches which are required for this to apply to > today&

Re: [HACKERS] Runtime Partition Pruning

2017-12-06 Thread Beena Emerson
On Wed, Dec 6, 2017 at 1:21 PM, David Rowley wrote: > On 2 December 2017 at 08:04, Robert Haas wrote: >> On Fri, Dec 1, 2017 at 6:20 AM, Beena Emerson >> wrote: >>> David Q1: >>> postgres=# explain analyse execute ab_q1 (3,3); --const >>>

Re: [HACKERS] Runtime Partition Pruning

2017-12-02 Thread Beena Emerson
Hello Robert, On Sat, Dec 2, 2017 at 12:34 AM, Robert Haas wrote: > On Fri, Dec 1, 2017 at 6:20 AM, Beena Emerson wrote: >> David Q1: >> postgres=# explain analyse execute ab_q1 (3,3); --const >>

Re: [HACKERS] Runtime Partition Pruning

2017-12-01 Thread Beena Emerson
ms Execution time: 0.111 ms I am still working on the patch to add more comments and regression tests but comments on the code is welcome. [1]https://www.postgresql.org/message-id/df609168-b7fd-4c0b-e9b2-6e398d411e27%40lab.ntt.co.jp -- Beena Emerson EnterpriseDB: http://www.enterprisedb.

Re: [HACKERS] Runtime Partition Pruning

2017-11-29 Thread Beena Emerson
Hello, On Wed, Nov 29, 2017 at 7:11 AM, Michael Paquier wrote: > On Wed, Nov 15, 2017 at 3:53 PM, Beena Emerson > wrote: >> Thank you for your suggestion. I am looking into this and will post a >> patch soon. > > It has been two weeks since this update and no new pat

Re: [HACKERS] Runtime Partition Pruning

2017-11-29 Thread Beena Emerson
stgres=# explain execute ab_q1 (4); QUERY PLAN -------- Append (cost=0.00..99.10 rows=1 width=8) -> Seq Scan on ab_a4 (cost=0.00..49.55 rows=1 width=8) Filter: ((a >= 4) AND (a <= 5) AND (a = $1)) (3 rows) -- Beena Emerson EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company

Re: [HACKERS] Runtime Partition Pruning

2017-11-29 Thread Beena Emerson
On Tue, Nov 14, 2017 at 6:27 PM, David Rowley wrote: > On 14 November 2017 at 19:16, Beena Emerson wrote: >> PFA the updated patches. > > Hi Beena, > > Thanks for working on this. I've had a look at the patch to try to > understand how it is working. I found it a b

Re: [HACKERS] Runtime Partition Pruning

2017-11-29 Thread Beena Emerson
ca612%40lab.ntt.co.jp [2] https://www.postgresql.org/message-id/df609168-b7fd-4c0b-e9b2-6e398d411e27%40lab.ntt.co.jp -- Beena Emerson EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company 0001-Implement-runtime-partiton-pruning_v3.patch Description: Binary data

Re: [HACKERS] Runtime Partition Pruning

2017-11-29 Thread Beena Emerson
Hello Rajkumar, On Tue, Nov 14, 2017 at 2:22 PM, Rajkumar Raghuwanshi wrote: > On Tue, Nov 14, 2017 at 11:46 AM, Beena Emerson > wrote: >> >> PFA the updated patches. > > > Hi, > > I have started testing this along with fast pruning. It is crashing for sql >

Re: [HACKERS] Runtime Partition Pruning

2017-11-14 Thread Beena Emerson
of hierarchical structure of the partition hierarchy > would need to be stored in the Append node and then you'd need to > search at each level, and then somehow match the results up to the > subpaths that you have in the Append. Although, I'm still not sure > this is the best way to go about this. Thank you for your suggestion. I am looking into this and will post a patch soon. -- Beena Emerson EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company

Re: [HACKERS] Runtime Partition Pruning

2017-11-14 Thread Beena Emerson
Hello Rajkumar, On Tue, Nov 14, 2017 at 2:22 PM, Rajkumar Raghuwanshi wrote: > On Tue, Nov 14, 2017 at 11:46 AM, Beena Emerson > wrote: >> >> PFA the updated patches. > > > Hi, > > I have started testing this along with fast pruning. It is crashing for sql >

Re: [HACKERS] Runtime Partition Pruning

2017-11-13 Thread Beena Emerson
PFA the updated patches. On Tue, Nov 14, 2017 at 11:45 AM, Beena Emerson wrote: > Hello Amul, > > Thank you for reviewing. > > On Fri, Nov 10, 2017 at 4:33 PM, amul sul wrote: >> On Thu, Nov 9, 2017 at 4:48 PM, Beena Emerson >> wrote: >>> Hello all, >&g

Re: [HACKERS] Runtime Partition Pruning

2017-11-13 Thread Beena Emerson
Hello Amul, Thank you for reviewing. On Fri, Nov 10, 2017 at 4:33 PM, amul sul wrote: > On Thu, Nov 9, 2017 at 4:48 PM, Beena Emerson wrote: >> Hello all, >> >> Here is the updated patch which is rebased over v10 of Amit Langote's >> path towards faster pr