emqx / emqx/emqx-auth-pgsql

Exception with pgBouncer

Open
#197 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Erlang
Stars
36
Forks
30
PR merge metrics
No merged PRs in 30d

Description

## Setup
EMQX: v4.0.0
Environment: k8s (installed with Helm)

## Problem
`emqx_auth_pgsql` crashes with postgres server that is accessed via pgbouncer (in Transaction Mode). It used to work fine when using it directly with postgres server.

The crash error is as follows :
```
(emqx@emqx-0.emqx-headless.nh-production.svc.cluster.local)1> 2020-07-31 06:36:32.039 [error] <<"8_69_esp32_d9ab10">>@10.244.6.56:56432 [Postgres] query '"auth_query"' failed: { │
│ invalid_sql_statement_name, │
│ <<"prepared statement \"auth_query\" does not exist">>, │
│ [{file,<<"prepare.c">>}, │
│ {line,<<"512">>}, │
│ {routine, │
│ <<"FetchPreparedStatement">>}, │
│ {severity,<<"ERROR">>}]}
```

Should changing the mode of pgBouncer to Session or something else help with this issue?

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.