Re: [HACKERS] pgbench more operators & functions

2016-09-28 Thread Jeevan Ladhe
The following review has been posted through the commitfest application: make installcheck-world: tested, passed Implements feature: tested, passed Spec compliant: not tested Documentation:tested, passed The patch looks good to me now. Passing this to committer. The

Re: [HACKERS] pgbench more operators & functions

2016-09-27 Thread Jeevan Ladhe
/* should it do a lazy evaluation of the branch? */ Regards, Jeevan Ladhe

Re: [HACKERS] pgbench more operators & functions

2016-09-26 Thread Jeevan Ladhe
etval = vargs[1]; else *retval = vargs[2]; Conclusion: === I have tested the patch and each of the operator is implemented correctly. The only concern I have is precedence, otherwise the patch seems to be doing what it is supposed to do. [1]https://www.postgresql.org/docs/9.6/static/sql-

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

2017-03-27 Thread Jeevan Ladhe
IN (4,5); ERROR: parent table "list_partitioned" has a default partition Regards, Jeevan Ladhe On Mon, Mar 27, 2017 at 12:10 PM, Rushabh Lathia <rushabh.lat...@gmail.com> wrote: > I applied the patch and was trying to perform some testing, but its > ending up wi

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

2017-04-10 Thread Jeevan Ladhe
TABLE part_default PARTITION OF list_partitioned FOR VALUES IN (DEFAULT); CREATE TABLE The creation of table part_default should have failed instead. Thanks, Jeevan Ladhe On Thu, Apr 6, 2017 at 9:37 PM, Keith Fiske <ke...@omniti.com> wrote: > > On Thu, Apr 6, 2017 at 7:30 AM,

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

2017-04-10 Thread Jeevan Ladhe
def_elem = true; + *defid = inhrelid; + } + } Regards, Jeevan Ladhe On Mon, Apr 10, 2017 at 8:12 PM, Jeevan Ladhe <jeevan.la...@enterprisedb.com > wrote: > Hi Rahila, > > > With your latest patch: > > Consider a case when a table is partitioned on a boolean key. &

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

2017-04-11 Thread Jeevan Ladhe
Hi Ashutosh, On Tue, Apr 11, 2017 at 6:02 PM, Ashutosh Bapat < ashutosh.ba...@enterprisedb.com> wrote: > On Mon, Apr 10, 2017 at 8:12 PM, Jeevan Ladhe > <jeevan.la...@enterprisedb.com> wrote: > > Hi Rahila, > > > > > > With your latest patch: > >

Re: [HACKERS] Bug in get_partition_for_tuple

2017-03-12 Thread Jeevan Ladhe
k you want to say: -- check routing error through a list partitioned table when the key is null Thanks, Jeevan Ladhe On Fri, Mar 10, 2017 at 8:26 AM, Amit Langote <langote_amit...@lab.ntt.co.jp > wrote: > Just observed a crash due to thinko in the logic that handles NULL > p

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

2017-07-29 Thread Jeevan Ladhe
et_default_partition_oid() uses parent relation to retrieve PartitionDesc from parent. Kindly let me know if you think I am still missing anything. Regards, Jeevan Ladhe

Re: [HACKERS] INSERT ON CONFLICT and partitioned tables

2017-08-02 Thread Jeevan Ladhe
as below: "On the other hand, specifying DO NOTHING without target as an alternative action works fine." Other than this patch looks good to me. Regards, Jeevan Ladhe On Wed, Aug 2, 2017 at 10:26 AM, Amit Langote <langote_amit...@lab.ntt.co.jp > wrote: > Starting a new t

Re: [HACKERS] INSERT ON CONFLICT and partitioned tables

2017-08-03 Thread Jeevan Ladhe
Thanks Amit for addressing the comment. The patch looks good to me. I have no more comments. Verified that v2 patch applies cleanly and make check passes. Thanks, Jeevan Ladhe

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

2017-08-14 Thread Jeevan Ladhe
proven. > > If I understand correctly, this is actually a completely separate > feature not intrinsically related to default partitioning. I don't see this as a new feature, since scanning the default partition will be introduced by this series of patches only, and rather than a feature this can be classified as a completeness of default skip validation logic. Your thoughts? Regards, Jeevan Ladhe

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

2017-08-17 Thread Jeevan Ladhe
Hi Ashutosh, Please find my feedback inlined. On Fri, Jul 28, 2017 at 7:00 PM, Ashutosh Bapat < ashutosh.ba...@enterprisedb.com> wrote: > On Wed, Jul 26, 2017 at 5:44 PM, Jeevan Ladhe > <jeevan.la...@enterprisedb.com> wrote: > > Hi, > > > > I have reba

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

2017-08-17 Thread Jeevan Ladhe
Hi Ashutosh, On Thu, Aug 17, 2017 at 3:41 PM, Jeevan Ladhe <jeevan.la...@enterprisedb.com > wrote: > Hi Ashutosh, > > Please find my feedback inlined. > > On Fri, Jul 28, 2017 at 7:00 PM, Ashutosh Bapat < > ashutosh.ba...@enterprisedb.com> wrote: > >>

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

2017-08-17 Thread Jeevan Ladhe
Hi Robert, Please find my feedback inlined. I have addressed following comments in V25 patch[1]. > > 0002: > > This patch teaches the partitioning code to handle the NIL returned by > > get_qual_for_list(). > > This is needed because a default partition will not have any constraints > in > >

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

2017-08-17 Thread Jeevan Ladhe
ubmitted[1] a separate patch(0003) to address skipping the scan of the children of relation when it's being attached as a partition. [1] https://www.postgresql.org/message-id/4cd13b03-846d-dc65-89de-1fd9743a3869%40lab.ntt.co.jp Regards, Jeevan Ladhe

Re: [HACKERS] Default Partition for Range

2017-08-10 Thread Jeevan Ladhe
ot;Partition constraint: ". I think we can address this when we construct describe output string. Some ideas that come to my mind are: Partition constraint: NIL Partition constraint: no constraints No partition constraint. Partition constraint: true Please let me know your thoughts. Regards, Jeevan Ladhe

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

2017-07-12 Thread Jeevan Ladhe
re's no point in instantiating its > relcache. > Fixed. > > The comment in heap_drop_with_catalog() should mention why we lock the > default > partition before locking the table being dropped. > > extern List *preprune_pg_partitions(PlannerInfo *root, RangeTblEntry > *rte, > Index rti, Node *quals, LOCKMODE lockmode); > - > #endif /* PARTITION_H */ > Unnecessary hunk. I could not locate this hunk. Regards, Jeevan Ladhe Refs: [1] https://www.postgresql.org/message-id/CAOgcT0OARciE2X% 2BU0rjSKp9VuC279dYcCGkc3nCWKhHQ1_m2rw%40mail.gmail.com [2] https://www.postgresql.org/message-id/35d68d49-555f-421a-99f8-185a44d085a4%40lab.ntt.co.jp

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

2017-07-12 Thread Jeevan Ladhe
> > Done. Thanks for catching this, I agree with you. I have changed the name to PartitionBoundSpec. > - This is not a part of this patch, but in ruleutils.c, the error > for unknown paritioning strategy is emitted as following. > > > elog(ERROR, "unrecognized partition strategy: %d", > >(int) strategy); > > The cast is added because the strategy is a char. I suppose > this is because strategy can be an unprintable. I'd like to see > a comment if it is correct. > > I think this should be taken separately. Thanks, Jeevan Ladhe Refs: [1] https://www.postgresql.org/message-id/CAOgcT0OARciE2X% 2BU0rjSKp9VuC279dYcCGkc3nCWKhHQ1_m2rw%40mail.gmail.com

Re: [HACKERS] Default Partition for Range

2017-07-26 Thread Jeevan Ladhe
Hi Beena, I have posted the rebased patches[1] for default list partition. Your patch also needs a rebase. [1] https://www.postgresql.org/message-id/CAOgcT0OVwDu%2BbeChWb5R5s6rfKLCiWcZT5617hqu7T3GdA1hAw%40mail.gmail.com Regards, Jeevan Ladhe On Fri, Jul 14, 2017 at 3:28 PM, Beena Emerson

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

2017-07-12 Thread Jeevan Ladhe
d fit the > partition > + * being attached by negating the partition constraint derived from > the > + * bounds. Since default partition is already part of the partitioned > + * table, we don't need to validate the constraints on the partitioned > + * table. > &

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

2017-06-30 Thread Jeevan Ladhe
ceive a place in the pg_partitioned_table tuple of the > parent. Thoughts? > I liked this suggestion. Having an entry in pg_partitioned_table would avoid both expensive methods, i.e. 1. opening the parent or 2. lookup for each of the children first in pg_inherits and then its corresponding entry in pg_class. Unless anybody has any other suggestions/comments here, I am going to implement this suggestion. Thanks, Jeevan Ladhe

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

2017-04-24 Thread Jeevan Ladhe
On Mon, Apr 24, 2017 at 5:44 PM, Ashutosh Bapat < ashutosh.ba...@enterprisedb.com> wrote: > On Mon, Apr 24, 2017 at 4:24 PM, Robert Haas > wrote: > > On Mon, Apr 24, 2017 at 5:10 AM, Rahila Syed > wrote: > >> Following can also be considered as it

Re: [HACKERS] DELETE and UPDATE with LIMIT and ORDER BY

2017-04-24 Thread Jeevan Ladhe
i); INSERT 0 100 Time: 3166.445 ms (00:03.166) postgres=# delete from mytab where a < 21; DELETE 20 *Time: 355.288 ms* Am I missing something here? Regards, Jeevan Ladhe

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

2017-04-24 Thread Jeevan Ladhe
tioned by Keith; both of them are passing without errors. Also, I did a pg_dump test and it is dumping the partitions and data correctly. But as mentioned earlier, it would be good if you have them in your patch. I will do further review and let you know comments if any. Regards, Jeevan Ladhe On

Re: [HACKERS] warning in twophase.c

2017-04-25 Thread Jeevan Ladhe
oposed a fix that gets rid of flag overwriteOK: http://www.postgresql-archive.org/StandbyRecoverPreparedTransactions-recovers-subtrans-links-incorrectly-td5957751.html#a5957853 Regards, Jeevan Ladhe On Tue, Apr 25, 2017 at 6:36 AM, Amit Langote <langote_amit...@lab.ntt.co.jp > wrote: &

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

2017-08-17 Thread Jeevan Ladhe
On Fri, Aug 18, 2017 at 12:25 AM, Robert Haas <robertmh...@gmail.com> wrote: > On Thu, Aug 17, 2017 at 6:24 AM, Jeevan Ladhe > <jeevan.la...@enterprisedb.com> wrote: > > I have addressed following comments in V25 patch[1]. > > Committed 0001. Since that code seems

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

2017-05-12 Thread Jeevan Ladhe
the control is anyway going to fall through and will return false from the outermost return statement. I leave this decision to you, but further this block could be rewritten as below and also can be defined as a macro: bool isDefaultPartitionBound(Node *value) { return (IsA(value, DefElem) && !strcmp(((DefElem) value)->defname, "DEFAULT")); } Regards, Jeevan Ladhe

Re: [HACKERS] Bug in pg_dump --table and --exclude-table for declarative partition table handling.

2017-05-11 Thread Jeevan Ladhe
ET SET SET SET ERROR: relation "tab1" does not exist ERROR: relation "tab2" does not exist ERROR: relation "tab2" does not exist invalid command \. postgres=# Regards, Jeevan Ladhe

Re: [HACKERS] Bug in pg_dump --table and --exclude-table for declarative partition table handling.

2017-05-09 Thread Jeevan Ladhe
ave extended Amul's original patch to address the inheritance dumping issue. Regards, Jeevan Ladhe pg_dump_fix_for_partition_and_inheritance.patch Description: Binary data -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers

Re: [HACKERS] Bug in pg_dump --table and --exclude-table for declarative partition table handling.

2017-05-09 Thread Jeevan Ladhe
In my last email by mistake I attached Amul's patch itself. Please find attached patch extending the fix to inheritance relations. Regards, Jeevan Ladhe On Tue, May 9, 2017 at 1:51 PM, Jeevan Ladhe <jeevan.la...@enterprisedb.com> wrote: > Hi, > > On Tue, May 9, 2017 at 12:43 PM,

Re: [HACKERS] Bug in pg_dump --table and --exclude-table for declarative partition table handling.

2017-05-09 Thread Jeevan Ladhe
Hi Amit, Ashutosh, On Tue, May 9, 2017 at 3:29 PM, Ashutosh Bapat < ashutosh.ba...@enterprisedb.com> wrote: > On Tue, May 9, 2017 at 3:13 PM, Amit Langote > <langote_amit...@lab.ntt.co.jp> wrote: > > On 2017/05/09 17:21, Jeevan Ladhe wrote: > >> On Tue, May 9,

Re: [HACKERS] fix hard-coded index in make_partition_op_expr

2017-05-17 Thread Jeevan Ladhe
On Thu, May 18, 2017 at 12:13 AM, Robert Haas wrote: > > Agreed. Committed your patch. > Thanks Robert!

Re: [HACKERS] remove unnecessary flag has_null from PartitionBoundInfoData

2017-05-17 Thread Jeevan Ladhe
> I committed this with fixes for those issues, plus I renamed the macro > to partition_bound_accepts_nulls, which I think is more clear. Thanks Robert.

[HACKERS] fix hard-coded index in make_partition_op_expr

2017-05-17 Thread Jeevan Ladhe
ut that code is either list specific or does not have availability of partitioned key index. Attached patch does this small change in make_partition_op_expr. Another way is to, have an Assert in case of PARTITION_STRATEGY_LIST: Assert(keynum != 0); PFA. Regards,

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

2017-05-17 Thread Jeevan Ladhe
On Wed, May 17, 2017 at 2:28 PM, Ashutosh Bapat < ashutosh.ba...@enterprisedb.com> wrote: > On Tue, May 16, 2017 at 9:01 PM, Robert Haas <robertmh...@gmail.com> > wrote: > > On Tue, May 16, 2017 at 8:57 AM, Jeevan Ladhe > > <jeevan.la...@enterprisedb.com>

[HACKERS] remove unnecessary flag has_null from PartitionBoundInfoData

2017-05-17 Thread Jeevan Ladhe
KX0HCg%40mail.gmail.com Regards, Jeevan Ladhe remove_has_null_PartitionBoundInfoData_v1.patch Description: Binary data -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers

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

2017-06-21 Thread Jeevan Ladhe
Hi, Sorry for being away from here. I had some issues with my laptop, and I have resumed working on this. On Thu, Jun 15, 2017 at 1:21 AM, Robert Haas <robertmh...@gmail.com> wrote: > On Wed, Jun 14, 2017 at 8:02 AM, Jeevan Ladhe > <jeevan.la...@enterprisedb.com> wrote: > &

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

2017-06-21 Thread Jeevan Ladhe
Thanks Ashutosh and Kyotaro for reviewing further. I shall address your comments in next version of my patch. Regards, Jeevan Ladhe On Fri, Jun 16, 2017 at 1:46 PM, Kyotaro HORIGUCHI < horiguchi.kyot...@lab.ntt.co.jp> wrote: > Hello, I'd like to review this but it doesn't fit t

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

2017-06-21 Thread Jeevan Ladhe
3, as in that patch we allow user to create a new partition even in the cases when there exists a default partition. Regards, Jeevan Ladhe

Re: [HACKERS] fix empty array expression in get_qual_for_list()

2017-06-26 Thread Jeevan Ladhe
On Mon, Jun 26, 2017 at 8:14 PM, Tom Lane <t...@sss.pgh.pa.us> wrote: > Jeevan Ladhe <jeevan.la...@enterprisedb.com> writes: > > In case of list partitioned table: > > 1. If there is a partition accepting only null values and nothing else, > then > >

[HACKERS] fix empty array expression in get_qual_for_list()

2017-06-26 Thread Jeevan Ladhe
nstructing an empty array to avoid executing ANY expression. 2.Also, we are constructing an expression using index 0 of arrays in PartitionKey since currently we have only one column for list partition in key, added an assert for this. PFA. Regards, Jeevan Ladhe fix_empty_arry_get_qual_for_

Re: [HACKERS] fix empty array expression in get_qual_for_list()

2017-06-26 Thread Jeevan Ladhe
-- a | integer | | | | plain | | Partition of: t1 FOR VALUES IN (NULL) Partition constraint: (a IS NULL) Regards, Jeevan Ladhe On Mon, Jun 26, 2017 at 4:53 PM, Jeevan Ladhe <jeevan.la...@enterprisedb.com > wrote: > Hi, > > In case of list partitioned table: > 1.

[HACKERS] unreachable code in partition.c

2017-05-23 Thread Jeevan Ladhe
Hi, Following code in function get_qual_for_list(partition.c) is not reachable. else result = list_make1(opexpr); Attached is the patch that removes this dead code. Regards, Jeevan Ladhe partition_remove_dead_code.patch Description: Binary data -- Sent via pgsql-hackers mailing list (pgsql

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

2017-05-25 Thread Jeevan Ladhe
Hi, I started looking into Rahila's default_partition_v11.patch, and reworked on few things as below: - I tried to cover all the review comments posted on the thread. Do let me know if something is missing. - Got rid of the functions get_qual_for_default() and generate_qual_for_defaultpart().

Re: [HACKERS] fix side-effect in get_qual_for_list()

2017-05-26 Thread Jeevan Ladhe
ly? > I have made this change at couple of places applicable. PFA. Regards, Jeevan Ladhe fix_listdatums_get_qual_for_list_v2.patch Description: Binary data -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers

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

2017-05-29 Thread Jeevan Ladhe
/pgsql-hackers@postgresql.org/msg315490.html Regards, Jeevan Ladhe On Mon, May 29, 2017 at 2:28 PM, Jeevan Ladhe <jeevan.la...@enterprisedb.com > wrote: > > >> The existing comment is not valid >> /* >> * A null partition key is only

Re: [HACKERS] fix side-effect in get_qual_for_list()

2017-05-29 Thread Jeevan Ladhe
On Mon, May 29, 2017 at 11:55 PM, Tom Lane <t...@sss.pgh.pa.us> wrote: > Jeevan Ladhe <jeevan.la...@enterprisedb.com> writes: > > I have rebased the patch on recent commit. > > Pushed with some further tweaking. > Thanks Tom for taking care of this. Regards, Jeevan Ladhe

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

2017-05-25 Thread Jeevan Ladhe
Forgot to attach the patch. PFA. On Thu, May 25, 2017 at 3:02 PM, Jeevan Ladhe <jeevan.la...@enterprisedb.com > wrote: > Hi Rajkumar, > > postgres=# CREATE TEMP TABLE temp_list_part (a int) PARTITION BY LIST (a); >> CREATE TABLE >> postgres=# CREATE TEMP TABLE temp_

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

2017-05-25 Thread Jeevan Ladhe
ction 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 for reporting. PFA patch that fixes above issue. Regards, Jeevan Ladhe

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

2017-05-16 Thread Jeevan Ladhe
ans the server terminated abnormally > before or while processing the request. > The connection to the server was lost. Attempting reset: Failed. > !> > Hi, I have fixed the crash in attached patch. Also the patch needed bit of adjustments due to recent commit. I have re-based the patch o

Re: [HACKERS] Default Partition for Range

2017-05-29 Thread Jeevan Ladhe
tually it returns a List. + * + * If DEFAULT is the only partiton for the table then this returns TRUE. + * Regards, Jeevan Ladhe On Wed, May 24, 2017 at 12:52 AM, Beena Emerson <memissemer...@gmail.com> wrote: > Hello, > > On Mon, May 22, 2017 at 11:29 AM, Ashutosh Bapat < > ashutosh

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

2017-05-29 Thread Jeevan Ladhe
This patch needs a rebase on recent commits, and also a fix[1] that is posted for get_qual_for_list(). I am working on both of these tasks. Will update the patch once I am done with this. Regards, Jeevan Ladhe On Mon, May 29, 2017 at 12:25 PM, Beena Emerson <memissemer...@gmail.com>

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

2017-05-29 Thread Jeevan Ladhe
re Beena, as stated earlier will update this on my next version of patch. Regards, Jeevan Ladhe

Re: [HACKERS] fix side-effect in get_qual_for_list()

2017-05-29 Thread Jeevan Ladhe
Hi, I have rebased the patch on recent commit. With recent commits, some of the hunks in the v2 patch related to castNode, are not needed. PFA. Regards, Jeevan Ladhe On Sat, May 27, 2017 at 1:16 AM, Jeevan Ladhe <jeevan.la...@enterprisedb.com > wrote: > Hi Ashutosh, > > Than

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

2017-05-30 Thread Jeevan Ladhe
Thanks Amit for your comments. On 31-May-2017 6:03 AM, "Amit Langote" <langote_amit...@lab.ntt.co.jp> wrote: Hi Jeevan, On 2017/05/30 16:38, Jeevan Ladhe wrote: > I have rebased the patch on the latest commit. > PFA. Was looking at the patch and felt that the par

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

2017-05-30 Thread Jeevan Ladhe
1 values(null); INSERT 0 1 Note that the parent correctly allows the nulls to be inserted. [1] rajkumar.raghuwan...@enterprisedb.com Regards, Jeevan Ladhe On Tue, May 30, 2017 at 10:59 AM, Beena Emerson <memissemer...@gmail.com> wrote: > On Mon, May 29, 2017 at 9:33 PM, Jeevan Ladhe > &

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

2017-05-30 Thread Jeevan Ladhe
Hi, I have fixed the issue related to default partition constraints not getting updated after detaching a partition. PFA. Regards, Jeevan Ladhe On Tue, May 30, 2017 at 1:08 PM, Jeevan Ladhe <jeevan.la...@enterprisedb.com > wrote: > Hi, > > I have rebased the patch on the lates

Re: [HACKERS] BEFORE trigger can cause undetected partition constraint violation

2017-06-01 Thread Jeevan Ladhe
Insert(): /* * Check the constraints of the tuple */ if (resultRelationDesc->rd_att->constr || resultRelInfo->ri_PartitionCheck) ExecConstraints(resultRelInfo, slot, estate); I couldn't debug it further today. Regards, Jeevan Ladhe On Fri, Jun 2, 2017 at 1:21 AM, Robert Haas <robertmh..

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

2017-06-06 Thread Jeevan Ladhe
n before we try to check for the default partition data. So, in such cases I think we really do not need to have logic to check if default partition refutes the new partition contraints. Regards, Jeevan Ladhe

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

2017-06-01 Thread Jeevan Ladhe
Hi, I have addressed Ashutosh's and Amit's comments in the attached patch. Please let me know if I have missed anything and any further comments. PFA. Regards, Jeevan Ladhe On Wed, May 31, 2017 at 9:50 AM, Beena Emerson <memissemer...@gmail.com> wrote: > On Wed, May 31, 2017 at 8:13

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

2017-06-08 Thread Jeevan Ladhe
Thanks Ashutosh, On Thu, Jun 8, 2017 at 4:04 PM, Ashutosh Bapat < ashutosh.ba...@enterprisedb.com> wrote: > On Thu, Jun 8, 2017 at 2:54 PM, Ashutosh Bapat > <ashutosh.ba...@enterprisedb.com> wrote: > > On Wed, Jun 7, 2017 at 2:08 AM, Jeevan Ladhe > > <jee

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

2017-06-04 Thread Jeevan Ladhe
hutosh's one of the comment to write a function for common code of ATExecAttachPartition() and check_default_allows_bound(). Regards, Jeevan Ladhe

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

2017-06-04 Thread Jeevan Ladhe
ion() public. Per Amit's comment I have removed this change and let the overlapping error without row contains. I think this is analogus to other functions that are throwing violation error but are not local to execMain.c. Regards, Jeevan Ladhe

[HACKERS] fix possible optimizations in ATExecAttachPartition()

2017-06-13 Thread Jeevan Ladhe
ttached patch. PFA, and let me know if I am missing something here. Regards, Jeevan Ladhe fix_atexecattahpartition.patch Description: Binary data -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers

Re: [HACKERS] fix possible optimizations in ATExecAttachPartition()

2017-06-13 Thread Jeevan Ladhe
y then this is probably a good idea, but I hope > that's not what happens. > That seems a better option to me too. +1 Regards, Jeevan Ladhe

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

2017-06-12 Thread Jeevan Ladhe
On Mon, Jun 12, 2017 at 9:39 AM, Ashutosh Bapat < ashutosh.ba...@enterprisedb.com> wrote: > While the refactoring seems a reasonable way to re-use existing code, > that may change based on the discussion in [1]. Till then please keep > the refactoring patches separate from the main patch. In the

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

2017-06-11 Thread Jeevan Ladhe
tml [2] http://www.postgresql-archive.org/Adding-support-for-Default-partition-in-partitioning-td5946868i120.html#a5965277 [3] http://www.postgresql-archive.org/Adding-support-for-Default-partition-in-partitioning-tp5946868p5965599.html Regards, Jeevan Ladhe On Thu, Jun 8, 2017 at 2:54 PM, Ashuto

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

2017-06-14 Thread Jeevan Ladhe
partitioning support to allow addition of new partitions. 0004. extend default partitioning validation code to reuse the refactored code in patch 0001. PFA Regards, Jeevan Ladhe On Mon, Jun 12, 2017 at 11:49 AM, Jeevan Ladhe < jeevan.la...@enterprisedb.com> wrote: > > On Mon, Jun 12,

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

2017-05-05 Thread Jeevan Ladhe
OF test FOR VALUES IN(15);* *ERROR: could not open file "base/12335/16420": No such file or directory* Thanks, Jeevan Ladhe On Fri, May 5, 2017 at 11:55 AM, Rajkumar Raghuwanshi < rajkumar.raghuwan...@enterprisedb.com> wrote: > Hi Rahila, > > pg_restore is failing for def

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

2017-05-08 Thread Jeevan Ladhe
Hi Robert, Thanks for your explnation. On Mon, May 8, 2017 at 9:56 PM, Robert Haas <robertmh...@gmail.com> wrote: > On Thu, May 4, 2017 at 4:28 PM, Jeevan Ladhe > <jeevan.la...@enterprisedb.com> wrote: > > While reviewing the code I was trying to explore more cas

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

2017-05-04 Thread Jeevan Ladhe
pletion: CREATE TABLE pd PARTITION OF test FOR VALUES I did some primary testing and did not find any problem so far. I will review and test further and let you know my comments. Regards, Jeevan Ladhe On Thu, May 4, 2017 at 6:09 PM, Rajkumar Raghuwanshi < rajkumar.raghuwan...@enterprisedb.c

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

2017-05-04 Thread Jeevan Ladhe
ated? Any views? Regards, Jeevan Ladhe

[HACKERS] fix side-effect in get_qual_for_list()

2017-05-25 Thread Jeevan Ladhe
ied. PFA. [1] *https://www.postgresql.org/message-id/flat/CAOgcT0PLPge%3D5U6%3DGU5SnC3_8yutCbWWOiUva3Cw94M9zpbvgQ%40mail.gmail.com <https://www.postgresql.org/message-id/flat/CAOgcT0PLPge%3D5U6%3DGU5SnC3_8yutCbWWOiUva3Cw94M9zpbvgQ%40mail.gmail.com>* Regards, Jee

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

2017-06-06 Thread Jeevan Ladhe
IST2("FOR VALUES", "DEFAULT"); > else if (TailMatches2("FOR", "VALUES")) > COMPLETE_WITH_LIST2("FROM (", "IN ("); > > @@ -2483,7 +2483,7 @@ psql_completion(const char *text, int start, int end) > COMPLETE_WITH_SCHEMA_QUERY(Query_for_list_of_partitioned_tables, > ""); > /* Limited completion support for partition bound specification */ > else if (TailMatches3("PARTITION", "OF", MatchAny)) > -COMPLETE_WITH_CONST("FOR VALUES"); > +COMPLETE_WITH_LIST2("FOR VALUES", "DEFAULT"); > Do we include psql tab completion in the main feature patch? I have not > seen > this earlier. But appreciate taking care of these defails. > I am not sure about this. If needed I can submit a patch to take care of this later, but as of now I have not removed this from the patch. +char *ExecBuildSlotValueDescription(Oid reloid, > needs an "extern" declaration. > Per one of the comment[1] given by Amit Langote, I have removed a call to ExecBuildSlotValueDescription(), and this was a leftover, I cleaned it up. [1]https://www.postgresql.org/message-id/7c758a6b-107e-7c82- 0d3c-3af7965cad3f%40lab.ntt.co.jp Regards, Jeevan Ladhe default_partition_v19.patch Description: Binary data -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers

Re: [HACKERS] Optimise default partition scanning while adding new partition

2017-09-14 Thread Jeevan Ladhe
every place we call it. > I have changed the comment. PFA. Regards, Jeevan Ladhe 0001-Check-default-partitition-child-validation-scan-is.patch Description: Binary data -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgre

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

2017-09-07 Thread Jeevan Ladhe
On Thu, Sep 7, 2017 at 3:15 PM, Rajkumar Raghuwanshi < rajkumar.raghuwan...@enterprisedb.com> wrote: > On Wed, Sep 6, 2017 at 5:25 PM, Jeevan Ladhe < > jeevan.la...@enterprisedb.com> wrote: > >> Hi, >> >> Attached is the rebased set of patches. >> Rob

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

2017-09-08 Thread Jeevan Ladhe
On Fri, Sep 8, 2017 at 6:46 AM, Robert Haas <robertmh...@gmail.com> wrote: > On Thu, Sep 7, 2017 at 8:13 AM, Jeevan Ladhe > <jeevan.la...@enterprisedb.com> wrote: > > The fix would be much easier if the refactoring patch 0001 by Amul in > hash > > partitioning

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

2017-09-06 Thread Jeevan Ladhe
ition_oid() to address this. Your thoughts? I haven't gone through the full patch yet, so there may be more > comments here. There is some duplication of code in > check_default_allows_bound() and ValidatePartitionConstraints() to > scan the children of partition being validated. The difference is that > the first one scans the relations in the same function and the second > adds them to work queue. May be we could use > ValidatePartitionConstraints() to scan the relation or add to the > queue based on some input flag may be wqueue argument itself. But I > haven't thought through this completely. Any thoughts? > check_default_allows_bound() is called only from DefineRelation(), and not for alter command. I am not really sure how can we use work queue for create command. [1] https://www.postgresql.org/message-id/CAOgcT0OM_Px6BXp1uDhhArw0bm-q4zCD5YwhDywR3K9ziBNL6A%40mail.gmail.com Regards, Jeevan Ladhe

[HACKERS] Optimise default partition scanning while adding new partition

2017-09-12 Thread Jeevan Ladhe
of another partitioned table. [1] https://www.postgresql.org/message-id/CA+TgmoZ8-q=2oahoxmvzbdnxi9g6i1idi4ozfkb67mk242d...@mail.gmail.com [2] https://www.postgresql.org/message-id/4cd13b03-846d-dc65-89de-1fd9743a3...@lab.ntt.co.jp Regards, Jeevan Ladhe 0001-Check-default-partitition-child

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

2017-09-08 Thread Jeevan Ladhe
On Sat, Sep 9, 2017 at 3:05 AM, Robert Haas <robertmh...@gmail.com> wrote: > On Fri, Sep 8, 2017 at 10:08 AM, Jeevan Ladhe > <jeevan.la...@enterprisedb.com> wrote: > > Thanks Robert for taking care of this. > > My V29 patch series[1] is based on this commit now.

Re: [HACKERS] Binary search in fmgr_isbuiltin() is a bottleneck.

2017-09-25 Thread Jeevan Ladhe
As Andres has already pointed, may be we want to move above code in a separate function, and just call that function here in case the hash is not already built. Further I am thinking about doing some performance testing, Andres can you please point me how did you test it and what perf numbers you saw for this particular patch(0005). Regards, Jeevan Ladhe

Re: [HACKERS] Default Partition for Range

2017-08-21 Thread Jeevan Ladhe
Hi Beena, On Thu, Aug 17, 2017 at 4:59 PM, Beena Emerson wrote: > PFA the patch rebased over v25 patches of default list partition [1] > Thanks for rebasing. Range partition review: 1. There are lot of changes in RelationBuildPartitionDesc(). It was hard to

Re: [HACKERS] Default Partition for Range

2017-08-24 Thread Jeevan Ladhe
Hi Beena, On Tue, Aug 22, 2017 at 5:22 PM, Beena Emerson <memissemer...@gmail.com> wrote: > On Tue, Aug 22, 2017 at 4:20 PM, Beena Emerson <memissemer...@gmail.com> > wrote: > > Hi Jeevan, > > > > On Tue, Aug 22, 2017 at 7:53 AM, Jeevan Ladhe >

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

2017-09-03 Thread Jeevan Ladhe
On Sat, Sep 2, 2017 at 7:03 AM, Robert Haas <robertmh...@gmail.com> wrote: > On Fri, Sep 1, 2017 at 3:19 PM, Robert Haas <robertmh...@gmail.com> wrote: > > On Thu, Aug 31, 2017 at 8:53 AM, Jeevan Ladhe > > <jeevan.la...@enterprisedb.com> wrote: >