Re: Having trouble with backups (was: Re: Crash Recovery) - Mailing list pgsql-performance

From Kevin Brown
Subject Re: Having trouble with backups (was: Re: Crash Recovery)
Date
Msg-id 20030125010436.GB28252@filer
Whole thread Raw
In response to Re: Having trouble with backups (was: Re: Crash Recovery)  (Carlos Moreno <moreno@mochima.com>)
List pgsql-performance
Carlos Moreno wrote:
> And no, as I said above, I don't think the software locks
> any tables -- in fact, if you ask me, I would say *there
> is* bad coding in the application, but precisely because
> there are no locks, no transactions (I know, shame on me!
> That's near the top in the list of most important things
> to do...), so that's why I was so reluctant to believe
> my colleague when he insisted that the pg_dump's were
> "freezing" the application...  I had to see it with my
> own eyes, and on two different occasions, to be convinced
> :-(
>
> In case this tells you something...  The size of the
> backup files (in plain ASCII) are around 300MB  (the
> command is "nice pg_dump -c -f file.sql dbname").

One thing you can do to help track this down is to place

    stats_command_string = on

in your postgresql.conf and restart the database (it may be sufficient
to tell the database to reread the config file via "pg_ctl reload").
Then, when the backup is going, run the application.

When it "freezes", connect to the database via psql as the user
postgres and do a "select * from pg_stat_activity".  You'll see the
list of connected processes and the current query being executed by
each, if any.

Do that multiple times and you should see the progress, if any, the
application is making in terms of database queries.


Hope this helps...


--
Kevin Brown                          kevin@sysexperts.com

pgsql-performance by date:

Previous
From: Tom Lane
Date:
Subject: Re: WEIRD CRASH?!?!
Next
From: Rod Taylor
Date:
Subject: Re: WEIRD CRASH?!?!