pg_dump segv'ing

From: Diab Jerius <dj(at)head-cfa(dot)harvard(dot)edu>
To: pgsql-admin(at)postgresql(dot)org
Cc: dj(at)head-cfa(dot)harvard(dot)edu
Subject: pg_dump segv'ing
Date: 1998-08-19 16:12:06
Message-ID: 199808191612.MAA25356@pelf.harvard.edu
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin


For those who see pg_dump segv'ing, there's one obvious place to look.

pg_dump uses an internal buffer to store the SQL it outputs, instead
of using the buffering provided by fprintf. I don't understand that
design decision (I think it's wrong). pg_dump also doesn't check
if it writes past the end of that buffer, so if your tuples are long,
it'll eventually segv. The fix is easy. Wade through pg_dump and
turn all of the sprintf's used to generate the output sql into
fprintfs. No more buffer problems. Of course, then you'll run into
the buffer problems in psql when it tries to read them in. So you'll
need to address that as well.

I've made those changes, but unfortunately, I didn't have the time to
send my patches in before pg_dump was revised to the point I'd have to
redo them all. Nowadays I make really gross kludges to the programs to
get things to work (like give them 1Mb buffer sizes), as I have
no time to make a real fix.

Diab

-------------
Diab Jerius Harvard-Smithsonian Center for Astrophysics
60 Garden St, MS 70, Cambridge MA 02138 USA
djerius(at)cfa(dot)harvard(dot)edu vox: 617 496 7575 fax: 617 495 7356

Browse pgsql-admin by date

  From Date Subject
Next Message G.Elangovan 1998-08-19 18:41:05 Re: [ADMIN] Re: user is not in "pg_shadow"
Previous Message Mateus Cordeiro Inssa 1998-08-19 16:08:51 [ADMIN] 'C' function (spi?) for datetime UPDATE trigger - HOW?