public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Horak Daniel <horak@mmp.plzen-city.cz>
Cc: "'pgsql-hackers@postgreSQL.org'" <pgsql-hackers@postgreSQL.org>,
	"'cygwin@sourceware.cygnus.com'" <cygwin@sourceware.cygnus.com>,
	"'Joost Kraaijeveld'" <JKraaijeveld@askesis.nl>
Subject: Re: [HACKERS] backend freezeing on win32 fixed (I hope ;-) )
Date: Mon, 16 Aug 1999 07:08:00 -0000	[thread overview]
Message-ID: <601.934812420@sss.pgh.pa.us> (raw)
In-Reply-To: <2E7F82FAC1FCD2118E1500A024B3BF907DED3B@exchange.mmp.plzen-city.cz>

Horak Daniel <horak@mmp.plzen-city.cz> writes:
> I think I have fixed the freezing of the postgres backend on Windows NT. Now
> it survives 5 regression test in a cycle with some concurrent connections
> during running the tests.
> It have looked like a problem with initializing the same semaphore for
> second time (they are "preinitialized" for performance reasons in
> InitProcGlobal() in storage/lmgr/proc.c)

They should never be "initialized a second time".  And the preallocation
is *not* for performance reasons, it is to make sure we can actually get
enough semaphores (rather than dying under load when we fail to get the
N+1'st semaphore when starting the N+1'st backend).

> The fix (made for v6.5.1) is here:
> [ Fix consists of diking out preallocation of semaphores by postmaster ]

I do not like this patch one bit --- I think it is voodoo that doesn't
really have anything to do with the true problem.  I don't know what
the true problem is, mind you, but I don't think this is the way to
fix it.

Is it possible that the CygWin environment doesn't have a correct
emulation of IPC semaphores, such that a sema allocated by one process
(the postmaster) is not available to other procs (the backends)?
That would explain preallocation not working --- but if that's it then
we have major problems in other places, since the code assumes that a
sema once allocated will remain available to later backends.

			regards, tom lane

--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com

WARNING: multiple messages have this Message-ID
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Horak Daniel <horak@mmp.plzen-city.cz>
Cc: "'pgsql-hackers@postgreSQL.org'" <pgsql-hackers@postgreSQL.org>,
	"'cygwin@sourceware.cygnus.com'" <cygwin@sourceware.cygnus.com>,
	"'Joost Kraaijeveld'" <JKraaijeveld@askesis.nl>
Subject: Re: [HACKERS] backend freezeing on win32 fixed (I hope ;-) )
Date: Tue, 31 Aug 1999 23:49:00 -0000	[thread overview]
Message-ID: <601.934812420@sss.pgh.pa.us> (raw)
Message-ID: <19990831234900.j5GPKNj3cT7IIOwQNIN9YmlY1reXv1xfVtSAIxpQz_4@z> (raw)
In-Reply-To: <2E7F82FAC1FCD2118E1500A024B3BF907DED3B@exchange.mmp.plzen-city.cz>

Horak Daniel <horak@mmp.plzen-city.cz> writes:
> I think I have fixed the freezing of the postgres backend on Windows NT. Now
> it survives 5 regression test in a cycle with some concurrent connections
> during running the tests.
> It have looked like a problem with initializing the same semaphore for
> second time (they are "preinitialized" for performance reasons in
> InitProcGlobal() in storage/lmgr/proc.c)

They should never be "initialized a second time".  And the preallocation
is *not* for performance reasons, it is to make sure we can actually get
enough semaphores (rather than dying under load when we fail to get the
N+1'st semaphore when starting the N+1'st backend).

> The fix (made for v6.5.1) is here:
> [ Fix consists of diking out preallocation of semaphores by postmaster ]

I do not like this patch one bit --- I think it is voodoo that doesn't
really have anything to do with the true problem.  I don't know what
the true problem is, mind you, but I don't think this is the way to
fix it.

Is it possible that the CygWin environment doesn't have a correct
emulation of IPC semaphores, such that a sema allocated by one process
(the postmaster) is not available to other procs (the backends)?
That would explain preallocation not working --- but if that's it then
we have major problems in other places, since the code assumes that a
sema once allocated will remain available to later backends.

			regards, tom lane

--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com

  reply	other threads:[~1999-08-16  7:08 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1999-08-16  2:36 Horak Daniel
1999-08-16  7:08 ` Tom Lane [this message]
1999-08-16 10:08   ` [HACKERS] " Chris Faylor
1999-08-31 23:49     ` Chris Faylor
1999-08-31 23:49   ` Tom Lane
1999-08-31 23:49 ` Horak Daniel
1999-08-16 11:08 [HACKERS] " McCunney, Dennis
1999-08-16 13:38 ` Chris Faylor
1999-08-31 23:49   ` Chris Faylor
1999-08-31 23:49 ` McCunney, Dennis
1999-08-16 14:55 McCunney, Dennis
1999-08-31 23:49 ` McCunney, Dennis
1999-08-17  4:53 Horak Daniel
1999-08-31 23:49 ` Horak Daniel

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=601.934812420@sss.pgh.pa.us \
    --to=tgl@sss.pgh.pa.us \
    --cc=JKraaijeveld@askesis.nl \
    --cc=cygwin@sourceware.cygnus.com \
    --cc=horak@mmp.plzen-city.cz \
    --cc=pgsql-hackers@postgreSQL.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).