Josh Harrison joshques at gmail.com
Thu Dec 4 08:57:22 PST 2008
Thanks Chris

On Wed, Dec 3, 2008 at 4:21 PM, Christopher Browne <cbbrowne at ca.afilias.info
> wrote:

>  "Josh Harrison" <joshques at gmail.com> writes:
> > Can 1 database be a slave for 2 different masters?
> > ie., For example I have 2 databases - 1 holding "Instittion-A" data and
> another database for "Institution-B" data.
> > These 2 database have some common tables with the same table structure.
> > Is it possible to have a Slony replication from "Institution A"  databa=
se
> to "SLAVE-x"
> > and a slony replication from "Institution-B" database to "SLAVE-x".
> > These 2 "Institution" databases wont be accessing the same data...they
> have their own data but can Slony replicate them in the same slave?
>
> No, that'll be a problem.
>
> Slony-I wants to truncate the table at the time of subscription, which
> would cause a certain amount of inconvenience - you're certain to lose
> one institution's set of data when you subscribe the second one.
>
> What you could do instead, that *would* work, would be one of two
> things:
>
>  a) Create two separate tables, and combine their data together, when
>     querying, by use of a VIEW.
>
>  b) Create a parent table, and have the two tables as "children" via
>     the INHERITS functionality, and get a common view, when you need
>     it, via selecting from the parent table.
>
>     http://www.postgresql.org/docs/8.3/static/ddl-partitioning.html
> --
> select 'cbbrowne' || '@' || 'linuxfinances.info';
> http://linuxfinances.info/info/spreadsheets.html
> "you  can   obvioulsy understand what  i'm  saying.  you're just being
> pendantic." -- bazzz777 at yahoo.com
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.slony.info/pipermail/slony1-general/attachments/20081204/=
591239de/attachment.htm


More information about the Slony1-general mailing list