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

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

From
tgl@svr1.postgresql.org (Tom Lane)
Date:
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.


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

From
Bruce Momjian
Date:
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

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

From
Tom Lane
Date:
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

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

From
Bruce Momjian
Date:
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

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

From
Tom Lane
Date:
Bruce Momjian <pgman@candle.pha.pa.us> writes:
> So that is how testers could get consistent ANALYZE statistics?

Yeah, that too.

            regards, tom lane