Re: Replication and coding good practices

From: David Fetter <david(at)fetter(dot)org>
To: Ivan Sergio Borgonovo <mail(at)webthatworks(dot)it>
Cc: "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org>
Subject: Re: Replication and coding good practices
Date: 2009-06-28 16:01:33
Message-ID: 20090628160133.GR21081@fetter.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Sun, Jun 28, 2009 at 12:05:08PM +0200, Ivan Sergio Borgonovo wrote:
> I'm starting to see the need of a replication solution in my
> horizon.
>
> I've learned that some replication solution require code
> modification, some require different assumption abut how connections
> behave...
>
> Are there any rules of thumb to consider for making an application
> easier to work with a "general" replication solution?
>
> The applications I mostly deal with are e-commerce sites.

It really depends on what replication solution you choose, along with
the environment you're deploying into.

That said, I've noticed that the things that are generally good
practice help you even more when you're doing replication.

Practices I've seen help directly:

* Separate read users and code from write users and code.

* Separate DDL from both of the above.

* Make DDL changes part of your deployment process and only allow them
in files which track in your SCM system.

Cheers,
David.
--
David Fetter <david(at)fetter(dot)org> http://fetter.org/
Phone: +1 415 235 3778 AIM: dfetter666 Yahoo!: dfetter
Skype: davidfetter XMPP: david(dot)fetter(at)gmail(dot)com

Remember to vote!
Consider donating to Postgres: http://www.postgresql.org/about/donate

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message APseudoUtopia 2009-06-28 16:22:32 Re: Switching from MySQL: ON DUPLICATE KEY UPDATE, plpgsql function
Previous Message andy 2009-06-28 13:26:08 Re: data modeling question