dbTalk Databases Forums  

Re: [BUGS] [Slony1-general] Thread-safety detection on HP-UX

mailing.database.pgsql-bugs mailing.database.pgsql-bugs


Discuss Re: [BUGS] [Slony1-general] Thread-safety detection on HP-UX in the mailing.database.pgsql-bugs forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Ed L.
 
Posts: n/a

Default Re: [BUGS] [Slony1-general] Thread-safety detection on HP-UX - 10-22-2004 , 02:34 PM






Clean build of pgsql 7.4.5 on HPUX B.11.23 on ia64 with
--enable-thread-safety fails ...

$uname -a
HP-UX ... B.11.23 U ia64 0144848471 unlimited-user license

$cd postgresql-7.4.5
$./configure --enable-thread-safety --without-readline --without-zlib
....
checking pthread.h usability... yes
checking pthread.h presence... yes
checking for pthread.h... yes
configure: error:
Cannot enable threads on your platform.
Please report your platform threading info to the PostgreSQL mailing lists
so it can be added to the next release. Report all compile flags, link
flags,
functions, or libraries required for threading support.
See the comment at the top of src/port/thread.c for more information.

$gcc --version
gcc (GCC) 3.4.2
Copyright (C) 2004 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.




---------------------------(end of broadcast)---------------------------
TIP 9: the planner will ignore your desire to choose an index scan if your
joining column's datatypes do not match

Reply With Quote
  #2  
Old   
Jan Wieck
 
Posts: n/a

Default Re: [BUGS] [Slony1-general] Thread-safety detection on HP-UX - 10-23-2004 , 05:08 PM






On 10/22/2004 3:30 PM, Ed L. wrote:

Quote:
Clean build of pgsql 7.4.5 on HPUX B.11.23 on ia64 with
--enable-thread-safety fails ...

$uname -a
HP-UX ... B.11.23 U ia64 0144848471 unlimited-user license

$cd postgresql-7.4.5
$./configure --enable-thread-safety --without-readline --without-zlib
...
checking pthread.h usability... yes
checking pthread.h presence... yes
checking for pthread.h... yes
configure: error:
Cannot enable threads on your platform.
Unfortunately that doesn't mean that the switch is required to cause
libpq to behave nicely for the Slony purposes. Can someone please test
if Slony works on HP-UX even if PostgreSQL is NOT configured with
--enable-thread-safety ?


Jan

Quote:
Please report your platform threading info to the PostgreSQL mailing lists
so it can be added to the next release. Report all compile flags, link
flags,
functions, or libraries required for threading support.
See the comment at the top of src/port/thread.c for more information.

$gcc --version
gcc (GCC) 3.4.2
Copyright (C) 2004 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.



--
#================================================= =====================#
# It's easier to get forgiveness for being wrong than for being right. #
# Let's break this rule - forgive me. #
#================================================= = JanWieck (AT) Yahoo (DOT) com #

---------------------------(end of broadcast)---------------------------
TIP 9: the planner will ignore your desire to choose an index scan if your
joining column's datatypes do not match


Reply With Quote
  #3  
Old   
Tom Lane
 
Posts: n/a

Default Re: [BUGS] [Slony1-general] Thread-safety detection on HP-UX - 10-23-2004 , 09:11 PM



Jan Wieck <JanWieck (AT) Yahoo (DOT) com> writes:
Quote:
On 10/22/2004 3:30 PM, Ed L. wrote:
Clean build of pgsql 7.4.5 on HPUX B.11.23 on ia64 with
--enable-thread-safety fails ...

Unfortunately that doesn't mean that the switch is required to cause
libpq to behave nicely for the Slony purposes. Can someone please test
if Slony works on HP-UX even if PostgreSQL is NOT configured with
--enable-thread-safety ?
FWIW, CVS tip does build with --enable-thread-safety on HPUX 11.23 ...
at least for me ...

regards, tom lane

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


Reply With Quote
  #4  
Old   
Jan Wieck
 
Posts: n/a

Default Re: [BUGS] [Slony1-general] Thread-safety detection on HP-UX - 10-24-2004 , 07:29 PM



On 10/23/2004 10:08 PM, Tom Lane wrote:

Quote:
Jan Wieck <JanWieck (AT) Yahoo (DOT) com> writes:
On 10/22/2004 3:30 PM, Ed L. wrote:
Clean build of pgsql 7.4.5 on HPUX B.11.23 on ia64 with
--enable-thread-safety fails ...

Unfortunately that doesn't mean that the switch is required to cause
libpq to behave nicely for the Slony purposes. Can someone please test
if Slony works on HP-UX even if PostgreSQL is NOT configured with
--enable-thread-safety ?

FWIW, CVS tip does build with --enable-thread-safety on HPUX 11.23 ...
at least for me ...

regards, tom lane
The patch available from http://slony.info should allow that for 7.4.x
as well since it was the base for switching from our clumsy template
file collection to acx_pthreads.


Jan

--
#================================================= =====================#
# It's easier to get forgiveness for being wrong than for being right. #
# Let's break this rule - forgive me. #
#================================================= = JanWieck (AT) Yahoo (DOT) com #

---------------------------(end of broadcast)---------------------------
TIP 1: subscribe and unsubscribe commands go to majordomo (AT) postgresql (DOT) org


Reply With Quote
  #5  
Old   
Bruce Momjian
 
Posts: n/a

Default Re: [BUGS] [Slony1-general] Thread-safety detection on HP-UX - 10-26-2004 , 05:26 PM



Jan Wieck wrote:
Quote:
On 10/22/2004 3:30 PM, Ed L. wrote:

Clean build of pgsql 7.4.5 on HPUX B.11.23 on ia64 with
--enable-thread-safety fails ...

$uname -a
HP-UX ... B.11.23 U ia64 0144848471 unlimited-user license

$cd postgresql-7.4.5
$./configure --enable-thread-safety --without-readline --without-zlib
...
checking pthread.h usability... yes
checking pthread.h presence... yes
checking for pthread.h... yes
configure: error:
Cannot enable threads on your platform.

Unfortunately that doesn't mean that the switch is required to cause
libpq to behave nicely for the Slony purposes. Can someone please test
if Slony works on HP-UX even if PostgreSQL is NOT configured with
--enable-thread-safety ?
I believe Slony always needs threading, it just can be used even if the
OS doesn't fully support all thread-safe functions, so on 8.0 you use
--thread_safety_force. Jan, is that correct?

--
Bruce Momjian | http://candle.pha.pa.us
pgman (AT) candle (DOT) pha.pa.us | (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 6: Have you searched our list archives?

http://archives.postgresql.org


Reply With Quote
  #6  
Old   
Jan Wieck
 
Posts: n/a

Default Re: [BUGS] [Slony1-general] Thread-safety detection on HP-UX - 10-29-2004 , 12:51 PM



On 10/26/2004 6:13 PM, Bruce Momjian wrote:

Quote:
I believe Slony always needs threading, it just can be used even if the
OS doesn't fully support all thread-safe functions, so on 8.0 you use
--thread_safety_force. Jan, is that correct?
Yes.

Slony allways uses pthreads and therefore it requires that on platforms,
where the reentrant libc has a different definition for several global
symbols (like errno), libpq is compiled with pthread compiler flags. If
that actually leads to a "thread-safe" libpq or not is completely
irrelevant, because Slony does not need the libpq to be thread-safe.

A good example for what happens is Solaris. If libpq is compiled without
-pthreads, then "errno" is just the good old "extern int errno;". But if
it is compiled with -pthreads, then "errno" is #defined to dereferencing
the result of a function, like "*(__thread_errno())" and that function
returns the thread specific error variable and int*. Since slon is
compiled with pthreads, it links against the reentrant libc which places
error codes in the thread specific error variable. Why in devils name
that reentrant libc also has a global errno variable at all is a secret
to me and probably the last developer who knew that has left Sun 5 years
ago, but it has one and leaves it just zero all the time. Since it has
one, the extern reference errno from the non -pthread compiled libpq is
resolved just fine ... to a location of 4 wasted, meaningless bytes.


Jan

--
#================================================= =====================#
# It's easier to get forgiveness for being wrong than for being right. #
# Let's break this rule - forgive me. #
#================================================= = JanWieck (AT) Yahoo (DOT) com #

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


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.