Thread: problems dumping

problems dumping

From
Andreas Schmitz
Date:
Hello,

I have a problem dumping with 7.2.3. When I do a pg_dumpall redirecting this
to a file I have >40000 lines of schema and data. Running psql template1 <
<dumpfile> the databases get partially created, i.e the schema is completely
there but data even of the big tables is missing. The dumpfile itself has
only 150k lines left. It used to work before I upgraded to 7.2.3. Any
explainations ?
I also did a " pg_dumpall -C -F p -f test2 -v". I can see the file test2
growing and I can see the schema an the data written in there. It all looks
fine. When the command is finished the shrinks drastically and the data seems
to be gone. Does anybody know the phenomena ?

bash-2.03$ ls -al
total 305588
drwxr-xr-x   2 postgres postgres     512 Oct 15 18:10 .
drwxr-xr-x   3 postgres postgres     512 Oct 15 18:05 ..
-rw-r--r--   1 postgres postgres 156368896 Oct 15 18:31 test2
bash-2.03$ ls -al
total 318772
drwxr-xr-x   2 postgres postgres     512 Oct 15 18:10 .
drwxr-xr-x   3 postgres postgres     512 Oct 15 18:05 ..
-rw-r--r--   1 postgres postgres 163119104 Oct 15 18:31 test2
bash-2.03$ ls -al
total 329556
drwxr-xr-x   2 postgres postgres     512 Oct 15 18:10 .
drwxr-xr-x   3 postgres postgres     512 Oct 15 18:05 ..
-rw-r--r--   1 postgres postgres 168632320 Oct 15 18:31 test2
bash-2.03$ ls -al
total 62
drwxr-xr-x   2 postgres postgres     512 Oct 15 18:10 .
drwxr-xr-x   3 postgres postgres     512 Oct 15 18:05 ..
-rw-r--r--   1 postgres postgres   28684 Oct 15 18:33 test2
bash-2.03$


kind regards

-andreas



--
Andreas Schmitz - Phone +49 201 8501 318
Cityweb-Technik-Service-Gesellschaft mbH
Friedrichstr. 12 - Fax +49 201 8501 104
45128 Essen - email a.schmitz@cityweb.de


Re: problems dumping

From
Jyry Kuukkanen
Date:
On Tue, 15 Oct 2002, Andreas Schmitz wrote:

> I have a problem dumping with 7.2.3. When I do a pg_dumpall redirecting this
> to a file I have >40000 lines of schema and data. Running psql template1 <
> <dumpfile> the databases get partially created, i.e the schema is completely
> there but data even of the big tables is missing. The dumpfile itself has
> only 150k lines left. It used to work before I upgraded to 7.2.3. Any
> explainations ?
> I also did a " pg_dumpall -C -F p -f test2 -v". I can see the file test2
> growing and I can see the schema an the data written in there. It all looks
> fine. When the command is finished the shrinks drastically and the data seems
> to be gone. Does anybody know the phenomena ?
>
> bash-2.03$ ls -al
> total 305588
> drwxr-xr-x   2 postgres postgres     512 Oct 15 18:10 .
> drwxr-xr-x   3 postgres postgres     512 Oct 15 18:05 ..
> -rw-r--r--   1 postgres postgres 156368896 Oct 15 18:31 test2
> bash-2.03$ ls -al
> total 318772
> drwxr-xr-x   2 postgres postgres     512 Oct 15 18:10 .
> drwxr-xr-x   3 postgres postgres     512 Oct 15 18:05 ..
> -rw-r--r--   1 postgres postgres 163119104 Oct 15 18:31 test2
> bash-2.03$ ls -al
> total 329556
> drwxr-xr-x   2 postgres postgres     512 Oct 15 18:10 .
> drwxr-xr-x   3 postgres postgres     512 Oct 15 18:05 ..
> -rw-r--r--   1 postgres postgres 168632320 Oct 15 18:31 test2
> bash-2.03$ ls -al
> total 62
> drwxr-xr-x   2 postgres postgres     512 Oct 15 18:10 .
> drwxr-xr-x   3 postgres postgres     512 Oct 15 18:05 ..
> -rw-r--r--   1 postgres postgres   28684 Oct 15 18:33 test2
> bash-2.03$


Pretty strange, isn't it?

It might be worth while dumping one database at a time and see what might
cause the trouble.

Or maybe it is the OS that truncates the file for some odd reason. What is
the platform?

Is you compress the dump on the fly, do you get truncated effect, too?
(pg_dumpall |bzip2 -c >dumpfile)

Hope this helps sorting out your problem.

--Jyry
C:-(    C:-/    C========8-O    C8-/    C:-(


Re: problems dumping

From
Andreas Schmitz
Date:
On Wednesday 16 October 2002 06:54, Jyry Kuukkanen wrote:
> On Tue, 15 Oct 2002, Andreas Schmitz wrote:
> > I have a problem dumping with 7.2.3. When I do a pg_dumpall redirecting
> > this to a file I have >40000 lines of schema and data. Running psql
> > template1 < <dumpfile> the databases get partially created, i.e the
> > schema is completely there but data even of the big tables is missing.
> > The dumpfile itself has only 150k lines left. It used to work before I
> > upgraded to 7.2.3. Any explainations ?
> > I also did a " pg_dumpall -C -F p -f test2 -v". I can see the file test2
> > growing and I can see the schema an the data written in there. It all
> > looks fine. When the command is finished the shrinks drastically and the
> > data seems to be gone. Does anybody know the phenomena ?

> > drwxr-xr-x   2 postgres postgres     512 Oct 15 18:10 .
> > drwxr-xr-x   3 postgres postgres     512 Oct 15 18:05 ..
> > -rw-r--r--   1 postgres postgres 168632320 Oct 15 18:31 test2
> > bash-2.03$ ls -al
> > total 62
> > drwxr-xr-x   2 postgres postgres     512 Oct 15 18:10 .
> > drwxr-xr-x   3 postgres postgres     512 Oct 15 18:05 ..
> > -rw-r--r--   1 postgres postgres   28684 Oct 15 18:33 test2
> > bash-2.03$
>
> Pretty strange, isn't it?
>
> It might be worth while dumping one database at a time and see what might
> cause the trouble.
>
> Or maybe it is the OS that truncates the file for some odd reason. What is
> the platform?
>
> Is you compress the dump on the fly, do you get truncated effect, too?
> (pg_dumpall |bzip2 -c >dumpfile)
>
> Hope this helps sorting out your problem.
>
> --Jyry

Thanks a lot for the answer. This also happens with a compressed/gz file. The
Platform is a SUN U2 with solaris 8.

regards

-andreas