-
Notifications
You must be signed in to change notification settings - Fork 78
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
* Get mysql build to run * Enable mysql_fdw by default * Replace Docker container with Docker Compose in acceptance tests This slides in mysql container that is accessible from hydra * Move http ext tests to main acceptance test cases * Always run docker compose down to clean up networks * Rename to `profileName` * Add `mysql_fdw` tests to verify direct connection * Only start all containers for acceptance tests * Remove test docker-compose.yaml * Remove unused import * Bump `github.com/jackc/pgx` to consume bug fixes * Validate mysql_fdw only return one row * Remove vendor * Use text/template * Move `docker compose down` after kill * Expand flags * Fix bug that use `--profile` instead of `--project-name` * Make `http` & `mysql_fdw` ext behavior consistent with `postgres_fdw` * Disable preload * Extensions are not loaded by default (require explicit `CREATE EXTENSION` statements) * Multicorn build * Get spilo build to work with multicorn * Enable multicorn ext for spilo * Add multicorn create foreign table acceptance test * Do not enable `multicorn` ext by default * Tag multicorn2 to v2.4 * Pin s3csv_fdw to the latest commit
- Loading branch information
1 parent
b086d02
commit 92ae91e
Showing
7 changed files
with
203 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 1 addition & 0 deletions
1
files/spilo/postgres-appliance/scripts/multicorn/after-create.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
GRANT USAGE ON FOREIGN DATA WRAPPER multicorn TO admin; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
#syntax=docker/dockerfile:1 | ||
|
||
FROM postgres_base as setup | ||
|
||
ARG MYSQL_FDW_TAG | ||
ARG MULTICORN_TAG | ||
ARG PYTHON_VERSION | ||
ARG S3CSV_FDW_COMMIT | ||
ARG POSTGRES_BASE_VERSION=14 | ||
|
||
RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install gnupg postgresql-common git -y | ||
RUN sh /usr/share/postgresql-common/pgdg/apt.postgresql.org.sh -y | ||
RUN set -eux; \ | ||
export DEBIAN_FRONTEND=noninteractive && \ | ||
apt-get update; \ | ||
apt-get upgrade -y; \ | ||
apt-get install -y \ | ||
postgresql-${POSTGRES_BASE_VERSION} \ | ||
postgresql-server-dev-${POSTGRES_BASE_VERSION} \ | ||
git \ | ||
build-essential \ | ||
libreadline-dev \ | ||
zlib1g-dev \ | ||
wget \ | ||
flex \ | ||
bison \ | ||
libxml2-dev \ | ||
libxslt-dev \ | ||
libssl-dev \ | ||
libxml2-utils \ | ||
xsltproc \ | ||
python${PYTHON_VERSION} \ | ||
python${PYTHON_VERSION}-dev \ | ||
python3-pip | ||
|
||
# Update pip to the latest | ||
RUN wget https://bootstrap.pypa.io/get-pip.py && python3 get-pip.py && rm get-pip.py | ||
|
||
FROM setup as builder | ||
|
||
RUN git clone https://github.com/pgsql-io/multicorn2 && \ | ||
cd multicorn2 && \ | ||
git checkout ${MULTICORN_TAG} && \ | ||
DESTDIR=/pg_ext USE_PGXS=1 make && \ | ||
DESTDIR=/pg_ext USE_PGXS=1 make install | ||
|
||
# install runtime python deps | ||
RUN python3 -m pip install git+https://github.com/eligoenergy/s3csv_fdw.git@${S3CSV_FDW_COMMIT} | ||
|
||
FROM scratch as output | ||
|
||
ARG PYTHON_VERSION | ||
|
||
COPY --from=builder /pg_ext /pg_ext | ||
COPY --from=builder /usr/local/lib/python${PYTHON_VERSION}/dist-packages /python-dist-packages |