From: Koichi S. <koi...@gm...> - 2013-02-19 10:47:28
|
Postgres-XC accepts CREATE DATABASE statement, same as PostgreSQL. So, CREATE DATABASE DB1; creates DB1 database which spans over all the nodes. You can similarly create DB2. Then you can connect to either DB1 and DB2 and create table1, table2 and table3 for both databases. You can setup privilege of Customer1 only to DB1 and Customer2 only to DB2 respectively. Schema of these databases are stored in all the nodes. This is very similar to PostgreSQL's database and user administration. At present, you can specify which nodes each table should be distributed/replicated manually at CREATE TABLE or ALTER TABLE. This will help to control what server specific customer's data are stored. I hope this picture meets your needs. ---------- Koichi Suzuki 2013/2/18 kushal <kus...@gm...>: > But I guess the impact would be restricted to the schema of one particular > database instance, which in this would only be DB1. The schema for DB2 would > remain intact. Right? > > On 18 February 2013 14:36, Ashutosh Bapat <ash...@en...> > wrote: >> >> >> >> On Mon, Feb 18, 2013 at 2:32 PM, kushal <kus...@gm...> wrote: >>> >>> I think your responses answer my question. So here is how my database >>> structure looks like without XC. >>> >>> There should be one database with table1, table2 and table3 for each >>> customer under one postgres server. >>> >>> So If I am not wrong then with XC for coordinators A and B and datanodes >>> C and D, each would contain database instances DB1, DB2 and so on with same >>> schema (which in this case is table1, table2 and table3) and distribution or >>> replication would depend on how I do it while creating tables (table1, >>> table2, table3) for each of the individual database instances. >> >> >> Upto this it looks fine. >> >>> >>> And even if the schema changes for DB1 in future, it won't have impact on >>> DB2 queries or storage. >>> >> >> Any DDL you perform on XC, has to routed through the coordinator and hence >> it affects all the datanodes. >> >>> >>> --Kushal >>> >>> >>> On 18 February 2013 13:41, Ashutosh Bapat >>> <ash...@en...> wrote: >>>> >>>> Hi Kushal, >>>> Thanks for your interest in Postgres-XC. >>>> >>>> In Postgres-XC, every database/schema is created on all datanodes and >>>> coordinators. So, one can not created datanode specific databases. The only >>>> objects that are distributed are the tables. You can distribute your data >>>> across datanodes. >>>> >>>> But you are using term database instances, which is confusing. Do you >>>> mean database system instances? >>>> >>>> May be an example would help to understand your system's architecture. >>>> >>>> On Mon, Feb 18, 2013 at 12:56 PM, kushal <kus...@gm...> wrote: >>>>> >>>>> Hi >>>>> >>>>> This is my first post on the postgres xc mailing list. Let me first >>>>> just congratulate the whole team for coming up with such a cool framework. >>>>> >>>>> I have few questions around the requirements we have to support our >>>>> product. Now it is required to keep multiple database instances, lets say >>>>> one for each customer, accessible from one app. Without postgres-xc, I can >>>>> do that by just creating a connecting to specific database instance for a >>>>> particular customer from my app. >>>>> >>>>> Can the same be done with postgres-xc interface? So basically, I should >>>>> be able to create different database instances across datanodes accessible >>>>> through any coordinator. >>>>> If yes, how does the distribution/replication work? Is it going to be >>>>> somewhat different? >>>>> >>>>> >>>>> Thanks & Regards, >>>>> Kushal >>>>> >>>>> >>>>> ------------------------------------------------------------------------------ >>>>> The Go Parallel Website, sponsored by Intel - in partnership with >>>>> Geeknet, >>>>> is your hub for all things parallel software development, from weekly >>>>> thought >>>>> leadership blogs to news, videos, case studies, tutorials, tech docs, >>>>> whitepapers, evaluation guides, and opinion stories. Check out the most >>>>> recent posts - join the conversation now. >>>>> http://goparallel.sourceforge.net/ >>>>> _______________________________________________ >>>>> Postgres-xc-general mailing list >>>>> Pos...@li... >>>>> https://lists.sourceforge.net/lists/listinfo/postgres-xc-general >>>>> >>>> >>>> >>>> >>>> -- >>>> Best Wishes, >>>> Ashutosh Bapat >>>> EntepriseDB Corporation >>>> The Enterprise Postgres Company >>> >>> >>> >>> >>> ------------------------------------------------------------------------------ >>> The Go Parallel Website, sponsored by Intel - in partnership with >>> Geeknet, >>> is your hub for all things parallel software development, from weekly >>> thought >>> leadership blogs to news, videos, case studies, tutorials, tech docs, >>> whitepapers, evaluation guides, and opinion stories. Check out the most >>> recent posts - join the conversation now. >>> http://goparallel.sourceforge.net/ >>> _______________________________________________ >>> Postgres-xc-general mailing list >>> Pos...@li... >>> https://lists.sourceforge.net/lists/listinfo/postgres-xc-general >>> >> >> >> >> -- >> Best Wishes, >> Ashutosh Bapat >> EntepriseDB Corporation >> The Enterprise Postgres Company > > > > ------------------------------------------------------------------------------ > The Go Parallel Website, sponsored by Intel - in partnership with Geeknet, > is your hub for all things parallel software development, from weekly > thought > leadership blogs to news, videos, case studies, tutorials, tech docs, > whitepapers, evaluation guides, and opinion stories. Check out the most > recent posts - join the conversation now. http://goparallel.sourceforge.net/ > _______________________________________________ > Postgres-xc-general mailing list > Pos...@li... > https://lists.sourceforge.net/lists/listinfo/postgres-xc-general > |