{"id":20441473,"url":"https://github.com/moritetu/pg_retire","last_synced_at":"2026-05-18T06:36:31.521Z","repository":{"id":85122545,"uuid":"129899073","full_name":"moritetu/pg_retire","owner":"moritetu","description":"pg_retire is a postgresql extension to cancel the transaction.","archived":false,"fork":false,"pushed_at":"2018-04-17T12:33:44.000Z","size":5,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-04T09:38:16.018Z","etag":null,"topics":["extension","plugin","postgresql"],"latest_commit_sha":null,"homepage":"","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/moritetu.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-04-17T12:11:14.000Z","updated_at":"2018-04-17T13:11:55.000Z","dependencies_parsed_at":"2023-07-30T01:16:08.340Z","dependency_job_id":null,"html_url":"https://github.com/moritetu/pg_retire","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/moritetu%2Fpg_retire","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/moritetu%2Fpg_retire/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/moritetu%2Fpg_retire/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/moritetu%2Fpg_retire/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/moritetu","download_url":"https://codeload.github.com/moritetu/pg_retire/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241989852,"owners_count":20053803,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["extension","plugin","postgresql"],"created_at":"2024-11-15T09:33:06.171Z","updated_at":"2026-05-18T06:36:26.494Z","avatar_url":"https://github.com/moritetu.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"pg_retire\n=========\n\n**NOTE: This is a personal experimental program.**\n\npg_retire is simplified query canceler for PostgreSQL.\n\nOverview\n--------\n\npg_retire module runs in normal backend process. pg_retire watches whether\nthe client is alive by sending ParameterStatus message periodically.\nIf the client process is down, pg_retire cancels running transaction\nby sending SIGINT signal to the backend.\n\nParameters\n----------\n\n- pg_retire.enable\nSpecifies a bool value to enable pg_retire. Default value is false.\n\n\n- pg_retire.interval (sec)\nSpecifies how long interval pg_retire watches the client. Default value is 10.\n\nHow to install pg_retire\n------------------------\n\n```\n$ cd pg_regire\n$ make USE_PGXS=1 \n$ sudo make USE_PGXS=1 install\n```\n\nHow to set up pg_retire\n-----------------------\n\n```\n$ vim postgresql.conf\nshared_preload_libraries = 'pg_retire'\npg_retire.enable   = true\npg_retire.interval = 10\n```\n\nSimple Test\n-----------\n\n```\n$ psql \u003c\u003cEOF \u0026\nSET pg_retire.enable = on;\nWITH RECURSIVE t(n) AS (\nVALUES (1)\nUNION ALL\nSELECT n+1 FROM t WHERE n \u003c 10000000\n)\nSELECT sum(n) FROM t;\nEOF\n$ PROC=$!\n$ kill $PROC\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmoritetu%2Fpg_retire","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmoritetu%2Fpg_retire","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmoritetu%2Fpg_retire/lists"}