svn commit: r406555 - in head/databases/pgespresso: . files

Matthew Seaman matthew at FreeBSD.org
Mon Jan 18 10:01:01 UTC 2016


Author: matthew
Date: Mon Jan 18 10:00:59 2016
New Revision: 406555
URL: https://svnweb.freebsd.org/changeset/ports/406555

Log:
  Apply patch from upstream GitHub to provide compile- and run-time
  compatibility with postgresql95
  
  Obtained from:	https://github.com/2ndquadrant-it/pgespresso/commit/7bedbfb894aedff8c08de85ede430a15a8888a0a

Added:
  head/databases/pgespresso/files/
  head/databases/pgespresso/files/patch-pgespresso.c   (contents, props changed)
Modified:
  head/databases/pgespresso/Makefile

Modified: head/databases/pgespresso/Makefile
==============================================================================
--- head/databases/pgespresso/Makefile	Mon Jan 18 09:43:54 2016	(r406554)
+++ head/databases/pgespresso/Makefile	Mon Jan 18 10:00:59 2016	(r406555)
@@ -1,8 +1,9 @@
-# Created by: MAtthew Seaman
+# Created by: Matthew Seaman
 # $FreeBSD$
 
 PORTNAME=	pgespresso
 PORTVERSION=	1.0
+PORTREVISION=	1
 CATEGORIES=	databases
 
 MAINTAINER=	matthew at FreeBSD.org

Added: head/databases/pgespresso/files/patch-pgespresso.c
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/databases/pgespresso/files/patch-pgespresso.c	Mon Jan 18 10:00:59 2016	(r406555)
@@ -0,0 +1,42 @@
+--- pgespresso.c.orig	2014-04-11 10:46:36 UTC
++++ pgespresso.c
+@@ -78,10 +78,38 @@ pgespresso_start_backup(PG_FUNCTION_ARGS
+ 	}
+ 
+ 	/*
++	 * Starting from 9.5 the do_pg_start_backup caller needs to allocate the
++	 * 'pg_tblspc' directory and pass it as argument.
++	 *
++	 * Ref: http://git.postgresql.org/gitweb/?p=postgresql.git;h=72d422a
++	 */
++	#if PG_VERSION_NUM >= 90500
++	{
++		DIR	*dir;
++
++		/* Make sure we can open the directory with
++		   tablespaces in it */
++		dir = AllocateDir("pg_tblspc");
++
++		if (!dir)
++			ereport(ERROR,
++					(errmsg("could not open directory \"%s\": %m", "pg_tblspc")));
++
++		/*
++		 * We are not filling the tablespace map here.
++		 * This means that on 9.5 the 'tablespace_map' file has to be
++		 * generated by the invoker.
++		 */
++		do_pg_start_backup(backupidstr, fast, NULL, &labelfile,
++						   dir, NULL, NULL, false, false);
++
++		FreeDir(dir);
++	}
++	/*
+ 	 * Starting from 9.3 the do_pg_start_backup returns the timeline ID
+ 	 * in *starttli_p additional argument
+ 	 */
+-	#if PG_VERSION_NUM >= 90300
++	#elif PG_VERSION_NUM >= 90300
+ 		do_pg_start_backup(backupidstr, fast, NULL, &labelfile);
+ 	#else
+ 		do_pg_start_backup(backupidstr, fast, &labelfile);


More information about the svn-ports-all mailing list