Re: [PATCHES] tsearch pfree error

2003-09-13 Thread Tom Lane
Nigel J. Andrews [EMAIL PROTECTED] writes:
 On Fri, 12 Sep 2003, Bruce Momjian wrote:
 I might have assumed the tsearch guys had it handled now that they have
 CVS access.

 Good point. I'd completely forgotten I was also expecting them to pick it up,

Yes, I'd also passed it over because I assumed Oleg and Teodor would
take care of it.  But they haven't yet, so I applied what I could.

regards, tom lane

---(end of broadcast)---
TIP 8: explain analyze is your friend


[PATCHES] thread patch

2003-09-13 Thread Bruce Momjian
Here is the thread patch.

-- 
  Bruce Momjian|  http://candle.pha.pa.us
  [EMAIL PROTECTED]   |  (610) 359-1001
  +  If your life is a hard drive, |  13 Roberts Road
  +  Christ can be your backup.|  Newtown Square, Pennsylvania 19073
Index: configure.in
===
RCS file: /cvsroot/pgsql-server/configure.in,v
retrieving revision 1.287
diff -c -c -r1.287 configure.in
*** configure.in12 Sep 2003 16:10:26 -  1.287
--- configure.in13 Sep 2003 14:47:43 -
***
*** 1031,1047 
  # One trick here is that if we don't call AC_CHECK_FUNCS, the
  # functions are marked not found, which is perfect.
  #
! if test $enable_thread_safety = yes -a $NEED_REENTRANT_FUNC_NAMES = yes ; then
  _CFLAGS=$CFLAGS
  _LIBS=$LIBS
  CFLAGS=$CFLAGS $THREAD_CFLAGS
  LIBS=$LIBS $THREAD_LIBS
! AC_CHECK_FUNC(strerror_r,
!   [], [AC_MSG_ERROR([strerror_r not found, required on this platform for 
--enable-thread-safety])])
! AC_CHECK_FUNC(getpwuid_r,
!   [], [AC_MSG_ERROR([getpwuid_r not found, required on this platform for 
--enable-thread-safety])])
! AC_CHECK_FUNC(gethostbyname_r,
!   [], [AC_MSG_ERROR([gethostbyname_r not found, required on this platform for 
--enable-thread-safety])])
  CFLAGS=$_CFLAGS
  LIBS=$_LIBS
  fi
--- 1031,1042 
  # One trick here is that if we don't call AC_CHECK_FUNCS, the
  # functions are marked not found, which is perfect.
  #
! if test $enable_thread_safety = yes -a $NEED_REENTRANT_FUNCS = yes ; then
  _CFLAGS=$CFLAGS
  _LIBS=$LIBS
  CFLAGS=$CFLAGS $THREAD_CFLAGS
  LIBS=$LIBS $THREAD_LIBS
! AC_CHECK_FUNCS([strerror_r getpwuid_r gethostbyname_r])
  CFLAGS=$_CFLAGS
  LIBS=$_LIBS
  fi
Index: src/include/port.h
===
RCS file: /cvsroot/pgsql-server/src/include/port.h,v
retrieving revision 1.13
diff -c -c -r1.13 port.h
*** src/include/port.h  5 Sep 2003 17:43:39 -   1.13
--- src/include/port.h  13 Sep 2003 14:47:46 -
***
*** 114,124 
  
  #ifndef WIN32
  extern int pqGetpwuid(uid_t uid, struct passwd * resultbuf, char *buffer,
!  size_t buflen, struct passwd ** result);
  #endif
  
  extern int pqGethostbyname(const char *name,
!   struct hostent * resbuf,
!   char *buf, size_t buflen,
!   struct hostent ** result,
int *herrno);
--- 114,124 
  
  #ifndef WIN32
  extern int pqGetpwuid(uid_t uid, struct passwd * resultbuf, char *buffer,
!  size_t buflen, struct passwd **result);
  #endif
  
  extern int pqGethostbyname(const char *name,
!   struct hostent *resultbuf,
!   char *buffer, size_t buflen,
!   struct hostent **result,
int *herrno);
Index: src/port/thread.c
===
RCS file: /cvsroot/pgsql-server/src/port/thread.c,v
retrieving revision 1.6
diff -c -c -r1.6 thread.c
*** src/port/thread.c   5 Sep 2003 17:43:40 -   1.6
--- src/port/thread.c   13 Sep 2003 14:47:47 -
***
*** 14,25 
  
  #include postgres.h
  
  /*
   *Threading sometimes requires specially-named versions of functions
   *that return data in static buffers, like strerror_r() instead of
   *strerror().  Other operating systems use pthread_setspecific()
   *and pthread_getspecific() internally to allow standard library
!  *functions to return static data to threaded applications.
   *
   *Additional confusion exists because many operating systems that
   *use pthread_setspecific/pthread_getspecific() also have *_r versions
--- 14,30 
  
  #include postgres.h
  
+ #include pthread.h
+ #include sys/types.h
+ #include pwd.h
+ 
  /*
   *Threading sometimes requires specially-named versions of functions
   *that return data in static buffers, like strerror_r() instead of
   *strerror().  Other operating systems use pthread_setspecific()
   *and pthread_getspecific() internally to allow standard library
!  *functions to return static data to threaded applications. And some
!  *operating systems have neither, meaning we have to do our own locking.
   *
   *Additional confusion exists because many operating systems that
   *use pthread_setspecific/pthread_getspecific() also have *_r versions
***
*** 36,46 
   *doesn't have strerror_r(), so we can't fall back to only using *_r
   *functions for threaded programs.
   *
!  *The current setup is to assume either all standard functions are
!  *thread-safe (NEED_REENTRANT_FUNC_NAMES=no), or the operating system
!  *requires reentrant function names (NEED_REENTRANT_FUNC_NAMES=yes).
   *Compile and run 

Re: [PATCHES] pg_hba.conf patch for hostnossl

2003-09-13 Thread Bruce Momjian

Patch applied.  Thanks.

---


Jon Jensen wrote:
 Hello.
 
 When I sent in the sslmode patch I forgot to update the comments/examples
 in pg_hba.conf. This patch remedies that, adds a brief explanation of the
 connection types, and adds a missing period in the docs.
 
 Jon

Content-Description: 

[ Attachment, skipping... ]

 
 ---(end of broadcast)---
 TIP 7: don't forget to increase your free space map settings

-- 
  Bruce Momjian|  http://candle.pha.pa.us
  [EMAIL PROTECTED]   |  (610) 359-1001
  +  If your life is a hard drive, |  13 Roberts Road
  +  Christ can be your backup.|  Newtown Square, Pennsylvania 19073

---(end of broadcast)---
TIP 2: you can get off all lists at once with the unregister command
(send unregister YourEmailAddressHere to [EMAIL PROTECTED])


[PATCHES] more doc improvements

2003-09-13 Thread Neil Conway
This patch makes a few incremental improvements to geqo.sgml and
arch-dev.sgml

-Neil

Index: doc/src/sgml/arch-dev.sgml
===
RCS file: /var/lib/cvs/pgsql-server/doc/src/sgml/arch-dev.sgml,v
retrieving revision 2.21
diff -c -r2.21 arch-dev.sgml
*** doc/src/sgml/arch-dev.sgml	22 Jun 2003 16:16:44 -	2.21
--- doc/src/sgml/arch-dev.sgml	13 Sep 2003 22:05:17 -
***
*** 25,31 
 very extensive. Rather, this chapter is intended to help the reader
 understand the general sequence of operations that occur within the
 backend from the point at which a query is received, to the point
!when the results are returned to the client.
/para
  
sect1 id=query-path
--- 25,31 
 very extensive. Rather, this chapter is intended to help the reader
 understand the general sequence of operations that occur within the
 backend from the point at which a query is received, to the point
!at which the results are returned to the client.
/para
  
sect1 id=query-path
***
*** 79,85 
  step
   para
The firsttermplanner/optimizer/firstterm takes
!   the (rewritten) querytree and creates a 
firsttermquery plan/firstterm that will be the input to the
firsttermexecutor/firstterm.
   /para
--- 79,85 
  step
   para
The firsttermplanner/optimizer/firstterm takes
!   the (rewritten) query tree and creates a 
firsttermquery plan/firstterm that will be the input to the
firsttermexecutor/firstterm.
   /para
***
*** 183,194 
  titleParser/title
  
  para
!  The parser has to check the query string (which arrives as
!  plain ASCII text) for valid syntax. If the syntax is correct a
!  firsttermparse tree/firstterm is built up and handed back otherwise an error is
!  returned. For the implementation the well known Unix
!  tools applicationlex/application and applicationyacc/application
!  are used.
  /para
  
  para
--- 183,194 
  titleParser/title
  
  para
!  The parser has to check the query string (which arrives as plain
!  ASCII text) for valid syntax. If the syntax is correct a
!  firsttermparse tree/firstterm is built up and handed back;
!  otherwise an error is returned. The parser and lexer are
!  implemented using the well-known Unix tools applicationyacc/
!  and applicationlex/.
  /para
  
  para
***
*** 201,223 
  /para
  
  para
!  The parser is defined in the file filenamegram.y/filename and consists of a
!  set of firsttermgrammar rules/firstterm and firsttermactions/firstterm
!  that are executed
!  whenever a rule is fired. The code of the actions (which
!  is actually C-code) is used to build up the parse tree.
  /para
  
  para
!  The file filenamescan.l/filename is transformed to
!  the C-source file filenamescan.c/filename
!  using the program applicationlex/application
!  and filenamegram.y/filename is transformed to
!  filenamegram.c/filename using applicationyacc/application.
!  After these transformations have taken
!  place a normal C-compiler can be used to create the
!  parser. Never make any changes to the generated C-files as they will
!  be overwritten the next time applicationlex/application
   or applicationyacc/application is called.
  
   note
--- 201,222 
  /para
  
  para
!  The parser is defined in the file filenamegram.y/filename and
!  consists of a set of firsttermgrammar rules/firstterm and
!  firsttermactions/firstterm that are executed whenever a rule
!  is fired. The code of the actions (which is actually C code) is
!  used to build up the parse tree.
  /para
  
  para
!  The file filenamescan.l/filename is transformed to the C
!  source file filenamescan.c/filename using the program
!  applicationlex/application and filenamegram.y/filename is
!  transformed to filenamegram.c/filename using
!  applicationyacc/application.  After these transformations
!  have taken place a normal C compiler can be used to create the
!  parser. Never make any changes to the generated C files as they
!  will be overwritten the next time applicationlex/application
   or applicationyacc/application is called.
  
   note
***
*** 334,347 
 titlePlanner/Optimizer/title
  
 para
! The task of the firsttermplanner/optimizer/firstterm is to create an optimal
! execution plan. It first considers all possible ways of
! firsttermscanning/firstterm and firsttermjoining/firstterm
! the relations that appear in a
! query. All the created paths lead to the same result and it's the
! task of the optimizer to estimate the cost of executing each path and
! find out which one is the cheapest.