详细测试如下:
[gpadmin@wx60 ~]$ psql gtlions
psql (8.2.15)
Type "help" for help.
gtlions=# \timing on
Timing is on.
gtlions=# select version();
version
------------------------------------------------------------------------------------------------------------------------------------------------------
PostgreSQL 8.2.15 (Greenplum Database 4.2.7.2 build 1) on x86_64-unknown-linux-gnu, compiled by GCC gcc (GCC) 4.4.2 compiled on Feb 25 2014 18:05:04
(1 row)
Time: 2.020 ms
gtlions=# \pset x
Expanded display is on.
gtlions=# select * from pg_settings where name ~ 'gp_autostats';
-[ RECORD 1 ]---------------------------------------------------------------------------------------------------------------------------------
name | gp_autostats_mode
setting | ON_NO_STATS
unit |
category | Developer Options
short_desc | Sets the autostats mode.
extra_desc | Valid values are NONE, ON_CHAN
GE, ON_NO_STATS. ON_CHANGE requires setting gp_autostats_on_change_threshold.
context | user
vartype | string
source | configuration file
min_val |
max_val |
-[ RECORD 2 ]---------------------------------------------------------------------------------------------------------------------------------
name | gp_autostats_on_change_threshold
setting | 2147483647
unit |
category | Developer Options
short_desc | Threshold for number of tuples added to table by CTAS or Insert-to to trigger autostats in on_change mode. See gp_autostats_mode.
extra_desc |
context | user
vartype | integer
source | configuration file
min_val | 0
max_val | 2147483647
Time: 4.464 ms
gtlions=# \q
[gpadmin@wx60 ~]$ gpconfig -c gp_autostats_on_change_threshold -v 80000
20141017:16:45:27:008114 gpconfig:wx60:gpadmin-[INFO]:-completed successfully
[gpadmin@wx60 ~]$ gpstop -u
20141017:16:45:32:008229 gpstop:wx60:gpadmin-[INFO]:-Starting gpstop with args: -u
20141017:16:45:32:008229 gpstop:wx60:gpadmin-[INFO]:-Gathering information and validating the environment...
20141017:16:45:32:008229 gpstop:wx60:gpadmin-[INFO]:-Obtaining Greenplum Master catalog information
20141017:16:45:32:008229 gpstop:wx60:gpadmin-[INFO]:-Obtaining Segment details from master...
20141017:16:45:33:008229 gpstop:wx60:gpadmin-[INFO]:-Greenplum Version: 'postgres (Greenplum Database) 4.2.7.2 build 1'
20141017:16:45:33:008229 gpstop:wx60:gpadmin-[INFO]:-Signalling all postmaster processes to reload
.
[gpadmin@wx60 ~]$ psql gtlions
psql (8.2.15)
Type "help" for help.
gtlions=# \pset x
Expanded display is on.
gtlions=# select * from pg_settings where name ~ 'gp_autostats';
-[ RECORD 1 ]--------------------------------------------------------------------------------------------------------------------------------