https://github.com/moritetu/pg_retire
pg_retire is a postgresql extension to cancel the transaction.
https://github.com/moritetu/pg_retire
extension plugin postgresql
Last synced: about 2 months ago
JSON representation
pg_retire is a postgresql extension to cancel the transaction.
- Host: GitHub
- URL: https://github.com/moritetu/pg_retire
- Owner: moritetu
- Created: 2018-04-17T12:11:14.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2018-04-17T12:33:44.000Z (about 8 years ago)
- Last Synced: 2025-02-04T09:38:16.018Z (over 1 year ago)
- Topics: extension, plugin, postgresql
- Language: C
- Homepage:
- Size: 4.88 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
pg_retire
=========
**NOTE: This is a personal experimental program.**
pg_retire is simplified query canceler for PostgreSQL.
Overview
--------
pg_retire module runs in normal backend process. pg_retire watches whether
the client is alive by sending ParameterStatus message periodically.
If the client process is down, pg_retire cancels running transaction
by sending SIGINT signal to the backend.
Parameters
----------
- pg_retire.enable
Specifies a bool value to enable pg_retire. Default value is false.
- pg_retire.interval (sec)
Specifies how long interval pg_retire watches the client. Default value is 10.
How to install pg_retire
------------------------
```
$ cd pg_regire
$ make USE_PGXS=1
$ sudo make USE_PGXS=1 install
```
How to set up pg_retire
-----------------------
```
$ vim postgresql.conf
shared_preload_libraries = 'pg_retire'
pg_retire.enable = true
pg_retire.interval = 10
```
Simple Test
-----------
```
$ psql <