Re: COPY locking - Mailing list pgsql-general

From Tom Lane
Subject Re: COPY locking
Date
Msg-id 17919.989508663@sss.pgh.pa.us
Whole thread Raw
In response to Re: COPY locking  (John Coers <coers@intrinsity.com>)
List pgsql-general
John Coers <coers@intrinsity.com> writes:
> Ah so!  So after each tuple is written to shared memory there is a giant
> scramble for the lock.  Explains all the semops and timer sets and sleeps
> in the truss output that I've been seeing.

Hmm ... semops?  What platform are you on, anyway, and which PG version?
It sounds like you might be running with the fallback SysV-semaphore-
based implementation of spinlocks, which is orders of magnitude more
horrid than even the normal test-and-set-based implementation.  If there
is TAS support for your machine then I'd only expect to see select(2)
calls during spinlock operations.  Does your version of src/include/os.h
define HAS_TEST_AND_SET?

            regards, tom lane

pgsql-general by date:

Previous
From: Tom Lane
Date:
Subject: Re: Norm SQL?
Next
From: Bruce Momjian
Date:
Subject: Re: Oracle to Pg tool