Updating the toasted column in encrypted table causes the crash (#82) #244
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
name: postgresql-16-pgdg-package-pgxs | |
on: | |
pull_request: | |
workflow_dispatch: | |
push: | |
branches: [main] | |
jobs: | |
build: | |
name: pg-16-pgdg-package-pgxs-build | |
runs-on: ubuntu-22.04 | |
steps: | |
- name: Remove old postgres | |
run: | | |
sudo apt-get update | |
sudo apt purge postgresql-client-common postgresql-common \ | |
postgresql postgresql* | |
sudo rm -rf /var/lib/postgresql /var/log/postgresql /etc/postgresql \ | |
/usr/lib/postgresql /usr/include/postgresql /usr/share/postgresql \ | |
/etc/postgresql | |
sudo rm -f /usr/bin/pg_config | |
- name: Install dependencies | |
run: | | |
sudo apt-get install -y libreadline6-dev systemtap-sdt-dev wget \ | |
zlib1g-dev libssl-dev libpam0g-dev bison flex libipc-run-perl \ | |
libjson-c-dev libcurl4-openssl-dev | |
sudo /usr/bin/perl -MCPAN -e 'install IPC::RUN' | |
sudo /usr/bin/perl -MCPAN -e 'install Text::Trim' | |
- name: Install PG Distribution Postgresql 16 | |
run: | | |
sudo sh -c 'echo "deb http://apt.postgresql.org/pub/repos/apt \ | |
$(lsb_release -cs)-pgdg main 16" > /etc/apt/sources.list.d/pgdg.list' | |
sudo wget --quiet -O - \ | |
https://www.postgresql.org/media/keys/ACCC4CF8.asc | | |
sudo apt-key add - | |
sudo apt update | |
sudo apt -y install postgresql-16 postgresql-server-dev-16 | |
- name: Clone postgres-tde-ext repository | |
uses: actions/checkout@master | |
with: | |
path: 'src/postgres-tde-ext' | |
- name: Change src owner to postgres | |
run: | | |
sudo chmod o+rx ~ | |
sudo chown -R postgres:postgres src | |
- name: Build postgres-tde-ext | |
run: | | |
sudo -u postgres bash -c './configure' | |
sudo -u postgres bash -c 'make USE_PGXS=1' | |
sudo make USE_PGXS=1 install | |
working-directory: src/postgres-tde-ext | |
- name: Start postgres-tde-ext tests | |
run: | | |
sudo service postgresql stop | |
echo "shared_preload_libraries = 'pg_tde'" | | |
sudo tee -a /etc/postgresql/16/main/postgresql.conf | |
echo "pg_tde.keyringConfigFile = '/tmp/keyring.json'" | | |
sudo tee -a /etc/postgresql/16/main/postgresql.conf | |
cp keyring.json /tmp/keyring.json | |
sudo service postgresql start | |
sudo psql -V | |
sudo -u postgres bash -c 'make installcheck USE_PGXS=1' | |
working-directory: src/postgres-tde-ext | |
- name: Report on test fail | |
uses: actions/upload-artifact@v2 | |
if: ${{ failure() }} | |
with: | |
name: Regressions diff and postgresql log | |
path: | | |
src/postgres-tde-ext/regression.diffs | |
src/postgres-tde-ext/logfile | |
retention-days: 3 | |
- name: Report on test fail 2 | |
if: ${{ failure() }} | |
run: | | |
cat src/postgres-tde-ext/regression.diffs | |
- name: Create release directory | |
run: | | |
sudo mkdir pgtde-pgdg16 | |
sudo mkdir -p pgtde-pgdg16/usr/lib/postgresql/16/lib/ | |
sudo mkdir -p pgtde-pgdg16/share/postgresql/16/extension/ | |
sudo cp /usr/share/postgresql/16/extension/pg_tde* pgtde-pgdg16/share/postgresql/16/extension/ | |
sudo cp /usr/lib/postgresql/16/lib/pg_tde* pgtde-pgdg16/usr/lib/postgresql/16/lib/ | |
- name: Upload tgz | |
uses: actions/upload-artifact@v3 | |
with: | |
name: pg_tde_pgdg16_binary | |
path: pgtde-pgdg16 | |
- name: Create deb | |
run: | | |
sudo mkdir pgtde-pgdg16/DEBIAN | |
sudo sh -c 'echo "Package: pgtde-pgdg16" > pgtde-pgdg16/DEBIAN/control' | |
sudo sh -c 'echo "Version: 0.1" >> pgtde-pgdg16/DEBIAN/control' | |
sudo sh -c 'echo "Architecture: amd64" >> pgtde-pgdg16/DEBIAN/control' | |
sudo sh -c 'echo "Maintainer: Percona" >> pgtde-pgdg16/DEBIAN/control' | |
sudo sh -c 'echo "Description: Experimental pg_tde extension" >> pgtde-pgdg16/DEBIAN/control' | |
sudo dpkg-deb --build --root-owner-group pgtde-pgdg16 | |
- name: Test deb | |
run: | | |
sudo rm -rf /usr/share/postgresql/16/extension/pg_tde* | |
sudo rm -rf /usr/lib/postgresql/16/lib/pg_tde* | |
sudo dpkg -i --debug=7777 pgtde-pgdg16.deb | |
- name: Upload deb | |
uses: actions/upload-artifact@v3 | |
with: | |
name: pg_tde_deb | |
path: pgtde-pgdg16.deb | |
- name: Create tgz | |
run: | | |
cd pgtde-pgdg16 && sudo tar -czvf ../pgtde-pgdg16.tar.gz . | |
- name: Publish release | |
uses: ncipollo/release-action@v1 | |
# Only try and deploy on merged code | |
if: "github.repository == 'Percona-Lab/postgres-tde-ext' && github.ref_name == 'main' && (github.event_name == 'push' || github.event_name == 'schedule')" | |
with: | |
artifacts: "pgtde-pgdg16.tar.gz,pgtde-pgdg16.deb" | |
omitBody: true | |
allowUpdates: true | |
generateReleaseNotes: true | |
makeLatest: true | |
tag: "latest" | |
name: "HEAD" | |
replacesArtifacts: true |