pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Per-Olov Esgard <Per-Olov.Esgard@micronic-mydata.com>
Cc: pgsql-bugs@postgresql.org
Subject: Re: BUG #5959: pg_restore --use-list does not always work with a pg_restore generated TOC file
Date: Sat, 02 Apr 2011 18:41:21 -0400
Message-ID: <1843.1301784081@sss.pgh.pa.us> (raw)
In-Reply-To: <201103301039.p2UAd8DS034876@wwwmaster.postgresql.org>
References: <201103301039.p2UAd8DS034876@wwwmaster.postgresql.org>

"Per-Olov Esgard" <Per-Olov.Esgard@micronic-mydata.com> writes:
> Description:        pg_restore --use-list  does not always work with a
> pg_restore generated TOC file
> Details: 

> General
> =======
> In my application I am using automatically generated psm:s. These psm: are
> using many arguments, in some cases over 80. This means that a TOC entry in
> a TOC file generated by pg_restore --list may be very long for psm:s with
> such a long signature.

> Specific
> ========
> My backup system makes a schema dump to a file and a data dump to another
> file. When performing a restore I create a TOC list from the schema dump by
> using pg_restore on the schema dump file. I do some filtering on the TOC
> file and then I restore it using pg_restore --use-list. This does not work
> since some entries in the TOC file are more than 2000 characters long. The
> function SortTocFromFile in pg_backup_archiver.c has a hard coded limitation
> of 1024 characters for each row in the TOC file.

Hm.  The function only cares about the dump ID at the start of the line.
AFAICS the consequence of buffer overflow would be that it'd take a line
continuation as a new line; which would generally result in a harmless
"WARNING: line ignored" message.  You didn't say exactly what symptom
you were seeing, but "does not work" seems like a bit of an
overstatement for that.  So I'm wondering whether you're seeing some
behavior I'm missing.

			regards, tom lane



view thread (3+ messages)  latest in thread

Message-ID: <1843.1301784081@sss.pgh.pa.us>
Permalink:  ../1843.1301784081@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/1843.1301784081@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-bugs@postgresql.org
  Cc: tgl@sss.pgh.pa.us, Per-Olov.Esgard@micronic-mydata.com
  Subject: Re: BUG #5959: pg_restore --use-list does not always work with a pg_restore generated TOC file
  In-Reply-To: <1843.1301784081@sss.pgh.pa.us>
  References: <201103301039.p2UAd8DS034876@wwwmaster.postgresql.org> <1843.1301784081@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox