Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/databases/pg_repack Can't build with PG11+, don't depe...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/5886af011f66
branches:  trunk
changeset: 431571:5886af011f66
user:      joerg <joerg%pkgsrc.org@localhost>
date:      Thu May 14 19:10:47 2020 +0000

description:
Can't build with PG11+, don't depend on false for PG10.

diffstat:

 databases/pg_repack/Makefile                       |   4 +-
 databases/pg_repack/distinfo                       |   3 +-
 databases/pg_repack/patches/patch-bin_pg__repack.c |  49 ++++++++++++++++++++++
 3 files changed, 54 insertions(+), 2 deletions(-)

diffs (84 lines):

diff -r 7fd897c50d23 -r 5886af011f66 databases/pg_repack/Makefile
--- a/databases/pg_repack/Makefile      Thu May 14 19:10:20 2020 +0000
+++ b/databases/pg_repack/Makefile      Thu May 14 19:10:47 2020 +0000
@@ -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 @@
 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 -r 7fd897c50d23 -r 5886af011f66 databases/pg_repack/distinfo
--- a/databases/pg_repack/distinfo      Thu May 14 19:10:20 2020 +0000
+++ b/databases/pg_repack/distinfo      Thu May 14 19:10:47 2020 +0000
@@ -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 -r 7fd897c50d23 -r 5886af011f66 databases/pg_repack/patches/patch-bin_pg__repack.c
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/databases/pg_repack/patches/patch-bin_pg__repack.c        Thu May 14 19:10:47 2020 +0000
@@ -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);



Home | Main Index | Thread Index | Old Index