Re: [HACKERS] some problems with new locking code

From: Bruce Momjian <maillist(at)candle(dot)pha(dot)pa(dot)us>
To: vadim(at)sable(dot)krasnoyarsk(dot)su (Vadim B(dot) Mikheev)
Cc: hackers(at)postgreSQL(dot)org
Subject: Re: [HACKERS] some problems with new locking code
Date: 1998-02-24 19:56:58
Message-ID: 199802241956.OAA14773@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

>
> I created simple table (just single int4 attr) with index on it
> and tried to reproduce reported problems with BTP_CHAIN flag
> (without success, unfortunately ?) by inserting data by 3-4 psql-s
> simultaneously. No problems with 2 clients. But when 3rd psql
> starts one of psql-s becomes blocked for long time (a minutes).
> After some time blocked process may continue insertion but
> another process is sleeping instead of wake-uped proc. The same
> with 4 psql-s: one of process is always sleeping!

Thanks for finding this, Vadim. I had meant to re-run my locking tests
on the new code before the 6.3 final, but had not done it yet. I ran
them now, and they didn't work as they should. It is fixed now.

The problem was that I was incrementing a counter in a while conditional
test, even though I was not executing the loop, and the counter was used
in the next loop.

--
Bruce Momjian | 830 Blythe Avenue
maillist(at)candle(dot)pha(dot)pa(dot)us | Drexel Hill, Pennsylvania 19026
+ If your life is a hard drive, | (610) 353-9879(w)
+ Christ can be your backup. | (610) 853-3000(h)

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tatsuo Ishii 1998-02-24 22:46:56 Re: [HACKERS] Who is everyone?
Previous Message Bruce Momjian 1998-02-24 19:52:37 Re: [HACKERS] Re: [COMMITTERS] 'pgsql/src/bin/initdb initdb.sh'