postgresql/src/include/storage
Bruce Momjian 50938576d4 I tried to build PostgreSQL with the following step to see backends hung
during the regression test. The problem has been reproduced on two machine
but both of these are the same type of hardware and software. I also tried
to recreate the problem on other machines, on older version of AIX but I
couldn't.

After looked through pgsql-hackers mailing list, I focused on spin lock
issue to solve the problem. The easiest and may not be the best solution
for the problem is to give up HAS_TEST_AND_SET. This actually works.

One another and better solution for the problem is to use _check_lock() and
_clear_lock() as spin lock.  Important thing here is to define S_UNLOCK()
with _clear_lock().  This will solve the so called "Compiler bug" issue
someone wrote on the mailing list.

We have some other API such as cs(), compare_and_swap() and fetch_and_or()
to do test and set on AIX, but any of these didn't solve my problem.  I
wrote tiny testing program to see if we have any bug of these API of AIX,
but I couldn't see any problem except for compare_and_swap(). It seems that
you can not use compare_and_swap() for the purpose, as it would not work as
spin lock on any SMP machines I tested.  I don't know the reason why cs()
nor fetch_and_or()/fetch_and_and() will not work with PostgreSQL on p690.
These worked with my testing program on all machines I tested.

Tomoyuki Niijima
2002-09-02 04:42:52 +00:00
..
backendid.h Update copyright to 2002. 2002-06-20 20:29:54 +00:00
block.h Update copyright to 2002. 2002-06-20 20:29:54 +00:00
buf.h Update copyright to 2002. 2002-06-20 20:29:54 +00:00
buf_internals.h Restructure local-buffer handling per recent pghackers discussion. 2002-08-06 02:36:35 +00:00
buffile.h Update copyright to 2002. 2002-06-20 20:29:54 +00:00
bufmgr.h Code review of CLUSTER patch. Clean up problems with relcache getting 2002-08-11 21:17:35 +00:00
bufpage.h Code review for HeapTupleHeader changes. Add version number to page headers 2002-09-02 01:05:06 +00:00
fd.h Restructure local-buffer handling per recent pghackers discussion. 2002-08-06 02:36:35 +00:00
freespace.h Update copyright to 2002. 2002-06-20 20:29:54 +00:00
ipc.h Update copyright to 2002. 2002-06-20 20:29:54 +00:00
item.h Update copyright to 2002. 2002-06-20 20:29:54 +00:00
itemid.h Update copyright to 2002. 2002-06-20 20:29:54 +00:00
itempos.h Update copyright to 2002. 2002-06-20 20:29:54 +00:00
itemptr.h Update copyright to 2002. 2002-06-20 20:29:54 +00:00
large_object.h Update copyright to 2002. 2002-06-20 20:29:54 +00:00
lmgr.h Update copyright to 2002. 2002-06-20 20:29:54 +00:00
lock.h Code review for pg_locks feature. Make shmemoffset of PROCLOCK structs 2002-08-31 17:14:28 +00:00
lwlock.h Update copyright to 2002. 2002-06-20 20:29:54 +00:00
off.h Update copyright to 2002. 2002-06-20 20:29:54 +00:00
page.h Update copyright to 2002. 2002-06-20 20:29:54 +00:00
pg_sema.h Update copyright to 2002. 2002-06-20 20:29:54 +00:00
pg_shmem.h Remove sys/types.h in files that include postgres.h, and hence c.h, 2002-09-02 02:47:07 +00:00
pmsignal.h Update copyright to 2002. 2002-06-20 20:29:54 +00:00
pos.h Update copyright to 2002. 2002-06-20 20:29:54 +00:00
proc.h Complete TODO item: 2002-07-19 00:17:40 +00:00
relfilenode.h New pgindent run with fixes suggested by Tom. Patch manually reviewed, 2001-11-05 17:46:40 +00:00
s_lock.h I tried to build PostgreSQL with the following step to see backends hung 2002-09-02 04:42:52 +00:00
shmem.h [ Newest version of patch applied.] 2002-08-17 13:04:19 +00:00
sinval.h This patch reserves the last superuser_reserved_connections slots for 2002-08-29 21:02:12 +00:00
sinvaladt.h This patch reserves the last superuser_reserved_connections slots for 2002-08-29 21:02:12 +00:00
smgr.h Restructure local-buffer handling per recent pghackers discussion. 2002-08-06 02:36:35 +00:00
spin.h Update copyright to 2002. 2002-06-20 20:29:54 +00:00