Re: thread_test.c problems - Mailing list pgsql-general

From Greg Stark
Subject Re: thread_test.c problems
Date
Msg-id 87lllaierq.fsf@stark.xeocode.com
Whole thread Raw
In response to Re: thread_test.c problems  (Bruce Momjian <pgman@candle.pha.pa.us>)
Responses Re: thread_test.c problems
List pgsql-general
Bruce Momjian <pgman@candle.pha.pa.us> writes:

> wespvp@syntegra.com wrote:
> > On 4/4/04 11:43 PM, "Bruce Momjian" <pgman@candle.pha.pa.us> wrote:
> >
> > > OK, new patch applied that causes all threads to wait until the parent
> > > checks their thread-specific pointers. I ran 1000 tests and all passed.
> > > Hopefully it will good for you too.
> >
> > I'll try to give it a test tonight.
>
> Please grab CVS.  I added sched_yield() too.

Make sure to test this on linux 2.6. They changed sched_yield() to not cause
context switches in a lot of cases where it did previously. You might need a
usleep() there instead or in addition.

--
greg

pgsql-general by date:

Previous
From: Cees van de Griend
Date:
Subject: Re: Mirroring tables from Oracle to Postgresql
Next
From: "C G"
Date:
Subject: Storing jpgs