From: | Amador Alvarez <apradopg(at)gmail(dot)com> |
---|---|
To: | Ken Barber <ken(at)bob(dot)sh> |
Cc: | Forums postgresql <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: General Advice for avoiding concurrency during schema migrations |
Date: | 2014-03-24 17:42:10 |
Message-ID: | CA+vGRthAbj2f4ehp6YNB9XhfgEQnQV22J30EtX1KomjC17rE4w@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Hi Ken,
Do you really need to allow web server connections to the database during a
schema migration ? Why not locking them up either with pg_hba.cong or a
firewal rule or symply shut it off temporarily ?
Cheers,
A.A.
On Fri, Mar 21, 2014 at 10:46 AM, Ken Barber <ken(at)bob(dot)sh> wrote:
> Hi there,
>
> I was just wondering if anyone has some general advice for how to
> ensure a schema migration for an application has exclusivity during
> its run.
>
> This is to avoid silly things like, if someone leaves an application
> server running during migration the migration should be able to lock
> somehow to avoid any changes while it is running.
>
> I've taken a look at LOCK TABLE, which can lock a table obviously (and
> I can obviously lock _all_ tables to fake a LOCK DATABASE), but I'm
> wondering if someone has some opinion around just raising the
> transaction isolation level to achieve similar goals?
>
> Any lessons learnt and best practices would be much appreciated :-).
>
> ken.
>
>
> --
> Sent via pgsql-general mailing list (pgsql-general(at)postgresql(dot)org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-general
>
From | Date | Subject | |
---|---|---|---|
Next Message | john gale | 2014-03-24 17:54:59 | Re: Thousands of errors...what happened? |
Previous Message | Pavel Stehule | 2014-03-24 17:38:53 | Re: Do we have a range of SQLSTATE codes assigned for custom use? |