{"id":19458499,"url":"https://github.com/postgrespro/pgbouncer","last_synced_at":"2025-06-22T10:35:51.210Z","repository":{"id":69542798,"uuid":"59755081","full_name":"postgrespro/pgbouncer","owner":"postgrespro","description":null,"archived":false,"fork":false,"pushed_at":"2016-07-28T13:06:48.000Z","size":2129,"stargazers_count":6,"open_issues_count":0,"forks_count":1,"subscribers_count":32,"default_branch":"bcc","last_synced_at":"2025-06-18T14:54:16.821Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/postgrespro.png","metadata":{"files":{"readme":"README-BCC.rst","changelog":"NEWS.rst","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":"AUTHORS","dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-05-26T14:03:53.000Z","updated_at":"2023-11-03T09:39:56.000Z","dependencies_parsed_at":null,"dependency_job_id":"fb658db4-ca77-4ba4-beb1-fc0f2e4d7545","html_url":"https://github.com/postgrespro/pgbouncer","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/postgrespro/pgbouncer","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/postgrespro%2Fpgbouncer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/postgrespro%2Fpgbouncer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/postgrespro%2Fpgbouncer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/postgrespro%2Fpgbouncer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/postgrespro","download_url":"https://codeload.github.com/postgrespro/pgbouncer/tar.gz/refs/heads/bcc","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/postgrespro%2Fpgbouncer/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":261279911,"owners_count":23134895,"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":[],"created_at":"2024-11-10T17:27:21.905Z","updated_at":"2025-06-22T10:35:46.159Z","avatar_url":"https://github.com/postgrespro.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"###\nBCC\n###\n\nThis version of PgBouncer allows you to configure BCC\nconnections (Blind Carbon Copy, as in email) along with the\nusual connection. When configured, the corresponding\npostgres instance will receive all the same input as the\nmain instance. The output of the BCC instance is ignored.\n\n::\n\n ┏━━━━━┓     ┏━━━━━━━━━┓ host:port ┏━━━━━━━━━━━━━━━┓\n ┃ app ┠─────┨ bouncer ┠───────────┨ main postgres ┃\n ┗━━━━━┛     ┗━━━━┯━━━━┛           ┗━━━━━━━━━━━━━━━┛\n                  ┆                ┏━━━━━━━━━━━━━━━┓\n                  └╶╶╶╶╶╶╶╶╶╶╶╶╶╶╶╶┨  BCC postgres ┃\n                 bcc_host:bcc_port ┗━━━━━━━━━━━━━━━┛\n\nThe input duplication is performed on a level lower than the\npostgres protocol. Every time PgBouncer opens a new\nconnection to the main postgres instance, it records the\nlogin sequence and creates a buffer for the input. PgBouncer\nalso opens a connection to the BCC instance.\n\nWhen the BCC connection succeeds, it is fed with the\npreviously recorded login sequence and with the buffered\ninput. After that, PgBouncer continues sending the input to\nboth instances, buffering it if the BCC instance is unable\nto keep up with the main instance.\n\nIf the buffer grows too large because of the BCC instance\nbeing slow or unresponsive, PgBouncer closes the BCC\nconnection, clears the buffer and tries to reconnect.\nThese reconnections are attempted periodically.\n\npgbouncer.ini\n#############\n\nPer-database settings\n=====================\n\nbcc_host, bcc_port\n------------------\n\nSet ``bcc_host=`` and ``bcc_port=``. The \"blind carbon copy\"\nconnection will receive all the same queries and ignore all\nthe results. It will not disrupt the main connection and\nwill disconnect if it is slower or anything else goes wrong.\n\nGeneric settings\n================\n\nbcc_connect_timeout\n-------------------\n\nIf connection to a BCC server won't finish in this amount of\ntime, the BCC will be skipped. [seconds]\n\nDefault: 1.0\n\nbcc_reconnect_period\n--------------------\n\nHow frequently to try reconnecting to skipped BCC servers.\n[seconds]\n\nDefault: 10.0\n\nbcc_buffer\n----------\n\nThe size of the BCC buffer to accomodate lagging. [bytes]\n\nDefault: 1048576\n\nExample\n=======\n\n::\n\n [databases]\n postgres = host=127.0.0.1 port=5432 dbname=postgres user=kvap bcc_host=127.0.0.1 bcc_port=5433\n\n [pgbouncer]\n listen_port = 6543\n bcc_buffer = 3145728\n listen_addr = 127.0.0.1\n auth_type = any\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpostgrespro%2Fpgbouncer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpostgrespro%2Fpgbouncer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpostgrespro%2Fpgbouncer/lists"}