[HACKERS] Issue with NULLS LAST, with postgres_fdw sort pushdown

2016-02-29 Thread Rajkumar Raghuwanshi
order by name desc nulls last; --check the explain plan explain plan select * from fdw_sort_test order by name desc nulls last; Thanks & Regards, Rajkumar Raghuwanshi QMG, EnterpriseDB Corporation

Re: [HACKERS] Issue with NULLS LAST, with postgres_fdw sort pushdown

2016-03-02 Thread Rajkumar Raghuwanshi
Thanks Ashutosh. Retested the issue after applying given patch,It is fine now. Thanks & Regards, Rajkumar Raghuwanshi QMG, EnterpriseDB Corporation On Wed, Mar 2, 2016 at 2:35 PM, Ashutosh Bapat < ashutosh.ba...@enterprisedb.com> wrote: > Thanks Rajkumar for your report. Let m

[HACKERS] Postgres_fdw join pushdown - getting server crash in left outer join of three table

2016-03-19 Thread Rajkumar Raghuwanshi
terminated abnormally before or while processing the request. connection to server was lost Facing the same crash while doing left outer join, right outer join or combination of left-right outer joins for three tables and one local and two foreign tables. Thanks & Regards, Rajkumar Raghuwa

Re: [HACKERS] Postgres_fdw join pushdown - getting server crash in left outer join of three table

2016-03-23 Thread Rajkumar Raghuwanshi
Thanks Ashutosh for the patch. I have apply and retested it, now not getting server crash. Thanks & Regards, Rajkumar Raghuwanshi QMG, EnterpriseDB Corporation On Mon, Mar 21, 2016 at 8:02 PM, Ashutosh Bapat < ashutosh.ba...@enterprisedb.com> wrote: > Thanks Michael for look

[HACKERS] Postgres_fdw join pushdown - INNER - FULL OUTER join combination generating wrong result

2016-03-28 Thread Rajkumar Raghuwanshi
and full outer join on corresponding foreign tables SELECT t1.c1,t2.c1,t3.c1 FROM ft t1 INNER JOIN ft t2 ON (t1.c1 = t2.c1) FULL JOIN ft t3 ON (t2.c1 = t3.c1); c1 | c1 | c1 ++ 1 | 1 | 1 1 | 2 | 2 | 1 | 2 | 2 | 2 (4 rows) Thanks & Regards, Rajkumar Raghuwanshi QMG, EnterpriseDB Corporation >

Re: [HACKERS] Postgres_fdw join pushdown - INNER - FULL OUTER join combination generating wrong result

2016-03-30 Thread Rajkumar Raghuwanshi
Thanks Ashutosh for the patch. I have applied and tested it. Now getting proper result for reported issue. Thanks & Regards, Rajkumar Raghuwanshi QMG, EnterpriseDB Corporation On Tue, Mar 29, 2016 at 7:50 PM, Ashutosh Bapat < ashutosh.ba...@enterprisedb.com> wrote: > > Observat

Re: [HACKERS] Declarative partitioning - another take

2016-09-06 Thread Rajkumar Raghuwanshi
3| | A (8 rows) Thanks & Regards, Rajkumar Raghuwanshi QMG, EnterpriseDB Corporation On Tue, Sep 6, 2016 at 1:37 PM, Amit Langote wrote: > > Hi, > > On 2016/09/06 16:13, Ashutosh Bapat wrote: > > I found a server crash while running make check in regress folder

Re: [HACKERS] Declarative partitioning - another take

2016-09-07 Thread Rajkumar Raghuwanshi
in ('IT'); create table emp_p2 partition of employee for values in ('HR'); create table emp_p3 partition of employee for values in (??); Thanks & Regards, Rajkumar Raghuwanshi QMG, EnterpriseDB Corporation On Tue, Sep 6, 2016 at 6:37 PM, Amit Langote wrote: > On Tue, Sep 6

Re: [HACKERS] Declarative partitioning - another take

2016-09-08 Thread Rajkumar Raghuwanshi
On Wed, Sep 7, 2016 at 3:58 PM, Amit Langote wrote: > > Hi, > > On 2016/09/07 17:56, Rajkumar Raghuwanshi wrote: > > Hi, > > > > I have a query regarding list partitioning, > > > > For example if I want to store employee data in a table, with "IT&qu

Re: [HACKERS] Declarative partitioning - another take

2016-09-14 Thread Rajkumar Raghuwanshi
-+-+- test_array_p1 | 1 | {1} | {1} (1 row) postgres=# SELECT tableoid::regclass,* FROM test_array_p2; tableoid| i | j | k ---+---+---+- test_array_p2 | 2 | {2,2} | {2} (1 row) postgres=# SELECT tableoid::regclass,* FROM test_array; ERROR: cache lo

Re: [HACKERS] Partition-wise join for join between (declaratively) partitioned tables

2016-09-16 Thread Rajkumar Raghuwanshi
ktop/edb_work/WO RKDB/PG/postgresql/src' make: *** [all-src-recurse] Error 2 PS : I am using - gcc (GCC) 4.4.7 20120313 (Red Hat 4.4.7-17) Attached the patch for the fix of above error. Thanks & Regards, Rajkumar Raghuwanshi QMG, EnterpriseDB Corporation diff --git a/src/include/nodes/relation.h

Re: [HACKERS] Partition-wise join for join between (declaratively) partitioned tables

2016-09-20 Thread Rajkumar Raghuwanshi
connection to the server was lost. Attempting reset: Failed. !> Thanks & Regards, Rajkumar Raghuwanshi QMG, EnterpriseDB Corporation

Re: [HACKERS] Partition-wise join for join between (declaratively) partitioned tables

2016-09-22 Thread Rajkumar Raghuwanshi
ata*PartitionScheme; */ Thanks & Regards, Rajkumar Raghuwanshi

Re: [HACKERS] path toward faster partition pruning

2017-10-22 Thread Rajkumar Raghuwanshi
On Thu, Oct 19, 2017 at 12:16 PM, Amit Langote < langote_amit...@lab.ntt.co.jp> wrote: > Description of the attached patches: > > 0001: add new tests for partition-pruning > > 0002: patch that makes all the changes needed in the planer (adds a stub > function in partition.c) > > 0003: patch

Re: [HACKERS] path toward faster partition pruning

2017-10-23 Thread Rajkumar Raghuwanshi
lt;= 1; QUERY PLAN -- Append -> Seq Scan on rp_p2 Filter: (a <= 1) (3 rows) postgres=# select * from rp where a <= 1; a | b ---+ 1 | p2 (1 row) Thanks & Regards, Rajkumar Raghuwanshi QMG, EnterpriseDB Corporation

Re: [HACKERS] path toward faster partition pruning

2017-10-27 Thread Rajkumar Raghuwanshi
Append -> Foreign Scan on ftplt1_p1 t1 -> Foreign Scan on ftplt1_p2 t1_1 -> Unique -> Append -> Foreign Scan on ftplt1_p1 t2 -> Foreign Scan on ftplt1_p2 t2_1 (8 rows) --PG-HEAD +v5 patches postgres=# EXPLAIN (COSTS

Re: [HACKERS] path toward faster partition pruning

2017-10-27 Thread Rajkumar Raghuwanshi
AND c2 < 300; 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. Thanks & Regards, Rajkumar Raghuwanshi QMG, EnterpriseDB Corporation

Re: [HACKERS] path toward faster partition pruning

2017-10-30 Thread Rajkumar Raghuwanshi
WHERE a IS NOT NULL ORDER BY 1; tableoid | a | b | c --+---+---+--- lpd_p1 | 1 | 1 | 1 lpd_p1 | 2 | 2 | 2 lpd_p1 | 3 | 3 | 3 lpd_p2 | 4 | 4 | 4 lpd_p2 | 5 | 5 | 5 (5 rows) Thanks & Regards, Rajkumar Raghuwanshi QMG, EnterpriseDB Corporation

Re: [HACKERS] path toward faster partition pruning

2017-11-07 Thread Rajkumar Raghuwanshi
6) Delete on lp1 Delete on lp2 Delete on lp3 -> Seq Scan on lp1 (cost=0.00..29.05 rows=6 width=6) Filter: ((c1 >= 1) AND (c1 < 2)) -> Seq Scan on lp2 (cost=0.00..29.05 rows=6 width=6) Filter: ((c1 >= 1) AND (c1 < 2)) -> Seq Scan on lp3

Re: [HACKERS] Declarative partitioning - another take

2016-10-05 Thread Rajkumar Raghuwanshi
(5),(25),(15); INSERT 0 3 postgres=# select tableoid::regclass, * from test_range; tableoid | a --+ ft_test_range_p1 | 5 ft_test_range_p2 | 15 ft_test_range_p3 | 25 (3 rows) --Here ft_test_range_p2 is created for range 20-30 having value 15. Thanks & Regards, Rajkumar Raghuwanshi QMG, EnterpriseDB Corporation

Re: [HACKERS] Declarative partitioning - another take

2016-10-07 Thread Rajkumar Raghuwanshi
On Thu, Oct 6, 2016 at 12:44 PM, Amit Langote wrote: > > Attached revised patches. Also, includes a fix for an issue reported by > Rajkumar Raghuwanshi [1] which turned out to be a bug in one of the later > patches. I will now move on to addressing the comments on patch 0003. >

Re: [HACKERS] wait events for disk I/O

2017-03-08 Thread Rajkumar Raghuwanshi
tgres (select only) application_namewait_event_typewait_event query pgbench IO ReadDataBlock SELECT abalance FROM Attached excel with all IO event values. Thanks & Regards, Rajkumar Raghuwanshi QMG, EnterpriseDB Corporation wait_event_for_d

Re: [HACKERS] wait events for disk I/O

2017-03-12 Thread Rajkumar Raghuwanshi
On Thu, Mar 9, 2017 at 10:54 AM, Rushabh Lathia wrote: > Thanks Rajkumar for performing tests on this patch. > > Yes, I also noticed similar results in my testing. Additionally sometime I > also > noticed ReadSLRUPage event on my system. > > I also run the reindex database command and I notices be

Re: [HACKERS] wait events for disk I/O

2017-03-20 Thread Rajkumar Raghuwanshi
without >> clearing the wait event. >> Thanks, I ran pgbench with shared_buffers set to 128kB, able to see below wait IO events. DataFileRead DataFileWrite WALInitSync WALInitWrite WALWrite DataFileSync WALRead Thanks & Regards, Rajkumar Raghuwanshi QMG, EnterpriseDB Corporatio

Re: [HACKERS] Partition-wise join for join between (declaratively) partitioned tables

2017-03-21 Thread Rajkumar Raghuwanshi
> On Mon, Mar 20, 2017 at 1:19 PM, Ashutosh Bapat > wrote: I have created some test to cover partition wise joins with postgres_fdw, also verified make check. patch attached. Thanks & Regards, Rajkumar Raghuwanshi QMG, EnterpriseDB Corporation diff --git a/contrib/postgres_fd

Re: [HACKERS] Parallel Append implementation

2017-03-24 Thread Rajkumar Raghuwanshi
ev/null" 2>&1 400kB selecting dynamic shared memory implementation ... posix creating configuration files ... ok running bootstrap script ... TRAP: FailedAssertion("!(LWLockTranchesAllocated >= LWTRANCHE_FIRST_USER_DEFINED)", File: "lwlock.c", Line: 501) child process was terminated by signal 6: Aborted initdb: removing data directory "data" [edb@localhost bin]$ Thanks & Regards, Rajkumar Raghuwanshi QMG, EnterpriseDB Corporation -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers

[HACKERS] drop operator class..using .. left dependency behind.

2017-06-19 Thread Rajkumar Raghuwanshi
pclass_test%'; opfmethod | opfname | opfnamespace | opfowner ---+-+--+-- 405 | custom_opclass_test |16409 | 10 (1 row) Is this expected behaviour?? Thanks & Regards, Rajkumar Raghuwanshi QMG, EnterpriseDB Corporation

Re: [HACKERS] UPDATE of partition key

2017-07-25 Thread Rajkumar Raghuwanshi
0 | 0 part_upd4 | 10 | 0 part_upd4 | 10 | 0 part_upd4 | 10 | 0 part_upd4 | 10 | 0*(27 rows) Thanks & Regards, Rajkumar Raghuwanshi QMG, EnterpriseDB Corporation

Re: [HACKERS] UPDATE of partition key

2017-07-25 Thread Rajkumar Raghuwanshi
On Tue, Jul 25, 2017 at 3:54 PM, Amit Khandekar wrote: > On 25 July 2017 at 15:02, Rajkumar Raghuwanshi > wrote: > > On Mon, Jul 24, 2017 at 11:23 AM, Amit Khandekar > > > wrote: > >> > >> > >> Attached update-partition-key_v13.patch now contains

Re: [HACKERS] UPDATE of partition key

2017-08-06 Thread Rajkumar Raghuwanshi
which is explained below. > Hi Amit, I have applied v14 patch and tested from my side, everything looks good to me. attaching some of test case and out file for reference. Thanks & Regards, Rajkumar Raghuwanshi QMG, EnterpriseDB Corporation update_

Re: [HACKERS] reload-through-the-top-parent switch the partition table

2017-08-08 Thread Rajkumar Raghuwanshi
--schema=a -f d1.dump -Fp [edb@localhost bin]$ ./pg_dump -d postgres --load-via-partition-root -f d2.dump -Fp [edb@localhost bin]$ ./pg_dump -d postgres --load-via-partition-root --schema=a -f d3.dump -Fp pg_dump: pg_dump.c:2063: getRootTableInfo: Assertion `tbinfo->numParents == 1' f

Re: [HACKERS] Default Partition for Range

2017-08-09 Thread Rajkumar Raghuwanshi
enerate_series(1,15) i; 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. Thanks & Regards, Rajkumar Raghuwanshi QMG, EnterpriseDB Corporation

Re: [HACKERS] Default Partition for Range

2017-08-09 Thread Rajkumar Raghuwanshi
On Wed, Aug 9, 2017 at 1:54 PM, Beena Emerson wrote: > Hello Rajkumar, > > On Wed, Aug 9, 2017 at 12:37 PM, Rajkumar Raghuwanshi > wrote: > > > > Hi Beena, > > > > I have applied Jeevan's v24 patches and then your v9 patch over commit > > 5ff3d738

Re: [HACKERS] Declarative partitioning - another take

2017-04-21 Thread Rajkumar Raghuwanshi
| tg_when --+---+---+- pt_trigger_after_p1 | pt1 | STATEMENT | AFTER pt_trigger_before_p1 | pt1 | STATEMENT | BEFORE (2 rows) Thanks & Regards, Rajkumar Raghuwanshi QMG, EnterpriseDB Corporation

Re: [HACKERS] Partition-wise join for join between (declaratively) partitioned tables

2017-04-24 Thread Rajkumar Raghuwanshi
= t2.a AND t2.a = t3.a; 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. !> Thanks & Regards, Rajkumar Raghuwanshi QMG, EnterpriseDB Corporation

Re: [HACKERS] Declarative partitioning - another take

2017-04-25 Thread Rajkumar Raghuwanshi
| STATEMENT | AFTER | | | | trigger_test12 | pt1 | STATEMENT | AFTER | | | | (6 rows) Thanks & Regards, Rajkumar Raghuwanshi QMG, EnterpriseDB

Re: [HACKERS] Declarative partitioning - another take

2017-04-28 Thread Rajkumar Raghuwanshi
DELETE FROM trigger_test_table WHERE a = 10; DELETE 0 postgres=# SELECT * FROM trigger_test_statatics; tg_name | tg_table_name | tg_level | tg_when | tg_op -+---+--+-+--- (0 rows) Thanks & Regards, Rajkumar Raghuwanshi QMG, EnterpriseDB Corporation

Re: [HACKERS] Adding support for Default partition in partitioning

2017-05-04 Thread Rajkumar Raghuwanshi
On Thu, May 4, 2017 at 5:14 PM, Rahila Syed wrote: > The syntax implemented in this patch is as follows, > > CREATE TABLE p11 PARTITION OF p1 DEFAULT; > > Applied v9 patches, table description still showing old pattern of default partition. Is it expected? create table lpd (a int, b int, c varch

Re: [HACKERS] Adding support for Default partition in partitioning

2017-05-04 Thread Rajkumar Raghuwanshi
Hi Rahila, pg_restore is failing for default partition, dump file still storing old syntax of default partition. create table lpd (a int, b int, c varchar) partition by list(a); create table lpd_d partition of lpd DEFAULT; create database bkp owner 'edb'; grant all on DATABASE bkp to edb; --tak

[HACKERS] alter table..drop constraint pkey, left not null un-dropped

2017-05-11 Thread Rajkumar Raghuwanshi
| Nullable | Default | Storage | Stats target | Description +-+---+--+-+ -+--+- c1 | integer | | not null | | plain | | Thanks & Regards, Rajkumar Raghuwanshi QMG, EnterpriseDB Corporation

Re: [HACKERS] Adding support for Default partition in partitioning

2017-05-25 Thread Rajkumar Raghuwanshi
ver was lost. Attempting reset: Failed. !> Thanks & Regards, Rajkumar Raghuwanshi QMG, EnterpriseDB Corporation

Re: [HACKERS] [POC] hash partitioning

2017-09-05 Thread Rajkumar Raghuwanshi
ile for reference. Thanks & Regards, Rajkumar Raghuwanshi QMG, EnterpriseDB Corporation hash_partition_test.out Description: Binary data --Testing CREATE TABLE...PARTITION BY HASH syntax -- --basic syntax --should pass CREATE TABLE hp_tbl (a int)

Re: [HACKERS] advanced partition matching algorithm for partition-wise join

2017-09-05 Thread Rajkumar Raghuwanshi
On Tue, Sep 5, 2017 at 4:34 PM, Ashutosh Bapat < ashutosh.ba...@enterprisedb.com> wrote: > I have fixed the issues which were marked as TODOs in the attached > patches. Also, I have included your test change patch in my series of > patches. Are there any other issues you have commented out? > > Th

Re: [HACKERS] Adding support for Default partition in partitioning

2017-09-07 Thread Rajkumar Raghuwanshi
AND ((a > 0) OR ((a = 0) AND (b >= 0 postgres=# select tableoid::regclass,* from d0; tableoid | a | b --+---+--- *d1 | 0 | * (1 row) Thanks & Regards, Rajkumar Raghuwanshi QMG, EnterpriseDB Corporation

Re: [HACKERS] Partition-wise aggregation/grouping

2017-09-12 Thread Rajkumar Raghuwanshi
al HashAggregate Output: pagg_tab_p3.b, pagg_tab_p3.a, PARTIAL count(*) Group Key: pagg_tab_p3.b, pagg_tab_p3.a -> Seq Scan on public.pagg_tab_p3 Output: pagg_tab_p3.b, pagg_tab_p3.a (22 rows) Thanks & Regards, Rajkumar Raghuwanshi QMG, EnterpriseDB Corporation

Re: [HACKERS] Partition-wise aggregation/grouping

2017-09-18 Thread Rajkumar Raghuwanshi
On Mon, Sep 18, 2017 at 12:37 PM, Jeevan Chalke < jeevan.cha...@enterprisedb.com> wrote: > > > On Tue, Sep 12, 2017 at 6:21 PM, Jeevan Chalke < > jeevan.cha...@enterprisedb.com> wrote: > >> >> >> On Tue, Sep 12, 2017 at 3:24 PM, Rajkumar Raghuwans

Re: [HACKERS] Partition-wise join for join between (declaratively) partitioned tables

2017-09-20 Thread Rajkumar Raghuwanshi
/ 19 src/backend/optimizer/util/relnode.c 95.3 % 548 / 575 100.0 % 24 / 24 95.3 % 548 / 575 100.0 % 24 / 24 src/backend/utils/misc/guc.c 67.4 % 1536 / 2278 89.7 % 113 / 126 67.4 % 1536 / 2278 89.7 % 113 / 126 Thanks & Regards, Rajkumar Raghuwanshi QMG, EnterpriseDB Corporation diff --

Re: [HACKERS] Partition-wise aggregation/grouping

2017-09-21 Thread Rajkumar Raghuwanshi
On Mon, Sep 18, 2017 at 12:37 PM, Jeevan Chalke < jeevan.cha...@enterprisedb.com> wrote: > > On Tue, Sep 12, 2017 at 6:21 PM, Jeevan Chalke < > jeevan.cha...@enterprisedb.com> wrote: > >> >> >> On Tue, Sep 12, 2017 at 3:24 PM, Rajkumar Raghuwanshi < &g

Re: [HACKERS] Declarative partitioning - another take

2016-12-27 Thread Rajkumar Raghuwanshi
he 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. Thanks & Regards, Rajkumar Raghuwanshi QMG, EnterpriseDB Corporation

Re: [HACKERS] Declarative partitioning - another take

2017-01-03 Thread Rajkumar Raghuwanshi
On Tue, Dec 27, 2016 at 3:24 PM, Amit Langote wrote: > On 2016/12/27 18:30, Rajkumar Raghuwanshi wrote: > > Hi Amit, > > > > I have pulled latest sources from git and tried to create multi-level > > partition, getting a server crash, below are steps to reproduce

Re: [HACKERS] Declarative partitioning - another take

2017-01-03 Thread Rajkumar Raghuwanshi
On Wed, Jan 4, 2017 at 10:37 AM, Amit Langote wrote: > On 2017/01/03 19:04, Rajkumar Raghuwanshi wrote: > > On Tue, Dec 27, 2016 at 3:24 PM, Amit Langote wrote: > >> > >> Attached patch should fix the same. > > > > I have applied attached patch, ser

[HACKERS] postgres_fdw : altering foreign table not invalidating prepare statement execution plan.

2016-04-03 Thread Rajkumar Raghuwanshi
utput: c1, c2 Remote SQL: SELECT c1, c2 FROM s1.lt (3 rows) EXECUTE stmt_ft; c1 | c2 +--- 1 | s1.lt (1 row) Thanks & Regards, Rajkumar Raghuwanshi QMG, EnterpriseDB Corporation >

[HACKERS] postgres_fdw : Not able to update foreign table referring to a local table's view when use_remote_estimate = true

2016-04-22 Thread Rajkumar Raghuwanshi
foreign table refering to local view -- fail, throwing error update ft set c2 = c1; psql:/home/edb/Desktop/edb_work/Postgres_Fdw/dml_pushdown_35882/observation_view.sql:24: ERROR: column "ctid" does not exist CONTEXT: Remote SQL command: EXPLAIN SELECT c1, ctid FROM public.lt_view FOR UPDATE Thanks & Regards, Rajkumar Raghuwanshi QMG, EnterpriseDB Corporation >

Re: [HACKERS] Postgres_fdw join pushdown - getting server crash in left outer join of three table

2016-05-16 Thread Rajkumar Raghuwanshi
Thanks for the commit. I have tested it again. Not getting server crash now. Thanks & Regards, Rajkumar Raghuwanshi QMG, EnterpriseDB Corporation On Mon, May 16, 2016 at 9:38 PM, Robert Haas wrote: > On Fri, May 13, 2016 at 6:40 PM, Michael Paquier > wrote: > > On Fri, May 1