postgresql/src
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
..
backend Remove sys/types.h in files that include postgres.h, and hence c.h, 2002-09-02 02:47:07 +00:00
bin Remove sys/types.h in files that include postgres.h, and hence c.h, 2002-09-02 02:47:07 +00:00
corba
data
include I tried to build PostgreSQL with the following step to see backends hung 2002-09-02 04:42:52 +00:00
interfaces JDBC checkin fixing the following bugs: 2002-09-02 03:07:36 +00:00
makefiles
pl plpgsql functions can return RECORD, per Neil Conway. 2002-09-01 16:28:06 +00:00
port Remove sys/types.h in files that include postgres.h, and hence c.h, 2002-09-02 02:47:07 +00:00
template Back out patch, that was alpha, which I think still needs just -O. 2002-08-29 19:35:47 +00:00
test CREATE OR REPLACE VIEW, CREATE OR REPLACE RULE. 2002-09-02 02:13:02 +00:00
tools
tutorial Add a bunch of pseudo-types to replace the behavior formerly associated 2002-08-22 00:01:51 +00:00
utils
DEVELOPERS
Makefile
Makefile.global.in Remove all traces of the ODBC driver, which is now on GBorg as the psqlodbc 2002-08-22 22:43:14 +00:00
Makefile.shlib
nls-global.mk Create "po" subdirectory before writing there. 2002-08-29 22:13:01 +00:00
win32.mak Okay, libpq++ is moved to GBorg, and all traces of it have been removed 2002-08-22 00:15:14 +00:00