diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md new file mode 100644 index 00000000..6ccb9e18 --- /dev/null +++ b/.github/pull_request_template.md @@ -0,0 +1,3 @@ +PG-0 + +## Description diff --git a/.github/workflows/postgresql-11-build.yml b/.github/workflows/postgresql-11-build.yml deleted file mode 100644 index 8482dc3b..00000000 --- a/.github/workflows/postgresql-11-build.yml +++ /dev/null @@ -1,127 +0,0 @@ -name: postgresql-11-build -on: - pull_request: - push: - branches: - - main - tags: - - '[0-9]+.[0-9]+.[0-9]+*' - -jobs: - build: - name: pg-11-build-test - runs-on: ubuntu-22.04 - steps: - - name: Clone postgres repository - uses: actions/checkout@v4 - with: - repository: 'postgres/postgres' - ref: 'REL_11_STABLE' - - - name: Install dependencies - run: | - sudo apt-get update - sudo apt purge postgresql-client-common postgresql-common \ - postgresql postgresql* - sudo apt-get install -y libreadline6-dev systemtap-sdt-dev \ - zlib1g-dev libssl-dev libpam0g-dev bison flex \ - libipc-run-perl -y docbook-xsl docbook-xsl libxml2 libxml2-utils \ - libxml2-dev libxslt-dev xsltproc libkrb5-dev libldap2-dev \ - libsystemd-dev gettext tcl-dev libperl-dev pkg-config clang-11 \ - llvm-11 llvm-11-dev libselinux1-dev python3-dev uuid-dev liblz4-dev - 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: Create pgsql dir - run: mkdir -p /opt/pgsql - - - name: Build postgres - run: | - export PATH="/opt/pgsql/bin:$PATH" - ./configure '--build=x86_64-linux-gnu' '--prefix=/usr' \ - '--includedir=/usr/include' '--mandir=/usr/share/man' \ - '--infodir=/usr/share/info' '--sysconfdir=/etc' '--enable-nls' \ - '--localstatedir=/var' '--libdir=/usr/lib/x86_64-linux-gnu' \ - 'runstatedir=/run' '--with-icu' '--with-tcl' '--with-perl' \ - '--with-python' '--with-pam' '--with-openssl' '--with-libxml' \ - '--with-libxslt' 'PYTHON=/usr/bin/python3' 'MKDIR_P=/bin/mkdir -p' \ - '--mandir=/usr/share/postgresql/11/man' '--enable-dtrace' \ - '--docdir=/usr/share/doc/postgresql-doc-11' '--enable-debug' \ - '--sysconfdir=/etc/postgresql-common' '--datarootdir=/usr/share' \ - '--datadir=/usr/share/postgresql/11' '--enable-thread-safety' \ - '--bindir=/usr/lib/postgresql/11/bin' '--enable-tap-tests' \ - '--libdir=/usr/lib/x86_64-linux-gnu' '--disable-rpath' \ - '--libexecdir=/usr/lib/postgresql' '--with-uuid=e2fs' \ - '--includedir=/usr/include/postgresql' '--with-gnu-ld' \ - '--with-pgport=5432' '--with-system-tzdata=/usr/share/zoneinfo' \ - '--with-llvm' 'LLVM_CONFIG=/usr/bin/llvm-config-11' \ - 'CLANG=/usr/bin/clang-11' '--with-systemd' '--with-selinux' \ - 'PROVE=/usr/bin/prove' 'TAR=/bin/tar' '--with-gssapi' '--with-ldap' \ - 'LDFLAGS=-Wl,-Bsymbolic-functions -Wl,-z,relro -Wl,-z,now' \ - '--with-includes=/usr/include/mit-krb5' '--with-libs=/usr/lib/mit-krb5' \ - '--with-libs=/usr/lib/x86_64-linux-gnu/mit-krb5' \ - 'build_alias=x86_64-linux-gnu' \ - 'CPPFLAGS=-Wdate-time -D_FORTIFY_SOURCE=2' \ - 'CFLAGS=-g -O2 -fstack-protector-strong -Wformat -Werror=format-security -fno-omit-frame-pointer' \ - 'CXXFLAGS=-g -O2 -fstack-protector-strong -Wformat -Werror=format-security' - make world - sudo make install-world - - - name: Start postgresql cluster - run: | - export PATH="/usr/lib/postgresql/11/bin:$PATH" - sudo cp /usr/lib/postgresql/11/bin/pg_config /usr/bin - initdb -D /opt/pgsql/data - pg_ctl -D /opt/pgsql/data -l logfile start - - - name: Clone pg_stat_monitor repository - uses: actions/checkout@v4 - with: - path: 'src/pg_stat_monitor' - - - name: Build pg_stat_monitor - run: | - make USE_PGXS=1 - sudo make USE_PGXS=1 install - working-directory: src/pg_stat_monitor/ - - - name: Load pg_stat_monitor library and Restart Server - run: | - export PATH="/usr/lib/postgresql/11/bin:$PATH" - pg_ctl -D /opt/pgsql/data -l logfile stop - echo "shared_preload_libraries = 'pg_stat_monitor'" >> \ - /opt/pgsql/data/postgresql.conf - pg_ctl -D /opt/pgsql/data -l logfile start - working-directory: src/pg_stat_monitor - - - name: Start pg_stat_monitor_tests - run: | - make installcheck - working-directory: src/pg_stat_monitor - - - name: Report on pg_stat_monitor test fail - uses: actions/upload-artifact@v4 - if: ${{ failure() }} - with: - name: Regressions diff and postgresql log - path: | - src/pg_stat_monitor/regression.diffs - src/pg_stat_monitor/logfile - retention-days: 1 - - - name: Start Server installcheck-world tests - run: | - make installcheck-world - - - name: Report on installcheck-world test suites fail - uses: actions/upload-artifact@v4 - if: ${{ failure() }} - with: - name: Regressions output files of failed testsuite, and pg log - path: | - **/regression.diffs - **/regression.out - src/pg_stat_monitor/logfile - retention-days: 3 diff --git a/.github/workflows/postgresql-11-pgdg-package.yml b/.github/workflows/postgresql-11-pgdg-package.yml deleted file mode 100644 index 3c2cd73a..00000000 --- a/.github/workflows/postgresql-11-pgdg-package.yml +++ /dev/null @@ -1,70 +0,0 @@ -name: postgresql-11-pgdg-package -on: - pull_request: - push: - branches: - - main - tags: - - '[0-9]+.[0-9]+.[0-9]+*' - -jobs: - build: - name: pg-11-pgdg-package-test - runs-on: ubuntu-22.04 - steps: - - name: Clone pg_stat_monitor repository - uses: actions/checkout@v4 - with: - path: 'src/pg_stat_monitor' - - - name: Delete old postgresql files - 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 PG Distribution Postgresql 11 - run: | - sudo sh -c 'echo "deb http://apt.postgresql.org/pub/repos/apt \ - $(lsb_release -cs)-pgdg main" > /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-get -y update - sudo apt-get -y install postgresql-11 postgresql-server-dev-11 - - - name: Change src owner to postgres - run: | - sudo chmod o+rx ~ - sudo chown -R postgres:postgres src - - - name: Build pg_stat_monitor - run: | - sudo -u postgres bash -c 'make USE_PGXS=1' - sudo make USE_PGXS=1 install - working-directory: src/pg_stat_monitor - - - name: Start pg_stat_monitor_tests - run: | - sudo service postgresql stop - echo "shared_preload_libraries = 'pg_stat_monitor'" | - sudo tee -a /etc/postgresql/11/main/postgresql.conf - sudo service postgresql start - sudo psql -V - export PG_TEST_PORT_DIR=/home/postgres - sudo -u postgres bash -c 'make installcheck USE_PGXS=1' - working-directory: src/pg_stat_monitor - - - name: Report on test fail - uses: actions/upload-artifact@v4 - if: ${{ failure() }} - with: - name: Regressions diff and postgresql log - path: | - src/pg_stat_monitor/regression.diffs - src/pg_stat_monitor/logfile - retention-days: 3 diff --git a/.github/workflows/postgresql-11-ppg-package.yml b/.github/workflows/postgresql-11-ppg-package.yml deleted file mode 100644 index 9a769fb8..00000000 --- a/.github/workflows/postgresql-11-ppg-package.yml +++ /dev/null @@ -1,79 +0,0 @@ -name: postgresql-11-ppg-package -on: - pull_request: - push: - branches: - - main - tags: - - '[0-9]+.[0-9]+.[0-9]+*' - -jobs: - build: - name: pg-11-ppg-package-test - runs-on: ubuntu-22.04 - steps: - - name: Clone pg_stat_monitor repository - uses: actions/checkout@v4 - with: - path: 'src/pg_stat_monitor' - - - name: Install dependencies - run: | - sudo apt-get update - sudo apt purge postgresql-client-common postgresql-common \ - postgresql postgresql* - sudo apt-get install -y libreadline6-dev systemtap-sdt-dev \ - zlib1g-dev libssl-dev libpam0g-dev python3-dev bison flex \ - libipc-run-perl wget - 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 percona-release script - run: | - sudo apt-get -y update - sudo apt-get -y upgrade - sudo apt-get install -y wget gnupg2 curl lsb-release - sudo wget \ - https://repo.percona.com/apt/percona-release_latest.generic_all.deb - sudo dpkg -i percona-release_latest.generic_all.deb - - - name: Install Percona Distribution Postgresql 11 - run: | - sudo percona-release setup ppg-11 - sudo apt-get update -y - sudo apt-get install -y percona-postgresql-11 \ - percona-postgresql-contrib percona-postgresql-server-dev-all - - - name: Change src owner to postgres - run: | - sudo chmod o+rx ~ - sudo chown -R postgres:postgres src - - - name: Build pg_stat_monitor - run: | - sudo -u postgres bash -c 'make USE_PGXS=1' - sudo make USE_PGXS=1 install - working-directory: src/pg_stat_monitor - - - name: Start pg_stat_monitor_tests - run: | - sudo service postgresql stop - echo "shared_preload_libraries = 'pg_stat_monitor'" | - sudo tee -a /etc/postgresql/11/main/postgresql.conf - sudo service postgresql start - sudo psql -V - export PG_TEST_PORT_DIR=/home/postgres - sudo -u postgres bash -c 'make installcheck USE_PGXS=1' - working-directory: src/pg_stat_monitor - - - name: Report on test fail - uses: actions/upload-artifact@v4 - if: ${{ failure() }} - with: - name: Regressions diff and postgresql log - path: | - src/pg_stat_monitor/regression.diffs - src/pg_stat_monitor/logfile - retention-days: 3 diff --git a/.github/workflows/postgresql-12-build.yml b/.github/workflows/postgresql-12-build.yml deleted file mode 100644 index 39afc747..00000000 --- a/.github/workflows/postgresql-12-build.yml +++ /dev/null @@ -1,147 +0,0 @@ -name: postgresql-12-build -on: - pull_request: - push: - branches: - - main - tags: - - '[0-9]+.[0-9]+.[0-9]+*' - -jobs: - build: - name: pg-12-build-test - runs-on: ubuntu-22.04 - steps: - - name: Clone postgres repository - uses: actions/checkout@v4 - with: - repository: 'postgres/postgres' - ref: 'REL_12_STABLE' - - - name: Install dependencies - run: | - sudo apt-get update - sudo apt purge postgresql-client-common postgresql-common \ - postgresql postgresql* - sudo apt-get install -y libreadline6-dev systemtap-sdt-dev \ - zlib1g-dev libssl-dev libpam0g-dev bison flex \ - libipc-run-perl docbook-xsl docbook-xsl libxml2 libxml2-utils \ - libxml2-dev libxslt-dev xsltproc libkrb5-dev libldap2-dev \ - libsystemd-dev gettext tcl-dev libperl-dev pkg-config clang-11 \ - llvm-11 llvm-11-dev libselinux1-dev python3-dev uuid-dev liblz4-dev - 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 - sudo /usr/bin/perl -MCPAN -e 'install IPC::Run' - sudo /usr/bin/perl -MCPAN -e 'install Text::Trim' - - - name: Create pgsql dir - run: mkdir -p /opt/pgsql - - - name: Build postgres - run: | - export PATH="/opt/pgsql/bin:$PATH" - ./configure '--build=x86_64-linux-gnu' '--prefix=/usr' \ - '--includedir=/usr/include' '--mandir=/usr/share/man' \ - '--infodir=/usr/share/info' '--sysconfdir=/etc' '--with-gnu-ld' \ - '--localstatedir=/var' '--libdir=/usr/lib/x86_64-linux-gnu' \ - 'runstatedir=/run' '--with-icu' '--with-tcl' '--with-perl' \ - '--with-python' '--with-pam' '--with-openssl' '--with-libxml' \ - '--with-libxslt' 'PYTHON=/usr/bin/python3' '--enable-tap-tests' \ - '--mandir=/usr/share/postgresql/12/man' '--enable-thread-safety' \ - '--docdir=/usr/share/doc/postgresql-doc-12' '--enable-debug' \ - '--sysconfdir=/etc/postgresql-common' '--datarootdir=/usr/share' \ - '--datadir=/usr/share/postgresql/12' '--enable-dtrace' \ - '--bindir=/usr/lib/postgresql/12/bin' '--disable-rpath' \ - '--libdir=/usr/lib/x86_64-linux-gnu' '--with-pgport=5432' \ - '--libexecdir=/usr/lib/postgresql' '--with-uuid=e2fs' \ - '--includedir=/usr/include/postgresql' 'TAR=/bin/tar' \ - '--with-system-tzdata=/usr/share/zoneinfo' '--with-llvm' \ - 'LLVM_CONFIG=/usr/bin/llvm-config-11' 'CLANG=/usr/bin/clang-11' \ - '--with-systemd' '--with-selinux' 'MKDIR_P=/bin/mkdir -p' \ - 'PROVE=/usr/bin/prove' '--with-gssapi' '--with-ldap' \ - 'LDFLAGS=-Wl,-Bsymbolic-functions -Wl,-z,relro -Wl,-z,now' \ - '--with-includes=/usr/include/mit-krb5' '--with-libs=/usr/lib/mit-krb5' \ - '--with-libs=/usr/lib/x86_64-linux-gnu/mit-krb5' \ - 'build_alias=x86_64-linux-gnu' \ - 'CPPFLAGS=-Wdate-time -D_FORTIFY_SOURCE=2' '--enable-nls' \ - 'CFLAGS=-g -O2 -fstack-protector-strong -Wformat -Werror=format-security -fno-omit-frame-pointer' \ - 'CXXFLAGS=-g -O2 -fstack-protector-strong -Wformat -Werror=format-security' - make world - sudo make install-world - - - name: Start postgresql cluster - run: | - export PATH="/usr/lib/postgresql/12/bin:$PATH" - sudo cp /usr/lib/postgresql/12/bin/pg_config /usr/bin - initdb -D /opt/pgsql/data - pg_ctl -D /opt/pgsql/data -l logfile start - - - name: Clone pg_stat_monitor repository - uses: actions/checkout@v4 - with: - path: 'src/pg_stat_monitor' - - - name: Build pg_stat_monitor - run: | - make USE_PGXS=1 - sudo make USE_PGXS=1 install - working-directory: src/pg_stat_monitor - - - name: Load pg_stat_monitor library and Restart Server - run: | - export PATH="/usr/lib/postgresql/12/bin:$PATH" - pg_ctl -D /opt/pgsql/data -l logfile stop - echo "shared_preload_libraries = 'pg_stat_monitor'" >> \ - /opt/pgsql/data/postgresql.conf - pg_ctl -D /opt/pgsql/data -l logfile start - working-directory: src/pg_stat_monitor - - - name: Start pg_stat_monitor_tests - run: | - make installcheck - working-directory: src/pg_stat_monitor - - - name: Change dir permissions on fail - if: ${{ failure() }} - run: | - sudo chmod -R ugo+rwx t - sudo chmod -R ugo+rwx tmp_check - exit 2 # regenerate error so that we can upload files in next step - working-directory: src/pg_stat_monitor - - - name: Upload logs on fail - if: ${{ failure() }} - uses: actions/upload-artifact@v4 - with: - name: Regressions diff and postgresql log - path: | - src/pg_stat_monitor/regression.diffs - src/pg_stat_monitor/regression.out - src/pg_stat_monitor/logfile - src/pg_stat_monitor/t/results/ - src/pg_stat_monitor/tmp_check/log/ - !src/pg_stat_monitor/tmp_check/**/archives/* - !src/pg_stat_monitor/tmp_check/**/backup/* - !src/pg_stat_monitor/tmp_check/**/pgdata/* - !src/pg_stat_monitor/tmp_check/**/archives/ - !src/pg_stat_monitor/tmp_check/**/backup/ - !src/pg_stat_monitor/tmp_check/**/pgdata/ - if-no-files-found: warn - retention-days: 3 - - - name: Start Server installcheck-world tests - run: | - make installcheck-world - - - name: Report on installcheck-world test suites fail - uses: actions/upload-artifact@v4 - if: ${{ failure() }} - with: - name: Regressions output files of failed testsuite, and pg log - path: | - **/regression.diffs - **/regression.out - src/pg_stat_monitor/logfile - retention-days: 3 diff --git a/.github/workflows/postgresql-12-pgdg-package.yml b/.github/workflows/postgresql-12-pgdg-package.yml deleted file mode 100644 index 82594316..00000000 --- a/.github/workflows/postgresql-12-pgdg-package.yml +++ /dev/null @@ -1,94 +0,0 @@ -name: postgresql-12-pgdg-package -on: - pull_request: - push: - branches: - - main - tags: - - '[0-9]+.[0-9]+.[0-9]+*' - -jobs: - build: - name: pg-12-pgdg-package-test - runs-on: ubuntu-22.04 - steps: - - name: Clone pg_stat_monitor repository - uses: actions/checkout@v4 - with: - path: 'src/pg_stat_monitor' - - - name: Delete old postgresql files - run: | - sudo apt-get update - sudo apt purge postgresql-client-common postgresql-common \ - postgresql postgresql* - sudo apt-get install -y libreadline6-dev systemtap-sdt-dev \ - zlib1g-dev libssl-dev libpam0g-dev python3-dev bison flex \ - libipc-run-perl wget -y - 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 - sudo /usr/bin/perl -MCPAN -e 'install IPC::Run' - sudo /usr/bin/perl -MCPAN -e 'install Text::Trim' - - - name: Install PG Distribution Postgresql 12 - run: | - sudo sh -c 'echo "deb http://apt.postgresql.org/pub/repos/apt \ - $(lsb_release -cs)-pgdg main" > /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-get -y update - sudo apt-get -y install postgresql-12 postgresql-server-dev-12 - - - name: Change src owner to postgres - run: | - sudo chmod o+rx ~ - sudo chown -R postgres:postgres src - - - name: Build pg_stat_monitor - run: | - sudo -u postgres bash -c 'make USE_PGXS=1' - sudo make USE_PGXS=1 install - working-directory: src/pg_stat_monitor - - - name: Start pg_stat_monitor_tests - run: | - sudo service postgresql stop - echo "shared_preload_libraries = 'pg_stat_monitor'" | - sudo tee -a /etc/postgresql/12/main/postgresql.conf - sudo service postgresql start - sudo psql -V - export PG_TEST_PORT_DIR=${GITHUB_WORKSPACE}/src/pg_stat_monitor - echo $PG_TEST_PORT_DIR - sudo -E -u postgres bash -c 'make installcheck USE_PGXS=1' - working-directory: src/pg_stat_monitor - - - name: Change dir permissions on fail - if: ${{ failure() }} - run: | - sudo chmod -R ugo+rwx t - sudo chmod -R ugo+rwx tmp_check - exit 2 # regenerate error so that we can upload files in next step - working-directory: src/pg_stat_monitor - - - name: Upload logs on fail - if: ${{ failure() }} - uses: actions/upload-artifact@v4 - with: - name: Regressions diff and postgresql log - path: | - src/pg_stat_monitor/regression.diffs - src/pg_stat_monitor/regression.out - src/pg_stat_monitor/logfile - src/pg_stat_monitor/t/results/ - src/pg_stat_monitor/tmp_check/log/ - !src/pg_stat_monitor/tmp_check/**/archives/* - !src/pg_stat_monitor/tmp_check/**/backup/* - !src/pg_stat_monitor/tmp_check/**/pgdata/* - !src/pg_stat_monitor/tmp_check/**/archives/ - !src/pg_stat_monitor/tmp_check/**/backup/ - !src/pg_stat_monitor/tmp_check/**/pgdata/ - if-no-files-found: warn - retention-days: 3 diff --git a/.github/workflows/postgresql-12-ppg-package.yml b/.github/workflows/postgresql-12-ppg-package.yml deleted file mode 100644 index eaea69f3..00000000 --- a/.github/workflows/postgresql-12-ppg-package.yml +++ /dev/null @@ -1,110 +0,0 @@ -name: postgresql-12-ppg-package -on: - pull_request: - push: - branches: - - main - tags: - - '[0-9]+.[0-9]+.[0-9]+*' - -jobs: - build: - name: pg-12-ppg-package-test - runs-on: ubuntu-22.04 - steps: - - name: Clone pg_stat_monitor repository - uses: actions/checkout@v4 - with: - path: 'src/pg_stat_monitor' - - - name: Install dependencies - run: | - sudo apt-get update - sudo apt purge postgresql-client-common postgresql-common \ - postgresql postgresql* - sudo apt-get install -y libreadline6-dev systemtap-sdt-dev \ - zlib1g-dev libssl-dev libpam0g-dev python3-dev bison flex \ - libipc-run-perl wget - sudo apt-get install -y libreadline6-dev systemtap-sdt-dev \ - zlib1g-dev libssl-dev libpam0g-dev python3-dev bison flex \ - libipc-run-perl wget - 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 - sudo /usr/bin/perl -MCPAN -e 'install IPC::Run' - sudo /usr/bin/perl -MCPAN -e 'install Text::Trim' - - - name: Install percona-release script - run: | - sudo apt-get -y update - sudo apt-get -y upgrade - sudo apt-get install -y wget gnupg2 curl lsb-release - sudo wget \ - https://repo.percona.com/apt/percona-release_latest.generic_all.deb - sudo dpkg -i percona-release_latest.generic_all.deb - - - name: Install Percona Distribution Postgresql 12 & Extensions - run: | - sudo percona-release setup ppg-12 - sudo apt-get update -y - sudo apt-get install -y percona-postgresql-12 \ - percona-postgresql-contrib percona-postgresql-server-dev-all \ - percona-pgpool2 libpgpool2 percona-postgresql-12-pgaudit \ - percona-postgresql-12-pgaudit-dbgsym percona-postgresql-12-repack \ - percona-postgresql-12-repack-dbgsym percona-pgaudit12-set-user \ - percona-pgaudit12-set-user-dbgsym percona-postgresql-12-postgis-3 \ - percona-postgresql-12-postgis-3-scripts \ - percona-postgresql-postgis-scripts percona-postgresql-postgis \ - percona-postgis - - - name: Change src owner to postgres - run: | - sudo chmod o+rx ~ - sudo chown -R postgres:postgres src - - - name: Build pg_stat_monitor - run: | - sudo -u postgres bash -c 'make USE_PGXS=1' - sudo make USE_PGXS=1 install - working-directory: src/pg_stat_monitor - - - name: Start pg_stat_monitor_tests - run: | - sudo service postgresql stop - echo "shared_preload_libraries = 'pg_stat_monitor'" | - sudo tee -a /etc/postgresql/12/main/postgresql.conf - sudo service postgresql start - sudo psql -V - export PG_TEST_PORT_DIR=${GITHUB_WORKSPACE}/src/pg_stat_monitor - echo $PG_TEST_PORT_DIR - sudo -E -u postgres bash -c 'make installcheck USE_PGXS=1' - working-directory: src/pg_stat_monitor - - - name: Change dir permissions on fail - if: ${{ failure() }} - run: | - sudo chmod -R ugo+rwx t - sudo chmod -R ugo+rwx tmp_check - exit 2 # regenerate error so that we can upload files in next step - working-directory: src/pg_stat_monitor - - - name: Upload logs on fail - if: ${{ failure() }} - uses: actions/upload-artifact@v4 - with: - name: Regressions diff and postgresql log - path: | - src/pg_stat_monitor/regression.diffs - src/pg_stat_monitor/regression.out - src/pg_stat_monitor/logfile - src/pg_stat_monitor/t/results/ - src/pg_stat_monitor/tmp_check/log/ - !src/pg_stat_monitor/tmp_check/**/archives/* - !src/pg_stat_monitor/tmp_check/**/backup/* - !src/pg_stat_monitor/tmp_check/**/pgdata/* - !src/pg_stat_monitor/tmp_check/**/archives/ - !src/pg_stat_monitor/tmp_check/**/backup/ - !src/pg_stat_monitor/tmp_check/**/pgdata/ - if-no-files-found: warn - retention-days: 3 diff --git a/.github/workflows/postgresql-13-build.yml b/.github/workflows/postgresql-13-build.yml deleted file mode 100644 index aab99436..00000000 --- a/.github/workflows/postgresql-13-build.yml +++ /dev/null @@ -1,147 +0,0 @@ -name: postgresql-13-build -on: - pull_request: - push: - branches: - - main - tags: - - '[0-9]+.[0-9]+.[0-9]+*' - -jobs: - build: - name: pg-13-build-test - runs-on: ubuntu-22.04 - steps: - - name: Clone postgres repository - uses: actions/checkout@v4 - with: - repository: 'postgres/postgres' - ref: 'REL_13_STABLE' - - - name: Install dependencies - run: | - sudo apt-get update - sudo apt purge postgresql-client-common postgresql-common \ - postgresql postgresql* - sudo apt-get install -y libreadline6-dev systemtap-sdt-dev \ - zlib1g-dev libssl-dev libpam0g-dev bison flex \ - libipc-run-perl -y docbook-xsl docbook-xsl libxml2 libxml2-utils \ - libxml2-dev libxslt-dev xsltproc libkrb5-dev libldap2-dev \ - libsystemd-dev gettext tcl-dev libperl-dev pkg-config clang-11 \ - llvm-11 llvm-11-dev libselinux1-dev python3-dev uuid-dev liblz4-dev - 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 - sudo /usr/bin/perl -MCPAN -e 'install IPC::Run' - sudo /usr/bin/perl -MCPAN -e 'install Text::Trim' - - - name: Create pgsql dir - run: mkdir -p /opt/pgsql - - - name: Build postgres - run: | - export PATH="/opt/pgsql/bin:$PATH" - ./configure '--build=x86_64-linux-gnu' '--prefix=/usr' \ - '--includedir=${prefix}/include' \ - '--mandir=${prefix}/share/man' '--infodir=${prefix}/share/info' \ - '--sysconfdir=/etc' '--localstatedir=/var' '--with-icu' \ - '--libdir=${prefix}/lib/x86_64-linux-gnu' '--with-perl' \ - '--libexecdir=${prefix}/lib/x86_64-linux-gnu' '--enable-debug' \ - '--with-tcl' '--with-pam' '--with-python' '--with-openssl' \ - '--with-libxml' '--with-libxslt' '--enable-tap-tests' \ - 'PYTHON=/usr/bin/python3' '--mandir=/usr/share/postgresql/13/man' \ - '--docdir=/usr/share/doc/postgresql-doc-13' 'AWK=mawk' \ - '--sysconfdir=/etc/postgresql-common' '--datarootdir=/usr/share' \ - '--datadir=/usr/share/postgresql/13' '--enable-nls' \ - '--bindir=/usr/lib/postgresql/13/bin' '--enable-dtrace' \ - '--libdir=/usr/lib/x86_64-linux-gnu' '--disable-rpath' \ - '--libexecdir=/usr/lib/postgresql' '--enable-thread-safety' \ - '--includedir=/usr/include/postgresql' 'TAR=/bin/tar' \ - '--with-uuid=e2fs' '--with-gnu-ld' 'XSLTPROC=xsltproc --nonet' \ - '--with-pgport=5432' '--with-system-tzdata=/usr/share/zoneinfo' \ - '--with-llvm' 'LLVM_CONFIG=/usr/bin/llvm-config-11' \ - 'CLANG=/usr/bin/clang-11' '--with-systemd' '--with-selinux' \ - 'MKDIR_P=/bin/mkdir -p' 'PROVE=/usr/bin/prove' \ - 'LDFLAGS=-Wl,-Bsymbolic-functions -Wl,-z,relro -Wl,-z,now' \ - '--with-gssapi' '--with-ldap' 'build_alias=x86_64-linux-gnu' \ - 'CPPFLAGS=-Wdate-time -D_FORTIFY_SOURCE=2' \ - 'CFLAGS=-g -O2 -fstack-protector-strong -Wformat -Werror=format-security -fno-omit-frame-pointer' \ - 'CXXFLAGS=-g -O2 -fstack-protector-strong -Wformat -Werror=format-security' - make world - sudo make install-world - - - name: Start postgresql cluster - run: | - export PATH="/usr/lib/postgresql/13/bin:$PATH" - sudo cp /usr/lib/postgresql/13/bin/pg_config /usr/bin - initdb -D /opt/pgsql/data - pg_ctl -D /opt/pgsql/data -l logfile start - - - name: Clone pg_stat_monitor repository - uses: actions/checkout@v4 - with: - path: 'src/pg_stat_monitor' - - - name: Build pg_stat_monitor - run: | - make USE_PGXS=1 - sudo make USE_PGXS=1 install - working-directory: src/pg_stat_monitor - - - name: Load pg_stat_monitor library and Restart Server - run: | - export PATH="/usr/lib/postgresql/13/bin:$PATH" - pg_ctl -D /opt/pgsql/data -l logfile stop - echo "shared_preload_libraries = 'pg_stat_monitor'" >> \ - /opt/pgsql/data/postgresql.conf - pg_ctl -D /opt/pgsql/data -l logfile start - working-directory: src/pg_stat_monitor - - - name: Start pg_stat_monitor_tests - run: | - make installcheck - working-directory: src/pg_stat_monitor - - - name: Change dir permissions on fail - if: ${{ failure() }} - run: | - sudo chmod -R ugo+rwx t - sudo chmod -R ugo+rwx tmp_check - exit 2 # regenerate error so that we can upload files in next step - working-directory: src/pg_stat_monitor - - - name: Upload logs on fail - if: ${{ failure() }} - uses: actions/upload-artifact@v4 - with: - name: Regressions diff and postgresql log - path: | - src/pg_stat_monitor/regression.diffs - src/pg_stat_monitor/regression.out - src/pg_stat_monitor/logfile - src/pg_stat_monitor/t/results/ - src/pg_stat_monitor/tmp_check/log/ - !src/pg_stat_monitor/tmp_check/**/archives/* - !src/pg_stat_monitor/tmp_check/**/backup/* - !src/pg_stat_monitor/tmp_check/**/pgdata/* - !src/pg_stat_monitor/tmp_check/**/archives/ - !src/pg_stat_monitor/tmp_check/**/backup/ - !src/pg_stat_monitor/tmp_check/**/pgdata/ - if-no-files-found: warn - retention-days: 1 - - - name: Start Server installcheck-world tests - run: | - make installcheck-world - - - name: Report on installcheck-world test suites fail - uses: actions/upload-artifact@v4 - if: ${{ failure() }} - with: - name: Regressions output files of failed testsuite, and pg log - path: | - **/regression.diffs - **/regression.out - src/pg_stat_monitor/logfile - retention-days: 3 diff --git a/.github/workflows/postgresql-13-pgdg-package.yml b/.github/workflows/postgresql-13-pgdg-package.yml deleted file mode 100644 index 45ae2849..00000000 --- a/.github/workflows/postgresql-13-pgdg-package.yml +++ /dev/null @@ -1,94 +0,0 @@ -name: postgresql-13-pgdg-package -on: - pull_request: - push: - branches: - - main - tags: - - '[0-9]+.[0-9]+.[0-9]+*' - -jobs: - build: - name: pg-13-pgdg-package-test - runs-on: ubuntu-22.04 - steps: - - name: Clone pg_stat_monitor repository - uses: actions/checkout@v4 - with: - path: 'src/pg_stat_monitor' - - - name: Delete old postgresql files - run: | - sudo apt-get update - sudo apt purge postgresql-client-common postgresql-common \ - postgresql postgresql* - sudo apt-get install -y libreadline6-dev systemtap-sdt-dev \ - zlib1g-dev libssl-dev libpam0g-dev python3-dev bison flex \ - libipc-run-perl wget -y - 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 - sudo /usr/bin/perl -MCPAN -e 'install IPC::Run' - sudo /usr/bin/perl -MCPAN -e 'install Text::Trim' - - - name: Install PG Distribution Postgresql 13 - run: | - sudo sh -c 'echo "deb http://apt.postgresql.org/pub/repos/apt \ - $(lsb_release -cs)-pgdg main" > /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-13 postgresql-server-dev-13 - - - name: Change src owner to postgres - run: | - sudo chmod o+rx ~ - sudo chown -R postgres:postgres src - - - name: Build pg_stat_monitor - run: | - sudo -u postgres bash -c 'make USE_PGXS=1' - sudo make USE_PGXS=1 install - working-directory: src/pg_stat_monitor - - - name: Start pg_stat_monitor_tests - run: | - sudo service postgresql stop - echo "shared_preload_libraries = 'pg_stat_monitor'" | - sudo tee -a /etc/postgresql/13/main/postgresql.conf - sudo service postgresql start - sudo psql -V - export PG_TEST_PORT_DIR=${GITHUB_WORKSPACE}/src/pg_stat_monitor - echo $PG_TEST_PORT_DIR - sudo -E -u postgres bash -c 'make installcheck USE_PGXS=1' - working-directory: src/pg_stat_monitor - - - name: Change dir permissions on fail - if: ${{ failure() }} - run: | - sudo chmod -R ugo+rwx t - sudo chmod -R ugo+rwx tmp_check - exit 2 # regenerate error so that we can upload files in next step - working-directory: src/pg_stat_monitor - - - name: Upload logs on fail - if: ${{ failure() }} - uses: actions/upload-artifact@v4 - with: - name: Regressions diff and postgresql log - path: | - src/pg_stat_monitor/regression.diffs - src/pg_stat_monitor/regression.out - src/pg_stat_monitor/logfile - src/pg_stat_monitor/t/results/ - src/pg_stat_monitor/tmp_check/log/ - !src/pg_stat_monitor/tmp_check/**/archives/* - !src/pg_stat_monitor/tmp_check/**/backup/* - !src/pg_stat_monitor/tmp_check/**/pgdata/* - !src/pg_stat_monitor/tmp_check/**/archives/ - !src/pg_stat_monitor/tmp_check/**/backup/ - !src/pg_stat_monitor/tmp_check/**/pgdata/ - if-no-files-found: warn - retention-days: 3 diff --git a/.github/workflows/postgresql-13-ppg-package.yml b/.github/workflows/postgresql-13-ppg-package.yml deleted file mode 100644 index 03d2a9b0..00000000 --- a/.github/workflows/postgresql-13-ppg-package.yml +++ /dev/null @@ -1,107 +0,0 @@ -name: postgresql-13-ppg-package -on: - pull_request: - push: - branches: - - main - tags: - - '[0-9]+.[0-9]+.[0-9]+*' - -jobs: - build: - name: pg-13-ppg-package-test - runs-on: ubuntu-22.04 - steps: - - name: Clone pg_stat_monitor repository - uses: actions/checkout@v4 - with: - path: 'src/pg_stat_monitor' - - - name: Delete old postgresql files - run: | - sudo apt-get update - sudo apt purge postgresql-client-common postgresql-common \ - postgresql postgresql* - sudo apt-get install -y libreadline6-dev systemtap-sdt-dev \ - zlib1g-dev libssl-dev libpam0g-dev python3-dev bison flex \ - libipc-run-perl wget - 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 - sudo /usr/bin/perl -MCPAN -e 'install IPC::Run' - sudo /usr/bin/perl -MCPAN -e 'install Text::Trim' - - - name: Install percona-release script - run: | - sudo apt-get -y update - sudo apt-get -y upgrade - sudo apt-get install -y wget gnupg2 curl lsb-release - sudo wget \ - https://repo.percona.com/apt/percona-release_latest.generic_all.deb - sudo dpkg -i percona-release_latest.generic_all.deb - - - name: Install Percona Distribution Postgresql 13 & Extensions - run: | - sudo percona-release setup ppg-13 - sudo apt-get update -y - sudo apt-get install -y percona-postgresql-13 \ - percona-postgresql-contrib percona-postgresql-server-dev-all \ - percona-pgpool2 libpgpool2 percona-postgresql-13-pgaudit \ - percona-postgresql-13-pgaudit-dbgsym percona-postgresql-13-repack \ - percona-postgresql-13-repack-dbgsym percona-pgaudit13-set-user \ - percona-pgaudit13-set-user-dbgsym percona-postgresql-13-postgis-3 \ - percona-postgresql-13-postgis-3-scripts \ - percona-postgresql-postgis-scripts percona-postgresql-postgis \ - percona-postgis - - - name: Change src owner to postgres - run: | - sudo chmod o+rx ~ - sudo chown -R postgres:postgres src - - - name: Build pg_stat_monitor - run: | - sudo -u postgres bash -c 'make USE_PGXS=1' - sudo make USE_PGXS=1 install - working-directory: src/pg_stat_monitor - - - name: Start pg_stat_monitor_tests - run: | - sudo service postgresql stop - echo "shared_preload_libraries = 'pg_stat_monitor'" | - sudo tee -a /etc/postgresql/13/main/postgresql.conf - sudo service postgresql start - sudo psql -V - export PG_TEST_PORT_DIR=${GITHUB_WORKSPACE}/src/pg_stat_monitor - echo $PG_TEST_PORT_DIR - sudo -E -u postgres bash -c 'make installcheck USE_PGXS=1' - working-directory: src/pg_stat_monitor - - - name: Change dir permissions on fail - if: ${{ failure() }} - run: | - sudo chmod -R ugo+rwx t - sudo chmod -R ugo+rwx tmp_check - exit 2 # regenerate error so that we can upload files in next step - working-directory: src/pg_stat_monitor - - - name: Upload logs on fail - if: ${{ failure() }} - uses: actions/upload-artifact@v4 - with: - name: Regressions diff and postgresql log - path: | - src/pg_stat_monitor/regression.diffs - src/pg_stat_monitor/regression.out - src/pg_stat_monitor/logfile - src/pg_stat_monitor/t/results/ - src/pg_stat_monitor/tmp_check/log/ - !src/pg_stat_monitor/tmp_check/**/archives/* - !src/pg_stat_monitor/tmp_check/**/backup/* - !src/pg_stat_monitor/tmp_check/**/pgdata/* - !src/pg_stat_monitor/tmp_check/**/archives/ - !src/pg_stat_monitor/tmp_check/**/backup/ - !src/pg_stat_monitor/tmp_check/**/pgdata/ - if-no-files-found: warn - retention-days: 3 diff --git a/.github/workflows/postgresql-14-build.yml b/.github/workflows/postgresql-14-build.yml deleted file mode 100644 index cfecc54c..00000000 --- a/.github/workflows/postgresql-14-build.yml +++ /dev/null @@ -1,147 +0,0 @@ -name: postgresql-14-build -on: - pull_request: - push: - branches: - - main - tags: - - '[0-9]+.[0-9]+.[0-9]+*' - -jobs: - build: - name: pg-14-build-test - runs-on: ubuntu-22.04 - steps: - - name: Clone postgres repository - uses: actions/checkout@v4 - with: - repository: 'postgres/postgres' - ref: 'REL_14_STABLE' - - - name: Install dependencies - run: | - sudo apt-get update - sudo apt purge postgresql-client-common postgresql-common \ - postgresql postgresql* - sudo apt-get install -y libreadline6-dev systemtap-sdt-dev \ - zlib1g-dev libssl-dev libpam0g-dev bison flex \ - libipc-run-perl -y docbook-xsl docbook-xsl libxml2 libxml2-utils \ - libxml2-dev libxslt-dev xsltproc libkrb5-dev libldap2-dev \ - libsystemd-dev gettext tcl-dev libperl-dev pkg-config clang-11 \ - llvm-11 llvm-11-dev libselinux1-dev python3-dev \ - uuid-dev liblz4-dev - 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 - sudo /usr/bin/perl -MCPAN -e 'install IPC::Run' - sudo /usr/bin/perl -MCPAN -e 'install Text::Trim' - - - name: Create pgsql dir - run: mkdir -p /opt/pgsql - - - name: Build postgres - run: | - export PATH="/opt/pgsql/bin:$PATH" - ./configure '--build=x86_64-linux-gnu' '--prefix=/usr' \ - '--includedir=${prefix}/include' '--mandir=${prefix}/share/man' \ - '--infodir=${prefix}/share/info' '--sysconfdir=/etc' \ - '--localstatedir=/var' '--libdir=${prefix}/lib/x86_64-linux-gnu' \ - '--libexecdir=${prefix}/lib/x86_64-linux-gnu' '--with-icu' \ - '--with-tcl' '--with-perl' '--with-python' '--with-pam' \ - '--with-openssl' '--with-libxml' '--with-libxslt' '--with-ldap' \ - 'PYTHON=/usr/bin/python3' '--mandir=/usr/share/postgresql/14/man' \ - '--docdir=/usr/share/doc/postgresql-doc-14' '--with-pgport=5432' \ - '--sysconfdir=/etc/postgresql-common' '--datarootdir=/usr/share' \ - '--datadir=/usr/share/postgresql/14' '--with-uuid=e2fs' \ - '--bindir=/usr/lib/postgresql/14/bin' '--enable-tap-tests' \ - '--libdir=/usr/lib/x86_64-linux-gnu' '--enable-debug' \ - '--libexecdir=/usr/lib/postgresql' '--with-gnu-ld' \ - '--includedir=/usr/include/postgresql' '--enable-dtrace' \ - '--enable-nls' '--enable-thread-safety' '--disable-rpath' \ - '--with-system-tzdata=/usr/share/zoneinfo' '--with-llvm' \ - 'LLVM_CONFIG=/usr/bin/llvm-config-11' 'CLANG=/usr/bin/clang-11' \ - '--with-systemd' '--with-selinux' 'MKDIR_P=/bin/mkdir -p' \ - 'PROVE=/usr/bin/prove' 'TAR=/bin/tar' 'XSLTPROC=xsltproc --nonet' \ - 'LDFLAGS=-Wl,-Bsymbolic-functions -Wl,-z,relro -Wl,-z,now' \ - 'build_alias=x86_64-linux-gnu' '--with-gssapi' \ - 'CPPFLAGS=-Wdate-time -D_FORTIFY_SOURCE=2' \ - 'CFLAGS=-g -O2 -fstack-protector-strong -Wformat -Werror=format-security -fno-omit-frame-pointer' \ - 'CXXFLAGS=-g -O2 -fstack-protector-strong -Wformat -Werror=format-security' - make world - sudo make install-world - - - name: Start postgresql cluster - run: | - export PATH="/usr/lib/postgresql/14/bin:$PATH" - sudo cp /usr/lib/postgresql/14/bin/pg_config /usr/bin - initdb -D /opt/pgsql/data - pg_ctl -D /opt/pgsql/data -l logfile start - - - name: Clone pg_stat_monitor repository - uses: actions/checkout@v4 - with: - path: 'src/pg_stat_monitor' - - - name: Build pg_stat_monitor - run: | - make USE_PGXS=1 - sudo make USE_PGXS=1 install - working-directory: src/pg_stat_monitor - - - name: Configure and Restart Server - run: | - export PATH="/usr/lib/postgresql/14/bin:$PATH" - pg_ctl -D /opt/pgsql/data -l logfile stop - echo "shared_preload_libraries = 'pg_stat_monitor'" >> \ - /opt/pgsql/data/postgresql.conf - echo "compute_query_id = regress" >> /opt/pgsql/data/postgresql.conf - pg_ctl -D /opt/pgsql/data -l logfile start - working-directory: src/pg_stat_monitor - - - name: Start pg_stat_monitor_tests - run: | - make installcheck - working-directory: src/pg_stat_monitor/ - - - name: Change dir permissions on fail - if: ${{ failure() }} - run: | - sudo chmod -R ugo+rwx t - sudo chmod -R ugo+rwx tmp_check - exit 2 # regenerate error so that we can upload files in next step - working-directory: src/pg_stat_monitor - - - name: Upload logs on fail - if: ${{ failure() }} - uses: actions/upload-artifact@v4 - with: - name: Regressions diff and postgresql log - path: | - src/pg_stat_monitor/regression.diffs - src/pg_stat_monitor/regression.out - src/pg_stat_monitor/logfile - src/pg_stat_monitor/t/results/ - src/pg_stat_monitor/tmp_check/log/ - !src/pg_stat_monitor/tmp_check/**/archives/* - !src/pg_stat_monitor/tmp_check/**/backup/* - !src/pg_stat_monitor/tmp_check/**/pgdata/* - !src/pg_stat_monitor/tmp_check/**/archives/ - !src/pg_stat_monitor/tmp_check/**/backup/ - !src/pg_stat_monitor/tmp_check/**/pgdata/ - if-no-files-found: warn - retention-days: 3 - - - name: Start Server installcheck-world tests - run: make installcheck-world - - - name: Report on installcheck-world test suites fail - uses: actions/upload-artifact@v4 - if: ${{ failure() }} - with: - name: Regressions output files of failed testsuite, and pg log - path: | - **/regression.diffs - **/regression.out - src/pg_stat_monitor/logfile - retention-days: 3 diff --git a/.github/workflows/postgresql-14-pgdg-package.yml b/.github/workflows/postgresql-14-pgdg-package.yml deleted file mode 100644 index 8ddbe5da..00000000 --- a/.github/workflows/postgresql-14-pgdg-package.yml +++ /dev/null @@ -1,93 +0,0 @@ -name: postgresql-14-pgdg-package -on: - pull_request: - push: - branches: - - main - tags: - - '[0-9]+.[0-9]+.[0-9]+*' - -jobs: - build: - name: pg-14-pgdg-package-test - runs-on: ubuntu-22.04 - steps: - - name: Clone pg_stat_monitor repository - uses: actions/checkout@v4 - with: - path: 'src/pg_stat_monitor' - - - name: Delete old postgresql files - run: | - sudo apt-get update - sudo apt purge postgresql-client-common postgresql-common \ - postgresql postgresql* - sudo apt-get install -y libreadline6-dev systemtap-sdt-dev wget \ - zlib1g-dev libssl-dev libpam0g-dev bison flex libipc-run-perl - 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 - sudo /usr/bin/perl -MCPAN -e 'install IPC::Run' - sudo /usr/bin/perl -MCPAN -e 'install Text::Trim' - - - name: Install PG Distribution Postgresql 14 - run: | - sudo sh -c 'echo "deb http://apt.postgresql.org/pub/repos/apt \ - $(lsb_release -cs)-pgdg main" > /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-14 postgresql-server-dev-14 - - - name: Change src owner to postgres - run: | - sudo chmod o+rx ~ - sudo chown -R postgres:postgres src - - - name: Build pg_stat_monitor - run: | - sudo -u postgres bash -c 'make USE_PGXS=1' - sudo make USE_PGXS=1 install - working-directory: src/pg_stat_monitor - - - name: Start pg_stat_monitor_tests - run: | - sudo service postgresql stop - echo "shared_preload_libraries = 'pg_stat_monitor'" | - sudo tee -a /etc/postgresql/14/main/postgresql.conf - sudo service postgresql start - sudo psql -V - export PG_TEST_PORT_DIR=${GITHUB_WORKSPACE}/src/pg_stat_monitor - echo $PG_TEST_PORT_DIR - sudo -E -u postgres bash -c 'make installcheck USE_PGXS=1' - working-directory: src/pg_stat_monitor - - - name: Change dir permissions on fail - if: ${{ failure() }} - run: | - sudo chmod -R ugo+rwx t - sudo chmod -R ugo+rwx tmp_check - exit 2 # regenerate error so that we can upload files in next step - working-directory: src/pg_stat_monitor - - - name: Upload logs on fail - if: ${{ failure() }} - uses: actions/upload-artifact@v4 - with: - name: Regressions diff and postgresql log - path: | - src/pg_stat_monitor/regression.diffs - src/pg_stat_monitor/regression.out - src/pg_stat_monitor/logfile - src/pg_stat_monitor/t/results/ - src/pg_stat_monitor/tmp_check/log/ - !src/pg_stat_monitor/tmp_check/**/archives/* - !src/pg_stat_monitor/tmp_check/**/backup/* - !src/pg_stat_monitor/tmp_check/**/pgdata/* - !src/pg_stat_monitor/tmp_check/**/archives/ - !src/pg_stat_monitor/tmp_check/**/backup/ - !src/pg_stat_monitor/tmp_check/**/pgdata/ - if-no-files-found: warn - retention-days: 3 diff --git a/.github/workflows/postgresql-14-ppg-package.yml b/.github/workflows/postgresql-14-ppg-package.yml deleted file mode 100644 index 6253bead..00000000 --- a/.github/workflows/postgresql-14-ppg-package.yml +++ /dev/null @@ -1,107 +0,0 @@ -name: postgresql-14-ppg-package -on: - pull_request: - push: - branches: - - main - tags: - - '[0-9]+.[0-9]+.[0-9]+*' - -jobs: - build: - name: pg-14-ppg-package-test - runs-on: ubuntu-22.04 - steps: - - name: Clone pg_stat_monitor repository - uses: actions/checkout@v4 - with: - path: 'src/pg_stat_monitor' - - - name: Delete old postgresql files - run: | - sudo apt-get update - sudo apt purge postgresql-client-common postgresql-common \ - postgresql postgresql* - sudo apt-get install -y libreadline6-dev systemtap-sdt-dev \ - zlib1g-dev libssl-dev libpam0g-dev python3-dev bison flex \ - libipc-run-perl wget - 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 - sudo /usr/bin/perl -MCPAN -e 'install IPC::Run' - sudo /usr/bin/perl -MCPAN -e 'install Text::Trim' - - - name: Install percona-release script - run: | - sudo apt-get -y update - sudo apt-get -y upgrade - sudo apt-get install -y wget gnupg2 curl lsb-release - sudo wget \ - https://repo.percona.com/apt/percona-release_latest.generic_all.deb - sudo dpkg -i percona-release_latest.generic_all.deb - - - name: Install Percona Distribution Postgresql 14 & Extensions - run: | - sudo percona-release setup ppg-14 - sudo apt-get update -y - sudo apt-get install -y percona-postgresql-14 \ - percona-postgresql-contrib percona-postgresql-server-dev-all \ - percona-pgpool2 libpgpool2 percona-postgresql-14-pgaudit \ - percona-postgresql-14-pgaudit-dbgsym percona-postgresql-14-repack \ - percona-postgresql-14-repack-dbgsym percona-pgaudit14-set-user \ - percona-pgaudit14-set-user-dbgsym percona-postgresql-14-postgis-3 \ - percona-postgresql-14-postgis-3-scripts \ - percona-postgresql-postgis-scripts percona-postgresql-postgis \ - percona-postgis - - - name: Change src owner to postgres - run: | - sudo chmod o+rx ~ - sudo chown -R postgres:postgres src - - - name: Build pg_stat_monitor - run: | - sudo -u postgres bash -c 'make USE_PGXS=1' - sudo make USE_PGXS=1 install - working-directory: src/pg_stat_monitor - - - name: Start pg_stat_monitor_tests - run: | - sudo service postgresql stop - echo "shared_preload_libraries = 'pg_stat_monitor'" | - sudo tee -a /etc/postgresql/14/main/postgresql.conf - sudo service postgresql start - sudo psql -V - export PG_TEST_PORT_DIR=${GITHUB_WORKSPACE}/src/pg_stat_monitor - echo $PG_TEST_PORT_DIR - sudo -E -u postgres bash -c 'make installcheck USE_PGXS=1' - working-directory: src/pg_stat_monitor - - - name: Change dir permissions on fail - if: ${{ failure() }} - run: | - sudo chmod -R ugo+rwx t - sudo chmod -R ugo+rwx tmp_check - exit 2 # regenerate error so that we can upload files in next step - working-directory: src/pg_stat_monitor - - - name: Upload logs on fail - if: ${{ failure() }} - uses: actions/upload-artifact@v4 - with: - name: Regressions diff and postgresql log - path: | - src/pg_stat_monitor/regression.diffs - src/pg_stat_monitor/regression.out - src/pg_stat_monitor/logfile - src/pg_stat_monitor/t/results/ - src/pg_stat_monitor/tmp_check/log/ - !src/pg_stat_monitor/tmp_check/**/archives/* - !src/pg_stat_monitor/tmp_check/**/backup/* - !src/pg_stat_monitor/tmp_check/**/pgdata/* - !src/pg_stat_monitor/tmp_check/**/archives/ - !src/pg_stat_monitor/tmp_check/**/backup/ - !src/pg_stat_monitor/tmp_check/**/pgdata/ - if-no-files-found: warn - retention-days: 3 diff --git a/.github/workflows/postgresql-15-build.yml b/.github/workflows/postgresql-15-build.yml deleted file mode 100644 index b5f424d3..00000000 --- a/.github/workflows/postgresql-15-build.yml +++ /dev/null @@ -1,147 +0,0 @@ -name: postgresql-15-build -on: - pull_request: - push: - branches: - - main - tags: - - '[0-9]+.[0-9]+.[0-9]+*' - -jobs: - build: - name: pg-15-build-test - runs-on: ubuntu-22.04 - steps: - - name: Clone postgres repository - uses: actions/checkout@v4 - with: - repository: 'postgres/postgres' - ref: 'REL_15_STABLE' - - - name: Install dependencies - run: | - sudo apt-get update - sudo apt purge postgresql-client-common postgresql-common \ - postgresql postgresql* - sudo apt-get install -y libreadline6-dev systemtap-sdt-dev \ - zlib1g-dev libssl-dev libpam0g-dev bison flex \ - libipc-run-perl -y docbook-xsl docbook-xsl libxml2 libxml2-utils \ - libxml2-dev libxslt-dev xsltproc libkrb5-dev libldap2-dev \ - libsystemd-dev gettext tcl-dev libperl-dev pkg-config clang-11 \ - llvm-11 llvm-11-dev libselinux1-dev python3-dev \ - uuid-dev liblz4-dev - 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 - sudo /usr/bin/perl -MCPAN -e 'install IPC::Run' - sudo /usr/bin/perl -MCPAN -e 'install Text::Trim' - - - name: Create pgsql dir - run: mkdir -p /opt/pgsql - - - name: Build postgres - run: | - export PATH="/opt/pgsql/bin:$PATH" - ./configure '--build=x86_64-linux-gnu' '--prefix=/usr' \ - '--includedir=${prefix}/include' '--mandir=${prefix}/share/man' \ - '--infodir=${prefix}/share/info' '--sysconfdir=/etc' \ - '--localstatedir=/var' '--libdir=${prefix}/lib/x86_64-linux-gnu' \ - '--libexecdir=${prefix}/lib/x86_64-linux-gnu' '--with-icu' \ - '--with-tcl' '--with-perl' '--with-python' '--with-pam' \ - '--with-openssl' '--with-libxml' '--with-libxslt' '--with-ldap' \ - 'PYTHON=/usr/bin/python3' '--mandir=/usr/share/postgresql/15/man' \ - '--docdir=/usr/share/doc/postgresql-doc-15' '--with-pgport=5432' \ - '--sysconfdir=/etc/postgresql-common' '--datarootdir=/usr/share' \ - '--datadir=/usr/share/postgresql/15' '--with-uuid=e2fs' \ - '--bindir=/usr/lib/postgresql/15/bin' '--enable-tap-tests' \ - '--libdir=/usr/lib/x86_64-linux-gnu' '--enable-debug' \ - '--libexecdir=/usr/lib/postgresql' '--with-gnu-ld' \ - '--includedir=/usr/include/postgresql' '--enable-dtrace' \ - '--enable-nls' '--enable-thread-safety' '--disable-rpath' \ - '--with-system-tzdata=/usr/share/zoneinfo' '--with-llvm' \ - 'LLVM_CONFIG=/usr/bin/llvm-config-11' 'CLANG=/usr/bin/clang-11' \ - '--with-systemd' '--with-selinux' 'MKDIR_P=/bin/mkdir -p' \ - 'PROVE=/usr/bin/prove' 'TAR=/bin/tar' 'XSLTPROC=xsltproc --nonet' \ - 'LDFLAGS=-Wl,-Bsymbolic-functions -Wl,-z,relro -Wl,-z,now' \ - 'build_alias=x86_64-linux-gnu' '--with-gssapi' \ - 'CPPFLAGS=-Wdate-time -D_FORTIFY_SOURCE=2' \ - 'CFLAGS=-g -O2 -fstack-protector-strong -Wformat -Werror=format-security -fno-omit-frame-pointer' \ - 'CXXFLAGS=-g -O2 -fstack-protector-strong -Wformat -Werror=format-security' - make world - sudo make install-world - - - name: Start postgresql cluster - run: | - export PATH="/usr/lib/postgresql/15/bin:$PATH" - sudo cp /usr/lib/postgresql/15/bin/pg_config /usr/bin - initdb -D /opt/pgsql/data - pg_ctl -D /opt/pgsql/data -l logfile start - - - name: Clone pg_stat_monitor repository - uses: actions/checkout@v4 - with: - path: 'src/pg_stat_monitor' - - - name: Build pg_stat_monitor - run: | - make USE_PGXS=1 - sudo make USE_PGXS=1 install - working-directory: src/pg_stat_monitor - - - name: Configure and Restart Server - run: | - export PATH="/usr/lib/postgresql/15/bin:$PATH" - pg_ctl -D /opt/pgsql/data -l logfile stop - echo "shared_preload_libraries = 'pg_stat_monitor'" >> \ - /opt/pgsql/data/postgresql.conf - echo "compute_query_id = regress" >> /opt/pgsql/data/postgresql.conf - pg_ctl -D /opt/pgsql/data -l logfile start - working-directory: src/pg_stat_monitor - - - name: Start pg_stat_monitor_tests - run: | - make installcheck - working-directory: src/pg_stat_monitor/ - - - name: Change dir permissions on fail - if: ${{ failure() }} - run: | - sudo chmod -R ugo+rwx t - sudo chmod -R ugo+rwx tmp_check - exit 2 # regenerate error so that we can upload files in next step - working-directory: src/pg_stat_monitor - - - name: Upload logs on fail - if: ${{ failure() }} - uses: actions/upload-artifact@v4 - with: - name: Regressions diff and postgresql log - path: | - src/pg_stat_monitor/regression.diffs - src/pg_stat_monitor/regression.out - src/pg_stat_monitor/logfile - src/pg_stat_monitor/t/results/ - src/pg_stat_monitor/tmp_check/log/ - !src/pg_stat_monitor/tmp_check/**/archives/* - !src/pg_stat_monitor/tmp_check/**/backup/* - !src/pg_stat_monitor/tmp_check/**/pgdata/* - !src/pg_stat_monitor/tmp_check/**/archives/ - !src/pg_stat_monitor/tmp_check/**/backup/ - !src/pg_stat_monitor/tmp_check/**/pgdata/ - if-no-files-found: warn - retention-days: 3 - - - name: Start Server installcheck-world tests - run: make installcheck-world - - - name: Report on installcheck-world test suites fail - uses: actions/upload-artifact@v4 - if: ${{ failure() }} - with: - name: Regressions output files of failed testsuite, and pg log - path: | - **/regression.diffs - **/regression.out - src/pg_stat_monitor/logfile - retention-days: 3 diff --git a/.github/workflows/postgresql-15-pgdg-package.yml b/.github/workflows/postgresql-15-pgdg-package.yml deleted file mode 100644 index 27f391ae..00000000 --- a/.github/workflows/postgresql-15-pgdg-package.yml +++ /dev/null @@ -1,93 +0,0 @@ -name: postgresql-15-pgdg-package -on: - pull_request: - push: - branches: - - main - tags: - - '[0-9]+.[0-9]+.[0-9]+*' - -jobs: - build: - name: pg-15-pgdg-package-test - runs-on: ubuntu-22.04 - steps: - - name: Clone pg_stat_monitor repository - uses: actions/checkout@v4 - with: - path: 'src/pg_stat_monitor' - - - name: Delete old postgresql files - run: | - sudo apt-get update - sudo apt purge postgresql-client-common postgresql-common \ - postgresql postgresql* - sudo apt-get install -y libreadline6-dev systemtap-sdt-dev wget \ - zlib1g-dev libssl-dev libpam0g-dev bison flex libipc-run-perl - 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 - sudo /usr/bin/perl -MCPAN -e 'install IPC::Run' - sudo /usr/bin/perl -MCPAN -e 'install Text::Trim' - - - name: Install PG Distribution Postgresql 15 - run: | - sudo sh -c 'echo "deb http://apt.postgresql.org/pub/repos/apt \ - $(lsb_release -cs)-pgdg main" > /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-15 postgresql-server-dev-15 - - - name: Change src owner to postgres - run: | - sudo chmod o+rx ~ - sudo chown -R postgres:postgres src - - - name: Build pg_stat_monitor - run: | - sudo -u postgres bash -c 'make USE_PGXS=1' - sudo make USE_PGXS=1 install - working-directory: src/pg_stat_monitor - - - name: Start pg_stat_monitor_tests - run: | - sudo service postgresql stop - echo "shared_preload_libraries = 'pg_stat_monitor'" | - sudo tee -a /etc/postgresql/15/main/postgresql.conf - sudo service postgresql start - sudo psql -V - export PG_TEST_PORT_DIR=${GITHUB_WORKSPACE}/src/pg_stat_monitor - echo $PG_TEST_PORT_DIR - sudo -E -u postgres bash -c 'make installcheck USE_PGXS=1' - working-directory: src/pg_stat_monitor - - - name: Change dir permissions on fail - if: ${{ failure() }} - run: | - sudo chmod -R ugo+rwx t - sudo chmod -R ugo+rwx tmp_check - exit 2 # regenerate error so that we can upload files in next step - working-directory: src/pg_stat_monitor - - - name: Upload logs on fail - if: ${{ failure() }} - uses: actions/upload-artifact@v4 - with: - name: Regressions diff and postgresql log - path: | - src/pg_stat_monitor/regression.diffs - src/pg_stat_monitor/regression.out - src/pg_stat_monitor/logfile - src/pg_stat_monitor/t/results/ - src/pg_stat_monitor/tmp_check/log/ - !src/pg_stat_monitor/tmp_check/**/archives/* - !src/pg_stat_monitor/tmp_check/**/backup/* - !src/pg_stat_monitor/tmp_check/**/pgdata/* - !src/pg_stat_monitor/tmp_check/**/archives/ - !src/pg_stat_monitor/tmp_check/**/backup/ - !src/pg_stat_monitor/tmp_check/**/pgdata/ - if-no-files-found: warn - retention-days: 3 diff --git a/.github/workflows/postgresql-15-ppg-package.yml b/.github/workflows/postgresql-15-ppg-package.yml deleted file mode 100644 index 55ae03ef..00000000 --- a/.github/workflows/postgresql-15-ppg-package.yml +++ /dev/null @@ -1,107 +0,0 @@ -name: postgresql-15-ppg-package -on: - pull_request: - push: - branches: - - main - tags: - - '[0-9]+.[0-9]+.[0-9]+*' - -jobs: - build: - name: pg-15-ppg-package-test - runs-on: ubuntu-22.04 - steps: - - name: Clone pg_stat_monitor repository - uses: actions/checkout@v4 - with: - path: 'src/pg_stat_monitor' - - - name: Delete old postgresql files - run: | - sudo apt-get update - sudo apt purge postgresql-client-common postgresql-common \ - postgresql postgresql* - sudo apt-get install -y libreadline6-dev systemtap-sdt-dev \ - zlib1g-dev libssl-dev libpam0g-dev python3-dev bison flex \ - libipc-run-perl wget - 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 - sudo /usr/bin/perl -MCPAN -e 'install IPC::Run' - sudo /usr/bin/perl -MCPAN -e 'install Text::Trim' - - - name: Install percona-release script - run: | - sudo apt-get -y update - sudo apt-get -y upgrade - sudo apt-get install -y wget gnupg2 curl lsb-release - sudo wget \ - https://repo.percona.com/apt/percona-release_latest.generic_all.deb - sudo dpkg -i percona-release_latest.generic_all.deb - - - name: Install Percona Distribution Postgresql 15 & Extensions - run: | - sudo percona-release setup ppg-15 - sudo apt-get update -y - sudo apt-get install -y percona-postgresql-15 \ - percona-postgresql-contrib percona-postgresql-server-dev-all \ - percona-pgpool2 libpgpool2 percona-postgresql-15-pgaudit \ - percona-postgresql-15-pgaudit-dbgsym percona-postgresql-15-repack \ - percona-postgresql-15-repack-dbgsym percona-pgaudit15-set-user \ - percona-pgaudit15-set-user-dbgsym percona-postgresql-15-postgis-3 \ - percona-postgresql-15-postgis-3-scripts \ - percona-postgresql-postgis-scripts percona-postgresql-postgis \ - percona-postgis - - - name: Change src owner to postgres - run: | - sudo chmod o+rx ~ - sudo chown -R postgres:postgres src - - - name: Build pg_stat_monitor - run: | - sudo -u postgres bash -c 'make USE_PGXS=1' - sudo make USE_PGXS=1 install - working-directory: src/pg_stat_monitor - - - name: Start pg_stat_monitor_tests - run: | - sudo service postgresql stop - echo "shared_preload_libraries = 'pg_stat_monitor'" | - sudo tee -a /etc/postgresql/15/main/postgresql.conf - sudo service postgresql start - sudo psql -V - export PG_TEST_PORT_DIR=${GITHUB_WORKSPACE}/src/pg_stat_monitor - echo $PG_TEST_PORT_DIR - sudo -E -u postgres bash -c 'make installcheck USE_PGXS=1' - working-directory: src/pg_stat_monitor - - - name: Change dir permissions on fail - if: ${{ failure() }} - run: | - sudo chmod -R ugo+rwx t - sudo chmod -R ugo+rwx tmp_check - exit 2 # regenerate error so that we can upload files in next step - working-directory: src/pg_stat_monitor - - - name: Upload logs on fail - if: ${{ failure() }} - uses: actions/upload-artifact@v4 - with: - name: Regressions diff and postgresql log - path: | - src/pg_stat_monitor/regression.diffs - src/pg_stat_monitor/regression.out - src/pg_stat_monitor/logfile - src/pg_stat_monitor/t/results/ - src/pg_stat_monitor/tmp_check/log/ - !src/pg_stat_monitor/tmp_check/**/archives/* - !src/pg_stat_monitor/tmp_check/**/backup/* - !src/pg_stat_monitor/tmp_check/**/pgdata/* - !src/pg_stat_monitor/tmp_check/**/archives/ - !src/pg_stat_monitor/tmp_check/**/backup/ - !src/pg_stat_monitor/tmp_check/**/pgdata/ - if-no-files-found: warn - retention-days: 3 diff --git a/.github/workflows/postgresql-16-build.yml b/.github/workflows/postgresql-16-build.yml deleted file mode 100644 index 9a9f3c3f..00000000 --- a/.github/workflows/postgresql-16-build.yml +++ /dev/null @@ -1,147 +0,0 @@ -name: postgresql-16-build -on: - pull_request: - push: - branches: - - main - tags: - - '[0-9]+.[0-9]+.[0-9]+*' - -jobs: - build: - name: pg-16-build-test - runs-on: ubuntu-22.04 - steps: - - name: Clone postgres repository - uses: actions/checkout@v4 - with: - repository: 'postgres/postgres' - ref: 'REL_16_STABLE' - - - name: Install dependencies - run: | - sudo apt-get update - sudo apt purge postgresql-client-common postgresql-common \ - postgresql postgresql* - sudo apt-get install -y libreadline6-dev systemtap-sdt-dev \ - zlib1g-dev libssl-dev libpam0g-dev bison flex \ - libipc-run-perl -y docbook-xsl docbook-xsl libxml2 libxml2-utils \ - libxml2-dev libxslt-dev xsltproc libkrb5-dev libldap2-dev \ - libsystemd-dev gettext tcl-dev libperl-dev pkg-config clang-11 \ - llvm-11 llvm-11-dev libselinux1-dev python3-dev \ - uuid-dev liblz4-dev - 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 - sudo /usr/bin/perl -MCPAN -e 'install IPC::Run' - sudo /usr/bin/perl -MCPAN -e 'install Text::Trim' - - - name: Create pgsql dir - run: mkdir -p /opt/pgsql - - - name: Build postgres - run: | - export PATH="/opt/pgsql/bin:$PATH" - ./configure '--build=x86_64-linux-gnu' '--prefix=/usr' \ - '--includedir=${prefix}/include' '--mandir=${prefix}/share/man' \ - '--infodir=${prefix}/share/info' '--sysconfdir=/etc' \ - '--localstatedir=/var' '--libdir=${prefix}/lib/x86_64-linux-gnu' \ - '--libexecdir=${prefix}/lib/x86_64-linux-gnu' '--with-icu' \ - '--with-tcl' '--with-perl' '--with-python' '--with-pam' \ - '--with-openssl' '--with-libxml' '--with-libxslt' '--with-ldap' \ - 'PYTHON=/usr/bin/python3' '--mandir=/usr/share/postgresql/16/man' \ - '--docdir=/usr/share/doc/postgresql-doc-16' '--with-pgport=5432' \ - '--sysconfdir=/etc/postgresql-common' '--datarootdir=/usr/share' \ - '--datadir=/usr/share/postgresql/16' '--with-uuid=e2fs' \ - '--bindir=/usr/lib/postgresql/16/bin' '--enable-tap-tests' \ - '--libdir=/usr/lib/x86_64-linux-gnu' '--enable-debug' \ - '--libexecdir=/usr/lib/postgresql' '--with-gnu-ld' \ - '--includedir=/usr/include/postgresql' '--enable-dtrace' \ - '--enable-nls' '--enable-thread-safety' '--disable-rpath' \ - '--with-system-tzdata=/usr/share/zoneinfo' '--with-llvm' \ - 'LLVM_CONFIG=/usr/bin/llvm-config-11' 'CLANG=/usr/bin/clang-11' \ - '--with-systemd' '--with-selinux' 'MKDIR_P=/bin/mkdir -p' \ - 'PROVE=/usr/bin/prove' 'TAR=/bin/tar' 'XSLTPROC=xsltproc --nonet' \ - 'LDFLAGS=-Wl,-Bsymbolic-functions -Wl,-z,relro -Wl,-z,now' \ - 'build_alias=x86_64-linux-gnu' '--with-gssapi' \ - 'CPPFLAGS=-Wdate-time -D_FORTIFY_SOURCE=2' \ - 'CFLAGS=-g -O2 -fstack-protector-strong -Wformat -Werror=format-security -fno-omit-frame-pointer' \ - 'CXXFLAGS=-g -O2 -fstack-protector-strong -Wformat -Werror=format-security' - make world - sudo make install-world - - - name: Start postgresql cluster - run: | - export PATH="/usr/lib/postgresql/16/bin:$PATH" - sudo cp /usr/lib/postgresql/16/bin/pg_config /usr/bin - initdb -D /opt/pgsql/data - pg_ctl -D /opt/pgsql/data -l logfile start - - - name: Clone pg_stat_monitor repository - uses: actions/checkout@v4 - with: - path: 'src/pg_stat_monitor' - - - name: Build pg_stat_monitor - run: | - make USE_PGXS=1 - sudo make USE_PGXS=1 install - working-directory: src/pg_stat_monitor - - - name: Configure and Restart Server - run: | - export PATH="/usr/lib/postgresql/16/bin:$PATH" - pg_ctl -D /opt/pgsql/data -l logfile stop - echo "shared_preload_libraries = 'pg_stat_monitor'" >> \ - /opt/pgsql/data/postgresql.conf - echo "compute_query_id = regress" >> /opt/pgsql/data/postgresql.conf - pg_ctl -D /opt/pgsql/data -l logfile start - working-directory: src/pg_stat_monitor - - - name: Start pg_stat_monitor_tests - run: | - make installcheck - working-directory: src/pg_stat_monitor/ - - - name: Change dir permissions on fail - if: ${{ failure() }} - run: | - sudo chmod -R ugo+rwx t - sudo chmod -R ugo+rwx tmp_check - exit 2 # regenerate error so that we can upload files in next step - working-directory: src/pg_stat_monitor - - - name: Upload logs on fail - if: ${{ failure() }} - uses: actions/upload-artifact@v4 - with: - name: Regressions diff and postgresql log - path: | - src/pg_stat_monitor/regression.diffs - src/pg_stat_monitor/regression.out - src/pg_stat_monitor/logfile - src/pg_stat_monitor/t/results/ - src/pg_stat_monitor/tmp_check/log/ - !src/pg_stat_monitor/tmp_check/**/archives/* - !src/pg_stat_monitor/tmp_check/**/backup/* - !src/pg_stat_monitor/tmp_check/**/pgdata/* - !src/pg_stat_monitor/tmp_check/**/archives/ - !src/pg_stat_monitor/tmp_check/**/backup/ - !src/pg_stat_monitor/tmp_check/**/pgdata/ - if-no-files-found: warn - retention-days: 3 - - - name: Start Server installcheck-world tests - run: make installcheck-world - - - name: Report on installcheck-world test suites fail - uses: actions/upload-artifact@v4 - if: ${{ failure() }} - with: - name: Regressions output files of failed testsuite, and pg log - path: | - **/regression.diffs - **/regression.out - src/pg_stat_monitor/logfile - retention-days: 3 diff --git a/.github/workflows/postgresql-16-pgdg-package.yml b/.github/workflows/postgresql-16-pgdg-package.yml deleted file mode 100644 index b19404cd..00000000 --- a/.github/workflows/postgresql-16-pgdg-package.yml +++ /dev/null @@ -1,93 +0,0 @@ -name: postgresql-16-pgdg-package -on: - pull_request: - push: - branches: - - main - tags: - - '[0-9]+.[0-9]+.[0-9]+*' - -jobs: - build: - name: pg-16-pgdg-package-test - runs-on: ubuntu-22.04 - steps: - - name: Clone pg_stat_monitor repository - uses: actions/checkout@v4 - with: - path: 'src/pg_stat_monitor' - - - name: Delete old postgresql files - run: | - sudo apt-get update - sudo apt purge postgresql-client-common postgresql-common \ - postgresql postgresql* - sudo apt-get install -y libreadline6-dev systemtap-sdt-dev wget \ - zlib1g-dev libssl-dev libpam0g-dev bison flex libipc-run-perl - 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 - 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" > /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: Change src owner to postgres - run: | - sudo chmod o+rx ~ - sudo chown -R postgres:postgres src - - - name: Build pg_stat_monitor - run: | - sudo -u postgres bash -c 'make USE_PGXS=1' - sudo make USE_PGXS=1 install - working-directory: src/pg_stat_monitor - - - name: Start pg_stat_monitor_tests - run: | - sudo service postgresql stop - echo "shared_preload_libraries = 'pg_stat_monitor'" | - sudo tee -a /etc/postgresql/16/main/postgresql.conf - sudo service postgresql start - sudo psql -V - export PG_TEST_PORT_DIR=${GITHUB_WORKSPACE}/src/pg_stat_monitor - echo $PG_TEST_PORT_DIR - sudo -E -u postgres bash -c 'make installcheck USE_PGXS=1' - working-directory: src/pg_stat_monitor - - - name: Change dir permissions on fail - if: ${{ failure() }} - run: | - sudo chmod -R ugo+rwx t - sudo chmod -R ugo+rwx tmp_check - exit 2 # regenerate error so that we can upload files in next step - working-directory: src/pg_stat_monitor - - - name: Upload logs on fail - if: ${{ failure() }} - uses: actions/upload-artifact@v4 - with: - name: Regressions diff and postgresql log - path: | - src/pg_stat_monitor/regression.diffs - src/pg_stat_monitor/regression.out - src/pg_stat_monitor/logfile - src/pg_stat_monitor/t/results/ - src/pg_stat_monitor/tmp_check/log/ - !src/pg_stat_monitor/tmp_check/**/archives/* - !src/pg_stat_monitor/tmp_check/**/backup/* - !src/pg_stat_monitor/tmp_check/**/pgdata/* - !src/pg_stat_monitor/tmp_check/**/archives/ - !src/pg_stat_monitor/tmp_check/**/backup/ - !src/pg_stat_monitor/tmp_check/**/pgdata/ - if-no-files-found: warn - retention-days: 3 diff --git a/.github/workflows/postgresql-16-ppg-package.yml b/.github/workflows/postgresql-16-ppg-package.yml deleted file mode 100644 index 226fd069..00000000 --- a/.github/workflows/postgresql-16-ppg-package.yml +++ /dev/null @@ -1,107 +0,0 @@ -name: postgresql-16-ppg-package -on: - pull_request: - push: - branches: - - main - tags: - - '[0-9]+.[0-9]+.[0-9]+*' - -jobs: - build: - name: pg-16-ppg-package-test - runs-on: ubuntu-22.04 - steps: - - name: Clone pg_stat_monitor repository - uses: actions/checkout@v4 - with: - path: 'src/pg_stat_monitor' - - - name: Delete old postgresql files - run: | - sudo apt-get update - sudo apt purge postgresql-client-common postgresql-common \ - postgresql postgresql* - sudo apt-get install -y libreadline6-dev systemtap-sdt-dev \ - zlib1g-dev libssl-dev libpam0g-dev python3-dev bison flex \ - libipc-run-perl wget - 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 - sudo /usr/bin/perl -MCPAN -e 'install IPC::Run' - sudo /usr/bin/perl -MCPAN -e 'install Text::Trim' - - - name: Install percona-release script - run: | - sudo apt-get -y update - sudo apt-get -y upgrade - sudo apt-get install -y wget gnupg2 curl lsb-release - sudo wget \ - https://repo.percona.com/apt/percona-release_latest.generic_all.deb - sudo dpkg -i percona-release_latest.generic_all.deb - - - name: Install Percona Distribution Postgresql 16 & Extensions - run: | - sudo percona-release setup ppg-16 - sudo apt-get update -y - sudo apt-get install -y percona-postgresql-16 \ - percona-postgresql-contrib percona-postgresql-server-dev-all \ - percona-pgpool2 libpgpool2 percona-postgresql-16-pgaudit \ - percona-postgresql-16-pgaudit-dbgsym percona-postgresql-16-repack \ - percona-postgresql-16-repack-dbgsym percona-pgaudit16-set-user \ - percona-pgaudit16-set-user-dbgsym percona-postgresql-16-postgis-3 \ - percona-postgresql-16-postgis-3-scripts \ - percona-postgresql-postgis-scripts percona-postgresql-postgis \ - percona-postgis - - - name: Change src owner to postgres - run: | - sudo chmod o+rx ~ - sudo chown -R postgres:postgres src - - - name: Build pg_stat_monitor - run: | - sudo -u postgres bash -c 'make USE_PGXS=1' - sudo make USE_PGXS=1 install - working-directory: src/pg_stat_monitor - - - name: Start pg_stat_monitor_tests - run: | - sudo service postgresql stop - echo "shared_preload_libraries = 'pg_stat_monitor'" | - sudo tee -a /etc/postgresql/16/main/postgresql.conf - sudo service postgresql start - sudo psql -V - export PG_TEST_PORT_DIR=${GITHUB_WORKSPACE}/src/pg_stat_monitor - echo $PG_TEST_PORT_DIR - sudo -E -u postgres bash -c 'make installcheck USE_PGXS=1' - working-directory: src/pg_stat_monitor - - - name: Change dir permissions on fail - if: ${{ failure() }} - run: | - sudo chmod -R ugo+rwx t - sudo chmod -R ugo+rwx tmp_check - exit 2 # regenerate error so that we can upload files in next step - working-directory: src/pg_stat_monitor - - - name: Upload logs on fail - if: ${{ failure() }} - uses: actions/upload-artifact@v4 - with: - name: Regressions diff and postgresql log - path: | - src/pg_stat_monitor/regression.diffs - src/pg_stat_monitor/regression.out - src/pg_stat_monitor/logfile - src/pg_stat_monitor/t/results/ - src/pg_stat_monitor/tmp_check/log/ - !src/pg_stat_monitor/tmp_check/**/archives/* - !src/pg_stat_monitor/tmp_check/**/backup/* - !src/pg_stat_monitor/tmp_check/**/pgdata/* - !src/pg_stat_monitor/tmp_check/**/archives/ - !src/pg_stat_monitor/tmp_check/**/backup/ - !src/pg_stat_monitor/tmp_check/**/pgdata/ - if-no-files-found: warn - retention-days: 3 diff --git a/.github/workflows/postgresql-17-build.yml b/.github/workflows/postgresql-17-build.yml deleted file mode 100644 index a7b7f6e1..00000000 --- a/.github/workflows/postgresql-17-build.yml +++ /dev/null @@ -1,147 +0,0 @@ -name: postgresql-17-build -on: - pull_request: - push: - branches: - - main - tags: - - '[0-9]+.[0-9]+.[0-9]+*' - -jobs: - build: - name: pg-17-build-test - runs-on: ubuntu-22.04 - steps: - - name: Clone postgres repository - uses: actions/checkout@v4 - with: - repository: 'postgres/postgres' - ref: 'REL_17_BETA2' # TODO: Replace with REL_17_STABLE - - - name: Install dependencies - run: | - sudo apt-get update - sudo apt purge postgresql-client-common postgresql-common \ - postgresql postgresql* - sudo apt-get install -y libreadline6-dev systemtap-sdt-dev \ - zlib1g-dev libssl-dev libpam0g-dev bison flex \ - libipc-run-perl -y docbook-xsl docbook-xsl libxml2 libxml2-utils \ - libxml2-dev libxslt-dev xsltproc libkrb5-dev libldap2-dev \ - libsystemd-dev gettext tcl-dev libperl-dev pkg-config clang-11 \ - llvm-11 llvm-11-dev libselinux1-dev python3-dev \ - uuid-dev liblz4-dev - 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 - sudo /usr/bin/perl -MCPAN -e 'install IPC::Run' - sudo /usr/bin/perl -MCPAN -e 'install Text::Trim' - - - name: Create pgsql dir - run: mkdir -p /opt/pgsql - - - name: Build postgres - run: | - export PATH="/opt/pgsql/bin:$PATH" - ./configure '--build=x86_64-linux-gnu' '--prefix=/usr' \ - '--includedir=${prefix}/include' '--mandir=${prefix}/share/man' \ - '--infodir=${prefix}/share/info' '--sysconfdir=/etc' \ - '--localstatedir=/var' '--libdir=${prefix}/lib/x86_64-linux-gnu' \ - '--libexecdir=${prefix}/lib/x86_64-linux-gnu' '--with-icu' \ - '--with-tcl' '--with-perl' '--with-python' '--with-pam' \ - '--with-openssl' '--with-libxml' '--with-libxslt' '--with-ldap' \ - 'PYTHON=/usr/bin/python3' '--mandir=/usr/share/postgresql/17/man' \ - '--docdir=/usr/share/doc/postgresql-doc-17' '--with-pgport=5432' \ - '--sysconfdir=/etc/postgresql-common' '--datarootdir=/usr/share' \ - '--datadir=/usr/share/postgresql/17' '--with-uuid=e2fs' \ - '--bindir=/usr/lib/postgresql/17/bin' '--enable-tap-tests' \ - '--libdir=/usr/lib/x86_64-linux-gnu' '--enable-debug' \ - '--libexecdir=/usr/lib/postgresql' '--with-gnu-ld' \ - '--includedir=/usr/include/postgresql' '--enable-dtrace' \ - '--enable-nls' '--enable-thread-safety' '--disable-rpath' \ - '--with-system-tzdata=/usr/share/zoneinfo' '--with-llvm' \ - 'LLVM_CONFIG=/usr/bin/llvm-config-11' 'CLANG=/usr/bin/clang-11' \ - '--with-systemd' '--with-selinux' 'MKDIR_P=/bin/mkdir -p' \ - 'PROVE=/usr/bin/prove' 'TAR=/bin/tar' 'XSLTPROC=xsltproc --nonet' \ - 'LDFLAGS=-Wl,-Bsymbolic-functions -Wl,-z,relro -Wl,-z,now' \ - 'build_alias=x86_64-linux-gnu' '--with-gssapi' \ - 'CPPFLAGS=-Wdate-time -D_FORTIFY_SOURCE=2' \ - 'CFLAGS=-g -O2 -fstack-protector-strong -Wformat -Werror=format-security -fno-omit-frame-pointer' \ - 'CXXFLAGS=-g -O2 -fstack-protector-strong -Wformat -Werror=format-security' - make world - sudo make install-world - - - name: Start postgresql cluster - run: | - export PATH="/usr/lib/postgresql/17/bin:$PATH" - sudo cp /usr/lib/postgresql/17/bin/pg_config /usr/bin - initdb -D /opt/pgsql/data - pg_ctl -D /opt/pgsql/data -l logfile start - - - name: Clone pg_stat_monitor repository - uses: actions/checkout@v4 - with: - path: 'src/pg_stat_monitor' - - - name: Build pg_stat_monitor - run: | - make USE_PGXS=1 - sudo make USE_PGXS=1 install - working-directory: src/pg_stat_monitor - - - name: Configure and Restart Server - run: | - export PATH="/usr/lib/postgresql/17/bin:$PATH" - pg_ctl -D /opt/pgsql/data -l logfile stop - echo "shared_preload_libraries = 'pg_stat_monitor'" >> \ - /opt/pgsql/data/postgresql.conf - echo "compute_query_id = regress" >> /opt/pgsql/data/postgresql.conf - pg_ctl -D /opt/pgsql/data -l logfile start - working-directory: src/pg_stat_monitor - - - name: Start pg_stat_monitor_tests - run: | - make installcheck - working-directory: src/pg_stat_monitor/ - - - name: Change dir permissions on fail - if: ${{ failure() }} - run: | - sudo chmod -R ugo+rwx t - sudo chmod -R ugo+rwx tmp_check - exit 2 # regenerate error so that we can upload files in next step - working-directory: src/pg_stat_monitor - - - name: Upload logs on fail - if: ${{ failure() }} - uses: actions/upload-artifact@v4 - with: - name: Regressions diff and postgresql log - path: | - src/pg_stat_monitor/regression.diffs - src/pg_stat_monitor/regression.out - src/pg_stat_monitor/logfile - src/pg_stat_monitor/t/results/ - src/pg_stat_monitor/tmp_check/log/ - !src/pg_stat_monitor/tmp_check/**/archives/* - !src/pg_stat_monitor/tmp_check/**/backup/* - !src/pg_stat_monitor/tmp_check/**/pgdata/* - !src/pg_stat_monitor/tmp_check/**/archives/ - !src/pg_stat_monitor/tmp_check/**/backup/ - !src/pg_stat_monitor/tmp_check/**/pgdata/ - if-no-files-found: warn - retention-days: 3 - - - name: Start Server installcheck-world tests - run: make installcheck-world - - - name: Report on installcheck-world test suites fail - uses: actions/upload-artifact@v4 - if: ${{ failure() }} - with: - name: Regressions output files of failed testsuite, and pg log - path: | - **/regression.diffs - **/regression.out - src/pg_stat_monitor/logfile - retention-days: 3 diff --git a/.github/workflows/postgresql-17-pgdg-package.yml b/.github/workflows/postgresql-17-pgdg-package.yml deleted file mode 100644 index 2ba82b1a..00000000 --- a/.github/workflows/postgresql-17-pgdg-package.yml +++ /dev/null @@ -1,93 +0,0 @@ -name: postgresql-17-pgdg-package -on: - pull_request: - push: - branches: - - main - tags: - - '[0-9]+.[0-9]+.[0-9]+*' - -jobs: - build: - name: pg-17-pgdg-package-test - runs-on: ubuntu-22.04 - steps: - - name: Clone pg_stat_monitor repository - uses: actions/checkout@v4 - with: - path: 'src/pg_stat_monitor' - - - name: Delete old postgresql files - run: | - sudo apt-get update - sudo apt purge postgresql-client-common postgresql-common \ - postgresql postgresql* - sudo apt-get install -y libreadline6-dev systemtap-sdt-dev wget \ - zlib1g-dev libssl-dev libpam0g-dev bison flex libipc-run-perl - 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 - sudo /usr/bin/perl -MCPAN -e 'install IPC::Run' - sudo /usr/bin/perl -MCPAN -e 'install Text::Trim' - - - name: Install PG Distribution Postgresql 17 - run: | - sudo sh -c 'echo "deb http://apt.postgresql.org/pub/repos/apt \ - $(lsb_release -cs)-pgdg main 17" > /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-17 postgresql-server-dev-17 - - - name: Change src owner to postgres - run: | - sudo chmod o+rx ~ - sudo chown -R postgres:postgres src - - - name: Build pg_stat_monitor - run: | - sudo -u postgres bash -c 'make USE_PGXS=1' - sudo make USE_PGXS=1 install - working-directory: src/pg_stat_monitor - - - name: Start pg_stat_monitor_tests - run: | - sudo service postgresql stop - echo "shared_preload_libraries = 'pg_stat_monitor'" | - sudo tee -a /etc/postgresql/17/main/postgresql.conf - sudo service postgresql start - sudo psql -V - export PG_TEST_PORT_DIR=${GITHUB_WORKSPACE}/src/pg_stat_monitor - echo $PG_TEST_PORT_DIR - sudo -E -u postgres bash -c 'make installcheck USE_PGXS=1' - working-directory: src/pg_stat_monitor - - - name: Change dir permissions on fail - if: ${{ failure() }} - run: | - sudo chmod -R ugo+rwx t - sudo chmod -R ugo+rwx tmp_check - exit 2 # regenerate error so that we can upload files in next step - working-directory: src/pg_stat_monitor - - - name: Upload logs on fail - if: ${{ failure() }} - uses: actions/upload-artifact@v4 - with: - name: Regressions diff and postgresql log - path: | - src/pg_stat_monitor/regression.diffs - src/pg_stat_monitor/regression.out - src/pg_stat_monitor/logfile - src/pg_stat_monitor/t/results/ - src/pg_stat_monitor/tmp_check/log/ - !src/pg_stat_monitor/tmp_check/**/archives/* - !src/pg_stat_monitor/tmp_check/**/backup/* - !src/pg_stat_monitor/tmp_check/**/pgdata/* - !src/pg_stat_monitor/tmp_check/**/archives/ - !src/pg_stat_monitor/tmp_check/**/backup/ - !src/pg_stat_monitor/tmp_check/**/pgdata/ - if-no-files-found: warn - retention-days: 3