pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Andrew Dunstan <andrew.dunstan@2ndquadrant.com>
To: PostgreSQL-development <pgsql-hackers@postgresql.org>
Subject: Teach pg_upgrade test to honor NO_TEMP_INSTALL
Date: Sat, 30 Mar 2019 16:42:16 -0400
Message-ID: <5506b8fa-7dad-8483-053c-7ca7ef04f01a@2ndQuadrant.com> (raw)


On some machines (*cough* Mingw *cough*) installs are very slow. We've
ameliorated this by allowing temp installs to be reused, but the
pg_upgrade Makefile never got the message. Here's a patch that does
that. I'd like to backpatch it, at least to 9.5 where we switched the
pg_upgrade location. The risk seems appropriately low and it only
affects our test regime.


cheers


andrew


-- 
Andrew Dunstan                https://www.2ndQuadrant.com
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

Attachments:

  [text/x-patch] pg_upgrade_no_temp_install.patch (1.1K, ../5506b8fa-7dad-8483-053c-7ca7ef04f01a@2ndQuadrant.com/2-pg_upgrade_no_temp_install.patch)
  download | inline diff:
diff --git a/src/bin/pg_upgrade/Makefile b/src/bin/pg_upgrade/Makefile
index adb0d5d707..c3fa40e6a8 100644
--- a/src/bin/pg_upgrade/Makefile
+++ b/src/bin/pg_upgrade/Makefile
@@ -14,6 +14,15 @@ OBJS = check.o controldata.o dump.o exec.o file.o function.o info.o \
 override CPPFLAGS := -DDLSUFFIX=\"$(DLSUFFIX)\" -I$(srcdir) -I$(libpq_srcdir) $(CPPFLAGS)
 LDFLAGS_INTERNAL += -L$(top_builddir)/src/fe_utils -lpgfeutils $(libpq_pgport)
 
+ifdef NO_TEMP_INSTALL
+	tbindir=$(abs_top_builddir)/tmp_install/$(bindir)
+	tlibdir=$(abs_top_builddir)/tmp_install/$(libdir)
+	DOINST =
+else
+	tbindir=$(bindir)
+	tlibdir=$(libdir)
+	DOINST = --install
+endif
 
 all: pg_upgrade
 
@@ -37,7 +46,7 @@ clean distclean maintainer-clean:
 	       pg_upgrade_dump_*.custom pg_upgrade_*.log
 
 check: test.sh all
-	MAKE=$(MAKE) bindir=$(bindir) libdir=$(libdir) EXTRA_REGRESS_OPTS="$(EXTRA_REGRESS_OPTS)" $(SHELL) $< --install
+	MAKE=$(MAKE) bindir=$(tbindir) libdir=$(tlibdir) EXTRA_REGRESS_OPTS="$(EXTRA_REGRESS_OPTS)" $(SHELL) $< $(DOINST)
 
 # installcheck is not supported because there's no meaningful way to test
 # pg_upgrade against a single already-running server

view thread (20+ messages)  latest in thread

Message-ID: <5506b8fa-7dad-8483-053c-7ca7ef04f01a@2ndQuadrant.com>
Permalink:  ../5506b8fa-7dad-8483-053c-7ca7ef04f01a@2ndQuadrant.com/
Also on:    postgresql.org/message-id/5506b8fa-7dad-8483-053c-7ca7ef04f01a@2ndQuadrant.com

 ·  · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-hackers@postgresql.org
  Cc: andrew.dunstan@2ndquadrant.com
  Subject: Re: Teach pg_upgrade test to honor NO_TEMP_INSTALL
  In-Reply-To: <5506b8fa-7dad-8483-053c-7ca7ef04f01a@2ndQuadrant.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox