postgresql/src/include
Tom Lane f5bc74192d Make GEQO's planning deterministic by having it start from a predictable
random number seed each time.  This is how it used to work years ago, but
we got rid of the seed reset because it was resetting the main random()
sequence and thus having undesirable effects on the rest of the system.
To fix, establish a private random number state for each execution of
geqo(), and initialize the state using the new GUC variable geqo_seed.
People who want to experiment with different random searches can do so
by changing geqo_seed, but you'll always get the same plan for the same
value of geqo_seed (if holding all other planner inputs constant, of course).

The new state is kept in PlannerInfo by adding a "void *" field reserved
for use by join_search hooks.  Most of the rather bulky code changes in
this commit are just arranging to pass PlannerInfo around to all the GEQO
functions (many of which formerly didn't receive it).

Andres Freund, with some editorialization by Tom
2009-07-16 20:55:44 +00:00
..
access Cleanup and code review for the patch that made bgwriter active during 2009-06-26 20:29:04 +00:00
bootstrap Update copyright for 2009. 2009-01-01 17:24:05 +00:00
catalog Make backend header files C++ safe 2009-07-16 06:33:46 +00:00
commands Make backend header files C++ safe 2009-07-16 06:33:46 +00:00
executor 8.4 pgindent run, with new combined Linux/FreeBSD/MinGW typedef list 2009-06-11 14:49:15 +00:00
foreign 8.4 pgindent run, with new combined Linux/FreeBSD/MinGW typedef list 2009-06-11 14:49:15 +00:00
lib Update copyright for 2009. 2009-01-01 17:24:05 +00:00
libpq 8.4 pgindent run, with new combined Linux/FreeBSD/MinGW typedef list 2009-06-11 14:49:15 +00:00
mb 8.4 pgindent run, with new combined Linux/FreeBSD/MinGW typedef list 2009-06-11 14:49:15 +00:00
nodes Make GEQO's planning deterministic by having it start from a predictable 2009-07-16 20:55:44 +00:00
optimizer Make GEQO's planning deterministic by having it start from a predictable 2009-07-16 20:55:44 +00:00
parser Make backend header files C++ safe 2009-07-16 06:33:46 +00:00
port 8.4 pgindent run, with new combined Linux/FreeBSD/MinGW typedef list 2009-06-11 14:49:15 +00:00
portability 8.4 pgindent run, with new combined Linux/FreeBSD/MinGW typedef list 2009-06-11 14:49:15 +00:00
postmaster 8.4 pgindent run, with new combined Linux/FreeBSD/MinGW typedef list 2009-06-11 14:49:15 +00:00
regex 8.4 pgindent run, with new combined Linux/FreeBSD/MinGW typedef list 2009-06-11 14:49:15 +00:00
rewrite 8.4 pgindent run, with new combined Linux/FreeBSD/MinGW typedef list 2009-06-11 14:49:15 +00:00
snowball Update copyright for 2009. 2009-01-01 17:24:05 +00:00
storage Fix some serious bugs in archive recovery, now that bgwriter is active 2009-06-25 21:36:00 +00:00
tcop 8.4 pgindent run, with new combined Linux/FreeBSD/MinGW typedef list 2009-06-11 14:49:15 +00:00
tsearch Make backend header files C++ safe 2009-07-16 06:33:46 +00:00
utils Make backend header files C++ safe 2009-07-16 06:33:46 +00:00
c.h 8.4 pgindent run, with new combined Linux/FreeBSD/MinGW typedef list 2009-06-11 14:49:15 +00:00
fmgr.h Update copyright for 2009. 2009-01-01 17:24:05 +00:00
funcapi.h 8.4 pgindent run, with new combined Linux/FreeBSD/MinGW typedef list 2009-06-11 14:49:15 +00:00
getaddrinfo.h Update copyright for 2009. 2009-01-01 17:24:05 +00:00
getopt_long.h Remove a boatload of useless definitions of 'int optreset'. If we 2009-04-05 04:19:59 +00:00
Makefile Add missed src/include/foreign subdirectory to the set installed into 2009-06-30 17:38:50 +00:00
miscadmin.h 8.4 pgindent run, with new combined Linux/FreeBSD/MinGW typedef list 2009-06-11 14:49:15 +00:00
pg_config_manual.h 8.4 pgindent run, with new combined Linux/FreeBSD/MinGW typedef list 2009-06-11 14:49:15 +00:00
pg_config.h.in Add erand48() to the set of functions supported by our src/port/ library, 2009-07-16 17:43:52 +00:00
pg_config.h.win32 Stamp HEAD as 8.5devel. 2009-07-01 23:15:55 +00:00
pg_trace.h Update copyright for 2009. 2009-01-01 17:24:05 +00:00
pgstat.h 8.4 pgindent run, with new combined Linux/FreeBSD/MinGW typedef list 2009-06-11 14:49:15 +00:00
pgtime.h Update copyright for 2009. 2009-01-01 17:24:05 +00:00
port.h Add erand48() to the set of functions supported by our src/port/ library, 2009-07-16 17:43:52 +00:00
postgres_ext.h Move NAMEDATALEN definition from postgres_ext.h to pg_config_manual.h. It 2007-02-06 09:16:08 +00:00
postgres_fe.h Update copyright for 2009. 2009-01-01 17:24:05 +00:00
postgres.h Update copyright for 2009. 2009-01-01 17:24:05 +00:00
rusagestub.h Update copyright for 2009. 2009-01-01 17:24:05 +00:00
windowapi.h 8.4 pgindent run, with new combined Linux/FreeBSD/MinGW typedef list 2009-06-11 14:49:15 +00:00