Skip to content

use arbitrary connection strings #10

Closed
@wulczer

Description

@wulczer

The module is great, but it would be useful to have more flexibility whne choosing the way Nginx connects to Postgres.

I'm working on adding a way to pass arbitrary libpq connection strings, so you could do things like:

postgres_connstring host=/var/run/postgresql dbname=mydb

to get a connection over UNIX sockets or even:

postgres_connstring sslcert=... sslrootcert=... ...

which is our use case, since we're authenticating all applications using the database with SSL certificates.

I'm wondering what would be the best way to implement it (and whether you'd be willing to accept such a patch). A separate directive (like postgres_connstring) that overrides postgres_server? Making postgres_server understand that if the directive is not "host:ip params", it's a literal libpq connstring? Something else entirely?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions