On 2 September 2016 at 23:29, Petr Jelinek <p...@2ndquadrant.com> wrote:
> You could put it to txid.c where all the other txid stuff is in? Yeah, even though it's in adt/ I think it'll do. I thought I'd need get_xid_in_recent_past() for catalog_xmin hot standby feedback, but upon closer examination the needed logic isn't the same anymore. txid_status() wants to ensure clog lookups are safe and limit by oldest xid, wheras the walsender doesn't actually care about that and is just avoiding wrapped xids. I'm just going back to how it was, all in adt/txid.c, and making it static again. We can move it and make it non-static if a need to do so comes up. Attached rebased patch updated and vs master. -- Craig Ringer http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training & Services
From 462a0ab51935b45d17820b83b8e9f6abd4ad2904 Mon Sep 17 00:00:00 2001 From: Craig Ringer <cr...@2ndquadrant.com> Date: Tue, 13 Sep 2016 11:06:58 +0800 Subject: [PATCH 1/3] Install the Perl TAP tests --- src/Makefile | 3 ++- src/test/Makefile | 2 +- src/test/perl/GNUmakefile | 39 +++++++++++++++++++++++++++++++++++++++ 3 files changed, 42 insertions(+), 2 deletions(-) create mode 100644 src/test/perl/GNUmakefile diff --git a/src/Makefile b/src/Makefile index b526be7..977f80b 100644 --- a/src/Makefile +++ b/src/Makefile @@ -26,7 +26,8 @@ SUBDIRS = \ bin \ pl \ makefiles \ - test/regress + test/regress \ + test/perl # There are too many interdependencies between the subdirectories, so # don't attempt parallel make here. diff --git a/src/test/Makefile b/src/test/Makefile index 7f7754f..6b40cf5 100644 --- a/src/test/Makefile +++ b/src/test/Makefile @@ -12,7 +12,7 @@ subdir = src/test top_builddir = ../.. include $(top_builddir)/src/Makefile.global -SUBDIRS = regress isolation modules recovery +SUBDIRS = perl regress isolation modules recovery # We don't build or execute examples/, locale/, or thread/ by default, # but we do want "make clean" etc to recurse into them. Likewise for ssl/, diff --git a/src/test/perl/GNUmakefile b/src/test/perl/GNUmakefile new file mode 100644 index 0000000..3c5dc70 --- /dev/null +++ b/src/test/perl/GNUmakefile @@ -0,0 +1,39 @@ +#------------------------------------------------------------------------- +# +# Makefile for src/test/perl +# +# Portions Copyright (c) 1996-2016, PostgreSQL Global Development Group +# Portions Copyright (c) 1994, Regents of the University of California +# +# src/test/perl/Makefile +# +#------------------------------------------------------------------------- + +subdir = src/test/perl +top_builddir = ../../.. +include $(top_builddir)/src/Makefile.global + +installdirs: + $(MKDIR_P) '$(DESTDIR)$(pgxsdir)/$(subdir)' + +ifeq ($(enable_tap_tests),yes) + +install: all installdirs + $(INSTALL_DATA) $(srcdir)/TestLib.pm '$(DESTDIR)$(pgxsdir)/$(subdir)/TestLib.pm' + $(INSTALL_DATA) $(srcdir)/SimpleTee.pm '$(DESTDIR)$(pgxsdir)/$(subdir)/SimpleTee.pm' + $(INSTALL_DATA) $(srcdir)/RecursiveCopy.pm '$(DESTDIR)$(pgxsdir)/$(subdir)/RecursiveCopy.pm' + $(INSTALL_DATA) $(srcdir)/PostgresNode.pm '$(DESTDIR)$(pgxsdir)/$(subdir)/PostgresNode.pm' + +uninstall: + rm -f '$(DESTDIR)$(pgxsdir)/$(subdir)/TestLib.pm' + rm -f '$(DESTDIR)$(pgxsdir)/$(subdir)/SimpleTee.pm' + rm -f '$(DESTDIR)$(pgxsdir)/$(subdir)/RecursiveCopy.pm' + rm -f '$(DESTDIR)$(pgxsdir)/$(subdir)/PostgresNode.pm' + +else + +install: ; + +uninstall: ; + +endif -- 2.5.5
From 86aff40374e05fec0160cbab0d1879bd01c6f411 Mon Sep 17 00:00:00 2001 From: Craig Ringer <cr...@2ndquadrant.com> Date: Tue, 13 Sep 2016 11:00:41 +0800 Subject: [PATCH 2/3] Add install rules for isolation tester Allow 'make install' for the isolation tester to work so it can be used from PGXS extensions. --- src/Makefile | 1 + src/test/isolation/Makefile | 11 +++++++++++ 2 files changed, 12 insertions(+) diff --git a/src/Makefile b/src/Makefile index 977f80b..d4aa06b 100644 --- a/src/Makefile +++ b/src/Makefile @@ -27,6 +27,7 @@ SUBDIRS = \ pl \ makefiles \ test/regress \ + test/isolation \ test/perl # There are too many interdependencies between the subdirectories, so diff --git a/src/test/isolation/Makefile b/src/test/isolation/Makefile index 3d272d5..e111bf0 100644 --- a/src/test/isolation/Makefile +++ b/src/test/isolation/Makefile @@ -66,3 +66,14 @@ installcheck-prepared-txns: all temp-install check-prepared-txns: all temp-install ./pg_isolation_regress --temp-instance=./tmp_check $(TEMP_CONF) $(EXTRA_REGRESS_OPTS) --inputdir=$(srcdir) --schedule=$(srcdir)/isolation_schedule prepared-transactions + +install: all installdirs + $(INSTALL_PROGRAM) isolationtester$(X) '$(DESTDIR)$(pgxsdir)/$(subdir)/isolationtester$(X)' + $(INSTALL_PROGRAM) pg_isolation_regress$(X) '$(DESTDIR)$(pgxsdir)/$(subdir)/pg_isolation_regress$(X)' + +installdirs: + $(MKDIR_P) '$(DESTDIR)$(pgxsdir)/$(subdir)' + +uninstall: + rm -f '$(DESTDIR)$(pgxsdir)/$(subdir)/isolationtester$(X)' + rm -f '$(DESTDIR)$(pgxsdir)/$(subdir)/pg_isolation_regress$(X)' -- 2.5.5
-- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers