pg_stat_statements doesn't work with --disable-spinlocks

From: Heikki Linnakangas <hlinnakangas(at)vmware(dot)com>
To: Pg Bugs <pgsql-bugs(at)postgresql(dot)org>
Subject: pg_stat_statements doesn't work with --disable-spinlocks
Date: 2013-04-04 17:11:29
Message-ID: 515DB441.3050506@vmware.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

pg_stat_statements (re-)initializes spinlocks as part of normal
operation. With --disable-spinlock, spinlocks are implemented using
semaphores, and semaphores are expected to be created at postmaster
startup. Hence, you get an assertion failure:

postgres=# select * from pg_stat_statements ;
The connection to the server was lost. Attempting reset: Failed.
!>

TRAP: FailedAssertion("!(!IsUnderPostmaster)", File: "pg_sema.c", Line: 326)

Even if that worked, re-initializing a spinlock with SpinLockInit, like
pg_stat_statement does, would always allocate a new semaphore, so you
would run out very quickly.

- Heikki

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Tom Lane 2013-04-04 17:22:07 Re: pg_stat_statements doesn't work with --disable-spinlocks
Previous Message Kevin Grittner 2013-04-04 14:55:01 Re: BUG #8036: how to disable toasting