How to check for pending CancelRequest from C/C++ function

From: Stephen Woodbridge <woodbri(at)swoodbridge(dot)com>
To: PostgreSQL General <pgsql-general(at)postgresql(dot)org>
Subject: How to check for pending CancelRequest from C/C++ function
Date: 2014-01-06 15:13:46
Message-ID: 52CAC82A.7060909@swoodbridge.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi all,

I writing some functions for postgresql extension in C/C++ and I would
like to be able to check for a pending CancelRequest from the frontend
so I can take appropriate action to honor this request.

1. How to I check if a request is pending?
2. What is the appropriate action?
I assume this should be something like:
a. cleanup as needed
b. elog(ERROR, "terminated at user cancel request.");

Is there an example of this in contrib or elsewhere that you can point
me to?

Thanks,
-Steve

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Adrian Klaver 2014-01-06 15:16:25 Re: WAL archive cleanup om master
Previous Message zach cruise 2014-01-06 15:03:10 Re: file system level backup