{"id":20387537,"url":"https://github.com/davidfetter/pgbouncer_wrapper","last_synced_at":"2025-03-04T23:28:42.892Z","repository":{"id":29649128,"uuid":"33190790","full_name":"davidfetter/pgbouncer_wrapper","owner":"davidfetter","description":"SQL wrapper around pgbouncer's console","archived":false,"fork":false,"pushed_at":"2023-01-27T22:41:52.000Z","size":47,"stargazers_count":20,"open_issues_count":4,"forks_count":6,"subscribers_count":5,"default_branch":"main","last_synced_at":"2025-01-15T08:57:52.909Z","etag":null,"topics":["observability","pgbouncer","reporting","sql"],"latest_commit_sha":null,"homepage":"","language":"PLpgSQL","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/davidfetter.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":"2015-03-31T14:42:30.000Z","updated_at":"2024-10-29T19:17:52.000Z","dependencies_parsed_at":"2023-02-15T13:16:02.461Z","dependency_job_id":null,"html_url":"https://github.com/davidfetter/pgbouncer_wrapper","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/davidfetter%2Fpgbouncer_wrapper","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/davidfetter%2Fpgbouncer_wrapper/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/davidfetter%2Fpgbouncer_wrapper/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/davidfetter%2Fpgbouncer_wrapper/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/davidfetter","download_url":"https://codeload.github.com/davidfetter/pgbouncer_wrapper/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241937785,"owners_count":20045351,"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":["observability","pgbouncer","reporting","sql"],"created_at":"2024-11-15T02:47:07.597Z","updated_at":"2025-03-04T23:28:42.867Z","avatar_url":"https://github.com/davidfetter.png","language":"PLpgSQL","funding_links":[],"categories":[],"sub_categories":[],"readme":"pgbouncer_wrapper\n=================\n\nThis project was originally inspired by Peter Eisentraut's excellent [post](http://peter.eisentraut.org/blog/2015/03/25/retrieving-pgbouncer-statistics-via-dblink/)\n\nIf you've ever wanted to run SQL queries against pgbouncer's SHOW output, this\nis a handy way to do just that.\n\nTo build it, just do this:\n\n    make\n    make install\n\nBe sure that you have `pg_config` installed and in your path. If you used a\npackage management system such as RPM to install PostgreSQL, be sure that the\n`-devel` package is also installed. If necessary tell the build process where\nto find it:\n\n    env PG_CONFIG=/path/to/pg_config make \u0026\u0026 make install\n\nOnce pgbouncer_wrapper is installed, you can add it to a database like this:\n\n    CREATE EXTENSION pgbouncer_wrapper;\n\nYou can find how many clients are coming from each address like this:\n\n```sql\nSELECT\n    addr, count(*)\nFROM\n    clients\nGROUP BY addr\nORDER BY count(*) DESC;\n```\n\nYou can change pgbouncer settings like this:\n```sql\nSELECT set('default_pool_size', '300');\n```\n\nTo see whether the current configuration is out of step with `pgbouncer.ini`, you can do:\n\n```sql\nSELECT\n    count(*) \u003e 0 AS \"out of step\"\nFROM\n    regexp_split_to_table(\n        pg_read_file('/etc/pgbouncer/pgbouncer.ini'),\n        E'\\n'\n    ) WITH ORDINALITY AS t(l, o)\nJOIN\n    config c\n    ON (\n        c.key =\n        (string_to_array(t.l, ' = '))[1]\n    )\nWHERE\n    format('%s = %s', key, value) \u003c\u003e l;\n```\n\nDependencies\n------------\n`pgbouncer_wrapper` depends on dblink.\n\nCopyright and License\n---------------------\n\nCopyright (c) 2015-2023 David Fetter \u003cdavid@fetter.org\u003e.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdavidfetter%2Fpgbouncer_wrapper","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdavidfetter%2Fpgbouncer_wrapper","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdavidfetter%2Fpgbouncer_wrapper/lists"}