Skip site navigation (1) Skip section navigation (2)

Re: Proposed patch: synchronized_scanning GUC variable

From: Russell Smith <mr-russ(at)pws(dot)com(dot)au>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-patches(at)postgreSQL(dot)org
Subject: Re: Proposed patch: synchronized_scanning GUC variable
Date: 2008-01-28 06:27:46
Message-ID: 479D75E2.7080002@pws.com.au (view raw or flat)
Thread:
Lists: pgsql-hackerspgsql-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


In response to

Responses

pgsql-hackers by date

Next:From: ITAGAKI TakahiroDate: 2008-01-28 06:48:52
Subject: Re: Vacuum threshold and non-serializable read-only transaction
Previous:From: Neil ConwayDate: 2008-01-28 06:11:18
Subject: RFC: array_agg() per SQL:200n

pgsql-patches by date

Next:From: Neil ConwayDate: 2008-01-28 06:54:24
Subject: Re: Proposed patch: synchronized_scanning GUC variable
Previous:From: Tom LaneDate: 2008-01-28 04:22:23
Subject: Re: [PATCHES] Proposed patch: synchronized_scanning GUC variable

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group