Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
    Andrey Semakin
    @and-semakin
    Hello everyone! Have somebody tried to use osm2pgsql through pgbouncer in session pooling mode?
    I thought that pgbouncer in session pooling mode is absolutely transparent for applications, but it seems that it is not always true
    osm2pgsql -> postgres -- ok
    osm2pgsql -> pgbouncer -> postgres -- crazy errors
    I have posted my logs to some relevant osm2pgsql issue: https://github.com/openstreetmap/osm2pgsql/issues/159#issuecomment-535897028
    Andrey Semakin
    @and-semakin
    But I probably need some help from you guys
    @EvgenyKhaliper I use this Docker image: https://github.com/edoburu/docker-pgbouncer
    Peter Eisentraut
    @petere
    @and-semakin The unexpected message type 0x58 stuff is a consequence of the COPY protocol synchronization being lost. There are probably errors before that that lead to that point. I would particularly investigate the "Error executing external command" log entries.
    Stephen
    @sdemontfort

    Hi all, I've started using PgBouncer with my team. We've run into an issue with hanging TCP connections when our database (AWS RDS instance) does a failover operation, meaning it doesn't send any packets over the wire back to PgBouncer to say that it's going away. At this point TCP connections get stuck until Linux kernel's tcp_retries2 option kicks in (after about ~15mins).
    More context here: https://github.com/pgbouncer/pgbouncer/issues/138#issuecomment-539842754

    Would authors be open to me creating a PR with a solution to this?

    Peter Eisentraut
    @petere
    @sdemontfort Seems reasonable. PostgreSQL 12 also added this option, so it seems it‘s of current relevance.
    Stephen
    @sdemontfort
    That's good to hear, I'm not a C expert so I will open a PR with what I've got, but may need a hand w/ polish
    Stephen
    @sdemontfort
    For reference, I've created the PR here: pgbouncer/pgbouncer#428 :)
    Théo Piboubès
    @ThePib
    Hello! I am currently setting up PgBouncer v1.11, and I am running into an issue since I enabled TLS from client to PgBouncer, where SCRAM authentication is failing due to unexpected messages (or so it seems, according to the logs): 2019-10-14 13:18:38.167 UTC [1] ERROR C-0x555c1e352ed0: unexpected SCRAM channel-binding attribute in client-final-message. SCRAM used to work just fine before I configured TLS. I also verified that TLS itself works correctly (certificates are valid and expected). Does anybody know what could cause the issue? Let me know if I can provide more information.
    Théo Piboubès
    @ThePib
    Hmm, this may be related to PostgreSQL itself using channel binding as soon as SSL is enabled
    Channel binding is supported in PostgreSQL builds with SSL support. The SASL mechanism name for SCRAM with channel binding is SCRAM-SHA-256-PLUS. The channel binding type used by PostgreSQL is tls-server-end-point. (from https://www.postgresql.org/docs/11/sasl-authentication.html)
    Does PgBouncer support SCRAM-SHA-256-PLUS?
    Oh, support was added recently but not part of any release at the moment (pgbouncer/pgbouncer@2fbb092).
    Peter Eisentraut
    @petere
    Live from pgconf.eu: PgBouncer 1.12.0 released: https://www.pgbouncer.org/2019/10/pgbouncer-1-12-0
    David Fetter
    @davidfetter
    Yay!
    David Fetter
    @davidfetter
    Now, what'd I do wrong? https://pastebin.com/TZU6Ysp2
    David Fetter
    @davidfetter
    petere, I'm having some trouble compiling pgbouncer for macos, so the latest package is 1.10. any ideas what might have changed?
    (latest homebrew package, anyhow)
    Peter Eisentraut
    @petere
    @davidfetter It looks like you don't have pkg-config installed.
    Stephen
    @sdemontfort
    Hey @petere would you have a moment to check this PR? pgbouncer/pgbouncer#428 :) I've added a test that should cover the scenario
    Peter Eisentraut
    @petere
    @sdemontfort I'll look at it, but it will probably take more than a moment. :)
    Stephen
    @sdemontfort
    Oh haha that's totally fine :)
    Alexey Bashtanov
    @bashtanov
    Hi, I have a pgbouncer instance in running session pooling mode. My databases are configured as * = host=dbhostname port=5432. I used to have default_pool_size = 1300, I've raised it to 2300 and have run reload. However, in one of the lines in show databases; I still have pool_size 1300. How do I fix it without restart?
    Also, is it a desired behaviour or a bug?
    Alexey Bashtanov
    @bashtanov
    I fixed it by adding a pool_size directive to the line in databases section and found it reported as a bug pgbouncer/pgbouncer#248 .
    So ignore me, sorry about the noise.
    lgiannelli
    @lgiannelli

    hi everyone, I have a problem using the query rewriting feature. I added in the in the file /etc/pgbouncer/pgbouncer.ini
    the directive:
    rewrite_query_py_module_file = /etc/pgbouncer/rewrite_query.py
    and in the file /etc/pgbouncer/rewrite_query.py this simple code:

    import re
    def rewrite_query(username, query):
    new_query = "select 1;"
    return new_query

    I suppose that every query typed sould be changed to "select 1" but this doesn't occur. Any idea? thanks a lot

    Peter Eisentraut
    @petere
    @lgiannelli There is no such feature in pgbouncer. You might be using documentation from someone else's patched/forked version.
    lgiannelli
    @lgiannelli
    Yes sorry! it was in "pgbouncher-rr" on aws. Do you know a tool to rewrite on fly postgres queries (not on cloud)?
    David Fetter
    @davidfetter
    @petere , it looks like the 1.12 build for MacOS is causing some trouble. I guess it's not a top priority, as people aren't generally running pgbouncer on MacOS, but it might be worth looking into.
    Jaanus Rõõmus
    @jbaanus
    Hi, if I have a few nodes waiting on LISTEN query, does this somehow block PAUSE command, as these queries don’t end?
    Peter Eisentraut
    @petere
    @lgiannelli PgBouncer by design does not inspect packets, so it cannot do that. You will need some completely different tool. Maybe something like pgpool can do it, but I'm not sure.
    @davidfetter I'm not sure what you are referring to.
    @jbaanus If the LISTEN command is still on progress, then yes, but why would a LISTEN command not end?
    Jaanus Rõõmus
    @jbaanus
    @petere I ran
    ... to an issue where PAUSE did not finish in reasonable time and I had to restart pgbouncer
    I was wondering if it was LISTEN that caused it
    Jaanus Rõõmus
    @jbaanus
    Aha, the cause may actually just be session pooling mode
    Peter Eisentraut
    @petere
    @jbaanus That'll do it. :)
    A compound of Fe and O
    @oxpa
    hello, guys. Where should I file a bug about pgbouncer package for CentOS8 from EPEL? It looks like dependencies are broken: no package provides python-psycopg2, while there are python2-psycopg2 and python3-psycopg2
    and it was fixed in October, lol. So it's more an epel problem
    Sravan Kumar Kurra
    @kurrasravan89_gitlab

    Hi Guys little help on graceful migration from one PostgreSQL cluster to another PostgreSQL cluster in Pgbouncer . After changing DB names in pgbouncer.ini I ran online restart og (-R) pgbouncer. After online restart and client restart some client connections (mostly read connections) are going to old RDS instances. Please take a look at issue
    pgbouncer/pgbouncer#432

    is there any other way of graceful migration with out down time? ( I mean to say other than RESET command)

    Peter Eisentraut
    @petere
    @kurrasravan89_gitlab You don't need a restart for a configuration change. Reload is enough.
    alokob
    @alokob
    With prepareThreshold=0 ,and mode = transaction , still JDBC calls are failing with S_1 does not exists