diff options
author | joerg <joerg@pkgsrc.org> | 2020-05-14 19:10:47 +0000 |
---|---|---|
committer | joerg <joerg@pkgsrc.org> | 2020-05-14 19:10:47 +0000 |
commit | 4a1f2f91f25c0c67c8b3c5906e006e727baf8be0 (patch) | |
tree | eb8328c22e87659f989a33a2226b98f7ec9f9d02 /databases | |
parent | f5aaf8515980068e79410a08dcf9233a7de6351d (diff) | |
download | pkgsrc-4a1f2f91f25c0c67c8b3c5906e006e727baf8be0.tar.gz |
Can't build with PG11+, don't depend on false for PG10.
Diffstat (limited to 'databases')
-rw-r--r-- | databases/pg_repack/Makefile | 4 | ||||
-rw-r--r-- | databases/pg_repack/distinfo | 3 | ||||
-rw-r--r-- | databases/pg_repack/patches/patch-bin_pg__repack.c | 49 |
3 files changed, 54 insertions, 2 deletions
diff --git a/databases/pg_repack/Makefile b/databases/pg_repack/Makefile index 6a101d8c5ff..f1624ecbd71 100644 --- a/databases/pg_repack/Makefile +++ b/databases/pg_repack/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.5 2020/01/18 23:30:18 rillig Exp $ +# $NetBSD: Makefile,v 1.6 2020/05/14 19:10:47 joerg Exp $ DISTNAME= pg_repack-1.4.3 PKGNAME= postgresql${PGSQL_VERSION}-${DISTNAME} @@ -10,6 +10,8 @@ HOMEPAGE= https://reorg.github.io/pg_repack/ COMMENT= Reorganize tables in PostgreSQL databases with minimal locks LICENSE= modified-bsd +PGSQL_VERSIONS_ACCEPTED?= 10 96 95 94 + GITHUB_PROJECT= pg_repack GITHUB_TAG= ver_${PKGVERSION_NOREV} WRKSRC= ${WRKDIR}/${GITHUB_PROJECT}-${GITHUB_TAG} diff --git a/databases/pg_repack/distinfo b/databases/pg_repack/distinfo index 10c130ddb48..b7b3aadf5dc 100644 --- a/databases/pg_repack/distinfo +++ b/databases/pg_repack/distinfo @@ -1,7 +1,8 @@ -$NetBSD: distinfo,v 1.3 2018/05/21 13:20:20 fhajny Exp $ +$NetBSD: distinfo,v 1.4 2020/05/14 19:10:47 joerg Exp $ SHA1 (pg_repack-1.4.3.tar.gz) = 164f54ab0579c100089cc65cdd44bab20b6cacc1 RMD160 (pg_repack-1.4.3.tar.gz) = 45900317949c377600c0933aff957804a38c66bd SHA512 (pg_repack-1.4.3.tar.gz) = 8fad625665446d7852d09e5c431fa2bf4e767bb5eeaf6718c824c51c558b0ff975af1f2dcce20bc714002fc755c2f6c1d23b0adc2bfa1f9167d198fc59d34cf8 Size (pg_repack-1.4.3.tar.gz) = 93994 bytes SHA1 (patch-bin_Makefile) = 7e82083f0df7e9a1532be323196875bd8ba44520 +SHA1 (patch-bin_pg__repack.c) = 55cfbde4e5aeac83c9d6ec75ee0954411f2ca5ad diff --git a/databases/pg_repack/patches/patch-bin_pg__repack.c b/databases/pg_repack/patches/patch-bin_pg__repack.c new file mode 100644 index 00000000000..6f1663f8383 --- /dev/null +++ b/databases/pg_repack/patches/patch-bin_pg__repack.c @@ -0,0 +1,49 @@ +$NetBSD: patch-bin_pg__repack.c,v 1.1 2020/05/14 19:10:47 joerg Exp $ + +--- bin/pg_repack.c.orig 2020-05-10 00:05:15.102859009 +0000 ++++ bin/pg_repack.c +@@ -1176,7 +1176,7 @@ repack_one_table(repack_table *table, co + if (!advisory_lock(connection, buffer)) + goto cleanup; + +- if (!(lock_exclusive(connection, buffer, table->lock_table, TRUE))) ++ if (!(lock_exclusive(connection, buffer, table->lock_table, true))) + { + if (no_kill_backend) + elog(INFO, "Skipping repack %s due to timeout", table->target_name); +@@ -1210,7 +1210,7 @@ repack_one_table(repack_table *table, co + + indexres = execute( + "SELECT indexrelid," +- " repack.repack_indexdef(indexrelid, indrelid, $2, FALSE) " ++ " repack.repack_indexdef(indexrelid, indrelid, $2, false) " + " FROM pg_index WHERE indrelid = $1 AND indisvalid", + 2, indexparams); + +@@ -1483,7 +1483,7 @@ repack_one_table(repack_table *table, co + /* Bump our existing AccessShare lock to AccessExclusive */ + + if (!(lock_exclusive(conn2, utoa(table->target_oid, buffer), +- table->lock_table, FALSE))) ++ table->lock_table, false))) + { + elog(WARNING, "lock_exclusive() failed in conn2 for %s", + table->target_name); +@@ -1502,7 +1502,7 @@ repack_one_table(repack_table *table, co + + command("BEGIN ISOLATION LEVEL READ COMMITTED", 0, NULL); + if (!(lock_exclusive(connection, utoa(table->target_oid, buffer), +- table->lock_table, FALSE))) ++ table->lock_table, false))) + { + elog(WARNING, "lock_exclusive() failed in connection for %s", + table->target_name); +@@ -2045,7 +2045,7 @@ repack_table_indexes(PGresult *index_det + resetStringInfo(&sql); + appendStringInfo(&sql, "LOCK TABLE %s IN ACCESS EXCLUSIVE MODE", + table_name); +- if (!(lock_exclusive(connection, params[1], sql.data, TRUE))) ++ if (!(lock_exclusive(connection, params[1], sql.data, true))) + { + elog(WARNING, "lock_exclusive() failed in connection for %s", + table_name); |