pgsql-server/ oc/src/sgml/runtime.sgml rc/back ...

Started by Tom Lanealmost 23 years ago5 messagescomitters
Jump to latest
#1Tom Lane
tgl@sss.pgh.pa.us

CVSROOT: /cvsroot
Module name: pgsql-server
Changes by: tgl@svr1.postgresql.org 03/09/07 12:26:54

Modified files:
doc/src/sgml : runtime.sgml
src/backend/optimizer/geqo: geqo_main.c
src/backend/utils/misc: guc.c postgresql.conf.sample
src/bin/psql : tab-complete.c
src/include/optimizer: geqo.h

Log message:
Remove geqo_random_seed parameter. Having geqo reset the global random()
sequence every time it's called is bogus --- it interferes with user
control over the seed, and actually decreases randomness overall
(because a seed based on time(NULL) is pretty predictable). If you really
want a reproducible result from geqo, do 'set seed = 0' before planning
a query.

#2Bruce Momjian
bruce@momjian.us
In reply to: Tom Lane (#1)
Re: pgsql-server/ oc/src/sgml/runtime.sgml rc/back ...

Tom Lane wrote:

CVSROOT: /cvsroot
Module name: pgsql-server
Changes by: tgl@svr1.postgresql.org 03/09/07 12:26:54

Modified files:
doc/src/sgml : runtime.sgml
src/backend/optimizer/geqo: geqo_main.c
src/backend/utils/misc: guc.c postgresql.conf.sample
src/bin/psql : tab-complete.c
src/include/optimizer: geqo.h

Log message:
Remove geqo_random_seed parameter. Having geqo reset the global random()
sequence every time it's called is bogus --- it interferes with user
control over the seed, and actually decreases randomness overall
(because a seed based on time(NULL) is pretty predictable). If you really
want a reproducible result from geqo, do 'set seed = 0' before planning
a query.

Tom, I see 'set seed' works:

test=> set seed = 0;
SET

but where is it documented?

-- 
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 359-1001
  +  If your life is a hard drive,     |  13 Roberts Road
  +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073
#3Tom Lane
tgl@sss.pgh.pa.us
In reply to: Bruce Momjian (#2)
Re: pgsql-server/ oc/src/sgml/runtime.sgml rc/back ...

Bruce Momjian <pgman@candle.pha.pa.us> writes:

Tom, I see 'set seed' works:
test=> set seed = 0;
SET
but where is it documented?

On the SET reference page. It's not in runtime.sgml because we don't
allow non-interactive settings (which might or might not be a reasonable
restriction, but it's been there awhile without complaints).

regards, tom lane

#4Bruce Momjian
bruce@momjian.us
In reply to: Tom Lane (#3)
Re: pgsql-server/ oc/src/sgml/runtime.sgml rc/back ...

Tom Lane wrote:

Bruce Momjian <pgman@candle.pha.pa.us> writes:

Tom, I see 'set seed' works:
test=> set seed = 0;
SET
but where is it documented?

On the SET reference page. It's not in runtime.sgml because we don't
allow non-interactive settings (which might or might not be a reasonable
restriction, but it's been there awhile without complaints).

So that is how testers could get consistent ANALYZE statistics?

-- 
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 359-1001
  +  If your life is a hard drive,     |  13 Roberts Road
  +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073
#5Tom Lane
tgl@sss.pgh.pa.us
In reply to: Bruce Momjian (#4)
Re: pgsql-server/ oc/src/sgml/runtime.sgml rc/back ...

Bruce Momjian <pgman@candle.pha.pa.us> writes:

So that is how testers could get consistent ANALYZE statistics?

Yeah, that too.

regards, tom lane