Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pgbouncer: use c-ares for name resolution #66336

Merged
merged 1 commit into from Aug 15, 2019
Merged

Conversation

takeda
Copy link
Contributor

@takeda takeda commented Aug 8, 2019

According to pgbouncer README.md file c-ares is the
prefered way to resolve names for pgbouncer 1.10+:
https://github.com/pgbouncer/pgbouncer/blob/master/README.md#dns-lookup-support

The previous method (evdns) did not support EDNS0 and SOA lookups.

Motivation for this change
Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nix-review --run "nix-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Ensured that relevant documentation is up to date
  • Fits CONTRIBUTING.md.
Notify maintainers

cc @ (no maintainers listed)

According to pgbouncer README.md file c-ares is the
prefered way to resolve names for pgbouncer 1.10+:
https://github.com/pgbouncer/pgbouncer/blob/master/README.md#dns-lookup-support

The previous method (evdns) did not support EDNS0 and SOA lookups.
@takeda
Copy link
Contributor Author

takeda commented Aug 14, 2019

Anyone could see if this can be merged or has issues, apologizes for referencing you @danbst but you seem to be around postgres related PRs.

@danbst danbst merged commit 1c392df into NixOS:master Aug 15, 2019
@danbst
Copy link
Contributor

danbst commented Aug 15, 2019

interesting, does default APT pgbouncer package use c-ares? Can't find source for that

@takeda
Copy link
Contributor Author

takeda commented Aug 15, 2019

@danbst I just checked on centos from the postgresql.org official repo and it does include c-ares:

==============================================================================================================================================================================================================================================
 Package                                                           Arch                                              Version                                                         Repository                                          Size
==============================================================================================================================================================================================================================================
Installing:
 pgbouncer                                                         x86_64                                            1.10.0-1.rhel7                                                  pgdg10                                             167 k
Installing for dependencies:
 c-ares                                                            x86_64                                            1.10.0-3.el7                                                    base                                                78 k
 initscripts                                                       x86_64                                            9.49.46-1.el7                                                   base                                               439 k
 iproute                                                           x86_64                                            4.11.0-14.el7_6.2                                               updates                                            764 k
 iptables                                                          x86_64                                            1.4.21-28.el7                                                   base                                               433 k
 libevent                                                          x86_64                                            2.0.21-4.el7                                                    base                                               214 k
 libmnl                                                            x86_64                                            1.0.3-7.el7                                                     base                                                23 k
 libnetfilter_conntrack                                            x86_64                                            1.0.6-1.el7_3                                                   base                                                55 k
 libnfnetlink                                                      x86_64                                            1.0.1-4.el7                                                     base                                                26 k
 postgresql10-libs                                                 x86_64                                            10.10-1PGDG.rhel7                                               pgdg10                                             356 k
 python2-psycopg2                                                  x86_64                                            2.8.3-1.rhel7                                                   pgdg10                                             169 k
 systemd-sysv                                                      x86_64                                            219-62.el7_6.9                                                  updates                                             84 k
 sysvinit-tools                                                    x86_64                                            2.88-14.dsf.el7                                                 base                                                63 k
Updating for dependencies:
 systemd                                                           x86_64                                            219-62.el7_6.9                                                  updates                                            5.1 M
 systemd-libs                                                      x86_64                                            219-62.el7_6.9                                                  updates                                            408 k

Transaction Summary
==============================================================================================================================================================================================================================================

On FreeBSD it is defined as an option: https://svnweb.freebsd.org/ports/head/databases/pgbouncer/Makefile?revision=507877&view=markup#l29 but then the version there is 1.9.0, but then according to the table I linked initially, the c-ares became the best DNS resolution method from version 1.10.0 onward, all other ones has some limitations.

@takeda takeda deleted the pgbouncer branch August 15, 2019 22:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants