Re: COPY locking

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: coers(at)intrinsity(dot)com
Cc: pgsql-general <pgsql-general(at)postgresql(dot)org>
Subject: Re: COPY locking
Date: 2001-05-10 15:31:03
Message-ID: 17919.989508663@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

John Coers <coers(at)intrinsity(dot)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

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Renaud Thonnart 2001-05-10 15:32:55 Re: Norm SQL?
Previous Message Christian Marschalek 2001-05-10 15:29:35 RE: ER diagrams