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

Поиск
Список
Период
Сортировка
От Stephen Woodbridge
Тема How to check for pending CancelRequest from C/C++ function
Дата
Msg-id 52CAC82A.7060909@swoodbridge.com
обсуждение исходный текст
Ответы Re: How to check for pending CancelRequest from C/C++ function  (Tom Lane <tgl@sss.pgh.pa.us>)
Список 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 по дате отправления:

Предыдущее
От: zach cruise
Дата:
Сообщение: Re: file system level backup
Следующее
От: Adrian Klaver
Дата:
Сообщение: Re: WAL archive cleanup om master