-
Notifications
You must be signed in to change notification settings - Fork 7.9k
ext/pgsql: pg_cancel_query internal update. #11081
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
ext/pgsql/pgsql.c
Outdated
|
||
if (!c) { | ||
// only possible reason since the connection is already verified at that point | ||
zend_error(E_WARNING, "can't allocate a cancel procedure"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Doesn't pgsql use ZMM? in which case the engine will bailout before.
If not, well that's something that is suboptimal but requires pgsql to allow setting a custom allocator.
PS: still on holiday for a week but going through the wooping amount of emails I got
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ah good point
40383d3
to
c30a220
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Minor nit but LGTM :)
ext/pgsql/pgsql.c
Outdated
c = PQgetCancel(pgsql); | ||
RETVAL_LONG((rc = PQcancel(c, err, sizeof(err)))); | ||
if (rc < 0) { | ||
zend_error(E_WARNING, "can't cancel the query: %s", err); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: I think this is our usually spelling
zend_error(E_WARNING, "can't cancel the query: %s", err); | |
zend_error(E_WARNING, "cannot cancel the query: %s", err); |
Removing (obsolete) PGrequestCancel usage in favor of the thread-safe PQcancel/PQfreeCancel pair.
c30a220
to
b022108
Compare
Removing (obsolete) PGrequestCancel usage in favor of the thread-safe
PQcancel/PQfreeCancel pair.