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

Connection pooler configuration #1925

Open
gorbak25 opened this issue Jun 11, 2022 · 1 comment
Open

Connection pooler configuration #1925

gorbak25 opened this issue Jun 11, 2022 · 1 comment

Comments

@gorbak25
Copy link

I'm trying to enable server_fast_close in the connection pooler, the CRD doesn't expose this.
The operator should expose more configuration options for the connection pooler directly in the CRD.

@FxKu
Copy link
Member

FxKu commented Jun 15, 2022

We can think of including the connection pooler image to the OS repo, so that you can configure it yourself. But, the idea once was that you can also specify your own pgBouncer image in the operator. But, I guess it would require the following function:

CREATE SCHEMA IF NOT EXISTS pooler;

CREATE OR REPLACE FUNCTION pooler.user_lookup(
    in i_username text, out uname text, out phash text)
RETURNS record AS $$
BEGIN
    SELECT usename, passwd FROM pg_catalog.pg_shadow
    WHERE usename = i_username INTO uname, phash;
    RETURN;
END;
$$ LANGUAGE plpgsql SECURITY DEFINER;

REVOKE ALL ON FUNCTION pooler.user_lookup(text) FROM public, pooler;
GRANT EXECUTE ON FUNCTION pooler.user_lookup(text) TO pooler;
GRANT USAGE ON SCHEMA pooler TO pooler;

And we are also patching pgBouncer. I'm not sure if it would work out-of-the box with your own pgBouncer image.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants