Re: [HACKERS] ICU support on Windows

2017-06-13 Thread Craig Ringer
On 13 June 2017 at 05:47, Alvaro Herrera wrote: > Michael Paquier wrote: >> On Tue, Jun 13, 2017 at 3:13 AM, Alvaro Herrera >> wrote: >> > Ashutosh Sharma wrote: > >> >> Yes, that's right, Win64 download uses lib64 path and in my case i had >>

Re: [HACKERS] ICU support on Windows

2017-06-13 Thread Peter Eisentraut
On 6/12/17 14:03, Ashutosh Sharma wrote: >> I noticed that this only works if you use the "Win32" download of ICU, >> because the "Win64" download uses "lib64" paths. I'm not sure what the >> impact of this is in practice. > > Yes, that's right, Win64 download uses lib64 path and in my case i

Re: [HACKERS] ICU support on Windows

2017-06-12 Thread Michael Paquier
On Tue, Jun 13, 2017 at 6:47 AM, Alvaro Herrera wrote: > Michael Paquier wrote: >> I do some low level packaging on Windows (libxml2, libxslt, etc.), and >> the compilation code usually allows you to usually use the >> installation paths you want. At the end using only

Re: [HACKERS] ICU support on Windows

2017-06-12 Thread Alvaro Herrera
Michael Paquier wrote: > On Tue, Jun 13, 2017 at 3:13 AM, Alvaro Herrera > wrote: > > Ashutosh Sharma wrote: > >> Yes, that's right, Win64 download uses lib64 path and in my case i had > >> renamed lib64-> lib and bin64-> bin which i guess is not a right thing > >> to

Re: [HACKERS] ICU support on Windows

2017-06-12 Thread Michael Paquier
On Tue, Jun 13, 2017 at 3:13 AM, Alvaro Herrera wrote: > Ashutosh Sharma wrote: >> > I noticed that this only works if you use the "Win32" download of ICU, >> > because the "Win64" download uses "lib64" paths. I'm not sure what the >> > impact of this is in practice. >>

Re: [HACKERS] ICU support on Windows

2017-06-12 Thread Ashutosh Sharma
Hi, On Jun 12, 2017 11:43 PM, "Alvaro Herrera" wrote: Ashutosh Sharma wrote: > > I noticed that this only works if you use the "Win32" download of ICU, > > because the "Win64" download uses "lib64" paths. I'm not sure what the > > impact of this is in practice. > >

Re: [HACKERS] ICU support on Windows

2017-06-12 Thread Alvaro Herrera
Ashutosh Sharma wrote: > > I noticed that this only works if you use the "Win32" download of ICU, > > because the "Win64" download uses "lib64" paths. I'm not sure what the > > impact of this is in practice. > > Yes, that's right, Win64 download uses lib64 path and in my case i had > renamed

Re: [HACKERS] ICU support on Windows

2017-06-12 Thread Ashutosh Sharma
Hi, On Mon, Jun 12, 2017 at 8:39 PM, Peter Eisentraut wrote: > On 6/10/17 05:40, Ashutosh Sharma wrote: >> With the help of attached patch, we can use icu feature on Windows. >> All we have to do is, download the ICU libraries from - [1] and add >> the

Re: [HACKERS] ICU support on Windows

2017-06-12 Thread Peter Eisentraut
On 6/10/17 05:40, Ashutosh Sharma wrote: > With the help of attached patch, we can use icu feature on Windows. > All we have to do is, download the ICU libraries from - [1] and add > the installation path for icu libraires in config.pl like, > > icu => 'E:\Users\pg\icu', > > [1]-

Re: [HACKERS] ICU support on Windows

2017-06-12 Thread Ashutosh Sharma
Hi, On Mon, Jun 12, 2017 at 12:18 PM, Michael Paquier wrote: > On Sat, Jun 10, 2017 at 6:40 PM, Ashutosh Sharma > wrote: >> Currently, we cannot perform ICU enabled build for postgres on Windows >> platform. However, this can be done on Linux

Re: [HACKERS] ICU support on Windows

2017-06-12 Thread Michael Paquier
On Sat, Jun 10, 2017 at 6:40 PM, Ashutosh Sharma wrote: > Currently, we cannot perform ICU enabled build for postgres on Windows > platform. However, this can be done on Linux platforms using > '--with-icu' configuration parameter. Attached is the patch that > allows us to

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 Ashutosh Bapat
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 final version, I think the refactoring changes to ATAttachPartition and the default partition

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

2017-06-11 Thread Jeevan Ladhe
Hi Ashutosh, I tried to look into your refactoring code. When applied all 3 patches, I got some regression failures, I have fixed all of them now in attached patches, attached the regression.diffs. Moving further, I have also made following changes in attached patches: *1.

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

2017-06-08 Thread Robert Haas
On Wed, Jun 7, 2017 at 5:47 AM, Ashutosh Bapat wrote: > On Sat, Jun 3, 2017 at 2:11 AM, Robert Haas wrote: >> >> + errmsg("default partition contains row(s) >> that would overlap with partition being created"))); >>

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

2017-06-08 Thread Robert Haas
On Wed, Jun 7, 2017 at 1:59 AM, amul sul wrote: > But Ashutosh's suggestion make sense, we might have constraints other > than that partitioning constraint on default partition. If those > constraints refutes the new partition's constraints, we should skip > the scan. Right.

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 > wrote: > > On Wed, Jun 7, 2017 at 2:08 AM, Jeevan Ladhe > > wrote: > > >

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

2017-06-08 Thread Ashutosh Bapat
On Thu, Jun 8, 2017 at 2:54 PM, Ashutosh Bapat wrote: > On Wed, Jun 7, 2017 at 2:08 AM, Jeevan Ladhe > wrote: > >> >>> >>> The code in check_default_allows_bound() to check whether the default >>> partition >>> has any rows that

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

2017-06-08 Thread Ashutosh Bapat
On Wed, Jun 7, 2017 at 2:08 AM, Jeevan Ladhe wrote: > >> >> The code in check_default_allows_bound() to check whether the default >> partition >> has any rows that would fit new partition looks quite similar to the code >> in >> ATExecAttachPartition() checking

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

2017-06-07 Thread Ashutosh Bapat
On Sat, Jun 3, 2017 at 2:11 AM, Robert Haas wrote: > > + errmsg("default partition contains row(s) > that would overlap with partition being created"))); > > It doesn't really sound right to talk about rows overlapping with a > partition. Partitions

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

2017-06-07 Thread Ashutosh Bapat
On Wed, Jun 7, 2017 at 2:08 AM, Jeevan Ladhe wrote: >> >> This also means that we have to test PREPARED statements involving >> default partition. Any addition/deletion/attach/detach of other partition >> should invalidate those cached statements. > > > Will add

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

2017-06-07 Thread amul sul
On Wed, Jun 7, 2017 at 10:30 AM, Jeevan Ladhe wrote: > > >> IIUC, default partition constraints is simply NOT IN (> other sibling partitions>). >> If constraint on the default partition refutes the new partition's >> constraints that means we have overlapping

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

2017-06-06 Thread Jeevan Ladhe
IIUC, default partition constraints is simply NOT IN ( other sibling partitions>). > If constraint on the default partition refutes the new partition's > constraints that means we have overlapping partition, and perhaps > error. > You are correct Amul, but this error will be thrown before we try

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

2017-06-06 Thread amul sul
On Wed, Jun 7, 2017 at 2:08 AM, Jeevan Ladhe wrote: [...] >> >> The code in check_default_allows_bound() to check whether the default >> partition >> has any rows that would fit new partition looks quite similar to the code >> in >> ATExecAttachPartition() checking

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

2017-06-06 Thread Jeevan Ladhe
Hi Ashutosh, Thanks for the detailed review. Also, please find my feedback on your comments in-lined, I also addressed the comments given by Robert in attached patch: On Sat, Jun 3, 2017 at 5:13 PM, Ashutosh Bapat wrote: > Here's some detailed review of the

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

2017-06-04 Thread Beena Emerson
On Mon, Jun 5, 2017 at 12:14 AM, Jeevan Ladhe wrote: > > >> >> What is the reason the new patch does not mention of violating rows >> when a new partition overlaps with default? >> Is it because more than one row could be violating the condition? > > > This is

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

2017-06-04 Thread Jeevan Ladhe
> What is the reason the new patch does not mention of violating rows > when a new partition overlaps with default? > Is it because more than one row could be violating the condition? > This is because, for reporting the violating error, I had to function ExecBuildSlotValueDescription() public.

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

2017-06-04 Thread Beena Emerson
Hello, On Fri, Jun 2, 2017 at 1:05 AM, Jeevan Ladhe wrote: > 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 > What is

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

2017-06-04 Thread Jeevan Ladhe
Hi Robert, Thanks for your comments: > If DETACH PARTITION and DROP PARTITION require this, why not ATTACH > PARTITION and CREATE TABLE .. PARTITION OF? > > For CREATE and ATTACH parition the invalidation of default relation is taken care by the following clean-up part in

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

2017-06-03 Thread Ashutosh Bapat
Here's some detailed review of the code. @@ -1883,6 +1883,15 @@ heap_drop_with_catalog(Oid relid) if (OidIsValid(parentOid)) { /* + * Default partition constraints are constructed run-time from the + * constraints of its siblings(basically by negating them), so

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

2017-06-02 Thread Robert Haas
On Thu, Jun 1, 2017 at 3:35 PM, Jeevan Ladhe wrote: > Please let me know if I have missed anything and any further comments. + errmsg("a default partition \"%s\" already exists", I suggest: partition \"%s\" conflicts with existing default

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 wrote: > On Wed, May 31, 2017 at 8:13 AM, Amit

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

2017-05-30 Thread Beena Emerson
On Wed, May 31, 2017 at 8:13 AM, Amit Langote wrote: > On 2017/05/31 9:33, Amit Langote wrote: > > > In get_rule_expr(): > > case PARTITION_STRATEGY_LIST: > Assert(spec->listdatums != NIL); > > +

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

2017-05-30 Thread Amit Langote
On 2017/05/31 9:33, Amit Langote wrote: > On 2017/05/30 16:38, Jeevan Ladhe wrote: >> I have rebased the patch on the latest commit. >> PFA. > > Was looking at the patch I tried creating default partition of a range-partitioned table and got the following error: ERROR: invalid bound

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" 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 parse node representation of

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

2017-05-30 Thread Amit Langote
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 parse node representation of default partition bound could be slightly different. Can you explain the motivation behind implementing it without

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

2017-05-30 Thread Ashutosh Bapat
On Tue, May 30, 2017 at 1:08 PM, Jeevan Ladhe wrote: > Hi, > > I have rebased the patch on the latest commit. > PFA. > Thanks for rebasing the patch. Here are some review comments. +/* + * In case of default partition, just note the

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 wrote: > Hi, > > I have rebased the patch on the latest commit. > PFA.

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

2017-05-30 Thread Jeevan Ladhe
Hi, I have rebased the patch on the latest commit. PFA. There exists one issue reported by Rajkumar[1] off-line as following, where describing the default partition after deleting null partition, does not show updated constraints. I am working on fixing this issue. create table t1 (c1 int)

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

2017-05-29 Thread Beena Emerson
On Mon, May 29, 2017 at 9:33 PM, Jeevan Ladhe wrote: > Hi, > > I have rebased the patch on latest commit with few cosmetic changes. > > The patch fix_listdatums_get_qual_for_list_v3.patch [1] needs to be applied > before applying this patch. > > [1]

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

2017-05-29 Thread Jeevan Ladhe
Hi, I have rebased the patch on latest commit with few cosmetic changes. The patch fix_listdatums_get_qual_for_list_v3.patch [1] needs to be applied before applying this patch. [1]

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

2017-05-29 Thread Jeevan Ladhe
> > The existing comment is not valid > /* > * A null partition key is only acceptable if null-accepting > list > * partition exists. > */ > as we allow NULL to be stored in default. It should be updated. > Sure Beena, as stated earlier will

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 wrote: >

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

2017-05-29 Thread Beena Emerson
On Thu, May 25, 2017 at 3:03 PM, Jeevan Ladhe wrote: > > Forgot to attach the patch. > PFA. > > On Thu, May 25, 2017 at 3:02 PM, Jeevan Ladhe > wrote: >> >> Hi Rajkumar, >> >>> postgres=# CREATE TEMP TABLE temp_list_part (a int)

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 wrote: > Hi Rajkumar, > > postgres=# CREATE TEMP TABLE temp_list_part (a int) PARTITION BY LIST (a); >> CREATE TABLE >> postgres=# CREATE TEMP TABLE temp_def_part (a int); >> CREATE

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

2017-05-25 Thread Jeevan Ladhe
Hi Rajkumar, postgres=# CREATE TEMP TABLE temp_list_part (a int) PARTITION BY LIST (a); > CREATE TABLE > postgres=# CREATE TEMP TABLE temp_def_part (a int); > CREATE TABLE > postgres=# ALTER TABLE temp_list_part ATTACH PARTITION temp_def_part > DEFAULT; > server closed the connection unexpectedly

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

2017-05-25 Thread Rajkumar Raghuwanshi
On Thu, May 25, 2017 at 12:10 PM, Jeevan Ladhe < jeevan.la...@enterprisedb.com> wrote: > PFA. > Hi I have applied v13 patch, got a crash when trying to attach default temp partition. postgres=# CREATE TEMP TABLE temp_list_part (a int) PARTITION BY LIST (a); CREATE TABLE postgres=# CREATE TEMP

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] Adding support for Default partition in partitioning

2017-05-21 Thread Beena Emerson
Hello, Patch for default range partition has been added. PFA the rebased v12 patch for the same. I have not removed the has_default variable yet. Default range partition: https://www.postgresql.org/message-id/CAOG9ApEYj34fWMcvBMBQ-YtqR9fTdXhdN82QEKG0SVZ6zeL1xg%40mail.gmail.com -- Beena Emerson

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 > wrote: > > On Tue, May 16, 2017 at 8:57 AM, Jeevan Ladhe > > wrote: > >> I have fixed the crash in

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

2017-05-17 Thread Amit Langote
On 2017/05/17 17:58, Ashutosh Bapat wrote: > On Tue, May 16, 2017 at 9:01 PM, Robert Haas wrote: >> On Tue, May 16, 2017 at 8:57 AM, Jeevan Ladhe >> wrote: >>> I have fixed the crash in attached patch. >>> Also the patch needed bit of

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

2017-05-17 Thread Ashutosh Bapat
On Tue, May 16, 2017 at 9:01 PM, Robert Haas wrote: > On Tue, May 16, 2017 at 8:57 AM, Jeevan Ladhe > wrote: >> I have fixed the crash in attached patch. >> Also the patch needed bit of adjustments due to recent commit. >> I have re-based the

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

2017-05-16 Thread Robert Haas
On Tue, May 16, 2017 at 8:57 AM, Jeevan Ladhe wrote: > 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 on latest commit. +boolhas_default;/* Is there a

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

2017-05-16 Thread Jeevan Ladhe
On Fri, May 12, 2017 at 7:34 PM, Beena Emerson wrote: > > Thank you for the updated patch. However, now I cannot create a partition > after default. > > CREATE TABLE list1 ( > a int, > b int > ) PARTITION BY LIST (a); > > CREATE TABLE list1_1 (LIKE list1); >

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

2017-05-12 Thread Beena Emerson
Hello, On Fri, May 12, 2017 at 5:30 PM, Rahila Syed wrote: > Hello, > > >(1) With the new patch, we allow new partitions when there is overlapping > data with default partition. The entries in default are ignored when > running queries satisfying the new partition. >

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

2017-05-12 Thread Rahila Syed
Hello, >(1) With the new patch, we allow new partitions when there is overlapping data with default partition. The entries in default are ignored when running queries satisfying the new partition. This was introduced in latest version. We are not allowing adding a partition when entries with same

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

2017-05-12 Thread Beena Emerson
On Thu, May 11, 2017 at 7:37 PM, Rahila Syed wrote: > Hello, > > Please find attached an updated patch with review comments and bugs > reported till date implemented. > Hello Rahila, Tested on "efa2c18 Doc fix: scale(numeric) returns integer, not numeric." (1) With the

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

2017-05-12 Thread Jeevan Ladhe
Hi Rahila, On Thu, May 11, 2017 at 7:37 PM, Rahila Syed wrote: > > >3. > >In following function isDefaultPartitionBound, first statement "return > false" > >is not needed. > It is needed to return false if the node is not DefElem. > Please have a look at following code:

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

2017-05-11 Thread Robert Haas
On Thu, May 11, 2017 at 10:07 AM, Rahila Syed wrote: > Please find attached an updated patch with review comments and bugs reported > till date implemented. You haven't done anything about the repeated suggestion that this should also cover range partitioning. +

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

2017-05-11 Thread Rahila Syed
Hello, Please find attached an updated patch with review comments and bugs reported till date implemented. >1. >In following block, we can just do with def_index, and we do not need found_def >flag. We can check if def_index is -1 or not to decide if default partition is >present. found_def is

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

2017-05-10 Thread Sven R. Kunze
On 10.05.2017 17:59, Robert Haas wrote: Well, I don't think it would be a HUGE problem, but I think the fact that Amit chose to implement this with syntax similar to that of Oracle is probably not a coincidence, but rather a goal, and I think the readability problem that you're worrying about is

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

2017-05-10 Thread Robert Haas
On Wed, May 10, 2017 at 12:12 PM, Alvaro Herrera wrote: > I'm surprised that there is so much activity in this thread. Is this > patch being considered for pg10? Of course not. Feature freeze was a month ago. -- Robert Haas EnterpriseDB: http://www.enterprisedb.com

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

2017-05-10 Thread Alvaro Herrera
I'm surprised that there is so much activity in this thread. Is this patch being considered for pg10? -- Álvaro Herrerahttps://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services -- Sent via pgsql-hackers mailing list

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

2017-05-10 Thread Robert Haas
On Wed, May 10, 2017 at 10:59 AM, Sven R. Kunze wrote: > You are definitely right. Changing it here would require to change it > everywhere AND thus to loose syntax parity with Oracle. Right. > I am not in a position to judge this properly whether this would be a huge >

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

2017-05-10 Thread Sven R. Kunze
On 09.05.2017 09:19, Rahila Syed wrote: +1 for AS DEFAULT syntax if it helps in improving readability specially in following case CREATE TABLE p1 PARTITION OF test AS DEFAULT PARTITION BY LIST(a); Thank you, Rahila Syed On Tue, May 9, 2017 at 1:13 AM, Robert Haas

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

2017-05-10 Thread Rahila Syed
>It seems that adding a new partition at the same level as the default >partition will require scanning it or its (leaf) partitions if >partitioned. Consider that p1, pd are partitions of a list-partitioned >table p accepting 1 and everything else, respectively, and pd is further >partitioned.

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

2017-05-09 Thread Amit Langote
On 2017/05/10 2:09, Robert Haas wrote: > On Tue, May 9, 2017 at 9:26 AM, Rahila Syed wrote: >>> Hi Rahila, >> >>> I am not able add a new partition if default partition is further >>> partitioned >>> with default partition. >> >>> Consider example below: >> >>> postgres=#

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

2017-05-09 Thread Robert Haas
On Tue, May 9, 2017 at 9:26 AM, Rahila Syed wrote: >>Hi Rahila, > >>I am not able add a new partition if default partition is further >> partitioned >>with default partition. > >>Consider example below: > >>postgres=# CREATE TABLE test ( a int, b int, c int) PARTITION BY

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

2017-05-09 Thread Rahila Syed
>Hi Rahila, >I am not able add a new partition if default partition is further partitioned >with default partition. >Consider example below: >postgres=# CREATE TABLE test ( a int, b int, c int) PARTITION BY LIST (a); >CREATE TABLE >postgres=# CREATE TABLE test_p1 PARTITION OF test FOR VALUES

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

2017-05-09 Thread Rahila Syed
+1 for AS DEFAULT syntax if it helps in improving readability specially in following case CREATE TABLE p1 PARTITION OF test AS DEFAULT PARTITION BY LIST(a); Thank you, Rahila Syed On Tue, May 9, 2017 at 1:13 AM, Robert Haas wrote: > On Thu, May 4, 2017 at 4:40 PM, Sven

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

2017-05-08 Thread Robert Haas
On Thu, May 4, 2017 at 4:40 PM, Sven R. Kunze wrote: > It yields > > CREATE TABLE p1 PARTITION OF test DEFAULT PARTITION BY LIST(b); > > This reads to me like "DEFAULT PARTITION". > > I can imagine a lot of confusion when those queries are encountered in the > wild. I know this

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 wrote: > On Thu, May 4, 2017 at 4:28 PM, Jeevan Ladhe > wrote: > > While reviewing the code I was trying to explore more cases, and I here > > comes an > >

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

2017-05-08 Thread Robert Haas
On Thu, May 4, 2017 at 4:28 PM, Jeevan Ladhe wrote: > While reviewing the code I was trying to explore more cases, and I here > comes an > open question to my mind: > should we allow the default partition table to be partitioned further? I think yes. In general,

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

2017-05-08 Thread Rahila Syed
>I am not able add a new partition if default partition is further partitioned >with default partition. Thanks for reporting. I will fix this. >pg_restore is failing for default partition, dump file still storing old syntax of default partition. Thanks for reporting . I will fix this once the

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

2017-05-05 Thread Jeevan Ladhe
Hi Rahila, I am not able add a new partition if default partition is further partitioned with default partition. Consider example below: postgres=# CREATE TABLE test ( a int, b int, c int) PARTITION BY LIST (a); CREATE TABLE postgres=# CREATE TABLE test_p1 PARTITION OF test FOR VALUES IN(4, 5,

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

2017-05-05 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;

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

2017-05-04 Thread Sven R. Kunze
Hi Rahila, still thinking about the syntax (sorry): On 04.05.2017 13:44, Rahila Syed wrote: [...] The syntax implemented in this patch is as follows, CREATE TABLE p11 PARTITION OF p1 DEFAULT; Rewriting the following: On Thu, May 4, 2017 at 4:02 PM, amul sul

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

2017-05-04 Thread Jeevan Ladhe
While reviewing the code I was trying to explore more cases, and I here comes an open question to my mind: should we allow the default partition table to be partitioned further? If we allow it(as in the current case) then observe following case, where I have defined a default partitioned which is

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

2017-05-04 Thread Jeevan Ladhe
Hi Rahila, I have started reviewing your latest patch, and here are my initial comments: 1. In following block, we can just do with def_index, and we do not need found_def flag. We can check if def_index is -1 or not to decide if default partition is present. @@ -166,6 +172,8 @@

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

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

2017-05-04 Thread Rahila Syed
Hello Amul, Thanks for reporting. Please find attached an updated patch which fixes the above. Also, the attached patch includes changes in syntax proposed upthread. The syntax implemented in this patch is as follows, CREATE TABLE p11 PARTITION OF p1 DEFAULT; Thank you, Rahila Syed On Thu,

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

2017-05-04 Thread amul sul
On Tue, May 2, 2017 at 9:33 PM, Rahila Syed wrote: > Please find attached updated patch with review comments by Robert and Jeevan > implemented. > Patch v8 got clean apply on latest head but server got crash at data insert in the following test: -- Create test table

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

2017-05-02 Thread Rahila Syed
Please find attached updated patch with review comments by Robert and Jeevan implemented. The newly proposed syntax CREATE TABLE .. PARTITION OF .. DEFAULT has got most votes on this thread. If there is no more objection, I will go ahead and include that in the patch. Thank you, Rahila Syed On

Re: [HACKERS] vcregress support for single TAP tests

2017-05-02 Thread Andrew Dunstan
On 05/02/2017 12:19 AM, Vaishnavi Prabakaran wrote: > > > > On Mon, May 1, 2017 at 11:01 PM, Andrew Dunstan > > wrote: > > > > In the absence of further comments I'm going to apply this and > back-patch it so we can

Re: [HACKERS] vcregress support for single TAP tests

2017-05-01 Thread Vaishnavi Prabakaran
On Mon, May 1, 2017 at 11:01 PM, Andrew Dunstan < andrew.duns...@2ndquadrant.com> wrote: > > > In the absence of further comments I'm going to apply this and > back-patch it so we can get a significant improvement in how the > buildfarm reports results from TAP tests, as well as increased

Re: [HACKERS] vcregress support for single TAP tests

2017-05-01 Thread Andrew Dunstan
On 04/28/2017 08:54 AM, Andrew Dunstan wrote: > > On 04/26/2017 10:32 PM, Peter Eisentraut wrote: >> On 4/23/17 17:09, Andrew Dunstan wrote: >>> Here's a patch that will allow calling vcregress.pl to run a single TAP >>> test set. It would work like this: >>> >>> >>> vcregress.pl

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

2017-04-30 Thread Sven R. Kunze
On 27.04.2017 22:21, Robert Haas wrote: On Thu, Apr 27, 2017 at 3:15 PM, Sven R. Kunze wrote: Just to make sound a little rounder: CREATE TABLE ... PARTITION OF ... AS DEFAULT CREATE TABLE ... PARTITION OF ... AS FALLBACK or CREATE TABLE ... PARTITION OF ... AS DEFAULT

Re: [HACKERS] vcregress support for single TAP tests

2017-04-28 Thread Andrew Dunstan
On 04/26/2017 10:32 PM, Peter Eisentraut wrote: > On 4/23/17 17:09, Andrew Dunstan wrote: >> Here's a patch that will allow calling vcregress.pl to run a single TAP >> test set. It would work like this: >> >> >> vcregress.pl src/test/recover true >> >> >> The second argument if true (in the

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

2017-04-27 Thread Robert Haas
On Thu, Apr 27, 2017 at 3:15 PM, Sven R. Kunze wrote: > On 27.04.2017 15:07, Robert Haas wrote: >> On Thu, Apr 27, 2017 at 8:49 AM, Rahila Syed >> wrote: >>> >>> +1 for CREATE TABLE..PARTITION OF...DEFAULT syntax. >>> I think substituting DEFAULT for FOR

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

2017-04-27 Thread Rahila Syed
Hi, On Apr 27, 2017 18:37, "Robert Haas" wrote: > > > Are you also working on extending this to work with range > partitioning? Because I think that would be good to do. > > > Currently I am working on review comments and bug fixes for the default list partitioning

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

2017-04-27 Thread Sven R. Kunze
On 27.04.2017 15:07, Robert Haas wrote: On Thu, Apr 27, 2017 at 8:49 AM, Rahila Syed wrote: +1 for CREATE TABLE..PARTITION OF...DEFAULT syntax. I think substituting DEFAULT for FOR VALUES is appropriate as both cases are mutually exclusive. Just to make sound a little

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

2017-04-27 Thread Robert Haas
On Thu, Apr 27, 2017 at 8:49 AM, Rahila Syed wrote: >>I suspect it could be done as of now, but I'm a little worried that it >>might create grammar conflicts in the future as we extend the syntax >>further. If we use CREATE TABLE ... PARTITION OF .. DEFAULT, then the

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

2017-04-27 Thread Rahila Syed
>I suspect it could be done as of now, but I'm a little worried that it >might create grammar conflicts in the future as we extend the syntax >further. If we use CREATE TABLE ... PARTITION OF .. DEFAULT, then the >word DEFAULT appears in the same position where we'd normally have FOR >VALUES, and

Re: [HACKERS] vcregress support for single TAP tests

2017-04-26 Thread Peter Eisentraut
On 4/23/17 17:09, Andrew Dunstan wrote: > > Here's a patch that will allow calling vcregress.pl to run a single TAP > test set. It would work like this: > > > vcregress.pl src/test/recover true > > > The second argument if true (in the perl sense, of course) would trigger > a temp install

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

2017-04-26 Thread Rahila Syed
Hello Jeevan, Thank you for comments. I will include your comments in the updated patch. >7.The output of describe needs to be improved. The syntax for DEFAULT partitioning is still under discussion. This comment wont be applicable if the syntax is changed. >6. >I am wondering, isn't it

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

2017-04-25 Thread Ashutosh Bapat
On Tue, Apr 25, 2017 at 11:23 PM, Robert Haas wrote: > On Tue, Apr 25, 2017 at 1:20 AM, Ashutosh Bapat > wrote: >>> I suspect it could be done as of now, but I'm a little worried that it >>> might create grammar conflicts in the future as

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

2017-04-25 Thread Robert Haas
On Tue, Apr 25, 2017 at 1:20 AM, Ashutosh Bapat wrote: >> I suspect it could be done as of now, but I'm a little worried that it >> might create grammar conflicts in the future as we extend the syntax >> further. If we use CREATE TABLE ... PARTITION OF ..

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

2017-04-25 Thread Amit Langote
On 2017/04/25 14:20, Ashutosh Bapat wrote: > On Tue, Apr 25, 2017 at 1:46 AM, Robert Haas wrote: >> On Mon, Apr 24, 2017 at 8:14 AM, Ashutosh Bapat >> wrote: >>> On Mon, Apr 24, 2017 at 4:24 PM, Robert Haas wrote:

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

2017-04-24 Thread Ashutosh Bapat
On Tue, Apr 25, 2017 at 1:46 AM, Robert Haas wrote: > On Mon, Apr 24, 2017 at 8:14 AM, Ashutosh Bapat > wrote: >> On Mon, Apr 24, 2017 at 4:24 PM, Robert Haas wrote: >>> On Mon, Apr 24, 2017 at 5:10 AM, Rahila Syed

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

2017-04-24 Thread Amit Langote
On 2017/04/25 5:16, Robert Haas wrote: > On Mon, Apr 24, 2017 at 8:14 AM, Ashutosh Bapat > 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:

<    1   2   3   4   5   6   7   8   9   10   >