Skip site navigation (1) Skip section navigation (2)

pgsql: Fix (some of the) breakage introduced into query-cancel

From: tgl(at)postgresql(dot)org (Tom Lane)
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Fix (some of the) breakage introduced into query-cancel
Date: 2010-01-07 16:29:58
Message-ID: 20100107162958.EC90A7541B9@cvs.postgresql.org (view raw or flat)
Thread:
Lists: pgsql-committers
Log Message:
-----------
Fix (some of the) breakage introduced into query-cancel processing by HS.

It is absolutely not okay to throw an ereport(ERROR) in any random place in
the code just because DoingCommandRead is set; interrupting, say, OpenSSL
in the midst of its activities is guaranteed to result in heartache.

Instead of that, undo the original optimizations that threw away
QueryCancelPending anytime we were starting or finishing a command read, and
instead discard the cancel request within ProcessInterrupts if we find that
there is no HS reason for forcing a cancel and we are DoingCommandRead.

In passing, may I once again condemn the practice of changing the code
and not fixing the adjacent comment that you just turned into a lie?

Modified Files:
--------------
    pgsql/src/backend/tcop:
        postgres.c (r1.580 -> r1.581)
        (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/tcop/postgres.c?r1=1.580&r2=1.581)

Responses

pgsql-committers by date

Next:From: Tom LaneDate: 2010-01-07 19:53:11
Subject: pgsql: Make bit/varbit substring() treat any negative length as meaning
Previous:From: Bruce MomjianDate: 2010-01-07 14:35:44
Subject: pgsql: Use -Z for vacuumdb --analyze-only, rather than -o.

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group