Re: Problem with PostgreSQL 9.2.7 and make check on AIX 7.1

From: Rainer Tammer <pgsql(at)spg(dot)schulergroup(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-bugs(at)postgresql(dot)org, cbbrowne(at)gmail(dot)com
Subject: Re: Problem with PostgreSQL 9.2.7 and make check on AIX 7.1
Date: 2014-02-26 08:24:51
Message-ID: 530DA4D3.5090001@spg.schulergroup.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-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(at)spg(dot)schulergroup(dot)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
>
>

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Rainer Tammer 2014-02-26 08:41:48 Re: Problem with PostgreSQL 9.2.7 and make check on AIX 7.1
Previous Message Rainer Tammer 2014-02-26 07:49:30 Re: Problem with PostgreSQL 9.2.7 and make check on AIX 7.1