Compare commits

..

5 Commits

Author SHA1 Message Date
Mostafa
ae843a9797 trigger a build 2025-02-27 15:50:59 -06:00
Mostafa
6ffdf5f5b0 test chart lint 2025-02-27 15:47:51 -06:00
Mostafa
5b038813eb Bump rust version on CI image (#913) 2025-02-27 14:49:25 -06:00
(Alan) Jia Lin Yuan
4fdf73c599 Bump Rust Version on Dockerfile from 1.79.0 to 1.81 (#912) 2025-02-27 14:30:45 -06:00
Mostafa
3349cecc18 Add checkout_failure_limit config/feature (#911)
In a high availability deployment of PgCat, it is possible that a client may land on a container of PgCat that is very busy with clients and as such the new client might be perpetually stuck in checkout failure loop because all connections are used by other clients. This is specially true in session mode pools with long-lived client connections (e.g. FDW connections).

One way to fix this issue is to close client connections after they encounter some number of checkout failure. This will force the client to hit the Network load balancer again, land on a different process/container, try to checkout a connection on the new process/container. if it fails, it is disconnected and tries with another one.

This mechanism is guaranteed to eventually land on a balanced state where all clients are able to find connections provided that the overall number of connections across all containers matches the number of clients.

I was able to reproduce this issue in a control environment and was able to show this PR is able to fix it.
2025-02-27 13:17:00 -06:00
5 changed files with 5 additions and 5 deletions

View File

@@ -20,7 +20,7 @@ jobs:
version: v3.8.1
# Python is required because `ct lint` runs Yamale (https://github.com/23andMe/Yamale) and
# yamllint (https://github.com/adrienverge/yamllint) which require Python
# yamllint (https://github.com/adrienverge/yamllint) which require Python
- name: Set up Python
uses: actions/setup-python@v5.1.0
with:

View File

@@ -1,4 +1,4 @@
FROM rust:1.79.0-slim-bookworm AS builder
FROM rust:1.81.0-slim-bookworm AS builder
RUN apt-get update && \
apt-get install -y build-essential

View File

@@ -1,4 +1,4 @@
FROM cimg/rust:1.79.0
FROM cimg/rust:1.81.0
COPY --from=sclevine/yj /bin/yj /bin/yj
RUN /bin/yj -h
RUN sudo apt-get update && \

View File

@@ -1,6 +1,6 @@
apiVersion: v2
name: pgcat
description: A Helm chart for PgCat a PostgreSQL pooler and proxy (like PgBouncer) with support for sharding, load balancing, failover and mirroring.
description: A Helam chart for PgCat a PostgreSQL pooler and proxy (like PgBouncer) with support for sharding, load balancing, failover and mirroring.
maintainers:
- name: PostgresML
email: team@postgresml.org

View File

@@ -1,4 +1,4 @@
FROM rust:bullseye
FROM rust:1.81.0-slim-bookworm
COPY --from=sclevine/yj /bin/yj /bin/yj
RUN /bin/yj -h