Update WIN32 branch from CVS HEAD.
authorBruce Momjian <[email protected]>
Sun, 7 Sep 2003 21:44:31 +0000 (21:44 +0000)
committerBruce Momjian <[email protected]>
Sun, 7 Sep 2003 21:44:31 +0000 (21:44 +0000)
configure
configure.in
contrib/chkpass/chkpass.c
doc/src/sgml/runtime.sgml
src/backend/optimizer/geqo/geqo_main.c
src/backend/postmaster/pgstat.c
src/backend/utils/misc/guc.c
src/backend/utils/misc/postgresql.conf.sample
src/bin/psql/tab-complete.c
src/include/optimizer/geqo.h

index be06d57d51d06917a00629380b5cb516217516f7..9d729d91cc46d37bd89a04b7ddd1664333d0f8c1 100755 (executable)
--- a/configure
+++ b/configure
@@ -2373,7 +2373,7 @@ echo "$as_me: using CFLAGS=$CFLAGS" >&6;}
 # We already have this in Makefile.win32, but configure needs it too
 if test "$PORTNAME" = "win32"
 then
-   CPPFLAGS="$CPPFLAGS -Isrc/include/port/win32"
+   CPPFLAGS="$CPPFLAGS -I$srcdir/src/include/port/win32"
 fi
 
 # Check if the compiler still works with the template settings
index a4bcbbc8b2757ffa717a70c4bd8f2488b2247bfd..77206f21400b5a275b2ec7fbbaebe2b9cab78d9b 100644 (file)
@@ -1,5 +1,5 @@
 dnl Process this file with autoconf to produce a configure script.
-dnl $Header: /cvsroot/pgsql/configure.in,v 1.280.2.1 2003/09/07 04:36:38 momjian Exp $
+dnl $Header: /cvsroot/pgsql/configure.in,v 1.280.2.2 2003/09/07 21:44:29 momjian Exp $
 dnl
 dnl Developers, please strive to achieve this order:
 dnl
@@ -241,7 +241,7 @@ AC_MSG_NOTICE([using CFLAGS=$CFLAGS])
 # We already have this in Makefile.win32, but configure needs it too
 if test "$PORTNAME" = "win32"
 then
-   CPPFLAGS="$CPPFLAGS -Isrc/include/port/win32"
+   CPPFLAGS="$CPPFLAGS -I$srcdir/src/include/port/win32"
 fi
 
 # Check if the compiler still works with the template settings
index 4cd67ea75e9afae3d02cf3a8da0857c7ea276b62..354a804e1873275493d7295c69a71fd5d0dc242b 100644 (file)
@@ -4,7 +4,7 @@
  * http://www.druid.net/darcy/
  *
- * $Id: chkpass.c,v 1.10 2003/07/24 17:52:12 tgl Exp $
+ * $Id: chkpass.c,v 1.10.2.1 2003/09/07 21:44:30 momjian Exp $
  * best viewed with tabs set to 4
  */
 
@@ -69,7 +69,6 @@ chkpass_in(PG_FUNCTION_ARGS)
    char       *str = PG_GETARG_CSTRING(0);
    chkpass    *result;
    char        mysalt[4];
-   static bool random_initialized = false;
    static char salt_chars[] =
    "./0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";
 
@@ -93,12 +92,6 @@ chkpass_in(PG_FUNCTION_ARGS)
 
    result = (chkpass *) palloc(sizeof(chkpass));
 
-   if (!random_initialized)
-   {
-       srandom((unsigned int) time(NULL));
-       random_initialized = true;
-   }
-
    mysalt[0] = salt_chars[random() & 0x3f];
    mysalt[1] = salt_chars[random() & 0x3f];
    mysalt[2] = 0;              /* technically the terminator is not
index 37168a47b0b78e6b94e3e2b10982082b199ee157..5c72480f535fe814c70937bd669ff799e1733a24 100644 (file)
@@ -1,5 +1,5 @@
 <!--
-$Header: /cvsroot/pgsql/doc/src/sgml/runtime.sgml,v 1.199.2.1 2003/09/07 04:36:43 momjian Exp $
+$Header: /cvsroot/pgsql/doc/src/sgml/runtime.sgml,v 1.199.2.2 2003/09/07 21:44:30 momjian Exp $
 -->
 
 <Chapter Id="runtime">
@@ -1438,7 +1438,6 @@ SET ENABLE_SEQSCAN TO OFF;
       <term><varname>GEQO_EFFORT</varname> (<type>integer</type>)</term>
       <term><varname>GEQO_GENERATIONS</varname> (<type>integer</type>)</term>
       <term><varname>GEQO_POOL_SIZE</varname> (<type>integer</type>)</term>
-      <term><varname>GEQO_RANDOM_SEED</varname> (<type>integer</type>)</term>
       <term><varname>GEQO_SELECTION_BIAS</varname> (<type>floating point</type>)</term>
       <listitem>
        <para>
@@ -1455,9 +1454,7 @@ SET ENABLE_SEQSCAN TO OFF;
         is roughly proportional to the sum of pool size and generations.
         The selection bias is the selective pressure within the
         population. Values can be from 1.50 to 2.00; the latter is the
-        default. The random seed can be set to get reproducible results
-        from the algorithm. If it is set to -1 then the algorithm
-        behaves non-deterministically.
+        default.
        </para>
       </listitem>
      </varlistentry>
index d657fdf8db64f22ab1197642a10c8eb7d746e85c..d9cc381b25392e2bcdaa5c9a8367d37a5cbf824c 100644 (file)
@@ -7,7 +7,7 @@
  * Portions Copyright (c) 1996-2003, PostgreSQL Global Development Group
  * Portions Copyright (c) 1994, Regents of the University of California
  *
- * $Header: /cvsroot/pgsql/src/backend/optimizer/geqo/geqo_main.c,v 1.39 2003/08/12 18:23:20 tgl Exp $
+ * $Header: /cvsroot/pgsql/src/backend/optimizer/geqo/geqo_main.c,v 1.39.2.1 2003/09/07 21:44:30 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -41,7 +41,6 @@ int           Geqo_pool_size;
 int            Geqo_effort;
 int            Geqo_generations;
 double     Geqo_selection_bias;
-int            Geqo_random_seed;
 
 
 static int gimme_pool_size(int nr_rel);
@@ -96,13 +95,6 @@ geqo(Query *root, int number_of_rels, List *initial_rels)
    number_generations = gimme_number_generations(pool_size, Geqo_effort);
    status_interval = 10;
 
-/* seed random number generator */
-/* XXX why is this done every time around? */
-   if (Geqo_random_seed >= 0)
-       srandom((unsigned int) Geqo_random_seed);
-   else
-       srandom((unsigned int) time(NULL));
-
 /* allocate genetic pool memory */
    pool = alloc_pool(pool_size, number_of_rels);
 
index aef71fd49676502bcaa92dc926bc62adc86fa796..15da0ff0293ae2db599de0ebfe4f901e9c632ac1 100644 (file)
@@ -13,7 +13,7 @@
  *
  * Copyright (c) 2001-2003, PostgreSQL Global Development Group
  *
- * $Header: /cvsroot/pgsql/src/backend/postmaster/pgstat.c,v 1.43 2003/08/12 16:21:18 tgl Exp $
+ * $Header: /cvsroot/pgsql/src/backend/postmaster/pgstat.c,v 1.43.2.1 2003/09/07 21:44:30 momjian Exp $
  * ----------
  */
 #include "postgres.h"
@@ -1591,8 +1591,6 @@ pgstat_recvbuffer(void)
    int         msg_send = 0;   /* next send index in buffer */
    int         msg_recv = 0;   /* next receive index */
    int         msg_have = 0;   /* number of bytes stored */
-   struct sockaddr_storage fromaddr;
-   int         fromlen;
    bool        overflow = false;
 
    /*
@@ -1702,10 +1700,8 @@ pgstat_recvbuffer(void)
         */
        if (FD_ISSET(pgStatSock, &rfds))
        {
-           fromlen = sizeof(fromaddr);
-           len = recvfrom(pgStatSock, (char *) &input_buffer,
-                          sizeof(PgStat_Msg), 0,
-                          (struct sockaddr *) &fromaddr, &fromlen);
+           len = recv(pgStatSock, (char *) &input_buffer,
+                      sizeof(PgStat_Msg), 0);
            if (len < 0)
            {
                ereport(LOG,
@@ -1726,16 +1722,6 @@ pgstat_recvbuffer(void)
            if (input_buffer.msg_hdr.m_size != len)
                continue;
 
-           /*
-            * The source address of the packet must be our own socket.
-            * This ensures that only real hackers or our own backends
-            * tell us something.  (This should be redundant with a
-            * kernel-level check due to having used connect(), but let's
-            * do it anyway.)
-            */
-           if (memcmp(&fromaddr, &pgStatAddr, fromlen))
-               continue;
-
            /*
             * O.K. - we accept this message.  Copy it to the circular
             * msgbuffer.
index ab5039d06ca429134611806b4e256bd476ec7cd9..d63ab2ed6b6cd87742b3d0549b5fb443196844dc 100644 (file)
@@ -10,7 +10,7 @@
  * Written by Peter Eisentraut <[email protected]>.
  *
  * IDENTIFICATION
- *   $Header: /cvsroot/pgsql/src/backend/utils/misc/guc.c,v 1.149.2.1 2003/09/07 04:36:59 momjian Exp $
+ *   $Header: /cvsroot/pgsql/src/backend/utils/misc/guc.c,v 1.149.2.2 2003/09/07 21:44:30 momjian Exp $
  *
  *--------------------------------------------------------------------
  */
@@ -898,15 +898,6 @@ static struct config_int ConfigureNamesInt[] =
        &Geqo_generations,
        0, 0, INT_MAX, NULL, NULL
    },
-   {
-       {"geqo_random_seed", PGC_USERSET, QUERY_TUNING_GEQO,
-           gettext_noop("Can be set to get reproducible results from the algorithm"),
-           gettext_noop("If it is set to -1 then the algorithm behaves "
-                        "non-deterministically")
-       },
-       &Geqo_random_seed,
-       -1, INT_MIN, INT_MAX, NULL, NULL
-   },
 
    {
        {"deadlock_timeout", PGC_SIGHUP, LOCK_MANAGEMENT,
index a30ae074a183c6d17735305963424024d422784f..c04aaab39bb7c7dc7fbe20c5513f94cbf47284a3 100644 (file)
 #geqo_generations = 0
 #geqo_pool_size = 0        # default based on tables in statement,
                # range 128-1024
-#geqo_random_seed = -1     # -1 = use variable seed
 #geqo_selection_bias = 2.0 # range 1.5-2.0
 
 # - Other Planner Options -
index bcc52be98b73dc6fde1e7e1376503fd50c713dd1..631cd91119eaaeef172e2706a7c93e24b9f23eeb 100644 (file)
@@ -3,7 +3,7 @@
  *
  * Copyright (c) 2000-2003, PostgreSQL Global Development Group
  *
- * $Header: /cvsroot/pgsql/src/bin/psql/tab-complete.c,v 1.84 2003/08/04 23:59:40 tgl Exp $
+ * $Header: /cvsroot/pgsql/src/bin/psql/tab-complete.c,v 1.84.2.1 2003/09/07 21:44:31 momjian Exp $
  */
 
 /*----------------------------------------------------------------------
@@ -534,7 +534,6 @@ psql_completion(char *text, int start, int end)
        "geqo_effort",
        "geqo_generations",
        "geqo_pool_size",
-       "geqo_random_seed",
        "geqo_selection_bias",
        "geqo_threshold",
        "join_collapse_limit",
index 0ead9dc304fd5cf5d2356dcb21d78e4c2b27ed9b..e4583c96d2a2fbbf4a001a5f95fb9dda0ad19085 100644 (file)
@@ -6,7 +6,7 @@
  * Portions Copyright (c) 1996-2003, PostgreSQL Global Development Group
  * Portions Copyright (c) 1994, Regents of the University of California
  *
- * $Id: geqo.h,v 1.31 2003/08/04 02:40:13 momjian Exp $
+ * $Id: geqo.h,v 1.31.2.1 2003/09/07 21:44:31 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -64,8 +64,6 @@ extern double Geqo_selection_bias;
 #define MIN_GEQO_SELECTION_BIAS 1.5
 #define MAX_GEQO_SELECTION_BIAS 2.0
 
-extern int Geqo_random_seed;   /* or negative to use current time */
-
 
 /* routines in geqo_main.c */
 extern RelOptInfo *geqo(Query *root, int number_of_rels, List *initial_rels);