Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 159694 - PostgreSQL 7.3 doesn't have spinlock support on x86_64
Summary: PostgreSQL 7.3 doesn't have spinlock support on x86_64
Alias: None
Product: Red Hat Enterprise Linux 3
Classification: Red Hat
Component: rh-postgresql
Version: 3.0
Hardware: x86_64
OS: Linux
Target Milestone: ---
Assignee: Tom Lane
QA Contact:
Depends On:
Blocks: 156320
TreeView+ depends on / blocked
Reported: 2005-06-07 04:14 UTC by Tom Lane
Modified: 2013-07-03 03:06 UTC (History)
2 users (show)

Fixed In Version: RHBA-2005-684
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 2005-09-28 16:30:16 UTC
Target Upstream Version:

Attachments (Terms of Use)

System ID Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2005:684 qe-ready SHIPPED_LIVE rh-postgresql bug fix update 2005-09-28 04:00:00 UTC

Description Tom Lane 2005-06-07 04:14:33 UTC
Description of problem:
For lack of any built-in assembly code support for spinlocks on x86_64, our RHEL3 PostgreSQL build is 
falling back to using SysV IPC semaphore kernel calls for operations that ought to take a couple of 
machine instructions.  This is a pretty horrid performance loss, and can even result in database startup 
failure if the number of semaphores needed exceeds what the kernel is configured to allow (see 
referenced URL for an example)

Version-Release number of selected component (if applicable):

How reproducible:

Additional info:
Need to backport assembly-code spinlock support from later Postgres versions.  Also check to see if 
any other platforms supported by RHEL3 have similar problems.

Comment 3 Tom Lane 2005-07-20 16:25:52 UTC
It turns out that ppc64 spinlock support is missing too.

On investigation, the best bet seems to be to update s_lock.h and s_lock.c to
exactly match the PostgreSQL 7.4 sources; we know that code works from both
community testing and our own usage in RHEL4.  We could fix the immediate
problems with a slightly smaller patch, but a partial backport seems to me more
likely to create new issues than avoid them.

Comment 5 Tom Lane 2005-07-28 16:40:32 UTC
My previous comment that ppc64 spinlock support is needed was incorrect; there
was already a patch in the RPMs that added ppc64 support.  The ppc64 code in 7.4
is marginally more efficient, though.

Comment 6 Red Hat Bugzilla 2005-09-28 16:30:17 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on the solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

Note You need to log in before you can comment on or make changes to this bug.