Re: [HACKERS] pg_dump/restore to convert BLOBs to LZTEXT (optional!) - Mailing list pgsql-general

From Tom Lane
Subject Re: [HACKERS] pg_dump/restore to convert BLOBs to LZTEXT (optional!)
Date
Msg-id 28080.965351453@sss.pgh.pa.us
Whole thread Raw
In response to pg_dump/restore to convert BLOBs to LZTEXT (optional!)  (Philip Warner <pjw@rhyme.com.au>)
Responses Re: [HACKERS] pg_dump/restore to convert BLOBs to LZTEXT (optional!)  (Philip Warner <pjw@rhyme.com.au>)
List pgsql-general
Philip Warner <pjw@rhyme.com.au> writes:
> For BLOBS that are referenced in more than one table, this will duplicate
> the text which may be a problem,

As well as break the semantics: if you have a multiply-referenced BLOB
then you can update it through any reference and the changes are visible
through all the references.  Not so after you convert the data into
non-BLOB values.

Another problem is that even if you manage to restructure the database
properly, you can't do anything to help with conversion of the
application code that talks to the database (not even the functions
and triggers/rules that may appear right in the database).

AFAICS converting from BLOB to TOAST storage is going to require a
fair amount of actual thought and work on the part of the DB
programmer/admin.  I don't see that pg_dump can help meaningfully,
and I'd just as soon resist feature bloat in pg_dump.

            regards, tom lane

pgsql-general by date:

Previous
From: Philip Warner
Date:
Subject: pg_dump/restore to convert BLOBs to LZTEXT (optional!)
Next
From: Philip Warner
Date:
Subject: Re: [HACKERS] pg_dump/restore to convert BLOBs to LZTEXT (optional!)