pg_upgrade_binsplit.patch
text/x-patch
Filename: pg_upgrade_binsplit.patch
Type: text/x-patch
Part: 0
Message:
Re: pg_upgrade diffs on WIndows
Patch
Same data as JSON:
GET /api/v1/attachments/:id/patch
the parsed metadata as JSON — format, series position, per-file stats; never the diff bytes.
API reference →
Format: unified
| File | + | − |
|---|---|---|
| contrib/pg_upgrade/dump.c | 2 | 2 |
| contrib/pg_upgrade/test.sh | 0 | 4 |
diff --git a/contrib/pg_upgrade/dump.c b/contrib/pg_upgrade/dump.c index b905ab0..0a96dde 100644 --- a/contrib/pg_upgrade/dump.c +++ b/contrib/pg_upgrade/dump.c @@ -62,10 +62,10 @@ split_old_dump(void) if ((all_dump = fopen(filename, "r")) == NULL) pg_log(PG_FATAL, "Could not open dump file \"%s\": %s\n", filename, getErrorText(errno)); snprintf(filename, sizeof(filename), "%s", GLOBALS_DUMP_FILE); - if ((globals_dump = fopen_priv(filename, "w")) == NULL) + if ((globals_dump = fopen_priv(filename, PG_BINARY_W)) == NULL) pg_log(PG_FATAL, "Could not write to dump file \"%s\": %s\n", filename, getErrorText(errno)); snprintf(filename, sizeof(filename), "%s", DB_DUMP_FILE); - if ((db_dump = fopen_priv(filename, "w")) == NULL) + if ((db_dump = fopen_priv(filename, PG_BINARY_W)) == NULL) pg_log(PG_FATAL, "Could not write to dump file \"%s\": %s\n", filename, getErrorText(errno)); current_output = globals_dump; diff --git a/contrib/pg_upgrade/test.sh b/contrib/pg_upgrade/test.sh index d411ac6..3899600 100644 --- a/contrib/pg_upgrade/test.sh +++ b/contrib/pg_upgrade/test.sh @@ -128,10 +128,6 @@ else sh ./delete_old_cluster.sh fi -if [ $testhost = Msys ] ; then - dos2unix "$temp_root"/dump1.sql "$temp_root"/dump2.sql -fi - if diff -q "$temp_root"/dump1.sql "$temp_root"/dump2.sql; then echo PASSED exit 0