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
|
2
|
3
|
4
|
5
|
6
|
7
(13) |
8
(8) |
9
(12) |
10
(10) |
11
|
12
(1) |
13
(19) |
14
|
15
(22) |
16
(6) |
17
(20) |
18
|
19
|
20
(1) |
21
(1) |
22
(3) |
23
(4) |
24
(9) |
25
|
26
|
27
(4) |
28
(10) |
29
(3) |
30
(3) |
31
(2) |
|
From: Koichi S. <koi...@gm...> - 2013-05-09 14:32:03
|
Because such case will end up with an error, I'm afraid the additional code may not work much. Regards; ---------- Koichi Suzuki 2013/5/9 Nikhil Sontakke <ni...@st...> > > > Hmmm... This is not a simple issue to fix. Maybe we should document that >> the access privilege to the view must be the same as those of the base >> tables. >> >> Any other inputs to this? >> >> > Or in XC, we should add code to check that the grants to the view should > also be the same as underlying referenced tables. > > Regards, > Nikhils > > > >> ---------- >> Koichi Suzuki >> >> >> 2013/5/9 Abbas Butt <abb...@en...> >> >>> Consider this test cases, which has been taken form select_views.sql >>> and simplified to pin point the issue. >>> >>> CREATE ROLE regress_alice; >>> CREATE TABLE customer(cid int primary key, name text not null, tel text, >>> passwd text); >>> >>> INSERT INTO customer VALUES >>> (101, 'regress_alice', '+81-12-3456-7890', 'passwd123'), >>> (102, 'regress_bob', '+01-234-567-8901', 'beafsteak'); >>> >>> CREATE VIEW my_property_normal AS SELECT * FROM customer; >>> >>> GRANT SELECT ON my_property_normal TO public; >>> >>> SET SESSION AUTHORIZATION regress_alice; >>> >>> >>> On PG >>> ===== >>> >>> test=> EXPLAIN VERBOSE SELECT * FROM my_property_normal; >>> QUERY PLAN >>> ---------------------------------------------------------------------- >>> Seq Scan on public.customer (cost=0.00..16.20 rows=620 width=100) >>> Output: customer.cid, customer.name, customer.tel, customer.passwd >>> (2 rows) >>> >>> test=> >>> test=> SELECT * FROM my_property_normal; >>> cid | name | tel | passwd >>> -----+---------------+------------------+----------- >>> 101 | regress_alice | +81-12-3456-7890 | passwd123 >>> 102 | regress_bob | +01-234-567-8901 | beafsteak >>> (2 rows) >>> >>> On XC >>> ===== >>> >>> test=> EXPLAIN VERBOSE SELECT * FROM my_property_normal; >>> QUERY PLAN >>> >>> --------------------------------------------------------------------------------------------------------------------- >>> Data Node Scan on "__REMOTE_FQS_QUERY__" (cost=0.00..0.00 rows=0 >>> width=0) >>> Output: my_property_normal.cid, my_property_normal.name, >>> my_property_normal.tel, my_property_normal.passwd >>> Node/s: data_node_1, data_node_2, data_node_3, data_node_4 >>> Remote query: SELECT cid, name, tel, passwd FROM (SELECT >>> customer.cid, customer.name, customer.tel, customer.passwd FROM >>> customer) my_property_normal >>> (4 rows) >>> >>> test=> >>> test=> SELECT * FROM my_property_normal; >>> ERROR: permission denied for relation customer >>> >>> Please refer to the documentation at >>> http://www.postgresql.org/docs/9.2/static/rules-privileges.html >>> It says >>> "*Relations that are used due to rules get checked against the >>> privileges of the rule owner, not the user invoking the rule. This means >>> that a user only needs the required privileges for the tables/views that he >>> names explicitly in his queries.*" >>> >>> It is because of this fact that the query >>> SELECT * FROM my_property_normal >>> works fine when issued on PG. >>> In XC on the other hand, since views are not even created on datanodes, >>> they (datanodes) are not even aware that the query is actually a select >>> form a view, let alone enforcing the above statement in documentation. >>> >>> What strategy are we going to fix this problem? >>> Are we going to fix it or do some changes in documentation? >>> Regards >>> Abbas >>> >>> >>> >>> On Tue, May 7, 2013 at 11:38 AM, Abbas Butt <abb...@en... >>> > wrote: >>> >>>> ok, sure. >>>> >>>> >>>> On Tue, May 7, 2013 at 11:37 AM, Ashutosh Bapat < >>>> ash...@en...> wrote: >>>> >>>>> BTW, fix the bug in separate patch and fix expected outputs in >>>>> separate patch. >>>>> >>>>> >>>>> On Tue, May 7, 2013 at 11:54 AM, Ashutosh Bapat < >>>>> ash...@en...> wrote: >>>>> >>>>>> Can you please fix the bug then? >>>>>> >>>>>> >>>>>> On Tue, May 7, 2013 at 10:25 AM, Abbas Butt < >>>>>> abb...@en...> wrote: >>>>>> >>>>>>> >>>>>>> >>>>>>> On Tue, Apr 30, 2013 at 4:57 PM, Ashutosh Bapat < >>>>>>> ash...@en...> wrote: >>>>>>> >>>>>>>> Hi Abbas, >>>>>>>> I see that the EXPLAIN commands are changed to include the XC >>>>>>>> specific options. Since the original test is using capital letters >>>>>>>> everywhere, it's better to maintain that style. >>>>>>>> >>>>>>> >>>>>>> Done. >>>>>>> >>>>>>> >>>>>>>> >>>>>>>> Please make sure that the changes you have done (explain output) >>>>>>>> reflect in all the alt. expected output files. >>>>>>>> >>>>>>> >>>>>>> Done. >>>>>>> >>>>>>> >>>>>>>> Can you please see if we can eliminate the alternate expected >>>>>>>> output files as well? What are the reasons we have to maintain those? >>>>>>>> >>>>>>> >>>>>>> select_views.out and select_view_1.out are maintained by vanilla PG. >>>>>>> We have added select_views_2.out and It can be removed, however I noticed >>>>>>> that the test case that was added (Leaky View Scenario) is failing and >>>>>>> needs a fix. >>>>>>> >>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> On Wed, Apr 24, 2013 at 10:59 PM, Abbas Butt < >>>>>>>> abb...@en...> wrote: >>>>>>>> >>>>>>>>> Hi, >>>>>>>>> The test was failing because some more tests are added in sql file. >>>>>>>>> >>>>>>>>> -- >>>>>>>>> *Abbas* >>>>>>>>> Architect >>>>>>>>> >>>>>>>>> Ph: 92.334.5100153 >>>>>>>>> Skype ID: gabbasb >>>>>>>>> www.enterprisedb.co <http://www.enterprisedb.com/>m<http://www.enterprisedb.com/> >>>>>>>>> * >>>>>>>>> Follow us on Twitter* >>>>>>>>> @EnterpriseDB >>>>>>>>> >>>>>>>>> Visit EnterpriseDB for tutorials, webinars, whitepapers<http://www.enterprisedb.com/resources-community>and more<http://www.enterprisedb.com/resources-community> >>>>>>>>> >>>>>>>>> >>>>>>>>> ------------------------------------------------------------------------------ >>>>>>>>> Try New Relic Now & We'll Send You this Cool Shirt >>>>>>>>> New Relic is the only SaaS-based application performance >>>>>>>>> monitoring service >>>>>>>>> that delivers powerful full stack analytics. Optimize and monitor >>>>>>>>> your >>>>>>>>> browser, app, & servers with just a few lines of code. Try New >>>>>>>>> Relic >>>>>>>>> and get this awesome Nerd Life shirt! >>>>>>>>> http://p.sf.net/sfu/newrelic_d2d_apr >>>>>>>>> _______________________________________________ >>>>>>>>> Postgres-xc-developers mailing list >>>>>>>>> Pos...@li... >>>>>>>>> https://lists.sourceforge.net/lists/listinfo/postgres-xc-developers >>>>>>>>> >>>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> -- >>>>>>>> Best Wishes, >>>>>>>> Ashutosh Bapat >>>>>>>> EntepriseDB Corporation >>>>>>>> The Postgres Database Company >>>>>>>> >>>>>>> >>>>>>> >>>>>>> >>>>>>> -- >>>>>>> -- >>>>>>> *Abbas* >>>>>>> Architect >>>>>>> >>>>>>> Ph: 92.334.5100153 >>>>>>> Skype ID: gabbasb >>>>>>> www.enterprisedb.co <http://www.enterprisedb.com/>m<http://www.enterprisedb.com/> >>>>>>> * >>>>>>> Follow us on Twitter* >>>>>>> @EnterpriseDB >>>>>>> >>>>>>> Visit EnterpriseDB for tutorials, webinars, whitepapers<http://www.enterprisedb.com/resources-community>and more<http://www.enterprisedb.com/resources-community> >>>>>>> >>>>>> >>>>>> >>>>>> >>>>>> -- >>>>>> Best Wishes, >>>>>> Ashutosh Bapat >>>>>> EntepriseDB Corporation >>>>>> The Postgres Database Company >>>>>> >>>>> >>>>> >>>>> >>>>> -- >>>>> Best Wishes, >>>>> Ashutosh Bapat >>>>> EntepriseDB Corporation >>>>> The Postgres Database Company >>>>> >>>> >>>> >>>> >>>> -- >>>> -- >>>> *Abbas* >>>> Architect >>>> >>>> Ph: 92.334.5100153 >>>> Skype ID: gabbasb >>>> www.enterprisedb.co <http://www.enterprisedb.com/>m<http://www.enterprisedb.com/> >>>> * >>>> Follow us on Twitter* >>>> @EnterpriseDB >>>> >>>> Visit EnterpriseDB for tutorials, webinars, whitepapers<http://www.enterprisedb.com/resources-community>and more<http://www.enterprisedb.com/resources-community> >>>> >>> >>> >>> >>> -- >>> -- >>> *Abbas* >>> Architect >>> >>> Ph: 92.334.5100153 >>> Skype ID: gabbasb >>> www.enterprisedb.co <http://www.enterprisedb.com/>m<http://www.enterprisedb.com/> >>> * >>> Follow us on Twitter* >>> @EnterpriseDB >>> >>> Visit EnterpriseDB for tutorials, webinars, whitepapers<http://www.enterprisedb.com/resources-community>and more<http://www.enterprisedb.com/resources-community> >>> >>> >>> ------------------------------------------------------------------------------ >>> Learn Graph Databases - Download FREE O'Reilly Book >>> "Graph Databases" is the definitive new guide to graph databases and >>> their applications. This 200-page book is written by three acclaimed >>> leaders in the field. The early access version is available now. >>> Download your free book today! http://p.sf.net/sfu/neotech_d2d_may >>> >>> _______________________________________________ >>> Postgres-xc-developers mailing list >>> Pos...@li... >>> https://lists.sourceforge.net/lists/listinfo/postgres-xc-developers >>> >>> >> >> >> ------------------------------------------------------------------------------ >> Learn Graph Databases - Download FREE O'Reilly Book >> "Graph Databases" is the definitive new guide to graph databases and >> their applications. This 200-page book is written by three acclaimed >> leaders in the field. The early access version is available now. >> Download your free book today! http://p.sf.net/sfu/neotech_d2d_may >> _______________________________________________ >> Postgres-xc-developers mailing list >> Pos...@li... >> https://lists.sourceforge.net/lists/listinfo/postgres-xc-developers >> >> > > > -- > StormDB - http://www.stormdb.com > The Database Cloud > |
From: Nikhil S. <ni...@st...> - 2013-05-09 14:08:09
|
Hmmm... This is not a simple issue to fix. Maybe we should document that > the access privilege to the view must be the same as those of the base > tables. > > Any other inputs to this? > > Or in XC, we should add code to check that the grants to the view should also be the same as underlying referenced tables. Regards, Nikhils > ---------- > Koichi Suzuki > > > 2013/5/9 Abbas Butt <abb...@en...> > >> Consider this test cases, which has been taken form select_views.sql and >> simplified to pin point the issue. >> >> CREATE ROLE regress_alice; >> CREATE TABLE customer(cid int primary key, name text not null, tel text, >> passwd text); >> >> INSERT INTO customer VALUES >> (101, 'regress_alice', '+81-12-3456-7890', 'passwd123'), >> (102, 'regress_bob', '+01-234-567-8901', 'beafsteak'); >> >> CREATE VIEW my_property_normal AS SELECT * FROM customer; >> >> GRANT SELECT ON my_property_normal TO public; >> >> SET SESSION AUTHORIZATION regress_alice; >> >> >> On PG >> ===== >> >> test=> EXPLAIN VERBOSE SELECT * FROM my_property_normal; >> QUERY PLAN >> ---------------------------------------------------------------------- >> Seq Scan on public.customer (cost=0.00..16.20 rows=620 width=100) >> Output: customer.cid, customer.name, customer.tel, customer.passwd >> (2 rows) >> >> test=> >> test=> SELECT * FROM my_property_normal; >> cid | name | tel | passwd >> -----+---------------+------------------+----------- >> 101 | regress_alice | +81-12-3456-7890 | passwd123 >> 102 | regress_bob | +01-234-567-8901 | beafsteak >> (2 rows) >> >> On XC >> ===== >> >> test=> EXPLAIN VERBOSE SELECT * FROM my_property_normal; >> QUERY PLAN >> >> --------------------------------------------------------------------------------------------------------------------- >> Data Node Scan on "__REMOTE_FQS_QUERY__" (cost=0.00..0.00 rows=0 >> width=0) >> Output: my_property_normal.cid, my_property_normal.name, >> my_property_normal.tel, my_property_normal.passwd >> Node/s: data_node_1, data_node_2, data_node_3, data_node_4 >> Remote query: SELECT cid, name, tel, passwd FROM (SELECT customer.cid, >> customer.name, customer.tel, customer.passwd FROM customer) >> my_property_normal >> (4 rows) >> >> test=> >> test=> SELECT * FROM my_property_normal; >> ERROR: permission denied for relation customer >> >> Please refer to the documentation at >> http://www.postgresql.org/docs/9.2/static/rules-privileges.html >> It says >> "*Relations that are used due to rules get checked against the >> privileges of the rule owner, not the user invoking the rule. This means >> that a user only needs the required privileges for the tables/views that he >> names explicitly in his queries.*" >> >> It is because of this fact that the query >> SELECT * FROM my_property_normal >> works fine when issued on PG. >> In XC on the other hand, since views are not even created on datanodes, >> they (datanodes) are not even aware that the query is actually a select >> form a view, let alone enforcing the above statement in documentation. >> >> What strategy are we going to fix this problem? >> Are we going to fix it or do some changes in documentation? >> Regards >> Abbas >> >> >> >> On Tue, May 7, 2013 at 11:38 AM, Abbas Butt <abb...@en...>wrote: >> >>> ok, sure. >>> >>> >>> On Tue, May 7, 2013 at 11:37 AM, Ashutosh Bapat < >>> ash...@en...> wrote: >>> >>>> BTW, fix the bug in separate patch and fix expected outputs in separate >>>> patch. >>>> >>>> >>>> On Tue, May 7, 2013 at 11:54 AM, Ashutosh Bapat < >>>> ash...@en...> wrote: >>>> >>>>> Can you please fix the bug then? >>>>> >>>>> >>>>> On Tue, May 7, 2013 at 10:25 AM, Abbas Butt < >>>>> abb...@en...> wrote: >>>>> >>>>>> >>>>>> >>>>>> On Tue, Apr 30, 2013 at 4:57 PM, Ashutosh Bapat < >>>>>> ash...@en...> wrote: >>>>>> >>>>>>> Hi Abbas, >>>>>>> I see that the EXPLAIN commands are changed to include the XC >>>>>>> specific options. Since the original test is using capital letters >>>>>>> everywhere, it's better to maintain that style. >>>>>>> >>>>>> >>>>>> Done. >>>>>> >>>>>> >>>>>>> >>>>>>> Please make sure that the changes you have done (explain output) >>>>>>> reflect in all the alt. expected output files. >>>>>>> >>>>>> >>>>>> Done. >>>>>> >>>>>> >>>>>>> Can you please see if we can eliminate the alternate expected >>>>>>> output files as well? What are the reasons we have to maintain those? >>>>>>> >>>>>> >>>>>> select_views.out and select_view_1.out are maintained by vanilla PG. >>>>>> We have added select_views_2.out and It can be removed, however I noticed >>>>>> that the test case that was added (Leaky View Scenario) is failing and >>>>>> needs a fix. >>>>>> >>>>>> >>>>>>> >>>>>>> >>>>>>> On Wed, Apr 24, 2013 at 10:59 PM, Abbas Butt < >>>>>>> abb...@en...> wrote: >>>>>>> >>>>>>>> Hi, >>>>>>>> The test was failing because some more tests are added in sql file. >>>>>>>> >>>>>>>> -- >>>>>>>> *Abbas* >>>>>>>> Architect >>>>>>>> >>>>>>>> Ph: 92.334.5100153 >>>>>>>> Skype ID: gabbasb >>>>>>>> www.enterprisedb.co <http://www.enterprisedb.com/>m<http://www.enterprisedb.com/> >>>>>>>> * >>>>>>>> Follow us on Twitter* >>>>>>>> @EnterpriseDB >>>>>>>> >>>>>>>> Visit EnterpriseDB for tutorials, webinars, whitepapers<http://www.enterprisedb.com/resources-community>and more<http://www.enterprisedb.com/resources-community> >>>>>>>> >>>>>>>> >>>>>>>> ------------------------------------------------------------------------------ >>>>>>>> Try New Relic Now & We'll Send You this Cool Shirt >>>>>>>> New Relic is the only SaaS-based application performance monitoring >>>>>>>> service >>>>>>>> that delivers powerful full stack analytics. Optimize and monitor >>>>>>>> your >>>>>>>> browser, app, & servers with just a few lines of code. Try New Relic >>>>>>>> and get this awesome Nerd Life shirt! >>>>>>>> http://p.sf.net/sfu/newrelic_d2d_apr >>>>>>>> _______________________________________________ >>>>>>>> Postgres-xc-developers mailing list >>>>>>>> Pos...@li... >>>>>>>> https://lists.sourceforge.net/lists/listinfo/postgres-xc-developers >>>>>>>> >>>>>>>> >>>>>>> >>>>>>> >>>>>>> -- >>>>>>> Best Wishes, >>>>>>> Ashutosh Bapat >>>>>>> EntepriseDB Corporation >>>>>>> The Postgres Database Company >>>>>>> >>>>>> >>>>>> >>>>>> >>>>>> -- >>>>>> -- >>>>>> *Abbas* >>>>>> Architect >>>>>> >>>>>> Ph: 92.334.5100153 >>>>>> Skype ID: gabbasb >>>>>> www.enterprisedb.co <http://www.enterprisedb.com/>m<http://www.enterprisedb.com/> >>>>>> * >>>>>> Follow us on Twitter* >>>>>> @EnterpriseDB >>>>>> >>>>>> Visit EnterpriseDB for tutorials, webinars, whitepapers<http://www.enterprisedb.com/resources-community>and more<http://www.enterprisedb.com/resources-community> >>>>>> >>>>> >>>>> >>>>> >>>>> -- >>>>> Best Wishes, >>>>> Ashutosh Bapat >>>>> EntepriseDB Corporation >>>>> The Postgres Database Company >>>>> >>>> >>>> >>>> >>>> -- >>>> Best Wishes, >>>> Ashutosh Bapat >>>> EntepriseDB Corporation >>>> The Postgres Database Company >>>> >>> >>> >>> >>> -- >>> -- >>> *Abbas* >>> Architect >>> >>> Ph: 92.334.5100153 >>> Skype ID: gabbasb >>> www.enterprisedb.co <http://www.enterprisedb.com/>m<http://www.enterprisedb.com/> >>> * >>> Follow us on Twitter* >>> @EnterpriseDB >>> >>> Visit EnterpriseDB for tutorials, webinars, whitepapers<http://www.enterprisedb.com/resources-community>and more<http://www.enterprisedb.com/resources-community> >>> >> >> >> >> -- >> -- >> *Abbas* >> Architect >> >> Ph: 92.334.5100153 >> Skype ID: gabbasb >> www.enterprisedb.co <http://www.enterprisedb.com/>m<http://www.enterprisedb.com/> >> * >> Follow us on Twitter* >> @EnterpriseDB >> >> Visit EnterpriseDB for tutorials, webinars, whitepapers<http://www.enterprisedb.com/resources-community>and more<http://www.enterprisedb.com/resources-community> >> >> >> ------------------------------------------------------------------------------ >> Learn Graph Databases - Download FREE O'Reilly Book >> "Graph Databases" is the definitive new guide to graph databases and >> their applications. This 200-page book is written by three acclaimed >> leaders in the field. The early access version is available now. >> Download your free book today! http://p.sf.net/sfu/neotech_d2d_may >> >> _______________________________________________ >> Postgres-xc-developers mailing list >> Pos...@li... >> https://lists.sourceforge.net/lists/listinfo/postgres-xc-developers >> >> > > > ------------------------------------------------------------------------------ > Learn Graph Databases - Download FREE O'Reilly Book > "Graph Databases" is the definitive new guide to graph databases and > their applications. This 200-page book is written by three acclaimed > leaders in the field. The early access version is available now. > Download your free book today! http://p.sf.net/sfu/neotech_d2d_may > _______________________________________________ > Postgres-xc-developers mailing list > Pos...@li... > https://lists.sourceforge.net/lists/listinfo/postgres-xc-developers > > -- StormDB - http://www.stormdb.com The Database Cloud |
From: Koichi S. <koi...@gm...> - 2013-05-09 13:19:27
|
Hmmm... This is not a simple issue to fix. Maybe we should document that the access privilege to the view must be the same as those of the base tables. Any other inputs to this? ---------- Koichi Suzuki 2013/5/9 Abbas Butt <abb...@en...> > Consider this test cases, which has been taken form select_views.sql and > simplified to pin point the issue. > > CREATE ROLE regress_alice; > CREATE TABLE customer(cid int primary key, name text not null, tel text, > passwd text); > > INSERT INTO customer VALUES > (101, 'regress_alice', '+81-12-3456-7890', 'passwd123'), > (102, 'regress_bob', '+01-234-567-8901', 'beafsteak'); > > CREATE VIEW my_property_normal AS SELECT * FROM customer; > > GRANT SELECT ON my_property_normal TO public; > > SET SESSION AUTHORIZATION regress_alice; > > > On PG > ===== > > test=> EXPLAIN VERBOSE SELECT * FROM my_property_normal; > QUERY PLAN > ---------------------------------------------------------------------- > Seq Scan on public.customer (cost=0.00..16.20 rows=620 width=100) > Output: customer.cid, customer.name, customer.tel, customer.passwd > (2 rows) > > test=> > test=> SELECT * FROM my_property_normal; > cid | name | tel | passwd > -----+---------------+------------------+----------- > 101 | regress_alice | +81-12-3456-7890 | passwd123 > 102 | regress_bob | +01-234-567-8901 | beafsteak > (2 rows) > > On XC > ===== > > test=> EXPLAIN VERBOSE SELECT * FROM my_property_normal; > QUERY PLAN > > --------------------------------------------------------------------------------------------------------------------- > Data Node Scan on "__REMOTE_FQS_QUERY__" (cost=0.00..0.00 rows=0 width=0) > Output: my_property_normal.cid, my_property_normal.name, > my_property_normal.tel, my_property_normal.passwd > Node/s: data_node_1, data_node_2, data_node_3, data_node_4 > Remote query: SELECT cid, name, tel, passwd FROM (SELECT customer.cid, > customer.name, customer.tel, customer.passwd FROM customer) > my_property_normal > (4 rows) > > test=> > test=> SELECT * FROM my_property_normal; > ERROR: permission denied for relation customer > > Please refer to the documentation at > http://www.postgresql.org/docs/9.2/static/rules-privileges.html > It says > "*Relations that are used due to rules get checked against the privileges > of the rule owner, not the user invoking the rule. This means that a user > only needs the required privileges for the tables/views that he names > explicitly in his queries.*" > > It is because of this fact that the query > SELECT * FROM my_property_normal > works fine when issued on PG. > In XC on the other hand, since views are not even created on datanodes, > they (datanodes) are not even aware that the query is actually a select > form a view, let alone enforcing the above statement in documentation. > > What strategy are we going to fix this problem? > Are we going to fix it or do some changes in documentation? > Regards > Abbas > > > > On Tue, May 7, 2013 at 11:38 AM, Abbas Butt <abb...@en...>wrote: > >> ok, sure. >> >> >> On Tue, May 7, 2013 at 11:37 AM, Ashutosh Bapat < >> ash...@en...> wrote: >> >>> BTW, fix the bug in separate patch and fix expected outputs in separate >>> patch. >>> >>> >>> On Tue, May 7, 2013 at 11:54 AM, Ashutosh Bapat < >>> ash...@en...> wrote: >>> >>>> Can you please fix the bug then? >>>> >>>> >>>> On Tue, May 7, 2013 at 10:25 AM, Abbas Butt < >>>> abb...@en...> wrote: >>>> >>>>> >>>>> >>>>> On Tue, Apr 30, 2013 at 4:57 PM, Ashutosh Bapat < >>>>> ash...@en...> wrote: >>>>> >>>>>> Hi Abbas, >>>>>> I see that the EXPLAIN commands are changed to include the XC >>>>>> specific options. Since the original test is using capital letters >>>>>> everywhere, it's better to maintain that style. >>>>>> >>>>> >>>>> Done. >>>>> >>>>> >>>>>> >>>>>> Please make sure that the changes you have done (explain output) >>>>>> reflect in all the alt. expected output files. >>>>>> >>>>> >>>>> Done. >>>>> >>>>> >>>>>> Can you please see if we can eliminate the alternate expected output >>>>>> files as well? What are the reasons we have to maintain those? >>>>>> >>>>> >>>>> select_views.out and select_view_1.out are maintained by vanilla PG. >>>>> We have added select_views_2.out and It can be removed, however I noticed >>>>> that the test case that was added (Leaky View Scenario) is failing and >>>>> needs a fix. >>>>> >>>>> >>>>>> >>>>>> >>>>>> On Wed, Apr 24, 2013 at 10:59 PM, Abbas Butt < >>>>>> abb...@en...> wrote: >>>>>> >>>>>>> Hi, >>>>>>> The test was failing because some more tests are added in sql file. >>>>>>> >>>>>>> -- >>>>>>> *Abbas* >>>>>>> Architect >>>>>>> >>>>>>> Ph: 92.334.5100153 >>>>>>> Skype ID: gabbasb >>>>>>> www.enterprisedb.co <http://www.enterprisedb.com/>m<http://www.enterprisedb.com/> >>>>>>> * >>>>>>> Follow us on Twitter* >>>>>>> @EnterpriseDB >>>>>>> >>>>>>> Visit EnterpriseDB for tutorials, webinars, whitepapers<http://www.enterprisedb.com/resources-community>and more<http://www.enterprisedb.com/resources-community> >>>>>>> >>>>>>> >>>>>>> ------------------------------------------------------------------------------ >>>>>>> Try New Relic Now & We'll Send You this Cool Shirt >>>>>>> New Relic is the only SaaS-based application performance monitoring >>>>>>> service >>>>>>> that delivers powerful full stack analytics. Optimize and monitor >>>>>>> your >>>>>>> browser, app, & servers with just a few lines of code. Try New Relic >>>>>>> and get this awesome Nerd Life shirt! >>>>>>> http://p.sf.net/sfu/newrelic_d2d_apr >>>>>>> _______________________________________________ >>>>>>> Postgres-xc-developers mailing list >>>>>>> Pos...@li... >>>>>>> https://lists.sourceforge.net/lists/listinfo/postgres-xc-developers >>>>>>> >>>>>>> >>>>>> >>>>>> >>>>>> -- >>>>>> Best Wishes, >>>>>> Ashutosh Bapat >>>>>> EntepriseDB Corporation >>>>>> The Postgres Database Company >>>>>> >>>>> >>>>> >>>>> >>>>> -- >>>>> -- >>>>> *Abbas* >>>>> Architect >>>>> >>>>> Ph: 92.334.5100153 >>>>> Skype ID: gabbasb >>>>> www.enterprisedb.co <http://www.enterprisedb.com/>m<http://www.enterprisedb.com/> >>>>> * >>>>> Follow us on Twitter* >>>>> @EnterpriseDB >>>>> >>>>> Visit EnterpriseDB for tutorials, webinars, whitepapers<http://www.enterprisedb.com/resources-community>and more<http://www.enterprisedb.com/resources-community> >>>>> >>>> >>>> >>>> >>>> -- >>>> Best Wishes, >>>> Ashutosh Bapat >>>> EntepriseDB Corporation >>>> The Postgres Database Company >>>> >>> >>> >>> >>> -- >>> Best Wishes, >>> Ashutosh Bapat >>> EntepriseDB Corporation >>> The Postgres Database Company >>> >> >> >> >> -- >> -- >> *Abbas* >> Architect >> >> Ph: 92.334.5100153 >> Skype ID: gabbasb >> www.enterprisedb.co <http://www.enterprisedb.com/>m<http://www.enterprisedb.com/> >> * >> Follow us on Twitter* >> @EnterpriseDB >> >> Visit EnterpriseDB for tutorials, webinars, whitepapers<http://www.enterprisedb.com/resources-community>and more<http://www.enterprisedb.com/resources-community> >> > > > > -- > -- > *Abbas* > Architect > > Ph: 92.334.5100153 > Skype ID: gabbasb > www.enterprisedb.co <http://www.enterprisedb.com/>m<http://www.enterprisedb.com/> > * > Follow us on Twitter* > @EnterpriseDB > > Visit EnterpriseDB for tutorials, webinars, whitepapers<http://www.enterprisedb.com/resources-community>and more<http://www.enterprisedb.com/resources-community> > > > ------------------------------------------------------------------------------ > Learn Graph Databases - Download FREE O'Reilly Book > "Graph Databases" is the definitive new guide to graph databases and > their applications. This 200-page book is written by three acclaimed > leaders in the field. The early access version is available now. > Download your free book today! http://p.sf.net/sfu/neotech_d2d_may > _______________________________________________ > Postgres-xc-developers mailing list > Pos...@li... > https://lists.sourceforge.net/lists/listinfo/postgres-xc-developers > > |
From: Koichi S. <koi...@gm...> - 2013-05-09 13:12:25
|
Let me take a look at it. I'd like to review/commit error correction and sequence backup to the slave first. Thank you; ---------- Koichi Suzuki 2013/5/9 Andrei Martsinchyk <and...@gm...> > So maybe attached fix would be acceptable? > It just disables loading of register.node with #if, no code is removed. > > > > 2013/5/9 鈴木 幸市 <ko...@in...> > >> Andrei; >> >> It's wonderful to have these fixes, especially sequence issues, which is >> already in the bug track. >> >> Error messages need some more thought, I think. Node registration will >> be useful in the future. Disabling this could be a quick fix but I think >> we should keep this code. >> >> Thank you very much; >> --- >> Koichi Suzuki >> >> >> >> On 2013/05/09, at 17:15, Andrei Martsinchyk <and...@gm...> >> wrote: >> >> Hi, >> >> We have found few bugs related to GTM standby. >> 1. Missing break; after handling MSG_BKUP_TXN_BEGIN_GETGXID on standby >> was causing error >> "insufficient data left in message". Patch is attached. >> 2. GTM master does not forward information about sequence created to >> standby. Patch is attached, too. >> 3. When restarting cluster with standby, GTM master logs errors >> "Expecting a startup message, but received �". The problem disappears if I >> remove file register.node from the GTM master data directory. Before I >> start looking into details, why GTM needs to save information about running >> nodes? Cluster may be shut down for reconfiguration and information in >> register.node may be out of date. At the same time when nodes connect to >> GTM they deliver actual information. >> So, maybe proper fix for the problem is just to remove code to >> save/restore register.node? >> >> -- >> Andrei Martsinchyk >> >> StormDB - http://www.stormdb.com >> The Database Cloud >> >> <missing_break.patch><create_sequence.patch> >> ------------------------------------------------------------------------------ >> Learn Graph Databases - Download FREE O'Reilly Book >> "Graph Databases" is the definitive new guide to graph databases and >> their applications. This 200-page book is written by three acclaimed >> leaders in the field. The early access version is available now. >> Download your free book today! >> http://p.sf.net/sfu/neotech_d2d_may_______________________________________________ >> Postgres-xc-developers mailing list >> Pos...@li... >> https://lists.sourceforge.net/lists/listinfo/postgres-xc-developers >> >> >> > > > -- > Andrei Martsinchyk > > StormDB - http://www.stormdb.com > The Database Cloud > > > > ------------------------------------------------------------------------------ > Learn Graph Databases - Download FREE O'Reilly Book > "Graph Databases" is the definitive new guide to graph databases and > their applications. This 200-page book is written by three acclaimed > leaders in the field. The early access version is available now. > Download your free book today! http://p.sf.net/sfu/neotech_d2d_may > _______________________________________________ > Postgres-xc-developers mailing list > Pos...@li... > https://lists.sourceforge.net/lists/listinfo/postgres-xc-developers > > |
From: Abbas B. <abb...@en...> - 2013-05-09 13:11:16
|
Consider this test cases, which has been taken form select_views.sql and simplified to pin point the issue. CREATE ROLE regress_alice; CREATE TABLE customer(cid int primary key, name text not null, tel text, passwd text); INSERT INTO customer VALUES (101, 'regress_alice', '+81-12-3456-7890', 'passwd123'), (102, 'regress_bob', '+01-234-567-8901', 'beafsteak'); CREATE VIEW my_property_normal AS SELECT * FROM customer; GRANT SELECT ON my_property_normal TO public; SET SESSION AUTHORIZATION regress_alice; On PG ===== test=> EXPLAIN VERBOSE SELECT * FROM my_property_normal; QUERY PLAN ---------------------------------------------------------------------- Seq Scan on public.customer (cost=0.00..16.20 rows=620 width=100) Output: customer.cid, customer.name, customer.tel, customer.passwd (2 rows) test=> test=> SELECT * FROM my_property_normal; cid | name | tel | passwd -----+---------------+------------------+----------- 101 | regress_alice | +81-12-3456-7890 | passwd123 102 | regress_bob | +01-234-567-8901 | beafsteak (2 rows) On XC ===== test=> EXPLAIN VERBOSE SELECT * FROM my_property_normal; QUERY PLAN --------------------------------------------------------------------------------------------------------------------- Data Node Scan on "__REMOTE_FQS_QUERY__" (cost=0.00..0.00 rows=0 width=0) Output: my_property_normal.cid, my_property_normal.name, my_property_normal.tel, my_property_normal.passwd Node/s: data_node_1, data_node_2, data_node_3, data_node_4 Remote query: SELECT cid, name, tel, passwd FROM (SELECT customer.cid, customer.name, customer.tel, customer.passwd FROM customer) my_property_normal (4 rows) test=> test=> SELECT * FROM my_property_normal; ERROR: permission denied for relation customer Please refer to the documentation at http://www.postgresql.org/docs/9.2/static/rules-privileges.html It says "*Relations that are used due to rules get checked against the privileges of the rule owner, not the user invoking the rule. This means that a user only needs the required privileges for the tables/views that he names explicitly in his queries.*" It is because of this fact that the query SELECT * FROM my_property_normal works fine when issued on PG. In XC on the other hand, since views are not even created on datanodes, they (datanodes) are not even aware that the query is actually a select form a view, let alone enforcing the above statement in documentation. What strategy are we going to fix this problem? Are we going to fix it or do some changes in documentation? Regards Abbas On Tue, May 7, 2013 at 11:38 AM, Abbas Butt <abb...@en...>wrote: > ok, sure. > > > On Tue, May 7, 2013 at 11:37 AM, Ashutosh Bapat < > ash...@en...> wrote: > >> BTW, fix the bug in separate patch and fix expected outputs in separate >> patch. >> >> >> On Tue, May 7, 2013 at 11:54 AM, Ashutosh Bapat < >> ash...@en...> wrote: >> >>> Can you please fix the bug then? >>> >>> >>> On Tue, May 7, 2013 at 10:25 AM, Abbas Butt <abb...@en... >>> > wrote: >>> >>>> >>>> >>>> On Tue, Apr 30, 2013 at 4:57 PM, Ashutosh Bapat < >>>> ash...@en...> wrote: >>>> >>>>> Hi Abbas, >>>>> I see that the EXPLAIN commands are changed to include the XC specific >>>>> options. Since the original test is using capital letters everywhere, it's >>>>> better to maintain that style. >>>>> >>>> >>>> Done. >>>> >>>> >>>>> >>>>> Please make sure that the changes you have done (explain output) >>>>> reflect in all the alt. expected output files. >>>>> >>>> >>>> Done. >>>> >>>> >>>>> Can you please see if we can eliminate the alternate expected output >>>>> files as well? What are the reasons we have to maintain those? >>>>> >>>> >>>> select_views.out and select_view_1.out are maintained by vanilla PG. We >>>> have added select_views_2.out and It can be removed, however I noticed that >>>> the test case that was added (Leaky View Scenario) is failing and needs a >>>> fix. >>>> >>>> >>>>> >>>>> >>>>> On Wed, Apr 24, 2013 at 10:59 PM, Abbas Butt < >>>>> abb...@en...> wrote: >>>>> >>>>>> Hi, >>>>>> The test was failing because some more tests are added in sql file. >>>>>> >>>>>> -- >>>>>> *Abbas* >>>>>> Architect >>>>>> >>>>>> Ph: 92.334.5100153 >>>>>> Skype ID: gabbasb >>>>>> www.enterprisedb.co <http://www.enterprisedb.com/>m<http://www.enterprisedb.com/> >>>>>> * >>>>>> Follow us on Twitter* >>>>>> @EnterpriseDB >>>>>> >>>>>> Visit EnterpriseDB for tutorials, webinars, whitepapers<http://www.enterprisedb.com/resources-community>and more<http://www.enterprisedb.com/resources-community> >>>>>> >>>>>> >>>>>> ------------------------------------------------------------------------------ >>>>>> Try New Relic Now & We'll Send You this Cool Shirt >>>>>> New Relic is the only SaaS-based application performance monitoring >>>>>> service >>>>>> that delivers powerful full stack analytics. Optimize and monitor your >>>>>> browser, app, & servers with just a few lines of code. Try New Relic >>>>>> and get this awesome Nerd Life shirt! >>>>>> http://p.sf.net/sfu/newrelic_d2d_apr >>>>>> _______________________________________________ >>>>>> Postgres-xc-developers mailing list >>>>>> Pos...@li... >>>>>> https://lists.sourceforge.net/lists/listinfo/postgres-xc-developers >>>>>> >>>>>> >>>>> >>>>> >>>>> -- >>>>> Best Wishes, >>>>> Ashutosh Bapat >>>>> EntepriseDB Corporation >>>>> The Postgres Database Company >>>>> >>>> >>>> >>>> >>>> -- >>>> -- >>>> *Abbas* >>>> Architect >>>> >>>> Ph: 92.334.5100153 >>>> Skype ID: gabbasb >>>> www.enterprisedb.co <http://www.enterprisedb.com/>m<http://www.enterprisedb.com/> >>>> * >>>> Follow us on Twitter* >>>> @EnterpriseDB >>>> >>>> Visit EnterpriseDB for tutorials, webinars, whitepapers<http://www.enterprisedb.com/resources-community>and more<http://www.enterprisedb.com/resources-community> >>>> >>> >>> >>> >>> -- >>> Best Wishes, >>> Ashutosh Bapat >>> EntepriseDB Corporation >>> The Postgres Database Company >>> >> >> >> >> -- >> Best Wishes, >> Ashutosh Bapat >> EntepriseDB Corporation >> The Postgres Database Company >> > > > > -- > -- > *Abbas* > Architect > > Ph: 92.334.5100153 > Skype ID: gabbasb > www.enterprisedb.co <http://www.enterprisedb.com/>m<http://www.enterprisedb.com/> > * > Follow us on Twitter* > @EnterpriseDB > > Visit EnterpriseDB for tutorials, webinars, whitepapers<http://www.enterprisedb.com/resources-community>and more<http://www.enterprisedb.com/resources-community> > -- -- *Abbas* Architect Ph: 92.334.5100153 Skype ID: gabbasb www.enterprisedb.co <http://www.enterprisedb.com/>m<http://www.enterprisedb.com/> * Follow us on Twitter* @EnterpriseDB Visit EnterpriseDB for tutorials, webinars, whitepapers<http://www.enterprisedb.com/resources-community>and more<http://www.enterprisedb.com/resources-community> |
From: Koichi S. <koi...@gm...> - 2013-05-09 12:44:20
|
Thanks Nikhil; I reviewed and tested the patch. It looks nice. Old code used the return value both as the status and sequence value, which brought considerable confusion in the code. The patch solves this problem by distinguishing return status and the value. If there's no further imput, I'd like to commit it. Then I will review Andrei's patch to improve gtm. Regards; ---------- Koichi Suzuki 2013/4/30 Nikhil Sontakke <ni...@st...> > PFA, patch which allows sequences with negative values. > > I have also added test cases in xc_sequence.sql. > > Regards, > Nikhils > > > > On Mon, Apr 22, 2013 at 1:49 PM, Nikhil Sontakke <ni...@st...>wrote: > >> The currval() logic also has a similar issue. >> >> Regards, >> Nikhils >> >> >> On Mon, Apr 22, 2013 at 6:18 AM, 鈴木 幸市 <ko...@in...> wrote: >> >>> I'm afraid the cause is not only by gym. If min_value is not specified >>> (or specified as "invalid" value), gtm assigns -0x7ffffffffffffffeLL as the >>> minimum value of the sequence (see gtm_seq.[ch]). So I suspect that >>> minimum value will be specified by DDL in the coordinator. >>> >>> You fix is very welcome. >>> >>> GTM in the current master has a backup feature which dumps next restore >>> point of gxid and each sequence to gtm.control. I hope this helps tests >>> to some extent. >>> >>> Regards; >>> --- >>> Koichi Suzuki >>> >>> >>> >>> On 2013/04/22, at 8:32, Michael Paquier <mic...@gm...> >>> wrote: >>> >>> >>> >>> >>> On Mon, Apr 22, 2013 at 3:57 AM, Nikhil Sontakke <ni...@st...>wrote: >>> >>>> Hi all, >>>> >>>> Consider the following: >>>> >>>> create sequence seqname increment by -2; >>>> select nextval('seqname'); >>>> ERROR: GTM error, could not obtain sequence value >>>> >>>> The above should have returned -1. >>>> >>>> ISTM, the sequence fetching logic on the backend side has been coded >>>> entirely with the assumption that sequences can never have negative values. >>>> So a less than 0 value returned from get_next() is assumed to be a problem! >>>> That's completely wrong. We need to deal with this properly. I will submit >>>> a patch for this when I get some time soon. >>>> >>> Adding a regression test in xc_sequence.sql would also be good to cover >>> this case as this is caused by xc-only code. >>> -- >>> Michael >>> ------------------------------------------------------------------------------ >>> Precog is a next-generation analytics platform capable of advanced >>> analytics on semi-structured data. The platform includes APIs for >>> building >>> apps and a phenomenal toolset for data science. Developers can use >>> our toolset for easy data analysis & visualization. Get a free account! >>> >>> http://www2.precog.com/precogplatform/slashdotnewsletter_______________________________________________ >>> Postgres-xc-developers mailing list >>> Pos...@li... >>> https://lists.sourceforge.net/lists/listinfo/postgres-xc-developers >>> >>> >>> >> >> >> -- >> StormDB - http://www.stormdb.com >> The Database Cloud >> > > > > -- > StormDB - http://www.stormdb.com > The Database Cloud > > > ------------------------------------------------------------------------------ > Introducing AppDynamics Lite, a free troubleshooting tool for Java/.NET > Get 100% visibility into your production application - at no cost. > Code-level diagnostics for performance bottlenecks with <2% overhead > Download for free and get started troubleshooting in minutes. > http://p.sf.net/sfu/appdyn_d2d_ap1 > _______________________________________________ > Postgres-xc-developers mailing list > Pos...@li... > https://lists.sourceforge.net/lists/listinfo/postgres-xc-developers > > |
From: Ashutosh B. <ash...@en...> - 2013-05-09 12:31:05
|
This looks good, except a cosmetic change. The condition here is a && (b || c) && d. When spread across multiple lines, it should be properly indented like a && (b || c) && d so that AND/OR hierarchy is easily readable. On Thu, May 9, 2013 at 4:35 PM, Abbas Butt <abb...@en...>wrote: > PFA the updated patch. > > > On Tue, May 7, 2013 at 2:57 PM, Ashutosh Bapat < > ash...@en...> wrote: > >> Hi Abbas, >> The right fix is at line 402. Because of the condition there, we do not >> call GetPreferredReplicationNode() if there is FOR SHARE/FOR UPDATE clause >> there. I think we need to modify the condition. >> >> 392 if (exec_nodes && exec_nodes->nodeList) >> 393 { >> 394 /* >> 395 * If this is the highest level query in the query tree and >> 396 * relations involved in the query are such that ultimate >> JOIN is >> 397 * replicated JOIN, choose only one of them. >> 398 * If we do this for lower level queries in query tree, we >> might loose >> 399 * chance because common nodes are left out. >> 400 */ >> 401 if (IsExecNodesReplicated(exec_nodes) && >> 402 exec_nodes->accesstype == RELATION_ACCESS_READ && >> 403 sc_context->sc_query_level == 0) >> 404 >> 405 { >> 406 List *tmp_list = exec_nodes->nodeList; >> 407 exec_nodes->nodeList = >> GetPreferredReplicationNode(exec_nodes->nodeList); >> 408 list_free(tmp_list); >> 409 } >> 410 return exec_nodes; >> 411 } >> >> Regarding other places where you have used the wrapper around >> GetPreferredReplicationNode(); we don't need those code changes. We set >> en_expr only for distributed relations and en_relid is set and used >> properly only for DMLs when this problem would not happen. May be we should >> add assertions at these places to make sure that we don't come there for >> replicated tables and FOR SHARE/UDPATE SELECTs. >> >> >> >> On Tue, May 7, 2013 at 10:21 AM, Abbas Butt <abb...@en...>wrote: >> >>> I changed to code by creating another function and calling it right >>> after GetRelationNodes where needed. Updated patch attached. >>> >>> >>> On Tue, Apr 30, 2013 at 3:41 PM, Ashutosh Bapat < >>> ash...@en...> wrote: >>> >>>> Hi Abbas, >>>> Instead of fixing this in GetRelationNodes, we should fix it outside, >>>> by calling GetPrefferedNode on the result returned by GetRelationNodes for >>>> replicated tables. Please send a revised patch with this change. May be you >>>> want to examine all callers of GetRelationNodes. >>>> >>>> >>>> On Wed, Apr 24, 2013 at 10:58 PM, Abbas Butt < >>>> abb...@en...> wrote: >>>> >>>>> Hi, >>>>> The test case fails if there is no primary node in the cluster. The >>>>> following test case was producing error. >>>>> >>>>> CREATE TABLE tt_22 (a int, b int) distribute by replication; >>>>> INSERT INTO tt_22 VALUES (10); >>>>> >>>>> In a four datanode cluster the following query plan was being produced. >>>>> >>>>> explain verbose SELECT * FROM tt_22 FOR UPDATE; >>>>> QUERY >>>>> PLAN >>>>> >>>>> ---------------------------------------------------------------------------- >>>>> Data Node Scan on "__REMOTE_FQS_QUERY__" (cost=0.00..0.00 rows=0 >>>>> width=0) >>>>> Output: tt_22.a, tt_22.b >>>>> Node/s: data_node_1, data_node_2, data_node_3, data_node_4 >>>>> Remote query: SELECT a, b FROM tt_22 FOR UPDATE OF tt_22 >>>>> (4 rows) >>>>> >>>>> The reason was a missing else case in GetRelationNodes. >>>>> >>>>> >>>>> -- >>>>> *Abbas* >>>>> Architect >>>>> >>>>> Ph: 92.334.5100153 >>>>> Skype ID: gabbasb >>>>> www.enterprisedb.co <http://www.enterprisedb.com/>m<http://www.enterprisedb.com/> >>>>> * >>>>> Follow us on Twitter* >>>>> @EnterpriseDB >>>>> >>>>> Visit EnterpriseDB for tutorials, webinars, whitepapers<http://www.enterprisedb.com/resources-community>and more<http://www.enterprisedb.com/resources-community> >>>>> >>>>> >>>>> ------------------------------------------------------------------------------ >>>>> Try New Relic Now & We'll Send You this Cool Shirt >>>>> New Relic is the only SaaS-based application performance monitoring >>>>> service >>>>> that delivers powerful full stack analytics. Optimize and monitor your >>>>> browser, app, & servers with just a few lines of code. Try New Relic >>>>> and get this awesome Nerd Life shirt! >>>>> http://p.sf.net/sfu/newrelic_d2d_apr >>>>> _______________________________________________ >>>>> Postgres-xc-developers mailing list >>>>> Pos...@li... >>>>> https://lists.sourceforge.net/lists/listinfo/postgres-xc-developers >>>>> >>>>> >>>> >>>> >>>> -- >>>> Best Wishes, >>>> Ashutosh Bapat >>>> EntepriseDB Corporation >>>> The Postgres Database Company >>>> >>> >>> >>> >>> -- >>> -- >>> *Abbas* >>> Architect >>> >>> Ph: 92.334.5100153 >>> Skype ID: gabbasb >>> www.enterprisedb.co <http://www.enterprisedb.com/>m<http://www.enterprisedb.com/> >>> * >>> Follow us on Twitter* >>> @EnterpriseDB >>> >>> Visit EnterpriseDB for tutorials, webinars, whitepapers<http://www.enterprisedb.com/resources-community>and more<http://www.enterprisedb.com/resources-community> >>> >> >> >> >> -- >> Best Wishes, >> Ashutosh Bapat >> EntepriseDB Corporation >> The Postgres Database Company >> > > > > -- > -- > *Abbas* > Architect > > Ph: 92.334.5100153 > Skype ID: gabbasb > www.enterprisedb.co <http://www.enterprisedb.com/>m<http://www.enterprisedb.com/> > * > Follow us on Twitter* > @EnterpriseDB > > Visit EnterpriseDB for tutorials, webinars, whitepapers<http://www.enterprisedb.com/resources-community>and more<http://www.enterprisedb.com/resources-community> > -- Best Wishes, Ashutosh Bapat EntepriseDB Corporation The Postgres Database Company |
From: 鈴木 幸市 <ko...@in...> - 2013-05-09 11:50:39
|
Andrei; It's wonderful to have these fixes, especially sequence issues, which is already in the bug track. Error messages need some more thought, I think. Node registration will be useful in the future. Disabling this could be a quick fix but I think we should keep this code. Thank you very much; --- Koichi Suzuki On 2013/05/09, at 17:15, Andrei Martsinchyk <and...@gm...> wrote: > Hi, > > We have found few bugs related to GTM standby. > 1. Missing break; after handling MSG_BKUP_TXN_BEGIN_GETGXID on standby was causing error > "insufficient data left in message". Patch is attached. > 2. GTM master does not forward information about sequence created to standby. Patch is attached, too. > 3. When restarting cluster with standby, GTM master logs errors "Expecting a startup message, but received �". The problem disappears if I remove file register.node from the GTM master data directory. Before I start looking into details, why GTM needs to save information about running nodes? Cluster may be shut down for reconfiguration and information in register.node may be out of date. At the same time when nodes connect to GTM they deliver actual information. > So, maybe proper fix for the problem is just to remove code to save/restore register.node? > > -- > Andrei Martsinchyk > > StormDB - http://www.stormdb.com > The Database Cloud > > <missing_break.patch><create_sequence.patch>------------------------------------------------------------------------------ > Learn Graph Databases - Download FREE O'Reilly Book > "Graph Databases" is the definitive new guide to graph databases and > their applications. This 200-page book is written by three acclaimed > leaders in the field. The early access version is available now. > Download your free book today! http://p.sf.net/sfu/neotech_d2d_may_______________________________________________ > Postgres-xc-developers mailing list > Pos...@li... > https://lists.sourceforge.net/lists/listinfo/postgres-xc-developers |
From: Abbas B. <abb...@en...> - 2013-05-09 11:05:59
|
PFA the updated patch. On Tue, May 7, 2013 at 2:57 PM, Ashutosh Bapat < ash...@en...> wrote: > Hi Abbas, > The right fix is at line 402. Because of the condition there, we do not > call GetPreferredReplicationNode() if there is FOR SHARE/FOR UPDATE clause > there. I think we need to modify the condition. > > 392 if (exec_nodes && exec_nodes->nodeList) > 393 { > 394 /* > 395 * If this is the highest level query in the query tree and > 396 * relations involved in the query are such that ultimate > JOIN is > 397 * replicated JOIN, choose only one of them. > 398 * If we do this for lower level queries in query tree, we > might loose > 399 * chance because common nodes are left out. > 400 */ > 401 if (IsExecNodesReplicated(exec_nodes) && > 402 exec_nodes->accesstype == RELATION_ACCESS_READ && > 403 sc_context->sc_query_level == 0) > 404 > 405 { > 406 List *tmp_list = exec_nodes->nodeList; > 407 exec_nodes->nodeList = > GetPreferredReplicationNode(exec_nodes->nodeList); > 408 list_free(tmp_list); > 409 } > 410 return exec_nodes; > 411 } > > Regarding other places where you have used the wrapper around > GetPreferredReplicationNode(); we don't need those code changes. We set > en_expr only for distributed relations and en_relid is set and used > properly only for DMLs when this problem would not happen. May be we should > add assertions at these places to make sure that we don't come there for > replicated tables and FOR SHARE/UDPATE SELECTs. > > > > On Tue, May 7, 2013 at 10:21 AM, Abbas Butt <abb...@en...>wrote: > >> I changed to code by creating another function and calling it right after >> GetRelationNodes where needed. Updated patch attached. >> >> >> On Tue, Apr 30, 2013 at 3:41 PM, Ashutosh Bapat < >> ash...@en...> wrote: >> >>> Hi Abbas, >>> Instead of fixing this in GetRelationNodes, we should fix it outside, by >>> calling GetPrefferedNode on the result returned by GetRelationNodes for >>> replicated tables. Please send a revised patch with this change. May be you >>> want to examine all callers of GetRelationNodes. >>> >>> >>> On Wed, Apr 24, 2013 at 10:58 PM, Abbas Butt < >>> abb...@en...> wrote: >>> >>>> Hi, >>>> The test case fails if there is no primary node in the cluster. The >>>> following test case was producing error. >>>> >>>> CREATE TABLE tt_22 (a int, b int) distribute by replication; >>>> INSERT INTO tt_22 VALUES (10); >>>> >>>> In a four datanode cluster the following query plan was being produced. >>>> >>>> explain verbose SELECT * FROM tt_22 FOR UPDATE; >>>> QUERY >>>> PLAN >>>> >>>> ---------------------------------------------------------------------------- >>>> Data Node Scan on "__REMOTE_FQS_QUERY__" (cost=0.00..0.00 rows=0 >>>> width=0) >>>> Output: tt_22.a, tt_22.b >>>> Node/s: data_node_1, data_node_2, data_node_3, data_node_4 >>>> Remote query: SELECT a, b FROM tt_22 FOR UPDATE OF tt_22 >>>> (4 rows) >>>> >>>> The reason was a missing else case in GetRelationNodes. >>>> >>>> >>>> -- >>>> *Abbas* >>>> Architect >>>> >>>> Ph: 92.334.5100153 >>>> Skype ID: gabbasb >>>> www.enterprisedb.co <http://www.enterprisedb.com/>m<http://www.enterprisedb.com/> >>>> * >>>> Follow us on Twitter* >>>> @EnterpriseDB >>>> >>>> Visit EnterpriseDB for tutorials, webinars, whitepapers<http://www.enterprisedb.com/resources-community>and more<http://www.enterprisedb.com/resources-community> >>>> >>>> >>>> ------------------------------------------------------------------------------ >>>> Try New Relic Now & We'll Send You this Cool Shirt >>>> New Relic is the only SaaS-based application performance monitoring >>>> service >>>> that delivers powerful full stack analytics. Optimize and monitor your >>>> browser, app, & servers with just a few lines of code. Try New Relic >>>> and get this awesome Nerd Life shirt! >>>> http://p.sf.net/sfu/newrelic_d2d_apr >>>> _______________________________________________ >>>> Postgres-xc-developers mailing list >>>> Pos...@li... >>>> https://lists.sourceforge.net/lists/listinfo/postgres-xc-developers >>>> >>>> >>> >>> >>> -- >>> Best Wishes, >>> Ashutosh Bapat >>> EntepriseDB Corporation >>> The Postgres Database Company >>> >> >> >> >> -- >> -- >> *Abbas* >> Architect >> >> Ph: 92.334.5100153 >> Skype ID: gabbasb >> www.enterprisedb.co <http://www.enterprisedb.com/>m<http://www.enterprisedb.com/> >> * >> Follow us on Twitter* >> @EnterpriseDB >> >> Visit EnterpriseDB for tutorials, webinars, whitepapers<http://www.enterprisedb.com/resources-community>and more<http://www.enterprisedb.com/resources-community> >> > > > > -- > Best Wishes, > Ashutosh Bapat > EntepriseDB Corporation > The Postgres Database Company > -- -- *Abbas* Architect Ph: 92.334.5100153 Skype ID: gabbasb www.enterprisedb.co <http://www.enterprisedb.com/>m<http://www.enterprisedb.com/> * Follow us on Twitter* @EnterpriseDB Visit EnterpriseDB for tutorials, webinars, whitepapers<http://www.enterprisedb.com/resources-community>and more<http://www.enterprisedb.com/resources-community> |
From: 鈴木 幸市 <ko...@in...> - 2013-05-09 05:51:27
|
Sorry, I've not reviewed it yet. Yes, I will review the patch. Regards; --- Koichi Suzuki On 2013/05/08, at 18:36, Nikhil Sontakke <ni...@st...> wrote: > Hi Suzuki-san, > > I have submitted patch to handle negative sequences a while back. > > Yes, surely we can discuss stuff at pgcon as well. > > Regards, > Nikhils > > > On Wed, May 8, 2013 at 2:44 PM, Koichi Suzuki <koi...@gm...> wrote: > Thanks. I'd like to discuss refactoring sequence support in the next F2F MTG, or in Ottawa, if we have a time. > > ---------- > Koichi Suzuki > > > 2013/5/8 Ashutosh Bapat <ash...@en...> > Hi Nikhil, Suzuki-san, > > I have created feature request https://sourceforge.net/tracker/?func=detail&aid=3612885&group_id=311227&atid=1310235 for enabling and supporting TRUNCATE with RESTART IDENTITY. Right now I have assigned it to Suzuki-san. I didn't find any user id for Nikhil in sourceforge. If it's to be assigned to Nikhil, Nikhil, please provide your source forge id. > > I have assigned high priority to it (8), so that we will take it up in next release. > > ---------- Forwarded message ---------- > From: SourceForge.net <no...@so...> > Date: Wed, May 8, 2013 at 11:48 AM > Subject: [ postgres-xc-Feature Requests-3612885 ] Add support for TRUNCATE with RESTART IDENTITY > To: "SourceForge.net" <no...@so...> > > > Feature Requests item #3612885, was opened at 2013-05-07 23:18 > Message generated for change (Tracker Item Submitted) made by ashutoshbapat > You can respond by visiting: > https://sourceforge.net/tracker/?func=detail&atid=1310235&aid=3612885&group_id=311227 > > Please note that this message will contain a full copy of the comment thread, > including the initial issue submission, for this request, > not just the latest update. > Category: GTM > Group: Development Queue > Status: Open > Priority: 8 > Private: No > Submitted By: Ashutosh Bapat (ashutoshbapat) > Assigned to: Koichi Suzuki (koichi-szk) > Summary: Add support for TRUNCATE with RESTART IDENTITY > > Initial Comment: > Currently TRUNCATE statement with RESTART IDENTITY clause doesn't work, since there is no way to restart a sequence at the GTM. This feature requests to add the support for TRUNCATE with RESTART IDENTITY. > > The feature has been disabled by commit commit d337476e7c0a49f2b8d05a8c5a1c9be65683bb41 > Author: Ashutosh Bapat <ash...@en...> > Date: Wed May 8 11:41:45 2013 +0530 > > TRUNCATE statement with RESTART IDENTITY clause is not supported in this > release. Error out when TRUNCATE with RESTART IDENTITY is specified. Alternate > expected output is updated with error message and consequences of the same. > Original patch by Nikhil Sontakke. > > > ---------------------------------------------------------------------- > > You can respond by visiting: > https://sourceforge.net/tracker/?func=detail&atid=1310235&aid=3612885&group_id=311227 > > > > -- > Best Wishes, > Ashutosh Bapat > EntepriseDB Corporation > The Postgres Database Company > > ------------------------------------------------------------------------------ > Learn Graph Databases - Download FREE O'Reilly Book > "Graph Databases" is the definitive new guide to graph databases and > their applications. This 200-page book is written by three acclaimed > leaders in the field. The early access version is available now. > Download your free book today! http://p.sf.net/sfu/neotech_d2d_may > _______________________________________________ > Postgres-xc-developers mailing list > Pos...@li... > https://lists.sourceforge.net/lists/listinfo/postgres-xc-developers > > > > ------------------------------------------------------------------------------ > Learn Graph Databases - Download FREE O'Reilly Book > "Graph Databases" is the definitive new guide to graph databases and > their applications. This 200-page book is written by three acclaimed > leaders in the field. The early access version is available now. > Download your free book today! http://p.sf.net/sfu/neotech_d2d_may > _______________________________________________ > Postgres-xc-developers mailing list > Pos...@li... > https://lists.sourceforge.net/lists/listinfo/postgres-xc-developers > > > > > -- > StormDB - http://www.stormdb.com > The Database Cloud > ------------------------------------------------------------------------------ > Learn Graph Databases - Download FREE O'Reilly Book > "Graph Databases" is the definitive new guide to graph databases and > their applications. This 200-page book is written by three acclaimed > leaders in the field. The early access version is available now. > Download your free book today! http://p.sf.net/sfu/neotech_d2d_may_______________________________________________ > Postgres-xc-developers mailing list > Pos...@li... > https://lists.sourceforge.net/lists/listinfo/postgres-xc-developers |