Re: PostgreSQL Dump based backup using pipe - Mailing list pgsql-admin

From girish R G peetle
Subject Re: PostgreSQL Dump based backup using pipe
Date
Msg-id CAKKd064z+Az1fOANvNo+pp6QQ9DuUZf_L_joSouo_kNjPCpdAQ@mail.gmail.com
Whole thread Raw
In response to Re: PostgreSQL Dump based backup using pipe  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: PostgreSQL Dump based backup using pipe
List 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@sss.pgh.pa.us> wrote:
girish R G peetle <giri.anamika0@gmail.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

pgsql-admin by date:

Previous
From: "Guo, Yun"
Date:
Subject: pg_dump not dumping some schemas
Next
From: Scott Ribe
Date:
Subject: Re: PostgreSQL Dump based backup using pipe