Re: PostgreSQL Dump based backup using pipe

From: girish R G peetle <giri(dot)anamika0(at)gmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-admin <pgsql-admin(at)postgresql(dot)org>
Subject: Re: PostgreSQL Dump based backup using pipe
Date: 2015-05-28 17:58:21
Message-ID: CAKKd064z+Az1fOANvNo+pp6QQ9DuUZf_L_joSouo_kNjPCpdAQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

Hi Tom,
Let me try to explain my concern.

Here two writes were attempted by pg_dump, one from offset 0 and size
2000. In second attempt at offset 79 n length 1888.

WRITE - 0, 2000
WRITE - 79, 1,888

If it is a regular file data written during first attempt will be
overwritten by second attempt ( from file offset 79 will be overwritten by
second write attempt ) and total dump size would be 2000 bytes

If pipe is used this won't happen, total dump size would be ( 2000 + 1888 )
= 3888

Dump data fed to pg_restore will be totally different for 'non-pipe' and
'pipe' based even though they are taken for same DB.

Also here how will pg_restore handle extra ( or unwanted) dump data
collected in case of piped dump ?

I believe this extra ( or unwanted) dump data is causing below error.

*pg_restore: processing data for table "tabel35"pg_restore: [compress_io]
could not uncompress data: invalid bit length repeat*

Thanks
Girish

On Thu, May 28, 2015 at 8:57 PM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:

> girish R G peetle <giri(dot)anamika0(at)gmail(dot)com> writes:
> > I just tracked pg_dump writing output to a file. (using procmon)
> > As indicated below data is not written in serial fashion.
> > If we use name pipe would this behavior cause problem ?
>
> It's less efficient with a named pipe, yes, because then pg_dump
> can't do that. But this doesn't prove anything one way or another
> concerning your original complaint.
>
> regards, tom lane
>

In response to

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Scott Ribe 2015-05-28 18:06:42 Re: PostgreSQL Dump based backup using pipe
Previous Message Guo, Yun 2015-05-28 17:21:46 pg_dump not dumping some schemas