Permalink
Browse files

Added two TODO with possible enhancements (per database histogram, li…

…st of databases).
  • Loading branch information...
1 parent 8e73de5 commit 81c5934299b9b8674fe7a9aff2cc5f96db91ad9d @tvondra committed Nov 1, 2011
Showing with 13 additions and 0 deletions.
  1. +10 −0 queryhist.c
  2. +3 −0 queryhist.h
View
@@ -62,6 +62,16 @@ static int default_histogram_step = 100;
static int default_histogram_sample_pct = 5;
static int default_histogram_type = HISTOGRAM_LINEAR;
+/* TODO It might be useful to allow 'per database' histograms, or to collect
+ * the data only for some of the databases. So there might be options
+ *
+ * query_histogram.per_database={true|false}
+ * query_histogram.databases= ... list of database names
+ *
+ * and the per_database would require databases (so that we know how
+ * much memory to allocate etc.)
+ */
+
/* Saved hook values in case of unload */
static shmem_startup_hook_type prev_shmem_startup_hook = NULL;
static ExecutorStart_hook_type prev_ExecutorStart = NULL;
View
@@ -1,6 +1,9 @@
#include "postgres.h"
#include "tcop/utility.h"
+/* TODO When the histogram is static (dynamic=0), we may actually
+ * use less memory because the use can't resize it (so the
+ * bin_count is actually the only possible size). */
/* 1000 bins ought be enough for anyone */
#define HIST_BINS_MAX 1000

0 comments on commit 81c5934

Please sign in to comment.