Re: Proposed patch: synchronized_scanning GUC variable - Mailing list pgsql-patches

From Russell Smith
Subject Re: Proposed patch: synchronized_scanning GUC variable
Date
Msg-id 479D75E2.7080002@pws.com.au
Whole thread Raw
In response to Proposed patch: synchronized_scanning GUC variable  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Proposed patch: synchronized_scanning GUC variable
Re: Proposed patch: synchronized_scanning GUC variable
List pgsql-patches
Tom Lane wrote:
> Per today's -hackers discussion, add a GUC variable to allow clients to
> disable the new synchronized-scanning behavior, and make pg_dump disable
> sync scans so that it will reliably preserve row ordering.  This is a
> pretty trivial patch, but seeing how late we are in the 8.3 release
> cycle, I thought I'd better post it for comment anyway.
>
>             regards, tom lane
>
>
> Index: src/bin/pg_dump/pg_dump.c
> ===================================================================
> RCS file: /cvsroot/pgsql/src/bin/pg_dump/pg_dump.c,v
> retrieving revision 1.481
> diff -c -r1.481 pg_dump.c
> *** src/bin/pg_dump/pg_dump.c    1 Jan 2008 19:45:55 -0000    1.481
> --- src/bin/pg_dump/pg_dump.c    27 Jan 2008 20:00:18 -0000
> ***************
> *** 553,558 ****
> --- 553,572 ----
>       do_sql_command(g_conn, "SET DATESTYLE = ISO");
>
>       /*
> +      * If supported, set extra_float_digits so that we can dump float data
> +      * exactly (given correctly implemented float I/O code, anyway)
> +      */
> +     if (g_fout->remoteVersion >= 70400)
> +         do_sql_command(g_conn, "SET extra_float_digits TO 2");
> +
> +     /*
> +      * If synchronized scanning is supported, disable it, to prevent
> +      * unpredictable changes in row ordering across a dump and reload.
> +      */
> +     if (g_fout->remoteVersion >= 80300)
> +         do_sql_command(g_conn, "SET synchronized_scanning TO off");
> +
> +     /*
>        * Start serializable transaction to dump consistent data.
>        */
>       do_sql_command(g_conn, "BEGIN");
>
Hi,

Can somebody explain why it's important to load with
synchronized_scanning off?

do_sql_command(g_conn, "SET synchronized_scanning TO off");

Thanks

Russell Smith


pgsql-patches by date:

Previous
From: Neil Conway
Date:
Subject: Re: Proposed patch: synchronized_scanning GUC variable
Next
From: Neil Conway
Date:
Subject: Re: Proposed patch: synchronized_scanning GUC variable