You can subscribe to this list here.
2010 |
Jan
|
Feb
|
Mar
|
Apr
(10) |
May
(17) |
Jun
(3) |
Jul
|
Aug
|
Sep
(8) |
Oct
(18) |
Nov
(51) |
Dec
(74) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2011 |
Jan
(47) |
Feb
(44) |
Mar
(44) |
Apr
(102) |
May
(35) |
Jun
(25) |
Jul
(56) |
Aug
(69) |
Sep
(32) |
Oct
(37) |
Nov
(31) |
Dec
(16) |
2012 |
Jan
(34) |
Feb
(127) |
Mar
(218) |
Apr
(252) |
May
(80) |
Jun
(137) |
Jul
(205) |
Aug
(159) |
Sep
(35) |
Oct
(50) |
Nov
(82) |
Dec
(52) |
2013 |
Jan
(107) |
Feb
(159) |
Mar
(118) |
Apr
(163) |
May
(151) |
Jun
(89) |
Jul
(106) |
Aug
(177) |
Sep
(49) |
Oct
(63) |
Nov
(46) |
Dec
(7) |
2014 |
Jan
(65) |
Feb
(128) |
Mar
(40) |
Apr
(11) |
May
(4) |
Jun
(8) |
Jul
(16) |
Aug
(11) |
Sep
(4) |
Oct
(1) |
Nov
(5) |
Dec
(16) |
2015 |
Jan
(5) |
Feb
|
Mar
(2) |
Apr
(5) |
May
(4) |
Jun
(12) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(4) |
2019 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
(2) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
S | M | T | W | T | F | S |
---|---|---|---|---|---|---|
|
|
|
|
|
1
(12) |
2
(2) |
3
(1) |
4
(6) |
5
(11) |
6
(4) |
7
(6) |
8
(5) |
9
|
10
|
11
(1) |
12
(6) |
13
(23) |
14
(5) |
15
(5) |
16
|
17
|
18
(1) |
19
|
20
(2) |
21
(2) |
22
(4) |
23
|
24
|
25
|
26
|
27
(3) |
28
(1) |
29
(2) |
30
|
From: Michael P. <mic...@gm...> - 2011-04-27 23:34:34
|
This patch is what I could call a "research" patch, it is not really ready for commit at this state of development and I am personally not satisfied with that. About COPY, I haven't made a lot of tests yet, but this patch just rewrites INSERT queries. Then it doesn't handle cases where nextval is in WHERE clauses because this is automatically push down to nodes. In order to do that, I was thinking about changing the function expression of nextval directly when transforming the expression in TransformExpr. This would make the implementation a little bit deeper, so there may be side effects, but I suppose it could handle all the cases of queries needing sequence values from GTM. Those queries are basically the ones using nextval, currval, lastval (does not need GTM) and setval. I also think it may be able to handle the cases of even subqueries using sequence functions. Another way of doing would be to do the query transformation neither in rewrite not analyze, but directly in Executor, and then execution nodes would be determined at execution time, but this would need planner extension... On Wed, Apr 27, 2011 at 8:55 PM, Mason <ma...@us...>wrote: > On Wed, Apr 27, 2011 at 5:02 AM, Michael Paquier > <mic...@gm...> wrote: > > Hi all, > > > > Please find attached a patch that adds support for DEFAULT nextval for > XC. > > The main idea of this patch is to detect when a nextval function is used > as > > default and replace the function expression of nextval by a constant > > expression > > when rewriting the query. > > I haven't yet run regressions on this patch, and I am still looking for a > > way to expand that for other non-immutable functions. > > > > The reason why I wanted to replace the value before planner was that we > > determine at planner level which node(s) to target, > > so rewriter looked to be a good place for that. > > > > Here is an example of query for this patch: > > create sequence toto; > > create table ab (a int default nextval('toto'), b int); > > insert into ab (b) values (2); > > insert into ab (b) values (2); > > insert into ab (b) values (2); > > template1=# select * from ab; > > a | b > > ---+--- > > 1 | 2 > > 2 | 2 > > 3 | 2 > > > > Any comments about this way of doing are welcome. > > It is nice to see this being tackled. > > Does the patch handle COPY, too? > > How about INSERT SELECT? (Or, have you guys disabled support for that?) > > Thanks, > > Mason > > > > -- > > Thanks, > > > > Michael Paquier > > http://michael.otacoo.com > > > > > ------------------------------------------------------------------------------ > > WhatsUp Gold - Download Free Network Management Software > > The most intuitive, comprehensive, and cost-effective network > > management toolset available today. Delivers lowest initial > > acquisition cost and overall TCO of any competing solution. > > http://p.sf.net/sfu/whatsupgold-sd > > _______________________________________________ > > Postgres-xc-developers mailing list > > Pos...@li... > > https://lists.sourceforge.net/lists/listinfo/postgres-xc-developers > > > > > -- Thanks, Michael Paquier http://michael.otacoo.com |
From: Mason <ma...@us...> - 2011-04-27 11:56:04
|
On Wed, Apr 27, 2011 at 5:02 AM, Michael Paquier <mic...@gm...> wrote: > Hi all, > > Please find attached a patch that adds support for DEFAULT nextval for XC. > The main idea of this patch is to detect when a nextval function is used as > default and replace the function expression of nextval by a constant > expression > when rewriting the query. > I haven't yet run regressions on this patch, and I am still looking for a > way to expand that for other non-immutable functions. > > The reason why I wanted to replace the value before planner was that we > determine at planner level which node(s) to target, > so rewriter looked to be a good place for that. > > Here is an example of query for this patch: > create sequence toto; > create table ab (a int default nextval('toto'), b int); > insert into ab (b) values (2); > insert into ab (b) values (2); > insert into ab (b) values (2); > template1=# select * from ab; > a | b > ---+--- > 1 | 2 > 2 | 2 > 3 | 2 > > Any comments about this way of doing are welcome. It is nice to see this being tackled. Does the patch handle COPY, too? How about INSERT SELECT? (Or, have you guys disabled support for that?) Thanks, Mason > -- > Thanks, > > Michael Paquier > http://michael.otacoo.com > > ------------------------------------------------------------------------------ > WhatsUp Gold - Download Free Network Management Software > The most intuitive, comprehensive, and cost-effective network > management toolset available today. Delivers lowest initial > acquisition cost and overall TCO of any competing solution. > http://p.sf.net/sfu/whatsupgold-sd > _______________________________________________ > Postgres-xc-developers mailing list > Pos...@li... > https://lists.sourceforge.net/lists/listinfo/postgres-xc-developers > > |
From: Michael P. <mic...@gm...> - 2011-04-27 09:03:01
|
Hi all, Please find attached a patch that adds support for DEFAULT nextval for XC. The main idea of this patch is to detect when a nextval function is used as default and replace the function expression of nextval by a constant expression when rewriting the query. I haven't yet run regressions on this patch, and I am still looking for a way to expand that for other non-immutable functions. The reason why I wanted to replace the value before planner was that we determine at planner level which node(s) to target, so rewriter looked to be a good place for that. Here is an example of query for this patch: create sequence toto; create table ab (a int default nextval('toto'), b int); insert into ab (b) values (2); insert into ab (b) values (2); insert into ab (b) values (2); template1=# select * from ab; a | b ---+--- 1 | 2 2 | 2 3 | 2 Any comments about this way of doing are welcome. -- Thanks, Michael Paquier http://michael.otacoo.com |