{"id":15817189,"url":"https://github.com/numminorihsf/pg-ka-fix","last_synced_at":"2026-04-30T01:36:42.097Z","repository":{"id":57149199,"uuid":"56108390","full_name":"NumminorihSF/pg-ka-fix","owner":"NumminorihSF","description":"Add TCP keep-alive to pg module","archived":false,"fork":false,"pushed_at":"2016-04-14T10:05:53.000Z","size":3,"stargazers_count":1,"open_issues_count":1,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-10-06T05:22:45.760Z","etag":null,"topics":["connection-pool","node-postgres","pg","pg-ka"],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/NumminorihSF.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-04-13T00:40:29.000Z","updated_at":"2019-07-01T13:41:12.000Z","dependencies_parsed_at":"2022-09-05T15:40:52.786Z","dependency_job_id":null,"html_url":"https://github.com/NumminorihSF/pg-ka-fix","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/NumminorihSF%2Fpg-ka-fix","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NumminorihSF%2Fpg-ka-fix/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NumminorihSF%2Fpg-ka-fix/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NumminorihSF%2Fpg-ka-fix/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/NumminorihSF","download_url":"https://codeload.github.com/NumminorihSF/pg-ka-fix/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246586108,"owners_count":20801026,"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":["connection-pool","node-postgres","pg","pg-ka"],"created_at":"2024-10-05T05:22:49.161Z","updated_at":"2026-04-30T01:36:42.053Z","avatar_url":"https://github.com/NumminorihSF.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"#pg-ka-fix\n\nThis package fixes keep-alive problem of node-postgres package.\n\n## Install\n\n    npm install pg-ka-fix\n    \n**Warning!** Package has no dependencies. To use pg - you should add it to your project dependencies.\n    \n## Usage\n\nTo fix pg, you just should execute function that is exported by this module:\n\n    require('pg-ka-fix')();\n    \nAfter that, if connection will be terminated - `pg.Client#query()`'s callback will emit error on 1st argument.\n    \n## Problem\n\nThere is some BUG with connection pool in node-postgres lib.\n\nTo reproduce it - you need connect to postgresql, start request and kill db process by kill -9. \nClient will not be free on any time. So, all client from client-pull was connected, \nyou will newer be able to do something with db without restarting of you application.\n\nUnfourtiantly, you there are more ways to kill db process, without your wish. For example, some cases with `plv8` \nextension dropped our db process.\n\n\n## License\n\nThe MIT License (MIT)\n\nCopyright (c) 2016 Konstantine Petryaev\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnumminorihsf%2Fpg-ka-fix","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnumminorihsf%2Fpg-ka-fix","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnumminorihsf%2Fpg-ka-fix/lists"}