1
0
mirror of https://github.com/postgres/postgres.git synced 2025-12-06 00:02:13 +03:00

The attached patch fixes a build problem with GEQO when using the

PX recombination operator, changes some elog() messages from LOG
to DEBUG1, puts some debugging functions inside the appropriate
#ifdef (not enabled by default), and makes a few other minor
cleanups.

BTW, the elog() change is motivated by at least one user who
has sent a concerned email to -general asking exactly what the
"ERX recombination operator" is, and what it is doing to their
DBMS.

Neil Conway
This commit is contained in:
Bruce Momjian
2002-07-20 04:59:10 +00:00
parent aec814b548
commit 38dd3ae7d0
5 changed files with 29 additions and 34 deletions

View File

@@ -6,7 +6,7 @@
* Portions Copyright (c) 1996-2002, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
* $Id: geqo_misc.c,v 1.32 2002/06/20 20:29:29 momjian Exp $
* $Id: geqo_misc.c,v 1.33 2002/07/20 04:59:10 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -26,6 +26,7 @@
#include "optimizer/geqo_misc.h"
#include "nodes/print.h"
#ifdef GEQO_DEBUG
static float avg_pool(Pool *pool);
@@ -92,7 +93,7 @@ print_gen(FILE *fp, Pool *pool, int generation)
lowest = pool->size > 1 ? pool->size - 2 : 0;
fprintf(fp,
"%5d | Bst: %f Wst: %f Mean: %f Avg: %f\n",
"%5d | Best: %f Worst: %f Mean: %f Avg: %f\n",
generation,
pool->data[0].worth,
pool->data[lowest].worth,
@@ -248,3 +249,5 @@ geqo_print_rel(Query *root, RelOptInfo *rel)
printf("\n\tcheapest total path:\n");
geqo_print_path(root, rel->cheapest_total_path, 1);
}
#endif /* GEQO_DEBUG */