Re: Very slow planning performance on partition table - Mailing list pgsql-performance

From Jeff Janes
Subject Re: Very slow planning performance on partition table
Date
Msg-id CAMkU=1ydmpt9XRMxt0sPNnQsXEoF_c7bgp2kHxtDbPNGg5Vj5w@mail.gmail.com
Whole thread Raw
In response to Re: Very slow planning performance on partition table  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Very slow planning performance on partition table
Re: Very slow planning performance on partition table
List pgsql-performance

On Sun, Jul 27, 2014 at 9:28 AM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
Rural Hunter <ruralhunter@gmail.com> writes:
>> Does that indicate something? seems it's waiting for some lock.

Yeah, that's what the stack trace suggests.  Have you looked into pg_locks
and pg_stat_activity to see which lock it wants and what's holding said
lock?

If it were waiting on a pg_locks lock, the semop should be coming from ProcSleep, not from LWLockAcquire, shouldn't it?

I'm guessing he has a lot of connections, and each connection is locking each partition in shared mode in rapid fire, generating spin-lock or cache-line contention.

Cheers,

Jeff

pgsql-performance by date:

Previous
From: Rural Hunter
Date:
Subject: Re: Very slow planning performance on partition table
Next
From: worthy7
Date:
Subject: Re: Full text search with ORDER BY performance issue