]> granicus.if.org Git - postgresql/commit
Fix pg_restore's processing of old-style BLOB COMMENTS data.
authorTom Lane <tgl@sss.pgh.pa.us>
Fri, 13 Jun 2014 00:14:52 +0000 (20:14 -0400)
committerTom Lane <tgl@sss.pgh.pa.us>
Fri, 13 Jun 2014 00:14:52 +0000 (20:14 -0400)
commit3fec825f9f8049e4e27aa1904d8c2581d73a08e1
tree70a6e5af64057164847410b06f7198be728ee194
parent637264641fd970b8f86c98d8728894a82708fdb2
Fix pg_restore's processing of old-style BLOB COMMENTS data.

Prior to 9.0, pg_dump handled comments on large objects by dumping a bunch
of COMMENT commands into a single BLOB COMMENTS archive object.  With
sufficiently many such comments, some of the commands would likely get
split across bufferloads when restoring, causing failures in
direct-to-database restores (though no problem would be evident in text
output).  This is the same type of issue we have with table data dumped as
INSERT commands, and it can be fixed in the same way, by using a mini SQL
lexer to figure out where the command boundaries are.  Fortunately, the
COMMENT commands are no more complex to lex than INSERTs, so we can just
re-use the existing lexer for INSERTs.

Per bug #10611 from Jacek Zalewski.  Back-patch to all active branches.
src/bin/pg_dump/pg_backup_archiver.c
src/bin/pg_dump/pg_backup_db.c
src/bin/pg_dump/pg_dump.c