@@ -88,6 +88,7 @@ PTESTS_SLOW_META_OE = "\
libusb-compat \
mariadb \
pg-hint-plan \
+ pg-repack \
postgresql \
postgresql-hll \
re2 \
new file mode 100644
@@ -0,0 +1,5 @@
+SET allow_in_place_tablespaces = true;
+CREATE TABLESPACE testts LOCATION '';
+CREATE TABLESPACE "1testts" LOCATION '';
+CREATE TABLESPACE "test ts" LOCATION '';
+CREATE TABLESPACE "test""ts" LOCATION '';
new file mode 100644
@@ -0,0 +1,5 @@
+SET allow_in_place_tablespaces = true;
+CREATE TABLESPACE testts LOCATION '';
+CREATE TABLESPACE "1testts" LOCATION '';
+CREATE TABLESPACE "test ts" LOCATION '';
+CREATE TABLESPACE "test""ts" LOCATION '';
new file mode 100644
@@ -0,0 +1,31 @@
+SUMMARY = "Reorganize PostgreSQL tables with minimal locks"
+DESCRIPTION = "pg_repack removes bloat from tables and indexes, and can \
+restore the physical order of clustered indexes, without holding an \
+exclusive lock on the table while it works. It is a PostgreSQL \
+extension together with the pg_repack client program."
+HOMEPAGE = "https://reorg.github.io/pg_repack/"
+BUGTRACKER = "https://github.com/reorg/pg_repack/issues"
+LICENSE = "BSD-3-Clause"
+LIC_FILES_CHKSUM = "file://COPYRIGHT;md5=809c5aa034ea3a382a8a6209a730a193"
+
+SRC_URI = "git://github.com/reorg/pg_repack.git;protocol=https;branch=master \
+ file://create-tablespaces.sql \
+ file://create-tablespaces.out \
+ "
+SRCREV = "bdf2ce2b53b7faa5963dc0c3d0b6405d98ff1c01"
+PV = "1.5.3+git"
+
+UPSTREAM_CHECK_GITTAGREGEX = "ver_(?P<pver>\d+(\.\d+)+)"
+
+inherit ptest-pgxs
+
+EXTRA_OEMAKE:append = " PG_LIBS='$(libpq)'"
+
+PTEST_PGXS_DIR = "regress"
+PTEST_PGXS_CONF = "wal_level = logical"
+
+do_install_ptest:append() {
+ install -m 0644 ${UNPACKDIR}/create-tablespaces.sql ${D}${PTEST_PATH}/tests/sql/
+ install -m 0644 ${UNPACKDIR}/create-tablespaces.out ${D}${PTEST_PATH}/tests/expected/
+ sed -i 's/^REGRESS="/REGRESS="create-tablespaces /' ${D}${PTEST_PATH}/ptest-pgxs.vars
+}
pg_repack reorganizes PostgreSQL tables and indexes with minimal locks. Signed-off-by: Babanpreet Singh <bbnpreetsingh@gmail.com> --- .../include/ptest-packagelists-meta-oe.inc | 1 + .../pg-repack/create-tablespaces.out | 5 +++ .../pg-repack/create-tablespaces.sql | 5 +++ .../recipes-dbs/pg-repack/pg-repack_git.bb | 31 +++++++++++++++++++ 4 files changed, 42 insertions(+) create mode 100644 meta-oe/recipes-dbs/pg-repack/pg-repack/create-tablespaces.out create mode 100644 meta-oe/recipes-dbs/pg-repack/pg-repack/create-tablespaces.sql create mode 100644 meta-oe/recipes-dbs/pg-repack/pg-repack_git.bb