diff --git a/expected/pg_variables_trans.out b/expected/pg_variables_trans.out
index c4c2495..b352c33 100644
--- a/expected/pg_variables_trans.out
+++ b/expected/pg_variables_trans.out
@@ -1794,7 +1794,8 @@ SELECT package FROM pgv_stats() ORDER BY package;
  package 
 ---------
  vars
-(1 row)
+ vars2
+(2 rows)
 
 SELECT * FROM pgv_list() ORDER BY package, name;
  package | name | is_transactional 
@@ -1878,9 +1879,9 @@ SELECT pgv_remove('vars', 'any1');
 
 RELEASE comm;
 SELECT pgv_get('vars', 'any1',NULL::text);
-ERROR:  unrecognized package "vars"
+ERROR:  unrecognized variable "any1"
 COMMIT;
--- Test for PGPRO-2440
+-- Tests for PGPRO-2440
 SELECT pgv_insert('vars3', 'r3', row(1 :: integer, NULL::varchar), true);
  pgv_insert 
 ------------
@@ -1908,6 +1909,32 @@ SELECT pgv_delete('vars3', 'r3', 3);
  t
 (1 row)
 
+BEGIN;
+SELECT pgv_set('vars1', 't1', ''::text);
+ pgv_set 
+---------
+ 
+(1 row)
+
+SELECT pgv_set('vars2', 't2', ''::text, true);
+ pgv_set 
+---------
+ 
+(1 row)
+
+SAVEPOINT sp1;
+SAVEPOINT sp2;
+SELECT pgv_free();
+ pgv_free 
+----------
+ 
+(1 row)
+
+ERROR;
+ERROR:  syntax error at or near "ERROR"
+LINE 1: ERROR;
+        ^
+COMMIT;
 SELECT pgv_free();
  pgv_free 
 ----------
diff --git a/pg_variables.c b/pg_variables.c
index d561817..03dd7b4 100755
--- a/pg_variables.c
+++ b/pg_variables.c
@@ -49,7 +49,8 @@ extern void _PG_fini(void);
 static void ensurePackagesHashExists(void);
 static void getKeyFromName(text *name, char *key);
 
-static Package *getPackageByName(text *name, bool create, bool strict);
+static Package *getPackage(text *name, bool strict);
+static Package *createPackage(text *name, bool is_trans);
 static Variable *getVariableInternal(Package *package, text *name,
 									 Oid typid, bool is_record, bool strict);
 static Variable *createVariableInternal(Package *package, text *name, Oid typid,
@@ -71,7 +72,6 @@ static bool isObjectChangedInUpperTrans(TransObject *object);
 
 static void addToChangesStack(TransObject *object, TransObjectType type);
 static void pushChangesStack(void);
-static void removeFromChangesStack(TransObject *object, TransObjectType type);
 
 /* Constructors */
 static void makePackHTAB(Package *package, bool is_trans);
@@ -157,7 +157,7 @@ variable_set(text *package_name, text *var_name,
 	Variable   *variable;
 	ScalarVar  *scalar;
 
-	package = getPackageByName(package_name, true, false);
+	package = createPackage(package_name, is_transactional);
 	variable = createVariableInternal(package, var_name, typid, false,
 									  is_transactional);
 
@@ -188,7 +188,7 @@ variable_get(text *package_name, text *var_name,
 	Variable   *variable;
 	ScalarVar  *scalar;
 
-	package = getPackageByName(package_name, false, strict);
+	package = getPackage(package_name, strict);
 	if (package == NULL)
 	{
 		*is_null = true;
@@ -325,9 +325,10 @@ variable_insert(PG_FUNCTION_ARGS)
 	if (LastPackage == NULL ||
 		VARSIZE_ANY_EXHDR(package_name) != strlen(GetName(LastPackage)) ||
 		strncmp(VARDATA_ANY(package_name), GetName(LastPackage),
-				VARSIZE_ANY_EXHDR(package_name)) != 0)
+				VARSIZE_ANY_EXHDR(package_name)) != 0 ||
+		!pack_htab(LastPackage, is_transactional))
 	{
-		package = getPackageByName(package_name, true, false);
+		package = createPackage(package_name, is_transactional);
 		LastPackage = package;
 		LastVariable = NULL;
 	}
@@ -440,7 +441,7 @@ variable_update(PG_FUNCTION_ARGS)
 		strncmp(VARDATA_ANY(package_name), GetName(LastPackage),
 				VARSIZE_ANY_EXHDR(package_name)) != 0)
 	{
-		package = getPackageByName(package_name, false, true);
+		package = getPackage(package_name, true);
 		LastPackage = package;
 		LastVariable = NULL;
 	}
@@ -529,7 +530,7 @@ variable_delete(PG_FUNCTION_ARGS)
 		strncmp(VARDATA_ANY(package_name), GetName(LastPackage),
 				VARSIZE_ANY_EXHDR(package_name)) != 0)
 	{
-		package = getPackageByName(package_name, false, true);
+		package = getPackage(package_name, true);
 		LastPackage = package;
 		LastVariable = NULL;
 	}
@@ -591,7 +592,7 @@ variable_select(PG_FUNCTION_ARGS)
 		package_name = PG_GETARG_TEXT_PP(0);
 		var_name = PG_GETARG_TEXT_PP(1);
 
-		package = getPackageByName(package_name, false, true);
+		package = getPackage(package_name, true);
 		variable = getVariableInternal(package, var_name, RECORDOID, true,
 									   true);
 
@@ -667,7 +668,7 @@ variable_select_by_value(PG_FUNCTION_ARGS)
 		value = 0;
 	}
 
-	package = getPackageByName(package_name, false, true);
+	package = getPackage(package_name, true);
 	variable = getVariableInternal(package, var_name, RECORDOID, true, true);
 
 	if (!value_is_null)
@@ -736,7 +737,7 @@ variable_select_by_values(PG_FUNCTION_ARGS)
 		package_name = PG_GETARG_TEXT_PP(0);
 		var_name = PG_GETARG_TEXT_PP(1);
 
-		package = getPackageByName(package_name, false, true);
+		package = getPackage(package_name, true);
 		variable = getVariableInternal(package, var_name, RECORDOID, true,
 									   true);
 
@@ -802,14 +803,14 @@ variable_exists(PG_FUNCTION_ARGS)
 	Package	   *package;
 	Variable   *variable;
 	char		key[NAMEDATALEN];
-	bool		found;
+	bool		found = false;
 
 	CHECK_ARGS_FOR_NULL();
 
 	package_name = PG_GETARG_TEXT_PP(0);
 	var_name = PG_GETARG_TEXT_PP(1);
 
-	package = getPackageByName(package_name, false, false);
+	package = getPackage(package_name, false);
 	if (package == NULL)
 	{
 		PG_FREE_IF_COPY(package_name, 0);
@@ -820,9 +821,10 @@ variable_exists(PG_FUNCTION_ARGS)
 
 	getKeyFromName(var_name, key);
 
-	variable = (Variable *) hash_search(package->varHashRegular,
-										key, HASH_FIND, &found);
-	if (!found)
+	if (package->varHashRegular)
+		variable = (Variable *) hash_search(package->varHashRegular,
+											key, HASH_FIND, &found);
+	if (!found && package->varHashTransact)
 		variable = (Variable *) hash_search(package->varHashTransact,
 											key, HASH_FIND, &found);
 
@@ -848,7 +850,7 @@ package_exists(PG_FUNCTION_ARGS)
 
 	package_name = PG_GETARG_TEXT_PP(0);
 
-	res = getPackageByName(package_name, false, false) != NULL;
+	res = getPackage(package_name, false) != NULL;
 
 	PG_FREE_IF_COPY(package_name, 0);
 	PG_RETURN_BOOL(res);
@@ -871,7 +873,7 @@ remove_variable(PG_FUNCTION_ARGS)
 	package_name = PG_GETARG_TEXT_PP(0);
 	var_name = PG_GETARG_TEXT_PP(1);
 
-	package = getPackageByName(package_name, false, true);
+	package = getPackage(package_name, true);
 	variable = getVariableInternal(package, var_name, InvalidOid, false, true);
 
 	/* Add package to changes list, so we can remove it if it is empty */
@@ -918,7 +920,7 @@ remove_package(PG_FUNCTION_ARGS)
 
 	package_name = PG_GETARG_TEXT_PP(0);
 
-	package = getPackageByName(package_name, false, true);
+	package = getPackage(package_name, true);
 	removePackageInternal(package);
 
 	resetVariablesCache(true);
@@ -953,7 +955,10 @@ removePackageInternal(Package *package)
 static bool
 isPackageEmpty(Package *package)
 {
-	int var_num = hash_get_num_entries(package->varHashTransact);
+	int var_num = 0;
+	
+	if (package->varHashTransact)
+		var_num += hash_get_num_entries(package->varHashTransact);
 
 	if (package->varHashRegular)
 		var_num += hash_get_num_entries(package->varHashRegular);
@@ -1065,8 +1070,10 @@ get_packages_and_variables(PG_FUNCTION_ARGS)
 				/* Get variables list for package */
 				for (i = 0; i < 2; i++)
 				{
-					hash_seq_init(&vstat, i ? package->varHashTransact :
-								  package->varHashRegular);
+					HTAB *htab = pack_htab(package, i);
+					if (!htab)
+						continue;
+					hash_seq_init(&vstat, htab);
 					while ((variable =
 							(Variable *) hash_seq_search(&vstat)) != NULL)
 					{
@@ -1228,9 +1235,10 @@ get_packages_stats(PG_FUNCTION_ARGS)
 		/* Fill data */
 		values[0] = PointerGetDatum(cstring_to_text(GetName(package)));
 
-		if (GetActualState(package)->is_valid)
+		if (package->hctxRegular)
 			getMemoryTotalSpace(package->hctxRegular, 0, &regularSpace);
-		getMemoryTotalSpace(package->hctxTransact, 0, &transactSpace);
+		if (package->hctxTransact)
+			getMemoryTotalSpace(package->hctxTransact, 0, &transactSpace);
 
 		totalSpace = regularSpace + transactSpace;
 		values[1] = Int64GetDatum(totalSpace);
@@ -1317,40 +1325,48 @@ makePackHTAB(Package *package, bool is_trans)
 }
 
 static Package *
-getPackageByName(text *name, bool create, bool strict)
+getPackage(text *name, bool strict)
 {
 	Package	   *package;
-	PackState  *packState;
 	char		key[NAMEDATALEN];
 	bool		found;
 
 	getKeyFromName(name, key);
 
-	if (create)
-		ensurePackagesHashExists();
-	else
+	/* Find a package entry */
+	if (packagesHash)
 	{
-		if (!packagesHash)
-		{
-			if (strict)
-				ereport(ERROR,
-						(errcode(ERRCODE_INVALID_PARAMETER_VALUE),
-						 errmsg("unrecognized package \"%s\"", key)));
+		package = (Package *) hash_search(packagesHash, key, HASH_FIND, &found);
 
-			return NULL;
-		}
+		if (found && GetActualState(package)->is_valid)
+			return package;
 	}
+	/* Package not found or it's current state is "invalid" */
+	if (strict)
+		ereport(ERROR,
+				(errcode(ERRCODE_INVALID_PARAMETER_VALUE),
+					errmsg("unrecognized package \"%s\"", key)));
+
+	return NULL;
+}
+
+static Package *
+createPackage(text *name, bool is_trans)
+{
+	Package	   *package;
+	char		key[NAMEDATALEN];
+	bool		found;
+
+	getKeyFromName(name, key);
+	ensurePackagesHashExists();
 
 	/* Find or create a package entry */
-	package = (Package *) hash_search(packagesHash, key,
-									  create ? HASH_ENTER : HASH_FIND,
-									  &found);
+	package = (Package *) hash_search(packagesHash, key, HASH_ENTER, &found);
 
 	if (found)
 	{
-		if (GetActualState(package)->is_valid)
-			return package;
-		else if (create)
+		if (!GetActualState(package)->is_valid)
+		/* Make package valid again */
 		{
 			HASH_SEQ_STATUS vstat;
 			Variable   *variable;
@@ -1358,71 +1374,55 @@ getPackageByName(text *name, bool create, bool strict)
 
 			/* Make new history entry of package */
 			if (!isObjectChangedInCurrentTrans(transObj))
-			{
 				createSavepoint(transObj, TRANS_PACKAGE);
-				addToChangesStack(transObj, TRANS_PACKAGE);
-			}
 
 			GetActualState(package)->is_valid = true;
 
-			/* XXX Check is this necessary */
-
-			/* Restore previously removed HTAB for regular variables */
-			makePackHTAB(package, false);
-
 			/* Mark all transactional variables in package as removed */
-			hash_seq_init(&vstat, package->varHashTransact);
-			while ((variable =
-					(Variable *) hash_seq_search(&vstat)) != NULL)
+			if (package->varHashTransact)
 			{
-				transObj = &variable->transObject;
-
-				if (!isObjectChangedInCurrentTrans(transObj))
+				hash_seq_init(&vstat, package->varHashTransact);
+				while ((variable =
+						(Variable *) hash_seq_search(&vstat)) != NULL)
 				{
-					createSavepoint(transObj, TRANS_VARIABLE);
-					addToChangesStack(transObj, TRANS_VARIABLE);
+					transObj = &variable->transObject;
+
+					if (!isObjectChangedInCurrentTrans(transObj))
+					{
+						createSavepoint(transObj, TRANS_VARIABLE);
+						addToChangesStack(transObj, TRANS_VARIABLE);
+					}
+					GetActualState(variable)->is_valid = false;
 				}
-				GetActualState(variable)->is_valid = false;
 			}
-
-			return package;
 		}
-		else if (strict)
-			ereport(ERROR,
-					(errcode(ERRCODE_INVALID_PARAMETER_VALUE),
-					 errmsg("unrecognized package \"%s\"", key)));
-		else
-			return NULL;
-	}
-	else if (!create)
-	{
-		if (strict)
-			ereport(ERROR,
-					(errcode(ERRCODE_INVALID_PARAMETER_VALUE),
-					 errmsg("unrecognized package \"%s\"", key)));
-		else
-			return package;
 	}
 	else
 	{
-		/*
-		 * Package entry was created, so we need create hash table for
-		 * variables.
-		 */
-		makePackHTAB(package, false);
-		makePackHTAB(package, true);
+		PackState  *packState;
 
+		package->varHashRegular = NULL;
+		package->varHashTransact = NULL;
+		package->hctxRegular = NULL;
+		package->hctxTransact = NULL;
 		/* Initialize history */
 		dlist_init(GetStateStorage(package));
 		packState = MemoryContextAllocZero(ModuleContext, sizeof(PackState));
 		dlist_push_head(GetStateStorage(package), &(packState->state.node));
 		packState->state.is_valid = true;
+	}
 
-		/* Add to changes list */
+	/* Create corresponding HTAB if not exists */
+	if (!pack_htab(package, is_trans))
+		makePackHTAB(package, is_trans);
+	/* Add to changes list */
+	if (!isObjectChangedInCurrentTrans(&package->transObject))
+	{
+		createSavepoint(&package->transObject, TRANS_PACKAGE);
 		addToChangesStack(&package->transObject, TRANS_PACKAGE);
-
-		return package;
 	}
+
+	return package;
 }
 
 /*
@@ -1434,15 +1434,16 @@ static Variable *
 getVariableInternal(Package *package, text *name, Oid typid, bool is_record,
 					bool strict)
 {
-	Variable   *variable;
+	Variable   *variable = NULL;
 	char		key[NAMEDATALEN];
-	bool		found;
+	bool		found = false;
 
 	getKeyFromName(name, key);
 
-	variable = (Variable *) hash_search(package->varHashRegular,
-										key, HASH_FIND, &found);
-	if (!found)
+	if (package->varHashRegular)
+		variable = (Variable *) hash_search(package->varHashRegular,
+											key, HASH_FIND, &found);
+	if (!found && package->varHashTransact)
 		variable = (Variable *) hash_search(package->varHashTransact,
 											key, HASH_FIND, &found);
 
@@ -1496,6 +1497,7 @@ createVariableInternal(Package *package, text *name, Oid typid, bool is_record,
 {
 	Variable   *variable;
 	TransObject *transObject;
+	HTAB	   *htab;
 	char		key[NAMEDATALEN];
 	bool		found;
 
@@ -1505,14 +1507,16 @@ createVariableInternal(Package *package, text *name, Oid typid, bool is_record,
 	 * Reverse check: for non-transactional variable search in regular table
 	 * and vice versa.
 	 */
-	hash_search(is_transactional ?
-				package->varHashRegular : package->varHashTransact,
-				key, HASH_FIND, &found);
-	if (found)
-		ereport(ERROR,
-				(errcode(ERRCODE_INVALID_PARAMETER_VALUE),
-				 errmsg("variable \"%s\" already created as %sTRANSACTIONAL",
-						key, is_transactional ? "NOT " : "")));
+	htab = pack_htab(package, !is_transactional);
+	if (htab)
+	{
+		hash_search(htab, key, HASH_FIND, &found);
+		if (found)
+			ereport(ERROR,
+					(errcode(ERRCODE_INVALID_PARAMETER_VALUE),
+					errmsg("variable \"%s\" already created as %sTRANSACTIONAL",
+							key, is_transactional ? "NOT " : "")));
+	}
 
 	variable = (Variable *) hash_search(pack_htab(package, is_transactional),
 										key, HASH_ENTER, &found);
@@ -1663,18 +1667,15 @@ removeObject(TransObject *object, TransObjectType type)
 	HTAB	   *hash;
 	Package	   *package = NULL;
 
-	/*
-	 * Delete an object from the change history of the overlying
-	 * transaction level (head of 'changesStack' at this point).
-	 */
-	if (changesStack && !dlist_is_empty(changesStack))
-			removeFromChangesStack(object, type);
 	if (type == TRANS_PACKAGE)
 	{
 		package = (Package *) object;
 
 		/* Regular variables had already removed */
-		MemoryContextDelete(package->hctxTransact);
+		if (package->hctxRegular)
+			MemoryContextDelete(package->hctxRegular);
+		if (package->hctxTransact)
+			MemoryContextDelete(package->hctxTransact);
 		hash = packagesHash;
 	}
 	else
@@ -1694,10 +1695,11 @@ removeObject(TransObject *object, TransObjectType type)
 	hash_search(hash, object->name, HASH_REMOVE, &found);
 
 	/* Remove package if it became empty */
-	if (type == TRANS_VARIABLE &&
-		isObjectChangedInCurrentTrans(&package->transObject) &&
-		isPackageEmpty(package))
+	if (type == TRANS_VARIABLE && isPackageEmpty(package))
+	{
+		Assert(isObjectChangedInCurrentTrans(&package->transObject));
 		GetActualState(&package->transObject)->is_valid = false;
+	}
 
 	resetVariablesCache(true);
 }
@@ -1738,14 +1740,8 @@ rollbackSavepoint(TransObject *object, TransObjectType type)
 	state = GetActualState(object);
 	if (type == TRANS_PACKAGE)
 	{
-		if (!state->is_valid)
+		if (!state->is_valid && !isPackageEmpty((Package *)object))
 		{
-			if (isPackageEmpty((Package *)object))
-			{
-				removeObject(object, TRANS_PACKAGE);
-				return;
-			}
-
 			if (dlist_has_next(&object->states, &state->node))
 			{
 				dlist_pop_head_node(&object->states);
@@ -1777,17 +1773,38 @@ rollbackSavepoint(TransObject *object, TransObjectType type)
 static void
 releaseSavepoint(TransObject *object, TransObjectType type)
 {
-	dlist_head *states;
+	dlist_head *states = &object->states;
 	Assert(GetActualState(object)->level == GetCurrentTransactionNestLevel());
 
-	/* Mark object as changed in parent transaction... */
-	if (!dlist_is_empty(changesStack) /* ...if there is an upper level... */
-		/* ...and object is not yet in list of that level changes. */
-		&& !isObjectChangedInUpperTrans(object))
+	/*
+	 * If the object is not valid and does not exist at a higher level
+	 * (or if we complete the transaction) - remove object.
+	 */
+	if (!GetActualState(object)->is_valid &&
+			(!dlist_has_next(states, dlist_head_node(states)) ||
+			dlist_is_empty(changesStack))
+		)
+	{
+		removeObject(object, type);
+		return;
+	}
+
+ 	/* If object has been changed in upper level -
+	 * replace state of that level with the current one. */
+	if (isObjectChangedInUpperTrans(object))
+	{
+		TransState *stateToDelete;
+		dlist_node *nodeToDelete;
+		nodeToDelete = dlist_next_node(states, dlist_head_node(states));
+		stateToDelete = dlist_container(TransState, node, nodeToDelete);
+		removeState(object, type, stateToDelete);
+	}
+	/* If the object does not yet have a record in previous level changesStack,
+	 * create it. */
+	else if (!dlist_is_empty(changesStack))
 	{
 		ChangedObject *co_new;
 		ChangesStackNode *csn;
-
 		/*
 		 * Impossible to push in upper list existing node
 		 * because it was created in another context
@@ -1797,43 +1814,7 @@ releaseSavepoint(TransObject *object, TransObjectType type)
 		dlist_push_head(type == TRANS_PACKAGE ? csn->changedPacksList :
 												csn->changedVarsList,
 												&co_new->node);
-
 	}
-	else
-	{
-		states = &object->states;
-
-		/* If object existed in parent transaction... */
-		if (dlist_has_next(states, dlist_head_node(states)))
-		{
-			TransState *stateToDelete;
-			dlist_node *nodeToDelete;
-
-			/* ...remove its previous state */
-			nodeToDelete = dlist_next_node(states, dlist_head_node(states));
-			stateToDelete = dlist_container(TransState, node, nodeToDelete);
-			removeState(object, type, stateToDelete);
-		}
-
-		/*
-		 * Object has no more previous states and can be completely removed if
-		 * necessary
-		 */
-		if (!GetActualState(object)->is_valid &&
-			!dlist_has_next(states, dlist_head_node(states)))
-		{
-			removeObject(object, type);
-			/* Remove package if it became empty */
-			if (type == TRANS_VARIABLE)
-			{
-				Package *pack = ((Variable *) object)->package;
-				if (isPackageEmpty(pack))
-					(GetActualState(&pack->transObject))->is_valid = false;
-			}
-			return;
-		}
-	}
-
 	/* Change subxact level due to release */
 	GetActualState(object)->level--;
 }
@@ -1968,51 +1949,6 @@ addToChangesStack(TransObject *object, TransObjectType type)
 	}
 }
 
-/*
- * Remove from the changes list a deleted package
- */
-static void
-removeFromChangesStack(TransObject *object, TransObjectType type)
-{
-	dlist_mutable_iter var_miter,
-					   pack_miter;
-	dlist_head		  *changesList;
-	ChangesStackNode  *csn = get_actual_changes_list();
-
-	/*
-	 * If we remove package, we should remove corresponding variables
-	 * from changedVarsList first.
-	 */
-	if (type == TRANS_PACKAGE)
-	{
-		changesList = csn->changedVarsList;
-		dlist_foreach_modify(var_miter, changesList)
-		{
-			ChangedObject *co_cur = dlist_container(ChangedObject, node,
-													var_miter.cur);
-			Variable   *var = (Variable *) co_cur->object;
-
-			if (var->package == (Package *)object)
-				dlist_delete(&co_cur->node);
-		}
-	}
-	/* Now remove object itself from changes list */
-	changesList = (type == TRANS_PACKAGE ? csn->changedPacksList :
-										   csn->changedVarsList);
-	dlist_foreach_modify(pack_miter, changesList)
-	{
-		ChangedObject *co_cur = dlist_container(ChangedObject, node,
-												pack_miter.cur);
-		TransObject *obj = co_cur->object;
-
-		if (obj == object)
-		{
-			dlist_delete(&co_cur->node);
-			break;
-		}
-	}
-}
-
 /*
  * Possible actions on variables.
  * Savepoints are created in setters so we don't need a CREATE_SAVEPOINT action.
diff --git a/sql/pg_variables_trans.sql b/sql/pg_variables_trans.sql
index a5af1b2..ed4a69f 100644
--- a/sql/pg_variables_trans.sql
+++ b/sql/pg_variables_trans.sql
@@ -482,7 +482,7 @@ RELEASE comm;
 SELECT pgv_get('vars', 'any1',NULL::text);
 COMMIT;
 
--- Test for PGPRO-2440
+-- Tests for PGPRO-2440
 SELECT pgv_insert('vars3', 'r3', row(1 :: integer, NULL::varchar), true);
 BEGIN;
 SELECT pgv_insert('vars3', 'r3', row(2 :: integer, NULL::varchar), true);
@@ -491,4 +491,13 @@ SELECT pgv_insert('vars3', 'r3', row(3 :: integer, NULL::varchar), true);
 COMMIT;
 SELECT pgv_delete('vars3', 'r3', 3);
 
+BEGIN;
+SELECT pgv_set('vars1', 't1', ''::text);
+SELECT pgv_set('vars2', 't2', ''::text, true);
+SAVEPOINT sp1;
+SAVEPOINT sp2;
+SELECT pgv_free();
+ERROR;
+COMMIT;
+
 SELECT pgv_free();
