Re: [PERFORM] PITR Backups

2007-06-25 Thread Tom Lane
Dan Gorman <[EMAIL PROTECTED]> writes: > I didn't however keep the snapshots around. I could try and re-set > this scenario up. I was in the middle of doing some data migration > with Netapp and wanted to just 'test' it to make sure it was sane. > If you guys would like me to try to 'break' it

Re: [PERFORM] PITR Backups

2007-06-25 Thread Dan Gorman
No, however, I will attach the postgreql.conf so everyone can look at other settings just in case. postgresql.conf Description: Binary data Regards, Dan Gorman On Jun 25, 2007, at 10:07 AM, Gregory Stark wrote: "Simon Riggs" <[EMAIL PROTECTED]> writes: WARNING: page 28900 of relation 166

Re: [PERFORM] PITR Backups

2007-06-25 Thread Tom Lane
"Simon Riggs" <[EMAIL PROTECTED]> writes: >> Reformatting and sorting, we have >> >> WARNING: page 28900 of relation 1663/16384/76718 was uninitialized >> WARNING: page 28902 of relation 1663/16384/76718 was uninitialized >> WARNING: page 26706 of relation 1663/16384/76719 was uninitialized >> WA

Re: [PERFORM] PITR Backups

2007-06-25 Thread Gregory Stark
"Simon Riggs" <[EMAIL PROTECTED]> writes: >> WARNING: page 28900 of relation 1663/16384/76718 was uninitialized >> WARNING: page 28902 of relation 1663/16384/76718 was uninitialized > >> WARNING: page 26706 of relation 1663/16384/76719 was uninitialized >> WARNING: page 26708 of relation 1663/1638

Re: [PERFORM] PITR Backups

2007-06-25 Thread Dan Gorman
Thanks for the pointers to a) make it readable and b) log min messages I didn't however keep the snapshots around. I could try and re-set this scenario up. I was in the middle of doing some data migration with Netapp and wanted to just 'test' it to make sure it was sane. If you guys would l

Re: [PERFORM] PITR Backups

2007-06-25 Thread Simon Riggs
On Mon, 2007-06-25 at 12:34 -0400, Tom Lane wrote: > Dan Gorman <[EMAIL PROTECTED]> writes: > > Jun 21 00:39:43 sfmedstorageha001 postgres[3506]: [9-1] 2007-06-21 > > 00:39:43 PDTLOG: redo done at 71/99870670 This is mid-way through an xlog file. > > Jun 21 00:39:43 sfmedstorageha001 postgres[

Re: [PERFORM] PITR Backups

2007-06-25 Thread Tom Lane
Dan Gorman <[EMAIL PROTECTED]> writes: > Jun 21 00:39:43 sfmedstorageha001 postgres[3506]: [9-1] 2007-06-21 > 00:39:43 PDTLOG: redo done at 71/99870670 > Jun 21 00:39:43 sfmedstorageha001 postgres[3506]: [10-1] 2007-06-21 > 00:39:43 PDTWARNING: page 28905 of relation 1663/16384/76718 was >

Re: [PERFORM] PITR Backups

2007-06-25 Thread Simon Riggs
On Mon, 2007-06-25 at 08:28 -0700, Dan Gorman wrote: > I took several snapshots. In all cases the FS was fine. In one case > the db looked like on recovery it thought there were outstanding > pages to be written to disk as seen below and the db wouldn't start. > > Jun 21 00:39:43 sfmedstorageh

Re: [PERFORM] PITR Backups

2007-06-25 Thread Dan Gorman
Greg, PG 8.2.4 Regards, Dan Gorman On Jun 25, 2007, at 9:02 AM, Gregory Stark wrote: "Dan Gorman" <[EMAIL PROTECTED]> writes: I took several snapshots. In all cases the FS was fine. In one case the db looked like on recovery it thought there were outstanding pages to be written to disk

Re: [PERFORM] PITR Backups

2007-06-25 Thread Gregory Stark
"Dan Gorman" <[EMAIL PROTECTED]> writes: > I took several snapshots. In all cases the FS was fine. In one case the db > looked like on recovery it thought there were outstanding pages to be written > to disk as seen below and the db wouldn't start. > > Jun 21 00:39:43 sfmedstorageha001 postgres[3

Re: [PERFORM] PITR Backups

2007-06-25 Thread Dan Gorman
I took several snapshots. In all cases the FS was fine. In one case the db looked like on recovery it thought there were outstanding pages to be written to disk as seen below and the db wouldn't start. Jun 21 00:39:43 sfmedstorageha001 postgres[3506]: [9-1] 2007-06-21 00:39:43 PDTLOG: redo

Re: [PERFORM] PITR Backups

2007-06-25 Thread Dan Gorman
It's the latter, is snapshot of the durable state of the storage system (e.g. it will never be corrupted) Regards, Dan Gorman On Jun 22, 2007, at 11:02 AM, Tom Lane wrote: "Simon Riggs" <[EMAIL PROTECTED]> writes: On Fri, 2007-06-22 at 13:12 -0400, Tom Lane wrote: If you saw a problem I'd

Re: [PERFORM] PITR Backups

2007-06-25 Thread Gregory Stark
"Tom Lane" <[EMAIL PROTECTED]> writes: > AFAIK, actually workable methods of this type depend on filesystem > cooperation, and are able to produce coherent snapshots of the logical > (not necessarily physical) filesystem content at a specific instant. I think you need filesystem cooperation in o

Re: [PERFORM] PITR Backups

2007-06-25 Thread Tom Lane
Koichi Suzuki <[EMAIL PROTECTED]> writes: > Year, I agree we should carefully follow how Done really did a backup. > My point is PostgreSQL may have to extend the file during the hot backup > to write to the new block. It is slightly different from Oracle's case. > Oracle allocates all the da

Re: [PERFORM] PITR Backups

2007-06-25 Thread Simon Riggs
On Mon, 2007-06-25 at 19:06 +0900, Koichi Suzuki wrote: > Year, I agree we should carefully follow how Done really did a backup. > My point is PostgreSQL may have to extend the file during the hot backup > to write to the new block. If the snapshot is a consistent, point-in-time copy then I d

Re: [PERFORM] PITR Backups

2007-06-25 Thread Koichi Suzuki
Hi, Year, I agree we should carefully follow how Done really did a backup. My point is PostgreSQL may have to extend the file during the hot backup to write to the new block. It is slightly different from Oracle's case. Oracle allocates all the database space in advance so that there could

Re: [PERFORM] PITR Backups

2007-06-22 Thread Tom Lane
"Simon Riggs" <[EMAIL PROTECTED]> writes: > On Fri, 2007-06-22 at 13:12 -0400, Tom Lane wrote: >> If you saw a problem I'd be inclined to question whether >> there is some upstream component (OS or disk controller) that's >> reordering writes. > Given thats exactly what they do, constantly, I don'

Re: [PERFORM] PITR Backups

2007-06-22 Thread Simon Riggs
On Fri, 2007-06-22 at 13:12 -0400, Tom Lane wrote: > Dan Gorman <[EMAIL PROTECTED]> writes: > > This snapshot is done at the LUN (filer) level, postgres is un-aware > > we're creating a backup, so I'm not sure how pg_start_backup() plays > > into this ... > > That method works too, as long as

Re: [PERFORM] PITR Backups

2007-06-22 Thread Tom Lane
Dan Gorman <[EMAIL PROTECTED]> writes: > This snapshot is done at the LUN (filer) level, postgres is un-aware > we're creating a backup, so I'm not sure how pg_start_backup() plays > into this ... That method works too, as long as you snapshot both the data files and WAL files --- when you sta

Re: [PERFORM] PITR Backups

2007-06-22 Thread Joshua D. Drake
Toru SHIMOGAKI wrote: > Joshua D. Drake wrote: > >>> - If we don't use hardware level snapshot operation, it takes long time to >>> take >>> a large backup data, and a lot of full-page-written WAL files are made. >> Does it? I have done it with fairly large databases without issue. > > You mea

Re: [PERFORM] PITR Backups

2007-06-22 Thread Gregory Stark
>> So, if any data is written during taking snapshot, we can't assurance data >> correctness *strictly* . That sounds nothing like what I've heard called a "snapshot" before. Some "filesystems" which aren't really filesystems but are also storage layer drivers like Veritas (and ZFS?) allow you to

Re: [PERFORM] PITR Backups

2007-06-22 Thread Joshua D. Drake
Toru SHIMOGAKI wrote: Steve Atkins wrote: - When we take a PITR base backup with hardware level snapshot operation (not filesystem level) which a lot of storage vender provide, the backup data can be corrupted as Dan said. During recovery we can't even read it, especially if meta-data

Re: [PERFORM] PITR Backups

2007-06-22 Thread Simon Riggs
On Fri, 2007-06-22 at 17:23 +0900, Toru SHIMOGAKI wrote: > Dan Gorman wrote: > > Here is an example. Most of the snap shots worked fine, but I did get > > this once: > > Thank you for your example. I'd appreciate it if I'd get any responses; > whether > we should tackle the problem for 8.4? If

Re: [PERFORM] PITR Backups

2007-06-22 Thread Andreas Kostyrka
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Wasn't it select pg_start_backup('backuplabel');? Andreas Kurt Overberg wrote: > You can use the psql command line to run: > > "select pg_start_backup();" > > ...then when you're done, > > "select pg_stop_backup();" > > if you want an example fro

Re: [PERFORM] PITR Backups

2007-06-22 Thread Kurt Overberg
You can use the psql command line to run: "select pg_start_backup();" ...then when you're done, "select pg_stop_backup();" if you want an example from the unix command line: psql -c "select pg_start_backup();" database_name then psql -c "select pg_stop_backup();" database_name /kurt On J

Re: [PERFORM] PITR Backups

2007-06-22 Thread Dan Gorman
Ah okay. I understand now. So how can I signal postgres I'm about to take a backup ? (read doc from previous email ? ) Regards, Dan Gorman On Jun 22, 2007, at 4:38 AM, Simon Riggs wrote: On Fri, 2007-06-22 at 04:10 -0700, Dan Gorman wrote: This snapshot is done at the LUN (filer) level, pos

Re: [PERFORM] PITR Backups

2007-06-22 Thread Simon Riggs
On Fri, 2007-06-22 at 04:10 -0700, Dan Gorman wrote: > This snapshot is done at the LUN (filer) level, postgres is un-aware > we're creating a backup, so I'm not sure how pg_start_backup() plays > into this ... Postgres *is* completely unaware that you intend to take a backup, that is *exactly

Re: [PERFORM] PITR Backups

2007-06-22 Thread Dan Gorman
This snapshot is done at the LUN (filer) level, postgres is un-aware we're creating a backup, so I'm not sure how pg_start_backup() plays into this ... Regards, Dan Gorman On Jun 22, 2007, at 3:55 AM, Simon Riggs wrote: On Fri, 2007-06-22 at 11:30 +0900, Toru SHIMOGAKI wrote: Tom Lane wro

Re: [PERFORM] PITR Backups

2007-06-22 Thread Simon Riggs
On Fri, 2007-06-22 at 11:30 +0900, Toru SHIMOGAKI wrote: > Tom Lane wrote: > > Dan Gorman <[EMAIL PROTECTED]> writes: > >>All of our databases are on NetApp storage and I have been looking > >> at SnapMirror (PITR RO copy ) and FlexClone (near instant RW volume > >> replica) for backing up

Re: [PERFORM] PITR Backups

2007-06-22 Thread Toru SHIMOGAKI
Dan Gorman wrote: Here is an example. Most of the snap shots worked fine, but I did get this once: Thank you for your example. I'd appreciate it if I'd get any responses; whether we should tackle the problem for 8.4? Regards, -- Toru SHIMOGAKI<[EMAIL PROTECTED]> NTT Open Source Software Ce

Re: [PERFORM] PITR Backups

2007-06-22 Thread Dan Gorman
Here is an example. Most of the snap shots worked fine, but I did get this once: Jun 21 00:39:43 sfmedstorageha001 postgres[3506]: [9-1] 2007-06-21 00:39:43 PDTLOG: redo done at 71/99870670 Jun 21 00:39:43 sfmedstorageha001 postgres[3506]: [10-1] 2007-06-21 00:39:43 PDTWARNING: page 28905

Re: [PERFORM] PITR Backups

2007-06-22 Thread Toru SHIMOGAKI
Joshua D. Drake wrote: >> - If we don't use hardware level snapshot operation, it takes long time to >> take >> a large backup data, and a lot of full-page-written WAL files are made. > > Does it? I have done it with fairly large databases without issue. You mean hardware snapshot? I know ta

Re: [PERFORM] PITR Backups

2007-06-22 Thread Toru SHIMOGAKI
Steve Atkins wrote: - When we take a PITR base backup with hardware level snapshot operation (not filesystem level) which a lot of storage vender provide, the backup data can be corrupted as Dan said. During recovery we can't even read it, especially if meta-data was corrupted. I can'

Re: [PERFORM] PITR Backups

2007-06-21 Thread Steve Atkins
On Jun 21, 2007, at 7:30 PM, Toru SHIMOGAKI wrote: Tom Lane wrote: Dan Gorman <[EMAIL PROTECTED]> writes: All of our databases are on NetApp storage and I have been looking at SnapMirror (PITR RO copy ) and FlexClone (near instant RW volume replica) for backing up our databases. The pro

Re: [PERFORM] PITR Backups

2007-06-21 Thread Joshua D. Drake
Toru SHIMOGAKI wrote: > Tom Lane wrote: > - When we take a PITR base backup with hardware level snapshot operation > (not filesystem level) which a lot of storage vender provide, the backup > data > can be corrupted as Dan said. During recovery we can't even read it, > especially if meta-da

Re: [PERFORM] PITR Backups

2007-06-21 Thread Toru SHIMOGAKI
Tom Lane wrote: > Dan Gorman <[EMAIL PROTECTED]> writes: >>All of our databases are on NetApp storage and I have been looking >> at SnapMirror (PITR RO copy ) and FlexClone (near instant RW volume >> replica) for backing up our databases. The problem is because there >> is no write-suspe

Re: [PERFORM] PITR Backups

2007-06-21 Thread Tom Lane
Dan Gorman <[EMAIL PROTECTED]> writes: >All of our databases are on NetApp storage and I have been looking > at SnapMirror (PITR RO copy ) and FlexClone (near instant RW volume > replica) for backing up our databases. The problem is because there > is no write-suspend or even a 'hot backu