Lists: | pgsql-hackersPostg사설 토토SQL |
---|
From: | Christopher Kings-Lynne <chriskl(at)familyhealth(dot)com(dot)au> |
---|---|
To: | Hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | pg_dump end comment |
Date: | 2004-03-30 03:37:45 |
Message-ID: | 4068EB89.6050505@familyhealth.com.au |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | Postg스포츠 토토 베트맨SQL pgsql-patches |
This might seem a bit silly, but is there any chance we could add a
comment at the end of pg_dump text output that says '-- End of dump'?
Would make it useful for checking that you actually have a complete dump...
Chris
From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Christopher Kings-Lynne <chriskl(at)familyhealth(dot)com(dot)au> |
Cc: | Hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: pg_dump end comment |
Date: | 2004-03-30 05:29:00 |
Message-ID: | 27371.1080624540@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-hackers Postg스포츠 토토 사이트SQL |
Christopher Kings-Lynne <chriskl(at)familyhealth(dot)com(dot)au> writes:
> This might seem a bit silly, but is there any chance we could add a
> comment at the end of pg_dump text output that says '-- End of dump'?
Sure --- while you're at it, put a "beginning of dump" at the start.
Is it worth adding the database name and/or other command-line
parameters given to pg_dump?
One thing to think about is the difference between a bare pg_dump and a
pg_dump/pg_restore sequence. Should these always generate identical
text output? (They do as of CVS tip, I believe, though this was not
always true before.)
Possibly this is all gilding the lily though...
regards, tom lane
From: | Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | Christopher Kings-Lynne <chriskl(at)familyhealth(dot)com(dot)au>, Hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: pg_dump end comment |
Date: | 2004-03-30 05:33:37 |
Message-ID: | 200403300533.i2U5XbS19589@candle.pha.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-hackers pgsql-patches |
Tom Lane wrote:
> Christopher Kings-Lynne <chriskl(at)familyhealth(dot)com(dot)au> writes:
> > This might seem a bit silly, but is there any chance we could add a
> > comment at the end of pg_dump text output that says '-- End of dump'?
>
> Sure --- while you're at it, put a "beginning of dump" at the start.
>
> Is it worth adding the database name and/or other command-line
> parameters given to pg_dump?
>
> One thing to think about is the difference between a bare pg_dump and a
> pg_dump/pg_restore sequence. Should these always generate identical
> text output? (They do as of CVS tip, I believe, though this was not
> always true before.)
>
> Possibly this is all gilding the lily though...
I like an end-of-dump marker for folks who want to check if the dump got
truncated somehow. I can see how to do that for text dumps, but what
about for tar or custom dumps?
--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073
From: | Gavin Sherry <swm(at)linuxworld(dot)com(dot)au> |
---|---|
To: | Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> |
Cc: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Christopher Kings-Lynne <chriskl(at)familyhealth(dot)com(dot)au>, Hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: pg_dump end comment |
Date: | 2004-03-30 08:20:08 |
Message-ID: | Pine.LNX.4.58.0403301818560.642@linuxworld.com.au |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-hackers pgsql-patches |
On Tue, 30 Mar 2004, Bruce Momjian wrote:
> Tom Lane wrote:
> > Christopher Kings-Lynne <chriskl(at)familyhealth(dot)com(dot)au> writes:
> > > This might seem a bit silly, but is there any chance we could add a
> > > comment at the end of pg_dump text output that says '-- End of dump'?
> >
> > Sure --- while you're at it, put a "beginning of dump" at the start.
> >
> > Is it worth adding the database name and/or other command-line
> > parameters given to pg_dump?
> >
> > One thing to think about is the difference between a bare pg_dump and a
> > pg_dump/pg_restore sequence. Should these always generate identical
> > text output? (They do as of CVS tip, I believe, though this was not
> > always true before.)
> >
> > Possibly this is all gilding the lily though...
>
> I like an end-of-dump marker for folks who want to check if the dump got
> truncated somehow. I can see how to do that for text dumps, but what
> about for tar or custom dumps?
Wouldn't it be more effective to test for non zero return status as this
handles -Fc cases, etc, which would be non-trivial to test.
Gavin
From: | Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> |
---|---|
To: | Gavin Sherry <swm(at)linuxworld(dot)com(dot)au> |
Cc: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Christopher Kings-Lynne <chriskl(at)familyhealth(dot)com(dot)au>, Hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: pg_dump end comment |
Date: | 2004-03-30 14:13:10 |
Message-ID: | 200403301413.i2UEDAB03493@candle.pha.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | Postg윈 토토SQL : pgsql-patches |
Gavin Sherry wrote:
> On Tue, 30 Mar 2004, Bruce Momjian wrote:
>
> > Tom Lane wrote:
> > > Christopher Kings-Lynne <chriskl(at)familyhealth(dot)com(dot)au> writes:
> > > > This might seem a bit silly, but is there any chance we could add a
> > > > comment at the end of pg_dump text output that says '-- End of dump'?
> > >
> > > Sure --- while you're at it, put a "beginning of dump" at the start.
> > >
> > > Is it worth adding the database name and/or other command-line
> > > parameters given to pg_dump?
> > >
> > > One thing to think about is the difference between a bare pg_dump and a
> > > pg_dump/pg_restore sequence. Should these always generate identical
> > > text output? (They do as of CVS tip, I believe, though this was not
> > > always true before.)
> > >
> > > Possibly this is all gilding the lily though...
> >
> > I like an end-of-dump marker for folks who want to check if the dump got
> > truncated somehow. I can see how to do that for text dumps, but what
> > about for tar or custom dumps?
>
> Wouldn't it be more effective to test for non zero return status as this
> handles -Fc cases, etc, which would be non-trivial to test.
Yes, they have to check for a proper exit from pg_dump, but there is
still a file sitting around after the dump, with no way to tell if it is
accurate.
--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073
From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Gavin Sherry <swm(at)linuxworld(dot)com(dot)au> |
Cc: | Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>, Christopher Kings-Lynne <chriskl(at)familyhealth(dot)com(dot)au>, Hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: pg_dump end comment |
Date: | 2004-03-30 14:26:13 |
Message-ID: | 1730.1080656773@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-hackers Postg사설 토토 사이트SQL |
Gavin Sherry <swm(at)linuxworld(dot)com(dot)au> writes:
> On Tue, 30 Mar 2004, Bruce Momjian wrote:
>> I like an end-of-dump marker for folks who want to check if the dump got
>> truncated somehow. I can see how to do that for text dumps, but what
>> about for tar or custom dumps?
> Wouldn't it be more effective to test for non zero return status as this
> handles -Fc cases, etc, which would be non-trivial to test.
In the tar and custom archive formats, it's fairly obvious if the file
was truncated: you'll have table-of-contents entries that point past
the end of file. The only case that really needs an endmarker is
textual scripts --- both straight from pg_dump, and produced by
pg_restore.
regards, tom lane
From: | Philip Warner <pjw(at)rhyme(dot)com(dot)au> |
---|---|
To: | Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>, Gavin Sherry <swm(at)linuxworld(dot)com(dot)au> |
Cc: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Christopher Kings-Lynne <chriskl(at)familyhealth(dot)com(dot)au>, Hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: pg_dump end comment |
Date: | 2004-03-31 01:26:31 |
Message-ID: | 6.0.0.22.0.20040331112420.046b4598@203.8.195.10 |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-hackers Postg사설 토토SQL |
At 12:13 AM 31/03/2004, Bruce Momjian wrote:
>Yes, they have to check for a proper exit from pg_dump, but there is
>still a file sitting around after the dump, with no way to tell if it is
>accurate.
Why don't we write a hash into the header or footer. Then use something like:
pg_restore --verify <dump-file>
if file integrity is the objective.
----------------------------------------------------------------
Philip Warner | __---_____
Albatross Consulting Pty. Ltd. |----/ - \
(A.B.N. 75 008 659 498) | /(@) ______---_
Tel: (+61) 0500 83 82 81 | _________ \
Fax: (+61) 03 5330 3172 | ___________ |
Http://www.rhyme.com.au | / \|
| --________--
PGP key available upon request, | /
and from pgp.mit.edu:11371 |/
From: | Christopher Kings-Lynne <chriskl(at)familyhealth(dot)com(dot)au> |
---|---|
To: | Gavin Sherry <swm(at)linuxworld(dot)com(dot)au> |
Cc: | Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: pg_dump end comment |
Date: | 2004-03-31 01:36:36 |
Message-ID: | 406A20A4.6020502@familyhealth.com.au |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | Postg토토 핫SQL : pgsql-patches |
>>I like an end-of-dump marker for folks who want to check if the dump got
>>truncated somehow. I can see how to do that for text dumps, but what
>>about for tar or custom dumps?
>
> Wouldn't it be more effective to test for non zero return status as this
> handles -Fc cases, etc, which would be non-trivial to test.
That assumes you are there at the time of dump...
Chris
From: | "scott(dot)marlowe" <scott(dot)marlowe(at)ihs(dot)com> |
---|---|
To: | Philip Warner <pjw(at)rhyme(dot)com(dot)au> |
Cc: | Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>, Gavin Sherry <swm(at)linuxworld(dot)com(dot)au>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Christopher Kings-Lynne <chriskl(at)familyhealth(dot)com(dot)au>, Hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: pg_dump end comment |
Date: | 2004-03-31 15:53:10 |
Message-ID: | Pine.LNX.4.33.0403310852360.26243-100000@css120.ihs.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | Postg스포츠 토토 결과SQL pgsql-patches |
On Wed, 31 Mar 2004, Philip Warner wrote:
> At 12:13 AM 31/03/2004, Bruce Momjian wrote:
> >Yes, they have to check for a proper exit from pg_dump, but there is
> >still a file sitting around after the dump, with no way to tell if it is
> >accurate.
>
> Why don't we write a hash into the header or footer. Then use something like:
>
> pg_restore --verify <dump-file>
>
> if file integrity is the objective.
I like this idea. Nice to be able to check the md5 sig to make sure a
backup is not corrupted OR short.
From: | Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | Christopher Kings-Lynne <chriskl(at)familyhealth(dot)com(dot)au>, PostgreSQL-patches <pgsql-patches(at)postgresql(dot)org> |
Subject: | Re: [HACKERS] pg_dump end comment |
Date: | 2004-05-19 21:21:12 |
Message-ID: | 200405192121.i4JLLCY19017@candle.pha.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-hackers pgsql-patches |
Tom Lane wrote:
> Christopher Kings-Lynne <chriskl(at)familyhealth(dot)com(dot)au> writes:
> > This might seem a bit silly, but is there any chance we could add a
> > comment at the end of pg_dump text output that says '-- End of dump'?
>
> Sure --- while you're at it, put a "beginning of dump" at the start.
>
> Is it worth adding the database name and/or other command-line
> parameters given to pg_dump?
>
> One thing to think about is the difference between a bare pg_dump and a
> pg_dump/pg_restore sequence. Should these always generate identical
> text output? (They do as of CVS tip, I believe, though this was not
> always true before.)
I have added code to print end-of-dump markers for pg_dump and
pg_dumpall:
--
-- PostgreSQL database dump complete
--
--
-- PostgreSQL database cluster dump complete
--
This mirrors the markers used at the start of the files.
--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073
Attachment | Content-Type | Size |
---|---|---|
unknown_filename | text/plain | 1.1 KB |