1212 * by PostgreSQL
1313 *
1414 * IDENTIFICATION
15- * $PostgreSQL: pgsql/src/bin/pg_dump/pg_dump.c,v 1.481 2008/01/01 19:45 :55 momjian Exp $
15+ * $PostgreSQL: pgsql/src/bin/pg_dump/pg_dump.c,v 1.482 2008/01/30 18:35 :55 tgl Exp $
1616 *
1717 *-------------------------------------------------------------------------
1818 */
@@ -552,6 +552,20 @@ main(int argc, char **argv)
552552 /* Set the datestyle to ISO to ensure the dump's portability */
553553 do_sql_command (g_conn , "SET DATESTYLE = ISO" );
554554
555+ /*
556+ * If supported, set extra_float_digits so that we can dump float data
557+ * exactly (given correctly implemented float I/O code, anyway)
558+ */
559+ if (g_fout -> remoteVersion >= 70400 )
560+ do_sql_command (g_conn , "SET extra_float_digits TO 2" );
561+
562+ /*
563+ * If synchronized scanning is supported, disable it, to prevent
564+ * unpredictable changes in row ordering across a dump and reload.
565+ */
566+ if (g_fout -> remoteVersion >= 80300 )
567+ do_sql_command (g_conn , "SET synchronize_seqscans TO off" );
568+
555569 /*
556570 * Start serializable transaction to dump consistent data.
557571 */
@@ -567,13 +581,6 @@ main(int argc, char **argv)
567581 else
568582 username_subquery = "SELECT usename FROM pg_user WHERE usesysid =" ;
569583
570- /*
571- * If supported, set extra_float_digits so that we can dump float data
572- * exactly (given correctly implemented float I/O code, anyway)
573- */
574- if (g_fout -> remoteVersion >= 70400 )
575- do_sql_command (g_conn , "SET extra_float_digits TO 2" );
576-
577584 /* Find the last built-in OID, if needed */
578585 if (g_fout -> remoteVersion < 70300 )
579586 {
0 commit comments