Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
174 commits
Select commit Hold shift + click to select a range
99cd2f8
feat: propagate GEOMETRY CRS through PostGIS in both directions
jatorre Mar 20, 2026
640b9fa
fix(postgres_utils): preserve GEOMETRY CRS through CREATE TABLE AS
jatorre Apr 25, 2026
aded053
Fix error message for Postgres connection failure
MBkkt Jul 2, 2026
4f0c4cb
Merge pull request #492 from MBkkt/patch-1
staticlibs Jul 2, 2026
4bee0f4
first attempt to enable use_information_schema for ATTACH
seb-ant Jul 3, 2026
796e68d
Merge pull request #493 from khepin/use_info_schema
staticlibs Jul 3, 2026
777c0e9
Follow-up format for 493
staticlibs Jul 3, 2026
74b8d3f
Submodules bump to 2daa4fc9a4
staticlibs Jul 3, 2026
90328df
fix: catalog cache loading race
hello-world-bfree Jul 7, 2026
ce5d107
Merge pull request #499 from hello-world-bfree/fix/postgres-catalog-l…
staticlibs Jul 8, 2026
d4c447d
fix: prevent catalog scan use-after-free
hello-world-bfree Jul 8, 2026
f8537b8
fix: synchronize ReferenceEntry
hello-world-bfree Jul 8, 2026
5a456c7
VARCHAR fallback for types in inaccessible schema
staticlibs Jul 8, 2026
dbaf7f4
Merge pull request #501 from hello-world-bfree/fix/postgres-catalogse…
staticlibs Jul 8, 2026
c782d6f
fix: avoid crash by setting default index constraint type
hello-world-bfree Jul 8, 2026
3dc5744
Merge pull request #508 from hello-world-bfree/fix/postgres-indexes-c…
staticlibs Jul 9, 2026
d335398
Allow ATTACHing to multiple Postgres schemas
staticlibs Jul 9, 2026
d26fd99
fix: detect Postgres table catalog staleness
hello-world-bfree Jul 10, 2026
cb4efea
Apply .github/patches/extensions/postgres_scanner/0014-freeloaded-inc…
carlopi Jul 11, 2026
cd4be97
Apply .github/patches/extensions/postgres_scanner/0015-logging-includ…
carlopi Jul 11, 2026
2a07470
Apply .github/patches/extensions/postgres_scanner/0016-log-macro-mana…
carlopi Jul 11, 2026
9175138
Apply .github/patches/extensions/postgres_scanner/0017-log-manager-in…
carlopi Jul 11, 2026
072c3e2
Apply .github/patches/extensions/postgres_scanner/zzzzzzzz-zz-connect…
carlopi Jul 11, 2026
b700d0e
Bump duckdb to dfd87550849406b1823812222ef92525724780d3
carlopi Jul 11, 2026
ad69a89
Apply the text protocol opt-out on the postgres_query (CONNECT) path
carlopi Jul 11, 2026
cd77c70
Merge pull request #515 from carlopi/fixup_connect_redshift
staticlibs Jul 11, 2026
b1cb71a
Remove varchar_array from test
carlopi Jul 12, 2026
2c9e18a
fix: support wire compat. enable custom staleness query.
hello-world-bfree Jul 10, 2026
4442b42
fix: gate tests correctly for shorter ci time
hello-world-bfree Jul 12, 2026
d684b82
Merge pull request #514 from hello-world-bfree/fix/postgres-catalog-c…
staticlibs Jul 12, 2026
a4e03aa
Merge pull request #516 from carlopi/bump_duckdb
staticlibs Jul 12, 2026
c669681
fix: resolve ON CONFLICT target after DROP COLUMN
CatherineThompson Jul 17, 2026
21012c3
CI extension load fix
staticlibs Jul 18, 2026
d3a2b2a
Fix catalog staleness option
staticlibs Jul 18, 2026
35ee7df
Support insertion with plain INSERTs
staticlibs Jul 19, 2026
9ae1ba6
Allow synchronous snapshot on replicas and in RDS/Aurora
jgmills98 Jul 20, 2026
ba06cb6
Merge pull request #523 from CatherineThompson/ct-logical-col-index
staticlibs Jul 20, 2026
75e7f33
Merge pull request #524 from jgmills98/allow-sync-snapshot-on-replicas
staticlibs Jul 21, 2026
b7632f3
Pin the first scan connection in multi-scan streaming queries
jgmills98 Jul 22, 2026
0106fd9
Drop postgres 9.6 support
jgmills98 Jul 22, 2026
b07870f
Merge pull request #527 from jgmills98/pin-first-scan-connection
staticlibs Jul 23, 2026
f190c59
Merge pull request #528 from jgmills98/drop-9-6-support
staticlibs Jul 23, 2026
e69282f
Reject out-of-range Postgres timestamps
Jul 24, 2026
52f943c
Fix timestamp constant formatting
Jul 24, 2026
2a09f4f
Merge pull request #530 from marknefedov/fix/postgres-timestamp-overflow
staticlibs Jul 24, 2026
7f446ab
Drain libpq results before throwing
Jul 24, 2026
cf7c800
Use the constant config when writing blob IN list literals
Jul 24, 2026
a404c80
Skip the COPY file header when scanning for row boundaries
Jul 24, 2026
46e2929
Merge pull request #531 from marknefedov/fix/undrained-state
staticlibs Jul 25, 2026
9ab3255
Merge pull request #532 from marknefedov/fix/binary-copy-header-bound…
staticlibs Jul 25, 2026
c809ae0
Update database-connector submodule
staticlibs Jul 25, 2026
4daa465
Merge pull request #534 from marknefedov/fix/blob-in-pushdown-constan…
staticlibs Jul 25, 2026
8207dd5
Move more logic to common connection pool
staticlibs Aug 3, 2026
871e258
add connect_display option
Tmonster Aug 5, 2026
b0530b4
add some more tests
Tmonster Aug 5, 2026
99e174f
Use configure_pool template from common repo
staticlibs Aug 5, 2026
3de69ac
Merge pull request #544 from Tmonster/add_connect_display_option_para…
staticlibs Aug 5, 2026
dbb444e
Fix idle transaction timeout error reporting
xjn2005 Aug 5, 2026
4f06dff
Fix idle transaction timeout error reporting
xjn2005 Aug 6, 2026
0e6655b
Fix idle transaction timeout test under TLS
xjn2005 Aug 6, 2026
e2e912d
Merge pull request #543 from xjn2005/issue378
staticlibs Aug 6, 2026
4975792
Fix connection pool slot leak on COMMIT failure
staticlibs Aug 6, 2026
1ab2381
Use transaction manager from common repo
staticlibs Aug 7, 2026
05ec025
Add a test to cover parallel scans safety
staticlibs Aug 10, 2026
757a631
Return row count for DML queries in postgres_query
staticlibs Aug 11, 2026
75d5ea8
Make postgres_execute an alias to postgres_query
staticlibs Aug 11, 2026
c1f9710
Suppress DML output only in CONNECT mode
staticlibs Aug 14, 2026
f9f9e1a
Fix two libpq resource-handling bugs on COPY error paths
sfc-gh-mslot Aug 21, 2026
1279dca
Merge pull request #555 from sfc-gh-mslot/fix-libpq-resource-leaks
staticlibs Aug 21, 2026
8422ea3
Update submodules to 326202015f
staticlibs Aug 20, 2026
66b9a06
Update vcpkg and libpq
staticlibs Aug 28, 2026
c91ea57
Update submodules to DuckDB 8616efa9da
staticlibs Aug 29, 2026
14a2f3a
- added numeric -> varchar cast
jgmills98 Aug 29, 2026
0735df0
Merge pull request #560 from jgmills98/numeric-varchar
staticlibs Aug 31, 2026
50dd6aa
Add detection of out-of-bound NUMERICs
staticlibs Sep 1, 2026
fffcb35
Allow non-preparable queries in postgres_query
staticlibs Sep 2, 2026
83f98e4
apply patches from duckdb v2.0-cyanoptera
carlopi Sep 3, 2026
a9f6f70
bump duckdb references to v2.0.0
carlopi Sep 3, 2026
67d4639
Format fix
carlopi Sep 3, 2026
33ae590
Serialize MERGE INTO actions
staticlibs Sep 4, 2026
40d9492
Update duckdb version to include relassert fix
staticlibs Sep 4, 2026
bc6aab5
Merge pull request #567 from staticlibs/apply-patches-e077bc6306fc227…
staticlibs Sep 4, 2026
7f3ae52
Support PREPARE/EXECUTE interleaved with DETACH
staticlibs Sep 11, 2026
14d7b2b
Retry the first Postgres connection once
staticlibs Sep 11, 2026
d397312
Add concurrent tests for catalog cache
staticlibs Sep 12, 2026
d57412f
Merge pull request #418 from jatorre/fix/geometry-srid-ewkb
staticlibs Sep 18, 2026
cf928c7
Submodules and CI reference update
staticlibs Sep 23, 2026
07d6d1f
Absorb 0001-fix-ninja-1.13-meson-install.patch
staticlibs Sep 23, 2026
5120063
Absorb 0002-table-catalog-entry-columns.patch
staticlibs Sep 23, 2026
3e01563
Absorb 0003-literal-constant-expression.patch
staticlibs Sep 23, 2026
2dfa08d
Merge pull request #580 from staticlibs/submodules_and_patches
staticlibs Sep 24, 2026
74c1ef8
bump duckdb references to v2.0.0
maiadegraaf Sep 25, 2026
3a76064
Filter pushdown enhancements for table scans
staticlibs Sep 29, 2026
dd7cdff
Absorb 0001-table-function-signature-options.patch
staticlibs Oct 1, 2026
32ef1ba
Update submodules
staticlibs Oct 1, 2026
2b6ef82
Remove DONT_LINK
staticlibs Oct 1, 2026
052a9d3
Format fix
staticlibs Oct 1, 2026
6ac3e6a
Test script fix
staticlibs Oct 1, 2026
f9db66e
Merge pull request #585 from staticlibs/apply_patches
staticlibs Oct 1, 2026
a119f4d
apply patches from duckdb v2.0-cyanoptera
maiadegraaf Oct 6, 2026
64bc0df
bump duckdb references to v2.0.0
maiadegraaf Oct 6, 2026
6a85943
Test output fix
staticlibs Oct 6, 2026
5a9e81c
Absorb 0003-catalog-set-concurrent-clear.patch
staticlibs Oct 5, 2026
a0fcfde
Merge pull request #588 from staticlibs/apply-patches-f4a378b1d1521be…
staticlibs Oct 6, 2026
45697e9
bump duckdb references to v2.0.0
duckdblabs-bot Oct 8, 2026
98ee7fc
Rename clear-cache function
staticlibs Oct 8, 2026
16737d4
Remove attach and scan functions
staticlibs Oct 8, 2026
b443fd1
Submodule update
staticlibs Oct 9, 2026
5fa3ccb
Absorb 0003-table-function-get-table-entry.patch
staticlibs Oct 9, 2026
936bf68
Make COPY binary format length checks an error instead of D_ASSERT
gavinwahl Oct 11, 2026
1bda7b6
Merge pull request #595 from gavinwahl/binary-parser-length-checks
staticlibs Oct 11, 2026
52aed68
Filter out allow_quoted_nulls CSV import option
staticlibs Oct 11, 2026
8d201d4
Merge pull request #593 from duckdb/duckdb-bump/main
staticlibs Oct 11, 2026
df96cc8
bump duckdb references to v2.0.0 (2658ef961f)
carlopi Oct 12, 2026
8a46d40
Fix libpq C99 check with clang-cl
Oct 12, 2026
21b85fe
Add plain query binary reader
staticlibs Oct 12, 2026
e2d4844
ctid scan fix for plain query mode
staticlibs Oct 12, 2026
1e18d1c
Fall back to text inserts for unsupported types
staticlibs Oct 12, 2026
1289238
Merge pull request #599 from carlopi/duckdb-bump/main
staticlibs Oct 12, 2026
57f857e
Merge pull request #600 from smvv/fix-clang-cl-libpq-c99-test
staticlibs Oct 12, 2026
782fe1a
Fix cardinality call
staticlibs Oct 12, 2026
c635fbd
Outdated comment fix
staticlibs Oct 12, 2026
f5bde76
Inline the binary COPY parser's length and bounds checks
gavinwahl Oct 12, 2026
b4af341
Merge pull request #601 from staticlibs/plain_query_binary_reader
staticlibs Oct 13, 2026
d60bc85
Merge pull request #603 from gavinwahl/binary-parser-inline-helpers
staticlibs Oct 13, 2026
62bdc41
Set the chunk's cardinality once per chunk when reading binary COPY
gavinwahl Oct 12, 2026
3d1c12f
Chunk cardinality fix in text reader
staticlibs Oct 13, 2026
37cea87
Remove ORDER pushdown optimizer
staticlibs Oct 12, 2026
bfe14d8
Autodetect query mode when params are specified
staticlibs Oct 12, 2026
5e88eaf
Merge pull request #607 from staticlibs/copy-cardinality-once-per-chunk
staticlibs Oct 13, 2026
9e93d92
Fix libpq Meson detection for clang-cl
Oct 13, 2026
5f2f969
Fix binary NUMERIC-to-DOUBLE rounding
ItsM0rty Oct 13, 2026
9c0c895
Update giant numeric expectations after rounding fix
ItsM0rty Oct 13, 2026
a40dae3
Merge pull request #609 from smvv/fix-clang-cl-libpq-msvc-abi
staticlibs Oct 13, 2026
ae8ae90
Merge pull request #610 from ItsM0rty/fix/numeric-double-rounding
staticlibs Oct 13, 2026
47730ea
Allow running postgres_query on a specific conn
staticlibs Oct 13, 2026
565df41
Bump database-connector for the pushdown of TIMESTAMPTZ constants and…
PeterVanHolland Oct 13, 2026
25cb64c
Submodule update
staticlibs Oct 13, 2026
048f23c
Merge pull request #615 from staticlibs/pushdown_timestamptz_conjunction
staticlibs Oct 13, 2026
9671d2c
Pushdown option rename
staticlibs Oct 13, 2026
ef48123
Pass DuckDB label as a default application_name
staticlibs Oct 14, 2026
33d50e5
Do not run app_name test on PgBouncer
staticlibs Oct 14, 2026
7c696fe
Merge pull request #617 from staticlibs/app_name
staticlibs Oct 14, 2026
b717f7f
Put the default application_name into URI connection strings instead …
PeterVanHolland Oct 15, 2026
ed73241
Merge pull request #619 from PeterVanHolland/uri_application_name
staticlibs Oct 15, 2026
4f73f18
Do not wrap postgres_query SQL unless necessary
staticlibs Oct 15, 2026
c0f5a3c
Deduplicate column names from postgres_query
staticlibs Oct 15, 2026
d27212f
bump duckdb references to v2.0.0
duckdblabs-bot Oct 19, 2026
7ccd4ee
Per-attach CTID scan
leo-altertable Jun 30, 2026
b40978b
Bump DuckDB to altertable-2.0.0 (v2.0.0, 24f6388b5e)
leo-altertable Oct 22, 2026
3fade09
Bump submodules to 2.0.0
staticlibs Oct 22, 2026
4b4dbb7
Clangd file, test data gen fix
staticlibs Oct 22, 2026
e53270e
Test fix for older versions of Postgres
staticlibs Oct 22, 2026
4872359
Do not rely on columns order in postgres_query and scans
staticlibs Oct 23, 2026
71cd422
Use Namespace runners on CI
staticlibs Oct 23, 2026
ff177f5
Resolve IAM secret template before secret storage
staticlibs Oct 24, 2026
313ca65
Add a CI run without SSL
staticlibs Oct 24, 2026
465e5f4
Use fallback_application_name for the default DuckDB application name
RaphaelFakhri Oct 24, 2026
719691f
Merge pull request #637 from RaphaelFakhri/fix-respect-pgappname
staticlibs Oct 24, 2026
ef73889
Support reusing Postgres prepared statements
staticlibs Oct 28, 2026
02bf7fb
Add preliminary_queries and clear_catalog_cache options
staticlibs Oct 28, 2026
c045f6c
Implement support for RemotePushdownOptimizer
staticlibs Oct 29, 2026
5f4ad35
Support Redshift late-binding views
staticlibs Oct 30, 2026
1c19e88
Format the per-attach CTID scan change
leo-altertable Nov 2, 2026
cce83f4
Bump action-setup-postgres to v9 for the ubuntu-26.04 runner image
leo-altertable Nov 2, 2026
ac5de1f
Test PgBouncer against Postgres 15 as the oldest version
leo-altertable Nov 2, 2026
ecb330a
Better support for Redshift-specific types
staticlibs Nov 2, 2026
dbd9589
Pass query parameters to statements without result columns
wergstatt Nov 2, 2026
3e32a3d
Merge pull request #647 from wergstatt/jw/pwux
staticlibs Nov 3, 2026
2a1871d
Use binary protocol with Redshift
staticlibs Nov 3, 2026
1ee6405
Merge branch 'main' of https://github.com/duckdb/duckdb-postgres into…
redox Nov 4, 2026
780103e
Point duckdb submodule at altertable-ai/duckdb altertable-v2.0-cyanop…
redox Nov 5, 2026
1bab8b9
Name the extension of the CREATE INDEX operator
redox Nov 13, 2026
cacc25d
Merge pull request #4 from altertable-ai/su/postgres-create-index-ext…
redox Nov 13, 2026
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
6 changes: 6 additions & 0 deletions .clangd
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
CompileFlags:
CompilationDatabase: .cache/clangd
Add: -Wno-unqualified-std-cast-call
Diagnostics:
Includes:
IgnoreHeader: duckdb\.hpp
40 changes: 40 additions & 0 deletions .github/actions/setup-postgres/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: Setup Postgres
description: Start Postgres (optionally with SSL enabled) in a Docker container on localhost:5432
inputs:
postgres-version:
description: Postgres major version (Docker image tag)
required: true
ssl:
description: Whether to enable SSL on the Postgres server
required: false
default: 'false'
runs:
using: composite
steps:
- name: Start Postgres container
shell: bash
run: |
SSL_ARGS=()
if [ "${{ inputs.ssl }}" == "true" ]; then
SSL_ARGS=(
-c ssl=on
-c ssl_cert_file=/etc/ssl/certs/ssl-cert-snakeoil.pem
-c ssl_key_file=/etc/ssl/private/ssl-cert-snakeoil.key
)
fi
docker run -d --name postgres --network host \
-e POSTGRES_USER=postgres \
-e POSTGRES_PASSWORD=postgres \
-e POSTGRES_DB=postgres \
-v /tmp:/tmp \
postgres:${{ inputs.postgres-version }} \
-c port=5432 \
"${SSL_ARGS[@]}"
for i in $(seq 1 60); do
if docker exec postgres pg_isready -h localhost -p 5432 -U postgres; then
break
fi
sleep 1
done
docker exec postgres pg_isready -h localhost -p 5432 -U postgres
PGPASSWORD=postgres psql -h localhost -p 5432 -U postgres -d postgres -c "SELECT version()"
133 changes: 75 additions & 58 deletions .github/workflows/IntegrationTests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,37 +16,33 @@ jobs:

format-check:
name: Format Check
runs-on: ubuntu-latest
runs-on: ${{ github.repository_owner == 'duckdb' && 'namespace-profile-linux-slim' || 'ubuntu-latest' }}
steps:
- uses: actions/checkout@v6
- uses: actions/checkout@v7
with:
submodules: 'true'

- name: Install
run: |
pip3 install \
- run: |
python -m pip install --user --break-system-packages \
black==25.1.0 \
clang_format==11.0.1 \
cmake-format==0.6.13

- name: Format Check
run: |
export PATH=~/.local/bin:$PATH
python -m pip show black
python -m pip show cmake_format
python -m pip show clang_format
which clang-format
clang-format --version
clang-format --dump-config
make format-check

linux-tests:
name: Linux (pg-17)
needs: format-check
runs-on: ubuntu-latest
runs-on: ${{ github.repository_owner == 'duckdb' && 'namespace-profile-linux-x64' || 'ubuntu-latest' }}

env:
GEN: ninja
CC: 'ccache gcc'
CXX: 'ccache g++'
CC: '/usr/lib/ccache/gcc'
CXX: '/usr/lib/ccache/g++'
CCACHE_DIR: ${{ github.workspace }}/ccache
VCPKG_TARGET_TRIPLET: x64-linux-release
VCPKG_HOST_TRIPLET: x64-linux-release
Expand All @@ -61,6 +57,8 @@ jobs:

- name: Install Dependencies
run: |
echo "set man-db/auto-update false" | sudo debconf-communicate || true
sudo dpkg-reconfigure man-db || true
sudo apt-get update -y -q -o=Dpkg::Use-Pty=0
sudo apt-get install -y -q -o=Dpkg::Use-Pty=0 \
build-essential \
Expand All @@ -85,7 +83,7 @@ jobs:
- name: Setup vcpkg
uses: lukka/run-vcpkg@v11.1
with:
vcpkgGitCommitId: 84bab45d415d22042bd0b9081aea57f362da3f35
vcpkgGitCommitId: 9e593bb18ea69cc5095e012465dcd675a822ed0d # Release 2026.07.29

- name: Build extension
run: |
Expand All @@ -98,14 +96,10 @@ jobs:
key: ${{ steps.cache_key.outputs.value }}

- name: Setup Postgres
uses: ikalnytskyi/action-setup-postgres@v8
uses: ikalnytskyi/action-setup-postgres@v9
with:
postgres-version: 17
username: 'postgres'
password: 'postgres'
database: 'postgres'
port: '5432'
ssl: true
ssl: false

- name: Run tests
env:
Expand All @@ -114,6 +108,7 @@ jobs:
PGUSER: postgres
PGPASSWORD: postgres
POSTGRES_TEST_DATABASE_AVAILABLE: 1
POSTGRES_CONNECTION_IS_DIRECT: 1
LOCAL_EXTENSION_REPO: 'build/release/repository'
run: |
source ./create-postgres-tables.sh
Expand All @@ -123,20 +118,20 @@ jobs:
linux-pgbouncer:
name: Linux PgBouncer (${{ matrix.postgres.name }})
needs: linux-tests
runs-on: ubuntu-latest
runs-on: ${{ github.repository_owner == 'duckdb' && 'namespace-profile-linux-x64' || 'ubuntu-latest' }}

strategy:
matrix:
postgres:
- name: pg-14
version: 14
- name: pg-15
version: 15
- name: pg-18
version: 18

env:
GEN: ninja
CC: 'ccache gcc'
CXX: 'ccache g++'
CC: '/usr/lib/ccache/gcc'
CXX: '/usr/lib/ccache/g++'
CCACHE_DIR: ${{ github.workspace }}/ccache
VCPKG_TARGET_TRIPLET: x64-linux-release
VCPKG_HOST_TRIPLET: x64-linux-release
Expand All @@ -151,13 +146,14 @@ jobs:

- name: Install Dependencies
run: |
echo "set man-db/auto-update false" | sudo debconf-communicate || true
sudo dpkg-reconfigure man-db || true
sudo apt-get update -y -q -o=Dpkg::Use-Pty=0
sudo apt-get install -y -q -o=Dpkg::Use-Pty=0 \
build-essential \
ccache \
cmake \
ninja-build \
pgbouncer
ninja-build

- name: Cache Key
id: cache_key
Expand All @@ -176,20 +172,16 @@ jobs:
- name: Setup vcpkg
uses: lukka/run-vcpkg@v11.1
with:
vcpkgGitCommitId: 84bab45d415d22042bd0b9081aea57f362da3f35
vcpkgGitCommitId: 9e593bb18ea69cc5095e012465dcd675a822ed0d # Release 2026.07.29

- name: Build extension
run: |
make release

- name: Setup Postgres
uses: ikalnytskyi/action-setup-postgres@v8
uses: ikalnytskyi/action-setup-postgres@v9
with:
postgres-version: ${{ matrix.postgres.version }}
username: 'postgres'
password: 'postgres'
database: 'postgres'
port: '5432'
ssl: true

- name: Setup PgBouncer
Expand All @@ -198,18 +190,43 @@ jobs:
openssl req -new -x509 -days 365 -nodes -text -subj "/CN=localhost" \
-out ./pgbouncer/pgbouncer.crt \
-keyout ./pgbouncer/pgbouncer.key
sudo chown -R postgres:postgres ./pgbouncer
sudo cp -p ./pgbouncer/* /etc/pgbouncer/
sudo ls -la /etc/pgbouncer
sudo sed -i 's|^;bardb = host=localhost dbname=bazdb|postgresscanner = host=localhost dbname=postgresscanner|' /etc/pgbouncer/pgbouncer.ini
sudo sed -i 's|^;pool_mode = session|pool_mode = transaction|' /etc/pgbouncer/pgbouncer.ini
sudo sed -i 's|^;max_prepared_statements = 0|max_prepared_statements = 1024|' /etc/pgbouncer/pgbouncer.ini
sudo sed -i 's|^;client_tls_sslmode = disable|client_tls_sslmode = require|' /etc/pgbouncer/pgbouncer.ini
sudo sed -i 's|^;client_tls_key_file =|client_tls_key_file = /etc/pgbouncer/pgbouncer.key|' /etc/pgbouncer/pgbouncer.ini
sudo sed -i 's|^;client_tls_cert_file =|client_tls_cert_file = /etc/pgbouncer/pgbouncer.crt|' /etc/pgbouncer/pgbouncer.ini
echo '"postgres" "postgres"' | sudo tee /etc/pgbouncer/userlist.txt
sudo cat /etc/pgbouncer/pgbouncer.ini
sudo systemctl restart pgbouncer
cat > ./pgbouncer/pgbouncer.ini <<'EOF'
[databases]
postgresscanner = host=localhost port=5432 dbname=postgresscanner

[pgbouncer]
logfile = /var/log/postgresql/pgbouncer.log
listen_addr = localhost
listen_port = 6432
unix_socket_dir =
auth_type = md5
auth_file = /etc/pgbouncer/userlist.txt
pool_mode = transaction
max_prepared_statements = 1024
client_tls_sslmode = require
client_tls_key_file = /etc/pgbouncer/pgbouncer.key
client_tls_cert_file = /etc/pgbouncer/pgbouncer.crt
EOF
echo '"postgres" "postgres"' > ./pgbouncer/userlist.txt
chmod 755 ./pgbouncer
chmod 644 ./pgbouncer/*
ls -la ./pgbouncer
cat ./pgbouncer/pgbouncer.ini
sudo mkdir -p /var/log/postgresql
sudo chmod 777 /var/log/postgresql
docker run -d --name pgbouncer --network host \
-v ${{ github.workspace }}/pgbouncer:/etc/pgbouncer:ro \
-v /var/log/postgresql:/var/log/postgresql \
edoburu/pgbouncer:latest \
/usr/bin/pgbouncer /etc/pgbouncer/pgbouncer.ini
for i in $(seq 1 30); do
if pg_isready -h localhost -p 6432; then
break
fi
sleep 1
done
docker logs pgbouncer
pg_isready -h localhost -p 6432

- name: Setup test data
env:
Expand Down Expand Up @@ -257,7 +274,7 @@ jobs:
linux-sanitized:
name: Linux ${{ matrix.sanitizer.name }} (pg-17)
needs: linux-tests
runs-on: ubuntu-latest
runs-on: ${{ github.repository_owner == 'duckdb' && 'namespace-profile-linux-x64' || 'ubuntu-latest' }}

strategy:
matrix:
Expand All @@ -268,9 +285,9 @@ jobs:
threadsan_enabled: 1

env:
CMAKE_BUILD_PARALLEL_LEVEL: 2
CC: 'ccache gcc'
CXX: 'ccache g++'
GEN: ninja
CC: '/usr/lib/ccache/gcc'
CXX: '/usr/lib/ccache/g++'
CCACHE_DIR: ${{ github.workspace }}/ccache
VCPKG_TARGET_TRIPLET: x64-linux-release
VCPKG_HOST_TRIPLET: x64-linux-release
Expand All @@ -285,6 +302,8 @@ jobs:

- name: Install Dependencies
run: |
echo "set man-db/auto-update false" | sudo debconf-communicate || true
sudo dpkg-reconfigure man-db || true
sudo apt-get update -y -q -o=Dpkg::Use-Pty=0
sudo apt-get install -y -q -o=Dpkg::Use-Pty=0 \
build-essential \
Expand All @@ -310,14 +329,13 @@ jobs:
- name: Setup vcpkg
uses: lukka/run-vcpkg@v11.1
with:
vcpkgGitCommitId: 84bab45d415d22042bd0b9081aea57f362da3f35
vcpkgGitCommitId: 9e593bb18ea69cc5095e012465dcd675a822ed0d # Release 2026.07.29

- name: Build extension
env:
THREADSAN: ${{ matrix.sanitizer.threadsan_enabled }}
run: |
make relassert
cat ./build/relassert/src/CMakeFiles/duckdb.dir/flags.make
cd build
ln -s relassert release

Expand All @@ -328,13 +346,9 @@ jobs:
key: ${{ steps.cache_key.outputs.value }}

- name: Setup Postgres
uses: ikalnytskyi/action-setup-postgres@v8
uses: ikalnytskyi/action-setup-postgres@v9
with:
postgres-version: 17
username: 'postgres'
password: 'postgres'
database: 'postgres'
port: '5432'
ssl: true

- name: Run tests
Expand All @@ -345,6 +359,8 @@ jobs:
PGPASSWORD: postgres
PGSSLMODE: require
POSTGRES_TEST_DATABASE_AVAILABLE: 1
POSTGRES_CONNECTION_IS_DIRECT: 1
SANITIZER_BUILD: 1
LOCAL_EXTENSION_REPO: 'build/relassert/repository'
run: |
source ./create-postgres-tables.sh
Expand Down Expand Up @@ -420,7 +436,7 @@ jobs:
- name: Setup vcpkg
uses: lukka/run-vcpkg@v11.1
with:
vcpkgGitCommitId: 84bab45d415d22042bd0b9081aea57f362da3f35
vcpkgGitCommitId: 9e593bb18ea69cc5095e012465dcd675a822ed0d # Release 2026.07.29

- name: Prepare build tree
shell: bash
Expand All @@ -442,7 +458,7 @@ jobs:
key: ${{ steps.cache_key.outputs.value }}

- name: Setup Postgres
uses: ikalnytskyi/action-setup-postgres@v8
uses: ikalnytskyi/action-setup-postgres@v9
with:
postgres-version: '17'
username: 'postgres'
Expand Down Expand Up @@ -470,6 +486,7 @@ jobs:
PGPASSWORD: postgres
PGSSLMODE: require
POSTGRES_TEST_DATABASE_AVAILABLE: 1
POSTGRES_CONNECTION_IS_DIRECT: 1
LOCAL_EXTENSION_REPO: 'build/release/repository'
shell: bash
run: |
Expand Down
3 changes: 1 addition & 2 deletions .github/workflows/MainDistributionPipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ jobs:
name: Build extension binaries
uses: duckdb/extension-ci-tools/.github/workflows/_extension_distribution.yml@main
with:
duckdb_version: main
ci_tools_version: main
extension_name: postgres_scanner
exclude_archs: 'wasm_mvp;wasm_eh;wasm_threads;windows_amd64_mingw'
Expand All @@ -27,9 +26,9 @@ jobs:
uses: duckdb/extension-ci-tools/.github/workflows/_extension_deploy.yml@main
secrets: inherit
with:
duckdb_version: main
ci_tools_version: main
extension_name: postgres_scanner
exclude_archs: 'wasm_mvp;wasm_eh;wasm_threads;windows_amd64_mingw'
opt_in_archs: 'linux_amd64_musl;linux_arm64_musl;windows_amd64_arm'
deploy_latest: ${{ startsWith(github.ref, 'refs/heads/v') || github.ref == 'refs/heads/main' }}
deploy_versioned: ${{ startsWith(github.ref, 'refs/heads/v') || github.ref == 'refs/heads/main' }}
11 changes: 8 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,12 @@
build
cmake-build-debug
.idea
/.idea
.DS_Store
.vscode
.cache
/.vscode
/.cache
/.local
duckdb_unittest_tempdir
.envrc
docker-compose.yml
/AGENTS.md
/CLAUDE.md
Loading
Loading