|
From: Thomas P. <vip...@gm...> - 2014-02-10 21:13:02
|
Good afternoon all, I was curious if there was anything special, possibly simple, that one would need to do in order to get Django to work with postgres-xc? I have successfully used Django with Postgresql, and other databases, but the nature of postgres-xc points to a fairly different approach when 'syncdb' is used. Specifically I received this error when utilizing Django's 'syncdb' "django.db.utils.NotSupportedError: Cannot create index whose evaluation cannot be enforced to remote nodes" Obviously Django is, erroneously, trying to write to the Coordinator as though it were a database that should be written to. Has anyone had any experience with communicating with postgres-xc from Django? I suspect there isn't much that needs to be done, but I cannot find much information on the topic. Warm regards, Thomas |
|
From: Mason S. <ms...@tr...> - 2014-02-10 22:25:30
|
On Mon, Feb 10, 2014 at 4:12 PM, Thomas Perry <vip...@gm...> wrote: > Good afternoon all, > > I was curious if there was anything special, possibly simple, that one > would need to do in order to get Django to work with postgres-xc? > > I have successfully used Django with Postgresql, and other databases, but > the nature of postgres-xc points to a fairly different approach when > 'syncdb' is used. > > Specifically I received this error when utilizing Django's 'syncdb' > > "django.db.utils.NotSupportedError: Cannot create index whose evaluation > cannot be enforced to remote nodes" > > Obviously Django is, erroneously, trying to write to the Coordinator as > though it were a database that should be written to. > > Has anyone had any experience with communicating with postgres-xc from > Django? I suspect there isn't much that needs to be done, but I cannot find > much information on the topic. > Nikhil Sontakke blogged about this here: http://www.stormdb.com/content/getting-django-work-postgres-xcstormdb?destination=node%2F949 Regards, -- Mason Sharp TransLattice - http://www.translattice.com Distributed and Clustered Database Solutions |
|
From: Ashutosh B. <ash...@en...> - 2014-02-11 04:44:41
|
Hi Thomas, Mason has already provided you with a blog entry, that should be useful in setting up Django. I will explain the particular error you mentioned in your mail, On Tue, Feb 11, 2014 at 3:49 AM, Mason Sharp <ms...@tr...>wrote: > > > > On Mon, Feb 10, 2014 at 4:12 PM, Thomas Perry <vip...@gm...> wrote: > >> Good afternoon all, >> >> I was curious if there was anything special, possibly simple, that one >> would need to do in order to get Django to work with postgres-xc? >> >> I have successfully used Django with Postgresql, and other databases, but >> the nature of postgres-xc points to a fairly different approach when >> 'syncdb' is used. >> >> Specifically I received this error when utilizing Django's 'syncdb' >> >> "django.db.utils.NotSupportedError: Cannot create index whose evaluation >> cannot be enforced to remote nodes" >> >> This error comes when you are trying to create an index which can be enforced on a single datanode. An example is unique index on a distributed table whose distribution column is not in the unique key. For enforcing such a constraint, we have to check for data from multiple nodes, which is currently not supported in XC. So, I think, you will need to modify the table distributions accordingly. > Obviously Django is, erroneously, trying to write to the Coordinator as >> though it were a database that should be written to. >> >> Has anyone had any experience with communicating with postgres-xc from >> Django? I suspect there isn't much that needs to be done, but I cannot find >> much information on the topic. >> > > Nikhil Sontakke blogged about this here: > > > http://www.stormdb.com/content/getting-django-work-postgres-xcstormdb?destination=node%2F949 > > Regards, > > > -- > Mason Sharp > > TransLattice - http://www.translattice.com > Distributed and Clustered Database Solutions > > > > > ------------------------------------------------------------------------------ > Android apps run on BlackBerry 10 > Introducing the new BlackBerry 10.2.1 Runtime for Android apps. > Now with support for Jelly Bean, Bluetooth, Mapview and more. > Get your Android app in front of a whole new audience. Start now. > > http://pubads.g.doubleclick.net/gampad/clk?id=124407151&iu=/4140/ostg.clktrk > _______________________________________________ > Postgres-xc-general mailing list > Pos...@li... > https://lists.sourceforge.net/lists/listinfo/postgres-xc-general > > -- Best Wishes, Ashutosh Bapat EnterpriseDB Corporation The Postgres Database Company |
|
From: Thomas P. <vip...@gm...> - 2014-02-11 14:27:22
|
Thank you for both of your responses, I think I was replying improperly. I will take a look at the table distributions. Warm regards, On Mon, Feb 10, 2014 at 11:44 PM, Ashutosh Bapat < ash...@en...> wrote: > Hi Thomas, > > Mason has already provided you with a blog entry, that should be useful in > setting up Django. I will explain the particular error you mentioned in > your mail, > > On Tue, Feb 11, 2014 at 3:49 AM, Mason Sharp <ms...@tr...>wrote: > >> >> >> >> On Mon, Feb 10, 2014 at 4:12 PM, Thomas Perry <vip...@gm...> wrote: >> >>> Good afternoon all, >>> >>> I was curious if there was anything special, possibly simple, that one >>> would need to do in order to get Django to work with postgres-xc? >>> >>> I have successfully used Django with Postgresql, and other databases, >>> but the nature of postgres-xc points to a fairly different approach when >>> 'syncdb' is used. >>> >>> Specifically I received this error when utilizing Django's 'syncdb' >>> >>> "django.db.utils.NotSupportedError: Cannot create index whose evaluation >>> cannot be enforced to remote nodes" >>> >>> > This error comes when you are trying to create an index which can be > enforced on a single datanode. An example is unique index on a distributed > table whose distribution column is not in the unique key. For enforcing > such a constraint, we have to check for data from multiple nodes, which is > currently not supported in XC. So, I think, you will need to modify the > table distributions accordingly. > > >> Obviously Django is, erroneously, trying to write to the Coordinator as >>> though it were a database that should be written to. >>> >>> Has anyone had any experience with communicating with postgres-xc from >>> Django? I suspect there isn't much that needs to be done, but I cannot find >>> much information on the topic. >>> >> >> Nikhil Sontakke blogged about this here: >> >> >> http://www.stormdb.com/content/getting-django-work-postgres-xcstormdb?destination=node%2F949 >> >> Regards, >> >> >> -- >> Mason Sharp >> >> TransLattice - http://www.translattice.com >> Distributed and Clustered Database Solutions >> >> >> >> >> ------------------------------------------------------------------------------ >> Android apps run on BlackBerry 10 >> Introducing the new BlackBerry 10.2.1 Runtime for Android apps. >> Now with support for Jelly Bean, Bluetooth, Mapview and more. >> Get your Android app in front of a whole new audience. Start now. >> >> http://pubads.g.doubleclick.net/gampad/clk?id=124407151&iu=/4140/ostg.clktrk >> _______________________________________________ >> Postgres-xc-general mailing list >> Pos...@li... >> https://lists.sourceforge.net/lists/listinfo/postgres-xc-general >> >> > > > -- > Best Wishes, > Ashutosh Bapat > EnterpriseDB Corporation > The Postgres Database Company > |