On Tue, Dec 05, 2023 at 12:00:00PM +0300, Alexander Lakhin wrote: > So removing the condition "if ($oldnode->pg_version != $newnode->pg_version)" > works here as well, but maybe switching the file mode (to preserve EOLs > produced by pg_dump) in the block "After dumping, update references ..." > is more efficient than filtering dumps (on all OSes?).
Well, there's the argument that we replace the library references in a SQL file that we are handling as a text file, so switching it to use the binary mode is not right. A second argument is to apply the same filtering logic across both the old and new dumps, even if we know that the second dump file taken by pg_dump with not append CRLFs. At the end, just applying the filtering all the time makes the most sense to me, so I've applied a patch doing just that. -- Michael
signature.asc
Description: PGP signature