Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions .github/workflows/copr-publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,13 @@ jobs:
cargo vendor
tar czf vendor.tar.gz vendor/

- name: Download Rust tarball for offline build
run: |
# Download Rust tarball that will be included in SRPM for offline COPR builds
wget -q https://static.rust-lang.org/dist/rust-${{ env.RUST_VERSION }}-x86_64-unknown-linux-gnu.tar.gz -O rust-${{ env.RUST_VERSION }}-x86_64-unknown-linux-gnu.tar.gz
echo "Downloaded Rust tarball:"
ls -la rust-*.tar.gz

- name: Setup RPM build environment
run: |
rpmdev-setuptree
Expand Down Expand Up @@ -145,6 +152,9 @@ jobs:
# Copy vendor tarball
cp "$SOURCE_DIR/vendor.tar.gz" ~/rpmbuild/SOURCES/

# Copy Rust tarball for offline COPR build
cp "$SOURCE_DIR/rust-${{ env.RUST_VERSION }}-x86_64-unknown-linux-gnu.tar.gz" ~/rpmbuild/SOURCES/

# Update spec file with correct version
cd "$SOURCE_DIR"
sed "s/^Version:.*/Version: ${VERSION}/" pkg/rpm/pg-doorman.spec > ~/rpmbuild/SPECS/pg-doorman.spec
Expand Down
47 changes: 37 additions & 10 deletions .github/workflows/launchpad-publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,7 @@ env:
# jammy = 22.04 LTS
# noble = 24.04 LTS
# plucky = 25.04
# Note: oracular (24.10) reached EOL and was removed
PPA_NAME: "ppa:pg-doorman/pg-doorman"
PPA_NAME: "ppa:vadv/pg-doorman"
RUST_VERSION: "1.87.0"

jobs:
Expand Down Expand Up @@ -425,25 +424,53 @@ jobs:

VERIFICATION_FAILED=0

# Function to verify GPG signature and check for errors in output
verify_signature() {
local file="$1"
local output
local exit_code

# Capture both stdout and stderr, and exit code
output=$(gpg --verify "$file" 2>&1) || exit_code=$?

# Check for errors in output (SignatureVerifyError, BAD signature, etc.)
if echo "$output" | grep -qiE "(Error|BAD|failed|cannot)"; then
echo "ERROR: GPG verification output contains errors for $file:"
echo "$output"
return 1
fi

# Also check exit code
if [ "${exit_code:-0}" -ne 0 ]; then
echo "ERROR: GPG verification failed with exit code $exit_code for $file:"
echo "$output"
return 1
fi

# Check for "Good signature" in output
if ! echo "$output" | grep -qi "Good signature"; then
echo "ERROR: No 'Good signature' found for $file:"
echo "$output"
return 1
fi

echo "OK: $file - Good signature verified"
return 0
}

for DISTRO in $UBUNTU_VERSIONS; do
echo "Verifying signature for Ubuntu $DISTRO..."

# Verify .dsc file signature
DSC_FILE="pg-doorman_${VERSION}~${DISTRO}.dsc"
if ! gpg --verify "$DSC_FILE" 2>&1; then
echo "ERROR: GPG signature verification FAILED for $DSC_FILE"
if ! verify_signature "$DSC_FILE"; then
VERIFICATION_FAILED=1
else
echo "OK: $DSC_FILE signature verified"
fi

# Verify .changes file signature
CHANGES_FILE="pg-doorman_${VERSION}~${DISTRO}_source.changes"
if ! gpg --verify "$CHANGES_FILE" 2>&1; then
echo "ERROR: GPG signature verification FAILED for $CHANGES_FILE"
if ! verify_signature "$CHANGES_FILE"; then
VERIFICATION_FAILED=1
else
echo "OK: $CHANGES_FILE signature verified"
fi
done

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ For Ubuntu users, PgDoorman is available via Launchpad PPA:

```bash
# Add the PPA repository
sudo add-apt-repository ppa:pg-doorman/pg-doorman
sudo add-apt-repository ppa:vadv/pg-doorman
sudo apt-get update

# Install pg-doorman
Expand Down
27 changes: 27 additions & 0 deletions documentation/docs/changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,33 @@ title: Changelog

# Changelog

### 3.0.0 <small>Jan 12, 2026</small> { id="3.0.0" }

**Major Release — Complete Architecture Refactoring**

This release represents a significant milestone with a complete codebase refactoring that dramatically improves async protocol support, making PgDoorman the most efficient connection pooler for asynchronous PostgreSQL workloads.

**New Features:**

- **patroni_proxy** — A new high-performance TCP proxy for Patroni-managed PostgreSQL clusters:
- Zero-downtime connection management — existing connections are preserved during cluster topology changes
- Hot upstream updates — automatic discovery of cluster members via Patroni REST API without connection drops
- Role-based routing — route connections to leader, sync replicas, or async replicas based on configuration
- Replication lag awareness with configurable `max_lag_in_bytes` per port
- Least connections load balancing strategy

**Improvements:**

- **Complete codebase refactoring** — modular architecture with better separation of concerns:
- Client handling split into dedicated modules (core, entrypoint, protocol, startup, transaction)
- Configuration system reorganized into focused modules (general, pool, user, tls, prometheus, talos)
- Admin, auth, and prometheus subsystems extracted into separate modules
- Improved code maintainability and testability
- **Enhanced async protocol support** — significantly improved handling of asynchronous PostgreSQL protocol, providing better performance than other connection poolers for async workloads
- **Extended protocol improvements** — better client buffering and message handling for extended query protocol
- **xxhash3 for prepared statement hashing** — faster hash computation for prepared statement cache
- **Comprehensive BDD testing framework** — multi-language integration tests (Go, Rust, Python, Node.js, .NET) with Docker-based reproducible environment

### 2.5.0 <small>Nov 18, 2025</small> { id="2.5.0" }

**Improvements:**
Expand Down
18 changes: 9 additions & 9 deletions pkg/rpm/pg-doorman.spec
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
%global debug_package %{nil}
%global rust_version 1.87.0

Name: pg-doorman
Version: 3.0.0
Expand All @@ -9,14 +10,14 @@ License: MIT
URL: https://github.com/ozontech/pg_doorman
Source0: %{name}-%{version}.tar.gz
Source1: vendor.tar.gz
Source2: rust-%{rust_version}-x86_64-unknown-linux-gnu.tar.gz

BuildRequires: gcc
BuildRequires: gcc-c++
BuildRequires: make
BuildRequires: openssl-devel
BuildRequires: cmake
BuildRequires: clang
BuildRequires: curl
BuildRequires: tar

Requires: openssl
Expand All @@ -36,14 +37,13 @@ This package includes:
tar xzf %{SOURCE1}

%build
# Install Rust toolchain (COPR doesn't have Rust pre-installed)
export RUSTUP_HOME=%{_builddir}/rustup
export CARGO_HOME=%{_builddir}/cargo
export PATH="$CARGO_HOME/bin:$PATH"

# Download and install Rust 1.87.0
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain 1.87.0 --profile minimal
source "$CARGO_HOME/env"
# Install Rust toolchain from local tarball (COPR has no network access)
RUST_INSTALL_DIR=%{_builddir}/rust-install
mkdir -p "$RUST_INSTALL_DIR"
tar xzf %{SOURCE2} -C %{_builddir}
%{_builddir}/rust-%{rust_version}-x86_64-unknown-linux-gnu/install.sh --prefix="$RUST_INSTALL_DIR" --without=rust-docs

export PATH="$RUST_INSTALL_DIR/bin:$PATH"

# Configure cargo to use vendored dependencies
mkdir -p .cargo
Expand Down
Loading