How to check for pending CancelRequest from C/C++ function - Mailing list pgsql-general

From Stephen Woodbridge
Subject How to check for pending CancelRequest from C/C++ function
Date
Msg-id 52CAC82A.7060909@swoodbridge.com
Whole thread Raw
Responses Re: How to check for pending CancelRequest from C/C++ function  (Tom Lane <tgl@sss.pgh.pa.us>)
List 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


pgsql-general by date:

Previous
From: zach cruise
Date:
Subject: Re: file system level backup
Next
From: Adrian Klaver
Date:
Subject: Re: WAL archive cleanup om master