pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Rainer Tammer <pgsql@spg.schulergroup.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: pgsql-bugs@postgresql.org
Cc: cbbrowne@gmail.com
Subject: Re: Problem with PostgreSQL 9.2.7 and make check on AIX 7.1
Date: Wed, 26 Feb 2014 09:24:51 +0100
Message-ID: <530DA4D3.5090001@spg.schulergroup.com> (raw)
In-Reply-To: <14679.1393356559@sss.pgh.pa.us>
References: <530B1EEC.1080402@spg.schulergroup.com>
	<8776.1393273299@sss.pgh.pa.us>
	<530C5312.3010508@spg.schulergroup.com>
	<32656.1393346132@sss.pgh.pa.us>
	<530CCD87.9080407@spg.schulergroup.com>
	<1179.1393348704@sss.pgh.pa.us>
	<530CD7C3.3090401@spg.schulergroup.com>
	<3853.1393352791@sss.pgh.pa.us>
	<530CE86B.6090000@spg.schulergroup.com>
	<14679.1393356559@sss.pgh.pa.us>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-bugs>

Hello,
OK, at least the first stage is working...

src/backend/storage/lmgr/proc.c

...
static bool
CheckStatementTimeout(void)
{
        TimestampTz now;

        if (!statement_timeout_active)
                return true;                    /* do nothing if not
active */

        elog(FATAL, "enter: CheckStatementTimeout - after
statement_timeout_active check");

        now = GetCurrentTimestamp();
...


gmake check: prepared_xacts.out

...
-- pxtest3 should be locked because of the pending DROP
set statement_timeout to 2000;
SELECT * FROM pxtest3;
FATAL:  enter: CheckStatementTimeout - after statement_timeout_active check
LINE 1: SELECT * FROM pxtest3;
                      ^
FATAL:  enter: CheckStatementTimeout - after statement_timeout_active check
FATAL:  enter: CheckStatementTimeout - after statement_timeout_active check
LINE 1: SELECT * FROM pxtest3;
                      ^
FATAL:  enter: CheckStatementTimeout - after statement_timeout_active check
connection to server was lost
....


Now I have put the output in CheckStatementTimeout:

src/backend/storage/lmgr/proc.c
...
static bool
CheckStatementTimeout(void)
{
        TimestampTz now;

        if (!statement_timeout_active)
                return true;                    /* do nothing if not
active */

        now = GetCurrentTimestamp();

        if (now >= statement_fin_time)
        {
                /* Time to die */
                statement_timeout_active = false;
                cancel_from_timeout = true;
        elog(FATAL, "enter: CheckStatementTimeout - next statement send
kill");
#ifdef HAVE_SETSID
                /* try to signal whole process group */
                kill(-MyProcPid, SIGINT);
#endif
                kill(MyProcPid, SIGINT);
        }
...

gmake check: prepared_xacts.out

...

-- pxtest3 should be locked because of the pending DROP
set statement_timeout to 2000;
SELECT * FROM pxtest3;
FATAL:  enter: CheckStatementTimeout - next statement send kill
LINE 1: SELECT * FROM pxtest3;
                      ^
FATAL:  enter: CheckStatementTimeout - next statement send kill
LINE 1: SELECT * FROM pxtest3;
                      ^
connection to server was lost


So the next thing should be that the backend process (the one hanging in
the SELECT) should receive the SIGINT - correct?

Bye
  Rainer

On 25.02.2014 20:29, Tom Lane wrote:
> Rainer Tammer <pgsql@spg.schulergroup.com> writes:
>> There is a pg_sema.c in src/backend/port.
>> This is linked ti sysv_sema.c, there is also a posix_sema.c.
>> How do you select the one or the other?
> The configure script chooses which to use for a particular platform.
>
> Perhaps it should be making a different choice for AIX?
>
> 			regards, tom lane
>
>



-- 
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs



view thread (44+ messages)  latest in thread

Message-ID: <530DA4D3.5090001@spg.schulergroup.com>
Permalink:  ../530DA4D3.5090001@spg.schulergroup.com/
Also on:    postgresql.org/message-id/530DA4D3.5090001@spg.schulergroup.com

 · 

reply

Reply instructions:

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

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-bugs@postgresql.org
  Cc: pgsql@spg.schulergroup.com, tgl@sss.pgh.pa.us, cbbrowne@gmail.com
  Subject: Re: Problem with PostgreSQL 9.2.7 and make check on AIX 7.1
  In-Reply-To: <530DA4D3.5090001@spg.schulergroup.com>
  References: <530B1EEC.1080402@spg.schulergroup.com> <8776.1393273299@sss.pgh.pa.us> <530C5312.3010508@spg.schulergroup.com> <32656.1393346132@sss.pgh.pa.us> <530CCD87.9080407@spg.schulergroup.com> <1179.1393348704@sss.pgh.pa.us> <530CD7C3.3090401@spg.schulergroup.com> <3853.1393352791@sss.pgh.pa.us> <530CE86B.6090000@spg.schulergroup.com> <14679.1393356559@sss.pgh.pa.us> <530DA4D3.5090001@spg.schulergroup.com>

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

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox