Jan Wieck JanWieck
Tue Oct 19 07:00:49 PDT 2004
On 10/18/2004 11:35 PM, David Sainty wrote:

> As usual, I'm having trouble reproducing it now...  I've also
> discovered the user error with using 7.4.2 (as a side effect of
> re-working through to reproduce my results :) so I have that test
> case working too.
> 
> I'm starting to have doubts now, it is just possible that the
> original 7.4.5 failure was against a build without
> --enable-thread-safety...
> 
> The original fault was definitely stuck, I even left it
> "replicating" overnight to make sure, and the databases never
> sync'd up.  But if it WAS built without --enable-thread-safety, I
> imagine that would explain it?  Correct?
> 
> Is your expectation that 7.4.5 doesn't need to be patched for
> --enable-thread-safety to work properly on Solaris?

Not at all. The issue is that a libpq configured "whitout" 
--enable-thread-safety is not looking at the right errno variable on 
Solaris, since the compiler directives given with that cause errno to be 
defined as some strange integer pointer resolving function call leading 
the current thread to the right errno value, whereas the "global" errno 
still exists in a program but as soon as it is linked against the thread 
safe libc, it will stay zero forever. Thus, a program linked against the 
thread safe libc but with a shared libpq linked against the non thread 
safe libc will cause a libc call to report an error and libpq cannot 
figure out the errno and bail out with Error "0". It is stupid, and in 
my opinion the thread safe libc should not define a global errno ... but 
there are for sure a lot of smart guy's working for Sun who can explain 
why it is a good thing to do so.


Jan

> 
> Thanks,
> 
> Dave
> 
>>>> Jan Wieck <JanWieck at Yahoo.com> 19/10/2004 13:18:25 >>>
> On 10/18/2004 7:25 PM, David Sainty wrote:
> 
>> :) Yes, I am aware.  In both cases (7.4.2 and 7.4.5) I used
> the
>> --enable-thread-safety flag and built from scratch.
> 
> I'd like to see the output of the slon process from the
> subscriber 
> (slave) started with -d2, from the beginning to the point where
> you 
> think where it got stuck.
> 
> 
> Jan
> 
>> 
>>>>> Jan Wieck <JanWieck at Yahoo.com> 19/10/2004 12:21:12 >>>
>> You are aware that applying the patch to the PG sourcetree
> alone
>> isn't 
>> doing anything? You need to reconfigure with
>> --enable-thread-safety, 
>> recompile (make clean all) and reinstall PostgreSQL actually
> to
>> cause 
>> those changes to take place in the libpq. The "reconfigure"
> step
>> is the 
>> one most likely to be skipped in this procedure.
>> 
>> 
>> Jan
>> 
>> 
>> On 10/18/2004 6:27 PM, David Sainty wrote:
>> 
>>> Hi all,
>>> 
>>> I've been attempting to trial Slony-I (1.0.2) as a possible
>>> production DR replication solution, but I've had quite a bit
>> of
>>> difficulty getting stable results.
>>> 
>>> Running against PostgreSQL 7.4.5, I got the
>>> "slony-I-basic-mstr-slv.txt" to partly work, but it appeared
>> to
>>> get stuck half-way and I didn't get all data replicated.
>>> 
>>> Theorising that it may be a library threading issue (as
>>> mentioned on http://slony.info/), I reverted to 7.4.2 and
>> applied
>>> the patch.  But I've also had difficulty there (though I
> have
>>> also deviated from the instructions, so that may be user
>> error).
>>> 
>>> Perhaps I'll start there.  I can't find any mention of
>> whether
>>> Slony-I works with 7.4.5 unpatched in the documentation, and
>>> while some of the threadsafe-libpq-742.diff patch seems to
> be
>>> applied in 7.4.5 it doesn't look like all of it has been.
>>> 
>>> (We need to make a decision soon on using Slony.  I have
>>> eRServer working, but I get the feeling eRServer is not
> really
>> a
>>> living project, so I'd rather get good results with Slony!)
>>> 
>>> Thanks,
>>> 
>>> Dave
>>> 
>>> _______________________________________________
>>> Slony1-general mailing list
>>> Slony1-general at gborg.postgresql.org 
>>> http://gborg.postgresql.org/mailman/listinfo/slony1-general 
>> 
>> 
> 
> 


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


More information about the Slony1-general mailing list