Re: doubt with pg_dump and high concurrent used databases

From: "Peter Childs" <peterachilds(at)gmail(dot)com>
To:
Cc: pgsql-performance(at)postgresql(dot)org
Subject: Re: doubt with pg_dump and high concurrent used databases
Date: 2007-11-26 10:41:24
Message-ID: a2de01dd0711260241m3debd932sa8a82b0238d6e48@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

On 25/11/2007, Pablo Alcaraz <pabloa(at)laotraesquina(dot)com(dot)ar> wrote:
>
> Tom Lane wrote:
> > "Peter Childs" <peterachilds(at)gmail(dot)com> writes:
> >
> >> On 25/11/2007, Erik Jones <erik(at)myemma(dot)com> wrote:
> >>
> >>>> Does the pg_dump create this kind of "consistent backups"? Or do I
> >>>> need to do the backups using another program?
> >>>>
> >>> Yes, that is exactly what pg_dump does.
> >>>
> >>>
> >> Yes so long as you are using transactions correctly. Ie doing a begin
> before
> >> each invoice and a commit afterwards if your not bothering and using
> auto
> >> commit you *may* have problems.
> >>
> >
> > I think you need to qualify that a bit more. What you're saying is that
> > if an application has consistency requirements that are momentarily
> > violated during multi-statement updates, and it fails to wrap such
> > updates into a single transaction, then pg_dump could capture one of the
> > intermediate states. That's true, but it's hardly pg_dump's fault.
> > If there were a system crash partway through such a sequence, the
> > consistency requirements would be violated afterwards, too.
> >
> >
>
> Agree. In my case I define "consistent database state" like the state
> the database has when the program that use it is stopped normally and
> without errors. In this "state" the program starts without troubles and
> "everything looks fine". I believe this behavior is because all the
> inserts and updates are made using transactions. Another things will be
> a bug, it ll be fixed and it ll not be pg_dump fault.
>
> So if pg_dump can capture a "consistent state" with all the data until
> the start time, without all the pending open transaction updates/inserts
> in the same way that I did when I stopped the program before start
> pg_dump, for me is usefull and enough to solve my problem.
>
> Thanks to all!
>
> Pablo
>
>
Given your long description over what you though was "constant" I thought it
important that the answer yes but was given rather than just a plain yes.
I've met quite a few apps that create inconstant databases when the
database its self is actually consistent.

Peter

In response to

Browse pgsql-performance by date

  From Date Subject
Next Message Peter Koczan 2007-11-26 17:04:50 TB-sized databases
Previous Message Heikki Linnakangas 2007-11-26 09:39:23 Re: Problems with PostGreSQL and Windows 2003