Re: [PERFORM] Backup strategies

2008-10-17 Thread Simon Riggs
On Wed, 2008-10-15 at 16:05 +0200, Ivan Voras wrote: > So, pg_start_backup() freezes the data at the time it's called but > still > data and xlog are changed, in a different way that's safe to backup? No, that's not how it works. The pg_start_backup() records the point that we must rollforward f

Re: [PERFORM] Backup strategies

2008-10-15 Thread Scott Marlowe
On Wed, Oct 15, 2008 at 8:58 AM, Ivan Voras <[EMAIL PROTECTED]> wrote: > 2008/10/15 Aidan Van Dyk <[EMAIL PROTECTED]>: >> * Ivan Voras <[EMAIL PROTECTED]> [081015 10:05]: >> >>> So, pg_start_backup() freezes the data at the time it's called but still >>> data and xlog are changed, in a different wa

Re: [PERFORM] Backup strategies

2008-10-15 Thread Tom Lane
Ivan Voras <[EMAIL PROTECTED]> writes: > Matthew Wakeling wrote: >> The files may change, but it doesn't matter, because there is enough >> information in the xlog to correct it all. > I'm thinking about these paragraphs in the documentation: >> You can, however, omit from the backup dump the fil

Re: [PERFORM] Backup strategies

2008-10-15 Thread Ivan Voras
2008/10/15 Aidan Van Dyk <[EMAIL PROTECTED]>: > * Ivan Voras <[EMAIL PROTECTED]> [081015 10:05]: > >> So, pg_start_backup() freezes the data at the time it's called but still >> data and xlog are changed, in a different way that's safe to backup? Why >> not run with pg_start_backup() always enabled

Re: [PERFORM] Backup strategies

2008-10-15 Thread Peter Childs
2008/10/15 Ivan Voras <[EMAIL PROTECTED]>: > Matthew Wakeling wrote: >> On Wed, 15 Oct 2008, Ivan Voras wrote: Nope. Even files in data directory change. That's why the documentation warns against tools that emit errors for files that change during the copy. >>> >>> Ok, thanks. This

Re: [PERFORM] Backup strategies

2008-10-15 Thread Ivan Voras
Matthew Wakeling wrote: > On Wed, 15 Oct 2008, Ivan Voras wrote: >>> Nope. Even files in data directory change. That's why the documentation >>> warns against tools that emit errors for files that change during the >>> copy. >> >> Ok, thanks. This is a bit off-topic, but if it's not how I imagine i

Re: [PERFORM] Backup strategies

2008-10-15 Thread Matthew Wakeling
On Wed, 15 Oct 2008, Ivan Voras wrote: Nope. Even files in data directory change. That's why the documentation warns against tools that emit errors for files that change during the copy. Ok, thanks. This is a bit off-topic, but if it's not how I imagine it, then how is it implemented? The fil

Re: [PERFORM] Backup strategies

2008-10-15 Thread Ivan Voras
Guillaume Lelarge wrote: > Ivan Voras a écrit : >> It looks like PostgreSQL freezes the state of the "data" directory in >> this case (and new data goes only to the transaction log - pg_xlog), >> which effectively creates an application-level snapshot. Good to know. > > Nope. Even files in data d

Re: [PERFORM] Backup strategies

2008-10-15 Thread Guillaume Lelarge
Ivan Voras a écrit : > Jesper Krogh wrote: >>[...] >> It worked when I tested it, but I may just have been darn lucky. > > No, it should be ok - I just didn't catch up with the times :) At least > that's my interpretation of this paragraph in documentation: > > """Some backup tools that you might

Re: [PERFORM] Backup strategies

2008-10-15 Thread Ivan Voras
Jesper Krogh wrote: > Ivan Voras wrote: >> Warning: DO NOT do on-the-fly binary backups without snapshots. >> Archiving the database directory with tar on a regular file system, >> while the server is running, will result in an archive that most likely >> won't work when restored. > > Even if you

Re: [PERFORM] Backup strategies

2008-10-15 Thread Jesper Krogh
Ivan Voras wrote: Warning: DO NOT do on-the-fly binary backups without snapshots. Archiving the database directory with tar on a regular file system, while the server is running, will result in an archive that most likely won't work when restored. Even if you do a "pg_start_backup/pg_stop_backu

Re: [PERFORM] Backup strategies

2008-10-15 Thread Craig Ringer
Ivan Voras wrote: > Warning: DO NOT do on-the-fly binary backups without snapshots. > Archiving the database directory with tar on a regular file system, > while the server is running, will result in an archive that most likely > won't work when restored. You can do non-snapshot-based filesystem

Re: [PERFORM] Backup strategies

2008-10-15 Thread Ivan Voras
Reuven M. Lerner wrote: > But before I do any of these things, I want to hear what others have > discovered in terms of high-performance backups. Is there a way to stop > pg_dump from locking up the database so much? Is there a knob that I > can turn to do a low-priority backup while the live si

Re: [PERFORM] Backup strategies

2008-10-14 Thread Kevin Grittner
>>> "Reuven M. Lerner" <[EMAIL PROTECTED]> wrote: > Is there a superior backup strategy than pg_dump > every 24 hours? You should probably consider: http://www.postgresql.org/docs/8.2/interactive/continuous-archiving.html -Kevin -- Sent via pgsql-performance mailing list (pgsql-performance

[PERFORM] Backup strategies

2008-10-14 Thread Reuven M. Lerner
I'm running a medium-traffic Web site that has been running for a few years, and which uses about four PostgreSQL databases on a regular basis. I'm currently running 8.2, although I'm planning to upgrade to 8.3 in the coming week or two, in part because of the problems that I'm having. The da