[Fwd: Bug#149056: postgresql: should not try in a busy loop when allocating resources]

Started by Oliver Elphickover 23 years ago4 messages
#1Oliver Elphick
olly@lfix.co.uk

This report was submitted as a Debian bug.

-----Forwarded Message-----

From: russell@coker.com.au
To: submit@bugs.debian.org
Subject: Bug#149056: postgresql: should not try in a busy loop when allocating resources
Date: 04 Jun 2002 23:06:35 +0200

Package: postgresql
Version: N/A
Severity: normal

When trying to create a semaphore Postgresql 7.2.1-3 will try 400,000 times per
second if it has problems. I think this is excessive, trying a mere 100 times
a second will give the same chance of getting a good result without wasting
excessive CPU time.

NB If another process which is CPU bound is using all the resources then
leaving CPU time free will improve the results...

-- System Information
Debian Release: 3.0
Kernel Version: Linux lyta 2.4.18lsm #1 Wed May 22 14:20:37 CEST 2002 i686 unknown

-----End of Forwarded Message-----

--
Oliver Elphick Oliver.Elphick@lfix.co.uk
Isle of Wight http://www.lfix.co.uk/oliver
GPG: 1024D/3E1D0C1C: CA12 09E0 E8D5 8870 5839 932A 614D 4C34 3E1D 0C1C

"But without faith it is impossible to please him; for
he that cometh to God must believe that he is, and
that he is a rewarder of them that diligently seek
him." Hebrews 11:6

#2Tom Lane
tgl@sss.pgh.pa.us
In reply to: Oliver Elphick (#1)
Re: [Fwd: Bug#149056: postgresql: should not try in a busy loop when allocating resources]

Oliver Elphick <olly@lfix.co.uk> forwards:

When trying to create a semaphore Postgresql 7.2.1-3 will try 400,000 times=
per
second if it has problems.

AFAICS it will try *once* and abort if it fails. Can you provide a
reproducible test case for the above behavior?

regards, tom lane

#3Bruce Momjian
pgman@candle.pha.pa.us
In reply to: Tom Lane (#2)
Re: [Fwd: Bug#149056: postgresql: should not try in a busy

Tom Lane wrote:

Oliver Elphick <olly@lfix.co.uk> forwards:

When trying to create a semaphore Postgresql 7.2.1-3 will try 400,000 times=
per
second if it has problems.

AFAICS it will try *once* and abort if it fails. Can you provide a
reproducible test case for the above behavior?

I assume he meant tries to grab a semaphore 400,000 times, but I may be wrong.

-- 
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 853-3000
  +  If your life is a hard drive,     |  830 Blythe Avenue
  +  Christ can be your backup.        |  Drexel Hill, Pennsylvania 19026
#4Tom Lane
tgl@sss.pgh.pa.us
In reply to: Bruce Momjian (#3)
Re: [Fwd: Bug#149056: postgresql: should not try in a busy

Bruce Momjian <pgman@candle.pha.pa.us> writes:

I assume he meant tries to grab a semaphore 400,000 times, but I may
be wrong.

I don't believe that would happen either ...

regards, tom lane