From: Heikki Linnakangas <hlinnakangas@vmware.com>
To: Pg Bugs <pgsql-bugs@postgresql.org>
Subject: pg_stat_statements doesn't work with --disable-spinlocks
Date: Thu, 04 Apr 2013 20:11:29 +0300
Message-ID: <515DB441.3050506@vmware.com> (raw)
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-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
--
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-bugs@postgresql.org
Cc: hlinnakangas@vmware.com
Subject: Re: pg_stat_statements doesn't work with --disable-spinlocks
In-Reply-To: <515DB441.3050506@vmware.com>
References: <515DB441.3050506@vmware.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox