Use SnapshotAny instead of SnapshotNow, that API was removed in 9.4.

Maybe does something horrific to your data, but that code is really horrible.
Upgrading to 2.5.3 is an option, but uncovers more horrible parts.
This commit is contained in:
landry 2014-12-26 12:56:56 +00:00
parent b81a4e964b
commit 6458da2ec4

View File

@ -1,7 +1,7 @@
$OpenBSD: patch-agent_lib_libstatsinfo_c,v 1.1.1.1 2013/10/23 22:00:19 landry Exp $
$OpenBSD: patch-agent_lib_libstatsinfo_c,v 1.2 2014/12/26 12:56:56 landry Exp $
freebsd-ports/databases/pg_statsinfo/files/patch-libstatsinfo.c
--- agent/lib/libstatsinfo.c.orig Mon Nov 26 03:21:03 2012
+++ agent/lib/libstatsinfo.c Sun Aug 11 11:44:42 2013
+++ agent/lib/libstatsinfo.c Fri Dec 26 13:54:46 2014
@@ -50,9 +50,17 @@
#include "pgut/pgut-spi.h"
#include "../common.h"
@ -333,3 +333,12 @@ freebsd-ports/databases/pg_statsinfo/files/patch-libstatsinfo.c
static void
checked_write(int fd, const void *buf, int size)
@@ -2226,7 +2398,7 @@ statsinfo_tablespaces(PG_FUNCTION_ARGS)
relation = heap_open(TableSpaceRelationId, AccessShareLock);
- scan = heap_beginscan(relation, SnapshotNow, 0, NULL);
+ scan = heap_beginscan(relation, SnapshotAny, 0, NULL);
while ((tuple = heap_getnext(scan, ForwardScanDirection)) != NULL)
{
Form_pg_tablespace form = (Form_pg_tablespace) GETSTRUCT(tuple);