pg.ddx.io pgsql-general@postgresql.org mailing list archive
help / color / mirror / Atom feedPostgreSQL Replication
91+ messages / 37 participants
[nested] [flat]
* PostgreSQL Replication
@ 2005-02-18 16:40 Dieter Schröder <dieterschroder@gmail.com>
2005-02-18 16:53 ` Re: PostgreSQL Replication Csaba Nagy <nagy@ecircle-ag.com>
2005-02-18 16:58 ` Re: PostgreSQL Replication Scott Marlowe <smarlowe@g2switchworks.com>
2005-02-18 17:11 ` Re: PostgreSQL Replication John Sidney-Woollett <johnsw@wardbrook.com>
0 siblings, 3 replies; 91+ messages in thread
From: Dieter Schröder @ 2005-02-18 16:40 UTC (permalink / raw)
To: pgsql-general
Hello all,
I am currently migrating a few oracle servers to postgre sql and
management wants us to have replication. We have found information
about the slony replicator with blog posts and articles. We have not
found any other replication systems reviewed, so it slony the best
tool for the job?
I am looking for some articles to share with our management before we
make a choice.
Sincerely,
D. Schröder
^ permalink raw reply [nested|flat] 91+ messages in thread
* Re: PostgreSQL Replication
2005-02-18 16:40 PostgreSQL Replication Dieter Schröder <dieterschroder@gmail.com>
@ 2005-02-18 16:53 ` Csaba Nagy <nagy@ecircle-ag.com>
2 siblings, 0 replies; 91+ messages in thread
From: Csaba Nagy @ 2005-02-18 16:53 UTC (permalink / raw)
To: Dieter Schröder <dieterschroder@gmail.com>; +Cc: pgsql-general
Dieter,
Slony is the most active replication project and it looks like it is the
most used lately, but if it is the best for you depends on what you
need, as there's no "one size fits all" replication solution.
If you want master-slave asynchronous replication with only one master
and few possibly cascaded slaves, with the capability of take-over in
case of a failure, then slony is a good choice.
But if you want a multi-master or synchronous replication, slony is not
providing that. So it all depends on your needs.
In short: slony is good for keeping a hot backup, it can greatly help on
server upgrade (it can replicate between different versions of
postgres), but it will not keep the slaves completely in sync with the
master, there will always be a time gap between the data, and it will
not help distributing update load. Distributing select load is possible
if you're ok with the possible time gap of the slaves against the
current data. The slaves will be consistent though in terms of
transactionality.
HTH,
Csaba.
On Fri, 2005-02-18 at 17:40, Dieter Schröder wrote:
> Hello all,
>
> I am currently migrating a few oracle servers to postgre sql and
> management wants us to have replication. We have found information
> about the slony replicator with blog posts and articles. We have not
> found any other replication systems reviewed, so it slony the best
> tool for the job?
>
> I am looking for some articles to share with our management before we
> make a choice.
>
> Sincerely,
>
> D. Schröder
>
> ---------------------------(end of broadcast)---------------------------
> TIP 1: subscribe and unsubscribe commands go to majordomo@postgresql.org
^ permalink raw reply [nested|flat] 91+ messages in thread
* Re: PostgreSQL Replication
2005-02-18 16:40 PostgreSQL Replication Dieter Schröder <dieterschroder@gmail.com>
@ 2005-02-18 16:58 ` Scott Marlowe <smarlowe@g2switchworks.com>
2005-02-18 17:17 ` Re: PostgreSQL Replication Dieter Schröder <dieterschroder@gmail.com>
2 siblings, 1 reply; 91+ messages in thread
From: Scott Marlowe @ 2005-02-18 16:58 UTC (permalink / raw)
To: Dieter Schröder <dieterschroder@gmail.com>; +Cc: pgsql-general
On Fri, 2005-02-18 at 10:40, Dieter Schröder wrote:
> Hello all,
>
> I am currently migrating a few oracle servers to postgre sql and
> management wants us to have replication. We have found information
> about the slony replicator with blog posts and articles. We have not
> found any other replication systems reviewed, so it slony the best
> tool for the job?
>
> I am looking for some articles to share with our management before we
> make a choice.
The currently actively maintained projects related to replication that I
am aware of (in no particular order) are:
pgpool http://pgfoundry.org/projects/pgpool/
slony http://gborg.postgresql.org/project/slony1/projdisplay.php
pgcluster http://pgfoundry.org/projects/pgcluster/
mammoth replicator
http://www.commandprompt.com/products/mammothreplicator/
^ permalink raw reply [nested|flat] 91+ messages in thread
* Re: PostgreSQL Replication
2005-02-18 16:40 PostgreSQL Replication Dieter Schröder <dieterschroder@gmail.com>
2005-02-18 16:58 ` Re: PostgreSQL Replication Scott Marlowe <smarlowe@g2switchworks.com>
@ 2005-02-18 17:17 ` Dieter Schröder <dieterschroder@gmail.com>
2005-02-18 17:23 ` Re: PostgreSQL Replication Scott Marlowe <smarlowe@g2switchworks.com>
0 siblings, 1 reply; 91+ messages in thread
From: Dieter Schröder @ 2005-02-18 17:17 UTC (permalink / raw)
To: Scott Marlowe <smarlowe@g2switchworks.com>; +Cc: pgsql-general
On Fri, 18 Feb 2005 10:58:08 -0600, Scott Marlowe
<smarlowe@g2switchworks.com> wrote:
> On Fri, 2005-02-18 at 10:40, Dieter Schröder wrote:
> > Hello all,
> >
> > I am currently migrating a few oracle servers to postgre sql and
> > management wants us to have replication. We have found information
> > about the slony replicator with blog posts and articles. We have not
> > found any other replication systems reviewed, so it slony the best
> > tool for the job?
> >
> > I am looking for some articles to share with our management before we
> > make a choice.
>
> The currently actively maintained projects related to replication that I
> am aware of (in no particular order) are:
>
> pgpool http://pgfoundry.org/projects/pgpool/
> slony http://gborg.postgresql.org/project/slony1/projdisplay.php
> pgcluster http://pgfoundry.org/projects/pgcluster/
> mammoth replicator
> http://www.commandprompt.com/products/mammothreplicator/
>
>
Thank you very much for the links. I will google these all and see if
I can find reviews/articles of them all. Are they all open source?
D. Schröder
^ permalink raw reply [nested|flat] 91+ messages in thread
* Re: PostgreSQL Replication
2005-02-18 16:40 PostgreSQL Replication Dieter Schröder <dieterschroder@gmail.com>
2005-02-18 16:58 ` Re: PostgreSQL Replication Scott Marlowe <smarlowe@g2switchworks.com>
2005-02-18 17:17 ` Re: PostgreSQL Replication Dieter Schröder <dieterschroder@gmail.com>
@ 2005-02-18 17:23 ` Scott Marlowe <smarlowe@g2switchworks.com>
2005-02-18 18:15 ` Re: PostgreSQL Replication Joshua D. Drake <jd@commandprompt.com>
0 siblings, 1 reply; 91+ messages in thread
From: Scott Marlowe @ 2005-02-18 17:23 UTC (permalink / raw)
To: Dieter Schröder <dieterschroder@gmail.com>; +Cc: pgsql-general
On Fri, 2005-02-18 at 11:17, Dieter Schröder wrote:
> On Fri, 18 Feb 2005 10:58:08 -0600, Scott Marlowe
> <smarlowe@g2switchworks.com> wrote:
> > On Fri, 2005-02-18 at 10:40, Dieter Schröder wrote:
> > > Hello all,
> > >
> > > I am currently migrating a few oracle servers to postgre sql and
> > > management wants us to have replication. We have found information
> > > about the slony replicator with blog posts and articles. We have not
> > > found any other replication systems reviewed, so it slony the best
> > > tool for the job?
> > >
> > > I am looking for some articles to share with our management before we
> > > make a choice.
> >
> > The currently actively maintained projects related to replication that I
> > am aware of (in no particular order) are:
> >
> > pgpool http://pgfoundry.org/projects/pgpool/
> > slony http://gborg.postgresql.org/project/slony1/projdisplay.php
> > pgcluster http://pgfoundry.org/projects/pgcluster/
> > mammoth replicator
> > http://www.commandprompt.com/products/mammothreplicator/
> >
> >
>
> Thank you very much for the links. I will google these all and see if
> I can find reviews/articles of them all. Are they all open source?
>
The first three are all open source, the last one is not, but the source
code is available to customers, and should the project be abandoned or
the company go under it is promised to be released under an open source
license. Cost is $1,000.
^ permalink raw reply [nested|flat] 91+ messages in thread
* Re: PostgreSQL Replication
2005-02-18 16:40 PostgreSQL Replication Dieter Schröder <dieterschroder@gmail.com>
2005-02-18 16:58 ` Re: PostgreSQL Replication Scott Marlowe <smarlowe@g2switchworks.com>
2005-02-18 17:17 ` Re: PostgreSQL Replication Dieter Schröder <dieterschroder@gmail.com>
2005-02-18 17:23 ` Re: PostgreSQL Replication Scott Marlowe <smarlowe@g2switchworks.com>
@ 2005-02-18 18:15 ` Joshua D. Drake <jd@commandprompt.com>
2005-02-18 18:30 ` Re: PostgreSQL Replication Dieter Schröder <dieterschroder@gmail.com>
0 siblings, 1 reply; 91+ messages in thread
From: Joshua D. Drake @ 2005-02-18 18:15 UTC (permalink / raw)
To: Scott Marlowe <smarlowe@g2switchworks.com>; +Cc: Dieter Schröder <dieterschroder@gmail.com>; pgsql-general
> The first three are all open source, the last one is not, but the source
> code is available to customers, and should the project be abandoned or
> the company go under it is promised to be released under an open source
> license. Cost is $1,000.
Just FYI: Not only is it promised :) It is stated in the license itself.
Sincerely,
Joshua D. Drake
Command Prompt, Inc.
>
> ---------------------------(end of broadcast)---------------------------
> TIP 5: Have you checked our extensive FAQ?
>
> http://www.postgresql.org/docs/faq
--
Command Prompt, Inc., your source for PostgreSQL replication,
professional support, programming, managed services, shared
and dedicated hosting. Home of the Open Source Projects plPHP,
plPerlNG, pgManage, and pgPHPtoolkit.
Contact us now at: +1-503-667-4564 - http://www.commandprompt.com
Attachments:
jd.vcf (text/x-vcard, 655B) download
begin:vcard
fn:Joshua D. Drake
n:Drake;Joshua D.
org:Command Prompt, Inc.
adr:;;PO Box 215;Cascade Locks;Oregon;97014;USA
email;internet:jd@commandprompt.com
title:Consultant
tel;work:503-667-4564
tel;fax:503-210-0334
note:Command Prompt, Inc. is the largest and oldest US based commercial PostgreSQL support provider. We provide the only commercially viable integrated PostgreSQL replication solution, but also custom programming, and support. We authored the book Practical PostgreSQL, the procedural language plPHP, and adding trigger capability to plPerl.
x-mozilla-html:FALSE
url:http://www.commandprompt.com/
version:2.1
end:vcard
^ permalink raw reply [nested|flat] 91+ messages in thread
* Re: PostgreSQL Replication
2005-02-18 16:40 PostgreSQL Replication Dieter Schröder <dieterschroder@gmail.com>
2005-02-18 16:58 ` Re: PostgreSQL Replication Scott Marlowe <smarlowe@g2switchworks.com>
2005-02-18 17:17 ` Re: PostgreSQL Replication Dieter Schröder <dieterschroder@gmail.com>
2005-02-18 17:23 ` Re: PostgreSQL Replication Scott Marlowe <smarlowe@g2switchworks.com>
2005-02-18 18:15 ` Re: PostgreSQL Replication Joshua D. Drake <jd@commandprompt.com>
@ 2005-02-18 18:30 ` Dieter Schröder <dieterschroder@gmail.com>
0 siblings, 0 replies; 91+ messages in thread
From: Dieter Schröder @ 2005-02-18 18:30 UTC (permalink / raw)
To: Joshua D. Drake <jd@commandprompt.com>; +Cc: pgsql-general
On Fri, 18 Feb 2005 10:15:21 -0800, Joshua D. Drake
<jd@commandprompt.com> wrote:
>
> > The first three are all open source, the last one is not, but the source
> > code is available to customers, and should the project be abandoned or
> > the company go under it is promised to be released under an open source
> > license. Cost is $1,000.
>
> Just FYI: Not only is it promised :) It is stated in the license itself.
>
> Sincerely,
>
> Joshua D. Drake
> Command Prompt, Inc.
>
Thank you, can you provide me links to articles/reviews of Mammoth
Replicator? The only information that I found about it online was
references by you or your company (see link)
http://www.google.co.uk/search?hl=en&q=%22mammoth+replicator%22
Management will need more than that to consider that as a viable
option. Thanks for all the links. The slony article on oreilly is a
good starting point and many people posted tutorials online. We may
give this shot if this is the only one we can find adequate references
of.
D. Schröder
^ permalink raw reply [nested|flat] 91+ messages in thread
* Re: PostgreSQL Replication
2005-02-18 16:40 PostgreSQL Replication Dieter Schröder <dieterschroder@gmail.com>
@ 2005-02-18 17:11 ` John Sidney-Woollett <johnsw@wardbrook.com>
2005-02-18 20:34 ` Re: PostgreSQL Replication Christopher Browne <cbbrowne@acm.org>
2 siblings, 1 reply; 91+ messages in thread
From: John Sidney-Woollett @ 2005-02-18 17:11 UTC (permalink / raw)
To: Dieter Schröder <dieterschroder@gmail.com>; +Cc: pgsql-general
Try this for starters - it's a good introductory article
http://www.onlamp.com/pub/a/onlamp/2004/11/18/slony.html
Maybe someone else can provide other links.
John Sidney-Woollett
Dieter Schröder wrote:
> Hello all,
>
> I am currently migrating a few oracle servers to postgre sql and
> management wants us to have replication. We have found information
> about the slony replicator with blog posts and articles. We have not
> found any other replication systems reviewed, so it slony the best
> tool for the job?
>
> I am looking for some articles to share with our management before we
> make a choice.
>
> Sincerely,
>
> D. Schröder
>
> ---------------------------(end of broadcast)---------------------------
> TIP 1: subscribe and unsubscribe commands go to majordomo@postgresql.org
^ permalink raw reply [nested|flat] 91+ messages in thread
* Re: PostgreSQL Replication
2005-02-18 16:40 PostgreSQL Replication Dieter Schröder <dieterschroder@gmail.com>
2005-02-18 17:11 ` Re: PostgreSQL Replication John Sidney-Woollett <johnsw@wardbrook.com>
@ 2005-02-18 20:34 ` Christopher Browne <cbbrowne@acm.org>
2005-02-18 23:29 ` Re: PostgreSQL Replication Dieter Schröder <dieterschroder@gmail.com>
0 siblings, 1 reply; 91+ messages in thread
From: Christopher Browne @ 2005-02-18 20:34 UTC (permalink / raw)
To: pgsql-general
In an attempt to throw the authorities off his trail, johnsw@wardbrook.com (John Sidney-Woollett) transmitted:
> Try this for starters - it's a good introductory article
>
> http://www.onlamp.com/pub/a/onlamp/2004/11/18/slony.html
>
> Maybe someone else can provide other links.
See also the URL below...
--
output = ("cbbrowne" "@" "gmail.com")
http://linuxdatabases.info/info/slony.html
This Bloody Century
"Early this century there was a worldwide socialist revolution. The
great battles were then between International Socialism, National
Socialism, and Democratic Socialism. Democratic Socialism won because
the inertia of democracy prevented the socialism from doing as much
damage here. Capitalism first reemerged from the ashes of National
Socialism, in Germany and Japan. It is now reemerging from the ashes
of International Socialism. Next?
After all, inertia works both ways..."
-- Mark Miller
^ permalink raw reply [nested|flat] 91+ messages in thread
* Re: PostgreSQL Replication
2005-02-18 16:40 PostgreSQL Replication Dieter Schröder <dieterschroder@gmail.com>
2005-02-18 17:11 ` Re: PostgreSQL Replication John Sidney-Woollett <johnsw@wardbrook.com>
2005-02-18 20:34 ` Re: PostgreSQL Replication Christopher Browne <cbbrowne@acm.org>
@ 2005-02-18 23:29 ` Dieter Schröder <dieterschroder@gmail.com>
0 siblings, 0 replies; 91+ messages in thread
From: Dieter Schröder @ 2005-02-18 23:29 UTC (permalink / raw)
To: Christopher Browne <cbbrowne@acm.org>; +Cc: pgsql-general
Thank you for the links.
Based on the resources and reviews I found online, Slony looks like
the best solution. Am disappointed that these systems are not better
reviewed online (it really helps with convincing management). We sold
them on postgresql, but we need to sell them that the replication
systems are going to keep their secure as well.
Thanks again,
D. Schröder
On Fri, 18 Feb 2005 15:34:55 -0500, Christopher Browne <cbbrowne@acm.org> wrote:
> In an attempt to throw the authorities off his trail, johnsw@wardbrook.com (John Sidney-Woollett) transmitted:
> > Try this for starters - it's a good introductory article
> >
> > http://www.onlamp.com/pub/a/onlamp/2004/11/18/slony.html
> >
> > Maybe someone else can provide other links.
>
> See also the URL below...
> --
> output = ("cbbrowne" "@" "gmail.com")
> http://linuxdatabases.info/info/slony.html
> This Bloody Century
> "Early this century there was a worldwide socialist revolution. The
> great battles were then between International Socialism, National
> Socialism, and Democratic Socialism. Democratic Socialism won because
> the inertia of democracy prevented the socialism from doing as much
> damage here. Capitalism first reemerged from the ashes of National
> Socialism, in Germany and Japan. It is now reemerging from the ashes
> of International Socialism. Next?
>
> After all, inertia works both ways..."
> -- Mark Miller
>
> ---------------------------(end of broadcast)---------------------------
> TIP 8: explain analyze is your friend
>
^ permalink raw reply [nested|flat] 91+ messages in thread
* postgresql replication
@ 2005-05-05 00:49 Vlad <marchenko@gmail.com>
2005-05-05 01:30 ` Re: postgresql replication Richard Welty <rwelty@averillpark.net>
2005-05-05 07:10 ` Re: postgresql replication Peter Wilson <petew@yellowhawk.co.uk>
2005-05-05 07:20 ` Re: postgresql replication Peter Wilson <petew@yellowhawk.co.uk>
0 siblings, 3 replies; 91+ messages in thread
From: Vlad @ 2005-05-05 00:49 UTC (permalink / raw)
To: pgsql-general
Hello,
in need to increase reliability of the service (and perhaps eventually
offload main DB server) we are looking to setup replication for the
database server. I found two solutions:
Slony ( http://gborg.postgresql.org/project/slony1/projdisplay.php )
PGCluster ( http://pgfoundry.org/projects/pgcluster )
I found that PgCluster supports multi-muster mode, which we can
benefit from, but it's not required for "backup" which is #1 goal at
the moment.
If anyone used those solutions, compared performance, reliability, etc
- please share your experience / thoughts.
--
Vlad
^ permalink raw reply [nested|flat] 91+ messages in thread
* Re: postgresql replication
2005-05-05 00:49 postgresql replication Vlad <marchenko@gmail.com>
@ 2005-05-05 01:30 ` Richard Welty <rwelty@averillpark.net>
2005-05-05 02:06 ` Re: postgresql replication Vlad <marchenko@gmail.com>
2 siblings, 1 reply; 91+ messages in thread
From: Richard Welty @ 2005-05-05 01:30 UTC (permalink / raw)
To: pgsql-general
On Wed, 4 May 2005 20:49:59 -0400 Vlad <marchenko@gmail.com> wrote:
> Hello,
> in need to increase reliability of the service (and perhaps eventually
> offload main DB server) we are looking to setup replication for the
> database server. I found two solutions:
> Slony ( http://gborg.postgresql.org/project/slony1/projdisplay.php )
> PGCluster ( http://pgfoundry.org/projects/pgcluster )
> I found that PgCluster supports multi-muster mode, which we can
> benefit from, but it's not required for "backup" which is #1 goal at
> the moment.
> If anyone used those solutions, compared performance, reliability, etc
> - please share your experience / thoughts.
i think you need to be more specific about your replication requirements.
async multi master is problematic in any case. it can be useful in certain
circumstances, but for generically duplicating a large database, it's generally
the wrong answer.
you should probably focus on single master/multi slave setups, there are
useful solutions in that space.
richard
--
Richard Welty rwelty@averillpark.net
Averill Park Networking
Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security
"F=ma : it's not just a good idea, it's the law"
^ permalink raw reply [nested|flat] 91+ messages in thread
* Re: postgresql replication
2005-05-05 00:49 postgresql replication Vlad <marchenko@gmail.com>
2005-05-05 01:30 ` Re: postgresql replication Richard Welty <rwelty@averillpark.net>
@ 2005-05-05 02:06 ` Vlad <marchenko@gmail.com>
2005-05-05 12:18 ` Re: postgresql replication Andrew Sullivan <ajs@crankycanuck.ca>
2005-05-05 14:52 ` Re: postgresql replication Scott Marlowe <smarlowe@g2switchworks.com>
0 siblings, 2 replies; 91+ messages in thread
From: Vlad @ 2005-05-05 02:06 UTC (permalink / raw)
To: Richard Welty <rwelty@averillpark.net>; +Cc: pgsql-general
the number one aim at the moment is to have "always-up-to-date" copy
of our main DB with minial performance impact on replication (as I
guess, single master - slave setup will work the best in this case).
Eventually I it's likely that we'll want to unload the database server
by splitting requests between two+ servers, and in this case having
multi-master setup will be more convenient to have, I think.
so at the point any of slony and pgcluster works for me, but before I
start messing with any, I wanted to hear real users opninon about
those (or different) packages :)
> i think you need to be more specific about your replication requirements.
>
> async multi master is problematic in any case. it can be useful in certain
> circumstances, but for generically duplicating a large database, it's generally
> the wrong answer.
>
> you should probably focus on single master/multi slave setups, there are
> useful solutions in that space.
>
> richard
> --
> Richard Welty rwelty@averillpark.net
> Averill Park Networking
> Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security
> "F=ma : it's not just a good idea, it's the law"
>
--
Vlad
^ permalink raw reply [nested|flat] 91+ messages in thread
* Re: postgresql replication
2005-05-05 00:49 postgresql replication Vlad <marchenko@gmail.com>
2005-05-05 01:30 ` Re: postgresql replication Richard Welty <rwelty@averillpark.net>
2005-05-05 02:06 ` Re: postgresql replication Vlad <marchenko@gmail.com>
@ 2005-05-05 12:18 ` Andrew Sullivan <ajs@crankycanuck.ca>
1 sibling, 0 replies; 91+ messages in thread
From: Andrew Sullivan @ 2005-05-05 12:18 UTC (permalink / raw)
To: pgsql-general
On Wed, May 04, 2005 at 10:06:03PM -0400, Vlad wrote:
> so at the point any of slony and pgcluster works for me, but before I
> start messing with any, I wanted to hear real users opninon about
> those (or different) packages :)
Well, Afilias (my employer) sponsored/sponsors Slony development. We
use it for the .info and .org top level domains, among other systems.
A
--
Andrew Sullivan | ajs@crankycanuck.ca
When my information changes, I alter my conclusions. What do you do sir?
--attr. John Maynard Keynes
^ permalink raw reply [nested|flat] 91+ messages in thread
* Re: postgresql replication
2005-05-05 00:49 postgresql replication Vlad <marchenko@gmail.com>
2005-05-05 01:30 ` Re: postgresql replication Richard Welty <rwelty@averillpark.net>
2005-05-05 02:06 ` Re: postgresql replication Vlad <marchenko@gmail.com>
@ 2005-05-05 14:52 ` Scott Marlowe <smarlowe@g2switchworks.com>
2005-05-05 20:28 ` Re: postgresql replication Christopher Browne <cbbrowne@acm.org>
1 sibling, 1 reply; 91+ messages in thread
From: Scott Marlowe @ 2005-05-05 14:52 UTC (permalink / raw)
To: Vlad <marchenko@gmail.com>; +Cc: Richard Welty <rwelty@averillpark.net>; pgsql-general
On Wed, 2005-05-04 at 21:06, Vlad wrote:
> the number one aim at the moment is to have "always-up-to-date" copy
> of our main DB with minial performance impact on replication
Have you considered point in time recovery as implemented in 8.0?
While it does require some small amount of work to bring the secondary
server up to date, it's not that much, and it gives you very up to date
recoverability.
^ permalink raw reply [nested|flat] 91+ messages in thread
* Re: postgresql replication
2005-05-05 00:49 postgresql replication Vlad <marchenko@gmail.com>
2005-05-05 01:30 ` Re: postgresql replication Richard Welty <rwelty@averillpark.net>
2005-05-05 02:06 ` Re: postgresql replication Vlad <marchenko@gmail.com>
2005-05-05 14:52 ` Re: postgresql replication Scott Marlowe <smarlowe@g2switchworks.com>
@ 2005-05-05 20:28 ` Christopher Browne <cbbrowne@acm.org>
0 siblings, 0 replies; 91+ messages in thread
From: Christopher Browne @ 2005-05-05 20:28 UTC (permalink / raw)
To: pgsql-general
Centuries ago, Nostradamus foresaw when smarlowe@g2switchworks.com (Scott Marlowe) would write:
> On Wed, 2005-05-04 at 21:06, Vlad wrote:
>> the number one aim at the moment is to have "always-up-to-date" copy
>> of our main DB with minial performance impact on replication
>
> Have you considered point in time recovery as implemented in 8.0?
>
> While it does require some small amount of work to bring the secondary
> server up to date, it's not that much, and it gives you very up to date
> recoverability.
If they want to be able to use the replica, perhaps to run reports on
it, that turns out to be problematic.
--
select 'cbbrowne' || '@' || 'cbbrowne.com';
http://linuxfinances.info/info/spreadsheets.html
Long computations which yield zero are probably all for naught.
^ permalink raw reply [nested|flat] 91+ messages in thread
* Re: postgresql replication
2005-05-05 00:49 postgresql replication Vlad <marchenko@gmail.com>
@ 2005-05-05 07:10 ` Peter Wilson <petew@yellowhawk.co.uk>
2 siblings, 0 replies; 91+ messages in thread
From: Peter Wilson @ 2005-05-05 07:10 UTC (permalink / raw)
To: Vlad <marchenko@gmail.com>; +Cc: pgsql-general
Vlad wrote:
>Hello,
>
>in need to increase reliability of the service (and perhaps eventually
>offload main DB server) we are looking to setup replication for the
>database server. I found two solutions:
>
>Slony ( http://gborg.postgresql.org/project/slony1/projdisplay.php )
>PGCluster ( http://pgfoundry.org/projects/pgcluster )
>
>I found that PgCluster supports multi-muster mode, which we can
>benefit from, but it's not required for "backup" which is #1 goal at
>the moment.
>
>If anyone used those solutions, compared performance, reliability, etc
>- please share your experience / thoughts.
>
>
There is a 3rd option - DBMirror, which comes as part of the Postgres
distribution (look in the contrib/dbmirror directory).
I looked at Slony, which seems to be a current favourite -but I couldn't
get it working on my database (claimed my tables didn't have relevant
keys - which they do). Slony-I had almost non-existent documentation
which I always find prety unacceptable unless everything goes very
smoothly..
I then found DBMirror - which I'm now using to replicate replicate from
master to slave database, and then cascade replicating my slave to a 3rd
off-site server.
Performance of DBMirror.pl (a Perl script that does the actual
replication) was very poor - so I re-wrote it in C++. Some details at:
http://www.whitebeam.org/library/guide/TechNotes/replicate.rhtm
DBmirror doesn't replicate schema changes, which wasn't a problem for me
since our schema changes very infrequently.
Hope that helps
Pete
--
http://www.yellowhawk.co.uk
http://www.whitebeam.org
-----
^ permalink raw reply [nested|flat] 91+ messages in thread
* Re: postgresql replication
2005-05-05 00:49 postgresql replication Vlad <marchenko@gmail.com>
@ 2005-05-05 07:20 ` Peter Wilson <petew@yellowhawk.co.uk>
2005-05-05 13:11 ` Re: postgresql replication Christopher Browne <cbbrowne@acm.org>
2 siblings, 1 reply; 91+ messages in thread
From: Peter Wilson @ 2005-05-05 07:20 UTC (permalink / raw)
To: pgsql-general
Vlad wrote:
> Hello,
>
> in need to increase reliability of the service (and perhaps eventually
> offload main DB server) we are looking to setup replication for the
> database server. I found two solutions:
>
> Slony ( http://gborg.postgresql.org/project/slony1/projdisplay.php )
> PGCluster ( http://pgfoundry.org/projects/pgcluster )
>
> I found that PgCluster supports multi-muster mode, which we can
> benefit from, but it's not required for "backup" which is #1 goal at
> the moment.
>
> If anyone used those solutions, compared performance, reliability, etc
> - please share your experience / thoughts.
>
There is a 3rd option - DBMirror, which comes as part of the Postgres
distribution (look in the contrib/dbmirror directory).
I looked at Slony, which seems to be a current favourite -but I couldn't
get it working on my database (claimed my tables didn't have relevant
keys - which they do). Slony-I had almost non-existent documentation
which I always find prety unacceptable unless everything goes very
smoothly..
I then found DBMirror - which I'm now using to replicate replicate from
master to slave database, and then cascade replicating my slave to a 3rd
off-site server.
Performance of DBMirror.pl (a Perl script that does the actual
replication) was very poor - so I re-wrote it in C++. Some details at:
http://www.whitebeam.org/library/guide/TechNotes/replicate.rhtm
DBmirror doesn't replicate schema changes, which wasn't a problem for me
since our schema changes very infrequently.
Hope that helps
Pete
--
http://www.yellowhawk.co.uk
http://www.whitebeam.org
-----
^ permalink raw reply [nested|flat] 91+ messages in thread
* Re: postgresql replication
2005-05-05 00:49 postgresql replication Vlad <marchenko@gmail.com>
2005-05-05 07:20 ` Re: postgresql replication Peter Wilson <petew@yellowhawk.co.uk>
@ 2005-05-05 13:11 ` Christopher Browne <cbbrowne@acm.org>
2005-05-05 14:21 ` Re: postgresql replication Peter Wilson <petew@yellowhawk.co.uk>
0 siblings, 1 reply; 91+ messages in thread
From: Christopher Browne @ 2005-05-05 13:11 UTC (permalink / raw)
To: pgsql-general
Martha Stewart called it a Good Thing when Peter Wilson <petew@yellowhawk.co.uk> wrote:
> I looked at Slony, which seems to be a current favourite -but I
> couldn't get it working on my database (claimed my tables didn't have
> relevant keys - which they do). Slony-I had almost non-existent
> documentation which I always find prety unacceptable unless everything
> goes very smoothly..
I updated the copy of the documentation that I keep online (URL below)
to reflect the latest CVS updates just yesterday. I have to say
"nonsense!"
There are things I would like to be better documented, but the notion
that the documentation is "almost nonexistent" is just nonsense. And
the problem you describe is indeed discussed in the documentation.
Admittedly, it is not all in the version 1.0.5 tarball, but that's
because a lot of it was written after that release.
--
output = reverse("moc.liamg" "@" "enworbbc")
http://linuxdatabases.info/info/slony.html
Space Corps Directive #997: Work done by an officer's doppleganger in
a parallel universe cannot be claimed as overtime. -- Red Dwarf
^ permalink raw reply [nested|flat] 91+ messages in thread
* Re: postgresql replication
2005-05-05 00:49 postgresql replication Vlad <marchenko@gmail.com>
2005-05-05 07:20 ` Re: postgresql replication Peter Wilson <petew@yellowhawk.co.uk>
2005-05-05 13:11 ` Re: postgresql replication Christopher Browne <cbbrowne@acm.org>
@ 2005-05-05 14:21 ` Peter Wilson <petew@yellowhawk.co.uk>
2005-05-06 12:10 ` Re: postgresql replication Andrew Sullivan <ajs@crankycanuck.ca>
0 siblings, 1 reply; 91+ messages in thread
From: Peter Wilson @ 2005-05-05 14:21 UTC (permalink / raw)
To: Christopher Browne <cbbrowne@acm.org>
Christopher Browne wrote:
> Martha Stewart called it a Good Thing when Peter Wilson <petew@yellowhawk.co.uk> wrote:
>
>>I looked at Slony, which seems to be a current favourite -but I
>>couldn't get it working on my database (claimed my tables didn't have
>>relevant keys - which they do). Slony-I had almost non-existent
>>documentation which I always find prety unacceptable unless everything
>>goes very smoothly..
>
>
> I updated the copy of the documentation that I keep online (URL below)
> to reflect the latest CVS updates just yesterday. I have to say
> "nonsense!"
>
> There are things I would like to be better documented, but the notion
> that the documentation is "almost nonexistent" is just nonsense. And
> the problem you describe is indeed discussed in the documentation.
>
> Admittedly, it is not all in the version 1.0.5 tarball, but that's
> because a lot of it was written after that release.
Nonsense? hmmmmmmmm
Without wanting to be hyper-critical, documentation that's hidden isn't
a whole lot of use. The link in your email to
http://linuxdatabases.info/info/slony.html
does indeed seem to have some more documentation, but why isn't it
linked from the main Slony site
(http://gborg.postgresql.org/project/slony1)?
Why is this documentation on 'Christoper B. Browns homepage rather than
the Slony web pages? The 'official' Slony documentation I had available
was at :
http://gborg.postgresql.org/project/slony1/genpage.php?howto_idx
and it *really* didn't help with the problems I had.
Having now taken a look at the documentation you reference, it's still
not wonderfully comprehensive. The problem I had was that despite the
fact that my tables had primary keys the Slony configuration refused to
recognise them. The documentation says simply that primary or candidate
primary keys are a requirements.
So - as a potential 'slony user' it is *not* nonsense that there was
negligable documentation - from my perspective it was a fact and I found
an alternative solution.
Pete
^ permalink raw reply [nested|flat] 91+ messages in thread
* Re: postgresql replication
2005-05-05 00:49 postgresql replication Vlad <marchenko@gmail.com>
2005-05-05 07:20 ` Re: postgresql replication Peter Wilson <petew@yellowhawk.co.uk>
2005-05-05 13:11 ` Re: postgresql replication Christopher Browne <cbbrowne@acm.org>
2005-05-05 14:21 ` Re: postgresql replication Peter Wilson <petew@yellowhawk.co.uk>
@ 2005-05-06 12:10 ` Andrew Sullivan <ajs@crankycanuck.ca>
0 siblings, 0 replies; 91+ messages in thread
From: Andrew Sullivan @ 2005-05-06 12:10 UTC (permalink / raw)
To: pgsql-general
On Thu, May 05, 2005 at 03:21:40PM +0100, Peter Wilson wrote:
> Why is this documentation on 'Christoper B. Browns homepage rather than
> the Slony web pages? The 'official' Slony documentation I had available
> was at :
> http://gborg.postgresql.org/project/slony1/genpage.php?howto_idx
>
> and it *really* didn't help with the problems I had.
I think it's already been acknowledged that the 1.0.5 release's
documentation wasn't as comprehensive as people liked; but that is,
as has also been noted, because nobody had run into the problems you
had yet (i.e. the documentation was as complete at release time as
the users had been able to make it). Nevertheless, it is not true
that the documentation isn't on the slony pages. By my count,
including the header bar, the "admin guide" is the 10th link on the
page. It's near the top. These updated docs are also in the
currently-beta version of the software. (I don't want to get into a
flamewar over this; I just think it's unfair to claim the docs aren't
there.)
> Having now taken a look at the documentation you reference, it's still
> not wonderfully comprehensive. The problem I had was that despite the
> fact that my tables had primary keys the Slony configuration refused to
> recognise them. The documentation says simply that primary or candidate
> primary keys are a requirements.
This is also not true. The documentation for SET ADD TABLE tells you
that there is a KEY option to tell slonik what the key field is.
Automatic detection won't always work, because not all "primary keys"
are so noted in a PostgreSQL database.
What is worth mentioning, though, is that Slony is not as simple to
set up as some of the alternatives, like dbmirror. This is because
items like controlled switchover, failover, cascading, target
promotion, and log shipping are all designed-in features of Slony.
The same is not true of dbmirror, or erserver. My experience tells
me that such features are very hard to add in retrospect. Indeed,
the very reason Afilias sponsored development of Slony was that we
concluded the features we wanted could be more easily built from the
ground up than added to any of the alternatives we then had
available. (This isn't to say everybody should use Slony; just that
it's important to realise that additional features come at the cost
of additional complexity. My bet is that anyone really needing high
availability will end up needing some of those additional features.)
A
--
Andrew Sullivan | ajs@crankycanuck.ca
When my information changes, I alter my conclusions. What do you do sir?
--attr. John Maynard Keynes
^ permalink raw reply [nested|flat] 91+ messages in thread
* Postgresql replication
@ 2005-08-24 12:21 Carlos Henrique Reimer <carlosreimer@yahoo.com.br>
2005-08-24 13:31 ` Re: Postgresql replication Michael Meskes <meskes@postgresql.org>
2005-08-24 15:54 ` Re: Postgresql replication Chris Browne <cbbrowne@acm.org>
0 siblings, 2 replies; 91+ messages in thread
From: Carlos Henrique Reimer @ 2005-08-24 12:21 UTC (permalink / raw)
To: pgsql-general
Hello,
Currently we have only one database accessed by the headquarter and two branches but the performance in the branches is very poor and I was invited to discover a way to increase it.
One possible solution is replicate the headquarter DB into the two branches.
I read about slony-i, but then the replicated DBs will be read-only.
Pgcluster is a sync solution and I think is not fited for us becase the replicated DBs will be located remotely and we have a lot of updates on the DBs.
I think I´m looking for a master-slave assynchronous solution. I know pgReplicator can do it, but I think the project is not active any more.
Are there another solutions?
Thanks in advance!
Reimer
__________________________________________________
Converse com seus amigos em tempo real com o Yahoo! Messenger
http://br.download.yahoo.com/messenger/
^ permalink raw reply [nested|flat] 91+ messages in thread
* Re: Postgresql replication
2005-08-24 12:21 Postgresql replication Carlos Henrique Reimer <carlosreimer@yahoo.com.br>
@ 2005-08-24 13:31 ` Michael Meskes <meskes@postgresql.org>
1 sibling, 0 replies; 91+ messages in thread
From: Michael Meskes @ 2005-08-24 13:31 UTC (permalink / raw)
To: pgsql-general
Am Mittwoch, 24. August 2005 14:21 schrieb Carlos Henrique Reimer:
> One possible solution is replicate the headquarter DB into the two
> branches.
>
> I read about slony-i, but then the replicated DBs will be read-only.
That's because it's a master-slave replication. If you could sync the slave
back to the master it would be a master itself.
> I think I´m looking for a master-slave assynchronous solution. I know
> pgReplicator can do it, but I think the project is not active any more.
But Slony does master/slave replication.
Michael
--
Michael Meskes
Email: Michael at Fam-Meskes dot De, Michael at Meskes dot (De|Com|Net|Org)
ICQ: 179140304, AIM/Yahoo: michaelmeskes, Jabber: meskes@jabber.org
Go SF 49ers! Go Rhein Fire! Use Debian GNU/Linux! Use PostgreSQL!
^ permalink raw reply [nested|flat] 91+ messages in thread
* Re: Postgresql replication
2005-08-24 12:21 Postgresql replication Carlos Henrique Reimer <carlosreimer@yahoo.com.br>
@ 2005-08-24 15:54 ` Chris Browne <cbbrowne@acm.org>
2005-08-24 17:31 ` Re: Postgresql replication Carlos Henrique Reimer <carlosreimer@yahoo.com.br>
2005-08-24 19:53 ` Re: Postgresql replication Jeff Davis <jdavis-pgsql@empires.org>
2005-08-30 17:55 ` Re: Postgresql replication Andrew Sullivan <ajs@crankycanuck.ca>
1 sibling, 3 replies; 91+ messages in thread
From: Chris Browne @ 2005-08-24 15:54 UTC (permalink / raw)
To: pgsql-general
carlosreimer@yahoo.com.br (Carlos Henrique Reimer) writes:
> Currently we have only one database accessed by the headquarter and
> two branches but the performance in the branches is very poor and
> I was invited to discover a way to increase it.
>
> One possible solution is replicate the headquarter DB into the two
> branches.
>
> I read about slony-i, but then the replicated DBs will be read-only.
Correct.
> Pgcluster is a sync solution and I think is not fited for us becase
> the replicated DBs will be located remotely and we have a lot of
> updates on the DBs.
Unfortunately, pgcluster isn't much maintained anymore.
> I think I´m looking for a master-slave assynchronous solution. I
> know pgReplicator can do it, but I think the project is not active
> any more.
Slony-I is a master/slave asynchronous replication system; if you
already considered it unsuitable, then I see little likelihood of
other systems with the same sorts of properties being suitable.
What could conceivably be of use to you would be a *multimaster*
asynchronous replication system. Unfortunately, multimaster
*anything* is a really tough nut to crack.
There is a Slony-II project ongoing that is trying to construct a
more-or-less synchronous multimaster replication system (where part of
the cleverness involves trying to get as much taking place in an
asynchronous fashion as possible) that would almost certainly be of no
use to your "use case."
The most successful "multimaster asynchronous" replication system that
I am aware of is the PalmComputing "PalmSync" system.
It would presumably be possible to use some of the components of
Slony-I to construct a multimaster async replication system. A
pre-requisite would be the creation of some form of "distributed
sequence" which would try to minimize the conflicts that arise out of
auto-generation of sequence numbers.
But beyond that lies the larger challenge of conflict resolution.
Slony-I, as a single-master system, does not need to address
conflicts, as changes must be made on the "master" and propagate
elsewhere.
Synchronous multimaster systems address conflicts by detecting them
when they occur and rejecting one or another of the conflicting
transactions.
Asynchronous multimaster systems require some sort of conflict
management/resolution system for situations where tuples are being
concurrently updated on multiple nodes. How that is managed is, well,
troublesome :-(. The PalmSync approach is that if it finds conflicts,
it duplicates records and leaves you, the user, to clean things up.
That may not be suitable for every kind of application...
--
(reverse (concatenate 'string "gro.gultn" "@" "enworbbc"))
http://cbbrowne.com/info/slony.html
((LAMBDA (X) (X X)) (LAMBDA (X) (X X)))
^ permalink raw reply [nested|flat] 91+ messages in thread
* Re: Postgresql replication
2005-08-24 12:21 Postgresql replication Carlos Henrique Reimer <carlosreimer@yahoo.com.br>
2005-08-24 15:54 ` Re: Postgresql replication Chris Browne <cbbrowne@acm.org>
@ 2005-08-24 17:31 ` Carlos Henrique Reimer <carlosreimer@yahoo.com.br>
2005-08-24 23:22 ` Re: Postgresql replication William Yu <wyu@talisys.com>
2005-08-25 06:29 ` Re: Postgresql replication Chris Travers <chris@travelamericas.com>
2 siblings, 2 replies; 91+ messages in thread
From: Carlos Henrique Reimer @ 2005-08-24 17:31 UTC (permalink / raw)
To: pgsql-general
I read some documents about replication and realized that if you plan on using asynchronous replication, your application should be designed from the outset with that in mind because asynchronous replication is not something that can be easily “added on” after the fact.
Am I right?
Reimer
__________________________________________________
Converse com seus amigos em tempo real com o Yahoo! Messenger
http://br.download.yahoo.com/messenger/
^ permalink raw reply [nested|flat] 91+ messages in thread
* Re: Postgresql replication
2005-08-24 12:21 Postgresql replication Carlos Henrique Reimer <carlosreimer@yahoo.com.br>
2005-08-24 15:54 ` Re: Postgresql replication Chris Browne <cbbrowne@acm.org>
2005-08-24 17:31 ` Re: Postgresql replication Carlos Henrique Reimer <carlosreimer@yahoo.com.br>
@ 2005-08-24 23:22 ` William Yu <wyu@talisys.com>
2005-08-25 00:39 ` Re: Postgresql replication Greg Stark <gsstark@mit.edu>
2005-08-25 00:46 ` Re: Postgresql replication Aly Dharshi <aly.dharshi@telus.net>
2005-08-25 12:24 ` Re: Postgresql replication William Yu <wyu@talisys.com>
1 sibling, 3 replies; 91+ messages in thread
From: William Yu @ 2005-08-24 23:22 UTC (permalink / raw)
To: pgsql-general
Carlos Henrique Reimer wrote:
> I read some documents about replication and realized that if you plan on
> using asynchronous replication, your application should be designed from
> the outset with that in mind because asynchronous replication is not
> something that can be easily “added on” after the fact.
Yes, it requires a lot foresight to do multi-master replication --
especially across high latency connections. I do that now for 2
different projects. We have servers across the country replicating data
every X minutes with custom app logic resolves conflicting data.
Allocation of unique IDs that don't collide across servers is a must.
For 1 project, instead of using numeric IDs, we using CHAR and
pre-append a unique server code so record #1 on server A is A0000000001
versus ?x0000000001 on other servers. For the other project, we were too
far along in development to change all our numerics into chars so we
wrote custom sequence logic to divide our 10billion ID space into
1-Xbillion for server 1, X-Ybillion for server 2, etc.
With this step taken, we then had to isolate (1) transactions could run
on any server w/o issue (where we always take the newest record), (2)
transactions required an amalgam of all actions and (3) transactions had
to be limited to "home" servers. Record keeping stuff where we keep a
running history of all changes fell into the first category. It would
have been no different than 2 users on the same server updating the same
object at different times during the day. Updating of summary data fell
into category #2 and required parsing change history of individual
elements. Category #3 would be financial transactions requiring strict
locks were be divided up by client/user space and restricted to the
user's home server. This case would not allow auto-failover. Instead, it
would require some prolonged threshold of downtime for a server before
full financials are allowed on backup servers.
^ permalink raw reply [nested|flat] 91+ messages in thread
* Re: Postgresql replication
2005-08-24 12:21 Postgresql replication Carlos Henrique Reimer <carlosreimer@yahoo.com.br>
2005-08-24 15:54 ` Re: Postgresql replication Chris Browne <cbbrowne@acm.org>
2005-08-24 17:31 ` Re: Postgresql replication Carlos Henrique Reimer <carlosreimer@yahoo.com.br>
2005-08-24 23:22 ` Re: Postgresql replication William Yu <wyu@talisys.com>
@ 2005-08-25 00:39 ` Greg Stark <gsstark@mit.edu>
2 siblings, 0 replies; 91+ messages in thread
From: Greg Stark @ 2005-08-25 00:39 UTC (permalink / raw)
To: William Yu <wyu@talisys.com>; +Cc: pgsql-general
William Yu <wyu@talisys.com> writes:
> Allocation of unique IDs that don't collide across servers is a must. For 1
> project, instead of using numeric IDs, we using CHAR and pre-append a unique
> server code so record #1 on server A is A0000000001 versus ?x0000000001 on other
> servers. For the other project, we were too far along in development to change
> all our numerics into chars so we wrote custom sequence logic to divide our
> 10billion ID space into 1-Xbillion for server 1, X-Ybillion for server 2, etc.
I would have thought setting the sequences to "INCREMENT BY 100" would let you
handle this simply by setting the sequences on each server to start at a
different value modulo 100.
I wonder if it might be handy to be able to set default sequence parameters on
a per-database level so that you could set this up and then just do a normal
pg_restore of the same schema and get proper non-conflicting sequences on each
server.
I suppose it's the least of your problems though.
--
greg
^ permalink raw reply [nested|flat] 91+ messages in thread
* Re: Postgresql replication
2005-08-24 12:21 Postgresql replication Carlos Henrique Reimer <carlosreimer@yahoo.com.br>
2005-08-24 15:54 ` Re: Postgresql replication Chris Browne <cbbrowne@acm.org>
2005-08-24 17:31 ` Re: Postgresql replication Carlos Henrique Reimer <carlosreimer@yahoo.com.br>
2005-08-24 23:22 ` Re: Postgresql replication William Yu <wyu@talisys.com>
@ 2005-08-25 00:46 ` Aly Dharshi <aly.dharshi@telus.net>
2005-08-25 07:01 ` Re: Postgresql replication William Yu <wyu@talisys.com>
2005-08-25 16:18 ` Re: Postgresql replication Chris Browne <cbbrowne@acm.org>
2 siblings, 2 replies; 91+ messages in thread
From: Aly Dharshi @ 2005-08-25 00:46 UTC (permalink / raw)
To: William Yu <wyu@talisys.com>; +Cc: pgsql-general
I know I am wadding into this discussion as an beginner compared to the rest who
have answered this thread, but doesn't something like pgpool provide relief for
pseudo-multimaster replication, and what about software like sqlrelay wouldn't
these suites help to some extent ? Looking forward to be enlightened.
Cheers,
Aly.
William Yu wrote:
> Carlos Henrique Reimer wrote:
>
>> I read some documents about replication and realized that if you plan
>> on using asynchronous replication, your application should be designed
>> from the outset with that in mind because asynchronous replication is
>> not something that can be easily “added on” after the fact.
>
>
> Yes, it requires a lot foresight to do multi-master replication --
> especially across high latency connections. I do that now for 2
> different projects. We have servers across the country replicating data
> every X minutes with custom app logic resolves conflicting data.
>
> Allocation of unique IDs that don't collide across servers is a must.
> For 1 project, instead of using numeric IDs, we using CHAR and
> pre-append a unique server code so record #1 on server A is A0000000001
> versus ?x0000000001 on other servers. For the other project, we were too
> far along in development to change all our numerics into chars so we
> wrote custom sequence logic to divide our 10billion ID space into
> 1-Xbillion for server 1, X-Ybillion for server 2, etc.
>
> With this step taken, we then had to isolate (1) transactions could run
> on any server w/o issue (where we always take the newest record), (2)
> transactions required an amalgam of all actions and (3) transactions had
> to be limited to "home" servers. Record keeping stuff where we keep a
> running history of all changes fell into the first category. It would
> have been no different than 2 users on the same server updating the same
> object at different times during the day. Updating of summary data fell
> into category #2 and required parsing change history of individual
> elements. Category #3 would be financial transactions requiring strict
> locks were be divided up by client/user space and restricted to the
> user's home server. This case would not allow auto-failover. Instead, it
> would require some prolonged threshold of downtime for a server before
> full financials are allowed on backup servers.
>
> ---------------------------(end of broadcast)---------------------------
> TIP 6: explain analyze is your friend
--
Aly S.P Dharshi
aly.dharshi@telus.net
"A good speech is like a good dress
that's short enough to be interesting
and long enough to cover the subject"
^ permalink raw reply [nested|flat] 91+ messages in thread
* Re: Postgresql replication
2005-08-24 12:21 Postgresql replication Carlos Henrique Reimer <carlosreimer@yahoo.com.br>
2005-08-24 15:54 ` Re: Postgresql replication Chris Browne <cbbrowne@acm.org>
2005-08-24 17:31 ` Re: Postgresql replication Carlos Henrique Reimer <carlosreimer@yahoo.com.br>
2005-08-24 23:22 ` Re: Postgresql replication William Yu <wyu@talisys.com>
2005-08-25 00:46 ` Re: Postgresql replication Aly Dharshi <aly.dharshi@telus.net>
@ 2005-08-25 07:01 ` William Yu <wyu@talisys.com>
2005-08-25 11:44 ` Re: Postgresql replication Bohdan Linda <bohdan.linda@seznam.cz>
1 sibling, 1 reply; 91+ messages in thread
From: William Yu @ 2005-08-25 07:01 UTC (permalink / raw)
To: pgsql-general
It provides pseudo relief if all your servers are in the same building.
Having a front-end pgpool connector pointing to servers across the world
is not workable -- performance ends up being completely decrepit due to
the high latency.
Which is the problem we face. Great, you've got multiple servers for
failover. Too bad it doesn't do much good if your building gets hit by
fire/earthquake/hurricane/etc.
Aly Dharshi wrote:
> I know I am wadding into this discussion as an beginner compared to the
> rest who have answered this thread, but doesn't something like pgpool
> provide relief for pseudo-multimaster replication, and what about
> software like sqlrelay wouldn't these suites help to some extent ?
> Looking forward to be enlightened.
>
> Cheers,
>
> Aly.
>
> William Yu wrote:
>
>> Carlos Henrique Reimer wrote:
>>
>>> I read some documents about replication and realized that if you plan
>>> on using asynchronous replication, your application should be
>>> designed from the outset with that in mind because asynchronous
>>> replication is not something that can be easily “added on” after the
>>> fact.
>>
>>
>> Yes, it requires a lot foresight to do multi-master replication --
>> especially across high latency connections. I do that now for 2
>> different projects. We have servers across the country replicating
>> data every X minutes with custom app logic resolves conflicting data.
>>
>> Allocation of unique IDs that don't collide across servers is a must.
>> For 1 project, instead of using numeric IDs, we using CHAR and
>> pre-append a unique server code so record #1 on server A is
>> A0000000001 versus ?x0000000001 on other servers. For the other
>> project, we were too far along in development to change all our
>> numerics into chars so we wrote custom sequence logic to divide our
>> 10billion ID space into 1-Xbillion for server 1, X-Ybillion for server
>> 2, etc.
>>
>> With this step taken, we then had to isolate (1) transactions could
>> run on any server w/o issue (where we always take the newest record),
>> (2) transactions required an amalgam of all actions and (3)
>> transactions had to be limited to "home" servers. Record keeping stuff
>> where we keep a running history of all changes fell into the first
>> category. It would have been no different than 2 users on the same
>> server updating the same object at different times during the day.
>> Updating of summary data fell into category #2 and required parsing
>> change history of individual elements. Category #3 would be financial
>> transactions requiring strict locks were be divided up by client/user
>> space and restricted to the user's home server. This case would not
>> allow auto-failover. Instead, it would require some prolonged
>> threshold of downtime for a server before full financials are allowed
>> on backup servers.
^ permalink raw reply [nested|flat] 91+ messages in thread
* Re: Postgresql replication
2005-08-24 12:21 Postgresql replication Carlos Henrique Reimer <carlosreimer@yahoo.com.br>
2005-08-24 15:54 ` Re: Postgresql replication Chris Browne <cbbrowne@acm.org>
2005-08-24 17:31 ` Re: Postgresql replication Carlos Henrique Reimer <carlosreimer@yahoo.com.br>
2005-08-24 23:22 ` Re: Postgresql replication William Yu <wyu@talisys.com>
2005-08-25 00:46 ` Re: Postgresql replication Aly Dharshi <aly.dharshi@telus.net>
2005-08-25 07:01 ` Re: Postgresql replication William Yu <wyu@talisys.com>
@ 2005-08-25 11:44 ` Bohdan Linda <bohdan.linda@seznam.cz>
2005-08-25 11:50 ` Re: Postgresql replication Tino Wildenhain <tino@wildenhain.de>
2005-08-25 12:03 ` Re: Postgresql replication William Yu <wyu@talisys.com>
2005-08-25 14:56 ` Re: Postgresql replication Brad Nicholson <bnichols@ca.afilias.info>
2005-08-25 16:20 ` Re: Postgresql replication Chris Browne <cbbrowne@acm.org>
2005-08-30 17:56 ` Re: Postgresql replication Andrew Sullivan <ajs@crankycanuck.ca>
0 siblings, 5 replies; 91+ messages in thread
From: Bohdan Linda @ 2005-08-25 11:44 UTC (permalink / raw)
To: pgsql-general
I would have a slight offtopic question, this is issue only of pgsql or
there are some other db solutions which have good performance when doing
this kind of replication across the world.
Regards,
Bohdan
On Thu, Aug 25, 2005 at 09:01:49AM +0200, William Yu wrote:
> It provides pseudo relief if all your servers are in the same building.
> Having a front-end pgpool connector pointing to servers across the world
> is not workable -- performance ends up being completely decrepit due to
> the high latency.
>
> Which is the problem we face. Great, you've got multiple servers for
> failover. Too bad it doesn't do much good if your building gets hit by
> fire/earthquake/hurricane/etc.
>
>
^ permalink raw reply [nested|flat] 91+ messages in thread
* Re: Postgresql replication
2005-08-24 12:21 Postgresql replication Carlos Henrique Reimer <carlosreimer@yahoo.com.br>
2005-08-24 15:54 ` Re: Postgresql replication Chris Browne <cbbrowne@acm.org>
2005-08-24 17:31 ` Re: Postgresql replication Carlos Henrique Reimer <carlosreimer@yahoo.com.br>
2005-08-24 23:22 ` Re: Postgresql replication William Yu <wyu@talisys.com>
2005-08-25 00:46 ` Re: Postgresql replication Aly Dharshi <aly.dharshi@telus.net>
2005-08-25 07:01 ` Re: Postgresql replication William Yu <wyu@talisys.com>
2005-08-25 11:44 ` Re: Postgresql replication Bohdan Linda <bohdan.linda@seznam.cz>
@ 2005-08-25 11:50 ` Tino Wildenhain <tino@wildenhain.de>
2005-08-25 12:34 ` Re: Postgresql replication William Yu <wyu@talisys.com>
4 siblings, 1 reply; 91+ messages in thread
From: Tino Wildenhain @ 2005-08-25 11:50 UTC (permalink / raw)
To: Bohdan Linda <bohdan.linda@seznam.cz>; +Cc: pgsql-general
Bohdan Linda schrieb:
> I would have a slight offtopic question, this is issue only of pgsql or
> there are some other db solutions which have good performance when doing
> this kind of replication across the world.
it depends entirely on your application. There is no "one size
fits all"
For example to have an online backup, WAL archiving to remote
sites is often sufficient.
However you cannot have synchronous multimaster replication
over slow lines and high performance with updates the same
time.
There is always a tradeoff in any (even in high cost
commercial solutions) you have to carefully consider.
>
> Regards,
> Bohdan
>
> On Thu, Aug 25, 2005 at 09:01:49AM +0200, William Yu wrote:
>
>>It provides pseudo relief if all your servers are in the same building.
>>Having a front-end pgpool connector pointing to servers across the world
>>is not workable -- performance ends up being completely decrepit due to
>>the high latency.
>>
>>Which is the problem we face. Great, you've got multiple servers for
>>failover. Too bad it doesn't do much good if your building gets hit by
>>fire/earthquake/hurricane/etc.
This would remove the application using that data too, or not? ;)
^ permalink raw reply [nested|flat] 91+ messages in thread
* Re: Postgresql replication
2005-08-24 12:21 Postgresql replication Carlos Henrique Reimer <carlosreimer@yahoo.com.br>
2005-08-24 15:54 ` Re: Postgresql replication Chris Browne <cbbrowne@acm.org>
2005-08-24 17:31 ` Re: Postgresql replication Carlos Henrique Reimer <carlosreimer@yahoo.com.br>
2005-08-24 23:22 ` Re: Postgresql replication William Yu <wyu@talisys.com>
2005-08-25 00:46 ` Re: Postgresql replication Aly Dharshi <aly.dharshi@telus.net>
2005-08-25 07:01 ` Re: Postgresql replication William Yu <wyu@talisys.com>
2005-08-25 11:44 ` Re: Postgresql replication Bohdan Linda <bohdan.linda@seznam.cz>
2005-08-25 11:50 ` Re: Postgresql replication Tino Wildenhain <tino@wildenhain.de>
@ 2005-08-25 12:34 ` William Yu <wyu@talisys.com>
2005-08-25 13:19 ` Re: Postgresql replication Tino Wildenhain <tino@wildenhain.de>
0 siblings, 1 reply; 91+ messages in thread
From: William Yu @ 2005-08-25 12:34 UTC (permalink / raw)
To: pgsql-general
Tino Wildenhain wrote:
>>> Which is the problem we face. Great, you've got multiple servers for
>>> failover. Too bad it doesn't do much good if your building gets hit
>>> by fire/earthquake/hurricane/etc.
>
>
> This would remove the application using that data too, or not? ;)
Yes and no. If your DB is an internal app for a company where the users
are in the same building as the servers, doesn't matter really I guess.
Meteor hitting the building would kill the users in addition to the
server so nobody will be calling you to complain about system downtime.
If your app is used by external customers who are all across the
country, they want to continue to still use your software even though
you and data center #1 are 6 feet under due to an 8.0 earthquake. They
want auto-failover to data center #2 which is in close proximity to CIA
headquarters and other juicy terrorist targets.
^ permalink raw reply [nested|flat] 91+ messages in thread
* Re: Postgresql replication
2005-08-24 12:21 Postgresql replication Carlos Henrique Reimer <carlosreimer@yahoo.com.br>
2005-08-24 15:54 ` Re: Postgresql replication Chris Browne <cbbrowne@acm.org>
2005-08-24 17:31 ` Re: Postgresql replication Carlos Henrique Reimer <carlosreimer@yahoo.com.br>
2005-08-24 23:22 ` Re: Postgresql replication William Yu <wyu@talisys.com>
2005-08-25 00:46 ` Re: Postgresql replication Aly Dharshi <aly.dharshi@telus.net>
2005-08-25 07:01 ` Re: Postgresql replication William Yu <wyu@talisys.com>
2005-08-25 11:44 ` Re: Postgresql replication Bohdan Linda <bohdan.linda@seznam.cz>
2005-08-25 11:50 ` Re: Postgresql replication Tino Wildenhain <tino@wildenhain.de>
2005-08-25 12:34 ` Re: Postgresql replication William Yu <wyu@talisys.com>
@ 2005-08-25 13:19 ` Tino Wildenhain <tino@wildenhain.de>
2005-08-25 19:02 ` Re: Postgresql replication William Yu <wyu@talisys.com>
0 siblings, 1 reply; 91+ messages in thread
From: Tino Wildenhain @ 2005-08-25 13:19 UTC (permalink / raw)
To: William Yu <wyu@talisys.com>; +Cc: pgsql-general
William Yu schrieb:
> Tino Wildenhain wrote:
>
>>>> Which is the problem we face. Great, you've got multiple servers for
>>>> failover. Too bad it doesn't do much good if your building gets hit
>>>> by fire/earthquake/hurricane/etc.
>>
>>
>>
>> This would remove the application using that data too, or not? ;)
>
>
> Yes and no. If your DB is an internal app for a company where the users
> are in the same building as the servers, doesn't matter really I guess.
> Meteor hitting the building would kill the users in addition to the
> server so nobody will be calling you to complain about system downtime.
>
> If your app is used by external customers who are all across the
> country, they want to continue to still use your software even though
> you and data center #1 are 6 feet under due to an 8.0 earthquake. They
> want auto-failover to data center #2 which is in close proximity to CIA
> headquarters and other juicy terrorist targets.
Sure, but in this case a "simple" async master-slave (slony-1)
and the usual failover (also DNS-failover) should be sufficient.
^ permalink raw reply [nested|flat] 91+ messages in thread
* Re: Postgresql replication
2005-08-24 12:21 Postgresql replication Carlos Henrique Reimer <carlosreimer@yahoo.com.br>
2005-08-24 15:54 ` Re: Postgresql replication Chris Browne <cbbrowne@acm.org>
2005-08-24 17:31 ` Re: Postgresql replication Carlos Henrique Reimer <carlosreimer@yahoo.com.br>
2005-08-24 23:22 ` Re: Postgresql replication William Yu <wyu@talisys.com>
2005-08-25 00:46 ` Re: Postgresql replication Aly Dharshi <aly.dharshi@telus.net>
2005-08-25 07:01 ` Re: Postgresql replication William Yu <wyu@talisys.com>
2005-08-25 11:44 ` Re: Postgresql replication Bohdan Linda <bohdan.linda@seznam.cz>
2005-08-25 11:50 ` Re: Postgresql replication Tino Wildenhain <tino@wildenhain.de>
2005-08-25 12:34 ` Re: Postgresql replication William Yu <wyu@talisys.com>
2005-08-25 13:19 ` Re: Postgresql replication Tino Wildenhain <tino@wildenhain.de>
@ 2005-08-25 19:02 ` William Yu <wyu@talisys.com>
0 siblings, 0 replies; 91+ messages in thread
From: William Yu @ 2005-08-25 19:02 UTC (permalink / raw)
To: pgsql-general
Tino Wildenhain wrote:
>> If your app is used by external customers who are all across the
>> country, they want to continue to still use your software even though
>> you and data center #1 are 6 feet under due to an 8.0 earthquake. They
>> want auto-failover to data center #2 which is in close proximity to
>> CIA headquarters and other juicy terrorist targets.
>
>
> Sure, but in this case a "simple" async master-slave (slony-1)
> and the usual failover (also DNS-failover) should be sufficient.
Workable if you're willing to keep multiple sets of servers idling on
stand-by only for catastrophic failure. For temporary failure, I believe
at this time Slony requires manual admin work to resync a promoted
master and demote it back to slave. Not a big deal if the downtime
doesn't happen often but when you're depending a cross-country internet
connection, it happens far more often than you like to deal with.
Of course, we're also using multi-master replication to load balance
traffic across multiple servers because the price jump from going 2xDC
to 4xDC is major. So we have a bunch of 2x1 and 2xDC servers across the
country serving our customers versus 1 big server for primary access and
1 big server as a standby.
^ permalink raw reply [nested|flat] 91+ messages in thread
* Re: Postgresql replication
2005-08-24 12:21 Postgresql replication Carlos Henrique Reimer <carlosreimer@yahoo.com.br>
2005-08-24 15:54 ` Re: Postgresql replication Chris Browne <cbbrowne@acm.org>
2005-08-24 17:31 ` Re: Postgresql replication Carlos Henrique Reimer <carlosreimer@yahoo.com.br>
2005-08-24 23:22 ` Re: Postgresql replication William Yu <wyu@talisys.com>
2005-08-25 00:46 ` Re: Postgresql replication Aly Dharshi <aly.dharshi@telus.net>
2005-08-25 07:01 ` Re: Postgresql replication William Yu <wyu@talisys.com>
2005-08-25 11:44 ` Re: Postgresql replication Bohdan Linda <bohdan.linda@seznam.cz>
@ 2005-08-25 12:03 ` William Yu <wyu@talisys.com>
2005-08-25 13:06 ` Re: Postgresql replication David Goodenough <david.goodenough@btconnect.com>
4 siblings, 1 reply; 91+ messages in thread
From: William Yu @ 2005-08-25 12:03 UTC (permalink / raw)
To: pgsql-general
As far as I know, nobody has a generic solution for multi-master
replication where servers are not in close proximity. Single master
replication? Doable. Application specific conflict resolution? Doable.
Off the shelf package that somehow knows financial transactions on a
server shouldn't be duplicated on another? Uhh...I'd be wary of trying
it out myself.
Bohdan Linda wrote:
> I would have a slight offtopic question, this is issue only of pgsql or
> there are some other db solutions which have good performance when doing
> this kind of replication across the world.
>
> Regards,
> Bohdan
>
> On Thu, Aug 25, 2005 at 09:01:49AM +0200, William Yu wrote:
>
>>It provides pseudo relief if all your servers are in the same building.
>>Having a front-end pgpool connector pointing to servers across the world
>>is not workable -- performance ends up being completely decrepit due to
>>the high latency.
>>
>>Which is the problem we face. Great, you've got multiple servers for
>>failover. Too bad it doesn't do much good if your building gets hit by
>>fire/earthquake/hurricane/etc.
^ permalink raw reply [nested|flat] 91+ messages in thread
* Re: Postgresql replication
2005-08-24 12:21 Postgresql replication Carlos Henrique Reimer <carlosreimer@yahoo.com.br>
2005-08-24 15:54 ` Re: Postgresql replication Chris Browne <cbbrowne@acm.org>
2005-08-24 17:31 ` Re: Postgresql replication Carlos Henrique Reimer <carlosreimer@yahoo.com.br>
2005-08-24 23:22 ` Re: Postgresql replication William Yu <wyu@talisys.com>
2005-08-25 00:46 ` Re: Postgresql replication Aly Dharshi <aly.dharshi@telus.net>
2005-08-25 07:01 ` Re: Postgresql replication William Yu <wyu@talisys.com>
2005-08-25 11:44 ` Re: Postgresql replication Bohdan Linda <bohdan.linda@seznam.cz>
2005-08-25 12:03 ` Re: Postgresql replication William Yu <wyu@talisys.com>
@ 2005-08-25 13:06 ` David Goodenough <david.goodenough@btconnect.com>
2005-08-25 16:23 ` Re: Postgresql replication Chris Browne <cbbrowne@acm.org>
2005-08-25 21:13 ` Re: Postgresql replication William Yu <wyu@talisys.com>
0 siblings, 2 replies; 91+ messages in thread
From: David Goodenough @ 2005-08-25 13:06 UTC (permalink / raw)
To: pgsql-general
On Thursday 25 August 2005 13:03, William Yu wrote:
> As far as I know, nobody has a generic solution for multi-master
> replication where servers are not in close proximity. Single master
> replication? Doable. Application specific conflict resolution? Doable.
> Off the shelf package that somehow knows financial transactions on a
> server shouldn't be duplicated on another? Uhh...I'd be wary of trying
> it out myself.
The most obvious one that does exactly this (generic multi-master
replication) is Lotus Domino. It is not a relational DB, but not sufficiently
far off to stop the analogy.
Domino marks each document with a binary value which identifies the
server (built from a hash of the server name and the time the DB was
created) and a timestamp when it was last modified, and also each document
(record) has an ID (like OIDs). More recent versions also do this at a field
level to avoid conflicts and speed replication. When two servers replicate
they look for all documents modified since the last replication time, and
compare the list. Those only modified on one server are copied across
to the other server replacing the old record and carrying the updated on
server and timestamp with them. When a document is deleted in Domino it
actually does not dissapear, it is reduced to a deletion stub, and this gets
replicated as it has the same ID as the original record. Those that have been
modified on both sides are copied to the other DB, but both records remain and
it is left to the user to resolve conflicts. Field level replication reduces
the need for this considerably. Periodically the deletion stubs are purged,
once all known replicas have replicated.
Domino has absolutely no concept of a master DB.
Obviously this scheme would be difficult to do on a pure relational system.
But with triggers and a few standard fields it would not be impossible to
do for a limited application set. How the user would resolve conflicts would
also be application specific I suspect and how one would relate having two
version of a record in the DB then they both have a field which is supposed to
be unique is also a problem that would have to be resolved (Domino does not
have the concept of unique keys).
David
>
> Bohdan Linda wrote:
> > I would have a slight offtopic question, this is issue only of pgsql or
> > there are some other db solutions which have good performance when doing
> > this kind of replication across the world.
> >
> > Regards,
> > Bohdan
> >
> > On Thu, Aug 25, 2005 at 09:01:49AM +0200, William Yu wrote:
> >>It provides pseudo relief if all your servers are in the same building.
> >>Having a front-end pgpool connector pointing to servers across the world
> >>is not workable -- performance ends up being completely decrepit due to
> >>the high latency.
> >>
> >>Which is the problem we face. Great, you've got multiple servers for
> >>failover. Too bad it doesn't do much good if your building gets hit by
> >>fire/earthquake/hurricane/etc.
>
> ---------------------------(end of broadcast)---------------------------
> TIP 1: if posting/reading through Usenet, please send an appropriate
> subscribe-nomail command to majordomo@postgresql.org so that your
> message can get through to the mailing list cleanly
^ permalink raw reply [nested|flat] 91+ messages in thread
* Re: Postgresql replication
2005-08-24 12:21 Postgresql replication Carlos Henrique Reimer <carlosreimer@yahoo.com.br>
2005-08-24 15:54 ` Re: Postgresql replication Chris Browne <cbbrowne@acm.org>
2005-08-24 17:31 ` Re: Postgresql replication Carlos Henrique Reimer <carlosreimer@yahoo.com.br>
2005-08-24 23:22 ` Re: Postgresql replication William Yu <wyu@talisys.com>
2005-08-25 00:46 ` Re: Postgresql replication Aly Dharshi <aly.dharshi@telus.net>
2005-08-25 07:01 ` Re: Postgresql replication William Yu <wyu@talisys.com>
2005-08-25 11:44 ` Re: Postgresql replication Bohdan Linda <bohdan.linda@seznam.cz>
2005-08-25 12:03 ` Re: Postgresql replication William Yu <wyu@talisys.com>
2005-08-25 13:06 ` Re: Postgresql replication David Goodenough <david.goodenough@btconnect.com>
@ 2005-08-25 16:23 ` Chris Browne <cbbrowne@acm.org>
1 sibling, 0 replies; 91+ messages in thread
From: Chris Browne @ 2005-08-25 16:23 UTC (permalink / raw)
To: pgsql-general
david.goodenough@btconnect.com (David Goodenough) writes:
> On Thursday 25 August 2005 13:03, William Yu wrote:
>> As far as I know, nobody has a generic solution for multi-master
>> replication where servers are not in close proximity. Single master
>> replication? Doable. Application specific conflict resolution?
>> Doable. Off the shelf package that somehow knows financial
>> transactions on a server shouldn't be duplicated on another?
>> Uhh...I'd be wary of trying it out myself.
>
> The most obvious one that does exactly this (generic multi-master
> replication) is Lotus Domino. It is not a relational DB, but not
> sufficiently far off to stop the analogy.
There's a better known case, and that's PalmOS "PalmSync."
It does fairly much the same thing as Lotus Notes(tm).
In both cases, they are doing something that works reasonably well for
data that looks somewhat like "documents." Conflict resolution at the
"document" level is something that users can handle pretty well by
hand.
Unfortunately, for data that's more at the "hordes of little facts"
level, conflict resolution is a tough problem :-(.
--
let name="cbbrowne" and tld="cbbrowne.com" in String.concat "@" [name;tld];;
http://www.ntlug.org/~cbbrowne/internet.html
Rules of the Evil Overlord #223. "I will install a fire extinguisher
in every room -- three, if the room contains vital equipment or
volatile chemicals." <http://www.eviloverlord.com/;
^ permalink raw reply [nested|flat] 91+ messages in thread
* Re: Postgresql replication
2005-08-24 12:21 Postgresql replication Carlos Henrique Reimer <carlosreimer@yahoo.com.br>
2005-08-24 15:54 ` Re: Postgresql replication Chris Browne <cbbrowne@acm.org>
2005-08-24 17:31 ` Re: Postgresql replication Carlos Henrique Reimer <carlosreimer@yahoo.com.br>
2005-08-24 23:22 ` Re: Postgresql replication William Yu <wyu@talisys.com>
2005-08-25 00:46 ` Re: Postgresql replication Aly Dharshi <aly.dharshi@telus.net>
2005-08-25 07:01 ` Re: Postgresql replication William Yu <wyu@talisys.com>
2005-08-25 11:44 ` Re: Postgresql replication Bohdan Linda <bohdan.linda@seznam.cz>
2005-08-25 12:03 ` Re: Postgresql replication William Yu <wyu@talisys.com>
2005-08-25 13:06 ` Re: Postgresql replication David Goodenough <david.goodenough@btconnect.com>
@ 2005-08-25 21:13 ` William Yu <wyu@talisys.com>
2005-08-25 21:48 ` Re: Postgresql replication Chris Browne <cbbrowne@acm.org>
2005-08-25 23:00 ` Re: Postgresql replication Chris Travers <chris@metatrontech.com>
1 sibling, 2 replies; 91+ messages in thread
From: William Yu @ 2005-08-25 21:13 UTC (permalink / raw)
To: pgsql-general
David Goodenough wrote:
> The most obvious one that does exactly this (generic multi-master
> replication) is Lotus Domino. It is not a relational DB, but not sufficiently
> far off to stop the analogy.
>
> Domino marks each document with a binary value which identifies the
> server (built from a hash of the server name and the time the DB was
> created) and a timestamp when it was last modified, and also each document
> (record) has an ID (like OIDs). More recent versions also do this at a field
> level to avoid conflicts and speed replication. When two servers replicate
This system sounds ok for documents and general data that can always be
revived via version control/history. But I can't see how this would work
for financial transactions where you're dealing with money and bank
accounts. Suppose I have $100 in my account. I decided to login to
multiple servers and wire transfer $100 to another account on every
server. And I hit submit exactly at the same time for every server so
check. Sure they can resolve the conflict afterwards in terms of saying
in terms of which transfer to kill off. But the fact is that my other
account has that N x $100 already and I've just fleeced the bank.
^ permalink raw reply [nested|flat] 91+ messages in thread
* Re: Postgresql replication
2005-08-24 12:21 Postgresql replication Carlos Henrique Reimer <carlosreimer@yahoo.com.br>
2005-08-24 15:54 ` Re: Postgresql replication Chris Browne <cbbrowne@acm.org>
2005-08-24 17:31 ` Re: Postgresql replication Carlos Henrique Reimer <carlosreimer@yahoo.com.br>
2005-08-24 23:22 ` Re: Postgresql replication William Yu <wyu@talisys.com>
2005-08-25 00:46 ` Re: Postgresql replication Aly Dharshi <aly.dharshi@telus.net>
2005-08-25 07:01 ` Re: Postgresql replication William Yu <wyu@talisys.com>
2005-08-25 11:44 ` Re: Postgresql replication Bohdan Linda <bohdan.linda@seznam.cz>
2005-08-25 12:03 ` Re: Postgresql replication William Yu <wyu@talisys.com>
2005-08-25 13:06 ` Re: Postgresql replication David Goodenough <david.goodenough@btconnect.com>
2005-08-25 21:13 ` Re: Postgresql replication William Yu <wyu@talisys.com>
@ 2005-08-25 21:48 ` Chris Browne <cbbrowne@acm.org>
1 sibling, 0 replies; 91+ messages in thread
From: Chris Browne @ 2005-08-25 21:48 UTC (permalink / raw)
To: pgsql-general
William Yu <wyu@talisys.com> writes:
> David Goodenough wrote:
>> The most obvious one that does exactly this (generic multi-master
>> replication) is Lotus Domino. It is not a relational DB, but not sufficiently
>> far off to stop the analogy.
>> Domino marks each document with a binary value which identifies the
>> server (built from a hash of the server name and the time the DB was
>> created) and a timestamp when it was last modified, and also each document
>> (record) has an ID (like OIDs). More recent versions also do this at a field
>> level to avoid conflicts and speed replication. When two servers replicate
>
> This system sounds ok for documents and general data that can always
> be revived via version control/history. But I can't see how this
> would work for financial transactions where you're dealing with
> money and bank accounts. Suppose I have $100 in my account. I
> decided to login to multiple servers and wire transfer $100 to
> another account on every server. And I hit submit exactly at the
> same time for every server so check. Sure they can resolve the
> conflict afterwards in terms of saying in terms of which transfer to
> kill off. But the fact is that my other account has that N x $100
> already and I've just fleeced the bank.
There are two pretty reasonable ways to address this:
1. Your application does not replicate balances; those are always
computed locally. Only *transactions* are relayed.
2. Balance updates take place as a special kind of "delta update"
where replication transfers around (old.balance - new.balance) instead
of either of the values.
Either of these leads to the nifty case where that bank discovers that
you have overdrawn your account, and then takes whatever actions they
deem are appropriate next.
Such as billing you $29 for each overdraft transaction.
You're hardly going to be retiring to the Bahamas on Nx$100, are you
:-).
--
select 'cbbrowne' || '@' || 'ntlug.org';
http://cbbrowne.com/info/internet.html
Rules of the Evil Overlord #211. "If my chief engineer displeases me,
he will be shot, not imprisoned in the dungeon or beyond the traps he
helped design." <http://www.eviloverlord.com/;
^ permalink raw reply [nested|flat] 91+ messages in thread
* Re: Postgresql replication
2005-08-24 12:21 Postgresql replication Carlos Henrique Reimer <carlosreimer@yahoo.com.br>
2005-08-24 15:54 ` Re: Postgresql replication Chris Browne <cbbrowne@acm.org>
2005-08-24 17:31 ` Re: Postgresql replication Carlos Henrique Reimer <carlosreimer@yahoo.com.br>
2005-08-24 23:22 ` Re: Postgresql replication William Yu <wyu@talisys.com>
2005-08-25 00:46 ` Re: Postgresql replication Aly Dharshi <aly.dharshi@telus.net>
2005-08-25 07:01 ` Re: Postgresql replication William Yu <wyu@talisys.com>
2005-08-25 11:44 ` Re: Postgresql replication Bohdan Linda <bohdan.linda@seznam.cz>
2005-08-25 12:03 ` Re: Postgresql replication William Yu <wyu@talisys.com>
2005-08-25 13:06 ` Re: Postgresql replication David Goodenough <david.goodenough@btconnect.com>
2005-08-25 21:13 ` Re: Postgresql replication William Yu <wyu@talisys.com>
@ 2005-08-25 23:00 ` Chris Travers <chris@metatrontech.com>
2005-08-26 15:35 ` Re: Postgresql replication Chris Browne <cbbrowne@acm.org>
1 sibling, 1 reply; 91+ messages in thread
From: Chris Travers @ 2005-08-25 23:00 UTC (permalink / raw)
To: William Yu <wyu@talisys.com>; +Cc: pgsql-general
William Yu wrote:
>
> This system sounds ok for documents and general data that can always
> be revived via version control/history. But I can't see how this would
> work for financial transactions where you're dealing with money and
> bank accounts. Suppose I have $100 in my account. I decided to login
> to multiple servers and wire transfer $100 to another account on every
> server. And I hit submit exactly at the same time for every server so
> check. Sure they can resolve the conflict afterwards in terms of
> saying in terms of which transfer to kill off. But the fact is that my
> other account has that N x $100 already and I've just fleeced the bank.
>
Hmmm.......
I think you should realize by now that no multimaster async replication
solution is going to adequately work for something like these financial
transactions. You need either synchronous or single-master simply
because you need to have a concept that there is a *single*
authoritative source of the current status and balance on the account.
You can't really expect async-replicated servers to know about
transactions that haven't been replicated yet can you?
In other words this problem is inherent to multimaster async
replication. There is no way around it. If there was it would either
not be async or not be multimaster :-)
I have built my own async multimaster replication systems for some
applications. One of them is actually a system where you have two and
only two masters which replicate back and forth. The trick I used here
was for each master to use a different SERIAL field as its primary key
so there are no duplicates. Another option is to have a compound
primary key which is a serial and a server-hash (this would scale to a
larger number of masters).
Best Wishes,
Chris Travers
Metatron Technology Consulting
Attachments:
chris.vcf (text/x-vcard, 125B) download
begin:vcard
fn:Chris Travers
n:Travers;Chris
email;internet:chris@metatrontech.com
x-mozilla-html:FALSE
version:2.1
end:vcard
^ permalink raw reply [nested|flat] 91+ messages in thread
* Re: Postgresql replication
2005-08-24 12:21 Postgresql replication Carlos Henrique Reimer <carlosreimer@yahoo.com.br>
2005-08-24 15:54 ` Re: Postgresql replication Chris Browne <cbbrowne@acm.org>
2005-08-24 17:31 ` Re: Postgresql replication Carlos Henrique Reimer <carlosreimer@yahoo.com.br>
2005-08-24 23:22 ` Re: Postgresql replication William Yu <wyu@talisys.com>
2005-08-25 00:46 ` Re: Postgresql replication Aly Dharshi <aly.dharshi@telus.net>
2005-08-25 07:01 ` Re: Postgresql replication William Yu <wyu@talisys.com>
2005-08-25 11:44 ` Re: Postgresql replication Bohdan Linda <bohdan.linda@seznam.cz>
2005-08-25 12:03 ` Re: Postgresql replication William Yu <wyu@talisys.com>
2005-08-25 13:06 ` Re: Postgresql replication David Goodenough <david.goodenough@btconnect.com>
2005-08-25 21:13 ` Re: Postgresql replication William Yu <wyu@talisys.com>
2005-08-25 23:00 ` Re: Postgresql replication Chris Travers <chris@metatrontech.com>
@ 2005-08-26 15:35 ` Chris Browne <cbbrowne@acm.org>
2005-08-26 22:50 ` Re: Postgresql replication William Yu <wyu@talisys.com>
0 siblings, 1 reply; 91+ messages in thread
From: Chris Browne @ 2005-08-26 15:35 UTC (permalink / raw)
To: pgsql-general
chris@verkiel.metatrontech.com (Chris Travers) writes:
> William Yu wrote:
>> This system sounds ok for documents and general data that can
>> always be revived via version control/history. But I can't see how
>> this would work for financial transactions where you're dealing
>> with money and bank accounts. Suppose I have $100 in my account. I
>> decided to login to multiple servers and wire transfer $100 to
>> another account on every server. And I hit submit exactly at the
>> same time for every server so check. Sure they can resolve the
>> conflict afterwards in terms of saying in terms of which transfer
>> to kill off. But the fact is that my other account has that N x
>> $100 already and I've just fleeced the bank.
>>
> Hmmm.......
>
> I think you should realize by now that no multimaster async
> replication solution is going to adequately work for something like
> these financial transactions. You need either synchronous or
> single-master simply because you need to have a concept that there
> is a *single* authoritative source of the current status and balance
> on the account. You can't really expect async-replicated servers to
> know about transactions that haven't been replicated yet can you?
Actually, I disagree. There _is_ a way to cope with that issue.
The methodology involves not having a Balance Column anywhere in the
database, where activity *always* involves recording the "deltas."
If the DEBIT and the CREDIT for each financial transaction are always
committed, in any given place, as part of a single transaction, then
there is no reason for the system to fall out of balance.
This doesn't prevent the scenario of someone logging into many servers
simultaneously and emptying their account multiple times. But there
are other ways of addressing that problem.
This sort of scenario is almost certainly the case for the
stupendously enormous quantities of billing transactions that result
from long distance and cellular activity in the telco industry.
I'm pretty sure that they _don't_ track balance updates for each
transaction that applies to a customer's account. You could, via one
form of trickery or another, "overdraw" your account by a fairly hefty
amount, and they probably won't notice for a day or even three. But
once they notice/estimate that the Gentle Caller has built up some
dangerously high balance, they'll warn of impending discontinuation of
service if some sum isn't paid by some date.
This sort of analysis does not require that any location is considered
"authoritative" for the balance of the account. It suffices to have
some sort of "transaction cutoff," that the analysis is sure to
include all transactions up to *yesterday* at midnight UTC.
Some "bad things" might take place during the up-to-24h lag; the
assumption is that that won't be material, or that you can do other
sorts of traffic analysis to warn of impending problem accounts...
--
output = ("cbbrowne" "@" "ntlug.org")
http://www.ntlug.org/~cbbrowne/sap.html
"... The book [CLtL1] is about 400 pages of 8.5" by 11" Dover output.
Apparently the publisher and typesetter decided that this made the
lines too wide for easy reading, so they will use a 6" by 9" format.
This will make the shape of the book approximately cubical. Now,
there are 26 chapters counting the index, and a Rubik's cube has 26
exterior cubies. I'll let you individually extrapolate and fantasize
from there." -- GLS
^ permalink raw reply [nested|flat] 91+ messages in thread
* Re: Postgresql replication
2005-08-24 12:21 Postgresql replication Carlos Henrique Reimer <carlosreimer@yahoo.com.br>
2005-08-24 15:54 ` Re: Postgresql replication Chris Browne <cbbrowne@acm.org>
2005-08-24 17:31 ` Re: Postgresql replication Carlos Henrique Reimer <carlosreimer@yahoo.com.br>
2005-08-24 23:22 ` Re: Postgresql replication William Yu <wyu@talisys.com>
2005-08-25 00:46 ` Re: Postgresql replication Aly Dharshi <aly.dharshi@telus.net>
2005-08-25 07:01 ` Re: Postgresql replication William Yu <wyu@talisys.com>
2005-08-25 11:44 ` Re: Postgresql replication Bohdan Linda <bohdan.linda@seznam.cz>
2005-08-25 12:03 ` Re: Postgresql replication William Yu <wyu@talisys.com>
2005-08-25 13:06 ` Re: Postgresql replication David Goodenough <david.goodenough@btconnect.com>
2005-08-25 21:13 ` Re: Postgresql replication William Yu <wyu@talisys.com>
2005-08-25 23:00 ` Re: Postgresql replication Chris Travers <chris@metatrontech.com>
2005-08-26 15:35 ` Re: Postgresql replication Chris Browne <cbbrowne@acm.org>
@ 2005-08-26 22:50 ` William Yu <wyu@talisys.com>
2005-08-28 03:35 ` Re: Postgresql replication Chris Browne <cbbrowne@acm.org>
0 siblings, 1 reply; 91+ messages in thread
From: William Yu @ 2005-08-26 22:50 UTC (permalink / raw)
To: pgsql-general
Chris Browne wrote:
> I'm pretty sure that they _don't_ track balance updates for each
> transaction that applies to a customer's account. You could, via one
> form of trickery or another, "overdraw" your account by a fairly hefty
> amount, and they probably won't notice for a day or even three. But
> once they notice/estimate that the Gentle Caller has built up some
> dangerously high balance, they'll warn of impending discontinuation of
> service if some sum isn't paid by some date.
This works for companies that have some degree of power over their
customers. E.g. pay up or we disconnect your service. Return your
overdrafts/pay your fees or we mess up your credit.
This doesn't work if it's a small company who's account has been
emptied. Sure the bank will refuse to honor the check but then that
company will be hit with overdraw penalties and possible legal penalties
to the payee for the bounced check.
The warning threshold system is easy to implement but there will always
be corner cases where the warning is not soon enough or a single payment
wipes out ~ 100% of the account. Warn too often and it'll be ignored by
people as a "boy crying wolf" alarm.
^ permalink raw reply [nested|flat] 91+ messages in thread
* Re: Postgresql replication
2005-08-24 12:21 Postgresql replication Carlos Henrique Reimer <carlosreimer@yahoo.com.br>
2005-08-24 15:54 ` Re: Postgresql replication Chris Browne <cbbrowne@acm.org>
2005-08-24 17:31 ` Re: Postgresql replication Carlos Henrique Reimer <carlosreimer@yahoo.com.br>
2005-08-24 23:22 ` Re: Postgresql replication William Yu <wyu@talisys.com>
2005-08-25 00:46 ` Re: Postgresql replication Aly Dharshi <aly.dharshi@telus.net>
2005-08-25 07:01 ` Re: Postgresql replication William Yu <wyu@talisys.com>
2005-08-25 11:44 ` Re: Postgresql replication Bohdan Linda <bohdan.linda@seznam.cz>
2005-08-25 12:03 ` Re: Postgresql replication William Yu <wyu@talisys.com>
2005-08-25 13:06 ` Re: Postgresql replication David Goodenough <david.goodenough@btconnect.com>
2005-08-25 21:13 ` Re: Postgresql replication William Yu <wyu@talisys.com>
2005-08-25 23:00 ` Re: Postgresql replication Chris Travers <chris@metatrontech.com>
2005-08-26 15:35 ` Re: Postgresql replication Chris Browne <cbbrowne@acm.org>
2005-08-26 22:50 ` Re: Postgresql replication William Yu <wyu@talisys.com>
@ 2005-08-28 03:35 ` Chris Browne <cbbrowne@acm.org>
0 siblings, 0 replies; 91+ messages in thread
From: Chris Browne @ 2005-08-28 03:35 UTC (permalink / raw)
To: pgsql-general
William Yu <wyu@talisys.com> writes:
> Chris Browne wrote:
>> I'm pretty sure that they _don't_ track balance updates for each
>> transaction that applies to a customer's account. You could, via one
>> form of trickery or another, "overdraw" your account by a fairly hefty
>> amount, and they probably won't notice for a day or even three. But
>> once they notice/estimate that the Gentle Caller has built up some
>> dangerously high balance, they'll warn of impending discontinuation of
>> service if some sum isn't paid by some date.
>
> This works for companies that have some degree of power over their
> customers. E.g. pay up or we disconnect your service. Return your
> overdrafts/pay your fees or we mess up your credit.
>
> This doesn't work if it's a small company who's account has been
> emptied. Sure the bank will refuse to honor the check but then that
> company will be hit with overdraw penalties and possible legal
> penalties to the payee for the bounced check.
>
> The warning threshold system is easy to implement but there will
> always be corner cases where the warning is not soon enough or a
> single payment wipes out ~ 100% of the account. Warn too often and
> it'll be ignored by people as a "boy crying wolf" alarm.
In a context where there is no "degree of power over their customers,"
I would hardly think that the presence/lack of automated controls or
presence/lack of balance synchronization is particularly material.
In other words, if trying to apply policies is going to forcibly
break, then building the data system may have been a futile exercise
in the first place. And trying to distribute the system may again be
a *business* mistake that admits no technical solution.
If that's the case, then we can conclude that replication is no
solution, and that the organization should improve connectivity for
their single centralized system.
That may be the case, but is the uninteresting case, as it amounts to
throwing our hands up, saying "no answers; you can't have a
distributed system," and giving up on trying anything further. No
point to further discussion...
--
let name="cbbrowne" and tld="acm.org" in String.concat "@" [name;tld];;
http://cbbrowne.com/info/linux.html
"There is no reason anyone would want a computer in their home".
-- Ken Olson, Pres. and founder of Digital Equipment Corp. 1977
^ permalink raw reply [nested|flat] 91+ messages in thread
* Re: Postgresql replication
2005-08-24 12:21 Postgresql replication Carlos Henrique Reimer <carlosreimer@yahoo.com.br>
2005-08-24 15:54 ` Re: Postgresql replication Chris Browne <cbbrowne@acm.org>
2005-08-24 17:31 ` Re: Postgresql replication Carlos Henrique Reimer <carlosreimer@yahoo.com.br>
2005-08-24 23:22 ` Re: Postgresql replication William Yu <wyu@talisys.com>
2005-08-25 00:46 ` Re: Postgresql replication Aly Dharshi <aly.dharshi@telus.net>
2005-08-25 07:01 ` Re: Postgresql replication William Yu <wyu@talisys.com>
2005-08-25 11:44 ` Re: Postgresql replication Bohdan Linda <bohdan.linda@seznam.cz>
@ 2005-08-25 14:56 ` Brad Nicholson <bnichols@ca.afilias.info>
2005-08-25 21:17 ` Re: Postgresql replication Chris Browne <cbbrowne@acm.org>
4 siblings, 1 reply; 91+ messages in thread
From: Brad Nicholson @ 2005-08-25 14:56 UTC (permalink / raw)
To: pgsql-general
Bohdan Linda wrote:
>I would have a slight offtopic question, this is issue only of pgsql or
>there are some other db solutions which have good performance when doing
>this kind of replication across the world.
>
>
>
It all depends on the quality of the connection Node A to Node B. If
connectivity is poor, then it is impossible to have good performance
doing anything across that connection.
--
Brad Nicholson 416-673-4106
Database Administrator, Afilias Canada Corp.
^ permalink raw reply [nested|flat] 91+ messages in thread
* Re: Postgresql replication
2005-08-24 12:21 Postgresql replication Carlos Henrique Reimer <carlosreimer@yahoo.com.br>
2005-08-24 15:54 ` Re: Postgresql replication Chris Browne <cbbrowne@acm.org>
2005-08-24 17:31 ` Re: Postgresql replication Carlos Henrique Reimer <carlosreimer@yahoo.com.br>
2005-08-24 23:22 ` Re: Postgresql replication William Yu <wyu@talisys.com>
2005-08-25 00:46 ` Re: Postgresql replication Aly Dharshi <aly.dharshi@telus.net>
2005-08-25 07:01 ` Re: Postgresql replication William Yu <wyu@talisys.com>
2005-08-25 11:44 ` Re: Postgresql replication Bohdan Linda <bohdan.linda@seznam.cz>
2005-08-25 14:56 ` Re: Postgresql replication Brad Nicholson <bnichols@ca.afilias.info>
@ 2005-08-25 21:17 ` Chris Browne <cbbrowne@acm.org>
0 siblings, 0 replies; 91+ messages in thread
From: Chris Browne @ 2005-08-25 21:17 UTC (permalink / raw)
To: pgsql-general
bnichols@ca.afilias.info (Brad Nicholson) writes:
> Bohdan Linda wrote:
>
>>I would have a slight offtopic question, this is issue only of pgsql or
>>there are some other db solutions which have good performance when doing
>>this kind of replication across the world.
>>
>>
>>
> It all depends on the quality of the connection Node A to Node B. If
> connectivity is poor, then it is impossible to have good performance
> doing anything across that connection.
The "nifty magic" of asynchronous multimaster would be that you'd be
able to have fast access at "Site Alpha" to "Node Alpha" as well as
fast access at "Site Beta" to "Node Beta."
That would, indeed, be valuable. That's why it's one of those "Holy
Grail" things... It's Rather Hard, which is why there isn't a
"Slony-III: The Wrath of Async MultiMaster" just yet.
It would be valuable for someone to look into a replication system to
support that sort of scenario. With the stipulation that there be
some big, fiery dragons there ready to eat you and your data :-).
--
(format nil "~S@~S" "cbbrowne" "ntlug.org")
http://www3.sympatico.ca/cbbrowne/linuxdistributions.html
"I'm guilty of a lot of things, but I didn't ever do that.''
-- Bill Clinton, on why he had astroturf lining the back of his pickup
truck
[In fact, he _DID_ do this, thus making life creepier than fiction...]
^ permalink raw reply [nested|flat] 91+ messages in thread
* Re: Postgresql replication
2005-08-24 12:21 Postgresql replication Carlos Henrique Reimer <carlosreimer@yahoo.com.br>
2005-08-24 15:54 ` Re: Postgresql replication Chris Browne <cbbrowne@acm.org>
2005-08-24 17:31 ` Re: Postgresql replication Carlos Henrique Reimer <carlosreimer@yahoo.com.br>
2005-08-24 23:22 ` Re: Postgresql replication William Yu <wyu@talisys.com>
2005-08-25 00:46 ` Re: Postgresql replication Aly Dharshi <aly.dharshi@telus.net>
2005-08-25 07:01 ` Re: Postgresql replication William Yu <wyu@talisys.com>
2005-08-25 11:44 ` Re: Postgresql replication Bohdan Linda <bohdan.linda@seznam.cz>
@ 2005-08-25 16:20 ` Chris Browne <cbbrowne@acm.org>
2005-08-25 20:05 ` Re: Postgresql replication Steve Atkins <steve@blighty.com>
4 siblings, 1 reply; 91+ messages in thread
From: Chris Browne @ 2005-08-25 16:20 UTC (permalink / raw)
To: pgsql-general
bohdan.linda@seznam.cz (Bohdan Linda) writes:
> I would have a slight offtopic question, this is issue only of pgsql or
> there are some other db solutions which have good performance when doing
> this kind of replication across the world.
Asynchronous multimaster replication is pretty much a generally tough
problem.
Oracle, Sybase, and DB2 all have methods of doing it; none are either
simple, straightforward, or transparent to use.
It's a tough problem, in general.
--
(reverse (concatenate 'string "gro.mca" "@" "enworbbc"))
http://cbbrowne.com/info/rdbms.html
"I think we might have been better off with a slide rule."
-- Zaphod Beeblebrox
^ permalink raw reply [nested|flat] 91+ messages in thread
* Re: Postgresql replication
2005-08-24 12:21 Postgresql replication Carlos Henrique Reimer <carlosreimer@yahoo.com.br>
2005-08-24 15:54 ` Re: Postgresql replication Chris Browne <cbbrowne@acm.org>
2005-08-24 17:31 ` Re: Postgresql replication Carlos Henrique Reimer <carlosreimer@yahoo.com.br>
2005-08-24 23:22 ` Re: Postgresql replication William Yu <wyu@talisys.com>
2005-08-25 00:46 ` Re: Postgresql replication Aly Dharshi <aly.dharshi@telus.net>
2005-08-25 07:01 ` Re: Postgresql replication William Yu <wyu@talisys.com>
2005-08-25 11:44 ` Re: Postgresql replication Bohdan Linda <bohdan.linda@seznam.cz>
2005-08-25 16:20 ` Re: Postgresql replication Chris Browne <cbbrowne@acm.org>
@ 2005-08-25 20:05 ` Steve Atkins <steve@blighty.com>
2005-08-25 21:39 ` Re: Postgresql replication Chris Browne <cbbrowne@acm.org>
0 siblings, 1 reply; 91+ messages in thread
From: Steve Atkins @ 2005-08-25 20:05 UTC (permalink / raw)
To: pgsql-general
On Thu, Aug 25, 2005 at 12:20:52PM -0400, Chris Browne wrote:
> bohdan.linda@seznam.cz (Bohdan Linda) writes:
> > I would have a slight offtopic question, this is issue only of pgsql or
> > there are some other db solutions which have good performance when doing
> > this kind of replication across the world.
>
> Asynchronous multimaster replication is pretty much a generally tough
> problem.
>
> Oracle, Sybase, and DB2 all have methods of doing it; none are either
> simple, straightforward, or transparent to use.
>
> It's a tough problem, in general.
I've been involved in one project that did multi-master async replication
across geographically separated servers.
It worked but was operationally so horrible that I've sworn never to
architect a system that requires multi-master replication at the
database ever again. Application level? Possibly. But not at the DB
level.
Cheers,
Steve
^ permalink raw reply [nested|flat] 91+ messages in thread
* Re: Postgresql replication
2005-08-24 12:21 Postgresql replication Carlos Henrique Reimer <carlosreimer@yahoo.com.br>
2005-08-24 15:54 ` Re: Postgresql replication Chris Browne <cbbrowne@acm.org>
2005-08-24 17:31 ` Re: Postgresql replication Carlos Henrique Reimer <carlosreimer@yahoo.com.br>
2005-08-24 23:22 ` Re: Postgresql replication William Yu <wyu@talisys.com>
2005-08-25 00:46 ` Re: Postgresql replication Aly Dharshi <aly.dharshi@telus.net>
2005-08-25 07:01 ` Re: Postgresql replication William Yu <wyu@talisys.com>
2005-08-25 11:44 ` Re: Postgresql replication Bohdan Linda <bohdan.linda@seznam.cz>
2005-08-25 16:20 ` Re: Postgresql replication Chris Browne <cbbrowne@acm.org>
2005-08-25 20:05 ` Re: Postgresql replication Steve Atkins <steve@blighty.com>
@ 2005-08-25 21:39 ` Chris Browne <cbbrowne@acm.org>
0 siblings, 0 replies; 91+ messages in thread
From: Chris Browne @ 2005-08-25 21:39 UTC (permalink / raw)
To: pgsql-general
steve@blighty.com (Steve Atkins) writes:
> On Thu, Aug 25, 2005 at 12:20:52PM -0400, Chris Browne wrote:
>> bohdan.linda@seznam.cz (Bohdan Linda) writes:
>> > I would have a slight offtopic question, this is issue only of pgsql or
>> > there are some other db solutions which have good performance when doing
>> > this kind of replication across the world.
>>
>> Asynchronous multimaster replication is pretty much a generally tough
>> problem.
>>
>> Oracle, Sybase, and DB2 all have methods of doing it; none are either
>> simple, straightforward, or transparent to use.
>>
>> It's a tough problem, in general.
>
> I've been involved in one project that did multi-master async replication
> across geographically separated servers.
>
> It worked but was operationally so horrible that I've sworn never to
> architect a system that requires multi-master replication at the
> database ever again. Application level? Possibly. But not at the DB
> level.
I have heard something of the same argument being thrown at attempts
to use things like CORBA to allow you to pretend that there is no
difference between local and remote access to things.
There are some good arguments to be made, there.
You really need to access remote data in different ways than local
data because the latency *will* kill you if you ignore it.
It's a well and neat idea to try to find ways to hide those
differences under the carpet; it is quite likely that the "better way"
will involve addressing that somewhere in the application, as opposed
to trying to get the DB (or the ORB or other 'distributed thingie') to
do it for you.
Tables that contain balances (e.g. - credit balances, account
balances, and such) would be a good example. You do NOT want to
distribute the process of updating balances across some
hideous-latency "Great Divide" link. That heads, of course, to
application design, not to "pure DB level" activity...
--
(format nil "~S@~S" "cbbrowne" "cbbrowne.com")
http://www.ntlug.org/~cbbrowne/advocacy.html
"Tools that are no good require more skill."
^ permalink raw reply [nested|flat] 91+ messages in thread
* Re: Postgresql replication
2005-08-24 12:21 Postgresql replication Carlos Henrique Reimer <carlosreimer@yahoo.com.br>
2005-08-24 15:54 ` Re: Postgresql replication Chris Browne <cbbrowne@acm.org>
2005-08-24 17:31 ` Re: Postgresql replication Carlos Henrique Reimer <carlosreimer@yahoo.com.br>
2005-08-24 23:22 ` Re: Postgresql replication William Yu <wyu@talisys.com>
2005-08-25 00:46 ` Re: Postgresql replication Aly Dharshi <aly.dharshi@telus.net>
2005-08-25 07:01 ` Re: Postgresql replication William Yu <wyu@talisys.com>
2005-08-25 11:44 ` Re: Postgresql replication Bohdan Linda <bohdan.linda@seznam.cz>
@ 2005-08-30 17:56 ` Andrew Sullivan <ajs@crankycanuck.ca>
4 siblings, 0 replies; 91+ messages in thread
From: Andrew Sullivan @ 2005-08-30 17:56 UTC (permalink / raw)
To: pgsql-general
On Thu, Aug 25, 2005 at 01:44:15PM +0200, Bohdan Linda wrote:
> there are some other db solutions which have good performance when doing
> this kind of replication across the world.
Bluntly, "No."
--
Andrew Sullivan | ajs@crankycanuck.ca
Information security isn't a technological problem. It's an economics
problem.
--Bruce Schneier
^ permalink raw reply [nested|flat] 91+ messages in thread
* Re: Postgresql replication
2005-08-24 12:21 Postgresql replication Carlos Henrique Reimer <carlosreimer@yahoo.com.br>
2005-08-24 15:54 ` Re: Postgresql replication Chris Browne <cbbrowne@acm.org>
2005-08-24 17:31 ` Re: Postgresql replication Carlos Henrique Reimer <carlosreimer@yahoo.com.br>
2005-08-24 23:22 ` Re: Postgresql replication William Yu <wyu@talisys.com>
2005-08-25 00:46 ` Re: Postgresql replication Aly Dharshi <aly.dharshi@telus.net>
@ 2005-08-25 16:18 ` Chris Browne <cbbrowne@acm.org>
1 sibling, 0 replies; 91+ messages in thread
From: Chris Browne @ 2005-08-25 16:18 UTC (permalink / raw)
To: pgsql-general
aly.dharshi@telus.net (Aly Dharshi) writes:
> I know I am wadding into this discussion as an beginner compared to
> the rest who have answered this thread, but doesn't something like
> pgpool provide relief for pseudo-multimaster replication, and what
> about software like sqlrelay wouldn't these suites help to some extent
> ? Looking forward to be enlightened.
pgpool and sqlrelay provide you a loose equivalent to synchronous
replication, as they have to submit the queries to *all* of the nodes.
If you can live with the long latency times that result if the nodes
are widely separated, that's great.
Unfortunately, the reason for people to want *asynchronous*
multimaster replication is that they /cannot/ afford that latency
time. They want to submit updates only to the local database, and
have the updates head to the other server some time later.
That's why pgpool/sqlrelay aren't an answer.
--
output = ("cbbrowne" "@" "acm.org")
http://cbbrowne.com/info/languages.html
Rules of the Evil Overlord #46. "If an advisor says to me "My liege,
he is but one man. What can one man possibly do?", I will reply
"This." and kill the advisor." <http://www.eviloverlord.com/;
^ permalink raw reply [nested|flat] 91+ messages in thread
* Re: Postgresql replication
2005-08-24 12:21 Postgresql replication Carlos Henrique Reimer <carlosreimer@yahoo.com.br>
2005-08-24 15:54 ` Re: Postgresql replication Chris Browne <cbbrowne@acm.org>
2005-08-24 17:31 ` Re: Postgresql replication Carlos Henrique Reimer <carlosreimer@yahoo.com.br>
2005-08-24 23:22 ` Re: Postgresql replication William Yu <wyu@talisys.com>
@ 2005-08-25 12:24 ` William Yu <wyu@talisys.com>
2005-08-25 23:15 ` Re: Postgresql replication Chris Travers <chris@travelamericas.com>
2 siblings, 1 reply; 91+ messages in thread
From: William Yu @ 2005-08-25 12:24 UTC (permalink / raw)
To: pgsql-general
Another tidbit I'd like to add. What has helped a lot in implementing
high-latency master-master replication writing our software with a
business process model in mind where data is not posted directly to the
final tables. Instead, users are generally allowed to enter anything --
could be incorrect, incomplete or the user does not have rights -- the
data is still dumped into "pending" tables for people with rights to
fix/review/approve later. Only after that process is the data posted to
the final tables. (Good data entered on the first try still gets pended
-- validation phase simply assumes the user who entered the data is also
the one who fixed/reviewed/approved.)
In terms of replication, this model allows for users to enter data on
any server. The pending records then get replicated to every server.
Each specific server then looks at it's own dataset of pendings to post
to final tables. Final data is then replicated back to all the
participating servers.
There may be a delay for the user if he/she is working on a server that
doesn't have rights to post his data. However, the pending->post model
gets users used to the idea of (1) entering all data in large swoop and
validating/posting it afterwards and (2) data can/will sit in pending
for a period of time until it is acted upon with somebody/some server
with the proper authority. Hence users aren't expecting results to pop
up on the screen the moment they press the submit button.
William Yu wrote:
> Yes, it requires a lot foresight to do multi-master replication --
> especially across high latency connections. I do that now for 2
> different projects. We have servers across the country replicating data
> every X minutes with custom app logic resolves conflicting data.
>
> Allocation of unique IDs that don't collide across servers is a must.
> For 1 project, instead of using numeric IDs, we using CHAR and
> pre-append a unique server code so record #1 on server A is A0000000001
> versus ?x0000000001 on other servers. For the other project, we were too
> far along in development to change all our numerics into chars so we
> wrote custom sequence logic to divide our 10billion ID space into
> 1-Xbillion for server 1, X-Ybillion for server 2, etc.
>
> With this step taken, we then had to isolate (1) transactions could run
> on any server w/o issue (where we always take the newest record), (2)
> transactions required an amalgam of all actions and (3) transactions had
> to be limited to "home" servers. Record keeping stuff where we keep a
> running history of all changes fell into the first category. It would
> have been no different than 2 users on the same server updating the same
> object at different times during the day. Updating of summary data fell
> into category #2 and required parsing change history of individual
> elements. Category #3 would be financial transactions requiring strict
> locks were be divided up by client/user space and restricted to the
> user's home server. This case would not allow auto-failover. Instead, it
> would require some prolonged threshold of downtime for a server before
> full financials are allowed on backup servers.
^ permalink raw reply [nested|flat] 91+ messages in thread
* Re: Postgresql replication
2005-08-24 12:21 Postgresql replication Carlos Henrique Reimer <carlosreimer@yahoo.com.br>
2005-08-24 15:54 ` Re: Postgresql replication Chris Browne <cbbrowne@acm.org>
2005-08-24 17:31 ` Re: Postgresql replication Carlos Henrique Reimer <carlosreimer@yahoo.com.br>
2005-08-24 23:22 ` Re: Postgresql replication William Yu <wyu@talisys.com>
2005-08-25 12:24 ` Re: Postgresql replication William Yu <wyu@talisys.com>
@ 2005-08-25 23:15 ` Chris Travers <chris@travelamericas.com>
2005-08-26 07:23 ` Re: Postgresql replication William Yu <wyu@talisys.com>
0 siblings, 1 reply; 91+ messages in thread
From: Chris Travers @ 2005-08-25 23:15 UTC (permalink / raw)
To: William Yu <wyu@talisys.com>; pgsql-general
William Yu wrote:
> Another tidbit I'd like to add. What has helped a lot in implementing
> high-latency master-master replication writing our software with a
> business process model in mind where data is not posted directly to
> the final tables. Instead, users are generally allowed to enter
> anything -- could be incorrect, incomplete or the user does not have
> rights -- the data is still dumped into "pending" tables for people
> with rights to fix/review/approve later. Only after that process is
> the data posted to the final tables. (Good data entered on the first
> try still gets pended -- validation phase simply assumes the user who
> entered the data is also the one who fixed/reviewed/approved.)
>
In this case, why have multimaster replication at all?
Why not have the people who have rights to review this all write to the
master database and have that replicated back? It seems like latency is
not really an issue. Replication here is only going to complicate
things. If it were me, I would be having my approval app pull data from
*all* of the databases independently and not rely on the replication for
this part. The replication could then be used to replicate *approved*
data back to the slaves.
>
> There may be a delay for the user if he/she is working on a server
> that doesn't have rights to post his data. However, the pending->post
> model gets users used to the idea of (1) entering all data in large
> swoop and validating/posting it afterwards and (2) data can/will sit
> in pending for a period of time until it is acted upon with
> somebody/some server with the proper authority. Hence users aren't
> expecting results to pop up on the screen the moment they press the
> submit button.
>
I still don't understand the purpose of replicating the pending data...
Best Wishes,
Chris Travers
Metatron Technology Consulting
^ permalink raw reply [nested|flat] 91+ messages in thread
* Re: Postgresql replication
2005-08-24 12:21 Postgresql replication Carlos Henrique Reimer <carlosreimer@yahoo.com.br>
2005-08-24 15:54 ` Re: Postgresql replication Chris Browne <cbbrowne@acm.org>
2005-08-24 17:31 ` Re: Postgresql replication Carlos Henrique Reimer <carlosreimer@yahoo.com.br>
2005-08-24 23:22 ` Re: Postgresql replication William Yu <wyu@talisys.com>
2005-08-25 12:24 ` Re: Postgresql replication William Yu <wyu@talisys.com>
2005-08-25 23:15 ` Re: Postgresql replication Chris Travers <chris@travelamericas.com>
@ 2005-08-26 07:23 ` William Yu <wyu@talisys.com>
2005-08-26 17:26 ` Re: Postgresql replication Chris Travers <chris@travelamericas.com>
0 siblings, 1 reply; 91+ messages in thread
From: William Yu @ 2005-08-26 07:23 UTC (permalink / raw)
To: pgsql-general
Chris Travers wrote:
> Why not have the people who have rights to review this all write to the
> master database and have that replicated back? It seems like latency is
> not really an issue. Replication here is only going to complicate
What master database? Having a single master defeats the purpose of load
balancing to handle more users.
> things. If it were me, I would be having my approval app pull data
> from *all* of the databases independently and not rely on the
> replication for this part. The replication could then be used to
> replicate *approved* data back to the slaves.
If your app client happens to have high speed access to all servers,
fine. And you can guarantee uptime connections to all servers except for
the rare cases of hardware failure. The problem is if you don't, you end
up with every transaction running at the speed of the slowest connection
between a client and the farthest DB. While the final status of a
transaction does not need to show up anytime soon on a user's screen,
there still needs to be fast response for each individual user action.
How bad does the response get? I've done some simple tests comparing APP
<-LAN-> DB versus APP <-cross country VPN-> DB. Even simple actions like
inserting a recording and checking for a dupe key violation (e.g. almost
no bandwidth needed) takes about 10,000 times longer than over a 100mbit
LAN.
> I still don't understand the purpose of replicating the pending data...
Imagine a checking account. A request to make an online payment can be
made on any server. The moment the user submits a request, he sees it on
his screen. This request is considered pending and not a true
transaction yet. All requests are collected together via replication and
the "home" server for that account then can check the account balance
and decide whether there's enough funds to issue those payments.
^ permalink raw reply [nested|flat] 91+ messages in thread
* Re: Postgresql replication
2005-08-24 12:21 Postgresql replication Carlos Henrique Reimer <carlosreimer@yahoo.com.br>
2005-08-24 15:54 ` Re: Postgresql replication Chris Browne <cbbrowne@acm.org>
2005-08-24 17:31 ` Re: Postgresql replication Carlos Henrique Reimer <carlosreimer@yahoo.com.br>
2005-08-24 23:22 ` Re: Postgresql replication William Yu <wyu@talisys.com>
2005-08-25 12:24 ` Re: Postgresql replication William Yu <wyu@talisys.com>
2005-08-25 23:15 ` Re: Postgresql replication Chris Travers <chris@travelamericas.com>
2005-08-26 07:23 ` Re: Postgresql replication William Yu <wyu@talisys.com>
@ 2005-08-26 17:26 ` Chris Travers <chris@travelamericas.com>
2005-08-26 23:07 ` Re: Postgresql replication William Yu <wyu@talisys.com>
0 siblings, 1 reply; 91+ messages in thread
From: Chris Travers @ 2005-08-26 17:26 UTC (permalink / raw)
To: William Yu <wyu@talisys.com>; +Cc: pgsql-general
William Yu wrote:
> Chris Travers wrote:
>
>> Why not have the people who have rights to review this all write to
>> the master database and have that replicated back? It seems like
>> latency is not really an issue. Replication here is only going to
>> complicate
>
>
> What master database? Having a single master defeats the purpose of
> load balancing to handle more users.
I guess I am thinking along different lines than you. I was thinking
that the simplest solution would be to have master/slave replication for
*approved* transactions only and no replication for initial commits
prior to approval. This makes the assumption that a single transaction
will be committed on a single server, and that a single transaction will
not be split over multiple servers. In this way, you can commit a
pending transaction to any single server, and when it is approved, it
gets replicated via the master. See below for more.
>
>
> > things. If it were me, I would be having my approval app pull data
> > from *all* of the databases independently and not rely on the
> > replication for this part. The replication could then be used to
> > replicate *approved* data back to the slaves.
>
> If your app client happens to have high speed access to all servers,
> fine. And you can guarantee uptime connections to all servers except
> for the rare cases of hardware failure. The problem is if you don't,
> you end up with every transaction running at the speed of the slowest
> connection between a client and the farthest DB. While the final
> status of a transaction does not need to show up anytime soon on a
> user's screen, there still needs to be fast response for each
> individual user action.
Well... It depends on how it is implimented I guess. If you pull
transactional information in the background while the user is doing
other things, then it shouldn't matter. Besides, what should actually
happen is that your connection is only as slow as the connection to the
server which hosts the pending transaction you are trying to commit at
the moment. In this way, each request only goes to one server (the one
which has the connection). You could probably use DBI-Link and some
clever materialized views to maintain the metadata at each location
without replicating the whole transaction. You could probably even use
DBI-Link or dblink to pull the transactions in a transparent way. Or
you could replicate transactions into a pending queue dynamically...
There are all sorts of ways you could make this respond well over slow
connections. Remember, PostgreSQL allows you to separate storage from
presentation of the data, and this is quite powerful.
>
> How bad does the response get? I've done some simple tests comparing
> APP <-LAN-> DB versus APP <-cross country VPN-> DB. Even simple
> actions like inserting a recording and checking for a dupe key
> violation (e.g. almost no bandwidth needed) takes about 10,000 times
> longer than over a 100mbit LAN.
I think you could design a database such that duplicate keys are not an
issue and only get checked on the master and then should never be a
problem.
Thinking about it.... It seems here that one ends up with a sort of
weird "multi-master" replication based on master/slave replication if
you replicate these changes in the background (via another process,
Notify, etc).
>
>
>> I still don't understand the purpose of replicating the pending data...
>
>
> Imagine a checking account. A request to make an online payment can be
> made on any server. The moment the user submits a request, he sees it
> on his screen. This request is considered pending and not a true
> transaction yet. All requests are collected together via replication
> and the "home" server for that account then can check the account
> balance and decide whether there's enough funds to issue those payments.
>
Thinking about this.... The big issue is that you only want to
replicate the deltas, not the entire account. I am still thinking
master/slave, but something where the deltas are replicated in the
background or where the user, in checking his account, is actually
querying the home server. This second issue could be done via dblink or
DBI-Link and would simply require that a master table linking the
accounts with home servers be replicated (this should, I think, be
fairly low-overhead).
Best Wishes,
Chris Travers
Metatron Technology Consulting
^ permalink raw reply [nested|flat] 91+ messages in thread
* Re: Postgresql replication
2005-08-24 12:21 Postgresql replication Carlos Henrique Reimer <carlosreimer@yahoo.com.br>
2005-08-24 15:54 ` Re: Postgresql replication Chris Browne <cbbrowne@acm.org>
2005-08-24 17:31 ` Re: Postgresql replication Carlos Henrique Reimer <carlosreimer@yahoo.com.br>
2005-08-24 23:22 ` Re: Postgresql replication William Yu <wyu@talisys.com>
2005-08-25 12:24 ` Re: Postgresql replication William Yu <wyu@talisys.com>
2005-08-25 23:15 ` Re: Postgresql replication Chris Travers <chris@travelamericas.com>
2005-08-26 07:23 ` Re: Postgresql replication William Yu <wyu@talisys.com>
2005-08-26 17:26 ` Re: Postgresql replication Chris Travers <chris@travelamericas.com>
@ 2005-08-26 23:07 ` William Yu <wyu@talisys.com>
2005-08-27 01:26 ` Re: Postgresql replication Chris Travers <chris@travelamericas.com>
0 siblings, 1 reply; 91+ messages in thread
From: William Yu @ 2005-08-26 23:07 UTC (permalink / raw)
To: pgsql-general
Chris Travers wrote:
> I guess I am thinking along different lines than you. I was thinking
> that the simplest solution would be to have master/slave replication for
> *approved* transactions only and no replication for initial commits
> prior to approval. This makes the assumption that a single transaction
> will be committed on a single server, and that a single transaction will
> not be split over multiple servers. In this way, you can commit a
> pending transaction to any single server, and when it is approved, it
> gets replicated via the master. See below for more.
This works if you don't care that multiple servers commit transactions
that force a budget or bank account to be exceeded.
> Thinking about this.... The big issue is that you only want to
> replicate the deltas, not the entire account. I am still thinking
> master/slave, but something where the deltas are replicated in the
> background or where the user, in checking his account, is actually
> querying the home server. This second issue could be done via dblink or
> DBI-Link and would simply require that a master table linking the
> accounts with home servers be replicated (this should, I think, be
> fairly low-overhead).
Except what you know have is your system fails if any server fail or is
inaccessible.
^ permalink raw reply [nested|flat] 91+ messages in thread
* Re: Postgresql replication
2005-08-24 12:21 Postgresql replication Carlos Henrique Reimer <carlosreimer@yahoo.com.br>
2005-08-24 15:54 ` Re: Postgresql replication Chris Browne <cbbrowne@acm.org>
2005-08-24 17:31 ` Re: Postgresql replication Carlos Henrique Reimer <carlosreimer@yahoo.com.br>
2005-08-24 23:22 ` Re: Postgresql replication William Yu <wyu@talisys.com>
2005-08-25 12:24 ` Re: Postgresql replication William Yu <wyu@talisys.com>
2005-08-25 23:15 ` Re: Postgresql replication Chris Travers <chris@travelamericas.com>
2005-08-26 07:23 ` Re: Postgresql replication William Yu <wyu@talisys.com>
2005-08-26 17:26 ` Re: Postgresql replication Chris Travers <chris@travelamericas.com>
2005-08-26 23:07 ` Re: Postgresql replication William Yu <wyu@talisys.com>
@ 2005-08-27 01:26 ` Chris Travers <chris@travelamericas.com>
2005-08-27 13:27 ` Re: Postgresql replication William Yu <wyu@talisys.com>
0 siblings, 1 reply; 91+ messages in thread
From: Chris Travers @ 2005-08-27 01:26 UTC (permalink / raw)
To: William Yu <wyu@talisys.com>; pgsql-general
William Yu wrote:
> Chris Travers wrote:
>
>> I guess I am thinking along different lines than you. I was thinking
>> that the simplest solution would be to have master/slave replication
>> for *approved* transactions only and no replication for initial
>> commits prior to approval. This makes the assumption that a single
>> transaction will be committed on a single server, and that a single
>> transaction will not be split over multiple servers. In this way,
>> you can commit a pending transaction to any single server, and when
>> it is approved, it gets replicated via the master. See below for more.
>
>
> This works if you don't care that multiple servers commit transactions
> that force a budget or bank account to be exceeded.
>
Ok. then lets look at possibility B. (Async Multimaster Replication is
out).
>
>> Thinking about this.... The big issue is that you only want to
>> replicate the deltas, not the entire account. I am still thinking
>> master/slave, but something where the deltas are replicated in the
>> background or where the user, in checking his account, is actually
>> querying the home server. This second issue could be done via dblink
>> or DBI-Link and would simply require that a master table linking the
>> accounts with home servers be replicated (this should, I think, be
>> fairly low-overhead).
>
>
> Except what you know have is your system fails if any server fail or
> is inaccessible.
>
Ok. If you have a system where each location is authoritative for its
customers and the server transparently queries that server where needed
(via a view). then when any server becomes inaccessible then the
customers whose accounts are on that server become inaccessible. This
may not be accessible. But if this is the case, then you could treat
this as a partitioned table, where each partition is authoritative on
one location (see a previous post on how to do this) and then use Slony
to replicate. Again this does not get around your objection above
namely that it is possible to do duplicate transactions at multiple
locations. For this you would need an explicit call to the
authoritative server. I see no other way around that. This might allow
people to view tentative balances from other branches if the home (or
its connection) server is down, but they would not be able to withdraw
funds.
But if you do this, you have a different problem. Namely that
replication will be occuring over your slower than desired links. As
the number of branches grow, so will the bandwidth demands on every
branch. This may not therefore be scalable.
Unfortunately there is no free lunch here. And I think that at some
point you are going to have to choose between:
1) Efficiency of network throughput
2) Tolerance to attempts at repeat transactions before replication
(emptying an account multiple times)
3) Availability of a transaction.
You can pick any two. I think that this is the way it will work with
any other database system as well.
Best Wishes,
Chris Travers
Metatron Technology Consulting
> ---------------------------(end of broadcast)---------------------------
> TIP 3: Have you checked our extensive FAQ?
>
> http://www.postgresql.org/docs/faq
>
>
^ permalink raw reply [nested|flat] 91+ messages in thread
* Re: Postgresql replication
2005-08-24 12:21 Postgresql replication Carlos Henrique Reimer <carlosreimer@yahoo.com.br>
2005-08-24 15:54 ` Re: Postgresql replication Chris Browne <cbbrowne@acm.org>
2005-08-24 17:31 ` Re: Postgresql replication Carlos Henrique Reimer <carlosreimer@yahoo.com.br>
2005-08-24 23:22 ` Re: Postgresql replication William Yu <wyu@talisys.com>
2005-08-25 12:24 ` Re: Postgresql replication William Yu <wyu@talisys.com>
2005-08-25 23:15 ` Re: Postgresql replication Chris Travers <chris@travelamericas.com>
2005-08-26 07:23 ` Re: Postgresql replication William Yu <wyu@talisys.com>
2005-08-26 17:26 ` Re: Postgresql replication Chris Travers <chris@travelamericas.com>
2005-08-26 23:07 ` Re: Postgresql replication William Yu <wyu@talisys.com>
2005-08-27 01:26 ` Re: Postgresql replication Chris Travers <chris@travelamericas.com>
@ 2005-08-27 13:27 ` William Yu <wyu@talisys.com>
2005-08-27 18:03 ` Re: Postgresql replication Chris Travers <chris@travelamericas.com>
0 siblings, 1 reply; 91+ messages in thread
From: William Yu @ 2005-08-27 13:27 UTC (permalink / raw)
To: pgsql-general
Chris Travers wrote:
> 1) Efficiency of network throughput
> 2) Tolerance to attempts at repeat transactions before replication
> (emptying an account multiple times)
> 3) Availability of a transaction.
We ended up having to give up #1. It's possible to have our transactions
routed to multiple servers before it becomes a final transaction. User1
might request a payment on ServerA. User2 then marks the payment as
approved on ServerB. ServerC is authoritative and checks the bank/budget
balances before posting as final. After each of these steps requires
replication of the latest changes to all other servers. (In theory, the
first 2 steps only require replication to the authoritative server but
we do so anyways so all servers can act as backups for each other --
pending transactions still need to be restored in case of total DB failure.)
There's definitely a delay in terms of getting from point A to point Z;
duplicate servers. But there's guaranteed financial integrity, users can
connect to any server the load balancer picks and no server requires any
other server/connection to be up for individual user tranactions to occur.
^ permalink raw reply [nested|flat] 91+ messages in thread
* Re: Postgresql replication
2005-08-24 12:21 Postgresql replication Carlos Henrique Reimer <carlosreimer@yahoo.com.br>
2005-08-24 15:54 ` Re: Postgresql replication Chris Browne <cbbrowne@acm.org>
2005-08-24 17:31 ` Re: Postgresql replication Carlos Henrique Reimer <carlosreimer@yahoo.com.br>
2005-08-24 23:22 ` Re: Postgresql replication William Yu <wyu@talisys.com>
2005-08-25 12:24 ` Re: Postgresql replication William Yu <wyu@talisys.com>
2005-08-25 23:15 ` Re: Postgresql replication Chris Travers <chris@travelamericas.com>
2005-08-26 07:23 ` Re: Postgresql replication William Yu <wyu@talisys.com>
2005-08-26 17:26 ` Re: Postgresql replication Chris Travers <chris@travelamericas.com>
2005-08-26 23:07 ` Re: Postgresql replication William Yu <wyu@talisys.com>
2005-08-27 01:26 ` Re: Postgresql replication Chris Travers <chris@travelamericas.com>
2005-08-27 13:27 ` Re: Postgresql replication William Yu <wyu@talisys.com>
@ 2005-08-27 18:03 ` Chris Travers <chris@travelamericas.com>
2005-08-27 19:25 ` Re: Postgresql replication William Yu <wyu@talisys.com>
0 siblings, 1 reply; 91+ messages in thread
From: Chris Travers @ 2005-08-27 18:03 UTC (permalink / raw)
To: William Yu <wyu@talisys.com>; +Cc: pgsql-general
William Yu wrote:
> Chris Travers wrote:
>
>> 1) Efficiency of network throughput
>> 2) Tolerance to attempts at repeat transactions before replication
>> (emptying an account multiple times)
>> 3) Availability of a transaction.
>
>
> We ended up having to give up #1. It's possible to have our
> transactions routed to multiple servers before it becomes a final
> transaction. User1 might request a payment on ServerA. User2 then
> marks the payment as approved on ServerB. ServerC is authoritative and
> checks the bank/budget balances before posting as final. After each of
> these steps requires replication of the latest changes to all other
> servers. (In theory, the first 2 steps only require replication to the
> authoritative server but we do so anyways so all servers can act as
> backups for each other -- pending transactions still need to be
> restored in case of total DB failure.)
Ok. I see where you are going with this.
It is an interesting problem. Multimaster Async Replication will give
you a problem in that it allows the attack you are describing due to the
asynchronous nature of the replication. If I were trying to prevent
this sort of attack, I would try to build into this some sort of
"account authority" which can manage these transactions. Origionally I
was thinking of the home server as the obvious place to start if it is
available. But if it is not, then you would need some infrastructure to
track attempted withdrawals and handle them appropriately. Such servers
could cache requests and if they see duplicates or many requests coming
from many servers on the same account could flag that. One option might
be to have a rotational authority (i.e. home-server, then next, then
next) in a ring so that an unavailable server still allows reasonable
precautions to be held against emptying the account many times.
Basically, if the servers aren't talking to eachother at the time of the
transaction, then they are not going to know about duplicates. You have
to have some setup beyond your replication to handle this. Otherwise
you will have some issues with delays causing the security risks you
deem unacceptable.
Your question seems to be "How do I set up multimaster async replication
such that a person cannot empty his account on each server" and the
answer is that this is an inherent limitation of multimaster async
replication. This also means that you will have to have some sort of
other verification process for such transactions beyond what is locally
available on the replicants.
> There's definitely a delay in terms of getting from point A to point
> Z; duplicate servers. But there's guaranteed financial integrity,
> users can connect to any server the load balancer picks and no server
> requires any other server/connection to be up for individual user
> tranactions to occur.
The delay will by definition defeat any guarantee of financial integrity
if you are allowing read-write operations to the replica without
checking with some sort of central authority. At very least, the
central authority should look for suspicious patterns. Again, it may be
possible to do some failover here, but I don't think you can do without
*some* sort of centralized control.
(Note, here load balancing is handled by the distribution of accounts.
A down server simply means that the next server in the ring will take
over its remote verification role).
This doesn;t make the security issue go away, but it may reduce it to an
acceptable level. I.e. it is still possible for duplicates to be
submitted just before and after a home server goes down, but this is a
lot better than being able to have one transaction repeated on each
server and then dealing with the massively overdrawn account.
Best Wishes,
Chris Travers
Metatron Technology Consulting
^ permalink raw reply [nested|flat] 91+ messages in thread
* Re: Postgresql replication
2005-08-24 12:21 Postgresql replication Carlos Henrique Reimer <carlosreimer@yahoo.com.br>
2005-08-24 15:54 ` Re: Postgresql replication Chris Browne <cbbrowne@acm.org>
2005-08-24 17:31 ` Re: Postgresql replication Carlos Henrique Reimer <carlosreimer@yahoo.com.br>
2005-08-24 23:22 ` Re: Postgresql replication William Yu <wyu@talisys.com>
2005-08-25 12:24 ` Re: Postgresql replication William Yu <wyu@talisys.com>
2005-08-25 23:15 ` Re: Postgresql replication Chris Travers <chris@travelamericas.com>
2005-08-26 07:23 ` Re: Postgresql replication William Yu <wyu@talisys.com>
2005-08-26 17:26 ` Re: Postgresql replication Chris Travers <chris@travelamericas.com>
2005-08-26 23:07 ` Re: Postgresql replication William Yu <wyu@talisys.com>
2005-08-27 01:26 ` Re: Postgresql replication Chris Travers <chris@travelamericas.com>
2005-08-27 13:27 ` Re: Postgresql replication William Yu <wyu@talisys.com>
2005-08-27 18:03 ` Re: Postgresql replication Chris Travers <chris@travelamericas.com>
@ 2005-08-27 19:25 ` William Yu <wyu@talisys.com>
0 siblings, 0 replies; 91+ messages in thread
From: William Yu @ 2005-08-27 19:25 UTC (permalink / raw)
To: pgsql-general
Our own personal IM :)
Chris Travers wrote:
> The delay will by definition defeat any guarantee of financial integrity
> if you are allowing read-write operations to the replica without
> checking with some sort of central authority. At very least, the
> central authority should look for suspicious patterns. Again, it may be
> possible to do some failover here, but I don't think you can do without
> *some* sort of centralized control.
Actually this is the easy part. When the home server finally issues
payments, it only issues what it knows about and what can be verified as
OK. Any transactions that are currently being entered on another server
will appear after the next replication cycle and it will be verified
afterwards. If the previous payment issuing cycle used up all the money,
the "new" requests are kept in pending until money is put in. This does
allow for newer requests that happen to be executed on home servers to
possibly take precendence over old requests but there is no requirement
in the business process that payments must come out in any specific order.
> This doesn;t make the security issue go away, but it may reduce it to an
> acceptable level. I.e. it is still possible for duplicates to be
> submitted just before and after a home server goes down, but this is a
> lot better than being able to have one transaction repeated on each
> server and then dealing with the massively overdrawn account.
The "home" server going down is the trickiest issue. Because when a
server disappears, is that because it went down temporarily? For good? A
temporary internet problem where nobody can get access to it? Or an
internet routing issue where just the connection between those two
servers is severed? If it's the last, users might still be doing stuff
on ServerA with ServerA is posting financials but ServerB thinks the
server is down and decides to take over ServerA's duties. Of course, in
ServerA's view, it's ServerB and ServerC that's down -- not itself.
Maybe we can mitigate this by having more servers at more data centers
around the world so everybody can monitor everybody. At some point, if
you have N servers and N-1 servers say ServerA is down, it probably is
down. With a high enough N, ServerA could probably decisively decide it
was the server severed from the internet and refuse to post any
financials until connection to the outside world was restore + some
extra threshold.
This last problem, which luckily occurs rarely, we do by hand right now.
We're not ready to run this on full auto because we only have 2 data
centers (with multiple servers within each data center). The servers do
not have enough info to know which server is actually down in order to
auto-promote/demote. It does require staff that's not just in 1 location
though because our primary office going down w/ our local datacenter
would mean nobody there could do the switchover. (Assuming major natural
disaster that kept us from using our laptops at the local Starbucks to
do the work.)
^ permalink raw reply [nested|flat] 91+ messages in thread
* Re: Postgresql replication
2005-08-24 12:21 Postgresql replication Carlos Henrique Reimer <carlosreimer@yahoo.com.br>
2005-08-24 15:54 ` Re: Postgresql replication Chris Browne <cbbrowne@acm.org>
2005-08-24 17:31 ` Re: Postgresql replication Carlos Henrique Reimer <carlosreimer@yahoo.com.br>
@ 2005-08-25 06:29 ` Chris Travers <chris@travelamericas.com>
2005-08-25 14:47 ` Re: Postgresql replication Brad Nicholson <bnichols@ca.afilias.info>
1 sibling, 1 reply; 91+ messages in thread
From: Chris Travers @ 2005-08-25 06:29 UTC (permalink / raw)
To: Carlos Henrique Reimer <carlosreimer@yahoo.com.br>; +Cc: pgsql-general
Carlos Henrique Reimer wrote:
> I read some documents about replication and realized that if you plan
> on using asynchronous replication, your application should be designed
> from the outset with that in mind because asynchronous replication is
> not something that can be easily “added on” after the fact.
> Am I right?
Depending on your needs, you may find pgpool and Slony to be a workable
combination. This is better when you have a lot of reads and only
occasional writes. This way writes get redirected back to the master,
and read-only transactions get run on the slaves.
Best Wishes,
Chris Travers
Metatron Technology Consulting
^ permalink raw reply [nested|flat] 91+ messages in thread
* Re: Postgresql replication
2005-08-24 12:21 Postgresql replication Carlos Henrique Reimer <carlosreimer@yahoo.com.br>
2005-08-24 15:54 ` Re: Postgresql replication Chris Browne <cbbrowne@acm.org>
2005-08-24 17:31 ` Re: Postgresql replication Carlos Henrique Reimer <carlosreimer@yahoo.com.br>
2005-08-25 06:29 ` Re: Postgresql replication Chris Travers <chris@travelamericas.com>
@ 2005-08-25 14:47 ` Brad Nicholson <bnichols@ca.afilias.info>
0 siblings, 0 replies; 91+ messages in thread
From: Brad Nicholson @ 2005-08-25 14:47 UTC (permalink / raw)
To: pgsql-general
Chris Travers wrote:
> Carlos Henrique Reimer wrote:
>
>> I read some documents about replication and realized that if you plan
>> on using asynchronous replication, your application should be
>> designed from the outset with that in mind because asynchronous
>> replication is not something that can be easily “added on” after the
>> fact.
>> Am I right?
>
>
> Depending on your needs, you may find pgpool and Slony to be a
> workable combination. This is better when you have a lot of reads and
> only occasional writes. This way writes get redirected back to the
> master, and read-only transactions get run on the slaves.
As long as you don't have any functions that write to the db. pgpool
could (and likely would) redirect some of these to the subscriber.
Slony would prevent the data from being written (which would prevent
the subscriber from being corrupted).
--
Brad Nicholson 416-673-4106
Database Administrator, Afilias Canada Corp.
^ permalink raw reply [nested|flat] 91+ messages in thread
* Re: Postgresql replication
2005-08-24 12:21 Postgresql replication Carlos Henrique Reimer <carlosreimer@yahoo.com.br>
2005-08-24 15:54 ` Re: Postgresql replication Chris Browne <cbbrowne@acm.org>
@ 2005-08-24 19:53 ` Jeff Davis <jdavis-pgsql@empires.org>
2005-08-24 22:19 ` Re: Postgresql replication Jim C. Nasby <jnasby@pervasive.com>
2005-08-26 12:55 ` Re: Postgresql replication Carlos Henrique Reimer <carlosreimer@yahoo.com.br>
2 siblings, 2 replies; 91+ messages in thread
From: Jeff Davis @ 2005-08-24 19:53 UTC (permalink / raw)
To: Chris Browne <cbbrowne@acm.org>; +Cc: pgsql-general; carlosreimer@yahoo.com.br
Chris Browne wrote:
>
> Slony-I is a master/slave asynchronous replication system; if you
> already considered it unsuitable, then I see little likelihood of
> other systems with the same sorts of properties being suitable.
>
> What could conceivably be of use to you would be a *multimaster*
> asynchronous replication system. Unfortunately, multimaster
> *anything* is a really tough nut to crack.
>
In general that's a difficult problem, but in practice there may be a
solution.
For instance, perhaps the following configuration would be helpful:
Make a database for each physical server, called db1 ... dbN. Let your
logical tables in each database be table1 ... tableM. Now, for each
logical tableX (where 1 <= X <= M), make N physical tables, tableX_1 ...
tableX_N. Now, make a view called tableX that is the UNION of tableX_1
... tableX_N (tableX is not a real table, it's just a logical table).
Now, use Slony-I. For each dbY (where 1 <= Y <= N), make dbY a master
for tableX_Y (for all X where 1 <= X <= M) and a slave for tableX_Z (for
all X,Z where 1 <= X <= M, Z != Y).
Now, use a rule that replaces all INSERTs to tableX (where 1 <= X <= M)
on dbY (where 1 <= Y <= N) with INSERTs to tableX_Y.
That was my attempt at being unambiguous. In general what I mean is that
each database is master of one piece of a table, and slave to all the
other pieces of that table, and then you have a view which is the union
of those pieces. That view is the logical table. Then have a RULE which
makes INSERTs go to the physical table for which that database is master.
The advantages: if one machine goes down, the rest keep going, and
merely miss the updates from that one site to that table. If one machine
makes an insert to the table, it quickly propogates to the other
machines and transparently becomes a part of the logical tables on those
machines.
The disadvantages: UPDATEs are difficult, and might end up with a
complicated set of rules/procedures/triggers. You may have to program
the application defensively in case the database is unable to update a
remote database for various reasons (if the record to be updated is a
part of a table for which another database is master). Also, since the
solution is asynchronous, the databases may provide different results to
the same query.
In general, this solution does not account for all kinds of data
constraints. The conflict resolution is very simplified because it's
basically just the union of data. If that union could cause a constraint
violation itself, this solution might not be right for you. For
instance, let's say you're tracking video rentals, and store policy says
that you only rent one video per person. However, maybe they go to store
1 and rent a video, and run to store 2 and rent a video before store 1
sends the INSERT record over to store 2. Now, when they finally do
attempt to UNION the data for the view, you have an inconsistant state.
Many applications can get by just fine by UNIONing the data like that,
and if not, perhaps work around it.
I hope this is helpful. Let me know if there's some reason my plan won't
work.
Regards,
Jeff Davis
^ permalink raw reply [nested|flat] 91+ messages in thread
* Re: Postgresql replication
2005-08-24 12:21 Postgresql replication Carlos Henrique Reimer <carlosreimer@yahoo.com.br>
2005-08-24 15:54 ` Re: Postgresql replication Chris Browne <cbbrowne@acm.org>
2005-08-24 19:53 ` Re: Postgresql replication Jeff Davis <jdavis-pgsql@empires.org>
@ 2005-08-24 22:19 ` Jim C. Nasby <jnasby@pervasive.com>
2005-08-25 18:52 ` Re: Postgresql replication Jeff Davis <jdavis-pgsql@empires.org>
1 sibling, 1 reply; 91+ messages in thread
From: Jim C. Nasby @ 2005-08-24 22:19 UTC (permalink / raw)
To: Jeff Davis <jdavis-pgsql@empires.org>; +Cc: Chris Browne <cbbrowne@acm.org>; pgsql-general; carlosreimer@yahoo.com.br
Or, for something far easier, try
http://pgfoundry.org/projects/pgcluster/ which provides syncronous
multi-master clustering.
On Wed, Aug 24, 2005 at 12:53:34PM -0700, Jeff Davis wrote:
> Chris Browne wrote:
> >
> > Slony-I is a master/slave asynchronous replication system; if you
> > already considered it unsuitable, then I see little likelihood of
> > other systems with the same sorts of properties being suitable.
> >
> > What could conceivably be of use to you would be a *multimaster*
> > asynchronous replication system. Unfortunately, multimaster
> > *anything* is a really tough nut to crack.
> >
>
> In general that's a difficult problem, but in practice there may be a
> solution.
>
> For instance, perhaps the following configuration would be helpful:
>
> Make a database for each physical server, called db1 ... dbN. Let your
> logical tables in each database be table1 ... tableM. Now, for each
> logical tableX (where 1 <= X <= M), make N physical tables, tableX_1 ...
> tableX_N. Now, make a view called tableX that is the UNION of tableX_1
> ... tableX_N (tableX is not a real table, it's just a logical table).
>
> Now, use Slony-I. For each dbY (where 1 <= Y <= N), make dbY a master
> for tableX_Y (for all X where 1 <= X <= M) and a slave for tableX_Z (for
> all X,Z where 1 <= X <= M, Z != Y).
>
> Now, use a rule that replaces all INSERTs to tableX (where 1 <= X <= M)
> on dbY (where 1 <= Y <= N) with INSERTs to tableX_Y.
>
> That was my attempt at being unambiguous. In general what I mean is that
> each database is master of one piece of a table, and slave to all the
> other pieces of that table, and then you have a view which is the union
> of those pieces. That view is the logical table. Then have a RULE which
> makes INSERTs go to the physical table for which that database is master.
>
> The advantages: if one machine goes down, the rest keep going, and
> merely miss the updates from that one site to that table. If one machine
> makes an insert to the table, it quickly propogates to the other
> machines and transparently becomes a part of the logical tables on those
> machines.
>
> The disadvantages: UPDATEs are difficult, and might end up with a
> complicated set of rules/procedures/triggers. You may have to program
> the application defensively in case the database is unable to update a
> remote database for various reasons (if the record to be updated is a
> part of a table for which another database is master). Also, since the
> solution is asynchronous, the databases may provide different results to
> the same query.
>
> In general, this solution does not account for all kinds of data
> constraints. The conflict resolution is very simplified because it's
> basically just the union of data. If that union could cause a constraint
> violation itself, this solution might not be right for you. For
> instance, let's say you're tracking video rentals, and store policy says
> that you only rent one video per person. However, maybe they go to store
> 1 and rent a video, and run to store 2 and rent a video before store 1
> sends the INSERT record over to store 2. Now, when they finally do
> attempt to UNION the data for the view, you have an inconsistant state.
>
> Many applications can get by just fine by UNIONing the data like that,
> and if not, perhaps work around it.
>
> I hope this is helpful. Let me know if there's some reason my plan won't
> work.
>
> Regards,
> Jeff Davis
>
>
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 9: In versions below 8.0, the planner will ignore your desire to
> choose an index scan if your joining column's datatypes do not
> match
>
--
Jim C. Nasby, Sr. Engineering Consultant jnasby@pervasive.com
Pervasive Software http://pervasive.com 512-569-9461
^ permalink raw reply [nested|flat] 91+ messages in thread
* Re: Postgresql replication
2005-08-24 12:21 Postgresql replication Carlos Henrique Reimer <carlosreimer@yahoo.com.br>
2005-08-24 15:54 ` Re: Postgresql replication Chris Browne <cbbrowne@acm.org>
2005-08-24 19:53 ` Re: Postgresql replication Jeff Davis <jdavis-pgsql@empires.org>
2005-08-24 22:19 ` Re: Postgresql replication Jim C. Nasby <jnasby@pervasive.com>
@ 2005-08-25 18:52 ` Jeff Davis <jdavis-pgsql@empires.org>
2005-08-25 19:26 ` Re: Postgresql replication Carlos Henrique Reimer <carlosreimer@yahoo.com.br>
0 siblings, 1 reply; 91+ messages in thread
From: Jeff Davis @ 2005-08-25 18:52 UTC (permalink / raw)
To: Jim C. Nasby <jnasby@pervasive.com>; +Cc: Chris Browne <cbbrowne@acm.org>; pgsql-general; carlosreimer@yahoo.com.br
Jim C. Nasby wrote:
> Or, for something far easier, try
> http://pgfoundry.org/projects/pgcluster/ which provides syncronous
> multi-master clustering.
>
He specifically said that pgcluster did not work for him because the
databases would be at physically seperate locations. PGCluster requires
that there be a load balancer and a replicator centrally located
managing the cluster. If a network problem happens at the centralized
location, it would bring down all locations completely.
I think he's looking for an async solution because of that. In my
solution, if one location goes down, the others keep going.
Regards,
Jeff Davis
^ permalink raw reply [nested|flat] 91+ messages in thread
* Re: Postgresql replication
2005-08-24 12:21 Postgresql replication Carlos Henrique Reimer <carlosreimer@yahoo.com.br>
2005-08-24 15:54 ` Re: Postgresql replication Chris Browne <cbbrowne@acm.org>
2005-08-24 19:53 ` Re: Postgresql replication Jeff Davis <jdavis-pgsql@empires.org>
2005-08-24 22:19 ` Re: Postgresql replication Jim C. Nasby <jnasby@pervasive.com>
2005-08-25 18:52 ` Re: Postgresql replication Jeff Davis <jdavis-pgsql@empires.org>
@ 2005-08-25 19:26 ` Carlos Henrique Reimer <carlosreimer@yahoo.com.br>
2005-08-25 19:54 ` Re: Postgresql replication Matt Miller <mattm@epx.com>
2005-08-25 21:30 ` Re: Postgresql replication Jeff Davis <jdavis-pgsql@empires.org>
0 siblings, 2 replies; 91+ messages in thread
From: Carlos Henrique Reimer @ 2005-08-25 19:26 UTC (permalink / raw)
To: Chris Browne <cbbrowne@acm.org>; pgsql-general@postgresql.org, Jeff Davis <jdavis-pgsql@empires.org>
Exactly!!!!
Jeff Davis <jdavis-pgsql@empires.org> escreveu:Jim C. Nasby wrote:
> Or, for something far easier, try
> http://pgfoundry.org/projects/pgcluster/ which provides syncronous
> multi-master clustering.
>
He specifically said that pgcluster did not work for him because the
databases would be at physically seperate locations. PGCluster requires
that there be a load balancer and a replicator centrally located
managing the cluster. If a network problem happens at the centralized
location, it would bring down all locations completely.
I think he's looking for an async solution because of that. In my
solution, if one location goes down, the others keep going.
Regards,
Jeff Davis
---------------------------------
Yahoo! Acesso Grátis: Internet rápida e grátis. Instale o discador agora!
^ permalink raw reply [nested|flat] 91+ messages in thread
* Re: Postgresql replication
2005-08-24 12:21 Postgresql replication Carlos Henrique Reimer <carlosreimer@yahoo.com.br>
2005-08-24 15:54 ` Re: Postgresql replication Chris Browne <cbbrowne@acm.org>
2005-08-24 19:53 ` Re: Postgresql replication Jeff Davis <jdavis-pgsql@empires.org>
2005-08-24 22:19 ` Re: Postgresql replication Jim C. Nasby <jnasby@pervasive.com>
2005-08-25 18:52 ` Re: Postgresql replication Jeff Davis <jdavis-pgsql@empires.org>
2005-08-25 19:26 ` Re: Postgresql replication Carlos Henrique Reimer <carlosreimer@yahoo.com.br>
@ 2005-08-25 19:54 ` Matt Miller <mattm@epx.com>
2005-08-26 00:45 ` Re: Postgresql replication Jeff Davis <jdavis-pgsql@empires.org>
1 sibling, 1 reply; 91+ messages in thread
From: Matt Miller @ 2005-08-25 19:54 UTC (permalink / raw)
To: Carlos Henrique Reimer <carlosreimer@yahoo.com.br>; +Cc: Chris Browne <cbbrowne@acm.org>; pgsql-general@postgresql.org, Jeff Davis <jdavis-pgsql@empires.org>
> > http://pgfoundry.org/projects/pgcluster/ which provides syncronous
> > multi-master clustering.
>
> He specifically said that pgcluster did not work for him
> because ...PGCluster requires that there be a load balancer and a
> replicator centrally located managing the cluster. If a network
> problem happens at the centralized location, it would bring down all
> locations completely.
I think the load balancer is an optional component. Clients can connect
either to a load balancer, or directly to a specific machine.
Also, I think pgcluster can operate async. If the system runs in
"normal" mode then the client gets a response as soon as the transaction
is committed on the local machine. In "reliable" mode the client waits
for the commit to happen on all machines.
See
http://pgcluster.projects.postgresql.org/structure_of_replication.html
^ permalink raw reply [nested|flat] 91+ messages in thread
* Re: Postgresql replication
2005-08-24 12:21 Postgresql replication Carlos Henrique Reimer <carlosreimer@yahoo.com.br>
2005-08-24 15:54 ` Re: Postgresql replication Chris Browne <cbbrowne@acm.org>
2005-08-24 19:53 ` Re: Postgresql replication Jeff Davis <jdavis-pgsql@empires.org>
2005-08-24 22:19 ` Re: Postgresql replication Jim C. Nasby <jnasby@pervasive.com>
2005-08-25 18:52 ` Re: Postgresql replication Jeff Davis <jdavis-pgsql@empires.org>
2005-08-25 19:26 ` Re: Postgresql replication Carlos Henrique Reimer <carlosreimer@yahoo.com.br>
2005-08-25 19:54 ` Re: Postgresql replication Matt Miller <mattm@epx.com>
@ 2005-08-26 00:45 ` Jeff Davis <jdavis-pgsql@empires.org>
2005-08-26 18:30 ` Re: Postgresql replication Matt Miller <mattm@epx.com>
0 siblings, 1 reply; 91+ messages in thread
From: Jeff Davis @ 2005-08-26 00:45 UTC (permalink / raw)
To: Matt Miller <mattm@epx.com>; +Cc: Carlos Henrique Reimer <carlosreimer@yahoo.com.br>; Chris Browne <cbbrowne@acm.org>; pgsql-general
Matt Miller wrote:
>>>http://pgfoundry.org/projects/pgcluster/ which provides syncronous
>>>multi-master clustering.
>>
>>He specifically said that pgcluster did not work for him
>>because ...PGCluster requires that there be a load balancer and a
>>replicator centrally located managing the cluster. If a network
>>problem happens at the centralized location, it would bring down all
>>locations completely.
>
>
> I think the load balancer is an optional component. Clients can connect
> either to a load balancer, or directly to a specific machine.
The replicator surely is not optional, and must be centralized.
> Also, I think pgcluster can operate async. If the system runs in
> "normal" mode then the client gets a response as soon as the transaction
> is committed on the local machine. In "reliable" mode the client waits
> for the commit to happen on all machines.
>
Interesting. I suppose whatever works for your application is the right
answer for replication. PGCluster is query-based, right? I suppose the
question would then be, would he rather use a trigger-based replication
solution, like Slony, or a query-based replication solution.
Regards,
Jeff Davis
^ permalink raw reply [nested|flat] 91+ messages in thread
* Re: Postgresql replication
2005-08-24 12:21 Postgresql replication Carlos Henrique Reimer <carlosreimer@yahoo.com.br>
2005-08-24 15:54 ` Re: Postgresql replication Chris Browne <cbbrowne@acm.org>
2005-08-24 19:53 ` Re: Postgresql replication Jeff Davis <jdavis-pgsql@empires.org>
2005-08-24 22:19 ` Re: Postgresql replication Jim C. Nasby <jnasby@pervasive.com>
2005-08-25 18:52 ` Re: Postgresql replication Jeff Davis <jdavis-pgsql@empires.org>
2005-08-25 19:26 ` Re: Postgresql replication Carlos Henrique Reimer <carlosreimer@yahoo.com.br>
2005-08-25 19:54 ` Re: Postgresql replication Matt Miller <mattm@epx.com>
2005-08-26 00:45 ` Re: Postgresql replication Jeff Davis <jdavis-pgsql@empires.org>
@ 2005-08-26 18:30 ` Matt Miller <mattm@epx.com>
0 siblings, 0 replies; 91+ messages in thread
From: Matt Miller @ 2005-08-26 18:30 UTC (permalink / raw)
To: Jeff Davis <jdavis-pgsql@empires.org>; +Cc: Carlos Henrique Reimer <carlosreimer@yahoo.com.br>; Chris Browne <cbbrowne@acm.org>; pgsql-general
On Thu, 2005-08-25 at 17:45 -0700, Jeff Davis wrote:
> The replicator surely is not optional, and must be centralized.
From http://pgcluster.projects.postgresql.org/1_3/index.html:
"Several replication server can be set up. When an problem occurs at the
replication server, Cluster DB automatically changes connection to the
standing-by replication server. When all replication servers stop,
Cluster DB operates in stand-alone mode. There are two modes for
stand-alone mode: read only mode which only permits references, and read
write mode, which permits updating."
> PGCluster is query-based, right?
Yes.
^ permalink raw reply [nested|flat] 91+ messages in thread
* Re: Postgresql replication
2005-08-24 12:21 Postgresql replication Carlos Henrique Reimer <carlosreimer@yahoo.com.br>
2005-08-24 15:54 ` Re: Postgresql replication Chris Browne <cbbrowne@acm.org>
2005-08-24 19:53 ` Re: Postgresql replication Jeff Davis <jdavis-pgsql@empires.org>
2005-08-24 22:19 ` Re: Postgresql replication Jim C. Nasby <jnasby@pervasive.com>
2005-08-25 18:52 ` Re: Postgresql replication Jeff Davis <jdavis-pgsql@empires.org>
2005-08-25 19:26 ` Re: Postgresql replication Carlos Henrique Reimer <carlosreimer@yahoo.com.br>
@ 2005-08-25 21:30 ` Jeff Davis <jdavis-pgsql@empires.org>
1 sibling, 0 replies; 91+ messages in thread
From: Jeff Davis @ 2005-08-25 21:30 UTC (permalink / raw)
To: Carlos Henrique Reimer <carlosreimer@yahoo.com.br>; +Cc: Chris Browne <cbbrowne@acm.org>; pgsql-general
Carlos Henrique Reimer wrote:
> Exactly!!!!
>
Was there something lacking in my suggested solution at:
<http://archives.postgresql.org/pgsql-general/2005-08/msg01240.php;
It's a little complicated to administer, but it seems well-suited to a
company that has several locations that want to share data without being
too dependent upon eachother.
Regards,
Jeff Davis
^ permalink raw reply [nested|flat] 91+ messages in thread
* Re: Postgresql replication
2005-08-24 12:21 Postgresql replication Carlos Henrique Reimer <carlosreimer@yahoo.com.br>
2005-08-24 15:54 ` Re: Postgresql replication Chris Browne <cbbrowne@acm.org>
2005-08-24 19:53 ` Re: Postgresql replication Jeff Davis <jdavis-pgsql@empires.org>
@ 2005-08-26 12:55 ` Carlos Henrique Reimer <carlosreimer@yahoo.com.br>
1 sibling, 0 replies; 91+ messages in thread
From: Carlos Henrique Reimer @ 2005-08-26 12:55 UTC (permalink / raw)
To: Jeff Davis <jdavis-pgsql@empires.org>; pgsql-general
Hi,
I´m thinking to test your suggestion, basically because there are only few sites to connect, but there are some points that aren´t very clear to me.
My doubts:
1. How to make a view updatable? Using the rule system?
1. Why are inserts handled differently from updates?
2. Can not I use the rule system to make updates go to the base table too (the master piece) like the inserts?
3. Is there not some peformance issues related with the fact of using a table that is an union instead a normal table?
Thanks in advance!
Reimer
Jeff Davis <jdavis-pgsql@empires.org> escreveu:
Chris Browne wrote:
>
> Slony-I is a master/slave asynchronous replication system; if you
> already considered it unsuitable, then I see little likelihood of
> other systems with the same sorts of properties being suitable.
>
> What could conceivably be of use to you would be a *multimaster*
> asynchronous replication system. Unfortunately, multimaster
> *anything* is a really tough nut to crack.
>
In general that's a difficult problem, but in practice there may be a
solution.
For instance, perhaps the following configuration would be helpful:
Make a database for each physical server, called db1 ... dbN. Let your
logical tables in each database be table1 ... tableM. Now, for each
logical tableX (where 1 <= X <= M), make N physical tables, tableX_1 ...
tableX_N. Now, make a view called tableX that is the UNION of tableX_1
... tableX_N (tableX is not a real table, it's just a logical table).
Now, use Slony-I. For each dbY (where 1 <= Y <= N), make dbY a master
for tableX_Y (for all X where 1 <= X <= M) and a slave for tableX_Z (for
all X,Z where 1 <= X <= M, Z != Y).
Now, use a rule that replaces all INSERTs to tableX (where 1 <= X <= M)
on dbY (where 1 <= Y <= N) with INSERTs to tableX_Y.
That was my attempt at being unambiguous. In general what I mean is that
each database is master of one piece of a table, and slave to all the
other pieces of that table, and then you have a view which is the union
of those pieces. That view is the logical table. Then have a RULE which
makes INSERTs go to the physical table for which that database is master.
The advantages: if one machine goes down, the rest keep going, and
merely miss the updates from that one site to that table. If one machine
makes an insert to the table, it quickly propogates to the other
machines and transparently becomes a part of the logical tables on those
machines.
The disadvantages: UPDATEs are difficult, and might end up with a
complicated set of rules/procedures/triggers. You may have to program
the application defensively in case the database is unable to update a
remote database for various reasons (if the record to be updated is a
part of a table for which another database is master). Also, since the
solution is asynchronous, the databases may provide different results to
the same query.
In general, this solution does not account for all kinds of data
constraints. The conflict resolution is very simplified because it's
basically just the union of data. If that union could cause a constraint
violation itself, this solution might not be right for you. For
instance, let's say you're tracking video rentals, and store policy says
that you only rent one video per person. However, maybe they go to store
1 and rent a video, and run to store 2 and rent a video before store 1
sends the INSERT record over to store 2. Now, when they finally do
attempt to UNION the data for the view, you have an inconsistant state.
Many applications can get by just fine by UNIONing the data like that,
and if not, perhaps work around it.
I hope this is helpful. Let me know if there's some reason my plan won't
work.
Regards,
Jeff Davis
---------------------------(end of broadcast)---------------------------
TIP 9: In versions below 8.0, the planner will ignore your desire to
choose an index scan if your joining column's datatypes do not
match
__________________________________________________
Converse com seus amigos em tempo real com o Yahoo! Messenger
http://br.download.yahoo.com/messenger/
^ permalink raw reply [nested|flat] 91+ messages in thread
* Re: Postgresql replication
2005-08-24 12:21 Postgresql replication Carlos Henrique Reimer <carlosreimer@yahoo.com.br>
2005-08-24 15:54 ` Re: Postgresql replication Chris Browne <cbbrowne@acm.org>
@ 2005-08-30 17:55 ` Andrew Sullivan <ajs@crankycanuck.ca>
2 siblings, 0 replies; 91+ messages in thread
From: Andrew Sullivan @ 2005-08-30 17:55 UTC (permalink / raw)
To: pgsql-general
On Wed, Aug 24, 2005 at 11:54:42AM -0400, Chris Browne wrote:
> There is a Slony-II project ongoing that is trying to construct a
> more-or-less synchronous multimaster replication system (where part of
> the cleverness involves trying to get as much taking place in an
> asynchronous fashion as possible) that would almost certainly be of no
> use to your "use case."
Just to emphasise this point: assuming we ever get Slony-II to work,
it is all but guaranteed to be useless for cases like the one that
started this thread: it'll simply require very fast network
connections to work. I've had more than one person ask me when
multi-site multimaster is coming, and my answer is always, "Have you
started work on it yet?" I think there might be a way to hack up
Slony-I to do it -- Josh Berkus gave me a quick outline while at
OSCON that made me think it possible -- but AFAIK, nobody is actually
doing that work.
It's worth noting that single-origin master-slave async replication
is tricky, but by no means impossible. Multi-master _anything_ is
hard, no question about it; and it more or less always imposes some
overhead that you won't like. The question is merely whether you
want to pay that price.
A
--
Andrew Sullivan | ajs@crankycanuck.ca
A certain description of men are for getting out of debt, yet are
against all taxes for raising money to pay it off.
--Alexander Hamilton
^ permalink raw reply [nested|flat] 91+ messages in thread
* Re: Postgresql replication
@ 2005-08-24 13:57 Welty, Richard <richard.welty@bankofamerica.com>
0 siblings, 0 replies; 91+ messages in thread
From: Welty, Richard @ 2005-08-24 13:57 UTC (permalink / raw)
To: pgsql-general
[mailto:pgsql-general-owner@postgresql.org]On Behalf Of Michael Meskes
>Am Mittwoch, 24. August 2005 14:21 schrieb Carlos Henrique Reimer:
>> One possible solution is replicate the headquarter DB into the two
>> branches.
>> I read about slony-i, but then the replicated DBs will be read-only.
>That's because it's a master-slave replication. If you could sync the slave
>back to the master it would be a master itself.
>> I think I´m looking for a master-slave assynchronous solution. I know
>> pgReplicator can do it, but I think the project is not active any more.
>But Slony does master/slave replication.
i think carlos is confused about master-slave vs multi-master.
carlos,
master-slave async is much easier than multi-master async. yes, pgreplicator
can in theory do multi-master async in a restricted sort of way (the
generalized multi-master async problem is fairly intractable), but you're
right in that pgreplicator is not maintained anymore (and moreover it depends
on a no-longer-maintained dialect of tcl.) if i had infinite time and energy,
i'd be working on a reimplementation of pgreplicator in C, but i don't have
either and i don't see anyone offering to pay me to do it, so it'll stay on
the list of wanna-do projects for the time being.
richard
^ permalink raw reply [nested|flat] 91+ messages in thread
* Re: Postgresql replication
@ 2005-08-24 18:36 Welty, Richard <richard.welty@bankofamerica.com>
0 siblings, 0 replies; 91+ messages in thread
From: Welty, Richard @ 2005-08-24 18:36 UTC (permalink / raw)
To: pgsql-general
Carlos Henrique Reimer wrote:
> I read some documents about replication and realized
> that if you plan on using asynchronous replication, your
> application should be designed from the outset with that
> in mind because asynchronous replication is not something
> that can be easily "added on" after the fact.
> Am I right?
certainly, if your goal is a pgreplicator style multi-master async, this
is correct, as you have to make decisions about the direction of
data flow, id generation, and conflict resolution up front.
if you want slony-I style single master/multi slave, you don't have to
do so much advance thinking as records are only being inserted into
the system on the single master.
richard
^ permalink raw reply [nested|flat] 91+ messages in thread
* Re: Postgresql replication
@ 2005-08-24 21:07 Welty, Richard <richard.welty@bankofamerica.com>
2005-08-24 21:21 ` Re: Postgresql replication Jeff Davis <jdavis-pgsql@empires.org>
0 siblings, 1 reply; 91+ messages in thread
From: Welty, Richard @ 2005-08-24 21:07 UTC (permalink / raw)
To: Jeff Davis <jdavis-pgsql@empires.org>; +Cc: pgsql-general
Jeff Davis writes:
>The disadvantages:
one more: if you actually have m tables and n servers, you have
m x n tables in reality, which is pretty miserable scaling behavior.
i should think that rules, triggers, and embedded procedures would
explode in complexity rather rapidly.
i know i wouldn't want to administer one of these if there were a lot
of sites.
>I hope this is helpful. Let me know if there's some reason my plan won't
>work.
look at the solution in pgreplicator. site ids are embedded in the
id columns in the tables, so there only m tables, and a bit less insanity.
richard
(dropping out of this conversation, i'm unsubscribing while on vacation)
^ permalink raw reply [nested|flat] 91+ messages in thread
* Re: Postgresql replication
2005-08-24 21:07 Re: Postgresql replication Welty, Richard <richard.welty@bankofamerica.com>
@ 2005-08-24 21:21 ` Jeff Davis <jdavis-pgsql@empires.org>
0 siblings, 0 replies; 91+ messages in thread
From: Jeff Davis @ 2005-08-24 21:21 UTC (permalink / raw)
To: Welty, Richard <richard.welty@bankofamerica.com>; +Cc: pgsql-general; carlosreimer@yahoo.com.br
Welty, Richard wrote:
> Jeff Davis writes:
>
>
>>The disadvantages:
>
>
> one more: if you actually have m tables and n servers, you have
> m x n tables in reality, which is pretty miserable scaling behavior.
> i should think that rules, triggers, and embedded procedures would
> explode in complexity rather rapidly.
>
> i know i wouldn't want to administer one of these if there were a lot
> of sites.
>
True, but in practice n will usually be fairly reasonable. In
particular, his setup sounded like it would be only a few.
Also, you're really talking about scalability of administration. I don't
think performance will be significantly impacted.
>
>>I hope this is helpful. Let me know if there's some reason my plan won't
>>work.
>
>
> look at the solution in pgreplicator. site ids are embedded in the
> id columns in the tables, so there only m tables, and a bit less insanity.
>
That doesn't work with Slony-I unfortunately. I don't know much about
pgreplicator, but if it does something similar to what I'm talking
about, maybe it's a good thing to look into.
Regards,
Jeff Davis
^ permalink raw reply [nested|flat] 91+ messages in thread
* Re: Postgresql replication
@ 2005-08-24 21:28 Welty, Richard <richard.welty@bankofamerica.com>
0 siblings, 0 replies; 91+ messages in thread
From: Welty, Richard @ 2005-08-24 21:28 UTC (permalink / raw)
To: Jeff Davis <jdavis-pgsql@empires.org>; +Cc: pgsql-general
Jeff Davis writes:
>>I hope this is helpful. Let me know if there's some reason my plan won't
>>work.
> look at the solution in pgreplicator. site ids are embedded in the
> id columns in the tables, so there only m tables, and a bit less insanity.
That doesn't work with Slony-I unfortunately. I don't know much about
pgreplicator, but if it does something similar to what I'm talking
about, maybe it's a good thing to look into.
it'd be an excellent thing to look into if it were in any way supported or
maintained. it's a dead project (unfortunately.)
richard
^ permalink raw reply [nested|flat] 91+ messages in thread
* Postgresql Replication
@ 2006-02-22 06:10 Nareen S <bunix.n@gmail.com>
2006-02-22 09:23 ` Re: Postgresql Replication Richard Huxton <dev@archonet.com>
0 siblings, 1 reply; 91+ messages in thread
From: Nareen S @ 2006-02-22 06:10 UTC (permalink / raw)
To: pgsql-general
Current Setup
I am having a Mailserver running on Postfix.For the same I had configured a
High Availability Solution using Heartbeat and DRBD for
replication.Thesetup is like Primary/Secondary Node Servers and all
mails are replicated to
secondary using DRBD.If primary server fails secondary will be up with mails
..
The total number of users is 600 users,and Hardware used is Two Compaq
servers with SCSI HDD,1 GB RAM each,
Network-100Mbps
New Planned Setup
Now I am planning for Postgresql server in the same setup.I want to know
will it work in the same setup.ie if I configure
a new device in drbd can I get HA for postgresql also.If I use DRBD for
postgresql also ,will it affects the existing setups.Finally if it is not
possible what is the next option for this.
Thanks for any Help
Regards
John
^ permalink raw reply [nested|flat] 91+ messages in thread
* Re: Postgresql Replication
2006-02-22 06:10 Postgresql Replication Nareen S <bunix.n@gmail.com>
@ 2006-02-22 09:23 ` Richard Huxton <dev@archonet.com>
2006-02-22 11:43 ` Re: Postgresql Replication Alexander Schreiber <als@usenet.thangorodrim.de>
0 siblings, 1 reply; 91+ messages in thread
From: Richard Huxton @ 2006-02-22 09:23 UTC (permalink / raw)
To: Nareen S <bunix.n@gmail.com>; +Cc: pgsql-general
Nareen S wrote:
> Current Setup
> I am having a Mailserver running on Postfix.For the same I had configured a
> High Availability Solution using Heartbeat and DRBD for
> replication.Thesetup is like Primary/Secondary Node Servers and all
> mails are replicated to
> secondary using DRBD.If primary server fails secondary will be up with mails
> ..
> The total number of users is 600 users,and Hardware used is Two Compaq
> servers with SCSI HDD,1 GB RAM each,
> Network-100Mbps
>
> New Planned Setup
> Now I am planning for Postgresql server in the same setup.I want to know
> will it work in the same setup.ie if I configure
> a new device in drbd can I get HA for postgresql also.If I use DRBD for
> postgresql also ,will it affects the existing setups.Finally if it is not
> possible what is the next option for this.
It *should* work as long as you don't start the PostgreSQL server on the
second machine until you are sure that the first has failed. It will
then think it is recovering from having crashed.
This is assuming that drbd doesn't mess with how fsync() works, and I
seem to remember it doesn't last time I looked.
The alternative (assuming you're using the database for user
details/routing etc) would be replication (slony/dbmirror/etc) or
perhaps even PITR depending on the rate of change of the database.
--
Richard Huxton
Archonet Ltd
^ permalink raw reply [nested|flat] 91+ messages in thread
* Re: Postgresql Replication
2006-02-22 06:10 Postgresql Replication Nareen S <bunix.n@gmail.com>
2006-02-22 09:23 ` Re: Postgresql Replication Richard Huxton <dev@archonet.com>
@ 2006-02-22 11:43 ` Alexander Schreiber <als@usenet.thangorodrim.de>
0 siblings, 0 replies; 91+ messages in thread
From: Alexander Schreiber @ 2006-02-22 11:43 UTC (permalink / raw)
To: pgsql-general
Richard Huxton <dev@archonet.com> wrote:
> Nareen S wrote:
>> Current Setup
>> I am having a Mailserver running on Postfix.For the same I had configured a
>> High Availability Solution using Heartbeat and DRBD for
>> replication.Thesetup is like Primary/Secondary Node Servers and all
>> mails are replicated to
>> secondary using DRBD.If primary server fails secondary will be up with mails
>> ..
>> The total number of users is 600 users,and Hardware used is Two Compaq
>> servers with SCSI HDD,1 GB RAM each,
>> Network-100Mbps
>>
>> New Planned Setup
>> Now I am planning for Postgresql server in the same setup.I want to know
>> will it work in the same setup.ie if I configure
>> a new device in drbd can I get HA for postgresql also.If I use DRBD for
>> postgresql also ,will it affects the existing setups.Finally if it is not
>> possible what is the next option for this.
>
> It *should* work as long as you don't start the PostgreSQL server on the
> second machine until you are sure that the first has failed. It will
> then think it is recovering from having crashed.
This is simply not possible. DRBD allows access to the replicated device
only on the primary node and rejects any device access on the secondary
node. So the second machine doesn't even have access to the filesystem
with the PostgreSQL data files. Unless, of course, one accesses the
physical devices below the DRBD layer directly - but when you cheat on
your replication system you're bound to get what you deserve ;-)
Regards,
Alex.
--
"Opportunity is missed by most people because it is dressed in overalls and
looks like work." -- Thomas A. Edison
^ permalink raw reply [nested|flat] 91+ messages in thread
* PostGreSQL Replication
@ 2007-07-07 12:16 Gabriele <gabriele_palma@tin.it>
2007-07-10 16:32 ` Re: PostGreSQL Replication Andrew Sullivan <ajs@crankycanuck.ca>
2007-07-10 16:52 ` Re: PostGreSQL Replication Guido Neitzer <lists@event-s.net>
2007-07-10 18:11 ` Re: PostGreSQL Replication Adrian von Bidder <avbidder@fortytwo.ch>
0 siblings, 3 replies; 91+ messages in thread
From: Gabriele @ 2007-07-07 12:16 UTC (permalink / raw)
To: pgsql-general
I know this is a delicate topic which must be approached cautiously.
Let's have a server which feed data to multiple slaves, usually using
direct online connections. Now, we may want to allow those client to
sync the data to a local replica, work offline and then resync the
data back to the server. Which is the easiest way to approach this
problem?
Can you address me to tools, documentation, tech reference or other
resource on this topic? I've found people talking about Slony-I, what
can you tell me on this tool? Are there other tools?
Moreover, additionally to the previous question, let's take the case i
do have multiple indipendent and separate server and then i want to
upload the information of these server (actually not everything but a
subset of the data) to another server (here we have a unidirectional
comm, as opposed to previous bidirectional comm and we have asymmetric
structure as opposed to the previous exact replica), what are the
tools, documentation, best practices or other resources to approach
this problem?
Thank you!
^ permalink raw reply [nested|flat] 91+ messages in thread
* Re: PostGreSQL Replication
2007-07-07 12:16 PostGreSQL Replication Gabriele <gabriele_palma@tin.it>
@ 2007-07-10 16:32 ` Andrew Sullivan <ajs@crankycanuck.ca>
2 siblings, 0 replies; 91+ messages in thread
From: Andrew Sullivan @ 2007-07-10 16:32 UTC (permalink / raw)
To: pgsql-general
On Sat, Jul 07, 2007 at 05:16:56AM -0700, Gabriele wrote:
> Let's have a server which feed data to multiple slaves, usually using
> direct online connections. Now, we may want to allow those client to
> sync the data to a local replica, work offline and then resync the
> data back to the server. Which is the easiest way to approach this
> problem?
Write yourself a new system that does it? To my knowledge, nobody
has yet built a production-ready system that can do this sort of
multi-master merge-back replication. I can think of possible ways
you could bodge this up using Slony-I and log shipping, but I don't
think it'd be pretty.
> resource on this topic? I've found people talking about Slony-I, what
> can you tell me on this tool? Are there other tools?
You can find out more about Slony-I at <http://www.slony.info;.
> Moreover, additionally to the previous question, let's take the case i
> do have multiple indipendent and separate server and then i want to
> upload the information of these server (actually not everything but a
> subset of the data) to another server (here we have a unidirectional
> comm, as opposed to previous bidirectional comm and we have asymmetric
> structure as opposed to the previous exact replica), what are the
> tools, documentation, best practices or other resources to approach
> this problem?
This also sounds like a multimaster problem, and again I know of no
system that currently supports what you're talking about. This is
easier to bodge together under Slony using views and such like, but
it's still not trivial. If you wish to discuss how to do this with
Slony, I suggest taking it up on that list (available from the site
mentioned above).
A
--
Andrew Sullivan | ajs@crankycanuck.ca
A certain description of men are for getting out of debt, yet are
against all taxes for raising money to pay it off.
--Alexander Hamilton
^ permalink raw reply [nested|flat] 91+ messages in thread
* Re: PostGreSQL Replication
2007-07-07 12:16 PostGreSQL Replication Gabriele <gabriele_palma@tin.it>
@ 2007-07-10 16:52 ` Guido Neitzer <lists@event-s.net>
2 siblings, 0 replies; 91+ messages in thread
From: Guido Neitzer @ 2007-07-10 16:52 UTC (permalink / raw)
To: Gabriele <gabriele_palma@tin.it>; pgsql-general
On 07.07.2007, at 06:16, Gabriele wrote:
> Let's have a server which feed data to multiple slaves, usually using
> direct online connections. Now, we may want to allow those client to
> sync the data to a local replica, work offline and then resync the
> data back to the server. Which is the easiest way to approach this
> problem?
I don't know anything for PostgreSQL doing that.
FrontBase [1] might have something like that if I understood Geert
correctly. But I'm not sure about that. Maybe you ask them directly.
There DBMS is free but not open source though.
cug
[1] http://www.frontbase.com
^ permalink raw reply [nested|flat] 91+ messages in thread
* Re: PostGreSQL Replication
2007-07-07 12:16 PostGreSQL Replication Gabriele <gabriele_palma@tin.it>
@ 2007-07-10 18:11 ` Adrian von Bidder <avbidder@fortytwo.ch>
2007-07-13 17:14 ` Re: PostGreSQL Replication Gabriele <gabriele_palma@tin.it>
2 siblings, 1 reply; 91+ messages in thread
From: Adrian von Bidder @ 2007-07-10 18:11 UTC (permalink / raw)
To: pgsql-general
On Saturday 07 July 2007 14.16:56 Gabriele wrote:
> I know this is a delicate topic which must be approached cautiously.
>
> Let's have a server which feed data to multiple slaves, usually using
> direct online connections. Now, we may want to allow those client to
> sync the data to a local replica, work offline and then resync the
> data back to the server. Which is the easiest way to approach this
> problem?
Sounds like something you'd want to handle within the application, not at
the database layer. The application can know much more about how data is
modified and how it can be modified safely so a later merge operation won't
fail, or how merge conflicts (however these are defined) can be safely
handled. The database must assume that a user can modify "anything" during
the offline period, and can't assume anything about what to do on merge
operations.
cheers
-- vbi
--
The days just prior to marriage are like a snappy introduction to a
tedious book.
Attachments:
signature.asc (application/pgp-signature, 253B) download
^ permalink raw reply [nested|flat] 91+ messages in thread
* Re: PostGreSQL Replication
2007-07-07 12:16 PostGreSQL Replication Gabriele <gabriele_palma@tin.it>
2007-07-10 18:11 ` Re: PostGreSQL Replication Adrian von Bidder <avbidder@fortytwo.ch>
@ 2007-07-13 17:14 ` Gabriele <gabriele_palma@tin.it>
0 siblings, 0 replies; 91+ messages in thread
From: Gabriele @ 2007-07-13 17:14 UTC (permalink / raw)
To: pgsql-general
> Sounds like something you'd want to handle within the application
I believe i will try to follow this path.
^ permalink raw reply [nested|flat] 91+ messages in thread
* PostgreSQL Replication
@ 2021-02-16 13:55 Mutuku Ndeti <jnmutuku@gmail.com>
2021-02-16 14:28 ` Re: PostgreSQL Replication Raul Giucich <raul.giucich@gmail.com>
0 siblings, 1 reply; 91+ messages in thread
From: Mutuku Ndeti @ 2021-02-16 13:55 UTC (permalink / raw)
To: pgsql-general@lists.postgresql.org
Hi,
Need some advice here. I have an application using PostgreSQL. I need to
install it on 2 servers for redundancy purposes and have 2 databases. I
need the DBs to replicate to each other, in real-time. Writes can be done
on both DBs.
Please let me know if this is a feasible setup and the best way to proceed.
Thank you
--
www.agile.co.ke
^ permalink raw reply [nested|flat] 91+ messages in thread
* Re: PostgreSQL Replication
2021-02-16 13:55 PostgreSQL Replication Mutuku Ndeti <jnmutuku@gmail.com>
@ 2021-02-16 14:28 ` Raul Giucich <raul.giucich@gmail.com>
2021-02-16 14:46 ` Re: PostgreSQL Replication Mutuku Ndeti <jnmutuku@gmail.com>
2021-02-17 08:22 ` Re: PostgreSQL Replication Thomas Guyot <tguyot@gmail.com>
0 siblings, 2 replies; 91+ messages in thread
From: Raul Giucich @ 2021-02-16 14:28 UTC (permalink / raw)
To: Mutuku Ndeti <jnmutuku@gmail.com>; +Cc: pgsql-general@lists.postgresql.org
This article will help you
https://wiki.postgresql.org/wiki/Multimaster.
El mar., 16 feb. 2021 10:56, Mutuku Ndeti <jnmutuku@gmail.com> escribió:
> Hi,
>
> Need some advice here. I have an application using PostgreSQL. I need to
> install it on 2 servers for redundancy purposes and have 2 databases. I
> need the DBs to replicate to each other, in real-time. Writes can be done
> on both DBs.
>
> Please let me know if this is a feasible setup and the best way to
> proceed.
>
> Thank you
>
> --
> www.agile.co.ke
>
>
^ permalink raw reply [nested|flat] 91+ messages in thread
* Re: PostgreSQL Replication
2021-02-16 13:55 PostgreSQL Replication Mutuku Ndeti <jnmutuku@gmail.com>
2021-02-16 14:28 ` Re: PostgreSQL Replication Raul Giucich <raul.giucich@gmail.com>
@ 2021-02-16 14:46 ` Mutuku Ndeti <jnmutuku@gmail.com>
1 sibling, 0 replies; 91+ messages in thread
From: Mutuku Ndeti @ 2021-02-16 14:46 UTC (permalink / raw)
To: Raul Giucich <raul.giucich@gmail.com>; +Cc: pgsql-general@lists.postgresql.org
Thanks. Is there a free version of BDR?
On Tue, Feb 16, 2021, 5:29 PM Raul Giucich <raul.giucich@gmail.com> wrote:
> This article will help you
> https://wiki.postgresql.org/wiki/Multimaster.
>
> El mar., 16 feb. 2021 10:56, Mutuku Ndeti <jnmutuku@gmail.com> escribió:
>
>> Hi,
>>
>> Need some advice here. I have an application using PostgreSQL. I need to
>> install it on 2 servers for redundancy purposes and have 2 databases. I
>> need the DBs to replicate to each other, in real-time. Writes can be done
>> on both DBs.
>>
>> Please let me know if this is a feasible setup and the best way to
>> proceed.
>>
>> Thank you
>>
>> --
>> www.agile.co.ke
>>
>>
^ permalink raw reply [nested|flat] 91+ messages in thread
* Re: PostgreSQL Replication
2021-02-16 13:55 PostgreSQL Replication Mutuku Ndeti <jnmutuku@gmail.com>
2021-02-16 14:28 ` Re: PostgreSQL Replication Raul Giucich <raul.giucich@gmail.com>
@ 2021-02-17 08:22 ` Thomas Guyot <tguyot@gmail.com>
2021-02-17 09:22 ` Re: PostgreSQL Replication Mutuku Ndeti <jnmutuku@gmail.com>
1 sibling, 1 reply; 91+ messages in thread
From: Thomas Guyot @ 2021-02-17 08:22 UTC (permalink / raw)
To: Mutuku Ndeti <jnmutuku@gmail.com>; +Cc: pgsql-general@lists.postgresql.org
On 2021-02-16 09:28, Raul Giucich wrote:
> This article will help you
> https://wiki.postgresql.org/wiki/Multimaster
> <https://wiki.postgresql.org/wiki/Multimaster>.
>
> El mar., 16 feb. 2021 10:56, Mutuku Ndeti <jnmutuku@gmail.com
> <mailto:jnmutuku@gmail.com>> escribió:
>
> Hi,
>
> Need some advice here. I have an application using PostgreSQL. I
> need to install it on 2 servers for redundancy purposes and have 2
> databases. I need the DBs to replicate to each other, in real-time.
> Writes can be done on both DBs.
>
> Please let me know if this is a feasible setup and the best way to
> proceed.
>
Hi,
While I have no experience with replication on pgsql, in general
multi-master database replication is much more complex and often require
a pretty rigid setup. The graphs on that page seems to tell the same
story for pgsql.
Are you sure you really need multi-master replication as opposed to
having a single active master in a replicated set? If properly
configured, cluster software can automatically fail over the active
master, which provides very good redundancy and is much simpler from a
technological standpoint.
Regards,
--
Thomas
^ permalink raw reply [nested|flat] 91+ messages in thread
* Re: PostgreSQL Replication
2021-02-16 13:55 PostgreSQL Replication Mutuku Ndeti <jnmutuku@gmail.com>
2021-02-16 14:28 ` Re: PostgreSQL Replication Raul Giucich <raul.giucich@gmail.com>
2021-02-17 08:22 ` Re: PostgreSQL Replication Thomas Guyot <tguyot@gmail.com>
@ 2021-02-17 09:22 ` Mutuku Ndeti <jnmutuku@gmail.com>
2021-02-17 10:04 ` Re: PostgreSQL Replication Thomas Guyot <tguyot@gmail.com>
2021-02-19 17:35 ` Re: PostgreSQL Replication Peter J. Holzer <hjp-pgsql@hjp.at>
0 siblings, 2 replies; 91+ messages in thread
From: Mutuku Ndeti @ 2021-02-17 09:22 UTC (permalink / raw)
To: Thomas Guyot <tguyot@gmail.com>; +Cc: pgsql-general@lists.postgresql.org
Thank you.
I agree with you. Single master, with a standby replica, seems easier to
manage. Is there a way to automatically promote the standby, when the
active master fails? Is it feasible to have 2 instances of the application,
writing onto the same DB, reason for two instances of the application is to
allow for redundancy/load balancing.
On Wed, Feb 17, 2021 at 11:22 AM Thomas Guyot <tguyot@gmail.com> wrote:
> On 2021-02-16 09:28, Raul Giucich wrote:
> > This article will help you
> > https://wiki.postgresql.org/wiki/Multimaster
> > <https://wiki.postgresql.org/wiki/Multimaster;.
> >
> > El mar., 16 feb. 2021 10:56, Mutuku Ndeti <jnmutuku@gmail.com
> > <mailto:jnmutuku@gmail.com>> escribió:
> >
> > Hi,
> >
> > Need some advice here. I have an application using PostgreSQL. I
> > need to install it on 2 servers for redundancy purposes and have 2
> > databases. I need the DBs to replicate to each other, in real-time.
> > Writes can be done on both DBs.
> >
> > Please let me know if this is a feasible setup and the best way to
> > proceed.
> >
>
> Hi,
>
> While I have no experience with replication on pgsql, in general
> multi-master database replication is much more complex and often require
> a pretty rigid setup. The graphs on that page seems to tell the same
> story for pgsql.
>
> Are you sure you really need multi-master replication as opposed to
> having a single active master in a replicated set? If properly
> configured, cluster software can automatically fail over the active
> master, which provides very good redundancy and is much simpler from a
> technological standpoint.
>
> Regards,
>
> --
> Thomas
>
--
www.agile.co.ke
^ permalink raw reply [nested|flat] 91+ messages in thread
* Re: PostgreSQL Replication
2021-02-16 13:55 PostgreSQL Replication Mutuku Ndeti <jnmutuku@gmail.com>
2021-02-16 14:28 ` Re: PostgreSQL Replication Raul Giucich <raul.giucich@gmail.com>
2021-02-17 08:22 ` Re: PostgreSQL Replication Thomas Guyot <tguyot@gmail.com>
2021-02-17 09:22 ` Re: PostgreSQL Replication Mutuku Ndeti <jnmutuku@gmail.com>
@ 2021-02-17 10:04 ` Thomas Guyot <tguyot@gmail.com>
1 sibling, 0 replies; 91+ messages in thread
From: Thomas Guyot @ 2021-02-17 10:04 UTC (permalink / raw)
To: Mutuku Ndeti <jnmutuku@gmail.com>; +Cc: pgsql-general@lists.postgresql.org
On 2021-02-17 04:22, Mutuku Ndeti wrote:
> Thank you.
>
> I agree with you. Single master, with a standby replica, seems easier to
> manage. Is there a way to automatically promote the standby, when the
> active master fails? Is it feasible to have 2 instances of the
> application, writing onto the same DB, reason for two instances of the
> application is to allow for redundancy/load balancing.
>
Again, not being PostgreSQL-specific, it is possible to have an
active/standby master node with shared storage (ex fibrechannel,
iscsi... it can only be mounted on only one node at any given time and
it's the cluster's responsibility to ensure the other node has unmounted
properly). This is ideal when dealing with fully redundant storage
arrays, and fairly simple to setup on the cluster side. Attaching
additional slaves to an active/standby cluster is also usually simpler
since there is just one server/replication log.
Another solution is to have a replication ring (ex. A replicates to B, B
replicates to A). With such setup it is very important writes only ever
happen on a single node, and is easiest to do so by using a floating IP
that can only be reached from one node at any given time (again it's the
cluster's responsibility to ensure the floating IP is never on both).
This method may require a more complex configuration to ensure updates
are consistent and to keep additional slaves synchronized to the
cluster. Also since both servers have a permanent IP it is important to
ensure no updates are made directly to them. The warm side can still be
used for read-only access though (with a very small lag).
In either case, there is likely some configuration needed. This page
seems to list a few projects that may make your cluster setup much easier:
https://wiki.postgresql.org/wiki/Replication,_Clustering,_and_Connection_Pooling
Regards,
--
Thomas
^ permalink raw reply [nested|flat] 91+ messages in thread
* Re: PostgreSQL Replication
2021-02-16 13:55 PostgreSQL Replication Mutuku Ndeti <jnmutuku@gmail.com>
2021-02-16 14:28 ` Re: PostgreSQL Replication Raul Giucich <raul.giucich@gmail.com>
2021-02-17 08:22 ` Re: PostgreSQL Replication Thomas Guyot <tguyot@gmail.com>
2021-02-17 09:22 ` Re: PostgreSQL Replication Mutuku Ndeti <jnmutuku@gmail.com>
@ 2021-02-19 17:35 ` Peter J. Holzer <hjp-pgsql@hjp.at>
1 sibling, 0 replies; 91+ messages in thread
From: Peter J. Holzer @ 2021-02-19 17:35 UTC (permalink / raw)
To: pgsql-general@lists.postgresql.org
On 2021-02-17 12:22:50 +0300, Mutuku Ndeti wrote:
> I agree with you. Single master, with a standby replica, seems easier to
> manage. Is there a way to automatically promote the standby, when the active
> master fails?
Yes. There are several solutions. We use Patroni, which is simple to set
up and seems to "just work" (we routinely cause a failover every few
weeks and so far it has always worked fine). Patroni is quite
postgres-specific, though, so if you want to manage other applications,
too, you may want to look into more generic solutions.
> Is it feasible to have 2 instances of the application, writing onto
> the same DB, reason for two instances of the application is to allow
> for redundancy/load balancing.
You can have any number of applications writing into the same database.
At some point you might exceed the capacity of your hardware, but that's
a function of load in general, not the number of applications.
hp
--
_ | Peter J. Holzer | Story must make more sense than reality.
|_|_) | |
| | | hjp@hjp.at | -- Charles Stross, "Creative writing
__/ | http://www.hjp.at/ | challenge!"
Attachments:
signature.asc (application/pgp-signature, 832B) download
^ permalink raw reply [nested|flat] 91+ messages in thread
end of thread, other threads:[~2021-02-19 17:35 UTC | newest]
Thread overview: 91+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2005-02-18 16:40 PostgreSQL Replication Dieter Schröder <dieterschroder@gmail.com>
2005-02-18 16:53 ` Csaba Nagy <nagy@ecircle-ag.com>
2005-02-18 16:58 ` Scott Marlowe <smarlowe@g2switchworks.com>
2005-02-18 17:17 ` Dieter Schröder <dieterschroder@gmail.com>
2005-02-18 17:23 ` Scott Marlowe <smarlowe@g2switchworks.com>
2005-02-18 18:15 ` Joshua D. Drake <jd@commandprompt.com>
2005-02-18 18:30 ` Dieter Schröder <dieterschroder@gmail.com>
2005-02-18 17:11 ` John Sidney-Woollett <johnsw@wardbrook.com>
2005-02-18 20:34 ` Christopher Browne <cbbrowne@acm.org>
2005-02-18 23:29 ` Dieter Schröder <dieterschroder@gmail.com>
2005-05-05 00:49 postgresql replication Vlad <marchenko@gmail.com>
2005-05-05 01:30 ` Re: postgresql replication Richard Welty <rwelty@averillpark.net>
2005-05-05 02:06 ` Re: postgresql replication Vlad <marchenko@gmail.com>
2005-05-05 12:18 ` Re: postgresql replication Andrew Sullivan <ajs@crankycanuck.ca>
2005-05-05 14:52 ` Re: postgresql replication Scott Marlowe <smarlowe@g2switchworks.com>
2005-05-05 20:28 ` Re: postgresql replication Christopher Browne <cbbrowne@acm.org>
2005-05-05 07:10 ` Re: postgresql replication Peter Wilson <petew@yellowhawk.co.uk>
2005-05-05 07:20 ` Re: postgresql replication Peter Wilson <petew@yellowhawk.co.uk>
2005-05-05 13:11 ` Re: postgresql replication Christopher Browne <cbbrowne@acm.org>
2005-05-05 14:21 ` Re: postgresql replication Peter Wilson <petew@yellowhawk.co.uk>
2005-05-06 12:10 ` Re: postgresql replication Andrew Sullivan <ajs@crankycanuck.ca>
2005-08-24 12:21 Postgresql replication Carlos Henrique Reimer <carlosreimer@yahoo.com.br>
2005-08-24 13:31 ` Re: Postgresql replication Michael Meskes <meskes@postgresql.org>
2005-08-24 15:54 ` Re: Postgresql replication Chris Browne <cbbrowne@acm.org>
2005-08-24 17:31 ` Re: Postgresql replication Carlos Henrique Reimer <carlosreimer@yahoo.com.br>
2005-08-24 23:22 ` Re: Postgresql replication William Yu <wyu@talisys.com>
2005-08-25 00:39 ` Re: Postgresql replication Greg Stark <gsstark@mit.edu>
2005-08-25 00:46 ` Re: Postgresql replication Aly Dharshi <aly.dharshi@telus.net>
2005-08-25 07:01 ` Re: Postgresql replication William Yu <wyu@talisys.com>
2005-08-25 11:44 ` Re: Postgresql replication Bohdan Linda <bohdan.linda@seznam.cz>
2005-08-25 11:50 ` Re: Postgresql replication Tino Wildenhain <tino@wildenhain.de>
2005-08-25 12:34 ` Re: Postgresql replication William Yu <wyu@talisys.com>
2005-08-25 13:19 ` Re: Postgresql replication Tino Wildenhain <tino@wildenhain.de>
2005-08-25 19:02 ` Re: Postgresql replication William Yu <wyu@talisys.com>
2005-08-25 12:03 ` Re: Postgresql replication William Yu <wyu@talisys.com>
2005-08-25 13:06 ` Re: Postgresql replication David Goodenough <david.goodenough@btconnect.com>
2005-08-25 16:23 ` Re: Postgresql replication Chris Browne <cbbrowne@acm.org>
2005-08-25 21:13 ` Re: Postgresql replication William Yu <wyu@talisys.com>
2005-08-25 21:48 ` Re: Postgresql replication Chris Browne <cbbrowne@acm.org>
2005-08-25 23:00 ` Re: Postgresql replication Chris Travers <chris@metatrontech.com>
2005-08-26 15:35 ` Re: Postgresql replication Chris Browne <cbbrowne@acm.org>
2005-08-26 22:50 ` Re: Postgresql replication William Yu <wyu@talisys.com>
2005-08-28 03:35 ` Re: Postgresql replication Chris Browne <cbbrowne@acm.org>
2005-08-25 14:56 ` Re: Postgresql replication Brad Nicholson <bnichols@ca.afilias.info>
2005-08-25 21:17 ` Re: Postgresql replication Chris Browne <cbbrowne@acm.org>
2005-08-25 16:20 ` Re: Postgresql replication Chris Browne <cbbrowne@acm.org>
2005-08-25 20:05 ` Re: Postgresql replication Steve Atkins <steve@blighty.com>
2005-08-25 21:39 ` Re: Postgresql replication Chris Browne <cbbrowne@acm.org>
2005-08-30 17:56 ` Re: Postgresql replication Andrew Sullivan <ajs@crankycanuck.ca>
2005-08-25 16:18 ` Re: Postgresql replication Chris Browne <cbbrowne@acm.org>
2005-08-25 12:24 ` Re: Postgresql replication William Yu <wyu@talisys.com>
2005-08-25 23:15 ` Re: Postgresql replication Chris Travers <chris@travelamericas.com>
2005-08-26 07:23 ` Re: Postgresql replication William Yu <wyu@talisys.com>
2005-08-26 17:26 ` Re: Postgresql replication Chris Travers <chris@travelamericas.com>
2005-08-26 23:07 ` Re: Postgresql replication William Yu <wyu@talisys.com>
2005-08-27 01:26 ` Re: Postgresql replication Chris Travers <chris@travelamericas.com>
2005-08-27 13:27 ` Re: Postgresql replication William Yu <wyu@talisys.com>
2005-08-27 18:03 ` Re: Postgresql replication Chris Travers <chris@travelamericas.com>
2005-08-27 19:25 ` Re: Postgresql replication William Yu <wyu@talisys.com>
2005-08-25 06:29 ` Re: Postgresql replication Chris Travers <chris@travelamericas.com>
2005-08-25 14:47 ` Re: Postgresql replication Brad Nicholson <bnichols@ca.afilias.info>
2005-08-24 19:53 ` Re: Postgresql replication Jeff Davis <jdavis-pgsql@empires.org>
2005-08-24 22:19 ` Re: Postgresql replication Jim C. Nasby <jnasby@pervasive.com>
2005-08-25 18:52 ` Re: Postgresql replication Jeff Davis <jdavis-pgsql@empires.org>
2005-08-25 19:26 ` Re: Postgresql replication Carlos Henrique Reimer <carlosreimer@yahoo.com.br>
2005-08-25 19:54 ` Re: Postgresql replication Matt Miller <mattm@epx.com>
2005-08-26 00:45 ` Re: Postgresql replication Jeff Davis <jdavis-pgsql@empires.org>
2005-08-26 18:30 ` Re: Postgresql replication Matt Miller <mattm@epx.com>
2005-08-25 21:30 ` Re: Postgresql replication Jeff Davis <jdavis-pgsql@empires.org>
2005-08-26 12:55 ` Re: Postgresql replication Carlos Henrique Reimer <carlosreimer@yahoo.com.br>
2005-08-30 17:55 ` Re: Postgresql replication Andrew Sullivan <ajs@crankycanuck.ca>
2005-08-24 13:57 Re: Postgresql replication Welty, Richard <richard.welty@bankofamerica.com>
2005-08-24 18:36 Re: Postgresql replication Welty, Richard <richard.welty@bankofamerica.com>
2005-08-24 21:07 Re: Postgresql replication Welty, Richard <richard.welty@bankofamerica.com>
2005-08-24 21:21 ` Re: Postgresql replication Jeff Davis <jdavis-pgsql@empires.org>
2005-08-24 21:28 Re: Postgresql replication Welty, Richard <richard.welty@bankofamerica.com>
2006-02-22 06:10 Postgresql Replication Nareen S <bunix.n@gmail.com>
2006-02-22 09:23 ` Re: Postgresql Replication Richard Huxton <dev@archonet.com>
2006-02-22 11:43 ` Re: Postgresql Replication Alexander Schreiber <als@usenet.thangorodrim.de>
2007-07-07 12:16 PostGreSQL Replication Gabriele <gabriele_palma@tin.it>
2007-07-10 16:32 ` Re: PostGreSQL Replication Andrew Sullivan <ajs@crankycanuck.ca>
2007-07-10 16:52 ` Re: PostGreSQL Replication Guido Neitzer <lists@event-s.net>
2007-07-10 18:11 ` Re: PostGreSQL Replication Adrian von Bidder <avbidder@fortytwo.ch>
2007-07-13 17:14 ` Re: PostGreSQL Replication Gabriele <gabriele_palma@tin.it>
2021-02-16 13:55 PostgreSQL Replication Mutuku Ndeti <jnmutuku@gmail.com>
2021-02-16 14:28 ` Raul Giucich <raul.giucich@gmail.com>
2021-02-16 14:46 ` Mutuku Ndeti <jnmutuku@gmail.com>
2021-02-17 08:22 ` Thomas Guyot <tguyot@gmail.com>
2021-02-17 09:22 ` Mutuku Ndeti <jnmutuku@gmail.com>
2021-02-17 10:04 ` Thomas Guyot <tguyot@gmail.com>
2021-02-19 17:35 ` Peter J. Holzer <hjp-pgsql@hjp.at>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox