WIP: Avoid creation of the free space map for small tables

Started by John Naylorover 7 years ago181 messages
#1John Naylor
jcnaylor@gmail.com
2 attachment(s)

Hi all,
A while back, Robert Haas noticed that the space taken up by very
small tables is dominated by the FSM [1]/messages/by-id/CA+Tgmoac+6qTNp2U+wedY8-PU6kK_b6hbdhR5xYGBG3GtdFcww@mail.gmail.com. Tom suggested that we could
prevent creation of the FSM until the heap has reached a certain
threshold size [2]/messages/by-id/11360.1345502641@sss.pgh.pa.us. Attached is a WIP patch to implement that. I've
also attached a SQL script to demonstrate the change in behavior for
various scenarios.

The behavior that allows the simplest implementation I thought of is as follows:

-The FSM isn't created if the heap has fewer than 10 blocks (or
whatever). If the last known good block has insufficient space, try
every block before extending the heap.

-If a heap with a FSM is truncated back to below the threshold, the
FSM stays around and can be used as usual.

-If the heap tuples are all deleted, the FSM stays but has no leaf
blocks (same as on master). Although it exists, it won't be
re-extended until the heap re-passes the threshold.

--
Some notes:

-For normal mode, I taught fsm_set_and_search() to switch to a
non-extending buffer call, but the biggest missing piece is WAL
replay. I couldn't find a non-extending equivalent of
XLogReadBufferExtended(), so I might have to create one.

-There'll need to be some performance testing to make sure there's no
regression, and to choose a good value for the threshold. I'll look
into that, but if anyone has any ideas for tests, that'll help this
effort along.

-A possible TODO item is to teach pg_upgrade not to link FSMs for
small heaps. I haven't look into the feasibility of that, however.

-RelationGetBufferForTuple() now has two boolean variables that mean
"don't use the FSM", but with different behaviors. To avoid confusion,
I've renamed use_fsm to always_extend and revised the commentary
accordingly.

-I've only implemented this for heaps, because indexes (at least
B-tree) don't seem to be as eager to create a FSM. I haven't looked at
the code, however.

--
[1]: /messages/by-id/CA+Tgmoac+6qTNp2U+wedY8-PU6kK_b6hbdhR5xYGBG3GtdFcww@mail.gmail.com
[2]: /messages/by-id/11360.1345502641@sss.pgh.pa.us

--
I'll add this to the November commitfest.

-John Naylor

Attachments:

fsmtest.sqlapplication/sql; name=fsmtest.sqlDownload
v1-0001-Avoid-creation-of-the-free-space-map-for-small-ta.patchtext/x-patch; charset=US-ASCII; name=v1-0001-Avoid-creation-of-the-free-space-map-for-small-ta.patchDownload
From 77c85f633f915bd247c554b691a134fac1f32316 Mon Sep 17 00:00:00 2001
From: John Naylor <jcnaylor@gmail.com>
Date: Sat, 6 Oct 2018 00:35:33 +0700
Subject: [PATCH v1] Avoid creation of the free space map for small tables.

The FSM isn't created if the heap has fewer than 10 blocks. If the last
known good block has insufficient space, try every block before extending
the heap.

If a heap with a FSM is truncated back to below the threshold, the FSM
stays around and can be used as usual.

If the heap tuples are all deleted, the FSM stays but has no leaf blocks
(same as before). Although it exists, it won't be re-extended until
the heap re-passes the threshold.
---
 src/backend/access/heap/hio.c             | 60 +++++++++++++++++------
 src/backend/storage/freespace/freespace.c | 32 +++++++++++-
 src/include/storage/freespace.h           |  4 ++
 3 files changed, 79 insertions(+), 17 deletions(-)

diff --git a/src/backend/access/heap/hio.c b/src/backend/access/heap/hio.c
index b8b5871559..aadb75ee8c 100644
--- a/src/backend/access/heap/hio.c
+++ b/src/backend/access/heap/hio.c
@@ -315,7 +315,8 @@ RelationGetBufferForTuple(Relation relation, Size len,
 						  BulkInsertState bistate,
 						  Buffer *vmbuffer, Buffer *vmbuffer_other)
 {
-	bool		use_fsm = !(options & HEAP_INSERT_SKIP_FSM);
+	bool		always_extend = (options & HEAP_INSERT_SKIP_FSM),
+				visit_every_page;
 	Buffer		buffer = InvalidBuffer;
 	Page		page;
 	Size		pageFreeSpace = 0,
@@ -357,21 +358,24 @@ RelationGetBufferForTuple(Relation relation, Size len,
 	 * each page that proves not to be suitable.)  If the FSM has no record of
 	 * a page with enough free space, we give up and extend the relation.
 	 *
-	 * When use_fsm is false, we either put the tuple onto the existing target
-	 * page or extend the relation.
+	 * Special cases for when the existing target page fails:
+	 * 1. When always_extend is true, we don't bother with consulting the FSM
+	 *    and just extend the relation.
+	 * 2. When visit_every_page is true and the FSM doesn't provide any
+	 *    information, we try every page before extending the relation.
 	 */
 	if (len + saveFreeSpace > MaxHeapTupleSize)
 	{
 		/* can't fit, don't bother asking FSM */
 		targetBlock = InvalidBlockNumber;
-		use_fsm = false;
+		always_extend = true;
 	}
 	else if (bistate && bistate->current_buf != InvalidBuffer)
 		targetBlock = BufferGetBlockNumber(bistate->current_buf);
 	else
 		targetBlock = RelationGetTargetBlock(relation);
 
-	if (targetBlock == InvalidBlockNumber && use_fsm)
+	if (targetBlock == InvalidBlockNumber && !always_extend)
 	{
 		/*
 		 * We have no cached target page, so ask the FSM for an initial
@@ -389,7 +393,20 @@ RelationGetBufferForTuple(Relation relation, Size len,
 			BlockNumber nblocks = RelationGetNumberOfBlocks(relation);
 
 			if (nblocks > 0)
+			{
 				targetBlock = nblocks - 1;
+
+				/*
+				 * If the heap is small enough, it likely has no FSM.
+				 * However, if at some point the heap passed the threshold,
+				 * acquired a FSM, and was subsequently truncated to below
+				 * the threshold, the FSM remains.  Since there are so few
+				 * pages in either case, just try every page, starting with
+				 * the last page.
+				 */
+				if (nblocks <= HEAP_FSM_EXTENSION_THRESHOLD)
+					visit_every_page = true;
+			}
 		}
 	}
 
@@ -502,18 +519,29 @@ loop:
 			ReleaseBuffer(buffer);
 		}
 
-		/* Without FSM, always fall out of the loop and extend */
-		if (!use_fsm)
+		if (always_extend)
 			break;
 
-		/*
-		 * Update FSM as to condition of this page, and ask for another page
-		 * to try.
-		 */
-		targetBlock = RecordAndGetPageWithFreeSpace(relation,
-													targetBlock,
-													pageFreeSpace,
-													len + saveFreeSpace);
+		if (visit_every_page)
+		{
+			/* No pages have enough free space; extend. */
+			if (targetBlock == 0)
+				break;
+
+			/* Try the next lower page. */
+			targetBlock--;
+		}
+		else
+		{
+			/*
+			 * Update FSM as to condition of this page, and ask for another
+			 * page to try.
+			 */
+			targetBlock = RecordAndGetPageWithFreeSpace(relation,
+														targetBlock,
+														pageFreeSpace,
+														len + saveFreeSpace);
+		}
 	}
 
 	/*
@@ -534,7 +562,7 @@ loop:
 	 */
 	if (needLock)
 	{
-		if (!use_fsm)
+		if (always_extend || visit_every_page)
 			LockRelationForExtension(relation, ExclusiveLock);
 		else if (!ConditionalLockRelationForExtension(relation, ExclusiveLock))
 		{
diff --git a/src/backend/storage/freespace/freespace.c b/src/backend/storage/freespace/freespace.c
index 7c4ad1c449..abb03874b9 100644
--- a/src/backend/storage/freespace/freespace.c
+++ b/src/backend/storage/freespace/freespace.c
@@ -193,6 +193,7 @@ RecordPageWithFreeSpace(Relation rel, BlockNumber heapBlk, Size spaceAvail)
 /*
  * XLogRecordPageWithFreeSpace - like RecordPageWithFreeSpace, for use in
  *		WAL replay
+ * TODO: Avoid creating a FSM here, also.
  */
 void
 XLogRecordPageWithFreeSpace(RelFileNode rnode, BlockNumber heapBlk,
@@ -675,7 +676,36 @@ fsm_set_and_search(Relation rel, FSMAddress addr, uint16 slot,
 	Page		page;
 	int			newslot = -1;
 
-	buf = fsm_readbuf(rel, addr, true);
+	/*
+	 * For heaps we prevent extension of the FSM unless the number of pages
+	 * exceeds HEAP_FSM_EXTENSION_THRESHOLD. For tables that don't already
+	 * have a FSM, this will save an inode and a few kB of space.
+	 * For sane threshold values, the FSM address will be zero, so we
+	 * don't bother dealing with anything else.
+	 */
+	if (rel->rd_rel->relkind == RELKIND_RELATION
+		&& addr.logpageno == 0)
+	{
+		FSMAddress	threshold_addr;
+		uint16		threshold_slot;
+
+		/* Get the location in the FSM of the threshold. */
+		threshold_addr = fsm_get_location(HEAP_FSM_EXTENSION_THRESHOLD,
+										  &threshold_slot);
+		Assert(threshold_addr.logpageno == 0);
+
+		if (slot <= threshold_slot)
+		{
+			buf = fsm_readbuf(rel, addr, false);
+			if (buf == InvalidBuffer)
+				return newslot;
+		}
+		else
+			buf = fsm_readbuf(rel, addr, true);
+	}
+	else
+		buf = fsm_readbuf(rel, addr, true);
+
 	LockBuffer(buf, BUFFER_LOCK_EXCLUSIVE);
 
 	page = BufferGetPage(buf);
diff --git a/src/include/storage/freespace.h b/src/include/storage/freespace.h
index 726eb30fb8..68e4d27818 100644
--- a/src/include/storage/freespace.h
+++ b/src/include/storage/freespace.h
@@ -18,6 +18,10 @@
 #include "storage/relfilenode.h"
 #include "utils/relcache.h"
 
+/* Only extend a heap's FSM if the heap has greater than this many blocks */
+/* TODO: Performance-test different values. */
+#define HEAP_FSM_EXTENSION_THRESHOLD 10
+
 /* prototypes for public functions in freespace.c */
 extern Size GetRecordedFreeSpace(Relation rel, BlockNumber heapBlk);
 extern BlockNumber GetPageWithFreeSpace(Relation rel, Size spaceNeeded);
-- 
2.17.1

#2Thomas Munro
thomas.munro@enterprisedb.com
In reply to: John Naylor (#1)
Re: WIP: Avoid creation of the free space map for small tables

On Sat, Oct 6, 2018 at 7:47 AM John Naylor <jcnaylor@gmail.com> wrote:

A while back, Robert Haas noticed that the space taken up by very
small tables is dominated by the FSM [1]. Tom suggested that we could
prevent creation of the FSM until the heap has reached a certain
threshold size [2]. Attached is a WIP patch to implement that. I've
also attached a SQL script to demonstrate the change in behavior for
various scenarios.

Hi John,

You'll need to tweak the test in contrib/pageinspect/sql/page.sql,
because it's currently asserting that there is an FSM on a small table
so make check-world fails.

--
Thomas Munro
http://www.enterprisedb.com

#3John Naylor
jcnaylor@gmail.com
In reply to: Thomas Munro (#2)
1 attachment(s)
Re: WIP: Avoid creation of the free space map for small tables

On 10/6/18, Thomas Munro <thomas.munro@enterprisedb.com> wrote:

On Sat, Oct 6, 2018 at 7:47 AM John Naylor <jcnaylor@gmail.com> wrote:

A while back, Robert Haas noticed that the space taken up by very
small tables is dominated by the FSM [1]. Tom suggested that we could
prevent creation of the FSM until the heap has reached a certain
threshold size [2]. Attached is a WIP patch to implement that. I've
also attached a SQL script to demonstrate the change in behavior for
various scenarios.

Hi John,

You'll need to tweak the test in contrib/pageinspect/sql/page.sql,
because it's currently asserting that there is an FSM on a small table
so make check-world fails.

Whoops, sorry about that; the attached patch passes make check-world.
While looking into that, I also found a regression: If the cached
target block is the last block in the relation and there is no free
space, that block will be tried twice. That's been fixed as well.

Thanks,
-John Naylor

Attachments:

v2-0001-Avoid-creation-of-the-free-space-map-for-small-ta.patchtext/x-patch; charset=US-ASCII; name=v2-0001-Avoid-creation-of-the-free-space-map-for-small-ta.patchDownload
From 49c80647737edfaae82014f2c94a84114f3688f6 Mon Sep 17 00:00:00 2001
From: John Naylor <jcnaylor@gmail.com>
Date: Sun, 7 Oct 2018 21:34:23 +0700
Subject: [PATCH v2] Avoid creation of the free space map for small tables.

The FSM isn't created if the heap has fewer than 10 blocks. If the last
known good block has insufficient space, try every block before extending
the heap.

If a heap with a FSM is truncated back to below the threshold, the FSM
stays around and can be used as usual.

If the heap tuples are all deleted, the FSM stays but has no leaf blocks
(same as before). Although it exists, it won't be re-extended until
the heap passes the threshold again.
---
 contrib/pageinspect/expected/page.out     | 77 +++++++++---------
 contrib/pageinspect/sql/page.sql          | 33 +++++---
 src/backend/access/heap/hio.c             | 96 +++++++++++++++++------
 src/backend/storage/freespace/freespace.c | 35 ++++++++-
 src/include/storage/freespace.h           |  4 +
 5 files changed, 169 insertions(+), 76 deletions(-)

diff --git a/contrib/pageinspect/expected/page.out b/contrib/pageinspect/expected/page.out
index 3fcd9fbe6d..83e5910453 100644
--- a/contrib/pageinspect/expected/page.out
+++ b/contrib/pageinspect/expected/page.out
@@ -1,48 +1,69 @@
 CREATE EXTENSION pageinspect;
-CREATE TABLE test1 (a int, b int);
-INSERT INTO test1 VALUES (16777217, 131584);
-VACUUM test1;  -- set up FSM
+CREATE TABLE test_rel_forks (a int);
+-- Make sure there are enough blocks in the heap for the FSM to be created.
+INSERT INTO test_rel_forks SELECT g from generate_series(1,10000) g;
+-- set up FSM and VM
+VACUUM test_rel_forks;
 -- The page contents can vary, so just test that it can be read
 -- successfully, but don't keep the output.
-SELECT octet_length(get_raw_page('test1', 'main', 0)) AS main_0;
+SELECT octet_length(get_raw_page('test_rel_forks', 'main', 0)) AS main_0;
  main_0 
 --------
    8192
 (1 row)
 
-SELECT octet_length(get_raw_page('test1', 'main', 1)) AS main_1;
-ERROR:  block number 1 is out of range for relation "test1"
-SELECT octet_length(get_raw_page('test1', 'fsm', 0)) AS fsm_0;
+SELECT octet_length(get_raw_page('test_rel_forks', 'main', 100)) AS main_100;
+ERROR:  block number 100 is out of range for relation "test_rel_forks"
+SELECT octet_length(get_raw_page('test_rel_forks', 'fsm', 0)) AS fsm_0;
  fsm_0 
 -------
   8192
 (1 row)
 
-SELECT octet_length(get_raw_page('test1', 'fsm', 1)) AS fsm_1;
- fsm_1 
--------
-  8192
-(1 row)
-
-SELECT octet_length(get_raw_page('test1', 'vm', 0)) AS vm_0;
+SELECT octet_length(get_raw_page('test_rel_forks', 'fsm', 10)) AS fsm_10;
+ERROR:  block number 10 is out of range for relation "test_rel_forks"
+SELECT octet_length(get_raw_page('test_rel_forks', 'vm', 0)) AS vm_0;
  vm_0 
 ------
  8192
 (1 row)
 
-SELECT octet_length(get_raw_page('test1', 'vm', 1)) AS vm_1;
-ERROR:  block number 1 is out of range for relation "test1"
+SELECT octet_length(get_raw_page('test_rel_forks', 'vm', 1)) AS vm_1;
+ERROR:  block number 1 is out of range for relation "test_rel_forks"
 SELECT octet_length(get_raw_page('xxx', 'main', 0));
 ERROR:  relation "xxx" does not exist
-SELECT octet_length(get_raw_page('test1', 'xxx', 0));
+SELECT octet_length(get_raw_page('test_rel_forks', 'xxx', 0));
 ERROR:  invalid fork name
 HINT:  Valid fork names are "main", "fsm", "vm", and "init".
-SELECT get_raw_page('test1', 0) = get_raw_page('test1', 'main', 0);
+SELECT * FROM fsm_page_contents(get_raw_page('test_rel_forks', 'fsm', 0));
+ fsm_page_contents 
+-------------------
+ 0: 192           +
+ 1: 192           +
+ 3: 192           +
+ 7: 192           +
+ 15: 192          +
+ 31: 192          +
+ 63: 192          +
+ 127: 192         +
+ 255: 192         +
+ 511: 192         +
+ 1023: 192        +
+ 2047: 192        +
+ 4095: 192        +
+ fp_next_slot: 0  +
+ 
+(1 row)
+
+SELECT get_raw_page('test_rel_forks', 0) = get_raw_page('test_rel_forks', 'main', 0);
  ?column? 
 ----------
  t
 (1 row)
 
+DROP TABLE test_rel_forks;
+CREATE TABLE test1 (a int, b int);
+INSERT INTO test1 VALUES (16777217, 131584);
 SELECT pagesize, version FROM page_header(get_raw_page('test1', 0));
  pagesize | version 
 ----------+---------
@@ -62,26 +83,6 @@ SELECT tuple_data_split('test1'::regclass, t_data, t_infomask, t_infomask2, t_bi
  {"\\x01000001","\\x00020200"}
 (1 row)
 
-SELECT * FROM fsm_page_contents(get_raw_page('test1', 'fsm', 0));
- fsm_page_contents 
--------------------
- 0: 254           +
- 1: 254           +
- 3: 254           +
- 7: 254           +
- 15: 254          +
- 31: 254          +
- 63: 254          +
- 127: 254         +
- 255: 254         +
- 511: 254         +
- 1023: 254        +
- 2047: 254        +
- 4095: 254        +
- fp_next_slot: 0  +
- 
-(1 row)
-
 DROP TABLE test1;
 -- check that using any of these functions with a partitioned table or index
 -- would fail
diff --git a/contrib/pageinspect/sql/page.sql b/contrib/pageinspect/sql/page.sql
index 8ac9991837..ee811759d5 100644
--- a/contrib/pageinspect/sql/page.sql
+++ b/contrib/pageinspect/sql/page.sql
@@ -1,26 +1,35 @@
 CREATE EXTENSION pageinspect;
 
-CREATE TABLE test1 (a int, b int);
-INSERT INTO test1 VALUES (16777217, 131584);
+CREATE TABLE test_rel_forks (a int);
+-- Make sure there are enough blocks in the heap for the FSM to be created.
+INSERT INTO test_rel_forks SELECT g from generate_series(1,10000) g;
 
-VACUUM test1;  -- set up FSM
+-- set up FSM and VM
+VACUUM test_rel_forks;
 
 -- The page contents can vary, so just test that it can be read
 -- successfully, but don't keep the output.
 
-SELECT octet_length(get_raw_page('test1', 'main', 0)) AS main_0;
-SELECT octet_length(get_raw_page('test1', 'main', 1)) AS main_1;
+SELECT octet_length(get_raw_page('test_rel_forks', 'main', 0)) AS main_0;
+SELECT octet_length(get_raw_page('test_rel_forks', 'main', 100)) AS main_100;
 
-SELECT octet_length(get_raw_page('test1', 'fsm', 0)) AS fsm_0;
-SELECT octet_length(get_raw_page('test1', 'fsm', 1)) AS fsm_1;
+SELECT octet_length(get_raw_page('test_rel_forks', 'fsm', 0)) AS fsm_0;
+SELECT octet_length(get_raw_page('test_rel_forks', 'fsm', 10)) AS fsm_10;
 
-SELECT octet_length(get_raw_page('test1', 'vm', 0)) AS vm_0;
-SELECT octet_length(get_raw_page('test1', 'vm', 1)) AS vm_1;
+SELECT octet_length(get_raw_page('test_rel_forks', 'vm', 0)) AS vm_0;
+SELECT octet_length(get_raw_page('test_rel_forks', 'vm', 1)) AS vm_1;
 
 SELECT octet_length(get_raw_page('xxx', 'main', 0));
-SELECT octet_length(get_raw_page('test1', 'xxx', 0));
+SELECT octet_length(get_raw_page('test_rel_forks', 'xxx', 0));
+
+SELECT * FROM fsm_page_contents(get_raw_page('test_rel_forks', 'fsm', 0));
+
+SELECT get_raw_page('test_rel_forks', 0) = get_raw_page('test_rel_forks', 'main', 0);
 
-SELECT get_raw_page('test1', 0) = get_raw_page('test1', 'main', 0);
+DROP TABLE test_rel_forks;
+
+CREATE TABLE test1 (a int, b int);
+INSERT INTO test1 VALUES (16777217, 131584);
 
 SELECT pagesize, version FROM page_header(get_raw_page('test1', 0));
 
@@ -29,8 +38,6 @@ SELECT page_checksum(get_raw_page('test1', 0), 0) IS NOT NULL AS silly_checksum_
 SELECT tuple_data_split('test1'::regclass, t_data, t_infomask, t_infomask2, t_bits)
     FROM heap_page_items(get_raw_page('test1', 0));
 
-SELECT * FROM fsm_page_contents(get_raw_page('test1', 'fsm', 0));
-
 DROP TABLE test1;
 
 -- check that using any of these functions with a partitioned table or index
diff --git a/src/backend/access/heap/hio.c b/src/backend/access/heap/hio.c
index b8b5871559..c40bc80a6e 100644
--- a/src/backend/access/heap/hio.c
+++ b/src/backend/access/heap/hio.c
@@ -315,13 +315,15 @@ RelationGetBufferForTuple(Relation relation, Size len,
 						  BulkInsertState bistate,
 						  Buffer *vmbuffer, Buffer *vmbuffer_other)
 {
-	bool		use_fsm = !(options & HEAP_INSERT_SKIP_FSM);
+	bool		always_extend = (options & HEAP_INSERT_SKIP_FSM),
+				try_every_page = false;
 	Buffer		buffer = InvalidBuffer;
 	Page		page;
 	Size		pageFreeSpace = 0,
 				saveFreeSpace = 0;
 	BlockNumber targetBlock,
-				otherBlock;
+				otherBlock,
+				prevBlockAttempted = InvalidBlockNumber;
 	bool		needLock;
 
 	len = MAXALIGN(len);		/* be conservative */
@@ -357,21 +359,24 @@ RelationGetBufferForTuple(Relation relation, Size len,
 	 * each page that proves not to be suitable.)  If the FSM has no record of
 	 * a page with enough free space, we give up and extend the relation.
 	 *
-	 * When use_fsm is false, we either put the tuple onto the existing target
-	 * page or extend the relation.
+	 * Special cases for when the existing target page fails:
+	 * 1. When always_extend is true, we don't bother with consulting the FSM
+	 *    and just extend the relation.
+	 * 2. When try_every_page is true and the FSM doesn't provide any
+	 *    information, we try every page before extending the relation.
 	 */
 	if (len + saveFreeSpace > MaxHeapTupleSize)
 	{
 		/* can't fit, don't bother asking FSM */
 		targetBlock = InvalidBlockNumber;
-		use_fsm = false;
+		always_extend = true;
 	}
 	else if (bistate && bistate->current_buf != InvalidBuffer)
 		targetBlock = BufferGetBlockNumber(bistate->current_buf);
 	else
 		targetBlock = RelationGetTargetBlock(relation);
 
-	if (targetBlock == InvalidBlockNumber && use_fsm)
+	if (targetBlock == InvalidBlockNumber && !always_extend)
 	{
 		/*
 		 * We have no cached target page, so ask the FSM for an initial
@@ -380,22 +385,50 @@ RelationGetBufferForTuple(Relation relation, Size len,
 		targetBlock = GetPageWithFreeSpace(relation, len + saveFreeSpace);
 
 		/*
-		 * If the FSM knows nothing of the rel, try the last page before we
-		 * give up and extend.  This avoids one-tuple-per-page syndrome during
-		 * bootstrapping or in a recently-started system.
+		 * If the FSM has no information, try the last page in the
+		 * relation if we haven't already.  This avoids one-tuple-per-page
+		 * syndrome during bootstrapping or in a recently-started system.
 		 */
+check_fsm:
 		if (targetBlock == InvalidBlockNumber)
 		{
 			BlockNumber nblocks = RelationGetNumberOfBlocks(relation);
 
 			if (nblocks > 0)
+			{
 				targetBlock = nblocks - 1;
+
+				/*
+				 * If the heap is small enough, it likely has no FSM (or a
+				 * truncated one), but even if it does, just try every page.
+				 */
+				if (nblocks <= HEAP_FSM_EXTENSION_THRESHOLD)
+				{
+					try_every_page = true;
+
+					/* If we already tried the last page, skip it. */
+					if (targetBlock == prevBlockAttempted)
+					{
+						if (nblocks > 1)
+							targetBlock--;
+						else
+							targetBlock = InvalidBlockNumber;
+					}
+				}
+				else
+				{
+					/* If we already tried the last page, extend. */
+					if (targetBlock == prevBlockAttempted)
+						targetBlock = InvalidBlockNumber;
+				}
+			}
 		}
 	}
 
-loop:
+check_buffer:
 	while (targetBlock != InvalidBlockNumber)
 	{
+		prevBlockAttempted = targetBlock;
 		/*
 		 * Read and exclusive-lock the target block, as well as the other
 		 * block if one was given, taking suitable care with lock ordering and
@@ -502,18 +535,30 @@ loop:
 			ReleaseBuffer(buffer);
 		}
 
-		/* Without FSM, always fall out of the loop and extend */
-		if (!use_fsm)
+		if (always_extend)
 			break;
 
-		/*
-		 * Update FSM as to condition of this page, and ask for another page
-		 * to try.
-		 */
-		targetBlock = RecordAndGetPageWithFreeSpace(relation,
-													targetBlock,
-													pageFreeSpace,
-													len + saveFreeSpace);
+		if (try_every_page)
+		{
+			/* We've tried every page; extend. */
+			if (targetBlock == 0)
+				break;
+
+			/* Try the next lower page. */
+			targetBlock--;
+		}
+		else
+		{
+			/*
+			 * Update FSM as to condition of this page, and ask for another
+			 * page to try.
+			 */
+			targetBlock = RecordAndGetPageWithFreeSpace(relation,
+														targetBlock,
+														pageFreeSpace,
+														len + saveFreeSpace);
+			goto check_fsm;
+		}
 	}
 
 	/*
@@ -534,7 +579,7 @@ loop:
 	 */
 	if (needLock)
 	{
-		if (!use_fsm)
+		if (always_extend || try_every_page)
 			LockRelationForExtension(relation, ExclusiveLock);
 		else if (!ConditionalLockRelationForExtension(relation, ExclusiveLock))
 		{
@@ -554,7 +599,14 @@ loop:
 			if (targetBlock != InvalidBlockNumber)
 			{
 				UnlockRelationForExtension(relation, ExclusiveLock);
-				goto loop;
+
+				/*
+				 * This shouldn't be true, but it doesn't hurt to be paranoid
+				 * about excessive looping.
+				 */
+				try_every_page = false;
+
+				goto check_buffer;
 			}
 
 			/* Time to bulk-extend. */
diff --git a/src/backend/storage/freespace/freespace.c b/src/backend/storage/freespace/freespace.c
index 7c4ad1c449..0fceca57f9 100644
--- a/src/backend/storage/freespace/freespace.c
+++ b/src/backend/storage/freespace/freespace.c
@@ -125,8 +125,7 @@ static uint8 fsm_vacuum_page(Relation rel, FSMAddress addr,
  * will turn out to have too little space available by the time the caller
  * gets a lock on it.  In that case, the caller should report the actual
  * amount of free space available on that page and then try again (see
- * RecordAndGetPageWithFreeSpace).  If InvalidBlockNumber is returned,
- * extend the relation.
+ * RecordAndGetPageWithFreeSpace).
  */
 BlockNumber
 GetPageWithFreeSpace(Relation rel, Size spaceNeeded)
@@ -193,6 +192,7 @@ RecordPageWithFreeSpace(Relation rel, BlockNumber heapBlk, Size spaceAvail)
 /*
  * XLogRecordPageWithFreeSpace - like RecordPageWithFreeSpace, for use in
  *		WAL replay
+ * TODO: Avoid creating a FSM here, also.
  */
 void
 XLogRecordPageWithFreeSpace(RelFileNode rnode, BlockNumber heapBlk,
@@ -675,7 +675,36 @@ fsm_set_and_search(Relation rel, FSMAddress addr, uint16 slot,
 	Page		page;
 	int			newslot = -1;
 
-	buf = fsm_readbuf(rel, addr, true);
+	/*
+	 * For heaps we prevent extension of the FSM unless the number of pages
+	 * exceeds HEAP_FSM_EXTENSION_THRESHOLD. For tables that don't already
+	 * have a FSM, this will save an inode and a few kB of space.
+	 * For sane threshold values, the FSM address will be zero, so we
+	 * don't bother dealing with anything else.
+	 */
+	if (rel->rd_rel->relkind == RELKIND_RELATION
+		&& addr.logpageno == 0)
+	{
+		FSMAddress	threshold_addr;
+		uint16		threshold_slot;
+
+		/* Get the location in the FSM of the threshold. */
+		threshold_addr = fsm_get_location(HEAP_FSM_EXTENSION_THRESHOLD,
+										  &threshold_slot);
+		Assert(threshold_addr.logpageno == 0);
+
+		if (slot <= threshold_slot)
+		{
+			buf = fsm_readbuf(rel, addr, false);
+			if (buf == InvalidBuffer)
+				return newslot;
+		}
+		else
+			buf = fsm_readbuf(rel, addr, true);
+	}
+	else
+		buf = fsm_readbuf(rel, addr, true);
+
 	LockBuffer(buf, BUFFER_LOCK_EXCLUSIVE);
 
 	page = BufferGetPage(buf);
diff --git a/src/include/storage/freespace.h b/src/include/storage/freespace.h
index 726eb30fb8..68e4d27818 100644
--- a/src/include/storage/freespace.h
+++ b/src/include/storage/freespace.h
@@ -18,6 +18,10 @@
 #include "storage/relfilenode.h"
 #include "utils/relcache.h"
 
+/* Only extend a heap's FSM if the heap has greater than this many blocks */
+/* TODO: Performance-test different values. */
+#define HEAP_FSM_EXTENSION_THRESHOLD 10
+
 /* prototypes for public functions in freespace.c */
 extern Size GetRecordedFreeSpace(Relation rel, BlockNumber heapBlk);
 extern BlockNumber GetPageWithFreeSpace(Relation rel, Size spaceNeeded);
-- 
2.17.1

#4Tom Lane
tgl@sss.pgh.pa.us
In reply to: John Naylor (#3)
Re: WIP: Avoid creation of the free space map for small tables

John Naylor <jcnaylor@gmail.com> writes:

On 10/6/18, Thomas Munro <thomas.munro@enterprisedb.com> wrote:

On Sat, Oct 6, 2018 at 7:47 AM John Naylor <jcnaylor@gmail.com> wrote:

A while back, Robert Haas noticed that the space taken up by very
small tables is dominated by the FSM [1]. Tom suggested that we could
prevent creation of the FSM until the heap has reached a certain
threshold size [2]. Attached is a WIP patch to implement that.

BTW, don't we need a similar hack for visibility maps?

regards, tom lane

#5John Naylor
jcnaylor@gmail.com
In reply to: Tom Lane (#4)
Re: WIP: Avoid creation of the free space map for small tables

On 10/7/18, Tom Lane <tgl@sss.pgh.pa.us> wrote:

John Naylor <jcnaylor@gmail.com> writes:

On 10/6/18, Thomas Munro <thomas.munro@enterprisedb.com> wrote:

On Sat, Oct 6, 2018 at 7:47 AM John Naylor <jcnaylor@gmail.com> wrote:

A while back, Robert Haas noticed that the space taken up by very
small tables is dominated by the FSM [1]. Tom suggested that we could
prevent creation of the FSM until the heap has reached a certain
threshold size [2]. Attached is a WIP patch to implement that.

BTW, don't we need a similar hack for visibility maps?

The FSM is the bigger bang for the buck, and fairly simple to do, but
it would be nice to do something about VMs as well. I'm not sure if
simply lacking a VM would be as simple (or as free of downsides) as
for the FSM. I haven't studied the VM code in detail, however.

-John Naylor

#6Amit Kapila
amit.kapila16@gmail.com
In reply to: John Naylor (#1)
Re: WIP: Avoid creation of the free space map for small tables

On Sat, Oct 6, 2018 at 12:17 AM John Naylor <jcnaylor@gmail.com> wrote:

-There'll need to be some performance testing to make sure there's no
regression, and to choose a good value for the threshold. I'll look
into that, but if anyone has any ideas for tests, that'll help this
effort along.

Can you try with a Copy command which copies just enough tuples to
fill the pages equivalent to HEAP_FSM_EXTENSION_THRESHOLD? It seems
to me in such a case patch will try each of the blocks multiple times.
It looks quite lame that we have to try again and again the blocks
which we have just filled by ourselves but may be that doesn't matter
much as the threshold value is small.

--
With Regards,
Amit Kapila.
EnterpriseDB: http://www.enterprisedb.com

#7Amit Kapila
amit.kapila16@gmail.com
In reply to: John Naylor (#1)
Re: WIP: Avoid creation of the free space map for small tables

On Sat, Oct 6, 2018 at 12:17 AM John Naylor <jcnaylor@gmail.com> wrote:

Hi all,
A while back, Robert Haas noticed that the space taken up by very
small tables is dominated by the FSM [1]. Tom suggested that we could
prevent creation of the FSM until the heap has reached a certain
threshold size [2]. Attached is a WIP patch to implement that. I've
also attached a SQL script to demonstrate the change in behavior for
various scenarios.

The behavior that allows the simplest implementation I thought of is as follows:

-The FSM isn't created if the heap has fewer than 10 blocks (or
whatever). If the last known good block has insufficient space, try
every block before extending the heap.

-If a heap with a FSM is truncated back to below the threshold, the
FSM stays around and can be used as usual.

-If the heap tuples are all deleted, the FSM stays but has no leaf
blocks (same as on master). Although it exists, it won't be
re-extended until the heap re-passes the threshold.

--
Some notes:

-For normal mode, I taught fsm_set_and_search() to switch to a
non-extending buffer call, but the biggest missing piece is WAL
replay.

fsm_set_and_search()
{
..
+ /*
+ * For heaps we prevent extension of the FSM unless the number of pages
+ * exceeds
HEAP_FSM_EXTENSION_THRESHOLD. For tables that don't already
+ * have a FSM, this will save an inode and a few kB
of space.
+ * For sane threshold values, the FSM address will be zero, so we
+ * don't bother dealing with
anything else.
+ */
+ if (rel->rd_rel->relkind == RELKIND_RELATION
+ && addr.logpageno == 0)

I am not sure if this is a solid way to avoid creating FSM. What if
fsm_set_and_search gets called for the level other than 0? Also,
when the relation has blocks more than HEAP_FSM_EXTENSION_THRESHOLD,
then first time when vacuum will try to record the free space in the
page, won't it skip recording free space for first
HEAP_FSM_EXTENSION_THRESHOLD pages?

I think you have found a good way to avoid creating FSM, but can't we
use some simpler technique like if the FSM fork for a relation doesn't
exist, then check the heapblk number for which we try to update the
FSM and if it is lesser than HEAP_FSM_EXTENSION_THRESHOLD, then avoid
creating the FSM.

I couldn't find a non-extending equivalent of
XLogReadBufferExtended(), so I might have to create one.

I think it would be better if we can find a common way to avoid
creating FSM both during DO and REDO time. It might be possible if
somethin like what I have said above is feasible.

--
With Regards,
Amit Kapila.
EnterpriseDB: http://www.enterprisedb.com

#8John Naylor
jcnaylor@gmail.com
In reply to: Amit Kapila (#7)
1 attachment(s)
Re: WIP: Avoid creation of the free space map for small tables

On 10/13/18, Amit Kapila <amit.kapila16@gmail.com> wrote:

On Sat, Oct 6, 2018 at 12:17 AM John Naylor <jcnaylor@gmail.com> wrote:

-For normal mode, I taught fsm_set_and_search() to switch to a
non-extending buffer call, but the biggest missing piece is WAL
replay.

fsm_set_and_search()
{
..
+ /*
+ * For heaps we prevent extension of the FSM unless the number of pages
+ * exceeds
HEAP_FSM_EXTENSION_THRESHOLD. For tables that don't already
+ * have a FSM, this will save an inode and a few kB
of space.
+ * For sane threshold values, the FSM address will be zero, so we
+ * don't bother dealing with
anything else.
+ */
+ if (rel->rd_rel->relkind == RELKIND_RELATION
+ && addr.logpageno == 0)

I am not sure if this is a solid way to avoid creating FSM. What if
fsm_set_and_search gets called for the level other than 0?

Thanks for taking a look. As for levels other than 0, I think that
only happens when fsm_set_and_search() is called by fsm_search(),
which will not cause extension.

Also,
when the relation has blocks more than HEAP_FSM_EXTENSION_THRESHOLD,
then first time when vacuum will try to record the free space in the
page, won't it skip recording free space for first
HEAP_FSM_EXTENSION_THRESHOLD pages?

Hmm, that's a good point.

I think you have found a good way to avoid creating FSM, but can't we
use some simpler technique like if the FSM fork for a relation doesn't
exist, then check the heapblk number for which we try to update the
FSM and if it is lesser than HEAP_FSM_EXTENSION_THRESHOLD, then avoid
creating the FSM.

I think I see what you mean, but to avoid the vacuum problem you just
mentioned, we'd need to check the relation size, too. I've attached an
unpolished revision to do this. It seems to work, but I haven't tested
the vacuum issue yet. I'll do that and some COPY performance testing
in the next day or so. There's a bit more repetition than I would
like, so I'm not sure it's simpler - perhaps RecordPageWithFreeSpace()
could be turned into a wrapper around RecordAndGetPageWithFreeSpace().

Also new in this version, some non-functional improvements to hio.c:
-debugging calls that are #ifdef'd out.
-move some code out into a function instead of adding another goto.

I couldn't find a non-extending equivalent of
XLogReadBufferExtended(), so I might have to create one.

I think it would be better if we can find a common way to avoid
creating FSM both during DO and REDO time. It might be possible if
somethin like what I have said above is feasible.

That would be ideal.

-John Naylor

Attachments:

v3-0001-Avoid-creation-of-the-free-space-map-for-small-ta.patchtext/x-patch; charset=US-ASCII; name=v3-0001-Avoid-creation-of-the-free-space-map-for-small-ta.patchDownload
From e40e94071f998d0b8a04a1116de5d22aa8cd355c Mon Sep 17 00:00:00 2001
From: John Naylor <jcnaylor@gmail.com>
Date: Sun, 14 Oct 2018 02:25:34 +0700
Subject: [PATCH v3] Avoid creation of the free space map for small tables.

The FSM isn't created if the heap has fewer than 10 blocks. If the last
known good block has insufficient space, try every block before extending
the heap.

If a heap with a FSM is truncated back to below the threshold, the FSM
stays around and can be used as usual.
---
 contrib/pageinspect/expected/page.out     |  77 ++++++------
 contrib/pageinspect/sql/page.sql          |  33 ++++--
 src/backend/access/heap/hio.c             | 137 +++++++++++++++++-----
 src/backend/storage/freespace/freespace.c |  95 +++++++++++----
 src/include/storage/freespace.h           |   4 +
 5 files changed, 244 insertions(+), 102 deletions(-)

diff --git a/contrib/pageinspect/expected/page.out b/contrib/pageinspect/expected/page.out
index 3fcd9fbe6d..83e5910453 100644
--- a/contrib/pageinspect/expected/page.out
+++ b/contrib/pageinspect/expected/page.out
@@ -1,48 +1,69 @@
 CREATE EXTENSION pageinspect;
-CREATE TABLE test1 (a int, b int);
-INSERT INTO test1 VALUES (16777217, 131584);
-VACUUM test1;  -- set up FSM
+CREATE TABLE test_rel_forks (a int);
+-- Make sure there are enough blocks in the heap for the FSM to be created.
+INSERT INTO test_rel_forks SELECT g from generate_series(1,10000) g;
+-- set up FSM and VM
+VACUUM test_rel_forks;
 -- The page contents can vary, so just test that it can be read
 -- successfully, but don't keep the output.
-SELECT octet_length(get_raw_page('test1', 'main', 0)) AS main_0;
+SELECT octet_length(get_raw_page('test_rel_forks', 'main', 0)) AS main_0;
  main_0 
 --------
    8192
 (1 row)
 
-SELECT octet_length(get_raw_page('test1', 'main', 1)) AS main_1;
-ERROR:  block number 1 is out of range for relation "test1"
-SELECT octet_length(get_raw_page('test1', 'fsm', 0)) AS fsm_0;
+SELECT octet_length(get_raw_page('test_rel_forks', 'main', 100)) AS main_100;
+ERROR:  block number 100 is out of range for relation "test_rel_forks"
+SELECT octet_length(get_raw_page('test_rel_forks', 'fsm', 0)) AS fsm_0;
  fsm_0 
 -------
   8192
 (1 row)
 
-SELECT octet_length(get_raw_page('test1', 'fsm', 1)) AS fsm_1;
- fsm_1 
--------
-  8192
-(1 row)
-
-SELECT octet_length(get_raw_page('test1', 'vm', 0)) AS vm_0;
+SELECT octet_length(get_raw_page('test_rel_forks', 'fsm', 10)) AS fsm_10;
+ERROR:  block number 10 is out of range for relation "test_rel_forks"
+SELECT octet_length(get_raw_page('test_rel_forks', 'vm', 0)) AS vm_0;
  vm_0 
 ------
  8192
 (1 row)
 
-SELECT octet_length(get_raw_page('test1', 'vm', 1)) AS vm_1;
-ERROR:  block number 1 is out of range for relation "test1"
+SELECT octet_length(get_raw_page('test_rel_forks', 'vm', 1)) AS vm_1;
+ERROR:  block number 1 is out of range for relation "test_rel_forks"
 SELECT octet_length(get_raw_page('xxx', 'main', 0));
 ERROR:  relation "xxx" does not exist
-SELECT octet_length(get_raw_page('test1', 'xxx', 0));
+SELECT octet_length(get_raw_page('test_rel_forks', 'xxx', 0));
 ERROR:  invalid fork name
 HINT:  Valid fork names are "main", "fsm", "vm", and "init".
-SELECT get_raw_page('test1', 0) = get_raw_page('test1', 'main', 0);
+SELECT * FROM fsm_page_contents(get_raw_page('test_rel_forks', 'fsm', 0));
+ fsm_page_contents 
+-------------------
+ 0: 192           +
+ 1: 192           +
+ 3: 192           +
+ 7: 192           +
+ 15: 192          +
+ 31: 192          +
+ 63: 192          +
+ 127: 192         +
+ 255: 192         +
+ 511: 192         +
+ 1023: 192        +
+ 2047: 192        +
+ 4095: 192        +
+ fp_next_slot: 0  +
+ 
+(1 row)
+
+SELECT get_raw_page('test_rel_forks', 0) = get_raw_page('test_rel_forks', 'main', 0);
  ?column? 
 ----------
  t
 (1 row)
 
+DROP TABLE test_rel_forks;
+CREATE TABLE test1 (a int, b int);
+INSERT INTO test1 VALUES (16777217, 131584);
 SELECT pagesize, version FROM page_header(get_raw_page('test1', 0));
  pagesize | version 
 ----------+---------
@@ -62,26 +83,6 @@ SELECT tuple_data_split('test1'::regclass, t_data, t_infomask, t_infomask2, t_bi
  {"\\x01000001","\\x00020200"}
 (1 row)
 
-SELECT * FROM fsm_page_contents(get_raw_page('test1', 'fsm', 0));
- fsm_page_contents 
--------------------
- 0: 254           +
- 1: 254           +
- 3: 254           +
- 7: 254           +
- 15: 254          +
- 31: 254          +
- 63: 254          +
- 127: 254         +
- 255: 254         +
- 511: 254         +
- 1023: 254        +
- 2047: 254        +
- 4095: 254        +
- fp_next_slot: 0  +
- 
-(1 row)
-
 DROP TABLE test1;
 -- check that using any of these functions with a partitioned table or index
 -- would fail
diff --git a/contrib/pageinspect/sql/page.sql b/contrib/pageinspect/sql/page.sql
index 8ac9991837..ee811759d5 100644
--- a/contrib/pageinspect/sql/page.sql
+++ b/contrib/pageinspect/sql/page.sql
@@ -1,26 +1,35 @@
 CREATE EXTENSION pageinspect;
 
-CREATE TABLE test1 (a int, b int);
-INSERT INTO test1 VALUES (16777217, 131584);
+CREATE TABLE test_rel_forks (a int);
+-- Make sure there are enough blocks in the heap for the FSM to be created.
+INSERT INTO test_rel_forks SELECT g from generate_series(1,10000) g;
 
-VACUUM test1;  -- set up FSM
+-- set up FSM and VM
+VACUUM test_rel_forks;
 
 -- The page contents can vary, so just test that it can be read
 -- successfully, but don't keep the output.
 
-SELECT octet_length(get_raw_page('test1', 'main', 0)) AS main_0;
-SELECT octet_length(get_raw_page('test1', 'main', 1)) AS main_1;
+SELECT octet_length(get_raw_page('test_rel_forks', 'main', 0)) AS main_0;
+SELECT octet_length(get_raw_page('test_rel_forks', 'main', 100)) AS main_100;
 
-SELECT octet_length(get_raw_page('test1', 'fsm', 0)) AS fsm_0;
-SELECT octet_length(get_raw_page('test1', 'fsm', 1)) AS fsm_1;
+SELECT octet_length(get_raw_page('test_rel_forks', 'fsm', 0)) AS fsm_0;
+SELECT octet_length(get_raw_page('test_rel_forks', 'fsm', 10)) AS fsm_10;
 
-SELECT octet_length(get_raw_page('test1', 'vm', 0)) AS vm_0;
-SELECT octet_length(get_raw_page('test1', 'vm', 1)) AS vm_1;
+SELECT octet_length(get_raw_page('test_rel_forks', 'vm', 0)) AS vm_0;
+SELECT octet_length(get_raw_page('test_rel_forks', 'vm', 1)) AS vm_1;
 
 SELECT octet_length(get_raw_page('xxx', 'main', 0));
-SELECT octet_length(get_raw_page('test1', 'xxx', 0));
+SELECT octet_length(get_raw_page('test_rel_forks', 'xxx', 0));
+
+SELECT * FROM fsm_page_contents(get_raw_page('test_rel_forks', 'fsm', 0));
+
+SELECT get_raw_page('test_rel_forks', 0) = get_raw_page('test_rel_forks', 'main', 0);
 
-SELECT get_raw_page('test1', 0) = get_raw_page('test1', 'main', 0);
+DROP TABLE test_rel_forks;
+
+CREATE TABLE test1 (a int, b int);
+INSERT INTO test1 VALUES (16777217, 131584);
 
 SELECT pagesize, version FROM page_header(get_raw_page('test1', 0));
 
@@ -29,8 +38,6 @@ SELECT page_checksum(get_raw_page('test1', 0), 0) IS NOT NULL AS silly_checksum_
 SELECT tuple_data_split('test1'::regclass, t_data, t_infomask, t_infomask2, t_bits)
     FROM heap_page_items(get_raw_page('test1', 0));
 
-SELECT * FROM fsm_page_contents(get_raw_page('test1', 'fsm', 0));
-
 DROP TABLE test1;
 
 -- check that using any of these functions with a partitioned table or index
diff --git a/src/backend/access/heap/hio.c b/src/backend/access/heap/hio.c
index b8b5871559..dd221b8f5d 100644
--- a/src/backend/access/heap/hio.c
+++ b/src/backend/access/heap/hio.c
@@ -24,6 +24,12 @@
 #include "storage/lmgr.h"
 #include "storage/smgr.h"
 
+/*#define TRACE_TARGETBLOCK */
+
+static BlockNumber get_page_no_fsm(Relation relation,
+				BlockNumber prevBlockAttempted,
+				bool *try_every_page);
+
 
 /*
  * RelationPutHeapTuple - place tuple at specified page
@@ -315,13 +321,15 @@ RelationGetBufferForTuple(Relation relation, Size len,
 						  BulkInsertState bistate,
 						  Buffer *vmbuffer, Buffer *vmbuffer_other)
 {
-	bool		use_fsm = !(options & HEAP_INSERT_SKIP_FSM);
+	bool		always_extend = (options & HEAP_INSERT_SKIP_FSM),
+				try_every_page = false;
 	Buffer		buffer = InvalidBuffer;
 	Page		page;
 	Size		pageFreeSpace = 0,
 				saveFreeSpace = 0;
 	BlockNumber targetBlock,
-				otherBlock;
+				otherBlock,
+				prevBlockAttempted;
 	bool		needLock;
 
 	len = MAXALIGN(len);		/* be conservative */
@@ -355,47 +363,41 @@ RelationGetBufferForTuple(Relation relation, Size len,
 	 * loop around and retry multiple times. (To insure this isn't an infinite
 	 * loop, we must update the FSM with the correct amount of free space on
 	 * each page that proves not to be suitable.)  If the FSM has no record of
-	 * a page with enough free space, we give up and extend the relation.
+	 * a page with enough free space, we try every page if the heap is small,
+	 * or give up and extend the relation.
 	 *
-	 * When use_fsm is false, we either put the tuple onto the existing target
-	 * page or extend the relation.
+	 * When always_extend is true, we either put the tuple onto the existing
+	 * target page or extend the relation.
 	 */
 	if (len + saveFreeSpace > MaxHeapTupleSize)
 	{
 		/* can't fit, don't bother asking FSM */
 		targetBlock = InvalidBlockNumber;
-		use_fsm = false;
+		always_extend = true;
 	}
 	else if (bistate && bistate->current_buf != InvalidBuffer)
 		targetBlock = BufferGetBlockNumber(bistate->current_buf);
 	else
 		targetBlock = RelationGetTargetBlock(relation);
 
-	if (targetBlock == InvalidBlockNumber && use_fsm)
+	if (targetBlock == InvalidBlockNumber && !always_extend)
 	{
 		/*
 		 * We have no cached target page, so ask the FSM for an initial
 		 * target.
 		 */
 		targetBlock = GetPageWithFreeSpace(relation, len + saveFreeSpace);
-
-		/*
-		 * If the FSM knows nothing of the rel, try the last page before we
-		 * give up and extend.  This avoids one-tuple-per-page syndrome during
-		 * bootstrapping or in a recently-started system.
-		 */
 		if (targetBlock == InvalidBlockNumber)
-		{
-			BlockNumber nblocks = RelationGetNumberOfBlocks(relation);
-
-			if (nblocks > 0)
-				targetBlock = nblocks - 1;
-		}
+			targetBlock = get_page_no_fsm(relation, InvalidBlockNumber,
+										  &try_every_page);
 	}
 
 loop:
 	while (targetBlock != InvalidBlockNumber)
 	{
+#ifdef TRACE_TARGETBLOCK
+		elog(DEBUG1, "Attempting block %d", targetBlock);
+#endif
 		/*
 		 * Read and exclusive-lock the target block, as well as the other
 		 * block if one was given, taking suitable care with lock ordering and
@@ -482,6 +484,9 @@ loop:
 		pageFreeSpace = PageGetHeapFreeSpace(page);
 		if (len + saveFreeSpace <= pageFreeSpace)
 		{
+#ifdef TRACE_TARGETBLOCK
+			elog(DEBUG1, "Returning buffer for block %d", targetBlock);
+#endif
 			/* use this page as future insert target, too */
 			RelationSetTargetBlock(relation, targetBlock);
 			return buffer;
@@ -502,18 +507,36 @@ loop:
 			ReleaseBuffer(buffer);
 		}
 
-		/* Without FSM, always fall out of the loop and extend */
-		if (!use_fsm)
+		if (always_extend)
 			break;
 
-		/*
-		 * Update FSM as to condition of this page, and ask for another page
-		 * to try.
-		 */
-		targetBlock = RecordAndGetPageWithFreeSpace(relation,
-													targetBlock,
-													pageFreeSpace,
-													len + saveFreeSpace);
+		if (try_every_page)
+		{
+			/* We've tried every page; extend. */
+			if (targetBlock == 0)
+				break;
+
+			/* Try the next lower block number. */
+			targetBlock--;
+#ifdef TRACE_TARGETBLOCK
+			elog(DEBUG1, "Trying next lower block number");
+#endif
+		}
+		else
+		{
+			/*
+			 * Update FSM as to condition of this page, and ask for another
+			 * page to try.
+			 */
+			prevBlockAttempted = targetBlock;
+			targetBlock = RecordAndGetPageWithFreeSpace(relation,
+														targetBlock,
+														pageFreeSpace,
+														len + saveFreeSpace);
+			if (targetBlock == InvalidBlockNumber)
+				targetBlock = get_page_no_fsm(relation, prevBlockAttempted,
+											  &try_every_page);
+		}
 	}
 
 	/*
@@ -534,7 +557,7 @@ loop:
 	 */
 	if (needLock)
 	{
-		if (!use_fsm)
+		if (always_extend || try_every_page)
 			LockRelationForExtension(relation, ExclusiveLock);
 		else if (!ConditionalLockRelationForExtension(relation, ExclusiveLock))
 		{
@@ -554,6 +577,10 @@ loop:
 			if (targetBlock != InvalidBlockNumber)
 			{
 				UnlockRelationForExtension(relation, ExclusiveLock);
+
+				/* This shouldn't be true, but let's make sure it isn't. */
+				try_every_page = false;
+
 				goto loop;
 			}
 
@@ -627,3 +654,53 @@ loop:
 
 	return buffer;
 }
+
+/*
+ * If the FSM has no information, first try the last page in the relation
+ * if we haven't already.  This avoids one-tuple-per-page syndrome during
+ * bootstrapping or in a recently-started system.
+ *
+ * If the heap is small enough, it likely has no FSM (or a truncated one),
+ * but even if it does, just try every page.
+ *
+ * If InvalidBlockNumber is returned, extend the relation.
+ */
+static BlockNumber
+get_page_no_fsm(Relation relation,
+				BlockNumber prevBlockAttempted,
+				bool *try_every_page)
+{
+	BlockNumber nblocks = RelationGetNumberOfBlocks(relation),
+				targetBlock = InvalidBlockNumber;
+
+	if (nblocks > 0)
+	{
+		targetBlock = nblocks - 1;
+
+		if (nblocks <= HEAP_FSM_EXTENSION_THRESHOLD)
+		{
+			*try_every_page = true;
+#ifdef TRACE_TARGETBLOCK
+			elog(DEBUG1, "Setting try_every_page");
+#endif
+			/* If we already tried the last page, skip it or extend. */
+			if (targetBlock == prevBlockAttempted)
+			{
+				if (nblocks > 1)
+				{
+					Assert(targetBlock != InvalidBlockNumber);
+					targetBlock--;
+				}
+				else
+					targetBlock = InvalidBlockNumber;
+			}
+		}
+		else
+		{
+			/* If we already tried the last page, extend. */
+			if (targetBlock == prevBlockAttempted)
+				targetBlock = InvalidBlockNumber;
+		}
+	}
+	return targetBlock;
+}
diff --git a/src/backend/storage/freespace/freespace.c b/src/backend/storage/freespace/freespace.c
index 7c4ad1c449..b62456c59f 100644
--- a/src/backend/storage/freespace/freespace.c
+++ b/src/backend/storage/freespace/freespace.c
@@ -111,6 +111,7 @@ static BlockNumber fsm_search(Relation rel, uint8 min_cat);
 static uint8 fsm_vacuum_page(Relation rel, FSMAddress addr,
 				BlockNumber start, BlockNumber end,
 				bool *eof);
+static void check_fsm_size(Relation rel, BlockNumber blkno, bool *fsm_exists);
 
 
 /******** Public API ********/
@@ -125,8 +126,7 @@ static uint8 fsm_vacuum_page(Relation rel, FSMAddress addr,
  * will turn out to have too little space available by the time the caller
  * gets a lock on it.  In that case, the caller should report the actual
  * amount of free space available on that page and then try again (see
- * RecordAndGetPageWithFreeSpace).  If InvalidBlockNumber is returned,
- * extend the relation.
+ * RecordAndGetPageWithFreeSpace).
  */
 BlockNumber
 GetPageWithFreeSpace(Relation rel, Size spaceNeeded)
@@ -153,12 +153,28 @@ RecordAndGetPageWithFreeSpace(Relation rel, BlockNumber oldPage,
 	int			search_cat = fsm_space_needed_to_cat(spaceNeeded);
 	FSMAddress	addr;
 	uint16		slot;
-	int			search_slot;
+	int			search_slot = -1;
+	bool		fsm_exists;
 
 	/* Get the location of the FSM byte representing the heap block */
 	addr = fsm_get_location(oldPage, &slot);
 
-	search_slot = fsm_set_and_search(rel, addr, slot, old_cat, search_cat);
+	RelationOpenSmgr(rel);
+	check_fsm_size(rel, oldPage, &fsm_exists);
+
+	if (!fsm_exists && rel->rd_rel->relkind == RELKIND_RELATION
+		&& oldPage <= HEAP_FSM_EXTENSION_THRESHOLD)
+	{
+		/* See explanation in RecordPageWithFreeSpace */
+		/* TODO: use a cached value and/or cache this value? */
+		BlockNumber heap_nblocks = RelationGetNumberOfBlocks(rel);
+		if (heap_nblocks > HEAP_FSM_EXTENSION_THRESHOLD)
+			search_slot = fsm_set_and_search(rel, addr, slot, old_cat, search_cat);
+		else
+			return InvalidBlockNumber;
+	}
+	else
+		search_slot = fsm_set_and_search(rel, addr, slot, old_cat, search_cat);
 
 	/*
 	 * If fsm_set_and_search found a suitable new block, return that.
@@ -183,16 +199,36 @@ RecordPageWithFreeSpace(Relation rel, BlockNumber heapBlk, Size spaceAvail)
 	int			new_cat = fsm_space_avail_to_cat(spaceAvail);
 	FSMAddress	addr;
 	uint16		slot;
+	bool		fsm_exists;
 
 	/* Get the location of the FSM byte representing the heap block */
 	addr = fsm_get_location(heapBlk, &slot);
 
-	fsm_set_and_search(rel, addr, slot, new_cat, 0);
+	RelationOpenSmgr(rel);
+	check_fsm_size(rel, heapBlk, &fsm_exists);
+
+	if (!fsm_exists && rel->rd_rel->relkind == RELKIND_RELATION
+		&& heapBlk <= HEAP_FSM_EXTENSION_THRESHOLD)
+	{
+		/*
+		 * For heaps we prevent extension of the FSM unless the number
+		 * of pages exceeds HEAP_FSM_EXTENSION_THRESHOLD. For tables
+		 * that don't already have a FSM, this will save an inode
+		 * and a few kB of space.
+		 */
+		/* TODO: use a cached value and/or cache this value? */
+		BlockNumber heap_nblocks = RelationGetNumberOfBlocks(rel);
+		if (heap_nblocks > HEAP_FSM_EXTENSION_THRESHOLD)
+			fsm_set_and_search(rel, addr, slot, new_cat, 0);
+	}
+	else
+		fsm_set_and_search(rel, addr, slot, new_cat, 0);
 }
 
 /*
  * XLogRecordPageWithFreeSpace - like RecordPageWithFreeSpace, for use in
  *		WAL replay
+ * TODO: Avoid creating a FSM here, also.
  */
 void
 XLogRecordPageWithFreeSpace(RelFileNode rnode, BlockNumber heapBlk,
@@ -546,24 +582,10 @@ fsm_readbuf(Relation rel, FSMAddress addr, bool extend)
 {
 	BlockNumber blkno = fsm_logical_to_physical(addr);
 	Buffer		buf;
+	bool		dummy;
 
 	RelationOpenSmgr(rel);
-
-	/*
-	 * If we haven't cached the size of the FSM yet, check it first.  Also
-	 * recheck if the requested block seems to be past end, since our cached
-	 * value might be stale.  (We send smgr inval messages on truncation, but
-	 * not on extension.)
-	 */
-	if (rel->rd_smgr->smgr_fsm_nblocks == InvalidBlockNumber ||
-		blkno >= rel->rd_smgr->smgr_fsm_nblocks)
-	{
-		if (smgrexists(rel->rd_smgr, FSM_FORKNUM))
-			rel->rd_smgr->smgr_fsm_nblocks = smgrnblocks(rel->rd_smgr,
-														 FSM_FORKNUM);
-		else
-			rel->rd_smgr->smgr_fsm_nblocks = 0;
-	}
+	check_fsm_size(rel, blkno, &dummy);
 
 	/* Handle requests beyond EOF */
 	if (blkno >= rel->rd_smgr->smgr_fsm_nblocks)
@@ -676,6 +698,9 @@ fsm_set_and_search(Relation rel, FSMAddress addr, uint16 slot,
 	int			newslot = -1;
 
 	buf = fsm_readbuf(rel, addr, true);
+	if (buf == InvalidBuffer)
+		return newslot;
+
 	LockBuffer(buf, BUFFER_LOCK_EXCLUSIVE);
 
 	page = BufferGetPage(buf);
@@ -904,3 +929,31 @@ fsm_vacuum_page(Relation rel, FSMAddress addr,
 
 	return max_avail;
 }
+
+/*
+ * If we haven't cached the size of the FSM yet, check it first.  Also
+ * recheck if the requested block seems to be past end, since our cached
+ * value might be stale.  (We send smgr inval messages on truncation, but
+ * not on extension.)
+ */
+static void
+check_fsm_size(Relation rel, BlockNumber blkno, bool *fsm_exists)
+{
+	if (rel->rd_smgr->smgr_fsm_nblocks == InvalidBlockNumber ||
+		blkno >= rel->rd_smgr->smgr_fsm_nblocks)
+	{
+		if (smgrexists(rel->rd_smgr, FSM_FORKNUM))
+		{
+			*fsm_exists = true;
+			rel->rd_smgr->smgr_fsm_nblocks = smgrnblocks(rel->rd_smgr,
+														 FSM_FORKNUM);
+		}
+		else
+		{
+			*fsm_exists = false;
+			rel->rd_smgr->smgr_fsm_nblocks = 0;
+		}
+	}
+	else
+		*fsm_exists = true;
+}
\ No newline at end of file
diff --git a/src/include/storage/freespace.h b/src/include/storage/freespace.h
index 726eb30fb8..68e4d27818 100644
--- a/src/include/storage/freespace.h
+++ b/src/include/storage/freespace.h
@@ -18,6 +18,10 @@
 #include "storage/relfilenode.h"
 #include "utils/relcache.h"
 
+/* Only extend a heap's FSM if the heap has greater than this many blocks */
+/* TODO: Performance-test different values. */
+#define HEAP_FSM_EXTENSION_THRESHOLD 10
+
 /* prototypes for public functions in freespace.c */
 extern Size GetRecordedFreeSpace(Relation rel, BlockNumber heapBlk);
 extern BlockNumber GetPageWithFreeSpace(Relation rel, Size spaceNeeded);
-- 
2.17.1

#9John Naylor
jcnaylor@gmail.com
In reply to: John Naylor (#8)
3 attachment(s)
Re: WIP: Avoid creation of the free space map for small tables

On 10/13/18, Amit Kapila <amit.kapila16@gmail.com> wrote:

I think you have found a good way to avoid creating FSM, but can't we
use some simpler technique like if the FSM fork for a relation doesn't
exist, then check the heapblk number for which we try to update the
FSM and if it is lesser than HEAP_FSM_EXTENSION_THRESHOLD, then avoid
creating the FSM.

I think it would be better if we can find a common way to avoid
creating FSM both during DO and REDO time. It might be possible if
somethin like what I have said above is feasible.

I've attached v4, which implements the REDO case, and as closely as
possible to the DO case. I've created a new function to guard against
creation of the FSM, which is called by RecordPageWithFreeSpace() and
RecordAndGetPageWithFreeSpace(). Since XLogRecordPageWithFreeSpace()
takes a relfilenode and not a relation, I had to reimplement that
separately, but the logic is basically the same. It works under
streaming replication.

I've also attached a couple SQL scripts which, when the aforementioned
DEBUG1 calls are enabled, show what the heap insert code is doing for
different scenarios. Make check-world passes.

-John Naylor

Attachments:

v4-0001-Avoid-creation-of-the-free-space-map-for-small-ta.patchtext/x-patch; charset=US-ASCII; name=v4-0001-Avoid-creation-of-the-free-space-map-for-small-ta.patchDownload
From f3abe9fc003430530db71ddd40c4e9bed8a38513 Mon Sep 17 00:00:00 2001
From: John Naylor <jcnaylor@gmail.com>
Date: Sun, 14 Oct 2018 22:35:12 +0700
Subject: [PATCH v4] Avoid creation of the free space map for small tables.

The FSM isn't created if the heap has fewer than 10 blocks. If the last
known good block has insufficient space, try every block before extending
the heap.

If a heap with a FSM is truncated back to below the threshold, the FSM
stays around and can be used as usual.
---
 contrib/pageinspect/expected/page.out     |  77 ++++++------
 contrib/pageinspect/sql/page.sql          |  33 ++++--
 src/backend/access/heap/hio.c             | 137 +++++++++++++++++-----
 src/backend/storage/freespace/freespace.c |  61 +++++++++-
 src/include/storage/freespace.h           |   4 +
 5 files changed, 229 insertions(+), 83 deletions(-)

diff --git a/contrib/pageinspect/expected/page.out b/contrib/pageinspect/expected/page.out
index 3fcd9fbe6d..83e5910453 100644
--- a/contrib/pageinspect/expected/page.out
+++ b/contrib/pageinspect/expected/page.out
@@ -1,48 +1,69 @@
 CREATE EXTENSION pageinspect;
-CREATE TABLE test1 (a int, b int);
-INSERT INTO test1 VALUES (16777217, 131584);
-VACUUM test1;  -- set up FSM
+CREATE TABLE test_rel_forks (a int);
+-- Make sure there are enough blocks in the heap for the FSM to be created.
+INSERT INTO test_rel_forks SELECT g from generate_series(1,10000) g;
+-- set up FSM and VM
+VACUUM test_rel_forks;
 -- The page contents can vary, so just test that it can be read
 -- successfully, but don't keep the output.
-SELECT octet_length(get_raw_page('test1', 'main', 0)) AS main_0;
+SELECT octet_length(get_raw_page('test_rel_forks', 'main', 0)) AS main_0;
  main_0 
 --------
    8192
 (1 row)
 
-SELECT octet_length(get_raw_page('test1', 'main', 1)) AS main_1;
-ERROR:  block number 1 is out of range for relation "test1"
-SELECT octet_length(get_raw_page('test1', 'fsm', 0)) AS fsm_0;
+SELECT octet_length(get_raw_page('test_rel_forks', 'main', 100)) AS main_100;
+ERROR:  block number 100 is out of range for relation "test_rel_forks"
+SELECT octet_length(get_raw_page('test_rel_forks', 'fsm', 0)) AS fsm_0;
  fsm_0 
 -------
   8192
 (1 row)
 
-SELECT octet_length(get_raw_page('test1', 'fsm', 1)) AS fsm_1;
- fsm_1 
--------
-  8192
-(1 row)
-
-SELECT octet_length(get_raw_page('test1', 'vm', 0)) AS vm_0;
+SELECT octet_length(get_raw_page('test_rel_forks', 'fsm', 10)) AS fsm_10;
+ERROR:  block number 10 is out of range for relation "test_rel_forks"
+SELECT octet_length(get_raw_page('test_rel_forks', 'vm', 0)) AS vm_0;
  vm_0 
 ------
  8192
 (1 row)
 
-SELECT octet_length(get_raw_page('test1', 'vm', 1)) AS vm_1;
-ERROR:  block number 1 is out of range for relation "test1"
+SELECT octet_length(get_raw_page('test_rel_forks', 'vm', 1)) AS vm_1;
+ERROR:  block number 1 is out of range for relation "test_rel_forks"
 SELECT octet_length(get_raw_page('xxx', 'main', 0));
 ERROR:  relation "xxx" does not exist
-SELECT octet_length(get_raw_page('test1', 'xxx', 0));
+SELECT octet_length(get_raw_page('test_rel_forks', 'xxx', 0));
 ERROR:  invalid fork name
 HINT:  Valid fork names are "main", "fsm", "vm", and "init".
-SELECT get_raw_page('test1', 0) = get_raw_page('test1', 'main', 0);
+SELECT * FROM fsm_page_contents(get_raw_page('test_rel_forks', 'fsm', 0));
+ fsm_page_contents 
+-------------------
+ 0: 192           +
+ 1: 192           +
+ 3: 192           +
+ 7: 192           +
+ 15: 192          +
+ 31: 192          +
+ 63: 192          +
+ 127: 192         +
+ 255: 192         +
+ 511: 192         +
+ 1023: 192        +
+ 2047: 192        +
+ 4095: 192        +
+ fp_next_slot: 0  +
+ 
+(1 row)
+
+SELECT get_raw_page('test_rel_forks', 0) = get_raw_page('test_rel_forks', 'main', 0);
  ?column? 
 ----------
  t
 (1 row)
 
+DROP TABLE test_rel_forks;
+CREATE TABLE test1 (a int, b int);
+INSERT INTO test1 VALUES (16777217, 131584);
 SELECT pagesize, version FROM page_header(get_raw_page('test1', 0));
  pagesize | version 
 ----------+---------
@@ -62,26 +83,6 @@ SELECT tuple_data_split('test1'::regclass, t_data, t_infomask, t_infomask2, t_bi
  {"\\x01000001","\\x00020200"}
 (1 row)
 
-SELECT * FROM fsm_page_contents(get_raw_page('test1', 'fsm', 0));
- fsm_page_contents 
--------------------
- 0: 254           +
- 1: 254           +
- 3: 254           +
- 7: 254           +
- 15: 254          +
- 31: 254          +
- 63: 254          +
- 127: 254         +
- 255: 254         +
- 511: 254         +
- 1023: 254        +
- 2047: 254        +
- 4095: 254        +
- fp_next_slot: 0  +
- 
-(1 row)
-
 DROP TABLE test1;
 -- check that using any of these functions with a partitioned table or index
 -- would fail
diff --git a/contrib/pageinspect/sql/page.sql b/contrib/pageinspect/sql/page.sql
index 8ac9991837..ee811759d5 100644
--- a/contrib/pageinspect/sql/page.sql
+++ b/contrib/pageinspect/sql/page.sql
@@ -1,26 +1,35 @@
 CREATE EXTENSION pageinspect;
 
-CREATE TABLE test1 (a int, b int);
-INSERT INTO test1 VALUES (16777217, 131584);
+CREATE TABLE test_rel_forks (a int);
+-- Make sure there are enough blocks in the heap for the FSM to be created.
+INSERT INTO test_rel_forks SELECT g from generate_series(1,10000) g;
 
-VACUUM test1;  -- set up FSM
+-- set up FSM and VM
+VACUUM test_rel_forks;
 
 -- The page contents can vary, so just test that it can be read
 -- successfully, but don't keep the output.
 
-SELECT octet_length(get_raw_page('test1', 'main', 0)) AS main_0;
-SELECT octet_length(get_raw_page('test1', 'main', 1)) AS main_1;
+SELECT octet_length(get_raw_page('test_rel_forks', 'main', 0)) AS main_0;
+SELECT octet_length(get_raw_page('test_rel_forks', 'main', 100)) AS main_100;
 
-SELECT octet_length(get_raw_page('test1', 'fsm', 0)) AS fsm_0;
-SELECT octet_length(get_raw_page('test1', 'fsm', 1)) AS fsm_1;
+SELECT octet_length(get_raw_page('test_rel_forks', 'fsm', 0)) AS fsm_0;
+SELECT octet_length(get_raw_page('test_rel_forks', 'fsm', 10)) AS fsm_10;
 
-SELECT octet_length(get_raw_page('test1', 'vm', 0)) AS vm_0;
-SELECT octet_length(get_raw_page('test1', 'vm', 1)) AS vm_1;
+SELECT octet_length(get_raw_page('test_rel_forks', 'vm', 0)) AS vm_0;
+SELECT octet_length(get_raw_page('test_rel_forks', 'vm', 1)) AS vm_1;
 
 SELECT octet_length(get_raw_page('xxx', 'main', 0));
-SELECT octet_length(get_raw_page('test1', 'xxx', 0));
+SELECT octet_length(get_raw_page('test_rel_forks', 'xxx', 0));
+
+SELECT * FROM fsm_page_contents(get_raw_page('test_rel_forks', 'fsm', 0));
+
+SELECT get_raw_page('test_rel_forks', 0) = get_raw_page('test_rel_forks', 'main', 0);
 
-SELECT get_raw_page('test1', 0) = get_raw_page('test1', 'main', 0);
+DROP TABLE test_rel_forks;
+
+CREATE TABLE test1 (a int, b int);
+INSERT INTO test1 VALUES (16777217, 131584);
 
 SELECT pagesize, version FROM page_header(get_raw_page('test1', 0));
 
@@ -29,8 +38,6 @@ SELECT page_checksum(get_raw_page('test1', 0), 0) IS NOT NULL AS silly_checksum_
 SELECT tuple_data_split('test1'::regclass, t_data, t_infomask, t_infomask2, t_bits)
     FROM heap_page_items(get_raw_page('test1', 0));
 
-SELECT * FROM fsm_page_contents(get_raw_page('test1', 'fsm', 0));
-
 DROP TABLE test1;
 
 -- check that using any of these functions with a partitioned table or index
diff --git a/src/backend/access/heap/hio.c b/src/backend/access/heap/hio.c
index b8b5871559..9b079e2618 100644
--- a/src/backend/access/heap/hio.c
+++ b/src/backend/access/heap/hio.c
@@ -24,6 +24,12 @@
 #include "storage/lmgr.h"
 #include "storage/smgr.h"
 
+/*#define TRACE_TARGETBLOCK */
+
+static BlockNumber get_page_no_fsm(Relation relation,
+				BlockNumber prevBlockAttempted,
+				bool *try_every_page);
+
 
 /*
  * RelationPutHeapTuple - place tuple at specified page
@@ -315,13 +321,15 @@ RelationGetBufferForTuple(Relation relation, Size len,
 						  BulkInsertState bistate,
 						  Buffer *vmbuffer, Buffer *vmbuffer_other)
 {
-	bool		use_fsm = !(options & HEAP_INSERT_SKIP_FSM);
+	bool		always_extend = (options & HEAP_INSERT_SKIP_FSM),
+				try_every_page = false;
 	Buffer		buffer = InvalidBuffer;
 	Page		page;
 	Size		pageFreeSpace = 0,
 				saveFreeSpace = 0;
 	BlockNumber targetBlock,
-				otherBlock;
+				otherBlock,
+				prevBlockAttempted;
 	bool		needLock;
 
 	len = MAXALIGN(len);		/* be conservative */
@@ -355,47 +363,41 @@ RelationGetBufferForTuple(Relation relation, Size len,
 	 * loop around and retry multiple times. (To insure this isn't an infinite
 	 * loop, we must update the FSM with the correct amount of free space on
 	 * each page that proves not to be suitable.)  If the FSM has no record of
-	 * a page with enough free space, we give up and extend the relation.
+	 * a page with enough free space, we try every page if the heap is small,
+	 * or give up and extend the relation.
 	 *
-	 * When use_fsm is false, we either put the tuple onto the existing target
-	 * page or extend the relation.
+	 * When always_extend is true, we either put the tuple onto the existing
+	 * target page or extend the relation.
 	 */
 	if (len + saveFreeSpace > MaxHeapTupleSize)
 	{
 		/* can't fit, don't bother asking FSM */
 		targetBlock = InvalidBlockNumber;
-		use_fsm = false;
+		always_extend = true;
 	}
 	else if (bistate && bistate->current_buf != InvalidBuffer)
 		targetBlock = BufferGetBlockNumber(bistate->current_buf);
 	else
 		targetBlock = RelationGetTargetBlock(relation);
 
-	if (targetBlock == InvalidBlockNumber && use_fsm)
+	if (targetBlock == InvalidBlockNumber && !always_extend)
 	{
 		/*
 		 * We have no cached target page, so ask the FSM for an initial
 		 * target.
 		 */
 		targetBlock = GetPageWithFreeSpace(relation, len + saveFreeSpace);
-
-		/*
-		 * If the FSM knows nothing of the rel, try the last page before we
-		 * give up and extend.  This avoids one-tuple-per-page syndrome during
-		 * bootstrapping or in a recently-started system.
-		 */
 		if (targetBlock == InvalidBlockNumber)
-		{
-			BlockNumber nblocks = RelationGetNumberOfBlocks(relation);
-
-			if (nblocks > 0)
-				targetBlock = nblocks - 1;
-		}
+			targetBlock = get_page_no_fsm(relation, InvalidBlockNumber,
+										  &try_every_page);
 	}
 
 loop:
 	while (targetBlock != InvalidBlockNumber)
 	{
+#ifdef TRACE_TARGETBLOCK
+		elog(DEBUG1, "Attempting block %u", targetBlock);
+#endif
 		/*
 		 * Read and exclusive-lock the target block, as well as the other
 		 * block if one was given, taking suitable care with lock ordering and
@@ -482,6 +484,9 @@ loop:
 		pageFreeSpace = PageGetHeapFreeSpace(page);
 		if (len + saveFreeSpace <= pageFreeSpace)
 		{
+#ifdef TRACE_TARGETBLOCK
+			elog(DEBUG1, "Returning buffer for block %u", targetBlock);
+#endif
 			/* use this page as future insert target, too */
 			RelationSetTargetBlock(relation, targetBlock);
 			return buffer;
@@ -502,18 +507,36 @@ loop:
 			ReleaseBuffer(buffer);
 		}
 
-		/* Without FSM, always fall out of the loop and extend */
-		if (!use_fsm)
+		if (always_extend)
 			break;
 
-		/*
-		 * Update FSM as to condition of this page, and ask for another page
-		 * to try.
-		 */
-		targetBlock = RecordAndGetPageWithFreeSpace(relation,
-													targetBlock,
-													pageFreeSpace,
-													len + saveFreeSpace);
+		if (try_every_page)
+		{
+			/* We've tried every page; extend. */
+			if (targetBlock == 0)
+				break;
+
+			/* Try the next lower block number. */
+			targetBlock--;
+#ifdef TRACE_TARGETBLOCK
+			elog(DEBUG1, "Trying next lower block number");
+#endif
+		}
+		else
+		{
+			/*
+			 * Update FSM as to condition of this page, and ask for another
+			 * page to try.
+			 */
+			prevBlockAttempted = targetBlock;
+			targetBlock = RecordAndGetPageWithFreeSpace(relation,
+														targetBlock,
+														pageFreeSpace,
+														len + saveFreeSpace);
+			if (targetBlock == InvalidBlockNumber)
+				targetBlock = get_page_no_fsm(relation, prevBlockAttempted,
+											  &try_every_page);
+		}
 	}
 
 	/*
@@ -534,7 +557,7 @@ loop:
 	 */
 	if (needLock)
 	{
-		if (!use_fsm)
+		if (always_extend || try_every_page)
 			LockRelationForExtension(relation, ExclusiveLock);
 		else if (!ConditionalLockRelationForExtension(relation, ExclusiveLock))
 		{
@@ -554,6 +577,10 @@ loop:
 			if (targetBlock != InvalidBlockNumber)
 			{
 				UnlockRelationForExtension(relation, ExclusiveLock);
+
+				/* This shouldn't be true, but let's make sure it isn't. */
+				try_every_page = false;
+
 				goto loop;
 			}
 
@@ -627,3 +654,53 @@ loop:
 
 	return buffer;
 }
+
+/*
+ * If the FSM has no information, first try the last page in the relation
+ * if we haven't already.  This avoids one-tuple-per-page syndrome during
+ * bootstrapping or in a recently-started system.
+ *
+ * If the heap is small enough, it likely has no FSM (or a truncated one),
+ * but even if it does, just try every page.
+ *
+ * If InvalidBlockNumber is returned, extend the relation.
+ */
+static BlockNumber
+get_page_no_fsm(Relation relation,
+				BlockNumber prevBlockAttempted,
+				bool *try_every_page)
+{
+	BlockNumber nblocks = RelationGetNumberOfBlocks(relation),
+				targetBlock = InvalidBlockNumber;
+
+	if (nblocks > 0)
+	{
+		targetBlock = nblocks - 1;
+
+		if (nblocks <= HEAP_FSM_EXTENSION_THRESHOLD)
+		{
+			*try_every_page = true;
+#ifdef TRACE_TARGETBLOCK
+			elog(DEBUG1, "Setting try_every_page");
+#endif
+			/* If we already tried the last page, skip it or extend. */
+			if (targetBlock == prevBlockAttempted)
+			{
+				if (nblocks > 1)
+				{
+					Assert(targetBlock != InvalidBlockNumber);
+					targetBlock--;
+				}
+				else
+					targetBlock = InvalidBlockNumber;
+			}
+		}
+		else
+		{
+			/* If we already tried the last page, extend. */
+			if (targetBlock == prevBlockAttempted)
+				targetBlock = InvalidBlockNumber;
+		}
+	}
+	return targetBlock;
+}
diff --git a/src/backend/storage/freespace/freespace.c b/src/backend/storage/freespace/freespace.c
index 7c4ad1c449..ec7a8af4e3 100644
--- a/src/backend/storage/freespace/freespace.c
+++ b/src/backend/storage/freespace/freespace.c
@@ -111,6 +111,7 @@ static BlockNumber fsm_search(Relation rel, uint8 min_cat);
 static uint8 fsm_vacuum_page(Relation rel, FSMAddress addr,
 				BlockNumber start, BlockNumber end,
 				bool *eof);
+static bool allow_write_to_fsm(Relation rel, BlockNumber heapBlk);
 
 
 /******** Public API ********/
@@ -125,8 +126,7 @@ static uint8 fsm_vacuum_page(Relation rel, FSMAddress addr,
  * will turn out to have too little space available by the time the caller
  * gets a lock on it.  In that case, the caller should report the actual
  * amount of free space available on that page and then try again (see
- * RecordAndGetPageWithFreeSpace).  If InvalidBlockNumber is returned,
- * extend the relation.
+ * RecordAndGetPageWithFreeSpace).
  */
 BlockNumber
 GetPageWithFreeSpace(Relation rel, Size spaceNeeded)
@@ -155,6 +155,9 @@ RecordAndGetPageWithFreeSpace(Relation rel, BlockNumber oldPage,
 	uint16		slot;
 	int			search_slot;
 
+	if (!allow_write_to_fsm(rel, oldPage))
+		return InvalidBlockNumber;
+
 	/* Get the location of the FSM byte representing the heap block */
 	addr = fsm_get_location(oldPage, &slot);
 
@@ -184,6 +187,9 @@ RecordPageWithFreeSpace(Relation rel, BlockNumber heapBlk, Size spaceAvail)
 	FSMAddress	addr;
 	uint16		slot;
 
+	if (!allow_write_to_fsm(rel, heapBlk))
+		return;
+
 	/* Get the location of the FSM byte representing the heap block */
 	addr = fsm_get_location(heapBlk, &slot);
 
@@ -204,11 +210,35 @@ XLogRecordPageWithFreeSpace(RelFileNode rnode, BlockNumber heapBlk,
 	BlockNumber blkno;
 	Buffer		buf;
 	Page		page;
+	bool		write_to_fsm;
 
 	/* Get the location of the FSM byte representing the heap block */
 	addr = fsm_get_location(heapBlk, &slot);
 	blkno = fsm_logical_to_physical(addr);
 
+	/* This is meant to mirror the logic in allow_write_to_fsm() */
+	if (heapBlk > HEAP_FSM_EXTENSION_THRESHOLD)
+		write_to_fsm = true;
+	else
+	{
+		/* Open the relation at smgr level */
+		SMgrRelation smgr = smgropen(rnode, InvalidBackendId);
+
+		BlockNumber heap_nblocks = smgrnblocks(smgr, MAIN_FORKNUM);
+		if (heap_nblocks > HEAP_FSM_EXTENSION_THRESHOLD)
+			write_to_fsm = true;
+		else
+		{
+			if (smgrexists(smgr, FSM_FORKNUM))
+				write_to_fsm = true;
+			else
+				write_to_fsm = false;
+		}
+	}
+
+	if (!write_to_fsm)
+		return;
+
 	/* If the page doesn't exist already, extend */
 	buf = XLogReadBufferExtended(rnode, FSM_FORKNUM, blkno, RBM_ZERO_ON_ERROR);
 	LockBuffer(buf, BUFFER_LOCK_EXCLUSIVE);
@@ -904,3 +934,30 @@ fsm_vacuum_page(Relation rel, FSMAddress addr,
 
 	return max_avail;
 }
+
+/*
+ * For heaps we prevent extension of the FSM unless the number
+ * of pages exceeds HEAP_FSM_EXTENSION_THRESHOLD. For tables
+ * that don't already have a FSM, this will save an inode
+ * and a few kB of space.
+ */
+static bool
+allow_write_to_fsm(Relation rel, BlockNumber heapBlk)
+{
+	BlockNumber		heap_nblocks;
+
+	if (heapBlk > HEAP_FSM_EXTENSION_THRESHOLD ||
+		rel->rd_rel->relkind != RELKIND_RELATION)
+		return true;
+
+	/* XXX is this value cached? */
+	heap_nblocks = RelationGetNumberOfBlocks(rel);
+
+	if (heap_nblocks > HEAP_FSM_EXTENSION_THRESHOLD)
+		return true;
+	else
+	{
+		RelationOpenSmgr(rel);
+		return smgrexists(rel->rd_smgr, FSM_FORKNUM);
+	}
+}
diff --git a/src/include/storage/freespace.h b/src/include/storage/freespace.h
index 726eb30fb8..68e4d27818 100644
--- a/src/include/storage/freespace.h
+++ b/src/include/storage/freespace.h
@@ -18,6 +18,10 @@
 #include "storage/relfilenode.h"
 #include "utils/relcache.h"
 
+/* Only extend a heap's FSM if the heap has greater than this many blocks */
+/* TODO: Performance-test different values. */
+#define HEAP_FSM_EXTENSION_THRESHOLD 10
+
 /* prototypes for public functions in freespace.c */
 extern Size GetRecordedFreeSpace(Relation rel, BlockNumber heapBlk);
 extern BlockNumber GetPageWithFreeSpace(Relation rel, Size spaceNeeded);
-- 
2.17.1

test-fsm-first-10-blocks.sqlapplication/sql; name=test-fsm-first-10-blocks.sqlDownload
test-nofsm-first-block.sqlapplication/sql; name=test-nofsm-first-block.sqlDownload
#10Amit Kapila
amit.kapila16@gmail.com
In reply to: John Naylor (#8)
Re: WIP: Avoid creation of the free space map for small tables

On Sun, Oct 14, 2018 at 1:09 AM John Naylor <jcnaylor@gmail.com> wrote:

On 10/13/18, Amit Kapila <amit.kapila16@gmail.com> wrote:

I think you have found a good way to avoid creating FSM, but can't we
use some simpler technique like if the FSM fork for a relation doesn't
exist, then check the heapblk number for which we try to update the
FSM and if it is lesser than HEAP_FSM_EXTENSION_THRESHOLD, then avoid
creating the FSM.

I think I see what you mean, but to avoid the vacuum problem you just
mentioned, we'd need to check the relation size, too.

Sure, but vacuum already has relation size. In general, I think we
should try to avoid adding more system calls in the common code path.
It can impact the performance.

Few comments on your latest patch:
-
+static bool
+allow_write_to_fsm(Relation rel, BlockNumber heapBlk)
+{
+ BlockNumber heap_nblocks;
+
+ if (heapBlk > HEAP_FSM_EXTENSION_THRESHOLD ||
+ rel->rd_rel->relkind != RELKIND_RELATION)
+ return true;
+
+ /* XXX is this value cached? */
+ heap_nblocks = RelationGetNumberOfBlocks(rel);
+
+ if (heap_nblocks > HEAP_FSM_EXTENSION_THRESHOLD)
+ return true;
+ else
+ {
+ RelationOpenSmgr(rel);
+ return smgrexists(rel->rd_smgr, FSM_FORKNUM);
+ }
+}

I think you can avoid calling RelationGetNumberOfBlocks, if you call
smgrexists before and for the purpose of vacuum, we can get that as an
input parameter. I think one can argue for not changing the interface
functions like RecordPageWithFreeSpace to avoid calling
RelationGetNumberOfBlocks, but to me, it appears worth to save the
additional system call.

-
targetBlock = GetPageWithFreeSpace(relation, len + saveFreeSpace);
-
- /*
- * If the FSM knows nothing of the rel, try the last page before we
- * give up and extend.  This avoids one-tuple-per-page syndrome during
- * bootstrapping or in a recently-started system.
- */
  if (targetBlock == InvalidBlockNumber)
- {
- BlockNumber nblocks = RelationGetNumberOfBlocks(relation);
-
- if (nblocks > 0)
- targetBlock = nblocks - 1;
- }
+ targetBlock = get_page_no_fsm(relation, InvalidBlockNumber,
+   &try_every_page);

Is it possible to hide the magic of trying each block within
GetPageWithFreeSpace? It will simplify the code and in future, if
another storage API has a different function for
RelationGetBufferForTuple, it will work seamlessly, provided they are
using same FSM. One such user is zheap.

--
With Regards,
Amit Kapila.
EnterpriseDB: http://www.enterprisedb.com

#11John Naylor
jcnaylor@gmail.com
In reply to: Amit Kapila (#10)
Re: WIP: Avoid creation of the free space map for small tables

On 10/15/18, Amit Kapila <amit.kapila16@gmail.com> wrote:

Few comments on your latest patch:
-
+static bool
+allow_write_to_fsm(Relation rel, BlockNumber heapBlk)
+{
+ BlockNumber heap_nblocks;
+
+ if (heapBlk > HEAP_FSM_EXTENSION_THRESHOLD ||
+ rel->rd_rel->relkind != RELKIND_RELATION)
+ return true;
+
+ /* XXX is this value cached? */
+ heap_nblocks = RelationGetNumberOfBlocks(rel);
+
+ if (heap_nblocks > HEAP_FSM_EXTENSION_THRESHOLD)
+ return true;
+ else
+ {
+ RelationOpenSmgr(rel);
+ return smgrexists(rel->rd_smgr, FSM_FORKNUM);
+ }
+}

I think you can avoid calling RelationGetNumberOfBlocks, if you call
smgrexists before

Okay, I didn't know which was cheaper, but I'll check smgrexists
first. Thanks for the info.

and for the purpose of vacuum, we can get that as an
input parameter. I think one can argue for not changing the interface
functions like RecordPageWithFreeSpace to avoid calling
RelationGetNumberOfBlocks, but to me, it appears worth to save the
additional system call.

I agree, and that should be fairly straightforward. I'll include that
in the next patch.

-
targetBlock = GetPageWithFreeSpace(relation, len + saveFreeSpace);
-
- /*
- * If the FSM knows nothing of the rel, try the last page before we
- * give up and extend.  This avoids one-tuple-per-page syndrome during
- * bootstrapping or in a recently-started system.
- */
if (targetBlock == InvalidBlockNumber)
- {
- BlockNumber nblocks = RelationGetNumberOfBlocks(relation);
-
- if (nblocks > 0)
- targetBlock = nblocks - 1;
- }
+ targetBlock = get_page_no_fsm(relation, InvalidBlockNumber,
+   &try_every_page);

Is it possible to hide the magic of trying each block within
GetPageWithFreeSpace? It will simplify the code and in future, if
another storage API has a different function for
RelationGetBufferForTuple, it will work seamlessly, provided they are
using same FSM. One such user is zheap.

Hmm, here I'm a bit more skeptical about the trade offs. That would
mean, in effect, to put a function called get_page_no_fsm() in the FSM
code. ;-) I'm willing to be convinced otherwise, of course, but
here's my reasoning:

For one, we'd have to pass prevBlockNumber and &try_every_block to
GetPageWithFreeSpace() (and RecordAndGetPageWithFreeSpace() by
extension), which are irrelevant to some callers. In addition, in
hio.c, there is a call where we don't want to try any blocks that we
have already, much less all of them:

/*
* Check if some other backend has extended a block for us while
* we were waiting on the lock.
*/
targetBlock = GetPageWithFreeSpace(relation, len + saveFreeSpace);

By the time we get to this call, we likely wouldn't trigger the logic
to try every block, but I don't think we can guarantee that. We could
add a boolean parameter that means "consider trying every block", but
I don't think the FSM code should have so much state passed to it.

Thanks for reviewing,
-John Naylor

#12Amit Kapila
amit.kapila16@gmail.com
In reply to: John Naylor (#11)
Re: WIP: Avoid creation of the free space map for small tables

On Mon, Oct 15, 2018 at 4:09 PM John Naylor <jcnaylor@gmail.com> wrote:

On 10/15/18, Amit Kapila <amit.kapila16@gmail.com> wrote:

Few comments on your latest patch:
-
targetBlock = GetPageWithFreeSpace(relation, len + saveFreeSpace);
-
- /*
- * If the FSM knows nothing of the rel, try the last page before we
- * give up and extend.  This avoids one-tuple-per-page syndrome during
- * bootstrapping or in a recently-started system.
- */
if (targetBlock == InvalidBlockNumber)
- {
- BlockNumber nblocks = RelationGetNumberOfBlocks(relation);
-
- if (nblocks > 0)
- targetBlock = nblocks - 1;
- }
+ targetBlock = get_page_no_fsm(relation, InvalidBlockNumber,
+   &try_every_page);

Is it possible to hide the magic of trying each block within
GetPageWithFreeSpace? It will simplify the code and in future, if
another storage API has a different function for
RelationGetBufferForTuple, it will work seamlessly, provided they are
using same FSM. One such user is zheap.

Hmm, here I'm a bit more skeptical about the trade offs. That would
mean, in effect, to put a function called get_page_no_fsm() in the FSM
code. ;-) I'm willing to be convinced otherwise, of course, but
here's my reasoning:

For one, we'd have to pass prevBlockNumber and &try_every_block to
GetPageWithFreeSpace() (and RecordAndGetPageWithFreeSpace() by
extension), which are irrelevant to some callers.

I think we can avoid using prevBlockNumber and try_every_block, if we
maintain a small cache which tells whether the particular block is
tried or not. What I am envisioning is that while finding the block
with free space, if we came to know that the relation in question is
small enough that it doesn't have FSM, we can perform a local_search.
In local_seach, we can enquire the cache for any block that we can try
and if we find any block, we can try inserting in that block,
otherwise, we need to extend the relation. One simple way to imagine
such a cache would be an array of structure and structure has blkno
and status fields. After we get the usable block, we need to clear
the cache, if exists.

In addition, in
hio.c, there is a call where we don't want to try any blocks that we
have already, much less all of them:

/*
* Check if some other backend has extended a block for us while
* we were waiting on the lock.
*/
targetBlock = GetPageWithFreeSpace(relation, len + saveFreeSpace);

By the time we get to this call, we likely wouldn't trigger the logic
to try every block, but I don't think we can guarantee that.

I think the current code as proposed has that limitation, but if we
have a cache, then we can check if the relation has actually extended
after taking the lock and if so we can try only newly added block/'s.

I am not completely sure if the idea described above is certainly
better, but it seems that it will be clean and can handle some of the
cases with ease.

--
With Regards,
Amit Kapila.
EnterpriseDB: http://www.enterprisedb.com

#13John Naylor
jcnaylor@gmail.com
In reply to: Amit Kapila (#10)
2 attachment(s)
Re: WIP: Avoid creation of the free space map for small tables

On 10/15/18, Amit Kapila <amit.kapila16@gmail.com> wrote:

I think you can avoid calling RelationGetNumberOfBlocks, if you call
smgrexists before

This is done in the attached v5, 0001.

and for the purpose of vacuum, we can get that as an
input parameter. I think one can argue for not changing the interface
functions like RecordPageWithFreeSpace to avoid calling
RelationGetNumberOfBlocks, but to me, it appears worth to save the
additional system call.

This is done in 0002. I also added a check for the cached value of
pg_class.relpages, since it's cheap and may help non-VACUUM callers.

[proposal for a cache of blocks to try]

That's interesting. I'll have to do some reading elsewhere in the
codebase, and then I'll follow up.

Thanks,
-John Naylor

Attachments:

v5-0001-Avoid-creation-of-the-free-space-map-for-small-ta.patchtext/x-patch; charset=US-ASCII; name=v5-0001-Avoid-creation-of-the-free-space-map-for-small-ta.patchDownload
From 0dafd220e437ed1cf9ed77e41cf3090365a63798 Mon Sep 17 00:00:00 2001
From: John Naylor <jcnaylor@gmail.com>
Date: Tue, 16 Oct 2018 17:10:14 +0700
Subject: [PATCH v5 1/2] Avoid creation of the free space map for small tables.

The FSM isn't created if the heap has fewer than 10 blocks. If the last
known good block has insufficient space, try every block before extending
the heap.

If a heap with a FSM is truncated back to below the threshold, the FSM
stays around and can be used as usual.
---
 contrib/pageinspect/expected/page.out     |  77 ++++++------
 contrib/pageinspect/sql/page.sql          |  33 +++--
 src/backend/access/heap/hio.c             | 141 +++++++++++++++++-----
 src/backend/storage/freespace/freespace.c |  64 +++++++++-
 src/include/storage/freespace.h           |   4 +
 5 files changed, 236 insertions(+), 83 deletions(-)

diff --git a/contrib/pageinspect/expected/page.out b/contrib/pageinspect/expected/page.out
index 3fcd9fbe6d..83e5910453 100644
--- a/contrib/pageinspect/expected/page.out
+++ b/contrib/pageinspect/expected/page.out
@@ -1,48 +1,69 @@
 CREATE EXTENSION pageinspect;
-CREATE TABLE test1 (a int, b int);
-INSERT INTO test1 VALUES (16777217, 131584);
-VACUUM test1;  -- set up FSM
+CREATE TABLE test_rel_forks (a int);
+-- Make sure there are enough blocks in the heap for the FSM to be created.
+INSERT INTO test_rel_forks SELECT g from generate_series(1,10000) g;
+-- set up FSM and VM
+VACUUM test_rel_forks;
 -- The page contents can vary, so just test that it can be read
 -- successfully, but don't keep the output.
-SELECT octet_length(get_raw_page('test1', 'main', 0)) AS main_0;
+SELECT octet_length(get_raw_page('test_rel_forks', 'main', 0)) AS main_0;
  main_0 
 --------
    8192
 (1 row)
 
-SELECT octet_length(get_raw_page('test1', 'main', 1)) AS main_1;
-ERROR:  block number 1 is out of range for relation "test1"
-SELECT octet_length(get_raw_page('test1', 'fsm', 0)) AS fsm_0;
+SELECT octet_length(get_raw_page('test_rel_forks', 'main', 100)) AS main_100;
+ERROR:  block number 100 is out of range for relation "test_rel_forks"
+SELECT octet_length(get_raw_page('test_rel_forks', 'fsm', 0)) AS fsm_0;
  fsm_0 
 -------
   8192
 (1 row)
 
-SELECT octet_length(get_raw_page('test1', 'fsm', 1)) AS fsm_1;
- fsm_1 
--------
-  8192
-(1 row)
-
-SELECT octet_length(get_raw_page('test1', 'vm', 0)) AS vm_0;
+SELECT octet_length(get_raw_page('test_rel_forks', 'fsm', 10)) AS fsm_10;
+ERROR:  block number 10 is out of range for relation "test_rel_forks"
+SELECT octet_length(get_raw_page('test_rel_forks', 'vm', 0)) AS vm_0;
  vm_0 
 ------
  8192
 (1 row)
 
-SELECT octet_length(get_raw_page('test1', 'vm', 1)) AS vm_1;
-ERROR:  block number 1 is out of range for relation "test1"
+SELECT octet_length(get_raw_page('test_rel_forks', 'vm', 1)) AS vm_1;
+ERROR:  block number 1 is out of range for relation "test_rel_forks"
 SELECT octet_length(get_raw_page('xxx', 'main', 0));
 ERROR:  relation "xxx" does not exist
-SELECT octet_length(get_raw_page('test1', 'xxx', 0));
+SELECT octet_length(get_raw_page('test_rel_forks', 'xxx', 0));
 ERROR:  invalid fork name
 HINT:  Valid fork names are "main", "fsm", "vm", and "init".
-SELECT get_raw_page('test1', 0) = get_raw_page('test1', 'main', 0);
+SELECT * FROM fsm_page_contents(get_raw_page('test_rel_forks', 'fsm', 0));
+ fsm_page_contents 
+-------------------
+ 0: 192           +
+ 1: 192           +
+ 3: 192           +
+ 7: 192           +
+ 15: 192          +
+ 31: 192          +
+ 63: 192          +
+ 127: 192         +
+ 255: 192         +
+ 511: 192         +
+ 1023: 192        +
+ 2047: 192        +
+ 4095: 192        +
+ fp_next_slot: 0  +
+ 
+(1 row)
+
+SELECT get_raw_page('test_rel_forks', 0) = get_raw_page('test_rel_forks', 'main', 0);
  ?column? 
 ----------
  t
 (1 row)
 
+DROP TABLE test_rel_forks;
+CREATE TABLE test1 (a int, b int);
+INSERT INTO test1 VALUES (16777217, 131584);
 SELECT pagesize, version FROM page_header(get_raw_page('test1', 0));
  pagesize | version 
 ----------+---------
@@ -62,26 +83,6 @@ SELECT tuple_data_split('test1'::regclass, t_data, t_infomask, t_infomask2, t_bi
  {"\\x01000001","\\x00020200"}
 (1 row)
 
-SELECT * FROM fsm_page_contents(get_raw_page('test1', 'fsm', 0));
- fsm_page_contents 
--------------------
- 0: 254           +
- 1: 254           +
- 3: 254           +
- 7: 254           +
- 15: 254          +
- 31: 254          +
- 63: 254          +
- 127: 254         +
- 255: 254         +
- 511: 254         +
- 1023: 254        +
- 2047: 254        +
- 4095: 254        +
- fp_next_slot: 0  +
- 
-(1 row)
-
 DROP TABLE test1;
 -- check that using any of these functions with a partitioned table or index
 -- would fail
diff --git a/contrib/pageinspect/sql/page.sql b/contrib/pageinspect/sql/page.sql
index 8ac9991837..ee811759d5 100644
--- a/contrib/pageinspect/sql/page.sql
+++ b/contrib/pageinspect/sql/page.sql
@@ -1,26 +1,35 @@
 CREATE EXTENSION pageinspect;
 
-CREATE TABLE test1 (a int, b int);
-INSERT INTO test1 VALUES (16777217, 131584);
+CREATE TABLE test_rel_forks (a int);
+-- Make sure there are enough blocks in the heap for the FSM to be created.
+INSERT INTO test_rel_forks SELECT g from generate_series(1,10000) g;
 
-VACUUM test1;  -- set up FSM
+-- set up FSM and VM
+VACUUM test_rel_forks;
 
 -- The page contents can vary, so just test that it can be read
 -- successfully, but don't keep the output.
 
-SELECT octet_length(get_raw_page('test1', 'main', 0)) AS main_0;
-SELECT octet_length(get_raw_page('test1', 'main', 1)) AS main_1;
+SELECT octet_length(get_raw_page('test_rel_forks', 'main', 0)) AS main_0;
+SELECT octet_length(get_raw_page('test_rel_forks', 'main', 100)) AS main_100;
 
-SELECT octet_length(get_raw_page('test1', 'fsm', 0)) AS fsm_0;
-SELECT octet_length(get_raw_page('test1', 'fsm', 1)) AS fsm_1;
+SELECT octet_length(get_raw_page('test_rel_forks', 'fsm', 0)) AS fsm_0;
+SELECT octet_length(get_raw_page('test_rel_forks', 'fsm', 10)) AS fsm_10;
 
-SELECT octet_length(get_raw_page('test1', 'vm', 0)) AS vm_0;
-SELECT octet_length(get_raw_page('test1', 'vm', 1)) AS vm_1;
+SELECT octet_length(get_raw_page('test_rel_forks', 'vm', 0)) AS vm_0;
+SELECT octet_length(get_raw_page('test_rel_forks', 'vm', 1)) AS vm_1;
 
 SELECT octet_length(get_raw_page('xxx', 'main', 0));
-SELECT octet_length(get_raw_page('test1', 'xxx', 0));
+SELECT octet_length(get_raw_page('test_rel_forks', 'xxx', 0));
+
+SELECT * FROM fsm_page_contents(get_raw_page('test_rel_forks', 'fsm', 0));
+
+SELECT get_raw_page('test_rel_forks', 0) = get_raw_page('test_rel_forks', 'main', 0);
 
-SELECT get_raw_page('test1', 0) = get_raw_page('test1', 'main', 0);
+DROP TABLE test_rel_forks;
+
+CREATE TABLE test1 (a int, b int);
+INSERT INTO test1 VALUES (16777217, 131584);
 
 SELECT pagesize, version FROM page_header(get_raw_page('test1', 0));
 
@@ -29,8 +38,6 @@ SELECT page_checksum(get_raw_page('test1', 0), 0) IS NOT NULL AS silly_checksum_
 SELECT tuple_data_split('test1'::regclass, t_data, t_infomask, t_infomask2, t_bits)
     FROM heap_page_items(get_raw_page('test1', 0));
 
-SELECT * FROM fsm_page_contents(get_raw_page('test1', 'fsm', 0));
-
 DROP TABLE test1;
 
 -- check that using any of these functions with a partitioned table or index
diff --git a/src/backend/access/heap/hio.c b/src/backend/access/heap/hio.c
index b8b5871559..dd38c45845 100644
--- a/src/backend/access/heap/hio.c
+++ b/src/backend/access/heap/hio.c
@@ -24,6 +24,12 @@
 #include "storage/lmgr.h"
 #include "storage/smgr.h"
 
+/*#define TRACE_TARGETBLOCK */
+
+static BlockNumber get_page_no_fsm(Relation relation,
+				BlockNumber prevBlockAttempted,
+				bool *try_every_page);
+
 
 /*
  * RelationPutHeapTuple - place tuple at specified page
@@ -315,13 +321,15 @@ RelationGetBufferForTuple(Relation relation, Size len,
 						  BulkInsertState bistate,
 						  Buffer *vmbuffer, Buffer *vmbuffer_other)
 {
-	bool		use_fsm = !(options & HEAP_INSERT_SKIP_FSM);
+	bool		always_extend = (options & HEAP_INSERT_SKIP_FSM),
+				try_every_page = false;
 	Buffer		buffer = InvalidBuffer;
 	Page		page;
 	Size		pageFreeSpace = 0,
 				saveFreeSpace = 0;
 	BlockNumber targetBlock,
-				otherBlock;
+				otherBlock,
+				prevBlockAttempted;
 	bool		needLock;
 
 	len = MAXALIGN(len);		/* be conservative */
@@ -355,47 +363,42 @@ RelationGetBufferForTuple(Relation relation, Size len,
 	 * loop around and retry multiple times. (To insure this isn't an infinite
 	 * loop, we must update the FSM with the correct amount of free space on
 	 * each page that proves not to be suitable.)  If the FSM has no record of
-	 * a page with enough free space, we give up and extend the relation.
+	 * a page with enough free space, we try every page if the heap is small,
+	 * or give up and extend the relation.
 	 *
-	 * When use_fsm is false, we either put the tuple onto the existing target
-	 * page or extend the relation.
+	 * When always_extend is true, we either put the tuple onto the existing
+	 * target page or extend the relation.
 	 */
 	if (len + saveFreeSpace > MaxHeapTupleSize)
 	{
 		/* can't fit, don't bother asking FSM */
 		targetBlock = InvalidBlockNumber;
-		use_fsm = false;
+		always_extend = true;
 	}
 	else if (bistate && bistate->current_buf != InvalidBuffer)
 		targetBlock = BufferGetBlockNumber(bistate->current_buf);
 	else
 		targetBlock = RelationGetTargetBlock(relation);
 
-	if (targetBlock == InvalidBlockNumber && use_fsm)
+	if (targetBlock == InvalidBlockNumber && !always_extend)
 	{
 		/*
 		 * We have no cached target page, so ask the FSM for an initial
 		 * target.
 		 */
 		targetBlock = GetPageWithFreeSpace(relation, len + saveFreeSpace);
-
-		/*
-		 * If the FSM knows nothing of the rel, try the last page before we
-		 * give up and extend.  This avoids one-tuple-per-page syndrome during
-		 * bootstrapping or in a recently-started system.
-		 */
 		if (targetBlock == InvalidBlockNumber)
-		{
-			BlockNumber nblocks = RelationGetNumberOfBlocks(relation);
-
-			if (nblocks > 0)
-				targetBlock = nblocks - 1;
-		}
+			targetBlock = get_page_no_fsm(relation, InvalidBlockNumber,
+										  &try_every_page);
 	}
 
 loop:
 	while (targetBlock != InvalidBlockNumber)
 	{
+
+#ifdef TRACE_TARGETBLOCK
+		elog(DEBUG1, "Attempting block %u", targetBlock);
+#endif
 		/*
 		 * Read and exclusive-lock the target block, as well as the other
 		 * block if one was given, taking suitable care with lock ordering and
@@ -482,6 +485,10 @@ loop:
 		pageFreeSpace = PageGetHeapFreeSpace(page);
 		if (len + saveFreeSpace <= pageFreeSpace)
 		{
+
+#ifdef TRACE_TARGETBLOCK
+			elog(DEBUG1, "Returning buffer for block %u", targetBlock);
+#endif
 			/* use this page as future insert target, too */
 			RelationSetTargetBlock(relation, targetBlock);
 			return buffer;
@@ -502,18 +509,37 @@ loop:
 			ReleaseBuffer(buffer);
 		}
 
-		/* Without FSM, always fall out of the loop and extend */
-		if (!use_fsm)
+		if (always_extend)
 			break;
 
-		/*
-		 * Update FSM as to condition of this page, and ask for another page
-		 * to try.
-		 */
-		targetBlock = RecordAndGetPageWithFreeSpace(relation,
-													targetBlock,
-													pageFreeSpace,
-													len + saveFreeSpace);
+		if (try_every_page)
+		{
+			/* We've tried every page; extend. */
+			if (targetBlock == 0)
+				break;
+
+			/* Try the next lower block number. */
+			targetBlock--;
+
+#ifdef TRACE_TARGETBLOCK
+			elog(DEBUG1, "Trying next lower block number");
+#endif
+		}
+		else
+		{
+			/*
+			 * Update FSM as to condition of this page, and ask for another
+			 * page to try.
+			 */
+			prevBlockAttempted = targetBlock;
+			targetBlock = RecordAndGetPageWithFreeSpace(relation,
+														targetBlock,
+														pageFreeSpace,
+														len + saveFreeSpace);
+			if (targetBlock == InvalidBlockNumber)
+				targetBlock = get_page_no_fsm(relation, prevBlockAttempted,
+											  &try_every_page);
+		}
 	}
 
 	/*
@@ -534,7 +560,7 @@ loop:
 	 */
 	if (needLock)
 	{
-		if (!use_fsm)
+		if (always_extend || try_every_page)
 			LockRelationForExtension(relation, ExclusiveLock);
 		else if (!ConditionalLockRelationForExtension(relation, ExclusiveLock))
 		{
@@ -554,6 +580,10 @@ loop:
 			if (targetBlock != InvalidBlockNumber)
 			{
 				UnlockRelationForExtension(relation, ExclusiveLock);
+
+				/* This shouldn't be true, but let's make sure it isn't. */
+				try_every_page = false;
+
 				goto loop;
 			}
 
@@ -627,3 +657,54 @@ loop:
 
 	return buffer;
 }
+
+/*
+ * If the FSM has no information, first try the last page in the relation
+ * if we haven't already.  This avoids one-tuple-per-page syndrome during
+ * bootstrapping or in a recently-started system.
+ *
+ * If the heap is small enough, it likely has no FSM (or a truncated one),
+ * but even if it does, just try every page.
+ *
+ * If InvalidBlockNumber is returned, extend the relation.
+ */
+static BlockNumber
+get_page_no_fsm(Relation relation,
+				BlockNumber prevBlockAttempted,
+				bool *try_every_page)
+{
+	BlockNumber nblocks = RelationGetNumberOfBlocks(relation),
+				targetBlock = InvalidBlockNumber;
+
+	if (nblocks > 0)
+	{
+		targetBlock = nblocks - 1;
+
+		if (nblocks <= HEAP_FSM_EXTENSION_THRESHOLD)
+		{
+			*try_every_page = true;
+
+#ifdef TRACE_TARGETBLOCK
+			elog(DEBUG1, "Setting try_every_page");
+#endif
+			/* If we already tried the last page, skip it or extend. */
+			if (targetBlock == prevBlockAttempted)
+			{
+				if (nblocks > 1)
+				{
+					Assert(targetBlock != InvalidBlockNumber);
+					targetBlock--;
+				}
+				else
+					targetBlock = InvalidBlockNumber;
+			}
+		}
+		else
+		{
+			/* If we already tried the last page, extend. */
+			if (targetBlock == prevBlockAttempted)
+				targetBlock = InvalidBlockNumber;
+		}
+	}
+	return targetBlock;
+}
diff --git a/src/backend/storage/freespace/freespace.c b/src/backend/storage/freespace/freespace.c
index 7c4ad1c449..8414e33aed 100644
--- a/src/backend/storage/freespace/freespace.c
+++ b/src/backend/storage/freespace/freespace.c
@@ -111,6 +111,7 @@ static BlockNumber fsm_search(Relation rel, uint8 min_cat);
 static uint8 fsm_vacuum_page(Relation rel, FSMAddress addr,
 				BlockNumber start, BlockNumber end,
 				bool *eof);
+static bool allow_write_to_fsm(Relation rel, BlockNumber heapblk);
 
 
 /******** Public API ********/
@@ -125,8 +126,7 @@ static uint8 fsm_vacuum_page(Relation rel, FSMAddress addr,
  * will turn out to have too little space available by the time the caller
  * gets a lock on it.  In that case, the caller should report the actual
  * amount of free space available on that page and then try again (see
- * RecordAndGetPageWithFreeSpace).  If InvalidBlockNumber is returned,
- * extend the relation.
+ * RecordAndGetPageWithFreeSpace).
  */
 BlockNumber
 GetPageWithFreeSpace(Relation rel, Size spaceNeeded)
@@ -155,6 +155,9 @@ RecordAndGetPageWithFreeSpace(Relation rel, BlockNumber oldPage,
 	uint16		slot;
 	int			search_slot;
 
+	if (!allow_write_to_fsm(rel, oldPage))
+		return InvalidBlockNumber;
+
 	/* Get the location of the FSM byte representing the heap block */
 	addr = fsm_get_location(oldPage, &slot);
 
@@ -184,6 +187,9 @@ RecordPageWithFreeSpace(Relation rel, BlockNumber heapBlk, Size spaceAvail)
 	FSMAddress	addr;
 	uint16		slot;
 
+	if (!allow_write_to_fsm(rel, heapBlk))
+		return;
+
 	/* Get the location of the FSM byte representing the heap block */
 	addr = fsm_get_location(heapBlk, &slot);
 
@@ -204,11 +210,35 @@ XLogRecordPageWithFreeSpace(RelFileNode rnode, BlockNumber heapBlk,
 	BlockNumber blkno;
 	Buffer		buf;
 	Page		page;
+	bool		write_to_fsm;
 
 	/* Get the location of the FSM byte representing the heap block */
 	addr = fsm_get_location(heapBlk, &slot);
 	blkno = fsm_logical_to_physical(addr);
 
+	/* This is meant to mirror the logic in allow_write_to_fsm() */
+	if (heapBlk > HEAP_FSM_EXTENSION_THRESHOLD)
+		write_to_fsm = true;
+	else
+	{
+		/* Open the relation at smgr level */
+		SMgrRelation smgr = smgropen(rnode, InvalidBackendId);
+
+		if (smgrexists(smgr, FSM_FORKNUM))
+			write_to_fsm = true;
+		else
+		{
+			BlockNumber heap_nblocks = smgrnblocks(smgr, MAIN_FORKNUM);
+			if (heap_nblocks > HEAP_FSM_EXTENSION_THRESHOLD)
+				write_to_fsm = true;
+			else
+				write_to_fsm = false;
+		}
+	}
+
+	if (!write_to_fsm)
+		return;
+
 	/* If the page doesn't exist already, extend */
 	buf = XLogReadBufferExtended(rnode, FSM_FORKNUM, blkno, RBM_ZERO_ON_ERROR);
 	LockBuffer(buf, BUFFER_LOCK_EXCLUSIVE);
@@ -904,3 +934,33 @@ fsm_vacuum_page(Relation rel, FSMAddress addr,
 
 	return max_avail;
 }
+
+/*
+ * For heaps we prevent extension of the FSM unless the number
+ * of pages exceeds HEAP_FSM_EXTENSION_THRESHOLD. For tables
+ * that don't already have a FSM, this will save an inode
+ * and a few kB of space.
+ */
+static bool
+allow_write_to_fsm(Relation rel, BlockNumber heapblk)
+{
+	BlockNumber		heap_nblocks;
+
+	if (heapblk > HEAP_FSM_EXTENSION_THRESHOLD)
+		return true;
+
+	/* Index rels can always create an FSM. */
+	if (rel->rd_rel->relkind != RELKIND_RELATION)
+		return true;
+
+	RelationOpenSmgr(rel);
+	if (smgrexists(rel->rd_smgr, FSM_FORKNUM))
+		return true;
+
+	/* last resort */
+	heap_nblocks = RelationGetNumberOfBlocks(rel);
+	if (heap_nblocks > HEAP_FSM_EXTENSION_THRESHOLD)
+		return true;
+	else
+		return false;
+}
diff --git a/src/include/storage/freespace.h b/src/include/storage/freespace.h
index 726eb30fb8..68e4d27818 100644
--- a/src/include/storage/freespace.h
+++ b/src/include/storage/freespace.h
@@ -18,6 +18,10 @@
 #include "storage/relfilenode.h"
 #include "utils/relcache.h"
 
+/* Only extend a heap's FSM if the heap has greater than this many blocks */
+/* TODO: Performance-test different values. */
+#define HEAP_FSM_EXTENSION_THRESHOLD 10
+
 /* prototypes for public functions in freespace.c */
 extern Size GetRecordedFreeSpace(Relation rel, BlockNumber heapBlk);
 extern BlockNumber GetPageWithFreeSpace(Relation rel, Size spaceNeeded);
-- 
2.17.1

v5-0002-Add-parameter-nblocks-to-RecordPageWithFreeSpace.patchtext/x-patch; charset=US-ASCII; name=v5-0002-Add-parameter-nblocks-to-RecordPageWithFreeSpace.patchDownload
From b928d4fd814aefaa90bde5388ad81a1a68e363a5 Mon Sep 17 00:00:00 2001
From: John Naylor <jcnaylor@gmail.com>
Date: Tue, 16 Oct 2018 17:12:19 +0700
Subject: [PATCH v5 2/2] Add parameter nblocks to RecordPageWithFreeSpace().

Now, VACUUM won't be penalized by too many system calls to get number of
blocks in the relation when it calls RecordPageWithFreeSpace().
---
 src/backend/access/brin/brin.c            |  2 +-
 src/backend/access/brin/brin_pageops.c    |  8 +++---
 src/backend/access/heap/hio.c             |  2 +-
 src/backend/commands/vacuumlazy.c         | 17 +++++++------
 src/backend/storage/freespace/freespace.c | 31 +++++++++++++++++++----
 src/backend/storage/freespace/indexfsm.c  |  4 +--
 src/include/storage/freespace.h           |  2 +-
 7 files changed, 44 insertions(+), 22 deletions(-)

diff --git a/src/backend/access/brin/brin.c b/src/backend/access/brin/brin.c
index e95fbbcea7..7c5b1af764 100644
--- a/src/backend/access/brin/brin.c
+++ b/src/backend/access/brin/brin.c
@@ -1148,7 +1148,7 @@ terminate_brin_buildstate(BrinBuildState *state)
 		freespace = PageGetFreeSpace(page);
 		blk = BufferGetBlockNumber(state->bs_currentInsertBuf);
 		ReleaseBuffer(state->bs_currentInsertBuf);
-		RecordPageWithFreeSpace(state->bs_irel, blk, freespace);
+		RecordPageWithFreeSpace(state->bs_irel, blk, freespace, InvalidBlockNumber);
 		FreeSpaceMapVacuumRange(state->bs_irel, blk, blk + 1);
 	}
 
diff --git a/src/backend/access/brin/brin_pageops.c b/src/backend/access/brin/brin_pageops.c
index 040cb62e55..70d93878ba 100644
--- a/src/backend/access/brin/brin_pageops.c
+++ b/src/backend/access/brin/brin_pageops.c
@@ -310,7 +310,7 @@ brin_doupdate(Relation idxrel, BlockNumber pagesPerRange,
 
 		if (extended)
 		{
-			RecordPageWithFreeSpace(idxrel, newblk, freespace);
+			RecordPageWithFreeSpace(idxrel, newblk, freespace, InvalidBlockNumber);
 			FreeSpaceMapVacuumRange(idxrel, newblk, newblk + 1);
 		}
 
@@ -461,7 +461,7 @@ brin_doinsert(Relation idxrel, BlockNumber pagesPerRange,
 
 	if (extended)
 	{
-		RecordPageWithFreeSpace(idxrel, blk, freespace);
+		RecordPageWithFreeSpace(idxrel, blk, freespace, InvalidBlockNumber);
 		FreeSpaceMapVacuumRange(idxrel, blk, blk + 1);
 	}
 
@@ -654,7 +654,7 @@ brin_page_cleanup(Relation idxrel, Buffer buf)
 
 	/* Measure free space and record it */
 	RecordPageWithFreeSpace(idxrel, BufferGetBlockNumber(buf),
-							br_page_get_freespace(page));
+							br_page_get_freespace(page), InvalidBlockNumber);
 }
 
 /*
@@ -895,7 +895,7 @@ brin_initialize_empty_new_buffer(Relation idxrel, Buffer buffer)
 	 * pages whose FSM records were forgotten in a crash.
 	 */
 	RecordPageWithFreeSpace(idxrel, BufferGetBlockNumber(buffer),
-							br_page_get_freespace(page));
+							br_page_get_freespace(page), InvalidBlockNumber);
 }
 
 
diff --git a/src/backend/access/heap/hio.c b/src/backend/access/heap/hio.c
index dd38c45845..47ca168465 100644
--- a/src/backend/access/heap/hio.c
+++ b/src/backend/access/heap/hio.c
@@ -246,7 +246,7 @@ RelationAddExtraBlocks(Relation relation, BulkInsertState bistate)
 		 * chance of making this page visible to other concurrently inserting
 		 * backends, and we want that to happen without delay.
 		 */
-		RecordPageWithFreeSpace(relation, blockNum, freespace);
+		RecordPageWithFreeSpace(relation, blockNum, freespace, InvalidBlockNumber);
 	}
 	while (--extraBlocks > 0);
 
diff --git a/src/backend/commands/vacuumlazy.c b/src/backend/commands/vacuumlazy.c
index 8996d366e9..9f4d8adcdb 100644
--- a/src/backend/commands/vacuumlazy.c
+++ b/src/backend/commands/vacuumlazy.c
@@ -154,7 +154,7 @@ static BufferAccessStrategy vac_strategy;
 static void lazy_scan_heap(Relation onerel, int options,
 			   LVRelStats *vacrelstats, Relation *Irel, int nindexes,
 			   bool aggressive);
-static void lazy_vacuum_heap(Relation onerel, LVRelStats *vacrelstats);
+static void lazy_vacuum_heap(Relation onerel, LVRelStats *vacrelstats, BlockNumber nblocks);
 static bool lazy_check_needs_freeze(Buffer buf, bool *hastup);
 static void lazy_vacuum_index(Relation indrel,
 				  IndexBulkDeleteResult **stats,
@@ -759,7 +759,7 @@ lazy_scan_heap(Relation onerel, int options, LVRelStats *vacrelstats,
 			pgstat_progress_update_multi_param(2, hvp_index, hvp_val);
 
 			/* Remove tuples from heap */
-			lazy_vacuum_heap(onerel, vacrelstats);
+			lazy_vacuum_heap(onerel, vacrelstats, nblocks);
 
 			/*
 			 * Forget the now-vacuumed tuples, and press on, but be careful
@@ -897,7 +897,7 @@ lazy_scan_heap(Relation onerel, int options, LVRelStats *vacrelstats,
 			MarkBufferDirty(buf);
 			UnlockReleaseBuffer(buf);
 
-			RecordPageWithFreeSpace(onerel, blkno, freespace);
+			RecordPageWithFreeSpace(onerel, blkno, freespace, nblocks);
 			continue;
 		}
 
@@ -936,7 +936,7 @@ lazy_scan_heap(Relation onerel, int options, LVRelStats *vacrelstats,
 			}
 
 			UnlockReleaseBuffer(buf);
-			RecordPageWithFreeSpace(onerel, blkno, freespace);
+			RecordPageWithFreeSpace(onerel, blkno, freespace, nblocks);
 			continue;
 		}
 
@@ -1339,7 +1339,7 @@ lazy_scan_heap(Relation onerel, int options, LVRelStats *vacrelstats,
 		 * taken if there are no indexes.)
 		 */
 		if (vacrelstats->num_dead_tuples == prev_dead_count)
-			RecordPageWithFreeSpace(onerel, blkno, freespace);
+			RecordPageWithFreeSpace(onerel, blkno, freespace, nblocks);
 	}
 
 	/* report that everything is scanned and vacuumed */
@@ -1401,7 +1401,7 @@ lazy_scan_heap(Relation onerel, int options, LVRelStats *vacrelstats,
 		/* Remove tuples from heap */
 		pgstat_progress_update_param(PROGRESS_VACUUM_PHASE,
 									 PROGRESS_VACUUM_PHASE_VACUUM_HEAP);
-		lazy_vacuum_heap(onerel, vacrelstats);
+		lazy_vacuum_heap(onerel, vacrelstats, nblocks);
 		vacrelstats->num_index_scans++;
 	}
 
@@ -1472,9 +1472,10 @@ lazy_scan_heap(Relation onerel, int options, LVRelStats *vacrelstats,
  * Note: the reason for doing this as a second pass is we cannot remove
  * the tuples until we've removed their index entries, and we want to
  * process index entry removal in batches as large as possible.
+ * Note: nblocks is passed as an optimization for RecordPageWithFreeSpace().
  */
 static void
-lazy_vacuum_heap(Relation onerel, LVRelStats *vacrelstats)
+lazy_vacuum_heap(Relation onerel, LVRelStats *vacrelstats, BlockNumber nblocks)
 {
 	int			tupindex;
 	int			npages;
@@ -1511,7 +1512,7 @@ lazy_vacuum_heap(Relation onerel, LVRelStats *vacrelstats)
 		freespace = PageGetHeapFreeSpace(page);
 
 		UnlockReleaseBuffer(buf);
-		RecordPageWithFreeSpace(onerel, tblk, freespace);
+		RecordPageWithFreeSpace(onerel, tblk, freespace, nblocks);
 		npages++;
 	}
 
diff --git a/src/backend/storage/freespace/freespace.c b/src/backend/storage/freespace/freespace.c
index 8414e33aed..7592e17279 100644
--- a/src/backend/storage/freespace/freespace.c
+++ b/src/backend/storage/freespace/freespace.c
@@ -111,7 +111,7 @@ static BlockNumber fsm_search(Relation rel, uint8 min_cat);
 static uint8 fsm_vacuum_page(Relation rel, FSMAddress addr,
 				BlockNumber start, BlockNumber end,
 				bool *eof);
-static bool allow_write_to_fsm(Relation rel, BlockNumber heapblk);
+static bool allow_write_to_fsm(Relation rel, BlockNumber heapblk, BlockNumber cached_nblocks);
 
 
 /******** Public API ********/
@@ -155,7 +155,7 @@ RecordAndGetPageWithFreeSpace(Relation rel, BlockNumber oldPage,
 	uint16		slot;
 	int			search_slot;
 
-	if (!allow_write_to_fsm(rel, oldPage))
+	if (!allow_write_to_fsm(rel, oldPage, InvalidBlockNumber))
 		return InvalidBlockNumber;
 
 	/* Get the location of the FSM byte representing the heap block */
@@ -181,13 +181,13 @@ RecordAndGetPageWithFreeSpace(Relation rel, BlockNumber oldPage,
  * FreeSpaceMapVacuum call, which updates the upper level pages.
  */
 void
-RecordPageWithFreeSpace(Relation rel, BlockNumber heapBlk, Size spaceAvail)
+RecordPageWithFreeSpace(Relation rel, BlockNumber heapBlk, Size spaceAvail, BlockNumber nblocks)
 {
 	int			new_cat = fsm_space_avail_to_cat(spaceAvail);
 	FSMAddress	addr;
 	uint16		slot;
 
-	if (!allow_write_to_fsm(rel, heapBlk))
+	if (!allow_write_to_fsm(rel, heapBlk, nblocks))
 		return;
 
 	/* Get the location of the FSM byte representing the heap block */
@@ -942,9 +942,10 @@ fsm_vacuum_page(Relation rel, FSMAddress addr,
  * and a few kB of space.
  */
 static bool
-allow_write_to_fsm(Relation rel, BlockNumber heapblk)
+allow_write_to_fsm(Relation rel, BlockNumber heapblk, BlockNumber cached_nblocks)
 {
 	BlockNumber		heap_nblocks;
+	bool			skip_get_nblocks = false;
 
 	if (heapblk > HEAP_FSM_EXTENSION_THRESHOLD)
 		return true;
@@ -953,10 +954,30 @@ allow_write_to_fsm(Relation rel, BlockNumber heapblk)
 	if (rel->rd_rel->relkind != RELKIND_RELATION)
 		return true;
 
+	/*
+	 * If the caller knows nblocks, we can avoid a system call later.
+	 * If it doesn't, maybe we have relpages from a previous VACUUM.
+	 * Since the table may have extended since then, we still have to
+	 * count the pages later if we can't return now.
+	 */
+	if (cached_nblocks != InvalidBlockNumber)
+	{
+		if (cached_nblocks > HEAP_FSM_EXTENSION_THRESHOLD)
+			return true;
+		else
+			skip_get_nblocks = true;
+	}
+	else if (rel->rd_rel->relpages != InvalidBlockNumber &&
+			 rel->rd_rel->relpages > HEAP_FSM_EXTENSION_THRESHOLD)
+		return true;
+
 	RelationOpenSmgr(rel);
 	if (smgrexists(rel->rd_smgr, FSM_FORKNUM))
 		return true;
 
+	if (skip_get_nblocks)
+		return false;
+
 	/* last resort */
 	heap_nblocks = RelationGetNumberOfBlocks(rel);
 	if (heap_nblocks > HEAP_FSM_EXTENSION_THRESHOLD)
diff --git a/src/backend/storage/freespace/indexfsm.c b/src/backend/storage/freespace/indexfsm.c
index e21047b96f..d8fd29a7eb 100644
--- a/src/backend/storage/freespace/indexfsm.c
+++ b/src/backend/storage/freespace/indexfsm.c
@@ -51,7 +51,7 @@ GetFreeIndexPage(Relation rel)
 void
 RecordFreeIndexPage(Relation rel, BlockNumber freeBlock)
 {
-	RecordPageWithFreeSpace(rel, freeBlock, BLCKSZ - 1);
+	RecordPageWithFreeSpace(rel, freeBlock, BLCKSZ - 1, InvalidBlockNumber);
 }
 
 
@@ -61,7 +61,7 @@ RecordFreeIndexPage(Relation rel, BlockNumber freeBlock)
 void
 RecordUsedIndexPage(Relation rel, BlockNumber usedBlock)
 {
-	RecordPageWithFreeSpace(rel, usedBlock, 0);
+	RecordPageWithFreeSpace(rel, usedBlock, 0, InvalidBlockNumber);
 }
 
 /*
diff --git a/src/include/storage/freespace.h b/src/include/storage/freespace.h
index 68e4d27818..e86ad9d77e 100644
--- a/src/include/storage/freespace.h
+++ b/src/include/storage/freespace.h
@@ -30,7 +30,7 @@ extern BlockNumber RecordAndGetPageWithFreeSpace(Relation rel,
 							  Size oldSpaceAvail,
 							  Size spaceNeeded);
 extern void RecordPageWithFreeSpace(Relation rel, BlockNumber heapBlk,
-						Size spaceAvail);
+						Size spaceAvail, BlockNumber nblocks);
 extern void XLogRecordPageWithFreeSpace(RelFileNode rnode, BlockNumber heapBlk,
 							Size spaceAvail);
 
-- 
2.17.1

#14Amit Kapila
amit.kapila16@gmail.com
In reply to: John Naylor (#13)
Re: WIP: Avoid creation of the free space map for small tables

On Tue, Oct 16, 2018 at 4:27 PM John Naylor <jcnaylor@gmail.com> wrote:

[proposal for a cache of blocks to try]

That's interesting. I'll have to do some reading elsewhere in the
codebase, and then I'll follow up.

Thanks, I have changed the status of this patch as "Waiting on
Author". Feel free to change it once you have a new patch.

--
With Regards,
Amit Kapila.
EnterpriseDB: http://www.enterprisedb.com

#15John Naylor
jcnaylor@gmail.com
In reply to: Amit Kapila (#12)
1 attachment(s)
Re: WIP: Avoid creation of the free space map for small tables

On 10/16/18, Amit Kapila <amit.kapila16@gmail.com> wrote:

I think we can avoid using prevBlockNumber and try_every_block, if we
maintain a small cache which tells whether the particular block is
tried or not. What I am envisioning is that while finding the block
with free space, if we came to know that the relation in question is
small enough that it doesn't have FSM, we can perform a local_search.
In local_seach, we can enquire the cache for any block that we can try
and if we find any block, we can try inserting in that block,
otherwise, we need to extend the relation. One simple way to imagine
such a cache would be an array of structure and structure has blkno
and status fields. After we get the usable block, we need to clear
the cache, if exists.

Here is the design I've implemented in the attached v6. There is more
code than v5, but there's a cleaner separation between freespace.c and
hio.c, as you preferred. I also think it's more robust. I've expended
some effort to avoid doing unnecessary system calls to get the number
of blocks.
--

For the local, in-memory map, maintain a static array of status
markers, of fixed-length HEAP_FSM_CREATION_THRESHOLD, indexed by block
number. This is populated every time we call GetPageWithFreeSpace() on
small tables with no FSM. The statuses are

'zero' (beyond the relation)
'available to try'
'tried already'

Example for a 4-page heap:

01234567
AAAA0000

If we try block 3 and there is no space, we set it to 'tried' and next
time through the loop we'll try 2, etc:

01234567
AAAT0000

If we try all available blocks, we will extend the relation. As in the
master branch, first we call GetPageWithFreeSpace() again to see if
another backend extended the relation to 5 blocks while we were
waiting for the lock. If we find a new block, we will mark the new
block available and leave the rest alone:

01234567
TTTTA000

On the odd chance we still can't insert into the new block, we'll skip
checking any others and we'll redo the logic to extend the relation.

If we're about to successfully return a buffer, whether from an
existing block, or by extension, we clear the local map.

Once this is in shape, I'll do some performance testing.

-John Naylor

Attachments:

v6-0001-Avoid-creation-of-the-free-space-map-for-small-ta.patchtext/x-patch; charset=US-ASCII; name=v6-0001-Avoid-creation-of-the-free-space-map-for-small-ta.patchDownload
From 529fa1f57946d70736b2304c2883213e45f7c077 Mon Sep 17 00:00:00 2001
From: John Naylor <jcnaylor@gmail.com>
Date: Mon, 22 Oct 2018 13:39:25 +0700
Subject: [PATCH v6] Avoid creation of the free space map for small tables.

The FSM isn't created if the heap has fewer than 8 blocks. If the last
known good block has insufficient space, try every block before extending
the heap.

If a heap with a FSM is truncated back to below the threshold, the FSM
stays around and can be used as usual.
---
 contrib/pageinspect/expected/page.out     |  77 ++++----
 contrib/pageinspect/sql/page.sql          |  33 ++--
 src/backend/access/brin/brin.c            |   2 +-
 src/backend/access/brin/brin_pageops.c    |   8 +-
 src/backend/access/heap/hio.c             |  57 ++++--
 src/backend/commands/vacuumlazy.c         |  17 +-
 src/backend/storage/freespace/freespace.c | 224 +++++++++++++++++++++-
 src/backend/storage/freespace/indexfsm.c  |   4 +-
 src/include/storage/freespace.h           |   7 +-
 9 files changed, 344 insertions(+), 85 deletions(-)

diff --git a/contrib/pageinspect/expected/page.out b/contrib/pageinspect/expected/page.out
index 3fcd9fbe6d..83e5910453 100644
--- a/contrib/pageinspect/expected/page.out
+++ b/contrib/pageinspect/expected/page.out
@@ -1,48 +1,69 @@
 CREATE EXTENSION pageinspect;
-CREATE TABLE test1 (a int, b int);
-INSERT INTO test1 VALUES (16777217, 131584);
-VACUUM test1;  -- set up FSM
+CREATE TABLE test_rel_forks (a int);
+-- Make sure there are enough blocks in the heap for the FSM to be created.
+INSERT INTO test_rel_forks SELECT g from generate_series(1,10000) g;
+-- set up FSM and VM
+VACUUM test_rel_forks;
 -- The page contents can vary, so just test that it can be read
 -- successfully, but don't keep the output.
-SELECT octet_length(get_raw_page('test1', 'main', 0)) AS main_0;
+SELECT octet_length(get_raw_page('test_rel_forks', 'main', 0)) AS main_0;
  main_0 
 --------
    8192
 (1 row)
 
-SELECT octet_length(get_raw_page('test1', 'main', 1)) AS main_1;
-ERROR:  block number 1 is out of range for relation "test1"
-SELECT octet_length(get_raw_page('test1', 'fsm', 0)) AS fsm_0;
+SELECT octet_length(get_raw_page('test_rel_forks', 'main', 100)) AS main_100;
+ERROR:  block number 100 is out of range for relation "test_rel_forks"
+SELECT octet_length(get_raw_page('test_rel_forks', 'fsm', 0)) AS fsm_0;
  fsm_0 
 -------
   8192
 (1 row)
 
-SELECT octet_length(get_raw_page('test1', 'fsm', 1)) AS fsm_1;
- fsm_1 
--------
-  8192
-(1 row)
-
-SELECT octet_length(get_raw_page('test1', 'vm', 0)) AS vm_0;
+SELECT octet_length(get_raw_page('test_rel_forks', 'fsm', 10)) AS fsm_10;
+ERROR:  block number 10 is out of range for relation "test_rel_forks"
+SELECT octet_length(get_raw_page('test_rel_forks', 'vm', 0)) AS vm_0;
  vm_0 
 ------
  8192
 (1 row)
 
-SELECT octet_length(get_raw_page('test1', 'vm', 1)) AS vm_1;
-ERROR:  block number 1 is out of range for relation "test1"
+SELECT octet_length(get_raw_page('test_rel_forks', 'vm', 1)) AS vm_1;
+ERROR:  block number 1 is out of range for relation "test_rel_forks"
 SELECT octet_length(get_raw_page('xxx', 'main', 0));
 ERROR:  relation "xxx" does not exist
-SELECT octet_length(get_raw_page('test1', 'xxx', 0));
+SELECT octet_length(get_raw_page('test_rel_forks', 'xxx', 0));
 ERROR:  invalid fork name
 HINT:  Valid fork names are "main", "fsm", "vm", and "init".
-SELECT get_raw_page('test1', 0) = get_raw_page('test1', 'main', 0);
+SELECT * FROM fsm_page_contents(get_raw_page('test_rel_forks', 'fsm', 0));
+ fsm_page_contents 
+-------------------
+ 0: 192           +
+ 1: 192           +
+ 3: 192           +
+ 7: 192           +
+ 15: 192          +
+ 31: 192          +
+ 63: 192          +
+ 127: 192         +
+ 255: 192         +
+ 511: 192         +
+ 1023: 192        +
+ 2047: 192        +
+ 4095: 192        +
+ fp_next_slot: 0  +
+ 
+(1 row)
+
+SELECT get_raw_page('test_rel_forks', 0) = get_raw_page('test_rel_forks', 'main', 0);
  ?column? 
 ----------
  t
 (1 row)
 
+DROP TABLE test_rel_forks;
+CREATE TABLE test1 (a int, b int);
+INSERT INTO test1 VALUES (16777217, 131584);
 SELECT pagesize, version FROM page_header(get_raw_page('test1', 0));
  pagesize | version 
 ----------+---------
@@ -62,26 +83,6 @@ SELECT tuple_data_split('test1'::regclass, t_data, t_infomask, t_infomask2, t_bi
  {"\\x01000001","\\x00020200"}
 (1 row)
 
-SELECT * FROM fsm_page_contents(get_raw_page('test1', 'fsm', 0));
- fsm_page_contents 
--------------------
- 0: 254           +
- 1: 254           +
- 3: 254           +
- 7: 254           +
- 15: 254          +
- 31: 254          +
- 63: 254          +
- 127: 254         +
- 255: 254         +
- 511: 254         +
- 1023: 254        +
- 2047: 254        +
- 4095: 254        +
- fp_next_slot: 0  +
- 
-(1 row)
-
 DROP TABLE test1;
 -- check that using any of these functions with a partitioned table or index
 -- would fail
diff --git a/contrib/pageinspect/sql/page.sql b/contrib/pageinspect/sql/page.sql
index 8ac9991837..ee811759d5 100644
--- a/contrib/pageinspect/sql/page.sql
+++ b/contrib/pageinspect/sql/page.sql
@@ -1,26 +1,35 @@
 CREATE EXTENSION pageinspect;
 
-CREATE TABLE test1 (a int, b int);
-INSERT INTO test1 VALUES (16777217, 131584);
+CREATE TABLE test_rel_forks (a int);
+-- Make sure there are enough blocks in the heap for the FSM to be created.
+INSERT INTO test_rel_forks SELECT g from generate_series(1,10000) g;
 
-VACUUM test1;  -- set up FSM
+-- set up FSM and VM
+VACUUM test_rel_forks;
 
 -- The page contents can vary, so just test that it can be read
 -- successfully, but don't keep the output.
 
-SELECT octet_length(get_raw_page('test1', 'main', 0)) AS main_0;
-SELECT octet_length(get_raw_page('test1', 'main', 1)) AS main_1;
+SELECT octet_length(get_raw_page('test_rel_forks', 'main', 0)) AS main_0;
+SELECT octet_length(get_raw_page('test_rel_forks', 'main', 100)) AS main_100;
 
-SELECT octet_length(get_raw_page('test1', 'fsm', 0)) AS fsm_0;
-SELECT octet_length(get_raw_page('test1', 'fsm', 1)) AS fsm_1;
+SELECT octet_length(get_raw_page('test_rel_forks', 'fsm', 0)) AS fsm_0;
+SELECT octet_length(get_raw_page('test_rel_forks', 'fsm', 10)) AS fsm_10;
 
-SELECT octet_length(get_raw_page('test1', 'vm', 0)) AS vm_0;
-SELECT octet_length(get_raw_page('test1', 'vm', 1)) AS vm_1;
+SELECT octet_length(get_raw_page('test_rel_forks', 'vm', 0)) AS vm_0;
+SELECT octet_length(get_raw_page('test_rel_forks', 'vm', 1)) AS vm_1;
 
 SELECT octet_length(get_raw_page('xxx', 'main', 0));
-SELECT octet_length(get_raw_page('test1', 'xxx', 0));
+SELECT octet_length(get_raw_page('test_rel_forks', 'xxx', 0));
+
+SELECT * FROM fsm_page_contents(get_raw_page('test_rel_forks', 'fsm', 0));
+
+SELECT get_raw_page('test_rel_forks', 0) = get_raw_page('test_rel_forks', 'main', 0);
 
-SELECT get_raw_page('test1', 0) = get_raw_page('test1', 'main', 0);
+DROP TABLE test_rel_forks;
+
+CREATE TABLE test1 (a int, b int);
+INSERT INTO test1 VALUES (16777217, 131584);
 
 SELECT pagesize, version FROM page_header(get_raw_page('test1', 0));
 
@@ -29,8 +38,6 @@ SELECT page_checksum(get_raw_page('test1', 0), 0) IS NOT NULL AS silly_checksum_
 SELECT tuple_data_split('test1'::regclass, t_data, t_infomask, t_infomask2, t_bits)
     FROM heap_page_items(get_raw_page('test1', 0));
 
-SELECT * FROM fsm_page_contents(get_raw_page('test1', 'fsm', 0));
-
 DROP TABLE test1;
 
 -- check that using any of these functions with a partitioned table or index
diff --git a/src/backend/access/brin/brin.c b/src/backend/access/brin/brin.c
index e95fbbcea7..7c5b1af764 100644
--- a/src/backend/access/brin/brin.c
+++ b/src/backend/access/brin/brin.c
@@ -1148,7 +1148,7 @@ terminate_brin_buildstate(BrinBuildState *state)
 		freespace = PageGetFreeSpace(page);
 		blk = BufferGetBlockNumber(state->bs_currentInsertBuf);
 		ReleaseBuffer(state->bs_currentInsertBuf);
-		RecordPageWithFreeSpace(state->bs_irel, blk, freespace);
+		RecordPageWithFreeSpace(state->bs_irel, blk, freespace, InvalidBlockNumber);
 		FreeSpaceMapVacuumRange(state->bs_irel, blk, blk + 1);
 	}
 
diff --git a/src/backend/access/brin/brin_pageops.c b/src/backend/access/brin/brin_pageops.c
index 040cb62e55..70d93878ba 100644
--- a/src/backend/access/brin/brin_pageops.c
+++ b/src/backend/access/brin/brin_pageops.c
@@ -310,7 +310,7 @@ brin_doupdate(Relation idxrel, BlockNumber pagesPerRange,
 
 		if (extended)
 		{
-			RecordPageWithFreeSpace(idxrel, newblk, freespace);
+			RecordPageWithFreeSpace(idxrel, newblk, freespace, InvalidBlockNumber);
 			FreeSpaceMapVacuumRange(idxrel, newblk, newblk + 1);
 		}
 
@@ -461,7 +461,7 @@ brin_doinsert(Relation idxrel, BlockNumber pagesPerRange,
 
 	if (extended)
 	{
-		RecordPageWithFreeSpace(idxrel, blk, freespace);
+		RecordPageWithFreeSpace(idxrel, blk, freespace, InvalidBlockNumber);
 		FreeSpaceMapVacuumRange(idxrel, blk, blk + 1);
 	}
 
@@ -654,7 +654,7 @@ brin_page_cleanup(Relation idxrel, Buffer buf)
 
 	/* Measure free space and record it */
 	RecordPageWithFreeSpace(idxrel, BufferGetBlockNumber(buf),
-							br_page_get_freespace(page));
+							br_page_get_freespace(page), InvalidBlockNumber);
 }
 
 /*
@@ -895,7 +895,7 @@ brin_initialize_empty_new_buffer(Relation idxrel, Buffer buffer)
 	 * pages whose FSM records were forgotten in a crash.
 	 */
 	RecordPageWithFreeSpace(idxrel, BufferGetBlockNumber(buffer),
-							br_page_get_freespace(page));
+							br_page_get_freespace(page), InvalidBlockNumber);
 }
 
 
diff --git a/src/backend/access/heap/hio.c b/src/backend/access/heap/hio.c
index b8b5871559..092ca5b571 100644
--- a/src/backend/access/heap/hio.c
+++ b/src/backend/access/heap/hio.c
@@ -24,6 +24,8 @@
 #include "storage/lmgr.h"
 #include "storage/smgr.h"
 
+/*#define TRACE_TARGETBLOCK */
+
 
 /*
  * RelationPutHeapTuple - place tuple at specified page
@@ -239,8 +241,12 @@ RelationAddExtraBlocks(Relation relation, BulkInsertState bistate)
 		 * Immediately update the bottom level of the FSM.  This has a good
 		 * chance of making this page visible to other concurrently inserting
 		 * backends, and we want that to happen without delay.
+		 *
+		 * Since we know the table will end up with more than extraBlocks
+		 * number of pages, we pass that number to avoid an unnecessary
+		 * system call and to make sure the FSM has been created.
 		 */
-		RecordPageWithFreeSpace(relation, blockNum, freespace);
+		RecordPageWithFreeSpace(relation, blockNum, freespace, extraBlocks);
 	}
 	while (--extraBlocks > 0);
 
@@ -378,24 +384,15 @@ RelationGetBufferForTuple(Relation relation, Size len,
 		 * target.
 		 */
 		targetBlock = GetPageWithFreeSpace(relation, len + saveFreeSpace);
-
-		/*
-		 * If the FSM knows nothing of the rel, try the last page before we
-		 * give up and extend.  This avoids one-tuple-per-page syndrome during
-		 * bootstrapping or in a recently-started system.
-		 */
-		if (targetBlock == InvalidBlockNumber)
-		{
-			BlockNumber nblocks = RelationGetNumberOfBlocks(relation);
-
-			if (nblocks > 0)
-				targetBlock = nblocks - 1;
-		}
 	}
 
 loop:
 	while (targetBlock != InvalidBlockNumber)
 	{
+
+#ifdef TRACE_TARGETBLOCK
+		elog(DEBUG1, "Attempting block %u", targetBlock);
+#endif
 		/*
 		 * Read and exclusive-lock the target block, as well as the other
 		 * block if one was given, taking suitable care with lock ordering and
@@ -484,6 +481,16 @@ loop:
 		{
 			/* use this page as future insert target, too */
 			RelationSetTargetBlock(relation, targetBlock);
+
+			/*
+			 * In case we used an in-memory map of available blocks, reset
+			 * it for next use.
+			 */
+			ClearLocalMap();
+
+#ifdef TRACE_TARGETBLOCK
+			elog(DEBUG1, "Returning buffer for block %u", targetBlock);
+#endif
 			return buffer;
 		}
 
@@ -557,11 +564,18 @@ loop:
 				goto loop;
 			}
 
+#ifdef TRACE_TARGETBLOCK
+			elog(DEBUG1, "Bulk-extending relation");
+#endif
 			/* Time to bulk-extend. */
 			RelationAddExtraBlocks(relation, bistate);
 		}
 	}
 
+#ifdef TRACE_TARGETBLOCK
+	elog(DEBUG1, "Extending relation");
+#endif
+
 	/*
 	 * In addition to whatever extension we performed above, we always add at
 	 * least one block to satisfy our own request.
@@ -600,10 +614,11 @@ loop:
 	 * risk wiping out valid data).
 	 */
 	page = BufferGetPage(buffer);
+	targetBlock = BufferGetBlockNumber(buffer);
 
 	if (!PageIsNew(page))
 		elog(ERROR, "page %u of relation \"%s\" should be empty but is not",
-			 BufferGetBlockNumber(buffer),
+			 targetBlock,
 			 RelationGetRelationName(relation));
 
 	PageInit(page, BufferGetPageSize(buffer), 0);
@@ -623,7 +638,17 @@ loop:
 	 * current backend to make more insertions or not, which is probably a
 	 * good bet most of the time.  So for now, don't add it to FSM yet.
 	 */
-	RelationSetTargetBlock(relation, BufferGetBlockNumber(buffer));
+	RelationSetTargetBlock(relation, targetBlock);
+
+	/*
+	 * In case we used an in-memory map of available blocks, reset
+	 * it for next use.
+	 */
+	ClearLocalMap();
+
+#ifdef TRACE_TARGETBLOCK
+	elog(DEBUG1, "Returning buffer for block %u", targetBlock);
+#endif
 
 	return buffer;
 }
diff --git a/src/backend/commands/vacuumlazy.c b/src/backend/commands/vacuumlazy.c
index 8996d366e9..9f4d8adcdb 100644
--- a/src/backend/commands/vacuumlazy.c
+++ b/src/backend/commands/vacuumlazy.c
@@ -154,7 +154,7 @@ static BufferAccessStrategy vac_strategy;
 static void lazy_scan_heap(Relation onerel, int options,
 			   LVRelStats *vacrelstats, Relation *Irel, int nindexes,
 			   bool aggressive);
-static void lazy_vacuum_heap(Relation onerel, LVRelStats *vacrelstats);
+static void lazy_vacuum_heap(Relation onerel, LVRelStats *vacrelstats, BlockNumber nblocks);
 static bool lazy_check_needs_freeze(Buffer buf, bool *hastup);
 static void lazy_vacuum_index(Relation indrel,
 				  IndexBulkDeleteResult **stats,
@@ -759,7 +759,7 @@ lazy_scan_heap(Relation onerel, int options, LVRelStats *vacrelstats,
 			pgstat_progress_update_multi_param(2, hvp_index, hvp_val);
 
 			/* Remove tuples from heap */
-			lazy_vacuum_heap(onerel, vacrelstats);
+			lazy_vacuum_heap(onerel, vacrelstats, nblocks);
 
 			/*
 			 * Forget the now-vacuumed tuples, and press on, but be careful
@@ -897,7 +897,7 @@ lazy_scan_heap(Relation onerel, int options, LVRelStats *vacrelstats,
 			MarkBufferDirty(buf);
 			UnlockReleaseBuffer(buf);
 
-			RecordPageWithFreeSpace(onerel, blkno, freespace);
+			RecordPageWithFreeSpace(onerel, blkno, freespace, nblocks);
 			continue;
 		}
 
@@ -936,7 +936,7 @@ lazy_scan_heap(Relation onerel, int options, LVRelStats *vacrelstats,
 			}
 
 			UnlockReleaseBuffer(buf);
-			RecordPageWithFreeSpace(onerel, blkno, freespace);
+			RecordPageWithFreeSpace(onerel, blkno, freespace, nblocks);
 			continue;
 		}
 
@@ -1339,7 +1339,7 @@ lazy_scan_heap(Relation onerel, int options, LVRelStats *vacrelstats,
 		 * taken if there are no indexes.)
 		 */
 		if (vacrelstats->num_dead_tuples == prev_dead_count)
-			RecordPageWithFreeSpace(onerel, blkno, freespace);
+			RecordPageWithFreeSpace(onerel, blkno, freespace, nblocks);
 	}
 
 	/* report that everything is scanned and vacuumed */
@@ -1401,7 +1401,7 @@ lazy_scan_heap(Relation onerel, int options, LVRelStats *vacrelstats,
 		/* Remove tuples from heap */
 		pgstat_progress_update_param(PROGRESS_VACUUM_PHASE,
 									 PROGRESS_VACUUM_PHASE_VACUUM_HEAP);
-		lazy_vacuum_heap(onerel, vacrelstats);
+		lazy_vacuum_heap(onerel, vacrelstats, nblocks);
 		vacrelstats->num_index_scans++;
 	}
 
@@ -1472,9 +1472,10 @@ lazy_scan_heap(Relation onerel, int options, LVRelStats *vacrelstats,
  * Note: the reason for doing this as a second pass is we cannot remove
  * the tuples until we've removed their index entries, and we want to
  * process index entry removal in batches as large as possible.
+ * Note: nblocks is passed as an optimization for RecordPageWithFreeSpace().
  */
 static void
-lazy_vacuum_heap(Relation onerel, LVRelStats *vacrelstats)
+lazy_vacuum_heap(Relation onerel, LVRelStats *vacrelstats, BlockNumber nblocks)
 {
 	int			tupindex;
 	int			npages;
@@ -1511,7 +1512,7 @@ lazy_vacuum_heap(Relation onerel, LVRelStats *vacrelstats)
 		freespace = PageGetHeapFreeSpace(page);
 
 		UnlockReleaseBuffer(buf);
-		RecordPageWithFreeSpace(onerel, tblk, freespace);
+		RecordPageWithFreeSpace(onerel, tblk, freespace, nblocks);
 		npages++;
 	}
 
diff --git a/src/backend/storage/freespace/freespace.c b/src/backend/storage/freespace/freespace.c
index 7c4ad1c449..1005459f7c 100644
--- a/src/backend/storage/freespace/freespace.c
+++ b/src/backend/storage/freespace/freespace.c
@@ -76,6 +76,11 @@
 #define FSM_ROOT_LEVEL	(FSM_TREE_DEPTH - 1)
 #define FSM_BOTTOM_LEVEL 0
 
+/* Status codes for local map. */
+#define FSM_LOCAL_ZERO	0x00	/* Beyond the end of the relation */
+#define FSM_LOCAL_AVAIL	0x01	/* Available to try */
+#define FSM_LOCAL_TRIED	0x02	/* Already tried, not enough space */
+
 /*
  * The internal FSM routines work on a logical addressing scheme. Each
  * level of the tree can be thought of as a separately addressable file.
@@ -89,6 +94,9 @@ typedef struct
 /* Address of the root page. */
 static const FSMAddress FSM_ROOT_ADDRESS = {FSM_ROOT_LEVEL, 0};
 
+/* Local map of block numbers to try. */
+static char FSMLocalMap[HEAP_FSM_CREATION_THRESHOLD] = {FSM_LOCAL_ZERO};
+
 /* functions to navigate the tree */
 static FSMAddress fsm_get_child(FSMAddress parent, uint16 slot);
 static FSMAddress fsm_get_parent(FSMAddress child, uint16 *slot);
@@ -111,6 +119,10 @@ static BlockNumber fsm_search(Relation rel, uint8 min_cat);
 static uint8 fsm_vacuum_page(Relation rel, FSMAddress addr,
 				BlockNumber start, BlockNumber end,
 				bool *eof);
+static bool fsm_allow_writes(Relation rel, BlockNumber heapblk,
+				BlockNumber nblocks, BlockNumber *get_nblocks);
+static void fsm_local_set(Relation rel, BlockNumber nblocks);
+static BlockNumber fsm_local_search(void);
 
 
 /******** Public API ********/
@@ -132,8 +144,35 @@ BlockNumber
 GetPageWithFreeSpace(Relation rel, Size spaceNeeded)
 {
 	uint8		min_cat = fsm_space_needed_to_cat(spaceNeeded);
+	BlockNumber target_block,
+				nblocks;
+
+	/* First try the FSM, if it exists. */
+	target_block = fsm_search(rel, min_cat);
 
-	return fsm_search(rel, min_cat);
+	if (target_block == InvalidBlockNumber &&
+		rel->rd_rel->relkind == RELKIND_RELATION)
+	{
+		nblocks = RelationGetNumberOfBlocks(rel);
+
+		if (nblocks > HEAP_FSM_CREATION_THRESHOLD)
+		{
+			/*
+			 * If the FSM knows nothing of the rel, try the last page before
+			 * we give up and extend.  This avoids one-tuple-per-page syndrome
+			 * during bootstrapping or in a recently-started system.
+			 */
+			target_block = nblocks - 1;
+		}
+		else if (nblocks > 0)
+		{
+			/* Create or update local map and get first candidate block. */
+			fsm_local_set(rel, nblocks);
+			target_block = fsm_local_search();
+		}
+	}
+
+	return target_block;
 }
 
 /*
@@ -154,6 +193,32 @@ RecordAndGetPageWithFreeSpace(Relation rel, BlockNumber oldPage,
 	FSMAddress	addr;
 	uint16		slot;
 	int			search_slot;
+	BlockNumber nblocks = InvalidBlockNumber;
+
+	if (oldPage < HEAP_FSM_CREATION_THRESHOLD &&
+		rel->rd_rel->relkind == RELKIND_RELATION)
+	{
+		/* First try the local map, if it exists. */
+		if (FSMLocalMap[oldPage] == FSM_LOCAL_AVAIL)
+		{
+			FSMLocalMap[oldPage] = FSM_LOCAL_TRIED;
+			return fsm_local_search();
+		}
+
+		/*
+		 * If we have neither a local map nor an FSM, we probably just
+		 * tried the target block in the relcache and failed, so we'll
+		 * need to create the local map.
+		 */
+		if (!fsm_allow_writes(rel, oldPage, InvalidBlockNumber, &nblocks))
+		{
+			/* Create local map and get first candidate block. */
+			fsm_local_set(rel, nblocks);
+			return fsm_local_search();
+		}
+	}
+
+	/* Normal FSM logic follows */
 
 	/* Get the location of the FSM byte representing the heap block */
 	addr = fsm_get_location(oldPage, &slot);
@@ -178,11 +243,17 @@ RecordAndGetPageWithFreeSpace(Relation rel, BlockNumber oldPage,
  * FreeSpaceMapVacuum call, which updates the upper level pages.
  */
 void
-RecordPageWithFreeSpace(Relation rel, BlockNumber heapBlk, Size spaceAvail)
+RecordPageWithFreeSpace(Relation rel, BlockNumber heapBlk,
+						Size spaceAvail, BlockNumber nblocks)
 {
 	int			new_cat = fsm_space_avail_to_cat(spaceAvail);
 	FSMAddress	addr;
 	uint16		slot;
+	BlockNumber dummy;
+
+	/* Note: We do not have a local map to update. */
+	if (!fsm_allow_writes(rel, heapBlk, nblocks, &dummy))
+		return;
 
 	/* Get the location of the FSM byte representing the heap block */
 	addr = fsm_get_location(heapBlk, &slot);
@@ -190,6 +261,16 @@ RecordPageWithFreeSpace(Relation rel, BlockNumber heapBlk, Size spaceAvail)
 	fsm_set_and_search(rel, addr, slot, new_cat, 0);
 }
 
+/*
+ * Clear the local map. We must call this when we have found a block with
+ * enough free space, or when we extend the relation.
+ */
+void
+ClearLocalMap(void)
+{
+	memset(FSMLocalMap, 0, sizeof(FSMLocalMap));
+}
+
 /*
  * XLogRecordPageWithFreeSpace - like RecordPageWithFreeSpace, for use in
  *		WAL replay
@@ -204,11 +285,35 @@ XLogRecordPageWithFreeSpace(RelFileNode rnode, BlockNumber heapBlk,
 	BlockNumber blkno;
 	Buffer		buf;
 	Page		page;
+	bool		write_to_fsm;
 
 	/* Get the location of the FSM byte representing the heap block */
 	addr = fsm_get_location(heapBlk, &slot);
 	blkno = fsm_logical_to_physical(addr);
 
+	/* This is meant to mirror the logic in fsm_allow_writes() */
+	if (heapBlk > HEAP_FSM_CREATION_THRESHOLD)
+		write_to_fsm = true;
+	else
+	{
+		/* Open the relation at smgr level */
+		SMgrRelation smgr = smgropen(rnode, InvalidBackendId);
+
+		if (smgrexists(smgr, FSM_FORKNUM))
+			write_to_fsm = true;
+		else
+		{
+			BlockNumber heap_nblocks = smgrnblocks(smgr, MAIN_FORKNUM);
+			if (heap_nblocks > HEAP_FSM_CREATION_THRESHOLD)
+				write_to_fsm = true;
+			else
+				write_to_fsm = false;
+		}
+	}
+
+	if (!write_to_fsm)
+		return;
+
 	/* If the page doesn't exist already, extend */
 	buf = XLogReadBufferExtended(rnode, FSM_FORKNUM, blkno, RBM_ZERO_ON_ERROR);
 	LockBuffer(buf, BUFFER_LOCK_EXCLUSIVE);
@@ -904,3 +1009,118 @@ fsm_vacuum_page(Relation rel, FSMAddress addr,
 
 	return max_avail;
 }
+
+/*
+ * For heaps we prevent extension of the FSM unless the number of pages
+ * exceeds HEAP_FSM_CREATION_THRESHOLD. For tables that don't already have
+ * a FSM, this will save an inode and a few kB of space.
+ *
+ * XXX The API is a little awkward -- if the caller has a valid nblocks,
+ * it can pass it as an optimization to avoid a system call. If the caller
+ * passes InvalidBlockNumber and receives a false return value, it can
+ * get an up-to-date relation size from get_nblocks.
+ */
+static bool
+fsm_allow_writes(Relation rel, BlockNumber heapblk,
+				 BlockNumber nblocks, BlockNumber *get_nblocks)
+{
+	bool		skip_get_nblocks;
+
+	if (heapblk > HEAP_FSM_CREATION_THRESHOLD)
+		return true;
+
+	/* Index rels can always create an FSM. */
+	if (rel->rd_rel->relkind != RELKIND_RELATION)
+		return true;
+
+	/*
+	 * If the caller knows nblocks, we can avoid a system call later.
+	 * If it doesn't, maybe we have relpages from a previous VACUUM.
+	 * Since the table may have extended since then, we still have to
+	 * count the pages later if we can't return now.
+	 */
+	if (nblocks != InvalidBlockNumber)
+	{
+		if (nblocks > HEAP_FSM_CREATION_THRESHOLD)
+			return true;
+		else
+			skip_get_nblocks = true;
+	}
+	else
+	{
+		if (rel->rd_rel->relpages != InvalidBlockNumber &&
+			rel->rd_rel->relpages > HEAP_FSM_CREATION_THRESHOLD)
+			return true;
+		else
+			skip_get_nblocks = false;
+	}
+
+	RelationOpenSmgr(rel);
+	if (smgrexists(rel->rd_smgr, FSM_FORKNUM))
+		return true;
+
+	if (skip_get_nblocks)
+		return false;
+
+	/* last resort */
+	*get_nblocks = RelationGetNumberOfBlocks(rel);
+	if (*get_nblocks > HEAP_FSM_CREATION_THRESHOLD)
+		return true;
+	else
+		return false;
+}
+
+/*
+ * Set or update the local map of blocks to try, for when there is no FSM.
+ * It's designed specifically to be idempotent, so the heap insert code
+ * should only clear the map when it has found a free block or when it
+ * has to extend the relation.  That way, if we have tried all blocks we
+ * know about, but the rel has been extended by another backend, this will
+ * set only newly added blocks to 'available'.
+ */
+static void
+fsm_local_set(Relation rel, BlockNumber nblocks)
+{
+	BlockNumber blkno,
+				cached_target_block;
+
+	/*
+	 * If the blkno is beyond the end of the relation, the status should
+	 * be zero already, but make sure it is.  If the blkno is within the
+	 * relation, mark it available unless it's already been tried.
+	 */
+	for (blkno = 0; blkno < HEAP_FSM_CREATION_THRESHOLD; blkno++)
+	{
+		if (blkno < nblocks)
+			FSMLocalMap[blkno] |= FSM_LOCAL_AVAIL;
+		else
+			FSMLocalMap[blkno] = FSM_LOCAL_ZERO;
+	}
+
+	/* Set the status of the cached target block to 'tried'. */
+	cached_target_block = RelationGetTargetBlock(rel);
+	if (cached_target_block != InvalidBlockNumber &&
+		cached_target_block < HEAP_FSM_CREATION_THRESHOLD)
+		FSMLocalMap[cached_target_block] = FSM_LOCAL_TRIED;
+}
+
+/*
+ * Search the local map for an available block to try, in descending order.
+ *
+ * For use when there is no FSM.
+ */
+static BlockNumber
+fsm_local_search(void)
+{
+	BlockNumber		target_block = HEAP_FSM_CREATION_THRESHOLD;
+
+	do
+	{
+		target_block--;
+		if (FSMLocalMap[target_block] == FSM_LOCAL_AVAIL)
+			return target_block;
+	}
+	while (target_block > 0);
+
+	return InvalidBlockNumber;
+}
diff --git a/src/backend/storage/freespace/indexfsm.c b/src/backend/storage/freespace/indexfsm.c
index e21047b96f..d8fd29a7eb 100644
--- a/src/backend/storage/freespace/indexfsm.c
+++ b/src/backend/storage/freespace/indexfsm.c
@@ -51,7 +51,7 @@ GetFreeIndexPage(Relation rel)
 void
 RecordFreeIndexPage(Relation rel, BlockNumber freeBlock)
 {
-	RecordPageWithFreeSpace(rel, freeBlock, BLCKSZ - 1);
+	RecordPageWithFreeSpace(rel, freeBlock, BLCKSZ - 1, InvalidBlockNumber);
 }
 
 
@@ -61,7 +61,7 @@ RecordFreeIndexPage(Relation rel, BlockNumber freeBlock)
 void
 RecordUsedIndexPage(Relation rel, BlockNumber usedBlock)
 {
-	RecordPageWithFreeSpace(rel, usedBlock, 0);
+	RecordPageWithFreeSpace(rel, usedBlock, 0, InvalidBlockNumber);
 }
 
 /*
diff --git a/src/include/storage/freespace.h b/src/include/storage/freespace.h
index 726eb30fb8..0d130ddfe0 100644
--- a/src/include/storage/freespace.h
+++ b/src/include/storage/freespace.h
@@ -18,6 +18,10 @@
 #include "storage/relfilenode.h"
 #include "utils/relcache.h"
 
+/* Only extend a heap's FSM if the heap has greater than this many blocks */
+/* TODO: Performance-test different values. */
+#define HEAP_FSM_CREATION_THRESHOLD 8
+
 /* prototypes for public functions in freespace.c */
 extern Size GetRecordedFreeSpace(Relation rel, BlockNumber heapBlk);
 extern BlockNumber GetPageWithFreeSpace(Relation rel, Size spaceNeeded);
@@ -26,7 +30,8 @@ extern BlockNumber RecordAndGetPageWithFreeSpace(Relation rel,
 							  Size oldSpaceAvail,
 							  Size spaceNeeded);
 extern void RecordPageWithFreeSpace(Relation rel, BlockNumber heapBlk,
-						Size spaceAvail);
+						Size spaceAvail, BlockNumber nblocks);
+extern void ClearLocalMap(void);
 extern void XLogRecordPageWithFreeSpace(RelFileNode rnode, BlockNumber heapBlk,
 							Size spaceAvail);
 
-- 
2.17.1

#16John Naylor
jcnaylor@gmail.com
In reply to: John Naylor (#15)
1 attachment(s)
Re: WIP: Avoid creation of the free space map for small tables

I wrote:

Once this is in shape, I'll do some performance testing.

On second thought, there's no point in waiting, especially if a
regression points to a design flaw.

I compiled patched postgres with HEAP_FSM_CREATION_THRESHOLD set to
32, then ran the attached script which populates 100 tables with
varying numbers of blocks. I wanted a test that created pages eagerly
and wrote to disk as little as possible. Config was stock, except for
fsync = off. I took the average of 10 runs after removing the slowest
and fastest run:

# blocks master patch
4 36.4ms 33.9ms
8 50.6ms 48.9ms
12 58.6ms 66.3ms
16 65.5ms 81.4ms

It seems under these circumstances a threshold of up to 8 performs
comparably to the master branch, with small block numbers possibly
faster than with the FSM, provided they're in shared buffers already.
I didn't bother testing higher values because it's clear there's a
regression starting around 10 or so, beyond which it helps to have the
FSM.

A case could be made for setting the threshold to 4, since not having
3 blocks of FSM in shared buffers exactly makes up for the 3 other
blocks of heap that are checked when free space runs out.

I can run additional tests if there's interest.

-John Naylor

Attachments:

fsm-copy-test.sqlapplication/sql; name=fsm-copy-test.sqlDownload
#17John Naylor
jcnaylor@gmail.com
In reply to: John Naylor (#16)
3 attachment(s)
Re: WIP: Avoid creation of the free space map for small tables

Upthread I wrote:

-A possible TODO item is to teach pg_upgrade not to link FSMs for
small heaps. I haven't look into the feasibility of that, however.

This turned out to be relatively light weight (0002 attached). I had
to add relkind to the RelInfo struct and save the size of each heap as
its transferred. The attached SQL script will setup a couple test
cases to demonstrate pg_upgrade. Installations with large numbers of
small tables will be able to see space savings right away.

For 0001, I adjusted the README and docs, and also made some cosmetic
improvements to the code, mostly in the comments. I've set the
commitfest entry back to 'needs review'

One thing I noticed is that one behavior on master hasn't changed:
System catalogs created during bootstrap still have a FSM if they have
any data. Possibly related, catalogs also have a VM even if they have
no data at all. This isn't anything to get excited about, but it would
be nice to investigate, at least so it can be documented. A cursory
dig hasn't found the cause, but I'll keep doing that as time permits.

-John Naylor

Attachments:

v7-0001-Avoid-creation-of-the-free-space-map-for-small-ta.patchtext/x-patch; charset=US-ASCII; name=v7-0001-Avoid-creation-of-the-free-space-map-for-small-ta.patchDownload
From 428b56e12e3f5d2bd8fc81c9fb5fe7169e9da580 Mon Sep 17 00:00:00 2001
From: John Naylor <jcnaylor@gmail.com>
Date: Wed, 31 Oct 2018 14:26:38 +0700
Subject: [PATCH v7 1/2] Avoid creation of the free space map for small tables.

The FSM isn't created if the heap has fewer than 8 blocks. If the last
known good block has insufficient space, try every block before extending
the heap.

If a heap with a FSM is truncated back to below the threshold, the FSM
stays around and can be used as usual.
---
 contrib/pageinspect/expected/page.out     |  77 +++----
 contrib/pageinspect/sql/page.sql          |  33 +--
 doc/src/sgml/storage.sgml                 |   3 +-
 src/backend/access/brin/brin.c            |   2 +-
 src/backend/access/brin/brin_pageops.c    |   8 +-
 src/backend/access/heap/hio.c             |  61 ++++--
 src/backend/commands/vacuumlazy.c         |  17 +-
 src/backend/storage/freespace/README      |  11 +-
 src/backend/storage/freespace/freespace.c | 234 +++++++++++++++++++++-
 src/backend/storage/freespace/indexfsm.c  |   4 +-
 src/include/storage/freespace.h           |   6 +-
 11 files changed, 360 insertions(+), 96 deletions(-)

diff --git a/contrib/pageinspect/expected/page.out b/contrib/pageinspect/expected/page.out
index 3fcd9fbe6d..83e5910453 100644
--- a/contrib/pageinspect/expected/page.out
+++ b/contrib/pageinspect/expected/page.out
@@ -1,48 +1,69 @@
 CREATE EXTENSION pageinspect;
-CREATE TABLE test1 (a int, b int);
-INSERT INTO test1 VALUES (16777217, 131584);
-VACUUM test1;  -- set up FSM
+CREATE TABLE test_rel_forks (a int);
+-- Make sure there are enough blocks in the heap for the FSM to be created.
+INSERT INTO test_rel_forks SELECT g from generate_series(1,10000) g;
+-- set up FSM and VM
+VACUUM test_rel_forks;
 -- The page contents can vary, so just test that it can be read
 -- successfully, but don't keep the output.
-SELECT octet_length(get_raw_page('test1', 'main', 0)) AS main_0;
+SELECT octet_length(get_raw_page('test_rel_forks', 'main', 0)) AS main_0;
  main_0 
 --------
    8192
 (1 row)
 
-SELECT octet_length(get_raw_page('test1', 'main', 1)) AS main_1;
-ERROR:  block number 1 is out of range for relation "test1"
-SELECT octet_length(get_raw_page('test1', 'fsm', 0)) AS fsm_0;
+SELECT octet_length(get_raw_page('test_rel_forks', 'main', 100)) AS main_100;
+ERROR:  block number 100 is out of range for relation "test_rel_forks"
+SELECT octet_length(get_raw_page('test_rel_forks', 'fsm', 0)) AS fsm_0;
  fsm_0 
 -------
   8192
 (1 row)
 
-SELECT octet_length(get_raw_page('test1', 'fsm', 1)) AS fsm_1;
- fsm_1 
--------
-  8192
-(1 row)
-
-SELECT octet_length(get_raw_page('test1', 'vm', 0)) AS vm_0;
+SELECT octet_length(get_raw_page('test_rel_forks', 'fsm', 10)) AS fsm_10;
+ERROR:  block number 10 is out of range for relation "test_rel_forks"
+SELECT octet_length(get_raw_page('test_rel_forks', 'vm', 0)) AS vm_0;
  vm_0 
 ------
  8192
 (1 row)
 
-SELECT octet_length(get_raw_page('test1', 'vm', 1)) AS vm_1;
-ERROR:  block number 1 is out of range for relation "test1"
+SELECT octet_length(get_raw_page('test_rel_forks', 'vm', 1)) AS vm_1;
+ERROR:  block number 1 is out of range for relation "test_rel_forks"
 SELECT octet_length(get_raw_page('xxx', 'main', 0));
 ERROR:  relation "xxx" does not exist
-SELECT octet_length(get_raw_page('test1', 'xxx', 0));
+SELECT octet_length(get_raw_page('test_rel_forks', 'xxx', 0));
 ERROR:  invalid fork name
 HINT:  Valid fork names are "main", "fsm", "vm", and "init".
-SELECT get_raw_page('test1', 0) = get_raw_page('test1', 'main', 0);
+SELECT * FROM fsm_page_contents(get_raw_page('test_rel_forks', 'fsm', 0));
+ fsm_page_contents 
+-------------------
+ 0: 192           +
+ 1: 192           +
+ 3: 192           +
+ 7: 192           +
+ 15: 192          +
+ 31: 192          +
+ 63: 192          +
+ 127: 192         +
+ 255: 192         +
+ 511: 192         +
+ 1023: 192        +
+ 2047: 192        +
+ 4095: 192        +
+ fp_next_slot: 0  +
+ 
+(1 row)
+
+SELECT get_raw_page('test_rel_forks', 0) = get_raw_page('test_rel_forks', 'main', 0);
  ?column? 
 ----------
  t
 (1 row)
 
+DROP TABLE test_rel_forks;
+CREATE TABLE test1 (a int, b int);
+INSERT INTO test1 VALUES (16777217, 131584);
 SELECT pagesize, version FROM page_header(get_raw_page('test1', 0));
  pagesize | version 
 ----------+---------
@@ -62,26 +83,6 @@ SELECT tuple_data_split('test1'::regclass, t_data, t_infomask, t_infomask2, t_bi
  {"\\x01000001","\\x00020200"}
 (1 row)
 
-SELECT * FROM fsm_page_contents(get_raw_page('test1', 'fsm', 0));
- fsm_page_contents 
--------------------
- 0: 254           +
- 1: 254           +
- 3: 254           +
- 7: 254           +
- 15: 254          +
- 31: 254          +
- 63: 254          +
- 127: 254         +
- 255: 254         +
- 511: 254         +
- 1023: 254        +
- 2047: 254        +
- 4095: 254        +
- fp_next_slot: 0  +
- 
-(1 row)
-
 DROP TABLE test1;
 -- check that using any of these functions with a partitioned table or index
 -- would fail
diff --git a/contrib/pageinspect/sql/page.sql b/contrib/pageinspect/sql/page.sql
index 8ac9991837..ee811759d5 100644
--- a/contrib/pageinspect/sql/page.sql
+++ b/contrib/pageinspect/sql/page.sql
@@ -1,26 +1,35 @@
 CREATE EXTENSION pageinspect;
 
-CREATE TABLE test1 (a int, b int);
-INSERT INTO test1 VALUES (16777217, 131584);
+CREATE TABLE test_rel_forks (a int);
+-- Make sure there are enough blocks in the heap for the FSM to be created.
+INSERT INTO test_rel_forks SELECT g from generate_series(1,10000) g;
 
-VACUUM test1;  -- set up FSM
+-- set up FSM and VM
+VACUUM test_rel_forks;
 
 -- The page contents can vary, so just test that it can be read
 -- successfully, but don't keep the output.
 
-SELECT octet_length(get_raw_page('test1', 'main', 0)) AS main_0;
-SELECT octet_length(get_raw_page('test1', 'main', 1)) AS main_1;
+SELECT octet_length(get_raw_page('test_rel_forks', 'main', 0)) AS main_0;
+SELECT octet_length(get_raw_page('test_rel_forks', 'main', 100)) AS main_100;
 
-SELECT octet_length(get_raw_page('test1', 'fsm', 0)) AS fsm_0;
-SELECT octet_length(get_raw_page('test1', 'fsm', 1)) AS fsm_1;
+SELECT octet_length(get_raw_page('test_rel_forks', 'fsm', 0)) AS fsm_0;
+SELECT octet_length(get_raw_page('test_rel_forks', 'fsm', 10)) AS fsm_10;
 
-SELECT octet_length(get_raw_page('test1', 'vm', 0)) AS vm_0;
-SELECT octet_length(get_raw_page('test1', 'vm', 1)) AS vm_1;
+SELECT octet_length(get_raw_page('test_rel_forks', 'vm', 0)) AS vm_0;
+SELECT octet_length(get_raw_page('test_rel_forks', 'vm', 1)) AS vm_1;
 
 SELECT octet_length(get_raw_page('xxx', 'main', 0));
-SELECT octet_length(get_raw_page('test1', 'xxx', 0));
+SELECT octet_length(get_raw_page('test_rel_forks', 'xxx', 0));
+
+SELECT * FROM fsm_page_contents(get_raw_page('test_rel_forks', 'fsm', 0));
+
+SELECT get_raw_page('test_rel_forks', 0) = get_raw_page('test_rel_forks', 'main', 0);
 
-SELECT get_raw_page('test1', 0) = get_raw_page('test1', 'main', 0);
+DROP TABLE test_rel_forks;
+
+CREATE TABLE test1 (a int, b int);
+INSERT INTO test1 VALUES (16777217, 131584);
 
 SELECT pagesize, version FROM page_header(get_raw_page('test1', 0));
 
@@ -29,8 +38,6 @@ SELECT page_checksum(get_raw_page('test1', 0), 0) IS NOT NULL AS silly_checksum_
 SELECT tuple_data_split('test1'::regclass, t_data, t_infomask, t_infomask2, t_bits)
     FROM heap_page_items(get_raw_page('test1', 0));
 
-SELECT * FROM fsm_page_contents(get_raw_page('test1', 'fsm', 0));
-
 DROP TABLE test1;
 
 -- check that using any of these functions with a partitioned table or index
diff --git a/doc/src/sgml/storage.sgml b/doc/src/sgml/storage.sgml
index 8ef2ac8010..784cc22f4d 100644
--- a/doc/src/sgml/storage.sgml
+++ b/doc/src/sgml/storage.sgml
@@ -590,7 +590,8 @@ tuple would otherwise be too big.
 <indexterm><primary>FSM</primary><see>Free Space Map</see></indexterm>
 
 <para>
-Each heap and index relation, except for hash indexes, has a Free Space Map
+Each heap relation, unless it is very small, and each index relation,
+except for hash indexes, has a Free Space Map
 (FSM) to keep track of available space in the relation. It's stored
 alongside the main relation data in a separate relation fork, named after the
 filenode number of the relation, plus a <literal>_fsm</literal> suffix. For example,
diff --git a/src/backend/access/brin/brin.c b/src/backend/access/brin/brin.c
index e95fbbcea7..7c5b1af764 100644
--- a/src/backend/access/brin/brin.c
+++ b/src/backend/access/brin/brin.c
@@ -1148,7 +1148,7 @@ terminate_brin_buildstate(BrinBuildState *state)
 		freespace = PageGetFreeSpace(page);
 		blk = BufferGetBlockNumber(state->bs_currentInsertBuf);
 		ReleaseBuffer(state->bs_currentInsertBuf);
-		RecordPageWithFreeSpace(state->bs_irel, blk, freespace);
+		RecordPageWithFreeSpace(state->bs_irel, blk, freespace, InvalidBlockNumber);
 		FreeSpaceMapVacuumRange(state->bs_irel, blk, blk + 1);
 	}
 
diff --git a/src/backend/access/brin/brin_pageops.c b/src/backend/access/brin/brin_pageops.c
index 040cb62e55..70d93878ba 100644
--- a/src/backend/access/brin/brin_pageops.c
+++ b/src/backend/access/brin/brin_pageops.c
@@ -310,7 +310,7 @@ brin_doupdate(Relation idxrel, BlockNumber pagesPerRange,
 
 		if (extended)
 		{
-			RecordPageWithFreeSpace(idxrel, newblk, freespace);
+			RecordPageWithFreeSpace(idxrel, newblk, freespace, InvalidBlockNumber);
 			FreeSpaceMapVacuumRange(idxrel, newblk, newblk + 1);
 		}
 
@@ -461,7 +461,7 @@ brin_doinsert(Relation idxrel, BlockNumber pagesPerRange,
 
 	if (extended)
 	{
-		RecordPageWithFreeSpace(idxrel, blk, freespace);
+		RecordPageWithFreeSpace(idxrel, blk, freespace, InvalidBlockNumber);
 		FreeSpaceMapVacuumRange(idxrel, blk, blk + 1);
 	}
 
@@ -654,7 +654,7 @@ brin_page_cleanup(Relation idxrel, Buffer buf)
 
 	/* Measure free space and record it */
 	RecordPageWithFreeSpace(idxrel, BufferGetBlockNumber(buf),
-							br_page_get_freespace(page));
+							br_page_get_freespace(page), InvalidBlockNumber);
 }
 
 /*
@@ -895,7 +895,7 @@ brin_initialize_empty_new_buffer(Relation idxrel, Buffer buffer)
 	 * pages whose FSM records were forgotten in a crash.
 	 */
 	RecordPageWithFreeSpace(idxrel, BufferGetBlockNumber(buffer),
-							br_page_get_freespace(page));
+							br_page_get_freespace(page), InvalidBlockNumber);
 }
 
 
diff --git a/src/backend/access/heap/hio.c b/src/backend/access/heap/hio.c
index b8b5871559..ff13c03083 100644
--- a/src/backend/access/heap/hio.c
+++ b/src/backend/access/heap/hio.c
@@ -24,6 +24,8 @@
 #include "storage/lmgr.h"
 #include "storage/smgr.h"
 
+/*#define TRACE_TARGETBLOCK */
+
 
 /*
  * RelationPutHeapTuple - place tuple at specified page
@@ -239,8 +241,14 @@ RelationAddExtraBlocks(Relation relation, BulkInsertState bistate)
 		 * Immediately update the bottom level of the FSM.  This has a good
 		 * chance of making this page visible to other concurrently inserting
 		 * backends, and we want that to happen without delay.
+		 *
+		 * Since we know the table will end up with extraBlocks additional
+		 * pages, we pass the final number to avoid possible unnecessary
+		 * system calls and to make sure the FSM is created when we add
+		 * the first new page.
 		 */
-		RecordPageWithFreeSpace(relation, blockNum, freespace);
+		RecordPageWithFreeSpace(relation, blockNum, freespace,
+								blockNum + extraBlocks);
 	}
 	while (--extraBlocks > 0);
 
@@ -378,24 +386,15 @@ RelationGetBufferForTuple(Relation relation, Size len,
 		 * target.
 		 */
 		targetBlock = GetPageWithFreeSpace(relation, len + saveFreeSpace);
-
-		/*
-		 * If the FSM knows nothing of the rel, try the last page before we
-		 * give up and extend.  This avoids one-tuple-per-page syndrome during
-		 * bootstrapping or in a recently-started system.
-		 */
-		if (targetBlock == InvalidBlockNumber)
-		{
-			BlockNumber nblocks = RelationGetNumberOfBlocks(relation);
-
-			if (nblocks > 0)
-				targetBlock = nblocks - 1;
-		}
 	}
 
 loop:
 	while (targetBlock != InvalidBlockNumber)
 	{
+
+#ifdef TRACE_TARGETBLOCK
+		elog(DEBUG1, "Attempting block %u", targetBlock);
+#endif
 		/*
 		 * Read and exclusive-lock the target block, as well as the other
 		 * block if one was given, taking suitable care with lock ordering and
@@ -484,6 +483,17 @@ loop:
 		{
 			/* use this page as future insert target, too */
 			RelationSetTargetBlock(relation, targetBlock);
+
+			/*
+			 * In case we used an in-memory map of available blocks, reset
+			 * it for next use.
+			 */
+			if (targetBlock < HEAP_FSM_CREATION_THRESHOLD)
+				ClearLocalMap();
+
+#ifdef TRACE_TARGETBLOCK
+			elog(DEBUG1, "Returning buffer for block %u", targetBlock);
+#endif
 			return buffer;
 		}
 
@@ -557,11 +567,18 @@ loop:
 				goto loop;
 			}
 
+#ifdef TRACE_TARGETBLOCK
+			elog(DEBUG1, "Bulk-extending relation");
+#endif
 			/* Time to bulk-extend. */
 			RelationAddExtraBlocks(relation, bistate);
 		}
 	}
 
+#ifdef TRACE_TARGETBLOCK
+	elog(DEBUG1, "Extending relation");
+#endif
+
 	/*
 	 * In addition to whatever extension we performed above, we always add at
 	 * least one block to satisfy our own request.
@@ -600,10 +617,11 @@ loop:
 	 * risk wiping out valid data).
 	 */
 	page = BufferGetPage(buffer);
+	targetBlock = BufferGetBlockNumber(buffer);
 
 	if (!PageIsNew(page))
 		elog(ERROR, "page %u of relation \"%s\" should be empty but is not",
-			 BufferGetBlockNumber(buffer),
+			 targetBlock,
 			 RelationGetRelationName(relation));
 
 	PageInit(page, BufferGetPageSize(buffer), 0);
@@ -623,7 +641,18 @@ loop:
 	 * current backend to make more insertions or not, which is probably a
 	 * good bet most of the time.  So for now, don't add it to FSM yet.
 	 */
-	RelationSetTargetBlock(relation, BufferGetBlockNumber(buffer));
+	RelationSetTargetBlock(relation, targetBlock);
+
+	/*
+	 * In case we used an in-memory map of available blocks, reset
+	 * it for next use.  We do this unconditionally since after relation
+	 * extension we can't reliably skip this based on the targetBlock.
+	 */
+	ClearLocalMap();
+
+#ifdef TRACE_TARGETBLOCK
+	elog(DEBUG1, "Returning buffer for block %u", targetBlock);
+#endif
 
 	return buffer;
 }
diff --git a/src/backend/commands/vacuumlazy.c b/src/backend/commands/vacuumlazy.c
index 8996d366e9..9f4d8adcdb 100644
--- a/src/backend/commands/vacuumlazy.c
+++ b/src/backend/commands/vacuumlazy.c
@@ -154,7 +154,7 @@ static BufferAccessStrategy vac_strategy;
 static void lazy_scan_heap(Relation onerel, int options,
 			   LVRelStats *vacrelstats, Relation *Irel, int nindexes,
 			   bool aggressive);
-static void lazy_vacuum_heap(Relation onerel, LVRelStats *vacrelstats);
+static void lazy_vacuum_heap(Relation onerel, LVRelStats *vacrelstats, BlockNumber nblocks);
 static bool lazy_check_needs_freeze(Buffer buf, bool *hastup);
 static void lazy_vacuum_index(Relation indrel,
 				  IndexBulkDeleteResult **stats,
@@ -759,7 +759,7 @@ lazy_scan_heap(Relation onerel, int options, LVRelStats *vacrelstats,
 			pgstat_progress_update_multi_param(2, hvp_index, hvp_val);
 
 			/* Remove tuples from heap */
-			lazy_vacuum_heap(onerel, vacrelstats);
+			lazy_vacuum_heap(onerel, vacrelstats, nblocks);
 
 			/*
 			 * Forget the now-vacuumed tuples, and press on, but be careful
@@ -897,7 +897,7 @@ lazy_scan_heap(Relation onerel, int options, LVRelStats *vacrelstats,
 			MarkBufferDirty(buf);
 			UnlockReleaseBuffer(buf);
 
-			RecordPageWithFreeSpace(onerel, blkno, freespace);
+			RecordPageWithFreeSpace(onerel, blkno, freespace, nblocks);
 			continue;
 		}
 
@@ -936,7 +936,7 @@ lazy_scan_heap(Relation onerel, int options, LVRelStats *vacrelstats,
 			}
 
 			UnlockReleaseBuffer(buf);
-			RecordPageWithFreeSpace(onerel, blkno, freespace);
+			RecordPageWithFreeSpace(onerel, blkno, freespace, nblocks);
 			continue;
 		}
 
@@ -1339,7 +1339,7 @@ lazy_scan_heap(Relation onerel, int options, LVRelStats *vacrelstats,
 		 * taken if there are no indexes.)
 		 */
 		if (vacrelstats->num_dead_tuples == prev_dead_count)
-			RecordPageWithFreeSpace(onerel, blkno, freespace);
+			RecordPageWithFreeSpace(onerel, blkno, freespace, nblocks);
 	}
 
 	/* report that everything is scanned and vacuumed */
@@ -1401,7 +1401,7 @@ lazy_scan_heap(Relation onerel, int options, LVRelStats *vacrelstats,
 		/* Remove tuples from heap */
 		pgstat_progress_update_param(PROGRESS_VACUUM_PHASE,
 									 PROGRESS_VACUUM_PHASE_VACUUM_HEAP);
-		lazy_vacuum_heap(onerel, vacrelstats);
+		lazy_vacuum_heap(onerel, vacrelstats, nblocks);
 		vacrelstats->num_index_scans++;
 	}
 
@@ -1472,9 +1472,10 @@ lazy_scan_heap(Relation onerel, int options, LVRelStats *vacrelstats,
  * Note: the reason for doing this as a second pass is we cannot remove
  * the tuples until we've removed their index entries, and we want to
  * process index entry removal in batches as large as possible.
+ * Note: nblocks is passed as an optimization for RecordPageWithFreeSpace().
  */
 static void
-lazy_vacuum_heap(Relation onerel, LVRelStats *vacrelstats)
+lazy_vacuum_heap(Relation onerel, LVRelStats *vacrelstats, BlockNumber nblocks)
 {
 	int			tupindex;
 	int			npages;
@@ -1511,7 +1512,7 @@ lazy_vacuum_heap(Relation onerel, LVRelStats *vacrelstats)
 		freespace = PageGetHeapFreeSpace(page);
 
 		UnlockReleaseBuffer(buf);
-		RecordPageWithFreeSpace(onerel, tblk, freespace);
+		RecordPageWithFreeSpace(onerel, tblk, freespace, nblocks);
 		npages++;
 	}
 
diff --git a/src/backend/storage/freespace/README b/src/backend/storage/freespace/README
index e7ff23b76f..abaec871a5 100644
--- a/src/backend/storage/freespace/README
+++ b/src/backend/storage/freespace/README
@@ -5,10 +5,11 @@ Free Space Map
 
 The purpose of the free space map is to quickly locate a page with enough
 free space to hold a tuple to be stored; or to determine that no such page
-exists and the relation must be extended by one page.  As of PostgreSQL 8.4
-each relation has its own, extensible free space map stored in a separate
-"fork" of its relation.  This eliminates the disadvantages of the former
-fixed-size FSM.
+exists and the relation must be extended by one page.  For very small heap
+relations, we simply iterate through all the pages in descending order.
+Otherwise, each relation (except for hash indexes) has its own, extensible
+free space map stored in a separate "fork" of its relation.  This eliminates
+the disadvantages of the fixed-size FSM used in PostgreSQL 8.3 and earlier.
 
 It is important to keep the map small so that it can be searched rapidly.
 Therefore, we don't attempt to record the exact free space on a page.
@@ -192,5 +193,3 @@ TODO
 ----
 
 - fastroot to avoid traversing upper nodes with just 1 child
-- use a different system for tables that fit into one FSM page, with a
-  mechanism to switch to the real thing as it grows.
diff --git a/src/backend/storage/freespace/freespace.c b/src/backend/storage/freespace/freespace.c
index 7c4ad1c449..fd37ca6a5c 100644
--- a/src/backend/storage/freespace/freespace.c
+++ b/src/backend/storage/freespace/freespace.c
@@ -76,6 +76,11 @@
 #define FSM_ROOT_LEVEL	(FSM_TREE_DEPTH - 1)
 #define FSM_BOTTOM_LEVEL 0
 
+/* Status codes for the local map. */
+#define FSM_LOCAL_ZERO	0x00	/* Beyond the end of the relation */
+#define FSM_LOCAL_AVAIL	0x01	/* Available to try */
+#define FSM_LOCAL_TRIED	0x02	/* Already tried, not enough space */
+
 /*
  * The internal FSM routines work on a logical addressing scheme. Each
  * level of the tree can be thought of as a separately addressable file.
@@ -89,6 +94,9 @@ typedef struct
 /* Address of the root page. */
 static const FSMAddress FSM_ROOT_ADDRESS = {FSM_ROOT_LEVEL, 0};
 
+/* Local map of block numbers for small heaps with no FSM. */
+static char FSMLocalMap[HEAP_FSM_CREATION_THRESHOLD] = {FSM_LOCAL_ZERO};
+
 /* functions to navigate the tree */
 static FSMAddress fsm_get_child(FSMAddress parent, uint16 slot);
 static FSMAddress fsm_get_parent(FSMAddress child, uint16 *slot);
@@ -106,11 +114,15 @@ static Size fsm_space_cat_to_avail(uint8 cat);
 
 /* workhorse functions for various operations */
 static int fsm_set_and_search(Relation rel, FSMAddress addr, uint16 slot,
-				   uint8 newValue, uint8 minValue);
+				uint8 newValue, uint8 minValue);
+static void fsm_local_set(Relation rel, BlockNumber nblocks);
 static BlockNumber fsm_search(Relation rel, uint8 min_cat);
+static BlockNumber fsm_local_search(void);
 static uint8 fsm_vacuum_page(Relation rel, FSMAddress addr,
 				BlockNumber start, BlockNumber end,
 				bool *eof);
+static bool fsm_allow_writes(Relation rel, BlockNumber heapblk,
+				BlockNumber nblocks, BlockNumber *get_nblocks);
 
 
 /******** Public API ********/
@@ -132,8 +144,35 @@ BlockNumber
 GetPageWithFreeSpace(Relation rel, Size spaceNeeded)
 {
 	uint8		min_cat = fsm_space_needed_to_cat(spaceNeeded);
+	BlockNumber target_block,
+				nblocks;
+
+	/* First try the FSM, if it exists. */
+	target_block = fsm_search(rel, min_cat);
 
-	return fsm_search(rel, min_cat);
+	if (target_block == InvalidBlockNumber &&
+		rel->rd_rel->relkind == RELKIND_RELATION)
+	{
+		nblocks = RelationGetNumberOfBlocks(rel);
+
+		if (nblocks > HEAP_FSM_CREATION_THRESHOLD)
+		{
+			/*
+			 * If the FSM knows nothing of the rel, try the last page before
+			 * we give up and extend.  This avoids one-tuple-per-page syndrome
+			 * during bootstrapping or in a recently-started system.
+			 */
+			target_block = nblocks - 1;
+		}
+		else if (nblocks > 0)
+		{
+			/* Create or update local map and get first candidate block. */
+			fsm_local_set(rel, nblocks);
+			target_block = fsm_local_search();
+		}
+	}
+
+	return target_block;
 }
 
 /*
@@ -149,11 +188,38 @@ BlockNumber
 RecordAndGetPageWithFreeSpace(Relation rel, BlockNumber oldPage,
 							  Size oldSpaceAvail, Size spaceNeeded)
 {
-	int			old_cat = fsm_space_avail_to_cat(oldSpaceAvail);
-	int			search_cat = fsm_space_needed_to_cat(spaceNeeded);
+	int			old_cat;
+	int			search_cat;
 	FSMAddress	addr;
 	uint16		slot;
 	int			search_slot;
+	BlockNumber nblocks = InvalidBlockNumber;
+
+	/* First try the local map, if it exists. */
+	if (oldPage < HEAP_FSM_CREATION_THRESHOLD &&
+		FSMLocalMap[oldPage] == FSM_LOCAL_AVAIL)
+	{
+		Assert(rel->rd_rel->relkind == RELKIND_RELATION);
+
+		FSMLocalMap[oldPage] = FSM_LOCAL_TRIED;
+		return fsm_local_search();
+	}
+
+	if (!fsm_allow_writes(rel, oldPage, InvalidBlockNumber, &nblocks))
+	{
+		/*
+		 * If we have neither a local map nor an FSM, we probably just
+		 * tried the target block in the smgr relation entry and failed,
+		 * so we'll need to create the local map.
+		 */
+		fsm_local_set(rel, nblocks);
+		return fsm_local_search();
+	}
+
+	/* Normal FSM logic follows */
+
+	old_cat = fsm_space_avail_to_cat(oldSpaceAvail);
+	search_cat = fsm_space_needed_to_cat(spaceNeeded);
 
 	/* Get the location of the FSM byte representing the heap block */
 	addr = fsm_get_location(oldPage, &slot);
@@ -178,18 +244,35 @@ RecordAndGetPageWithFreeSpace(Relation rel, BlockNumber oldPage,
  * FreeSpaceMapVacuum call, which updates the upper level pages.
  */
 void
-RecordPageWithFreeSpace(Relation rel, BlockNumber heapBlk, Size spaceAvail)
+RecordPageWithFreeSpace(Relation rel, BlockNumber heapBlk,
+						Size spaceAvail, BlockNumber nblocks)
 {
-	int			new_cat = fsm_space_avail_to_cat(spaceAvail);
+	int			new_cat;
 	FSMAddress	addr;
 	uint16		slot;
+	BlockNumber dummy;
+
+	if (!fsm_allow_writes(rel, heapBlk, nblocks, &dummy))
+		/* Note: We do not have a local map to update, either. */
+		return;
 
 	/* Get the location of the FSM byte representing the heap block */
 	addr = fsm_get_location(heapBlk, &slot);
 
+	new_cat = fsm_space_avail_to_cat(spaceAvail);
 	fsm_set_and_search(rel, addr, slot, new_cat, 0);
 }
 
+/*
+ * Clear the local map. We must call this when we have found a block with
+ * enough free space, or when we extend the relation.
+ */
+void
+ClearLocalMap(void)
+{
+	memset(FSMLocalMap, 0, sizeof(FSMLocalMap));
+}
+
 /*
  * XLogRecordPageWithFreeSpace - like RecordPageWithFreeSpace, for use in
  *		WAL replay
@@ -204,6 +287,30 @@ XLogRecordPageWithFreeSpace(RelFileNode rnode, BlockNumber heapBlk,
 	BlockNumber blkno;
 	Buffer		buf;
 	Page		page;
+	bool		write_to_fsm;
+
+	/* This is meant to mirror the logic in fsm_allow_writes() */
+	if (heapBlk > HEAP_FSM_CREATION_THRESHOLD)
+		write_to_fsm = true;
+	else
+	{
+		/* Open the relation at smgr level */
+		SMgrRelation smgr = smgropen(rnode, InvalidBackendId);
+
+		if (smgrexists(smgr, FSM_FORKNUM))
+			write_to_fsm = true;
+		else
+		{
+			BlockNumber heap_nblocks = smgrnblocks(smgr, MAIN_FORKNUM);
+			if (heap_nblocks > HEAP_FSM_CREATION_THRESHOLD)
+				write_to_fsm = true;
+			else
+				write_to_fsm = false;
+		}
+	}
+
+	if (!write_to_fsm)
+		return;
 
 	/* Get the location of the FSM byte representing the heap block */
 	addr = fsm_get_location(heapBlk, &slot);
@@ -904,3 +1011,118 @@ fsm_vacuum_page(Relation rel, FSMAddress addr,
 
 	return max_avail;
 }
+
+/*
+ * For heaps we prevent extension of the FSM unless the number of pages
+ * exceeds HEAP_FSM_CREATION_THRESHOLD.  For tables that don't already have
+ * a FSM, this will save an inode and a few kB of space.
+ *
+ * XXX The API is a little awkward -- if the caller has a valid nblocks,
+ * it can pass it as an optimization to avoid a system call.  If the caller
+ * passes InvalidBlockNumber and receives a false return value, it can
+ * get an up-to-date relation size from get_nblocks.
+ */
+static bool
+fsm_allow_writes(Relation rel, BlockNumber heapblk,
+				 BlockNumber nblocks, BlockNumber *get_nblocks)
+{
+	bool		skip_get_nblocks;
+
+	if (heapblk > HEAP_FSM_CREATION_THRESHOLD)
+		return true;
+
+	/* Index rels can always create an FSM. */
+	if (rel->rd_rel->relkind != RELKIND_RELATION)
+		return true;
+
+	/*
+	 * If the caller knows nblocks, we can avoid a system call later.
+	 * If it doesn't, maybe we have relpages from a previous VACUUM.
+	 * Since the table may have extended since then, we still have to
+	 * count the pages later if we can't return now.
+	 */
+	if (nblocks != InvalidBlockNumber)
+	{
+		if (nblocks > HEAP_FSM_CREATION_THRESHOLD)
+			return true;
+		else
+			skip_get_nblocks = true;
+	}
+	else
+	{
+		if (rel->rd_rel->relpages != InvalidBlockNumber &&
+			rel->rd_rel->relpages > HEAP_FSM_CREATION_THRESHOLD)
+			return true;
+		else
+			skip_get_nblocks = false;
+	}
+
+	RelationOpenSmgr(rel);
+	if (smgrexists(rel->rd_smgr, FSM_FORKNUM))
+		return true;
+
+	if (skip_get_nblocks)
+		return false;
+
+	/* last resort */
+	*get_nblocks = RelationGetNumberOfBlocks(rel);
+	if (*get_nblocks > HEAP_FSM_CREATION_THRESHOLD)
+		return true;
+	else
+		return false;
+}
+
+/*
+ * Set or update the local map of blocks to try, for when there is no FSM.
+ * It's designed specifically to be idempotent, so the heap insert code
+ * should only clear the map when it has found a free block or when it
+ * has to extend the relation.  That way, if we have tried all blocks we
+ * know about, but the rel has been extended by another backend, this will
+ * set only newly added blocks to 'available'.
+ */
+static void
+fsm_local_set(Relation rel, BlockNumber nblocks)
+{
+	BlockNumber blkno,
+				cached_target_block;
+
+	/*
+	 * If the blkno is beyond the end of the relation, the status should
+	 * be zero already, but make sure it is.  If the blkno is within the
+	 * relation, mark it available unless it's already been tried.
+	 */
+	for (blkno = 0; blkno < HEAP_FSM_CREATION_THRESHOLD; blkno++)
+	{
+		if (blkno < nblocks)
+			FSMLocalMap[blkno] |= FSM_LOCAL_AVAIL;
+		else
+			FSMLocalMap[blkno] = FSM_LOCAL_ZERO;
+	}
+
+	/* Set the status of the cached target block to 'tried'. */
+	cached_target_block = RelationGetTargetBlock(rel);
+	if (cached_target_block != InvalidBlockNumber &&
+		cached_target_block < HEAP_FSM_CREATION_THRESHOLD)
+		FSMLocalMap[cached_target_block] = FSM_LOCAL_TRIED;
+}
+
+/*
+ * Search the local map for an available block to try, in descending order.
+ *
+ * For use when there is no FSM.
+ */
+static BlockNumber
+fsm_local_search(void)
+{
+	BlockNumber		target_block = HEAP_FSM_CREATION_THRESHOLD;
+
+	do
+	{
+		target_block--;
+		if (FSMLocalMap[target_block] == FSM_LOCAL_AVAIL)
+			return target_block;
+	}
+	while (target_block > 0);
+
+	return InvalidBlockNumber;
+}
diff --git a/src/backend/storage/freespace/indexfsm.c b/src/backend/storage/freespace/indexfsm.c
index e21047b96f..d8fd29a7eb 100644
--- a/src/backend/storage/freespace/indexfsm.c
+++ b/src/backend/storage/freespace/indexfsm.c
@@ -51,7 +51,7 @@ GetFreeIndexPage(Relation rel)
 void
 RecordFreeIndexPage(Relation rel, BlockNumber freeBlock)
 {
-	RecordPageWithFreeSpace(rel, freeBlock, BLCKSZ - 1);
+	RecordPageWithFreeSpace(rel, freeBlock, BLCKSZ - 1, InvalidBlockNumber);
 }
 
 
@@ -61,7 +61,7 @@ RecordFreeIndexPage(Relation rel, BlockNumber freeBlock)
 void
 RecordUsedIndexPage(Relation rel, BlockNumber usedBlock)
 {
-	RecordPageWithFreeSpace(rel, usedBlock, 0);
+	RecordPageWithFreeSpace(rel, usedBlock, 0, InvalidBlockNumber);
 }
 
 /*
diff --git a/src/include/storage/freespace.h b/src/include/storage/freespace.h
index 726eb30fb8..ab7f552b70 100644
--- a/src/include/storage/freespace.h
+++ b/src/include/storage/freespace.h
@@ -18,6 +18,9 @@
 #include "storage/relfilenode.h"
 #include "utils/relcache.h"
 
+/* Only extend a heap's FSM if the heap has greater than this many blocks */
+#define HEAP_FSM_CREATION_THRESHOLD 8
+
 /* prototypes for public functions in freespace.c */
 extern Size GetRecordedFreeSpace(Relation rel, BlockNumber heapBlk);
 extern BlockNumber GetPageWithFreeSpace(Relation rel, Size spaceNeeded);
@@ -26,7 +29,8 @@ extern BlockNumber RecordAndGetPageWithFreeSpace(Relation rel,
 							  Size oldSpaceAvail,
 							  Size spaceNeeded);
 extern void RecordPageWithFreeSpace(Relation rel, BlockNumber heapBlk,
-						Size spaceAvail);
+						Size spaceAvail, BlockNumber nblocks);
+extern void ClearLocalMap(void);
 extern void XLogRecordPageWithFreeSpace(RelFileNode rnode, BlockNumber heapBlk,
 							Size spaceAvail);
 
-- 
2.17.1

v7-0002-During-pg_upgrade-skip-transfer-of-FSMs-if-they-w.patchtext/x-patch; charset=US-ASCII; name=v7-0002-During-pg_upgrade-skip-transfer-of-FSMs-if-they-w.patchDownload
From 9b1a35aa768749a7c823df64c761cef60fbb22a7 Mon Sep 17 00:00:00 2001
From: John Naylor <jcnaylor@gmail.com>
Date: Wed, 31 Oct 2018 14:28:03 +0700
Subject: [PATCH v7 2/2] During pg_upgrade, skip transfer of FSMs if they
 wouldn't have been created on the new cluster.

---
 src/bin/pg_upgrade/info.c        | 11 +++++--
 src/bin/pg_upgrade/pg_upgrade.h  |  6 +++-
 src/bin/pg_upgrade/relfilenode.c | 55 +++++++++++++++++++-------------
 3 files changed, 47 insertions(+), 25 deletions(-)

diff --git a/src/bin/pg_upgrade/info.c b/src/bin/pg_upgrade/info.c
index fd0b44c3ce..31a24e0bec 100644
--- a/src/bin/pg_upgrade/info.c
+++ b/src/bin/pg_upgrade/info.c
@@ -200,6 +200,7 @@ create_rel_filename_map(const char *old_data, const char *new_data,
 
 	map->old_db_oid = old_db->db_oid;
 	map->new_db_oid = new_db->db_oid;
+	map->relkind = old_rel->relkind;
 
 	/*
 	 * old_relfilenode might differ from pg_class.oid (and hence
@@ -418,6 +419,7 @@ get_rel_infos(ClusterInfo *cluster, DbInfo *dbinfo)
 	char	   *nspname = NULL;
 	char	   *relname = NULL;
 	char	   *tablespace = NULL;
+	char	   *relkind = NULL;
 	int			i_spclocation,
 				i_nspname,
 				i_relname,
@@ -425,7 +427,8 @@ get_rel_infos(ClusterInfo *cluster, DbInfo *dbinfo)
 				i_indtable,
 				i_toastheap,
 				i_relfilenode,
-				i_reltablespace;
+				i_reltablespace,
+				i_relkind;
 	char		query[QUERY_ALLOC];
 	char	   *last_namespace = NULL,
 			   *last_tablespace = NULL;
@@ -497,7 +500,7 @@ get_rel_infos(ClusterInfo *cluster, DbInfo *dbinfo)
 	 */
 	snprintf(query + strlen(query), sizeof(query) - strlen(query),
 			 "SELECT all_rels.*, n.nspname, c.relname, "
-			 "  c.relfilenode, c.reltablespace, %s "
+			 "  c.relfilenode, c.reltablespace, c.relkind, %s "
 			 "FROM (SELECT * FROM regular_heap "
 			 "      UNION ALL "
 			 "      SELECT * FROM toast_heap "
@@ -529,6 +532,7 @@ get_rel_infos(ClusterInfo *cluster, DbInfo *dbinfo)
 	i_relfilenode = PQfnumber(res, "relfilenode");
 	i_reltablespace = PQfnumber(res, "reltablespace");
 	i_spclocation = PQfnumber(res, "spclocation");
+	i_relkind = PQfnumber(res, "relkind");
 
 	for (relnum = 0; relnum < ntups; relnum++)
 	{
@@ -558,6 +562,9 @@ get_rel_infos(ClusterInfo *cluster, DbInfo *dbinfo)
 		relname = PQgetvalue(res, relnum, i_relname);
 		curr->relname = pg_strdup(relname);
 
+		relkind = PQgetvalue(res, relnum, i_relkind);
+		curr->relkind = relkind[0];
+
 		curr->relfilenode = atooid(PQgetvalue(res, relnum, i_relfilenode));
 		curr->tblsp_alloc = false;
 
diff --git a/src/bin/pg_upgrade/pg_upgrade.h b/src/bin/pg_upgrade/pg_upgrade.h
index f83a3eeb67..78df636a2a 100644
--- a/src/bin/pg_upgrade/pg_upgrade.h
+++ b/src/bin/pg_upgrade/pg_upgrade.h
@@ -147,6 +147,7 @@ typedef struct
 	char	   *tablespace;		/* tablespace path; "" for cluster default */
 	bool		nsp_alloc;		/* should nspname be freed? */
 	bool		tblsp_alloc;	/* should tablespace be freed? */
+	char		relkind;		/* relation relkind -- see pg_class.h */
 } RelInfo;
 
 typedef struct
@@ -173,9 +174,12 @@ typedef struct
 	 */
 	Oid			old_relfilenode;
 	Oid			new_relfilenode;
-	/* the rest are used only for logging and error reporting */
+
+	/* These are used only for logging and error reporting. */
 	char	   *nspname;		/* namespaces */
 	char	   *relname;
+
+	char		relkind;		/* relation relkind -- see pg_class.h */
 } FileNameMap;
 
 /*
diff --git a/src/bin/pg_upgrade/relfilenode.c b/src/bin/pg_upgrade/relfilenode.c
index ed604f26ca..7a7f6ab244 100644
--- a/src/bin/pg_upgrade/relfilenode.c
+++ b/src/bin/pg_upgrade/relfilenode.c
@@ -14,10 +14,11 @@
 #include <sys/stat.h>
 #include "catalog/pg_class_d.h"
 #include "access/transam.h"
+#include "storage/freespace.h"
 
 
 static void transfer_single_new_db(FileNameMap *maps, int size, char *old_tablespace);
-static void transfer_relfile(FileNameMap *map, const char *suffix, bool vm_must_add_frozenbit);
+static Size transfer_relfile(FileNameMap *map, const char *suffix, bool vm_must_add_frozenbit);
 
 
 /*
@@ -136,6 +137,7 @@ transfer_single_new_db(FileNameMap *maps, int size, char *old_tablespace)
 	int			mapnum;
 	bool		vm_crashsafe_match = true;
 	bool		vm_must_add_frozenbit = false;
+	Size		first_seg_size = 0;
 
 	/*
 	 * Do the old and new cluster disagree on the crash-safetiness of the vm
@@ -157,18 +159,22 @@ transfer_single_new_db(FileNameMap *maps, int size, char *old_tablespace)
 		if (old_tablespace == NULL ||
 			strcmp(maps[mapnum].old_tablespace, old_tablespace) == 0)
 		{
-			/* transfer primary file */
-			transfer_relfile(&maps[mapnum], "", vm_must_add_frozenbit);
+			/* Transfer main fork and return size of the first segment. */
+			first_seg_size = transfer_relfile(&maps[mapnum], "", vm_must_add_frozenbit);
 
 			/* fsm/vm files added in PG 8.4 */
 			if (GET_MAJOR_VERSION(old_cluster.major_version) >= 804)
 			{
 				/*
-				 * Copy/link any fsm and vm files, if they exist
+				 * Copy/link any fsm and vm files, if they exist and if they would
+				 * be created in the new cluster.
 				 */
-				transfer_relfile(&maps[mapnum], "_fsm", vm_must_add_frozenbit);
+				if (maps[mapnum].relkind != RELKIND_RELATION ||
+					first_seg_size > HEAP_FSM_CREATION_THRESHOLD * BLCKSZ ||
+					GET_MAJOR_VERSION(new_cluster.major_version) <= 1100)
+					(void) transfer_relfile(&maps[mapnum], "_fsm", vm_must_add_frozenbit);
 				if (vm_crashsafe_match)
-					transfer_relfile(&maps[mapnum], "_vm", vm_must_add_frozenbit);
+					(void) transfer_relfile(&maps[mapnum], "_vm", vm_must_add_frozenbit);
 			}
 		}
 	}
@@ -182,7 +188,7 @@ transfer_single_new_db(FileNameMap *maps, int size, char *old_tablespace)
  * is true, visibility map forks are converted and rewritten, even in link
  * mode.
  */
-static void
+static Size
 transfer_relfile(FileNameMap *map, const char *type_suffix, bool vm_must_add_frozenbit)
 {
 	char		old_file[MAXPGPATH];
@@ -190,6 +196,8 @@ transfer_relfile(FileNameMap *map, const char *type_suffix, bool vm_must_add_fro
 	int			segno;
 	char		extent_suffix[65];
 	struct stat statbuf;
+	int			sret;
+	Size		first_seg_size = 0;
 
 	/*
 	 * Now copy/link any related segments as well. Remember, PG breaks large
@@ -218,26 +226,29 @@ transfer_relfile(FileNameMap *map, const char *type_suffix, bool vm_must_add_fro
 				 type_suffix,
 				 extent_suffix);
 
-		/* Is it an extent, fsm, or vm file? */
-		if (type_suffix[0] != '\0' || segno != 0)
-		{
-			/* Did file open fail? */
-			if (stat(old_file, &statbuf) != 0)
-			{
-				/* File does not exist?  That's OK, just return */
-				if (errno == ENOENT)
-					return;
-				else
-					pg_fatal("error while checking for file existence \"%s.%s\" (\"%s\" to \"%s\"): %s\n",
-							 map->nspname, map->relname, old_file, new_file,
-							 strerror(errno));
-			}
+		sret = stat(old_file, &statbuf);
 
+		/* Save the size of the first segment of the main fork. */
+		if (type_suffix[0] == '\0' && segno == 0)
+			first_seg_size = statbuf.st_size;
+
+		/* The file must be an extent, fsm, or vm. */
+		else if (sret == 0)
+		{
 			/* If file is empty, just return */
 			if (statbuf.st_size == 0)
-				return;
+				return first_seg_size;
 		}
 
+		/* Did file open fail? */
+		else if (errno == ENOENT)
+			/* File does not exist?  That's OK, just return */
+			return first_seg_size;
+		else
+			pg_fatal("error while checking for file existence \"%s.%s\" (\"%s\" to \"%s\"): %s\n",
+					 map->nspname, map->relname, old_file, new_file,
+					 strerror(errno));
+
 		unlink(new_file);
 
 		/* Copying files might take some time, so give feedback. */
-- 
2.17.1

setup-fsm-pg_upgrade.sqlapplication/sql; name=setup-fsm-pg_upgrade.sqlDownload
#18Amit Kapila
amit.kapila16@gmail.com
In reply to: John Naylor (#17)
Re: WIP: Avoid creation of the free space map for small tables

On Wed, Oct 31, 2018 at 1:42 PM John Naylor <jcnaylor@gmail.com> wrote:

Upthread I wrote:

-A possible TODO item is to teach pg_upgrade not to link FSMs for
small heaps. I haven't look into the feasibility of that, however.

This turned out to be relatively light weight (0002 attached). I had
to add relkind to the RelInfo struct and save the size of each heap as
its transferred. The attached SQL script will setup a couple test
cases to demonstrate pg_upgrade. Installations with large numbers of
small tables will be able to see space savings right away.

For 0001, I adjusted the README and docs, and also made some cosmetic
improvements to the code, mostly in the comments. I've set the
commitfest entry back to 'needs review'

One thing I noticed is that one behavior on master hasn't changed:
System catalogs created during bootstrap still have a FSM if they have
any data. Possibly related, catalogs also have a VM even if they have
no data at all. This isn't anything to get excited about, but it would
be nice to investigate, at least so it can be documented. A cursory
dig hasn't found the cause, but I'll keep doing that as time permits.

Thanks for your work on this, I will try to review it during CF.

--
With Regards,
Amit Kapila.
EnterpriseDB: http://www.enterprisedb.com

#19Robert Haas
robertmhaas@gmail.com
In reply to: John Naylor (#16)
Re: WIP: Avoid creation of the free space map for small tables

On Tue, Oct 23, 2018 at 9:42 AM John Naylor <jcnaylor@gmail.com> wrote:

A case could be made for setting the threshold to 4, since not having
3 blocks of FSM in shared buffers exactly makes up for the 3 other
blocks of heap that are checked when free space runs out.

That doesn't seem like an unreasonable argument. I'm not sure whether
the right threshold is 4 or something a little bigger, but I bet it's
not very large. It seems important to me that before anybody thinks
about committing this, we construct some kind of destruction case
where repeated scans of the whole table are triggered as frequently as
possible, and then run that test with varying thresholds. I might be
totally wrong, but I bet with a value as large as 32 you will be able
to find cases where it regresses in a big way.

We also need to think about what happens on the standby, where the FSM
is updated in a fairly different way.

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

#20Amit Kapila
amit.kapila16@gmail.com
In reply to: Robert Haas (#19)
Re: WIP: Avoid creation of the free space map for small tables

On Wed, Oct 31, 2018 at 10:29 PM Robert Haas <robertmhaas@gmail.com> wrote:

On Tue, Oct 23, 2018 at 9:42 AM John Naylor <jcnaylor@gmail.com> wrote:

A case could be made for setting the threshold to 4, since not having
3 blocks of FSM in shared buffers exactly makes up for the 3 other
blocks of heap that are checked when free space runs out.

That doesn't seem like an unreasonable argument. I'm not sure whether
the right threshold is 4 or something a little bigger, but I bet it's
not very large. It seems important to me that before anybody thinks
about committing this, we construct some kind of destruction case
where repeated scans of the whole table are triggered as frequently as
possible, and then run that test with varying thresholds.

Why do you think repeated scans will be a destruction case when there
is no FSM for a small table?

--
With Regards,
Amit Kapila.
EnterpriseDB: http://www.enterprisedb.com

#21Robert Haas
robertmhaas@gmail.com
In reply to: Amit Kapila (#20)
Re: WIP: Avoid creation of the free space map for small tables

On Fri, Nov 2, 2018 at 7:23 AM Amit Kapila <amit.kapila16@gmail.com> wrote:

That doesn't seem like an unreasonable argument. I'm not sure whether
the right threshold is 4 or something a little bigger, but I bet it's
not very large. It seems important to me that before anybody thinks
about committing this, we construct some kind of destruction case
where repeated scans of the whole table are triggered as frequently as
possible, and then run that test with varying thresholds.

Why do you think repeated scans will be a destruction case when there
is no FSM for a small table?

That's not what I'm saying. If we don't have the FSM, we have to
check every page of the table. If there's a workload where that
happens a lot on a table that is just under the size threshold for
creating the FSM, then it's likely to be a worst case for this patch.

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

#22Tom Lane
tgl@sss.pgh.pa.us
In reply to: Robert Haas (#21)
Re: WIP: Avoid creation of the free space map for small tables

Robert Haas <robertmhaas@gmail.com> writes:

That's not what I'm saying. If we don't have the FSM, we have to
check every page of the table. If there's a workload where that
happens a lot on a table that is just under the size threshold for
creating the FSM, then it's likely to be a worst case for this patch.

Hmm, you're assuming something not in evidence: why would that be the
algorithm? On a FSM-less table, I'd be inclined to just check the
last page and then grow the table if the tuple doesn't fit there.
This would, in many cases, soon result in a FSM being created, but
I think that's just fine. The point of the change is to optimize
for cases where a table *never* gets more than a few inserts. Not, IMO,
for cases where a table gets a lot of churn but never has a whole lot of
live tuples. In the latter scenario we are far better off having a FSM.

regards, tom lane

#23Robert Haas
robertmhaas@gmail.com
In reply to: Tom Lane (#22)
Re: WIP: Avoid creation of the free space map for small tables

On Fri, Nov 2, 2018 at 10:07 AM Tom Lane <tgl@sss.pgh.pa.us> wrote:

Robert Haas <robertmhaas@gmail.com> writes:

That's not what I'm saying. If we don't have the FSM, we have to
check every page of the table. If there's a workload where that
happens a lot on a table that is just under the size threshold for
creating the FSM, then it's likely to be a worst case for this patch.

Hmm, you're assuming something not in evidence: why would that be the
algorithm?

I think it's in evidence, in the form of several messages mentioning a
flag called try_every_block.

Just checking the last page of the table doesn't sound like a good
idea to me. I think that will just lead to a lot of stupid bloat. It
seems likely that checking every page of the table is fine for npages
<= 3, and that would still be win in a very significant number of
cases, since lots of instances have many empty or tiny tables. I was
merely reacting to the suggestion that the approach should be used for
npages <= 32; that threshold sounds way too high.

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

#24John Naylor
jcnaylor@gmail.com
In reply to: Robert Haas (#23)
Re: WIP: Avoid creation of the free space map for small tables

On 11/2/18, Robert Haas <robertmhaas@gmail.com> wrote:

On Fri, Nov 2, 2018 at 10:07 AM Tom Lane <tgl@sss.pgh.pa.us> wrote:

Robert Haas <robertmhaas@gmail.com> writes:

That's not what I'm saying. If we don't have the FSM, we have to
check every page of the table. If there's a workload where that
happens a lot on a table that is just under the size threshold for
creating the FSM, then it's likely to be a worst case for this patch.

Hmm, you're assuming something not in evidence: why would that be the
algorithm?

I think it's in evidence, in the form of several messages mentioning a
flag called try_every_block.

Correct.

Just checking the last page of the table doesn't sound like a good
idea to me. I think that will just lead to a lot of stupid bloat. It
seems likely that checking every page of the table is fine for npages
<= 3, and that would still be win in a very significant number of
cases, since lots of instances have many empty or tiny tables. I was
merely reacting to the suggestion that the approach should be used for
npages <= 32; that threshold sounds way too high.

To be clear, no one suggested that. The patch has always had 8 or 10
as a starting point, and I've mentioned 4 and 8 as good possibilities
based on the COPY tests upthread. It was apparent I didn't need to
recompile a bunch of binaries with different thresholds. All I had to
do was compile with a threshold much larger than required, and then
test inserting into X number of pages, to simulate a threshold of X. I
increased X until I saw a regression. That's where the 32 came from,
sorry if that was misleading, in my head it was obvious. I'd be happy
test other scenarios. I'm not sure how to test redo -- seems more
difficult to get meaningful results than the normal case.

-John Naylor

#25Amit Kapila
amit.kapila16@gmail.com
In reply to: Robert Haas (#21)
Re: WIP: Avoid creation of the free space map for small tables

On Fri, Nov 2, 2018 at 7:29 PM Robert Haas <robertmhaas@gmail.com> wrote:

On Fri, Nov 2, 2018 at 7:23 AM Amit Kapila <amit.kapila16@gmail.com> wrote:

That doesn't seem like an unreasonable argument. I'm not sure whether
the right threshold is 4 or something a little bigger, but I bet it's
not very large. It seems important to me that before anybody thinks
about committing this, we construct some kind of destruction case
where repeated scans of the whole table are triggered as frequently as
possible, and then run that test with varying thresholds.

Why do you think repeated scans will be a destruction case when there
is no FSM for a small table?

That's not what I'm saying. If we don't have the FSM, we have to
check every page of the table. If there's a workload where that
happens a lot on a table that is just under the size threshold for
creating the FSM, then it's likely to be a worst case for this patch.

That makes sense and this is the first thing I was also worried about
after looking at the initial patch and suggested a test [1]/messages/by-id/CAA4eK1+hP-jGYWi25-1QMedxeM_0H01s==4-t74oEgL2EDVicw@mail.gmail.com which can
hit the worst case.

[1]: /messages/by-id/CAA4eK1+hP-jGYWi25-1QMedxeM_0H01s==4-t74oEgL2EDVicw@mail.gmail.com

--
With Regards,
Amit Kapila.
EnterpriseDB: http://www.enterprisedb.com

#26Amit Kapila
amit.kapila16@gmail.com
In reply to: Tom Lane (#22)
Re: WIP: Avoid creation of the free space map for small tables

On Fri, Nov 2, 2018 at 7:37 PM Tom Lane <tgl@sss.pgh.pa.us> wrote:

Robert Haas <robertmhaas@gmail.com> writes:

That's not what I'm saying. If we don't have the FSM, we have to
check every page of the table. If there's a workload where that
happens a lot on a table that is just under the size threshold for
creating the FSM, then it's likely to be a worst case for this patch.

Hmm, you're assuming something not in evidence: why would that be the
algorithm? On a FSM-less table, I'd be inclined to just check the
last page and then grow the table if the tuple doesn't fit there.
This would, in many cases, soon result in a FSM being created, but
I think that's just fine. The point of the change is to optimize
for cases where a table *never* gets more than a few inserts. Not, IMO,
for cases where a table gets a lot of churn but never has a whole lot of
live tuples. In the latter scenario we are far better off having a FSM.

In the past, you seem to have suggested an approach to try each block
[1]: /messages/by-id/11360.1345502641@sss.pgh.pa.us
are suggesting now, then we don't need to worry much about any
regression and code will be somewhat simpler, but OTOH, I don't see
much harm in trying every block if we keep the threshold as no more
than 4. That would address more cases.

[1]: /messages/by-id/11360.1345502641@sss.pgh.pa.us

--
With Regards,
Amit Kapila.
EnterpriseDB: http://www.enterprisedb.com

#27Michael Paquier
michael@paquier.xyz
In reply to: Robert Haas (#23)
Re: WIP: Avoid creation of the free space map for small tables

On Fri, Nov 02, 2018 at 10:38:45AM -0400, Robert Haas wrote:

I think it's in evidence, in the form of several messages mentioning a
flag called try_every_block.

Just checking the last page of the table doesn't sound like a good
idea to me. I think that will just lead to a lot of stupid bloat. It
seems likely that checking every page of the table is fine for npages
<= 3, and that would still be win in a very significant number of
cases, since lots of instances have many empty or tiny tables. I was
merely reacting to the suggestion that the approach should be used for
npages <= 32; that threshold sounds way too high.

It seems to me that it would be costly for schemas which have one core
table with a couple of records used in many joins with other queries.
Imagine for example a core table like that:
CREATE TABLE us_states (id serial, initials varchar(2));
INSERT INTO us_states VALUES (DEFAULT, 'CA');

If there is a workload where those initials need to be fetched a lot,
this patch could cause a loss. It looks hard to me to put a straight
number on when not having the FSM is better than having it because that
could be environment-dependent, so there is an argument for making the
default very low, still configurable?
--
Michael

#28Amit Kapila
amit.kapila16@gmail.com
In reply to: Michael Paquier (#27)
Re: WIP: Avoid creation of the free space map for small tables

On Sun, Nov 4, 2018 at 5:56 AM Michael Paquier <michael@paquier.xyz> wrote:

On Fri, Nov 02, 2018 at 10:38:45AM -0400, Robert Haas wrote:

I think it's in evidence, in the form of several messages mentioning a
flag called try_every_block.

Just checking the last page of the table doesn't sound like a good
idea to me. I think that will just lead to a lot of stupid bloat. It
seems likely that checking every page of the table is fine for npages
<= 3, and that would still be win in a very significant number of
cases, since lots of instances have many empty or tiny tables. I was
merely reacting to the suggestion that the approach should be used for
npages <= 32; that threshold sounds way too high.

It seems to me that it would be costly for schemas which have one core
table with a couple of records used in many joins with other queries.
Imagine for example a core table like that:
CREATE TABLE us_states (id serial, initials varchar(2));
INSERT INTO us_states VALUES (DEFAULT, 'CA');

If there is a workload where those initials need to be fetched a lot,
this patch could cause a loss.

How alone fetching would cause any loss? If it gets updated, then
there is a chance that we might have some performance impact.

It looks hard to me to put a straight
number on when not having the FSM is better than having it because that
could be environment-dependent, so there is an argument for making the
default very low, still configurable?

I think 3 or 4 as threshold should work fine (though we need to
thoroughly test that) as we will anyway avoid having three additional
pages of FSM for such tables. I am not sure how easy it would be for
users to set this value if we make it configurable or on what basis
can they configure?

--
With Regards,
Amit Kapila.
EnterpriseDB: http://www.enterprisedb.com

#29John Naylor
jcnaylor@gmail.com
In reply to: Robert Haas (#19)
1 attachment(s)
Re: WIP: Avoid creation of the free space map for small tables

On 10/31/18, Robert Haas <robertmhaas@gmail.com> wrote:

It seems important to me that before anybody thinks
about committing this, we construct some kind of destruction case
where repeated scans of the whole table are triggered as frequently as
possible, and then run that test with varying thresholds. I might be
totally wrong, but I bet with a value as large as 32 you will be able
to find cases where it regresses in a big way.

Here's an attempt at a destruction case: Lobotomize the heap insert
logic such that it never checks the cached target block and has to
call the free space logic for every single insertion, like this:

index ff13c03083..5d5b36af29 100644
--- a/src/backend/access/heap/hio.c
+++ b/src/backend/access/heap/hio.c
@@ -377,7 +377,7 @@ RelationGetBufferForTuple(Relation relation, Size len,
     else if (bistate && bistate->current_buf != InvalidBuffer)
         targetBlock = BufferGetBlockNumber(bistate->current_buf);
     else
-        targetBlock = RelationGetTargetBlock(relation);
+        targetBlock = InvalidBlockNumber;

if (targetBlock == InvalidBlockNumber && use_fsm)
{

(with the threshold patch I had to do additional work)
With the small tuples used in the attached v2 test, this means the
free space logic is called ~225 times per block. The test tables are
pre-filled with one tuple and vacuumed so that the FSMs are already
created when testing the master branch. The patch branch is compiled
with a threshold of 8, but testing inserts of 4 pages will effectively
simulate a threshold of 4, etc. As before, trimmed average of 10 runs,
loading to 100 tables each:

# blocks master patch
2 25.1ms 30.3ms
4 40.7ms 48.1ms
6 56.6ms 64.7ms
8 73.1ms 82.0ms

Without this artificial penalty, the 8 block case was about 50ms for
both branches. So if I calculated right, of that 50 ms, master is
spending ~0.10ms looking for free space, and the patch is spending
about ~0.15ms. So, from that perspective, the difference is trivial.
Of course, this is a single client, so not entirely realistic. I think
that shared buffer considerations are most important for deciding the
threshold.

We also need to think about what happens on the standby, where the FSM
is updated in a fairly different way.

Were you referring to performance or just functionality? Because the
threshold works on the standby, but I don't know about the performance
there.

-John Naylor

Attachments:

fsm-copy-test-v2.sqlapplication/sql; name=fsm-copy-test-v2.sqlDownload
#30John Naylor
jcnaylor@gmail.com
In reply to: Robert Haas (#23)
Re: WIP: Avoid creation of the free space map for small tables

On 11/2/18, Tom Lane <tgl@sss.pgh.pa.us> wrote:

On a FSM-less table, I'd be inclined to just check the
last page and then grow the table if the tuple doesn't fit there.
This would, in many cases, soon result in a FSM being created, but
I think that's just fine. The point of the change is to optimize
for cases where a table *never* gets more than a few inserts. Not, IMO,
for cases where a table gets a lot of churn but never has a whole lot of
live tuples. In the latter scenario we are far better off having a FSM.

and...

On 11/2/18, Robert Haas <robertmhaas@gmail.com> wrote:

Just checking the last page of the table doesn't sound like a good
idea to me. I think that will just lead to a lot of stupid bloat. It
seems likely that checking every page of the table is fine for npages
<= 3, and that would still be win in a very significant number of
cases,

I see the merit of both of these arguments, and it occurred to me that
there is middle ground between checking only the last page and
checking every page: Check the last 3 pages and set the threshold to
6. That way, with npages <= 3, every page will be checked. In the
unlikely case that npages = 6 and the first 3 pages are all wasted
space, that's the amount of space that would have gone to the FSM
anyway, and the relation will likely grow beyond the threshold soon,
at which point the free space will become visible again.

-John Naylor

#31Amit Kapila
amit.kapila16@gmail.com
In reply to: John Naylor (#15)
Re: WIP: Avoid creation of the free space map for small tables

On Mon, Oct 22, 2018 at 12:14 PM John Naylor <jcnaylor@gmail.com> wrote:

On 10/16/18, Amit Kapila <amit.kapila16@gmail.com> wrote:

I think we can avoid using prevBlockNumber and try_every_block, if we
maintain a small cache which tells whether the particular block is
tried or not. What I am envisioning is that while finding the block
with free space, if we came to know that the relation in question is
small enough that it doesn't have FSM, we can perform a local_search.
In local_seach, we can enquire the cache for any block that we can try
and if we find any block, we can try inserting in that block,
otherwise, we need to extend the relation. One simple way to imagine
such a cache would be an array of structure and structure has blkno
and status fields. After we get the usable block, we need to clear
the cache, if exists.

Here is the design I've implemented in the attached v6. There is more
code than v5, but there's a cleaner separation between freespace.c and
hio.c, as you preferred.

This approach seems better.

I also think it's more robust. I've expended
some effort to avoid doing unnecessary system calls to get the number
of blocks.
--

For the local, in-memory map, maintain a static array of status
markers, of fixed-length HEAP_FSM_CREATION_THRESHOLD, indexed by block
number. This is populated every time we call GetPageWithFreeSpace() on
small tables with no FSM. The statuses are

'zero' (beyond the relation)
'available to try'
'tried already'

+/* Status codes for the local map. */
+#define FSM_LOCAL_ZERO 0x00 /* Beyond the end of the relation */
+#define FSM_LOCAL_AVAIL 0x01 /* Available to try */
+#define FSM_LOCAL_TRIED 0x02 /* Already tried, not enough space */

Instead of maintaining three states, can't we do with two states
(Available and Not Available), basically combine 0 and 2 in your case.
I think it will save some cycles in
fsm_local_set, where each time you need to initialize all the entries
in the map. I think we can argue that it is not much overhead, but I
think it is better code-wise also if we can make it happen with fewer
states.

Some assorted comments:
1.
 <para>
-Each heap and index relation, except for hash indexes, has a Free Space Map
+Each heap relation, unless it is very small, and each index relation,
+except for hash indexes, has a Free Space Map
 (FSM) to keep track of available space in the relation. It's stored

It appears that line has ended abruptly.

2.
page = BufferGetPage(buffer);
+ targetBlock = BufferGetBlockNumber(buffer);

if (!PageIsNew(page))
elog(ERROR, "page %u of relation \"%s\" should be empty but is not",
- BufferGetBlockNumber(buffer),
+ targetBlock,
RelationGetRelationName(relation));

  PageInit(page, BufferGetPageSize(buffer), 0);
@@ -623,7 +641,18 @@ loop:
  * current backend to make more insertions or not, which is probably a
  * good bet most of the time.  So for now, don't add it to FSM yet.
  */
- RelationSetTargetBlock(relation, BufferGetBlockNumber(buffer));
+ RelationSetTargetBlock(relation, targetBlock);

Is this related to this patch? If not, I suggest let's do it
separately if required.

3.
 static int fsm_set_and_search(Relation rel, FSMAddress addr, uint16 slot,
-    uint8 newValue, uint8 minValue);
+ uint8 newValue, uint8 minValue);

This appears to be a spurious change.

4.
@@ -378,24 +386,15 @@ RelationGetBufferForTuple(Relation relation, Size len,
  * target.
  */
  targetBlock = GetPageWithFreeSpace(relation, len + saveFreeSpace);
+
+ /*
+ * In case we used an in-memory map of available blocks, reset
+ * it for next use.
+ */
+ if (targetBlock < HEAP_FSM_CREATION_THRESHOLD)
+ ClearLocalMap();

How will you clear the local map during error? I think you need to
clear it in abort path and you can name the function as
FSMClearLocalMap or something like that.

5.
+/*#define TRACE_TARGETBLOCK */

Debugging leftover, do you want to retain this and related stuff
during the development of patch?

--
With Regards,
Amit Kapila.
EnterpriseDB: http://www.enterprisedb.com

#32John Naylor
jcnaylor@gmail.com
In reply to: Amit Kapila (#31)
Re: WIP: Avoid creation of the free space map for small tables

On 11/16/18, Amit Kapila <amit.kapila16@gmail.com> wrote:

+/* Status codes for the local map. */
+#define FSM_LOCAL_ZERO 0x00 /* Beyond the end of the relation */
+#define FSM_LOCAL_AVAIL 0x01 /* Available to try */
+#define FSM_LOCAL_TRIED 0x02 /* Already tried, not enough space */

Instead of maintaining three states, can't we do with two states
(Available and Not Available), basically combine 0 and 2 in your case.
I think it will save some cycles in
fsm_local_set, where each time you need to initialize all the entries
in the map. I think we can argue that it is not much overhead, but I
think it is better code-wise also if we can make it happen with fewer
states.

That'd work too, but let's consider this scenario: We have a 2-block
table that has no free space. After trying each block, the local cache
looks like

0123
TT00

Let's say we have to wait to acquire a relation extension lock,
because another backend had already started extending the heap by 1
block. We call GetPageWithFreeSpace() and now the local map looks like

0123
TTA0

By using bitwise OR to set availability, the already-tried blocks
remain as they are. With only 2 states, the map would look like this
instead:

0123
AAAN

If we assume that an insert into the newly-created block 2 will almost
always succeed, we don't have to worry about wasting time re-checking
the first 2 full blocks. Does that sound right to you?

Some assorted comments:
1.
<para>
-Each heap and index relation, except for hash indexes, has a Free Space
Map
+Each heap relation, unless it is very small, and each index relation,
+except for hash indexes, has a Free Space Map
(FSM) to keep track of available space in the relation. It's stored

It appears that line has ended abruptly.

Not sure what you're referring to here.

2.
page = BufferGetPage(buffer);
+ targetBlock = BufferGetBlockNumber(buffer);

if (!PageIsNew(page))
elog(ERROR, "page %u of relation \"%s\" should be empty but is not",
- BufferGetBlockNumber(buffer),
+ targetBlock,
RelationGetRelationName(relation));

PageInit(page, BufferGetPageSize(buffer), 0);
@@ -623,7 +641,18 @@ loop:
* current backend to make more insertions or not, which is probably a
* good bet most of the time.  So for now, don't add it to FSM yet.
*/
- RelationSetTargetBlock(relation, BufferGetBlockNumber(buffer));
+ RelationSetTargetBlock(relation, targetBlock);

Is this related to this patch? If not, I suggest let's do it
separately if required.

I will separate this out.

3.
static int fsm_set_and_search(Relation rel, FSMAddress addr, uint16 slot,
-    uint8 newValue, uint8 minValue);
+ uint8 newValue, uint8 minValue);

This appears to be a spurious change.

It was intentional, but I will include it separately as above.

4.
@@ -378,24 +386,15 @@ RelationGetBufferForTuple(Relation relation, Size
len,
* target.
*/
targetBlock = GetPageWithFreeSpace(relation, len + saveFreeSpace);
+
+ /*
+ * In case we used an in-memory map of available blocks, reset
+ * it for next use.
+ */
+ if (targetBlock < HEAP_FSM_CREATION_THRESHOLD)
+ ClearLocalMap();

How will you clear the local map during error? I think you need to
clear it in abort path and you can name the function as
FSMClearLocalMap or something like that.

That sounds right, and I will rename the function that way. For the
abort path, were you referring to this or somewhere else?

if (!PageIsNew(page))
elog(ERROR, "page %u of relation \"%s\" should be empty but is not",
targetBlock,
RelationGetRelationName(relation));

5.
+/*#define TRACE_TARGETBLOCK */

Debugging leftover, do you want to retain this and related stuff
during the development of patch?

I modeled this after TRACE_VISIBILITYMAP in visibilitymap.c. It's
useful for development, but I don't particularly care whether it's in
the final verision.

Also, I found an off-by-one error that caused an unnecessary
smgrexists() call in tables with threshold + 1 pages. This will be
fixed in the next version.

-John Naylor

#33Amit Kapila
amit.kapila16@gmail.com
In reply to: John Naylor (#32)
Re: WIP: Avoid creation of the free space map for small tables

On Mon, Nov 19, 2018 at 7:30 AM John Naylor <jcnaylor@gmail.com> wrote:

On 11/16/18, Amit Kapila <amit.kapila16@gmail.com> wrote:

+/* Status codes for the local map. */
+#define FSM_LOCAL_ZERO 0x00 /* Beyond the end of the relation */
+#define FSM_LOCAL_AVAIL 0x01 /* Available to try */
+#define FSM_LOCAL_TRIED 0x02 /* Already tried, not enough space */

Instead of maintaining three states, can't we do with two states
(Available and Not Available), basically combine 0 and 2 in your case.
I think it will save some cycles in
fsm_local_set, where each time you need to initialize all the entries
in the map. I think we can argue that it is not much overhead, but I
think it is better code-wise also if we can make it happen with fewer
states.

That'd work too, but let's consider this scenario: We have a 2-block
table that has no free space. After trying each block, the local cache
looks like

0123
TT00

Let's say we have to wait to acquire a relation extension lock,
because another backend had already started extending the heap by 1
block. We call GetPageWithFreeSpace() and now the local map looks like

0123
TTA0

By using bitwise OR to set availability, the already-tried blocks
remain as they are. With only 2 states, the map would look like this
instead:

0123
AAAN

I expect below part of code to go-away.
+fsm_local_set(Relation rel, BlockNumber nblocks)
{
..
+ /*
+ * If the blkno is beyond the end of the relation, the status should
+ * be zero already, but make sure it is.  If the blkno is within the
+ * relation, mark it available unless it's already been tried.
+ */
+ for (blkno = 0; blkno < HEAP_FSM_CREATION_THRESHOLD; blkno++)
+ {
+ if (blkno < nblocks)
+ FSMLocalMap[blkno] |= FSM_LOCAL_AVAIL;
+ else
+ FSMLocalMap[blkno] = FSM_LOCAL_ZERO;
+ }
..
}

In my mind for such a case it should look like below:
0123
NNAN

If we assume that an insert into the newly-created block 2 will almost
always succeed, we don't have to worry about wasting time re-checking
the first 2 full blocks. Does that sound right to you?

As explained above, such a situation won't exist.

Some assorted comments:
1.
<para>
-Each heap and index relation, except for hash indexes, has a Free Space
Map
+Each heap relation, unless it is very small, and each index relation,
+except for hash indexes, has a Free Space Map
(FSM) to keep track of available space in the relation. It's stored

It appears that line has ended abruptly.

Not sure what you're referring to here.

There is a space after "has a Free Space Map " so you can combine next line.

2.
page = BufferGetPage(buffer);
+ targetBlock = BufferGetBlockNumber(buffer);

if (!PageIsNew(page))
elog(ERROR, "page %u of relation \"%s\" should be empty but is not",
- BufferGetBlockNumber(buffer),
+ targetBlock,
RelationGetRelationName(relation));

PageInit(page, BufferGetPageSize(buffer), 0);
@@ -623,7 +641,18 @@ loop:
* current backend to make more insertions or not, which is probably a
* good bet most of the time.  So for now, don't add it to FSM yet.
*/
- RelationSetTargetBlock(relation, BufferGetBlockNumber(buffer));
+ RelationSetTargetBlock(relation, targetBlock);

Is this related to this patch? If not, I suggest let's do it
separately if required.

I will separate this out.

3.
static int fsm_set_and_search(Relation rel, FSMAddress addr, uint16 slot,
-    uint8 newValue, uint8 minValue);
+ uint8 newValue, uint8 minValue);

This appears to be a spurious change.

It was intentional, but I will include it separately as above.

4.
@@ -378,24 +386,15 @@ RelationGetBufferForTuple(Relation relation, Size
len,
* target.
*/
targetBlock = GetPageWithFreeSpace(relation, len + saveFreeSpace);
+
+ /*
+ * In case we used an in-memory map of available blocks, reset
+ * it for next use.
+ */
+ if (targetBlock < HEAP_FSM_CREATION_THRESHOLD)
+ ClearLocalMap();

How will you clear the local map during error? I think you need to
clear it in abort path and you can name the function as
FSMClearLocalMap or something like that.

That sounds right, and I will rename the function that way. For the
abort path, were you referring to this or somewhere else?

if (!PageIsNew(page))
elog(ERROR, "page %u of relation \"%s\" should be empty but is not",
targetBlock,
RelationGetRelationName(relation));

I think it might come from any other place between when you set it and
before it got cleared (like any intermediate buffer and pin related
API's).

5.
+/*#define TRACE_TARGETBLOCK */

Debugging leftover, do you want to retain this and related stuff
during the development of patch?

I modeled this after TRACE_VISIBILITYMAP in visibilitymap.c. It's
useful for development, but I don't particularly care whether it's in
the final verision.

Okay, so if you want to retain it for the period of development, then
I am fine with it. We can see at the end if it makes sense to retain
it.

Also, I found an off-by-one error that caused an unnecessary
smgrexists() call in tables with threshold + 1 pages. This will be
fixed in the next version.

Thanks.

One other thing that slightly bothers me is the call to
RelationGetNumberOfBlocks via fsm_allow_writes. It seems that call
will happen quite frequently in this code-path and can have some
performance impact. As of now, I don't have any idea to avoid it or
reduce it more than what you already have in the patch, but I think we
should try some more to avoid it. Let me know if you have any ideas
around that?

--
With Regards,
Amit Kapila.
EnterpriseDB: http://www.enterprisedb.com

#34John Naylor
jcnaylor@gmail.com
In reply to: Amit Kapila (#33)
Re: WIP: Avoid creation of the free space map for small tables

On 11/19/18, Amit Kapila <amit.kapila16@gmail.com> wrote:

On Mon, Nov 19, 2018 at 7:30 AM John Naylor <jcnaylor@gmail.com> wrote:

Let's say we have to wait to acquire a relation extension lock,
because another backend had already started extending the heap by 1
block. We call GetPageWithFreeSpace() and now the local map looks like

0123
TTA0

By using bitwise OR to set availability, the already-tried blocks
remain as they are. With only 2 states, the map would look like this
instead:

0123
AAAN

In my mind for such a case it should look like below:
0123
NNAN

Okay, to retain that behavior with only 2 status codes, I have
implemented the map as a struct with 2 members: the cached number of
blocks, plus the same array I had before. This also allows a more
efficient implementation at the micro level. I just need to do some
more testing on it.

[ abortive states ]

I think it might come from any other place between when you set it and
before it got cleared (like any intermediate buffer and pin related
API's).

Okay, I will look into that.

One other thing that slightly bothers me is the call to
RelationGetNumberOfBlocks via fsm_allow_writes. It seems that call
will happen quite frequently in this code-path and can have some
performance impact. As of now, I don't have any idea to avoid it or
reduce it more than what you already have in the patch, but I think we
should try some more to avoid it. Let me know if you have any ideas
around that?

FWIW, I believe that the callers of RecordPageWithFreeSpace() will
almost always avoid that call. Otherwise, there is at least one detail
that could use attention: If rel->rd_rel->relpages shows fewer pages
than the threshold, than the code doesn't trust it to be true. Might
be worth revisiting.
Aside from that, I will have to think about it.

More generally, I have a couple ideas about performance:

1. Only mark available every other block such that visible blocks are
interleaved as the relation extends. To explain, this diagram shows a
relation extending, with 1 meaning marked available and 0 meaning
marked not-available.

A
NA
ANA
NANA

So for a 3-block table, we never check block 1. Any free space it has
acquired will become visible when it extends to 4 blocks. For a
4-block threshold, we only check 2 blocks or less. This reduces the
number of lock/pin events but still controls bloat. We could also
check both blocks of a 2-block table.

2. During manual testing I seem to remember times that the FSM code
was invoked even though I expected the smgr entry to have a cached
target block. Perhaps VACUUM or something is clearing that away
unnecessarily. It seems worthwhile to verify and investigate, but that
seems like a separate project.

-John Naylor

#35Amit Kapila
amit.kapila16@gmail.com
In reply to: John Naylor (#34)
Re: WIP: Avoid creation of the free space map for small tables

On Mon, Nov 19, 2018 at 4:40 PM John Naylor <jcnaylor@gmail.com> wrote:

On 11/19/18, Amit Kapila <amit.kapila16@gmail.com> wrote:

On Mon, Nov 19, 2018 at 7:30 AM John Naylor <jcnaylor@gmail.com> wrote:

Let's say we have to wait to acquire a relation extension lock,
because another backend had already started extending the heap by 1
block. We call GetPageWithFreeSpace() and now the local map looks like

0123
TTA0

By using bitwise OR to set availability, the already-tried blocks
remain as they are. With only 2 states, the map would look like this
instead:

0123
AAAN

In my mind for such a case it should look like below:
0123
NNAN

Okay, to retain that behavior with only 2 status codes, I have
implemented the map as a struct with 2 members: the cached number of
blocks, plus the same array I had before. This also allows a more
efficient implementation at the micro level. I just need to do some
more testing on it.

Okay.

[ abortive states ]

I think it might come from any other place between when you set it and
before it got cleared (like any intermediate buffer and pin related
API's).

Okay, I will look into that.

One other thing that slightly bothers me is the call to
RelationGetNumberOfBlocks via fsm_allow_writes. It seems that call
will happen quite frequently in this code-path and can have some
performance impact. As of now, I don't have any idea to avoid it or
reduce it more than what you already have in the patch, but I think we
should try some more to avoid it. Let me know if you have any ideas
around that?

FWIW, I believe that the callers of RecordPageWithFreeSpace() will
almost always avoid that call. Otherwise, there is at least one detail
that could use attention: If rel->rd_rel->relpages shows fewer pages
than the threshold, than the code doesn't trust it to be true. Might
be worth revisiting.

I think it is less of a concern when called from vacuum code path.

Aside from that, I will have to think about it.

More generally, I have a couple ideas about performance:

1. Only mark available every other block such that visible blocks are
interleaved as the relation extends. To explain, this diagram shows a
relation extending, with 1 meaning marked available and 0 meaning
marked not-available.

A
NA
ANA
NANA

So for a 3-block table, we never check block 1. Any free space it has
acquired will become visible when it extends to 4 blocks. For a
4-block threshold, we only check 2 blocks or less. This reduces the
number of lock/pin events but still controls bloat. We could also
check both blocks of a 2-block table.

We can try something like this if we see there is any visible
performance hit in some scenario.

2. During manual testing I seem to remember times that the FSM code
was invoked even though I expected the smgr entry to have a cached
target block. Perhaps VACUUM or something is clearing that away
unnecessarily. It seems worthwhile to verify and investigate, but that
seems like a separate project.

makes sense, let's not get distracted by stuff that is not related to
this patch.

--
With Regards,
Amit Kapila.
EnterpriseDB: http://www.enterprisedb.com

#36John Naylor
jcnaylor@gmail.com
In reply to: John Naylor (#34)
Re: WIP: Avoid creation of the free space map for small tables

I wrote:

On 11/19/18, Amit Kapila <amit.kapila16@gmail.com> wrote:
[ abortive states ]

I think it might come from any other place between when you set it and
before it got cleared (like any intermediate buffer and pin related
API's).

Okay, I will look into that.

LockBuffer(), visibilitymap_pin(), and GetVisibilityMapPins() don't
call errors at this level. I don't immediately see any additional good
places from which to clear the local map.

-John Naylor

#37Amit Kapila
amit.kapila16@gmail.com
In reply to: John Naylor (#36)
Re: WIP: Avoid creation of the free space map for small tables

On Tue, Nov 20, 2018 at 1:42 PM John Naylor <jcnaylor@gmail.com> wrote:

I wrote:

On 11/19/18, Amit Kapila <amit.kapila16@gmail.com> wrote:
[ abortive states ]

I think it might come from any other place between when you set it and
before it got cleared (like any intermediate buffer and pin related
API's).

Okay, I will look into that.

LockBuffer(), visibilitymap_pin(), and GetVisibilityMapPins() don't
call errors at this level. I don't immediately see any additional good
places from which to clear the local map.

LockBuffer()->LWLockAcquire() can error out. Similarly,
ReadBuffer()->ReadBufferExtended() and calls below it can error ou.
To handle them, you need to add a call to clear local map in
Abortransaction code path.

--
With Regards,
Amit Kapila.
EnterpriseDB: http://www.enterprisedb.com

#38John Naylor
jcnaylor@gmail.com
In reply to: Amit Kapila (#31)
3 attachment(s)
Re: WIP: Avoid creation of the free space map for small tables

On 11/16/18, Amit Kapila <amit.kapila16@gmail.com> wrote:

I've attached v8, which includes the 2-state map and addresses the points below:

Some assorted comments:
1.
<para>
-Each heap and index relation, except for hash indexes, has a Free Space
Map
+Each heap relation, unless it is very small, and each index relation,
+except for hash indexes, has a Free Space Map
(FSM) to keep track of available space in the relation. It's stored

It appears that line has ended abruptly.

Revised.

2.
page = BufferGetPage(buffer);
+ targetBlock = BufferGetBlockNumber(buffer);

if (!PageIsNew(page))
elog(ERROR, "page %u of relation \"%s\" should be empty but is not",
- BufferGetBlockNumber(buffer),
+ targetBlock,
RelationGetRelationName(relation));

PageInit(page, BufferGetPageSize(buffer), 0);
@@ -623,7 +641,18 @@ loop:
* current backend to make more insertions or not, which is probably a
* good bet most of the time.  So for now, don't add it to FSM yet.
*/
- RelationSetTargetBlock(relation, BufferGetBlockNumber(buffer));
+ RelationSetTargetBlock(relation, targetBlock);

Is this related to this patch? If not, I suggest let's do it
separately if required.

3.
static int fsm_set_and_search(Relation rel, FSMAddress addr, uint16 slot,
-    uint8 newValue, uint8 minValue);
+ uint8 newValue, uint8 minValue);

This appears to be a spurious change.

2 and 3 are separated into 0001.

4.
@@ -378,24 +386,15 @@ RelationGetBufferForTuple(Relation relation, Size
len,
* target.
*/
targetBlock = GetPageWithFreeSpace(relation, len + saveFreeSpace);
+
+ /*
+ * In case we used an in-memory map of available blocks, reset
+ * it for next use.
+ */
+ if (targetBlock < HEAP_FSM_CREATION_THRESHOLD)
+ ClearLocalMap();

How will you clear the local map during error? I think you need to
clear it in abort path and you can name the function as
FSMClearLocalMap or something like that.

Done. I've put this call last before abort processing.

5.
+/*#define TRACE_TARGETBLOCK */

Debugging leftover, do you want to retain this and related stuff
during the development of patch?

I have kept it aside as a separate patch but not attached it for now.

Also, we don't quite have a consensus on the threshold value, but I
have set it to 4 pages for v8. If this is still considered too
expensive (and basic tests show it shouldn't be), I suspect it'd be
better to interleave the available block numbers as described a couple
days ago than lower the threshold further.

I have looked at zhio.c, and it seems trivial to adapt zheap to this patchset.

-John Naylor

Attachments:

v8-0001-Minor-cosmetic-adjustments-for-consistency.patchtext/x-patch; charset=US-ASCII; name=v8-0001-Minor-cosmetic-adjustments-for-consistency.patchDownload
From d1752858aaaf048fd94461dbd79fe0bb0f262b98 Mon Sep 17 00:00:00 2001
From: John Naylor <jcnaylor@gmail.com>
Date: Fri, 23 Nov 2018 12:55:16 +0700
Subject: [PATCH v8 1/3] Minor cosmetic adjustments for consistency.

---
 src/backend/access/heap/hio.c             | 5 +++--
 src/backend/storage/freespace/freespace.c | 2 +-
 2 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/src/backend/access/heap/hio.c b/src/backend/access/heap/hio.c
index b8b5871559..7f7c9db635 100644
--- a/src/backend/access/heap/hio.c
+++ b/src/backend/access/heap/hio.c
@@ -600,10 +600,11 @@ loop:
 	 * risk wiping out valid data).
 	 */
 	page = BufferGetPage(buffer);
+	targetBlock = BufferGetBlockNumber(buffer);
 
 	if (!PageIsNew(page))
 		elog(ERROR, "page %u of relation \"%s\" should be empty but is not",
-			 BufferGetBlockNumber(buffer),
+			 targetBlock,
 			 RelationGetRelationName(relation));
 
 	PageInit(page, BufferGetPageSize(buffer), 0);
@@ -623,7 +624,7 @@ loop:
 	 * current backend to make more insertions or not, which is probably a
 	 * good bet most of the time.  So for now, don't add it to FSM yet.
 	 */
-	RelationSetTargetBlock(relation, BufferGetBlockNumber(buffer));
+	RelationSetTargetBlock(relation, targetBlock);
 
 	return buffer;
 }
diff --git a/src/backend/storage/freespace/freespace.c b/src/backend/storage/freespace/freespace.c
index 7c4ad1c449..47a991e21d 100644
--- a/src/backend/storage/freespace/freespace.c
+++ b/src/backend/storage/freespace/freespace.c
@@ -106,7 +106,7 @@ static Size fsm_space_cat_to_avail(uint8 cat);
 
 /* workhorse functions for various operations */
 static int fsm_set_and_search(Relation rel, FSMAddress addr, uint16 slot,
-				   uint8 newValue, uint8 minValue);
+				uint8 newValue, uint8 minValue);
 static BlockNumber fsm_search(Relation rel, uint8 min_cat);
 static uint8 fsm_vacuum_page(Relation rel, FSMAddress addr,
 				BlockNumber start, BlockNumber end,
-- 
2.17.1

v8-0002-Avoid-creation-of-the-free-space-map-for-small-ta.patchtext/x-patch; charset=US-ASCII; name=v8-0002-Avoid-creation-of-the-free-space-map-for-small-ta.patchDownload
From e6226e8ee3d51e651b3a0b7035ad6676b4cf4bc6 Mon Sep 17 00:00:00 2001
From: John Naylor <jcnaylor@gmail.com>
Date: Fri, 23 Nov 2018 12:58:07 +0700
Subject: [PATCH v8 2/3] Avoid creation of the free space map for small tables.

The FSM isn't created if the heap has 4 blocks or fewer. If the last
known target block has insufficient space, try every block before extending
the heap.

If a heap with a FSM is truncated back to below the threshold, the FSM
stays around and can be used as usual.
---
 contrib/pageinspect/expected/page.out     |  77 +++----
 contrib/pageinspect/sql/page.sql          |  33 +--
 doc/src/sgml/storage.sgml                 |  13 +-
 src/backend/access/brin/brin.c            |   2 +-
 src/backend/access/brin/brin_pageops.c    |   8 +-
 src/backend/access/heap/hio.c             |  36 ++--
 src/backend/access/transam/xact.c         |   7 +
 src/backend/commands/vacuumlazy.c         |  17 +-
 src/backend/storage/freespace/README      |  11 +-
 src/backend/storage/freespace/freespace.c | 238 +++++++++++++++++++++-
 src/backend/storage/freespace/indexfsm.c  |   4 +-
 src/include/storage/freespace.h           |   6 +-
 12 files changed, 354 insertions(+), 98 deletions(-)

diff --git a/contrib/pageinspect/expected/page.out b/contrib/pageinspect/expected/page.out
index 3fcd9fbe6d..83e5910453 100644
--- a/contrib/pageinspect/expected/page.out
+++ b/contrib/pageinspect/expected/page.out
@@ -1,48 +1,69 @@
 CREATE EXTENSION pageinspect;
-CREATE TABLE test1 (a int, b int);
-INSERT INTO test1 VALUES (16777217, 131584);
-VACUUM test1;  -- set up FSM
+CREATE TABLE test_rel_forks (a int);
+-- Make sure there are enough blocks in the heap for the FSM to be created.
+INSERT INTO test_rel_forks SELECT g from generate_series(1,10000) g;
+-- set up FSM and VM
+VACUUM test_rel_forks;
 -- The page contents can vary, so just test that it can be read
 -- successfully, but don't keep the output.
-SELECT octet_length(get_raw_page('test1', 'main', 0)) AS main_0;
+SELECT octet_length(get_raw_page('test_rel_forks', 'main', 0)) AS main_0;
  main_0 
 --------
    8192
 (1 row)
 
-SELECT octet_length(get_raw_page('test1', 'main', 1)) AS main_1;
-ERROR:  block number 1 is out of range for relation "test1"
-SELECT octet_length(get_raw_page('test1', 'fsm', 0)) AS fsm_0;
+SELECT octet_length(get_raw_page('test_rel_forks', 'main', 100)) AS main_100;
+ERROR:  block number 100 is out of range for relation "test_rel_forks"
+SELECT octet_length(get_raw_page('test_rel_forks', 'fsm', 0)) AS fsm_0;
  fsm_0 
 -------
   8192
 (1 row)
 
-SELECT octet_length(get_raw_page('test1', 'fsm', 1)) AS fsm_1;
- fsm_1 
--------
-  8192
-(1 row)
-
-SELECT octet_length(get_raw_page('test1', 'vm', 0)) AS vm_0;
+SELECT octet_length(get_raw_page('test_rel_forks', 'fsm', 10)) AS fsm_10;
+ERROR:  block number 10 is out of range for relation "test_rel_forks"
+SELECT octet_length(get_raw_page('test_rel_forks', 'vm', 0)) AS vm_0;
  vm_0 
 ------
  8192
 (1 row)
 
-SELECT octet_length(get_raw_page('test1', 'vm', 1)) AS vm_1;
-ERROR:  block number 1 is out of range for relation "test1"
+SELECT octet_length(get_raw_page('test_rel_forks', 'vm', 1)) AS vm_1;
+ERROR:  block number 1 is out of range for relation "test_rel_forks"
 SELECT octet_length(get_raw_page('xxx', 'main', 0));
 ERROR:  relation "xxx" does not exist
-SELECT octet_length(get_raw_page('test1', 'xxx', 0));
+SELECT octet_length(get_raw_page('test_rel_forks', 'xxx', 0));
 ERROR:  invalid fork name
 HINT:  Valid fork names are "main", "fsm", "vm", and "init".
-SELECT get_raw_page('test1', 0) = get_raw_page('test1', 'main', 0);
+SELECT * FROM fsm_page_contents(get_raw_page('test_rel_forks', 'fsm', 0));
+ fsm_page_contents 
+-------------------
+ 0: 192           +
+ 1: 192           +
+ 3: 192           +
+ 7: 192           +
+ 15: 192          +
+ 31: 192          +
+ 63: 192          +
+ 127: 192         +
+ 255: 192         +
+ 511: 192         +
+ 1023: 192        +
+ 2047: 192        +
+ 4095: 192        +
+ fp_next_slot: 0  +
+ 
+(1 row)
+
+SELECT get_raw_page('test_rel_forks', 0) = get_raw_page('test_rel_forks', 'main', 0);
  ?column? 
 ----------
  t
 (1 row)
 
+DROP TABLE test_rel_forks;
+CREATE TABLE test1 (a int, b int);
+INSERT INTO test1 VALUES (16777217, 131584);
 SELECT pagesize, version FROM page_header(get_raw_page('test1', 0));
  pagesize | version 
 ----------+---------
@@ -62,26 +83,6 @@ SELECT tuple_data_split('test1'::regclass, t_data, t_infomask, t_infomask2, t_bi
  {"\\x01000001","\\x00020200"}
 (1 row)
 
-SELECT * FROM fsm_page_contents(get_raw_page('test1', 'fsm', 0));
- fsm_page_contents 
--------------------
- 0: 254           +
- 1: 254           +
- 3: 254           +
- 7: 254           +
- 15: 254          +
- 31: 254          +
- 63: 254          +
- 127: 254         +
- 255: 254         +
- 511: 254         +
- 1023: 254        +
- 2047: 254        +
- 4095: 254        +
- fp_next_slot: 0  +
- 
-(1 row)
-
 DROP TABLE test1;
 -- check that using any of these functions with a partitioned table or index
 -- would fail
diff --git a/contrib/pageinspect/sql/page.sql b/contrib/pageinspect/sql/page.sql
index 8ac9991837..ee811759d5 100644
--- a/contrib/pageinspect/sql/page.sql
+++ b/contrib/pageinspect/sql/page.sql
@@ -1,26 +1,35 @@
 CREATE EXTENSION pageinspect;
 
-CREATE TABLE test1 (a int, b int);
-INSERT INTO test1 VALUES (16777217, 131584);
+CREATE TABLE test_rel_forks (a int);
+-- Make sure there are enough blocks in the heap for the FSM to be created.
+INSERT INTO test_rel_forks SELECT g from generate_series(1,10000) g;
 
-VACUUM test1;  -- set up FSM
+-- set up FSM and VM
+VACUUM test_rel_forks;
 
 -- The page contents can vary, so just test that it can be read
 -- successfully, but don't keep the output.
 
-SELECT octet_length(get_raw_page('test1', 'main', 0)) AS main_0;
-SELECT octet_length(get_raw_page('test1', 'main', 1)) AS main_1;
+SELECT octet_length(get_raw_page('test_rel_forks', 'main', 0)) AS main_0;
+SELECT octet_length(get_raw_page('test_rel_forks', 'main', 100)) AS main_100;
 
-SELECT octet_length(get_raw_page('test1', 'fsm', 0)) AS fsm_0;
-SELECT octet_length(get_raw_page('test1', 'fsm', 1)) AS fsm_1;
+SELECT octet_length(get_raw_page('test_rel_forks', 'fsm', 0)) AS fsm_0;
+SELECT octet_length(get_raw_page('test_rel_forks', 'fsm', 10)) AS fsm_10;
 
-SELECT octet_length(get_raw_page('test1', 'vm', 0)) AS vm_0;
-SELECT octet_length(get_raw_page('test1', 'vm', 1)) AS vm_1;
+SELECT octet_length(get_raw_page('test_rel_forks', 'vm', 0)) AS vm_0;
+SELECT octet_length(get_raw_page('test_rel_forks', 'vm', 1)) AS vm_1;
 
 SELECT octet_length(get_raw_page('xxx', 'main', 0));
-SELECT octet_length(get_raw_page('test1', 'xxx', 0));
+SELECT octet_length(get_raw_page('test_rel_forks', 'xxx', 0));
+
+SELECT * FROM fsm_page_contents(get_raw_page('test_rel_forks', 'fsm', 0));
+
+SELECT get_raw_page('test_rel_forks', 0) = get_raw_page('test_rel_forks', 'main', 0);
 
-SELECT get_raw_page('test1', 0) = get_raw_page('test1', 'main', 0);
+DROP TABLE test_rel_forks;
+
+CREATE TABLE test1 (a int, b int);
+INSERT INTO test1 VALUES (16777217, 131584);
 
 SELECT pagesize, version FROM page_header(get_raw_page('test1', 0));
 
@@ -29,8 +38,6 @@ SELECT page_checksum(get_raw_page('test1', 0), 0) IS NOT NULL AS silly_checksum_
 SELECT tuple_data_split('test1'::regclass, t_data, t_infomask, t_infomask2, t_bits)
     FROM heap_page_items(get_raw_page('test1', 0));
 
-SELECT * FROM fsm_page_contents(get_raw_page('test1', 'fsm', 0));
-
 DROP TABLE test1;
 
 -- check that using any of these functions with a partitioned table or index
diff --git a/doc/src/sgml/storage.sgml b/doc/src/sgml/storage.sgml
index 8ef2ac8010..cbdad0c3fb 100644
--- a/doc/src/sgml/storage.sgml
+++ b/doc/src/sgml/storage.sgml
@@ -590,12 +590,13 @@ tuple would otherwise be too big.
 <indexterm><primary>FSM</primary><see>Free Space Map</see></indexterm>
 
 <para>
-Each heap and index relation, except for hash indexes, has a Free Space Map
-(FSM) to keep track of available space in the relation. It's stored
-alongside the main relation data in a separate relation fork, named after the
-filenode number of the relation, plus a <literal>_fsm</literal> suffix. For example,
-if the filenode of a relation is 12345, the FSM is stored in a file called
-<filename>12345_fsm</filename>, in the same directory as the main relation file.
+Each heap relation, unless it is very small, and each index relation, except
+for hash indexes, has a Free Space Map (FSM) to keep track of available
+space in the relation. It's stored alongside the main relation data in a
+separate relation fork, named after the filenode number of the relation, plus
+a <literal>_fsm</literal> suffix. For example, if the filenode of a relation
+is 12345, the FSM is stored in a file called <filename>12345_fsm</filename>,
+in the same directory as the main relation file.
 </para>
 
 <para>
diff --git a/src/backend/access/brin/brin.c b/src/backend/access/brin/brin.c
index e95fbbcea7..7c5b1af764 100644
--- a/src/backend/access/brin/brin.c
+++ b/src/backend/access/brin/brin.c
@@ -1148,7 +1148,7 @@ terminate_brin_buildstate(BrinBuildState *state)
 		freespace = PageGetFreeSpace(page);
 		blk = BufferGetBlockNumber(state->bs_currentInsertBuf);
 		ReleaseBuffer(state->bs_currentInsertBuf);
-		RecordPageWithFreeSpace(state->bs_irel, blk, freespace);
+		RecordPageWithFreeSpace(state->bs_irel, blk, freespace, InvalidBlockNumber);
 		FreeSpaceMapVacuumRange(state->bs_irel, blk, blk + 1);
 	}
 
diff --git a/src/backend/access/brin/brin_pageops.c b/src/backend/access/brin/brin_pageops.c
index 040cb62e55..70d93878ba 100644
--- a/src/backend/access/brin/brin_pageops.c
+++ b/src/backend/access/brin/brin_pageops.c
@@ -310,7 +310,7 @@ brin_doupdate(Relation idxrel, BlockNumber pagesPerRange,
 
 		if (extended)
 		{
-			RecordPageWithFreeSpace(idxrel, newblk, freespace);
+			RecordPageWithFreeSpace(idxrel, newblk, freespace, InvalidBlockNumber);
 			FreeSpaceMapVacuumRange(idxrel, newblk, newblk + 1);
 		}
 
@@ -461,7 +461,7 @@ brin_doinsert(Relation idxrel, BlockNumber pagesPerRange,
 
 	if (extended)
 	{
-		RecordPageWithFreeSpace(idxrel, blk, freespace);
+		RecordPageWithFreeSpace(idxrel, blk, freespace, InvalidBlockNumber);
 		FreeSpaceMapVacuumRange(idxrel, blk, blk + 1);
 	}
 
@@ -654,7 +654,7 @@ brin_page_cleanup(Relation idxrel, Buffer buf)
 
 	/* Measure free space and record it */
 	RecordPageWithFreeSpace(idxrel, BufferGetBlockNumber(buf),
-							br_page_get_freespace(page));
+							br_page_get_freespace(page), InvalidBlockNumber);
 }
 
 /*
@@ -895,7 +895,7 @@ brin_initialize_empty_new_buffer(Relation idxrel, Buffer buffer)
 	 * pages whose FSM records were forgotten in a crash.
 	 */
 	RecordPageWithFreeSpace(idxrel, BufferGetBlockNumber(buffer),
-							br_page_get_freespace(page));
+							br_page_get_freespace(page), InvalidBlockNumber);
 }
 
 
diff --git a/src/backend/access/heap/hio.c b/src/backend/access/heap/hio.c
index 7f7c9db635..891a596603 100644
--- a/src/backend/access/heap/hio.c
+++ b/src/backend/access/heap/hio.c
@@ -239,8 +239,14 @@ RelationAddExtraBlocks(Relation relation, BulkInsertState bistate)
 		 * Immediately update the bottom level of the FSM.  This has a good
 		 * chance of making this page visible to other concurrently inserting
 		 * backends, and we want that to happen without delay.
+		 *
+		 * Since we know the table will end up with extraBlocks additional
+		 * pages, we pass the final number to avoid possible unnecessary
+		 * system calls and to make sure the FSM is created when we add
+		 * the first new page.
 		 */
-		RecordPageWithFreeSpace(relation, blockNum, freespace);
+		RecordPageWithFreeSpace(relation, blockNum, freespace,
+								firstBlock + extraBlocks);
 	}
 	while (--extraBlocks > 0);
 
@@ -378,19 +384,6 @@ RelationGetBufferForTuple(Relation relation, Size len,
 		 * target.
 		 */
 		targetBlock = GetPageWithFreeSpace(relation, len + saveFreeSpace);
-
-		/*
-		 * If the FSM knows nothing of the rel, try the last page before we
-		 * give up and extend.  This avoids one-tuple-per-page syndrome during
-		 * bootstrapping or in a recently-started system.
-		 */
-		if (targetBlock == InvalidBlockNumber)
-		{
-			BlockNumber nblocks = RelationGetNumberOfBlocks(relation);
-
-			if (nblocks > 0)
-				targetBlock = nblocks - 1;
-		}
 	}
 
 loop:
@@ -484,6 +477,14 @@ loop:
 		{
 			/* use this page as future insert target, too */
 			RelationSetTargetBlock(relation, targetBlock);
+
+			/*
+			 * In case we used an in-memory map of available blocks, reset
+			 * it for next use.
+			 */
+			if (targetBlock < HEAP_FSM_CREATION_THRESHOLD)
+				FSMClearLocalMap();
+
 			return buffer;
 		}
 
@@ -626,5 +627,12 @@ loop:
 	 */
 	RelationSetTargetBlock(relation, targetBlock);
 
+	/*
+	 * In case we used an in-memory map of available blocks, reset
+	 * it for next use.  We do this unconditionally since after relation
+	 * extension we can't reliably skip this based on the targetBlock.
+	 */
+	FSMClearLocalMap();
+
 	return buffer;
 }
diff --git a/src/backend/access/transam/xact.c b/src/backend/access/transam/xact.c
index d967400384..9cf61a2314 100644
--- a/src/backend/access/transam/xact.c
+++ b/src/backend/access/transam/xact.c
@@ -48,6 +48,7 @@
 #include "replication/walsender.h"
 #include "storage/condition_variable.h"
 #include "storage/fd.h"
+#include "storage/freespace.h"
 #include "storage/lmgr.h"
 #include "storage/predicate.h"
 #include "storage/proc.h"
@@ -2554,6 +2555,12 @@ AbortTransaction(void)
 		s->parallelModeLevel = 0;
 	}
 
+	/*
+	 * In case we aborted during RelationGetBufferForTuple(),
+	 * clear the local map of heap pages.
+	 */
+	FSMClearLocalMap();
+
 	/*
 	 * do abort processing
 	 */
diff --git a/src/backend/commands/vacuumlazy.c b/src/backend/commands/vacuumlazy.c
index 8134c52253..d2818dfad4 100644
--- a/src/backend/commands/vacuumlazy.c
+++ b/src/backend/commands/vacuumlazy.c
@@ -154,7 +154,7 @@ static BufferAccessStrategy vac_strategy;
 static void lazy_scan_heap(Relation onerel, int options,
 			   LVRelStats *vacrelstats, Relation *Irel, int nindexes,
 			   bool aggressive);
-static void lazy_vacuum_heap(Relation onerel, LVRelStats *vacrelstats);
+static void lazy_vacuum_heap(Relation onerel, LVRelStats *vacrelstats, BlockNumber nblocks);
 static bool lazy_check_needs_freeze(Buffer buf, bool *hastup);
 static void lazy_vacuum_index(Relation indrel,
 				  IndexBulkDeleteResult **stats,
@@ -759,7 +759,7 @@ lazy_scan_heap(Relation onerel, int options, LVRelStats *vacrelstats,
 			pgstat_progress_update_multi_param(2, hvp_index, hvp_val);
 
 			/* Remove tuples from heap */
-			lazy_vacuum_heap(onerel, vacrelstats);
+			lazy_vacuum_heap(onerel, vacrelstats, nblocks);
 
 			/*
 			 * Forget the now-vacuumed tuples, and press on, but be careful
@@ -897,7 +897,7 @@ lazy_scan_heap(Relation onerel, int options, LVRelStats *vacrelstats,
 			MarkBufferDirty(buf);
 			UnlockReleaseBuffer(buf);
 
-			RecordPageWithFreeSpace(onerel, blkno, freespace);
+			RecordPageWithFreeSpace(onerel, blkno, freespace, nblocks);
 			continue;
 		}
 
@@ -936,7 +936,7 @@ lazy_scan_heap(Relation onerel, int options, LVRelStats *vacrelstats,
 			}
 
 			UnlockReleaseBuffer(buf);
-			RecordPageWithFreeSpace(onerel, blkno, freespace);
+			RecordPageWithFreeSpace(onerel, blkno, freespace, nblocks);
 			continue;
 		}
 
@@ -1333,7 +1333,7 @@ lazy_scan_heap(Relation onerel, int options, LVRelStats *vacrelstats,
 		 * taken if there are no indexes.)
 		 */
 		if (vacrelstats->num_dead_tuples == prev_dead_count)
-			RecordPageWithFreeSpace(onerel, blkno, freespace);
+			RecordPageWithFreeSpace(onerel, blkno, freespace, nblocks);
 	}
 
 	/* report that everything is scanned and vacuumed */
@@ -1395,7 +1395,7 @@ lazy_scan_heap(Relation onerel, int options, LVRelStats *vacrelstats,
 		/* Remove tuples from heap */
 		pgstat_progress_update_param(PROGRESS_VACUUM_PHASE,
 									 PROGRESS_VACUUM_PHASE_VACUUM_HEAP);
-		lazy_vacuum_heap(onerel, vacrelstats);
+		lazy_vacuum_heap(onerel, vacrelstats, nblocks);
 		vacrelstats->num_index_scans++;
 	}
 
@@ -1466,9 +1466,10 @@ lazy_scan_heap(Relation onerel, int options, LVRelStats *vacrelstats,
  * Note: the reason for doing this as a second pass is we cannot remove
  * the tuples until we've removed their index entries, and we want to
  * process index entry removal in batches as large as possible.
+ * Note: nblocks is passed as an optimization for RecordPageWithFreeSpace().
  */
 static void
-lazy_vacuum_heap(Relation onerel, LVRelStats *vacrelstats)
+lazy_vacuum_heap(Relation onerel, LVRelStats *vacrelstats, BlockNumber nblocks)
 {
 	int			tupindex;
 	int			npages;
@@ -1505,7 +1506,7 @@ lazy_vacuum_heap(Relation onerel, LVRelStats *vacrelstats)
 		freespace = PageGetHeapFreeSpace(page);
 
 		UnlockReleaseBuffer(buf);
-		RecordPageWithFreeSpace(onerel, tblk, freespace);
+		RecordPageWithFreeSpace(onerel, tblk, freespace, nblocks);
 		npages++;
 	}
 
diff --git a/src/backend/storage/freespace/README b/src/backend/storage/freespace/README
index e7ff23b76f..abaec871a5 100644
--- a/src/backend/storage/freespace/README
+++ b/src/backend/storage/freespace/README
@@ -5,10 +5,11 @@ Free Space Map
 
 The purpose of the free space map is to quickly locate a page with enough
 free space to hold a tuple to be stored; or to determine that no such page
-exists and the relation must be extended by one page.  As of PostgreSQL 8.4
-each relation has its own, extensible free space map stored in a separate
-"fork" of its relation.  This eliminates the disadvantages of the former
-fixed-size FSM.
+exists and the relation must be extended by one page.  For very small heap
+relations, we simply iterate through all the pages in descending order.
+Otherwise, each relation (except for hash indexes) has its own, extensible
+free space map stored in a separate "fork" of its relation.  This eliminates
+the disadvantages of the fixed-size FSM used in PostgreSQL 8.3 and earlier.
 
 It is important to keep the map small so that it can be searched rapidly.
 Therefore, we don't attempt to record the exact free space on a page.
@@ -192,5 +193,3 @@ TODO
 ----
 
 - fastroot to avoid traversing upper nodes with just 1 child
-- use a different system for tables that fit into one FSM page, with a
-  mechanism to switch to the real thing as it grows.
diff --git a/src/backend/storage/freespace/freespace.c b/src/backend/storage/freespace/freespace.c
index 47a991e21d..c321e90c28 100644
--- a/src/backend/storage/freespace/freespace.c
+++ b/src/backend/storage/freespace/freespace.c
@@ -76,6 +76,14 @@
 #define FSM_ROOT_LEVEL	(FSM_TREE_DEPTH - 1)
 #define FSM_BOTTOM_LEVEL 0
 
+/* Status codes for the local map. */
+
+/* Either already tried, or beyond the end of the relation */
+#define FSM_LOCAL_NOT_AVAIL 0x00
+
+/* Available to try */
+#define FSM_LOCAL_AVAIL		0x01
+
 /*
  * The internal FSM routines work on a logical addressing scheme. Each
  * level of the tree can be thought of as a separately addressable file.
@@ -89,6 +97,15 @@ typedef struct
 /* Address of the root page. */
 static const FSMAddress FSM_ROOT_ADDRESS = {FSM_ROOT_LEVEL, 0};
 
+/* Local map of block numbers for small heaps with no FSM. */
+typedef struct
+{
+	BlockNumber nblocks;
+	char		map[HEAP_FSM_CREATION_THRESHOLD];
+} FSMLocalMap;
+
+static FSMLocalMap fsm_local_map = {0, {FSM_LOCAL_NOT_AVAIL}};
+
 /* functions to navigate the tree */
 static FSMAddress fsm_get_child(FSMAddress parent, uint16 slot);
 static FSMAddress fsm_get_parent(FSMAddress child, uint16 *slot);
@@ -107,10 +124,14 @@ static Size fsm_space_cat_to_avail(uint8 cat);
 /* workhorse functions for various operations */
 static int fsm_set_and_search(Relation rel, FSMAddress addr, uint16 slot,
 				uint8 newValue, uint8 minValue);
+static void fsm_local_set(Relation rel, BlockNumber new_nblocks);
 static BlockNumber fsm_search(Relation rel, uint8 min_cat);
+static BlockNumber fsm_local_search(void);
 static uint8 fsm_vacuum_page(Relation rel, FSMAddress addr,
 				BlockNumber start, BlockNumber end,
 				bool *eof);
+static bool fsm_allow_writes(Relation rel, BlockNumber heapblk,
+				BlockNumber nblocks, BlockNumber *get_nblocks);
 
 
 /******** Public API ********/
@@ -132,8 +153,35 @@ BlockNumber
 GetPageWithFreeSpace(Relation rel, Size spaceNeeded)
 {
 	uint8		min_cat = fsm_space_needed_to_cat(spaceNeeded);
+	BlockNumber target_block,
+				nblocks;
+
+	/* First try the FSM, if it exists. */
+	target_block = fsm_search(rel, min_cat);
+
+	if (target_block == InvalidBlockNumber &&
+		rel->rd_rel->relkind == RELKIND_RELATION)
+	{
+		nblocks = RelationGetNumberOfBlocks(rel);
+
+		if (nblocks > HEAP_FSM_CREATION_THRESHOLD)
+		{
+			/*
+			 * If the FSM knows nothing of the rel, try the last page before
+			 * we give up and extend.  This avoids one-tuple-per-page syndrome
+			 * during bootstrapping or in a recently-started system.
+			 */
+			target_block = nblocks - 1;
+		}
+		else if (nblocks > 0)
+		{
+			/* Create or update local map and get first candidate block. */
+			fsm_local_set(rel, nblocks);
+			target_block = fsm_local_search();
+		}
+	}
 
-	return fsm_search(rel, min_cat);
+	return target_block;
 }
 
 /*
@@ -149,11 +197,38 @@ BlockNumber
 RecordAndGetPageWithFreeSpace(Relation rel, BlockNumber oldPage,
 							  Size oldSpaceAvail, Size spaceNeeded)
 {
-	int			old_cat = fsm_space_avail_to_cat(oldSpaceAvail);
-	int			search_cat = fsm_space_needed_to_cat(spaceNeeded);
+	int			old_cat;
+	int			search_cat;
 	FSMAddress	addr;
 	uint16		slot;
 	int			search_slot;
+	BlockNumber nblocks = InvalidBlockNumber;
+
+	/* First try the local map, if it exists. */
+	if (oldPage < HEAP_FSM_CREATION_THRESHOLD &&
+		fsm_local_map.map[oldPage] == FSM_LOCAL_AVAIL)
+	{
+		Assert(rel->rd_rel->relkind == RELKIND_RELATION);
+
+		fsm_local_map.map[oldPage] = FSM_LOCAL_NOT_AVAIL;
+		return fsm_local_search();
+	}
+
+	if (!fsm_allow_writes(rel, oldPage, InvalidBlockNumber, &nblocks))
+	{
+		/*
+		 * If we have neither a local map nor an FSM, we probably just
+		 * tried the target block in the smgr relation entry and failed,
+		 * so we'll need to create the local map.
+		 */
+		fsm_local_set(rel, nblocks);
+		return fsm_local_search();
+	}
+
+	/* Normal FSM logic follows */
+
+	old_cat = fsm_space_avail_to_cat(oldSpaceAvail);
+	search_cat = fsm_space_needed_to_cat(spaceNeeded);
 
 	/* Get the location of the FSM byte representing the heap block */
 	addr = fsm_get_location(oldPage, &slot);
@@ -178,18 +253,36 @@ RecordAndGetPageWithFreeSpace(Relation rel, BlockNumber oldPage,
  * FreeSpaceMapVacuum call, which updates the upper level pages.
  */
 void
-RecordPageWithFreeSpace(Relation rel, BlockNumber heapBlk, Size spaceAvail)
+RecordPageWithFreeSpace(Relation rel, BlockNumber heapBlk,
+						Size spaceAvail, BlockNumber nblocks)
 {
-	int			new_cat = fsm_space_avail_to_cat(spaceAvail);
+	int			new_cat;
 	FSMAddress	addr;
 	uint16		slot;
+	BlockNumber dummy;
+
+	if (!fsm_allow_writes(rel, heapBlk, nblocks, &dummy))
+		/* Note: We do not have a local map to update, either. */
+		return;
 
 	/* Get the location of the FSM byte representing the heap block */
 	addr = fsm_get_location(heapBlk, &slot);
 
+	new_cat = fsm_space_avail_to_cat(spaceAvail);
 	fsm_set_and_search(rel, addr, slot, new_cat, 0);
 }
 
+/*
+ * Clear the local map.  We must call this when we have found a block with
+ * enough free space, or when we extend the relation.
+ */
+void
+FSMClearLocalMap(void)
+{
+	fsm_local_map.nblocks = 0;
+	memset(&fsm_local_map.map, 0, sizeof(fsm_local_map.map));
+}
+
 /*
  * XLogRecordPageWithFreeSpace - like RecordPageWithFreeSpace, for use in
  *		WAL replay
@@ -204,6 +297,30 @@ XLogRecordPageWithFreeSpace(RelFileNode rnode, BlockNumber heapBlk,
 	BlockNumber blkno;
 	Buffer		buf;
 	Page		page;
+	bool		write_to_fsm;
+
+	/* This is meant to mirror the logic in fsm_allow_writes() */
+	if (heapBlk >= HEAP_FSM_CREATION_THRESHOLD)
+		write_to_fsm = true;
+	else
+	{
+		/* Open the relation at smgr level */
+		SMgrRelation smgr = smgropen(rnode, InvalidBackendId);
+
+		if (smgrexists(smgr, FSM_FORKNUM))
+			write_to_fsm = true;
+		else
+		{
+			BlockNumber heap_nblocks = smgrnblocks(smgr, MAIN_FORKNUM);
+			if (heap_nblocks > HEAP_FSM_CREATION_THRESHOLD)
+				write_to_fsm = true;
+			else
+				write_to_fsm = false;
+		}
+	}
+
+	if (!write_to_fsm)
+		return;
 
 	/* Get the location of the FSM byte representing the heap block */
 	addr = fsm_get_location(heapBlk, &slot);
@@ -904,3 +1021,114 @@ fsm_vacuum_page(Relation rel, FSMAddress addr,
 
 	return max_avail;
 }
+
+/*
+ * For heaps we prevent extension of the FSM unless the number of pages
+ * exceeds HEAP_FSM_CREATION_THRESHOLD.  For tables that don't already have
+ * a FSM, this will save an inode and a few kB of space.
+ *
+ * XXX The API is a little awkward -- if the caller has a valid nblocks,
+ * it can pass it as an optimization to avoid a system call.  If the caller
+ * passes InvalidBlockNumber and receives a false return value, it can
+ * get an up-to-date relation size from get_nblocks.
+ */
+static bool
+fsm_allow_writes(Relation rel, BlockNumber heapblk,
+				 BlockNumber nblocks, BlockNumber *get_nblocks)
+{
+	bool		skip_get_nblocks;
+
+	if (heapblk >= HEAP_FSM_CREATION_THRESHOLD)
+		return true;
+
+	/* Index rels can always create an FSM. */
+	if (rel->rd_rel->relkind != RELKIND_RELATION)
+		return true;
+
+	/*
+	 * If the caller knows nblocks, we can avoid a system call later.
+	 * If it doesn't, maybe we have relpages from a previous VACUUM.
+	 * Since the table may have extended since then, we still have to
+	 * count the pages later if we can't return now.
+	 */
+	if (nblocks != InvalidBlockNumber)
+	{
+		if (nblocks > HEAP_FSM_CREATION_THRESHOLD)
+			return true;
+		else
+			skip_get_nblocks = true;
+	}
+	else
+	{
+		if (rel->rd_rel->relpages != InvalidBlockNumber &&
+			rel->rd_rel->relpages > HEAP_FSM_CREATION_THRESHOLD)
+			return true;
+		else
+			skip_get_nblocks = false;
+	}
+
+	RelationOpenSmgr(rel);
+	if (smgrexists(rel->rd_smgr, FSM_FORKNUM))
+		return true;
+
+	if (skip_get_nblocks)
+		return false;
+
+	/* last resort */
+	*get_nblocks = RelationGetNumberOfBlocks(rel);
+	if (*get_nblocks > HEAP_FSM_CREATION_THRESHOLD)
+		return true;
+	else
+		return false;
+}
+
+/*
+ * Set or update the local map of blocks to try, for when there is no FSM.
+ */
+static void
+fsm_local_set(Relation rel, BlockNumber new_nblocks)
+{
+	BlockNumber blkno,
+				cached_target_block;
+
+	/*
+	 * Mark blocks available starting after the last block number we have
+	 * cached, and ending at the current last block in the relation.
+	 * When we first set the map, this will flag all blocks as available
+	 * to try.  If we reset the map while waiting for a relation
+	 * extension lock, this will only flag new blocks as available,
+	 * if any were created by another backend.
+	 */
+	for (blkno = fsm_local_map.nblocks; blkno < new_nblocks; blkno++)
+		fsm_local_map.map[blkno] = FSM_LOCAL_AVAIL;
+
+	/* Update local cache with new number of blocks. */
+	fsm_local_map.nblocks = new_nblocks;
+
+	/* Set the status of the cached target block to 'unavailable'. */
+	cached_target_block = RelationGetTargetBlock(rel);
+	if (cached_target_block != InvalidBlockNumber &&
+		cached_target_block < HEAP_FSM_CREATION_THRESHOLD)
+		fsm_local_map.map[cached_target_block] = FSM_LOCAL_NOT_AVAIL;
+}
+
+/*
+ * Search the local map for an available block to try, in descending order.
+ *
+ * For use when there is no FSM.
+ */
+static BlockNumber
+fsm_local_search(void)
+{
+	BlockNumber		target_block = fsm_local_map.nblocks;
+
+	do
+	{
+		target_block--;
+		if (fsm_local_map.map[target_block] == FSM_LOCAL_AVAIL)
+			return target_block;
+	}
+	while (target_block > 0);
+
+	return InvalidBlockNumber;
+}
diff --git a/src/backend/storage/freespace/indexfsm.c b/src/backend/storage/freespace/indexfsm.c
index e21047b96f..d8fd29a7eb 100644
--- a/src/backend/storage/freespace/indexfsm.c
+++ b/src/backend/storage/freespace/indexfsm.c
@@ -51,7 +51,7 @@ GetFreeIndexPage(Relation rel)
 void
 RecordFreeIndexPage(Relation rel, BlockNumber freeBlock)
 {
-	RecordPageWithFreeSpace(rel, freeBlock, BLCKSZ - 1);
+	RecordPageWithFreeSpace(rel, freeBlock, BLCKSZ - 1, InvalidBlockNumber);
 }
 
 
@@ -61,7 +61,7 @@ RecordFreeIndexPage(Relation rel, BlockNumber freeBlock)
 void
 RecordUsedIndexPage(Relation rel, BlockNumber usedBlock)
 {
-	RecordPageWithFreeSpace(rel, usedBlock, 0);
+	RecordPageWithFreeSpace(rel, usedBlock, 0, InvalidBlockNumber);
 }
 
 /*
diff --git a/src/include/storage/freespace.h b/src/include/storage/freespace.h
index 726eb30fb8..7235d05a0a 100644
--- a/src/include/storage/freespace.h
+++ b/src/include/storage/freespace.h
@@ -18,6 +18,9 @@
 #include "storage/relfilenode.h"
 #include "utils/relcache.h"
 
+/* Only extend a heap's FSM if the heap has greater than this many blocks */
+#define HEAP_FSM_CREATION_THRESHOLD 4
+
 /* prototypes for public functions in freespace.c */
 extern Size GetRecordedFreeSpace(Relation rel, BlockNumber heapBlk);
 extern BlockNumber GetPageWithFreeSpace(Relation rel, Size spaceNeeded);
@@ -26,7 +29,8 @@ extern BlockNumber RecordAndGetPageWithFreeSpace(Relation rel,
 							  Size oldSpaceAvail,
 							  Size spaceNeeded);
 extern void RecordPageWithFreeSpace(Relation rel, BlockNumber heapBlk,
-						Size spaceAvail);
+						Size spaceAvail, BlockNumber nblocks);
+extern void FSMClearLocalMap(void);
 extern void XLogRecordPageWithFreeSpace(RelFileNode rnode, BlockNumber heapBlk,
 							Size spaceAvail);
 
-- 
2.17.1

v8-0003-During-pg_upgrade-skip-transfer-of-FSMs-if-they.patchtext/x-patch; charset=US-ASCII; name=v8-0003-During-pg_upgrade-skip-transfer-of-FSMs-if-they.patchDownload
From 4f5eb84de614456b57605adceb6852c0201ed82b Mon Sep 17 00:00:00 2001
From: John Naylor <jcnaylor@gmail.com>
Date: Fri, 23 Nov 2018 12:59:40 +0700
Subject: [PATCH v8 3/3] During pg_upgrade, skip transfer of FSMs if they
 wouldn't have been created on the new cluster.

---
 src/bin/pg_upgrade/info.c        | 11 +++++--
 src/bin/pg_upgrade/pg_upgrade.h  |  6 +++-
 src/bin/pg_upgrade/relfilenode.c | 55 +++++++++++++++++++-------------
 3 files changed, 47 insertions(+), 25 deletions(-)

diff --git a/src/bin/pg_upgrade/info.c b/src/bin/pg_upgrade/info.c
index fd0b44c3ce..31a24e0bec 100644
--- a/src/bin/pg_upgrade/info.c
+++ b/src/bin/pg_upgrade/info.c
@@ -200,6 +200,7 @@ create_rel_filename_map(const char *old_data, const char *new_data,
 
 	map->old_db_oid = old_db->db_oid;
 	map->new_db_oid = new_db->db_oid;
+	map->relkind = old_rel->relkind;
 
 	/*
 	 * old_relfilenode might differ from pg_class.oid (and hence
@@ -418,6 +419,7 @@ get_rel_infos(ClusterInfo *cluster, DbInfo *dbinfo)
 	char	   *nspname = NULL;
 	char	   *relname = NULL;
 	char	   *tablespace = NULL;
+	char	   *relkind = NULL;
 	int			i_spclocation,
 				i_nspname,
 				i_relname,
@@ -425,7 +427,8 @@ get_rel_infos(ClusterInfo *cluster, DbInfo *dbinfo)
 				i_indtable,
 				i_toastheap,
 				i_relfilenode,
-				i_reltablespace;
+				i_reltablespace,
+				i_relkind;
 	char		query[QUERY_ALLOC];
 	char	   *last_namespace = NULL,
 			   *last_tablespace = NULL;
@@ -497,7 +500,7 @@ get_rel_infos(ClusterInfo *cluster, DbInfo *dbinfo)
 	 */
 	snprintf(query + strlen(query), sizeof(query) - strlen(query),
 			 "SELECT all_rels.*, n.nspname, c.relname, "
-			 "  c.relfilenode, c.reltablespace, %s "
+			 "  c.relfilenode, c.reltablespace, c.relkind, %s "
 			 "FROM (SELECT * FROM regular_heap "
 			 "      UNION ALL "
 			 "      SELECT * FROM toast_heap "
@@ -529,6 +532,7 @@ get_rel_infos(ClusterInfo *cluster, DbInfo *dbinfo)
 	i_relfilenode = PQfnumber(res, "relfilenode");
 	i_reltablespace = PQfnumber(res, "reltablespace");
 	i_spclocation = PQfnumber(res, "spclocation");
+	i_relkind = PQfnumber(res, "relkind");
 
 	for (relnum = 0; relnum < ntups; relnum++)
 	{
@@ -558,6 +562,9 @@ get_rel_infos(ClusterInfo *cluster, DbInfo *dbinfo)
 		relname = PQgetvalue(res, relnum, i_relname);
 		curr->relname = pg_strdup(relname);
 
+		relkind = PQgetvalue(res, relnum, i_relkind);
+		curr->relkind = relkind[0];
+
 		curr->relfilenode = atooid(PQgetvalue(res, relnum, i_relfilenode));
 		curr->tblsp_alloc = false;
 
diff --git a/src/bin/pg_upgrade/pg_upgrade.h b/src/bin/pg_upgrade/pg_upgrade.h
index 51bd211d46..8eda9c1f4a 100644
--- a/src/bin/pg_upgrade/pg_upgrade.h
+++ b/src/bin/pg_upgrade/pg_upgrade.h
@@ -147,6 +147,7 @@ typedef struct
 	char	   *tablespace;		/* tablespace path; "" for cluster default */
 	bool		nsp_alloc;		/* should nspname be freed? */
 	bool		tblsp_alloc;	/* should tablespace be freed? */
+	char		relkind;		/* relation relkind -- see pg_class.h */
 } RelInfo;
 
 typedef struct
@@ -173,9 +174,12 @@ typedef struct
 	 */
 	Oid			old_relfilenode;
 	Oid			new_relfilenode;
-	/* the rest are used only for logging and error reporting */
+
+	/* These are used only for logging and error reporting. */
 	char	   *nspname;		/* namespaces */
 	char	   *relname;
+
+	char		relkind;		/* relation relkind -- see pg_class.h */
 } FileNameMap;
 
 /*
diff --git a/src/bin/pg_upgrade/relfilenode.c b/src/bin/pg_upgrade/relfilenode.c
index 3b16c92a02..b883d0dd4d 100644
--- a/src/bin/pg_upgrade/relfilenode.c
+++ b/src/bin/pg_upgrade/relfilenode.c
@@ -14,10 +14,11 @@
 #include <sys/stat.h>
 #include "catalog/pg_class_d.h"
 #include "access/transam.h"
+#include "storage/freespace.h"
 
 
 static void transfer_single_new_db(FileNameMap *maps, int size, char *old_tablespace);
-static void transfer_relfile(FileNameMap *map, const char *suffix, bool vm_must_add_frozenbit);
+static Size transfer_relfile(FileNameMap *map, const char *suffix, bool vm_must_add_frozenbit);
 
 
 /*
@@ -144,6 +145,7 @@ transfer_single_new_db(FileNameMap *maps, int size, char *old_tablespace)
 	int			mapnum;
 	bool		vm_crashsafe_match = true;
 	bool		vm_must_add_frozenbit = false;
+	Size		first_seg_size = 0;
 
 	/*
 	 * Do the old and new cluster disagree on the crash-safetiness of the vm
@@ -165,18 +167,22 @@ transfer_single_new_db(FileNameMap *maps, int size, char *old_tablespace)
 		if (old_tablespace == NULL ||
 			strcmp(maps[mapnum].old_tablespace, old_tablespace) == 0)
 		{
-			/* transfer primary file */
-			transfer_relfile(&maps[mapnum], "", vm_must_add_frozenbit);
+			/* Transfer main fork and return size of the first segment. */
+			first_seg_size = transfer_relfile(&maps[mapnum], "", vm_must_add_frozenbit);
 
 			/* fsm/vm files added in PG 8.4 */
 			if (GET_MAJOR_VERSION(old_cluster.major_version) >= 804)
 			{
 				/*
-				 * Copy/link any fsm and vm files, if they exist
+				 * Copy/link any fsm and vm files, if they exist and if they would
+				 * be created in the new cluster.
 				 */
-				transfer_relfile(&maps[mapnum], "_fsm", vm_must_add_frozenbit);
+				if (maps[mapnum].relkind != RELKIND_RELATION ||
+					first_seg_size > HEAP_FSM_CREATION_THRESHOLD * BLCKSZ ||
+					GET_MAJOR_VERSION(new_cluster.major_version) <= 1100)
+					(void) transfer_relfile(&maps[mapnum], "_fsm", vm_must_add_frozenbit);
 				if (vm_crashsafe_match)
-					transfer_relfile(&maps[mapnum], "_vm", vm_must_add_frozenbit);
+					(void) transfer_relfile(&maps[mapnum], "_vm", vm_must_add_frozenbit);
 			}
 		}
 	}
@@ -190,7 +196,7 @@ transfer_single_new_db(FileNameMap *maps, int size, char *old_tablespace)
  * is true, visibility map forks are converted and rewritten, even in link
  * mode.
  */
-static void
+static Size
 transfer_relfile(FileNameMap *map, const char *type_suffix, bool vm_must_add_frozenbit)
 {
 	char		old_file[MAXPGPATH];
@@ -198,6 +204,8 @@ transfer_relfile(FileNameMap *map, const char *type_suffix, bool vm_must_add_fro
 	int			segno;
 	char		extent_suffix[65];
 	struct stat statbuf;
+	int			sret;
+	Size		first_seg_size = 0;
 
 	/*
 	 * Now copy/link any related segments as well. Remember, PG breaks large
@@ -226,26 +234,29 @@ transfer_relfile(FileNameMap *map, const char *type_suffix, bool vm_must_add_fro
 				 type_suffix,
 				 extent_suffix);
 
-		/* Is it an extent, fsm, or vm file? */
-		if (type_suffix[0] != '\0' || segno != 0)
-		{
-			/* Did file open fail? */
-			if (stat(old_file, &statbuf) != 0)
-			{
-				/* File does not exist?  That's OK, just return */
-				if (errno == ENOENT)
-					return;
-				else
-					pg_fatal("error while checking for file existence \"%s.%s\" (\"%s\" to \"%s\"): %s\n",
-							 map->nspname, map->relname, old_file, new_file,
-							 strerror(errno));
-			}
+		sret = stat(old_file, &statbuf);
 
+		/* Save the size of the first segment of the main fork. */
+		if (type_suffix[0] == '\0' && segno == 0)
+			first_seg_size = statbuf.st_size;
+
+		/* The file must be an extent, fsm, or vm. */
+		else if (sret == 0)
+		{
 			/* If file is empty, just return */
 			if (statbuf.st_size == 0)
-				return;
+				return first_seg_size;
 		}
 
+		/* Did file open fail? */
+		else if (errno == ENOENT)
+			/* File does not exist?  That's OK, just return */
+			return first_seg_size;
+		else
+			pg_fatal("error while checking for file existence \"%s.%s\" (\"%s\" to \"%s\"): %s\n",
+					 map->nspname, map->relname, old_file, new_file,
+					 strerror(errno));
+
 		unlink(new_file);
 
 		/* Copying files might take some time, so give feedback. */
-- 
2.17.1

#39Amit Kapila
amit.kapila16@gmail.com
In reply to: John Naylor (#38)
Re: WIP: Avoid creation of the free space map for small tables

On Fri, Nov 23, 2018 at 11:56 AM John Naylor <jcnaylor@gmail.com> wrote:

On 11/16/18, Amit Kapila <amit.kapila16@gmail.com> wrote:

3.
static int fsm_set_and_search(Relation rel, FSMAddress addr, uint16 slot,
-    uint8 newValue, uint8 minValue);
+ uint8 newValue, uint8 minValue);

This appears to be a spurious change.

2 and 3 are separated into 0001.

Is the point 3 change related to pgindent? I think even if you want
these, then don't prepare other patches on top of this, keep it
entirely separate.

Also, we don't quite have a consensus on the threshold value, but I
have set it to 4 pages for v8. If this is still considered too
expensive (and basic tests show it shouldn't be), I suspect it'd be
better to interleave the available block numbers as described a couple
days ago than lower the threshold further.

Can you please repeat the copy test you have done above with
fillfactor as 20 and 30?

I have looked at zhio.c, and it seems trivial to adapt zheap to this patchset.

Cool, I also think so.

Few more comments:
-------------------------------
1. I think we can add some test(s) to test the new functionality, may
be something on the lines of what Robert has originally provided as an
example of this behavior [1]/messages/by-id/CA+Tgmoac+6qTNp2U+wedY8-PU6kK_b6hbdhR5xYGBG3GtdFcww@mail.gmail.com.

2.
@@ -2554,6 +2555,12 @@ AbortTransaction(void)
s->parallelModeLevel = 0;
}

+ /*
+ * In case we aborted during RelationGetBufferForTuple(),
+ * clear the local map of heap pages.
+ */
+ FSMClearLocalMap();
+

The similar call is required in AbortSubTransaction function as well.
I suggest to add it after pgstat_progress_end_command in both
functions.

3.
GetPageWithFreeSpace(Relation rel, Size spaceNeeded)
{
..
+ if (target_block == InvalidBlockNumber &&
+ rel->rd_rel->relkind == RELKIND_RELATION)
+ {
+ nblocks = RelationGetNumberOfBlocks(rel);
+
+ if (nblocks > HEAP_FSM_CREATION_THRESHOLD)
+ {
+ /*
+ * If the FSM knows nothing of the rel, try the last page before
+ * we give up and extend.  This avoids one-tuple-per-page syndrome
+ * during bootstrapping or in a recently-started system.
+ */
+ target_block = nblocks - 1;
+ }
..
}

Moving this check inside GetPageWithFreeSpace has one disadvantage, we
will always consider last block which can have some inadvertent
effects. Consider when this function gets called from
RelationGetBufferForTuple just before extension, it can consider to
check for the last block even though that is already being done in the
begining when GetPageWithFreeSpace was called. I am not completely
sure how much this is a case to worry because it will help to check
last block when the same is concurrently added and FSM is not updated
for same. I am slightly worried because the unpatched code doesn't
care for such case and we have no intention to change this behaviour.
What do you think?

4. You have mentioned above that "system catalogs created during
bootstrap still have a FSM if they have any data." and I can also see
this behavior, have you investigated this point further?

5. Your logic to update FSM on standby seems okay, but can you show
some tests which proves its sanity?

[1]: /messages/by-id/CA+Tgmoac+6qTNp2U+wedY8-PU6kK_b6hbdhR5xYGBG3GtdFcww@mail.gmail.com

--
With Regards,
Amit Kapila.
EnterpriseDB: http://www.enterprisedb.com

#40John Naylor
jcnaylor@gmail.com
In reply to: Amit Kapila (#39)
Re: WIP: Avoid creation of the free space map for small tables

On 11/24/18, Amit Kapila <amit.kapila16@gmail.com> wrote:

On Fri, Nov 23, 2018 at 11:56 AM John Naylor <jcnaylor@gmail.com> wrote:

On 11/16/18, Amit Kapila <amit.kapila16@gmail.com> wrote:

3.
static int fsm_set_and_search(Relation rel, FSMAddress addr, uint16
slot,
- uint8 newValue, uint8 minValue);
+ uint8 newValue, uint8 minValue);

This appears to be a spurious change.

2 and 3 are separated into 0001.

Is the point 3 change related to pgindent? I think even if you want
these, then don't prepare other patches on top of this, keep it
entirely separate.

There are some places in the codebase that have spaces after tabs for
no apparent reason (not to line up function parameters or pointer
declarations). pgindent hasn't been able to fix this. If you wish, you
are of course free to apply 0001 separately at any time.

Also, we don't quite have a consensus on the threshold value, but I
have set it to 4 pages for v8. If this is still considered too
expensive (and basic tests show it shouldn't be), I suspect it'd be
better to interleave the available block numbers as described a couple
days ago than lower the threshold further.

Can you please repeat the copy test you have done above with
fillfactor as 20 and 30?

I did two kinds of tests. The first had a fill-factor of 10 [1]/messages/by-id/CAJVSVGWCRMyi8sSqguf6PfFcpM3hwNY5YhPZTt-8Q3ZGv0UGYw@mail.gmail.com, the
second had the default storage, but I prevented the backend from
caching the target block [2]/messages/by-id/CAJVSVGWMXzsqYpPhO3Snz4n5y8Tq-QiviuSCKyB5czCTnq9rzA@mail.gmail.com, to fully exercise the free space code.
Would you like me to repeat the first one with 20 and 30? And do you
think it is useful enough to test the copying of 4 blocks and not
smaller numbers?

Few more comments:
-------------------------------
1. I think we can add some test(s) to test the new functionality, may
be something on the lines of what Robert has originally provided as an
example of this behavior [1].

Maybe the SQL script attached to [3]/messages/by-id/CAJVSVGWvB13PzpbLEecFuGFc5V2fsO736BsdTakPiPAcdMM5tQ@mail.gmail.com (which I probably based on
Robert's report) can be cleaned up into a regression test.

3.
GetPageWithFreeSpace(Relation rel, Size spaceNeeded)
{
..
+ if (target_block == InvalidBlockNumber &&
+ rel->rd_rel->relkind == RELKIND_RELATION)
+ {
+ nblocks = RelationGetNumberOfBlocks(rel);
+
+ if (nblocks > HEAP_FSM_CREATION_THRESHOLD)
+ {
+ /*
+ * If the FSM knows nothing of the rel, try the last page before
+ * we give up and extend.  This avoids one-tuple-per-page syndrome
+ * during bootstrapping or in a recently-started system.
+ */
+ target_block = nblocks - 1;
+ }
..
}

Moving this check inside GetPageWithFreeSpace has one disadvantage, we
will always consider last block which can have some inadvertent
effects. Consider when this function gets called from
RelationGetBufferForTuple just before extension, it can consider to
check for the last block even though that is already being done in the
begining when GetPageWithFreeSpace was called. I am not completely
sure how much this is a case to worry because it will help to check
last block when the same is concurrently added and FSM is not updated
for same. I am slightly worried because the unpatched code doesn't
care for such case and we have no intention to change this behaviour.
What do you think?

I see what you mean. If the other backend extended by 1 block, the
intention is to keep it out of the FSM at first, and by extension, not
visible in other ways. The comment implies that's debatable, but I
agree we shouldn't change that without a reason to. One simple idea is
add a 3rd boolean parameter to GetPageWithFreeSpace() to control
whether it gives up if the FSM fork doesn't indicate free space, like

if (target_block == InvalidBlockNumber &&
rel->rd_rel->relkind == RELKIND_RELATION &&
!check_fsm_only)
{
nblocks = RelationGetNumberOfBlocks(rel);

4. You have mentioned above that "system catalogs created during
bootstrap still have a FSM if they have any data." and I can also see
this behavior, have you investigated this point further?

Code reading didn't uncover the cause. I might have to step through
with a debugger or something similar. I should find time for that next
month.

5. Your logic to update FSM on standby seems okay, but can you show
some tests which proves its sanity?

I believe to convince myself it was working, I used the individual
commands in the sql file in [3]/messages/by-id/CAJVSVGWvB13PzpbLEecFuGFc5V2fsO736BsdTakPiPAcdMM5tQ@mail.gmail.com, then used the size function on the
secondary. I'll redo that to verify.

--
[1]: /messages/by-id/CAJVSVGWCRMyi8sSqguf6PfFcpM3hwNY5YhPZTt-8Q3ZGv0UGYw@mail.gmail.com
[2]: /messages/by-id/CAJVSVGWMXzsqYpPhO3Snz4n5y8Tq-QiviuSCKyB5czCTnq9rzA@mail.gmail.com
[3]: /messages/by-id/CAJVSVGWvB13PzpbLEecFuGFc5V2fsO736BsdTakPiPAcdMM5tQ@mail.gmail.com

-John Naylor

#41Amit Kapila
amit.kapila16@gmail.com
In reply to: John Naylor (#40)
Re: WIP: Avoid creation of the free space map for small tables

On Mon, Nov 26, 2018 at 3:46 PM John Naylor <jcnaylor@gmail.com> wrote:

On 11/24/18, Amit Kapila <amit.kapila16@gmail.com> wrote:

On Fri, Nov 23, 2018 at 11:56 AM John Naylor <jcnaylor@gmail.com> wrote:

On 11/16/18, Amit Kapila <amit.kapila16@gmail.com> wrote:

3.
static int fsm_set_and_search(Relation rel, FSMAddress addr, uint16
slot,
- uint8 newValue, uint8 minValue);
+ uint8 newValue, uint8 minValue);

This appears to be a spurious change.

2 and 3 are separated into 0001.

Is the point 3 change related to pgindent? I think even if you want
these, then don't prepare other patches on top of this, keep it
entirely separate.

There are some places in the codebase that have spaces after tabs for
no apparent reason (not to line up function parameters or pointer
declarations). pgindent hasn't been able to fix this. If you wish, you
are of course free to apply 0001 separately at any time.

I am not sure that I am interested in generally changing the parts of
code that are not directly related to this patch, feel free to post
them separately.

Also, we don't quite have a consensus on the threshold value, but I
have set it to 4 pages for v8. If this is still considered too
expensive (and basic tests show it shouldn't be), I suspect it'd be
better to interleave the available block numbers as described a couple
days ago than lower the threshold further.

Can you please repeat the copy test you have done above with
fillfactor as 20 and 30?

I did two kinds of tests. The first had a fill-factor of 10 [1], the
second had the default storage, but I prevented the backend from
caching the target block [2], to fully exercise the free space code.
Would you like me to repeat the first one with 20 and 30?

Yes.

And do you
think it is useful enough to test the copying of 4 blocks and not
smaller numbers?

You can try that, but I am mainly interested with 4 as threshold or
may be higher to see where we start loosing. I think 4 should be a
reasonable default for this patch, if later anyone wants to extend, we
might want to provide a table level knob.

Few more comments:
-------------------------------
1. I think we can add some test(s) to test the new functionality, may
be something on the lines of what Robert has originally provided as an
example of this behavior [1].

Maybe the SQL script attached to [3] (which I probably based on
Robert's report) can be cleaned up into a regression test.

Yeah, something on those lines works for me.

3.
GetPageWithFreeSpace(Relation rel, Size spaceNeeded)
{
..
+ if (target_block == InvalidBlockNumber &&
+ rel->rd_rel->relkind == RELKIND_RELATION)
+ {
+ nblocks = RelationGetNumberOfBlocks(rel);
+
+ if (nblocks > HEAP_FSM_CREATION_THRESHOLD)
+ {
+ /*
+ * If the FSM knows nothing of the rel, try the last page before
+ * we give up and extend.  This avoids one-tuple-per-page syndrome
+ * during bootstrapping or in a recently-started system.
+ */
+ target_block = nblocks - 1;
+ }
..
}

Moving this check inside GetPageWithFreeSpace has one disadvantage, we
will always consider last block which can have some inadvertent
effects. Consider when this function gets called from
RelationGetBufferForTuple just before extension, it can consider to
check for the last block even though that is already being done in the
begining when GetPageWithFreeSpace was called. I am not completely
sure how much this is a case to worry because it will help to check
last block when the same is concurrently added and FSM is not updated
for same. I am slightly worried because the unpatched code doesn't
care for such case and we have no intention to change this behaviour.
What do you think?

I see what you mean. If the other backend extended by 1 block, the
intention is to keep it out of the FSM at first, and by extension, not
visible in other ways. The comment implies that's debatable, but I
agree we shouldn't change that without a reason to. One simple idea is
add a 3rd boolean parameter to GetPageWithFreeSpace() to control
whether it gives up if the FSM fork doesn't indicate free space, like

if (target_block == InvalidBlockNumber &&
rel->rd_rel->relkind == RELKIND_RELATION &&
!check_fsm_only)
{
nblocks = RelationGetNumberOfBlocks(rel);

I have the exact fix in my mind, so let's do it that way.

4. You have mentioned above that "system catalogs created during
bootstrap still have a FSM if they have any data." and I can also see
this behavior, have you investigated this point further?

Code reading didn't uncover the cause. I might have to step through
with a debugger or something similar. I should find time for that next
month.

Okay.

5. Your logic to update FSM on standby seems okay, but can you show
some tests which proves its sanity?

I believe to convince myself it was working, I used the individual
commands in the sql file in [3], then used the size function on the
secondary. I'll redo that to verify.

Okay.

--
With Regards,
Amit Kapila.
EnterpriseDB: http://www.enterprisedb.com

#42John Naylor
jcnaylor@gmail.com
In reply to: Amit Kapila (#41)
2 attachment(s)
Re: WIP: Avoid creation of the free space map for small tables

Is the point 3 change related to pgindent? I think even if you want
these, then don't prepare other patches on top of this, keep it
entirely separate.

Both removed.

Also, we don't quite have a consensus on the threshold value, but I
have set it to 4 pages for v8. If this is still considered too
expensive (and basic tests show it shouldn't be), I suspect it'd be
better to interleave the available block numbers as described a couple
days ago than lower the threshold further.

Can you please repeat the copy test you have done above with
fillfactor as 20 and 30?

I will send the results in a separate email soon.

Few more comments:
-------------------------------
1. I think we can add some test(s) to test the new functionality, may
be something on the lines of what Robert has originally provided as an
example of this behavior [1].

Done. I tried adding it to several schedules, but for some reason
vacuuming an empty table failed to truncate the heap to 0 blocks.
Putting the test in its own group fixed the problem, but that doesn't
seem ideal.

2.
The similar call is required in AbortSubTransaction function as well.
I suggest to add it after pgstat_progress_end_command in both
functions.

Done.

3.

agree we shouldn't change that without a reason to. One simple idea is
add a 3rd boolean parameter to GetPageWithFreeSpace() to control
whether it gives up if the FSM fork doesn't indicate free space, like

I have the exact fix in my mind, so let's do it that way.

Done. This also reverts comments and variable names that referred to
updating the local map after relation extension.

While at it, I changed a couple conditionals to check the locally
cached nblocks rather than the threshold. No functional change, but
looks more precise. Might save a few cycles as well.

5. Your logic to update FSM on standby seems okay, but can you show
some tests which proves its sanity?

I believe to convince myself it was working, I used the individual
commands in the sql file in [3], then used the size function on the
secondary. I'll redo that to verify.

I've verified the standby behaves precisely as the primary, as far as
the aforementioned script goes.

-John Naylor

Attachments:

v9-0002-During-pg_upgrade-skip-transfer-of-FSMs-if-they-w.patchtext/x-patch; charset=US-ASCII; name=v9-0002-During-pg_upgrade-skip-transfer-of-FSMs-if-they-w.patchDownload
From 5f19e5a41c40e67ef9ea7f9f883041c441999962 Mon Sep 17 00:00:00 2001
From: John Naylor <jcnaylor@gmail.com>
Date: Thu, 29 Nov 2018 16:32:11 +0700
Subject: [PATCH v9 2/2] During pg_upgrade, skip transfer of FSMs if they
 wouldn't have been created on the new cluster.

---
 src/bin/pg_upgrade/info.c        | 11 +++++--
 src/bin/pg_upgrade/pg_upgrade.h  |  6 +++-
 src/bin/pg_upgrade/relfilenode.c | 55 +++++++++++++++++++-------------
 3 files changed, 47 insertions(+), 25 deletions(-)

diff --git a/src/bin/pg_upgrade/info.c b/src/bin/pg_upgrade/info.c
index fd0b44c3ce..31a24e0bec 100644
--- a/src/bin/pg_upgrade/info.c
+++ b/src/bin/pg_upgrade/info.c
@@ -200,6 +200,7 @@ create_rel_filename_map(const char *old_data, const char *new_data,
 
 	map->old_db_oid = old_db->db_oid;
 	map->new_db_oid = new_db->db_oid;
+	map->relkind = old_rel->relkind;
 
 	/*
 	 * old_relfilenode might differ from pg_class.oid (and hence
@@ -418,6 +419,7 @@ get_rel_infos(ClusterInfo *cluster, DbInfo *dbinfo)
 	char	   *nspname = NULL;
 	char	   *relname = NULL;
 	char	   *tablespace = NULL;
+	char	   *relkind = NULL;
 	int			i_spclocation,
 				i_nspname,
 				i_relname,
@@ -425,7 +427,8 @@ get_rel_infos(ClusterInfo *cluster, DbInfo *dbinfo)
 				i_indtable,
 				i_toastheap,
 				i_relfilenode,
-				i_reltablespace;
+				i_reltablespace,
+				i_relkind;
 	char		query[QUERY_ALLOC];
 	char	   *last_namespace = NULL,
 			   *last_tablespace = NULL;
@@ -497,7 +500,7 @@ get_rel_infos(ClusterInfo *cluster, DbInfo *dbinfo)
 	 */
 	snprintf(query + strlen(query), sizeof(query) - strlen(query),
 			 "SELECT all_rels.*, n.nspname, c.relname, "
-			 "  c.relfilenode, c.reltablespace, %s "
+			 "  c.relfilenode, c.reltablespace, c.relkind, %s "
 			 "FROM (SELECT * FROM regular_heap "
 			 "      UNION ALL "
 			 "      SELECT * FROM toast_heap "
@@ -529,6 +532,7 @@ get_rel_infos(ClusterInfo *cluster, DbInfo *dbinfo)
 	i_relfilenode = PQfnumber(res, "relfilenode");
 	i_reltablespace = PQfnumber(res, "reltablespace");
 	i_spclocation = PQfnumber(res, "spclocation");
+	i_relkind = PQfnumber(res, "relkind");
 
 	for (relnum = 0; relnum < ntups; relnum++)
 	{
@@ -558,6 +562,9 @@ get_rel_infos(ClusterInfo *cluster, DbInfo *dbinfo)
 		relname = PQgetvalue(res, relnum, i_relname);
 		curr->relname = pg_strdup(relname);
 
+		relkind = PQgetvalue(res, relnum, i_relkind);
+		curr->relkind = relkind[0];
+
 		curr->relfilenode = atooid(PQgetvalue(res, relnum, i_relfilenode));
 		curr->tblsp_alloc = false;
 
diff --git a/src/bin/pg_upgrade/pg_upgrade.h b/src/bin/pg_upgrade/pg_upgrade.h
index 51bd211d46..8eda9c1f4a 100644
--- a/src/bin/pg_upgrade/pg_upgrade.h
+++ b/src/bin/pg_upgrade/pg_upgrade.h
@@ -147,6 +147,7 @@ typedef struct
 	char	   *tablespace;		/* tablespace path; "" for cluster default */
 	bool		nsp_alloc;		/* should nspname be freed? */
 	bool		tblsp_alloc;	/* should tablespace be freed? */
+	char		relkind;		/* relation relkind -- see pg_class.h */
 } RelInfo;
 
 typedef struct
@@ -173,9 +174,12 @@ typedef struct
 	 */
 	Oid			old_relfilenode;
 	Oid			new_relfilenode;
-	/* the rest are used only for logging and error reporting */
+
+	/* These are used only for logging and error reporting. */
 	char	   *nspname;		/* namespaces */
 	char	   *relname;
+
+	char		relkind;		/* relation relkind -- see pg_class.h */
 } FileNameMap;
 
 /*
diff --git a/src/bin/pg_upgrade/relfilenode.c b/src/bin/pg_upgrade/relfilenode.c
index 3b16c92a02..b883d0dd4d 100644
--- a/src/bin/pg_upgrade/relfilenode.c
+++ b/src/bin/pg_upgrade/relfilenode.c
@@ -14,10 +14,11 @@
 #include <sys/stat.h>
 #include "catalog/pg_class_d.h"
 #include "access/transam.h"
+#include "storage/freespace.h"
 
 
 static void transfer_single_new_db(FileNameMap *maps, int size, char *old_tablespace);
-static void transfer_relfile(FileNameMap *map, const char *suffix, bool vm_must_add_frozenbit);
+static Size transfer_relfile(FileNameMap *map, const char *suffix, bool vm_must_add_frozenbit);
 
 
 /*
@@ -144,6 +145,7 @@ transfer_single_new_db(FileNameMap *maps, int size, char *old_tablespace)
 	int			mapnum;
 	bool		vm_crashsafe_match = true;
 	bool		vm_must_add_frozenbit = false;
+	Size		first_seg_size = 0;
 
 	/*
 	 * Do the old and new cluster disagree on the crash-safetiness of the vm
@@ -165,18 +167,22 @@ transfer_single_new_db(FileNameMap *maps, int size, char *old_tablespace)
 		if (old_tablespace == NULL ||
 			strcmp(maps[mapnum].old_tablespace, old_tablespace) == 0)
 		{
-			/* transfer primary file */
-			transfer_relfile(&maps[mapnum], "", vm_must_add_frozenbit);
+			/* Transfer main fork and return size of the first segment. */
+			first_seg_size = transfer_relfile(&maps[mapnum], "", vm_must_add_frozenbit);
 
 			/* fsm/vm files added in PG 8.4 */
 			if (GET_MAJOR_VERSION(old_cluster.major_version) >= 804)
 			{
 				/*
-				 * Copy/link any fsm and vm files, if they exist
+				 * Copy/link any fsm and vm files, if they exist and if they would
+				 * be created in the new cluster.
 				 */
-				transfer_relfile(&maps[mapnum], "_fsm", vm_must_add_frozenbit);
+				if (maps[mapnum].relkind != RELKIND_RELATION ||
+					first_seg_size > HEAP_FSM_CREATION_THRESHOLD * BLCKSZ ||
+					GET_MAJOR_VERSION(new_cluster.major_version) <= 1100)
+					(void) transfer_relfile(&maps[mapnum], "_fsm", vm_must_add_frozenbit);
 				if (vm_crashsafe_match)
-					transfer_relfile(&maps[mapnum], "_vm", vm_must_add_frozenbit);
+					(void) transfer_relfile(&maps[mapnum], "_vm", vm_must_add_frozenbit);
 			}
 		}
 	}
@@ -190,7 +196,7 @@ transfer_single_new_db(FileNameMap *maps, int size, char *old_tablespace)
  * is true, visibility map forks are converted and rewritten, even in link
  * mode.
  */
-static void
+static Size
 transfer_relfile(FileNameMap *map, const char *type_suffix, bool vm_must_add_frozenbit)
 {
 	char		old_file[MAXPGPATH];
@@ -198,6 +204,8 @@ transfer_relfile(FileNameMap *map, const char *type_suffix, bool vm_must_add_fro
 	int			segno;
 	char		extent_suffix[65];
 	struct stat statbuf;
+	int			sret;
+	Size		first_seg_size = 0;
 
 	/*
 	 * Now copy/link any related segments as well. Remember, PG breaks large
@@ -226,26 +234,29 @@ transfer_relfile(FileNameMap *map, const char *type_suffix, bool vm_must_add_fro
 				 type_suffix,
 				 extent_suffix);
 
-		/* Is it an extent, fsm, or vm file? */
-		if (type_suffix[0] != '\0' || segno != 0)
-		{
-			/* Did file open fail? */
-			if (stat(old_file, &statbuf) != 0)
-			{
-				/* File does not exist?  That's OK, just return */
-				if (errno == ENOENT)
-					return;
-				else
-					pg_fatal("error while checking for file existence \"%s.%s\" (\"%s\" to \"%s\"): %s\n",
-							 map->nspname, map->relname, old_file, new_file,
-							 strerror(errno));
-			}
+		sret = stat(old_file, &statbuf);
 
+		/* Save the size of the first segment of the main fork. */
+		if (type_suffix[0] == '\0' && segno == 0)
+			first_seg_size = statbuf.st_size;
+
+		/* The file must be an extent, fsm, or vm. */
+		else if (sret == 0)
+		{
 			/* If file is empty, just return */
 			if (statbuf.st_size == 0)
-				return;
+				return first_seg_size;
 		}
 
+		/* Did file open fail? */
+		else if (errno == ENOENT)
+			/* File does not exist?  That's OK, just return */
+			return first_seg_size;
+		else
+			pg_fatal("error while checking for file existence \"%s.%s\" (\"%s\" to \"%s\"): %s\n",
+					 map->nspname, map->relname, old_file, new_file,
+					 strerror(errno));
+
 		unlink(new_file);
 
 		/* Copying files might take some time, so give feedback. */
-- 
2.17.1

v9-0001-Avoid-creation-of-the-free-space-map-for-small-ta.patchtext/x-patch; charset=US-ASCII; name=v9-0001-Avoid-creation-of-the-free-space-map-for-small-ta.patchDownload
From c4bef3bf790745638d42e5eb6b303b85a9a828c4 Mon Sep 17 00:00:00 2001
From: John Naylor <jcnaylor@gmail.com>
Date: Thu, 29 Nov 2018 16:31:41 +0700
Subject: [PATCH v9 1/2] Avoid creation of the free space map for small tables.

The FSM isn't created if the heap has 4 blocks or fewer. If the last
known target block has insufficient space, try every block before extending
the heap.

If a heap with a FSM is truncated back to below the threshold, the FSM
stays around and can be used as usual.
---
 contrib/pageinspect/expected/page.out     |  77 +++----
 contrib/pageinspect/sql/page.sql          |  33 +--
 doc/src/sgml/storage.sgml                 |  13 +-
 src/backend/access/brin/brin.c            |   2 +-
 src/backend/access/brin/brin_pageops.c    |  10 +-
 src/backend/access/heap/hio.c             |  47 +++--
 src/backend/access/transam/xact.c         |  14 ++
 src/backend/commands/vacuumlazy.c         |  17 +-
 src/backend/storage/freespace/README      |  11 +-
 src/backend/storage/freespace/freespace.c | 233 +++++++++++++++++++++-
 src/backend/storage/freespace/indexfsm.c  |   6 +-
 src/include/storage/freespace.h           |   9 +-
 src/test/regress/expected/fsm.out         |  55 +++++
 src/test/regress/parallel_schedule        |   5 +
 src/test/regress/sql/fsm.sql              |  37 ++++
 15 files changed, 464 insertions(+), 105 deletions(-)
 create mode 100644 src/test/regress/expected/fsm.out
 create mode 100644 src/test/regress/sql/fsm.sql

diff --git a/contrib/pageinspect/expected/page.out b/contrib/pageinspect/expected/page.out
index 3fcd9fbe6d..83e5910453 100644
--- a/contrib/pageinspect/expected/page.out
+++ b/contrib/pageinspect/expected/page.out
@@ -1,48 +1,69 @@
 CREATE EXTENSION pageinspect;
-CREATE TABLE test1 (a int, b int);
-INSERT INTO test1 VALUES (16777217, 131584);
-VACUUM test1;  -- set up FSM
+CREATE TABLE test_rel_forks (a int);
+-- Make sure there are enough blocks in the heap for the FSM to be created.
+INSERT INTO test_rel_forks SELECT g from generate_series(1,10000) g;
+-- set up FSM and VM
+VACUUM test_rel_forks;
 -- The page contents can vary, so just test that it can be read
 -- successfully, but don't keep the output.
-SELECT octet_length(get_raw_page('test1', 'main', 0)) AS main_0;
+SELECT octet_length(get_raw_page('test_rel_forks', 'main', 0)) AS main_0;
  main_0 
 --------
    8192
 (1 row)
 
-SELECT octet_length(get_raw_page('test1', 'main', 1)) AS main_1;
-ERROR:  block number 1 is out of range for relation "test1"
-SELECT octet_length(get_raw_page('test1', 'fsm', 0)) AS fsm_0;
+SELECT octet_length(get_raw_page('test_rel_forks', 'main', 100)) AS main_100;
+ERROR:  block number 100 is out of range for relation "test_rel_forks"
+SELECT octet_length(get_raw_page('test_rel_forks', 'fsm', 0)) AS fsm_0;
  fsm_0 
 -------
   8192
 (1 row)
 
-SELECT octet_length(get_raw_page('test1', 'fsm', 1)) AS fsm_1;
- fsm_1 
--------
-  8192
-(1 row)
-
-SELECT octet_length(get_raw_page('test1', 'vm', 0)) AS vm_0;
+SELECT octet_length(get_raw_page('test_rel_forks', 'fsm', 10)) AS fsm_10;
+ERROR:  block number 10 is out of range for relation "test_rel_forks"
+SELECT octet_length(get_raw_page('test_rel_forks', 'vm', 0)) AS vm_0;
  vm_0 
 ------
  8192
 (1 row)
 
-SELECT octet_length(get_raw_page('test1', 'vm', 1)) AS vm_1;
-ERROR:  block number 1 is out of range for relation "test1"
+SELECT octet_length(get_raw_page('test_rel_forks', 'vm', 1)) AS vm_1;
+ERROR:  block number 1 is out of range for relation "test_rel_forks"
 SELECT octet_length(get_raw_page('xxx', 'main', 0));
 ERROR:  relation "xxx" does not exist
-SELECT octet_length(get_raw_page('test1', 'xxx', 0));
+SELECT octet_length(get_raw_page('test_rel_forks', 'xxx', 0));
 ERROR:  invalid fork name
 HINT:  Valid fork names are "main", "fsm", "vm", and "init".
-SELECT get_raw_page('test1', 0) = get_raw_page('test1', 'main', 0);
+SELECT * FROM fsm_page_contents(get_raw_page('test_rel_forks', 'fsm', 0));
+ fsm_page_contents 
+-------------------
+ 0: 192           +
+ 1: 192           +
+ 3: 192           +
+ 7: 192           +
+ 15: 192          +
+ 31: 192          +
+ 63: 192          +
+ 127: 192         +
+ 255: 192         +
+ 511: 192         +
+ 1023: 192        +
+ 2047: 192        +
+ 4095: 192        +
+ fp_next_slot: 0  +
+ 
+(1 row)
+
+SELECT get_raw_page('test_rel_forks', 0) = get_raw_page('test_rel_forks', 'main', 0);
  ?column? 
 ----------
  t
 (1 row)
 
+DROP TABLE test_rel_forks;
+CREATE TABLE test1 (a int, b int);
+INSERT INTO test1 VALUES (16777217, 131584);
 SELECT pagesize, version FROM page_header(get_raw_page('test1', 0));
  pagesize | version 
 ----------+---------
@@ -62,26 +83,6 @@ SELECT tuple_data_split('test1'::regclass, t_data, t_infomask, t_infomask2, t_bi
  {"\\x01000001","\\x00020200"}
 (1 row)
 
-SELECT * FROM fsm_page_contents(get_raw_page('test1', 'fsm', 0));
- fsm_page_contents 
--------------------
- 0: 254           +
- 1: 254           +
- 3: 254           +
- 7: 254           +
- 15: 254          +
- 31: 254          +
- 63: 254          +
- 127: 254         +
- 255: 254         +
- 511: 254         +
- 1023: 254        +
- 2047: 254        +
- 4095: 254        +
- fp_next_slot: 0  +
- 
-(1 row)
-
 DROP TABLE test1;
 -- check that using any of these functions with a partitioned table or index
 -- would fail
diff --git a/contrib/pageinspect/sql/page.sql b/contrib/pageinspect/sql/page.sql
index 8ac9991837..ee811759d5 100644
--- a/contrib/pageinspect/sql/page.sql
+++ b/contrib/pageinspect/sql/page.sql
@@ -1,26 +1,35 @@
 CREATE EXTENSION pageinspect;
 
-CREATE TABLE test1 (a int, b int);
-INSERT INTO test1 VALUES (16777217, 131584);
+CREATE TABLE test_rel_forks (a int);
+-- Make sure there are enough blocks in the heap for the FSM to be created.
+INSERT INTO test_rel_forks SELECT g from generate_series(1,10000) g;
 
-VACUUM test1;  -- set up FSM
+-- set up FSM and VM
+VACUUM test_rel_forks;
 
 -- The page contents can vary, so just test that it can be read
 -- successfully, but don't keep the output.
 
-SELECT octet_length(get_raw_page('test1', 'main', 0)) AS main_0;
-SELECT octet_length(get_raw_page('test1', 'main', 1)) AS main_1;
+SELECT octet_length(get_raw_page('test_rel_forks', 'main', 0)) AS main_0;
+SELECT octet_length(get_raw_page('test_rel_forks', 'main', 100)) AS main_100;
 
-SELECT octet_length(get_raw_page('test1', 'fsm', 0)) AS fsm_0;
-SELECT octet_length(get_raw_page('test1', 'fsm', 1)) AS fsm_1;
+SELECT octet_length(get_raw_page('test_rel_forks', 'fsm', 0)) AS fsm_0;
+SELECT octet_length(get_raw_page('test_rel_forks', 'fsm', 10)) AS fsm_10;
 
-SELECT octet_length(get_raw_page('test1', 'vm', 0)) AS vm_0;
-SELECT octet_length(get_raw_page('test1', 'vm', 1)) AS vm_1;
+SELECT octet_length(get_raw_page('test_rel_forks', 'vm', 0)) AS vm_0;
+SELECT octet_length(get_raw_page('test_rel_forks', 'vm', 1)) AS vm_1;
 
 SELECT octet_length(get_raw_page('xxx', 'main', 0));
-SELECT octet_length(get_raw_page('test1', 'xxx', 0));
+SELECT octet_length(get_raw_page('test_rel_forks', 'xxx', 0));
+
+SELECT * FROM fsm_page_contents(get_raw_page('test_rel_forks', 'fsm', 0));
+
+SELECT get_raw_page('test_rel_forks', 0) = get_raw_page('test_rel_forks', 'main', 0);
 
-SELECT get_raw_page('test1', 0) = get_raw_page('test1', 'main', 0);
+DROP TABLE test_rel_forks;
+
+CREATE TABLE test1 (a int, b int);
+INSERT INTO test1 VALUES (16777217, 131584);
 
 SELECT pagesize, version FROM page_header(get_raw_page('test1', 0));
 
@@ -29,8 +38,6 @@ SELECT page_checksum(get_raw_page('test1', 0), 0) IS NOT NULL AS silly_checksum_
 SELECT tuple_data_split('test1'::regclass, t_data, t_infomask, t_infomask2, t_bits)
     FROM heap_page_items(get_raw_page('test1', 0));
 
-SELECT * FROM fsm_page_contents(get_raw_page('test1', 'fsm', 0));
-
 DROP TABLE test1;
 
 -- check that using any of these functions with a partitioned table or index
diff --git a/doc/src/sgml/storage.sgml b/doc/src/sgml/storage.sgml
index 8ef2ac8010..cbdad0c3fb 100644
--- a/doc/src/sgml/storage.sgml
+++ b/doc/src/sgml/storage.sgml
@@ -590,12 +590,13 @@ tuple would otherwise be too big.
 <indexterm><primary>FSM</primary><see>Free Space Map</see></indexterm>
 
 <para>
-Each heap and index relation, except for hash indexes, has a Free Space Map
-(FSM) to keep track of available space in the relation. It's stored
-alongside the main relation data in a separate relation fork, named after the
-filenode number of the relation, plus a <literal>_fsm</literal> suffix. For example,
-if the filenode of a relation is 12345, the FSM is stored in a file called
-<filename>12345_fsm</filename>, in the same directory as the main relation file.
+Each heap relation, unless it is very small, and each index relation, except
+for hash indexes, has a Free Space Map (FSM) to keep track of available
+space in the relation. It's stored alongside the main relation data in a
+separate relation fork, named after the filenode number of the relation, plus
+a <literal>_fsm</literal> suffix. For example, if the filenode of a relation
+is 12345, the FSM is stored in a file called <filename>12345_fsm</filename>,
+in the same directory as the main relation file.
 </para>
 
 <para>
diff --git a/src/backend/access/brin/brin.c b/src/backend/access/brin/brin.c
index e95fbbcea7..7c5b1af764 100644
--- a/src/backend/access/brin/brin.c
+++ b/src/backend/access/brin/brin.c
@@ -1148,7 +1148,7 @@ terminate_brin_buildstate(BrinBuildState *state)
 		freespace = PageGetFreeSpace(page);
 		blk = BufferGetBlockNumber(state->bs_currentInsertBuf);
 		ReleaseBuffer(state->bs_currentInsertBuf);
-		RecordPageWithFreeSpace(state->bs_irel, blk, freespace);
+		RecordPageWithFreeSpace(state->bs_irel, blk, freespace, InvalidBlockNumber);
 		FreeSpaceMapVacuumRange(state->bs_irel, blk, blk + 1);
 	}
 
diff --git a/src/backend/access/brin/brin_pageops.c b/src/backend/access/brin/brin_pageops.c
index 040cb62e55..cd10458ddc 100644
--- a/src/backend/access/brin/brin_pageops.c
+++ b/src/backend/access/brin/brin_pageops.c
@@ -310,7 +310,7 @@ brin_doupdate(Relation idxrel, BlockNumber pagesPerRange,
 
 		if (extended)
 		{
-			RecordPageWithFreeSpace(idxrel, newblk, freespace);
+			RecordPageWithFreeSpace(idxrel, newblk, freespace, InvalidBlockNumber);
 			FreeSpaceMapVacuumRange(idxrel, newblk, newblk + 1);
 		}
 
@@ -461,7 +461,7 @@ brin_doinsert(Relation idxrel, BlockNumber pagesPerRange,
 
 	if (extended)
 	{
-		RecordPageWithFreeSpace(idxrel, blk, freespace);
+		RecordPageWithFreeSpace(idxrel, blk, freespace, InvalidBlockNumber);
 		FreeSpaceMapVacuumRange(idxrel, blk, blk + 1);
 	}
 
@@ -654,7 +654,7 @@ brin_page_cleanup(Relation idxrel, Buffer buf)
 
 	/* Measure free space and record it */
 	RecordPageWithFreeSpace(idxrel, BufferGetBlockNumber(buf),
-							br_page_get_freespace(page));
+							br_page_get_freespace(page), InvalidBlockNumber);
 }
 
 /*
@@ -703,7 +703,7 @@ brin_getinsertbuffer(Relation irel, Buffer oldbuf, Size itemsz,
 	/* Choose initial target page, re-using existing target if known */
 	newblk = RelationGetTargetBlock(irel);
 	if (newblk == InvalidBlockNumber)
-		newblk = GetPageWithFreeSpace(irel, itemsz);
+		newblk = GetPageWithFreeSpace(irel, itemsz, true);
 
 	/*
 	 * Loop until we find a page with sufficient free space.  By the time we
@@ -895,7 +895,7 @@ brin_initialize_empty_new_buffer(Relation idxrel, Buffer buffer)
 	 * pages whose FSM records were forgotten in a crash.
 	 */
 	RecordPageWithFreeSpace(idxrel, BufferGetBlockNumber(buffer),
-							br_page_get_freespace(page));
+							br_page_get_freespace(page), InvalidBlockNumber);
 }
 
 
diff --git a/src/backend/access/heap/hio.c b/src/backend/access/heap/hio.c
index b8b5871559..e59568e47e 100644
--- a/src/backend/access/heap/hio.c
+++ b/src/backend/access/heap/hio.c
@@ -239,8 +239,14 @@ RelationAddExtraBlocks(Relation relation, BulkInsertState bistate)
 		 * Immediately update the bottom level of the FSM.  This has a good
 		 * chance of making this page visible to other concurrently inserting
 		 * backends, and we want that to happen without delay.
+		 *
+		 * Since we know the table will end up with extraBlocks additional
+		 * pages, we pass the final number to avoid possible unnecessary
+		 * system calls and to make sure the FSM is created when we add
+		 * the first new page.
 		 */
-		RecordPageWithFreeSpace(relation, blockNum, freespace);
+		RecordPageWithFreeSpace(relation, blockNum, freespace,
+								firstBlock + extraBlocks);
 	}
 	while (--extraBlocks > 0);
 
@@ -377,20 +383,9 @@ RelationGetBufferForTuple(Relation relation, Size len,
 		 * We have no cached target page, so ask the FSM for an initial
 		 * target.
 		 */
-		targetBlock = GetPageWithFreeSpace(relation, len + saveFreeSpace);
-
-		/*
-		 * If the FSM knows nothing of the rel, try the last page before we
-		 * give up and extend.  This avoids one-tuple-per-page syndrome during
-		 * bootstrapping or in a recently-started system.
-		 */
-		if (targetBlock == InvalidBlockNumber)
-		{
-			BlockNumber nblocks = RelationGetNumberOfBlocks(relation);
-
-			if (nblocks > 0)
-				targetBlock = nblocks - 1;
-		}
+		targetBlock = GetPageWithFreeSpace(relation,
+										   len + saveFreeSpace,
+										   false);
 	}
 
 loop:
@@ -484,6 +479,14 @@ loop:
 		{
 			/* use this page as future insert target, too */
 			RelationSetTargetBlock(relation, targetBlock);
+
+			/*
+			 * In case we used an in-memory map of available blocks, reset
+			 * it for next use.
+			 */
+			if (targetBlock < HEAP_FSM_CREATION_THRESHOLD)
+				FSMClearLocalMap();
+
 			return buffer;
 		}
 
@@ -543,9 +546,12 @@ loop:
 
 			/*
 			 * Check if some other backend has extended a block for us while
-			 * we were waiting on the lock.
+			 * we were waiting on the lock.  We only check the FSM -- if there
+			 * isn't one we don't recheck the number of blocks.
 			 */
-			targetBlock = GetPageWithFreeSpace(relation, len + saveFreeSpace);
+			targetBlock = GetPageWithFreeSpace(relation,
+											   len + saveFreeSpace,
+											   true);
 
 			/*
 			 * If some other waiter has already extended the relation, we
@@ -625,5 +631,12 @@ loop:
 	 */
 	RelationSetTargetBlock(relation, BufferGetBlockNumber(buffer));
 
+	/*
+	 * In case we used an in-memory map of available blocks, reset
+	 * it for next use.  We do this unconditionally since after relation
+	 * extension we can't skip this based on the targetBlock.
+	 */
+	FSMClearLocalMap();
+
 	return buffer;
 }
diff --git a/src/backend/access/transam/xact.c b/src/backend/access/transam/xact.c
index d967400384..fa0620b301 100644
--- a/src/backend/access/transam/xact.c
+++ b/src/backend/access/transam/xact.c
@@ -48,6 +48,7 @@
 #include "replication/walsender.h"
 #include "storage/condition_variable.h"
 #include "storage/fd.h"
+#include "storage/freespace.h"
 #include "storage/lmgr.h"
 #include "storage/predicate.h"
 #include "storage/proc.h"
@@ -2488,6 +2489,12 @@ AbortTransaction(void)
 	pgstat_report_wait_end();
 	pgstat_progress_end_command();
 
+	/*
+	 * In case we aborted during RelationGetBufferForTuple(),
+	 * clear the local map of heap pages.
+	 */
+	FSMClearLocalMap();
+
 	/* Clean up buffer I/O and buffer context locks, too */
 	AbortBufferIO();
 	UnlockBuffers();
@@ -4709,6 +4716,13 @@ AbortSubTransaction(void)
 
 	pgstat_report_wait_end();
 	pgstat_progress_end_command();
+
+	/*
+	 * In case we aborted during RelationGetBufferForTuple(),
+	 * clear the local map of heap pages.
+	 */
+	FSMClearLocalMap();
+
 	AbortBufferIO();
 	UnlockBuffers();
 
diff --git a/src/backend/commands/vacuumlazy.c b/src/backend/commands/vacuumlazy.c
index 8134c52253..d2818dfad4 100644
--- a/src/backend/commands/vacuumlazy.c
+++ b/src/backend/commands/vacuumlazy.c
@@ -154,7 +154,7 @@ static BufferAccessStrategy vac_strategy;
 static void lazy_scan_heap(Relation onerel, int options,
 			   LVRelStats *vacrelstats, Relation *Irel, int nindexes,
 			   bool aggressive);
-static void lazy_vacuum_heap(Relation onerel, LVRelStats *vacrelstats);
+static void lazy_vacuum_heap(Relation onerel, LVRelStats *vacrelstats, BlockNumber nblocks);
 static bool lazy_check_needs_freeze(Buffer buf, bool *hastup);
 static void lazy_vacuum_index(Relation indrel,
 				  IndexBulkDeleteResult **stats,
@@ -759,7 +759,7 @@ lazy_scan_heap(Relation onerel, int options, LVRelStats *vacrelstats,
 			pgstat_progress_update_multi_param(2, hvp_index, hvp_val);
 
 			/* Remove tuples from heap */
-			lazy_vacuum_heap(onerel, vacrelstats);
+			lazy_vacuum_heap(onerel, vacrelstats, nblocks);
 
 			/*
 			 * Forget the now-vacuumed tuples, and press on, but be careful
@@ -897,7 +897,7 @@ lazy_scan_heap(Relation onerel, int options, LVRelStats *vacrelstats,
 			MarkBufferDirty(buf);
 			UnlockReleaseBuffer(buf);
 
-			RecordPageWithFreeSpace(onerel, blkno, freespace);
+			RecordPageWithFreeSpace(onerel, blkno, freespace, nblocks);
 			continue;
 		}
 
@@ -936,7 +936,7 @@ lazy_scan_heap(Relation onerel, int options, LVRelStats *vacrelstats,
 			}
 
 			UnlockReleaseBuffer(buf);
-			RecordPageWithFreeSpace(onerel, blkno, freespace);
+			RecordPageWithFreeSpace(onerel, blkno, freespace, nblocks);
 			continue;
 		}
 
@@ -1333,7 +1333,7 @@ lazy_scan_heap(Relation onerel, int options, LVRelStats *vacrelstats,
 		 * taken if there are no indexes.)
 		 */
 		if (vacrelstats->num_dead_tuples == prev_dead_count)
-			RecordPageWithFreeSpace(onerel, blkno, freespace);
+			RecordPageWithFreeSpace(onerel, blkno, freespace, nblocks);
 	}
 
 	/* report that everything is scanned and vacuumed */
@@ -1395,7 +1395,7 @@ lazy_scan_heap(Relation onerel, int options, LVRelStats *vacrelstats,
 		/* Remove tuples from heap */
 		pgstat_progress_update_param(PROGRESS_VACUUM_PHASE,
 									 PROGRESS_VACUUM_PHASE_VACUUM_HEAP);
-		lazy_vacuum_heap(onerel, vacrelstats);
+		lazy_vacuum_heap(onerel, vacrelstats, nblocks);
 		vacrelstats->num_index_scans++;
 	}
 
@@ -1466,9 +1466,10 @@ lazy_scan_heap(Relation onerel, int options, LVRelStats *vacrelstats,
  * Note: the reason for doing this as a second pass is we cannot remove
  * the tuples until we've removed their index entries, and we want to
  * process index entry removal in batches as large as possible.
+ * Note: nblocks is passed as an optimization for RecordPageWithFreeSpace().
  */
 static void
-lazy_vacuum_heap(Relation onerel, LVRelStats *vacrelstats)
+lazy_vacuum_heap(Relation onerel, LVRelStats *vacrelstats, BlockNumber nblocks)
 {
 	int			tupindex;
 	int			npages;
@@ -1505,7 +1506,7 @@ lazy_vacuum_heap(Relation onerel, LVRelStats *vacrelstats)
 		freespace = PageGetHeapFreeSpace(page);
 
 		UnlockReleaseBuffer(buf);
-		RecordPageWithFreeSpace(onerel, tblk, freespace);
+		RecordPageWithFreeSpace(onerel, tblk, freespace, nblocks);
 		npages++;
 	}
 
diff --git a/src/backend/storage/freespace/README b/src/backend/storage/freespace/README
index e7ff23b76f..abaec871a5 100644
--- a/src/backend/storage/freespace/README
+++ b/src/backend/storage/freespace/README
@@ -5,10 +5,11 @@ Free Space Map
 
 The purpose of the free space map is to quickly locate a page with enough
 free space to hold a tuple to be stored; or to determine that no such page
-exists and the relation must be extended by one page.  As of PostgreSQL 8.4
-each relation has its own, extensible free space map stored in a separate
-"fork" of its relation.  This eliminates the disadvantages of the former
-fixed-size FSM.
+exists and the relation must be extended by one page.  For very small heap
+relations, we simply iterate through all the pages in descending order.
+Otherwise, each relation (except for hash indexes) has its own, extensible
+free space map stored in a separate "fork" of its relation.  This eliminates
+the disadvantages of the fixed-size FSM used in PostgreSQL 8.3 and earlier.
 
 It is important to keep the map small so that it can be searched rapidly.
 Therefore, we don't attempt to record the exact free space on a page.
@@ -192,5 +193,3 @@ TODO
 ----
 
 - fastroot to avoid traversing upper nodes with just 1 child
-- use a different system for tables that fit into one FSM page, with a
-  mechanism to switch to the real thing as it grows.
diff --git a/src/backend/storage/freespace/freespace.c b/src/backend/storage/freespace/freespace.c
index 7c4ad1c449..075092e31c 100644
--- a/src/backend/storage/freespace/freespace.c
+++ b/src/backend/storage/freespace/freespace.c
@@ -76,6 +76,14 @@
 #define FSM_ROOT_LEVEL	(FSM_TREE_DEPTH - 1)
 #define FSM_BOTTOM_LEVEL 0
 
+/* Status codes for the local map. */
+
+/* Either already tried, or beyond the end of the relation */
+#define FSM_LOCAL_NOT_AVAIL 0x00
+
+/* Available to try */
+#define FSM_LOCAL_AVAIL		0x01
+
 /*
  * The internal FSM routines work on a logical addressing scheme. Each
  * level of the tree can be thought of as a separately addressable file.
@@ -89,6 +97,15 @@ typedef struct
 /* Address of the root page. */
 static const FSMAddress FSM_ROOT_ADDRESS = {FSM_ROOT_LEVEL, 0};
 
+/* Local map of block numbers for small heaps with no FSM. */
+typedef struct
+{
+	BlockNumber nblocks;
+	char		map[HEAP_FSM_CREATION_THRESHOLD];
+} FSMLocalMap;
+
+static FSMLocalMap fsm_local_map = {0, {FSM_LOCAL_NOT_AVAIL}};
+
 /* functions to navigate the tree */
 static FSMAddress fsm_get_child(FSMAddress parent, uint16 slot);
 static FSMAddress fsm_get_parent(FSMAddress child, uint16 *slot);
@@ -107,10 +124,14 @@ static Size fsm_space_cat_to_avail(uint8 cat);
 /* workhorse functions for various operations */
 static int fsm_set_and_search(Relation rel, FSMAddress addr, uint16 slot,
 				   uint8 newValue, uint8 minValue);
+static void fsm_local_set(Relation rel, BlockNumber nblocks);
 static BlockNumber fsm_search(Relation rel, uint8 min_cat);
+static BlockNumber fsm_local_search(void);
 static uint8 fsm_vacuum_page(Relation rel, FSMAddress addr,
 				BlockNumber start, BlockNumber end,
 				bool *eof);
+static bool fsm_allow_writes(Relation rel, BlockNumber heapblk,
+				BlockNumber nblocks, BlockNumber *get_nblocks);
 
 
 /******** Public API ********/
@@ -129,11 +150,39 @@ static uint8 fsm_vacuum_page(Relation rel, FSMAddress addr,
  * extend the relation.
  */
 BlockNumber
-GetPageWithFreeSpace(Relation rel, Size spaceNeeded)
+GetPageWithFreeSpace(Relation rel, Size spaceNeeded, bool check_fsm_only)
 {
 	uint8		min_cat = fsm_space_needed_to_cat(spaceNeeded);
+	BlockNumber target_block,
+				nblocks;
+
+	/* First try the FSM, if it exists. */
+	target_block = fsm_search(rel, min_cat);
+
+	if (target_block == InvalidBlockNumber &&
+		rel->rd_rel->relkind == RELKIND_RELATION &&
+		!check_fsm_only)
+	{
+		nblocks = RelationGetNumberOfBlocks(rel);
 
-	return fsm_search(rel, min_cat);
+		if (nblocks > HEAP_FSM_CREATION_THRESHOLD)
+		{
+			/*
+			 * If the FSM knows nothing of the rel, try the last page before
+			 * we give up and extend.  This avoids one-tuple-per-page syndrome
+			 * during bootstrapping or in a recently-started system.
+			 */
+			target_block = nblocks - 1;
+		}
+		else if (nblocks > 0)
+		{
+			/* Create or update local map and get first candidate block. */
+			fsm_local_set(rel, nblocks);
+			target_block = fsm_local_search();
+		}
+	}
+
+	return target_block;
 }
 
 /*
@@ -149,11 +198,38 @@ BlockNumber
 RecordAndGetPageWithFreeSpace(Relation rel, BlockNumber oldPage,
 							  Size oldSpaceAvail, Size spaceNeeded)
 {
-	int			old_cat = fsm_space_avail_to_cat(oldSpaceAvail);
-	int			search_cat = fsm_space_needed_to_cat(spaceNeeded);
+	int			old_cat;
+	int			search_cat;
 	FSMAddress	addr;
 	uint16		slot;
 	int			search_slot;
+	BlockNumber nblocks = InvalidBlockNumber;
+
+	/* First try the local map, if it exists. */
+	if (oldPage < fsm_local_map.nblocks)
+	{
+		Assert(rel->rd_rel->relkind == RELKIND_RELATION &&
+			   fsm_local_map.map[oldPage] == FSM_LOCAL_AVAIL);
+
+		fsm_local_map.map[oldPage] = FSM_LOCAL_NOT_AVAIL;
+		return fsm_local_search();
+	}
+
+	if (!fsm_allow_writes(rel, oldPage, InvalidBlockNumber, &nblocks))
+	{
+		/*
+		 * If we have neither a local map nor an FSM, we probably just
+		 * tried the target block in the smgr relation entry and failed,
+		 * so we'll need to create the local map.
+		 */
+		fsm_local_set(rel, nblocks);
+		return fsm_local_search();
+	}
+
+	/* Normal FSM logic follows */
+
+	old_cat = fsm_space_avail_to_cat(oldSpaceAvail);
+	search_cat = fsm_space_needed_to_cat(spaceNeeded);
 
 	/* Get the location of the FSM byte representing the heap block */
 	addr = fsm_get_location(oldPage, &slot);
@@ -178,18 +254,36 @@ RecordAndGetPageWithFreeSpace(Relation rel, BlockNumber oldPage,
  * FreeSpaceMapVacuum call, which updates the upper level pages.
  */
 void
-RecordPageWithFreeSpace(Relation rel, BlockNumber heapBlk, Size spaceAvail)
+RecordPageWithFreeSpace(Relation rel, BlockNumber heapBlk,
+						Size spaceAvail, BlockNumber nblocks)
 {
-	int			new_cat = fsm_space_avail_to_cat(spaceAvail);
+	int			new_cat;
 	FSMAddress	addr;
 	uint16		slot;
+	BlockNumber dummy;
+
+	if (!fsm_allow_writes(rel, heapBlk, nblocks, &dummy))
+		/* Note: We do not have a local map to update, either. */
+		return;
 
 	/* Get the location of the FSM byte representing the heap block */
 	addr = fsm_get_location(heapBlk, &slot);
 
+	new_cat = fsm_space_avail_to_cat(spaceAvail);
 	fsm_set_and_search(rel, addr, slot, new_cat, 0);
 }
 
+/*
+ * Clear the local map.  We must call this when we have found a block with
+ * enough free space, or when we extend the relation.
+ */
+void
+FSMClearLocalMap(void)
+{
+	fsm_local_map.nblocks = 0;
+	memset(&fsm_local_map.map, 0, sizeof(fsm_local_map.map));
+}
+
 /*
  * XLogRecordPageWithFreeSpace - like RecordPageWithFreeSpace, for use in
  *		WAL replay
@@ -204,6 +298,30 @@ XLogRecordPageWithFreeSpace(RelFileNode rnode, BlockNumber heapBlk,
 	BlockNumber blkno;
 	Buffer		buf;
 	Page		page;
+	bool		write_to_fsm;
+
+	/* This is meant to mirror the logic in fsm_allow_writes() */
+	if (heapBlk >= HEAP_FSM_CREATION_THRESHOLD)
+		write_to_fsm = true;
+	else
+	{
+		/* Open the relation at smgr level */
+		SMgrRelation smgr = smgropen(rnode, InvalidBackendId);
+
+		if (smgrexists(smgr, FSM_FORKNUM))
+			write_to_fsm = true;
+		else
+		{
+			BlockNumber heap_nblocks = smgrnblocks(smgr, MAIN_FORKNUM);
+			if (heap_nblocks > HEAP_FSM_CREATION_THRESHOLD)
+				write_to_fsm = true;
+			else
+				write_to_fsm = false;
+		}
+	}
+
+	if (!write_to_fsm)
+		return;
 
 	/* Get the location of the FSM byte representing the heap block */
 	addr = fsm_get_location(heapBlk, &slot);
@@ -904,3 +1022,106 @@ fsm_vacuum_page(Relation rel, FSMAddress addr,
 
 	return max_avail;
 }
+
+/*
+ * For heaps we prevent extension of the FSM unless the number of pages
+ * exceeds HEAP_FSM_CREATION_THRESHOLD.  For tables that don't already have
+ * a FSM, this will save an inode and a few kB of space.
+ *
+ * XXX The API is a little awkward -- if the caller passes a valid nblocks
+ * value, it can avoid invoking a system call.  If the caller passes
+ * InvalidBlockNumber and receives a false return value, it can get an
+ * up-to-date relation size from get_nblocks.
+ */
+static bool
+fsm_allow_writes(Relation rel, BlockNumber heapblk,
+				 BlockNumber nblocks, BlockNumber *get_nblocks)
+{
+	bool		skip_get_nblocks;
+
+	if (heapblk >= HEAP_FSM_CREATION_THRESHOLD)
+		return true;
+
+	/* Non-heap rels can always create an FSM. */
+	if (rel->rd_rel->relkind != RELKIND_RELATION)
+		return true;
+
+	/*
+	 * If the caller knows nblocks, we can avoid a system call later.
+	 * If it doesn't, maybe we have relpages from a previous VACUUM.
+	 * Since the table may have extended since then, we still have to
+	 * count the pages later if we can't return now.
+	 */
+	if (nblocks != InvalidBlockNumber)
+	{
+		if (nblocks > HEAP_FSM_CREATION_THRESHOLD)
+			return true;
+		else
+			skip_get_nblocks = true;
+	}
+	else
+	{
+		if (rel->rd_rel->relpages != InvalidBlockNumber &&
+			rel->rd_rel->relpages > HEAP_FSM_CREATION_THRESHOLD)
+			return true;
+		else
+			skip_get_nblocks = false;
+	}
+
+	RelationOpenSmgr(rel);
+	if (smgrexists(rel->rd_smgr, FSM_FORKNUM))
+		return true;
+
+	if (skip_get_nblocks)
+		return false;
+
+	/* last resort */
+	*get_nblocks = RelationGetNumberOfBlocks(rel);
+	if (*get_nblocks > HEAP_FSM_CREATION_THRESHOLD)
+		return true;
+	else
+		return false;
+}
+
+/*
+ * Initialize the local map of blocks to try, for when there is no FSM.
+ */
+static void
+fsm_local_set(Relation rel, BlockNumber nblocks)
+{
+	BlockNumber blkno,
+				cached_target_block;
+
+	for (blkno = 0; blkno < nblocks; blkno++)
+		fsm_local_map.map[blkno] = FSM_LOCAL_AVAIL;
+
+	/* Cache the number of blocks. */
+	fsm_local_map.nblocks = nblocks;
+
+	/* Set the status of the cached target block to 'unavailable'. */
+	cached_target_block = RelationGetTargetBlock(rel);
+	if (cached_target_block != InvalidBlockNumber &&
+		cached_target_block < nblocks)
+		fsm_local_map.map[cached_target_block] = FSM_LOCAL_NOT_AVAIL;
+}
+
+/*
+ * Search the local map for an available block to try, in descending order.
+ *
+ * For use when there is no FSM.
+ */
+static BlockNumber
+fsm_local_search(void)
+{
+	BlockNumber		target_block = fsm_local_map.nblocks;
+
+	do
+	{
+		target_block--;
+		if (fsm_local_map.map[target_block] == FSM_LOCAL_AVAIL)
+			return target_block;
+	}
+	while (target_block > 0);
+
+	return InvalidBlockNumber;
+}
diff --git a/src/backend/storage/freespace/indexfsm.c b/src/backend/storage/freespace/indexfsm.c
index e21047b96f..88a71ae548 100644
--- a/src/backend/storage/freespace/indexfsm.c
+++ b/src/backend/storage/freespace/indexfsm.c
@@ -37,7 +37,7 @@
 BlockNumber
 GetFreeIndexPage(Relation rel)
 {
-	BlockNumber blkno = GetPageWithFreeSpace(rel, BLCKSZ / 2);
+	BlockNumber blkno = GetPageWithFreeSpace(rel, BLCKSZ / 2, true);
 
 	if (blkno != InvalidBlockNumber)
 		RecordUsedIndexPage(rel, blkno);
@@ -51,7 +51,7 @@ GetFreeIndexPage(Relation rel)
 void
 RecordFreeIndexPage(Relation rel, BlockNumber freeBlock)
 {
-	RecordPageWithFreeSpace(rel, freeBlock, BLCKSZ - 1);
+	RecordPageWithFreeSpace(rel, freeBlock, BLCKSZ - 1, InvalidBlockNumber);
 }
 
 
@@ -61,7 +61,7 @@ RecordFreeIndexPage(Relation rel, BlockNumber freeBlock)
 void
 RecordUsedIndexPage(Relation rel, BlockNumber usedBlock)
 {
-	RecordPageWithFreeSpace(rel, usedBlock, 0);
+	RecordPageWithFreeSpace(rel, usedBlock, 0, InvalidBlockNumber);
 }
 
 /*
diff --git a/src/include/storage/freespace.h b/src/include/storage/freespace.h
index 726eb30fb8..8b2651db04 100644
--- a/src/include/storage/freespace.h
+++ b/src/include/storage/freespace.h
@@ -18,15 +18,20 @@
 #include "storage/relfilenode.h"
 #include "utils/relcache.h"
 
+/* Only extend a heap's FSM if the heap has greater than this many blocks */
+#define HEAP_FSM_CREATION_THRESHOLD 4
+
 /* prototypes for public functions in freespace.c */
 extern Size GetRecordedFreeSpace(Relation rel, BlockNumber heapBlk);
-extern BlockNumber GetPageWithFreeSpace(Relation rel, Size spaceNeeded);
+extern BlockNumber GetPageWithFreeSpace(Relation rel, Size spaceNeeded,
+							bool check_fsm_only);
 extern BlockNumber RecordAndGetPageWithFreeSpace(Relation rel,
 							  BlockNumber oldPage,
 							  Size oldSpaceAvail,
 							  Size spaceNeeded);
 extern void RecordPageWithFreeSpace(Relation rel, BlockNumber heapBlk,
-						Size spaceAvail);
+						Size spaceAvail, BlockNumber nblocks);
+extern void FSMClearLocalMap(void);
 extern void XLogRecordPageWithFreeSpace(RelFileNode rnode, BlockNumber heapBlk,
 							Size spaceAvail);
 
diff --git a/src/test/regress/expected/fsm.out b/src/test/regress/expected/fsm.out
new file mode 100644
index 0000000000..1368a782e3
--- /dev/null
+++ b/src/test/regress/expected/fsm.out
@@ -0,0 +1,55 @@
+--
+-- Free Space Map test
+--
+CREATE TABLE fsm_check_size (num int);
+-- 1 heap block
+-- No FSM
+INSERT INTO fsm_check_size values (0);
+VACUUM fsm_check_size;
+SELECT pg_relation_size('fsm_check_size', 'main') as heap_size, pg_relation_size('fsm_check_size', 'fsm') AS fsm_size;
+ heap_size | fsm_size 
+-----------+----------
+      8192 |        0
+(1 row)
+
+-- Extend table with enough blocks to exceed the FSM threshold
+-- FSM is created and extended to 3 blocks
+INSERT INTO fsm_check_size SELECT g from generate_series(1,3000) g;
+VACUUM fsm_check_size;
+SELECT pg_relation_size('fsm_check_size', 'fsm') AS fsm_size;
+ fsm_size 
+----------
+    24576
+(1 row)
+
+-- Truncate heap to 1 block
+-- No change in FSM
+DELETE FROM fsm_check_size where num > 0;
+VACUUM fsm_check_size;
+SELECT pg_relation_size('fsm_check_size', 'main') as heap_size, pg_relation_size('fsm_check_size', 'fsm') AS fsm_size;
+ heap_size | fsm_size 
+-----------+----------
+      8192 |    24576
+(1 row)
+
+-- Truncate heap to 0 blocks
+-- FSM now truncated to 2 blocks
+DELETE FROM fsm_check_size;
+VACUUM fsm_check_size;
+SELECT pg_relation_size('fsm_check_size', 'main') as heap_size, pg_relation_size('fsm_check_size', 'fsm') AS fsm_size;
+ heap_size | fsm_size 
+-----------+----------
+         0 |    16384
+(1 row)
+
+-- Extend heap to 1 block
+-- FSM is extended to 3 blocks
+INSERT INTO fsm_check_size values (0);
+VACUUM fsm_check_size;
+SELECT pg_relation_size('fsm_check_size', 'main') as heap_size, pg_relation_size('fsm_check_size', 'fsm') AS fsm_size;
+ heap_size | fsm_size 
+-----------+----------
+      8192 |    24576
+(1 row)
+
+DROP TABLE fsm_check_size;
diff --git a/src/test/regress/parallel_schedule b/src/test/regress/parallel_schedule
index cc0bbf5db9..bb0a151127 100644
--- a/src/test/regress/parallel_schedule
+++ b/src/test/regress/parallel_schedule
@@ -68,6 +68,11 @@ test: create_aggregate create_function_3 create_cast constraints triggers inheri
 # ----------
 test: sanity_check
 
+# ----------
+# fsm does a vacuum, and running it in parallel seems to prevent heap truncation.
+# ----------
+test: fsm
+
 # ----------
 # Believe it or not, select creates a table, subsequent
 # tests need.
diff --git a/src/test/regress/sql/fsm.sql b/src/test/regress/sql/fsm.sql
new file mode 100644
index 0000000000..16c1e72a97
--- /dev/null
+++ b/src/test/regress/sql/fsm.sql
@@ -0,0 +1,37 @@
+--
+-- Free Space Map test
+--
+
+CREATE TABLE fsm_check_size (num int);
+
+-- 1 heap block
+-- No FSM
+INSERT INTO fsm_check_size values (0);
+VACUUM fsm_check_size;
+SELECT pg_relation_size('fsm_check_size', 'main') as heap_size, pg_relation_size('fsm_check_size', 'fsm') AS fsm_size;
+
+-- Extend table with enough blocks to exceed the FSM threshold
+-- FSM is created and extended to 3 blocks
+INSERT INTO fsm_check_size SELECT g from generate_series(1,3000) g;
+VACUUM fsm_check_size;
+SELECT pg_relation_size('fsm_check_size', 'fsm') AS fsm_size;
+
+-- Truncate heap to 1 block
+-- No change in FSM
+DELETE FROM fsm_check_size where num > 0;
+VACUUM fsm_check_size;
+SELECT pg_relation_size('fsm_check_size', 'main') as heap_size, pg_relation_size('fsm_check_size', 'fsm') AS fsm_size;
+
+-- Truncate heap to 0 blocks
+-- FSM now truncated to 2 blocks
+DELETE FROM fsm_check_size;
+VACUUM fsm_check_size;
+SELECT pg_relation_size('fsm_check_size', 'main') as heap_size, pg_relation_size('fsm_check_size', 'fsm') AS fsm_size;
+
+-- Extend heap to 1 block
+-- FSM is extended to 3 blocks
+INSERT INTO fsm_check_size values (0);
+VACUUM fsm_check_size;
+SELECT pg_relation_size('fsm_check_size', 'main') as heap_size, pg_relation_size('fsm_check_size', 'fsm') AS fsm_size;
+
+DROP TABLE fsm_check_size;
-- 
2.17.1

#43Amit Kapila
amit.kapila16@gmail.com
In reply to: John Naylor (#42)
Re: WIP: Avoid creation of the free space map for small tables

On Thu, Nov 29, 2018 at 3:07 PM John Naylor <jcnaylor@gmail.com> wrote:

Few more comments:
-------------------------------
1. I think we can add some test(s) to test the new functionality, may
be something on the lines of what Robert has originally provided as an
example of this behavior [1].

Done. I tried adding it to several schedules, but for some reason
vacuuming an empty table failed to truncate the heap to 0 blocks.
Putting the test in its own group fixed the problem, but that doesn't
seem ideal.

It might be because it fails the should_attempt_truncation() check.
See below code:

if (should_attempt_truncation(vacrelstats))
lazy_truncate_heap(onerel, vacrelstats, vac_strategy);

--
With Regards,
Amit Kapila.
EnterpriseDB: http://www.enterprisedb.com

#44John Naylor
jcnaylor@gmail.com
In reply to: John Naylor (#42)
2 attachment(s)
Re: WIP: Avoid creation of the free space map for small tables

On 11/29/18, Amit Kapila <amit.kapila16@gmail.com> wrote:

On Thu, Nov 29, 2018 at 3:07 PM John Naylor <jcnaylor@gmail.com> wrote:

Done. I tried adding it to several schedules, but for some reason
vacuuming an empty table failed to truncate the heap to 0 blocks.
Putting the test in its own group fixed the problem, but that doesn't
seem ideal.

It might be because it fails the should_attempt_truncation() check.
See below code:

if (should_attempt_truncation(vacrelstats))
lazy_truncate_heap(onerel, vacrelstats, vac_strategy);

I see. I think truncating the FSM is not essential to show either the
old or new behavior -- I could skip that portion to enable running the
test in a parallel group.

Can you please repeat the copy test you have done above with
fillfactor as 20 and 30?

I will send the results in a separate email soon.

I ran the attached scripts which populates 100 tables with either 4 or
8 blocks. The test tables were pre-filled with one tuple and vacuumed
so that the FSMs were already created when testing the master branch.
The patch branch was compiled with a threshold of 8, but testing
inserts of 4 pages effectively simulates a threshold of 4. Config was
stock, except for fsync = off. I took the average of 40 runs (2
complete tests of 20 runs each) after removing the 10% highest and
lowest:

fillfactor=20
# blocks master patch
4 19.1ms 17.5ms
8 33.4ms 30.9ms

fillfactor=30
# blocks master patch
4 20.1ms 19.7ms
8 34.7ms 34.9ms

It seems the patch might be a bit faster with fillfactor=20, but I'm
at a loss as to why that would be. Previous testing with a higher
threshold showed a significant performance penalty starting around 10
blocks [1]/messages/by-id/CAJVSVGWCRMyi8sSqguf6PfFcpM3hwNY5YhPZTt-8Q3ZGv0UGYw@mail.gmail.com, but that used truncation rather than deletion, and had a
fill-factor of 10.

--
[1]: /messages/by-id/CAJVSVGWCRMyi8sSqguf6PfFcpM3hwNY5YhPZTt-8Q3ZGv0UGYw@mail.gmail.com

-John Naylor

Attachments:

fsm-copy-setup.sqlapplication/sql; name=fsm-copy-setup.sqlDownload
fsm-copy-test-v3.sqlapplication/sql; name=fsm-copy-test-v3.sqlDownload
#45Amit Kapila
amit.kapila16@gmail.com
In reply to: John Naylor (#44)
Re: WIP: Avoid creation of the free space map for small tables

On Sat, Dec 1, 2018 at 12:42 PM John Naylor <jcnaylor@gmail.com> wrote:

On 11/29/18, Amit Kapila <amit.kapila16@gmail.com> wrote:

On Thu, Nov 29, 2018 at 3:07 PM John Naylor <jcnaylor@gmail.com> wrote:

Done. I tried adding it to several schedules, but for some reason
vacuuming an empty table failed to truncate the heap to 0 blocks.
Putting the test in its own group fixed the problem, but that doesn't
seem ideal.

It might be because it fails the should_attempt_truncation() check.
See below code:

if (should_attempt_truncation(vacrelstats))
lazy_truncate_heap(onerel, vacrelstats, vac_strategy);

I see. I think truncating the FSM is not essential to show either the
old or new behavior -- I could skip that portion to enable running the
test in a parallel group.

Can you please repeat the copy test you have done above with
fillfactor as 20 and 30?

I will send the results in a separate email soon.

I ran the attached scripts which populates 100 tables with either 4 or
8 blocks. The test tables were pre-filled with one tuple and vacuumed
so that the FSMs were already created when testing the master branch.
The patch branch was compiled with a threshold of 8, but testing
inserts of 4 pages effectively simulates a threshold of 4. Config was
stock, except for fsync = off. I took the average of 40 runs (2
complete tests of 20 runs each) after removing the 10% highest and
lowest:

fillfactor=20
# blocks master patch
4 19.1ms 17.5ms
8 33.4ms 30.9ms

fillfactor=30
# blocks master patch
4 20.1ms 19.7ms
8 34.7ms 34.9ms

It seems the patch might be a bit faster with fillfactor=20, but I'm
at a loss as to why that would be.

I see that in your previous tests also with patch, the performance was
slightly better. One probable reason could be that for small tables
the total number of pages accessed via shared buffers is more without
the patch (probably 3 FSM pages + 4 relation). With the patch, you
need to only access 4 relation pages. The other overhead of patch
(retrying each page) seems to be compensated with FSM search. I think
you can once check perf profiles to confirm the same.

Previous testing with a higher
threshold showed a significant performance penalty starting around 10
blocks [1], but that used truncation rather than deletion, and had a
fill-factor of 10.

Can you check whether the number of pages after test are the same with
and without a patch in this setup?

--
With Regards,
Amit Kapila.
EnterpriseDB: http://www.enterprisedb.com

#46John Naylor
jcnaylor@gmail.com
In reply to: Amit Kapila (#45)
Re: WIP: Avoid creation of the free space map for small tables

On 12/1/18, Amit Kapila <amit.kapila16@gmail.com> wrote:

Can you check whether the number of pages after test are the same with
and without a patch in this setup?

I did verify that the number of pages was as intended.

-John Naylor

#47Amit Kapila
amit.kapila16@gmail.com
In reply to: John Naylor (#42)
Re: WIP: Avoid creation of the free space map for small tables

On Thu, Nov 29, 2018 at 3:07 PM John Naylor <jcnaylor@gmail.com> wrote:

- * Copy/link any fsm and vm files, if they exist
+ *
Copy/link any fsm and vm files, if they exist and if they would
+ * be created in the
new cluster.
  */
- transfer_relfile(&maps[mapnum], "_fsm",
vm_must_add_frozenbit);
+ if (maps[mapnum].relkind != RELKIND_RELATION ||
+
first_seg_size > HEAP_FSM_CREATION_THRESHOLD * BLCKSZ ||
+
GET_MAJOR_VERSION(new_cluster.major_version) <= 1100)
+ (void) transfer_relfile
(&maps[mapnum], "_fsm", vm_must_add_frozenbit);

During pg_upgrade, skip transfer of FSMs if they wouldn't have been created on the new cluster.

I think in some cases, it won't be consistent with HEAD's behavior.
After truncate, we leave the FSM as it is, so the case where before
upgrade the relation was truncated, we won't create the FSM in new
cluster and that will be inconsistent with the behavior of HEAD. I
think similar anomaly will be there when we delete rows from the table
such that after deletion size of relation becomes smaller than
HEAP_FSM_CREATION_THRESHOLD.

I am not sure if it is a good idea to *not* transfer FSM files during
upgrade unless we ensure that we remove FSM whenever the relation size
falls below HEAP_FSM_CREATION_THRESHOLD. What do you think? BTW,
what is your reasoning for not removing FSM on truncate?

Anybody else has an opinion on this matter?

--
With Regards,
Amit Kapila.
EnterpriseDB: http://www.enterprisedb.com

#48Amit Kapila
amit.kapila16@gmail.com
In reply to: Amit Kapila (#47)
Re: WIP: Avoid creation of the free space map for small tables

On Mon, Dec 3, 2018 at 9:46 AM Amit Kapila <amit.kapila16@gmail.com> wrote:

On Thu, Nov 29, 2018 at 3:07 PM John Naylor <jcnaylor@gmail.com> wrote:

v8 code:
+fsm_local_set(Relation rel, BlockNumber new_nblocks)
+{
+ BlockNumber blkno,
+ cached_target_block;
+
+ /*
+ * Mark blocks available starting after the last block number we have
+ * cached, and ending at the current last block in the relation.
+ * When we first set the map, this will flag all blocks as available
+ * to try.  If we reset the map while waiting for a relation
+ * extension lock, this will only flag new blocks as available,
+ * if any were created by another backend.
+ */
+ for (blkno = fsm_local_map.nblocks; blkno < new_nblocks; blkno++)
+ fsm_local_map.map[blkno] = FSM_LOCAL_AVAIL;
v9 code:
+static void
+fsm_local_set(Relation rel, BlockNumber nblocks)
+{
+ BlockNumber blkno,
+ cached_target_block;
+
+ for (blkno = 0; blkno < nblocks; blkno++)
+ fsm_local_map.map[blkno] = FSM_LOCAL_AVAIL;

What is the reason for the above code change in the latest patch version?

It would be good if you add few comments atop functions
GetPageWithFreeSpace, RecordAndGetPageWithFreeSpace and
RecordPageWithFreeSpace about their interaction with local map.

--
With Regards,
Amit Kapila.
EnterpriseDB: http://www.enterprisedb.com

#49John Naylor
jcnaylor@gmail.com
In reply to: Amit Kapila (#47)
Re: WIP: Avoid creation of the free space map for small tables

On 12/3/18, Amit Kapila <amit.kapila16@gmail.com> wrote:

During pg_upgrade, skip transfer of FSMs if they wouldn't have been
created on the new cluster.

I think in some cases, it won't be consistent with HEAD's behavior.
After truncate, we leave the FSM as it is, so the case where before
upgrade the relation was truncated, we won't create the FSM in new
cluster and that will be inconsistent with the behavior of HEAD.

To be precise, with the TRUNCATE statement, the FSM (everything but
the main relation fork, I think) is deleted, but using DELETE to
remove all rows from the table will preserve the forks. In the latter
case, when VACUUM truncates the FSM, it removes all leaf pages leaving
behind the root page and one mid-level page. I haven't changed this
behavior.

I think similar anomaly will be there when we delete rows from the table
such that after deletion size of relation becomes smaller than
HEAP_FSM_CREATION_THRESHOLD.

Yes, in that case there will be inconsistency, but I'm comfortable
with it. Others may not be.

I am not sure if it is a good idea to *not* transfer FSM files during
upgrade unless we ensure that we remove FSM whenever the relation size
falls below HEAP_FSM_CREATION_THRESHOLD. What do you think? BTW,
what is your reasoning for not removing FSM on truncate?

My reasoning is that if we ever went past the threshold, it's likely
we'll do so again, so I didn't feel it was worth the extra code
complexity to remove the FSM. In the pg_upgrade case, however, it is
simple to not copy the FSM.

-John Naylor

#50John Naylor
jcnaylor@gmail.com
In reply to: Amit Kapila (#48)
Re: WIP: Avoid creation of the free space map for small tables

On 12/3/18, Amit Kapila <amit.kapila16@gmail.com> wrote:

On Mon, Dec 3, 2018 at 9:46 AM Amit Kapila <amit.kapila16@gmail.com> wrote:

On Thu, Nov 29, 2018 at 3:07 PM John Naylor <jcnaylor@gmail.com> wrote:

v8 code:
+fsm_local_set(Relation rel, BlockNumber new_nblocks)
+{
+ BlockNumber blkno,
+ cached_target_block;
+
+ /*
+ * Mark blocks available starting after the last block number we have
+ * cached, and ending at the current last block in the relation.
+ * When we first set the map, this will flag all blocks as available
+ * to try.  If we reset the map while waiting for a relation
+ * extension lock, this will only flag new blocks as available,
+ * if any were created by another backend.
+ */
+ for (blkno = fsm_local_map.nblocks; blkno < new_nblocks; blkno++)
+ fsm_local_map.map[blkno] = FSM_LOCAL_AVAIL;
v9 code:
+static void
+fsm_local_set(Relation rel, BlockNumber nblocks)
+{
+ BlockNumber blkno,
+ cached_target_block;
+
+ for (blkno = 0; blkno < nblocks; blkno++)
+ fsm_local_map.map[blkno] = FSM_LOCAL_AVAIL;

What is the reason for the above code change in the latest patch version?

Per your recent comment, we no longer check relation size if we waited
on a relation extension lock, so this is essentially a reversion to an
earlier version. Keeping v8 would have the advantage that it'd be
simple to change our minds about this. Do you have an opinion about
that?

It would be good if you add few comments atop functions
GetPageWithFreeSpace, RecordAndGetPageWithFreeSpace and
RecordPageWithFreeSpace about their interaction with local map.

Good idea, will do.

-John Naylor

#51Amit Kapila
amit.kapila16@gmail.com
In reply to: John Naylor (#50)
Re: WIP: Avoid creation of the free space map for small tables

On Mon, Dec 3, 2018 at 11:15 AM John Naylor <jcnaylor@gmail.com> wrote:

On 12/3/18, Amit Kapila <amit.kapila16@gmail.com> wrote:

On Mon, Dec 3, 2018 at 9:46 AM Amit Kapila <amit.kapila16@gmail.com> wrote:

On Thu, Nov 29, 2018 at 3:07 PM John Naylor <jcnaylor@gmail.com> wrote:

v8 code:
+fsm_local_set(Relation rel, BlockNumber new_nblocks)
+{
+ BlockNumber blkno,
+ cached_target_block;
+
+ /*
+ * Mark blocks available starting after the last block number we have
+ * cached, and ending at the current last block in the relation.
+ * When we first set the map, this will flag all blocks as available
+ * to try.  If we reset the map while waiting for a relation
+ * extension lock, this will only flag new blocks as available,
+ * if any were created by another backend.
+ */
+ for (blkno = fsm_local_map.nblocks; blkno < new_nblocks; blkno++)
+ fsm_local_map.map[blkno] = FSM_LOCAL_AVAIL;
v9 code:
+static void
+fsm_local_set(Relation rel, BlockNumber nblocks)
+{
+ BlockNumber blkno,
+ cached_target_block;
+
+ for (blkno = 0; blkno < nblocks; blkno++)
+ fsm_local_map.map[blkno] = FSM_LOCAL_AVAIL;

What is the reason for the above code change in the latest patch version?

Per your recent comment, we no longer check relation size if we waited
on a relation extension lock, so this is essentially a reversion to an
earlier version.

fsm_local_set is being called from RecordAndGetPageWithFreeSpace and
GetPageWithFreeSpace whereas the change we have discussed was specific
to GetPageWithFreeSpace, so not sure if we need any change in
fsm_local_set.

Keeping v8 would have the advantage that it'd be
simple to change our minds about this. Do you have an opinion about
that?

It would be good if you add few comments atop functions
GetPageWithFreeSpace, RecordAndGetPageWithFreeSpace and
RecordPageWithFreeSpace about their interaction with local map.

Good idea, will do.

Thanks.

--
With Regards,
Amit Kapila.
EnterpriseDB: http://www.enterprisedb.com

#52John Naylor
jcnaylor@gmail.com
In reply to: Amit Kapila (#51)
2 attachment(s)
Re: WIP: Avoid creation of the free space map for small tables

On 12/3/18, Amit Kapila <amit.kapila16@gmail.com> wrote:

On Mon, Dec 3, 2018 at 11:15 AM John Naylor <jcnaylor@gmail.com> wrote:

Per your recent comment, we no longer check relation size if we waited
on a relation extension lock, so this is essentially a reversion to an
earlier version.

fsm_local_set is being called from RecordAndGetPageWithFreeSpace and
GetPageWithFreeSpace whereas the change we have discussed was specific
to GetPageWithFreeSpace, so not sure if we need any change in
fsm_local_set.

Not needed, but I assumed wrongly you'd think it unclear otherwise.
I've now restored the generality and updated the comments to be closer
to v8.

It would be good if you add few comments atop functions
GetPageWithFreeSpace, RecordAndGetPageWithFreeSpace and
RecordPageWithFreeSpace about their interaction with local map.

Done. Also additional minor comment editing.

I've added an additional regression test for finding the right block
and removed a test I thought was redundant. I've kept the test file in
its own schedule.

-John Naylor

Attachments:

v10-0001-Avoid-creation-of-the-free-space-map-for-small-t.patchtext/x-patch; charset=US-ASCII; name=v10-0001-Avoid-creation-of-the-free-space-map-for-small-t.patchDownload
From 7494ff89be7ad4e07f277f3bcc6e866c5527ce45 Mon Sep 17 00:00:00 2001
From: John Naylor <jcnaylor@gmail.com>
Date: Thu, 6 Dec 2018 10:49:03 -0600
Subject: [PATCH v10 1/2] Avoid creation of the free space map for small
 tables.

The FSM isn't created if the heap has 4 blocks or fewer. If the last
known target block has insufficient space, try every block before extending
the heap.

If a heap with a FSM is truncated back to below the threshold, the FSM
stays around and can be used as usual.
---
 contrib/pageinspect/expected/page.out     |  77 +++----
 contrib/pageinspect/sql/page.sql          |  33 +--
 doc/src/sgml/storage.sgml                 |  13 +-
 src/backend/access/brin/brin.c            |   2 +-
 src/backend/access/brin/brin_pageops.c    |  10 +-
 src/backend/access/heap/hio.c             |  47 ++--
 src/backend/access/transam/xact.c         |  14 ++
 src/backend/commands/vacuumlazy.c         |  17 +-
 src/backend/storage/freespace/README      |  11 +-
 src/backend/storage/freespace/freespace.c | 251 +++++++++++++++++++++-
 src/backend/storage/freespace/indexfsm.c  |   6 +-
 src/include/storage/freespace.h           |   9 +-
 src/test/regress/expected/fsm.out         |  62 ++++++
 src/test/regress/parallel_schedule        |   5 +
 src/test/regress/sql/fsm.sql              |  46 ++++
 15 files changed, 498 insertions(+), 105 deletions(-)
 create mode 100644 src/test/regress/expected/fsm.out
 create mode 100644 src/test/regress/sql/fsm.sql

diff --git a/contrib/pageinspect/expected/page.out b/contrib/pageinspect/expected/page.out
index 3fcd9fbe6d..83e5910453 100644
--- a/contrib/pageinspect/expected/page.out
+++ b/contrib/pageinspect/expected/page.out
@@ -1,48 +1,69 @@
 CREATE EXTENSION pageinspect;
-CREATE TABLE test1 (a int, b int);
-INSERT INTO test1 VALUES (16777217, 131584);
-VACUUM test1;  -- set up FSM
+CREATE TABLE test_rel_forks (a int);
+-- Make sure there are enough blocks in the heap for the FSM to be created.
+INSERT INTO test_rel_forks SELECT g from generate_series(1,10000) g;
+-- set up FSM and VM
+VACUUM test_rel_forks;
 -- The page contents can vary, so just test that it can be read
 -- successfully, but don't keep the output.
-SELECT octet_length(get_raw_page('test1', 'main', 0)) AS main_0;
+SELECT octet_length(get_raw_page('test_rel_forks', 'main', 0)) AS main_0;
  main_0 
 --------
    8192
 (1 row)
 
-SELECT octet_length(get_raw_page('test1', 'main', 1)) AS main_1;
-ERROR:  block number 1 is out of range for relation "test1"
-SELECT octet_length(get_raw_page('test1', 'fsm', 0)) AS fsm_0;
+SELECT octet_length(get_raw_page('test_rel_forks', 'main', 100)) AS main_100;
+ERROR:  block number 100 is out of range for relation "test_rel_forks"
+SELECT octet_length(get_raw_page('test_rel_forks', 'fsm', 0)) AS fsm_0;
  fsm_0 
 -------
   8192
 (1 row)
 
-SELECT octet_length(get_raw_page('test1', 'fsm', 1)) AS fsm_1;
- fsm_1 
--------
-  8192
-(1 row)
-
-SELECT octet_length(get_raw_page('test1', 'vm', 0)) AS vm_0;
+SELECT octet_length(get_raw_page('test_rel_forks', 'fsm', 10)) AS fsm_10;
+ERROR:  block number 10 is out of range for relation "test_rel_forks"
+SELECT octet_length(get_raw_page('test_rel_forks', 'vm', 0)) AS vm_0;
  vm_0 
 ------
  8192
 (1 row)
 
-SELECT octet_length(get_raw_page('test1', 'vm', 1)) AS vm_1;
-ERROR:  block number 1 is out of range for relation "test1"
+SELECT octet_length(get_raw_page('test_rel_forks', 'vm', 1)) AS vm_1;
+ERROR:  block number 1 is out of range for relation "test_rel_forks"
 SELECT octet_length(get_raw_page('xxx', 'main', 0));
 ERROR:  relation "xxx" does not exist
-SELECT octet_length(get_raw_page('test1', 'xxx', 0));
+SELECT octet_length(get_raw_page('test_rel_forks', 'xxx', 0));
 ERROR:  invalid fork name
 HINT:  Valid fork names are "main", "fsm", "vm", and "init".
-SELECT get_raw_page('test1', 0) = get_raw_page('test1', 'main', 0);
+SELECT * FROM fsm_page_contents(get_raw_page('test_rel_forks', 'fsm', 0));
+ fsm_page_contents 
+-------------------
+ 0: 192           +
+ 1: 192           +
+ 3: 192           +
+ 7: 192           +
+ 15: 192          +
+ 31: 192          +
+ 63: 192          +
+ 127: 192         +
+ 255: 192         +
+ 511: 192         +
+ 1023: 192        +
+ 2047: 192        +
+ 4095: 192        +
+ fp_next_slot: 0  +
+ 
+(1 row)
+
+SELECT get_raw_page('test_rel_forks', 0) = get_raw_page('test_rel_forks', 'main', 0);
  ?column? 
 ----------
  t
 (1 row)
 
+DROP TABLE test_rel_forks;
+CREATE TABLE test1 (a int, b int);
+INSERT INTO test1 VALUES (16777217, 131584);
 SELECT pagesize, version FROM page_header(get_raw_page('test1', 0));
  pagesize | version 
 ----------+---------
@@ -62,26 +83,6 @@ SELECT tuple_data_split('test1'::regclass, t_data, t_infomask, t_infomask2, t_bi
  {"\\x01000001","\\x00020200"}
 (1 row)
 
-SELECT * FROM fsm_page_contents(get_raw_page('test1', 'fsm', 0));
- fsm_page_contents 
--------------------
- 0: 254           +
- 1: 254           +
- 3: 254           +
- 7: 254           +
- 15: 254          +
- 31: 254          +
- 63: 254          +
- 127: 254         +
- 255: 254         +
- 511: 254         +
- 1023: 254        +
- 2047: 254        +
- 4095: 254        +
- fp_next_slot: 0  +
- 
-(1 row)
-
 DROP TABLE test1;
 -- check that using any of these functions with a partitioned table or index
 -- would fail
diff --git a/contrib/pageinspect/sql/page.sql b/contrib/pageinspect/sql/page.sql
index 8ac9991837..ee811759d5 100644
--- a/contrib/pageinspect/sql/page.sql
+++ b/contrib/pageinspect/sql/page.sql
@@ -1,26 +1,35 @@
 CREATE EXTENSION pageinspect;
 
-CREATE TABLE test1 (a int, b int);
-INSERT INTO test1 VALUES (16777217, 131584);
+CREATE TABLE test_rel_forks (a int);
+-- Make sure there are enough blocks in the heap for the FSM to be created.
+INSERT INTO test_rel_forks SELECT g from generate_series(1,10000) g;
 
-VACUUM test1;  -- set up FSM
+-- set up FSM and VM
+VACUUM test_rel_forks;
 
 -- The page contents can vary, so just test that it can be read
 -- successfully, but don't keep the output.
 
-SELECT octet_length(get_raw_page('test1', 'main', 0)) AS main_0;
-SELECT octet_length(get_raw_page('test1', 'main', 1)) AS main_1;
+SELECT octet_length(get_raw_page('test_rel_forks', 'main', 0)) AS main_0;
+SELECT octet_length(get_raw_page('test_rel_forks', 'main', 100)) AS main_100;
 
-SELECT octet_length(get_raw_page('test1', 'fsm', 0)) AS fsm_0;
-SELECT octet_length(get_raw_page('test1', 'fsm', 1)) AS fsm_1;
+SELECT octet_length(get_raw_page('test_rel_forks', 'fsm', 0)) AS fsm_0;
+SELECT octet_length(get_raw_page('test_rel_forks', 'fsm', 10)) AS fsm_10;
 
-SELECT octet_length(get_raw_page('test1', 'vm', 0)) AS vm_0;
-SELECT octet_length(get_raw_page('test1', 'vm', 1)) AS vm_1;
+SELECT octet_length(get_raw_page('test_rel_forks', 'vm', 0)) AS vm_0;
+SELECT octet_length(get_raw_page('test_rel_forks', 'vm', 1)) AS vm_1;
 
 SELECT octet_length(get_raw_page('xxx', 'main', 0));
-SELECT octet_length(get_raw_page('test1', 'xxx', 0));
+SELECT octet_length(get_raw_page('test_rel_forks', 'xxx', 0));
+
+SELECT * FROM fsm_page_contents(get_raw_page('test_rel_forks', 'fsm', 0));
+
+SELECT get_raw_page('test_rel_forks', 0) = get_raw_page('test_rel_forks', 'main', 0);
 
-SELECT get_raw_page('test1', 0) = get_raw_page('test1', 'main', 0);
+DROP TABLE test_rel_forks;
+
+CREATE TABLE test1 (a int, b int);
+INSERT INTO test1 VALUES (16777217, 131584);
 
 SELECT pagesize, version FROM page_header(get_raw_page('test1', 0));
 
@@ -29,8 +38,6 @@ SELECT page_checksum(get_raw_page('test1', 0), 0) IS NOT NULL AS silly_checksum_
 SELECT tuple_data_split('test1'::regclass, t_data, t_infomask, t_infomask2, t_bits)
     FROM heap_page_items(get_raw_page('test1', 0));
 
-SELECT * FROM fsm_page_contents(get_raw_page('test1', 'fsm', 0));
-
 DROP TABLE test1;
 
 -- check that using any of these functions with a partitioned table or index
diff --git a/doc/src/sgml/storage.sgml b/doc/src/sgml/storage.sgml
index 8ef2ac8010..cbdad0c3fb 100644
--- a/doc/src/sgml/storage.sgml
+++ b/doc/src/sgml/storage.sgml
@@ -590,12 +590,13 @@ tuple would otherwise be too big.
 <indexterm><primary>FSM</primary><see>Free Space Map</see></indexterm>
 
 <para>
-Each heap and index relation, except for hash indexes, has a Free Space Map
-(FSM) to keep track of available space in the relation. It's stored
-alongside the main relation data in a separate relation fork, named after the
-filenode number of the relation, plus a <literal>_fsm</literal> suffix. For example,
-if the filenode of a relation is 12345, the FSM is stored in a file called
-<filename>12345_fsm</filename>, in the same directory as the main relation file.
+Each heap relation, unless it is very small, and each index relation, except
+for hash indexes, has a Free Space Map (FSM) to keep track of available
+space in the relation. It's stored alongside the main relation data in a
+separate relation fork, named after the filenode number of the relation, plus
+a <literal>_fsm</literal> suffix. For example, if the filenode of a relation
+is 12345, the FSM is stored in a file called <filename>12345_fsm</filename>,
+in the same directory as the main relation file.
 </para>
 
 <para>
diff --git a/src/backend/access/brin/brin.c b/src/backend/access/brin/brin.c
index e95fbbcea7..7c5b1af764 100644
--- a/src/backend/access/brin/brin.c
+++ b/src/backend/access/brin/brin.c
@@ -1148,7 +1148,7 @@ terminate_brin_buildstate(BrinBuildState *state)
 		freespace = PageGetFreeSpace(page);
 		blk = BufferGetBlockNumber(state->bs_currentInsertBuf);
 		ReleaseBuffer(state->bs_currentInsertBuf);
-		RecordPageWithFreeSpace(state->bs_irel, blk, freespace);
+		RecordPageWithFreeSpace(state->bs_irel, blk, freespace, InvalidBlockNumber);
 		FreeSpaceMapVacuumRange(state->bs_irel, blk, blk + 1);
 	}
 
diff --git a/src/backend/access/brin/brin_pageops.c b/src/backend/access/brin/brin_pageops.c
index 040cb62e55..cd10458ddc 100644
--- a/src/backend/access/brin/brin_pageops.c
+++ b/src/backend/access/brin/brin_pageops.c
@@ -310,7 +310,7 @@ brin_doupdate(Relation idxrel, BlockNumber pagesPerRange,
 
 		if (extended)
 		{
-			RecordPageWithFreeSpace(idxrel, newblk, freespace);
+			RecordPageWithFreeSpace(idxrel, newblk, freespace, InvalidBlockNumber);
 			FreeSpaceMapVacuumRange(idxrel, newblk, newblk + 1);
 		}
 
@@ -461,7 +461,7 @@ brin_doinsert(Relation idxrel, BlockNumber pagesPerRange,
 
 	if (extended)
 	{
-		RecordPageWithFreeSpace(idxrel, blk, freespace);
+		RecordPageWithFreeSpace(idxrel, blk, freespace, InvalidBlockNumber);
 		FreeSpaceMapVacuumRange(idxrel, blk, blk + 1);
 	}
 
@@ -654,7 +654,7 @@ brin_page_cleanup(Relation idxrel, Buffer buf)
 
 	/* Measure free space and record it */
 	RecordPageWithFreeSpace(idxrel, BufferGetBlockNumber(buf),
-							br_page_get_freespace(page));
+							br_page_get_freespace(page), InvalidBlockNumber);
 }
 
 /*
@@ -703,7 +703,7 @@ brin_getinsertbuffer(Relation irel, Buffer oldbuf, Size itemsz,
 	/* Choose initial target page, re-using existing target if known */
 	newblk = RelationGetTargetBlock(irel);
 	if (newblk == InvalidBlockNumber)
-		newblk = GetPageWithFreeSpace(irel, itemsz);
+		newblk = GetPageWithFreeSpace(irel, itemsz, true);
 
 	/*
 	 * Loop until we find a page with sufficient free space.  By the time we
@@ -895,7 +895,7 @@ brin_initialize_empty_new_buffer(Relation idxrel, Buffer buffer)
 	 * pages whose FSM records were forgotten in a crash.
 	 */
 	RecordPageWithFreeSpace(idxrel, BufferGetBlockNumber(buffer),
-							br_page_get_freespace(page));
+							br_page_get_freespace(page), InvalidBlockNumber);
 }
 
 
diff --git a/src/backend/access/heap/hio.c b/src/backend/access/heap/hio.c
index b8b5871559..e59568e47e 100644
--- a/src/backend/access/heap/hio.c
+++ b/src/backend/access/heap/hio.c
@@ -239,8 +239,14 @@ RelationAddExtraBlocks(Relation relation, BulkInsertState bistate)
 		 * Immediately update the bottom level of the FSM.  This has a good
 		 * chance of making this page visible to other concurrently inserting
 		 * backends, and we want that to happen without delay.
+		 *
+		 * Since we know the table will end up with extraBlocks additional
+		 * pages, we pass the final number to avoid possible unnecessary
+		 * system calls and to make sure the FSM is created when we add
+		 * the first new page.
 		 */
-		RecordPageWithFreeSpace(relation, blockNum, freespace);
+		RecordPageWithFreeSpace(relation, blockNum, freespace,
+								firstBlock + extraBlocks);
 	}
 	while (--extraBlocks > 0);
 
@@ -377,20 +383,9 @@ RelationGetBufferForTuple(Relation relation, Size len,
 		 * We have no cached target page, so ask the FSM for an initial
 		 * target.
 		 */
-		targetBlock = GetPageWithFreeSpace(relation, len + saveFreeSpace);
-
-		/*
-		 * If the FSM knows nothing of the rel, try the last page before we
-		 * give up and extend.  This avoids one-tuple-per-page syndrome during
-		 * bootstrapping or in a recently-started system.
-		 */
-		if (targetBlock == InvalidBlockNumber)
-		{
-			BlockNumber nblocks = RelationGetNumberOfBlocks(relation);
-
-			if (nblocks > 0)
-				targetBlock = nblocks - 1;
-		}
+		targetBlock = GetPageWithFreeSpace(relation,
+										   len + saveFreeSpace,
+										   false);
 	}
 
 loop:
@@ -484,6 +479,14 @@ loop:
 		{
 			/* use this page as future insert target, too */
 			RelationSetTargetBlock(relation, targetBlock);
+
+			/*
+			 * In case we used an in-memory map of available blocks, reset
+			 * it for next use.
+			 */
+			if (targetBlock < HEAP_FSM_CREATION_THRESHOLD)
+				FSMClearLocalMap();
+
 			return buffer;
 		}
 
@@ -543,9 +546,12 @@ loop:
 
 			/*
 			 * Check if some other backend has extended a block for us while
-			 * we were waiting on the lock.
+			 * we were waiting on the lock.  We only check the FSM -- if there
+			 * isn't one we don't recheck the number of blocks.
 			 */
-			targetBlock = GetPageWithFreeSpace(relation, len + saveFreeSpace);
+			targetBlock = GetPageWithFreeSpace(relation,
+											   len + saveFreeSpace,
+											   true);
 
 			/*
 			 * If some other waiter has already extended the relation, we
@@ -625,5 +631,12 @@ loop:
 	 */
 	RelationSetTargetBlock(relation, BufferGetBlockNumber(buffer));
 
+	/*
+	 * In case we used an in-memory map of available blocks, reset
+	 * it for next use.  We do this unconditionally since after relation
+	 * extension we can't skip this based on the targetBlock.
+	 */
+	FSMClearLocalMap();
+
 	return buffer;
 }
diff --git a/src/backend/access/transam/xact.c b/src/backend/access/transam/xact.c
index d967400384..fa0620b301 100644
--- a/src/backend/access/transam/xact.c
+++ b/src/backend/access/transam/xact.c
@@ -48,6 +48,7 @@
 #include "replication/walsender.h"
 #include "storage/condition_variable.h"
 #include "storage/fd.h"
+#include "storage/freespace.h"
 #include "storage/lmgr.h"
 #include "storage/predicate.h"
 #include "storage/proc.h"
@@ -2488,6 +2489,12 @@ AbortTransaction(void)
 	pgstat_report_wait_end();
 	pgstat_progress_end_command();
 
+	/*
+	 * In case we aborted during RelationGetBufferForTuple(),
+	 * clear the local map of heap pages.
+	 */
+	FSMClearLocalMap();
+
 	/* Clean up buffer I/O and buffer context locks, too */
 	AbortBufferIO();
 	UnlockBuffers();
@@ -4709,6 +4716,13 @@ AbortSubTransaction(void)
 
 	pgstat_report_wait_end();
 	pgstat_progress_end_command();
+
+	/*
+	 * In case we aborted during RelationGetBufferForTuple(),
+	 * clear the local map of heap pages.
+	 */
+	FSMClearLocalMap();
+
 	AbortBufferIO();
 	UnlockBuffers();
 
diff --git a/src/backend/commands/vacuumlazy.c b/src/backend/commands/vacuumlazy.c
index 8134c52253..d2818dfad4 100644
--- a/src/backend/commands/vacuumlazy.c
+++ b/src/backend/commands/vacuumlazy.c
@@ -154,7 +154,7 @@ static BufferAccessStrategy vac_strategy;
 static void lazy_scan_heap(Relation onerel, int options,
 			   LVRelStats *vacrelstats, Relation *Irel, int nindexes,
 			   bool aggressive);
-static void lazy_vacuum_heap(Relation onerel, LVRelStats *vacrelstats);
+static void lazy_vacuum_heap(Relation onerel, LVRelStats *vacrelstats, BlockNumber nblocks);
 static bool lazy_check_needs_freeze(Buffer buf, bool *hastup);
 static void lazy_vacuum_index(Relation indrel,
 				  IndexBulkDeleteResult **stats,
@@ -759,7 +759,7 @@ lazy_scan_heap(Relation onerel, int options, LVRelStats *vacrelstats,
 			pgstat_progress_update_multi_param(2, hvp_index, hvp_val);
 
 			/* Remove tuples from heap */
-			lazy_vacuum_heap(onerel, vacrelstats);
+			lazy_vacuum_heap(onerel, vacrelstats, nblocks);
 
 			/*
 			 * Forget the now-vacuumed tuples, and press on, but be careful
@@ -897,7 +897,7 @@ lazy_scan_heap(Relation onerel, int options, LVRelStats *vacrelstats,
 			MarkBufferDirty(buf);
 			UnlockReleaseBuffer(buf);
 
-			RecordPageWithFreeSpace(onerel, blkno, freespace);
+			RecordPageWithFreeSpace(onerel, blkno, freespace, nblocks);
 			continue;
 		}
 
@@ -936,7 +936,7 @@ lazy_scan_heap(Relation onerel, int options, LVRelStats *vacrelstats,
 			}
 
 			UnlockReleaseBuffer(buf);
-			RecordPageWithFreeSpace(onerel, blkno, freespace);
+			RecordPageWithFreeSpace(onerel, blkno, freespace, nblocks);
 			continue;
 		}
 
@@ -1333,7 +1333,7 @@ lazy_scan_heap(Relation onerel, int options, LVRelStats *vacrelstats,
 		 * taken if there are no indexes.)
 		 */
 		if (vacrelstats->num_dead_tuples == prev_dead_count)
-			RecordPageWithFreeSpace(onerel, blkno, freespace);
+			RecordPageWithFreeSpace(onerel, blkno, freespace, nblocks);
 	}
 
 	/* report that everything is scanned and vacuumed */
@@ -1395,7 +1395,7 @@ lazy_scan_heap(Relation onerel, int options, LVRelStats *vacrelstats,
 		/* Remove tuples from heap */
 		pgstat_progress_update_param(PROGRESS_VACUUM_PHASE,
 									 PROGRESS_VACUUM_PHASE_VACUUM_HEAP);
-		lazy_vacuum_heap(onerel, vacrelstats);
+		lazy_vacuum_heap(onerel, vacrelstats, nblocks);
 		vacrelstats->num_index_scans++;
 	}
 
@@ -1466,9 +1466,10 @@ lazy_scan_heap(Relation onerel, int options, LVRelStats *vacrelstats,
  * Note: the reason for doing this as a second pass is we cannot remove
  * the tuples until we've removed their index entries, and we want to
  * process index entry removal in batches as large as possible.
+ * Note: nblocks is passed as an optimization for RecordPageWithFreeSpace().
  */
 static void
-lazy_vacuum_heap(Relation onerel, LVRelStats *vacrelstats)
+lazy_vacuum_heap(Relation onerel, LVRelStats *vacrelstats, BlockNumber nblocks)
 {
 	int			tupindex;
 	int			npages;
@@ -1505,7 +1506,7 @@ lazy_vacuum_heap(Relation onerel, LVRelStats *vacrelstats)
 		freespace = PageGetHeapFreeSpace(page);
 
 		UnlockReleaseBuffer(buf);
-		RecordPageWithFreeSpace(onerel, tblk, freespace);
+		RecordPageWithFreeSpace(onerel, tblk, freespace, nblocks);
 		npages++;
 	}
 
diff --git a/src/backend/storage/freespace/README b/src/backend/storage/freespace/README
index e7ff23b76f..abaec871a5 100644
--- a/src/backend/storage/freespace/README
+++ b/src/backend/storage/freespace/README
@@ -5,10 +5,11 @@ Free Space Map
 
 The purpose of the free space map is to quickly locate a page with enough
 free space to hold a tuple to be stored; or to determine that no such page
-exists and the relation must be extended by one page.  As of PostgreSQL 8.4
-each relation has its own, extensible free space map stored in a separate
-"fork" of its relation.  This eliminates the disadvantages of the former
-fixed-size FSM.
+exists and the relation must be extended by one page.  For very small heap
+relations, we simply iterate through all the pages in descending order.
+Otherwise, each relation (except for hash indexes) has its own, extensible
+free space map stored in a separate "fork" of its relation.  This eliminates
+the disadvantages of the fixed-size FSM used in PostgreSQL 8.3 and earlier.
 
 It is important to keep the map small so that it can be searched rapidly.
 Therefore, we don't attempt to record the exact free space on a page.
@@ -192,5 +193,3 @@ TODO
 ----
 
 - fastroot to avoid traversing upper nodes with just 1 child
-- use a different system for tables that fit into one FSM page, with a
-  mechanism to switch to the real thing as it grows.
diff --git a/src/backend/storage/freespace/freespace.c b/src/backend/storage/freespace/freespace.c
index 7c4ad1c449..2ab1cb58b7 100644
--- a/src/backend/storage/freespace/freespace.c
+++ b/src/backend/storage/freespace/freespace.c
@@ -76,6 +76,14 @@
 #define FSM_ROOT_LEVEL	(FSM_TREE_DEPTH - 1)
 #define FSM_BOTTOM_LEVEL 0
 
+/* Status codes for the local map. */
+
+/* Either already tried, or beyond the end of the relation */
+#define FSM_LOCAL_NOT_AVAIL 0x00
+
+/* Available to try */
+#define FSM_LOCAL_AVAIL		0x01
+
 /*
  * The internal FSM routines work on a logical addressing scheme. Each
  * level of the tree can be thought of as a separately addressable file.
@@ -89,6 +97,15 @@ typedef struct
 /* Address of the root page. */
 static const FSMAddress FSM_ROOT_ADDRESS = {FSM_ROOT_LEVEL, 0};
 
+/* Local map of block numbers for small heaps with no FSM. */
+typedef struct
+{
+	BlockNumber nblocks;
+	char		map[HEAP_FSM_CREATION_THRESHOLD];
+} FSMLocalMap;
+
+static FSMLocalMap fsm_local_map = {0, {FSM_LOCAL_NOT_AVAIL}};
+
 /* functions to navigate the tree */
 static FSMAddress fsm_get_child(FSMAddress parent, uint16 slot);
 static FSMAddress fsm_get_parent(FSMAddress child, uint16 *slot);
@@ -107,10 +124,14 @@ static Size fsm_space_cat_to_avail(uint8 cat);
 /* workhorse functions for various operations */
 static int fsm_set_and_search(Relation rel, FSMAddress addr, uint16 slot,
 				   uint8 newValue, uint8 minValue);
+static void fsm_local_set(Relation rel, BlockNumber curr_nblocks);
 static BlockNumber fsm_search(Relation rel, uint8 min_cat);
+static BlockNumber fsm_local_search(void);
 static uint8 fsm_vacuum_page(Relation rel, FSMAddress addr,
 				BlockNumber start, BlockNumber end,
 				bool *eof);
+static bool fsm_allow_writes(Relation rel, BlockNumber heapblk,
+				BlockNumber nblocks, BlockNumber *get_nblocks);
 
 
 /******** Public API ********/
@@ -127,13 +148,45 @@ static uint8 fsm_vacuum_page(Relation rel, FSMAddress addr,
  * amount of free space available on that page and then try again (see
  * RecordAndGetPageWithFreeSpace).  If InvalidBlockNumber is returned,
  * extend the relation.
+ *
+ * For very small heap relations that don't have a FSM, we try every page
+ * before extending the relation.  To keep track of which pages have been
+ * tried, initialize a local in-memory map of pages.
  */
 BlockNumber
-GetPageWithFreeSpace(Relation rel, Size spaceNeeded)
+GetPageWithFreeSpace(Relation rel, Size spaceNeeded, bool check_fsm_only)
 {
 	uint8		min_cat = fsm_space_needed_to_cat(spaceNeeded);
+	BlockNumber target_block,
+				nblocks;
+
+	/* First try the FSM, if it exists. */
+	target_block = fsm_search(rel, min_cat);
+
+	if (target_block == InvalidBlockNumber &&
+		rel->rd_rel->relkind == RELKIND_RELATION &&
+		!check_fsm_only)
+	{
+		nblocks = RelationGetNumberOfBlocks(rel);
 
-	return fsm_search(rel, min_cat);
+		if (nblocks > HEAP_FSM_CREATION_THRESHOLD)
+		{
+			/*
+			 * If the FSM knows nothing of the rel, try the last page before
+			 * we give up and extend.  This avoids one-tuple-per-page syndrome
+			 * during bootstrapping or in a recently-started system.
+			 */
+			target_block = nblocks - 1;
+		}
+		else if (nblocks > 0)
+		{
+			/* Create or update local map and get first candidate block. */
+			fsm_local_set(rel, nblocks);
+			target_block = fsm_local_search();
+		}
+	}
+
+	return target_block;
 }
 
 /*
@@ -144,16 +197,46 @@ GetPageWithFreeSpace(Relation rel, Size spaceNeeded)
  * also some effort to return a page close to the old page; if there's a
  * page with enough free space on the same FSM page where the old one page
  * is located, it is preferred.
+ *
+ * For very small heap relations that don't have a FSM, we update the local
+ * map to indicate we have tried a page, and return the next page to try.
  */
 BlockNumber
 RecordAndGetPageWithFreeSpace(Relation rel, BlockNumber oldPage,
 							  Size oldSpaceAvail, Size spaceNeeded)
 {
-	int			old_cat = fsm_space_avail_to_cat(oldSpaceAvail);
-	int			search_cat = fsm_space_needed_to_cat(spaceNeeded);
+	int			old_cat;
+	int			search_cat;
 	FSMAddress	addr;
 	uint16		slot;
 	int			search_slot;
+	BlockNumber nblocks = InvalidBlockNumber;
+
+	/* First try the local map, if it exists. */
+	if (oldPage < fsm_local_map.nblocks)
+	{
+		Assert(rel->rd_rel->relkind == RELKIND_RELATION &&
+			   fsm_local_map.map[oldPage] == FSM_LOCAL_AVAIL);
+
+		fsm_local_map.map[oldPage] = FSM_LOCAL_NOT_AVAIL;
+		return fsm_local_search();
+	}
+
+	if (!fsm_allow_writes(rel, oldPage, InvalidBlockNumber, &nblocks))
+	{
+		/*
+		 * If we have neither a local map nor a FSM, we probably just
+		 * tried the target block in the smgr relation entry and failed,
+		 * so we'll need to create the local map.
+		 */
+		fsm_local_set(rel, nblocks);
+		return fsm_local_search();
+	}
+
+	/* Normal FSM logic follows */
+
+	old_cat = fsm_space_avail_to_cat(oldSpaceAvail);
+	search_cat = fsm_space_needed_to_cat(spaceNeeded);
 
 	/* Get the location of the FSM byte representing the heap block */
 	addr = fsm_get_location(oldPage, &slot);
@@ -176,20 +259,40 @@ RecordAndGetPageWithFreeSpace(Relation rel, BlockNumber oldPage,
  * Note that if the new spaceAvail value is higher than the old value stored
  * in the FSM, the space might not become visible to searchers until the next
  * FreeSpaceMapVacuum call, which updates the upper level pages.
+ *
+ * Callers have no need for a local map.
  */
 void
-RecordPageWithFreeSpace(Relation rel, BlockNumber heapBlk, Size spaceAvail)
+RecordPageWithFreeSpace(Relation rel, BlockNumber heapBlk,
+						Size spaceAvail, BlockNumber nblocks)
 {
-	int			new_cat = fsm_space_avail_to_cat(spaceAvail);
+	int			new_cat;
 	FSMAddress	addr;
 	uint16		slot;
+	BlockNumber dummy;
+
+	if (!fsm_allow_writes(rel, heapBlk, nblocks, &dummy))
+		/* No FSM to update and no local map either */
+		return;
 
 	/* Get the location of the FSM byte representing the heap block */
 	addr = fsm_get_location(heapBlk, &slot);
 
+	new_cat = fsm_space_avail_to_cat(spaceAvail);
 	fsm_set_and_search(rel, addr, slot, new_cat, 0);
 }
 
+/*
+ * Clear the local map.  We must call this when we have found a block with
+ * enough free space, or when we extend the relation.
+ */
+void
+FSMClearLocalMap(void)
+{
+	fsm_local_map.nblocks = 0;
+	memset(&fsm_local_map.map, 0, sizeof(fsm_local_map.map));
+}
+
 /*
  * XLogRecordPageWithFreeSpace - like RecordPageWithFreeSpace, for use in
  *		WAL replay
@@ -204,6 +307,30 @@ XLogRecordPageWithFreeSpace(RelFileNode rnode, BlockNumber heapBlk,
 	BlockNumber blkno;
 	Buffer		buf;
 	Page		page;
+	bool		write_to_fsm;
+
+	/* This is meant to mirror the logic in fsm_allow_writes() */
+	if (heapBlk >= HEAP_FSM_CREATION_THRESHOLD)
+		write_to_fsm = true;
+	else
+	{
+		/* Open the relation at smgr level */
+		SMgrRelation smgr = smgropen(rnode, InvalidBackendId);
+
+		if (smgrexists(smgr, FSM_FORKNUM))
+			write_to_fsm = true;
+		else
+		{
+			BlockNumber heap_nblocks = smgrnblocks(smgr, MAIN_FORKNUM);
+			if (heap_nblocks > HEAP_FSM_CREATION_THRESHOLD)
+				write_to_fsm = true;
+			else
+				write_to_fsm = false;
+		}
+	}
+
+	if (!write_to_fsm)
+		return;
 
 	/* Get the location of the FSM byte representing the heap block */
 	addr = fsm_get_location(heapBlk, &slot);
@@ -904,3 +1031,115 @@ fsm_vacuum_page(Relation rel, FSMAddress addr,
 
 	return max_avail;
 }
+
+/*
+ * For heaps we prevent extension of the FSM unless the number of pages
+ * exceeds HEAP_FSM_CREATION_THRESHOLD.  For tables that don't already have
+ * a FSM, this will save an inode and a few kB of space.
+ *
+ * XXX The API is a little awkward -- if the caller passes a valid nblocks
+ * value, it can avoid invoking a system call.  If the caller passes
+ * InvalidBlockNumber and receives a false return value, it can get an
+ * up-to-date relation size from get_nblocks.
+ */
+static bool
+fsm_allow_writes(Relation rel, BlockNumber heapblk,
+				 BlockNumber nblocks, BlockNumber *get_nblocks)
+{
+	bool		skip_get_nblocks;
+
+	if (heapblk >= HEAP_FSM_CREATION_THRESHOLD)
+		return true;
+
+	/* Non-heap rels can always create a FSM. */
+	if (rel->rd_rel->relkind != RELKIND_RELATION)
+		return true;
+
+	/*
+	 * If the caller knows nblocks, we can avoid a system call later.
+	 * If it doesn't, maybe we have relpages from a previous VACUUM.
+	 * Since the table may have extended since then, we still have to
+	 * count the pages later if we can't return now.
+	 */
+	if (nblocks != InvalidBlockNumber)
+	{
+		if (nblocks > HEAP_FSM_CREATION_THRESHOLD)
+			return true;
+		else
+			skip_get_nblocks = true;
+	}
+	else
+	{
+		if (rel->rd_rel->relpages != InvalidBlockNumber &&
+			rel->rd_rel->relpages > HEAP_FSM_CREATION_THRESHOLD)
+			return true;
+		else
+			skip_get_nblocks = false;
+	}
+
+	RelationOpenSmgr(rel);
+	if (smgrexists(rel->rd_smgr, FSM_FORKNUM))
+		return true;
+
+	if (skip_get_nblocks)
+		return false;
+
+	/* last resort */
+	*get_nblocks = RelationGetNumberOfBlocks(rel);
+	if (*get_nblocks > HEAP_FSM_CREATION_THRESHOLD)
+		return true;
+	else
+		return false;
+}
+
+/*
+ * Initialize or update the local map of blocks to try, for when there is
+ * no FSM.
+ *
+ * When we initialize the map, flag all blocks as available to try.  If a
+ * caller wants to reset the map after relation extension, only flag new
+ * blocks as available.
+ */
+static void
+fsm_local_set(Relation rel, BlockNumber curr_nblocks)
+{
+	BlockNumber blkno,
+				cached_target_block;
+
+	/*
+	 * Mark blocks available starting after the last block we have mapped,
+	 * and ending at the current last block in the relation.
+	 */
+	for (blkno = fsm_local_map.nblocks; blkno < curr_nblocks; blkno++)
+		fsm_local_map.map[blkno] = FSM_LOCAL_AVAIL;
+
+	/* Cache the number of blocks. */
+	fsm_local_map.nblocks = curr_nblocks;
+
+	/* Set the status of the cached target block to 'unavailable'. */
+	cached_target_block = RelationGetTargetBlock(rel);
+	if (cached_target_block != InvalidBlockNumber &&
+		cached_target_block < curr_nblocks)
+		fsm_local_map.map[cached_target_block] = FSM_LOCAL_NOT_AVAIL;
+}
+
+/*
+ * Search the local map for an available block to try, in descending order.
+ *
+ * For use when there is no FSM.
+ */
+static BlockNumber
+fsm_local_search(void)
+{
+	BlockNumber		target_block = fsm_local_map.nblocks;
+
+	do
+	{
+		target_block--;
+		if (fsm_local_map.map[target_block] == FSM_LOCAL_AVAIL)
+			return target_block;
+	}
+	while (target_block > 0);
+
+	return InvalidBlockNumber;
+}
diff --git a/src/backend/storage/freespace/indexfsm.c b/src/backend/storage/freespace/indexfsm.c
index e21047b96f..88a71ae548 100644
--- a/src/backend/storage/freespace/indexfsm.c
+++ b/src/backend/storage/freespace/indexfsm.c
@@ -37,7 +37,7 @@
 BlockNumber
 GetFreeIndexPage(Relation rel)
 {
-	BlockNumber blkno = GetPageWithFreeSpace(rel, BLCKSZ / 2);
+	BlockNumber blkno = GetPageWithFreeSpace(rel, BLCKSZ / 2, true);
 
 	if (blkno != InvalidBlockNumber)
 		RecordUsedIndexPage(rel, blkno);
@@ -51,7 +51,7 @@ GetFreeIndexPage(Relation rel)
 void
 RecordFreeIndexPage(Relation rel, BlockNumber freeBlock)
 {
-	RecordPageWithFreeSpace(rel, freeBlock, BLCKSZ - 1);
+	RecordPageWithFreeSpace(rel, freeBlock, BLCKSZ - 1, InvalidBlockNumber);
 }
 
 
@@ -61,7 +61,7 @@ RecordFreeIndexPage(Relation rel, BlockNumber freeBlock)
 void
 RecordUsedIndexPage(Relation rel, BlockNumber usedBlock)
 {
-	RecordPageWithFreeSpace(rel, usedBlock, 0);
+	RecordPageWithFreeSpace(rel, usedBlock, 0, InvalidBlockNumber);
 }
 
 /*
diff --git a/src/include/storage/freespace.h b/src/include/storage/freespace.h
index 726eb30fb8..8b2651db04 100644
--- a/src/include/storage/freespace.h
+++ b/src/include/storage/freespace.h
@@ -18,15 +18,20 @@
 #include "storage/relfilenode.h"
 #include "utils/relcache.h"
 
+/* Only create the FSM if the heap has greater than this many blocks */
+#define HEAP_FSM_CREATION_THRESHOLD 4
+
 /* prototypes for public functions in freespace.c */
 extern Size GetRecordedFreeSpace(Relation rel, BlockNumber heapBlk);
-extern BlockNumber GetPageWithFreeSpace(Relation rel, Size spaceNeeded);
+extern BlockNumber GetPageWithFreeSpace(Relation rel, Size spaceNeeded,
+							bool check_fsm_only);
 extern BlockNumber RecordAndGetPageWithFreeSpace(Relation rel,
 							  BlockNumber oldPage,
 							  Size oldSpaceAvail,
 							  Size spaceNeeded);
 extern void RecordPageWithFreeSpace(Relation rel, BlockNumber heapBlk,
-						Size spaceAvail);
+						Size spaceAvail, BlockNumber nblocks);
+extern void FSMClearLocalMap(void);
 extern void XLogRecordPageWithFreeSpace(RelFileNode rnode, BlockNumber heapBlk,
 							Size spaceAvail);
 
diff --git a/src/test/regress/expected/fsm.out b/src/test/regress/expected/fsm.out
new file mode 100644
index 0000000000..4c44c4bd6e
--- /dev/null
+++ b/src/test/regress/expected/fsm.out
@@ -0,0 +1,62 @@
+--
+-- Free Space Map test
+--
+CREATE TABLE fsm_check_size (num int, str text);
+-- Fill 2 blocks with as many large records as will fit
+-- No FSM
+INSERT INTO fsm_check_size SELECT g, rpad('', 1024, 'a')
+FROM generate_series(1,7*2) g;
+VACUUM fsm_check_size;
+SELECT pg_relation_size('fsm_check_size', 'main') AS heap_size,
+pg_relation_size('fsm_check_size', 'fsm') AS fsm_size;
+ heap_size | fsm_size 
+-----------+----------
+     16384 |        0
+(1 row)
+
+-- Clear some space on block 0
+DELETE FROM fsm_check_size where num <= 5;
+VACUUM fsm_check_size;
+-- Insert small record in block 1 to set the cached smgr targetBlock
+INSERT INTO fsm_check_size values(99, 'b');
+-- Insert large record and make sure it goes in block 0 rather than
+-- causing the relation to extend
+INSERT INTO fsm_check_size values (101, rpad('', 1024, 'a'));
+SELECT pg_relation_size('fsm_check_size', 'main') AS heap_size,
+pg_relation_size('fsm_check_size', 'fsm') AS fsm_size;
+ heap_size | fsm_size 
+-----------+----------
+     16384 |        0
+(1 row)
+
+-- Extend table with enough blocks to exceed the FSM threshold
+-- FSM is created and extended to 3 blocks
+INSERT INTO fsm_check_size SELECT g, 'c' FROM generate_series(200,3000) g;
+VACUUM fsm_check_size;
+SELECT pg_relation_size('fsm_check_size', 'fsm') AS fsm_size;
+ fsm_size 
+----------
+    24576
+(1 row)
+
+-- Truncate heap to 1 block
+-- No change in FSM
+DELETE FROM fsm_check_size WHERE num > 7;
+VACUUM fsm_check_size;
+SELECT pg_relation_size('fsm_check_size', 'fsm') AS fsm_size;
+ fsm_size 
+----------
+    24576
+(1 row)
+
+-- Truncate heap to 0 blocks
+-- FSM now truncated to 2 blocks
+DELETE FROM fsm_check_size;
+VACUUM fsm_check_size;
+SELECT pg_relation_size('fsm_check_size', 'fsm') AS fsm_size;
+ fsm_size 
+----------
+    16384
+(1 row)
+
+DROP TABLE fsm_check_size;
diff --git a/src/test/regress/parallel_schedule b/src/test/regress/parallel_schedule
index cc0bbf5db9..bb0a151127 100644
--- a/src/test/regress/parallel_schedule
+++ b/src/test/regress/parallel_schedule
@@ -68,6 +68,11 @@ test: create_aggregate create_function_3 create_cast constraints triggers inheri
 # ----------
 test: sanity_check
 
+# ----------
+# fsm does a vacuum, and running it in parallel seems to prevent heap truncation.
+# ----------
+test: fsm
+
 # ----------
 # Believe it or not, select creates a table, subsequent
 # tests need.
diff --git a/src/test/regress/sql/fsm.sql b/src/test/regress/sql/fsm.sql
new file mode 100644
index 0000000000..fad99da1c2
--- /dev/null
+++ b/src/test/regress/sql/fsm.sql
@@ -0,0 +1,46 @@
+--
+-- Free Space Map test
+--
+
+CREATE TABLE fsm_check_size (num int, str text);
+
+-- Fill 2 blocks with as many large records as will fit
+-- No FSM
+INSERT INTO fsm_check_size SELECT g, rpad('', 1024, 'a')
+FROM generate_series(1,7*2) g;
+VACUUM fsm_check_size;
+SELECT pg_relation_size('fsm_check_size', 'main') AS heap_size,
+pg_relation_size('fsm_check_size', 'fsm') AS fsm_size;
+
+-- Clear some space on block 0
+DELETE FROM fsm_check_size where num <= 5;
+VACUUM fsm_check_size;
+
+-- Insert small record in block 1 to set the cached smgr targetBlock
+INSERT INTO fsm_check_size values(99, 'b');
+
+-- Insert large record and make sure it goes in block 0 rather than
+-- causing the relation to extend
+INSERT INTO fsm_check_size values (101, rpad('', 1024, 'a'));
+SELECT pg_relation_size('fsm_check_size', 'main') AS heap_size,
+pg_relation_size('fsm_check_size', 'fsm') AS fsm_size;
+
+-- Extend table with enough blocks to exceed the FSM threshold
+-- FSM is created and extended to 3 blocks
+INSERT INTO fsm_check_size SELECT g, 'c' FROM generate_series(200,3000) g;
+VACUUM fsm_check_size;
+SELECT pg_relation_size('fsm_check_size', 'fsm') AS fsm_size;
+
+-- Truncate heap to 1 block
+-- No change in FSM
+DELETE FROM fsm_check_size WHERE num > 7;
+VACUUM fsm_check_size;
+SELECT pg_relation_size('fsm_check_size', 'fsm') AS fsm_size;
+
+-- Truncate heap to 0 blocks
+-- FSM now truncated to 2 blocks
+DELETE FROM fsm_check_size;
+VACUUM fsm_check_size;
+SELECT pg_relation_size('fsm_check_size', 'fsm') AS fsm_size;
+
+DROP TABLE fsm_check_size;
-- 
2.17.1

v10-0002-During-pg_upgrade-skip-transfer-of-FSMs-if-they.patchtext/x-patch; charset=US-ASCII; name=v10-0002-During-pg_upgrade-skip-transfer-of-FSMs-if-they.patchDownload
From 2e02985513957aa0e19a3bb9e1ebf5e15adcd55c Mon Sep 17 00:00:00 2001
From: John Naylor <jcnaylor@gmail.com>
Date: Thu, 6 Dec 2018 10:49:53 -0600
Subject: [PATCH v10 2/2] During pg_upgrade, skip transfer of FSMs if they 
 wouldn't have been created on the new cluster.

---
 src/bin/pg_upgrade/info.c        | 11 +++++--
 src/bin/pg_upgrade/pg_upgrade.h  |  6 +++-
 src/bin/pg_upgrade/relfilenode.c | 55 +++++++++++++++++++-------------
 3 files changed, 47 insertions(+), 25 deletions(-)

diff --git a/src/bin/pg_upgrade/info.c b/src/bin/pg_upgrade/info.c
index fd0b44c3ce..31a24e0bec 100644
--- a/src/bin/pg_upgrade/info.c
+++ b/src/bin/pg_upgrade/info.c
@@ -200,6 +200,7 @@ create_rel_filename_map(const char *old_data, const char *new_data,
 
 	map->old_db_oid = old_db->db_oid;
 	map->new_db_oid = new_db->db_oid;
+	map->relkind = old_rel->relkind;
 
 	/*
 	 * old_relfilenode might differ from pg_class.oid (and hence
@@ -418,6 +419,7 @@ get_rel_infos(ClusterInfo *cluster, DbInfo *dbinfo)
 	char	   *nspname = NULL;
 	char	   *relname = NULL;
 	char	   *tablespace = NULL;
+	char	   *relkind = NULL;
 	int			i_spclocation,
 				i_nspname,
 				i_relname,
@@ -425,7 +427,8 @@ get_rel_infos(ClusterInfo *cluster, DbInfo *dbinfo)
 				i_indtable,
 				i_toastheap,
 				i_relfilenode,
-				i_reltablespace;
+				i_reltablespace,
+				i_relkind;
 	char		query[QUERY_ALLOC];
 	char	   *last_namespace = NULL,
 			   *last_tablespace = NULL;
@@ -497,7 +500,7 @@ get_rel_infos(ClusterInfo *cluster, DbInfo *dbinfo)
 	 */
 	snprintf(query + strlen(query), sizeof(query) - strlen(query),
 			 "SELECT all_rels.*, n.nspname, c.relname, "
-			 "  c.relfilenode, c.reltablespace, %s "
+			 "  c.relfilenode, c.reltablespace, c.relkind, %s "
 			 "FROM (SELECT * FROM regular_heap "
 			 "      UNION ALL "
 			 "      SELECT * FROM toast_heap "
@@ -529,6 +532,7 @@ get_rel_infos(ClusterInfo *cluster, DbInfo *dbinfo)
 	i_relfilenode = PQfnumber(res, "relfilenode");
 	i_reltablespace = PQfnumber(res, "reltablespace");
 	i_spclocation = PQfnumber(res, "spclocation");
+	i_relkind = PQfnumber(res, "relkind");
 
 	for (relnum = 0; relnum < ntups; relnum++)
 	{
@@ -558,6 +562,9 @@ get_rel_infos(ClusterInfo *cluster, DbInfo *dbinfo)
 		relname = PQgetvalue(res, relnum, i_relname);
 		curr->relname = pg_strdup(relname);
 
+		relkind = PQgetvalue(res, relnum, i_relkind);
+		curr->relkind = relkind[0];
+
 		curr->relfilenode = atooid(PQgetvalue(res, relnum, i_relfilenode));
 		curr->tblsp_alloc = false;
 
diff --git a/src/bin/pg_upgrade/pg_upgrade.h b/src/bin/pg_upgrade/pg_upgrade.h
index 51bd211d46..8eda9c1f4a 100644
--- a/src/bin/pg_upgrade/pg_upgrade.h
+++ b/src/bin/pg_upgrade/pg_upgrade.h
@@ -147,6 +147,7 @@ typedef struct
 	char	   *tablespace;		/* tablespace path; "" for cluster default */
 	bool		nsp_alloc;		/* should nspname be freed? */
 	bool		tblsp_alloc;	/* should tablespace be freed? */
+	char		relkind;		/* relation relkind -- see pg_class.h */
 } RelInfo;
 
 typedef struct
@@ -173,9 +174,12 @@ typedef struct
 	 */
 	Oid			old_relfilenode;
 	Oid			new_relfilenode;
-	/* the rest are used only for logging and error reporting */
+
+	/* These are used only for logging and error reporting. */
 	char	   *nspname;		/* namespaces */
 	char	   *relname;
+
+	char		relkind;		/* relation relkind -- see pg_class.h */
 } FileNameMap;
 
 /*
diff --git a/src/bin/pg_upgrade/relfilenode.c b/src/bin/pg_upgrade/relfilenode.c
index 3b16c92a02..b883d0dd4d 100644
--- a/src/bin/pg_upgrade/relfilenode.c
+++ b/src/bin/pg_upgrade/relfilenode.c
@@ -14,10 +14,11 @@
 #include <sys/stat.h>
 #include "catalog/pg_class_d.h"
 #include "access/transam.h"
+#include "storage/freespace.h"
 
 
 static void transfer_single_new_db(FileNameMap *maps, int size, char *old_tablespace);
-static void transfer_relfile(FileNameMap *map, const char *suffix, bool vm_must_add_frozenbit);
+static Size transfer_relfile(FileNameMap *map, const char *suffix, bool vm_must_add_frozenbit);
 
 
 /*
@@ -144,6 +145,7 @@ transfer_single_new_db(FileNameMap *maps, int size, char *old_tablespace)
 	int			mapnum;
 	bool		vm_crashsafe_match = true;
 	bool		vm_must_add_frozenbit = false;
+	Size		first_seg_size = 0;
 
 	/*
 	 * Do the old and new cluster disagree on the crash-safetiness of the vm
@@ -165,18 +167,22 @@ transfer_single_new_db(FileNameMap *maps, int size, char *old_tablespace)
 		if (old_tablespace == NULL ||
 			strcmp(maps[mapnum].old_tablespace, old_tablespace) == 0)
 		{
-			/* transfer primary file */
-			transfer_relfile(&maps[mapnum], "", vm_must_add_frozenbit);
+			/* Transfer main fork and return size of the first segment. */
+			first_seg_size = transfer_relfile(&maps[mapnum], "", vm_must_add_frozenbit);
 
 			/* fsm/vm files added in PG 8.4 */
 			if (GET_MAJOR_VERSION(old_cluster.major_version) >= 804)
 			{
 				/*
-				 * Copy/link any fsm and vm files, if they exist
+				 * Copy/link any fsm and vm files, if they exist and if they would
+				 * be created in the new cluster.
 				 */
-				transfer_relfile(&maps[mapnum], "_fsm", vm_must_add_frozenbit);
+				if (maps[mapnum].relkind != RELKIND_RELATION ||
+					first_seg_size > HEAP_FSM_CREATION_THRESHOLD * BLCKSZ ||
+					GET_MAJOR_VERSION(new_cluster.major_version) <= 1100)
+					(void) transfer_relfile(&maps[mapnum], "_fsm", vm_must_add_frozenbit);
 				if (vm_crashsafe_match)
-					transfer_relfile(&maps[mapnum], "_vm", vm_must_add_frozenbit);
+					(void) transfer_relfile(&maps[mapnum], "_vm", vm_must_add_frozenbit);
 			}
 		}
 	}
@@ -190,7 +196,7 @@ transfer_single_new_db(FileNameMap *maps, int size, char *old_tablespace)
  * is true, visibility map forks are converted and rewritten, even in link
  * mode.
  */
-static void
+static Size
 transfer_relfile(FileNameMap *map, const char *type_suffix, bool vm_must_add_frozenbit)
 {
 	char		old_file[MAXPGPATH];
@@ -198,6 +204,8 @@ transfer_relfile(FileNameMap *map, const char *type_suffix, bool vm_must_add_fro
 	int			segno;
 	char		extent_suffix[65];
 	struct stat statbuf;
+	int			sret;
+	Size		first_seg_size = 0;
 
 	/*
 	 * Now copy/link any related segments as well. Remember, PG breaks large
@@ -226,26 +234,29 @@ transfer_relfile(FileNameMap *map, const char *type_suffix, bool vm_must_add_fro
 				 type_suffix,
 				 extent_suffix);
 
-		/* Is it an extent, fsm, or vm file? */
-		if (type_suffix[0] != '\0' || segno != 0)
-		{
-			/* Did file open fail? */
-			if (stat(old_file, &statbuf) != 0)
-			{
-				/* File does not exist?  That's OK, just return */
-				if (errno == ENOENT)
-					return;
-				else
-					pg_fatal("error while checking for file existence \"%s.%s\" (\"%s\" to \"%s\"): %s\n",
-							 map->nspname, map->relname, old_file, new_file,
-							 strerror(errno));
-			}
+		sret = stat(old_file, &statbuf);
 
+		/* Save the size of the first segment of the main fork. */
+		if (type_suffix[0] == '\0' && segno == 0)
+			first_seg_size = statbuf.st_size;
+
+		/* The file must be an extent, fsm, or vm. */
+		else if (sret == 0)
+		{
 			/* If file is empty, just return */
 			if (statbuf.st_size == 0)
-				return;
+				return first_seg_size;
 		}
 
+		/* Did file open fail? */
+		else if (errno == ENOENT)
+			/* File does not exist?  That's OK, just return */
+			return first_seg_size;
+		else
+			pg_fatal("error while checking for file existence \"%s.%s\" (\"%s\" to \"%s\"): %s\n",
+					 map->nspname, map->relname, old_file, new_file,
+					 strerror(errno));
+
 		unlink(new_file);
 
 		/* Copying files might take some time, so give feedback. */
-- 
2.17.1

#53Amit Kapila
amit.kapila16@gmail.com
In reply to: John Naylor (#52)
Re: WIP: Avoid creation of the free space map for small tables

On Thu, Dec 6, 2018 at 10:53 PM John Naylor <jcnaylor@gmail.com> wrote:

I've added an additional regression test for finding the right block
and removed a test I thought was redundant. I've kept the test file in
its own schedule.

+# ----------
+# fsm does a vacuum, and running it in parallel seems to prevent heap
truncation.
+# ----------
+test: fsm
+

It is not clear to me from the comment why running it in parallel
prevents heap truncation, can you explain what behavior are you seeing
and what makes you think that running it in parallel caused it?

--
With Regards,
Amit Kapila.
EnterpriseDB: http://www.enterprisedb.com

#54John Naylor
jcnaylor@gmail.com
In reply to: Amit Kapila (#53)
Re: WIP: Avoid creation of the free space map for small tables

On 12/6/18, Amit Kapila <amit.kapila16@gmail.com> wrote:

On Thu, Dec 6, 2018 at 10:53 PM John Naylor <jcnaylor@gmail.com> wrote:

I've added an additional regression test for finding the right block
and removed a test I thought was redundant. I've kept the test file in
its own schedule.

+# ----------
+# fsm does a vacuum, and running it in parallel seems to prevent heap
truncation.
+# ----------
+test: fsm
+

It is not clear to me from the comment why running it in parallel
prevents heap truncation, can you explain what behavior are you seeing
and what makes you think that running it in parallel caused it?

One of the tests deletes all records from the relation and vacuums. In
serial schedule, the heap and FSM are truncated; in parallel they are
not. Make check fails, since since the tests measure relation size.
Taking a closer look, I'm even more alarmed to discover that vacuum
doesn't even seem to remove deleted rows in parallel schedule (that
was in the last test I added), which makes no sense and causes that
test to fail. I looked in vacuum.sql for possible clues, but didn't
see any. I'll have to investigate further.

-John Naylor

#55Amit Kapila
amit.kapila16@gmail.com
In reply to: John Naylor (#54)
1 attachment(s)
Re: WIP: Avoid creation of the free space map for small tables

On Fri, Dec 7, 2018 at 7:25 PM John Naylor <jcnaylor@gmail.com> wrote:

On 12/6/18, Amit Kapila <amit.kapila16@gmail.com> wrote:

On Thu, Dec 6, 2018 at 10:53 PM John Naylor <jcnaylor@gmail.com> wrote:

I've added an additional regression test for finding the right block
and removed a test I thought was redundant. I've kept the test file in
its own schedule.

+# ----------
+# fsm does a vacuum, and running it in parallel seems to prevent heap
truncation.
+# ----------
+test: fsm
+

It is not clear to me from the comment why running it in parallel
prevents heap truncation, can you explain what behavior are you seeing
and what makes you think that running it in parallel caused it?

One of the tests deletes all records from the relation and vacuums. In
serial schedule, the heap and FSM are truncated; in parallel they are
not. Make check fails, since since the tests measure relation size.
Taking a closer look, I'm even more alarmed to discover that vacuum
doesn't even seem to remove deleted rows in parallel schedule (that
was in the last test I added), which makes no sense and causes that
test to fail. I looked in vacuum.sql for possible clues, but didn't
see any.

I couldn't resist the temptation to figure out what's going on here.
The newly added tests have deletes followed by vacuum and then you
check whether the vacuum has removed the data by checking heap and or
FSM size. Now, when you run such a test in parallel, the vacuum can
sometimes skip removing the rows because there are parallel
transactions open which can see the deleted rows. You can easily
verify this phenomenon by running the newly added tests in one session
in psql when there is another parallel session which has an open
transaction. For example:

Session-1
Begin;
Insert into foo values(1);

Session-2
\i fsm.sql

Now, you should see the results similar to what you are seeing when
you ran the fsm test by adding it to one of the parallel group. Can
you test this at your end and confirm whether my analysis is correct
or not.

So, you can keep the test as you have in parallel_schedule, but
comment needs to be changed. Also, you need to add the new test in
serial_schedule. I have done both the changes in the attached patch,
kindly confirm if this looks correct to you.

--
With Regards,
Amit Kapila.
EnterpriseDB: http://www.enterprisedb.com

Attachments:

v11-0001-Avoid-creation-of-the-free-space-map-for-small-table.patchapplication/octet-stream; name=v11-0001-Avoid-creation-of-the-free-space-map-for-small-table.patchDownload
From ab1ced145c43b0adadd9b1219ceaeb3553885e08 Mon Sep 17 00:00:00 2001
From: Amit Kapila <akapila@postgresql.org>
Date: Sat, 8 Dec 2018 18:30:43 +0530
Subject: [PATCH] Avoid creation of the free space map for small tables.

The FSM isn't created if the heap has 4 blocks or fewer. If the last
known target block has insufficient space, try every block before extending
the heap.

If a heap with a FSM is truncated back to below the threshold, the FSM
stays around and can be used as usual.
---
 contrib/pageinspect/expected/page.out     |  77 ++++-----
 contrib/pageinspect/sql/page.sql          |  33 ++--
 doc/src/sgml/storage.sgml                 |  13 +-
 src/backend/access/brin/brin.c            |   2 +-
 src/backend/access/brin/brin_pageops.c    |  10 +-
 src/backend/access/heap/hio.c             |  47 ++++--
 src/backend/access/transam/xact.c         |  14 ++
 src/backend/commands/vacuumlazy.c         |  17 +-
 src/backend/storage/freespace/README      |  11 +-
 src/backend/storage/freespace/freespace.c | 251 +++++++++++++++++++++++++++++-
 src/backend/storage/freespace/indexfsm.c  |   6 +-
 src/include/storage/freespace.h           |   9 +-
 src/test/regress/expected/fsm.out         |  62 ++++++++
 src/test/regress/parallel_schedule        |   6 +
 src/test/regress/serial_schedule          |   1 +
 src/test/regress/sql/fsm.sql              |  46 ++++++
 16 files changed, 500 insertions(+), 105 deletions(-)
 create mode 100644 src/test/regress/expected/fsm.out
 create mode 100644 src/test/regress/sql/fsm.sql

diff --git a/contrib/pageinspect/expected/page.out b/contrib/pageinspect/expected/page.out
index 3fcd9fb..83e5910 100644
--- a/contrib/pageinspect/expected/page.out
+++ b/contrib/pageinspect/expected/page.out
@@ -1,48 +1,69 @@
 CREATE EXTENSION pageinspect;
-CREATE TABLE test1 (a int, b int);
-INSERT INTO test1 VALUES (16777217, 131584);
-VACUUM test1;  -- set up FSM
+CREATE TABLE test_rel_forks (a int);
+-- Make sure there are enough blocks in the heap for the FSM to be created.
+INSERT INTO test_rel_forks SELECT g from generate_series(1,10000) g;
+-- set up FSM and VM
+VACUUM test_rel_forks;
 -- The page contents can vary, so just test that it can be read
 -- successfully, but don't keep the output.
-SELECT octet_length(get_raw_page('test1', 'main', 0)) AS main_0;
+SELECT octet_length(get_raw_page('test_rel_forks', 'main', 0)) AS main_0;
  main_0 
 --------
    8192
 (1 row)
 
-SELECT octet_length(get_raw_page('test1', 'main', 1)) AS main_1;
-ERROR:  block number 1 is out of range for relation "test1"
-SELECT octet_length(get_raw_page('test1', 'fsm', 0)) AS fsm_0;
+SELECT octet_length(get_raw_page('test_rel_forks', 'main', 100)) AS main_100;
+ERROR:  block number 100 is out of range for relation "test_rel_forks"
+SELECT octet_length(get_raw_page('test_rel_forks', 'fsm', 0)) AS fsm_0;
  fsm_0 
 -------
   8192
 (1 row)
 
-SELECT octet_length(get_raw_page('test1', 'fsm', 1)) AS fsm_1;
- fsm_1 
--------
-  8192
-(1 row)
-
-SELECT octet_length(get_raw_page('test1', 'vm', 0)) AS vm_0;
+SELECT octet_length(get_raw_page('test_rel_forks', 'fsm', 10)) AS fsm_10;
+ERROR:  block number 10 is out of range for relation "test_rel_forks"
+SELECT octet_length(get_raw_page('test_rel_forks', 'vm', 0)) AS vm_0;
  vm_0 
 ------
  8192
 (1 row)
 
-SELECT octet_length(get_raw_page('test1', 'vm', 1)) AS vm_1;
-ERROR:  block number 1 is out of range for relation "test1"
+SELECT octet_length(get_raw_page('test_rel_forks', 'vm', 1)) AS vm_1;
+ERROR:  block number 1 is out of range for relation "test_rel_forks"
 SELECT octet_length(get_raw_page('xxx', 'main', 0));
 ERROR:  relation "xxx" does not exist
-SELECT octet_length(get_raw_page('test1', 'xxx', 0));
+SELECT octet_length(get_raw_page('test_rel_forks', 'xxx', 0));
 ERROR:  invalid fork name
 HINT:  Valid fork names are "main", "fsm", "vm", and "init".
-SELECT get_raw_page('test1', 0) = get_raw_page('test1', 'main', 0);
+SELECT * FROM fsm_page_contents(get_raw_page('test_rel_forks', 'fsm', 0));
+ fsm_page_contents 
+-------------------
+ 0: 192           +
+ 1: 192           +
+ 3: 192           +
+ 7: 192           +
+ 15: 192          +
+ 31: 192          +
+ 63: 192          +
+ 127: 192         +
+ 255: 192         +
+ 511: 192         +
+ 1023: 192        +
+ 2047: 192        +
+ 4095: 192        +
+ fp_next_slot: 0  +
+ 
+(1 row)
+
+SELECT get_raw_page('test_rel_forks', 0) = get_raw_page('test_rel_forks', 'main', 0);
  ?column? 
 ----------
  t
 (1 row)
 
+DROP TABLE test_rel_forks;
+CREATE TABLE test1 (a int, b int);
+INSERT INTO test1 VALUES (16777217, 131584);
 SELECT pagesize, version FROM page_header(get_raw_page('test1', 0));
  pagesize | version 
 ----------+---------
@@ -62,26 +83,6 @@ SELECT tuple_data_split('test1'::regclass, t_data, t_infomask, t_infomask2, t_bi
  {"\\x01000001","\\x00020200"}
 (1 row)
 
-SELECT * FROM fsm_page_contents(get_raw_page('test1', 'fsm', 0));
- fsm_page_contents 
--------------------
- 0: 254           +
- 1: 254           +
- 3: 254           +
- 7: 254           +
- 15: 254          +
- 31: 254          +
- 63: 254          +
- 127: 254         +
- 255: 254         +
- 511: 254         +
- 1023: 254        +
- 2047: 254        +
- 4095: 254        +
- fp_next_slot: 0  +
- 
-(1 row)
-
 DROP TABLE test1;
 -- check that using any of these functions with a partitioned table or index
 -- would fail
diff --git a/contrib/pageinspect/sql/page.sql b/contrib/pageinspect/sql/page.sql
index 8ac9991..ee81175 100644
--- a/contrib/pageinspect/sql/page.sql
+++ b/contrib/pageinspect/sql/page.sql
@@ -1,26 +1,35 @@
 CREATE EXTENSION pageinspect;
 
-CREATE TABLE test1 (a int, b int);
-INSERT INTO test1 VALUES (16777217, 131584);
+CREATE TABLE test_rel_forks (a int);
+-- Make sure there are enough blocks in the heap for the FSM to be created.
+INSERT INTO test_rel_forks SELECT g from generate_series(1,10000) g;
 
-VACUUM test1;  -- set up FSM
+-- set up FSM and VM
+VACUUM test_rel_forks;
 
 -- The page contents can vary, so just test that it can be read
 -- successfully, but don't keep the output.
 
-SELECT octet_length(get_raw_page('test1', 'main', 0)) AS main_0;
-SELECT octet_length(get_raw_page('test1', 'main', 1)) AS main_1;
+SELECT octet_length(get_raw_page('test_rel_forks', 'main', 0)) AS main_0;
+SELECT octet_length(get_raw_page('test_rel_forks', 'main', 100)) AS main_100;
 
-SELECT octet_length(get_raw_page('test1', 'fsm', 0)) AS fsm_0;
-SELECT octet_length(get_raw_page('test1', 'fsm', 1)) AS fsm_1;
+SELECT octet_length(get_raw_page('test_rel_forks', 'fsm', 0)) AS fsm_0;
+SELECT octet_length(get_raw_page('test_rel_forks', 'fsm', 10)) AS fsm_10;
 
-SELECT octet_length(get_raw_page('test1', 'vm', 0)) AS vm_0;
-SELECT octet_length(get_raw_page('test1', 'vm', 1)) AS vm_1;
+SELECT octet_length(get_raw_page('test_rel_forks', 'vm', 0)) AS vm_0;
+SELECT octet_length(get_raw_page('test_rel_forks', 'vm', 1)) AS vm_1;
 
 SELECT octet_length(get_raw_page('xxx', 'main', 0));
-SELECT octet_length(get_raw_page('test1', 'xxx', 0));
+SELECT octet_length(get_raw_page('test_rel_forks', 'xxx', 0));
+
+SELECT * FROM fsm_page_contents(get_raw_page('test_rel_forks', 'fsm', 0));
+
+SELECT get_raw_page('test_rel_forks', 0) = get_raw_page('test_rel_forks', 'main', 0);
 
-SELECT get_raw_page('test1', 0) = get_raw_page('test1', 'main', 0);
+DROP TABLE test_rel_forks;
+
+CREATE TABLE test1 (a int, b int);
+INSERT INTO test1 VALUES (16777217, 131584);
 
 SELECT pagesize, version FROM page_header(get_raw_page('test1', 0));
 
@@ -29,8 +38,6 @@ SELECT page_checksum(get_raw_page('test1', 0), 0) IS NOT NULL AS silly_checksum_
 SELECT tuple_data_split('test1'::regclass, t_data, t_infomask, t_infomask2, t_bits)
     FROM heap_page_items(get_raw_page('test1', 0));
 
-SELECT * FROM fsm_page_contents(get_raw_page('test1', 'fsm', 0));
-
 DROP TABLE test1;
 
 -- check that using any of these functions with a partitioned table or index
diff --git a/doc/src/sgml/storage.sgml b/doc/src/sgml/storage.sgml
index 8ef2ac8..cbdad0c 100644
--- a/doc/src/sgml/storage.sgml
+++ b/doc/src/sgml/storage.sgml
@@ -590,12 +590,13 @@ tuple would otherwise be too big.
 <indexterm><primary>FSM</primary><see>Free Space Map</see></indexterm>
 
 <para>
-Each heap and index relation, except for hash indexes, has a Free Space Map
-(FSM) to keep track of available space in the relation. It's stored
-alongside the main relation data in a separate relation fork, named after the
-filenode number of the relation, plus a <literal>_fsm</literal> suffix. For example,
-if the filenode of a relation is 12345, the FSM is stored in a file called
-<filename>12345_fsm</filename>, in the same directory as the main relation file.
+Each heap relation, unless it is very small, and each index relation, except
+for hash indexes, has a Free Space Map (FSM) to keep track of available
+space in the relation. It's stored alongside the main relation data in a
+separate relation fork, named after the filenode number of the relation, plus
+a <literal>_fsm</literal> suffix. For example, if the filenode of a relation
+is 12345, the FSM is stored in a file called <filename>12345_fsm</filename>,
+in the same directory as the main relation file.
 </para>
 
 <para>
diff --git a/src/backend/access/brin/brin.c b/src/backend/access/brin/brin.c
index e95fbbc..7c5b1af 100644
--- a/src/backend/access/brin/brin.c
+++ b/src/backend/access/brin/brin.c
@@ -1148,7 +1148,7 @@ terminate_brin_buildstate(BrinBuildState *state)
 		freespace = PageGetFreeSpace(page);
 		blk = BufferGetBlockNumber(state->bs_currentInsertBuf);
 		ReleaseBuffer(state->bs_currentInsertBuf);
-		RecordPageWithFreeSpace(state->bs_irel, blk, freespace);
+		RecordPageWithFreeSpace(state->bs_irel, blk, freespace, InvalidBlockNumber);
 		FreeSpaceMapVacuumRange(state->bs_irel, blk, blk + 1);
 	}
 
diff --git a/src/backend/access/brin/brin_pageops.c b/src/backend/access/brin/brin_pageops.c
index 040cb62..cd10458 100644
--- a/src/backend/access/brin/brin_pageops.c
+++ b/src/backend/access/brin/brin_pageops.c
@@ -310,7 +310,7 @@ brin_doupdate(Relation idxrel, BlockNumber pagesPerRange,
 
 		if (extended)
 		{
-			RecordPageWithFreeSpace(idxrel, newblk, freespace);
+			RecordPageWithFreeSpace(idxrel, newblk, freespace, InvalidBlockNumber);
 			FreeSpaceMapVacuumRange(idxrel, newblk, newblk + 1);
 		}
 
@@ -461,7 +461,7 @@ brin_doinsert(Relation idxrel, BlockNumber pagesPerRange,
 
 	if (extended)
 	{
-		RecordPageWithFreeSpace(idxrel, blk, freespace);
+		RecordPageWithFreeSpace(idxrel, blk, freespace, InvalidBlockNumber);
 		FreeSpaceMapVacuumRange(idxrel, blk, blk + 1);
 	}
 
@@ -654,7 +654,7 @@ brin_page_cleanup(Relation idxrel, Buffer buf)
 
 	/* Measure free space and record it */
 	RecordPageWithFreeSpace(idxrel, BufferGetBlockNumber(buf),
-							br_page_get_freespace(page));
+							br_page_get_freespace(page), InvalidBlockNumber);
 }
 
 /*
@@ -703,7 +703,7 @@ brin_getinsertbuffer(Relation irel, Buffer oldbuf, Size itemsz,
 	/* Choose initial target page, re-using existing target if known */
 	newblk = RelationGetTargetBlock(irel);
 	if (newblk == InvalidBlockNumber)
-		newblk = GetPageWithFreeSpace(irel, itemsz);
+		newblk = GetPageWithFreeSpace(irel, itemsz, true);
 
 	/*
 	 * Loop until we find a page with sufficient free space.  By the time we
@@ -895,7 +895,7 @@ brin_initialize_empty_new_buffer(Relation idxrel, Buffer buffer)
 	 * pages whose FSM records were forgotten in a crash.
 	 */
 	RecordPageWithFreeSpace(idxrel, BufferGetBlockNumber(buffer),
-							br_page_get_freespace(page));
+							br_page_get_freespace(page), InvalidBlockNumber);
 }
 
 
diff --git a/src/backend/access/heap/hio.c b/src/backend/access/heap/hio.c
index b8b5871..e59568e 100644
--- a/src/backend/access/heap/hio.c
+++ b/src/backend/access/heap/hio.c
@@ -239,8 +239,14 @@ RelationAddExtraBlocks(Relation relation, BulkInsertState bistate)
 		 * Immediately update the bottom level of the FSM.  This has a good
 		 * chance of making this page visible to other concurrently inserting
 		 * backends, and we want that to happen without delay.
+		 *
+		 * Since we know the table will end up with extraBlocks additional
+		 * pages, we pass the final number to avoid possible unnecessary
+		 * system calls and to make sure the FSM is created when we add
+		 * the first new page.
 		 */
-		RecordPageWithFreeSpace(relation, blockNum, freespace);
+		RecordPageWithFreeSpace(relation, blockNum, freespace,
+								firstBlock + extraBlocks);
 	}
 	while (--extraBlocks > 0);
 
@@ -377,20 +383,9 @@ RelationGetBufferForTuple(Relation relation, Size len,
 		 * We have no cached target page, so ask the FSM for an initial
 		 * target.
 		 */
-		targetBlock = GetPageWithFreeSpace(relation, len + saveFreeSpace);
-
-		/*
-		 * If the FSM knows nothing of the rel, try the last page before we
-		 * give up and extend.  This avoids one-tuple-per-page syndrome during
-		 * bootstrapping or in a recently-started system.
-		 */
-		if (targetBlock == InvalidBlockNumber)
-		{
-			BlockNumber nblocks = RelationGetNumberOfBlocks(relation);
-
-			if (nblocks > 0)
-				targetBlock = nblocks - 1;
-		}
+		targetBlock = GetPageWithFreeSpace(relation,
+										   len + saveFreeSpace,
+										   false);
 	}
 
 loop:
@@ -484,6 +479,14 @@ loop:
 		{
 			/* use this page as future insert target, too */
 			RelationSetTargetBlock(relation, targetBlock);
+
+			/*
+			 * In case we used an in-memory map of available blocks, reset
+			 * it for next use.
+			 */
+			if (targetBlock < HEAP_FSM_CREATION_THRESHOLD)
+				FSMClearLocalMap();
+
 			return buffer;
 		}
 
@@ -543,9 +546,12 @@ loop:
 
 			/*
 			 * Check if some other backend has extended a block for us while
-			 * we were waiting on the lock.
+			 * we were waiting on the lock.  We only check the FSM -- if there
+			 * isn't one we don't recheck the number of blocks.
 			 */
-			targetBlock = GetPageWithFreeSpace(relation, len + saveFreeSpace);
+			targetBlock = GetPageWithFreeSpace(relation,
+											   len + saveFreeSpace,
+											   true);
 
 			/*
 			 * If some other waiter has already extended the relation, we
@@ -625,5 +631,12 @@ loop:
 	 */
 	RelationSetTargetBlock(relation, BufferGetBlockNumber(buffer));
 
+	/*
+	 * In case we used an in-memory map of available blocks, reset
+	 * it for next use.  We do this unconditionally since after relation
+	 * extension we can't skip this based on the targetBlock.
+	 */
+	FSMClearLocalMap();
+
 	return buffer;
 }
diff --git a/src/backend/access/transam/xact.c b/src/backend/access/transam/xact.c
index d967400..fa0620b 100644
--- a/src/backend/access/transam/xact.c
+++ b/src/backend/access/transam/xact.c
@@ -48,6 +48,7 @@
 #include "replication/walsender.h"
 #include "storage/condition_variable.h"
 #include "storage/fd.h"
+#include "storage/freespace.h"
 #include "storage/lmgr.h"
 #include "storage/predicate.h"
 #include "storage/proc.h"
@@ -2488,6 +2489,12 @@ AbortTransaction(void)
 	pgstat_report_wait_end();
 	pgstat_progress_end_command();
 
+	/*
+	 * In case we aborted during RelationGetBufferForTuple(),
+	 * clear the local map of heap pages.
+	 */
+	FSMClearLocalMap();
+
 	/* Clean up buffer I/O and buffer context locks, too */
 	AbortBufferIO();
 	UnlockBuffers();
@@ -4709,6 +4716,13 @@ AbortSubTransaction(void)
 
 	pgstat_report_wait_end();
 	pgstat_progress_end_command();
+
+	/*
+	 * In case we aborted during RelationGetBufferForTuple(),
+	 * clear the local map of heap pages.
+	 */
+	FSMClearLocalMap();
+
 	AbortBufferIO();
 	UnlockBuffers();
 
diff --git a/src/backend/commands/vacuumlazy.c b/src/backend/commands/vacuumlazy.c
index 8134c52..d2818df 100644
--- a/src/backend/commands/vacuumlazy.c
+++ b/src/backend/commands/vacuumlazy.c
@@ -154,7 +154,7 @@ static BufferAccessStrategy vac_strategy;
 static void lazy_scan_heap(Relation onerel, int options,
 			   LVRelStats *vacrelstats, Relation *Irel, int nindexes,
 			   bool aggressive);
-static void lazy_vacuum_heap(Relation onerel, LVRelStats *vacrelstats);
+static void lazy_vacuum_heap(Relation onerel, LVRelStats *vacrelstats, BlockNumber nblocks);
 static bool lazy_check_needs_freeze(Buffer buf, bool *hastup);
 static void lazy_vacuum_index(Relation indrel,
 				  IndexBulkDeleteResult **stats,
@@ -759,7 +759,7 @@ lazy_scan_heap(Relation onerel, int options, LVRelStats *vacrelstats,
 			pgstat_progress_update_multi_param(2, hvp_index, hvp_val);
 
 			/* Remove tuples from heap */
-			lazy_vacuum_heap(onerel, vacrelstats);
+			lazy_vacuum_heap(onerel, vacrelstats, nblocks);
 
 			/*
 			 * Forget the now-vacuumed tuples, and press on, but be careful
@@ -897,7 +897,7 @@ lazy_scan_heap(Relation onerel, int options, LVRelStats *vacrelstats,
 			MarkBufferDirty(buf);
 			UnlockReleaseBuffer(buf);
 
-			RecordPageWithFreeSpace(onerel, blkno, freespace);
+			RecordPageWithFreeSpace(onerel, blkno, freespace, nblocks);
 			continue;
 		}
 
@@ -936,7 +936,7 @@ lazy_scan_heap(Relation onerel, int options, LVRelStats *vacrelstats,
 			}
 
 			UnlockReleaseBuffer(buf);
-			RecordPageWithFreeSpace(onerel, blkno, freespace);
+			RecordPageWithFreeSpace(onerel, blkno, freespace, nblocks);
 			continue;
 		}
 
@@ -1333,7 +1333,7 @@ lazy_scan_heap(Relation onerel, int options, LVRelStats *vacrelstats,
 		 * taken if there are no indexes.)
 		 */
 		if (vacrelstats->num_dead_tuples == prev_dead_count)
-			RecordPageWithFreeSpace(onerel, blkno, freespace);
+			RecordPageWithFreeSpace(onerel, blkno, freespace, nblocks);
 	}
 
 	/* report that everything is scanned and vacuumed */
@@ -1395,7 +1395,7 @@ lazy_scan_heap(Relation onerel, int options, LVRelStats *vacrelstats,
 		/* Remove tuples from heap */
 		pgstat_progress_update_param(PROGRESS_VACUUM_PHASE,
 									 PROGRESS_VACUUM_PHASE_VACUUM_HEAP);
-		lazy_vacuum_heap(onerel, vacrelstats);
+		lazy_vacuum_heap(onerel, vacrelstats, nblocks);
 		vacrelstats->num_index_scans++;
 	}
 
@@ -1466,9 +1466,10 @@ lazy_scan_heap(Relation onerel, int options, LVRelStats *vacrelstats,
  * Note: the reason for doing this as a second pass is we cannot remove
  * the tuples until we've removed their index entries, and we want to
  * process index entry removal in batches as large as possible.
+ * Note: nblocks is passed as an optimization for RecordPageWithFreeSpace().
  */
 static void
-lazy_vacuum_heap(Relation onerel, LVRelStats *vacrelstats)
+lazy_vacuum_heap(Relation onerel, LVRelStats *vacrelstats, BlockNumber nblocks)
 {
 	int			tupindex;
 	int			npages;
@@ -1505,7 +1506,7 @@ lazy_vacuum_heap(Relation onerel, LVRelStats *vacrelstats)
 		freespace = PageGetHeapFreeSpace(page);
 
 		UnlockReleaseBuffer(buf);
-		RecordPageWithFreeSpace(onerel, tblk, freespace);
+		RecordPageWithFreeSpace(onerel, tblk, freespace, nblocks);
 		npages++;
 	}
 
diff --git a/src/backend/storage/freespace/README b/src/backend/storage/freespace/README
index e7ff23b..abaec87 100644
--- a/src/backend/storage/freespace/README
+++ b/src/backend/storage/freespace/README
@@ -5,10 +5,11 @@ Free Space Map
 
 The purpose of the free space map is to quickly locate a page with enough
 free space to hold a tuple to be stored; or to determine that no such page
-exists and the relation must be extended by one page.  As of PostgreSQL 8.4
-each relation has its own, extensible free space map stored in a separate
-"fork" of its relation.  This eliminates the disadvantages of the former
-fixed-size FSM.
+exists and the relation must be extended by one page.  For very small heap
+relations, we simply iterate through all the pages in descending order.
+Otherwise, each relation (except for hash indexes) has its own, extensible
+free space map stored in a separate "fork" of its relation.  This eliminates
+the disadvantages of the fixed-size FSM used in PostgreSQL 8.3 and earlier.
 
 It is important to keep the map small so that it can be searched rapidly.
 Therefore, we don't attempt to record the exact free space on a page.
@@ -192,5 +193,3 @@ TODO
 ----
 
 - fastroot to avoid traversing upper nodes with just 1 child
-- use a different system for tables that fit into one FSM page, with a
-  mechanism to switch to the real thing as it grows.
diff --git a/src/backend/storage/freespace/freespace.c b/src/backend/storage/freespace/freespace.c
index 7c4ad1c..2ab1cb5 100644
--- a/src/backend/storage/freespace/freespace.c
+++ b/src/backend/storage/freespace/freespace.c
@@ -76,6 +76,14 @@
 #define FSM_ROOT_LEVEL	(FSM_TREE_DEPTH - 1)
 #define FSM_BOTTOM_LEVEL 0
 
+/* Status codes for the local map. */
+
+/* Either already tried, or beyond the end of the relation */
+#define FSM_LOCAL_NOT_AVAIL 0x00
+
+/* Available to try */
+#define FSM_LOCAL_AVAIL		0x01
+
 /*
  * The internal FSM routines work on a logical addressing scheme. Each
  * level of the tree can be thought of as a separately addressable file.
@@ -89,6 +97,15 @@ typedef struct
 /* Address of the root page. */
 static const FSMAddress FSM_ROOT_ADDRESS = {FSM_ROOT_LEVEL, 0};
 
+/* Local map of block numbers for small heaps with no FSM. */
+typedef struct
+{
+	BlockNumber nblocks;
+	char		map[HEAP_FSM_CREATION_THRESHOLD];
+} FSMLocalMap;
+
+static FSMLocalMap fsm_local_map = {0, {FSM_LOCAL_NOT_AVAIL}};
+
 /* functions to navigate the tree */
 static FSMAddress fsm_get_child(FSMAddress parent, uint16 slot);
 static FSMAddress fsm_get_parent(FSMAddress child, uint16 *slot);
@@ -107,10 +124,14 @@ static Size fsm_space_cat_to_avail(uint8 cat);
 /* workhorse functions for various operations */
 static int fsm_set_and_search(Relation rel, FSMAddress addr, uint16 slot,
 				   uint8 newValue, uint8 minValue);
+static void fsm_local_set(Relation rel, BlockNumber curr_nblocks);
 static BlockNumber fsm_search(Relation rel, uint8 min_cat);
+static BlockNumber fsm_local_search(void);
 static uint8 fsm_vacuum_page(Relation rel, FSMAddress addr,
 				BlockNumber start, BlockNumber end,
 				bool *eof);
+static bool fsm_allow_writes(Relation rel, BlockNumber heapblk,
+				BlockNumber nblocks, BlockNumber *get_nblocks);
 
 
 /******** Public API ********/
@@ -127,13 +148,45 @@ static uint8 fsm_vacuum_page(Relation rel, FSMAddress addr,
  * amount of free space available on that page and then try again (see
  * RecordAndGetPageWithFreeSpace).  If InvalidBlockNumber is returned,
  * extend the relation.
+ *
+ * For very small heap relations that don't have a FSM, we try every page
+ * before extending the relation.  To keep track of which pages have been
+ * tried, initialize a local in-memory map of pages.
  */
 BlockNumber
-GetPageWithFreeSpace(Relation rel, Size spaceNeeded)
+GetPageWithFreeSpace(Relation rel, Size spaceNeeded, bool check_fsm_only)
 {
 	uint8		min_cat = fsm_space_needed_to_cat(spaceNeeded);
+	BlockNumber target_block,
+				nblocks;
+
+	/* First try the FSM, if it exists. */
+	target_block = fsm_search(rel, min_cat);
+
+	if (target_block == InvalidBlockNumber &&
+		rel->rd_rel->relkind == RELKIND_RELATION &&
+		!check_fsm_only)
+	{
+		nblocks = RelationGetNumberOfBlocks(rel);
 
-	return fsm_search(rel, min_cat);
+		if (nblocks > HEAP_FSM_CREATION_THRESHOLD)
+		{
+			/*
+			 * If the FSM knows nothing of the rel, try the last page before
+			 * we give up and extend.  This avoids one-tuple-per-page syndrome
+			 * during bootstrapping or in a recently-started system.
+			 */
+			target_block = nblocks - 1;
+		}
+		else if (nblocks > 0)
+		{
+			/* Create or update local map and get first candidate block. */
+			fsm_local_set(rel, nblocks);
+			target_block = fsm_local_search();
+		}
+	}
+
+	return target_block;
 }
 
 /*
@@ -144,16 +197,46 @@ GetPageWithFreeSpace(Relation rel, Size spaceNeeded)
  * also some effort to return a page close to the old page; if there's a
  * page with enough free space on the same FSM page where the old one page
  * is located, it is preferred.
+ *
+ * For very small heap relations that don't have a FSM, we update the local
+ * map to indicate we have tried a page, and return the next page to try.
  */
 BlockNumber
 RecordAndGetPageWithFreeSpace(Relation rel, BlockNumber oldPage,
 							  Size oldSpaceAvail, Size spaceNeeded)
 {
-	int			old_cat = fsm_space_avail_to_cat(oldSpaceAvail);
-	int			search_cat = fsm_space_needed_to_cat(spaceNeeded);
+	int			old_cat;
+	int			search_cat;
 	FSMAddress	addr;
 	uint16		slot;
 	int			search_slot;
+	BlockNumber nblocks = InvalidBlockNumber;
+
+	/* First try the local map, if it exists. */
+	if (oldPage < fsm_local_map.nblocks)
+	{
+		Assert(rel->rd_rel->relkind == RELKIND_RELATION &&
+			   fsm_local_map.map[oldPage] == FSM_LOCAL_AVAIL);
+
+		fsm_local_map.map[oldPage] = FSM_LOCAL_NOT_AVAIL;
+		return fsm_local_search();
+	}
+
+	if (!fsm_allow_writes(rel, oldPage, InvalidBlockNumber, &nblocks))
+	{
+		/*
+		 * If we have neither a local map nor a FSM, we probably just
+		 * tried the target block in the smgr relation entry and failed,
+		 * so we'll need to create the local map.
+		 */
+		fsm_local_set(rel, nblocks);
+		return fsm_local_search();
+	}
+
+	/* Normal FSM logic follows */
+
+	old_cat = fsm_space_avail_to_cat(oldSpaceAvail);
+	search_cat = fsm_space_needed_to_cat(spaceNeeded);
 
 	/* Get the location of the FSM byte representing the heap block */
 	addr = fsm_get_location(oldPage, &slot);
@@ -176,21 +259,41 @@ RecordAndGetPageWithFreeSpace(Relation rel, BlockNumber oldPage,
  * Note that if the new spaceAvail value is higher than the old value stored
  * in the FSM, the space might not become visible to searchers until the next
  * FreeSpaceMapVacuum call, which updates the upper level pages.
+ *
+ * Callers have no need for a local map.
  */
 void
-RecordPageWithFreeSpace(Relation rel, BlockNumber heapBlk, Size spaceAvail)
+RecordPageWithFreeSpace(Relation rel, BlockNumber heapBlk,
+						Size spaceAvail, BlockNumber nblocks)
 {
-	int			new_cat = fsm_space_avail_to_cat(spaceAvail);
+	int			new_cat;
 	FSMAddress	addr;
 	uint16		slot;
+	BlockNumber dummy;
+
+	if (!fsm_allow_writes(rel, heapBlk, nblocks, &dummy))
+		/* No FSM to update and no local map either */
+		return;
 
 	/* Get the location of the FSM byte representing the heap block */
 	addr = fsm_get_location(heapBlk, &slot);
 
+	new_cat = fsm_space_avail_to_cat(spaceAvail);
 	fsm_set_and_search(rel, addr, slot, new_cat, 0);
 }
 
 /*
+ * Clear the local map.  We must call this when we have found a block with
+ * enough free space, or when we extend the relation.
+ */
+void
+FSMClearLocalMap(void)
+{
+	fsm_local_map.nblocks = 0;
+	memset(&fsm_local_map.map, 0, sizeof(fsm_local_map.map));
+}
+
+/*
  * XLogRecordPageWithFreeSpace - like RecordPageWithFreeSpace, for use in
  *		WAL replay
  */
@@ -204,6 +307,30 @@ XLogRecordPageWithFreeSpace(RelFileNode rnode, BlockNumber heapBlk,
 	BlockNumber blkno;
 	Buffer		buf;
 	Page		page;
+	bool		write_to_fsm;
+
+	/* This is meant to mirror the logic in fsm_allow_writes() */
+	if (heapBlk >= HEAP_FSM_CREATION_THRESHOLD)
+		write_to_fsm = true;
+	else
+	{
+		/* Open the relation at smgr level */
+		SMgrRelation smgr = smgropen(rnode, InvalidBackendId);
+
+		if (smgrexists(smgr, FSM_FORKNUM))
+			write_to_fsm = true;
+		else
+		{
+			BlockNumber heap_nblocks = smgrnblocks(smgr, MAIN_FORKNUM);
+			if (heap_nblocks > HEAP_FSM_CREATION_THRESHOLD)
+				write_to_fsm = true;
+			else
+				write_to_fsm = false;
+		}
+	}
+
+	if (!write_to_fsm)
+		return;
 
 	/* Get the location of the FSM byte representing the heap block */
 	addr = fsm_get_location(heapBlk, &slot);
@@ -904,3 +1031,115 @@ fsm_vacuum_page(Relation rel, FSMAddress addr,
 
 	return max_avail;
 }
+
+/*
+ * For heaps we prevent extension of the FSM unless the number of pages
+ * exceeds HEAP_FSM_CREATION_THRESHOLD.  For tables that don't already have
+ * a FSM, this will save an inode and a few kB of space.
+ *
+ * XXX The API is a little awkward -- if the caller passes a valid nblocks
+ * value, it can avoid invoking a system call.  If the caller passes
+ * InvalidBlockNumber and receives a false return value, it can get an
+ * up-to-date relation size from get_nblocks.
+ */
+static bool
+fsm_allow_writes(Relation rel, BlockNumber heapblk,
+				 BlockNumber nblocks, BlockNumber *get_nblocks)
+{
+	bool		skip_get_nblocks;
+
+	if (heapblk >= HEAP_FSM_CREATION_THRESHOLD)
+		return true;
+
+	/* Non-heap rels can always create a FSM. */
+	if (rel->rd_rel->relkind != RELKIND_RELATION)
+		return true;
+
+	/*
+	 * If the caller knows nblocks, we can avoid a system call later.
+	 * If it doesn't, maybe we have relpages from a previous VACUUM.
+	 * Since the table may have extended since then, we still have to
+	 * count the pages later if we can't return now.
+	 */
+	if (nblocks != InvalidBlockNumber)
+	{
+		if (nblocks > HEAP_FSM_CREATION_THRESHOLD)
+			return true;
+		else
+			skip_get_nblocks = true;
+	}
+	else
+	{
+		if (rel->rd_rel->relpages != InvalidBlockNumber &&
+			rel->rd_rel->relpages > HEAP_FSM_CREATION_THRESHOLD)
+			return true;
+		else
+			skip_get_nblocks = false;
+	}
+
+	RelationOpenSmgr(rel);
+	if (smgrexists(rel->rd_smgr, FSM_FORKNUM))
+		return true;
+
+	if (skip_get_nblocks)
+		return false;
+
+	/* last resort */
+	*get_nblocks = RelationGetNumberOfBlocks(rel);
+	if (*get_nblocks > HEAP_FSM_CREATION_THRESHOLD)
+		return true;
+	else
+		return false;
+}
+
+/*
+ * Initialize or update the local map of blocks to try, for when there is
+ * no FSM.
+ *
+ * When we initialize the map, flag all blocks as available to try.  If a
+ * caller wants to reset the map after relation extension, only flag new
+ * blocks as available.
+ */
+static void
+fsm_local_set(Relation rel, BlockNumber curr_nblocks)
+{
+	BlockNumber blkno,
+				cached_target_block;
+
+	/*
+	 * Mark blocks available starting after the last block we have mapped,
+	 * and ending at the current last block in the relation.
+	 */
+	for (blkno = fsm_local_map.nblocks; blkno < curr_nblocks; blkno++)
+		fsm_local_map.map[blkno] = FSM_LOCAL_AVAIL;
+
+	/* Cache the number of blocks. */
+	fsm_local_map.nblocks = curr_nblocks;
+
+	/* Set the status of the cached target block to 'unavailable'. */
+	cached_target_block = RelationGetTargetBlock(rel);
+	if (cached_target_block != InvalidBlockNumber &&
+		cached_target_block < curr_nblocks)
+		fsm_local_map.map[cached_target_block] = FSM_LOCAL_NOT_AVAIL;
+}
+
+/*
+ * Search the local map for an available block to try, in descending order.
+ *
+ * For use when there is no FSM.
+ */
+static BlockNumber
+fsm_local_search(void)
+{
+	BlockNumber		target_block = fsm_local_map.nblocks;
+
+	do
+	{
+		target_block--;
+		if (fsm_local_map.map[target_block] == FSM_LOCAL_AVAIL)
+			return target_block;
+	}
+	while (target_block > 0);
+
+	return InvalidBlockNumber;
+}
diff --git a/src/backend/storage/freespace/indexfsm.c b/src/backend/storage/freespace/indexfsm.c
index e21047b..88a71ae 100644
--- a/src/backend/storage/freespace/indexfsm.c
+++ b/src/backend/storage/freespace/indexfsm.c
@@ -37,7 +37,7 @@
 BlockNumber
 GetFreeIndexPage(Relation rel)
 {
-	BlockNumber blkno = GetPageWithFreeSpace(rel, BLCKSZ / 2);
+	BlockNumber blkno = GetPageWithFreeSpace(rel, BLCKSZ / 2, true);
 
 	if (blkno != InvalidBlockNumber)
 		RecordUsedIndexPage(rel, blkno);
@@ -51,7 +51,7 @@ GetFreeIndexPage(Relation rel)
 void
 RecordFreeIndexPage(Relation rel, BlockNumber freeBlock)
 {
-	RecordPageWithFreeSpace(rel, freeBlock, BLCKSZ - 1);
+	RecordPageWithFreeSpace(rel, freeBlock, BLCKSZ - 1, InvalidBlockNumber);
 }
 
 
@@ -61,7 +61,7 @@ RecordFreeIndexPage(Relation rel, BlockNumber freeBlock)
 void
 RecordUsedIndexPage(Relation rel, BlockNumber usedBlock)
 {
-	RecordPageWithFreeSpace(rel, usedBlock, 0);
+	RecordPageWithFreeSpace(rel, usedBlock, 0, InvalidBlockNumber);
 }
 
 /*
diff --git a/src/include/storage/freespace.h b/src/include/storage/freespace.h
index 726eb30..b6f5b86 100644
--- a/src/include/storage/freespace.h
+++ b/src/include/storage/freespace.h
@@ -18,15 +18,20 @@
 #include "storage/relfilenode.h"
 #include "utils/relcache.h"
 
+/* Only create the FSM if the heap has greater than this many blocks */
+#define HEAP_FSM_CREATION_THRESHOLD 4
+
 /* prototypes for public functions in freespace.c */
 extern Size GetRecordedFreeSpace(Relation rel, BlockNumber heapBlk);
-extern BlockNumber GetPageWithFreeSpace(Relation rel, Size spaceNeeded);
+extern BlockNumber GetPageWithFreeSpace(Relation rel, Size spaceNeeded,
+							bool check_fsm_only);
 extern BlockNumber RecordAndGetPageWithFreeSpace(Relation rel,
 							  BlockNumber oldPage,
 							  Size oldSpaceAvail,
 							  Size spaceNeeded);
 extern void RecordPageWithFreeSpace(Relation rel, BlockNumber heapBlk,
-						Size spaceAvail);
+						Size spaceAvail, BlockNumber nblocks);
+extern void FSMClearLocalMap(void);
 extern void XLogRecordPageWithFreeSpace(RelFileNode rnode, BlockNumber heapBlk,
 							Size spaceAvail);
 
diff --git a/src/test/regress/expected/fsm.out b/src/test/regress/expected/fsm.out
new file mode 100644
index 0000000..4c44c4b
--- /dev/null
+++ b/src/test/regress/expected/fsm.out
@@ -0,0 +1,62 @@
+--
+-- Free Space Map test
+--
+CREATE TABLE fsm_check_size (num int, str text);
+-- Fill 2 blocks with as many large records as will fit
+-- No FSM
+INSERT INTO fsm_check_size SELECT g, rpad('', 1024, 'a')
+FROM generate_series(1,7*2) g;
+VACUUM fsm_check_size;
+SELECT pg_relation_size('fsm_check_size', 'main') AS heap_size,
+pg_relation_size('fsm_check_size', 'fsm') AS fsm_size;
+ heap_size | fsm_size 
+-----------+----------
+     16384 |        0
+(1 row)
+
+-- Clear some space on block 0
+DELETE FROM fsm_check_size where num <= 5;
+VACUUM fsm_check_size;
+-- Insert small record in block 1 to set the cached smgr targetBlock
+INSERT INTO fsm_check_size values(99, 'b');
+-- Insert large record and make sure it goes in block 0 rather than
+-- causing the relation to extend
+INSERT INTO fsm_check_size values (101, rpad('', 1024, 'a'));
+SELECT pg_relation_size('fsm_check_size', 'main') AS heap_size,
+pg_relation_size('fsm_check_size', 'fsm') AS fsm_size;
+ heap_size | fsm_size 
+-----------+----------
+     16384 |        0
+(1 row)
+
+-- Extend table with enough blocks to exceed the FSM threshold
+-- FSM is created and extended to 3 blocks
+INSERT INTO fsm_check_size SELECT g, 'c' FROM generate_series(200,3000) g;
+VACUUM fsm_check_size;
+SELECT pg_relation_size('fsm_check_size', 'fsm') AS fsm_size;
+ fsm_size 
+----------
+    24576
+(1 row)
+
+-- Truncate heap to 1 block
+-- No change in FSM
+DELETE FROM fsm_check_size WHERE num > 7;
+VACUUM fsm_check_size;
+SELECT pg_relation_size('fsm_check_size', 'fsm') AS fsm_size;
+ fsm_size 
+----------
+    24576
+(1 row)
+
+-- Truncate heap to 0 blocks
+-- FSM now truncated to 2 blocks
+DELETE FROM fsm_check_size;
+VACUUM fsm_check_size;
+SELECT pg_relation_size('fsm_check_size', 'fsm') AS fsm_size;
+ fsm_size 
+----------
+    16384
+(1 row)
+
+DROP TABLE fsm_check_size;
diff --git a/src/test/regress/parallel_schedule b/src/test/regress/parallel_schedule
index cc0bbf5..4051a4a 100644
--- a/src/test/regress/parallel_schedule
+++ b/src/test/regress/parallel_schedule
@@ -69,6 +69,12 @@ test: create_aggregate create_function_3 create_cast constraints triggers inheri
 test: sanity_check
 
 # ----------
+# fsm does a delete followed by vacuum, and running it in parallel can prevent
+# removal of rows.
+# ----------
+test: fsm
+
+# ----------
 # Believe it or not, select creates a table, subsequent
 # tests need.
 # ----------
diff --git a/src/test/regress/serial_schedule b/src/test/regress/serial_schedule
index 0c10c71..9fb1d38 100644
--- a/src/test/regress/serial_schedule
+++ b/src/test/regress/serial_schedule
@@ -80,6 +80,7 @@ test: roleattributes
 test: create_am
 test: hash_func
 test: sanity_check
+test: fsm 
 test: errors
 test: select
 test: select_into
diff --git a/src/test/regress/sql/fsm.sql b/src/test/regress/sql/fsm.sql
new file mode 100644
index 0000000..fad99da
--- /dev/null
+++ b/src/test/regress/sql/fsm.sql
@@ -0,0 +1,46 @@
+--
+-- Free Space Map test
+--
+
+CREATE TABLE fsm_check_size (num int, str text);
+
+-- Fill 2 blocks with as many large records as will fit
+-- No FSM
+INSERT INTO fsm_check_size SELECT g, rpad('', 1024, 'a')
+FROM generate_series(1,7*2) g;
+VACUUM fsm_check_size;
+SELECT pg_relation_size('fsm_check_size', 'main') AS heap_size,
+pg_relation_size('fsm_check_size', 'fsm') AS fsm_size;
+
+-- Clear some space on block 0
+DELETE FROM fsm_check_size where num <= 5;
+VACUUM fsm_check_size;
+
+-- Insert small record in block 1 to set the cached smgr targetBlock
+INSERT INTO fsm_check_size values(99, 'b');
+
+-- Insert large record and make sure it goes in block 0 rather than
+-- causing the relation to extend
+INSERT INTO fsm_check_size values (101, rpad('', 1024, 'a'));
+SELECT pg_relation_size('fsm_check_size', 'main') AS heap_size,
+pg_relation_size('fsm_check_size', 'fsm') AS fsm_size;
+
+-- Extend table with enough blocks to exceed the FSM threshold
+-- FSM is created and extended to 3 blocks
+INSERT INTO fsm_check_size SELECT g, 'c' FROM generate_series(200,3000) g;
+VACUUM fsm_check_size;
+SELECT pg_relation_size('fsm_check_size', 'fsm') AS fsm_size;
+
+-- Truncate heap to 1 block
+-- No change in FSM
+DELETE FROM fsm_check_size WHERE num > 7;
+VACUUM fsm_check_size;
+SELECT pg_relation_size('fsm_check_size', 'fsm') AS fsm_size;
+
+-- Truncate heap to 0 blocks
+-- FSM now truncated to 2 blocks
+DELETE FROM fsm_check_size;
+VACUUM fsm_check_size;
+SELECT pg_relation_size('fsm_check_size', 'fsm') AS fsm_size;
+
+DROP TABLE fsm_check_size;
-- 
1.8.3.1

#56John Naylor
jcnaylor@gmail.com
In reply to: Amit Kapila (#55)
Re: WIP: Avoid creation of the free space map for small tables

On 12/8/18, Amit Kapila <amit.kapila16@gmail.com> wrote:

On Fri, Dec 7, 2018 at 7:25 PM John Naylor <jcnaylor@gmail.com> wrote:
I couldn't resist the temptation to figure out what's going on here.
The newly added tests have deletes followed by vacuum and then you
check whether the vacuum has removed the data by checking heap and or
FSM size. Now, when you run such a test in parallel, the vacuum can
sometimes skip removing the rows because there are parallel
transactions open which can see the deleted rows.

Ah yes, of course.

You can easily
verify this phenomenon by running the newly added tests in one session
in psql when there is another parallel session which has an open
transaction. For example:

Session-1
Begin;
Insert into foo values(1);

Session-2
\i fsm.sql

Now, you should see the results similar to what you are seeing when
you ran the fsm test by adding it to one of the parallel group. Can
you test this at your end and confirm whether my analysis is correct
or not.

Yes, I see the same behavior.

So, you can keep the test as you have in parallel_schedule, but
comment needs to be changed. Also, you need to add the new test in
serial_schedule. I have done both the changes in the attached patch,
kindly confirm if this looks correct to you.

Looks good to me. I'll just note that the new line in the serial
schedule has an extra space at the end. Thanks for looking into this.

-John Naylor

#57John Naylor
jcnaylor@gmail.com
In reply to: Amit Kapila (#39)
1 attachment(s)
Re: WIP: Avoid creation of the free space map for small tables

On 11/24/18, Amit Kapila <amit.kapila16@gmail.com> wrote:

4. You have mentioned above that "system catalogs created during
bootstrap still have a FSM if they have any data." and I can also see
this behavior, have you investigated this point further?

I found the cause of this. There is some special-case code in md.c to
create any file if it's opened in bootstrap mode. I removed this and a
similar special case (attached), and make check still passes. After
digging through the history, I'm guessing this has been useless code
since about 2001, when certain special catalogs were removed.

-John Naylor

Attachments:

remove-bootstrap-case-md.patchtext/x-patch; charset=US-ASCII; name=remove-bootstrap-case-md.patchDownload
diff --git a/src/backend/storage/smgr/md.c b/src/backend/storage/smgr/md.c
index 4c6a50509f..9331c8b1d1 100644
--- a/src/backend/storage/smgr/md.c
+++ b/src/backend/storage/smgr/md.c
@@ -310,13 +310,7 @@ mdcreate(SMgrRelation reln, ForkNumber forkNum, bool isRedo)
 	{
 		int			save_errno = errno;
 
-		/*
-		 * During bootstrap, there are cases where a system relation will be
-		 * accessed (by internal backend processes) before the bootstrap
-		 * script nominally creates it.  Therefore, allow the file to exist
-		 * already, even if isRedo is not set.  (See also mdopen)
-		 */
-		if (isRedo || IsBootstrapProcessingMode())
+		if (isRedo)
 			fd = PathNameOpenFile(path, O_RDWR | PG_BINARY);
 		if (fd < 0)
 		{
@@ -572,26 +566,15 @@ mdopen(SMgrRelation reln, ForkNumber forknum, int behavior)
 
 	if (fd < 0)
 	{
-		/*
-		 * During bootstrap, there are cases where a system relation will be
-		 * accessed (by internal backend processes) before the bootstrap
-		 * script nominally creates it.  Therefore, accept mdopen() as a
-		 * substitute for mdcreate() in bootstrap mode only. (See mdcreate)
-		 */
-		if (IsBootstrapProcessingMode())
-			fd = PathNameOpenFile(path, O_RDWR | O_CREAT | O_EXCL | PG_BINARY);
-		if (fd < 0)
+		if ((behavior & EXTENSION_RETURN_NULL) &&
+			FILE_POSSIBLY_DELETED(errno))
 		{
-			if ((behavior & EXTENSION_RETURN_NULL) &&
-				FILE_POSSIBLY_DELETED(errno))
-			{
-				pfree(path);
-				return NULL;
-			}
-			ereport(ERROR,
-					(errcode_for_file_access(),
-					 errmsg("could not open file \"%s\": %m", path)));
+			pfree(path);
+			return NULL;
 		}
+		ereport(ERROR,
+				(errcode_for_file_access(),
+				 errmsg("could not open file \"%s\": %m", path)));
 	}
 
 	pfree(path);
#58Amit Kapila
amit.kapila16@gmail.com
In reply to: John Naylor (#57)
Re: WIP: Avoid creation of the free space map for small tables

On Thu, Dec 13, 2018 at 3:18 AM John Naylor <jcnaylor@gmail.com> wrote:

On 11/24/18, Amit Kapila <amit.kapila16@gmail.com> wrote:

4. You have mentioned above that "system catalogs created during
bootstrap still have a FSM if they have any data." and I can also see
this behavior, have you investigated this point further?

I found the cause of this. There is some special-case code in md.c to
create any file if it's opened in bootstrap mode. I removed this and a
similar special case (attached), and make check still passes. After
digging through the history, I'm guessing this has been useless code
since about 2001, when certain special catalogs were removed.

Good finding, but I think it is better to discuss this part
separately. I have started a new thread for this issue [1]/messages/by-id/CAA4eK1KsET6sotf+rzOTQfb83pzVEzVhbQi1nxGFYVstVWXUGw@mail.gmail.com.

[1]: /messages/by-id/CAA4eK1KsET6sotf+rzOTQfb83pzVEzVhbQi1nxGFYVstVWXUGw@mail.gmail.com

--
With Regards,
Amit Kapila.
EnterpriseDB: http://www.enterprisedb.com

#59Mithun Cy
mithun.cy@enterprisedb.com
In reply to: Amit Kapila (#55)
Re: WIP: Avoid creation of the free space map for small tables

On Sat, Dec 8, 2018 at 6:35 PM Amit Kapila <amit.kapila16@gmail.com> wrote:

On Fri, Dec 7, 2018 at 7:25 PM John Naylor <jcnaylor@gmail.com> wrote:

On 12/6/18, Amit Kapila <amit.kapila16@gmail.com> wrote:

On Thu, Dec 6, 2018 at 10:53 PM John Naylor <jcnaylor@gmail.com>

wrote:

I've added an additional regression test for finding the right block

I did run some performance tests on the latest patch v11, I see small
regression in execution time of COPY statement. Tests I have used is same
as provided in [1]/messages/by-id/CAJVSVGX=2Q52fwijD9cjeq1UdiYGXns2_9WAPFf=E8cwbFCDvQ@mail.gmail.com just that I ran it for fill factor 20 and 70. Here are
my results!

Machine : cthulhu (Intel based 8 numa machine)
Server setting is default, configured with HEAP_FSM_CREATION_THRESHOLD = 4,
Entire data directory was on HDD.

Results are execution time(unit ms) taken by copy statement when number of
records equal to exact number which fit HEAP_FSM_CREATION_THRESHOLD = 4
pages. For fill factor 20 it is till tid (3, 43) and for scale factor 70
till tid (3, 157). Result is taken as a median of 10 runs.

Fill factor 20
Tables Base Patch % of increase in execution time
500 121.97 125.315 2.7424776584
1000 246.592 253.789 2.9185861666

Fill factor 70
500 211.502 217.128 2.6600221275
1000 420.309 432.606 2.9257046601

So 2-3% consistent regression, And on every run I can see for patch v11
execution time is slightly more than base. I also tried to insert more
records till 8 pages and same regression is observed! So I guess even
HEAP_FSM_CREATION_THRESHOLD = 4 is not perfect!

[1]: /messages/by-id/CAJVSVGX=2Q52fwijD9cjeq1UdiYGXns2_9WAPFf=E8cwbFCDvQ@mail.gmail.com
/messages/by-id/CAJVSVGX=2Q52fwijD9cjeq1UdiYGXns2_9WAPFf=E8cwbFCDvQ@mail.gmail.com

--
Thanks and Regards
Mithun Chicklore Yogendra
EnterpriseDB: http://www.enterprisedb.com

#60John Naylor
jcnaylor@gmail.com
In reply to: Mithun Cy (#59)
Re: WIP: Avoid creation of the free space map for small tables

On 12/29/18, Mithun Cy <mithun.cy@enterprisedb.com> wrote:

Results are execution time(unit ms) taken by copy statement when number of
records equal to exact number which fit HEAP_FSM_CREATION_THRESHOLD = 4
pages. For fill factor 20 it is till tid (3, 43) and for scale factor 70
till tid (3, 157). Result is taken as a median of 10 runs.

So 2-3% consistent regression, And on every run I can see for patch v11
execution time is slightly more than base.

Thanks for testing!

I also tried to insert more
records till 8 pages and same regression is observed! So I guess even
HEAP_FSM_CREATION_THRESHOLD = 4 is not perfect!

That's curious, because once the table exceeds the threshold, it would
be allowed to update the FSM, and in the process write 3 pages that it
didn't have to in the 4 page test. The master branch has the FSM
already, so I would expect the 8 page case to regress more.

What I can do later is provide a supplementary patch to go on top of
mine that only checks the last block. If that improves performance,
I'll alter my patch to only check every other page.

-John Naylor

#61Amit Kapila
amit.kapila16@gmail.com
In reply to: John Naylor (#60)
Re: WIP: Avoid creation of the free space map for small tables

On Sun, Dec 30, 2018 at 3:49 AM John Naylor <jcnaylor@gmail.com> wrote:

On 12/29/18, Mithun Cy <mithun.cy@enterprisedb.com> wrote:

Results are execution time(unit ms) taken by copy statement when number of
records equal to exact number which fit HEAP_FSM_CREATION_THRESHOLD = 4
pages. For fill factor 20 it is till tid (3, 43) and for scale factor 70
till tid (3, 157). Result is taken as a median of 10 runs.

So 2-3% consistent regression, And on every run I can see for patch v11
execution time is slightly more than base.

Have you by any chance checked at scale factor 80 or 100?

Thanks for testing!

I also tried to insert more
records till 8 pages and same regression is observed! So I guess even
HEAP_FSM_CREATION_THRESHOLD = 4 is not perfect!

That's curious, because once the table exceeds the threshold, it would
be allowed to update the FSM, and in the process write 3 pages that it
didn't have to in the 4 page test. The master branch has the FSM
already, so I would expect the 8 page case to regress more.

It is not clear to me why you think there should be regression at 8
pages when HEAP_FSM_CREATION_THRESHOLD is 4. Basically, once FSM
starts getting updated, we should be same as HEAD as it won't take any
special path?

What I can do later is provide a supplementary patch to go on top of
mine that only checks the last block. If that improves performance,
I'll alter my patch to only check every other page.

Sure, but I guess first we should try to see what is exactly slowing
down via perf report.

--
With Regards,
Amit Kapila.
EnterpriseDB: http://www.enterprisedb.com

#62Mithun Cy
mithun.cy@enterprisedb.com
In reply to: John Naylor (#52)
Re: WIP: Avoid creation of the free space map for small tables

On Thu, Dec 6, 2018 at 10:53 PM John Naylor <jcnaylor@gmail.com> wrote:

On 12/3/18, Amit Kapila <amit.kapila16@gmail.com> wrote:

fsm_local_set is being called from RecordAndGetPageWithFreeSpace and
GetPageWithFreeSpace whereas the change we have discussed was specific
to GetPageWithFreeSpace, so not sure if we need any change in
fsm_local_set.

I have some minor comments for pg_upgrade patch
1. Now we call stat main fork file in transfer_relfile()
+ sret = stat(old_file, &statbuf);

+        /* Save the size of the first segment of the main fork. */
+        if (type_suffix[0] == '\0' && segno == 0)
+            first_seg_size = statbuf.st_size;

But we do not handle the case if stat has returned any error!

2. src/bin/pg_upgrade/pg_upgrade.h

     char       *relname;
+
+    char        relkind;        /* relation relkind -- see pg_class.h */

I think we can remove the added empty line.

--
Thanks and Regards
Mithun Chicklore Yogendra
EnterpriseDB: http://www.enterprisedb.com

#63Mithun Cy
mithun.cy@enterprisedb.com
In reply to: John Naylor (#60)
2 attachment(s)
Re: WIP: Avoid creation of the free space map for small tables

Thanks,

On Sun, Dec 30, 2018 at 3:49 AM John Naylor <jcnaylor@gmail.com> wrote:

On 12/29/18, Mithun Cy <mithun.cy@enterprisedb.com> wrote:

Results are execution time(unit ms) taken by copy statement when number of
records equal to exact number which fit HEAP_FSM_CREATION_THRESHOLD = 4
pages. For fill factor 20 it is till tid (3, 43) and for scale factor 70
till tid (3, 157). Result is taken as a median of 10 runs.

So 2-3% consistent regression, And on every run I can see for patch v11
execution time is slightly more than base.

Thanks for testing!

I also tried to insert more
records till 8 pages and same regression is observed! So I guess even
HEAP_FSM_CREATION_THRESHOLD = 4 is not perfect!

That's curious, because once the table exceeds the threshold, it would
be allowed to update the FSM, and in the process write 3 pages that it
didn't have to in the 4 page test. The master branch has the FSM
already, so I would expect the 8 page case to regress more.

I tested with configuration HEAP_FSM_CREATION_THRESHOLD = 4 and just
tried to insert till 8 blocks to see if regression is carried on with
further inserts.

What I can do later is provide a supplementary patch to go on top of
mine that only checks the last block. If that improves performance,
I'll alter my patch to only check every other page.

Running callgrind for same test shows below stats
Before patch
==========
Number of calls function_name
2000 heap_multi_insert
2000 RelationGetBufferForTuple
3500 ReadBufferBI

After Patch
=========
Number of calls function_name
2000 heap_multi_insert
2000 RelationGetBufferForTuple
5000 ReadBufferBI

I guess Increase in ReadBufferBI() calls might be the reason which is
causing regression. Sorry I have not investigated it. I will check
same with your next patch!

--
Thanks and Regards
Mithun Chicklore Yogendra
EnterpriseDB: http://www.enterprisedb.com

Attachments:

callgrind.out.115655_before_patchapplication/octet-stream; name=callgrind.out.115655_before_patchDownload
# callgrind format
version: 1
creator: callgrind-3.13.0
pid: 115655
cmd:  ./postgres -D data
part: 1


desc: I1 cache: 
desc: D1 cache: 
desc: LL cache: 

desc: Timerange: Basic block 0 - 60662054
desc: Trigger: Program termination

positions: line
events: Ir
summary: 392118564


ob=(4) /usr/lib64/libm-2.17.so
fl=(4) ???
fn=(196) sin
0 8

fn=(188) floorf
0 5

fn=(190) floor
0 5

fn=(5938) 0x0000000000005680
0 9

fn=(182) __log_finite
0 8

fn=(186) __acos_finite
0 5

fn=(176) cos
0 8

fn=(180) __pow_finite
0 5

fn=(5924) 0x00000000000056f0
0 8
cob=(1) /usr/lib64/ld-2.17.so
cfi=(1) ???
cfn=(223) _dl_runtime_resolve_xsave'2
calls=1 0 
0 1448
0 5
0 1
cfn=(5938)
calls=1 0 
0 9
0 3

fn=(174) __exp_finite
0 8

fn=(194) __atan2_finite
0 8

fn=(292) 0x0000000000005730
0 16

fn=(184) rintf
0 5

fn=(192) __asin_finite
0 5

fn=(1000) __rint_sse41
0 2

fn=(178) rint
0 10

ob=(1)
fl=(1)
fn=(28) calloc
0 128
cfn=(32) malloc
calls=16 0 
0 693
0 16

fn=(40) _dl_add_to_namespace_list
0 63
cob=(5) /usr/lib64/libpthread-2.17.so
cfi=(5) ???
cfn=(396) pthread_mutex_lock
calls=2 0 
0 62
cfn=(42) rtld_lock_default_lock_recursive
calls=7 0 
0 14
0 352
cob=(5)
cfi=(5)
cfn=(398) pthread_mutex_unlock
calls=2 0 
0 58
cfn=(44) rtld_lock_default_unlock_recursive
calls=6 0 
0 12
0 13
cfn=(44)
calls=1 0 
0 2
0 2

fn=(56) mempcpy
0 3546

fn=(70) free
0 6

fn=(94) open
0 500

fn=(112) _dl_map_object_deps
0 2224
cfn=(62) index
calls=18 0 
0 1260
0 162
cfn=(81) _dl_catch_error'2
calls=4 0 
0 3314
cfn=(80) _dl_catch_error
calls=14 0 
0 42726
0 362
cfn=(32)
calls=6 0 
0 204
0 6
0 60
cfn=(38) memcpy
calls=6 0 
0 149
0 30
cfn=(38)
calls=6 0 
0 149
0 196
cob=(3) /usr/lib64/libc-2.17.so
cfi=(3) ???
cfn=(388) malloc
calls=2 0 
0 350
cfn=(32)
calls=1 0 
0 34
0 3
0 239
cfn=(106) memset
calls=3 0 
0 46
0 866
cfn=(106)
calls=8 0 
0 94
0 196
cfn=(130) memmove
calls=1 0 
0 63
0 79
cfn=(130)
calls=1 0 
0 33
0 806
cfn=(38)
calls=3 0 
0 96
0 9

fn=(136) _dl_check_all_versions
0 68
cfn=(138) _dl_check_map_versions
calls=8 0 
0 16233
0 63

fn=(154) check_match.9515
0 14745
cfn=(46) strcmp
calls=469 0 
0 48496
0 16173
cfn=(46)
calls=287 0 
0 25046
0 1148

fn=(42)
0 14

fn=(72) _dl_debug_initialize
0 121

fn=(102) mmap
0 819

fn=(134) version_check_doit
0 6
cfn=(136)
calls=1 0 
0 16364
0 4

fn=(208) _dl_init
0 321
cob=(2) ???
cfi=(2) ???
cfn=(4080) 0x0000000014dfccf0
calls=1 0 
0 6
cob=(2)
cfi=(2)
cfn=(1724) 0x000000000be3df18
calls=1 0 
0 6
cob=(2)
cfi=(2)
cfn=(326) 0x0000000004a245c0
calls=1 0 
0 6
cob=(2)
cfi=(2)
cfn=(314) 0x0000000004e43e98
calls=1 0 
0 6
cob=(2)
cfi=(2)
cfn=(300) 0x000000000504ad30
calls=1 0 
0 6
cob=(2)
cfi=(2)
cfn=(288) 0x00000000052531c0
calls=1 0 
0 6
cob=(3)
cfi=(3)
cfn=(270) _init
calls=1 0 
0 158
0 126
cob=(12) /home/mithuncy/zheap_fsmbasebin/lib/postgresql/plpgsql.so
cfi=(232) ???
cfn=(4084) 0x0000000000008f20
calls=1 0 
0 16
cob=(11) /usr/lib64/libnss_files-2.17.so
cfi=(78) ???
cfn=(1728) 0x0000000000002280
calls=1 0 
0 16
cob=(8) /usr/lib64/valgrind/vgpreload_core-amd64-linux.so
cfi=(8) ???
cfn=(330) 0x00000000000006e0
calls=1 0 
0 16
cob=(7) /usr/lib64/librt-2.17.so
cfi=(7) ???
cfn=(318) 0x00000000000023f0
calls=1 0 
0 16
cob=(6) /usr/lib64/libdl-2.17.so
cfi=(6) ???
cfn=(304) 0x0000000000000f20
calls=1 0 
0 16
cob=(4)
cfi=(4)
cfn=(292)
calls=1 0 
0 16
cob=(3)
cfi=(3)
cfn=(278) init_cacheinfo
calls=1 0 
0 1879
0 4
cob=(6)
cfi=(6)
cfn=(312) init
calls=1 0 
0 3
0 119
cob=(2)
cfi=(2)
cfn=(210) 0x0000000004c2b458
calls=1 0 
0 8655
0 19
cob=(5)
cfi=(5)
cfn=(260) 0x0000000000006780
calls=1 0 
0 16
0 5
cob=(5)
cfi=(5)
cfn=(268) elision_init
calls=1 0 
0 12
0 14

fn=(1716) dl_open_worker
0 32
cfn=(1718) _dl_check_caller
calls=2 0 
0 347
0 10
cfn=(62)
calls=2 0 
0 212
0 136
cfn=(72)
calls=2 0 
0 16
0 20
cfn=(88) _dl_map_object
calls=2 0 
0 16108
0 38
cfn=(112)
calls=2 0 
0 5773
0 74
cfn=(72)
calls=2 0 
0 16
0 6
cfn=(76) _dl_debug_state
calls=2 0 
0 2
0 126
cfn=(208)
calls=2 0 
0 252
0 66
cfn=(148) _dl_relocate_object
calls=2 0 
0 249485
0 162
cfn=(138)
calls=2 0 
0 3191
0 12
cfn=(4092) add_to_global
calls=1 0 
0 627
0 10

fn=(0) 0x0000000000001170
0 2
cfn=(2) _dl_start
calls=1 0 
0 236248
0 14
cfn=(208)
calls=1 0 
0 11211
0 3
cob=(9) /home/mithuncy/zheap_fsmbasebin/bin/postgres
cfi=(9) ???
cfn=(340) 0x0000000000477340
calls=1 0 
0 391871086

fn=(4) _dl_setup_hash
0 230

fn=(60) expand_dynamic_string_token
0 39
cfn=(62)
calls=3 0 
0 397
0 12
cfn=(12) strlen
calls=3 0 
0 240
0 9
cob=(3)
cfi=(3)
cfn=(388)
calls=1 0 
0 382
cfn=(32)
calls=2 0 
0 68
0 3
0 39
cfn=(38)
calls=3 0 
0 166

fn=(138)
0 1024
cfn=(90) _dl_name_match_p
calls=102 0 
0 6494
0 886
cfn=(140) match_symbol
calls=10 0 
0 1621
0 84
cfn=(140)
calls=28 0 
0 5418
0 970
cob=(3)
cfi=(3)
cfn=(1722) calloc
calls=2 0 
0 462
cfn=(28)
calls=7 0 
0 349
0 9
0 2107

fn=(12)
0 2432

fn=(46)
0 17598
cfn=(47) strcmp'2
calls=1731 0 
0 91120
0 7308

fn=(47)
0 85842
cfn=(47)
calls=11051 0 
0 544319
0 5278

fn=(90)
0 9352
cfn=(46)
calls=1336 0 
0 9415
0 16083
cfn=(46)
calls=1359 0 
0 28331
0 10734

fn=(128) _dl_next_tls_modid
0 6

fn=(142) init_tls
0 11
cfn=(28)
calls=1 0 
0 43
0 1
0 61
cfn=(144) _dl_determine_tlsoffset
calls=1 0 
0 56
0 1
cfn=(146) _dl_allocate_tls_storage
calls=1 0 
0 455
0 16

fn=(222) _dl_runtime_resolve_xsave
0 150
cfn=(224) _dl_fixup
calls=6 0 
0 8629
0 90

fn=(223)
0 3675
cfn=(224)
calls=147 0 
0 169936
0 2205

fn=(1720) cache_rpath.part.5
0 34

fn=(5816) _dl_fini
0 23
cob=(5)
cfi=(5)
cfn=(396)
calls=1 0 
0 31
0 143
cfn=(5818) _dl_sort_fini
calls=1 0 
0 2204
0 2
cob=(5)
cfi=(5)
cfn=(398)
calls=1 0 
0 29
0 193
cob=(6)
cfi=(6)
cfn=(5904) 0x0000000000000ee0
calls=1 0 
0 1474
0 16
cob=(12)
cfi=(232)
cfn=(5966) 0x0000000000008ee0
calls=1 0 
0 81
cob=(11)
cfi=(78)
cfn=(5946) 0x0000000000002240
calls=1 0 
0 1474
cob=(4)
cfi=(4)
cfn=(5924)
calls=1 0 
0 1474
cob=(6)
cfi=(6)
cfn=(5900) fini
calls=1 0 
0 11
cob=(5)
cfi=(5)
cfn=(5880) 0x0000000000006740
calls=1 0 
0 1474
cob=(7)
cfi=(7)
cfn=(5860) 0x00000000000023b0
calls=1 0 
0 1474
cob=(8)
cfi=(8)
cfn=(5834) 0x00000000000006a0
calls=1 0 
0 960
cob=(9)
cfi=(9)
cfn=(5822) 0x00000000004773e0
calls=1 0 
0 16
0 75
cob=(2)
cfi=(2)
cfn=(5982) 0x0000000014e1c83c
calls=1 0 
0 3
cob=(2)
cfi=(2)
cfn=(5964) 0x000000000be453e4
calls=1 0 
0 3
cob=(2)
cfi=(2)
cfn=(5944) 0x00000000052be278
calls=1 0 
0 3
cob=(2)
cfi=(2)
cfn=(5922) 0x000000000504b960
calls=1 0 
0 3
cob=(2)
cfi=(2)
cfn=(5898) 0x0000000004c36d34
calls=1 0 
0 3
cob=(2)
cfi=(2)
cfn=(5878) 0x0000000004e470b4
calls=1 0 
0 3
cob=(2)
cfi=(2)
cfn=(5858) 0x0000000004a2487c
calls=1 0 
0 3
cob=(2)
cfi=(2)
cfn=(5832) 0x0000000000a172c0
calls=1 0 
0 3
0 123

fn=(32)
0 135
cfn=(36) __libc_memalign
calls=45 0 
0 1499
0 45

fn=(58) decompose_rpath
0 14
cfn=(60)
calls=1 0 
0 324
0 256
cfn=(32)
calls=1 0 
0 34
0 1
0 10
cfn=(64) fillin_rpath
calls=1 0 
0 712
0 2
cfn=(70)
calls=1 0 
0 6
0 1
0 9

fn=(98) _dl_map_object_from_fd
0 144
cfn=(72)
calls=8 0 
0 64
0 40
cfn=(100) _fxstat
calls=8 0 
0 80
0 548
cfn=(24) _dl_new_object
calls=8 0 
0 5079
0 2133
cfn=(128)
calls=1 0 
0 6
0 251
cfn=(102)
calls=8 0 
0 280
0 400
cfn=(106)
calls=8 0 
0 12463
0 248
cfn=(102)
calls=8 0 
0 248
0 198
cfn=(76)
calls=2 0 
0 2
0 2575
cfn=(108) close
calls=1 0 
0 5
0 14
cfn=(108)
calls=7 0 
0 35
0 120
cfn=(4)
calls=8 0 
0 184
0 138
cfn=(40)
calls=8 0 
0 544
0 144
cfn=(104) mprotect
calls=8 0 
0 40
0 32
cfn=(102)
calls=3 0 
0 93
0 130

fn=(122) _dl_sysdep_read_whole_file
0 22
cfn=(94)
calls=2 0 
0 10
0 14
cfn=(100)
calls=2 0 
0 20
0 16
cfn=(108)
calls=2 0 
0 10
0 26
cfn=(102)
calls=2 0 
0 66
0 4

fn=(126) strdup
0 30
cfn=(12)
calls=6 0 
0 238
0 18
cob=(3)
cfi=(3)
cfn=(388)
calls=1 0 
0 175
cfn=(32)
calls=5 0 
0 170
0 6
0 54
cfn=(38)
calls=6 0 
0 177

fn=(148)
0 7564
cob=(4)
cfi=(4)
cfn=(196)
calls=1 0 
0 8
cob=(4)
cfi=(4)
cfn=(194)
calls=1 0 
0 8
cob=(4)
cfi=(4)
cfn=(192)
calls=1 0 
0 5
cob=(4)
cfi=(4)
cfn=(190)
calls=1 0 
0 5
cob=(4)
cfi=(4)
cfn=(188)
calls=1 0 
0 5
cob=(4)
cfi=(4)
cfn=(186)
calls=1 0 
0 5
cob=(4)
cfi=(4)
cfn=(184)
calls=1 0 
0 5
cob=(4)
cfi=(4)
cfn=(182)
calls=1 0 
0 8
cob=(4)
cfi=(4)
cfn=(180)
calls=1 0 
0 5
cob=(4)
cfi=(4)
cfn=(178)
calls=1 0 
0 5
cob=(4)
cfi=(4)
cfn=(176)
calls=1 0 
0 8
cob=(4)
cfi=(4)
cfn=(174)
calls=1 0 
0 8
0 38581
cfn=(150) _dl_lookup_symbol_x
calls=475 0 
0 342556
0 12852
cob=(3)
cfi=(3)
cfn=(170) memcpy@GLIBC_2.2.5
calls=1 0 
0 15
cob=(3)
cfi=(3)
cfn=(168) gettimeofday
calls=1 0 
0 22
cob=(3)
cfi=(3)
cfn=(166) memset
calls=1 0 
0 8
cob=(3)
cfi=(3)
cfn=(164) strncasecmp
calls=1 0 
0 5
cob=(3)
cfi=(3)
cfn=(162) strnlen
calls=1 0 
0 5
cob=(3)
cfi=(3)
cfn=(158) time
calls=1 0 
0 22
cob=(3)
cfi=(3)
cfn=(156) strcasecmp
calls=1 0 
0 5
0 978
cfn=(38)
calls=8 0 
0 149
0 165
cfn=(104)
calls=10 0 
0 50
0 351
cfn=(150)
calls=6 0 
0 4134
0 204
cob=(3)
cfi=(3)
cfn=(854) memcpy@@GLIBC_2.14
calls=1 0 
0 10
cob=(3)
cfi=(3)
cfn=(444) strcmp
calls=1 0 
0 5
cob=(3)
cfi=(3)
cfn=(2308) strspn
calls=1 0 
0 6
cob=(3)
cfi=(3)
cfn=(166)
calls=1 0 
0 8
cob=(3)
cfi=(3)
cfn=(1118) index
calls=1 0 
0 6
cob=(3)
cfi=(3)
cfn=(422) strlen
calls=1 0 
0 9
cob=(3)
cfi=(3)
cfn=(808) strcpy
calls=1 0 
0 9
0 100

fn=(8) brk
0 12

fn=(82) _dl_initial_error_catch_tsd
0 34

fn=(1718)
0 347

fn=(5820) _wordcopy_fwd_aligned
0 40

fn=(2)
0 605
cfn=(4)
calls=1 0 
0 23
0 17
cfn=(6) _dl_sysdep_start
calls=1 0 
0 235539
0 64

fn=(20) _dl_next_ld_env_entry
0 394

fn=(108)
0 50

fn=(118) _xstat
0 147

fn=(6)
0 417
cfn=(8)
calls=1 0 
0 12
0 6
cfn=(10) init_cpu_features.constprop.0
calls=1 0 
0 112
0 4
cfn=(12)
calls=1 0 
0 35
0 3
cfn=(14) sbrk
calls=1 0 
0 17
0 12
cfn=(16) dl_main
calls=1 0 
0 234894
0 27

fn=(10)
0 112

fn=(62)
0 2572

fn=(88)
0 1868
cfn=(90)
calls=118 0 
0 7483
0 513
cfn=(62)
calls=8 0 
0 496
0 28
cfn=(60)
calls=2 0 
0 1031
0 22
cfn=(92) open_verify
calls=2 0 
0 894
0 158
cfn=(98)
calls=8 0 
0 26238
0 20
cfn=(12)
calls=6 0 
0 306
0 150
cfn=(116) open_path
calls=6 0 
0 6996
0 150
cfn=(116)
calls=5 0 
0 1739
0 48
cfn=(1720)
calls=1 0 
0 17
0 59
cfn=(120) _dl_load_cache_lookup
calls=6 0 
0 9383
0 108
cfn=(92)
calls=6 0 
0 3361
0 86
cfn=(1720)
calls=1 0 
0 17
0 658
cfn=(46)
calls=68 0 
0 1442
0 136

fn=(100)
0 100

fn=(116)
0 546
cfn=(56)
calls=23 0 
0 788
0 1116
cfn=(56)
calls=50 0 
0 961
0 200
cfn=(56)
calls=50 0 
0 1230
0 550
cfn=(92)
calls=50 0 
0 2000
0 682
cfn=(118)
calls=12 0 
0 147
0 515

fn=(4092)
0 101
cob=(3)
cfi=(3)
cfn=(388)
calls=1 0 
0 471
0 1
0 7
cfn=(38)
calls=1 0 
0 42
0 5

fn=(76)
0 6

fn=(130)
0 386
cfn=(5820)
calls=2 0 
0 40
0 4

fn=(16)
0 33
cfn=(18) _dl_process_tunable_env_entries
calls=1 0 
0 369
0 7
cfn=(20)
calls=1 0 
0 138
0 4
cfn=(20)
calls=2 0 
0 256
0 170
cfn=(24)
calls=1 0 
0 244
0 10
cfn=(40)
calls=1 0 
0 34
0 138
cfn=(46)
calls=1 0 
0 7
0 263
cfn=(4)
calls=1 0 
0 23
0 5
cfn=(48) _dl_discover_osversion
calls=1 0 
0 93
0 78
cfn=(22) bcmp
calls=1 0 
0 120
0 9
cfn=(22)
calls=1 0 
0 26
0 14
cfn=(22)
calls=1 0 
0 80
0 7
cfn=(52) _dl_init_paths
calls=1 0 
0 4998
0 3
cfn=(72)
calls=1 0 
0 17
0 57
cfn=(74) _dl_count_modids
calls=1 0 
0 4
0 19
cfn=(110) access
calls=1 0 
0 9
0 19
cfn=(112)
calls=1 0 
0 47983
0 121
cfn=(78) handle_ld_preload
calls=1 0 
0 3425
0 34
cfn=(132) _dl_receive_error
calls=1 0 
0 16404
0 5
cfn=(142)
calls=1 0 
0 644
0 35
cfn=(198) _dl_allocate_tls_init
calls=1 0 
0 238
0 5
cfn=(200) _dl_sysdep_start_cleanup
calls=1 0 
0 1
0 6
cfn=(72)
calls=1 0 
0 8
0 3
cfn=(76)
calls=1 0 
0 1
0 2
cfn=(202) _dl_unload_cache
calls=1 0 
0 15
0 21
cfn=(148)
calls=1 0 
0 8118
0 167
cfn=(148)
calls=7 0 
0 150291
0 60
cfn=(172) _dl_add_to_slotinfo
calls=1 0 
0 24
0 13
cfn=(76)
calls=1 0 
0 1
0 15

fn=(36)
0 958
cfn=(102)
calls=4 0 
0 132
0 487

fn=(64)
0 40
cfn=(66) strsep
calls=2 0 
0 415
0 12
cfn=(66)
calls=4 0 
0 1158
0 26
cfn=(12)
calls=4 0 
0 251
0 134
cfn=(12)
calls=1 0 
0 10
0 11
cfn=(32)
calls=1 0 
0 34
0 1
0 27
cfn=(32)
calls=3 0 
0 102
0 3
0 44
cfn=(56)
calls=4 0 
0 222
0 156
cfn=(38)
calls=1 0 
0 18
0 74

fn=(74)
0 4

fn=(96) read
0 40

fn=(106)
0 12883

fn=(146)
0 7
cfn=(36)
calls=1 0 
0 78
0 1
0 315
cfn=(28)
calls=1 0 
0 43
0 1
0 10

fn=(152) do_lookup_x
0 162025
cfn=(90)
calls=1116 0 
0 59938
0 53268
cfn=(154)
calls=614 0 
0 105608
0 3088

fn=(198)
0 61
cfn=(56)
calls=1 0 
0 23
0 4
cfn=(106)
calls=1 0 
0 134
0 16

fn=(202)
0 19
cfn=(204) munmap
calls=2 0 
0 10
0 6

fn=(14)
0 17

fn=(124) _dl_cache_libcmp
0 5440

fn=(140)
0 3370
cfn=(46)
calls=38 0 
0 3289
0 380

fn=(38)
0 1572

fn=(48)
0 21
cfn=(50) uname
calls=1 0 
0 5
0 67

fn=(78)
0 634
cfn=(80)
calls=1 0 
0 2683
0 22
cfn=(38)
calls=1 0 
0 82
0 4

fn=(104)
0 90

fn=(110)
0 9

fn=(24)
0 135
cfn=(12)
calls=9 0 
0 471
0 171
cob=(3)
cfi=(3)
cfn=(1722)
calls=2 0 
0 1044
cfn=(28)
calls=7 0 
0 402
0 9
0 108
cfn=(38)
calls=9 0 
0 277
0 475
cfn=(12)
calls=8 0 
0 393
0 228
cfn=(56)
calls=8 0 
0 278
0 548
cob=(3)
cfi=(3)
cfn=(388)
calls=2 0 
0 528
cfn=(32)
calls=6 0 
0 204
0 8
0 44

fn=(66)
0 1573

fn=(86) map_doit
0 9
cfn=(88)
calls=1 0 
0 2613
0 3

fn=(52)
0 14
cfn=(54) _dl_important_hwcaps
calls=1 0 
0 333
0 3
cfn=(32)
calls=1 0 
0 34
0 1
0 15
cfn=(32)
calls=1 0 
0 34
0 1
0 81
cfn=(58)
calls=1 0 
0 1369
0 8
cfn=(62)
calls=1 0 
0 207
0 4
cfn=(12)
calls=1 0 
0 127
0 8
cfn=(38)
calls=1 0 
0 90
0 584
cfn=(32)
calls=1 0 
0 34
0 1
0 10
cfn=(64)
calls=1 0 
0 2026
0 14

fn=(120)
0 1123
cfn=(124)
calls=59 0 
0 4966
0 272
cfn=(122)
calls=2 0 
0 188
0 20
cfn=(22)
calls=2 0 
0 224
0 30
cfn=(22)
calls=2 0 
0 222
0 86
cfn=(124)
calls=6 0 
0 474
0 252
cfn=(12)
calls=6 0 
0 361
0 60
cfn=(38)
calls=6 0 
0 177
0 12
cfn=(126)
calls=6 0 
0 868
0 48

fn=(200)
0 1

fn=(226) _dl_get_tls_static_info
0 5

fn=(1714) _dl_open
0 36
cob=(5)
cfi=(5)
cfn=(396)
calls=2 0 
0 62
0 44
cfn=(81)
calls=2 0 
0 276839
0 4
cfn=(202)
calls=2 0 
0 20
0 8
cob=(5)
cfi=(5)
cfn=(398)
calls=2 0 
0 58
0 18

fn=(5818)
0 27
cfn=(106)
calls=1 0 
0 26
0 86
cfn=(106)
calls=8 0 
0 120
0 1524
cfn=(130)
calls=3 0 
0 195
0 72
cfn=(130)
calls=3 0 
0 139
0 15

fn=(18)
0 369

fn=(44)
0 14

fn=(54)
0 83
cfn=(32)
calls=1 0 
0 34
0 1
0 162
cfn=(56)
calls=1 0 
0 22
0 5
cfn=(56)
calls=1 0 
0 22
0 4

fn=(80)
0 198
cob=(3)
cfi=(3)
cfn=(248) __libc_dl_error_tsd
calls=7 0 
0 21
cfn=(82)
calls=15 0 
0 30
0 132
cfn=(84) __sigsetjmp
calls=22 0 
0 440
0 176
cob=(6)
cfi=(6)
cfn=(4100) dlsym_doit
calls=4 0 
0 4148
cob=(6)
cfi=(6)
cfn=(4078) dlopen_doit
calls=1 0 
0 248953
cob=(3)
cfi=(3)
cfn=(1738) do_dlsym
calls=1 0 
0 725
cob=(3)
cfi=(3)
cfn=(1712) do_dlopen
calls=1 0 
0 28182
cfn=(114) openaux
calls=14 0 
0 41914
cfn=(86)
calls=1 0 
0 2625
0 286

fn=(81)
0 54
cob=(3)
cfi=(3)
cfn=(248)
calls=6 0 
0 18
0 36
cfn=(84)
calls=6 0 
0 120
0 48
cfn=(114)
calls=4 0 
0 3078
cfn=(1716)
calls=2 0 
0 276721
0 78

fn=(92)
0 1102
cfn=(94)
calls=58 0 
0 490
0 246
cfn=(96)
calls=8 0 
0 40
0 112
cfn=(22)
calls=8 0 
0 695
0 72
cfn=(22)
calls=8 0 
0 640
0 792
cfn=(22)
calls=6 0 
0 438
0 32
cfn=(22)
calls=8 0 
0 640
0 686
cfn=(22)
calls=3 0 
0 264
0 6

fn=(132)
0 11
cfn=(82)
calls=1 0 
0 2
0 7
cfn=(134)
calls=1 0 
0 16374
0 10

fn=(84)
0 560

fn=(172)
0 24

fn=(22)
0 3349

fn=(114)
0 252
cfn=(88)
calls=18 0 
0 44686
0 54

fn=(144)
0 56

fn=(50)
0 5

fn=(150)
0 108564
cfn=(152)
calls=639 0 
0 369512
0 1066
cfn=(152)
calls=82 0 
0 14415
0 23798

fn=(204)
0 10

fn=(224)
0 7181
cfn=(150)
calls=153 0 
0 167760
0 3390
cob=(3)
cfi=(3)
cfn=(4328) strstr
calls=1 0 
0 17
cob=(3)
cfi=(3)
cfn=(3072) bcmp
calls=1 0 
0 7
cob=(3)
cfi=(3)
cfn=(2378) mempcpy
calls=1 0 
0 10
cob=(3)
cfi=(3)
cfn=(2308)
calls=1 0 
0 6
cob=(3)
cfi=(3)
cfn=(158)
calls=1 0 
0 22
cob=(3)
cfi=(3)
cfn=(1878) rindex
calls=1 0 
0 6
cob=(3)
cfi=(3)
cfn=(156)
calls=1 0 
0 5
cob=(3)
cfi=(3)
cfn=(1768) rawmemchr
calls=1 0 
0 7
cob=(3)
cfi=(3)
cfn=(1118)
calls=1 0 
0 6
cob=(3)
cfi=(3)
cfn=(1042) strncmp
calls=1 0 
0 5
cob=(4)
cfi=(4)
cfn=(178)
calls=1 0 
0 5
cob=(3)
cfi=(3)
cfn=(948) strncpy
calls=1 0 
0 9
cob=(3)
cfi=(3)
cfn=(854)
calls=3 0 
0 30
cob=(3)
cfi=(3)
cfn=(166)
calls=1 0 
0 8
cob=(3)
cfi=(3)
cfn=(808)
calls=1 0 
0 9
cob=(3)
cfi=(3)
cfn=(168)
calls=1 0 
0 22
cob=(3)
cfi=(3)
cfn=(170)
calls=1 0 
0 15
cob=(3)
cfi=(3)
cfn=(444)
calls=1 0 
0 5
cob=(3)
cfi=(3)
cfn=(422)
calls=2 0 
0 18
0 22

ob=(3)
fl=(3)
fn=(1838) getnameinfo
0 159
cfn=(1840) inet_ntop
calls=1 0 
0 1715
0 11
cfn=(1840)
calls=1 0 
0 771
0 5

fn=(1840)
0 88
cfn=(1704) __GI_strcpy
calls=1 0 
0 29
0 17
cfn=(1842) sprintf
calls=1 0 
0 1650
0 6
cfn=(1704)
calls=1 0 
0 30
0 17
cfn=(1842)
calls=1 0 
0 590
0 59

fn=(404) sysmalloc
0 1106
cfn=(598) mmap
calls=4 0 
0 132
0 152
cfn=(406) __default_morecore
calls=14 0 
0 907
0 405
cfn=(406)
calls=1 0 
0 45
0 34

fn=(544) __GI_strchr
0 1053

fn=(556) realloc
0 1053
cfn=(608) _int_realloc
calls=16 0 
0 31612
0 185
cfn=(558) realloc_hook_ini
calls=1 0 
0 208

fn=(580) _nl_load_locale_from_archive
0 130
cfn=(582) sysconf
calls=10 0 
0 340
0 58
cfn=(572) __GI_strcmp
calls=9 0 
0 216
0 164
cfn=(544)
calls=1 0 
0 28
0 8
cfn=(236) __GI_strlen
calls=1 0 
0 14
0 103
cfn=(572)
calls=1 0 
0 24
0 223
cfn=(388)
calls=1 0 
0 188
0 1
0 6
cfn=(384) strdup
calls=1 0 
0 156
0 133
cfn=(600) _nl_intern_locale_data
calls=12 0 
0 7863
0 130
cfn=(536) strchrnul
calls=1 0 
0 23
0 6
cfn=(586) _nl_normalize_codeset
calls=1 0 
0 308
0 7
cfn=(552) __GI_strncmp
calls=1 0 
0 29
0 6
cfn=(590) free
calls=1 0 
0 85
0 1
0 7
cfn=(594) __open_nocancel
calls=1 0 
0 5
0 7
cfn=(596) _fxstat
calls=1 0 
0 10
0 10
cfn=(598)
calls=1 0 
0 33
0 27

fn=(602) new_composite_name
0 2176
cfn=(236)
calls=176 0 
0 2464
0 32
cfn=(236)
calls=16 0 
0 224
0 1524
cfn=(572)
calls=24 0 
0 576
0 646
cfn=(388)
calls=16 0 
0 3180
0 16
0 2256
cfn=(604) __GI_stpcpy
calls=176 0 
0 10863
0 48
cfn=(604)
calls=16 0 
0 1073
0 768
cfn=(604)
calls=192 0 
0 4668
0 912

fn=(620) unsetenv
0 12
cfn=(544)
calls=1 0 
0 34
0 4
cfn=(236)
calls=1 0 
0 14
0 282
cfn=(552)
calls=67 0 
0 2077
0 413

fn=(644) getuid
0 3

fn=(710) umask
0 6

fn=(914) __ctype_b_loc
0 1193502

fn=(1044) __strncmp_sse42
0 421030

fn=(1254) getopt
0 18
cfn=(1256) _getopt_internal
calls=3 0 
0 847
0 6

fn=(1288) _IO_no_init
0 5670
cfn=(1290) _IO_old_init
calls=567 0 
0 14046
0 12482

fn=(1348) _IO_setb
0 27546
cfn=(1390) munmap
calls=522 0 
0 2610
0 2088

fn=(1366) ferror
0 46260

fn=(1380) fclose@@GLIBC_2.2.5
0 18798
cfn=(1392) _IO_file_finish@@GLIBC_2.2.5
calls=3 0 
0 96
0 2080
cfn=(1392)
calls=520 0 
0 16640
0 6276
cfn=(590)
calls=523 0 
0 60216
0 523
0 4707
cfn=(1384) _IO_file_close_it@@GLIBC_2.2.5
calls=523 0 
0 59183
0 2092
cfn=(1382) _IO_un_link
calls=523 0 
0 59024
0 4689

fn=(1390)
0 2610

fn=(1394) _IO_default_finish
0 7322
cfn=(1382)
calls=523 0 
0 5230

fn=(1480) feof
0 55440

fn=(236)
0 104899

fn=(272) __init_misc
0 12
cfn=(274) __GI_strrchr
calls=1 0 
0 44
0 12

fn=(284) bsearch
0 13431
cob=(9)
cfi=(283) /home/mithuncy/fsm_code/src/backend/executor/execExprInterp.c
cfn=(4826) dispatch_compare_ptr
calls=28 2116 
0 565
cob=(9)
cfi=(29) /home/mithuncy/fsm_code/src/backend/utils/misc/guc.c
cfn=(866) guc_var_compare
calls=1077 4918 
0 152143
cfn=(286) intel_02_known_compare
calls=54 0 
0 324
0 5507

fn=(1646) inet_pton
0 418
cfn=(544)
calls=14 0 
0 440
0 998

fn=(1680) __strncasecmp_avx
0 433

fn=(1684) _res_hconf_init
0 9
cob=(5)
cfi=(5)
cfn=(1686) pthread_once
calls=1 0 
0 4828

fn=(1692) __res_maybe_init
0 15
cfn=(1694) __res_ninit
calls=1 0 
0 2903
0 3

fn=(1712)
0 14
cob=(1)
cfi=(1)
cfn=(1714)
calls=1 0 
0 28164
0 4

fn=(1814) sendto
0 4
cfn=(1816) __sendto_nocancel
calls=2 0 
0 12

fn=(1852) _itoa_word
0 131

fn=(2696) __malloc_fork_unlock_child
0 31

fn=(2700) _IO_iter_end
0 8

fn=(2724) setsid
0 5

fn=(372) __sigjmp_save
0 99
cfn=(774) sigprocmask
calls=6 0 
0 42
0 78

fn=(402) malloc_consolidate
0 5435

fn=(424) __strlen_sse42
0 304833

fn=(446) __strcmp_sse42
0 4155672

fn=(482) __memmove_ssse3
0 440977

fn=(542) putenv
0 96
cfn=(544)
calls=12 0 
0 336
0 108
cfn=(548) __GI_strnlen
calls=12 0 
0 249
0 12
0 108
cfn=(412) __GI_memcpy
calls=12 0 
0 289
0 60
cfn=(550) __add_to_environ
calls=12 0 
0 34442
0 60

fn=(574) _nl_find_locale
0 304
cfn=(572)
calls=16 0 
0 384
0 62
cfn=(572)
calls=10 0 
0 240
0 40
cfn=(236)
calls=10 0 
0 140
0 80
cfn=(576) memmem
calls=10 0 
0 510
0 130
cfn=(578) memchr
calls=10 0 
0 190
0 80
cfn=(580)
calls=10 0 
0 10349
0 156
cfn=(234) getenv
calls=4 0 
0 2043
0 36
cfn=(234)
calls=4 0 
0 2012
0 20
cfn=(234)
calls=3 0 
0 948
0 65

fn=(576)
0 200
cfn=(578)
calls=10 0 
0 190
0 120

fn=(584) getpagesize
0 30

fn=(1256)
0 39
cfn=(1258) _getopt_internal_r
calls=3 0 
0 775
0 33

fn=(1258)
0 74
cfn=(234)
calls=1 0 
0 450
0 49
cfn=(544)
calls=1 0 
0 28
0 174

fn=(1506) strtok
0 132920

fn=(282) intel_check_word
0 188
cfn=(284)
calls=8 0 
0 1228
0 219

fn=(1644) inet_aton
0 226
cfn=(1638) strtoul
calls=4 0 
0 620
0 48
cfn=(1638)
calls=12 0 
0 1344
0 428

fn=(1666) __nss_database_lookup
0 58
cfn=(572)
calls=2 0 
0 48
0 84
cfn=(572)
calls=28 0 
0 672
0 193
cfn=(1284) fopen@@GLIBC_2.2.5
calls=1 0 
0 569
0 6
cfn=(388)
calls=1 0 
0 103
0 1
0 400
cfn=(1668) getline
calls=65 0 
0 11075
0 514
cfn=(536)
calls=64 0 
0 1616
0 1538
cfn=(236)
calls=15 0 
0 210
0 60
cfn=(388)
calls=15 0 
0 2806
0 15
0 105
cfn=(412)
calls=15 0 
0 347
0 30
cfn=(1674) nss_parse_service_list
calls=15 0 
0 8213
0 329
cfn=(590)
calls=1 0 
0 85
0 1
0 2
cfn=(1380)
calls=1 0 
0 402
0 6

fn=(1668)
0 195
cfn=(1670) getdelim
calls=65 0 
0 10880

fn=(1690) fgets_unlocked
0 210
cfn=(1488) _IO_getline
calls=10 0 
0 2763
0 134

fn=(1804) getsockname
0 45

fn=(1818) recvmsg
0 12
cfn=(1820) __recvmsg_nocancel
calls=6 0 
0 30

fn=(1848) vfprintf
0 66
cfn=(536)
calls=2 0 
0 46
0 24
cfn=(1850) _IO_default_xsputn
calls=2 0 
0 30
0 10
cfn=(590)
calls=2 0 
0 14
0 2
0 4
cfn=(590)
calls=2 0 
0 14
0 2
0 309
cfn=(536)
calls=5 0 
0 115
0 35
cfn=(1850)
calls=5 0 
0 198
0 301
cfn=(1850)
calls=5 0 
0 290
0 105
cfn=(1852)
calls=5 0 
0 131
0 238

fn=(2098) sscanf
0 615
cfn=(2100) vsscanf
calls=41 0 
0 15353
0 82

fn=(2100)
0 615
cfn=(1288)
calls=41 0 
0 1722
0 287
cfn=(1846) _IO_str_init_static_internal
calls=41 0 
0 3280
0 205
cfn=(1536) _IO_vfscanf
calls=41 0 
0 8998
0 246

fn=(2380) __mempcpy_ssse3
0 15

fn=(2584) _IO_list_unlock
0 80

fn=(2732) prctl
0 6

fn=(4330) __strstr_sse42
0 352

fn=(5986) _IO_flush_all_lockp
0 88

fn=(1830) __free_in6ai
0 50

fn=(388)
0 138950
cfn=(400) _int_malloc
calls=7719 0 
0 1614009
0 169823
cfn=(390) malloc_hook_ini
calls=1 0 
0 57691

fn=(389) malloc'2
0 18
cfn=(400)
calls=1 0 
0 1056
0 22

fn=(400)
0 362216
cfn=(402)
calls=20 0 
0 3711
0 1169290
cfn=(402)
calls=1 0 
0 666
0 96
cfn=(404)
calls=18 0 
0 2781
0 80538

fn=(558)
0 32
cfn=(388)
calls=1 0 
0 176

fn=(578)
0 66796

fn=(590)
0 92362
cfn=(592) _int_free
calls=5752 0 
0 653413
0 55

fn=(700) srand
0 22
cfn=(702) srandom_r
calls=2 0 
0 21040
0 12

fn=(728) opendir
0 30
cfn=(730) __opendirat
calls=10 0 
0 2138

fn=(730)
0 60
cfn=(732) __openat_nocancel
calls=10 0 
0 84
0 74
cfn=(734) __alloc_dir
calls=9 0 
0 1917
0 3

fn=(810) __strcpy_ssse3
0 6196

fn=(1246) strtol
0 3300
cfn=(1248) ____strtol_l_internal
calls=825 0 
0 117366

fn=(1286) __fopen_internal
0 5240
cfn=(388)
calls=524 0 
0 52785
0 524
0 5764
cfn=(1288)
calls=524 0 
0 30392
0 2096
cfn=(1292) _IO_file_init@@GLIBC_2.2.5
calls=524 0 
0 67072
0 2620
cfn=(1300) _IO_file_fopen@@GLIBC_2.2.5
calls=524 0 
0 59431
0 4710
cfn=(1306) __fopen_maybe_mmap
calls=523 0 
0 2092
0 1
cfn=(1382)
calls=1 0 
0 113
0 2
cfn=(590)
calls=1 0 
0 113
0 1
0 7

fn=(1302) open
0 1036
cfn=(594)
calls=518 0 
0 2590

fn=(232) secure_getenv
0 5
cfn=(234)
calls=1 0 
0 421

fn=(256) __register_atfork
0 50

fn=(1638)
0 2068
cfn=(1640) ____strtoul_l_internal
calls=517 0 
0 73064

fn=(1696) __res_vinit
0 39
cfn=(234)
calls=1 0 
0 501
0 5
cfn=(1284)
calls=1 0 
0 541
0 26
cfn=(1690)
calls=1 0 
0 437
0 4
cfn=(1690)
calls=1 0 
0 183
0 22
cfn=(1380)
calls=1 0 
0 402
0 13
cfn=(234)
calls=1 0 
0 450
0 19
cfn=(1700) gethostname
calls=1 0 
0 98
0 5
cfn=(544)
calls=1 0 
0 28
0 5
cfn=(1704)
calls=1 0 
0 93
0 5
cfn=(654) getpid
calls=1 0 
0 5
0 5
cfn=(1698) inet_makeaddr
calls=1 0 
0 8
0 7

fn=(1700)
0 10
cfn=(1702) uname
calls=1 0 
0 5
0 6
cfn=(236)
calls=1 0 
0 28
0 7
cfn=(412)
calls=1 0 
0 32
0 10

fn=(1702)
0 5

fn=(1780) __strcasecmp_avx
0 212

fn=(1796) gaiconf_init
0 16
cfn=(1284)
calls=1 0 
0 770
0 24
cfn=(590)
calls=1 0 
0 7
0 1
0 6
cfn=(590)
calls=1 0 
0 7
0 1
0 6
cfn=(590)
calls=1 0 
0 7
0 1
0 8

fn=(1842)
0 30
cfn=(1844) vsprintf
calls=2 0 
0 2206
0 4

fn=(1844)
0 30
cfn=(1288)
calls=2 0 
0 84
0 14
cfn=(1846)
calls=2 0 
0 112
0 8
cfn=(1848)
calls=2 0 
0 1934
0 24

fn=(1872) listen
0 15

fn=(1940) fileno
0 3036

fn=(2102) __GI___rawmemchr
0 984

fn=(2308)
0 12

fn=(2578) _IO_list_lock
0 132

fn=(2706) _IO_list_resetlock
0 4

fn=(2746) epoll_create1
0 5

fn=(4110) _dl_addr_inside_object
0 260

fn=(348) (below main)
0 25
cfn=(350) __cxa_atexit
calls=1 0 
0 61
0 13
cob=(9)
cfi=(9)
cfn=(354) __libc_csu_init
calls=1 0 
0 55
0 8
cfn=(368) _setjmp
calls=1 0 
0 30
0 14
cob=(9)
cfi=(10) /home/mithuncy/fsm_code/src/backend/main/main.c
cfn=(374) main
calls=1 61 
0 391869438

fn=(502) access
0 25

fn=(592)
0 591689
cfn=(5530) systrim.isra.2
calls=920 0 
0 26156
0 6128
cfn=(402)
calls=6 0 
0 1058
0 29338

fn=(600)
0 403
cfn=(388)
calls=12 0 
0 2196
0 12
0 5252

fn=(702)
0 1216
cfn=(704) random_r
calls=2 0 
0 52
0 2472
cfn=(704)
calls=618 0 
0 16048
0 1252

fn=(756) sigemptyset
0 1064

fn=(948)
0 9

fn=(1042)
0 5

fn=(1120) __strchr_sse42
0 83717

fn=(1300)
0 24181
cfn=(1302)
calls=518 0 
0 3626
0 6796
cfn=(1294) _IO_link_in
calls=523 0 
0 5753
0 1569
cfn=(1304) __GI_strstr
calls=523 0 
0 13190
0 4270
cfn=(594)
calls=6 0 
0 34
0 12

fn=(1304)
0 13190

fn=(1350) _IO_file_read
0 6412
cfn=(1352) read
calls=1598 0 
0 11186
0 30
cfn=(1354) __read_nocancel
calls=10 0 
0 50
0 30

fn=(1354)
0 8040

fn=(1384)
0 7845
cfn=(1386) _IO_unsave_markers
calls=523 0 
0 4707
0 5230
cfn=(1348)
calls=523 0 
0 20379
0 4184
cfn=(1382)
calls=523 0 
0 5230
0 6799
cfn=(1388) _IO_file_close
calls=523 0 
0 3661
0 1053
cfn=(2448) _IO_do_write@@GLIBC_2.2.5
calls=1 0 
0 93
0 2

fn=(1490) _IO_getline_info
0 46174
cfn=(578)
calls=1596 0 
0 64239
0 4878
cfn=(412)
calls=15 0 
0 645
0 8277
cfn=(1492) __uflow
calls=36 0 
0 5386
0 24069
cfn=(412)
calls=1581 0 
0 106953
0 17433

fn=(160) _dl_vdso_vsym
0 42

fn=(234)
0 432
cfn=(236)
calls=48 0 
0 856
0 19712
cfn=(552)
calls=45 0 
0 1549
0 106

fn=(248)
0 42

fn=(1642) gaih_inet
0 1240
cfn=(1644)
calls=10 0 
0 2666
0 70
cfn=(544)
calls=6 0 
0 159
0 54
cfn=(1646)
calls=6 0 
0 960
0 128
cfn=(1692)
calls=2 0 
0 2921
0 762
cfn=(388)
calls=8 0 
0 1755
0 8
0 12
cfn=(388)
calls=6 0 
0 1171
0 6
0 724
cfn=(388)
calls=8 0 
0 1643
0 8
0 12
cfn=(388)
calls=6 0 
0 1138
0 6
0 78
cfn=(1706) __nss_lookup_function
calls=2 0 
0 30259
0 14
cfn=(1740) _dl_mcount_wrapper_check
calls=2 0 
0 8
0 16
cob=(11)
cfi=(78)
cfn=(1742) _nss_files_gethostbyname4_r
calls=2 0 
0 24031
0 152
cfn=(1648) __nscd_getai
calls=1 0 
0 866
0 48
cfn=(1666)
calls=2 0 
0 29488
0 13
cfn=(1684)
calls=1 0 
0 4837
0 1

fn=(1648)
0 17
cfn=(236)
calls=1 0 
0 14
0 7
cfn=(1650) __nscd_get_map_ref
calls=1 0 
0 177
0 22
cfn=(1664) __nscd_open_socket
calls=1 0 
0 108
0 14
cfn=(234)
calls=1 0 
0 501
0 6

fn=(1658) connect
0 12
cfn=(1660) __connect_nocancel
calls=6 0 
0 38

fn=(1698)
0 8

fn=(1708) tsearch
0 50
cfn=(2482) known_compare
calls=1 0 
0 53
0 9
cfn=(388)
calls=1 0 
0 270
0 1
0 32

fn=(1722)
0 333
cfn=(400)
calls=9 0 
0 2104
0 282
cfn=(828) __GI_memset
calls=7 0 
0 517
0 49

fn=(1802) bind
0 30

fn=(1824) qsort_r
0 100
cfn=(590)
calls=2 0 
0 14
0 2
0 120
cfn=(1826) msort_with_tmp.part.0
calls=2 0 
0 3354
0 4
cfn=(590)
calls=2 0 
0 14
0 2
0 10

fn=(1878)
0 6

fn=(1948) freeaddrinfo
0 132
cfn=(590)
calls=18 0 
0 126
0 18
0 30
cfn=(590)
calls=10 0 
0 70
0 10
0 56
cfn=(590)
calls=28 0 
0 2436
0 28
0 96

fn=(2378)
0 10

fn=(2460) __write_nocancel
0 5

fn=(2576) fork
0 341
cfn=(2578)
calls=11 0 
0 132
0 11
cfn=(2580) __malloc_fork_lock_parent
calls=11 0 
0 473
0 193
cfn=(2696)
calls=1 0 
0 31
0 1
cfn=(2698) _IO_iter_begin
calls=1 0 
0 2
0 8
cfn=(2704) _IO_iter_next
calls=3 0 
0 6
0 6
cfn=(2700)
calls=3 0 
0 6
0 1
cfn=(2700)
calls=1 0 
0 2
0 14
cfn=(2702) _IO_iter_file
calls=3 0 
0 6
0 15
cfn=(2702)
calls=3 0 
0 6
0 16
cfn=(2706)
calls=1 0 
0 4
0 14
cob=(5)
cfi=(5)
cfn=(2708) __reclaim_stacks
calls=1 0 
0 48
0 34
cfn=(2582) __malloc_fork_unlock_parent
calls=10 0 
0 290
0 10
cfn=(2584)
calls=10 0 
0 80
0 235
cob=(5)
cfi=(5)
cfn=(2694) __nptl_set_robust
calls=1 0 
0 5
0 1

fn=(5530)
0 16595
cfn=(406)
calls=7 0 
0 315
0 8329
cfn=(406)
calls=7 0 
0 476
0 42
cfn=(406)
calls=7 0 
0 315
0 84

fn=(5810) exit
0 4
cfn=(5812) __run_exit_handlers
calls=1 0 
0 12169

fn=(5846) __cxa_finalize
0 322
cfn=(5848) __unregister_atfork
calls=7 0 
0 91

fn=(156)
0 10

fn=(158)
0 18
cfn=(160)
calls=2 0 
0 14
0 12

fn=(394) _dl_addr
0 14
cob=(5)
cfi=(5)
cfn=(396)
calls=1 0 
0 31
0 56068
cob=(5)
cfi=(5)
cfn=(398)
calls=1 0 
0 29
0 31

fn=(406)
0 72
cfn=(408) sbrk
calls=36 0 
0 1770
0 216

fn=(572)
0 3000

fn=(582)
0 290
cfn=(584)
calls=10 0 
0 30
0 20

fn=(596)
0 10230

fn=(598)
0 17495

fn=(610) _nl_postload_ctype
0 45

fn=(734)
0 117
cfn=(388)
calls=9 0 
0 1665
0 9
0 126

fn=(762) sigfillset
0 84

fn=(1182) ____strtod_l_internal
0 57
cfn=(236)
calls=3 0 
0 42
0 138

fn=(1284)
0 1048
cfn=(1286)
calls=524 0 
0 232963

fn=(1338) _IO_sgetn
0 11370
cfn=(1340) _IO_file_xsgetn
calls=3790 0 
0 398827

fn=(1342) _IO_doallocbuf
0 8352
cfn=(1344) _IO_file_doallocate
calls=522 0 
0 57942
0 1044

fn=(1388)
0 1046
cfn=(748) __close_nocancel
calls=523 0 
0 2615

fn=(1392)
0 4184
cfn=(1394)
calls=523 0 
0 12552

fn=(1440) __getdents
0 300
cfn=(236)
calls=10 0 
0 140
0 16265
cfn=(236)
calls=3253 0 
0 53948
0 13052
cfn=(1442) __GI_memmove
calls=3263 0 
0 210280
0 16427

fn=(1486) fgets
0 61659
cfn=(1488)
calls=1581 0 
0 278473
0 42663

fn=(1488)
0 3182
cfn=(1490)
calls=1591 0 
0 278054

fn=(1534) vfscanf
0 4
cfn=(1536)
calls=2 0 
0 1318

fn=(1536)
0 5388
cfn=(1538) _IO_sputbackc
calls=4 0 
0 56
0 1298
cob=(5)
cfi=(5)
cfn=(1298) _pthread_cleanup_pop_restore
calls=43 0 
0 344
0 294
cfn=(1538)
calls=1 0 
0 14
0 123
cfn=(2104) __strtoul_internal
calls=1 0 
0 167
0 309
cob=(5)
cfi=(5)
cfn=(1296) _pthread_cleanup_push_defer
calls=43 0 
0 602
0 294
cfn=(1538)
calls=2 0 
0 28
0 113
cfn=(1492)
calls=2 0 
0 490
0 172
cfn=(1538)
calls=40 0 
0 560
0 64

fn=(1560) getppid
0 6

fn=(276) __ctype_init
0 16

fn=(286)
0 324

fn=(1652) __nscd_get_mapping
0 14
cfn=(236)
calls=1 0 
0 14
0 15
cfn=(1654) open_socket
calls=1 0 
0 74
0 19

fn=(1676) __GI_mempcpy
0 2985

fn=(1704)
0 244

fn=(1706)
0 44
cfn=(1708)
calls=2 0 
0 415
0 43
cfn=(388)
calls=1 0 
0 175
0 1
0 19
cfn=(236)
calls=1 0 
0 14
0 4
cfn=(236)
calls=1 0 
0 27
0 8
cfn=(604)
calls=1 0 
0 39
0 4
cfn=(1704)
calls=1 0 
0 92
0 4
cfn=(1736) __libc_dlsym
calls=1 0 
0 810
0 21
cfn=(236)
calls=1 0 
0 14
0 11
cfn=(604)
calls=1 0 
0 39
0 8
cfn=(1710) __libc_dlopen_mode
calls=1 0 
0 28264
0 12
cfn=(388)
calls=1 0 
0 175
0 1
0 15

fn=(1740)
0 8

fn=(1806) make_request
0 42
cob=(10) /usr/lib64/valgrind/callgrind-amd64-linux
cfi=(22) ???
cfn=(1810) 0x000000005803d96d
calls=2 0 
0 6
0 2
0 42
cfn=(1814)
calls=2 0 
0 16
0 100
cfn=(1818)
calls=6 0 
0 42
0 678

fn=(1822) qsort
0 4
cfn=(1824)
calls=2 0 
0 128

fn=(1828) rfc3484_sort
0 3130

fn=(2104)
0 3
cfn=(1640)
calls=1 0 
0 164

fn=(2368) statfs
0 5

fn=(2456) _IO_file_write@@GLIBC_2.2.5
0 22
cfn=(2458) write
calls=1 0 
0 7
0 14

fn=(2482)
0 5
cfn=(572)
calls=1 0 
0 48

fn=(2756) epoll_ctl
0 36

fn=(4108) do_sym
0 144
cfn=(4110)
calls=4 0 
0 260
0 84
cob=(1)
cfi=(1)
cfn=(150)
calls=4 0 
0 2198
0 116

fn=(384)
0 8545
cfn=(236)
calls=1709 0 
0 46512
0 5127
cfn=(388)
calls=1709 0 
0 440652
0 1709
0 15381
cfn=(412)
calls=1709 0 
0 50163

fn=(412)
0 319674

fn=(454) getcwd
0 238

fn=(510) chdir
0 25

fn=(518) _lxstat
0 20

fn=(586)
0 63
cfn=(388)
calls=1 0 
0 188
0 1
0 56

fn=(654)
0 40

fn=(704)
0 16126

fn=(746) closedir
0 45
cfn=(590)
calls=9 0 
0 997
0 9
0 27
cfn=(748)
calls=9 0 
0 45

fn=(854)
0 40

fn=(950) __strncpy_ssse3
0 36159

fn=(1306)
0 2092

fn=(1438) readdir
0 89606
cfn=(1440)
calls=16 0 
0 310412
0 35296

fn=(1492)
0 798
cfn=(1494) _IO_default_uflow
calls=38 0 
0 4888
0 190

fn=(254) __libc_pthread_init
0 8
cfn=(256)
calls=1 0 
0 50
0 385

fn=(1650)
0 36
cfn=(1652)
calls=1 0 
0 136
0 5

fn=(1654)
0 30
cfn=(1656) socket
calls=2 0 
0 10
0 48
cfn=(1658)
calls=2 0 
0 22
0 38

fn=(1656)
0 60

fn=(1672) __underflow
0 969
cfn=(1496) _IO_file_underflow@@GLIBC_2.2.5
calls=46 0 
0 3403
0 224

fn=(1688) do_init
0 22
cfn=(234)
calls=1 0 
0 463
0 8
cfn=(1284)
calls=1 0 
0 541
0 13
cfn=(1690)
calls=1 0 
0 404
0 4
cfn=(1690)
calls=1 0 
0 183
0 8
cfn=(536)
calls=1 0 
0 23
0 76
cfn=(1680)
calls=1 0 
0 51
0 1
0 6
cfn=(1680)
calls=1 0 
0 51
0 1
0 6
cfn=(1680)
calls=1 0 
0 51
0 1
0 6
cfn=(1680)
calls=1 0 
0 46
0 1
0 31
cfn=(1380)
calls=1 0 
0 402
0 2
cfn=(234)
calls=1 0 
0 464
0 4
cfn=(234)
calls=1 0 
0 450
0 5
cfn=(234)
calls=1 0 
0 450
0 5
cfn=(234)
calls=1 0 
0 463
0 4
cfn=(234)
calls=1 0 
0 463
0 31
cfn=(1680)
calls=1 0 
0 46
0 1
0 13

fn=(1694)
0 2
cfn=(1696)
calls=1 0 
0 2901

fn=(1736)
0 14
cob=(1)
cfi=(1)
cfn=(80)
calls=1 0 
0 784
0 12

fn=(1820)
0 30

fn=(1986) chmod
0 5

fn=(2402) posix_fallocate
0 14

fn=(2442) fwrite
0 127
cfn=(2444) _IO_file_xsputn@@GLIBC_2.2.5
calls=1 0 
0 337
0 10
cfn=(2444)
calls=2 0 
0 146
0 51

fn=(2446) _IO_file_overflow@@GLIBC_2.2.5
0 40
cfn=(2448)
calls=1 0 
0 15
0 2
cfn=(1342)
calls=1 0 
0 129
0 6

fn=(2564) _IO_file_sync@@GLIBC_2.2.5
0 312

fn=(2582)
0 290

fn=(5812)
0 55
cfn=(5984) _IO_cleanup
calls=1 0 
0 138
0 5
cfn=(5988) _Exit
calls=1 0 
0 5
0 12
cob=(1)
cfi=(1)
cfn=(5816)
calls=1 0 
0 11301
cob=(9)
cfi=(67) /home/mithuncy/fsm_code/src/backend/storage/ipc/ipc.c
cfn=(5814) atexit_callback
calls=1 291 
0 651
0 2

fn=(5988)
0 5

fn=(170)
0 30

fn=(392) ptmalloc_init.part.7
0 401
cfn=(394)
calls=1 0 
0 56173
0 10

fn=(422)
0 27

fn=(496) _xstat
0 150

fn=(550)
0 168
cfn=(236)
calls=12 0 
0 168
0 264
cfn=(552)
calls=12 0 
0 372
0 2984
cfn=(552)
calls=746 0 
0 23116
0 5326
cfn=(556)
calls=7 0 
0 1495
0 7
0 94
cfn=(412)
calls=1 0 
0 196
0 252

fn=(568) setlocale
0 913
cfn=(572)
calls=33 0 
0 792
0 598
cob=(5)
cfi=(5)
cfn=(606) pthread_rwlock_unlock
calls=17 0 
0 289
0 98
cfn=(234)
calls=16 0 
0 7702
0 176
cfn=(574)
calls=16 0 
0 17789
0 154
cfn=(384)
calls=10 0 
0 2023
0 78
cfn=(602)
calls=16 0 
0 31426
0 129
cfn=(610)
calls=1 0 
0 45
0 103
cfn=(590)
calls=7 0 
0 595
0 7
0 111
cfn=(590)
calls=15 0 
0 2223
0 15
0 128
cfn=(590)
calls=16 0 
0 112
0 16
0 197
cob=(5)
cfi=(5)
cfn=(570) pthread_rwlock_wrlock
calls=33 0 
0 594
0 146
cob=(5)
cfi=(5)
cfn=(606)
calls=16 0 
0 272
0 16

fn=(630) strxfrm_l
0 68
cfn=(236)
calls=4 0 
0 56
0 1644

fn=(638) geteuid
0 9

fn=(748)
0 2660

fn=(768) sigdelset
0 390

fn=(1346) _IO_file_stat
0 2088
cfn=(596)
calls=522 0 
0 5220

fn=(1442)
0 42568
cfn=(2470) _wordcopy_bwd_dest_aligned
calls=4 0 
0 148
0 167564

fn=(1494)
0 152
cfn=(1496)
calls=38 0 
0 4472
0 264

fn=(1496)
0 1344
cfn=(1498) _IO_switch_to_get_mode
calls=84 0 
0 1680
0 1008
cfn=(1350)
calls=84 0 
0 944
0 1065
cfn=(1342)
calls=14 0 
0 1806
0 28

fn=(1538)
0 658

fn=(274)
0 44

fn=(1674)
0 1739
cfn=(388)
calls=24 0 
0 4462
0 24
0 192
cfn=(1676)
calls=24 0 
0 540
0 820
cfn=(1680)
calls=1 0 
0 95
0 1
0 241
cfn=(1680)
calls=1 0 
0 93
0 1
0 5

fn=(1710)
0 16
cob=(1)
cfi=(1)
cfn=(80)
calls=1 0 
0 28241
0 7

fn=(1826)
0 94
cfn=(412)
calls=2 0 
0 46
0 10
cfn=(412)
calls=2 0 
0 36
0 34
cfn=(1828)
calls=2 0 
0 3130
0 4

fn=(3832) __epoll_wait_nocancel
0 32

fn=(2396) ftruncate
0 5

fn=(2454) fputc
0 39

fn=(2524) getsockopt
0 6

fn=(2698)
0 2

fn=(2702)
0 12

fn=(5848)
0 91

fn=(350)
0 16
cfn=(352) __new_exitfn
calls=2 0 
0 83
0 28

fn=(352)
0 83

fn=(368)
0 2
cfn=(370) __sigsetjmp
calls=1 0 
0 28

fn=(390)
0 8
cfn=(392)
calls=1 0 
0 56584
0 3
cfn=(389)
calls=1 0 
0 1096

fn=(410) brk
0 741

fn=(444)
0 10

fn=(536)
0 107797

fn=(548)
0 249

fn=(608)
0 606
cfn=(400)
calls=11 0 
0 2129
0 169
cfn=(592)
calls=1 0 
0 69
0 40
cfn=(592)
calls=10 0 
0 887
0 126
cfn=(412)
calls=9 0 
0 27545
0 41

fn=(774)
0 287

fn=(1118)
0 12

fn=(1292)
0 4192
cfn=(1294)
calls=524 0 
0 60260
0 2620

fn=(1294)
0 44529
cob=(5)
cfi=(5)
cfn=(1298)
calls=524 0 
0 4192
0 5764
cob=(5)
cfi=(5)
cfn=(1296)
calls=524 0 
0 7336
0 4192

fn=(1336) fread
0 125070
cfn=(1338)
calls=3790 0 
0 410197
0 82626

fn=(1340)
0 119425
cfn=(1350)
calls=1524 0 
0 16764
0 48128
cfn=(412)
calls=2769 0 
0 130423
0 5690
cfn=(1676)
calls=38 0 
0 2352
0 202
cfn=(1672)
calls=44 0 
0 4264
0 5669
cfn=(1342)
calls=507 0 
0 65403
0 507

fn=(1382)
0 46559
cob=(5)
cfi=(5)
cfn=(1298)
calls=524 0 
0 4192
0 5764
cob=(5)
cfi=(5)
cfn=(1296)
calls=524 0 
0 7336
0 5746

fn=(1498)
0 1680

fn=(270)
0 27
cfn=(160)
calls=1 0 
0 7
0 8
cfn=(160)
calls=1 0 
0 7
0 10
cfn=(272)
calls=1 0 
0 68
0 1
cfn=(276)
calls=1 0 
0 16
0 14

fn=(278)
0 39
cfn=(280) handle_intel.isra.0
calls=1 0 
0 844
0 3
cfn=(280)
calls=1 0 
0 885
0 108

fn=(280)
0 40
cfn=(282)
calls=2 0 
0 1446
0 14
cfn=(282)
calls=2 0 
0 189
0 40

fn=(1636) getaddrinfo
0 494
cfn=(1642)
calls=10 0 
0 105254
0 280
cfn=(1822)
calls=2 0 
0 132
0 58
cfn=(1658)
calls=4 0 
0 28
0 126
cfn=(1656)
calls=4 0 
0 20
0 67
cfn=(1804)
calls=4 0 
0 20
0 60
cfn=(284)
calls=2 0 
0 50
0 8
cfn=(284)
calls=2 0 
0 50
0 56
cfn=(1824)
calls=2 0 
0 3492
0 76
cfn=(1830)
calls=10 0 
0 50
0 145
cfn=(1638)
calls=1 0 
0 168
0 18
cob=(5)
cfi=(5)
cfn=(1686)
calls=2 0 
0 886
0 42
cfn=(1800) __check_pf
calls=2 0 
0 1137
0 2

fn=(1660)
0 38

fn=(1670)
0 1756
cfn=(388)
calls=1 0 
0 188
0 1
0 712
cfn=(412)
calls=64 0 
0 2999
0 512
cfn=(578)
calls=64 0 
0 2177
0 2191
cfn=(1672)
calls=2 0 
0 332
0 12

fn=(1738)
0 14
cob=(1)
cfi=(1)
cfn=(150)
calls=1 0 
0 707
0 4

fn=(1800)
0 43
cfn=(2484) __nscd_get_nl_timestamp
calls=1 0 
0 5
0 10
cfn=(1656)
calls=2 0 
0 10
0 26
cfn=(1802)
calls=2 0 
0 10
0 81
cfn=(1804)
calls=2 0 
0 10
0 10
cfn=(1806)
calls=2 0 
0 928
0 4

fn=(3830) epoll_wait
0 8
cfn=(3832)
calls=4 0 
0 32

fn=(1850)
0 385
cfn=(1676)
calls=1 0 
0 45
0 172

fn=(1862) setsockopt
0 18

fn=(2124) shmat
0 5

fn=(2310) __strspn_sse42
0 239

fn=(2412) dup
0 5000

fn=(2444)
0 83
cfn=(1676)
calls=2 0 
0 48
0 55
cfn=(2446)
calls=1 0 
0 192
0 19
cfn=(1850)
calls=1 0 
0 84
0 2

fn=(2470)
0 148

fn=(2484)
0 5

fn=(2510) __select_nocancel
0 84

fn=(2580)
0 473

fn=(2664) kill
0 50

fn=(2780) setitimer
0 10

fn=(4328)
0 17

fn=(162)
0 5

fn=(164)
0 5

fn=(166)
0 24

fn=(370)
0 285
cfn=(372)
calls=15 0 
0 219

fn=(408)
0 549
cfn=(410)
calls=21 0 
0 273
0 294
cfn=(410)
calls=36 0 
0 468
0 186

fn=(552)
0 27143

fn=(594)
0 2629

fn=(604)
0 16682

fn=(628) strxfrm
0 12
cfn=(630)
calls=4 0 
0 1768

fn=(732)
0 84

fn=(808)
0 18

fn=(828)
0 7441190

fn=(856) __memcpy_ssse3
0 4002991

fn=(1180) strtod
0 12
cfn=(1182)
calls=3 0 
0 237

fn=(1248)
0 117366

fn=(1290)
0 14046

fn=(1344)
0 5742
cfn=(1346)
calls=522 0 
0 7308
0 8352
cfn=(598)
calls=522 0 
0 17226
0 3654
cfn=(1348)
calls=522 0 
0 10962
0 4698

fn=(1352)
0 3196
cfn=(1354)
calls=1598 0 
0 7990

fn=(1386)
0 4707

fn=(1532) fscanf
0 30
cfn=(1534)
calls=2 0 
0 1322
0 4

fn=(168)
0 18
cfn=(160)
calls=2 0 
0 14
0 12

fn=(242) getrlimit
0 15

fn=(1640)
0 73228

fn=(1664)
0 19
cfn=(1654)
calls=1 0 
0 74
0 15

fn=(1768)
0 7

fn=(1770) __rawmemchr_sse42
0 116

fn=(1816)
0 12

fn=(1846)
0 553
cfn=(2102)
calls=41 0 
0 984
0 246
cfn=(1348)
calls=41 0 
0 861
0 10
cfn=(1348)
calls=2 0 
0 42
0 696

fn=(1880) __strrchr_sse42
0 467

fn=(1972) unlink
0 50

fn=(2118) shmget
0 5

fn=(2344) random
0 10
cfn=(704)
calls=1 0 
0 26
0 7

fn=(2422) pipe
0 10

fn=(2448)
0 37
cfn=(2456)
calls=1 0 
0 43
0 28

fn=(2458)
0 2
cfn=(2460)
calls=1 0 
0 5

fn=(2508) select
0 20
cfn=(2510)
calls=10 0 
0 84

fn=(2562) fflush
0 552
cfn=(2564)
calls=24 0 
0 312
0 432

fn=(2672) atol
0 12
cfn=(1246)
calls=4 0 
0 656

fn=(2704)
0 6

fn=(3072)
0 7

fn=(3074) __memcmp_sse4_1
0 1086014

fn=(4106) _dl_sym
0 12
cfn=(4108)
calls=4 0 
0 2802

fn=(5984)
0 8
cfn=(5986)
calls=1 0 
0 88
0 42

ob=(11)
fl=(78)
fn=(5946)
0 8
cob=(1)
cfi=(1)
cfn=(223)
calls=1 0 
0 1448
0 5
0 1
cfn=(5958) 0x00000000000021d0
calls=1 0 
0 9
0 3

fn=(1754) internal_getent
0 218
cob=(3)
cfi=(3)
cfn=(1690)
calls=5 0 
0 1373
cob=(1)
cfi=(1)
cfn=(223)
calls=1 0 
0 1916
0 10
0 70
cob=(3)
cfi=(3)
cfn=(914)
calls=3 0 
0 9
cob=(1)
cfi=(1)
cfn=(223)
calls=1 0 
0 1355
0 8
0 3208
cob=(3)
cfi=(3)
cfn=(1646)
calls=3 0 
0 285
cob=(1)
cfi=(1)
cfn=(223)
calls=1 0 
0 1523
0 8
0 28
cob=(3)
cfi=(3)
cfn=(1770)
calls=3 0 
0 87
cob=(1)
cfi=(1)
cfn=(223)
calls=1 0 
0 1374
0 8
0 2362
cob=(3)
cfi=(3)
cfn=(1646)
calls=2 0 
0 394
0 2
0 12

fn=(1728)
0 16

fn=(1742)
0 34
cob=(5)
cfi=(5)
cfn=(396)
calls=1 0 
0 24
cob=(1)
cfi=(1)
cfn=(223)
calls=1 0 
0 801
0 6
0 58
cfn=(1754)
calls=2 0 
0 9876
0 68
cfn=(1754)
calls=4 0 
0 4374
0 30
cob=(3)
cfi=(3)
cfn=(1780)
calls=3 0 
0 168
cob=(1)
cfi=(1)
cfn=(223)
calls=1 0 
0 1402
0 8
0 160
cob=(3)
cfi=(3)
cfn=(856)
calls=3 0 
0 40
cob=(1)
cfi=(1)
cfn=(223)
calls=1 0 
0 1362
0 8
0 106
cob=(5)
cfi=(5)
cfn=(398)
calls=1 0 
0 17
cob=(1)
cfi=(1)
cfn=(223)
calls=1 0 
0 824
0 6
0 26
cob=(3)
cfi=(3)
cfn=(1380)
calls=1 0 
0 446
cob=(1)
cfi=(1)
cfn=(223)
calls=1 0 
0 1731
0 6
0 10
cob=(3)
cfi=(3)
cfn=(1284)
calls=1 0 
0 569
cob=(1)
cfi=(1)
cfn=(223)
calls=1 0 
0 1859
0 6
0 6

fn=(5958)
0 9

ob=(9)
fl=(73) /home/mithuncy/fsm_code/src/backend/postmaster/bgworker.c
fn=(1614) RegisterBackgroundWorker
849 7
+4 4
+1 6
cfi=(57) /home/mithuncy/fsm_code/src/backend/utils/error/elog.c
cfn=(1548) errstart
calls=1 232 
* 50
* 2
+3 4
+1 5
cob=(3)
cfi=(3)
cfn=(446)
calls=1 0 
* 55
* 1
-1 2
+11 4
cfn=(1616) SanityCheckBackgroundWorker
calls=1 584 
* 47
* 3
+3 4
+15 7
+16 2
cob=(3)
cfi=(3)
cfn=(388)
calls=1 0 
* 176
* 1
* 1
+1 2
+8 75
+1 2
+1 2
+1 2
+1 2
+1 2
+2 5
cfi=(74) /home/mithuncy/fsm_code/src/backend/postmaster/../../../src/include/lib/ilist.h
cfn=(1618) slist_push_head
calls=1 575 
* 13
+1 6

fn=(2618) ReportBackgroundWorkerPID
441 4
+4 8
+1 4
+2 4
+2 2

fn=(2260) BackgroundWorkerShmemInit
160 3
+3 1
cfn=(2040) BackgroundWorkerShmemSize
calls=1 -19 
* 62
* 4
cfi=(87) /home/mithuncy/fsm_code/src/backend/storage/ipc/shmem.c
cfn=(2168) ShmemInitStruct
calls=1 373 
* 1110
* 1
+3 4
+3 1
+2 3
+1 2
+1 2
+8 3
+2 7
+3 3
+2 2
+1 2
+1 2
+1 2
+1 3
+1 2
+1 7
cob=(3)
cfi=(3)
cfn=(856)
calls=1 0 
* 121
* 1
+1 1
-14 9
+20 1
+2 49
+2 14
+1 7
-5 24
+10 2

fn=(1616)
584 6
+2 5
+2 5
+9 4
+12 4
+2 2
-1 2
+15 4
+1 3
-1 2
+13 5
+3 1
+1 4

fn=(2040)
144 6
+4 2
+1 10
cfi=(87)
cfn=(2000) mul_size
calls=2 493 
* 46
* 10
cfi=(87)
cfn=(2002) add_size
calls=2 476 
* 42
* 2
+3 2
+1 4

fl=(108) /home/mithuncy/fsm_code/src/backend/replication/walsender.c
fn=(2068) WalSndShmemSize
3028 9
+1 3
+2 3
+1 15
cfi=(87)
cfn=(2000)
calls=3 493 
* 69
* 15
cfi=(87)
cfn=(2002)
calls=3 476 
* 63
* 3
+2 3
+1 6

fn=(2282) WalSndShmemInit
3040 3
+5 1
cfn=(2068)
calls=1 -17 
* 63
* 4
cfi=(87)
cfn=(2168)
calls=1 373 
* 1012
-1 1
+3 4
+3 4
cfn=(2068)
calls=1 -22 
* 63
* 19
cob=(3)
cfi=(3)
cfn=(828)
calls=1 0 
* 135
* 1
+2 2
+1 21
cfi=(126) /home/mithuncy/fsm_code/src/backend/storage/ipc/shmqueue.c
cfn=(2228) SHMQueueInit
calls=3 37 
* 36
-1 11
+3 2
+2 120
+2 20
-4 43
+7 2

fl=(64) /home/mithuncy/fsm_code/src/backend/utils/adt/datetime.c
fn=(1518) ConvertTimeZoneAbbrevs
4508 10
+7 6
-1 4
+2 8
+2 4
+2 3920
+2 1568
+5 408
cob=(3)
cfi=(3)
cfn=(424)
calls=102 0 
* 1814
* 102
-1 204
+2 408
-10 1574
+15 6
cob=(3)
cfi=(3)
cfn=(388)
calls=2 0 
* 546
* 2
* 2
+1 4
+4 6
+1 6
+3 6
-1 4
+2 8
+1 4
+2 3920
+1 3136
+3 2744
cfi=(16) /home/mithuncy/fsm_code/src/port/strlcpy.c
cfn=(460) strlcpy
calls=392 46 
* 34860
+1 1568
+6 408
+1 204
+1 714
cob=(3)
cfi=(3)
cfn=(810)
calls=102 0 
* 4582
* 102
+2 204
+2 408
+3 408
cob=(3)
cfi=(3)
cfn=(424)
calls=102 0 
* 1814
* 102
-1 204
+2 510
+4 1934
+1 776
-28 776
+27 192
+1 384
-28 798
+38 2
+1 4

fn=(1546) CheckDateTokenTable
4421 12
+1 2
+3 4
+3 1096
cob=(3)
cfi=(3)
cfn=(424)
calls=137 0 
* 2055
* 137
* 274
+10 274
+1 2160
cob=(3)
cfi=(3)
cfn=(446)
calls=135 0 
* 2970
* 135
-1 270
-13 554
+23 2
+1 4

fn=(1544) CheckDateTokenTables
4453 4
+1 1
+5 6
cfn=(1546)
calls=1 -38 
* 5376
* 5
+1 6
cfn=(1546)
calls=1 -39 
* 4573
* 5
+1 1
+1 4

fn=(1520) InstallTimeZoneAbbrevs
4592 8
+1 4
+2 8
cob=(3)
cfi=(3)
cfn=(828)
calls=2 0 
* 74
* 2
+1 4

fl=(197) /home/mithuncy/fsm_code/src/backend/utils/init/../../../../src/include/nodes/pg_list.h
fn=(3522) list_head
78 3
+1 5
+1 2

fl=(307) /home/mithuncy/fsm_code/src/backend/commands/define.c
fn=(5286) defGetString
50 2500
+1 2000
+5 2500
+12 2000
+11 2000

fl=(58) /home/mithuncy/fsm_code/src/backend/libpq/pqcomm.c
fn=(1962) Lock_AF_UNIX
615 5
+9 5
cfi=(54) /home/mithuncy/fsm_code/src/backend/utils/init/miscinit.c
cfn=(1964) CreateSocketLockFile
calls=1 1192 
* 3667
+6 3
cob=(1)
cfi=(1)
cfn=(223)
calls=1 0 
* 1315
* 5
+5 3
cfi=(13) /home/mithuncy/fsm_code/src/backend/utils/mmgr/mcxt.c
cfn=(928) pstrdup
calls=1 1162 
* 195
* 5
cfi=(45) /home/mithuncy/fsm_code/src/backend/nodes/list.c
cfn=(960) lappend
calls=1 129 
* 290
* 1
+2 1
+1 2

fn=(2628) StreamConnection
717 12
+2 4
+1 4
+1 4
-1 10
cob=(5)
cfi=(5)
cfn=(2634) accept
calls=1 0 
* 7
cob=(1)
cfi=(1)
cfn=(223)
calls=1 0 
* 775
* 6
* 12
+20 4
+1 4
+1 4
-1 12
cob=(3)
cfi=(3)
cfn=(1804)
calls=2 0 
* 10
* 2
* 4
+9 8
+80 2
+1 8

fn=(3438) socket_putmessage
1561 119
+1 102
+2 17
+1 51
+1 68
cfn=(3440) internal_putbytes
calls=17 1370 
* 1003
* 34
+2 68
+4 68
+1 68
cfn=(3440)
calls=17 1370 
* 1003
* 34
+3 85
cfn=(3440)
calls=17 1370 
* 1107
* 34
+2 17
+1 34
+5 34

fn=(3834) pq_getmessage
1273 6
+5 3
cfi=(80) /home/mithuncy/fsm_code/src/backend/lib/stringinfo.c
cfn=(1890) resetStringInfo
calls=1 63 
* 12
+3 4
cfn=(2786) pq_getbytes
calls=1 1095 
* 59
* 2
+8 3
+2 5
+9 3
+2 3
+7 8
cob=(3)
cfi=(3)
cfn=(370)
calls=1 0 
* 28
* 1
* 4
+2 5
cfi=(80)
cfn=(1922) enlargeStringInfo
calls=1 271 
* 35
+13 4
+3 7
cfn=(2786)
calls=1 1095 
* 131
* 2
+7 3
+2 6
+4 1
+2 1
+1 4

fn=(5802) socket_close
257 5
+2 3
+30 3
cfi=(139) /home/mithuncy/fsm_code/src/backend/libpq/be-secure.c
cfn=(5804) secure_close
calls=1 135 
* 5
+12 2
+2 2

fn=(1160) pq_setkeepalivesidle
1731 5
+1 2
+1 2
+42 2

fn=(3800) socket_flush
1401 9
+4 9
+2 3
+1 6
cfn=(2790) socket_set_nonblocking
calls=3 923 
* 48
+1 3
cfn=(3802) internal_flush
calls=3 +14 
* 465
* 3
+1 3
+1 3
+1 6

fn=(2788) pq_recvbuf
940 12
+1 9
+2 8
+9 6
+4 4
cfn=(2790)
calls=2 -33 
* 32
* 2
cfn=(2790)
calls=1 -33 
* 16
+8 12
-1 24
cfi=(139)
cfn=(2792) secure_read
calls=3 147 
* 88273
* 2
+3 4
+15 4
+9 8
+1 2
+2 8

fn=(5730) socket_endcopyout
1637 5
+1 4
+1 1
+5 2

fn=(1980) Setup_AF_UNIX
646 5
+7 4
+39 6
cob=(1)
cfi=(1)
cfn=(223)
calls=1 0 
* 1250
* 5
* 2
+8 1
+1 4

fn=(2784) pq_startmsgread
1211 12
+5 9
+5 3
+1 12

fn=(3440)
1370 255
+3 51
+3 204
+6 306
+1 153
+1 102
+1 459
cob=(3)
cfi=(3)
cfn=(856)
calls=51 0 
* 716
* 51
+1 255
+1 102
+1 102
-15 204
+17 51
+1 102

fn=(1628) StreamServerPort
333 24
+11 2
+3 2
+1 2
+6 2
+4 138
+1 4
+1 2
+1 2
+3 4
+6 16
cfi=(17) /home/mithuncy/fsm_code/src/port/snprintf.c
cfn=(462) pg_snprintf
calls=1 203 
* 749
+1 3
cob=(3)
cfi=(3)
cfn=(424)
calls=1 0 
* 19
* 1
* 2
+8 5
cfn=(1962)
calls=1 615 
* 5497
* 2
+2 3
+5 8
cfi=(17)
cfn=(462)
calls=1 203 
* 489
+1 2
+3 6
cfi=(77) /home/mithuncy/fsm_code/src/common/ip.c
cfn=(1630) pg_getaddrinfo_all
calls=1 59 
* 92111
* 6
cfi=(77)
cfn=(1630)
calls=1 59 
* 2126
* 2
+1 10
+15 6
+2 14
+10 3
+2 48
+1 3
-3 21
+5 9
+9 18
+3 1
+1 1
+3 1
+1 1
+4 1
+1 1
+12 12
+1 3
+5 4
-1 20
cfi=(77)
cfn=(1832) pg_getnameinfo_all
calls=2 126 
* 4073
+5 4
+3 12
cob=(3)
cfi=(3)
cfn=(1656)
calls=1 0 
* 5
cob=(1)
cfi=(1)
cfn=(223)
calls=1 0 
* 1273
* 6
* 6
cob=(3)
cfi=(3)
cfn=(1656)
calls=1 0 
* 5
* 1
* 9
+23 12
+2 16
cob=(3)
cfi=(3)
cfn=(1862)
calls=1 0 
* 6
cob=(1)
cfi=(1)
cfn=(223)
calls=1 0 
* 1326
* 6
* 4
+15 12
+2 8
cob=(3)
cfi=(3)
cfn=(1862)
calls=1 0 
* 6
* 1
* 2
+20 27
cob=(3)
cfi=(3)
cfn=(1802)
calls=2 0 
* 10
cob=(1)
cfi=(1)
cfn=(223)
calls=1 0 
* 1267
* 7
* 3
+1 6
+19 12
+2 3
cfn=(1980)
calls=1 +92 
* 1277
* 2
+13 9
+1 6
+3 15
cob=(3)
cfi=(3)
cfn=(1872)
calls=2 0 
* 10
cob=(1)
cfi=(1)
cfn=(223)
calls=1 0 
* 1265
* 7
* 3
+1 6
+12 12
+1 6
cfi=(57)
cfn=(1548)
calls=1 232 
* 323
* 7
cfi=(57)
cfn=(1882) errmsg
calls=1 785 
* 1009
* 3
cfi=(57)
cfn=(1896) errfinish
calls=1 411 
* 10090
* 1
+5 12
cfi=(57)
cfn=(1548)
calls=2 232 
* 1969
* 18
cfi=(57)
cfn=(1882)
calls=2 785 
* 3422
* 6
cfi=(57)
cfn=(1896)
calls=2 411 
* 21457
+5 21
+1 3
406 19
599 10
cfi=(77)
cfn=(1942) pg_freeaddrinfo_all
calls=2 89 
* 1802
+2 4
+3 2
+1 10

fn=(2738) pq_init
195 2
+2 1
+1 6
cfi=(13)
cfn=(798) MemoryContextAlloc
calls=1 772 
* 1312
* 1
+1 7
+1 1
+1 1
+1 1
+3 3
cfi=(67)
cfn=(1578) on_proc_exit
calls=1 306 
* 32
+13 4
cfi=(132) /home/mithuncy/fsm_code/src/port/noblock.c
cfn=(2518) pg_set_noblock
calls=1 26 
* 67
* 3
+5 4
cfi=(122) /home/mithuncy/fsm_code/src/backend/storage/ipc/latch.c
cfn=(2740) CreateWaitEventSet
calls=1 543 
* 1738
* 1
+1 8
cfi=(122)
cfn=(2748) AddWaitEventToSet
calls=1 692 
* 1465
+2 8
cfi=(122)
cfn=(2748)
calls=1 692 
* 122
+1 7
cfi=(122)
cfn=(2748)
calls=1 692 
* 110
+1 2

fn=(3802)
1423 12
+3 15
+1 15
+2 3
+4 30
cfi=(139)
cfn=(3804) secure_write
calls=3 252 
* 315
* 3
+2 6
+44 3
+1 9
+1 12
-52 18
+55 9
+1 3
+1 12

fn=(3814) pq_getbyte
1001 4
+3 2
+2 2
cfn=(2788)
calls=2 -66 
* 88265
* 2
-2 12
+5 6
+1 2

fn=(1156) pq_setkeepalivescount
1889 5
+1 2
+1 2
+37 2

fn=(2790)
923 36
+1 18
+5 18
+1 24

fn=(2798) pq_endmsgread
1235 2
+3 1
+1 2

fn=(1164) pq_setkeepalivesinterval
1813 5
+1 2
+1 2
+41 2

fn=(2644) StreamClose
845 16
+1 12
cob=(5)
cfi=(5)
cfn=(692) close
calls=4 0 
* 28
* 4
+1 8

fn=(2786)
1095 20
+5 4
+2 4
+2 1
cfn=(2788)
calls=1 940 
* 161
* 2
-2 20
+5 24
+1 12
+1 4
+1 16
cob=(3)
cfi=(3)
cfn=(856)
calls=2 0 
* 24
* 2
* 16
cob=(3)
cfi=(3)
cfn=(856)
calls=2 0 
* 146
* 2
+1 20
+1 8
+1 8
-13 16
+15 4
+1 8

fl=(208) /home/mithuncy/fsm_code/src/backend/catalog/pg_enum.c
fn=(3700) AtEOXact_Enum
612 4
+6 2
+1 4

fl=(24) /home/mithuncy/fsm_code/src/backend/postmaster/../../../src/include/utils/palloc.h
fn=(712) MemoryContextSwitchTo
110 12
+1 8
+2 8
+1 4
+1 8

fl=(47) /home/mithuncy/fsm_code/src/backend/nodes/../../../src/include/nodes/pg_list.h
fn=(976) list_head
78 126
+1 198
+1 84
-2 12228
+1 15262
+1 8152

fl=(89) /home/mithuncy/fsm_code/src/backend/storage/buffer/freelist.c
fn=(2212) StrategyInitialize
476 5
+13 4
cfi=(90) /home/mithuncy/fsm_code/src/backend/storage/buffer/buf_table.c
cfn=(2214) InitBufTable
calls=1 54 
* 236628
+6 5
cfi=(87)
cfn=(2168)
calls=1 373 
* 1164
-1 1
+5 4
+7 2
+6 2
+1 4
+3 5
cfi=(123) /home/mithuncy/fsm_code/src/backend/storage/buffer/../../../../src/include/port/atomics.h
cfn=(2206) pg_atomic_init_u32
calls=1 227 
* 33
+3 2
+1 5
cfi=(123)
cfn=(2206)
calls=1 227 
* 33
+3 2
+4 2

fn=(5338) GetAccessStrategy
543 2000
+10 3500
+10 500
+1 500
+12 5000
+4 2000
-1 1000
cfi=(13)
cfn=(2546) palloc0
calls=500 956 
* 637026
* 500
+5 1500
+1 1500
+2 500
+1 1000

fn=(5472) AddBufferToRing
670 6000
+1 13500
+1 3000

fn=(5504) FreeAccessStrategy
598 2000
+2 1000
+1 1500
cfi=(13)
cfn=(952) pfree
calls=500 1032 
* 103604
+1 1000

fn=(5470) GetBufferFromRing
612 7500
+7 16500
+8 10500
+1 3000
+2 3000
+1 3000
+29 3000

fn=(2012) StrategyShmemSize
455 3
+1 1
+3 4
cfi=(90)
cfn=(2014) BufTableShmemSize
calls=1 44 
* 452
* 5
cfi=(87)
cfn=(2002)
calls=1 +17 
* 21
* 1
+3 4
cfi=(87)
cfn=(2002)
calls=1 +14 
* 21
* 1
+2 1
+1 2

fn=(3256) StrategyGetBuffer
202 9012
+10 3004
+2 7500
cfn=(5470)
calls=1500 612 
* 46500
* 1500
+1 3000
+16 4506
+1 3004
+3 4
+7 18
cfi=(122)
cfn=(2850) SetLatch
calls=2 437 
* 62
+8 7510
cfi=(123)
cfn=(3258) pg_atomic_fetch_add_u32
calls=1502 +82 
* 36048
+18 6008
+5 4506
cfi=(181) /home/mithuncy/fsm_code/src/backend/storage/buffer/../../../../src/include/storage/s_lock.h
cfn=(3262) tas
calls=1502 -48 
* 21028
* 3004
+2 6008
+6 10514
+4 6008
+1 3004
+6 3004
+9 4506
cfi=(50) /home/mithuncy/fsm_code/src/backend/storage/buffer/bufmgr.c
cfn=(3264) LockBufHdr
calls=1502 4099 
* 136703
* 1502
+1 6008
+1 7510
+2 3004
+1 7500
cfn=(5472)
calls=1500 670 
* 22500
+1 4506
+1 3004
+50 6008

fl=(128) /home/mithuncy/fsm_code/src/backend/storage/lmgr/condition_variable.c
fn=(5786) ConditionVariableCancelSleep
199 3
+1 2
+2 2
+1 1
+8 2

fn=(2278) ConditionVariableInit
40 80
+1 40
+1 80
cfi=(119) /home/mithuncy/fsm_code/src/backend/storage/lmgr/../../../../src/include/storage/proclist.h
cfn=(2152) proclist_init
calls=20 -12 
* 220
+1 40

fl=(261) /home/mithuncy/fsm_code/src/backend/optimizer/plan/planner.c
fn=(4654) preprocess_rowmarks
2498 12
+1 9
+6 12
+17 12
+1 6
-1 6
+2 3
+78 6

fn=(4660) preprocess_expression
1008 126
+6 42
+1 36
+11 12
+22 15
cfi=(262) /home/mithuncy/fsm_code/src/backend/optimizer/util/clauses.c
cfn=(4662) eval_const_expressions
calls=3 2494 
* 229065
* 3
+5 6
+11 15
+9 12
+9 6
+3 3
+1 42

fn=(4636) standard_planner
280 18
+17 12
cfi=(13)
cfn=(2950) MemoryContextAllocZeroAligned
calls=3 853 
* 711
* 15
+2 9
+1 6
+1 6
+1 6
+1 6
+1 6
+1 6
+1 6
+1 6
+1 6
+1 6
+1 6
+1 6
+1 6
+1 6
+1 6
+32 21
+2 6
-1 6
+2 9
-1 6
+2 3
-1 6
+2 3
-1 6
+2 3
-1 6
+4 9
cfi=(262)
cfn=(4638) max_parallel_hazard
calls=3 1070 
* 4447
* 6
+1 21
+26 12
+1 3
-1 18
+4 12
+24 6
+4 24
cfn=(4644) subquery_planner
calls=3 604 
* 258232
* 3
+4 15
cfi=(268) /home/mithuncy/fsm_code/src/backend/optimizer/util/relnode.c
cfn=(4726) fetch_upper_rel
calls=3 1155 
* 162
* 3
+1 18
cfn=(4738) get_cheapest_fractional_path
calls=3 5780 
* 45
* 3
+2 15
cfi=(277) /home/mithuncy/fsm_code/src/backend/optimizer/plan/createplan.c
cfn=(4740) create_plan
calls=3 307 
* 3888
* 3
+6 12
+10 9
+51 12
+18 15
cfi=(254) /home/mithuncy/fsm_code/src/backend/optimizer/plan/setrefs.c
cfn=(4762) set_plan_references
calls=3 210 
* 2948
* 3
+3 12
cfi=(255) /home/mithuncy/fsm_code/src/backend/optimizer/plan/../../../../src/include/nodes/pg_list.h
cfn=(4528) list_head
calls=3 78 
* 24
* 15
cfi=(255)
cfn=(4528)
calls=3 78 
* 24
* 12
+9 12
cfi=(13)
cfn=(2950)
calls=3 853 
* 732
* 15
+2 12
+1 12
+1 18
+1 12
+1 12
+1 12
+1 12
+1 12
+1 9
+1 12
+1 12
+1 12
+1 12
+1 12
+1 12
+1 12
+1 12
+1 12
+2 12
+1 12
+1 12
+2 6
+1 21
+1 9
-1 6
+24 3
+1 6

fn=(4668) preprocess_qual_conditions
1095 15
+1 6
+2 12
+4 12
+2 6
+3 12
cfi=(255)
cfn=(4528)
calls=3 78 
* 24
* 12
+3 21
cfn=(4660)
calls=3 1008 
* 36
* 9
+14 6

fn=(4674) grouping_planner
1651 33
+1 9
+2 3
+1 3
+1 6
+1 3
+10 24
+14 9
+2 12
+88 3
+1 3
+1 3
+7 12
+7 12
+5 9
cfi=(266) /home/mithuncy/fsm_code/src/backend/optimizer/prep/preptlist.c
cfn=(4676) preprocess_targetlist
calls=3 71 
* 189
* 3
+9 9
+15 207
+1 12
+14 12
+16 12
+9 12
+1 6
-1 6
+2 6
-1 6
+2 6
-1 6
+2 6
-1 6
+2 6
-1 6
+2 6
-1 6
+4 9
+3 6
+1 6
+3 12
-2 3
+11 21
cfi=(267) /home/mithuncy/fsm_code/src/backend/optimizer/plan/planmain.c
cfn=(4678) query_planner
calls=3 56 
* 6420
* 3
+10 9
cfi=(269) /home/mithuncy/fsm_code/src/backend/optimizer/util/tlist.c
cfn=(4700) make_pathtarget_from_tlist
calls=3 588 
* 1962
* 15
cfi=(274) /home/mithuncy/fsm_code/src/backend/optimizer/path/costsize.c
cfn=(4704) set_pathtarget_cost_width
calls=3 5257 
* 6175
* 3
+2 6
-1 12
cfi=(262)
cfn=(4684) is_parallel_safe
calls=3 1089 
* 57
* 3
+8 12
+10 6
+1 6
+8 6
+10 6
+1 6
+8 6
+1 6
-1 12
+1 6
-1 6
+1 15
-1 6
+2 6
+8 6
+1 6
+9 12
+30 9
+1 9
+1 9
+1 12
cfi=(45)
cfn=(1586) lcons
calls=3 260 
* 870
* 3
+1 3
+4 9
cfi=(255)
cfn=(4672) list_length
calls=3 90 
* 30
+1 30
cfi=(276) /home/mithuncy/fsm_code/src/backend/nodes/equalfuncs.c
cfn=(4714) equal
calls=3 2987 
* 48
* 9
-1 6
+2 30
cfn=(4716) apply_scanjoin_target_to_paths
calls=3 6887 
* 2709
+12 9
+1 9
+1 9
+7 6
+19 6
+21 12
+14 12
+18 15
cfi=(268)
cfn=(4726)
calls=3 1155 
* 3102
* 3
+9 12
+1 18
cfi=(262)
cfn=(4684)
calls=3 1089 
* 57
-1 6
+2 18
cfi=(262)
cfn=(4684)
calls=3 1089 
* 57
-1 6
+2 6
+5 12
+1 12
+1 12
+1 12
+6 12
cfi=(255)
cfn=(4528)
calls=3 78 
* 30
* 6
+2 9
+9 12
+10 9
cfn=(4730) limit_needed
calls=3 2860 
* 48
* 6
+12 12
+59 15
cfi=(270) /home/mithuncy/fsm_code/src/backend/optimizer/util/pathnode.c
cfn=(4688) add_path
calls=3 423 
* 1020
-92 21
+99 24
+16 12
+7 9
+5 21

fn=(4716)
6887 33
+3 36
+2 3
cfi=(52) /home/mithuncy/fsm_code/src/backend/tcop/postgres.c
cfn=(4006) check_stack_depth
calls=3 3263 
* 81
+6 12
+26 9
cfi=(255)
cfn=(4718) list_tail
calls=3 84 
* 30
* 9
+3 6
+31 9
cfi=(255)
cfn=(4528)
calls=3 78 
* 30
* 6
+9 12
cfi=(255)
cfn=(4528)
calls=3 78 
* 30
* 6
+2 9
+5 6
+5 18
cfi=(270)
cfn=(4720) create_projection_path
calls=3 2388 
* 1041
* 3
+2 9
-14 21
+19 12
cfi=(255)
cfn=(4528)
calls=3 78 
* 24
* 12
+22 15
+11 12
+55 48
+1 18
cfi=(278) /home/mithuncy/fsm_code/src/backend/optimizer/path/allpaths.c
cfn=(4724) generate_gather_paths
calls=3 2579 
* 42
+7 9
cfi=(270)
cfn=(4692) set_cheapest
calls=3 245 
* 1092
+1 6

fn=(4644)
604 30
+9 12
cfi=(13)
cfn=(2950)
calls=3 853 
* 1782
* 15
+1 9
+1 9
+1 15
+1 9
+1 6
+1 6
+1 9
+1 6
+1 6
+1 6
+1 6
+1 6
+1 6
+1 18
cob=(3)
cfi=(3)
cfn=(828)
calls=3 0 
* 48
* 3
+1 18
cob=(3)
cfi=(3)
cfn=(828)
calls=3 0 
* 48
* 3
+1 6
+1 6
+1 6
+1 6
+1 6
+1 9
+1 6
+3 6
+1 6
+1 6
+6 12
+9 12
+8 9
cfi=(263) /home/mithuncy/fsm_code/src/backend/optimizer/prep/prepjointree.c
cfn=(4646) inline_set_returning_functions
calls=3 -89 
* 69
+6 9
cfi=(263)
cfn=(4650) pull_up_subqueries
calls=3 -58 
* 225
+8 12
+10 6
+1 6
+1 3
+1 12
cfi=(255)
cfn=(4528)
calls=3 78 
* 24
* 12
+20 9
cfn=(4654)
calls=3 2498 
* 66
+10 9
cfi=(265) /home/mithuncy/fsm_code/src/backend/optimizer/prep/prepunion.c
cfn=(4656) expand_inherited_tables
calls=3 1474 
* 117
+7 18
+3 6
+9 21
cfn=(4660)
calls=3 1008 
* 229167
-1 6
+5 12
+3 3
+1 12
cfi=(255)
cfn=(4528)
calls=3 78 
* 24
* 12
+9 9
+3 21
cfn=(4660)
calls=3 1008 
* 36
-1 6
+4 18
cfn=(4668)
calls=3 1095 
* 171
+2 21
cfn=(4660)
calls=3 1008 
* 36
* 6
+3 12
cfi=(255)
cfn=(4528)
calls=3 78 
* 24
* 12
+11 21
cfn=(4660)
calls=3 1008 
* 36
* 6
+2 21
cfn=(4660)
calls=3 1008 
* 36
* 6
+3 12
+22 21
cfn=(4660)
calls=3 1008 
* 36
-1 6
+5 12
cfi=(255)
cfn=(4528)
calls=3 78 
* 24
* 12
+74 12
+41 3
+1 12
cfi=(255)
cfn=(4528)
calls=3 78 
* 24
* 12
+27 9
+3 9
cfn=(4670) remove_useless_groupby_columns
calls=3 2917 
* 81
+7 6
+7 12
+4 21
cfn=(4674)
calls=3 1651 
* 23986
+6 9
cfi=(280) /home/mithuncy/fsm_code/src/backend/optimizer/plan/subselect.c
cfn=(4732) SS_identify_outer_params
calls=3 2109 
* 36
+8 15
cfi=(268)
cfn=(4726)
calls=3 1155 
* 162
* 3
+1 15
cfi=(280)
cfn=(4736) SS_charge_for_initplans
calls=3 2171 
* 36
+7 9
cfi=(270)
cfn=(4692)
calls=3 245 
* 1092
+2 3
+1 12

fn=(4670)
2917 15
+1 9
+7 12
cfi=(255)
cfn=(4672)
calls=3 90 
* 24
* 6
+1 3
3049 12

fn=(4738)
5780 15
+1 9
+4 9
+1 6
+18 6

fn=(4634) planner
268 18
+3 9
+3 18
cfn=(4636)
calls=3 +6 
* 272026
* 3
+1 3
+1 6

fn=(4694) standard_qp_callback
3442 18
+1 9
+1 6
+1 9
+1 9
+7 12
+7 6
+3 6
+9 6
+2 12
+7 6
+3 21
cfi=(272) /home/mithuncy/fsm_code/src/backend/optimizer/path/pathkeys.c
cfn=(4696) make_pathkeys_for_sortclauses
calls=3 877 
* 75
-1 6
+23 12
+2 12
+2 12
cfi=(255)
cfn=(4672)
calls=3 90 
* 24
* 3
+1 12
cfi=(255)
cfn=(4672)
calls=3 90 
* 24
-1 6
+3 12
+3 6
+1 12

fn=(4730)
2860 9
+3 9
+1 6
+12 9
+1 6
+17 3
+1 6

fl=(225) /home/mithuncy/fsm_code/src/backend/parser/analyze.c
fn=(3948) analyze_requires_snapshot
358 3
+3 10
+24 1
+1 1
+3 1
+1 2

fn=(3956) transformTopLevelStmt
192 2525
+4 3030
cfn=(3958) transformOptionalSelectInto
calls=505 +20 
* 936876
* 505
+2 2020
+1 2020
+2 505
+1 1010

fn=(3960) transformStmt
255 2525
+22 6529
+19 8
+2 16
+2 16
+1 20
cfn=(4436) transformSelectStmt
calls=4 1209 
* 747747
* 8
+4 4
+31 2004
cfi=(13)
cfn=(2950)
calls=501 853 
* 160821
* 2505
+1 1002
+1 1503
+1 501
+4 1002
+1 1002
+2 501
+1 1002
-4 8
+1 8
+2 4
+1 8

fn=(3952) parse_analyze
103 4008
+1 1002
cfi=(226) /home/mithuncy/fsm_code/src/backend/parser/parse_node.c
cfn=(3954) make_parsestate
calls=501 -59 
* 173346
* 501
+5 1503
+2 1002
+3 1503
+2 2505
cfn=(3956)
calls=501 +76 
* 200400
* 501
+2 1503
+3 1503
cfi=(226)
cfn=(3962) free_parsestate
calls=501 -43 
* 53106
+2 501
+1 1002

fn=(4436)
1209 28
+1 16
cfi=(13)
cfn=(2950)
calls=4 853 
* 1284
* 20
+4 8
+3 16
+8 16
+8 16
+3 16
+3 24
cfi=(247) /home/mithuncy/fsm_code/src/backend/parser/parse_clause.c
cfn=(4438) transformFromClause
calls=4 120 
* 212
+3 28
cfi=(248) /home/mithuncy/fsm_code/src/backend/parser/parse_target.c
cfn=(4442) transformTargetList
calls=4 133 
* 736744
* 8
+4 24
cfi=(248)
cfn=(4460) markTargetListOrigins
calls=4 330 
* 220
+3 28
cfi=(247)
cfn=(4464) transformWhereClause
calls=4 1686 
* 52
* 4
+4 28
cfi=(247)
cfn=(4464)
calls=4 1686 
* 52
* 8
+9 36
cfi=(247)
cfn=(4466) transformSortClause
calls=4 2557 
* 112
* 8
+6 56
cfi=(247)
cfn=(4468) transformGroupClause
calls=4 2455 
* 372
* 8
+8 16
+2 8
+1 12
+22 28
cfi=(247)
cfn=(4472) transformLimitClause
calls=4 1713 
* 52
* 8
+2 28
cfi=(247)
cfn=(4472)
calls=4 1713 
* 52
* 8
+4 32
cfi=(247)
cfn=(4474) transformWindowDefinitions
calls=4 2588 
* 132
* 8
+5 16
+1 24
cfi=(248)
cfn=(4476) resolveTargetListUnknowns
calls=4 300 
* 252
+2 16
+1 24
cfi=(221) /home/mithuncy/fsm_code/src/backend/nodes/makefuncs.c
cfn=(4480) makeFromExpr
calls=4 285 
* 704
* 8
+2 16
+1 16
+1 16
+1 16
+1 64
+3 16
cfi=(222) /home/mithuncy/fsm_code/src/backend/parser/../../../src/include/nodes/pg_list.h
cfn=(4336) list_head
calls=4 78 
* 32
* 16
+6 20
cfi=(251) /home/mithuncy/fsm_code/src/backend/parser/parse_collate.c
cfn=(4482) assign_query_collations
calls=4 102 
* 6639
+2 4
+1 20

fn=(3958)
216 2525
+1 2020
+2 8
+3 28
+4 16
+20 2525
cfn=(3960)
calls=505 +9 
* 928744
+1 1010

fl=(282) /home/mithuncy/fsm_code/src/backend/jit/jit.c
fn=(4818) jit_compile_expr
157 12
+10 12
+1 6
+15 6

fl=(294) /home/mithuncy/fsm_code/src/backend/utils/fmgr/../../../../src/include/nodes/pg_list.h
fn=(5070) list_length
90 1503
+1 2505
+1 1002

fl=(20) /home/mithuncy/fsm_code/src/backend/postmaster/postmaster.c
fn=(1990) reset_shared
2576 4
+9 4
cfi=(83) /home/mithuncy/fsm_code/src/backend/storage/ipc/ipci.c
cfn=(1992) CreateSharedMemoryAndSemaphores
calls=1 97 
* 5251535
+1 2

fn=(2594) DetermineSleepTime
1532 45
+1 9
+6 27
+1 18
-1 18
+1 36
+2 27
+10 18
+1 18
+2 9
+66 36

fn=(648) InitProcessGlobals
2527 6
+3 2
cob=(3)
cfi=(3)
cfn=(654)
calls=1 0 
* 5
cob=(1)
cfi=(1)
cfn=(223)
calls=1 0 
* 1266
* 6
* 2
+1 2
cfi=(21) /home/mithuncy/fsm_code/src/backend/utils/adt/timestamp.c
cfn=(656) GetCurrentTimestamp
calls=2 1571 
* 1430
* 2
+1 6
cfi=(21)
cfn=(666) timestamptz_to_time_t
calls=2 1713 
* 34
* 2
+21 8
cfi=(23) /home/mithuncy/fsm_code/src/port/pg_strong_random.c
cfn=(668) pg_strong_random
calls=2 101 
* 2411
* 6
+14 6
cob=(3)
cfi=(3)
cfn=(700)
calls=1 0 
* 10537
cob=(1)
cfi=(1)
cfn=(223)
calls=1 0 
* 11812
* 6
+1 4

fn=(714) getInstallationPaths
1450 6
+4 4
cfi=(15) /home/mithuncy/fsm_code/src/common/exec.c
cfn=(448) find_my_exec
calls=1 130 
* 4454
* 2
+16 3
cfi=(11) /home/mithuncy/fsm_code/src/port/path.c
cfn=(716) get_pkglib_path
calls=1 759 
* 4609
+9 2
cfi=(25) /home/mithuncy/fsm_code/src/backend/storage/file/fd.c
cfn=(718) AllocateDir
calls=1 2447 
* 1846
* 1
+1 2
+7 3
cfi=(25)
cfn=(738) FreeDir
calls=1 2565 
* 1496
+6 5

fn=(2658) signal_child
3928 35
+1 35
cob=(3)
cfi=(3)
cfn=(2664)
calls=6 0 
* 30
cob=(1)
cfi=(1)
cfn=(223)
calls=1 0 
* 1235
* 11
* 14
+3 35
+11 7
+3 14

fn=(2734) ClosePostmasterPorts
2471 6
+10 3
cob=(5)
cfi=(5)
cfn=(692)
calls=1 0 
* 7
* 1
* 2
+4 1
+4 2
+2 320
+2 15
cfi=(58)
cfn=(2644)
calls=3 845 
* 51
+1 9
-5 194
+10 4
+3 3
+2 1
+13 4

fn=(2646) ConnFree
2449 4
+4 4
+2 3
cob=(3)
cfi=(3)
cfn=(590)
calls=1 0 
* 114
* 1
+1 2

fn=(2586) maybe_start_bgworkers
5873 6
+2 2
+1 2
+7 6
+8 2
+1 2
+2 24
+4 6
+3 8
+4 8
+13 8
+30 8
cfn=(2588) bgworker_should_start_now
calls=2 5778 
* 29
* 4
+3 2
+13 3
cfn=(2610) do_start_bgworker
calls=1 5687 
* 949
* 3
+12 3
-82 30
+89 4

fn=(2596) reaper
2846 12
+1 3
cob=(5)
cfi=(5)
cfn=(472) __errno_location
calls=3 0 
* 9
* 3
* 6
+4 12
cob=(3)
cfi=(3)
cfn=(774)
calls=3 0 
* 21
* 3
+2 18
cfi=(57)
cfn=(1548)
calls=3 232 
* 150
* 6
+3 3
+5 9
+2 1
+6 3
+9 13
+17 6
+18 3
+14 1
+1 1
+2 1
+1 1
+7 3
+1 2
cfn=(2554) StartChildProcess
calls=1 5345 
* 855
* 1
+1 3
+1 2
cfn=(2554)
calls=1 5345 
* 855
* 1
+1 3
+1 2
cfn=(2554)
calls=1 5345 
* 855
* 1
+6 5
cfi=(105) /home/mithuncy/fsm_code/src/backend/postmaster/autovacuum.c
cfn=(2604) AutoVacuumingActive
calls=1 3204 
* 13
* 5
+1 1
cfi=(105)
cfn=(2606) StartAutoVacLauncher
calls=1 395 
* 309
* 1
+1 6
+2 3
+1 1
cfi=(38) /home/mithuncy/fsm_code/src/backend/postmaster/pgstat.c
cfn=(2608) pgstat_start
calls=1 728 
* 328
* 1
+3 1
cfn=(2586)
calls=1 5873 
* 1035
+3 6
cfi=(57)
cfn=(1548)
calls=1 232 
* 341
* 5
cfi=(57)
cfn=(1882)
calls=1 785 
* 787
* 3
cfi=(57)
cfn=(1896)
calls=1 411 
* 10156
+4 3
cfi=(54)
cfn=(1950) AddToDataDirLockFile
calls=1 1259 
* 1156
+5 1
+8 6
+12 6
+58 6
+15 6
+15 6
+16 6
+16 6
+12 6
+12 10
cfn=(2684) CleanupBackgroundWorker
calls=2 +37 
* 86
* 4
+10 10
cfn=(2686) CleanupBackend
calls=2 3270 
* 532
2856 30
cob=(5)
cfi=(5)
cfn=(2602) waitpid
calls=5 0 
* 55
cob=(1)
cfi=(1)
cfn=(223)
calls=1 0 
* 794
* 10
* 18
3150 3
cfn=(2620) PostmasterStateMachine
calls=3 3674 
* 84
+3 12
cob=(3)
cfi=(3)
cfn=(774)
calls=3 0 
* 21
* 3
+2 3
cob=(5)
cfi=(5)
cfn=(472)
calls=3 0 
* 9
* 3
* 6
+1 6

fn=(2610)
5687 4
+14 3
cfn=(2612) assign_backendlist_entry
calls=1 5822 
* 511
* 3
+6 6
cfi=(57)
cfn=(1548)
calls=1 232 
* 50
* 2
+7 1
cfi=(137) /home/mithuncy/fsm_code/src/backend/postmaster/fork_process.c
cfn=(2556) fork_process
calls=1 32 
* 295
* 7
+44 3
+1 5
+1 3
cfi=(73)
cfn=(2618)
calls=1 441 
* 22
+2 6
cfi=(74)
cfn=(2274) dlist_push_head
calls=1 301 
* 25
+4 1
+4 2

fn=(2614) RandomCancelKey
5258 20
+2 20
cfi=(23)
cfn=(668)
calls=5 101 
* 405
+31 10

fn=(2674) sigusr1_handler
5056 8
+1 2
cob=(5)
cfi=(5)
cfn=(472)
calls=2 0 
* 6
* 2
* 4
+2 8
cob=(3)
cfi=(3)
cfn=(774)
calls=2 0 
* 14
* 2
+3 4
cfi=(102) /home/mithuncy/fsm_code/src/backend/storage/ipc/pmsignal.c
cfn=(2676) CheckPostmasterSignal
calls=2 164 
* 22
* 4
+12 4
cfi=(102)
cfn=(2676)
calls=2 164 
* 22
* 4
+39 4
cfi=(102)
cfn=(2676)
calls=2 164 
* 22
* 4
+23 12
+3 4
cfi=(102)
cfn=(2676)
calls=2 164 
* 22
* 4
+11 6
+13 4
cfi=(102)
cfn=(2676)
calls=2 164 
* 22
* 4
+15 4
cfi=(102)
cfn=(2676)
calls=2 164 
* 30
* 4
+1 2
-1 4
+4 2
cfn=(2678) StartAutovacuumWorker
calls=2 5449 
* 1390
+3 4
cfi=(102)
cfn=(2676)
calls=2 164 
* 22
* 4
+8 4
cfi=(102)
cfn=(2676)
calls=2 164 
* 22
* 4
+7 2
cfi=(53) /home/mithuncy/fsm_code/src/backend/access/transam/xlog.c
cfn=(2682) CheckPromoteSignal
calls=2 12243 
* 112
* 4
+8 8
cob=(3)
cfi=(3)
cfn=(774)
calls=2 0 
* 14
* 2
+2 2
cob=(5)
cfi=(5)
cfn=(472)
calls=2 0 
* 6
* 2
* 4
+1 4

fn=(2686)
3270 10
+3 14
cfn=(2688) LogChildExit
calls=2 3609 
* 162
+25 4
+6 26
+2 6
+2 8
+2 10
+2 8
cfi=(102)
cfn=(2690) ReleasePostmasterChildSlot
calls=2 219 
* 40
* 6
+13 8
+12 6
cfi=(74)
cfn=(2692) dlist_delete
calls=2 359 
* 30
+1 6
cob=(3)
cfi=(3)
cfn=(590)
calls=2 0 
* 170
* 2
+1 4
-35 8
+38 4

fn=(2430) CreateOptsFile
5549 6
+6 3
cob=(3)
cfi=(3)
cfn=(1284)
calls=1 0 
* 522
* 1
* 3
+6 6
cfi=(17)
cfn=(2432) pg_fprintf
calls=1 265 
* 1955
+1 2
+1 22
cfi=(17)
cfn=(2432)
calls=2 265 
* 1240
-1 11
+2 4
cob=(1)
cfi=(1)
cfn=(223)
calls=1 0 
* 1309
* 5
+2 3
cob=(3)
cfi=(3)
cfn=(1380)
calls=1 0 
* 548
* 1
* 2
+6 1
+1 2

fn=(2640) canAcceptConnections
2349 16
+1 4
+12 12
+29 8
cfn=(2642) CountChildren
calls=4 5299 
* 207
* 8
cfn=(2056) MaxLivePostmasterChildren
calls=4 5589 
* 44
* 8
+3 4
+1 16

fn=(2684)
3170 10
+4 24
+4 6
+2 8
-6 32
+83 2
+1 4

fn=(2688)
3609 16
+6 2
+2 4
+5 12
+1 14
cfi=(57)
cfn=(1548)
calls=2 232 
* 100
* 6
+41 8

fn=(2056)
5589 16
+1 56
+2 16

fn=(2554)
5345 16
+3 4
+6 20
+7 32
cfi=(17)
cfn=(462)
calls=4 203 
* 2096
+1 24
+2 12
+6 4
cfi=(137)
cfn=(2556)
calls=4 32 
* 4541
* 4
+2 8
+17 8
+46 4
+1 8

fn=(2736) BackendInitialize
4181 6
+8 2
+9 3
+4 1
+3 2
+1 2
+6 1
cfi=(58)
cfn=(2738)
calls=1 195 
* 4906
+1 1
+17 3
cfi=(28) /home/mithuncy/fsm_code/src/port/pqsignal.c
cfn=(784) pqsignal
calls=1 41 
* 174
+1 3
cfi=(28)
cfn=(784)
calls=1 41 
* 174
+1 1
cfi=(138) /home/mithuncy/fsm_code/src/backend/utils/misc/timeout.c
cfn=(2758) InitializeTimeouts
calls=1 341 
* 653
+1 4
cob=(3)
cfi=(3)
cfn=(774)
calls=1 0 
* 7
* 1
+5 1
+1 1
+1 16
cfi=(77)
cfn=(1832)
calls=1 126 
* 489
* 3
+7 3
+1 8
cfi=(17)
cfn=(462)
calls=1 203 
* 229
* 1
+8 3
cob=(3)
cfi=(3)
cfn=(384)
calls=1 0 
* 153
* 1
* 3
+1 3
cob=(3)
cfi=(3)
cfn=(384)
calls=1 0 
* 153
* 1
* 3
+3 3
+24 3
+21 3
cfi=(138)
cfn=(2762) RegisterTimeout
calls=1 374 
* 18
+1 5
cfi=(138)
cfn=(2764) enable_timeout_after
calls=1 429 
* 1566
+6 4
cfn=(2782) ProcessStartupPacket
calls=1 1905 
* 3770
* 1
+6 2
+15 3
+4 12
cfi=(12) /home/mithuncy/fsm_code/src/backend/utils/misc/ps_status.c
cfn=(2800) init_ps_display
calls=1 251 
* 1767
+6 3
cfi=(138)
cfn=(2804) disable_timeout
calls=1 526 
* 68
+1 4
cob=(3)
cfi=(3)
cfn=(774)
calls=1 0 
* 7
* 1
+1 5

fn=(2782)
1905 8
+6 1
cfi=(58)
cfn=(2784)
calls=1 1211 
* 12
+1 4
cfi=(58)
cfn=(2786)
calls=1 1095 
* 227
* 2
+14 3
+1 3
+2 3
+1 1
-1 2
+15 3
+1 2
cfi=(13)
cfn=(2546)
calls=1 956 
* 152
* 2
+4 6
cfi=(58)
cfn=(2786)
calls=1 1095 
* 105
* 2
+7 1
cfi=(58)
cfn=(2798)
calls=1 1235 
* 5
+6 7
+2 2
+7 2
+40 2
+3 4
+1 2
-1 2
+18 3
cfi=(24)
cfn=(712)
calls=1 110 
* 10
* 1
+2 4
+2 1
+1 1
+7 2
+2 1
+2 25
+4 20
+1 1
+1 12
cob=(3)
cfi=(3)
cfn=(424)
calls=4 0 
* 68
* 4
* 20
+1 12
+2 20
+2 16
cob=(3)
cfi=(3)
cfn=(446)
calls=4 0 
* 110
* 4
* 8
+1 3
cfi=(13)
cfn=(928)
calls=1 1162 
* 193
* 3
+1 12
cob=(3)
cfi=(3)
cfn=(446)
calls=3 0 
* 79
* 3
* 6
+1 3
cfi=(13)
cfn=(928)
calls=1 1162 
* 193
* 3
+1 8
cob=(3)
cfi=(3)
cfn=(446)
calls=2 0 
* 66
* 2
* 4
+2 8
cob=(3)
cfi=(3)
cfn=(446)
calls=2 0 
* 71
* 2
* 4
+22 10
cob=(3)
cfi=(3)
cfn=(1044)
calls=2 0 
* 80
* 2
* 4
+14 6
cfi=(13)
cfn=(928)
calls=2 1162 
* 357
* 2
-1 10
cfi=(45)
cfn=(960)
calls=2 129 
* 453
* 4
+3 6
cfi=(13)
cfn=(928)
calls=2 1162 
* 352
* 2
-1 10
cfi=(45)
cfn=(960)
calls=2 129 
* 326
* 4
+9 8
cob=(3)
cfi=(3)
cfn=(446)
calls=2 0 
* 74
* 2
* 4
+2 3
cfi=(13)
cfn=(928)
calls=1 1162 
* 176
* 1
+2 3
cfi=(37) /home/mithuncy/fsm_code/src/common/string.c
cfn=(884) pg_clean_ascii
calls=1 83 
* 64
+2 3
+3 3
cob=(3)
cfi=(3)
cfn=(424)
calls=1 0 
* 15
* 1
* 9
cob=(3)
cfi=(3)
cfn=(424)
calls=3 0 
* 53
* 3
* 20
-74 15
+81 4
+11 6
+2 1
+25 9
+6 9
+3 3
+22 4
cob=(3)
cfi=(3)
cfn=(424)
calls=1 0 
* 19
* 1
* 2
+2 4
cob=(3)
cfi=(3)
cfn=(424)
calls=1 0 
* 19
* 1
* 2
+11 3
+6 3
cfi=(24)
cfn=(712)
calls=1 110 
* 10
+7 7
+24 1
+5 1
+1 5

fn=(646) PostmasterMain
577 7
+3 1
+1 1
+2 1
+2 1
cfn=(648)
calls=1 2527 
* 16866
+2 2
+2 1
+10 2
cob=(1)
cfi=(1)
cfn=(223)
calls=1 0 
* 1248
* 5
+8 7
cfi=(14) /home/mithuncy/fsm_code/src/backend/utils/mmgr/aset.c
cfn=(432) AllocSetContextCreateInternal
calls=1 395 
* 628
* 1
+3 3
cfi=(24)
cfn=(712)
calls=1 110 
* 10
+3 4
cfn=(714)
calls=1 1450 
* 12433
+21 1
cfi=(27) /home/mithuncy/fsm_code/src/backend/libpq/pqsignal.c
cfn=(750) pqinitmask
calls=1 42 
* 4390
+1 4
cob=(1)
cfi=(1)
cfn=(223)
calls=1 0 
* 1350
* 5
+2 3
cfi=(28)
cfn=(776) pqsignal_no_restart
calls=1 72 
* 991
+2 3
cfi=(28)
cfn=(776)
calls=1 72 
* 174
+1 3
cfi=(28)
cfn=(776)
calls=1 72 
* 174
+1 3
cfi=(28)
cfn=(776)
calls=1 72 
* 174
+1 3
cfi=(28)
cfn=(784)
calls=1 41 
* 174
+1 3
cfi=(28)
cfn=(784)
calls=1 41 
* 174
+1 3
cfi=(28)
cfn=(776)
calls=1 72 
* 174
+2 3
cfi=(28)
cfn=(776)
calls=1 72 
* 174
+2 3
cfi=(28)
cfn=(776)
calls=1 72 
* 177
+10 3
cfi=(28)
cfn=(784)
calls=1 41 
* 174
+3 3
cfi=(28)
cfn=(784)
calls=1 41 
* 174
+5 3
cfi=(28)
cfn=(784)
calls=1 41 
* 174
+6 1
cfi=(29)
cfn=(786) InitializeGUCOptions
calls=1 4964 
* 519258
+2 1
+7 1
+2 7
+16 3
cob=(3)
cfi=(3)
cfn=(384)
calls=1 0 
* 242
* 1
* 1
+1 1
-19 12
cob=(3)
cfi=(3)
cfn=(1254)
calls=1 0 
* 105
cob=(1)
cfi=(1)
cfn=(223)
calls=1 0 
* 1929
* 6
* 6
856 3
+13 5
cfi=(29)
cfn=(1260) SelectConfigFiles
calls=1 5186 
* 5190868
* 3
+3 2
+15 1
cfi=(54)
cfn=(1522) checkDataDir
calls=1 100 
* 4029
+3 1
cfn=(1540) checkControlFile
calls=1 1503 
* 1572
+3 1
cfi=(54)
cfn=(1542) ChangeToDataDir
calls=1 214 
* 19
+5 6
+7 3
+3 6
+8 1
cfi=(64)
cfn=(1544)
calls=1 4453 
* 9981
* 3
+10 1
+10 6
cfi=(57)
cfn=(1548)
calls=1 232 
* 50
* 2
+3 6
cfi=(57)
cfn=(1548)
calls=1 232 
* 50
* 2
+2 3
+1 402
cfi=(57)
cfn=(1548)
calls=67 232 
* 3350
* 134
-1 339
+3 6
cfi=(57)
cfn=(1548)
calls=1 232 
* 50
* 2
+18 2
cfi=(54)
cfn=(1552) CreateDataDirLockFile
calls=1 1182 
* 6832
+11 2
cfi=(53)
cfn=(1588) LocalProcessControlFile
calls=1 4934 
* 4991
+19 1
cfi=(72) /home/mithuncy/fsm_code/src/backend/replication/logical/launcher.c
cfn=(1612) ApplyLauncherRegister
calls=1 789 
* 1545
+5 1
cfi=(54)
cfn=(1620) process_shared_preload_libraries
calls=1 1588 
* 30
+6 1
cfi=(75) /home/mithuncy/fsm_code/src/backend/utils/init/postinit.c
cfn=(1624) InitializeMaxBackends
calls=1 525 
* 14
+8 2
+1 192
-1 194
+3 3
cfi=(67)
cfn=(1578)
calls=1 306 
* 32
+2 3
+5 1
+3 3
cfi=(13)
cfn=(928)
calls=1 1162 
* 158
* 1
+3 5
cfi=(41) /home/mithuncy/fsm_code/src/backend/utils/adt/varlena.c
cfn=(932) SplitIdentifierString
calls=1 3507 
* 1275
* 3
+9 3
cfi=(76) /home/mithuncy/fsm_code/src/backend/postmaster/../../../src/include/nodes/pg_list.h
cfn=(1626) list_head
calls=1 78 
* 10
* 2
+2 3
+2 4
cob=(3)
cfi=(3)
cfn=(446)
calls=1 0 
* 22
* 1
* 2
+7 1
-1 8
cfi=(58)
cfn=(1628)
calls=1 333 
* 130732
* 1
+5 2
+2 1
+2 4
+2 4
cfi=(54)
cfn=(1950)
calls=1 1259 
* 1616
+1 2
-22 7
+31 2
+4 3
cfi=(45)
cfn=(972) list_free
calls=1 +66 
* 222
+1 3
cfi=(13)
cfn=(952)
calls=1 -40 
* 85
+42 3
+5 1
+3 3
cfi=(13)
cfn=(928)
calls=1 +40 
* 145
* 1
+3 5
cfi=(41)
cfn=(1960) SplitDirectoriesString
calls=1 3634 
* 1050
* 3
+9 3
cfi=(76)
cfn=(1626)
calls=1 78 
* 10
* 2
+2 3
+3 1
-1 9
cfi=(58)
cfn=(1628)
calls=1 333 
* 21608
* 1
+5 2
+2 1
+2 2
+1 4
cfi=(54)
cfn=(1950)
calls=1 1259 
* 1057
* 1
-14 7
+22 2
+4 3
cfi=(45)
cfn=(1988) list_free_deep
calls=1 -9 
* 298
+1 3
cfi=(13)
cfn=(952)
calls=1 1032 
* 72
+7 3
+9 4
+6 3
cfn=(1990)
calls=1 2576 
* 5251545
+6 1
cfi=(25)
cfn=(2404) set_max_safe_fds
calls=1 878 
* 61686
+5 1
cfi=(52)
cfn=(2414) set_stack_base
calls=1 3210 
* 9
+6 1
cfn=(2416) InitPostmasterDeathWatchHandle
calls=1 6456 
* 2038
+17 6
cfn=(2430)
calls=1 5549 
* 5646
* 3
+11 3
+25 1
cfi=(25)
cfn=(2462) RemovePgTempFiles
calls=1 2864 
* 587849
+20 1
cfi=(53)
cfn=(2474) RemovePromoteSignalFiles
calls=1 12232 
* 28
+3 1
cfi=(131) /home/mithuncy/fsm_code/src/backend/postmaster/syslogger.c
cfn=(2476) RemoveLogrotateSignalFiles
calls=1 1536 
* 16
+3 2
cob=(3)
cfi=(3)
cfn=(1972)
calls=1 0 
* 9
* 1
* 3
cob=(5)
cfi=(5)
cfn=(472)
calls=1 0 
* 3
* 1
* 3
+9 1
cfi=(131)
cfn=(2478) SysLogger_Start
calls=1 546 
* 14
* 1
+13 4
+6 1
+6 1
cfi=(38)
cfn=(2480) pgstat_init
calls=1 356 
* 17233
+5 1
cfi=(105)
cfn=(2526) autovac_init
calls=1 3258 
* 15
+5 1
cfi=(133) /home/mithuncy/fsm_code/src/backend/libpq/hba.c
cfn=(2528) load_hba
calls=1 2127 
* 165914
* 3
+9 1
cfi=(133)
cfn=(2552) load_ident
calls=1 2917 
* 42273
+31 1
cfi=(21)
cfn=(656)
calls=1 1571 
* 22
* 1
+10 3
cfi=(54)
cfn=(1950)
calls=1 1259 
* 972
+5 2
cfn=(2554)
calls=1 5345 
* 4216
* 1
+2 1
+1 1
+3 1
cfn=(2586)
calls=1 5873 
* 74
+2 1
cfn=(2590) ServerLoop
calls=1 1630 
* 379613716

fn=(2416)
6456 4
+13 2
cob=(1)
cfi=(1)
cfn=(223)
calls=1 0 
* 1235
* 5
* 2
+9 6
cob=(1)
cfi=(1)
cfn=(223)
calls=1 0 
* 773
* 5
* 2
+20 4

fn=(2588)
5778 6
+1 12
+12 2
+1 2
+11 2
+6 1
+1 4

fn=(2590)
1630 4
+6 2
cob=(10)
cfi=(22)
cfn=(1810)
calls=1 0 
* 3
* 1
* 3
+2 3
cfn=(2592) initMasks
calls=1 1870 
* 160
* 1
+18 32
+2 3
-2 256
+2 24
+15 27
cfn=(2594)
calls=9 1532 
* 261
+2 36
cob=(3)
cfi=(3)
cfn=(774)
calls=9 0 
* 63
* 9
+2 72
cob=(3)
cfi=(3)
cfn=(2508)
calls=9 0 
* 96
* 9
* 9
+2 36
cob=(3)
cfi=(3)
cfn=(774)
calls=9 0 
* 63
* 9
+4 18
+2 6
cob=(5)
cfi=(5)
cfn=(472)
calls=6 0 
* 18
* 6
* 18
+13 18
+4 4
+2 35
+1 1
+1 138
+4 10
cfn=(2626) ConnCreate
calls=2 2405 
* 1855
* 2
+1 4
+2 6
cfn=(2638) BackendStartup
calls=2 4031 
* 379607691
+6 4
cfi=(58)
cfn=(2644)
calls=1 845 
* 17
+1 3
cfn=(2646)
calls=1 2449 
* 128
-18 19
+25 48
+8 24
+3 24
+2 24
+9 24
+9 56
+10 24
+5 72
+4 24
+8 24
+4 48
+20 16
cob=(10)
cfi=(22)
cfn=(1810)
calls=8 0 
* 24
* 8
* 8
+10 48
+20 48
+2 2
cfi=(54)
cfn=(2666) RecheckDataDirLockFile
calls=2 1387 
* 1921
* 6
+6 4
+8 48
+6 8

fn=(2592)
1870 3
+1 1
+3 27
+2 2
+2 16
+2 8
+1 1
+1 72
+2 9
+1 6
-9 11
+12 2
+1 2

fn=(2620)
3674 6
+1 9
+9 9
+24 9
+76 9
+18 9
+42 9
+33 9
+8 9
+22 6

fn=(2626)
2405 10
+3 6
cob=(3)
cfi=(3)
cfn=(1722)
calls=2 0 
* 915
* 2
* 6
+8 10
cfi=(58)
cfn=(2628)
calls=2 717 
* 892
* 4
+24 2
+1 8

fn=(2642)
5299 16
+2 4
+2 40
+2 21
+2 28
+7 14
+14 7
-25 65
+27 4
+1 8

fn=(2648) SIGHUP_handler
2594 4
+1 1
cob=(5)
cfi=(5)
cfn=(472)
calls=1 0 
* 3
* 1
* 2
+2 4
cob=(3)
cfi=(3)
cfn=(774)
calls=1 0 
* 7
* 1
+2 3
+2 6
cfi=(57)
cfn=(1548)
calls=1 232 
* 341
* 5
cfi=(57)
cfn=(1882)
calls=1 785 
* 787
* 3
cfi=(57)
cfn=(1896)
calls=1 411 
* 10129
+2 2
cfi=(60) /home/mithuncy/fsm_code/src/backend/utils/misc/guc-file.l
cfn=(1268) ProcessConfigFile
calls=1 125 
* 2459851
+1 3
cfn=(2656) SignalSomeChildren
calls=1 3954 
* 1471
+1 3
+2 3
+1 4
cfn=(2658)
calls=1 3928 
* 26
+1 3
+1 4
cfn=(2658)
calls=1 3928 
* 26
+1 3
+1 4
cfn=(2658)
calls=1 3928 
* 26
+1 3
+2 3
+1 4
cfn=(2658)
calls=1 3928 
* 26
+1 3
+2 3
+2 3
+1 4
cfn=(2658)
calls=1 3928 
* 26
+3 1
cfi=(133)
cfn=(2528)
calls=1 2127 
* 167306
* 3
+4 1
cfi=(133)
cfn=(2552)
calls=1 2917 
* 41820
* 3
+27 4
cob=(3)
cfi=(3)
cfn=(774)
calls=1 0 
* 7
* 1
+2 1
cob=(5)
cfi=(5)
cfn=(472)
calls=1 0 
* 3
* 1
* 2
+1 2

fn=(1540)
1503 3
+4 8
cfi=(17)
cfn=(462)
calls=1 203 
* 381
+2 4
cfi=(25)
cfn=(1278) AllocateFile
calls=1 2186 
* 677
* 1
+1 2
+8 3
cfi=(25)
cfn=(1374) FreeFile
calls=1 2385 
* 491
+1 2

fn=(2612)
5822 5
+9 2
cfn=(2614)
calls=1 5258 
* 91
* 3
+8 2
cob=(3)
cfi=(3)
cfn=(388)
calls=1 0 
* 339
* 1
* 1
+1 2
+8 3
+1 1
cfi=(102)
cfn=(2616) AssignPostmasterChildSlot
calls=1 185 
* 39
* 4
+1 2
+1 2
+1 2
+2 3
+1 4
+2 1
+1 4

fn=(2638)
4031 10
+8 4
cob=(3)
cfi=(3)
cfn=(388)
calls=2 0 
* 274
* 2
* 2
+1 4
+13 4
cfn=(2614)
calls=2 5258 
* 182
* 6
+9 6
+3 2
cfn=(2640)
calls=2 2349 
* 155
* 4
+1 16
+6 10
+1 2
cfi=(102)
cfn=(2616)
calls=2 185 
* 70
* 10
+5 4
+5 2
cfi=(137)
cfn=(2556)
calls=2 32 
* 1261
* 2
+1 4
+2 3
cob=(3)
cfi=(3)
cfn=(590)
calls=1 0 
* 85
* 1
+3 1
cfi=(54)
cfn=(2710) InitPostmasterChild
calls=1 274 
* 13612
+3 2
cfn=(2734)
calls=1 2471 
* 623
+3 3
cfn=(2736)
calls=1 +86 
* 14260
+3 3
cfn=(2808) BackendRun
calls=1 4357 
* 379576962
+4 2
+16 6
cfi=(57)
cfn=(1548)
calls=1 232 
* 50
* 2
+8 3
+1 2
+1 5
cfi=(74)
cfn=(2274)
calls=1 301 
* 25
+7 1
+1 4

fn=(2656)
3954 5
+2 1
+2 10
+2 6
+2 8
+7 4
+14 12
cfi=(57)
cfn=(1548)
calls=2 232 
* 100
* 4
+3 12
cfn=(2658)
calls=2 -58 
* 1286
+1 2
-29 18
+31 1
+1 2

fn=(2678)
5449 8
+10 2
cfn=(2640)
calls=2 2349 
* 172
* 4
+8 4
cfn=(2614)
calls=2 5258 
* 182
* 6
+8 4
cob=(3)
cfi=(3)
cfn=(388)
calls=2 0 
* 200
* 2
* 2
+1 4
+2 6
+3 4
+1 2
cfi=(102)
cfn=(2616)
calls=2 185 
* 70
* 8
+1 4
+2 2
cfi=(105)
cfn=(2680) StartAutoVacWorker
calls=2 1471 
* 618
* 4
+1 8
+2 4
+1 10
cfi=(74)
cfn=(2274)
calls=2 301 
* 50
+5 2
+30 8

fn=(2808)
4357 4
+13 1
+1 2
cob=(3)
cfi=(3)
cfn=(424)
calls=1 0 
* 15
* 1
* 6
+2 7
cfi=(13)
cfn=(798)
calls=1 772 
* 122
* 1
+2 1
+2 8
+6 6
cfi=(75)
cfn=(2810) pg_split_opts
calls=1 466 
* 261
+2 6
+7 6
cfi=(57)
cfn=(1548)
calls=1 232 
* 59
* 2
+3 2
+1 6
cfi=(57)
cfn=(1548)
calls=1 232 
* 59
* 2
-1 7
+3 6
cfi=(57)
cfn=(1548)
calls=1 232 
* 59
* 2
+7 3
cfi=(24)
cfn=(712)
calls=1 110 
* 10
+2 8
cfi=(52)
cfn=(2812) PostgresMain
calls=1 3730 
* 379576290

fl=(29)
fn=(866)
4918 113155
+1 67893
+1 67893
+2 158417
cfn=(868) guc_name_compare
calls=22631 +8 
* 3088839
+1 45262

fn=(882) check_application_name
10978 12
+2 8
cfi=(37)
cfn=(884)
calls=2 83 
* 76
+2 2
+1 4

fn=(1024) check_log_destination
10567 6
+4 1
+4 4
cfi=(13)
cfn=(928)
calls=1 1162 
* 145
* 1
+3 5
cfi=(41)
cfn=(932)
calls=1 3507 
* 1039
* 3
+9 3
cfi=(51) /home/mithuncy/fsm_code/src/backend/utils/misc/../../../../src/include/nodes/pg_list.h
cfn=(1026) list_head
calls=1 78 
* 10
* 2
+2 3
+2 4
cfi=(32) /home/mithuncy/fsm_code/src/port/pgstrcasecmp.c
cfn=(968) pg_strcasecmp
calls=1 37 
* 121
* 2
+1 2
-5 7
+25 3
cfi=(13)
cfn=(952)
calls=1 1032 
* 72
+1 3
cfi=(45)
cfn=(972)
calls=1 1137 
* 222
+2 3
cfn=(862) guc_malloc
calls=1 4473 
* 242
* 1
+1 3
+1 3
+2 1
+1 2

fn=(1032) check_log_stats
10712 6
+1 4
+8 1
+1 2

fn=(1062) check_maxconnections
10866 15
+1 27
+3 3
+1 6

fn=(1086) check_recovery_target_lsn
11247 6
+1 5
+36 1
+1 2

fn=(1240) parse_int
5995 3584
+5 1024
+1 1024
+1 1024
+1 24
+3 12
cob=(5)
cfi=(5)
cfn=(472)
calls=12 0 
* 36
* 12
* 500
cob=(5)
cfi=(5)
cfn=(472)
calls=500 0 
* 1500
* 500
* 512
+1 3072
cob=(3)
cfi=(3)
cfn=(1246)
calls=511 0 
* 64214
cob=(1)
cfi=(1)
cfn=(223)
calls=1 0 
* 1460
* 516
* 512
+2 1536
+3 512
cob=(5)
cfi=(5)
cfn=(472)
calls=512 0 
* 1536
* 512
* 4096
+8 1024
cob=(3)
cfi=(3)
cfn=(914)
calls=512 0 
* 1536
* 512
* 5632
+4 2048
+4 6
+2 24
+3 6
+1 6
+2 108
-2 84
cob=(3)
cfi=(3)
cfn=(914)
calls=12 0 
* 36
* 12
* 156
+3 18
+2 12
cob=(3)
cfi=(3)
cfn=(914)
calls=6 0 
* 18
* 6
* 66
+3 24
+1 60
cfn=(1418) convert_to_base_unit
calls=6 5911 
* 2456
* 6
+2 24
+14 30
+8 1024
+1 2048
+1 512
+1 1024

fn=(1260)
5186 5
+6 2
+1 3
cfi=(11)
cfn=(1262) make_absolute_path
calls=1 609 
* 2186
* 2
+4 7
cfi=(9)
cfn=(490) stat
calls=1 0 
* 15
* 2
+17 3
+2 2
+3 3
cob=(3)
cfi=(3)
cfn=(424)
calls=1 0 
* 21
* 1
-1 4
cfn=(862)
calls=1 4473 
* 306
* 1
+2 7
cfi=(17)
cfn=(1138) pg_sprintf
calls=1 231 
* 444
* 1
+15 6
cfn=(1206) SetConfigOption
calls=1 7172 
* 1890
+1 3
cob=(3)
cfi=(3)
cfn=(590)
calls=1 0 
* 85
* 1
+5 5
cfi=(9)
cfn=(490)
calls=1 0 
* 15
* 2
+13 2
cfi=(60)
cfn=(1268)
calls=1 125 
* 1502337
+9 3
+2 2
+1 3
cfi=(54)
cfn=(1408) SetDataDir
calls=1 193 
* 1503
* 1
+19 6
cfn=(1206)
calls=1 7172 
* 1788
+8 2
cfi=(60)
cfn=(1268)
calls=1 125 
* 2879369
+9 1
cfn=(1470) pg_timezone_abbrev_initialize
calls=1 10789 
* 796133
+5 3
+2 2
+3 3
cob=(3)
cfi=(3)
cfn=(424)
calls=1 0 
* 21
* 1
-1 4
cfn=(862)
calls=1 4473 
* 258
* 1
+2 7
cfi=(17)
cfn=(1138)
calls=1 231 
* 447
* 1
+11 6
cfn=(1206)
calls=1 7172 
* 1392
+1 3
cob=(3)
cfi=(3)
cfn=(590)
calls=1 0 
* 85
* 1
+5 3
+2 2
+3 3
cob=(3)
cfi=(3)
cfn=(424)
calls=1 0 
* 21
* 1
-1 4
cfn=(862)
calls=1 4473 
* 117
* 1
+2 7
cfi=(17)
cfn=(1138)
calls=1 231 
* 447
* 1
+11 6
cfn=(1206)
calls=1 7172 
* 1663
+1 3
cob=(3)
cfi=(3)
cfn=(590)
calls=1 0 
* 85
* 1
+2 3
cob=(3)
cfi=(3)
cfn=(590)
calls=1 0 
* 89
* 1
+2 1
+1 2

fn=(1416) set_config_sourcefile
7137 168
+8 140
+2 140
cfn=(1212) find_option
calls=28 4869 
* 35242
* 28
+2 56
+3 140
cfn=(878) guc_strdup
calls=28 4505 
* 8273
* 28
+1 112
+1 56
cob=(3)
cfi=(3)
cfn=(590)
calls=14 0 
* 1190
* 14
+1 84
+1 84
+1 56

fn=(1468) ReportGUCOption
5886 92
+1 124
+2 44
cfn=(3736) _ShowOption
calls=11 9168 
* 2210
* 11
+3 44
cfi=(191) /home/mithuncy/fsm_code/src/backend/libpq/pqformat.c
cfn=(3430) pq_beginmessage
calls=11 88 
* 1507
+1 66
cfi=(191)
cfn=(3738) pq_sendstring
calls=11 198 
* 1766
+1 55
cfi=(191)
cfn=(3738)
calls=11 198 
* 1720
+1 33
cfi=(191)
cfn=(3436) pq_endmessage
calls=11 299 
* 3733
+2 33
cfi=(13)
cfn=(952)
calls=11 1032 
* 844
+2 46

fn=(860) build_guc_variables
4696 3
+2 1
+4 2
+2 900
+3 180
+1 90
-6 1182
+9 2
+2 864
+2 216
+1 108
-5 1198
+8 2
+2 200
+2 40
+1 20
-5 272
+8 2
+2 670
+2 134
+1 67
-5 883
+8 2
+2 232
+2 58
+1 29
-5 329
+11 9
+3 3
-1 3
cfn=(862)
calls=1 4473 
* 192
* 1
+3 1
+2 2
+1 1530
-1 1182
+3 2
+1 1620
-1 1198
+3 2
+1 340
-1 272
+3 2
+1 1139
-1 883
+3 2
+1 435
-1 329
+3 3
+2 2
+1 2
+1 2
+1 7
cfi=(36) /home/mithuncy/fsm_code/src/port/qsort.c
cfn=(864) pg_qsort
calls=1 114 
* 386991
+2 2

fn=(900) check_bonjour
10675 6
+2 4
+6 1
+1 2

fn=(1080) check_primary_slot_name
11305 6
+1 9
+4 1
+1 2

fn=(1082) check_recovery_target
11091 6
+1 5
cob=(3)
cfi=(3)
cfn=(446)
calls=1 0 
* 22
* 1
* 7
+5 1
+1 2

fn=(1200) check_wal_consistency_checking
10487 6
+7 18
cob=(3)
cfi=(3)
cfn=(828)
calls=1 0 
* 14
* 1
+3 4
cfi=(13)
cfn=(928)
calls=1 1162 
* 143
* 1
+3 5
cfi=(41)
cfn=(932)
calls=1 3507 
* 45
* 3
+9 3
cfi=(51)
cfn=(1026)
calls=1 78 
* 8
* 4
+41 3
cfi=(13)
cfn=(952)
calls=1 1032 
* 72
+1 3
cfi=(45)
cfn=(972)
calls=1 1137 
* 35
+3 3
cfn=(862)
calls=1 4473 
* 208
* 2
+1 10
+1 1
+1 2

fn=(1206)
7172 161
+1 230
cfn=(1208) set_config_option
calls=23 6409 
* 1637551
+2 46

fn=(1207) SetConfigOption'2
7172 7
+1 10
cfn=(1209) set_config_option'2
calls=1 6409 
* 1264
+2 2

fn=(1220) config_enum_lookup_by_name
6139 18
+3 12
+2 30
cfi=(32)
cfn=(968)
calls=5 37 
* 575
* 10
+2 12
+1 6
-5 32
+11 6

fn=(1266) string_field_used
4522 312
+3 390
+1 96
-1 96
+2 48
-1 48
+2 108
+1 144
+6 24
+1 156

fn=(4126) define_custom_variable
8079 25
+1 15
+1 10
+7 40
cob=(3)
cfi=(3)
cfn=(284)
calls=5 0 
* 6468
* 5
* 5
+5 10
+6 15
cfn=(874) InitializeOneGUCOption
calls=5 5066 
* 1785
+1 20
cfn=(4128) add_guc_variable
calls=5 4783 
* 3485185
* 5
+68 20

fn=(1030) check_stage_log_stats
10701 18
+1 12
+5 3
+1 6

fn=(1096) assign_recovery_target_time
11202 5
+1 3
+4 6
+6 1
+1 2

fn=(1188) assign_timezone_abbreviations
10769 15
+2 6
+1 1
+2 6
cfi=(64)
cfn=(1520)
calls=2 4592 
* 100
+1 6

fn=(1218) parse_and_validate_value
6225 572
+1 364
+4 14
+2 35
cfi=(59) /home/mithuncy/fsm_code/src/backend/utils/adt/bool.c
cfn=(1224) parse_bool
calls=7 31 
* 1029
* 21
+9 63
cfn=(876) call_bool_check_hook
calls=7 10312 
* 230
* 21
+4 7
+3 24
+3 84
cfn=(1240)
calls=12 5995 
* 7236
* 36
+11 144
+10 108
cfn=(892) call_int_check_hook
calls=12 10346 
* 454
* 36
+4 12
+31 60
+6 150
cfn=(878)
calls=30 4505 
* 6360
* 60
+1 120
+7 150
+2 24
cob=(3)
cfi=(3)
cfn=(424)
calls=6 0 
* 90
* 6
-1 42
cfi=(42) /home/mithuncy/fsm_code/src/backend/parser/scansup.c
cfn=(958) truncate_identifier
calls=6 188 
* 84
+4 270
cfn=(880) call_string_check_hook
calls=30 10414 
* 2903667
* 90
+8 30
+3 6
+2 18
cfn=(1220)
calls=3 6139 
* 701
* 9
+19 27
cfn=(890) call_enum_check_hook
calls=3 10448 
* 97
* 9
+4 3
+3 3
+1 15
-1 49
+1 245

fn=(1418)
5911 48
+4 24
+1 12
+4 12
+2 774
+1 176
cob=(3)
cfi=(3)
cfn=(446)
calls=16 0 
* 352
* 16
-1 32
+3 54
+3 66
+1 12
-9 854
+13 24

fn=(1466) extra_field_used
4561 128
+3 128
+1 24
+1 140
+15 80
+1 20
+1 10
+6 60
+7 10
+1 64

fn=(4122) DefineCustomEnumVariable
8381 9
+3 10
cfn=(4124) init_custom_variable
calls=1 8025 
* 475
* 1
+3 3
+1 3
+1 3
+1 3
+1 3
+1 3
+1 3
+1 3
cfn=(4126)
calls=1 8079 
* 698256
+1 2

fn=(4132) DefineCustomBoolVariable
8269 20
+3 18
cfn=(4124)
calls=2 8025 
* 1132
* 2
+3 6
+1 6
+1 6
+1 6
+1 6
+1 6
+1 6
cfn=(4126)
calls=2 8079 
* 1393248
+1 4

fn=(1028) assign_log_destination
10624 4
+1 3
+1 2

fn=(1078) check_max_worker_processes
10906 5
+1 9
+2 1
+1 2

fn=(1102) check_recovery_target_xid
11115 6
+1 5
+14 1
+1 2

fn=(1132) assign_session_replication_role
10650 5
+5 3
+2 2

fn=(1152) assign_syslog_ident
10640 5
+2 5
cfi=(57)
cfn=(1150) set_syslog_parameters
calls=1 1897 
* 43
+3 2

fn=(1154) assign_tcp_keepalives_count
10849 5
+2 5
cfi=(58)
cfn=(1156)
calls=1 1889 
* 11
+1 2

fn=(1208)
6409 663
+3 51
+1 51
+3 102
+2 204
+6 168
+2 92
+1 46
+1 46
+4 23
+12 23
cfi=(26) /home/mithuncy/fsm_code/src/backend/access/transam/xact.c
cfn=(1210) IsInParallelMode
calls=23 910 
* 184
* 28
cfi=(26)
cfn=(1210)
calls=28 910 
* 224
* 102
+5 255
cfn=(1212)
calls=51 4869 
* 65286
* 51
+1 102
+12 357
+3 12
+8 6
+2 22
+11 6
+2 16
+8 11
+2 24
+15 8
+50 16
+8 4
+3 22
+21 255
+2 1
cfi=(54)
cfn=(3456) InLocalUserIdChange
calls=1 504 
* 8
* 2
+12 1
cfi=(54)
cfn=(3458) InSecurityRestrictedOperation
calls=1 513 
* 8
* 2
+16 510
+10 204
+14 357
+4 12
+4 12
+2 66
cfn=(1218)
calls=6 6225 
* 1398
* 18
+20 12
+15 12
+3 24
+3 24
+2 24
+1 42
cfn=(1222) set_extra_field
calls=6 4606 
* 96
+2 18
+1 18
+2 12
+4 24
+2 18
+1 42
cfn=(1222)
calls=6 4606 
* 96
+2 18
+1 18
+2 36
+14 18
+2 6
+7 24
+4 24
+2 132
cfn=(1218)
calls=12 6225 
* 8422
* 36
+20 24
+2 12
+9 12
+1 4
+3 20
+3 40
+3 40
+1 28
cfi=(53)
cfn=(1074) assign_max_wal_size
calls=2 2286 
* 72
cfi=(52)
cfn=(1072) assign_max_stack_depth
calls=2 3343 
* 24
+1 40
+1 70
cfn=(1222)
calls=10 4606 
* 160
+2 30
+1 30
+2 20
+4 40
+2 30
+1 70
cfn=(1222)
calls=10 4606 
* 160
+2 30
+1 30
+2 60
+14 30
+2 10
+97 60
+4 60
+2 330
cfn=(1218)
calls=30 6225 
* 2911923
* 90
+36 60
+17 60
+3 120
+3 120
+1 161
cfn=(886) assign_application_name
calls=1 10987 
* 291
cfi=(39) /home/mithuncy/fsm_code/src/backend/commands/variable.c
cfn=(1130) assign_session_authorization
calls=1 793 
* 1346
cfi=(39)
cfn=(920) assign_client_encoding
calls=3 699 
* 117
cfn=(1188)
calls=2 10769 
* 124
cfi=(49) /home/mithuncy/fsm_code/src/backend/utils/cache/ts_cache.c
cfn=(990) assign_TSCurrentConfig
calls=2 652 
* 14
cfi=(18) /home/mithuncy/fsm_code/src/backend/utils/adt/pg_locale.c
cfn=(1022) assign_locale_time
calls=2 338 
* 14
cfi=(18)
cfn=(1018) assign_locale_numeric
calls=2 326 
* 14
cfi=(18)
cfn=(1014) assign_locale_monetary
calls=2 314 
* 14
cfi=(18)
cfn=(1008) assign_locale_messages
calls=2 377 
* 6976
cfi=(39)
cfn=(1184) assign_timezone
calls=2 374 
* 18
cfi=(39)
cfn=(982) assign_datestyle
calls=2 237 
* 28
cfi=(39)
cfn=(1060) assign_log_timezone
calls=2 447 
* 18
+1 210
cfn=(1264) set_string_field
calls=30 4545 
* 1080
+1 210
cfn=(1222)
calls=30 4606 
* 790
+2 90
+1 90
+3 60
+4 120
+2 210
cfn=(1264)
calls=30 4545 
* 3468
+1 210
cfn=(1222)
calls=30 4606 
* 1807
+2 90
+1 90
+2 180
+15 240
cfn=(1266)
calls=30 4522 
* 390
* 90
+3 150
cfn=(1466)
calls=12 4561 
* 144
* 36
+2 30
+7 6
+4 6
+2 33
cfn=(1218)
calls=3 6225 
* 942
* 9
+20 6
+2 6
+9 6
+1 2
+3 4
+3 8
+3 8
+2 8
+1 14
cfn=(1222)
calls=2 4606 
* 32
+2 6
+1 6
+2 4
+4 8
+2 6
+1 14
cfn=(1222)
calls=2 4606 
* 32
+2 6
+1 6
+2 12
+14 6
+2 2
+6 336
+1 33
cfn=(1468)
calls=11 5886 
* 99
+2 192
+1 204

fn=(1209)
6409 13
+3 1
+1 1
+3 2
+2 4
+8 4
+1 2
+1 2
+4 1
+12 1
cfi=(26)
cfn=(1210)
calls=1 910 
* 8
* 2
+5 5
cfn=(1212)
calls=1 4869 
* 851
* 1
+1 2
+12 7
+3 2
+8 1
6595 5
+30 10
+10 4
+14 7
+4 2
+4 2
+2 11
cfn=(1218)
calls=1 6225 
* 190
* 3
+20 2
+15 2
+3 4
+3 4
+2 4
+1 7
cfn=(1222)
calls=1 4606 
* 16
+2 3
+1 3
+2 2
+4 4
+2 3
+1 7
cfn=(1222)
calls=1 4606 
* 16
+2 3
+1 3
+2 6
+14 3
+2 1
7125 7
+1 3
cfn=(1468)
calls=1 5886 
* 9
+2 4
+1 4

fn=(1212)
4869 931
+1 266
+10 1064
cob=(3)
cfi=(3)
cfn=(284)
calls=132 0 
* 161489
cob=(1)
cfi=(1)
cfn=(223)
calls=1 0 
* 2932
* 137
* 133
+5 266
+1 399
+24 266

fn=(1222)
4606 588
+1 294
+3 294
+3 296
cfn=(1466)
calls=20 -52 
* 520
* 60
+1 30
cob=(3)
cfi=(3)
cfn=(590)
calls=10 0 
* 917
* 10
+1 196

fn=(1228) InitializeGUCOptionsFromEnvironment
5020 6
+4 4
cob=(3)
cfi=(3)
cfn=(234)
calls=2 0 
* 974
* 2
* 2
+1 4
+3 4
cob=(3)
cfi=(3)
cfn=(234)
calls=2 0 
* 992
* 2
* 2
+1 4
+3 4
cob=(3)
cfi=(3)
cfn=(234)
calls=2 0 
* 1000
* 2
* 2
+1 4
+8 2
cfi=(52)
cfn=(1066) get_stack_depth_rlimit
calls=2 4517 
* 18
* 2
+1 4
+2 14
+2 4
+4 8
+1 12
cfi=(17)
cfn=(1138)
calls=2 231 
* 984
+1 12
cfn=(1206)
calls=2 7172 
* 4819
+4 4

fn=(3694) AtEOXact_GUC
5576 12
+14 8
+2 6
+1 2
5849 4

fn=(4150) EmitWarningsOnPlaceholders
8399 5
+1 3
cob=(3)
cfi=(3)
cfn=(424)
calls=1 0 
* 15
* 1
* 1
+3 2
+2 2233
+2 1595
-4 1279
+14 4

fn=(786)
4964 3
+7 1
cfi=(30) /home/mithuncy/fsm_code/src/timezone/pgtz.c
cfn=(788) pg_timezone_initialize
calls=1 364 
* 15793
+5 1
cfn=(860)
calls=1 4696 
* 403842
+6 2
+2 2512
cfn=(874)
calls=314 +82 
* 82755
-2 1259
+5 1
+2 1
+6 5
cfn=(1206)
calls=1 7172 
* 3716
+2 5
cfn=(1206)
calls=1 7172 
* 1689
+2 5
cfn=(1206)
calls=1 7172 
* 2571
+7 1
cfn=(1228)
calls=1 +14 
* 5094
+1 2

fn=(862)
4473 96
+4 32
+2 48
cob=(3)
cfi=(3)
cfn=(388)
calls=16 0 
* 3141
* 16
* 16
+1 32
+4 16
+1 64

fn=(876)
10312 1089
+2 396
+1 178
+3 10
+1 10
+1 10
+1 10
+2 70
cfi=(39)
cfn=(1196) check_transaction_read_only
calls=2 487 
* 34
cfi=(39)
cfn=(1190) check_transaction_deferrable
calls=2 563 
* 52
cfn=(1134) check_ssl
calls=1 10688 
* 13
cfn=(1032)
calls=1 10712 
* 13
cfn=(1030)
calls=3 10701 
* 39
cfn=(900)
calls=1 10675 
* 13
* 30
+17 10
+1 594

fn=(886)
10987 10
+2 6
cfi=(38)
cfn=(888) pgstat_report_appname
calls=2 3164 
* 292
+1 4

fn=(1088) assign_recovery_target_lsn
11289 5
+1 3
+4 6
+6 1
+1 2

fn=(1148) assign_syslog_facility
10630 5
+2 8
cfi=(57)
cfn=(1150)
calls=1 1897 
* 265
+4 2

fn=(1162) assign_tcp_keepalives_interval
10832 5
+2 5
cfi=(58)
cfn=(1164)
calls=1 1813 
* 11
+1 2

fn=(1202) assign_wal_consistency_checking
10561 4
+1 2
+1 2

fn=(3736)
9168 66
+4 77
+4 6
+2 12
+3 24
+2 3
+49 14
+2 28
+1 3
cfi=(39)
cfn=(3746) show_timezone
calls=1 383 
* 22
* 2
+1 66
+1 30
+4 7
+4 2
+2 4
+3 7
cfn=(2654) config_enum_lookup_by_value
calls=1 6115 
* 24
* 1
+2 1
+8 33
cfi=(13)
cfn=(928)
calls=11 1162 
* 1756
+1 22

fn=(4128)
4783 25
+1 25
+26 45
+1 35
cfi=(36)
cfn=(864)
calls=5 114 
* 3485040
+2 5
+1 10

fn=(992) check_effective_io_concurrency
10914 6
+4 6
cfi=(50)
cfn=(994) ComputeIoConcurrency
calls=1 468 
* 43
* 2
+2 3
cfn=(862)
calls=1 4473 
* 195
* 1
+2 4
cob=(1)
cfi=(1)
cfn=(223)
calls=1 0 
* 1116
* 5
* 3
+1 3
+2 2
+12 2

fn=(1004) check_canonical_path
10726 18
+6 12
+1 8
cfi=(11)
cfn=(484) canonicalize_path
calls=2 255 
* 747
+1 3
+1 6

fn=(1166) check_temp_buffers
10661 6
+4 3
+5 1
+1 2

fn=(1186) check_timezone_abbreviations
10739 18
+12 12
+3 2
+4 8
cfi=(63) /home/mithuncy/fsm_code/src/backend/utils/misc/tzparser.c
cfn=(1472) load_tzoffsets
calls=2 439 
* 1585101
* 4
+3 8
+3 2
+1 6

fn=(1470)
10789 4
+1 10
cfn=(1206)
calls=2 7172 
* 1589099
+2 4

fn=(1090) check_recovery_target_name
11218 6
+2 4
cob=(3)
cfi=(3)
cfn=(424)
calls=1 0 
* 15
* 1
* 2
+6 1
+1 2

fn=(1092) assign_recovery_target_name
11231 5
+1 3
+4 6
+6 1
+1 2

fn=(1100) assign_recovery_target_timeline
11059 5
+1 3
+1 3
+3 1
+1 2

fn=(1134)
10688 6
+2 4
+6 1
+1 2

fn=(1136) assign_pgstat_temp_directory
10949 5
+7 3
cob=(3)
cfi=(3)
cfn=(424)
calls=1 0 
* 15
* 1
* 4
cfn=(862)
calls=1 4473 
* 208
* 1
+1 6
cfi=(17)
cfn=(1138)
calls=1 231 
* 218
+3 3
cob=(3)
cfi=(3)
cfn=(424)
calls=1 0 
* 15
* 1
* 4
cfn=(862)
calls=1 4473 
* 208
* 1
+1 6
cfi=(17)
cfn=(1138)
calls=1 231 
* 337
+1 3
cob=(3)
cfi=(3)
cfn=(424)
calls=1 0 
* 15
* 1
* 4
cfn=(862)
calls=1 4473 
* 208
* 1
+1 6
cfi=(17)
cfn=(1138)
calls=1 231 
* 346
+2 3
+2 2
+1 3
+2 2
+1 3
+2 2
+1 2

fn=(868)
4930 91016
+6 22754
+2 485195
+1 485195
+2 388080
+1 330
+1 388080
+1 178
+1 291117
+1 110170
-10 779464
+12 2880
+1 136
+1 2608
+1 1038
+1 133
+1 45508

fn=(890)
10448 363
+2 132
+1 62
+3 2
+1 2
+1 2
+1 2
+2 14
cfi=(39)
cfn=(1194) check_XactIsoLevel
calls=2 526 
* 43
* 6
+18 2
+1 198

fn=(892)
10346 1320
+2 480
+1 214
+3 13
+1 13
+1 13
+1 13
+2 91
cfi=(53)
cfn=(1198) check_wal_buffers
calls=2 4890 
* 34
cfn=(1166)
calls=1 10661 
* 12
cfn=(1078)
calls=1 10906 
* 17
cfi=(52)
cfn=(1064) check_max_stack_depth
calls=3 3326 
* 1423
cfn=(1062)
calls=3 10866 
* 51
cfn=(992)
calls=1 10914 
* 1391
cfn=(898) check_autovacuum_work_mem
calls=1 10883 
* 13
cfn=(896) check_autovacuum_max_workers
calls=1 10875 
* 17
* 39
+17 13
+1 720

fn=(896)
10875 5
+1 9
+2 1
+1 2

fn=(898)
10883 5
+7 4
+1 2
+11 2

fn=(1002) assign_effective_io_concurrency
10941 4
+2 3
+2 2

fn=(1094) check_recovery_target_time
11151 6
+1 5
+45 1
+1 2

fn=(1098) check_recovery_target_timeline
11030 6
+1 1
+3 5
+1 2
+15 3
cfn=(862)
calls=1 4473 
* 208
* 1
+1 3
+1 3
+2 1
+1 2

fn=(1104) assign_recovery_target_xid
11135 5
+1 3
+4 6
+6 1
+1 2

fn=(1264)
4545 360
+1 180
+3 180
+3 360
cfn=(1266)
calls=48 -30 
* 1032
* 144
+1 72
cob=(3)
cfi=(3)
cfn=(590)
calls=24 0 
* 2076
* 24
+1 120

fn=(2984) AtStart_GUC
5542 4
+6 6
+3 2
+1 4

fn=(3734) BeginReportingGUCOptions
5858 3
+7 3
+1 2
-1 2
+4 1
+3 2
+2 2198
+2 1570
+1 33
cfn=(1468)
calls=11 +9 
* 12220
-5 1259
+7 2

fn=(4136) DefineCustomStringVariable
8355 18
+3 18
cfn=(4124)
calls=2 8025 
* 1437
* 2
+3 6
+1 6
+1 6
+1 6
+1 6
+1 6
cfn=(4126)
calls=2 8079 
* 1402104
+1 4

fn=(874)
5066 1276
+1 638
+1 638
+1 638
+1 638
+1 638
+1 638
+1 638
+1 638
+1 638
+2 2233
+4 184
+1 276
+1 92
+2 644
cfn=(876)
calls=92 10312 
* 2341
* 276
+4 368
+2 736
+1 644
+1 184
+4 216
+1 324
+1 108
+4 756
cfn=(892)
calls=108 10346 
* 5433
* 324
+4 432
+1 42
cfn=(1162)
calls=1 10832 
* 23
cfn=(1158) assign_tcp_keepalives_idle
calls=1 10805 
* 23
cfn=(1154)
calls=1 10849 
* 23
cfi=(53)
cfn=(1074)
calls=1 2286 
* 36
cfi=(52)
cfn=(1072)
calls=1 3343 
* 12
cfn=(1002)
calls=1 10941 
* 9
+1 864
+1 756
+1 216
+4 40
+1 60
+1 20
+4 140
cfn=(894) call_real_check_hook
calls=20 10380 
* 686
* 60
+4 80
+1 8
cfi=(39)
cfn=(1126) assign_random_seed
calls=1 603 
* 13
+1 160
+1 140
+1 40
+4 138
+2 69
+3 276
+1 310
cfn=(878)
calls=62 4505 
* 16302
* 124
+2 7
+2 49
cfn=(880)
calls=7 10414 
* 241
* 434
cfn=(880)
calls=62 10414 
* 25834
* 207
+4 276
+1 196
cob=(12)
cfi=(233) /home/mithuncy/fsm_code/src/pl/plpgsql/src/pl_handler.c
cfn=(4146) plpgsql_extra_errors_assign_hook
calls=1 136 
* 10
cob=(12)
cfi=(233)
cfn=(4144) plpgsql_extra_warnings_assign_hook
calls=1 130 
* 10
cfn=(1202)
calls=1 10561 
* 8
cfn=(1188)
calls=1 10769 
* 10
cfi=(39)
cfn=(1184)
calls=1 374 
* 9
cfi=(48) /home/mithuncy/fsm_code/src/backend/commands/tablespace.c
cfn=(1170) assign_temp_tablespaces
calls=1 1270 
* 28
cfn=(1152)
calls=1 10640 
* 55
cfi=(56) /home/mithuncy/fsm_code/src/backend/replication/syncrep.c
cfn=(1146) assign_synchronous_standby_names
calls=1 1202 
* 8
cfn=(1136)
calls=1 10949 
* 1637
cfi=(39)
cfn=(1130)
calls=1 793 
* 12
cfi=(55) /home/mithuncy/fsm_code/src/backend/catalog/namespace.c
cfn=(1122) assign_search_path
calls=1 4190 
* 7
cfi=(39)
cfn=(1108) assign_role
calls=1 882 
* 31
cfn=(1104)
calls=1 11135 
* 17
cfn=(1100)
calls=1 11059 
* 14
cfn=(1096)
calls=1 11202 
* 17
cfn=(1092)
calls=1 11231 
* 17
cfn=(1088)
calls=1 11289 
* 17
cfn=(1084) assign_recovery_target
calls=1 11102 
* 17
cfi=(39)
cfn=(1060)
calls=1 447 
* 9
cfn=(1028)
calls=1 10624 
* 9
cfi=(18)
cfn=(1022)
calls=1 338 
* 7
cfi=(18)
cfn=(1018)
calls=1 326 
* 7
cfi=(18)
cfn=(1014)
calls=1 314 
* 7
cfi=(18)
cfn=(1008)
calls=1 377 
* 8029
cfi=(49)
cfn=(990)
calls=1 652 
* 7
cfi=(39)
cfn=(982)
calls=1 237 
* 14
cfi=(39)
cfn=(920)
calls=1 699 
* 39
cfn=(886)
calls=1 10987 
* 21
+1 552
+1 483
+1 138
+4 60
+1 90
+1 30
+2 210
cfn=(890)
calls=30 10448 
* 731
* 90
+4 120
+1 28
cfi=(53)
cfn=(1204) assign_xlog_sync_method
calls=1 10087 
* 13
cfn=(1148)
calls=1 10630 
* 280
cfi=(56)
cfn=(1142) assign_synchronous_commit
calls=1 1208 
* 11
cfn=(1132)
calls=1 10650 
* 10
+1 240
+1 210
+1 30
+3 638

fn=(878)
4505 750
+3 375
cob=(3)
cfi=(3)
cfn=(384)
calls=125 0 
* 29903
* 125
* 125
+1 250
+4 125
+1 500

fn=(880)
10414 1089
+2 396
+1 88
+3 55
+1 55
+1 55
+1 55
+2 385
cob=(12)
cfi=(233)
cfn=(4138) plpgsql_extra_checks_check_hook
calls=2 63 
* 677
cfn=(1200)
calls=1 +62 
* 594
cfn=(1186)
calls=3 10739 
* 1585161
cfi=(39)
cfn=(1174) check_timezone
calls=3 254 
* 8397
cfi=(48)
cfn=(1168) check_temp_tablespaces
calls=1 1165 
* 339
cfi=(56)
cfn=(1144) check_synchronous_standby_names
calls=1 1145 
* 20
cfi=(39)
cfn=(1128) check_session_authorization
calls=2 745 
* 929
cfi=(55)
cfn=(1112) check_search_path
calls=1 4156 
* 3187
cfi=(39)
cfn=(1106) check_role
calls=1 815 
* 245
cfn=(1102)
calls=1 11115 
* 14
cfn=(1098)
calls=1 11030 
* 235
cfn=(1094)
calls=1 11151 
* 14
cfn=(1090)
calls=1 11218 
* 31
cfn=(1086)
calls=1 11247 
* 14
cfn=(1082)
calls=1 11091 
* 44
cfn=(1080)
calls=1 11305 
* 18
cfi=(39)
cfn=(1034) check_log_timezone
calls=3 409 
* 1264715
cfn=(1024)
calls=1 10567 
* 1913
cfi=(18)
cfn=(1020) check_locale_time
calls=3 332 
* 13471
cfi=(18)
cfn=(1016) check_locale_numeric
calls=3 320 
* 13483
cfi=(18)
cfn=(1010) check_locale_monetary
calls=3 308 
* 13451
cfi=(18)
cfn=(1006) check_locale_messages
calls=3 354 
* 1121
cfn=(1004)
calls=3 10726 
* 794
cfi=(49)
cfn=(988) check_TSCurrentConfig
calls=3 592 
* 75
cfi=(48)
cfn=(984) check_default_tablespace
calls=1 1070 
* 25
cfi=(39)
cfn=(926) check_datestyle
calls=3 45 
* 12716
cfn=(924) check_cluster_name
calls=1 10994 
* 25
cfi=(39)
cfn=(902) check_client_encoding
calls=4 623 
* 4940
cfn=(882)
calls=2 10978 
* 102
* 165
+17 55
+1 594

fn=(894)
10380 220
+2 80
+1 38
+3 1
+1 1
+1 1
+1 1
+2 7
cfi=(39)
cfn=(1124) check_random_seed
calls=1 591 
* 213
* 3
+17 1
+1 120

fn=(924)
10994 6
+2 4
cfi=(37)
cfn=(884)
calls=1 83 
* 12
+2 1
+1 2

fn=(1084)
11102 5
+1 3
+4 6
+3 1
+1 2

fn=(1158)
10805 5
+12 5
cfi=(58)
cfn=(1160)
calls=1 1731 
* 11
+1 2

fn=(2652) GetConfigOption
7195 225
+4 125
cfn=(1212)
calls=25 4869 
* 31262
* 25
+1 50
+9 50
+8 175
+3 14
+4 12
-1 42
cfi=(17)
cfn=(462)
calls=6 203 
* 2844
+2 12
+8 64
+4 2
-1 5
cfn=(2654)
calls=1 6115 
* 24
* 1
+4 100

fn=(2654)
6115 10
+3 8
+2 8
+1 6
-3 12
+9 4

fn=(4124)
8025 45
+10 10
+10 20
+9 10
+1 16
cob=(3)
cfi=(3)
cfn=(446)
calls=4 0 
* 115
* 4
-1 8
+2 16
cob=(3)
cfi=(3)
cfn=(446)
calls=4 0 
* 115
* 4
-1 8
+4 15
cfn=(862)
calls=5 4473 
* 1111
* 5
+1 25
cob=(3)
cfi=(3)
cfn=(828)
calls=5 0 
* 164
* 5
+2 20
cfn=(878)
calls=5 4505 
* 1218
* 10
+1 15
+1 10
+1 15
+1 15
+1 15
+1 15
+2 5
+1 10

fl=(43) /home/mithuncy/fsm_code/src/backend/utils/mb/wchar.c
fn=(942) pg_database_encoding_max_length
1834 2036
+1 1018
cfi=(19) /home/mithuncy/fsm_code/src/backend/utils/mb/mbutils.c
cfn=(612) GetDatabaseEncoding
calls=1018 1005 
* 6108
* 7126
+1 2036

fn=(3844) pg_verify_mbstr_len
1895 700008
+9 262503
cfn=(3528) pg_encoding_max_length
calls=87501 -83 
* 1137513
* 175002
+12 787509
+2 87501
+2 87501
+5 834740
+2 834740
+2 208685
+1 208685
+1 208685
+1 208685
-12 592372
+32 87501
+1 175002

fn=(3530) pg_utf_mblen
542 24
+3 32
+1 16
+15 8
+1 16

fn=(3528)
1821 262509
+3 700024
+1 175006

fn=(3842) pg_verify_mbstr
1878 700008
+1 525006
cfn=(3844)
calls=87501 +16 
* 6596632
* 175002
+1 175002

fl=(91) /home/mithuncy/fsm_code/src/backend/storage/lmgr/lock.c
fn=(3046) LockTagHashCode
491 30436
+1 38045
cfi=(31) /home/mithuncy/fsm_code/src/backend/utils/hash/dynahash.c
cfn=(2226) get_hash_value
calls=7609 861 
* 1042433
+1 15218

fn=(3540) FastPathGrantRelationLock
2565 1072
+2 268
+3 536
+2 51456
+1 8760
+1 8208
-4 13400
+13 536
+2 1340
+1 4288
+1 804
+1 536
+5 536

fn=(3682) AbortStrongLockAcquire
1667 9
+2 6
+2 6
+1 3
+10 6

fn=(2220) InitLocks
378 3
+10 7
cfi=(87)
cfn=(2002)
calls=1 +88 
* 21
* 6
cfi=(87)
cfn=(2000)
calls=1 493 
* 23
* 1
+1 6
+6 118
+1 1
+1 1
+1 1
+2 7
cfi=(87)
cfn=(2162) ShmemInitHash
calls=1 -78 
* 53886
* 1
+7 1
+1 1
+6 1
+1 1
+1 1
+1 1
+2 7
cfi=(87)
cfn=(2162)
calls=1 -97 
* 99180
* 1
+10 5
cfi=(87)
cfn=(2168)
calls=1 -56 
* 1322
-1 1
+3 4
+1 2
+11 3
+3 1
+1 1
+2 6
cfi=(31)
cfn=(794) hash_create
calls=1 317 
* 2788
* 1
+4 2

fn=(3044) LockAcquireExtended
738 92612
+1 28496
+11 7124
+2 28496
+2 28496
+1 42744
+3 7124
cfi=(53)
cfn=(2878) RecoveryInProgress
calls=7124 7896 
* 78364
* 14248
+18 14248
+3 14248
+5 128232
cob=(3)
cfi=(3)
cfn=(828)
calls=7124 0 
* 99736
* 7124
+1 35620
+1 14248
+2 49868
cfi=(31)
cfn=(836) hash_search
calls=7124 910 
* 2890180
* 7124
+7 28496
+2 14246
+1 14246
+1 21369
cfn=(3046)
calls=7123 491 
* 1054204
* 14246
+1 14246
+1 14246
+1 14246
+1 14246
+1 14246
+1 14246
+3 14246
-1 49861
cfi=(13)
cfn=(798)
calls=7123 -35 
* 664671
-1 21369
+7 6
+10 21372
+2 14248
+1 16866
+8 28496
+2 5
cfn=(3058) GrantLockLocal
calls=1 1602 
* 40
+1 4
+1 2
+17 14246
+19 113128
+1 5603
-1 11206
+3 804
+9 1340
cfi=(99) /home/mithuncy/fsm_code/src/backend/storage/lmgr/lwlock.c
cfn=(2170) LWLockAcquire
calls=268 1122 
* 36716
+1 1340
+3 1608
cfn=(3540)
calls=268 2565 
* 91740
* 268
+2 1072
cfi=(99)
cfn=(2182) LWLockRelease
calls=268 1726 
* 24388
+1 536
+7 536
+1 536
+1 1340
cfn=(3058)
calls=268 1602 
* 19600
+1 536
+10 86922
+28 54840
+2 27420
cfi=(99)
cfn=(2170)
calls=6855 1122 
* 939135
+11 54840
cfn=(3048) SetupLockInTable
calls=6855 1121 
* 5726779
* 6855
+2 13710
+16 20565
+1 20565
+1 20565
+7 82260
+3 41130
cfn=(3054) LockCheckConflicts
calls=6855 1348 
* 191940
* 6855
+3 13710
+3 41130
cfn=(3056) GrantLock
calls=6855 1468 
* 452430
+1 34275
cfn=(3058)
calls=6855 1602 
* 405330
* 6855
+95 6855
cfn=(3062) FinishStrongLockAcquire
calls=6855 1657 
* 34275
+2 20565
cfi=(99)
cfn=(2182)
calls=6855 1726 
* 623805
+6 13710
+11 6855
+1 35620

fn=(3108) UnGrantLock
1492 41130
+1 6855
+9 34275
+1 75405
+1 34275
+1 75405
+2 47985
+3 75405
+14 82260
+6 75405
+3 6855
+1 13710

fn=(3062)
1657 13710
+1 6855
+1 13710

fn=(3064) MarkLockClear
1709 16863
+2 11242
+1 11242

fn=(3542) FastPathUnGrantRelationLock
2602 20476
+2 5119
+2 5119
+1 10238
+2 491424
+1 4020
+3 4556
+1 268
+3 982848
+1 236952
-11 255950
+13 5119
+1 10238

fn=(3686) VirtualXactLockTableCleanup
4320 6
+9 10
cfi=(99)
cfn=(2170)
calls=2 1122 
* 274
+2 6
+1 6
+1 4
+1 4
+2 8
cfi=(99)
cfn=(2182)
calls=2 1726 
* 182
+6 8
+12 4

fn=(3058)
1602 35620
+1 21372
+5 35620
+2 14248
+2 9
+2 9
+1 1
-5 28496
+8 56984
+1 49861
+1 35615
+1 14246
+1 35615
cfi=(164) /home/mithuncy/fsm_code/src/backend/utils/resowner/resowner.c
cfn=(3060) ResourceOwnerRememberLock
calls=7123 933 
* 83026
+1 14248

fn=(3104) LockRelease
1885 46354
+1 26488
+9 26488
+2 26488
+1 39732
+13 119196
cob=(3)
cfi=(3)
cfn=(828)
calls=6622 0 
* 92708
* 6622
+1 33110
+1 13244
+2 39732
cfi=(31)
cfn=(836)
calls=6622 910 
* 1968686
* 6622
+7 39732
+11 19866
+5 13244
+3 13244
+2 33110
+2 59598
+3 79464
+2 13242
+1 33105
cfi=(164)
cfn=(3106) ResourceOwnerForgetLock
calls=6621 953 
* 88566
+2 33105
+1 26484
+3 6622
-14 13244
+17 13244
+13 33110
+2 26488
+1 2
+9 13242
+3 104112
+1 5103
-1 10206
+9 25515
cfi=(99)
cfn=(2170)
calls=5103 1122 
* 699111
+1 30618
cfn=(3542)
calls=5103 2602 
* 2025855
* 5103
+2 20412
cfi=(99)
cfn=(2182)
calls=5103 1726 
* 464373
+1 10206
+2 756
cfn=(3112) RemoveLocalLock
calls=252 1297 
* 118883
+1 504
+7 57321
+2 25476
cfi=(99)
cfn=(2170)
calls=6369 1122 
* 872553
+10 19107
+1 12738
+24 19107
+7 57321
+13 38214
cfn=(3108)
calls=6369 1492 
* 528627
* 6369
+2 57321
cfn=(3110) CleanUpLock
calls=6369 1550 
* 3696380
+4 19107
cfi=(99)
cfn=(2182)
calls=6369 1726 
* 579579
+2 19107
cfn=(3112)
calls=6369 1297 
* 3041296
+1 6369
+1 13244

fn=(2978) VirtualXactLockTableInsert
4297 8
+3 10
cfi=(99)
cfn=(2170)
calls=2 1122 
* 274
+6 4
+1 6
+2 8
cfi=(99)
cfn=(2182)
calls=2 1726 
* 182
+1 4

fn=(3052) ProcLockHashCode
539 54840
+1 27420
+6 41130
+1 41130
+2 13710
+1 27420

fn=(3110)
1550 61695
+5 27420
+5 27420
cfi=(126)
cfn=(2236) SHMQueueDelete
calls=6855 69 
* 171375
+1 27420
cfi=(126)
cfn=(2236)
calls=6855 69 
* 171375
+1 34275
cfn=(3052)
calls=6855 539 
* 102825
* 6855
+2 6855
-1 41130
cfi=(31)
cfn=(842) hash_search_with_hash_value
calls=6855 924 
* 1583232
* 13710
+8 27420
+9 6855
-1 41130
cfi=(31)
cfn=(842)
calls=6855 924 
* 1592948
* 13710
+5 6855
+7 13710

fn=(5618) LockReassignCurrentOwner
2489 5
+1 3
cfi=(164)
cfn=(5620) ResourceOwnerGetParent
calls=1 739 
* 7
* 1
+4 2
+5 5
cfi=(31)
cfn=(3502) hash_seq_init
calls=1 1380 
* 53
+2 1
+1 2505
cfn=(5622) LockReassignOwner
calls=501 +17 
* 40764
-1 1506
cfi=(31)
cfn=(3508) hash_seq_search
calls=502 1390 
* 30233
* 1507
+10 2

fn=(3112)
1297 28492
+3 49861
+5 14246
+1 28492
+1 28492
cfi=(13)
cfn=(952)
calls=7123 1032 
* 605455
+1 14246
+2 28492
+14 7123
-1 35615
cfi=(31)
cfn=(836)
calls=7123 910 
* 2525616
* 14246
+4 14246

fn=(2016) LockShmemSize
3437 3
+1 1
+4 7
cfi=(87)
cfn=(2002)
calls=1 476 
* 21
* 6
cfi=(87)
cfn=(2000)
calls=1 493 
* 23
* 1
+1 4
cfi=(31)
cfn=(2006) hash_estimate_size
calls=1 733 
* 435
* 5
cfi=(87)
cfn=(2002)
calls=1 476 
* 21
* 1
+3 1
+1 4
cfi=(31)
cfn=(2006)
calls=1 733 
* 438
* 5
cfi=(87)
cfn=(2002)
calls=1 476 
* 21
* 1
+5 8
cfi=(87)
cfn=(2002)
calls=1 476 
* 21
* 1
+2 1
+1 2

fn=(3056)
1468 34275
+1 34275
+1 75405
+1 68550
+1 82260
+1 75405
+1 68550
+4 13710

fn=(3488) LockAcquire
712 12016
+1 12016
cfn=(3044)
calls=1502 +25 
* 3145808
+2 3004

fn=(5622)
2519 2505
+3 501
+1 501
+6 1503
+1 2505
+2 5010
+1 1500
+1 9
+1 2
-5 2505
+8 1002
+1 1
+2 1000
+3 4000
+1 2500
cfi=(164)
cfn=(3060)
calls=500 933 
* 5718
* 500
+11 2500
cfi=(164)
cfn=(3106)
calls=500 953 
* 6000
+1 1002

fn=(3048)
1121 54840
+10 54840
cfi=(31)
cfn=(842)
calls=6855 924 
* 1785251
* 6855
+5 13710
+6 27420
+2 13710
+1 13710
+1 27420
cfi=(126)
cfn=(2228)
calls=6855 37 
* 82260
+1 27420
cfi=(84) /home/mithuncy/fsm_code/src/backend/storage/lmgr/proc.c
cfn=(3050) ProcQueueInit
calls=6855 1023 
* 157665
+1 13710
+1 13710
+1 431865
+1 102825
cob=(3)
cfi=(3)
cfn=(828)
calls=6855 0 
* 109680
* 6855
+14 13710
+1 13710
+2 34275
cfn=(3052)
calls=6855 539 
* 102825
* 6855
+5 54840
cfi=(31)
cfn=(842)
calls=6855 924 
* 1775348
* 6855
+5 13710
+25 27420
+2 20565
+12 13710
+1 20565
-1 13710
+2 13710
+1 13710
+2 47985
cfi=(126)
cfn=(2230) SHMQueueInsertBefore
calls=6855 90 
* 157665
+1 82260
cfi=(126)
cfn=(2230)
calls=6855 90 
* 157665
+52 34275
+1 75405
+7 61695
+6 6855
+1 13710

fn=(3054)
1348 47985
+1 20565
+2 54840
+2 6855
+14 34275
+3 13710
+83 13710

fn=(3684) LockReleaseAll
2090 40
+9 5
+2 20
+2 20
+13 10
+1 2
cfn=(3686)
calls=2 4320 
* 512
+2 15
+10 25
cfi=(31)
cfn=(3502)
calls=5 1380 
* 265
+2 5
+7 2008
+7 2510
+8 2008
+2 1506
+3 1004
+2 4518
+3 5522
cfi=(164)
cfn=(3106)
calls=502 953 
* 6055
-5 4518
+8 2008
+1 1004
-1 1004
+11 1004
+7 3952
+2 48
+4 288
+11 64
+2 5
cfi=(99)
cfn=(2170)
calls=1 1122 
* 137
+1 1
+4 3
+1 5
cfn=(3542)
calls=1 2602 
* 427
-1 45
+1 75
cfn=(3542)
calls=15 2602 
* 6045
* 32
+2 48
cfn=(3112)
calls=16 1297 
* 7472
+1 16
+25 1944
+1 6318
+3 1458
cfn=(3112)
calls=486 1297 
* 226971
2131 1521
cfi=(31)
cfn=(3508)
calls=507 1390 
* 47335
* 1521
2245 10
+1 4
cfi=(99)
cfn=(2182)
calls=1 1726 
* 91
+5 10
+3 640
+3 560
+21 480
cfi=(126)
cfn=(2234) SHMQueueNext
calls=80 146 
* 1251
* 160
+2 63
+2 68
cfi=(99)
cfn=(2170)
calls=17 1122 
* 2329
+2 102
cfi=(126)
cfn=(2234)
calls=17 146 
* 306
* 34
+5 486
+4 972
-1 2430
cfi=(126)
cfn=(2234)
calls=486 146 
* 8697
* 486
+6 1458
+3 2430
+7 972
+9 1944
+13 972
+2 34992
+1 3402
cfn=(3108)
calls=486 1492 
* 40338
* 2430
-3 17010
+10 972
+3 486
+2 486
-2 972
cfn=(3046)
calls=486 491 
* 71928
* 3402
cfn=(3110)
calls=486 1550 
* 281835
-56 972
-3 1006
+65 51
cfi=(99)
cfn=(2182)
calls=17 1726 
* 1547
-98 250
2356 20

fl=(289) /home/mithuncy/fsm_code/src/backend/parser/parse_coerce.c
fn=(4982) coerce_type
159 50
+5 25
+6 18
+1 8
+15 4
+2 12
+1 6
+36 14
+19 4
+1 8
cfi=(13)
cfn=(2950)
calls=2 853 
* 272
* 10
+15 4
+1 10
cfi=(275) /home/mithuncy/fsm_code/src/backend/utils/cache/lsyscache.c
cfn=(4938) getBaseTypeAndTypmod
calls=2 2284 
* 952
* 2
+11 4
+3 2
+2 6
cfi=(291) /home/mithuncy/fsm_code/src/backend/parser/parse_type.c
cfn=(4984) typeidType
calls=2 560 
* 712
* 2
+2 6
+1 6
+1 6
cfi=(291)
cfn=(4986) typeTypeCollation
calls=2 622 
* 30
* 4
+1 6
cfi=(291)
cfn=(4988) typeLen
calls=2 581 
* 30
* 6
+1 6
cfi=(291)
cfn=(4990) typeByVal
calls=2 591 
* 30
* 4
+1 8
+7 8
+6 14
cfi=(226)
cfn=(4992) setup_parser_errposition_callback
calls=2 147 
* 48
+6 10
+2 4
-1 12
cfi=(291)
cfn=(4994) stringTypeDatum
calls=2 636 
* 788
* 6
+13 18
+2 8
cfi=(161) /home/mithuncy/fsm_code/src/backend/utils/fmgr/fmgr.c
cfn=(5008) pg_detoast_datum
calls=2 1918 
* 26
* 2
-1 4
+31 6
cfi=(226)
cfn=(5010) cancel_parser_errposition_callback
calls=2 162 
* 16
+2 4
+3 6
+7 6
cfi=(151) /home/mithuncy/fsm_code/src/backend/utils/cache/syscache.c
cfn=(3418) ReleaseSysCache
calls=2 1161 
* 206
+2 4
+2 6
+1 4
+15 4
+19 6
cfn=(4950) find_coercion_pathway
calls=1 2234 
* 2348
* 1
+2 2
+2 2
+12 2
+1 5
cfi=(275)
cfn=(4938)
calls=1 2284 
* 476
* 1
+2 12
cfn=(5104) build_coercion_expression
calls=1 816 
* 203
* 1
+8 3
+1 1
+36 2
+68 20

fn=(5104)
816 9
+1 1
+2 2
+28 2
+44 2
+60 2
+3 4
cfi=(13)
cfn=(2950)
calls=1 853 
* 160
* 5
+4 3
+1 3
+2 3
+1 3
+2 2
+8 2

fn=(4962) typeIsOfTypedTable
2451 35
+1 21
cfi=(291)
cfn=(4960) typeOrDomainTypeRelid
calls=7 671 
* 3346
* 7
+1 7
+2 14
+16 7
+1 14

fn=(4970) TypeCategory
2082 16
+4 24
cfi=(275)
cfn=(4972) get_type_category_preferred
calls=4 2446 
* 23832
+2 4
+1 8

fn=(4964) check_generic_type_consistency
1478 24
+2 4
+1 4
+2 4
+2 4
+1 4
+1 4
+6 8
+2 56
+1 56
+2 28
+1 10
+3 3
+1 6
+1 2
+1 4
+2 6
+1 1
+1 4
+2 6
+2 10
+2 8
+1 2
+1 6
cfi=(275)
cfn=(4936) getBaseType
calls=2 2267 
* 976
* 2
+1 4
+2 6
+2 2
-29 44
+41 8
+2 4
+8 6
cfi=(275)
cfn=(4956) get_element_type
calls=2 2494 
* 952
* 2
+1 4
+1 4
+17 4
+20 4
+3 3
cfi=(275)
cfn=(4966) get_base_element_type
calls=1 2567 
* 480
* 2
+4 4
+8 2
+1 8

fn=(4978) enforce_generic_type_consistency
1677 33
+2 3
+1 3
+1 3
+1 3
+1 3
+4 6
-1 6
+1 9
-1 6
+3 9
+1 9
+6 6
+2 42
+1 42
+2 24
+1 10
+3 3
+1 2
+1 2
+3 2
+5 2
+2 2
+7 3
+2 10
+20 10
-50 33
+76 12
+1 4
+3 2
+38 2
+38 2
+18 4
+3 3
cfi=(275)
cfn=(4966)
calls=1 2567 
* 480
* 2
+7 2
+13 2
+42 2
+15 2
+13 4
+1 2
+5 1
+1 15

fn=(5102) coerce_to_target_type
83 9
+4 6
cfn=(4948) can_coerce_type
calls=1 545 
* 2411
* 3
+12 2
+1 7
+3 12
cfn=(4982)
calls=1 +56 
* 3112
* 1
+12 10
-3 11
cfn=(5106) coerce_type_typmod
calls=1 744 
* 17
* 1
+5 3
+12 1
+1 2

fn=(5106)
744 11
+8 2
+1 2
+16 2

fn=(4950)
2234 63
+1 9
+3 18
+3 18
+1 27
cfi=(275)
cfn=(4936)
calls=9 +25 
* 4392
* 9
+1 18
+1 27
cfi=(275)
cfn=(4936)
calls=9 +23 
* 135438
* 9
+3 27
+4 45
cfi=(151)
cfn=(4952) SearchSysCache2
calls=9 1125 
* 119902
* 9
+4 18
+62 36
+5 27
cfi=(275)
cfn=(4956)
calls=9 2494 
* 4311
* 27
+27 18
+2 18
+1 6
cfn=(4970)
calls=2 2082 
* 984
-1 4
+2 4
+1 14
+6 9
+1 18

fn=(5116) IsBinaryCoercible
2136 5
+6 3
+1 2
+58 2

fn=(4974) IsPreferredType
2101 12
+4 12
cfi=(275)
cfn=(4972)
calls=2 2446 
* 44561
+1 10
+3 2
+1 4

fn=(4948)
545 91
+1 13
+4 26
+2 175
+1 175
+5 75
+4 50
+1 1
+3 192
+2 8
+1 8
+7 32
+1 8
+6 48
cfn=(4950)
calls=8 2234 
* 263157
* 8
+2 16
+1 1
+6 14
+7 14
+18 14
+7 35
cfi=(290) /home/mithuncy/fsm_code/src/backend/catalog/pg_inherits.c
cfn=(4958) typeInheritsFrom
calls=7 311 
* 3458
* 14
+1 35
cfn=(4962)
calls=7 2451 
* 3451
* 14
+6 14
-81 111
+85 12
+2 24
cfn=(4964)
calls=4 1478 
* 2785
* 12
+2 4
+3 4
+1 26

fl=(41)
fn=(5166) text_catenate
698 2500
+7 7500
+1 7500
+3 1000
+2 1000
+3 2500
+1 2000
cfi=(13)
cfn=(940) palloc
calls=500 925 
* 61500
* 500
+3 2000
+3 1500
+1 1000
+1 7000
cob=(3)
cfi=(3)
cfn=(856)
calls=500 0 
* 7000
* 500
+1 1000
+1 8500
cob=(3)
cfi=(3)
cfn=(856)
calls=500 0 
* 6802
* 500
+2 500
+1 1000

fn=(5184) textout
523 4000
+1 3000
+2 3000
cfn=(4028) text_to_cstring
calls=1000 186 
* 215000
+1 2000

fn=(1960)
3634 7
+1 2
+1 1
+2 2
+2 6
cfi=(42)
cfn=(934) scanner_isspace
calls=1 222 
* 17
* 2
+3 4
+9 4
+21 4
+1 1
+3 20
cfi=(42)
cfn=(934)
calls=4 222 
* 68
* 12
+1 12
+1 4
-5 36
+7 3
+4 6
cfi=(42)
cfn=(934)
calls=1 222 
* 17
* 2
+3 4
+7 4
+1 2
+5 2
+3 3
cob=(3)
cfi=(3)
cfn=(424)
calls=1 0 
* 15
* 1
* 2
+6 3
cfi=(13)
cfn=(928)
calls=1 1162 
* 145
* 1
+1 3
cfi=(11)
cfn=(484)
calls=1 255 
* 392
+1 6
cfi=(45)
cfn=(960)
calls=1 129 
* 228
* 2
+3 4
+2 1
+1 2

fn=(4028)
186 4012
+2 3009
cfi=(161)
cfn=(4030) pg_detoast_datum_packed
calls=1003 1950 
* 17051
* 1003
+1 15051
+3 5000
cfi=(13)
cfn=(940)
calls=1000 925 
* 123000
-3 3
+3 15
cfi=(13)
cfn=(940)
calls=3 925 
* 338
* 1003
+1 14033
cob=(3)
cfi=(3)
cfn=(856)
calls=1000 0 
* 20000
* 1000
* 12
cob=(3)
cfi=(3)
cfn=(856)
calls=3 0 
* 48
* 3
+1 5015
+2 3009
+3 1003
+1 2006

fn=(5006) cstring_to_text_with_len
165 5010
+1 5010
cfi=(13)
cfn=(940)
calls=1002 925 
* 116715
* 1002
+2 5010
+1 8016
cob=(3)
cfi=(3)
cfn=(856)
calls=1002 0 
* 19840
* 1002
+2 1002
+1 2004

fn=(5164) textcat
683 2000
+1 2000
cfi=(161)
cfn=(4030)
calls=500 1950 
* 8500
* 500
+1 2000
cfi=(161)
cfn=(4030)
calls=500 1950 
* 8500
* 500
+2 2500
cfn=(5166)
calls=500 +11 
* 123302
+1 1000

fn=(932)
3507 63
+1 18
+1 9
+2 18
+2 54
cfi=(42)
cfn=(934)
calls=9 222 
* 153
* 18
+3 36
+1 4
+8 48
+3 6
+3 10
cob=(3)
cfi=(3)
cfn=(1120)
calls=1 0 
* 27
cob=(1)
cfi=(1)
cfn=(223)
calls=1 0 
* 1301
* 6
* 2
+1 4
+2 10
+1 2
+6 6
+32 2
-24 20
+1 10
+2 45
-2 412
+1 225
cfi=(42)
cfn=(934)
calls=45 222 
* 765
* 45
-1 90
+3 20
+1 30
+12 50
+1 60
cfi=(42)
cfn=(936) downcase_truncate_identifier
calls=10 132 
* 2707
* 10
+2 70
cob=(3)
cfi=(3)
cfn=(950)
calls=9 0 
* 280
cob=(1)
cfi=(1)
cfn=(223)
calls=1 0 
* 1321
* 14
+1 30
cfi=(13)
cfn=(952)
calls=10 1032 
* 733
+3 70
cfi=(42)
cfn=(934)
calls=12 222 
* 204
* 24
+3 48
+2 5
+1 5
+1 5
-1 25
cfi=(42)
cfn=(934)
calls=5 222 
* 85
* 25
cfi=(42)
cfn=(934)
calls=5 222 
* 50
* 25
+4 28
+1 14
+5 24
+3 36
cob=(3)
cfi=(3)
cfn=(424)
calls=12 0 
* 188
* 12
* 72
cfi=(42)
cfn=(958)
calls=12 188 
* 168
+5 72
cfi=(45)
cfn=(960)
calls=12 129 
* 2910
* 24
+3 48
+2 7
+1 18

fn=(5002) textin
512 2008
+1 1506
+2 1506
cfn=(5004) cstring_to_text
calls=502 153 
* 91182
+1 1004

fn=(5168) text_format
5304 3000
+10 500
+1 500
+1 500
+1 500
+1 500
+5 2000
+4 2000
cfi=(161)
cfn=(5170) get_fn_expr_variadic
calls=500 2130 
* 10500
* 1000
+44 2000
+1 500
+4 2000
cfi=(161)
cfn=(4030)
calls=500 1950 
* 8500
* 500
+1 4500
+1 9000
+1 1500
cfi=(80)
cfn=(1888) initStringInfo
calls=500 47 
* 77473
+1 500
+3 1500
+14 134000
+2 660000
+1 33000
+3 2000
+3 2000
+7 5000
cfn=(5172) text_format_parse_format
calls=500 5632 
* 60000
* 500
+12 3000
cob=(3)
cfi=(3)
cfn=(1120)
calls=500 0 
* 13500
* 500
* 1000
+8 1500
+60 1500
+2 1500
+6 2000
+2 3000
+1 2500
+1 3000
cfi=(161)
cfn=(5176) get_fn_expr_argtype
calls=500 1996 
* 58500
* 1000
+8 1000
+3 500
+7 1500
+5 3000
cfi=(275)
cfn=(5128) getTypeOutputInfo
calls=500 2642 
* 250500
+1 2500
cfi=(161)
cfn=(2942) fmgr_info
calls=500 125 
* 41000
+1 1000
+6 4500
+5 6000
cfn=(5178) text_format_string_conversion
calls=500 5710 
* 798152
+3 1000
5383 135500
5557 1500
+2 1500
+4 2500
cfn=(5006)
calls=500 165 
* 88500
* 500
+1 1500
cfi=(13)
cfn=(952)
calls=500 1032 
* 42500
+2 500
+1 2500

fn=(5172)
5632 5500
+1 1000
+4 1000
+1 1000
+1 1000
+1 1000
+3 3000
cfn=(5174) text_format_parse_digits
calls=500 -62 
* 17000
* 1000
+19 2500
+6 2000
+26 3000
cfn=(5174)
calls=500 5581 
* 17000
* 1000
+5 500
+1 2500

fn=(5178)
5710 6000
+4 1000
+14 2500
cfi=(161)
cfn=(5180) OutputFunctionCall
calls=500 1754 
* 131000
* 500
+3 1000
+3 1500
cfi=(299) /home/mithuncy/fsm_code/src/backend/utils/adt/ruleutils.c
cfn=(5186) quote_identifier
calls=500 10555 
* 532652
* 3000
cfn=(5188) text_format_append_string
calls=500 +23 
* 72500
* 500
+14 1500
cfi=(13)
cfn=(952)
calls=500 1032 
* 42500
+1 2000

fn=(5004)
153 2008
+1 1506
cob=(3)
cfi=(3)
cfn=(424)
calls=502 0 
* 7541
* 502
* 2510
cfn=(5006)
calls=502 +11 
* 76111
+1 1004

fn=(5188)
5757 4000
+1 500
+4 1000
+2 2500
cfi=(80)
cfn=(1918) appendStringInfoString
calls=500 164 
* 62000
+1 500
+32 2000

fn=(5174)
5581 8000
+1 1000
+1 3000
+1 1000
+2 9000
+13 3000
+1 3000
+2 1000
+1 5000

fl=(123)
fn=(3234) pg_atomic_compare_exchange_u32
316 217908
+4 217908
cfi=(180) /home/mithuncy/fsm_code/src/backend/storage/buffer/../../../../src/include/port/atomics/arch-x86.h
cfn=(3236) pg_atomic_compare_exchange_u32_impl
calls=36318 170 
* 726360
+1 72636

fn=(3258)
332 7510
+2 7510
cfi=(180)
cfn=(3260) pg_atomic_fetch_add_u32_impl
calls=1502 190 
* 18024
+1 3004

fn=(3276) pg_atomic_write_u32
262 30040
+3 30040
cfi=(124) /home/mithuncy/fsm_code/src/backend/storage/buffer/../../../../src/include/port/atomics/generic.h
cfn=(2210) pg_atomic_write_u32_impl
calls=6008 56 
* 54072
+1 12016

fn=(2206)
227 81920
+3 81920
cfi=(124)
cfn=(2208) pg_atomic_init_u32_impl
calls=16384 -68 
* 344064
+1 32768
-4 10
+3 10
cfi=(124)
cfn=(2208)
calls=2 -68 
* 42
+1 4

fn=(3230) pg_atomic_read_u32
245 161280
+2 120960
cfi=(124)
cfn=(3232) pg_atomic_read_u32_impl
calls=40320 47 
* 282240
+1 80640

fn=(3268) pg_atomic_fetch_or_u32
376 30040
+2 30040
cfi=(182) /home/mithuncy/fsm_code/src/backend/storage/buffer/../../../../src/include/port/atomics/generic-gcc.h
cfn=(3270) pg_atomic_fetch_or_u32_impl
calls=6008 212 
* 96128
+1 12016

fl=(171) /home/mithuncy/fsm_code/src/backend/access/heap/heapam.c
fn=(3590) heapgetpage
352 5
+13 4
+11 3
+3 10
cfi=(50)
cfn=(3202) ReadBufferExtended
calls=1 642 
* 1072
* 2
+2 3
+2 5
+3 3
+1 3
+5 6
cfi=(188) /home/mithuncy/fsm_code/src/backend/access/heap/pruneheap.c
cfn=(3364) heap_page_prune_opt
calls=1 75 
* 84
+7 4
cfi=(50)
cfn=(3240) LockBuffer
calls=1 3553 
* 162
+2 9
+1 7
cfi=(201) /home/mithuncy/fsm_code/src/backend/access/heap/../../../../src/include/storage/bufmgr.h
cfn=(3592) TestForOldSnapshot
calls=1 266 
* 11
+1 11
+1 1
+22 15
+2 11
+4 30
+5 24
+1 42
+1 30
+1 42
+2 12
+1 12
+4 54
cfi=(92) /home/mithuncy/fsm_code/src/backend/storage/lmgr/predicate.c
cfn=(3378) CheckForSerializableConflictOut
calls=6 3902 
* 234
+3 12
+1 48
-21 24
-1 6
-1 12
+1 1
-1 2
+27 4
cfi=(50)
cfn=(3240)
calls=1 3553 
* 113
+3 3
+1 2

fn=(5222) relation_openrv
1215 2500
+14 1000
+1 500
cfi=(155) /home/mithuncy/fsm_code/src/backend/utils/cache/inval.c
cfn=(2988) AcceptInvalidationMessages
calls=500 680 
* 33500
+3 3500
cfi=(55)
cfn=(5224) RangeVarGetRelidExtended
calls=500 230 
* 28141294
* 500
+3 2000
cfn=(3036) relation_open
calls=500 1125 
* 36718276
+1 1000

fn=(3036)
1125 17995
+6 7198
+1 15495
cfi=(159) /home/mithuncy/fsm_code/src/backend/storage/lmgr/lmgr.c
cfn=(3038) LockRelationOid
calls=3099 106 
* 7151252
+3 10797
cfi=(148) /home/mithuncy/fsm_code/src/backend/utils/cache/relcache.c
cfn=(3066) RelationIdGetRelation
calls=3599 1904 
* 37721934
* 3599
+2 7198
+12 17995
+3 10797
cfi=(38)
cfn=(3086) pgstat_initstats
calls=3599 1715 
* 431782
+2 3599
+1 7198

fn=(3037) relation_open'2
1125 10115
+6 4046
+1 10115
cfi=(159)
cfn=(3038)
calls=2023 106 
* 4799581
+3 6069
cfi=(148)
cfn=(3067) RelationIdGetRelation'2
calls=2023 1904 
* 695274
* 2023
+2 4046
+12 10115
+3 6069
cfi=(38)
cfn=(3086)
calls=2023 1715 
* 74489
+2 2023
+1 4046

fn=(3568) heap_beginscan_strat
1437 11
+1 15
cfn=(3570) heap_beginscan_internal
calls=1 +33 
* 3080
+3 2

fn=(3586) heap_getnext
1848 5
+5 4
+1 8
cfn=(3588) heapgettup_pagemode
calls=1 793 
* 2475
* 1
+5 4
+12 11
+2 2
+1 2

fn=(5380) heap_multi_insert
2699 5000
+1 500
cfi=(26)
cfn=(5382) GetCurrentTransactionId
calls=500 400 
* 9083
* 500
+8 3000
+1 3000
+5 6000
+1 11500
+4 2500
cfi=(13)
cfn=(940)
calls=500 925 
* 61500
* 500
+1 1000
+1 1575000
cfn=(5400) heap_prepare_insert
calls=87500 -78 
* 7000000
* 87500
-1 351500
+27 2500
cfi=(92)
cfn=(5402) CheckForSerializableConflictIn
calls=500 4282 
* 16000
+2 500
+1 500
+3 2000
+1 2000
+3 6000
+6 38000
cfi=(313) /home/mithuncy/fsm_code/src/backend/access/heap/hio.c
cfn=(5406) RelationGetBufferForTuple
calls=2000 317 
* 37664401
* 2000
+3 18000
+3 6000
+6 22000
cfi=(313)
cfn=(5444) RelationPutHeapTuple
calls=2000 40 
* 560000
+1 4000
+2 783000
+2 261000
cfi=(185) /home/mithuncy/fsm_code/src/backend/storage/page/bufpage.c
cfn=(5440) PageGetHeapFreeSpace
calls=87000 663 
* 4089000
* 870000
+1 1500
+2 513000
cfi=(313)
cfn=(5444)
calls=85500 40 
* 33337500
+6 171000
-13 523000
+17 12000
+2 500
+1 3000
+1 2000
cfi=(50)
cfn=(3330) BufferGetBlockNumber
calls=500 2612 
* 8000
* 3000
cfi=(316) /home/mithuncy/fsm_code/src/backend/access/heap/visibilitymap.c
cfn=(5448) visibilitymap_clear
calls=500 170 
* 240500
+9 6000
cfi=(50)
cfn=(5450) MarkBufferDirty
calls=2000 1457 
* 201000
+3 4000
2915 6000
+2 6000
cfi=(50)
cfn=(3610) UnlockReleaseBuffer
calls=2000 3339 
* 555500
+1 6000
+1 1500
cfi=(50)
cfn=(3360) ReleaseBuffer
calls=500 3316 
* 134500
+2 4000
2750 7500
2938 2500
cfi=(92)
cfn=(5402)
calls=500 4282 
* 16000
+8 1500
cfi=(172) /home/mithuncy/fsm_code/src/backend/catalog/catalog.c
cfn=(3366) IsCatalogRelation
calls=500 97 
* 34000
* 1000
+11 1000
+1 1400000
-1 351500
+3 3000
cfi=(38)
cfn=(5496) pgstat_count_heap_insert
calls=500 1912 
* 140133
+1 2000

fn=(3570)
1471 20
+10 3
cfi=(148)
cfn=(3076) RelationIncrementReferenceCount
calls=1 1970 
* 88
+5 2
cfi=(13)
cfn=(940)
calls=1 925 
* 92
* 1
+2 3
+1 3
+1 3
+1 3
+1 3
+1 2
+1 3
+1 3
+1 3
+1 3
+5 11
+13 4
+1 5
cfi=(92)
cfn=(3572) PredicateLockRelation
calls=1 2453 
* 27
+3 4
+6 2
+1 8
cfi=(13)
cfn=(940)
calls=1 925 
* 92
* 3
+4 6
cfn=(3574) initscan
calls=1 221 
* 2680
+2 1
+1 2

fn=(3574)
221 7
+15 4
+3 5
cfi=(50)
cfn=(3576) RelationGetNumberOfBlocksInFork
calls=1 2795 
* 2544
* 2
+14 6
+1 7
-1 2
+7 3
+2 2
+8 4
+2 2
+3 4
+5 2
+9 2
+7 2
+1 2
+3 2
+1 2
+1 2
+1 6
+1 2
+1 2
+7 2
+1 14
cob=(3)
cfi=(3)
cfn=(856)
calls=1 0 
* 24
* 1
+7 10
+1 11
+1 2

fn=(5220) heap_openrv
1336 3000
+3 2500
cfn=(5222)
calls=500 1215 
* 64904070
* 500
+2 2500
+1 1500
-1 1000
+6 2500
+6 500
+1 2000

fn=(3092) relation_close
1283 15340
+1 9204
+5 9204
cfi=(148)
cfn=(3094) RelationClose
calls=3068 2003 
* 300664
+2 6136
+1 12840
cfi=(159)
cfn=(3102) UnlockRelationId
calls=2568 182 
* 6449642
+1 6136

fn=(5336) GetBulkInsertState
2377 1500
+3 1000
cfi=(13)
cfn=(940)
calls=500 925 
* 61500
* 500
+1 1000
cfi=(89)
cfn=(5338)
calls=500 543 
* 656526
* 1000
+1 1000
+1 500
+1 1000

fn=(3034) heap_open
1307 15378
+3 12815
cfn=(3037)
calls=1008 1125 
* 2746525
cfn=(3036)
calls=1555 1125 
* 4334026
* 2563
+2 12815
+1 7689
-1 5126
+6 12815
+6 2563
+1 10252

fn=(3035) heap_open'2
1307 30
+3 25
cfn=(3037)
calls=5 1125 
* 31141
* 5
+2 25
+1 15
-1 10
+6 25
+6 5
+1 20

fn=(3588)
793 7
+1 3
+1 3
+13 2
+2 5
+5 8
+6 4
+15 3
+1 5
cfn=(3590)
calls=1 352 
* 2138
+1 1
+1 3
+9 12
+1 8
cfi=(201)
cfn=(3592)
calls=1 266 
* 11
+1 3
+3 6
+95 1
+2 6
+1 9
+3 8
+1 6
+1 12
+5 2
+4 136
cfi=(161)
cfn=(3342) FunctionCall2Coll
calls=1 1134 
* 49
* 14
+2 2
+2 3
+1 1
-22 2
1055 2

fn=(5502) FreeBulkInsertState
2391 2000
+1 2000
+1 2000
cfi=(50)
cfn=(3360)
calls=500 3316 
* 120500
+1 2000
cfi=(89)
cfn=(5504)
calls=500 598 
* 109104
+1 1500
cfi=(13)
cfn=(952)
calls=500 1032 
* 42500
+1 1000

fn=(5400)
2643 787500
+9 262500
+5 612500
+1 612500
+1 612500
+1 350000
+1 350000
+3 962500
+1 262500
+1 350000
+6 437500
+7 962500
+3 87500
+1 350000

fn=(3372) heap_hot_search_buffer
2053 22627
+1 18513
+1 2057
+7 4114
+1 6171
+5 6171
+1 4114
+1 14399
+2 12342
+8 30885
+3 18531
+3 10295
+3 14
+3 8
+1 2
+1 2
+88 2
-82 16456
+1 12342
+1 8228
+1 6171
+5 14389
+7 4114
+12 8228
+9 6171
cfi=(50)
cfn=(3330)
calls=2057 2612 
* 32912
* 14399
cfi=(50)
cfn=(3330)
calls=2057 2612 
* 32912
* 12342
+3 14399
cfi=(189) /home/mithuncy/fsm_code/src/backend/utils/time/tqual.c
cfn=(3374) HeapTupleSatisfiesMVCC
calls=2057 965 
* 149595
* 2057
+1 16456
cfi=(92)
cfn=(3378)
calls=2057 3902 
* 80223
+3 12342
+2 4114
+2 6171
+1 12342
cfi=(92)
cfn=(3380) PredicateLockTuple
calls=2057 2498 
* 59653
+1 4114
+1 4114
+1 4114
+34 4114

fn=(3594) heap_endscan
1585 4
+6 4
+1 4
cfi=(50)
cfn=(3360)
calls=1 3316 
* 241
+5 4
cfi=(148)
cfn=(3096) RelationDecrementReferenceCount
calls=1 1983 
* 89
+2 4
+1 4
cfi=(13)
cfn=(952)
calls=1 1032 
* 85
+2 4
+3 4
+3 3
cfi=(13)
cfn=(952)
calls=1 1032 
* 85
+1 2

fl=(255)
fn=(4718)
84 9
+1 15
+1 6

fn=(4672)
90 9
+1 9
+1 6
-2 36
+1 42
+1 24
-2 9
+1 9
+1 6

fn=(4528)
78 18
+1 24
+1 12
-2 108
+1 126
+1 72
-2 36
+1 36
+1 24

fl=(25)
fn=(1574) pg_fsync
334 28
+7 21
cfn=(1576) pg_fsync_no_writethrough
calls=7 +10 
* 70
+1 14

fn=(2406) count_usable_fds
794 6
+3 1
+1 1
+8 1
+1 5
cfi=(13)
cfn=(940)
calls=1 925 
* 125
* 1
+4 4
cob=(3)
cfi=(3)
cfn=(242)
calls=1 0 
* 5
* 1
* 1
+4 2
+15 8000
+4 2000
cob=(3)
cfi=(3)
cfn=(2412)
calls=999 0 
* 4995
cob=(1)
cfi=(1)
cfn=(223)
calls=1 0 
* 1220
* 1004
* 1000
+1 2000
+8 3000
+5 9000
+2 3000
+1 2000
+2 3000
+1 1
+1 999
+3 2
+1 8000
cob=(5)
cfi=(5)
cfn=(692)
calls=1000 0 
* 7000
* 1000
-1 4003
+3 3
cfi=(13)
cfn=(952)
calls=1 1032 
* 87
+7 3
+1 7
+1 2

fn=(5564) ReleaseLruFile
1105 1040
+3 1560
+7 2080
cfn=(5566) LruDelete
calls=520 1010 
* 40560
+1 1040
+3 1040

fn=(1592) BasicOpenFile
921 5
+1 7
cfn=(1594) BasicOpenFilePerm
calls=1 +21 
* 31
+1 2

fn=(1594)
943 10549
+4 10549
cob=(5)
cfi=(5)
cfn=(676) open
calls=1507 0 
* 10549
* 1507
* 1507
+2 3014
+1 3014
+16 6028

fn=(2464) RemovePgTempFilesInDir
2924 9
+5 3
cfn=(718)
calls=1 2447 
* 89
* 1
+2 3
cob=(5)
cfi=(5)
cfn=(472)
calls=1 0 
* 3
* 1
* 5
+54 4

fn=(3298) AllocateVfd
1137 6012
+8 6012
+7 21
+3 14
+1 1
+5 8
cob=(3)
cfi=(3)
cfn=(556)
calls=1 0 
* 365
* 1
* 48
cob=(3)
cfi=(3)
cfn=(556)
calls=6 0 
* 28754
* 6
* 7
+1 14
+4 14
+5 21
+2 167854
+1 20470
+1 16376
-4 8209
+6 63
+1 21
+5 14
+3 21
+2 77
+2 7
+1 28
-5 4488
+2 16456
+2 1496
+1 5984

fn=(3300) Insert
1036 4509
+9 13527
+2 3006
+1 6012
+1 4509
+1 16533
+3 3006

fn=(2328) OpenTransientFile
2236 15
+1 21
cfn=(2330) OpenTransientFilePerm
calls=3 +8 
* 324
+1 6

fn=(2472) looks_like_temp_rel_name
3046 12172
+5 12172
+1 6086
+38 6086

fn=(1432) ReadDirExtended
2528 22400
+4 6400
+9 3200
cob=(5)
cfi=(5)
cfn=(472)
calls=3200 0 
* 9600
* 3200
* 3200
+1 9600
cob=(3)
cfi=(3)
cfn=(1438)
calls=3199 0 
* 429806
cob=(1)
cfi=(1)
cfn=(223)
calls=1 0 
* 6783
* 3204
* 9600
+1 6388
+2 6
cob=(5)
cfi=(5)
cfn=(472)
calls=6 0 
* 18
* 6
* 18
+5 6
+1 12800

fn=(2302) ReadDir
2513 20
+1 24
cfn=(1432)
calls=4 +14 
* 537
+1 8

fn=(2468) RemovePgTempRelationFilesInDbspace
3018 15
+5 9
cfn=(718)
calls=3 2447 
* 912
* 3
+2 3
+2 12172
cfn=(2472)
calls=3043 +19 
* 36516
* 9129
+1 3043
-3 18276
cfn=(1432)
calls=3046 2528 
* 493369
* 9138
+15 9
cfn=(738)
calls=3 2565 
* 582
+1 12

fn=(3584) FileSize
2014 10004
+6 27511
+6 32513
cob=(5)
cfi=(5)
cfn=(1956) lseek
calls=2501 0 
* 17507
* 2501
+1 5002

fn=(1278)
2186 3102
+7 517
cfn=(720) reserveAllocatedDesc
calls=517 -80 
* 7238
* 1551
+7 517
cfn=(722) ReleaseLruFiles
calls=517 1127 
* 5687
+3 2585
cob=(3)
cfi=(3)
cfn=(1284)
calls=516 0 
* 229280
cob=(1)
cfi=(1)
cfn=(223)
calls=1 0 
* 1852
* 521
* 1551
+2 3102
+2 1034
+1 1551
+1 517
cfi=(26)
cfn=(736) GetCurrentSubTransactionId
calls=517 624 
* 4136
* 1034
+1 1551
+1 1551
+17 2068

fn=(2462)
2864 3
+8 7
cfi=(17)
cfn=(462)
calls=1 203 
* 356
+1 5
cfn=(2464)
calls=1 +51 
* 118
+1 2
cfn=(2466) RemovePgTempRelationFiles
calls=1 2990 
* 586342
+5 2
cfn=(718)
calls=1 2447 
* 304
* 1
+2 1
+2 10
cob=(3)
cfi=(3)
cfn=(446)
calls=2 0 
* 44
* 2
* 4
+1 5
cob=(3)
cfi=(3)
cfn=(446)
calls=1 0 
* 22
* 1
-1 2
+2 2
-4 15
cfn=(1432)
calls=3 2528 
* 393
* 9
+15 3
cfn=(738)
calls=1 2565 
* 194
+9 2

fn=(3710) CleanupTempFiles
2794 21
+7 12
+3 2
+2 18423
+2 16376
-4 10239
+26 1
+4 12
+5 12
+2 6

fn=(718)
2447 50
+7 10
cfn=(720)
calls=10 2113 
* 367
* 30
+7 10
cfn=(722)
calls=10 1127 
* 110
+3 30
cob=(3)
cfi=(3)
cfn=(728)
calls=9 0 
* 1902
cob=(1)
cfi=(1)
cfn=(223)
calls=1 0 
* 1541
* 14
* 30
+2 54
+2 18
+1 27
+1 9
cfi=(26)
cfn=(736)
calls=9 624 
* 72
* 18
+1 27
+1 27
+3 1
cob=(5)
cfi=(5)
cfn=(472)
calls=1 0 
* 3
* 1
* 4
cob=(5)
cfi=(5)
cfn=(472)
calls=1 0 
* 3
* 1
* 3
+13 1
+1 40

fn=(720)
2113 2120
+5 2120
+1 1058
+8 3
+2 1
+1 5
cob=(3)
cfi=(3)
cfn=(388)
calls=1 0 
* 210
* 1
* 1
+2 2
+4 2
+1 2
+1 2
+27 2120

fn=(740) FreeDesc
2346 2116
+4 3204
+3 2068
cob=(3)
cfi=(3)
cfn=(1380)
calls=516 0 
* 231231
cob=(1)
cfi=(1)
cfn=(223)
calls=1 0 
* 1732
* 521
* 517
+1 517
+5 36
cob=(3)
cfi=(3)
cfn=(746)
calls=8 0 
* 996
cob=(1)
cfi=(1)
cfn=(223)
calls=1 0 
* 1425
* 13
* 9
+1 9
+2 12
cob=(5)
cfi=(5)
cfn=(692)
calls=3 0 
* 21
* 3
* 3
+1 3
+8 1587
+1 5290
+2 529
+1 1058

fn=(1576)
351 28
+1 21
+3 7
+1 14

fn=(2332) CloseTransientFile
2413 12
+6 9
+2 18
+2 24
+1 9
cfn=(740)
calls=3 -78 
* 132
* 3
-5 9
+12 6

fn=(2404)
878 5
+12 6
cfn=(2406)
calls=1 -96 
* 61479
+3 7
+5 3
+5 3
+8 4
cfi=(57)
cfn=(2084) elog_start
calls=1 1286 
* 68
* 10
cfi=(57)
cfn=(2086) elog_finish
calls=1 1336 
* 96
+2 5

fn=(3296) PathNameOpenFilePerm
1311 10521
+11 4509
cob=(3)
cfi=(3)
cfn=(384)
calls=1503 0 
* 458272
* 1503
* 1503
+1 3006
+5 1503
cfn=(3298)
calls=1503 1137 
* 282862
* 1503
+1 13527
+3 1503
cfn=(722)
calls=1503 1127 
* 69053
+2 9018
cfn=(1594)
calls=1503 943 
* 46593
* 3006
+2 6012
+9 4509
+4 4509
cfn=(3300)
calls=1503 1036 
* 51102
+2 4509
+2 7515
+1 4509
+1 3006
+1 3006
+1 3006
+2 1503
+1 6012

fn=(3708) AtEOXact_Files
2762 10
+1 8
cfn=(3710)
calls=2 +31 
* 46
+1 2
+1 2
+1 4

fn=(5566)
1010 2600
+8 4680
+6 2080
cob=(5)
cfi=(5)
cfn=(692)
calls=520 0 
* 3640
* 520
* 1040
+3 1040
+1 1560
+3 1560
cfn=(5568) Delete
calls=520 -40 
* 19760
+1 2080

fn=(2330)
2245 21
+7 3
cfn=(720)
calls=3 2113 
* 42
* 9
+7 3
cfn=(722)
calls=3 1127 
* 33
+2 18
cfn=(1594)
calls=3 943 
* 93
* 3
+2 6
+2 18
+2 6
+1 9
+1 3
cfi=(26)
cfn=(736)
calls=3 624 
* 24
* 6
+1 9
+2 6
+4 12

fn=(2466)
2990 5
+5 3
cfn=(718)
calls=1 2447 
* 304
* 1
+2 1
+7 25
cob=(3)
cfi=(3)
cfn=(2310)
calls=5 0 
* 195
* 5
* 25
cob=(3)
cfi=(3)
cfn=(424)
calls=5 0 
* 83
* 5
* 10
+1 2
+3 6
-1 27
cfi=(17)
cfn=(462)
calls=3 203 
* 1368
+2 9
cfn=(2468)
calls=3 +9 
* 583188
-12 36
cfn=(1432)
calls=6 2528 
* 825
* 18
+15 3
cfn=(738)
calls=1 2565 
* 194
+1 4

fn=(3306) FileAccess
1215 6008
+11 16522
+6 6008
+11 1502
+1 3004

fn=(5478) FileWrite
1892 13500
+11 4500
cfn=(3306)
calls=1500 1215 
* 33000
* 1500
+1 3000
+3 13500
+10 4500
+18 1500
cob=(5)
cfi=(5)
cfn=(472)
calls=1500 0 
* 4500
* 1500
* 1500
+1 4500
cfi=(184) /home/mithuncy/fsm_code/src/backend/storage/file/../../../../src/include/pgstat.h
cfn=(3308) pgstat_report_wait_start
calls=1500 1239 
* 24000
+1 22500
cob=(5)
cfi=(5)
cfn=(5484) pwrite
calls=1499 0 
* 11992
cob=(1)
cfi=(1)
cfn=(223)
calls=1 0 
* 776
* 1504
* 1500
+1 1500
cfi=(184)
cfn=(3318) pgstat_report_wait_end
calls=1500 1263 
* 21000
+3 4500
+3 3000
+9 9000
+7 1500
+28 1500
+1 6000

fn=(5568)
991 1560
+9 4680
+2 6240
+1 6240
+3 1040

fn=(5800) AtProcExit_Files
2776 5
+1 3
cfn=(3710)
calls=1 +17 
* 45058
+1 2

fn=(738)
2565 36
+4 18
+6 27
+2 54
+2 72
+1 27
cfn=(740)
calls=9 2346 
* 2740
* 9
-5 27
+12 18

fn=(1172) SetTempTablespaces
2650 5
+2 2
+1 2
+10 2
+3 1
+1 2

fn=(3294) PathNameOpenFile
1298 7515
+1 10521
cfn=(3296)
calls=1503 +12 
* 1007080
+1 3006

fn=(3304) FileRead
1836 16
+11 6
cfn=(3306)
calls=2 1215 
* 44
* 2
+1 4
+3 18
+3 6
cfi=(184)
cfn=(3308)
calls=2 1239 
* 32
+1 16
cob=(5)
cfi=(5)
cfn=(3314) pread
calls=1 0 
* 8
cob=(1)
cfi=(1)
cfn=(223)
calls=1 0 
* 769
* 6
* 2
+1 2
cfi=(184)
cfn=(3318)
calls=2 1263 
* 28
+2 4
+28 2
+1 4

fn=(722)
1127 4066
+1 2033
+2 520
cfn=(5564)
calls=520 -25 
* 47320
* 1560
-2 15318
+5 4066

fn=(1374)
2385 2068
+6 1551
+2 3102
+2 4136
+1 1551
cfn=(740)
calls=517 -50 
* 250028
* 517
-5 1551
+12 1034

fn=(2822) InitFileAccess
761 4
+4 2
cob=(3)
cfi=(3)
cfn=(388)
calls=1 0 
* 219
* 1
* 1
+1 3
+5 76
+1 2
+2 1
+3 3
cfi=(67)
cfn=(1578)
calls=1 306 
* 32
+1 4

fl=(193) /home/mithuncy/fsm_code/src/backend/utils/misc/superuser.c
fn=(3462) superuser
48 2
+1 1
cfi=(54)
cfn=(3464) GetUserId
calls=1 381 
* 5
* 2
cfn=(3466) superuser_arg
calls=1 +9 
* 29505
+1 2

fn=(3466)
58 4028
+5 6039
+1 2012
+3 4
+4 4
cfi=(151)
cfn=(3444) SearchSysCache1
calls=1 1114 
* 29290
* 1
+1 2
+2 9
+1 3
cfi=(151)
cfn=(3418)
calls=1 1161 
* 103
* 1
+9 4
+2 4
cfi=(155)
cfn=(2910) CacheRegisterSyscacheCallback
calls=1 1410 
* 65
+3 1
+4 2
+1 2
+2 1
+1 2014

fl=(318) /home/mithuncy/fsm_code/src/backend/commands/portalcmds.c
fn=(5610) PortalCleanup
266 4
+14 3
+1 2
+26 2

fl=(129) /home/mithuncy/fsm_code/src/backend/storage/ipc/dsm.c
fn=(2714) reset_on_dsm_detach
1016 3
+3 14
+21 2

fn=(2336) dsm_postmaster_startup
146 4
+1 1
+12 3
+5 3
-1 1
+2 4
cfi=(57)
cfn=(2084)
calls=1 1286 
* 68
* 6
cfi=(57)
cfn=(2086)
calls=1 1336 
* 96
+2 3
cfn=(2338) dsm_control_bytes_needed
calls=1 1101 
* 11
* 1
+12 1
cob=(1)
cfi=(1)
cfn=(223)
calls=1 0 
* 1303
* 5
* 1
+1 3
+2 10
cfi=(130) /home/mithuncy/fsm_code/src/backend/storage/ipc/dsm_impl.c
cfn=(2346) dsm_impl_op
calls=1 -21 
* 11615
* 2
+3 1
+2 2
+1 4
cfi=(67)
cfn=(2110) on_shmem_exit
calls=1 362 
* 32
+1 4
cfi=(57)
cfn=(2084)
calls=1 1286 
* 68
* 8
cfi=(57)
cfn=(2086)
calls=1 1336 
* 96
+3 3
+3 2
+1 2
+1 3
+1 2

fn=(2338)
1101 3
+2 5
-1 1
+2 2

fn=(5756) dsm_backend_shutdown
621 6
+1 6
cfi=(321) /home/mithuncy/fsm_code/src/backend/storage/ipc/../../../../src/include/lib/ilist.h
cfn=(5758) dlist_is_empty
calls=2 290 
* 34
* 6
+7 4

fl=(150) /home/mithuncy/fsm_code/src/backend/utils/cache/relmapper.c
fn=(5550) AtCCI_RelationMap
440 1000
+1 1500
+7 1500
+7 1000

fn=(2892) RelationMapInitialize
585 2
+2 1
+1 1
+1 1
+1 1
+1 1
+1 1
+1 1
+1 1
+1 2

fn=(2934) RelationMapOidToFilenode
160 195
+5 78
+2 21
+1 126
+5 21
+1 42
+2 3294
+1 105
-3 2724
+8 18
+1 108
+5 18
+1 36
+2 780
+1 90
-3 632
+8 78

fn=(3500) RelationMapInitializePhase3
626 2
+4 3
+6 2
cfn=(2920) load_relmap_file
calls=1 +63 
* 1682
+1 2

fn=(2918) RelationMapInitializePhase2
605 2
+4 3
+6 2
cfn=(2920)
calls=1 +84 
* 1571
+1 2

fn=(2920)
699 12
+7 4
+2 7
cfi=(17)
cfn=(462)
calls=1 203 
* 360
+2 2
+4 9
cfi=(17)
cfn=(462)
calls=1 203 
* 470
+2 1
+4 4
cfi=(25)
cfn=(2328)
calls=1 2236 
* 122
* 4
cfi=(25)
cfn=(2328)
calls=1 2236 
* 122
* 2
+1 4
+13 4
cfi=(157) /home/mithuncy/fsm_code/src/backend/utils/cache/../../../../src/include/pgstat.h
cfn=(2922) pgstat_report_wait_start
calls=2 1239 
* 32
+1 12
cob=(5)
cfi=(5)
cfn=(684) read
calls=2 0 
* 14
* 2
* 2
+1 4
+12 2
cfi=(157)
cfn=(2924) pgstat_report_wait_end
calls=2 1263 
* 28
+2 6
cfi=(25)
cfn=(2332)
calls=2 2413 
* 148
+3 8
+1 4
-1 4
+2 4
-1 4
+7 2
+1 12
cfi=(71) /home/mithuncy/fsm_code/src/port/pg_crc32c_sse42.c
cfn=(1608) pg_comp_crc32c_sse42
calls=2 23 
* 1818
* 2
+1 2
+2 8
+4 8

fn=(3642) AtEOXact_RelationMap
477 14
+1 12
+13 6
+5 8
+17 4

fl=(223) /home/mithuncy/fsm_code/src/backend/tcop/../../../src/include/nodes/pg_list.h
fn=(3940) list_length
90 3
+1 5
+1 2
-2 1512
+1 2520
+1 1008

fn=(3942) list_head
78 1515
+1 2525
+1 1010
-2 1515
+1 2525
+1 1010

fl=(250) /home/mithuncy/fsm_code/src/backend/nodes/nodeFuncs.c
fn=(4496) exprCollation
721 44
+3 22
+3 88
+6 18
+1 6
+2 9
+1 3
+14 3
+1 1
+5 3
+1 1
915 11
+1 22

fn=(4530) range_table_walker
2310 42
+3 18
cfi=(47)
cfn=(976)
calls=6 78 
* 48
* 24
+46 6
+1 12

fn=(4484) query_tree_walker
2266 70
+3 80
cfi=(262)
cfn=(4641) max_parallel_hazard_walker'2
calls=3 1167 
* 2866
cfi=(254)
cfn=(4525) extract_query_dependencies_walker'2
calls=3 2670 
* 1924
cfi=(251)
cfn=(4486) assign_query_collations_walker
calls=4 127 
* 5107
* 20
+2 80
cfi=(262)
cfn=(4641)
calls=3 1167 
* 42
cfi=(254)
cfn=(4525)
calls=3 2670 
* 42
cfi=(251)
cfn=(4486)
calls=4 127 
* 44
* 20
+2 80
cfi=(262)
cfn=(4641)
calls=3 1167 
* 42
cfi=(254)
cfn=(4525)
calls=3 2670 
* 42
cfi=(251)
cfn=(4486)
calls=4 127 
* 44
* 20
+2 80
cfi=(262)
cfn=(4641)
calls=3 1167 
* 42
cfi=(254)
cfn=(4525)
calls=3 2670 
* 42
cfi=(251)
cfn=(4486)
calls=4 127 
* 44
* 20
+2 80
cfi=(262)
cfn=(4641)
calls=3 1167 
* 507
cfi=(254)
cfn=(4525)
calls=3 2670 
* 510
cfi=(251)
cfn=(4486)
calls=4 127 
* 740
* 20
+2 80
cfi=(262)
cfn=(4641)
calls=3 1167 
* 42
cfi=(254)
cfn=(4525)
calls=3 2670 
* 42
cfi=(251)
cfn=(4486)
calls=4 127 
* 44
* 20
+2 80
cfi=(262)
cfn=(4641)
calls=3 1167 
* 42
cfi=(254)
cfn=(4525)
calls=3 2670 
* 42
cfi=(251)
cfn=(4486)
calls=4 127 
* 44
* 20
+2 80
cfi=(262)
cfn=(4641)
calls=3 1167 
* 42
cfi=(254)
cfn=(4525)
calls=3 2670 
* 42
cfi=(251)
cfn=(4486)
calls=4 127 
* 44
* 20
+2 80
cfi=(262)
cfn=(4641)
calls=3 1167 
* 42
cfi=(254)
cfn=(4525)
calls=3 2670 
* 42
cfi=(251)
cfn=(4486)
calls=4 127 
* 44
* 20
+2 40
+2 48
cfi=(262)
cfn=(4641)
calls=3 1167 
* 42
cfi=(254)
cfn=(4525)
calls=3 2670 
* 42
* 12
+3 40
+2 42
cfn=(4530)
calls=6 +16 
* 150
* 12
+3 10
+1 20

fn=(5032) exprSetInputCollation
1129 16
+1 32
+9 3
+1 1
+2 6
+1 2
+14 1
+2 8

fn=(5110) leftmostLoc
1568 4
+1 2
+2 2
+3 3
+1 2

fn=(4576) exprTypmod
277 40
+1 20
+3 80
+5 18
+11 20
cfn=(5044) exprIsLengthCoercion
calls=4 514 
* 116
* 8
+3 4
498 4
+1 20

fn=(5044)
514 20
+1 8
+1 8
+6 24
+2 8
+7 16
+1 8
-1 8
+2 8
+44 8

fn=(4494) expression_tree_walker
1843 174
+11 58
+4 29
cfi=(52)
cfn=(4006)
calls=29 3263 
* 783
+2 232
+79 4
+2 14
cfn=(4495) expression_tree_walker'2
calls=2 -98 
* 3939
* 4
+4 2
+7 4
+2 14
cfn=(4495)
calls=2 1843 
* 49379
* 4
+4 2
2093 32
cfi=(251)
cfn=(4493) assign_collations_walker'2
calls=4 256 
* 4207
* 4
+30 30
cfi=(47)
cfn=(976)
calls=10 78 
* 100
* 20
+2 88
cfi=(262)
cfn=(5141) contain_context_dependent_node_walker'2
calls=2 1476 
* 148
cfi=(254)
cfn=(4771) fix_scan_expr_walker'2
calls=3 1592 
* 1529
cfi=(262)
cfn=(4641)
calls=3 1167 
* 2413
cfi=(254)
cfn=(4525)
calls=3 2670 
* 3373
* 22
-2 75
+5 10
+3 14
+2 56
cfi=(262)
cfn=(4641)
calls=3 1167 
* 42
cfi=(251)
cfn=(4493)
calls=4 256 
* 72
* 14
+2 56
cfi=(262)
cfn=(4641)
calls=3 1167 
* 42
cfi=(251)
cfn=(4493)
calls=4 256 
* 72
* 14
+3 7
+27 4
+78 4
+1 8
-1 21
+1 50

fn=(4495)
1843 438
+11 146
+4 73
cfi=(52)
cfn=(4006)
calls=73 3263 
* 1971
+2 584
+79 8
+2 28
cfn=(4495)
calls=4 -98 
* 3987
* 8
+4 4
+7 14
+2 49
cfn=(4495)
calls=7 1843 
* 5451
* 14
+4 7
+63 48
cfi=(281) /home/mithuncy/fsm_code/src/backend/executor/execExpr.c
cfn=(4809) get_last_attnums_walker'2
calls=1 2325 
* 78
cfi=(254)
cfn=(4771)
calls=1 1592 
* 114
cfi=(274)
cfn=(4713) cost_qual_eval_walker'2
calls=1 3762 
* 146
cfi=(262)
cfn=(5133) contain_nonstrict_functions_walker'2
calls=1 1342 
* 168
cfi=(262)
cfn=(5121) contain_volatile_functions_walker'2
calls=1 971 
* 92
cfi=(251)
cfn=(4493)
calls=1 256 
* 137
* 6
+72 72
cfi=(254)
cfn=(4771)
calls=3 1592 
* 1166
cfi=(262)
cfn=(4641)
calls=3 1167 
* 2035
cfi=(254)
cfn=(4525)
calls=3 2670 
* 1087
* 9
+30 54
cfi=(47)
cfn=(976)
calls=18 78 
* 180
* 36
+2 264
cfi=(281)
cfn=(4809)
calls=4 2325 
* 744
cfi=(254)
cfn=(4771)
calls=4 1592 
* 1065
cfi=(274)
cfn=(4713)
calls=4 3762 
* 5665
cfi=(262)
cfn=(5133)
calls=2 1342 
* 2553
cfi=(262)
cfn=(5121)
calls=2 971 
* 46636
cfi=(262)
cfn=(4641)
calls=4 1167 
* 1248
cfi=(251)
cfn=(4493)
calls=6 256 
* 2561
cfi=(254)
cfn=(4525)
calls=7 2670 
* 2327
* 66
-2 201
+5 18
+3 6
+2 24
cfi=(254)
cfn=(4525)
calls=3 2670 
* 42
* 6
+2 24
cfi=(254)
cfn=(4525)
calls=3 2670 
* 42
* 6
+3 3
+27 26
+78 26
+1 52
-1 32
+1 94

fn=(4666) expression_tree_mutator
2429 18
+18 6
+4 3
cfi=(52)
cfn=(4006)
calls=3 3263 
* 81
+2 24
2916 3
+1 9
cfi=(47)
cfn=(976)
calls=3 78 
* 30
* 6
+3 24
cfi=(262)
cfn=(4665) eval_const_expressions_mutator'2
calls=3 2573 
* 227818
* 3
-1 12
cfi=(45)
cfn=(960)
calls=3 129 
* 839
* 3
-2 21
+6 6
3076 6

fn=(4667) expression_tree_mutator'2
2429 90
+18 30
+4 15
cfi=(52)
cfn=(4006)
calls=15 3263 
* 405
+2 120
+18 10
+3 10
cfi=(13)
cfn=(940)
calls=5 925 
* 615
* 35
cob=(3)
cfi=(3)
cfn=(856)
calls=5 0 
* 100
* 5
+2 10
2587 2
+3 2
cfi=(13)
cfn=(940)
calls=1 925 
* 92
* 7
cob=(3)
cfi=(3)
cfn=(856)
calls=1 0 
* 22
* 1
+1 8
cfi=(262)
cfn=(5145) substitute_actual_parameters_mutator'2
calls=1 4969 
* 932
* 2
+1 2
2709 2
+3 2
cfi=(13)
cfn=(940)
calls=1 925 
* 123
* 7
cob=(3)
cfi=(3)
cfn=(856)
calls=1 0 
* 18
* 1
+1 8
cfi=(262)
cfn=(5145)
calls=1 4969 
* 76
* 2
+1 2
2867 6
+3 6
cfi=(13)
cfn=(940)
calls=3 925 
* 369
* 21
cob=(3)
cfi=(3)
cfn=(856)
calls=3 0 
* 66
* 3
+1 24
cfi=(262)
cfn=(4665)
calls=3 2573 
* 227083
* 6
+1 6
+44 5
+1 15
cfi=(47)
cfn=(976)
calls=5 78 
* 50
* 10
+3 72
cfi=(262)
cfn=(5145)
calls=2 4969 
* 388
cfi=(262)
cfn=(4665)
calls=7 2573 
* 229002
* 9
-1 36
cfi=(45)
cfn=(960)
calls=9 129 
* 2040
* 9
-2 55
+6 10
3076 30

fn=(4498) exprLocation
1193 40
+3 16
+2 64
+12 12
+1 4
+2 9
+1 3
+95 2
+4 2
-1 2
cfn=(4499) exprLocation'2
calls=1 1193 
* 24
* 6
cfn=(5110)
calls=1 1568 
* 13
* 1
+3 1
1558 8
+1 32

fn=(4499)
1193 5
+3 2
+2 8
+15 3
+1 1
1558 1
+1 4

fn=(5030) exprSetCollation
974 20
+1 32
+24 3
+1 1
+5 6
+1 2
+49 3
+1 1
+61 8

fn=(5042) set_opfuncid
1620 32
+1 32
+2 16

fn=(4478) exprType
43 2660
+3 1064
+3 4256
+6 30
+1 10
+2 27
+1 9
+22 15
+1 5
+5 1518
+1 506
188 6
+1 2
+78 532
+1 2128

fn=(4642) check_functions_in_node
1659 162
+1 153
+20 2
+2 7
cfi=(262)
cfn=(5046) max_parallel_hazard_checker
calls=1 1160 
* 499
* 2
+3 1
+5 6
+3 9
cfn=(5042)
calls=3 -73 
* 30
+1 21
cfi=(262)
cfn=(5134) contain_nonstrict_functions_checker
calls=1 1336 
* 487
cfi=(262)
cfn=(5122) contain_volatile_functions_checker
calls=1 965 
* 483
cfi=(262)
cfn=(5046)
calls=1 1160 
* 499
* 6
+3 3
+12 4
+6 14
cfi=(275)
cfn=(5126) getTypeInputInfo
calls=2 2609 
* 1022
+2 12
cfi=(262)
cfn=(5134)
calls=1 1336 
* 487
cfi=(262)
cfn=(5122)
calls=1 965 
* 22675
* 4
+3 8
cfn=(4478)
calls=2 43 
* 48
* 10
cfi=(275)
cfn=(5128)
calls=2 2642 
* 992
+2 12
cfi=(262)
cfn=(5134)
calls=1 1336 
* 487
cfi=(262)
cfn=(5122)
calls=1 965 
* 22610
* 4
+3 2
+16 21
+2 21
+1 42
-1 6
+1 12

fl=(65) /home/mithuncy/fsm_code/src/common/file_perm.c
fn=(1524) SetDataDirectoryCreatePerm
35 3
+2 4
+9 1
+1 1
+1 1
+2 2

fl=(310) /home/mithuncy/fsm_code/src/backend/executor/execIndexing.c
fn=(5520) ExecCloseIndices
225 2000
+5 1500
+1 1500
+2 2500
+13 1000

fn=(5312) ExecOpenIndices
150 3000
+1 1500
+8 1000
+3 3000
+1 500
+52 1000

fl=(260) /home/mithuncy/fsm_code/src/backend/executor/execTuples.c
fn=(4570) ExecCleanTypeFromTL
1801 12
+1 12
cfn=(4572) ExecTypeFromTLInternal
calls=3 +5 
* 3052
+1 6

fn=(5514) tts_heap_release
296 3000
+1 2000

fn=(5372) ExecStoreHeapTuple
1275 612500
+8 612500
+2 525000
cfn=(5374) tts_heap_store_tuple
calls=87500 426 
* 4812500
+2 87500
+1 175000

fn=(5316) ExecInitExtraTupleSlot
1683 6000
+1 7000
cfn=(5318) ExecAllocTableSlot
calls=1000 1093 
* 534303
+1 2000

fn=(5320) MakeTupleTableSlot
1036 5000
+3 3000
+6 2000
+1 2000
+1 3000
-1 500
+2 2500
-2 1500
+4 1000
+2 1500
cfi=(13)
cfn=(2546)
calls=500 -96 
* 85000
* 1500
cfi=(13)
cfn=(2546)
calls=500 -96 
* 92000
* 1000
+2 4000
+1 2000
+1 6000
+1 2000
+1 3000
+1 1500
+1 1500
+1 1000
+2 1000
-4 1500
+1 1500
+1 1000
+2 1000
+4 1000
-2 3000
+5 1000
+1 4500
-3 2000
+5 3500
cfi=(158) /home/mithuncy/fsm_code/src/backend/access/common/tupdesc.c
cfn=(5322) IncrTupleDescRefCount
calls=500 373 
* 42803
+6 6000
cfn=(5328) tts_heap_init
calls=1000 291 
* 5000
+2 1000
+1 2000

fn=(5510) ExecResetTupleTable
1113 3000
+3 1500
cfi=(245) /home/mithuncy/fsm_code/src/backend/executor/../../../src/include/nodes/pg_list.h
cfn=(4416) list_head
calls=500 78 
* 5000
* 1000
+2 3000
+3 3000
cfi=(317) /home/mithuncy/fsm_code/src/backend/executor/../../../src/include/executor/tuptable.h
cfn=(5512) ExecClearTuple
calls=1000 405 
* 39000
+1 6000
cfn=(5514)
calls=1000 296 
* 5000
+1 4000
+2 4500
cfi=(158)
cfn=(5516) DecrTupleDescRefCount
calls=500 391 
* 45000
+1 1000
+4 2000
-14 6000
+28 1000
+2 1000

fn=(5318)
1093 6000
+1 5000
cfn=(5320)
calls=1000 -58 
* 300303
* 1000
+2 6000
cfi=(45)
cfn=(960)
calls=1000 129 
* 211000
* 2000
+2 1000
+1 2000

fn=(5374)
426 612500
+1 175000
+2 262500
cfn=(5376) tts_heap_clear
calls=87500 301 
* 2275000
+2 175000
+1 262500
+1 175000
+1 525000
+2 175000
+2 175000

fn=(5376)
301 354000
+1 177000
+3 531000
+6 177000
+1 531000
+1 177000
+1 177000
+1 177000

fn=(4572)
1807 21
+4 3
+2 6
+1 9
cfi=(243) /home/mithuncy/fsm_code/src/backend/executor/execUtils.c
cfn=(4574) ExecCleanTargetListLength
calls=3 1091 
* 117
* 6
+3 9
cfi=(158)
cfn=(2928) CreateTemplateTupleDesc
calls=3 46 
* 453
* 3
+2 9
cfi=(245)
cfn=(4416)
calls=3 78 
* 30
* 6
+2 9
+2 18
+6 6
-4 6
cfi=(250)
cfn=(4576)
calls=3 277 
* 92
* 3
+3 6
-3 6
cfi=(250)
cfn=(4478)
calls=3 43 
* 72
* 3
+2 6
-2 21
cfi=(158)
cfn=(4578) TupleDescInitEntry
calls=3 602 
* 1940
+8 6
-2 6
cfi=(250)
cfn=(4496)
calls=3 721 
* 63
* 21
cfi=(158)
cfn=(4580) TupleDescInitEntryCollation
calls=3 763 
* 57
+3 3
-15 21
+18 3
+1 12

fn=(5328)
291 3000
+1 2000

fl=(187) /home/mithuncy/fsm_code/src/backend/utils/adt/name.c
fn=(3344) btnamecmp
205 45000
+1 33750
+1 33750
+2 78750
cfn=(3346) namecmp
calls=11250 -53 
* 587035
* 11250
+1 22500

fn=(3346)
156 90000
+2 22500
+1 67500
cob=(3)
cfi=(3)
cfn=(1044)
calls=11250 0 
* 328285
* 11250
* 11250
+6 56250

fn=(3354) nameeq
136 6116
+1 4587
+1 4587
+3 9174
cob=(3)
cfi=(3)
cfn=(1044)
calls=1529 0 
* 45174
* 1529
* 5610
+1 3058

fn=(4544) namestrcpy
253 2540
+1 2032
+2 5588
cob=(3)
cfi=(3)
cfn=(950)
calls=508 0 
* 35249
* 508
* 2540
+1 508
+1 1016

fl=(210) /home/mithuncy/fsm_code/src/backend/tcop/../../../src/include/libpq/pqformat.h
fn=(3798) pq_writeint8
48 10
+1 4
+3 16
+1 12
+1 4

fn=(3754) pq_writeint32
76 8
+1 6
+3 16
+1 12
+1 4

fn=(3794) pq_sendbyte
162 12
+1 10
cfn=(3796) pq_sendint8
calls=2 -33 
* 150
+1 4

fn=(3796)
130 12
+1 8
cfi=(80)
cfn=(1922)
calls=2 271 
* 70
+1 10
cfn=(3798)
calls=2 -84 
* 46
+1 4

fn=(3752) pq_sendint32
146 10
+1 8
cfi=(80)
cfn=(1922)
calls=2 271 
* 70
+1 10
cfn=(3754)
calls=2 -72 
* 46
+1 4

fl=(224) /home/mithuncy/fsm_code/src/backend/tcop/utility.c
fn=(3978) UtilityReturnsTuples
1747 2004
+1 5511
+41 501
+2 1002

fn=(5276) PreventCommandIfParallelMode
258 2500
+1 500
cfi=(26)
cfn=(1210)
calls=500 910 
* 4000
* 1000
+6 2000

fn=(4002) standard_ProcessUtility
384 10
+1 3
+1 3
+1 3
cfi=(26)
cfn=(4004) IsTransactionBlock
calls=1 4446 
* 16
* 5
+4 1
cfi=(52)
cfn=(4006)
calls=1 3263 
* 27
+2 3
cfn=(4010) check_xact_readonly
calls=1 135 
* 23
+2 2
+1 2
+2 2
cfi=(226)
cfn=(3954)
calls=1 45 
* 346
* 1
+1 3
+2 8
523 5
cfi=(229) /home/mithuncy/fsm_code/src/backend/commands/functioncmds.c
cfn=(4012) ExecuteDoStmt
calls=1 2093 
* 376455871
+1 1
929 3
cfi=(226)
cfn=(3962)
calls=1 78 
* 106
+1 4

fn=(4003) standard_ProcessUtility'2
384 5000
+1 1500
+1 1500
+1 4000
+4 500
cfi=(52)
cfn=(4006)
calls=500 3263 
* 13500
+2 1500
cfn=(4010)
calls=500 135 
* 11500
+2 1000
+1 1000
+2 1000
cfi=(226)
cfn=(3954)
calls=500 45 
* 157500
* 500
+1 1500
+2 4000
551 5000
cfi=(300) /home/mithuncy/fsm_code/src/backend/commands/copy.c
cfn=(5216) DoCopy
calls=500 796 
* 356683621
+3 1000
+1 3500
cfi=(17)
cfn=(462)
calls=500 203 
* 295500
+3 500
929 1500
cfi=(226)
cfn=(3962)
calls=500 78 
* 53000
+1 2000

fn=(4010)
135 2004
+2 2505
cfi=(26)
cfn=(1210)
calls=501 910 
* 4008
* 1503
+1 501
+92 1002

fn=(3944) CreateCommandTag
2083 2016
+3 4032
+21 3
+1 3
2382 500
+1 500
2529 1
+1 1
2928 504
+1 1008

fn=(4000) ProcessUtility
345 9
+10 3
+5 10
cfn=(4002)
calls=1 +24 
* 376456448
+3 2

fn=(4001) ProcessUtility'2
345 4500
+10 1500
+5 5000
cfn=(4003)
calls=500 +24 
* 357251121
+3 1000

fl=(127) /home/mithuncy/fsm_code/src/backend/storage/lmgr/../../../../src/include/lib/ilist.h
fn=(2252) dlist_init
279 348
+1 812
+1 232

fl=(145) /home/mithuncy/fsm_code/src/backend/storage/lmgr/../../../../src/include/utils/palloc.h
fn=(2864) MemoryContextSwitchTo
110 6
+1 4
+2 4
+1 2
+1 4

fl=(184)
fn=(3318)
1263 3004
+1 3004
+2 9012
+7 3004
+1 3004

fn=(3308)
1239 4506
+1 3004
+2 9012
+7 4506
+1 3004

fl=(139)
fn=(3804)
252 21
+5 6
cfi=(52)
cfn=(3806) ProcessClientWriteInterrupt
calls=3 577 
* 72
+3 3
+9 18
cfn=(3808) secure_raw_write
calls=3 +47 
* 90
* 3
+1 3
+3 6
+36 6
cfi=(52)
cfn=(3806)
calls=3 577 
* 72
+2 3
+1 12

fn=(3808)
316 18
+6 21
cob=(5)
cfi=(5)
cfn=(2502) send
calls=3 0 
* 36
* 3
* 3
+5 3
+1 6

fn=(5804)
135 3
+5 2

fn=(2792)
147 21
+5 6
cfi=(52)
cfn=(2794) ProcessClientReadInterrupt
calls=3 531 
* 93
+12 36
cfn=(2796) secure_raw_read
calls=6 +64 
* 196
* 6
+1 6
+4 36
cob=(5)
cfi=(5)
cfn=(472)
calls=4 0 
* 12
* 4
* 12
+6 24
cfi=(122)
cfn=(2848) ModifyWaitEvent
calls=4 767 
* 184
+2 28
cfi=(122)
cfn=(3816) WaitEventSetWait
calls=4 954 
* 2086
+20 16
+6 16
+2 9
cfi=(122)
cfn=(3822) ResetLatch
calls=3 520 
* 24
+1 6
cfi=(52)
cfn=(2794)
calls=3 531 
* 85372
+8 6
+7 4
cfi=(52)
cfn=(2794)
calls=2 531 
* 60
+2 2
+1 8

fn=(2796)
228 36
+10 42
cob=(5)
cfi=(5)
cfn=(2516) recv
calls=6 0 
* 88
* 6
* 6
+5 6
+1 12

fl=(277)
fn=(4754) make_result
6514 18
+1 12
cfi=(13)
cfn=(2950)
calls=3 853 
* 690
* 15
+1 6
+2 9
+1 6
+1 9
+1 6
+1 9
+2 3
+1 6

fn=(4748) create_result_plan
1269 15
+5 15
cfn=(4750) build_path_tlist
calls=3 744 
* 93
* 3
+3 18
cfn=(4752) order_qual_clauses
calls=3 4899 
* 69
* 3
+2 18
cfn=(4754)
calls=3 6514 
* 789
* 3
+2 15
cfn=(4756) copy_generic_path_info
calls=3 4993 
* 93
+2 3
+1 6

fn=(4746) use_physical_tlist
784 18
+1 9
+7 12
+1 6
894 6

fn=(4752)
4899 15
+7 9
cfi=(255)
cfn=(4672)
calls=3 90 
* 24
* 3
+7 6
+1 6
+70 6

fn=(4756)
4993 12
+1 12
+1 12
+1 12
+1 15
+1 12
+1 12
+1 6

fn=(4722) is_projection_capable_path
6698 18
+2 30
+32 6
+2 6
+1 12

fn=(4740)
307 15
+7 6
+1 6
+3 18
cfn=(4742) create_plan_recurse
calls=3 +40 
* 3513
* 3
+9 12
+1 21
cfi=(269)
cfn=(4758) apply_tlist_labeling
calls=3 +12 
* 222
+9 15
cfi=(280)
cfn=(4760) SS_attach_initplans
calls=3 2228 
* 30
+3 12
+7 6
+2 3
+1 6

fn=(4742)
358 18
+4 3
cfi=(52)
cfn=(4006)
calls=3 3263 
* 81
+2 24
+34 12
+2 18
cfn=(4744) create_projection_plan
calls=3 1636 
* 3339
* 6
+15 3
+87 3
+1 6

fn=(4743) create_plan_recurse'2
358 18
+4 3
cfi=(52)
cfn=(4006)
calls=3 3263 
* 81
+2 24
+34 12
+6 12
+8 15
cfn=(4748)
calls=3 1269 
* 1143
* 3
+3 3
+87 3
+1 6

fn=(4744)
1636 18
+4 3
+15 18
cfn=(4746)
calls=3 784 
* 51
* 6
+13 12
cfn=(4722)
calls=3 6698 
* 36
* 6
+8 21
cfn=(4743)
calls=3 358 
* 1323
* 3
+2 15
cfn=(4750)
calls=3 744 
* 1719
* 6
+21 12
+3 6
+1 9
+3 12
+1 12
+1 12
+1 15
+1 15
+11 3
+1 6

fn=(4750)
744 30
+1 6
+1 24
+1 6
+3 30
cfi=(255)
cfn=(4528)
calls=6 78 
* 54
* 12
+2 9
+9 12
+3 21
cfi=(221)
cfn=(4458) makeTargetEntry
calls=3 241 
* 636
* 3
+4 6
+1 27
+2 15
cfi=(45)
cfn=(960)
calls=3 129 
* 870
* 3
+1 3
-22 27
+24 6
+1 12

fl=(166) /home/mithuncy/fsm_code/src/backend/storage/ipc/sinval.c
fn=(2990) ReceiveSharedInvalidMessages
74 30625
+12 30625
+12 18468
+3 18468
cfi=(101) /home/mithuncy/fsm_code/src/backend/storage/ipc/sinvaladt.c
cfn=(2992) SIGetDataEntries
calls=6156 540 
* 201573
* 6156
+2 12312
+10 6156
+1 12312
+2 6156
+2 10220
+2 3066
+1 4088
cfi=(155)
cfn=(3852) LocalExecuteInvalidationMessage
calls=1022 555 
* 316689
-5 28712
+12 18468
+10 18375
+6 12250

fl=(268)
fn=(4680) build_empty_join_rel
1121 12
+6 12
cfi=(13)
cfn=(2950)
calls=3 853 
* 1404
* 15
+1 6
+1 6
+1 9
+1 6
+1 3
cfi=(269)
cfn=(4682) create_empty_pathtarget
calls=3 672 
* 561
* 6
+2 18
cfi=(45)
cfn=(960)
calls=3 129 
* 870
* 6
+2 3
+1 6

fn=(4726)
1155 54
+12 54
cfi=(271) /home/mithuncy/fsm_code/src/backend/optimizer/util/../../../../src/include/nodes/pg_list.h
cfn=(4690) list_head
calls=9 78 
* 84
* 18
+2 18
+2 36
cfi=(279) /home/mithuncy/fsm_code/src/backend/nodes/bitmapset.c
cfn=(4734) bms_equal
calls=6 154 
* 78
* 12
+1 12
-5 18
+8 12
cfi=(13)
cfn=(2950)
calls=3 853 
* 1404
* 15
+1 6
+1 9
cfi=(279)
cfn=(4728) bms_copy
calls=3 134 
* 30
* 6
+3 21
+1 6
+1 6
+1 3
cfi=(269)
cfn=(4682)
calls=3 672 
* 561
* 6
+1 6
+1 6
+1 6
+1 6
+1 6
+2 24
cfi=(45)
cfn=(960)
calls=3 129 
* 870
* 12
+2 3
+1 18

fl=(293) /home/mithuncy/fsm_code/src/backend/executor/functions.c
fn=(5088) sql_fn_make_param
422 12
+3 8
cfi=(13)
cfn=(2156) MemoryContextAllocZero
calls=2 815 
* 273
* 10
+1 4
+1 6
+1 20
+1 4
+1 8
cfi=(275)
cfn=(5028) get_typcollation
calls=2 2791 
* 948
* 4
+1 6
+7 16
+1 4
+2 1
+1 2
-1 1
+1 2

fn=(5112) check_sql_fn_retval
1589 10
+11 2
+1 2
+1 2
+7 2
+8 1
+1 3
cfi=(245)
cfn=(4416)
calls=1 78 
* 10
* 2
+2 3
+2 4
+1 2
-5 7
+19 2
+1 2
-1 2
+3 3
+1 4
+30 3
cfi=(243)
cfn=(4574)
calls=1 1091 
* 39
* 1
+2 3
cfi=(275)
cfn=(5114) get_typtype
calls=1 2375 
* 474
* 1
+2 2
+12 2
+8 3
cfi=(245)
cfn=(4416)
calls=1 78 
* 10
* 2
+3 4
cfi=(250)
cfn=(4478)
calls=1 43 
* 24
* 1
+1 5
cfi=(289)
cfn=(5116)
calls=1 2136 
* 12
* 3
+7 5
+13 2
-40 1
1959 1
+1 5

fn=(5066) prepare_sql_fn_parse_info
187 7
+2 8
+3 2
cfi=(13)
cfn=(2546)
calls=1 956 
* 180
* 1
+3 4
cfi=(13)
cfn=(928)
calls=1 1162 
* 193
* 2
+3 3
+6 7
+1 2
+5 5
cfi=(13)
cfn=(940)
calls=1 925 
* 110
* 1
+1 3
+1 2
-1 4
cob=(3)
cfi=(3)
cfn=(856)
calls=1 0 
* 12
* 1
+4 2
+2 14
+2 16
+2 5
cfi=(161)
cfn=(5068) get_call_expr_argtype
calls=1 2015 
* 98
* 1
+1 2
+5 7
-12 11
+16 3
+6 2
+7 7
cfi=(151)
cfn=(4026) SysCacheGetAttr
calls=1 1376 
* 65
* 1
+3 3
+1 1
+2 7
cfi=(151)
cfn=(4026)
calls=1 1376 
* 65
* 1
+3 3
+1 1
+2 7
cfi=(295) /home/mithuncy/fsm_code/src/backend/utils/fmgr/funcapi.c
cfn=(5076) get_func_input_arg_names
calls=1 974 
* 14
* 1
+4 3
+1 3
+5 1
+1 4

fn=(5082) sql_fn_parser_setup
274 4
+1 2
+1 2
+1 2
+2 3
+1 2

fn=(5086) sql_fn_param_ref
405 10
+1 6
+1 6
+3 12
+3 14
cfn=(5088)
calls=2 +9 
* 1329
+1 4

fl=(67)
fn=(1578)
306 30
+1 15
+5 30
+1 30
+2 15
+2 20
+2 2
cfi=(9)
cfn=(1580) atexit
calls=1 0 
* 1444
+1 1
+2 20

fn=(2956) before_shmem_exit
334 6
+1 3
+5 6
+1 6
+2 3
+2 4
+5 4

fn=(5742) proc_exit
105 4
+2 3
cfn=(5744) proc_exit_prepare
calls=1 +55 
* 56508
+43 4
cfi=(57)
cfn=(2084)
calls=1 1286 
* 68
* 6
cfi=(57)
cfn=(2086)
calls=1 1336 
* 109
+2 3
cob=(1)
cfi=(1)
cfn=(223)
calls=1 0 
* 13412
* 5

fn=(5814)
291 2
+3 2
cfn=(5744)
calls=1 162 
* 645
+1 2

fn=(2110)
362 66
+1 33
+5 66
+1 66
+2 33
+2 44
+5 44

fn=(2712) on_exit_reset
410 2
+1 1
+1 1
+1 1
+1 1
cfi=(129)
cfn=(2714)
calls=1 1016 
* 19
+1 2

fn=(5746) shmem_exit
225 8
+1 2
+10 8
cfi=(57)
cfn=(2084)
calls=2 1286 
* 136
* 16
cfi=(57)
cfn=(2086)
calls=2 1336 
* 218
+2 2
+1 14
cfi=(75)
cfn=(5748) ShutdownPostgres
calls=1 1187 
* 9033
-1 18
+3 2
+18 2
cfi=(129)
cfn=(5756)
calls=2 621 
* 56
+10 8
cfi=(57)
cfn=(2084)
calls=2 1286 
* 136
* 16
cfi=(57)
cfn=(2086)
calls=2 1336 
* 218
+2 2
+1 84
cfi=(84)
cfn=(5778) ProcKill
calls=1 800 
* 736
cfi=(84)
cfn=(5774) RemoveProcFromArray
calls=1 789 
* 324
cfi=(101)
cfn=(5772) CleanupInvalidationState
calls=1 +65 
* 329
cfi=(103) /home/mithuncy/fsm_code/src/backend/storage/ipc/procsignal.c
cfn=(5770) CleanupProcSignalState
calls=1 139 
* 29
cfi=(50)
cfn=(5762) AtProcExit_Buffers
calls=1 2478 
* 47
cfi=(38)
cfn=(5760) pgstat_beshutdown_hook
calls=1 2953 
* 51
-1 48
+3 2
+2 2
+1 4

fn=(5744)
162 8
+5 2
+7 2
+1 2
+1 2
+1 2
+1 2
+11 2
+2 2
+3 6
cfn=(5746)
calls=2 +31 
* 11551
+2 8
cfi=(57)
cfn=(2084)
calls=2 1286 
* 136
* 16
cfi=(57)
cfn=(2086)
calls=2 1336 
* 218
+12 2
+1 42
cfi=(58)
cfn=(5802)
calls=1 +48 
* 20
cfi=(25)
cfn=(5800)
calls=1 2776 
* 45068
cfi=(140) /home/mithuncy/fsm_code/src/backend/storage/smgr/smgr.c
cfn=(5798) smgrshutdown
calls=1 -73 
* 26
-1 30
+4 2
+1 4

fl=(133)
fn=(2538) pg_isblank
161 5680
+1 9104
+1 1712
-1 564
+1 1128

fn=(2540) make_hba_token
289 480
+4 240
cob=(3)
cfi=(3)
cfn=(424)
calls=80 0 
* 1224
* 80
* 80
+2 400
cfi=(13)
cfn=(940)
calls=80 925 
* 9778
* 80
+1 320
+1 240
+1 720
cob=(3)
cfi=(3)
cfn=(856)
calls=80 0 
* 1040
* 80
+2 80
+1 160

fn=(3424) check_db
611 7
+4 3
cfi=(135) /home/mithuncy/fsm_code/src/backend/libpq/../../../src/include/nodes/pg_list.h
cfn=(2542) list_head
calls=1 78 
* 10
* 2
+2 3
+1 3
+9 10
cob=(3)
cfi=(3)
cfn=(446)
calls=1 0 
* 22
* 1
* 2
+1 2
-13 2
+31 2

fn=(2530) tokenize_file
471 40
+1 4
+4 28
cfi=(14)
cfn=(432)
calls=4 -81 
* 456
* 4
+3 12
cfi=(134) /home/mithuncy/fsm_code/src/backend/libpq/../../../src/include/utils/palloc.h
cfn=(2532) MemoryContextSwitchTo
calls=4 110 
* 40
* 4
+2 8
+2 4
+4 274
+1 274
+2 1370
cob=(3)
cfi=(3)
cfn=(1486)
calls=274 0 
* 65504
* 274
* 548
+2 4
cob=(5)
cfi=(5)
cfn=(472)
calls=4 0 
* 12
* 4
* 8
+2 12
cob=(3)
cfi=(3)
cfn=(1366)
calls=4 0 
* 144
* 4
* 8
+1 8
+9 810
cob=(3)
cfi=(3)
cfn=(424)
calls=270 0 
* 5932
* 270
* 540
+12 810
cob=(3)
cfi=(3)
cfn=(424)
calls=270 0 
* 5932
* 270
* 1080
+1 270
+1 1080
-1 5304
+4 540
+1 270
+4 1812
cfn=(2534) next_field_expand
calls=302 332 
* 211137
* 302
+3 604
+1 280
cfi=(45)
cfn=(960)
calls=56 129 
* 10652
* 56
-8 3194
+12 1314
+4 24
cfi=(13)
cfn=(940)
calls=12 925 
* 1476
* 12
+1 36
+1 36
+1 36
cfi=(13)
cfn=(928)
calls=12 1162 
* 3843
* 24
+1 36
+1 72
cfi=(45)
cfn=(960)
calls=12 129 
* 2148
* 24
+3 12
-63 36
cob=(3)
cfi=(3)
cfn=(1480)
calls=12 0 
* 432
* 12
+63 258
-63 774
cob=(3)
cfi=(3)
cfn=(1480)
calls=258 0 
* 9288
* 258
* 12
cob=(3)
cfi=(3)
cfn=(1480)
calls=4 0 
* 144
* 4
* 1370
cob=(3)
cfi=(3)
cfn=(1366)
calls=274 0 
* 9864
* 274
* 548
+66 12
cfi=(134)
cfn=(2532)
calls=4 110 
* 40
+2 4
+1 24

fn=(2534)
332 2114
+4 302
+4 3926
cfn=(2536) next_token
calls=302 198 
* 173368
* 906
+3 246
+3 392
+4 336
cfn=(2540)
calls=56 -61 
* 10540
* 280
cfi=(45)
cfn=(960)
calls=56 129 
* 17597
* 56
+1 168
+2 302
+1 604

fn=(2536)
198 3020
+2 604
+1 1812
+1 302
+1 302
+1 302
+4 604
+1 604
+3 11810
cfn=(2538)
calls=822 -51 
* 9948
* 2248
+7 302
+4 2092
+2 112246
+2 246
+3 924
+17 616
+6 616
+1 1540
+3 616
+3 308
+2 616
+8 2464
-51 1220
+1 2392
cfn=(2538)
calls=598 -59 
* 8240
* 598
-1 1196
+1 88
+57 1510
+2 604
+2 2114
+1 984
-1 56
+1 224

fn=(2548) copy_hba_token
308 96
+1 192
cfn=(2540)
calls=24 -20 
* 4462
* 24
+2 24
+1 48

fn=(3426) check_role
587 6
+4 3
cfi=(135)
cfn=(2542)
calls=1 78 
* 10
* 2
+2 3
+1 10
+5 6
cob=(3)
cfi=(3)
cfn=(446)
calls=1 0 
* 22
* 1
* 2
+1 3
-1 2
+1 5
cob=(3)
cfi=(3)
cfn=(446)
calls=1 0 
* 22
* 1
* 2
+1 2
-10 2
+13 2

fn=(2544) parse_hba_line
946 108
+1 36
+1 36
+13 24
cfi=(13)
cfn=(2546)
calls=12 -5 
* 10400
* 12
+1 36
+1 48
cfi=(13)
cfn=(928)
calls=12 1162 
* 3800
* 24
+4 48
cfi=(135)
cfn=(2542)
calls=12 78 
* 120
* 12
+1 36
+1 48
+11 36
cfi=(135)
cfn=(2542)
calls=12 78 
* 120
* 24
+1 60
cob=(3)
cfi=(3)
cfn=(446)
calls=12 0 
* 536
* 12
* 24
+3 12
+11 40
cob=(3)
cfi=(3)
cfn=(446)
calls=8 0 
* 203
* 8
* 16
+5 48
+25 48
+7 16
-32 8
+48 36
+1 24
+10 24
+1 36
+1 36
cfi=(135)
cfn=(2542)
calls=12 78 
* 120
* 24
+3 48
cfn=(2548)
calls=12 308 
* 2410
* 12
-1 60
cfi=(45)
cfn=(960)
calls=12 129 
* 3480
* 24
-2 84
+7 36
+1 24
+10 24
+1 36
+1 36
cfi=(135)
cfn=(2542)
calls=12 78 
* 120
* 24
+3 48
cfn=(2548)
calls=12 308 
* 2436
* 12
-1 60
cfi=(45)
cfn=(960)
calls=12 129 
* 3480
* 24
-2 84
+6 48
+3 24
+1 16
+10 24
+1 32
+11 24
cfi=(135)
cfn=(2542)
calls=8 78 
* 80
* 16
+2 80
cob=(3)
cfi=(3)
cfn=(446)
calls=8 0 
* 230
* 8
* 16
+4 80
cob=(3)
cfi=(3)
cfn=(446)
calls=8 0 
* 220
* 8
* 16
+5 80
cob=(3)
cfi=(3)
cfn=(446)
calls=8 0 
* 230
* 8
* 16
+8 16
+3 32
cfi=(13)
cfn=(928)
calls=8 +27 
* 1344
* 8
+3 32
cob=(3)
cfi=(3)
cfn=(1120)
calls=8 0 
* 216
* 8
* 8
+1 16
+1 16
+3 8
+1 8
+1 8
+1 8
+1 8
+1 8
+1 8
+1 8
+2 48
cfi=(77)
cfn=(1630)
calls=8 59 
* 11861
* 8
+1 40
+2 16
-1 64
cob=(3)
cfi=(3)
cfn=(856)
calls=8 0 
* 128
* 8
* 8
+19 40
cfi=(77)
cfn=(1942)
calls=8 89 
* 2696
+3 16
+2 32
+14 16
-1 64
cfi=(136) /home/mithuncy/fsm_code/src/backend/libpq/ifaddr.c
cfn=(2550) pg_sockaddr_cidr_mask
calls=8 116 
* 2624
* 16
+13 24
cfi=(13)
cfn=(952)
calls=8 1032 
* 628
* 8
+67 36
+1 24
+10 36
+1 48
+11 36
cfi=(135)
cfn=(2542)
calls=12 78 
* 120
* 24
+2 12
+1 60
cob=(3)
cfi=(3)
cfn=(446)
calls=12 0 
* 554
* 12
* 24
+1 36
+76 24
+17 48
+1 8
-1 8
+5 48
+1 8
-1 8
+12 48
+1 16
-1 16
+18 48
+1 24
-1 24
+21 48
+1 24
-1 24
+9 48
+7 72
+38 48
+56 48
+53 48
+5 12
+1 84

fn=(3020) check_hba
2026 4
+6 5
cfi=(170) /home/mithuncy/fsm_code/src/backend/utils/adt/acl.c
cfn=(3022) get_role_oid
calls=1 5191 
* 51560
* 1
+2 3
cfi=(135)
cfn=(2542)
calls=1 78 
* 10
* 2
+2 3
+3 4
+2 4
+55 9
cfn=(3424)
calls=1 611 
* 69
* 3
+4 8
cfn=(3426)
calls=1 587 
* 106
* 3
+4 3
+1 1
-71 2
+78 2

fn=(2528)
2127 8
+2 2
+2 2
+1 2
+5 8
cfi=(25)
cfn=(1278)
calls=2 +49 
* 1379
* 2
+1 4
+9 12
cfn=(2530)
calls=2 471 
* 272710
* 2
+1 6
cfi=(25)
cfn=(1374)
calls=2 2385 
* 1020
+4 14
cfi=(14)
cfn=(432)
calls=2 395 
* 1177
* 2
+3 6
cfi=(134)
cfn=(2532)
calls=2 110 
* 20
* 2
+1 6
cfi=(135)
cfn=(2542)
calls=2 78 
* 20
* 4
+2 36
+4 48
+6 48
cfn=(2544)
calls=12 946 
* 52028
* 36
+13 60
cfi=(45)
cfn=(960)
calls=12 129 
* 2086
* 12
-25 64
+33 8
+10 6
cfi=(13)
cfn=(1396) MemoryContextDelete
calls=2 212 
* 1454
+1 6
cfi=(134)
cfn=(2532)
calls=2 110 
* 20
+2 8
+8 6
+1 3
cfi=(13)
cfn=(1396)
calls=1 212 
* 865
+1 4
+1 4
+2 2
+1 8

fn=(3018) hba_getauthmethod
3028 4
+1 3
cfn=(3020)
calls=1 2026 
* 51802
+1 2

fn=(2552)
2917 8
+2 2
+3 2
+1 2
+6 8
cfi=(25)
cfn=(1278)
calls=2 2186 
* 1465
* 2
+1 4
+10 12
cfn=(2530)
calls=2 471 
* 79930
* 2
+1 6
cfi=(25)
cfn=(1374)
calls=2 2385 
* 1049
+4 14
cfi=(14)
cfn=(432)
calls=2 395 
* 1087
* 2
+3 6
cfi=(134)
cfn=(2532)
calls=2 110 
* 20
* 2
+1 6
cfi=(135)
cfn=(2542)
calls=2 78 
* 16
* 8
+28 6
cfi=(13)
cfn=(1396)
calls=2 212 
* 248
+1 6
cfi=(134)
cfn=(2532)
calls=2 110 
* 20
+2 8
+18 6
+9 6
+1 3
cfi=(13)
cfn=(1396)
calls=1 212 
* 119
+2 4
+1 4
+2 2
+1 8

fl=(297) /home/mithuncy/fsm_code/src/backend/utils/adt/format_type.c
fn=(5148) type_maximum_size
398 6
+1 2
+1 2
+25 4

fl=(33) /home/mithuncy/fsm_code/src/backend/utils/hash/hashfn.c
fn=(2952) uint32_hash
65 33985
+2 27188
cfi=(34) /home/mithuncy/fsm_code/src/backend/access/hash/hashfunc.c
cfn=(2954) hash_uint32
calls=6797 894 
* 312662
+1 13594

fn=(838) string_hash
35 320
+6 192
cob=(3)
cfi=(3)
cfn=(424)
calls=64 -41 
* 1164
* 64
* 64
+2 384
+1 384
cfi=(34)
cfn=(840) hash_any
calls=64 429 
* 8620
+2 128

fn=(2224) tag_hash
53 238415
+1 286098
cfi=(34)
cfn=(840)
calls=47683 429 
* 5314714
+2 95366

fl=(34)
fn=(840)
429 438975
+7 48775
+1 146325
+3 195100
+3 48746
+3 48746
+2 97116
+1 145674
+1 145674
+1 1456740
+1 48558
+1 48558
-7 194608
+11 48746
+41 243730
+3 915
+3 915
+3 915
+4 549
+1 366
+1 183
-9 115
+3 115
+4 69
+1 46
+1 23
-6 10
+4 6
+1 4
+1 2
-2 115617
+1 77078
+1 38539
+2 45
+3 45
+3 36
+3 18
+1 9
-7 15
+3 12
+3 6
+1 3
-1 18314
+1 9157
+2 30
+3 30
+3 24
-3 90
+3 47992
+10 29
+7 450
+1 475
+1 475
+2 750
+1 25
+1 25
-13 108
+56 145
+6 15
+3 15
+4 15
+3 15
+3 15
+3 12
+3 15
+3 15
+3 15
+3 9
+6 39
-31 5
+4 5
+3 5
+3 5
+3 4
+3 5
+3 5
+3 5
+3 3
+6 18
-27 10
+3 10
+3 10
+3 8
+3 10
+3 10
+3 10
+3 6
+6 46
-24 5
+3 5
+3 4
+3 5
+3 5
+3 5
+3 3
+6 28
-21 20
+3 16
+3 20
+3 20
+3 20
+3 12
+6 112
+3 4
+1 16
-22 12
+3 15
+3 15
+3 15
+3 9
+6 84
+3 3
+1 21
-19 20
+3 20
+3 20
+3 12
+6 112
+3 4
+1 28
-16 10
+3 10
+3 6
+6 56
+3 2
+1 14
-13 15
+3 9
+6 84
+3 3
+1 21
-10 6
+6 56
+3 2
+1 14
-4 1365000
+3 48750
+1 341250
-4 45
+3 3
+1 21
-4 10
+3 1
+1 7
-4 10
+3 2
+1 14
-1 1
+1 19

fn=(2954)
894 40782
+5 20391
+1 20391
+2 190316
+3 6797
+1 33985

fn=(5026) hashoidvector
208 8
+1 6
+2 16
cfn=(840)
calls=2 429 
* 137
+1 4

fl=(55)
fn=(1122)
4190 4
+6 1
+1 2

fn=(5224)
230 4500
+3 500
+1 500
+1 2500
+8 2000
+33 1000
+10 2000
+25 2000
+14 2000
cfn=(5226) RelnameGetRelid
calls=500 674 
* 26946089
* 500
+13 1000
+10 1000
+12 1000
+15 1000
+2 2000
+1 2500
cfi=(159)
cfn=(3038)
calls=500 106 
* 1163205
* 500
+22 1500
+1 500
+11 1000
+15 500
+1 2000

fn=(4534) recomputeNamespacePath
3691 3039
+1 1013
cfi=(54)
cfn=(3464)
calls=1013 381 
* 5065
* 1013
+11 3039
+4 6075
+1 1012
+3 3
cfi=(13)
cfn=(928)
calls=1 1162 
* 189
* 1
+3 5
cfi=(41)
cfn=(932)
calls=1 3507 
* 1707
* 3
+13 1
+1 1
+1 3
cfi=(256) /home/mithuncy/fsm_code/src/backend/catalog/../../../src/include/nodes/pg_list.h
cfn=(4536) list_head
calls=1 78 
* 10
* 2
+2 6
+3 8
cob=(3)
cfi=(3)
cfn=(446)
calls=2 0 
* 44
* 2
* 4
+5 4
cfi=(151)
cfn=(3444)
calls=1 1114 
* 342
* 1
+1 2
+4 9
+1 4
cfn=(4540) get_namespace_oid
calls=1 3026 
* 24123
* 1
+1 3
cfi=(151)
cfn=(3418)
calls=1 1161 
* 103
+1 2
+5 1
+3 4
cob=(3)
cfi=(3)
cfn=(446)
calls=1 0 
* 47
* 1
* 2
+19 4
cfn=(4540)
calls=1 3026 
* 18657
* 1
+1 2
+1 5
cfi=(45)
cfn=(3130) list_member_oid
calls=1 506 
* 23
* 1
-1 2
+2 6
cfi=(230) /home/mithuncy/fsm_code/src/backend/catalog/aclchk.c
cfn=(4550) pg_namespace_aclcheck
calls=1 4694 
* 51
-1 2
+3 1
-1 5
+2 5
cfi=(45)
cfn=(4554) lappend_oid
calls=1 165 
* 290
* 1
-51 12
+60 2
+3 3
cfi=(256)
cfn=(4536)
calls=1 78 
* 10
* 2
+7 4
cfi=(45)
cfn=(3130)
calls=1 506 
* 34
* 3
+1 4
cfi=(45)
cfn=(4556) lcons_oid
calls=1 296 
* 161
* 1
+2 3
+8 3
cfi=(258) /home/mithuncy/fsm_code/src/backend/catalog/../../../src/include/utils/palloc.h
cfn=(4558) MemoryContextSwitchTo
calls=1 110 
* 10
* 1
+1 3
cfi=(45)
cfn=(4560) list_copy
calls=1 1164 
* 420
* 1
+1 3
cfi=(258)
cfn=(4558)
calls=1 110 
* 10
+3 3
cfi=(45)
cfn=(972)
calls=1 1137 
* 35
+1 2
+1 2
+1 2
+3 1
+1 2
+3 2
+1 2
+1 2
+3 3
cfi=(13)
cfn=(952)
calls=1 1032 
* 85
+1 3
cfi=(45)
cfn=(972)
calls=1 1137 
* 319
+1 3
cfi=(45)
cfn=(972)
calls=1 1137 
* 319
+1 2026

fn=(5226)
674 2000
+4 500
cfn=(4534)
calls=500 3691 
* 11000
+2 1500
cfi=(256)
cfn=(4536)
calls=500 78 
* 5000
* 1000
+2 3000
+2 5000
cfi=(275)
cfn=(5228) get_relname_relid
calls=1000 1655 
* 26908589
* 1000
+1 2000
+1 1000
-6 3500
+11 1000

fn=(3704) AtEOXact_Namespace
3962 14
+9 6
+27 6
+18 4

fn=(4532) GetOverrideSearchPath
3343 12
+5 3
cfn=(4534)
calls=3 3691 
* 47231
+2 9
cfi=(258)
cfn=(4558)
calls=3 110 
* 30
* 3
+2 6
cfi=(13)
cfn=(2546)
calls=3 956 
* 446
* 3
+1 9
cfi=(45)
cfn=(4560)
calls=3 1164 
* 1645
* 3
+1 3
+2 9
cfi=(256)
cfn=(4536)
calls=3 78 
* 30
* 12
+5 6
+2 9
cfi=(45)
cfn=(4562) list_delete_first
calls=3 667 
* 429
* 3
-9 30
cfi=(256)
cfn=(4536)
calls=6 78 
* 60
* 24
+11 9
+2 9
cfi=(258)
cfn=(4558)
calls=3 110 
* 30
+2 3
+1 6

fn=(4540)
3026 21
+3 24
cfi=(151)
cfn=(3024) GetSysCacheOid
calls=3 1227 
* 60967
* 3
+2 10
+5 3
+1 12

fn=(4618) OverrideSearchPathMatchesCurrent
3395 2020
+4 505
cfn=(4534)
calls=505 3691 
* 11110
+3 1515
cfi=(256)
cfn=(4536)
calls=505 78 
* 5050
* 505
+3 2020
+8 2020
+2 3030
+1 2020
+5 4040
+3 2020
cfi=(256)
cfn=(4536)
calls=505 78 
* 5050
* 1010
+2 4040
+1 1515
-3 4040
+7 1010
+2 505
+1 1010

fn=(4918) OpernameGetOprid
1465 12
+7 12
cfn=(4908) DeconstructQualifiedName
calls=2 2792 
* 110
+2 6
+29 18
cfi=(151)
cfn=(4920) SearchSysCacheList
calls=2 -76 
* 61974
* 2
+5 8
+3 3
cfi=(149) /home/mithuncy/fsm_code/src/backend/utils/cache/catcache.c
cfn=(4932) ReleaseCatCacheList
calls=1 1794 
* 90
+1 2
+8 1
cfn=(4534)
calls=1 3691 
* 22
+2 3
cfi=(256)
cfn=(4536)
calls=1 78 
* 10
* 2
+2 3
+3 3
+3 2
+2 7
+1 8
+2 4
+2 3
+2 3
cfi=(149)
cfn=(4932)
calls=1 1794 
* 90
+1 2
-10 4
-8 2
+25 4

fn=(4940) OpernameGetCandidates
1568 8
+1 1
+1 1
+1 1
+8 6
cfn=(4908)
calls=1 2792 
* 55
+2 3
+10 1
+1 1
cfn=(4534)
calls=1 3691 
* 22
+4 7
cfi=(151)
cfn=(4920)
calls=1 1427 
* 65112
* 1
+14 4
+1 9
cfi=(13)
cfn=(940)
calls=1 925 
* 123
* 1
+2 2
+2 77
+1 88
+1 11
+4 66
+3 22
+15 33
cfi=(256)
cfn=(4536)
calls=11 78 
* 110
* 22
+2 66
+1 33
-1 22
+2 11
-4 22
+7 22
+14 22
+4 40
+2 60
+1 8
-1 4
+4 20
+13 20
+17 55
+1 33
+2 33
+1 44
+1 22
+1 22
+1 22
+1 22
+1 44
+1 44
+1 33
+1 22
-99 59
1715 3
cfi=(149)
cfn=(4932)
calls=1 +79 
* 90
+2 1
+1 2

fn=(5098) LookupExplicitNamespace
2874 6
+5 4
cob=(3)
cfi=(3)
cfn=(446)
calls=1 0 
* 47
* 1
* 2
+12 5
cfn=(4540)
calls=1 3026 
* 18260
* 1
+1 2
+3 1
cfi=(54)
cfn=(3464)
calls=1 381 
* 5
* 6
cfi=(230)
cfn=(4550)
calls=1 4694 
* 51
* 1
+1 2
+4 3
+2 1
+1 2

fn=(5272) isTempToastNamespace
3152 4500
+1 4500
+2 1500
+1 3000

fn=(4908)
2792 49
+2 7
+1 7
+2 21
cfi=(256)
cfn=(4910) list_length
calls=7 90 
* 70
* 38
+3 18
cfi=(256)
cfn=(4536)
calls=6 78 
* 60
* 18
+1 6
+2 3
cfi=(256)
cfn=(4536)
calls=1 78 
* 10
* 3
+1 3
cfi=(256)
cfn=(4536)
calls=1 78 
* 10
* 4
+1 1
+23 21
+1 21
+1 28

fn=(4912) fetch_search_path_array
4304 10
+1 2
+3 2
cfn=(4534)
calls=2 3691 
* 44
+2 6
cfi=(256)
cfn=(4536)
calls=2 78 
* 20
* 4
+2 12
+2 12
+3 12
+1 28
+1 4
-9 24
+12 2
+1 4

fn=(1112)
4156 6
+5 4
cfi=(13)
cfn=(928)
calls=1 1162 
* 158
* 1
+3 5
cfi=(41)
cfn=(932)
calls=1 3507 
* 2597
* 3
+17 3
cfi=(13)
cfn=(952)
calls=1 1032 
* 85
+1 3
cfi=(45)
cfn=(972)
calls=1 1137 
* 319
+2 1
+1 2

fn=(3612) InitializeSearchPath
4206 3
+1 3
+25 4
cfi=(155)
cfn=(2910)
calls=1 1410 
* 86
+4 1
+2 2

fn=(5020) FuncnameGetCandidates
925 12
+1 1
+1 1
+11 6
cfn=(4908)
calls=1 2792 
* 55
+2 3
+10 1
+1 1
cfn=(4534)
calls=1 3691 
* 22
+4 7
cfi=(151)
cfn=(4920)
calls=1 1427 
* 39825
* 1
+2 2
+2 14
+1 16
+1 8
+2 2
+4 2
+3 4
+14 6
cfi=(256)
cfn=(4536)
calls=2 78 
* 20
* 4
+2 12
+1 6
-1 4
+2 2
-4 4
+7 4
+4 4
+50 10
+2 6
+1 6
+1 14
+11 6
+9 2
+3 18
+1 1
+9 4
+2 4
-1 2
cfi=(13)
cfn=(940)
calls=1 925 
* 92
* 1
+3 3
+1 4
+1 3
+1 3
+1 3
+12 10
cob=(3)
cfi=(3)
cfn=(856)
calls=1 0 
* 12
* 1
+3 2
+4 7
+2 4
+1 6
-1 8
+5 5
+10 2
1258 3
+1 2
957 14
1262 3
cfi=(149)
cfn=(4932)
calls=1 1794 
* 90
+2 1
+1 2

fl=(169) /home/mithuncy/fsm_code/src/backend/libpq/auth.c
fn=(3428) sendAuthRequest
618 7
+3 3
+2 4
cfi=(191)
cfn=(3430)
calls=1 88 
* 168
+1 5
cfi=(192) /home/mithuncy/fsm_code/src/backend/libpq/../../../src/include/libpq/pqformat.h
cfn=(3432) pq_sendint32
calls=1 146 
* 74
+1 2
+3 3
cfi=(191)
cfn=(3436)
calls=1 299 
* 335
+7 2
+3 3
+1 2

fn=(3016) ClientAuthentication
348 6
+1 1
+1 1
+8 3
cfi=(133)
cfn=(3018)
calls=1 3028 
* 51811
+2 3
+7 5
+23 8
599 1
+1 1
+3 3
+3 2
+1 6
cfn=(3428)
calls=1 +11 
* 608
* 1
+3 5

fl=(304) /home/mithuncy/fsm_code/src/backend/executor/execMain.c
fn=(5308) CheckValidResultRel
1081 3500
+1 1500
+1 1500
+3 5000
+4 2500
cfi=(309) /home/mithuncy/fsm_code/src/backend/executor/execReplication.c
cfn=(5310) CheckCmdReplicaIdentity
calls=500 569 
* 8500
+1 500
1207 2500

fn=(5260) ExecCheckRTPerms
571 3500
+2 500
+2 1500
cfi=(245)
cfn=(4416)
calls=500 78 
* 5000
* 1000
+2 1500
+2 1500
cfn=(5262) ExecCheckRTEPerms
calls=500 +23 
* 12780095
* 500
+1 2000
-5 3500
+15 1500
+3 500
+1 2000

fn=(5262)
602 2000
+12 2000
+6 1500
+1 1000
+3 1500
+10 2500
cfi=(54)
cfn=(3464)
calls=500 381 
* 2500
* 500
+7 3000
cfi=(230)
cfn=(5264) pg_class_aclmask
calls=500 3833 
* 12758595
* 500
+1 2000
+1 1000
+69 500
+1 1000

fn=(5522) ExecCleanUpTriggerState
1454 2000
+3 2000
cfi=(245)
cfn=(4416)
calls=500 78 
* 4000
* 2000
+19 1000

fn=(5302) InitResultRelInfo
1286 4000
+1 500
+2 97500
+1 1000
+1 1500
+1 1500
+1 1000
+1 1000
+1 1000
+2 2000
cfi=(167) /home/mithuncy/fsm_code/src/backend/commands/trigger.c
cfn=(5304) CopyTriggerDesc
calls=500 2141 
* 6500
* 1000
+1 2000
+13 1000
+1 1000
+1 1000
+2 2500
+3 1000
+3 1000
+1 1000
+1 1000
+1 1000
+1 1000
+1 1000
+1 1000
+15 1500
cfi=(308) /home/mithuncy/fsm_code/src/backend/utils/cache/partcache.c
cfn=(5306) RelationGetPartitionQual
calls=500 378 
* 7000
* 500
+2 1500
+1 1500
+1 1000
+1 1000

fl=(103)
fn=(5770)
139 5
+1 2
+3 12
+8 1
+3 5
+11 2
+1 2

fn=(2266) ProcSignalShmemInit
85 3
+1 1
cfn=(2058) ProcSignalShmemSize
calls=1 -11 
* 13
* 1
+4 5
cfi=(87)
cfn=(2168)
calls=1 373 
* 994
-1 1
+4 4
+1 19
cob=(3)
cfi=(3)
cfn=(828)
calls=1 -94 
* 583
* 1
+1 2

fn=(2874) ProcSignalInit
106 4
+5 12
+3 4
+5 63
+3 3
+3 2
+3 5
cfi=(67)
cfn=(2110)
calls=1 362 
* 32
+1 2

fn=(2058)
75 4
+1 18
+1 4

fl=(149)
fn=(3446) SearchCatCache1
1177 13100
+1 20960
cfn=(3030) SearchCatCacheInternal
calls=2620 +37 
* 13933365
+1 5240

fn=(4542) CatCacheCopyKeys
1949 4599
+8 1022
+2 7147
+1 11231
+1 7147
+9 4084
+2 2525
cfi=(187)
cfn=(4544)
calls=505 253 
* 49691
+1 1010
+3 2525
+2 1010
-2 505
+1 1010
-1 2525
cfi=(257) /home/mithuncy/fsm_code/src/backend/utils/adt/datum.c
cfn=(4546) datumCopy
calls=505 129 
* 101979
* 2580
+2 1032
-2 516
+1 1032
-1 2580
cfi=(257)
cfn=(4546)
calls=516 129 
* 7740
* 1021
-19 5617
+24 2044

fn=(2890) CreateCacheMemoryContext
630 2
+5 3
+1 7
cfi=(14)
cfn=(432)
calls=1 395 
* 428
* 1
+3 2

fn=(3120) namehashfast
152 4104
+1 2052
+2 3078
cob=(3)
cfi=(3)
cfn=(424)
calls=1026 0 
* 19414
* 1026
* 5130
cfi=(34)
cfn=(840)
calls=1026 429 
* 102866
+1 2052

fn=(4932)
1794 16
+4 20
+1 20
cfi=(164)
cfn=(4934) ResourceOwnerForgetCatCacheListRef
calls=4 1037 
* 280
+4 8
-2 8
+6 8

fn=(3028) SearchCatCache
1163 8040
+1 11055
cfn=(3030)
calls=1005 +51 
* 26848719
+1 2010

fn=(3122) SearchCatCacheMiss
1329 13824
+9 3072
+1 3072
+1 3072
+1 3072
+6 19968
cob=(3)
cfi=(3)
cfn=(856)
calls=1536 0 
* 74123
* 1536
+1 3072
+1 3072
+1 3072
+1 3072
+17 7680
cfi=(171)
cfn=(3034)
calls=1536 -61 
* 4201684
* 1536
+4 7680
cfn=(3124) IndexScanOK
calls=1536 1095 
* 18477
-2 16896
cfi=(173) /home/mithuncy/fsm_code/src/backend/access/index/genam.c
cfn=(3127) systable_beginscan'2
calls=2 322 
* 8369
cfi=(173)
cfn=(3126) systable_beginscan
calls=1534 322 
* 7931983
* 1536
+7 1536
+2 4608
cfi=(173)
cfn=(3172) systable_getnext
calls=1536 406 
* 16182557
* 4608
+2 9261
cfn=(3382) CatalogCacheCreateEntry
calls=1029 1819 
* 684425
* 1029
+4 3087
cfi=(164)
cfn=(3390) ResourceOwnerEnlargeCatCacheRefs
calls=1029 982 
* 24304
+1 5145
+1 6174
cfi=(164)
cfn=(3392) ResourceOwnerRememberCatCacheRef
calls=1029 993 
* 44247
+1 1029
+3 3087
cfi=(173)
cfn=(3394) systable_endscan
calls=1029 489 
* 4034328
* 1521
cfi=(173)
cfn=(3394)
calls=507 489 
* 1873760
+2 6144
cfi=(171)
cfn=(3092)
calls=1536 1283 
* 4033433
+12 3072
+2 1521
+3 4563
cfn=(3382)
calls=507 1819 
* 425134
* 507
+14 1014
+12 2058
+1 3072

fn=(3032) CatalogCacheInitializeCache
933 64
+8 80
cfi=(171)
cfn=(3034)
calls=16 1307 
* 112718
* 16
+8 48
cfi=(152) /home/mithuncy/fsm_code/src/backend/utils/cache/../../../../src/include/utils/palloc.h
cfn=(2898) MemoryContextSwitchTo
calls=16 110 
* 160
* 16
+5 64
cfi=(158)
cfn=(3090) CreateTupleDescCopyConstr
calls=16 151 
* 14117
* 16
+6 80
cfi=(13)
cfn=(928)
calls=16 1162 
* 2907
* 32
+1 80
+5 48
cfi=(152)
cfn=(2898)
calls=16 110 
* 160
+2 64
cfi=(171)
cfn=(3092)
calls=16 1283 
* 28731
+8 32
+7 168
+2 360
+3 96
+11 432
cfn=(3114) GetCCHashEqFuncs
calls=24 209 
* 534
+9 336
cfi=(161)
cfn=(3116) fmgr_info_cxt
calls=24 135 
* 1992
+5 384
+3 240
+1 240
+2 240
-43 184
+54 48
+1 32

fn=(3382)
1819 15500
+6 3100
+13 7301
+3 2086
+3 3129
cfi=(152)
cfn=(2898)
calls=1043 110 
* 10430
* 1043
+3 2086
-1 4172
cfi=(13)
cfn=(940)
calls=1043 925 
* 128258
* 1043
+2 4172
+1 6258
+1 4172
+2 4172
-1 3129
+5 2086
-2 1043
+1 2086
-1 5215
cob=(3)
cfi=(3)
cfn=(856)
calls=1043 0 
* 95093
* 1043
+3 3129
cfi=(152)
cfn=(2898)
calls=1043 110 
* 10430
+2 3129
+4 2086
+5 47269
cfi=(190) /home/mithuncy/fsm_code/src/backend/access/common/heaptuple.c
cfn=(3384) nocachegetattr
calls=1 428 
* 251
* 56648
cfi=(190)
cfn=(3384)
calls=1531 428 
* 144344
* 3115
+5 7920
-10 13135
+16 1521
cfi=(152)
cfn=(2898)
calls=507 110 
* 5070
* 507
+1 1014
cfi=(13)
cfn=(940)
calls=507 925 
* 62330
* 507
+7 1014
-1 6084
cfn=(4542)
calls=507 +63 
* 220496
+2 1521
cfi=(152)
cfn=(2898)
calls=507 110 
* 5070
+7 3100
+1 4650
+1 3100
+1 3100
+1 3100
+1 4650
+1 4650
+2 15500
cfi=(153) /home/mithuncy/fsm_code/src/backend/utils/cache/../../../../src/include/lib/ilist.h
cfn=(3386) dlist_push_head
calls=1550 301 
* 46310
+2 7750
+1 6200
+6 10850
+1 9
cfn=(5560) RehashCatCache
calls=3 870 
* 100954
+2 1550
+1 3100

fn=(3450) nameeqfast
143 10
+1 4
+1 4
+2 12
cob=(3)
cfi=(3)
cfn=(1044)
calls=2 0 
* 117
* 2
* 4
+1 4

fn=(3858) CatCacheInvalidate
562 60
+15 204
+13 60
+1 240
+22 24

fn=(4954) SearchCatCache2
1185 54
+1 72
cfn=(3030)
calls=9 +29 
* 119614
+1 18

fn=(3030)
1215 32706
+16 25438
+1 42
cfn=(3032)
calls=14 933 
* 152499
+7 7268
+1 7268
+1 7268
+1 7268
+5 36340
cfn=(3118) CatalogCacheComputeHashValue
calls=3634 279 
* 379560
* 3634
+1 18170
+8 21804
+1 38992
+2 12267
+2 16356
+3 16356
+1 1991
+2 18882
cfn=(3448) CatalogCacheCompareTuple
calls=2098 386 
* 119838
* 6294
+9 12588
cfi=(153)
cfn=(3452) dlist_move_head
calls=2098 386 
* 25223
+6 10490
+2 6285
cfi=(164)
cfn=(3390)
calls=2095 982 
* 48185
+1 10475
+1 12570
cfi=(164)
cfn=(3392)
calls=2095 993 
* 90085
+9 6285
+11 6
-49 28473
+53 18432
cfn=(3122)
calls=1536 +19 
* 39695092
+1 7268

fn=(3448)
386 14686
+1 6294
+3 4196
+2 44121
cfn=(4538) int4eqfast
calls=2099 172 
* 23089
cfn=(3450)
calls=2 143 
* 157
* 6303
-2 14698
+5 2098
+1 4196

fn=(4922) SearchCatCacheList
1522 32
+1 4
+17 16
+1 6
cfn=(3032)
calls=2 933 
* 12220
+9 8
+1 8
+1 8
+1 8
+7 40
cfn=(3118)
calls=4 279 
* 728
* 4
+8 44
+2 9
+2 12
+3 12
+1 3
-8 37
+53 12
cfi=(164)
cfn=(4924) ResourceOwnerEnlargeCatCacheListRefs
calls=4 1017 
* 395
+2 4
+2 32
cob=(3)
cfi=(3)
cfn=(370)
calls=4 0 
* 112
* 4
* 16
+10 56
cob=(3)
cfi=(3)
cfn=(856)
calls=4 0 
* 320
* 4
+1 8
+1 8
+1 8
+1 8
+2 20
cfi=(171)
cfn=(3034)
calls=4 1307 
* 8546
* 4
+4 20
cfn=(3124)
calls=4 1095 
* 48
-2 44
cfi=(173)
cfn=(3126)
calls=4 322 
* 18252
* 4
+8 20
+2 4
+4 14
+6 14
+1 98
cfn=(4942) CatalogCacheComputeTupleHashValue
calls=14 329 
* 12116
* 14
+1 70
+2 84
+1 128
+2 3
+2 8
+3 4
+3 7
cfi=(296) /home/mithuncy/fsm_code/src/backend/storage/page/itemptr.c
cfn=(5108) ItemPointerEquals
calls=1 30 
* 34
* 3
+7 4
+1 1
-18 63
+24 56
+3 126
cfn=(3382)
calls=14 1819 
* 12221
* 14
+7 70
cfi=(45)
cfn=(960)
calls=14 129 
* 2570
* 14
+1 70
-50 42
cfi=(173)
cfn=(3172)
calls=14 406 
* 21429
* 12
cfi=(173)
cfn=(3172)
calls=4 406 
* 54992
* 54
+53 12
cfi=(173)
cfn=(3394)
calls=4 489 
* 11009
+2 16
cfi=(171)
cfn=(3092)
calls=4 1283 
* 6948
+3 12
cfi=(152)
cfn=(2898)
calls=4 110 
* 40
* 4
+1 12
cfi=(259) /home/mithuncy/fsm_code/src/backend/utils/cache/../../../../src/include/nodes/pg_list.h
cfn=(4928) list_length
calls=4 90 
* 38
* 4
+2 16
-1 8
cfi=(13)
cfn=(940)
calls=4 925 
* 461
* 4
+5 8
-1 44
cfn=(4542)
calls=4 1949 
* 1676
+2 12
cfi=(152)
cfn=(2898)
calls=4 110 
* 40
+30 16
+2 8
+1 12
+1 8
+1 8
+1 12
+1 16
+1 12
+1 12
+2 4
+1 12
cfi=(259)
cfn=(4568) list_head
calls=4 78 
* 38
* 8
+2 154
+2 42
+3 70
+2 56
-9 78
+14 28
cfi=(153)
cfn=(3386)
calls=4 301 
* 130
+3 20
+1 20
cfi=(164)
cfn=(4930) ResourceOwnerRememberCatCacheListRef
calls=4 1028 
* 172
+5 4
+1 8

fn=(3420) ReleaseCatCache
1452 12496
+1 9372
+7 15620
+1 18744
cfi=(164)
cfn=(3422) ResourceOwnerForgetCatCacheRef
calls=3124 1002 
* 218680
+4 6248
-2 6248
+7 6248

fn=(3468) int4hashfast
178 14712
+1 11034
cfi=(194) /home/mithuncy/fsm_code/src/backend/utils/cache/../../../../src/include/utils/hashutils.h
cfn=(3470) murmurhash32
calls=3678 42 
* 84594
+1 7356

fn=(4942)
329 84
+1 14
+1 14
+1 14
+1 14
+1 14
+1 42
+1 42
+3 122
+3 998
cfi=(190)
cfn=(3384)
calls=1 +86 
* 637
* 13
+7 1130
cfi=(190)
cfn=(3384)
calls=2 +79 
* 982
* 14
+7 1130
cfi=(190)
cfn=(3384)
calls=2 +72 
* 1817
* 14
+7 728
cfi=(190)
cfn=(3384)
calls=2 +65 
* 170
* 14
+5 14
+6 140
cfn=(3118)
calls=14 -95 
* 3927
+1 28

fn=(5560)
870 12
+5 12
cfi=(57)
cfn=(2084)
calls=3 1286 
* 204
* 48
cfi=(57)
cfn=(2086)
calls=3 1336 
* 327
+4 12
+1 24
cfi=(13)
cfn=(2156)
calls=3 -65 
* 2241
* 3
+3 6
+4 9578
+2 3081
+1 6162
+2 3081
cfi=(153)
cfn=(5562) dlist_delete
calls=1027 359 
* 15405
+1 11297
cfi=(153)
cfn=(3386)
calls=1027 301 
* 35305
-6 11291
-4 2572
+15 12
cfi=(13)
cfn=(952)
calls=3 1032 
* 257
+1 9
+1 9
+1 6

fn=(3114)
209 168
+1 150
+13 14
+1 14
+1 14
+1 7
+27 32
+1 32
+1 32
+1 16
+2 2
+1 2
+1 2
+1 1
+8 48

fn=(3118)
279 32868
+1 3652
+2 10956
+7 21548
+3 72
cfn=(3468)
calls=12 178 
* 384
* 12
+2 36
+1 36
+3 72
cfn=(3468)
calls=12 178 
* 384
* 24
cfn=(3468)
calls=4 178 
* 128
* 16
+2 48
+1 48
+3 96
cfn=(5022) oidvectorhashfast
calls=2 202 
* 247
cfn=(3468)
calls=14 178 
* 448
* 6060
cfn=(3468)
calls=1010 178 
* 32320
* 1026
+2 3078
+1 3078
+3 5130
cfn=(3468)
calls=9 178 
* 288
cfn=(3120)
calls=1017 152 
* 138729
* 13130
cfn=(3468)
calls=2617 178 
* 83744
cfn=(3120)
calls=9 152 
* 993
* 3652
+2 7304
+1 3652
+6 3652
+1 7304

fn=(3124)
1095 6160
+1 6193
+10 4
+2 1
+11 2
+10 8
+2 2
+3 1536
+4 1536
+1 3072
-1 3
+1 8

fn=(4538)
172 8396
+1 10495
+1 4198

fn=(5022)
202 8
+1 10
cfi=(161)
cfn=(5024) DirectFunctionCall1Coll
calls=2 794 
* 225
+1 4

fn=(2896) InitCatCache
778 693
+23 231
+3 231
cfi=(152)
cfn=(2898)
calls=77 110 
* 770
* 77
+5 231
+2 2
cfi=(13)
cfn=(940)
calls=1 925 
* 123
* 1
+1 3
cfi=(153)
cfn=(2900) slist_init
calls=1 555 
* 7
+1 2
+12 1
+1 3
cfi=(13)
cfn=(2546)
calls=1 956 
* 649
-1 76
+1 228
cfi=(13)
cfn=(2546)
calls=76 956 
* 50188
* 231
+1 385
cfi=(13)
cfn=(2546)
calls=77 956 
* 28536
* 154
+7 231
+1 154
+1 231
+1 231
+1 154
+1 154
+1 154
+1 231
+1 231
+1 154
+1 1375
-1 731
+12 462
cfi=(153)
cfn=(2902) slist_push_head
calls=77 575 
* 1001
+5 231
cfi=(152)
cfn=(2898)
calls=77 110 
* 770
+2 77
+1 154

fl=(317)
fn=(5512)
405 4000
+1 6000
cfi=(260)
cfn=(5376)
calls=1000 301 
* 26000
+2 1000
+1 2000

fl=(71)
fn=(1608)
23 30
+1 12
+1 24
+10 6
+2 820
fi=(322) /usr/lib/gcc/x86_64-redhat-linux/4.8.5/include/smmintrin.h
822 492
fe=(71)
37 164
+1 164
-3 680
+7 24
+2 5
fi=(322)
815 3
fe=(71)
44 1
+1 1
+16 6
+2 12
fi=(322)
803 6
fe=(71)
63 2
+1 2
-3 24
+6 6
+1 12

fl=(111) /home/mithuncy/fsm_code/src/backend/access/nbtree/nbtutils.c
fn=(3184) _bt_fix_scankey_strategy
1211 16292
+3 44803
+22 20365
+35 16292
+2 24438
+3 20365
+17 4073
+1 8146

fn=(3352) _bt_checkkeys
1373 41364
+1 41364
+9 9192
+10 41364
+23 4596
+2 32172
+2 18384
+1 13788
+1 13788
+2 22980
+8 30585
+7 427908
cfi=(287) /home/mithuncy/fsm_code/src/backend/access/common/indextuple.c
cfn=(4926) nocache_index_getattr
calls=1006 214 
* 223814
* 7123
+5 30585
+33 18351
+41 55053
cfi=(161)
cfn=(3342)
calls=6117 1134 
* 353071
* 6117
+3 12234
+12 17773
+2 7617
+8 5078
1424 31678
1548 8228
+4 2057
+1 9192

fn=(2290) BTreeShmemInit
2027 4
+3 1
cfn=(2076) BTreeShmemSize
calls=1 -16 
* 62
* 4
cfi=(87)
cfn=(2168)
calls=1 373 
* 1113
* 1
+4 4
+10 3
cob=(1)
cfi=(1)
cfn=(223)
calls=1 0 
* 1258
* 5
* 1
+2 2
+1 3
+4 4

fn=(3170) _bt_preprocess_array_keys
204 10216
+1 7662
+1 7662
+1 10216
+7 2554
+1 5108
+2 40730
+1 20365
-3 23954
+18 5108
+2 5108
+1 5108
+1 2554
365 5108

fn=(3186) _bt_mark_scankey_required
1313 16292
+3 32584
+7 3571
+1 3571
+3 502
+1 502
+8 24438
+2 20365
+10 8146

fn=(3328) _bt_freestack
176 10216
+3 2554
+2 5066
+1 7599
+1 7599
cfi=(13)
cfn=(952)
calls=2533 1032 
* 215305
-4 10174
+6 5108

fn=(2076)
2014 6
+3 2
+1 10
cfi=(87)
cfn=(2000)
calls=2 493 
* 46
* 10
cfi=(87)
cfn=(2002)
calls=2 476 
* 42
* 2
+1 2
+1 4

fn=(3182) _bt_preprocess_keys
757 10216
+1 7662
+1 7662
+1 10216
+13 5108
+1 5108
+2 5108
+6 10216
+3 7662
+2 7662
+1 5108
+2 10216
+4 5108
+3 5190
cfn=(3184)
calls=1038 1211 
* 39444
* 3114
+2 6228
cob=(3)
cfi=(3)
cfn=(856)
calls=1038 0 
* 24912
* 1038
+1 2076
+2 4152
+1 3114
cfn=(3186)
calls=1038 1313 
* 28026
+1 1038
+6 1516
+1 1516
+8 1516
+1 7580
cob=(3)
cfi=(3)
cfn=(828)
calls=1516 0 
* 24256
* 1516
+7 1516
+2 13653
+3 15175
cfn=(3184)
calls=3035 1211 
* 115330
* 9105
+12 25793
+2 6070
+3 15181
+14 9105
+2 5066
+2 5066
+2 50660
+2 30396
+1 12665
-5 45594
+29 2533
+4 9105
+17 9105
+1 1506
+20 6070
+2 75875
+2 36420
+2 24280
cob=(3)
cfi=(3)
cfn=(856)
calls=3035 0 
* 72840
* 3035
+1 12140
+1 9105
cfn=(3186)
calls=3035 1313 
* 81945
-8 54630
+15 9105
+1 1516
+65 6064
-62 4557
+1 7595
cob=(3)
cfi=(3)
cfn=(828)
calls=1519 0 
* 24304
* 1519
+4 15175
+3 15175
+17 15175
+3 15175
827 6070
1017 3035
+3 5108

fl=(122)
fn=(3824) WaitEventSetWaitBlock
1071 32
+1 4
+6 32
cob=(3)
cfi=(3)
cfn=(3830)
calls=3 0 
* 32
cob=(1)
cfi=(1)
cfn=(223)
calls=1 0 
* 1329
* 8
* 4
+4 8
+3 2
cob=(5)
cfi=(5)
cfn=(472)
calls=2 0 
* 6
* 2
* 6
+7 4
+2 4
+11 8
+6 6
+2 8
+1 8
+1 4
+2 8
+1 3
-1 2
+4 1
cfn=(5718) drainSelfPipe
calls=1 1559 
* 28
+2 6
+8 4
+24 5
+4 5
+1 3
-1 2
+4 6
+3 5
+7 4
+2 4
+1 1
+1 1
-69 1
-2 9
-1 2
+3 1
-2 9
-1 2
+1 18
-1 4
+1 6
+76 2
+1 16

fn=(2192) InitSharedLatch
261 351
+16 234
+1 234
+1 234
+1 234

fn=(2848)
767 42
+5 60
+8 24
+1 15
-1 10
+1 8
+1 3
+2 15
+1 4
-1 4
+7 15
+6 9
+2 6
+2 6
+4 12
cfn=(2750) WaitEventAdjustEpoll
calls=2 +14 
* 80
* 6
cfn=(2750)
calls=1 +14 
* 53
+6 12

fn=(2850)
437 28
+12 7
+3 28
+3 14
+26 21
+1 14
+2 21
+2 12
+1 2
cfn=(5714) sendSelfPipeByte
calls=2 1520 
* 46
* 2
+3 12
cob=(3)
cfi=(3)
cfn=(2664)
calls=3 0 
* 15
* 3
+22 14

fn=(3822)
520 9
+4 6
+8 3
+1 6

fn=(2718) InitLatch
229 3
+1 2
+1 3
+1 2
+10 2

fn=(2748)
692 24
+6 6
+6 6
+2 5
+2 4
+2 4
+1 1
+4 8
+5 14
+3 33
+1 21
+1 9
+1 9
+1 9
+5 6
+2 3
+1 4
+2 4
+3 4
+3 3
+6 6
cfn=(2750)
calls=1 +70 
* 44
* 12
cfn=(2750)
calls=2 +70 
* 1446
+7 6
+1 6

fn=(2750)
819 42
+5 12
+2 6
+3 24
+3 12
+2 12
+2 4
+7 10
+1 3
+1 10
+1 3
+8 8
cob=(1)
cfi=(1)
cfn=(223)
calls=1 0 
* 1355
* 5
* 40
cob=(3)
cfi=(3)
cfn=(2756)
calls=5 0 
* 30
* 5
* 6
+2 12
+4 24

fn=(5718)
1559 3
+10 6
cob=(5)
cfi=(5)
cfn=(684)
calls=1 0 
* 7
* 1
* 1
+1 2
+12 2
+5 3
+3 1
+4 2

fn=(2716) InitializeLatchSupport
156 3
+4 3
+8 3
+37 3
cob=(3)
cfi=(3)
cfn=(2422)
calls=1 0 
* 5
* 1
* 2
+2 6
cob=(5)
cfi=(5)
cfn=(2428) fcntl
calls=1 0 
* 20
* 1
* 2
+2 6
cob=(5)
cfi=(5)
cfn=(2428)
calls=1 0 
* 20
* 1
* 2
+2 6
cob=(5)
cfi=(5)
cfn=(2428)
calls=1 0 
* 20
* 1
* 2
+2 6
cob=(5)
cfi=(5)
cfn=(2428)
calls=1 0 
* 20
* 1
* 2
+3 2
+1 2
+1 2
+4 2

fn=(2740)
543 5
+3 1
+8 1
+1 9
+3 9
+8 5
cfi=(13)
cfn=(2156)
calls=1 815 
* 284
* 1
+2 2
+1 1
+2 3
+1 9
+3 3
+1 9
+9 2
+1 3
+1 2
+4 2
cob=(1)
cfi=(1)
cfn=(223)
calls=1 0 
* 1373
* 5
* 2
+1 4
+25 1
+1 2

fn=(2844) OwnLatch
297 4
+9 4
+3 3
+1 2

fn=(5792) DisownLatch
317 3
+4 2
+1 2

fn=(3816)
954 32
+1 4
+3 4
+8 8
+7 12
cfi=(213) /home/mithuncy/fsm_code/src/backend/storage/ipc/../../../../src/include/pgstat.h
cfn=(3818) pgstat_report_wait_start
calls=4 1239 
* 64
+3 4
+5 4
+31 63
+2 6
+1 12
+2 33
-1 6
+2 6
+1 3
+1 3
+2 3
+8 28
cfn=(3824)
calls=4 +41 
* 1665
* 4
+3 8
+3 8
+3 14
-58 16
+68 4
+3 4
cfi=(213)
cfn=(3820) pgstat_report_wait_end
calls=4 1263 
* 56
+2 4
+1 8

fn=(5714)
1520 6
+2 2
+3 12
cob=(5)
cfi=(5)
cfn=(1568) write
calls=2 0 
* 14
* 2
* 2
+1 4
+20 4

fl=(248)
fn=(4460)
330 20
+3 12
cfi=(222)
cfn=(4336)
calls=4 78 
* 40
* 8
+2 12
+2 28
cfn=(4462) markTargetListOrigin
calls=4 +16 
* 64
-4 28
+6 8

fn=(4462)
353 28
+5 24
+1 4
+68 8

fn=(4476)
300 20
+3 12
cfi=(222)
cfn=(4336)
calls=4 78 
* 40
* 8
+2 12
+1 16
cfi=(250)
cfn=(4478)
calls=4 43 
* 96
* 4
+2 8
-5 28
+14 8

fn=(4442)
133 24
+1 4
+8 12
+2 12
cfi=(222)
cfn=(4336)
calls=4 -66 
* 40
* 8
+2 12
+7 8
+2 20
+14 20
+22 48
cfn=(4444) transformTargetEntry
calls=4 91 
* 735358
* 4
-1 16
cfi=(45)
cfn=(960)
calls=4 -61 
* 1098
* 4
-46 28
+61 16
+7 4
+1 8

fn=(4444)
91 40
+2 8
+7 8
+3 24
cfi=(249) /home/mithuncy/fsm_code/src/backend/parser/parse_expr.c
cfn=(4446) transformExpr
calls=4 +44 
* 734164
* 4
+3 24
+6 12
cfn=(4454) FigureColname
calls=4 1652 
* 201
* 4
+3 4
+1 20
-1 20
cfi=(221)
cfn=(4458)
calls=4 241 
* 817
+4 8

fn=(4454)
1652 16
+1 4
+2 20
cfn=(4456) FigureColnameInternal
calls=4 +36 
* 136
+1 12
+1 2
+2 3
+1 8

fn=(4456)
1691 20
+1 4
+2 8
+3 62
1928 2
1742 4
cfi=(222)
cfn=(3930) list_tail
calls=1 84 
* 10
* 4
+1 2
+2 4
+6 4
+5 1
1931 3
+1 8

fl=(295)
fn=(5076)
974 6
+10 2
+2 2
+1 2
+57 2

fl=(221)
fn=(5252) makeAlias
387 2500
+1 2000
cfi=(13)
cfn=(2950)
calls=500 853 
* 61000
* 2500
+2 1500
cfi=(13)
cfn=(928)
calls=500 1162 
* 80832
* 1000
+1 1500
+2 500
+1 1000

fn=(4338) makeA_Expr
33 24
+1 12
cfi=(13)
cfn=(2950)
calls=3 853 
* 470
* 15
+2 9
+1 9
+1 9
+1 9
+1 9
+1 3
+1 6

fn=(4458)
241 56
+1 28
cfi=(13)
cfn=(2950)
calls=7 853 
* 1187
* 35
+2 21
+1 21
+1 21
+7 14
+1 14
+1 14
+2 21
+2 7
+1 14

fn=(4480)
285 20
+1 16
cfi=(13)
cfn=(2950)
calls=4 853 
* 612
* 20
+2 12
+1 12
+1 4
+1 8

fn=(4452) makeConst
305 48
+1 16
cfi=(13)
cfn=(2950)
calls=4 853 
* 668
* 20
+7 24
+3 12
+1 12
+1 12
+1 12
+1 12
+1 12
+1 12
+1 8
+2 4
+1 8

fn=(3922) makeDefElem
546 3006
+1 2004
cfi=(13)
cfn=(2950)
calls=501 853 
* 83667
* 2505
+2 1002
+1 1503
+1 1503
+1 1002
+1 1503
+2 501
+1 1002

fn=(5206) makeRangeVar
422 3000
+1 2000
cfi=(13)
cfn=(2950)
calls=500 853 
* 90500
* 2500
+2 1000
+1 1500
+1 1500
+1 1000
+1 1000
+1 1000
+1 1500
+2 500
+1 1000

fn=(4340) makeFuncCall
585 12
+1 8
cfi=(13)
cfn=(2950)
calls=2 853 
* 376
* 10
+2 6
+1 6
+1 4
+1 4
+1 4
+1 4
+1 4
+1 4
+1 4
+1 6
+1 2
+1 4

fn=(5078) makeTypeNameFromNameList
456 4
+1 4
cfi=(13)
cfn=(2950)
calls=1 853 
* 181
* 5
+2 3
+1 2
+1 2
+1 2
+1 1
+1 2

fl=(291)
fn=(5092) typenameTypeIdAndMod
295 7
+3 6
cfn=(5094) typenameType
calls=1 -50 
* 53351
* 1
+1 10
+1 3
cfi=(151)
cfn=(3418)
calls=1 1161 
* 103
+1 2

fn=(4988)
581 6
+3 16
+1 4
+1 4

fn=(4960)
671 56
+7 56
cfi=(151)
cfn=(3444)
calls=14 1114 
* 4788
* 14
+1 28
+2 112
+1 56
+3 14
+6 42
+1 42
cfi=(151)
cfn=(3418)
calls=14 1161 
* 1442
+1 14
+1 28

fn=(4986)
622 6
+3 16
+1 4
+1 4

fn=(4990)
591 6
+3 16
+1 4
+1 4

fn=(5094)
248 8
+3 6
cfn=(5096) LookupTypeName
calls=1 59 
* 53317
* 1
+1 2
+6 11
+6 1
+1 5

fn=(5096)
59 10
+5 4
+5 4
+83 7
cfi=(55)
cfn=(4908)
calls=1 2792 
* 68
+2 3
+6 7
cfi=(226)
cfn=(4992)
calls=1 -13 
* 24
+2 5
cfi=(55)
cfn=(5098)
calls=1 2874 
* 18400
* 1
+1 2
+1 9
cfi=(151)
cfn=(3024)
calls=1 1227 
* 34366
* 2
+6 3
cfi=(226)
cfn=(5010)
calls=1 -8 
* 8
* 1
+9 4
+4 2
+7 4
cfi=(151)
cfn=(3444)
calls=1 1114 
* 342
* 1
+1 2
+3 6
cfn=(5100) typenameTypeMod
calls=1 316 
* 20
* 1
+2 2
+1 3
+2 1
+1 5

fn=(5100)
316 8
+10 4
+1 3
+82 5

fn=(4994)
636 12
+1 16
+1 6
+1 6
cfi=(275)
cfn=(4996) getTypeIOParam
calls=2 2049 
* 38
* 2
+2 12
cfi=(161)
cfn=(4998) OidInputFunctionCall
calls=2 1825 
* 692
+1 4

fn=(4984)
560 8
+3 8
cfi=(151)
cfn=(3444)
calls=2 1114 
* 684
* 2
+1 4
+2 2
+1 4

fl=(57)
fn=(1548)
232 864
+3 108
+7 216
+6 3
+15 2
+16 5
+11 540
cfn=(1550) is_log_level_output
calls=108 3439 
* 1719
* 108
+3 356
+8 48
+1 20
+2 85
+5 20
-5 2
+5 1032
+1 204
+6 18
+12 30
+21 36
+12 30
+1 1128
+1 18
+1 18
+1 18
+1 12
+5 24
cob=(3)
cfi=(3)
cfn=(1880)
calls=5 0 
* 134
cob=(1)
cfi=(1)
cfn=(223)
calls=1 0 
* 1335
* 10
* 6
+1 12
+3 18
+1 18
+1 18
+2 30
+2 24
+2 12
+1 3
+1 10
+3 10
+2 5
cob=(5)
cfi=(5)
cfn=(472)
calls=5 0 
* 15
* 5
* 1
cob=(5)
cfi=(5)
cfn=(472)
calls=1 0 
* 3
* 1
* 18
+5 18
+2 18
+1 6
+1 216

fn=(1550)
3439 456
+1 436
+2 40
+1 20
+2 208
+7 312
+1 4
+2 102
+1 228

fn=(2086)
1336 198
+1 90
+3 54
+5 54
+1 18
cob=(5)
cfi=(5)
cfn=(472)
calls=18 0 
* 54
* 18
* 54
+1 180
cfn=(1548)
calls=18 232 
* 1048
* 54
+1 18
+18 36

fn=(1150)
1897 10
+11 11
cob=(3)
cfi=(3)
cfn=(446)
calls=1 0 
* 22
* 1
* 2
+1 1
-1 2
+3 3
+5 3
+2 3
cob=(3)
cfi=(3)
cfn=(384)
calls=1 0 
* 242
* 1
* 1
+2 2
+2 4

fn=(1896)
411 66
+1 30
+5 18
+1 18
+1 18
+6 18
cfi=(79) /home/mithuncy/fsm_code/src/backend/utils/error/../../../../src/include/utils/palloc.h
cfn=(1884) MemoryContextSwitchTo
calls=6 110 
* 60
* 6
+7 30
+9 12
+33 15
+1 4
cfi=(58)
cfn=(5730)
calls=1 1637 
* 12
+3 6
cfn=(1898) EmitErrorReport
calls=6 1434 
* 64331
+3 24
+1 24
cfi=(13)
cfn=(952)
calls=6 1032 
* 510
+1 24
+2 24
+2 24
+2 24
+2 24
+2 24
+2 24
+2 24
+2 24
+2 24
+3 18
+3 18
cfi=(79)
cfn=(1884)
calls=6 110 
* 60
+1 18
+5 12
+8 3
+9 3
cob=(3)
cfi=(3)
cfn=(2562)
calls=1 0 
* 54
* 1
+1 3
cob=(3)
cfi=(3)
cfn=(2562)
calls=1 0 
* 54
* 1
+7 2
cfi=(67)
cfn=(5742)
calls=1 105 
* 70122
+3 10
+19 15
+1 10

fn=(1900) send_message_to_server_log
2852 42
+3 18
cfi=(80)
cfn=(1888)
calls=6 47 
* 738
+2 6
+1 6
+2 30
cfn=(1902) log_line_prefix
calls=6 2301 
* 43793
+1 24
cfn=(1928) error_severity
calls=6 3323 
* 90
* 12
cfn=(1930) err_gettext
calls=6 206 
* 36
* 36
cfi=(80)
cfn=(1926) appendStringInfo
calls=6 79 
* 2700
+2 18
+3 24
+1 36
cfn=(1932) append_with_tabs
calls=6 3374 
* 10098
* 6
+4 24
+3 24
+4 24
cfi=(80)
cfn=(1924) appendStringInfoChar
calls=6 176 
* 210
+2 18
+2 24
+7 24
+7 24
+7 24
+7 24
+7 18
+22 36
cfn=(1550)
calls=6 3439 
* 87
* 12
+1 6
-1 12
+12 24
+47 24
+7 18
+15 30
cfn=(1934) write_console
calls=6 2145 
* 1489
+4 18
+4 24
+25 18
cfi=(13)
cfn=(952)
calls=6 1032 
* 510
+2 36

fn=(1930)
206 21
+7 7
+2 14

fn=(1904) setup_formatted_log_time
2216 18
+4 24
+2 18
cob=(10)
cfi=(22)
cfn=(662) 0x000000005803d963
calls=6 0 
* 18
* 6
+1 6
+3 12
+10 30
cfi=(35) /home/mithuncy/fsm_code/src/timezone/localtime.c
cfn=(1048) pg_localtime
calls=6 1375 
* 6180
-3 30
cfi=(82) /home/mithuncy/fsm_code/src/timezone/strftime.c
cfn=(1906) pg_strftime
calls=6 123 
* 27267
+6 90
cfi=(17)
cfn=(1138)
calls=6 231 
* 3606
+1 30
cob=(3)
cfi=(3)
cfn=(856)
calls=6 0 
* 72
* 6
+1 12

fn=(5740) err_sendstring
3123 35
+1 7
cfn=(1886) in_error_recursion_trouble
calls=7 194 
* 49
* 14
+3 35
cfi=(191)
cfn=(3738)
calls=7 198 
* 1126
+1 14

fn=(1886)
194 26
+2 39
+1 26

fn=(1902)
2301 30
+15 24
+2 2
+1 4
+1 2
+2 6
+2 6
-2 12
+2 12
+3 18
+2 144
+3 168
cfi=(80)
cfn=(1924)
calls=24 176 
* 840
+1 24
+4 12
+1 48
+2 48
+22 48
+1 24
+5 108
+64 18
+3 36
cfi=(80)
cfn=(1926)
calls=6 79 
* 3684
+1 6
+8 6
cfn=(1904)
calls=6 2216 
* 37425
+1 18
+3 24
cfi=(80)
cfn=(1918)
calls=6 164 
* 768
+1 6
2327 210
2602 12

fn=(1932)
3374 30
+3 6
+2 7506
+1 556
-3 1988
+6 12

fn=(1882)
785 66
+1 30
+3 18
+1 18
+1 24
cfi=(79)
cfn=(1884)
calls=6 110 
* 60
* 6
+2 18
+1 6
cfn=(1886)
calls=6 194 
* 42
* 30
cfi=(80)
cfn=(1888)
calls=6 47 
* 769
* 6
cob=(5)
cfi=(5)
cfn=(472)
calls=6 0 
* 18
* 6
* 90
cfi=(80)
cfn=(1892) appendStringInfoVA
calls=6 121 
* 3800
* 66
cfi=(13)
cfn=(928)
calls=6 1162 
* 1067
* 30
cfi=(13)
cfn=(952)
calls=6 1032 
* 510
+2 18
cfi=(79)
cfn=(1884)
calls=6 110 
* 60
+1 18
+1 6
+1 12

fn=(1898)
1434 18
+1 30
+3 18
+1 18
+1 24
cfi=(79)
cfn=(1884)
calls=6 110 
* 60
* 6
+21 42
+4 24
+1 18
cfn=(1900)
calls=6 2852 
* 60495
+3 24
+1 3
cfn=(5732) send_message_to_frontend
calls=1 3135 
* 3443
+2 18
cfi=(79)
cfn=(1884)
calls=6 110 
* 60
+1 18
+1 12

fn=(5732)
3135 5
+4 9
cfi=(191)
cfn=(3430)
calls=1 88 
* 137
+2 4
+8 4
cfn=(1928)
calls=1 3323 
* 15
* 1
+1 4
cfi=(320) /home/mithuncy/fsm_code/src/backend/utils/error/../../../../src/include/libpq/pqformat.h
cfn=(5734) pq_sendbyte
calls=1 162 
* 88
+1 3
cfn=(1930)
calls=1 206 
* 6
* 5
cfn=(5740)
calls=1 -28 
* 182
+1 4
cfi=(320)
cfn=(5734)
calls=1 162 
* 88
+1 5
cfn=(5740)
calls=1 -30 
* 182
+3 3
+1 2
+2 30
+1 5
-3 17
+5 3
+2 4
cfi=(320)
cfn=(5734)
calls=1 162 
* 88
+1 5
cfn=(5740)
calls=1 -42 
* 178
+3 4
cfi=(320)
cfn=(5734)
calls=1 162 
* 88
+1 4
+1 6
cfn=(5740)
calls=1 -47 
* 194
* 1
+4 4
+8 4
+6 4
+6 4
+6 4
+6 4
+6 4
+6 4
+6 4
+7 4
+7 4
+6 4
+2 4
cfi=(320)
cfn=(5734)
calls=1 162 
* 88
+1 6
cfn=(5740)
calls=1 3123 
* 182
+3 4
+2 9
cfi=(17)
cfn=(462)
calls=1 203 
* 489
+1 4
cfi=(320)
cfn=(5734)
calls=1 162 
* 88
+1 5
cfn=(5740)
calls=1 3123 
* 178
+3 4
+2 4
cfi=(320)
cfn=(5734)
calls=1 162 
* 88
+1 6
cfn=(5740)
calls=1 3123 
* 184
+3 4
cfi=(320)
cfn=(5734)
calls=1 162 
* 88
* 1
+33 3
cfi=(191)
cfn=(3436)
calls=1 299 
* 389
+10 3
cfi=(58)
cfn=(3800)
calls=1 1401 
* 186
+1 4

fn=(1928)
3323 21
+3 49
+11 5
+1 5
+14 2
+1 2
+9 7
+1 14

fn=(2084)
1286 108
+4 54
+8 108
+13 90
+1 36
+5 72
cob=(3)
cfi=(3)
cfn=(1880)
calls=18 0 
* 317
* 18
* 18
+1 36
+3 54
+1 54
+1 54
+2 18
cob=(5)
cfi=(5)
cfn=(472)
calls=18 0 
* 54
* 18
* 54
+3 54
+1 36

fn=(2820) DebugFileOpen
1846 4
+4 3
+37 4

fn=(5728) errcode
571 4
+1 5
+3 3
+2 3
+2 1
+1 2

fn=(1934)
2145 36
+62 30
cob=(3)
cfi=(3)
cfn=(1940)
calls=5 0 
* 30
cob=(1)
cfi=(1)
cfn=(223)
calls=1 0 
* 1275
* 10
* 30
cob=(5)
cfi=(5)
cfn=(1568)
calls=6 0 
* 42
* 6
* 6
+2 24

fl=(83)
fn=(1992)
97 6
+1 1
+2 4
+7 1
cfi=(84)
cfn=(1994) ProcGlobalSemas
calls=1 +22 
* 6
* 1
+1 1
cfi=(85) /home/mithuncy/fsm_code/src/backend/storage/lmgr/spin.c
cfn=(1996) SpinlockSemas
calls=1 -57 
* 5
* 1
+11 1
+1 3
cfi=(86) /home/mithuncy/fsm_code/src/backend/port/pg_sema.c
cfn=(1998) PGSemaphoreShmemSize
calls=1 +45 
* 34
* 5
cfi=(87)
cfn=(2002)
calls=1 476 
* 21
* 1
+1 1
cfi=(85)
cfn=(2004) SpinlockSemaSize
calls=1 -81 
* 12
* 5
cfi=(87)
cfn=(2002)
calls=1 476 
* 21
* 1
+1 3
cfi=(31)
cfn=(2006)
calls=1 733 
* 368
* 5
cfi=(87)
cfn=(2002)
calls=1 476 
* 21
* 1
+2 1
cfi=(88) /home/mithuncy/fsm_code/src/backend/storage/buffer/buf_init.c
cfn=(2010) BufferShmemSize
calls=1 +38 
* 823
* 5
cfi=(87)
cfn=(2002)
calls=1 476 
* 21
* 1
+1 1
cfi=(91)
cfn=(2016)
calls=1 3437 
* 1031
* 5
cfi=(87)
cfn=(2002)
calls=1 476 
* 21
* 1
+1 1
cfi=(92)
cfn=(2018) PredicateLockShmemSize
calls=1 1266 
* 1752
* 5
cfi=(87)
cfn=(2002)
calls=1 476 
* 21
* 1
+1 1
cfi=(84)
cfn=(2022) ProcGlobalShmemSize
calls=1 -24 
* 367
* 5
cfi=(87)
cfn=(2002)
calls=1 476 
* 21
* 1
+1 1
cfi=(53)
cfn=(2024) XLOGShmemSize
calls=1 4945 
* 2898
* 5
cfi=(87)
cfn=(2002)
calls=1 476 
* 21
* 1
+1 1
cfi=(94) /home/mithuncy/fsm_code/src/backend/access/transam/clog.c
cfn=(2028) CLOGShmemSize
calls=1 693 
* 88
* 5
cfi=(87)
cfn=(2002)
calls=1 476 
* 21
* 1
+1 1
cfi=(95) /home/mithuncy/fsm_code/src/backend/access/transam/commit_ts.c
cfn=(2032) CommitTsShmemSize
calls=1 480 
* 82
* 5
cfi=(87)
cfn=(2002)
calls=1 476 
* 21
* 1
+1 1
cfi=(96) /home/mithuncy/fsm_code/src/backend/access/transam/subtrans.c
cfn=(2036) SUBTRANSShmemSize
calls=1 +55 
* 59
* 5
cfi=(87)
cfn=(2002)
calls=1 476 
* 21
* 1
+1 1
cfi=(97) /home/mithuncy/fsm_code/src/backend/access/transam/twophase.c
cfn=(2038) TwoPhaseShmemSize
calls=1 237 
* 103
* 5
cfi=(87)
cfn=(2002)
calls=1 476 
* 21
* 1
+1 1
cfi=(73)
cfn=(2040)
calls=1 +11 
* 62
* 5
cfi=(87)
cfn=(2002)
calls=1 476 
* 21
* 1
+1 1
cfi=(98) /home/mithuncy/fsm_code/src/backend/access/transam/multixact.c
cfn=(2042) MultiXactShmemSize
calls=1 1804 
* 225
* 5
cfi=(87)
cfn=(2002)
calls=1 476 
* 21
* 1
+1 1
cfi=(99)
cfn=(2044) LWLockShmemSize
calls=1 350 
* 127
* 5
cfi=(87)
cfn=(2002)
calls=1 476 
* 21
* 1
+1 1
cfi=(100) /home/mithuncy/fsm_code/src/backend/storage/ipc/procarray.c
cfn=(2048) ProcArrayShmemSize
calls=1 +45 
* 187
* 5
cfi=(87)
cfn=(2002)
calls=1 476 
* 21
* 1
+1 1
cfi=(38)
cfn=(2050) BackendStatusShmemSize
calls=1 2609 
* 206
* 5
cfi=(87)
cfn=(2002)
calls=1 476 
* 21
* 1
+1 1
cfi=(101)
cfn=(2052) SInvalShmemSize
calls=1 +67 
* 62
* 5
cfi=(87)
cfn=(2002)
calls=1 476 
* 21
* 1
+1 1
cfi=(102)
cfn=(2054) PMSignalShmemSize
calls=1 -25 
* 73
* 5
cfi=(87)
cfn=(2002)
calls=1 476 
* 21
* 1
+1 1
cfi=(103)
cfn=(2058)
calls=1 -65 
* 13
* 5
cfi=(87)
cfn=(2002)
calls=1 476 
* 21
* 1
+1 1
cfi=(104) /home/mithuncy/fsm_code/src/backend/postmaster/checkpointer.c
cfn=(2060) CheckpointerShmemSize
calls=1 880 
* 62
* 5
cfi=(87)
cfn=(2002)
calls=1 476 
* 21
* 1
+1 1
cfi=(105)
cfn=(2062) AutoVacuumShmemSize
calls=1 3289 
* 66
* 5
cfi=(87)
cfn=(2002)
calls=1 476 
* 21
* 1
+1 1
cfi=(106) /home/mithuncy/fsm_code/src/backend/replication/slot.c
cfn=(2064) ReplicationSlotsShmemSize
calls=1 -28 
* 66
* 5
cfi=(87)
cfn=(2002)
calls=1 476 
* 21
* 1
+1 1
cfi=(107) /home/mithuncy/fsm_code/src/backend/replication/logical/origin.c
cfn=(2066) ReplicationOriginShmemSize
calls=1 476 
* 91
* 5
cfi=(87)
cfn=(2002)
calls=1 476 
* 21
* 1
+1 1
cfi=(108)
cfn=(2068)
calls=1 3028 
* 63
* 5
cfi=(87)
cfn=(2002)
calls=1 476 
* 21
* 1
+1 1
cfi=(109) /home/mithuncy/fsm_code/src/backend/replication/walreceiverfuncs.c
cfn=(2070) WalRcvShmemSize
calls=1 43 
* 33
* 5
cfi=(87)
cfn=(2002)
calls=1 476 
* 21
* 1
+1 1
cfi=(72)
cfn=(2072) ApplyLauncherShmemSize
calls=1 770 
* 66
* 5
cfi=(87)
cfn=(2002)
calls=1 476 
* 21
* 1
+1 1
cfi=(110) /home/mithuncy/fsm_code/src/backend/utils/time/snapmgr.c
cfn=(2074) SnapMgrShmemSize
calls=1 252 
* 10
* 5
cfi=(87)
cfn=(2002)
calls=1 476 
* 21
* 1
+1 1
cfi=(111)
cfn=(2076)
calls=1 2014 
* 62
* 5
cfi=(87)
cfn=(2002)
calls=1 476 
* 21
* 1
+1 1
cfi=(112) /home/mithuncy/fsm_code/src/backend/access/heap/syncscan.c
cfn=(2078) SyncScanShmemSize
calls=1 -23 
* 5
* 5
cfi=(87)
cfn=(2002)
calls=1 476 
* 21
* 1
+1 1
cfi=(113) /home/mithuncy/fsm_code/src/backend/commands/async.c
cfn=(2080) AsyncShmemSize
calls=1 427 
* 144
* 5
cfi=(87)
cfn=(2002)
calls=1 476 
* 21
* 1
+1 1
cfi=(114) /home/mithuncy/fsm_code/src/backend/utils/misc/backend_random.c
cfn=(2082) BackendRandomShmemSize
calls=1 42 
* 5
* 5
cfi=(87)
cfn=(2002)
calls=1 476 
* 21
* 1
+6 1
+1 5
cfi=(87)
cfn=(2002)
calls=1 476 
* 21
* 1
+3 10
cfi=(87)
cfn=(2002)
calls=1 476 
* 21
* 1
+2 4
cfi=(57)
cfn=(2084)
calls=1 1286 
* 68
* 6
cfi=(57)
cfn=(2086)
calls=1 1336 
* 96
+5 6
cfi=(115) /home/mithuncy/fsm_code/src/backend/port/pg_shmem.c
cfn=(2088) PGSharedMemoryCreate
calls=1 560 
* 34623
* 1
+2 3
cfi=(87)
cfn=(2126) InitShmemAccess
calls=1 -73 
* 16
+5 5
cfi=(86)
cfn=(2128) PGReserveSemaphores
calls=1 +24 
* 120
+27 5
+1 1
cfi=(87)
cfn=(2132) InitShmemAllocation
calls=1 -91 
* 153
+6 1
cfi=(99)
cfn=(2140) CreateLWLocks
calls=1 382 
* 17679
+5 1
cfi=(87)
cfn=(2160) InitShmemIndex
calls=1 +58 
* 3251
+5 1
cfi=(53)
cfn=(2190) XLOGShmemInit
calls=1 4986 
* 462330
+1 1
cfi=(94)
cfn=(2194) CLOGShmemInit
calls=1 699 
* 4713
+1 1
cfi=(95)
cfn=(2198) CommitTsShmemInit
calls=1 491 
* 4415
+1 1
cfi=(96)
cfn=(2200) SUBTRANSShmemInit
calls=1 -31 
* 4819
+1 1
cfi=(98)
cfn=(2202) MultiXactShmemInit
calls=1 1821 
* 7389
+1 1
cfi=(88)
cfn=(2204) InitBufferPool
calls=1 69 
* 3666463
+5 1
cfi=(91)
cfn=(2220)
calls=1 378 
* 157412
+5 1
cfi=(92)
cfn=(2222) InitPredicateLocks
calls=1 1063 
* 648914
+5 4
+1 1
cfi=(84)
cfn=(2240) InitProcGlobal
calls=1 -78 
* 99625
+1 1
cfi=(100)
cfn=(2254) CreateSharedProcArray
calls=1 -19 
* 3325
+1 1
cfi=(38)
cfn=(2256) CreateSharedBackendStatus
calls=1 2637 
* 30983
+1 1
cfi=(97)
cfn=(2258) TwoPhaseShmemInit
calls=1 +9 
* 1325
+1 1
cfi=(73)
cfn=(2260)
calls=1 -85 
* 1455
+5 1
cfi=(101)
cfn=(2262) CreateSharedInvalidationState
calls=1 -30 
* 7107
+5 1
cfi=(102)
cfn=(2264) PMSignalShmemInit
calls=1 129 
* 1260
+1 1
cfi=(103)
cfn=(2266)
calls=1 85 
* 1627
+1 1
cfi=(104)
cfn=(2268) CheckpointerShmemInit
calls=1 899 
* 37047
+1 1
cfi=(105)
cfn=(2270) AutoVacuumShmemInit
calls=1 3308 
* 1866
+1 1
cfi=(106)
cfn=(2276) ReplicationSlotsShmemInit
calls=1 133 
* 2634
+1 1
cfi=(107)
cfn=(2280) ReplicationOriginShmemInit
calls=1 496 
* 3084
+1 1
cfi=(108)
cfn=(2282)
calls=1 3040 
* 1567
+1 1
cfi=(109)
cfn=(2284) WalRcvShmemInit
calls=1 54 
* 1370
+1 1
cfi=(72)
cfn=(2286) ApplyLauncherShmemInit
calls=1 818 
* 1720
+5 1
cfi=(110)
cfn=(2288) SnapMgrInit
calls=1 * 
* 1135
+1 1
cfi=(111)
cfn=(2290)
calls=1 2027 
* 2465
+1 1
cfi=(112)
cfn=(2296) SyncScanShmemInit
calls=1 136 
* 2104
+1 1
cfi=(113)
cfn=(2298) AsyncShmemInit
calls=1 444 
* 13694
+1 1
cfi=(114)
cfn=(2334) BackendRandomShmemInit
calls=1 48 
* 4
+12 4
+1 3
cfi=(129)
cfn=(2336)
calls=1 146 
* 13368
+5 3
+2 2

fl=(165) /home/mithuncy/fsm_code/src/backend/executor/spi.c
fn=(4582) _SPI_make_plan_non_temp
2664 12
+2 9
+15 21
cfi=(14)
cfn=(432)
calls=3 395 
* 1859
* 3
+3 9
cfi=(236) /home/mithuncy/fsm_code/src/backend/executor/../../../src/include/utils/palloc.h
cfn=(4188) MemoryContextSwitchTo
calls=3 110 
* 30
* 3
+3 6
cfi=(13)
cfn=(2546)
calls=3 956 
* 582
* 3
+1 6
+1 9
+1 12
+1 12
+1 12
+6 6
+1 12
+1 12
+8 12
cfi=(245)
cfn=(4416)
calls=3 78 
* 30
* 6
+2 9
+2 15
cfi=(154) /home/mithuncy/fsm_code/src/backend/utils/cache/plancache.c
cfn=(4584) CachedPlanSetParentContext
calls=3 1292 
* 231
+3 18
cfi=(45)
cfn=(960)
calls=3 129 
* 870
* 6
-7 21
+10 9
cfi=(236)
cfn=(4188)
calls=3 110 
* 30
+3 6
+2 3
+1 6

fn=(4610) SPI_plan_get_cached_plan
1738 2020
+8 2020
+4 2020
cfi=(245)
cfn=(4612) list_length
calls=505 90 
* 5050
* 1010
+2 2020
cfi=(245)
cfn=(4416)
calls=505 78 
* 5050
* 1010
+3 505
+1 1515
+1 1010
+1 1010
+4 505
-1 4040
cfi=(154)
cfn=(4614) GetCachedPlan
calls=505 1143 
* 546791
* 505
+5 1010
+2 505
+1 1010

fn=(5202) SPI_execute
436 3500
+4 2000
+3 1000
cfn=(4410) _SPI_begin_call
calls=500 2600 
* 23000
* 500
+1 1000
+3 2500
cob=(3)
cfi=(3)
cfn=(828)
calls=500 0 
* 8000
* 500
+1 500
+1 500
+2 2500
cfn=(5204) _SPI_prepare_oneshot_plan
calls=500 1982 
* 6724064
+2 5500
cfn=(5212) _SPI_execute_plan
calls=500 2042 
* 359376323
* 500
+4 1000
cfn=(4586) _SPI_end_call
calls=500 2624 
* 195161
+1 500
+1 1000

fn=(3696) AtEOXact_SPI
303 14
+2 6
+3 10
+6 2
cfn=(3698) SPICleanup
calls=2 -25 
* 18
+1 10

fn=(4604) SPI_plan_get_plan_sources
1722 9
+2 6
+1 6

fn=(2980) SPI_inside_nonatomic_context
424 4
+1 6
+1 4
+4 4

fn=(3698)
289 4
+1 2
+1 2
+2 2
+1 2
+1 2
+1 4

fn=(4410)
2600 3024
+1 1512
+3 1008
+3 1006
cfi=(26)
cfn=(736)
calls=503 624 
* 4024
* 503
+2 503
cfn=(4412) _SPI_execmem
calls=503 -28 
* 9054
+3 504
+1 2016

fn=(4414) _SPI_prepare_plan
1877 15
+9 3
+1 6
+1 6
+1 6
+5 9
cfi=(52)
cfn=(3880) pg_parse_query
calls=3 633 
* 34235
* 3
+6 3
+2 9
cfi=(245)
cfn=(4416)
calls=3 78 
* 30
* 6
+2 9
+8 12
cfi=(224)
cfn=(3944)
calls=3 2083 
* 51
* 18
cfi=(154)
cfn=(4418) CreateCachedPlan
calls=3 170 
* 13906
* 3
+8 12
+7 3
-4 30
cfi=(52)
cfn=(4432) pg_analyze_and_rewrite_params
calls=3 722 
* 609813
* 6
+16 57
cfi=(154)
cfn=(4512) CompleteCachedPlan
calls=3 348 
* 71559
+10 15
cfi=(45)
cfn=(960)
calls=3 129 
* 870
* 3
-47 21
+50 9
+1 6
+5 6
+1 6

fn=(5204)
1982 2500
+9 500
+1 1000
+1 1000
+1 1000
+5 1500
cfi=(52)
cfn=(3880)
calls=500 633 
* 6342064
* 500
+5 500
+2 1500
cfi=(245)
cfn=(4416)
calls=500 78 
* 5000
* 1000
+2 1500
+3 2000
cfi=(224)
cfn=(3944)
calls=500 +72 
* 8500
* 3000
cfi=(154)
cfn=(5210) CreateOneShotCachedPlan
calls=500 253 
* 194500
* 500
+4 2500
cfi=(45)
cfn=(960)
calls=500 129 
* 145000
* 500
-9 3500
+12 1500
+1 1000
+5 1000
+1 1000

fn=(4408) SPI_prepare_params
658 21
+4 6
+6 6
cfn=(4410)
calls=3 2600 
* 138
* 3
+1 9
+3 15
cob=(3)
cfi=(3)
cfn=(828)
calls=3 0 
* 48
* 3
+1 3
+1 6
+1 3
+1 3
+1 6
+1 6
+2 15
cfn=(4414)
calls=3 1877 
* 730746
+3 9
cfn=(4582)
calls=3 2664 
* 3890
* 3
+2 6
cfn=(4586)
calls=3 2624 
* 690
+2 3
+1 6

fn=(4586)
2624 2515
+1 1006
+3 503
cfn=(4588) _SPI_procmem
calls=503 -41 
* 9054
+2 1006
+2 2012
cfi=(13)
cfn=(3758) MemoryContextReset
calls=503 137 
* 178246
+3 503
+1 1006

fn=(4592) SPI_keepplan
692 12
+3 18
+1 6
-1 6
+1 12
+8 6
+1 18
cfi=(13)
cfn=(1400) MemoryContextSetParent
calls=3 355 
* 177
+2 12
cfi=(245)
cfn=(4416)
calls=3 78 
* 30
* 6
+2 9
+2 9
cfi=(154)
cfn=(4594) SaveCachedPlan
calls=3 456 
* 354
-4 21
+7 3
+1 6

fn=(5544) SPI_freetuptable
1102 4000
+1 1000
+3 2000
+1 1000
+44 2000

fn=(5594) SPI_freeplan
741 12
+3 18
+4 12
cfi=(245)
cfn=(4416)
calls=3 78 
* 30
* 6
+2 9
+2 9
cfi=(154)
cfn=(5596) DropCachedPlan
calls=3 500 
* 4121
-4 21
+8 12
cfi=(13)
cfn=(1396)
calls=3 212 
* 910
+2 3
+1 6

fn=(5212)
2042 6000
+1 500
+1 500
+1 500
+1 500
+1 500
+2 500
+6 500
+1 500
+1 1000
+1 1000
+24 1000
+15 2000
cfi=(245)
cfn=(4416)
calls=500 78 
* 5000
* 1000
+2 1500
+4 1500
+5 2000
+2 1500
+1 1500
+7 1000
+2 2000
+15 500
-4 5000
cfi=(52)
cfn=(3950) pg_analyze_and_rewrite
calls=500 683 
* 617500
* 500
+8 9500
cfi=(154)
cfn=(4512)
calls=500 348 
* 93000
+15 4500
cfi=(154)
cfn=(4614)
calls=500 1143 
* 510500
* 500
+1 1500
+6 5500
+2 1000
+2 500
cfi=(110)
cfn=(2998) GetTransactionSnapshot
calls=500 305 
* 292414
* 1000
cfi=(110)
cfn=(3996) PushActiveSnapshot
calls=500 734 
* 163500
+1 500
+3 1500
cfi=(245)
cfn=(4416)
calls=500 78 
* 5000
* 1000
+2 1500
+1 1500
+3 1000
+1 1000
+2 2000
+2 2500
+2 1500
+2 2000
+3 500
+10 1000
+7 500
cfi=(26)
cfn=(1210)
calls=500 910 
* 4000
* 1000
+7 4500
+2 500
cfi=(26)
cfn=(4830) CommandCounterIncrement
calls=500 919 
* 5500
+1 500
cfi=(110)
cfn=(5214) UpdateActiveSnapshotCommandId
calls=500 782 
* 18000
+3 3000
cfi=(212) /home/mithuncy/fsm_code/src/backend/tcop/dest.c
cfn=(3982) CreateDestReceiver
calls=500 114 
* 6500
* 500
+2 2000
+32 4500
+1 1000
+8 500
-4 5500
cfi=(224)
cfn=(4001)
calls=500 345 
* 357263121
+9 2000
+4 500
+6 2500
+25 2500
+3 3500
cfi=(298) /home/mithuncy/fsm_code/src/backend/utils/adt/numutils.c
cfn=(5538) pg_strtouint64
calls=500 559 
* 81788
* 500
+10 1000
+2 1500
+1 1500
cfn=(5544)
calls=500 1102 
* 5000
+1 1500
+1 1500
+8 1000
2169 3500
2334 3500
cfi=(154)
cfn=(4792) ReleaseCachedPlan
calls=500 1263 
* 13000
+1 500
+7 2000
+1 500
cfi=(26)
cfn=(4830)
calls=500 919 
* 39000
2097 3500
2349 1000
+1 500
cfi=(110)
cfn=(4848) PopActiveSnapshot
calls=500 813 
* 112000
+3 1000
+6 1000
+3 1000
+1 1000
+3 1000
+7 1000
+3 500
+1 2000

fn=(4184) SPI_connect_ext
96 5
+4 3
+2 6
+2 1
+2 13
cfi=(13)
cfn=(798)
calls=1 772 
* 91
-1 1
+3 3
+17 3
+3 11
+1 2
+1 2
+1 2
+1 4
cfi=(235) /home/mithuncy/fsm_code/src/backend/executor/../../../src/include/lib/ilist.h
cfn=(4186) slist_init
calls=1 555 
* 7
+1 2
+1 2
+1 2
cfi=(26)
cfn=(736)
calls=1 624 
* 8
* 1
+1 2
+1 6
+1 2
+1 3
+1 3
+1 3
+14 12
cfi=(14)
cfn=(432)
calls=1 395 
* 424
* 1
+3 13
cfi=(14)
cfn=(432)
calls=1 395 
* 424
* 1
+4 5
cfi=(236)
cfn=(4188)
calls=1 -52 
* 10
* 1
+6 1
+1 1
+1 1
+2 1
+1 4

fn=(4412)
2581 1006
+1 2012
cfi=(236)
cfn=(4188)
calls=503 110 
* 5030
+1 1006

fn=(4588)
2587 1006
+1 2012
cfi=(236)
cfn=(4188)
calls=503 110 
* 5030
+1 1006

fn=(5606) SPI_finish
177 3
+3 2
cfn=(4410)
calls=1 2600 
* 16
* 1
+1 2
+4 4
cfi=(236)
cfn=(4188)
calls=1 -75 
* 10
+3 4
cfi=(13)
cfn=(1396)
calls=1 +24 
* 119
+1 2
+1 4
cfi=(13)
cfn=(1396)
calls=1 +22 
* 877
+1 2
+6 3
+1 3
+1 3
+3 3
+1 3
+1 2
+4 1
+1 2

fl=(243)
fn=(5340) MakePerTupleExprContext
415 2000
+1 2000
+1 1500
cfn=(4380) CreateExprContext
calls=500 242 
* 369317
* 1000
+2 1000
+1 1000

fn=(5526) FreeExprContext
373 3006
+4 2505
cfn=(5528) ShutdownExprContext
calls=501 926 
* 6513
+2 2004
cfi=(13)
cfn=(1396)
calls=501 212 
* 284876
+2 1503
+1 1002
+1 3006
cfi=(45)
cfn=(5532) list_delete_ptr
calls=501 591 
* 137775
* 1002
+3 1503
cfi=(13)
cfn=(952)
calls=501 1032 
* 42585
+1 1002

fn=(4574)
1091 16
+1 4
+3 12
cfi=(245)
cfn=(4416)
calls=4 78 
* 40
* 8
+2 12
+2 20
+1 4
-5 28
+7 4
+1 8

fn=(4366) CreateExecutorState
86 1503
+8 3507
cfi=(14)
cfn=(432)
calls=501 395 
* 56281
* 501
+8 1503
cfi=(236)
cfn=(4188)
calls=501 +8 
* 5010
* 501
+2 2004
cfi=(13)
cfn=(2950)
calls=501 853 
* 213426
* 2505
+5 1002
+1 1002
+1 1002
+1 1002
+1 1002
+1 1002
+1 1002
+1 1002
+1 1002
+2 1002
+2 1002
+2 1002
+1 1002
+1 1002
+2 1002
+1 1002
+2 1002
+2 1002
+1 1002
+1 1002
+1 1002
+2 1002
+1 1002
+2 1002
+2 1503
+2 1002
+2 1002
+2 1002
+1 1002
+1 1002
+2 1002
+2 1002
+2 1002
+2 1002
+2 1002
+1 1002
+1 1002
+1 1002
+2 1002
+2 1002
+1 1002
+5 1503
cfi=(236)
cfn=(4188)
calls=501 -63 
* 5010
+2 501
+1 1002

fn=(4380)
242 2004
+5 2004
cfi=(236)
cfn=(4188)
calls=501 110 
* 5010
* 501
+2 2004
cfi=(13)
cfn=(2950)
calls=501 853 
* 122244
* 2505
+3 1002
+1 1002
+1 1002
+2 2004
+6 4008
cfi=(14)
cfn=(432)
calls=501 395 
* 54241
-1 1002
+5 2004
+1 2004
+2 1002
+1 1002
+2 1002
+1 1002
+2 1002
+1 1002
+2 1503
+2 1002
+7 3006
cfi=(45)
cfn=(1586)
calls=501 -27 
* 145290
* 1002
+2 1503
cfi=(236)
cfn=(4188)
calls=501 110 
* 5010
+2 501
+1 1002

fn=(5524) FreeExecutorState
195 2004
+7 501
+6 2000
cfi=(245)
cfn=(4416)
calls=500 78 
* 5000
* 2000
cfn=(5526)
calls=500 373 
* 487759
-6 4004
+12 2004
+10 2004
cfi=(13)
cfn=(1396)
calls=501 -12 
* 151435
+1 1002

fn=(5528)
926 3006
+5 2004
+1 501
+20 1002

fn=(5314) ExecInitRangeTable
720 2500
+5 1500
+3 1500
cfi=(245)
cfn=(4612)
calls=500 90 
* 5000
* 1500
+2 3000
cfi=(13)
cfn=(940)
calls=500 925 
* 55000
-1 1000
+2 500
+1 1500
cfi=(245)
cfn=(4416)
calls=500 78 
* 5000
* 1000
+2 5500
-2 3500
+11 3000
cfi=(13)
cfn=(2546)
calls=500 956 
* 69500
-1 1000
+7 1000
+1 1000

fl=(266)
fn=(4676)
71 15
+1 9
+1 9
+1 9
+1 9
+1 3
+1 3
+9 6
+22 12
+8 9
+1 12
+9 12
cfi=(264) /home/mithuncy/fsm_code/src/backend/optimizer/prep/../../../../src/include/nodes/pg_list.h
cfn=(4648) list_head
calls=3 -48 
* 24
* 12
+67 12
+35 12
+7 6
+3 3
+1 12

fl=(204) /home/mithuncy/fsm_code/src/backend/libpq/be-fsstubs.c
fn=(3636) AtEOXact_LargeObject
584 10
+3 6
+1 2
+26 4

fl=(9)
fn=(354)
0 16
cob=(2)
cfi=(2)
cfn=(356) 0x00000000004763e8
calls=1 0 
0 6
0 7
cfn=(360) 0x0000000000477400
calls=1 0 
0 15
0 11

fn=(5822)
0 5
cfn=(5826) 0x0000000000477370
calls=1 0 
0 8
0 3

fn=(340)
0 11
cob=(1)
cfi=(1)
cfn=(222)
calls=1 0 
0 391871070
0 5

fn=(1580)
0 6
cob=(1)
cfi=(1)
cfn=(223)
calls=1 0 
0 1433
0 5

fn=(360)
0 15

fn=(512) lstat
0 8
cob=(3)
cfi=(3)
cfn=(518)
calls=1 0 
0 10
cob=(1)
cfi=(1)
cfn=(223)
calls=1 0 
0 1301
0 6

fn=(490)
0 52
cob=(3)
cfi=(3)
cfn=(496)
calls=12 0 
0 140
cob=(1)
cfi=(1)
cfn=(223)
calls=1 0 
0 1294
0 17

fn=(5292) fstat
0 2000
cob=(3)
cfi=(3)
cfn=(596)
calls=499 0 
0 4990
cob=(1)
cfi=(1)
cfn=(223)
calls=1 0 
0 1301
0 504

fn=(5826)
0 8

fl=(213)
fn=(3820)
1263 8
+1 8
+2 24
+7 8
+1 8

fn=(3818)
1239 12
+1 8
+2 24
+7 12
+1 8

fl=(256)
fn=(4910)
90 21
+1 35
+1 14

fn=(4536)
78 4635
+1 7725
+1 3090

fl=(301) /home/mithuncy/fsm_code/src/backend/access/heap/tuptoaster.c
fn=(5238) heap_tuple_untoast_attr
173 2000
+1 2000
+15 2000
+26 2000
+9 3000
+7 3000
+5 3500
+1 1500
+3 1500
cfi=(13)
cfn=(940)
calls=500 925 
* 46000
* 500
+1 2000
+1 4000
cob=(3)
cfi=(3)
cfn=(856)
calls=500 0 
* 12000
* 500
+1 1000
+3 500
+1 1000

fl=(60)
fn=(1272) ProcessConfigFileInternal
173 24
+1 3
+1 3
+8 6
+1 9
+2 39
cfn=(1274) ParseConfigFile
calls=3 566 
* 4489849
* 9
+15 9
+2 24
cfn=(1274)
calls=2 566 
* 27103
* 6
+20 1
+5 3
+2 65
+1 65
cob=(3)
cfi=(3)
cfn=(446)
calls=13 0 
* 560
* 13
-1 26
-2 67
+7 2
+2 4
+9 3
+1 1
+8 4
+2 4396
+2 3768
-4 2518
+20 6
+5 112
+7 168
cfi=(29)
cfn=(1212)
calls=28 4869 
* 35242
* 28
+2 56
+3 140
+17 196
-34 144
+54 4
+4 2
+8 4
+2 4396
+3 2512
+1 42
-1 28
+2 628
-7 2518
+67 6
+2 1
cfi=(29)
cfn=(1228)
calls=1 5020 
* 3797
+1 1
cfi=(29)
cfn=(1470)
calls=1 10789 
* 792984
+2 1
cfi=(19)
cfn=(2650) GetDatabaseEncodingName
calls=1 1011 
* 6
* 5
cfi=(29)
cfn=(1206)
calls=1 7172 
* 3552
+7 6
+2 28
+4 112
+4 140
+2 84
cfi=(29)
cfn=(2652)
calls=14 7195 
* 20066
* 14
+3 28
+3 42
cfi=(13)
cfn=(928)
calls=14 1162 
* 2241
* 14
+3 182
cfi=(29)
cfn=(1208)
calls=14 6409 
* 60236
* 182
cfi=(29)
cfn=(1208)
calls=14 6409 
* 1317359
* 28
+3 56
+3 50
+2 66
cfi=(29)
cfn=(2652)
calls=11 7195 
* 14966
* 11
+2 22
+2 55
cob=(3)
cfi=(3)
cfn=(446)
calls=11 0 
* 359
* 11
* 22
+5 75
+2 6
+9 6
+9 112
+1 252
cfi=(29)
cfn=(1416)
calls=28 7137 
* 45811
+3 56
+1 42
cfi=(13)
cfn=(952)
calls=14 1032 
* 1112
-63 144
+67 4
+1 2
cfi=(21)
cfn=(656)
calls=2 1571 
* 44
* 2
+3 6
+21 3
+1 12

fn=(1274)
566 55
+2 5
+8 10
+12 25
cfn=(1276) AbsoluteConfigLocation
calls=5 -66 
* 5962
* 5
+1 20
cfi=(25)
cfn=(1278)
calls=5 2186 
* 4391
* 5
+1 10
+23 45
cfn=(1308) ParseConfigFp
calls=5 +88 
* 4502063
* 5
+3 10
+1 15
cfi=(25)
cfn=(1374)
calls=5 2385 
* 3861
+1 15
cfi=(13)
cfn=(952)
calls=5 1032 
* 425
+2 5
+1 20

fn=(1308)
701 50
+1 5
+1 10
+1 10
+2 5
+4 20
cob=(3)
cfi=(3)
cfn=(370)
calls=4 0 
* 168
cob=(1)
cfi=(1)
cfn=(223)
calls=1 0 
* 1386
* 9
* 10
+1 10
+20 5
+1 5
+2 20
cfi=(62) /home/mithuncy/fsm_code/src/backend/utils/misc/guc-file.c
cfn=(1314) GUC_yy_create_buffer
calls=5 1374 
* 2672
* 5
+1 15
cfi=(62)
cfn=(1322) GUC_yy_switch_to_buffer
calls=5 1329 
* 2457
+3 5
+2 2226
+1 2226
+3 4452
+1 2185
+3 82
+2 123
cfi=(13)
cfn=(928)
calls=41 1162 
* 7822
* 41
+3 41
cfi=(62)
cfn=(1328) GUC_yylex
calls=41 +1 
* 9389
* 41
+1 82
+1 41
cfi=(62)
cfn=(1328)
calls=41 -1 
* 28664
* 41
+3 158
+1 24
+5 82
+1 78
cfn=(1360) GUC_scanstr
calls=26 1088 
* 14630
* 52
+2 45
cfi=(13)
cfn=(928)
calls=15 1162 
* 2640
* 15
+3 15
cfi=(62)
cfn=(1328)
calls=15 -16 
* 14973
* 26
cfi=(62)
cfn=(1328)
calls=26 -16 
* 26513
* 41
+1 82
+9 164
cfi=(29)
cfn=(868)
calls=41 4930 
* 1681
* 82
+15 164
cfi=(29)
cfn=(868)
calls=41 4930 
* 1681
* 82
+15 164
cfi=(29)
cfn=(868)
calls=41 4930 
* 1681
* 82
+18 82
cfi=(13)
cfn=(940)
calls=41 +97 
* 5043
* 41
+1 123
+1 123
+1 82
+1 123
cfi=(13)
cfn=(928)
calls=41 1162 
* 8487
* 82
+1 205
+1 82
+1 82
+1 82
+1 164
+1 12
+2 152
+1 114
+4 76
-4 9
+4 6
+2 41
738 2231
cfi=(62)
cfn=(1328)
calls=2231 +16 
* 4346973
* 6693
905 15
cfi=(62)
cfn=(1370) GUC_yy_delete_buffer
calls=5 1402 
* 1417
+2 10
+1 10
+1 5
+1 20

fn=(1268)
125 12
+16 15
+8 21
cfi=(14)
cfn=(432)
calls=3 395 
* 1271
* 3
+3 9
cfi=(61) /home/mithuncy/fsm_code/src/backend/utils/misc/../../../../src/include/utils/palloc.h
cfn=(1270) MemoryContextSwitchTo
calls=3 -42 
* 30
* 3
+5 15
cfn=(1272)
calls=3 +16 
* 6839228
+3 9
cfi=(61)
cfn=(1270)
calls=3 -50 
* 30
+1 9
cfi=(13)
cfn=(1396)
calls=3 +51 
* 896
+1 6

fn=(1276)
522 25
+3 20
+1 9
cfi=(13)
cfn=(928)
calls=3 1162 
* 621
* 3
+3 4
+10 12
cfi=(11)
cfn=(458) join_path_components
calls=2 220 
* 2088
+1 6
cfi=(11)
cfn=(484)
calls=2 255 
* 2806
+2 6
cfi=(13)
cfn=(928)
calls=2 1162 
* 352
+2 10

fn=(1360)
1088 104
+7 78
cob=(3)
cfi=(3)
cfn=(424)
calls=26 0 
* 468
* 26
* 26
+5 52
+3 104
cfi=(13)
cfn=(940)
calls=26 925 
* 3172
* 26
+2 78
+2 2408
+45 2616
+6 3440
+1 344
-54 1454
+59 156
+2 26
+1 52

fl=(79)
fn=(1884)
110 108
+1 72
+2 72
+1 36
+1 72

fl=(154)
fn=(4566) PlanCacheComputeResultDesc
1732 2012
+3 1509
cfi=(227) /home/mithuncy/fsm_code/src/backend/tcop/pquery.c
cfn=(3976) ChoosePortalStrategy
calls=503 220 
* 40168
* 2515
+4 9
cfi=(259)
cfn=(4568)
calls=3 78 
* 30
* 6
+1 12
cfi=(260)
cfn=(4570)
calls=3 +61 
* 3082
* 3
+14 500
+2 500
+1 1006

fn=(4594)
456 12
+7 12
+10 9
cfn=(4596) ReleaseGenericPlan
calls=3 +56 
* 30
+7 18
cfi=(13)
cfn=(1400)
calls=3 355 
* 171
+5 15
cfi=(153)
cfn=(4598) dlist_push_tail
calls=3 318 
* 75
+2 6
+1 6

fn=(4596)
529 36
+2 36
+2 9
+3 6
+1 12
cfn=(4792)
calls=3 1263 
* 1131
+2 18

fn=(4626) CheckCachedPlan
797 2525
+1 1515
+6 1010
+1 6
+9 4016
+8 2008
+8 2510
cfn=(4798) AcquireExecutorLocks
calls=502 1564 
* 26606
+6 2008
+1 1004
-1 1004
+9 2008
+3 1004
+13 2020

fn=(4792)
1263 6048
+2 2016
+3 2525
cfi=(164)
cfn=(4794) ResourceOwnerForgetPlanCacheRef
calls=505 1117 
* 35350
+3 5040
+1 4032
+3 1006
+3 2515
+1 12
cfi=(13)
cfn=(1396)
calls=3 212 
* 1041
+2 2016

fn=(4418)
170 18
+14 21
cfi=(14)
cfn=(432)
calls=3 395 
* 1338
* 3
+8 9
cfi=(152)
cfn=(2898)
calls=3 -82 
* 30
* 3
+2 6
cfi=(13)
cfn=(2546)
calls=3 956 
* 939
* 3
+1 6
+1 9
cfi=(246) /home/mithuncy/fsm_code/src/backend/nodes/copyfuncs.c
cfn=(4420) copyObjectImpl
calls=3 4767 
* 10606
* 6
+1 9
cfi=(13)
cfn=(928)
calls=3 1162 
* 633
* 6
+1 18
cfi=(13)
cfn=(812) MemoryContextSetIdentifier
calls=3 330 
* 27
+1 9
+1 6
+1 6
+1 6
+1 6
+1 6
+1 6
+1 6
+1 9
+1 6
+1 6
+1 6
+1 6
+1 6
+1 6
+1 6
+1 6
+1 6
+1 6
+1 6
+1 6
+1 6
+1 6
+1 9
+1 9
+1 6
+2 9
cfi=(152)
cfn=(2898)
calls=3 110 
* 30
+2 3
+1 6

fn=(4584)
1292 15
+6 12
+2 12
+4 18
cfi=(13)
cfn=(1400)
calls=3 355 
* 156
+7 12
+5 6

fn=(4616) RevalidateCachedQuery
558 6030
+16 9070
+3 1000
+8 2020
+3 2020
cfi=(55)
cfn=(4618)
calls=505 3395 
* 54035
* 1515
+13 4040
+10 2020
+2 2525
cfn=(4620) AcquirePlannerLocks
calls=505 1619 
* 43430
+6 2020
+3 1010
784 4020

fn=(4620)
1619 3030
+3 1515
cfi=(259)
cfn=(4568)
calls=505 78 
* 5050
* 1010
+2 1515
+2 2020
+9 2525
cfn=(4622) ScanQueryForLocks
calls=505 +9 
* 22220
-13 3535
+15 1010

fn=(4778) cached_plan_cost
1077 3018
+1 1006
+3 2012
cfi=(259)
cfn=(4568)
calls=503 78 
* 5030
* 1006
+2 1509
+2 2012
+1 500
+2 18
+2 6
-9 3521
+38 503
+1 2012

fn=(2906) InitPlanCache
131 2
+1 3
cfi=(155)
cfn=(2908) CacheRegisterRelcacheCallback
calls=1 1451 
* 25
+1 4
cfi=(155)
cfn=(2910)
calls=1 1410 
* 65
+1 4
cfi=(155)
cfn=(2910)
calls=1 1410 
* 65
+1 4
cfi=(155)
cfn=(2910)
calls=1 1410 
* 65
+1 4
cfi=(155)
cfn=(2910)
calls=1 1410 
* 65
+1 4
cfi=(155)
cfn=(2910)
calls=1 1410 
* 65
+1 4
cfi=(155)
cfn=(2910)
calls=1 1410 
* 65
+1 4
cfi=(155)
cfn=(2910)
calls=1 1410 
* 65
+1 2

fn=(4622)
1644 3030
+9 2020
cfi=(259)
cfn=(4568)
calls=505 78 
* 4040
* 2020
+26 2020
cfi=(259)
cfn=(4568)
calls=505 78 
* 4040
* 2020
+11 2020
+6 1010

fn=(5596)
500 12
+4 12
+2 12
cfi=(153)
cfn=(5562)
calls=3 359 
* 45
+1 6
+4 9
cfn=(4596)
calls=3 +18 
* 1188
+3 6
+6 15
+1 12
cfi=(13)
cfn=(1396)
calls=3 212 
* 2798
+1 6

fn=(4798)
1564 3012
+3 1506
cfi=(259)
cfn=(4568)
calls=502 78 
* 5020
* 1004
+2 1506
+3 2008
+16 2008
cfi=(259)
cfn=(4568)
calls=502 78 
* 4016
* 2008
-21 3514
+40 1004

fn=(3870) PlanCacheRelCallback
1768 30
+3 84
+53 84
+17 12

fn=(4512)
348 5533
+1 1509
+1 1006
+13 2012
+2 1500
+2 6
+8 21
cfi=(14)
cfn=(432)
calls=3 +20 
* 1556
* 3
+3 9
cfi=(152)
cfn=(2898)
calls=3 110 
* 30
+1 9
cfi=(246)
cfn=(4420)
calls=3 4767 
* 10350
* 3
+3 9
+1 9
+2 15
-3 1500
+1 1500
+2 2530
+8 27
cfi=(254)
cfn=(4522) extract_query_dependencies
calls=3 2637 
* 5782
+6 3
cfi=(54)
cfn=(3464)
calls=3 -18 
* 15
* 6
+1 9
+9 9
cfi=(55)
cfn=(4532)
calls=3 3343 
* 50072
* 6
+8 9
cfi=(152)
cfn=(2898)
calls=3 110 
* 30
* 1500
cfi=(152)
cfn=(2898)
calls=500 110 
* 5000
+2 1006
+6 1006
+1 1509
+1 1509
+1 1509
+1 1509
+1 1509
+1 1509
cfn=(4566)
calls=503 1732 
* 51352
* 1006
+2 1509
cfi=(152)
cfn=(2898)
calls=503 110 
* 5030
+2 1006
+1 1006
+1 1006

fn=(4624) choose_custom_plan
1020 4032
+4 4032
+1 1000
+3 1016
+1 1016
+37 2016

fn=(5210)
253 3000
+9 1000
cfi=(13)
cfn=(2546)
calls=500 956 
* 156500
* 500
+1 1000
+1 1500
+1 1500
+1 1500
+1 1000
+1 1000
+1 1000
+1 1000
+1 1000
+1 1000
+1 1000
+1 1500
+1 1000
+1 1000
+1 1000
+1 1000
+1 1000
+1 1000
+1 1000
+1 1000
+1 1000
+1 1000
+1 1000
+1 1000
+1 1000
+1 1000
+1 1500
+1 1500
+1 1000
+2 500
+1 1000

fn=(4628) BuildCachedPlan
882 3521
+6 1006
+16 2515
+8 1006
+2 2515
+1 12
cfi=(246)
cfn=(4420)
calls=3 4767 
* 9925
* 6
+2 1500
+7 500
+1 500
cfi=(110)
cfn=(4630) ActiveSnapshotSet
calls=500 -73 
* 3500
-1 3
+1 3
cfi=(110)
cfn=(4630)
calls=3 -73 
* 21
* 1509
+11 3521
cfi=(52)
cfn=(3966) pg_plan_queries
calls=503 +11 
* 576696
* 503
+3 1006
+9 2515
+2 21
cfi=(14)
cfn=(432)
calls=3 395 
* 1586
* 3
+3 18
cfi=(13)
cfn=(930) MemoryContextStrdup
calls=3 1149 
* 600
* 15
cfi=(13)
cfn=(812)
calls=3 330 
* 27
+5 9
cfi=(152)
cfn=(2898)
calls=3 110 
* 30
+2 9
cfi=(246)
cfn=(4420)
calls=3 4767 
* 10478
* 6
+3 1000
+5 1000
cfi=(13)
cfn=(940)
calls=500 -43 
* 61500
* 6
cfi=(13)
cfn=(940)
calls=3 -43 
* 369
* 503
+1 1006
+1 1509
+7 503
cfi=(54)
cfn=(3464)
calls=503 381 
* 2515
* 1006
+1 2012
+1 503
+1 1509
cfi=(259)
cfn=(4568)
calls=503 78 
* 5030
* 1006
+2 1509
+2 2012
+1 500
+2 12
+2 12
-9 3521
+12 1006
+6 1006
+1 1006
+1 1509
+1 2012
+1 1006
+1 1006
+3 4527
+2 1509
cfi=(152)
cfn=(2898)
calls=503 110 
* 5030
+2 503
+1 1006

fn=(4614)
1143 8040
+1 1005
+8 4535
+4 5025
cfn=(4616)
calls=1005 558 
* 134755
* 1005
+3 5025
cfn=(4624)
calls=1005 1020 
* 13070
* 1005
+2 4020
+2 1515
cfn=(4626)
calls=505 797 
* 49244
* 1010
+3 2008
+6 21
cfn=(4628)
calls=3 882 
* 296754
* 3
+2 9
cfn=(4596)
calls=3 529 
* 30
+2 9
+1 15
+2 12
+3 18
cfi=(13)
cfn=(1400)
calls=3 355 
* 156
+1 9
+9 12
cfn=(4778)
calls=3 1077 
* 153
* 12
+11 15
cfn=(4624)
calls=3 1020 
* 42
* 3
+7 3
+4 2010
+3 3000
cfn=(4628)
calls=500 882 
* 438000
* 500
+2 2000
+2 3500
cfn=(4778)
calls=500 1077 
* 22000
* 1500
+1 2500
+7 2010
+1 1515
cfi=(164)
cfn=(4780) ResourceOwnerEnlargePlanCacheRefs
calls=505 1097 
* 11918
+1 5025
+1 2010
+1 2525
cfi=(164)
cfn=(4782) ResourceOwnerRememberPlanCacheRef
calls=505 1108 
* 21715
+8 4010
+6 1005
+1 2010

fl=(105)
fn=(2062)
3289 6
+6 2
+1 8
+1 10
cfi=(87)
cfn=(2000)
calls=2 493 
* 46
* 10
cfi=(87)
cfn=(2002)
calls=2 476 
* 42
* 2
+2 2
+1 4

fn=(2606)
395 3
+6 1
cfi=(137)
cfn=(2556)
calls=1 32 
* 295
* 7
+20 1
+5 2

fn=(2680)
1471 6
+6 2
cfi=(137)
cfn=(2556)
calls=2 32 
* 590
* 14
+20 2
+5 4

fn=(2832) IsAutoVacuumLauncherProcess
3272 10
+1 5
+1 10

fn=(2834) IsAutoVacuumWorkerProcess
3278 12
+1 6
+1 12

fn=(2526)
3258 4
+1 7
+4 4

fn=(2604)
3204 2
+1 8
+2 1
+1 2

fn=(2270)
3308 3
+4 1
cfn=(2062)
calls=1 -23 
* 66
* 4
cfi=(87)
cfn=(2168)
calls=1 373 
* 1035
-1 1
+5 4
+7 2
+1 4
cfi=(74)
cfn=(2272) dlist_init
calls=1 279 
* 12
+1 4
cfi=(74)
cfn=(2272)
calls=1 279 
* 12
+1 2
+1 6
cob=(3)
cfi=(3)
cfn=(828)
calls=1 0 
* 576
* 1
+3 3
+4 2
+2 21
-1 15
cfi=(74)
cfn=(2274)
calls=3 301 
* 75
-1 15
+6 2

fl=(185)
fn=(3320) PageIsVerified
82 10
+1 4
+3 2
+1 2
+1 2
+1 2
+5 8
+2 2
cfi=(53)
cfn=(1610) DataChecksumsEnabled
calls=2 4834 
* 16
* 4
+14 12
+1 8
-1 4
+2 8
-1 4
+2 4
-1 4
+2 16
-1 4
+2 2
+2 12
+1 4
+41 4

fn=(5440)
663 362000
+3 271500
cfn=(5442) PageGetFreeSpace
calls=90500 -87 
* 1900500
* 90500
+1 181000
+8 899000
+1 3000
-1 89000
+1 178000
+35 90500
+1 181000

fn=(5446) PageAddItemExtended
195 875000
+1 175000
+6 87500
+5 350000
+1 350000
-1 175000
+2 350000
-1 175000
+2 175000
-1 175000
+10 955000
+3 3000
-3 86000
+3 522000
+25 525000
+7 43000
+2 4450500
+1 2580000
+1 21500
-4 2902500
+6 64500
+9 132000
+5 262500
+7 525000
+12 305500
+1 396000
+2 86000
+2 86000
+2 150500
+2 64500
-4 264000
+2 462000
+2 198000
+6 787500
+2 175000
+5 2100000
+17 787500
cob=(3)
cfi=(3)
cfn=(856)
calls=87500 0 
* 1575000
* 87500
+3 350000
+1 350000
+2 87500
+1 350000

fn=(5442)
579 271500
+7 271500
+1 271500
-1 271500
+3 181000
+2 271500
+2 181000
+1 181000

fn=(5494) PageInit
42 9000
+1 3000
+2 6000
+6 34500
cob=(3)
cfi=(3)
cfn=(828)
calls=1500 -51 
* 1368000
* 1500
+2 3000
+1 3000
+1 9000
+1 9000
+1 7500
+2 3000

fl=(272)
fn=(4696)
877 18
+1 3
+3 9
cfi=(273) /home/mithuncy/fsm_code/src/backend/optimizer/path/../../../../src/include/nodes/pg_list.h
cfn=(4698) list_head
calls=3 78 
* 24
* 12
+20 3
+1 6

fl=(62)
fn=(1322)
1329 20
+7 5
cfn=(1324) GUC_yyensure_buffer_stack
calls=5 1527 
* 2127
+1 55
+3 50
+8 30
+1 5
cfn=(1326) GUC_yy_load_buffer_state
calls=5 +11 
* 150
+7 5
+1 10

fn=(1324)
1527 15
+3 15
+6 1
+2 4
cfn=(1316) GUC_yyalloc
calls=1 1837 
* 285
-1 1
+3 3
+3 6
cob=(3)
cfi=(3)
cfn=(828)
calls=1 0 
* 15
* 1
+2 2
+1 1
+1 1
+3 20
+3 1
+2 5
+2 6
cfn=(1410) GUC_yyrealloc
calls=1 1842 
* 1702
-1 1
+4 3
+4 10
cob=(3)
cfi=(3)
cfn=(828)
calls=1 0 
* 16
* 1
+1 2
+2 10

fn=(1372) GUC_yyfree
1854 40
+1 30
cob=(3)
cfi=(3)
cfn=(590)
calls=10 0 
* 1142
* 10
+1 20

fn=(1328)
754 16478
+10 7062
+2 1
+6 3
+1 1
+2 3
+3 3
+1 2
+2 10
+6 1
cfn=(1326)
calls=1 1360 
* 30
+5 4873
+3 9746
+5 4873
+2 4873
+4 24365
+1 19492
-1 394420
+1 315536
+2 78561
+1 78561
+2 83757
+2 234834
+1 156556
+1 293252
-4 1620350
+6 670056
+1 83757
+2 167514
+1 4887
+1 4887
+3 14661
+2 48870
+4 9774
-6 15
+2 50
+4 14711
fi=(60)
96 11130
+4 88
+2 52
+2 24
+2 82
fe=(62)
904 10
+5 144
+3 48
+3 192
+11 35
+1 35
+1 30
+10 264
+37 24
cfn=(1330) yy_get_next_buffer
calls=24 +69 
* 12837
* 114
+4 5
+13 10
+2 35
+1 5
+13 56
-1 14
+3 14
cfn=(1356) yy_get_previous_state
calls=14 1178 
* 12532
* 14
+2 14
+1 14
+1 14
+4 40
-1 5
+3 5
cfn=(1356)
calls=5 1178 
* 265
* 5
+2 5
+1 5
+1 5
fi=(60)
98 2519
fe=(62)
1033 2519
+1 16478

fn=(1316)
1837 44
+1 33
cob=(3)
cfi=(3)
cfn=(388)
calls=11 0 
* 2272
* 11
+1 22

fn=(1318) GUC_yy_init_buffer
1422 50
+1 10
cob=(5)
cfi=(5)
cfn=(472)
calls=10 0 
* 30
* 10
* 20
+2 30
cfn=(1320) GUC_yy_flush_buffer
calls=10 +24 
* 510
+2 30
+1 20
+6 105
+1 10
+1 10
+3 10
+2 5
cob=(5)
cfi=(5)
cfn=(472)
calls=5 0 
* 15
* 5
-2 10
+2 5
cob=(5)
cfi=(5)
cfn=(472)
calls=5 0 
* 15
* 5
* 20
+1 20

fn=(1326)
1360 32
+1 112
+1 144
+1 112
+1 48
+1 32

fn=(1330)
1044 168
+1 144
+1 24
+4 288
+4 192
+22 144
+2 48
+1 1344
-1 720
+3 192
+4 45
+5 171
-1 38
+3 57
+37 38
+1 19
+3 171
cob=(5)
cfi=(5)
cfn=(472)
calls=19 0 
* 57
* 19
* 304
cob=(3)
cfi=(3)
cfn=(1336)
calls=18 0 
* 3210
cob=(1)
cfi=(1)
cfn=(223)
calls=1 0 
* 1531
* 23
* 91
cob=(3)
cfi=(3)
cfn=(1366)
calls=4 0 
* 144
cob=(1)
cfi=(1)
cfn=(223)
calls=1 0 
* 1296
* 9
* 10
+3 133
+3 72
+2 20
+2 5
+1 15
cfn=(1368) GUC_yyrestart
calls=5 1312 
* 860
* 5
+5 5
+1 35
+6 14
+2 264
+8 96
+1 216
+1 240
+2 168
+2 24
+1 168

fn=(1356)
1178 95
+4 19
+2 38
+2 2016
+1 896
+2 210
+1 210
+2 224
+2 630
+1 420
+1 840
-4 4340
+6 1792
-14 953
+17 19
+1 95

fn=(1368)
1312 25
+2 50
+6 65
cfn=(1318)
calls=5 1422 
* 545
+1 5
cfn=(1326)
calls=5 +39 
* 150
+1 20

fn=(1370)
1402 20
+2 10
+3 55
+1 25
+2 20
+1 20
cfn=(1372)
calls=5 1854 
* 767
+2 15
cfn=(1372)
calls=5 1854 
* 475
+1 10

fn=(1314)
1374 25
+3 10
cfn=(1316)
calls=5 1837 
* 621
* 5
+1 10
+3 20
+5 25
cfn=(1316)
calls=5 1837 
* 1476
* 10
+1 20
+3 10
+2 25
cfn=(1318)
calls=5 +30 
* 400
+2 5
+1 10

fn=(1320)
1449 40
+1 20
+3 20
+6 30
+1 40
+2 40
+2 20
+1 20
+2 105
+1 5
cfn=(1326)
calls=5 1360 
* 150
+1 20

fn=(1410)
1842 5
+8 5
cob=(1)
cfi=(1)
cfn=(223)
calls=1 0 
* 1685
* 5
+1 2

fl=(68) /home/mithuncy/fsm_code/src/backend/access/transam/../../../../src/include/pgstat.h
fn=(1598) pgstat_report_wait_end
1263 4
+1 4
+2 12
+1 2
+7 4
-11 2
+1 2
+2 6
+1 1
+7 2

fn=(1596) pgstat_report_wait_start
1239 6
+1 4
+2 12
+1 2
+7 4
-11 3
+1 2
+2 6
+1 1
+7 2

fl=(92)
fn=(3334) SerializationNeededForRead
497 33395
+2 20037
+1 13358
+33 13358

fn=(5396) RegisterPredicateLockingXid
1835 4
+9 3
+22 2

fn=(2232) CreatePredXact
563 3
+5 2
-1 1
-1 4
cfi=(126)
cfn=(2234)
calls=1 146 
* 18
* 1
+4 2
+3 3
cfi=(126)
cfn=(2236)
calls=1 69 
* 25
+1 6
cfi=(126)
cfn=(2230)
calls=1 90 
* 23
+1 2
+1 2

fn=(2018)
1266 3
+1 1
+4 7
cfi=(87)
cfn=(2002)
calls=1 476 
* 21
* 6
cfi=(87)
cfn=(2000)
calls=1 493 
* 23
* 1
+1 4
cfi=(31)
cfn=(2006)
calls=1 733 
* 421
* 5
cfi=(87)
cfn=(2002)
calls=1 476 
* 21
* 1
+4 1
+1 4
cfi=(31)
cfn=(2006)
calls=1 733 
* 438
* 5
cfi=(87)
cfn=(2002)
calls=1 476 
* 21
* 1
+7 8
cfi=(87)
cfn=(2002)
calls=1 476 
* 21
* 1
+3 5
+1 6
+1 4
cfi=(87)
cfn=(2002)
calls=1 476 
* 21
* 1
+1 4
cfi=(87)
cfn=(2000)
calls=1 493 
* 23
* 5
cfi=(87)
cfn=(2002)
calls=1 476 
* 21
* 1
+4 4
cfi=(31)
cfn=(2006)
calls=1 733 
* 394
* 5
cfi=(87)
cfn=(2002)
calls=1 476 
* 21
* 1
+4 5
+1 4
cfi=(87)
cfn=(2002)
calls=1 476 
* 21
* 1
+1 4
cfi=(87)
cfn=(2000)
calls=1 493 
* 23
* 5
cfi=(87)
cfn=(2002)
calls=1 476 
* 21
* 1
+4 4
cfi=(87)
cfn=(2002)
calls=1 476 
* 21
* 1
+3 4
cfi=(87)
cfn=(2002)
calls=1 476 
* 21
* 1
+1 3
cfi=(93) /home/mithuncy/fsm_code/src/backend/access/transam/slru.c
cfn=(2020) SimpleLruShmemSize
calls=1 146 
* 52
* 5
cfi=(87)
cfn=(2002)
calls=1 476 
* 21
* 1
+2 1
+1 2

fn=(3380)
2498 12342
+5 10285
cfn=(3334)
calls=2057 497 
* 24684
* 6171
+1 2057
+46 4114

fn=(3572)
2453 25
+3 25
cfn=(3334)
calls=5 497 
* 60
* 15
+7 10

fn=(2238) OldSerXidInit
797 3
+6 1
+2 2
-1 8
cfi=(93)
cfn=(2196) SimpleLruInit
calls=1 167 
* 3099
+4 1
+6 5
cfi=(87)
cfn=(2168)
calls=1 373 
* 1055
-1 1
+4 4
+5 2
+1 2
+1 2
+2 2

fn=(2222)
1063 4
+14 7
cfi=(87)
cfn=(2002)
calls=1 476 
* 21
* 6
cfi=(87)
cfn=(2000)
calls=1 493 
* 23
* 1
+6 118
+1 1
+1 1
+1 1
+2 7
cfi=(87)
cfn=(2162)
calls=1 322 
* 99447
* 1
+13 4
+2 7
cfi=(31)
cfn=(836)
calls=1 910 
* 400
+6 4
cfi=(31)
cfn=(2226)
calls=1 861 
* 137
* 1
+1 8
+6 118
+1 1
+1 1
+1 1
+1 1
+3 1
+2 7
cfi=(87)
cfn=(2162)
calls=1 322 
* 189628
* 1
+11 5
+10 6
+2 5
cfi=(87)
cfn=(2168)
calls=1 373 
* 991
* 1
+4 4
+4 3
cfi=(126)
cfn=(2228)
calls=1 37 
* 12
+1 4
cfi=(126)
cfn=(2228)
calls=1 37 
* 12
+1 2
+1 2
+1 2
+1 2
+1 2
+1 2
+1 4
cfi=(87)
cfn=(2000)
calls=1 493 
* 23
* 1
+2 4
cfi=(87)
cfn=(2134) ShmemAlloc
calls=1 158 
* 67
* 1
+2 6
cob=(3)
cfi=(3)
cfn=(828)
calls=1 0 
* 18636
* 1
+1 2
+3 12320
-1 5600
cfi=(126)
cfn=(2230)
calls=1120 90 
* 25760
-2 5604
+5 2
cfn=(2232)
calls=1 563 
* 92
* 1
+1 6
+1 3
+1 3
+1 3
+1 5
cfi=(126)
cfn=(2228)
calls=1 37 
* 12
+1 5
cfi=(126)
cfn=(2228)
calls=1 37 
* 12
+1 5
cfi=(126)
cfn=(2228)
calls=1 37 
* 12
+1 5
cfi=(126)
cfn=(2228)
calls=1 37 
* 12
+1 5
cfi=(126)
cfn=(2228)
calls=1 37 
* 12
+1 3
+1 3
+1 3
+1 3
+1 3
+3 3
+6 118
+1 1
+1 1
+2 7
cfi=(87)
cfn=(2162)
calls=1 322 
* 18266
* 1
+18 5
+2 5
cfi=(87)
cfn=(2168)
calls=1 373 
* 1016
* 1
+4 4
+4 3
cfi=(126)
cfn=(2228)
calls=1 37 
* 12
+1 4
cfi=(87)
cfn=(2000)
calls=1 493 
* 23
* 1
+2 4
cfi=(87)
cfn=(2134)
calls=1 158 
* 67
* 1
+2 6
cob=(3)
cfi=(3)
cfn=(828)
calls=1 0 
* 29416
* 1
+1 2
+3 50400
-1 28000
cfi=(126)
cfn=(2230)
calls=5600 90 
* 128800
-2 28004
+12 5
cfi=(87)
cfn=(2168)
calls=1 373 
* 1273
-1 1
+5 4
+1 3
cfi=(126)
cfn=(2228)
calls=1 37 
* 12
+6 1
cfn=(2238)
calls=1 797 
* 4187
+1 4

fn=(3332) PredicateLockPage
2476 15324
+3 12770
cfn=(3334)
calls=2554 497 
* 30648
* 7662
+8 5108

fn=(5402)
4282 9000
+3 3000
cfn=(5404) SerializationNeededForWrite
calls=1000 541 
* 11000
* 3000
+49 6000

fn=(5404)
541 4000
+2 3000
+1 2000
+7 2000

fn=(3638) PreCommit_CheckForSerializationFailure
4667 12
+3 6
+1 2
+74 12

fn=(3378)
3902 24756
+7 10315
cfn=(3334)
calls=2063 497 
* 24756
* 6189
+1 2063
4095 12378

fn=(3688) ReleasePredicateLocks
3223 10
+18 6
+3 2
3533 4

fl=(155)
fn=(2908)
1451 5
+1 3
+3 6
+1 6
+2 3
+1 2

fn=(3672) AtEOXact_Inval
948 10
+2 6
+1 2
+34 4

fn=(3860) CallSyscacheCallbacks
1469 60
+3 48
+3 72
+1 36
+8 24

fn=(5552) CommandEndInvalidationMessages
1084 1000
+6 1500
+1 500
+6 1000

fn=(2910)
1410 72
+1 48
+2 36
+3 60
+3 66
+5 6
+2 11
+2 10
+3 10
+1 8
+1 9
+1 9
+2 3
+1 2
-6 110
+1 88
+1 99
+1 99
+2 33
+1 22

fn=(2988)
680 12250
+1 18375
cfi=(166)
cfn=(2990)
calls=6125 74 
* 754719
+42 12250

fn=(3852)
555 4088
+1 4088
+2 60
+2 12
cfi=(110)
cfn=(3002) InvalidateCatalogSnapshot
calls=12 -49 
* 84
+2 96
cfi=(151)
cfn=(3856) SysCacheInvalidate
calls=12 1446 
* 864
+2 96
cfn=(3860)
calls=12 1469 
* 240
* 12
+3 4040
+11 4040
+2 30
+4 24
+3 24
cfi=(148)
cfn=(3862) RelationCacheInvalidateEntry
calls=6 2624 
* 2333
+2 12
+2 30
+2 54
cfi=(154)
cfn=(3870)
calls=6 1768 
* 210
-4 48
+8 4016
+8 5020
+1 10040
+1 5020
cfi=(140)
cfn=(3854) smgrclosenode
calls=1004 366 
* 269060
* 1004
+20 2044

fn=(3652) xactGetCommittedInvalidationMessages
828 10
+4 6
+2 4
+1 4
+1 4
+35 4

fl=(235)
fn=(4186)
555 3
+1 2
+1 2

fl=(46) /home/mithuncy/fsm_code/src/backend/commands/../../../src/include/nodes/pg_list.h
fn=(5298) list_length
90 265500
+1 442500
+1 177000

fn=(966) list_head
78 265500
+1 442500
+1 177000
-2 3
+1 5
+1 2
-2 12
+1 12
+1 8
-2 9
+1 15
+1 6

fl=(309)
fn=(5310)
569 3500
+4 2000
+1 500
+25 2500

fl=(19)
fn=(612)
1005 3044
+1 3044
+1 3044

fn=(2650)
1011 6
+1 6
+1 6

fn=(3742) pg_server_to_any
635 174
+1 58
+3 145
+2 58
+18 58

fn=(3526) pg_encoding_mbcliplen
832 14
+2 2
+4 6
cfi=(43)
cfn=(3528)
calls=2 1821 
* 26
* 4
+3 18
+2 2
+2 32
cfi=(43)
cfn=(3530)
calls=8 542 
* 96
* 8
+1 40
+2 16
+1 24
+2 16
+1 24
-9 52
+11 2
+1 4

fn=(5288) pg_get_client_encoding
307 1000
+1 1000
+1 1000

fn=(3524) pg_mbcliplen
821 12
+1 14
cfn=(3526)
calls=2 +10 
* 386
+2 4

fn=(922) SetClientEncoding
202 20
+7 20
+4 20
+2 8
+1 8
+3 1
cfn=(612)
calls=1 1005 
* 6
* 1
+5 3
+4 5
+1 1
+1 1
+1 2
+44 10

fn=(3838) pg_client_to_server
546 5
+1 8
cfn=(3840) pg_any_to_server
calls=1 +15 
* 2677
+1 2

fn=(3740) pg_server_to_client
624 145
+1 232
cfn=(3742)
calls=29 +10 
* 493
+1 58

fn=(3518) SetDatabaseEncoding
899 4
+1 4
+3 5
+2 2

fn=(3614) InitializeClientEncoding
283 4
+2 1
+2 3
cfn=(918) PrepareClientEncoding
calls=1 104 
* 27
* 2
+1 3
cfn=(922)
calls=1 -86 
* 34
-1 2
+13 4

fn=(3840)
562 616007
+1 176002
+1 1000
+2 437505
+6 612507
cfi=(43)
cfn=(3842)
calls=87501 1878 
* 8171650
+1 175002
+42 352004

fn=(614) SetMessageEncoding
909 6
+4 10
+2 4

fn=(918)
104 20
+4 20
+4 20
+1 8
+2 1
cfn=(612)
calls=1 1005 
* 6
* 1
+5 3
+3 2
+69 10

fl=(135)
fn=(2542)
78 225
+1 371
+1 150

fl=(173)
fn=(3400) IndexScanEnd
147 10216
+1 10216
+1 10216
cfi=(13)
cfn=(952)
calls=2554 1032 
* 217090
+1 10216
+3 7662
cfi=(13)
cfn=(952)
calls=2554 1032 
* 217090
+1 5108

fn=(3172)
406 10296
+3 10296
+2 12865
cfi=(175) /home/mithuncy/fsm_code/src/backend/access/index/indexam.c
cfn=(3174) index_getnext
calls=2573 661 
* 27488402
* 2573
+9 15431
+1 2573
+3 5
cfi=(171)
cfn=(3586)
calls=1 1848 
* 2512
* 1
+2 1
+1 2
-1 2573
+1 5146

fn=(3126)
322 25490
+4 5098
+1 5098
-1 5098
+2 7647
cfi=(174) /home/mithuncy/fsm_code/src/backend/catalog/index.c
cfn=(3128) ReindexIsProcessingIndex
calls=2549 4029 
* 104509
* 2549
-1 5098
+2 10196
cfi=(175)
cfn=(3132) index_open
calls=2549 152 
* 7249314
* 5098
+4 5098
cfi=(13)
cfn=(940)
calls=2549 925 
* 250318
* 2549
+2 7647
+1 7647
+2 5098
+2 6123
+2 6123
cfi=(110)
cfn=(3134) GetCatalogSnapshot
calls=2041 +99 
* 646171
* 4082
cfi=(110)
cfn=(3142) RegisterSnapshot
calls=2041 864 
* 941429
* 2041
+1 8164
+5 1016
+3 5098
+5 5098
+4 8130
+2 100494
+2 48780
+1 4065
-5 35016
+8 24390
-12 23907
+16 17843
cfi=(175)
cfn=(3156) index_beginscan
calls=2549 226 
* 2701545
* 5098
+2 20392
cfi=(175)
cfn=(3166) index_rescan
calls=2549 -60 
* 549783
+1 7647
+17 2549
+1 5098

fn=(3127)
322 60
+4 12
+1 10
-1 10
+2 15
cfi=(174)
cfn=(3128)
calls=5 4029 
* 205
* 5
-1 10
+2 20
cfi=(175)
cfn=(3133) index_open'2
calls=5 152 
* 11756
* 10
+2 1
+2 2
cfi=(13)
cfn=(940)
calls=1 925 
* 92
* 10
cfi=(13)
cfn=(940)
calls=5 925 
* 460
* 6
+2 18
+1 18
+2 12
+2 15
+2 15
cfi=(110)
cfn=(3134)
calls=5 +99 
* 1001
* 10
cfi=(110)
cfn=(3142)
calls=5 864 
* 2215
* 5
+1 20
+5 2
+3 12
+5 10
+4 16
+2 216
+2 96
+1 8
-5 76
+8 48
-12 47
+16 35
cfi=(175)
cfn=(3156)
calls=5 226 
* 4385
* 10
+2 40
cfi=(175)
cfn=(3166)
calls=5 -60 
* 1003
+1 15
+11 8
cfi=(171)
cfn=(3568)
calls=1 1437 
* 3108
* 2
+3 2
+3 1
+1 2
-1 5
+1 10

fn=(3162) RelationGetIndexScan
79 15324
+3 5108
cfi=(13)
cfn=(940)
calls=2554 925 
* 250654
* 2554
+2 5108
+1 7662
+1 5108
+1 7662
+1 7662
+5 5108
+1 20432
cfi=(13)
cfn=(940)
calls=2554 925 
* 266718
* 7662
+3 5108
+3 5108
+2 5108
+12 5108
+1 2554
cfi=(26)
cfn=(3164) TransactionStartedDuringRecovery
calls=2554 868 
* 15324
* 5108
+1 25540
+2 5108
+2 5108
+1 5108
+1 5108
+1 5108
+2 15324
+1 5108
+1 5108
+1 5108
+2 2554
+1 5108

fn=(3394)
489 10220
+1 10220
+2 10216
cfi=(175)
cfn=(3396) index_endscan
calls=2554 342 
* 2212136
+1 12770
cfi=(175)
cfn=(3402) index_close
calls=2554 178 
* 6730973
* 2554
+3 4
cfi=(171)
cfn=(3594)
calls=1 1585 
* 537
+2 10220
+1 8184
cfi=(110)
cfn=(3404) UnregisterSnapshot
calls=2046 906 
* 530363
+2 7665
cfi=(13)
cfn=(952)
calls=2555 1032 
* 217175
+1 5110

fl=(190)
fn=(3384)
428 15282
+1 7641
+2 7641
+1 2547
+12 2547
+2 17829
+7 7635
+1 7635
+3 43265
+1 1006
+6 4084
+2 91
-2 6178
+11 15282
+2 10188
+8 20440
+1 8176
+1 37127
+7 77
+4 14
+2 792
+2 4
+1 4
-5 293
+11 2056
+2 21
+1 7
+11 14
+3 105
+3 70
+1 70
-1 21
+3 7
+2 1120
+2 448
+1 6
+2 982
+2 141
+2 188
-11 188
+7 59
+2 177
+2 236
-11 257
+16 77
+4 507
+13 507
+1 507
+2 5070
+2 3549
-2 156430
+2 351751
+2 515
+1 515
+4 91770
+1 60240
+1 2300
+8 1030
+1 55
-1 10
+2 8
+3 4635
+2 1020
-2 3
+2 6
+6 590
+2 62
-2 29
+2 58
+1 180
+3 46905
+1 507
+2 166641
+2 90740
+1 3
-46 3
+47 3
-47 15640
+47 15640
+3 7760
+1 5094

fn=(5368) heap_fill_tuple
310 787500
+4 262500
+6 175000
+8 87500
+1 87500
+3 525000
+2 175000
+2 875000
+8 962500
-6 262500
+5 437500
-5 175000
+1 87500
-1 1137500
cfn=(5370) fill_val
calls=87500 184 
* 4812500
-4 612500
+14 175000

fn=(5366) heap_compute_data_size
124 525000
+1 87500
+2 262500
+2 175000
+5 612500
+3 612500
+1 875000
+2 350000
+9 350000
+12 1225000
+2 962500
-34 612500
+39 87500
+1 175000

fn=(5364) heap_form_tuple
1025 612500
+6 87500
+1 262500
+3 175000
+9 175000
+2 612500
-2 612500
+12 87500
+2 175000
+3 525000
+2 525000
cfn=(5366)
calls=87500 124 
* 6912500
* 87500
+2 175000
+6 350000
cfi=(13)
cfn=(2546)
calls=87500 956 
* 13697095
* 87500
+1 525000
+7 350000
+1 525000
+1 175000
+2 350000
+1 350000
+1 350000
+2 525000
+2 787500
+1 350000
+2 1312500
cfn=(5368)
calls=87500 310 
* 11637500
+8 87500
+1 350000

fn=(3484) heap_copytuple
683 2032
+3 3048
+3 3048
cfi=(13)
cfn=(940)
calls=508 925 
* 62422
* 508
+1 2032
+1 3048
+1 2032
+1 2032
+1 5080
cob=(3)
cfi=(3)
cfn=(856)
calls=508 0 
* 46477
* 508
+1 508
+1 1016

fn=(4020) heap_attisnull
362 12
+6 14
+8 4
+2 14
+2 36
+19 4

fn=(3562) heap_freetuple
1341 2020
+1 1515
cfi=(13)
cfn=(952)
calls=505 1032 
* 42925
+1 1010

fn=(5370)
184 962500
+2 262500
+6 175000
+24 350000
+3 787500
+1 1225000
+1 437500
+71 175000
+1 262500
+1 175000

fl=(316)
fn=(5432) visibilitymap_pin
221 3000
+1 3500
+3 2000
+7 3000
cfn=(5434) vm_readbuf
calls=500 575 
* 1894021
* 1000
+1 1000

fn=(5434)
575 4000
+10 2000
+6 2500
+2 2500
cfi=(140)
cfn=(5418) smgrexists
calls=500 303 
* 1236914
* 1000
+1 3500
cfi=(140)
cfn=(3578) smgrnblocks
calls=500 +94 
* 77000
* 1000
+7 2500
+27 3500
cfi=(50)
cfn=(3202)
calls=500 +14 
* 549107
* 500
+2 5500
+7 500
+1 2000

fn=(5438) visibilitymap_pin_ok
245 2500
+1 3500
+2 2500
cfi=(50)
cfn=(3330)
calls=500 2612 
* 8000
* 2500
+1 1000

fn=(5448)
170 4000
+1 3500
+1 6000
+1 2000
+1 3000
+2 500
+8 2500
cfi=(50)
cfn=(3330)
calls=500 2612 
* 8000
* 1000
+3 2000
cfi=(50)
cfn=(3240)
calls=500 3553 
* 82500
+1 5000
+2 5000
+2 6500
+2 1500
cfi=(50)
cfn=(5450)
calls=500 1457 
* 46500
+1 500
+3 2000
cfi=(50)
cfn=(3240)
calls=500 3553 
* 57000
+2 500
+1 1000

fl=(205) /home/mithuncy/fsm_code/src/backend/catalog/storage.c
fn=(3648) smgrGetPendingDeletes
389 12
+1 2
cfi=(26)
cfn=(3506) GetCurrentTransactionNestLevel
calls=2 758 
* 16
* 2
+5 2
+1 10
+6 4
+2 4
+1 4
+14 4

fn=(3690) smgrDoPendingDeletes
306 10
+1 2
cfi=(26)
cfn=(3506)
calls=2 758 
* 16
* 2
+4 2
+1 2
+1 2
+1 2
+2 2
+1 10
+42 4
+9 4

fl=(13)
fn=(2156)
815 4298
+6 1228
+3 1228
+2 4912
cfi=(14)
cfn=(800) AllocSetAlloc
calls=614 715 
* 57065
* 614
+1 3070
+12 70934
cob=(3)
cfi=(3)
cfn=(828)
calls=24 0 
* 14693
* 24
+2 614
+1 3070

fn=(430) MemoryContextInit
93 2
+6 6
cfi=(14)
cfn=(432)
calls=1 395 
* 412
* 1
+8 2
+15 7
cfi=(14)
cfn=(432)
calls=1 395 
* 457
* 1
+5 4
cfn=(436) MemoryContextAllowInCriticalSection
calls=1 412 
* 10
+1 2

fn=(798)
772 120085
+6 34310
+3 34310
+2 137240
cfi=(14)
cfn=(800)
calls=17155 -68 
* 1184368
* 17155
+1 85775
+19 17155
+1 85775

fn=(940)
925 301452
+3 100484
+5 100484
+3 100484
+2 401936
cfi=(14)
cfn=(800)
calls=50242 715 
* 5459932
* 50242
+1 251210
+12 50242
+1 251210

fn=(1514) repalloc
1045 21
+1 9
cfi=(44) /home/mithuncy/fsm_code/src/backend/utils/mmgr/../../../../src/include/utils/memutils.h
cfn=(954) GetMemoryChunkContext
calls=3 113 
* 27
* 3
+3 6
+8 24
cfi=(14)
cfn=(1516) AllocSetRealloc
calls=3 +12 
* 2645
* 3
+1 15
+12 3
+1 15

fn=(3758)
137 8032
+4 8032
+4 10040
+1 4518
cfn=(1404) MemoryContextResetOnly
calls=1506 +10 
* 346851
+1 4016

fn=(812)
330 400
+2 300
+1 200

fn=(1396)
212 6128
+8 6128
+1 15
cfn=(3732) MemoryContextDeleteChildren
calls=5 +36 
* 2812
+8 4596
cfn=(1398) MemoryContextCallResetCallbacks
calls=1532 +74 
* 18384
+7 6128
cfn=(1400)
calls=1532 355 
* 59324
+7 3064
+2 9192
cfi=(14)
cfn=(1402) AllocSetDelete
calls=1532 628 
* 557504
+3 3064

fn=(1397) MemoryContextDelete'2
212 28
+8 28
+9 21
cfn=(1398)
calls=7 +74 
* 84
+7 28
cfn=(1400)
calls=7 355 
* 269
+7 14
+2 42
cfi=(14)
cfn=(1402)
calls=7 628 
* 2173
+3 14

fn=(1400)
355 6204
+5 6204
+4 6204
+2 4653
+2 6204
+1 138
+4 6112
+3 6204
+1 2640
+4 3102
+3 36
+1 24
+1 48
+1 48
+1 48
+1 48
+4 3078
+1 3078
+1 3078
+2 3102

fn=(3732)
257 24
+7 6
+1 28
cfn=(1397)
calls=7 -53 
* 2701
-1 52
+2 12

fn=(928)
1162 8956
+1 11195
cfn=(930)
calls=2239 -14 
* 369763
+1 4478

fn=(930)
1149 14110
+2 8466
cob=(3)
cfi=(3)
cfn=(424)
calls=2822 0 
* 56769
* 2822
* 5644
+2 14110
cfn=(798)
calls=2822 772 
* 303526
* 2822
+2 16932
cob=(3)
cfi=(3)
cfn=(856)
calls=2822 0 
* 50384
* 2822
+2 2822
+1 5644

fn=(434) MemoryContextCreate
729 11466
+5 4914
+1 3276
+1 4914
+1 4914
+1 3276
+1 3276
+1 4914
+1 3276
+1 3276
+3 3276
+2 6548
+1 6548
+1 2464
+1 1848
+2 3080
-2 3063
+2 5105
+4 2
+1 2
+4 3276

fn=(952)
1032 152988
+1 114741
cfi=(44)
cfn=(954)
calls=38247 113 
* 344223
* 38247
+2 305976
cfi=(14)
cfn=(956) AllocSetFree
calls=38247 -47 
* 2601943
+2 76494

fn=(1398)
303 18308
+8 27462
+5 9154

fn=(436)
412 5
+3 3
+1 2

fn=(1404)
156 12152
+4 15190
+2 9114
cfn=(1398)
calls=3038 303 
* 36456
+12 18228
cfi=(14)
cfn=(1406) AllocSetReset
calls=3038 566 
* 732463
+1 6076
+4 6076

fn=(2546)
956 568608
+3 189536
+5 189536
+3 189536
+2 758144
cfi=(14)
cfn=(800)
calls=94768 715 
* 8767717
* 94768
+1 473840
+12 2304712
cob=(3)
cfi=(3)
cfn=(828)
calls=89509 0 
* 1890673
* 89509
+2 94768
+1 473840

fn=(2950)
853 51100
+6 14600
+3 14600
+2 58400
cfi=(14)
cfn=(800)
calls=7300 715 
* 604347
* 7300
+1 36500
+12 891713
+2 7300
+1 36500

fl=(59)
fn=(1226) parse_bool_with_len
37 3042
+1 4563
+13 2500
cfi=(32)
cfn=(970) pg_strncasecmp
calls=500 +19 
* 57500
* 1000
+2 1000
+1 1000
+1 1000
+14 15
cfi=(32)
cfn=(970)
calls=3 +1 
* 165
* 6
+2 6
+1 6
+1 6
+6 32
cfi=(32)
cfn=(970)
calls=4 -9 
* 248
* 8
+2 4
+1 4
+1 4
+2 16
cfi=(32)
cfn=(970)
calls=2 -15 
* 150
* 4
+2 4
+1 4
+1 4
+26 1014

fn=(1224)
31 2535
+1 1521
cob=(3)
cfi=(3)
cfn=(424)
calls=507 -32 
* 7605
* 507
* 3042
cfn=(1226)
calls=507 +5 
* 73305
+1 1014

fl=(72)
fn=(2286)
818 3
+4 1
cfn=(2072)
calls=1 -52 
* 66
* 4
cfi=(87)
cfn=(2168)
calls=1 373 
* 1303
-1 1
+5 4
+4 1
cfn=(2072)
calls=1 -60 
* 66
* 5
cob=(3)
cfi=(3)
cfn=(828)
calls=1 0 
* 58
* 1
+3 2
+2 48
+2 20
cob=(3)
cfi=(3)
cfn=(828)
calls=4 0 
* 104
* 4
+1 8
-5 19
+8 2

fn=(3722) AtEOXact_ApplyLauncher
858 10
+6 4
+4 6
+12 6
+8 2
+1 2
+1 4

fn=(1612)
789 3
+3 3
+3 5
cob=(3)
cfi=(3)
cfn=(828)
calls=1 0 
* 79
* 1
+1 1
+2 1
+1 7
cfi=(17)
cfn=(462)
calls=1 203 
* 216
+1 7
cfi=(17)
cfn=(462)
calls=1 203 
* 229
+1 6
cfi=(17)
cfn=(462)
calls=1 203 
* 240
+2 7
cfi=(17)
cfn=(462)
calls=1 203 
* 240
+2 1
+1 1
+1 1
+2 3
cfi=(73)
cfn=(1614)
calls=1 +40 
* 492
+1 2

fn=(5726) IsLogicalLauncher
1088 2
+1 5
+1 2

fn=(2072)
770 9
+6 3
+1 12
+1 15
cfi=(87)
cfn=(2000)
calls=3 493 
* 69
* 15
cfi=(87)
cfn=(2002)
calls=3 476 
* 63
* 3
+2 3
+1 6

fl=(146) /home/mithuncy/fsm_code/src/backend/access/transam/../../../../src/include/storage/s_lock.h
fn=(2884) tas
225 12
+1 3
+2 15
+6 3
+1 9

fl=(157)
fn=(2922)
1239 6
+1 4
+2 12
+7 6
+1 4

fn=(2924)
1263 4
+1 4
+2 12
+7 4
+1 4

fl=(202) /home/mithuncy/fsm_code/src/backend/access/common/session.c
fn=(3616) InitializeSession
55 2
+1 4
cfi=(13)
cfn=(2156)
calls=1 815 
* 148
* 1
+1 2

fl=(99)
fn=(5696) LWLockConditionalAcquire
1294 10
+8 6
+8 6
+3 10
cfn=(2172) LWLockAttemptLock
calls=2 740 
* 176
* 2
+2 4
+11 12
+1 16
+3 12
+1 4

fn=(2158) LWLockRegisterTranche
603 350
+3 210
+15 490
+1 140

fn=(2170)
1122 307755
+1 123102
+1 61551
+1 61551
+27 184653
+8 184653
+26 307755
cfn=(2172)
calls=61551 740 
* 5384619
* 61551
+2 246204
+3 61551
+82 369306
+1 492408
+5 369306
+3 61551
+1 123102

fn=(2172)
740 307765
+9 246212
cfi=(117) /home/mithuncy/fsm_code/src/backend/storage/lmgr/../../../../src/include/port/atomics.h
cfn=(2174) pg_atomic_read_u32
calls=61553 245 
* 984848
* 61553
+8 123106
+2 123106
+2 148420
+1 59368
+1 59368
+4 159345
+1 63738
+1 31869
+13 223083
cfi=(117)
cfn=(2178) pg_atomic_compare_exchange_u32
calls=31869 316 
* 1083546
* 207788
cfi=(117)
cfn=(2178)
calls=29684 316 
* 1009256
* 123106
+3 123106
+7 123106
+7 123106

fn=(2140)
382 3
+8 4
+2 1
cfn=(2044)
calls=1 -42 
* 127
* 1
+5 3
cfi=(87)
cfn=(2134)
calls=1 158 
* 67
* 1
+3 1
+3 6
+2 2
+6 3
+1 2
+3 1
cfn=(2142) InitializeLWLocks
calls=1 +12 
* 14926
+4 1
cfn=(2154) RegisterLWLockTranches
calls=1 +73 
* 2528
+1 2

fn=(2144) LWLockInitialize
678 166230
+1 166230
cfi=(117)
cfn=(2146) pg_atomic_init_u32
calls=33246 227 
* 1097118
+4 132984
+1 132984
cfi=(119)
cfn=(2152)
calls=33246 30 
* 365706
+1 66492

fn=(5676) LWLockWaitListUnlock
863 4
+3 5
cfi=(117)
cfn=(5678) pg_atomic_fetch_and_u32
calls=1 362 
* 28
* 1
+3 2

fn=(2142)
427 3
+1 1
cfn=(2046) NumLWLocksByNamedTranches
calls=1 -93 
* 11
* 1
+7 4
+1 230
cfn=(2144)
calls=46 678 
* 2944
-1 186
+4 3
+1 2
+1 512
cfn=(2144)
calls=128 678 
* 8192
-1 514
+4 3
+1 2
+1 64
cfn=(2144)
calls=16 678 
* 1024
-1 66
+5 1
-1 2
+2 2
+1 64
cfn=(2144)
calls=16 678 
* 1024
-1 66
+4 3
+30 2

fn=(2046)
335 6
+1 3
+3 15
+3 3
+1 6

fn=(2154)
492 3
+3 3
+2 1
+2 7
cfi=(13)
cfn=(2156)
calls=1 815 
* 1040
-1 1
+6 2
+1 322
cfn=(2158)
calls=46 +98 
* 782
-1 140
+3 3
cfn=(2158)
calls=1 +96 
* 17
+1 3
cfn=(2158)
calls=1 +95 
* 17
+1 3
cfn=(2158)
calls=1 +94 
* 17
+2 3
cfn=(2158)
calls=1 +92 
* 17
+2 3
cfn=(2158)
calls=1 +90 
* 17
+2 3
cfn=(2158)
calls=1 +88 
* 17
+2 3
cfn=(2158)
calls=1 +86 
* 17
+2 3
cfn=(2158)
calls=1 +84 
* 17
+2 3
cfn=(2158)
calls=1 +82 
* 17
+1 3
cfn=(2158)
calls=1 +81 
* 17
+1 3
cfn=(2158)
calls=1 +80 
* 17
+3 5
+3 2

fn=(2182)
1726 246212
+10 184659
+1 430885
+1 61553
-2 184665
+4 123106
+3 369318
+2 184659
+1 61553
+1 26
-1 184667
+9 123106
+1 148420
cfi=(117)
cfn=(2184) pg_atomic_sub_fetch_u32
calls=29684 405 
* 1098308
* 59368
+2 159345
cfi=(117)
cfn=(2184)
calls=31869 405 
* 1179153
* 31869
+10 246212
+5 61553
+6 123106
+12 184659
+1 123106

fn=(5670) LWLockWaitListLock
811 4
+12 5
cfi=(117)
cfn=(5672) pg_atomic_fetch_or_u32
calls=1 376 
* 28
* 1
+1 4
+1 1
+28 2

fn=(2860) InitLWLockAccess
536 2
+4 2

fn=(5668) LWLockReleaseClearVar
1799 6
+1 3
cfn=(5670)
calls=1 811 
* 45
+7 3
+1 3
cfn=(5676)
calls=1 863 
* 40
+2 3
cfn=(2182)
calls=1 -84 
* 91
+1 2

fn=(2044)
350 6
+3 2
+2 2
cfn=(2046)
calls=2 -20 
* 22
* 2
+3 10
cfi=(87)
cfn=(2000)
calls=2 493 
* 46
* 2
+3 8
cfi=(87)
cfn=(2002)
calls=2 476 
* 42
* 2
+3 10
cfi=(87)
cfn=(2000)
calls=2 493 
* 28
* 10
cfi=(87)
cfn=(2002)
calls=2 476 
* 42
* 2
+3 10
+4 2
+2 2
+1 4

fn=(5784) LWLockReleaseAll
1825 2
+1 4
+6 2

fl=(118) /home/mithuncy/fsm_code/src/backend/storage/lmgr/../../../../src/include/port/atomics/generic.h
fn=(2176) pg_atomic_read_u32_impl
47 184659
+1 123106
+1 123106

fn=(2150) pg_atomic_write_u32_impl
56 936
+1 702
+1 468
-2 132984
+1 99738
+1 66492

fn=(2186) pg_atomic_sub_fetch_u32_impl
241 307765
+1 307765
cfi=(121) /home/mithuncy/fsm_code/src/backend/storage/lmgr/../../../../src/include/port/atomics/generic-gcc.h
cfn=(2188) pg_atomic_fetch_sub_u32_impl
calls=61553 -48 
* 677083
* 123106
+1 123106

fn=(2148) pg_atomic_init_u32_impl
162 1170
+1 1170
cfn=(2150)
calls=234 56 
* 2106
+1 468
-2 166230
+1 166230
cfn=(2150)
calls=33246 56 
* 299214
+1 66492

fl=(207) /home/mithuncy/fsm_code/src/backend/access/transam/../../../../src/include/lib/ilist.h
fn=(3676) dlist_init
279 6
+1 14
+1 4

fl=(39)
fn=(1106)
815 6
+7 5
cob=(3)
cfi=(3)
cfn=(446)
calls=1 0 
* 22
* 1
* 2
+3 1
+1 2
+44 2
cob=(3)
cfi=(3)
cfn=(388)
calls=1 0 
* 188
* 1
* 1
+1 2
+2 3
+1 3
+1 3
+2 1
+1 2

fn=(920)
699 24
+1 12
+6 12
+21 12
cfi=(19)
cfn=(922)
calls=4 202 
* 72
* 8
+2 16

fn=(1060)
447 12
+1 9
+1 6

fn=(1190)
563 12
+1 2
cfi=(26)
cfn=(1192) IsSubTransaction
calls=2 4519 
* 22
* 4
+6 6
+7 2
+1 4

fn=(1194)
526 12
+1 6
+2 7
cfi=(26)
cfn=(986) IsTransactionState
calls=1 333 
* 10
* 2
+25 2
+1 4

fn=(982)
237 12
+1 6
+2 9
+1 9
+1 6

fn=(1174)
254 18
+6 18
cfi=(32)
cfn=(970)
calls=3 70 
* 144
* 6
+61 18
cob=(3)
cfi=(3)
cfn=(1180)
calls=2 0 
* 166
cob=(1)
cfi=(1)
cfn=(223)
calls=1 0 
* 1384
* 7
* 9
+1 15
+11 12
cfi=(30)
cfn=(790) pg_tzset
calls=3 -96 
* 2488
* 3
+2 6
+6 9
cfi=(35)
cfn=(1046) pg_tz_acceptable
calls=3 1905 
* 3646
* 9
+11 6
+9 6
cob=(3)
cfi=(3)
cfn=(388)
calls=3 0 
* 382
* 3
* 9
+1 12
+2 12
+2 3
+1 6

fn=(1128)
745 12
+8 8
+1 2
+2 1
cfi=(26)
cfn=(986)
calls=1 333 
* 10
* 3
+11 5
cfi=(151)
cfn=(3444)
calls=1 1114 
* 476
* 1
+1 2
+6 8
+1 3
+1 3
+2 3
cfi=(151)
cfn=(3418)
calls=1 1161 
* 103
+3 2
cob=(3)
cfi=(3)
cfn=(388)
calls=1 0 
* 269
* 1
* 1
+1 2
+2 3
+1 3
+1 3
+2 1
+1 4

fn=(1130)
793 10
+1 4
+3 4
+1 1
+2 8
cfi=(54)
cfn=(3460) SetSessionAuthorization
calls=1 -85 
* 1327
+1 4

fn=(926)
45 21
+1 6
+1 6
+1 3
+1 3
+1 3
+8 12
cfi=(13)
cfn=(928)
calls=3 1162 
* 567
* 3
+3 15
cfi=(41)
cfn=(932)
calls=3 3507 
* 6218
* 9
+9 9
cfi=(46)
cfn=(966)
calls=3 +8 
* 30
* 6
+2 18
+4 24
cfi=(32)
cfn=(968)
calls=6 -39 
* 486
* 12
+2 6
+2 3
+1 6
+2 12
cfi=(32)
cfn=(968)
calls=3 -46 
* 123
* 6
+7 15
cfi=(32)
cfn=(970)
calls=3 -20 
* 144
* 6
+7 12
cfi=(32)
cfn=(968)
calls=3 -60 
* 123
* 6
+10 12
cfi=(32)
cfn=(968)
calls=3 -70 
* 123
* 6
+7 12
cfi=(32)
cfn=(968)
calls=3 -77 
* 123
* 6
+1 15
cfi=(32)
cfn=(970)
calls=3 -45 
* 144
-1 6
+8 12
cfi=(32)
cfn=(968)
calls=3 -85 
* 363
* 6
+4 6
+2 3
+1 6
-59 36
172 9
cfi=(13)
cfn=(952)
calls=3 1032 
* 255
+1 9
cfi=(45)
cfn=(972)
calls=3 1137 
* 957
+2 12
+9 6
cob=(3)
cfi=(3)
cfn=(388)
calls=3 0 
* 681
* 3
* 3
+1 6
+3 21
+3 6
+1 3
+11 18
+9 48
+1 3
+3 12
cob=(3)
cfi=(3)
cfn=(590)
calls=2 0 
* 178
cob=(1)
cfi=(1)
cfn=(223)
calls=1 0 
* 1324
* 7
+1 9
+5 6
cob=(3)
cfi=(3)
cfn=(388)
calls=3 0 
* 291
* 3
* 3
+1 6
+2 9
+1 12
+1 9
+2 3
+1 12

fn=(1124)
591 6
+1 2
cob=(3)
cfi=(3)
cfn=(388)
calls=1 0 
* 188
* 1
* 3
+1 4
+3 6
+2 1
+1 2

fn=(902)
623 24
+5 16
cfi=(40) /home/mithuncy/fsm_code/src/backend/utils/mb/encnames.c
cfn=(904) pg_valid_client_encoding
calls=4 488 
* 3688
* 4
+1 8
+4 12
cfi=(40)
cfn=(916) pg_encoding_to_char
calls=4 -25 
* 68
* 4
+16 12
cfi=(19)
cfn=(918)
calls=4 104 
* 64
* 8
+28 24
cob=(3)
cfi=(3)
cfn=(446)
calls=4 0 
* 88
* 4
* 8
+12 8
cob=(3)
cfi=(3)
cfn=(388)
calls=4 0 
* 840
* 4
* 12
+1 16
+2 16
+2 4
+1 8

fn=(1108)
882 5
+1 2
+2 8
cfi=(54)
cfn=(1110) SetCurrentRoleId
calls=1 761 
* 14
+1 2

fn=(1126)
603 5
+2 4
+2 2
+1 2

fn=(1184)
374 12
+1 9
+1 6

fn=(1034)
409 18
+6 12
cfi=(30)
cfn=(790)
calls=3 237 
* 1260474
* 3
+2 6
+6 9
cfi=(35)
cfn=(1046)
calls=3 1905 
* 3646
* 9
+11 6
cob=(3)
cfi=(3)
cfn=(388)
calls=3 0 
* 487
* 3
* 9
+1 12
+2 12
+2 3
+1 6

fn=(1196)
487 12
+1 16
+25 2
+1 4

fn=(3746)
383 3
+4 3
cfi=(35)
cfn=(3748) pg_get_timezone_name
calls=1 1890 
* 9
* 1
+2 2
+1 2
+3 2

fl=(107)
fn=(2066)
476 9
+1 3
+7 9
+3 12
cfi=(87)
cfn=(2002)
calls=3 -11 
* 63
* 3
+2 15
cfi=(87)
cfn=(2000)
calls=3 +4 
* 69
* 15
cfi=(87)
cfn=(2002)
calls=3 -13 
* 63
* 3
+2 3
+1 6

fn=(2280)
496 3
+3 3
+4 1
cfn=(2066)
calls=1 -27 
* 91
* 4
cfi=(87)
cfn=(2168)
calls=1 373 
* 1167
-1 1
+4 3
+2 4
+4 2
+2 4
cfn=(2066)
calls=1 -38 
* 91
* 521
+2 2
+3 10
-1 130
cfi=(99)
cfn=(2144)
calls=10 678 
* 640
+2 110
cfi=(128)
cfn=(2278)
calls=10 40 
* 230
-4 43
+8 5
cfi=(99)
cfn=(2158)
calls=1 +79 
* 17
+2 2

fl=(181)
fn=(3266) init_spin_delay
1012 36048
+1 12016
+1 12016
+1 12016
+1 18024
+1 18024
+1 18024
+1 12016

fn=(3262)
225 6008
+1 1502
+2 7510
+6 1502
+1 4506

fl=(296)
fn=(5108)
30 4
+8 9
+1 9
-1 2
+2 2
+1 2
-2 2
+3 2
+3 2

fl=(312) /home/mithuncy/fsm_code/src/backend/access/transam/varsup.c
fn=(5386) GetNewTransactionId
49 7
+7 1
cfi=(26)
cfn=(1210)
calls=1 910 
* 8
* 2
+7 3
+8 1
cfi=(53)
cfn=(2878)
calls=1 7896 
* 11
* 2
+3 5
cfi=(99)
cfn=(2170)
calls=1 1122 
* 137
+2 3
+15 6
cfi=(168) /home/mithuncy/fsm_code/src/backend/access/transam/transam.c
cfn=(5388) TransactionIdFollowsOrEquals
calls=1 350 
* 18
* 2
+80 3
cfi=(94)
cfn=(5390) ExtendCLOG
calls=1 868 
* 13
+1 3
cfi=(95)
cfn=(5392) ExtendCommitTs
calls=1 785 
* 12
+1 3
cfi=(96)
cfn=(5394) ExtendSUBTRANS
calls=1 325 
* 13
+8 8
+36 4
+1 4
+15 4
cfi=(99)
cfn=(2182)
calls=1 1726 
* 91
+2 1
+1 5

fl=(27)
fn=(750)
42 4
+1 4
cob=(3)
cfi=(3)
cfn=(756)
calls=1 -43 
* 38
cob=(1)
cfi=(1)
cfn=(223)
calls=1 -43 
* 1390
* 6
+3 4
cob=(3)
cfi=(3)
cfn=(762)
calls=1 -46 
* 21
cob=(1)
cfi=(1)
cfn=(223)
calls=1 -46 
* 1382
* 6
+1 4
cob=(3)
cfi=(3)
cfn=(762)
calls=2 -47 
* 42
* 2
+8 6
cob=(3)
cfi=(3)
cfn=(768)
calls=1 -55 
* 10
cob=(1)
cfi=(1)
cfn=(223)
calls=1 -55 
* 1316
* 6
+1 6
cob=(3)
cfi=(3)
cfn=(768)
calls=2 -56 
* 20
* 2
+3 6
cob=(3)
cfi=(3)
cfn=(768)
calls=2 -59 
* 20
* 2
+1 6
cob=(3)
cfi=(3)
cfn=(768)
calls=2 -60 
* 20
* 2
+3 6
cob=(3)
cfi=(3)
cfn=(768)
calls=2 -63 
* 20
* 2
+1 6
cob=(3)
cfi=(3)
cfn=(768)
calls=2 -64 
* 20
* 2
+3 6
cob=(3)
cfi=(3)
cfn=(768)
calls=2 -67 
* 20
* 2
+1 6
cob=(3)
cfi=(3)
cfn=(768)
calls=2 -68 
* 20
* 2
+3 6
cob=(3)
cfi=(3)
cfn=(768)
calls=2 -71 
* 20
* 2
+1 6
cob=(3)
cfi=(3)
cfn=(768)
calls=2 -72 
* 20
* 2
+3 6
cob=(3)
cfi=(3)
cfn=(768)
calls=2 -75 
* 20
* 2
+1 6
cob=(3)
cfi=(3)
cfn=(768)
calls=2 -76 
* 20
* 2
+3 6
cob=(3)
cfi=(3)
cfn=(768)
calls=2 -79 
* 20
* 2
+1 6
cob=(3)
cfi=(3)
cfn=(768)
calls=2 -80 
* 20
* 2
+3 6
cob=(3)
cfi=(3)
cfn=(768)
calls=2 -83 
* 20
* 2
+1 6
cob=(3)
cfi=(3)
cfn=(768)
calls=2 -84 
* 20
* 2
+5 6
cob=(3)
cfi=(3)
cfn=(768)
calls=2 -89 
* 20
* 2
+3 6
cob=(3)
cfi=(3)
cfn=(768)
calls=2 -92 
* 20
* 2
+3 6
cob=(3)
cfi=(3)
cfn=(768)
calls=2 -95 
* 20
* 2
+2 4

fl=(262)
fn=(5118) contain_volatile_functions
959 4
+1 4
cfn=(5120) contain_volatile_functions_walker
calls=1 +11 
* 47344
+1 2

fn=(5120)
971 5
+1 2
+3 5
cfi=(250)
cfn=(4642)
calls=1 1659 
* 525
* 2
+4 4
+13 4
+7 5
cfi=(250)
cfn=(4494)
calls=1 1843 
* 46790
+2 2

fn=(5121)
971 15
+1 6
+3 15
cfi=(250)
cfn=(4642)
calls=3 1659 
* 46398
* 6
+4 12
+13 12
+7 15
cfi=(250)
cfn=(4495)
calls=3 1843 
* 243
+2 6

fn=(5138) contain_context_dependent_node
1466 4
+1 1
+2 5
cfn=(5140) contain_context_dependent_node_walker
calls=1 +7 
* 269
+1 2

fn=(5140)
1476 5
+1 2
+2 4
+2 4
+30 4
+18 5
cfi=(250)
cfn=(4494)
calls=1 1843 
* 243
+2 2

fn=(5141)
1476 10
+1 4
+2 8
+2 8
+30 8
+18 10
cfi=(250)
cfn=(4495)
calls=2 1843 
* 96
+2 4

fn=(4664) eval_const_expressions_mutator
2573 24
+1 6
+2 15
3835 3
+10 15
cfi=(250)
cfn=(4666)
calls=3 2429 
* 228912
+1 18

fn=(4665)
2573 112
+1 28
+2 97
+4 4
+1 6
+3 12
+63 6
cfi=(246)
cfn=(4420)
calls=2 4767 
* 484
* 2
+54 2
+1 3
+17 2
-6 8
cfi=(250)
cfn=(4576)
calls=1 277 
* 54
* 16
cfn=(5052) simplify_function
calls=1 4197 
* 226291
* 1
+10 2
+9 4
cfi=(13)
cfn=(2950)
calls=1 853 
* 174
* 5
+1 4
+1 4
+1 4
+1 4
+1 4
+1 4
+1 4
+1 3
+1 4
+1 2
+4 4
+1 6
+8 6
cfi=(250)
cfn=(5042)
calls=2 1620 
* 20
+6 40
cfn=(5053) simplify_function'2
calls=2 4197 
* 229210
* 2
+9 4
+1 2
+7 4
+1 2
-1 2
+14 4
cfi=(13)
cfn=(2950)
calls=1 853 
* 174
* 5
+1 4
+1 4
+1 4
+1 4
+1 4
+1 4
+1 3
+1 4
+1 2
3061 2
+10 5
cfi=(45)
cfn=(1586)
calls=1 260 
* 290
* 1
+11 4
cfi=(250)
cfn=(4478)
calls=1 43 
* 24
* 5
cfi=(275)
cfn=(5128)
calls=1 2642 
* 496
+2 7
cfi=(275)
cfn=(5126)
calls=1 2609 
* 511
+3 14
cfn=(5053)
calls=1 4197 
* 1364
* 1
+9 2
+41 4
cfi=(13)
cfn=(2950)
calls=1 853 
* 160
* 5
+1 3
cfi=(271)
cfn=(4690)
calls=1 78 
* 10
* 3
+1 4
+1 4
+1 4
+1 4
+1 2
3835 8
+10 40
cfi=(250)
cfn=(4667)
calls=8 2429 
* 228743
+1 84

fn=(5046)
1160 10
+1 6
cfi=(275)
cfn=(5048) func_parallel
calls=2 1556 
* 942
* 10
cfn=(5050) max_parallel_hazard_test
calls=2 -29 
* 26
+2 4

fn=(5134)
1336 15
+1 9
cfi=(275)
cfn=(5136) func_strict
calls=3 1518 
* 1413
* 18
+1 6

fn=(4638)
1070 12
+3 3
+1 3
+1 3
+1 15
cfn=(4640) max_parallel_hazard_walker
calls=3 +91 
* 4402
+1 3
+1 6

fn=(5056) evaluate_function
4512 44
+1 32
+1 4
+1 4
+7 16
+14 16
+6 12
cfi=(271)
cfn=(4690)
calls=4 78 
* 40
* 8
+2 35
+1 30
+2 4
-5 43
+14 22
+9 8
+1 8
+34 8

fn=(5058) inline_function
4639 22
+1 16
+23 8
+1 2
-1 2
+2 2
-1 2
+2 2
-1 2
+2 2
-1 2
+2 4
cfi=(190)
cfn=(4020)
calls=1 362 
* 42
* 1
-1 2
+2 6
cfi=(271)
cfn=(4702) list_length
calls=1 90 
* 10
-1 2
+2 2
+3 6
cfi=(45)
cfn=(3130)
calls=1 506 
* 23
* 2
+4 1
cfi=(54)
cfn=(3464)
calls=1 381 
* 5
* 6
cfi=(230)
cfn=(5060) pg_proc_aclcheck
calls=1 -21 
* 51
* 2
+4 6
+7 7
cfi=(14)
cfn=(432)
calls=1 395 
* 473
* 1
+3 3
cfi=(292) /home/mithuncy/fsm_code/src/backend/optimizer/util/../../../../src/include/utils/palloc.h
cfn=(5064) MemoryContextSwitchTo
calls=1 110 
* 10
* 1
+3 6
cfi=(151)
cfn=(4026)
calls=1 1376 
* 1690
* 1
+4 3
+2 3
cfi=(41)
cfn=(4028)
calls=1 186 
* 217
* 1
+6 3
+1 2
+2 1
+1 2
+1 2
+1 2
+8 4
cfi=(13)
cfn=(2950)
calls=1 853 
* 174
* 5
+1 3
+1 3
+1 2
+1 3
+1 2
+1 3
+1 3
+1 3
+1 2
+2 5
cfi=(293)
cfn=(5066)
calls=1 187 
* 895
* 1
+10 3
cfi=(52)
cfn=(3880)
calls=1 633 
* 15412
* 1
+1 3
cfi=(271)
cfn=(4702)
calls=1 90 
* 10
* 2
+3 2
cfi=(226)
cfn=(3954)
calls=1 45 
* 346
* 1
+1 3
+1 5
cfi=(293)
cfn=(5082)
calls=1 274 
* 15
+2 3
cfi=(271)
cfn=(4690)
calls=1 78 
* 10
* 5
cfi=(225)
cfn=(3956)
calls=1 192 
* 142304
* 1
+2 3
cfi=(226)
cfn=(3962)
calls=1 78 
* 106
+10 4
+1 2
-1 2
+2 2
-1 2
+2 2
-1 2
+2 2
-1 2
+2 2
-1 2
+2 2
-1 2
+2 2
-1 2
+2 3
-1 2
+2 3
-1 2
+2 2
-1 2
+2 2
-1 2
+2 2
-1 2
+2 2
-1 2
+2 2
-1 2
+2 2
-1 2
+2 2
-1 2
+2 2
-1 2
+2 2
-1 2
+2 4
cfi=(271)
cfn=(4702)
calls=1 90 
* 10
-1 2
+14 4
cfi=(45)
cfn=(1586)
calls=1 260 
* 290
* 7
cfi=(293)
cfn=(5112)
calls=1 1589 
* 666
* 2
+5 4
cfi=(271)
cfn=(4690)
calls=1 78 
* 10
* 3
+10 3
cfi=(250)
cfn=(4478)
calls=1 43 
* 24
* 2
+14 4
+3 4
+1 3
cfn=(5118)
calls=1 959 
* 47354
-1 2
+4 4
+1 3
cfn=(5130) contain_nonstrict_functions
calls=1 1330 
* 3351
-1 2
+8 3
cfn=(5138)
calls=1 1466 
* 281
* 2
+9 6
cfi=(13)
cfn=(2546)
calls=1 956 
* 139
* 1
+1 8
cfn=(5142) substitute_actual_parameters
calls=1 4956 
* 1154
* 1
+4 1
+1 3
cfi=(271)
cfn=(4690)
calls=1 78 
* 10
* 2
+2 6
+2 16
+6 16
+25 2
-35 12
+42 3
cfi=(292)
cfn=(5064)
calls=1 110 
* 10
+2 3
cfi=(246)
cfn=(4420)
calls=1 4767 
* 1749
* 1
+2 3
cfi=(13)
cfn=(1396)
calls=1 212 
* 297
+8 2
+2 3
cfi=(250)
cfn=(4496)
calls=1 721 
* 21
* 1
+2 5
+16 4
+1 6
cfi=(254)
cfn=(5040) record_plan_function_dependency
calls=1 2553 
* 12
+6 6
cfi=(45)
cfn=(4556)
calls=1 296 
* 290
* 2
+1 5
cfn=(4665)
calls=1 2573 
* 4769
* 1
+1 4
cfi=(45)
cfn=(4562)
calls=1 667 
* 266
* 2
+2 2
+2 2
+9 8

fn=(5059) inline_function'2
4639 22
+1 16
+23 8
+7 4
4948 8

fn=(4662)
2494 15
+3 6
+1 15
+3 6
+1 3
+1 3
+1 3
+1 15
cfn=(4664)
calls=3 +68 
* 228993
+1 6

fn=(4684)
1089 75
+11 75
+1 45
-1 30
+2 30
+25 30

fn=(5050)
1132 12
+1 6
+4 2
+17 2
+1 4

fn=(5054) expand_function_arguments
4291 24
+1 32
+1 4
+4 12
cfi=(271)
cfn=(4690)
calls=4 78 
* 40
* 8
+2 21
+2 28
-4 43
+12 8
+6 12
cfi=(271)
cfn=(4702)
calls=4 90 
* 40
* 20
+8 4
+1 8

fn=(5130)
1330 4
+1 4
cfn=(5132) contain_nonstrict_functions_walker
calls=1 +11 
* 3341
+1 2

fn=(5132)
1342 5
+1 2
+2 4
+5 4
+8 4
+5 4
+7 4
+5 4
+5 4
+14 4
+5 4
+2 4
+2 4
+2 4
+11 4
+2 4
+2 4
+2 4
+2 4
+2 4
+2 4
+2 4
+2 4
+4 5
cfi=(250)
cfn=(4642)
calls=1 1659 
* 529
* 2
+4 5
cfi=(250)
cfn=(4494)
calls=1 1843 
* 2707
+2 2

fn=(5133)
1342 15
+1 6
+2 12
+5 12
+8 12
+5 12
+7 12
+5 12
+5 12
+14 12
+5 12
+2 12
+2 12
+2 12
+11 12
+2 12
+2 12
+2 12
+2 12
+2 12
+2 12
+2 12
+2 12
+4 15
cfi=(250)
cfn=(4642)
calls=3 1659 
* 2087
* 6
+4 15
cfi=(250)
cfn=(4495)
calls=3 1843 
* 319
+2 6

fn=(5142)
4956 7
+3 2
+1 2
+1 2
+2 5
cfn=(5144) substitute_actual_parameters_mutator
calls=1 +6 
* 1134
+1 2

fn=(5144)
4969 5
+1 2
+2 4
+16 5
cfi=(250)
cfn=(4667)
calls=1 2429 
* 1116
+2 2

fn=(5145)
4969 20
+1 8
+2 16
+2 4
+2 8
+2 20
+4 22
+4 16
cfi=(45)
cfn=(5072) list_nth
calls=2 411 
* 61
* 2
+2 10
cfi=(250)
cfn=(4667)
calls=2 2429 
* 1201
+2 8

fn=(4640)
1167 18
+1 6
+4 15
cfi=(250)
cfn=(4642)
calls=3 1659 
* 45
* 6
+15 12
+6 12
+14 12
+9 12
+11 12
+12 12
+28 12
+21 12
+2 6
+3 12
+7 18
cfi=(250)
cfn=(4484)
calls=3 2266 
* 4165
* 3
+9 12

fn=(4641)
1167 276
+1 92
+1 60
+3 80
cfi=(250)
cfn=(4642)
calls=16 1659 
* 1279
* 32
+15 64
+6 64
+14 64
+9 64
+11 64
+12 64
+28 64
+2 2
+2 4
+1 2
+16 60
+18 75
cfi=(250)
cfn=(4495)
calls=9 1843 
* 3948
cfi=(250)
cfn=(4494)
calls=6 1843 
* 2947
+3 184

fn=(5052)
4197 15
+1 3
+17 4
cfi=(151)
cfn=(3444)
calls=1 1114 
* 342
* 1
+1 2
+2 8
+8 2
+2 6
cfn=(5054)
calls=1 +63 
* 79
* 1
+1 5
cfi=(250)
cfn=(4667)
calls=1 2429 
* 225553
* 1
+4 3
+5 15
cfn=(5056)
calls=1 4512 
* 87
* 1
+5 8
+25 4
+1 12
cfn=(5058)
calls=1 4639 
* 29
* 1
+4 3
cfi=(151)
cfn=(3418)
calls=1 1161 
* 103
+2 1
+1 2

fn=(5053)
4197 45
+1 9
+17 12
cfi=(151)
cfn=(3444)
calls=3 1114 
* 1026
* 3
+1 6
+2 24
+8 6
+2 18
cfn=(5054)
calls=3 +63 
* 225
* 3
+1 15
cfi=(250)
cfn=(4667)
calls=3 2429 
* 5464
* 3
+4 9
+5 45
cfn=(5056)
calls=3 4512 
* 247
* 3
+5 24
+25 12
+1 36
cfn=(5059)
calls=2 4639 
* 58
cfn=(5058)
calls=1 4639 
* 222951
* 3
+4 9
cfi=(151)
cfn=(3418)
calls=3 1161 
* 309
+2 3
+1 6

fn=(5122)
965 15
+1 9
cfi=(275)
cfn=(5124) func_volatile
calls=3 1537 
* 45732
* 6
+1 6

fl=(273)
fn=(4698)
78 9
+1 15
+1 6
-2 9
+1 9
+1 6

fl=(21)
fn=(666)
1713 6
+3 22
+3 2
+1 4

fn=(656)
1571 42
+4 56
cob=(10)
cfi=(22)
cfn=(662)
calls=13 0 
* 39
cob=(1)
cfi=(1)
cfn=(223)
calls=1 0 
* 1385
* 18
+2 42
+2 70
+2 14
+1 28

fn=(3772) TimestampDifferenceExceeds
1672 10
+1 10
+2 10
+1 4

fn=(2774) TimestampDifference
1646 12
+1 10
+2 4
+7 20
+1 30
+2 4

fl=(37)
fn=(884)
83 12
+4 12
+2 64
-2 56
+5 8

fn=(4294) strtoint
51 36
+3 36
cob=(3)
cfi=(3)
cfn=(1246)
calls=6 -54 
* 768
* 6
* 6
+1 24
+2 6
+1 12

fl=(196) /home/mithuncy/fsm_code/src/backend/utils/adt/oid.c
fn=(3478) oideq
355 12252
+1 12252
+1 12252
+2 18387
+1 8168

fl=(298)
fn=(5538)
559 3000
+6 3000
cob=(3)
cfi=(3)
cfn=(1638)
calls=499 0 
* 72854
cob=(1)
cfi=(1)
cfn=(223)
calls=1 0 
* 1430
* 504
+2 1000

fn=(5162) pg_ltoa
286 2500
+1 1000
+1 500
+6 1000
+5 1000
+10 2784
+2 13920
+1 13920
+1 8352
+1 2784
+2 1000
+4 2000
+3 500
+2 1473
+2 2946
+1 2455
-5 2973
+7 1000

fn=(5358) pg_strtoint32
200 437500
+1 175000
+1 87500
+1 87500
+3 787500
cob=(3)
cfi=(3)
cfn=(914)
calls=87500 0 
* 262500
* 87500
* 962500
+4 350000
+5 350000
+4 87500
cob=(3)
cfi=(3)
cfn=(914)
calls=87500 0 
* 262500
* 87500
* 1225000
+4 87500
+2 1251000
+2 1042500
cfi=(311) /home/mithuncy/fsm_code/src/backend/utils/adt/../../../../src/include/common/int.h
cfn=(5360) pg_mul_s32_overflow
calls=208500 -82 
* 4587000
* 625500
+1 1251000
cfi=(311)
cfn=(5362) pg_sub_s32_overflow
calls=208500 122 
* 4795500
* 208500
-1 417000
-4 1392500
cob=(3)
cfi=(3)
cfn=(914)
calls=208500 0 
* 625500
* 208500
* 2293500
+10 437500
+3 612500
+3 350000
+3 525000
+2 262500
+3 175000
+15 350000

fl=(126)
fn=(2236)
69 41133
+1 41133
+1 41133
+6 54844
+1 54844
+2 82266
+1 27422

fn=(2842) SHMQueueElemInit
58 6
+2 12
+1 4

fn=(2234)
146 2920
+1 1752
+4 1752
+1 160
+2 2520
+1 1168

fn=(2230)
90 81724
+1 61293
+5 81724
+1 81724
+1 61293
+1 61293
+1 40862

fn=(5782) SHMQueueIsDetached
48 3
+2 4
+1 2

fn=(2228)
37 46734
+2 109046
+1 31156

fl=(141) /home/mithuncy/fsm_code/src/backend/storage/smgr/md.c
fn=(3582) _mdnblocks
1965 17507
+3 10004
cfi=(25)
cfn=(3584)
calls=2501 +46 
* 95038
* 2501
+1 5002
+6 12505
+1 10004

fn=(3284) mdread
718 16
+11 14
cfn=(3286) _mdfd_getseg
calls=2 1838 
* 6710
* 2
+3 8
+4 18
cfi=(25)
cfn=(3304)
calls=2 1836 
* 969
* 2
+10 4
+25 8

fn=(3286)
1838 15020
+9 4506
+3 10514
+2 13500
+1 3000
+10 14
+4 12
cfn=(3288) mdopen
calls=2 560 
* 6608
* 2
+1 4
+4 20
+85 2
+1 6008

fn=(3874) mdclose
614 5020
+1 6024
+3 2008
+1 1004
+19 2008

fn=(2826) mdinit
207 3
+1 7
cfi=(14)
cfn=(432)
calls=1 395 
* 111
* 1
+9 10
+28 2

fn=(3580) mdnblocks
847 12505
+1 15006
cfn=(3288)
calls=2501 560 
* 1062722
* 2501
+2 2501
+18 17507
+1 22509
+4 15006
cfn=(3582)
calls=2501 1965 
* 152561
* 2501
+1 5002
+2 5002
+1 15006
+18 5002

fn=(5420) mdexists
278 5000
+5 5000
cfn=(3874)
calls=1000 614 
* 16000
+2 6000
cfn=(3288)
calls=1000 560 
* 2723519
* 2000
+1 2000

fn=(5488) register_dirty_segment
1416 10500
+4 4500
+7 13500
cfi=(104)
cfn=(5490) ForwardFsyncRequest
calls=1500 1096 
* 465000
* 3000
+1 1500
+11 6000

fn=(3288)
560 24521
+6 24521
+1 12000
+2 18036
cfi=(183) /home/mithuncy/fsm_code/src/common/relpath.c
cfn=(3290) GetRelationPath
calls=1503 140 
* 2281422
* 1503
+2 6012
cfi=(25)
cfn=(3294)
calls=1503 1298 
* 1028122
* 1503
+2 3006
+24 4509
cfi=(13)
cfn=(952)
calls=1503 1032 
* 127755
+2 9018
cfn=(3302) _fdvec_resize
calls=1503 1738 
* 218873
+1 9018
+1 4509
+1 3006
+4 1503
+1 14012

fn=(3302)
1738 9018
+1 3006
+8 10521
+3 10521
cfi=(13)
cfn=(798)
calls=1503 772 
* 164765
-1 9018
+16 9018
+1 3006

fn=(5476) mdextend
497 16500
+15 3000
+7 10500
cfn=(3286)
calls=1500 1838 
* 52500
* 1500
+2 6000
+4 13500
cfi=(25)
cfn=(5478)
calls=1500 1892 
* 197272
* 4500
+17 12000
+1 9000
cfn=(5488)
calls=1500 1416 
* 504000
+3 7500

fl=(160) /home/mithuncy/fsm_code/src/backend/access/index/amapi.c
fn=(2938) GetIndexAmRoutine
34 316
+4 316
cfi=(161)
cfn=(2940) OidFunctionCall0Coll
calls=79 1386 
* 39469
* 79
+1 158
+2 474
+4 79
+1 158

fl=(170)
fn=(3514) initialize_acl
4689 2
+1 3
+6 4
cfi=(155)
cfn=(2910)
calls=1 1410 
* 65
+4 2

fn=(5218) is_member_of_role
4932 2500
+2 1500
+4 1500
cfi=(193)
cfn=(3466)
calls=500 58 
* 7000
* 1000
+1 1000
+7 1000

fn=(3022)
5191 7
+3 8
cfi=(151)
cfn=(3024)
calls=1 1227 
* 51537
* 1
+2 2
+4 1
+1 4

fl=(299)
fn=(5186)
10555 2000
+6 500
+10 6000
+2 1500
+2 17676
+2 27568
+1 6176
-5 31460
+18 1500
+3 1000
+10 2500
cfi=(219) /home/mithuncy/fsm_code/src/common/keywords.c
cfn=(3912) ScanKeywordLookup
calls=500 67 
* 430272
* 500
+4 1000
+4 1000
+1 1000
+18 1000

fl=(63)
fn=(1500) splitTzLine
99 2744
+7 1176
+1 1176
+2 1568
cob=(3)
cfi=(3)
cfn=(1506)
calls=391 0 
* 38327
cob=(1)
cfi=(1)
cfn=(223)
calls=1 0 
* 1374
* 396
* 392
+1 784
+6 1176
cfi=(13)
cfn=(928)
calls=392 1162 
* 69030
* 784
+2 1176
cob=(3)
cfi=(3)
cfn=(1506)
calls=392 0 
* 47944
* 392
* 392
+1 784
+8 392
cob=(3)
cfi=(3)
cfn=(914)
calls=392 0 
* 1176
* 392
* 5784
+2 580
+1 1740
cob=(3)
cfi=(3)
cfn=(1246)
calls=290 0 
* 53034
* 290
* 870
+1 2030
+7 870
cob=(3)
cfi=(3)
cfn=(1506)
calls=290 0 
* 28138
* 290
* 290
+1 1740
cfi=(32)
cfn=(968)
calls=290 37 
* 11502
* 580
+2 192
+1 288
cob=(3)
cfi=(3)
cfn=(1506)
calls=96 0 
* 8928
* 96
* 96
-3 96
+8 388
+1 388
-9 194
+19 306
cfi=(13)
cfn=(928)
calls=102 1162 
* 20994
* 204
+1 204
+1 204
+1 306
cob=(3)
cfi=(3)
cfn=(1506)
calls=102 0 
* 9486
* 102
* 102
+3 784
+3 1568
+6 392
+1 784

fn=(1472)
439 8
+1 2
+11 14
cfi=(14)
cfn=(432)
calls=2 -56 
* 713
* 2
+3 6
cfi=(61)
cfn=(1270)
calls=2 110 
* 20
* 2
+3 2
+1 16
cfi=(13)
cfn=(940)
calls=2 925 
* 879
* 2
+3 14
cfn=(1474) ParseTzFile
calls=2 278 
* 1510243
* 2
+3 4
+2 10
cfi=(64)
cfn=(1518)
calls=2 4508 
* 71378
* 2
+1 4
+5 6
cfi=(61)
cfn=(1270)
calls=2 110 
* 20
+1 6
cfi=(13)
cfn=(1396)
calls=2 212 
* 1740
+2 2
+1 4

fn=(1474)
278 16
+7 2
+1 2
+9 6
+2 14
cob=(3)
cfi=(3)
cfn=(914)
calls=14 0 
* 42
* 14
* 154
-2 78
+17 4
+7 8
cfi=(11)
cfn=(1428) get_share_path
calls=2 705 
* 9302
+1 20
cfi=(17)
cfn=(462)
calls=2 203 
* 1032
+2 8
cfi=(25)
cfn=(1278)
calls=2 2186 
* 1290
* 2
+1 4
+36 2
+2 1266
+1 6330
cob=(3)
cfi=(3)
cfn=(1486)
calls=1265 0 
* 308214
cob=(1)
cfi=(1)
cfn=(223)
calls=1 0 
* 1783
* 1270
* 2532
+2 6
cob=(3)
cfi=(3)
cfn=(1366)
calls=2 0 
* 72
* 2
* 4
+7 2
+2 3792
cob=(3)
cfi=(3)
cfn=(424)
calls=1264 0 
* 27004
* 1264
* 2528
+9 2528
+1 1264
+1 12148
-1 67016
cob=(3)
cfi=(3)
cfn=(914)
calls=13368 0 
* 40104
* 13368
* 147048
+3 5056
+1 44
+1 4880
+1 828
+2 1960
cfi=(32)
cfn=(970)
calls=392 70 
* 18032
* 784
+19 1960
cfi=(32)
cfn=(970)
calls=392 70 
* 18032
* 784
+6 2352
cfn=(1500)
calls=392 99 
* 325415
* 1176
+2 1176
cfn=(1508) validateTzEntry
calls=392 52 
* 54716
* 1176
+2 3136
cfn=(1512) addToArray
calls=392 190 
* 360506
* 392
+1 784
-62 3798
cob=(3)
cfi=(3)
cfn=(1480)
calls=1265 0 
* 45540
cob=(1)
cfi=(1)
cfn=(223)
calls=1 0 
* 1290
* 1270
* 2532
+66 6
cfi=(25)
cfn=(1374)
calls=2 2385 
* 1067
+2 2
+1 4

fn=(1508)
52 1568
+7 1568
cob=(3)
cfi=(3)
cfn=(424)
calls=392 -59 
* 5880
* 392
* 784
+11 1568
+1 784
-1 784
+12 1568
+1 7130
cfi=(32)
cfn=(1510) pg_tolower
calls=1426 +40 
* 19964
* 2852
-1 8698
+3 392
+1 784

fn=(1512)
190 3528
+10 1176
+1 392
+1 1176
+1 392
+2 12380
+1 24760
+3 17332
cob=(3)
cfi=(3)
cfn=(446)
calls=2476 0 
* 64804
* 2476
* 2476
+1 4952
+1 3952
+1 2976
+1 5952
-10 8604
+46 1568
+2 10
+1 26
cfi=(13)
cfn=(1514)
calls=2 1045 
* 2334
* 4
+3 20
+2 32
cob=(3)
cfi=(3)
cfn=(482)
calls=2 0 
* 258
* 2
-2 3900
+2 6240
cob=(3)
cfi=(3)
cfn=(482)
calls=390 0 
* 176242
* 390
+2 2352
cob=(3)
cfi=(3)
cfn=(856)
calls=392 0 
* 7840
* 392
+2 784
+1 784

fl=(90)
fn=(3220) BufTableLookup
93 88300
+4 17660
-1 105960
cfi=(31)
cfn=(842)
calls=17660 924 
* 2434297
* 17660
+7 35320
+1 3004
+2 32316
+1 35320

fn=(2014)
44 4
+1 5
cfi=(31)
cfn=(2006)
calls=1 733 
* 441
+1 2

fn=(3218) BufTableHashCode
81 70640
+1 88300
cfi=(31)
cfn=(2226)
calls=17660 861 
* 2472400
+1 35320

fn=(2214)
54 4
+6 1
+1 1
+1 1
+2 9
cfi=(87)
cfn=(2162)
calls=1 322 
* 236609
* 1
+4 2

fn=(3278) BufTableInsert
121 9012
+8 1502
-1 10514
cfi=(31)
cfn=(842)
calls=1502 924 
* 382966
* 1502
+7 4506
+3 4506
+2 1502
+1 3004

fl=(279)
fn=(4734)
154 30
+8 12
+2 12
+1 12
+30 12

fn=(4892) bms_add_member
765 2505
+4 1002
+2 1002
+1 1503
cfn=(4894) bms_make_singleton
calls=501 246 
* 101202
* 501
+19 1002

fn=(4894)
246 2004
+5 1002
+2 3006
+1 3507
+1 3507
cfi=(13)
cfn=(2546)
calls=501 956 
* 79659
* 501
+1 2004
+1 4509
+1 501
+1 1002

fn=(4728)
134 48
+4 24
+1 24
+5 24

fl=(285) /home/mithuncy/fsm_code/src/backend/parser/parse_relation.c
fn=(4880) refnameRangeTblEntry
89 8
+1 1
+2 2
+1 2
+2 2
+20 1
+4 2
+3 6
cfn=(4882) scanNameSpaceForRefname
calls=1 +34 
* 31
* 1
+2 2
+3 2
+1 5
+4 4
-17 4
+19 1
+1 2

fn=(4882)
156 8
+1 1
+3 4
cfi=(222)
cfn=(4336)
calls=1 -82 
* 8
* 4
+24 1
+1 5

fn=(4878) colNameToVar
760 10
+1 1
+1 2
+2 1
+4 4
cfi=(222)
cfn=(4336)
calls=1 78 
* 8
* 4
+30 4
+3 3
-37 4
+40 1
+1 5

fn=(5250) addRangeTableEntryForRelation
1290 5500
+1 2000
cfi=(13)
cfn=(2950)
calls=500 853 
* 141500
* 2500
+1 3000
+9 1000
+1 1500
+1 2000
+1 2500
+1 1500
+6 2000
cfi=(221)
cfn=(5252)
calls=500 387 
* 154332
* 1000
+1 4000
cfn=(5254) buildRelationAliases
calls=500 1032 
* 331668
+8 1000
+1 1500
+1 1500
+2 1000
+1 1000
+1 1000
+1 1000
+1 1000
+6 3000
cfi=(45)
cfn=(960)
calls=500 129 
* 145000
* 1000
+2 500
+1 1000

fn=(5254)
1032 3500
+1 1500
+4 500
+4 1000
+9 500
+1 500
+3 1000
+2 5000
+3 2000
+8 1000
+9 2000
cfi=(13)
cfn=(928)
calls=500 +86 
* 72668
* 1000
cfi=(220) /home/mithuncy/fsm_code/src/backend/nodes/value.c
cfn=(3920) makeString
calls=500 54 
* 83500
* 500
+4 3000
cfi=(45)
cfn=(960)
calls=500 129 
* 145000
* 1000
-26 3500
+30 1000
+5 2000

fl=(117)
fn=(5672)
376 5
+2 5
cfi=(121)
cfn=(5674) pg_atomic_fetch_or_u32_impl
calls=1 212 
* 16
+1 2

fn=(2174)
245 246212
+2 184659
cfi=(118)
cfn=(2176)
calls=61553 47 
* 430871
+1 123106

fn=(2178)
316 369318
+4 369318
cfi=(120) /home/mithuncy/fsm_code/src/backend/storage/lmgr/../../../../src/include/port/atomics/arch-x86.h
cfn=(2180) pg_atomic_compare_exchange_u32_impl
calls=61553 170 
* 1231060
+1 123106

fn=(2184)
405 307765
+3 307765
cfi=(118)
cfn=(2186)
calls=61553 241 
* 1538825
+1 123106

fn=(2146)
227 1170
+3 1170
cfi=(118)
cfn=(2148)
calls=234 -68 
* 4914
+1 468
-4 166230
+3 166230
cfi=(118)
cfn=(2148)
calls=33246 -68 
* 698166
+1 66492

fn=(5678)
362 5
+2 5
cfi=(121)
cfn=(5680) pg_atomic_fetch_and_u32_impl
calls=1 203 
* 16
+1 2

fl=(168)
fn=(5690) TransactionIdAsyncCommitTree
274 7
+1 8
cfi=(94)
cfn=(5692) TransactionIdSetTreeStatus
calls=1 165 
* 567
+2 2

fn=(3010) TransactionIdPrecedes
301 22472
+7 22380
+1 184
+2 27860
+1 11144
+1 11236

fn=(5704) TransactionIdLatest
367 6
+10 2
+1 4
+5 1
+1 2

fn=(5388)
350 4
+3 4
+3 5
+1 3
+1 2

fn=(3154) TransactionIdFollows
335 8188
+3 8188
+3 10235
+1 4094
+1 4094

fl=(219)
fn=(3912)
67 18168
+7 9084
cob=(3)
cfi=(3)
cfn=(424)
calls=3028 -74 
* 49400
* 3028
* 3028
+2 6056
+7 6056
+2 116418
+2 72044
+1 6087
+1 24348
-6 24348
+6 53264
-6 62348
+8 9084
+5 6056
+1 21196
+1 3028
+5 352562
+1 151098
cob=(3)
cfi=(3)
cfn=(446)
calls=25183 0 
* 811674
* 25183
* 25183
+1 50366
+1 4034
+1 46332
+1 44336
+2 36246
-12 78582
+15 1011
+1 6056

fl=(321)
fn=(5758)
290 6
+3 24
+1 4

fl=(18)
fn=(1010)
308 18
+1 18
cfn=(1012) check_locale
calls=3 -44 
* 13409
+1 6

fn=(1014)
314 12
+1 3
+1 6

fn=(1016)
320 18
+1 18
cfn=(1012)
calls=3 -56 
* 13441
+1 6

fn=(1006)
354 18
+1 15
+2 2
+1 2
+11 12
cfn=(1012)
calls=2 265 
* 1066
+4 6

fn=(1008)
377 15
+6 12
cfn=(562) pg_perm_setlocale
calls=3 152 
* 14972
+2 6

fn=(1012)
265 66
+4 22
+3 44
cob=(3)
cfi=(3)
cfn=(568)
calls=11 0 
* 286
* 11
* 11
+1 22
+4 33
cfi=(13)
cfn=(928)
calls=11 1162 
* 1603
* 11
+3 55
cob=(3)
cfi=(3)
cfn=(568)
calls=11 0 
* 20088
* 11
* 11
+3 44
+4 55
cob=(3)
cfi=(3)
cfn=(568)
calls=11 0 
* 18044
* 11
* 22
+2 33
cfi=(13)
cfn=(952)
calls=11 1032 
* 818
+2 22
+1 22

fn=(1018)
326 12
+1 3
+1 6

fn=(1020)
332 18
+1 18
cfn=(1012)
calls=3 -68 
* 13429
+1 6

fn=(562)
152 55
+6 55
cob=(3)
cfi=(3)
cfn=(568)
calls=10 0 
* 14697
cob=(1)
cfi=(1)
cfn=(223)
calls=1 0 
* 14946
* 15
* 11
+21 22
+10 22
+5 10
cfi=(16)
cfn=(460)
calls=2 46 
* 356
+1 2
+5 2
cfi=(19)
cfn=(612)
calls=2 1005 
* 12
* 4
cfi=(19)
cfn=(614)
calls=2 909 
* 20
+4 55
+3 2
+1 2
+1 2
+2 2
+1 2
+1 2
+3 4
+1 4
+6 4
+3 1
+1 1
+1 1
+2 1
+1 1
+1 1
+2 1
+1 1
+1 1
+8 110
cfi=(17)
cfn=(462)
calls=11 -41 
* 4970
+2 33
cob=(3)
cfi=(3)
cfn=(542)
calls=11 0 
* 32620
* 11
* 22
+3 11
+1 22

fn=(622) check_strxfrm_bug
994 10
+2 2
+1 2
+12 4
+1 10
cob=(3)
cfi=(3)
cfn=(628)
calls=1 0 
* 527
cob=(1)
cfi=(1)
cfn=(223)
calls=1 0 
* 1803
* 6
+1 8
+13 4
+1 10
cob=(3)
cfi=(3)
cfn=(628)
calls=2 0 
* 726
* 2
+1 8
+3 8
+6 10

fn=(1022)
338 12
+1 3
+1 6

fl=(104)
fn=(2268)
899 3
+1 1
cfn=(2060)
calls=1 -20 
* 62
* 1
+4 5
cfi=(87)
cfn=(2168)
calls=1 373 
* 1083
-1 1
+5 4
+7 23
cob=(3)
cfi=(3)
cfn=(828)
calls=1 0 
* 35856
* 1
+1 2
+1 3
+2 2

fn=(5490)
1096 12000
+4 6000
+3 4500
+3 7500
cfi=(99)
cfn=(2170)
calls=1500 +16 
* 205500
+3 4500
+1 6000
+7 6000
+1 6000
-1 3000
+15 21000
+1 7500
+1 4500
+1 4500
+3 3000
+1 9000
-1 4500
+3 6000
cfi=(99)
cfn=(2182)
calls=1500 1726 
* 136500
+3 3000
+3 1500
+1 3000

fn=(2060)
880 6
+7 2
+1 10
cfi=(87)
cfn=(2000)
calls=2 493 
* 46
* 10
cfi=(87)
cfn=(2002)
calls=2 476 
* 42
* 2
+2 2
+1 4

fl=(134)
fn=(2532)
110 48
+1 32
+2 32
+1 16
+1 32

fl=(231) /home/mithuncy/fsm_code/src/backend/utils/fmgr/dfmgr.c
fn=(4032) load_external_function
109 9
+6 3
cfn=(4034) expand_dynamic_library_name
calls=1 496 
* 2284
* 1
+3 3
cfn=(4040) internal_load_library
calls=1 +67 
* 3768728
* 1
+3 2
+1 3
+3 5
cob=(6)
cfi=(6)
cfn=(4098) dlsym
calls=1 0 
* 975
* 1
* 1
+2 2
+6 3
cfi=(13)
cfn=(952)
calls=1 1032 
* 85
+1 1
+1 4

fn=(4038) file_exists
464 10
+5 10
cfi=(9)
cfn=(490)
calls=2 0 
* 34
* 4
+1 5
+1 1
cob=(5)
cfi=(5)
cfn=(472)
calls=1 0 
* 3
* 1
* 3
+5 1
+1 8

fn=(4036) substitute_libpath_macro
566 10
+6 8
+3 6
cfi=(11)
cfn=(456) first_dir_separator
calls=2 104 
* 162
* 6
+3 12
+1 10
cob=(3)
cfi=(3)
cfn=(1044)
calls=2 0 
* 80
* 2
-1 4
+7 12
cfi=(81) /home/mithuncy/fsm_code/src/common/psprintf.c
cfn=(3292) psprintf
calls=2 47 
* 1063
+1 8

fn=(4040)
185 5
+10 5
+6 2
+5 5
cfi=(9)
cfn=(490)
calls=1 0 
* 15
* 2
+6 5
+7 2
+6 3
cob=(3)
cfi=(3)
cfn=(424)
calls=1 0 
* 26
* 1
* 1
-1 2
cob=(3)
cfi=(3)
cfn=(388)
calls=1 0 
* 304
* 1
* 1
+2 2
+5 55
+1 6
cob=(3)
cfi=(3)
cfn=(810)
calls=1 0 
* 101
* 1
+1 3
+2 3
+2 2
+2 5
cob=(1)
cfi=(1)
cfn=(223)
calls=1 0 
* 254864
* 5
* 2
+1 4
+13 5
cob=(1)
cfi=(1)
cfn=(223)
calls=1 0 
* 3134
* 5
-1 1
+2 2
+2 2
cob=(12)
cfi=(233)
cfn=(4112) Pg_magic_func
calls=1 36 
* 5
* 1
+2 5
+1 6
cob=(3)
cfi=(3)
cfn=(3074)
calls=1 0 
* 27
* 1
-1 2
+29 5
cob=(6)
cfi=(6)
cfn=(4098)
calls=1 0 
* 765
* 1
* 1
+1 3
+1 2
cob=(12)
cfi=(233)
cfn=(4114) _PG_init
calls=1 148 
* 3509308
+3 3
+1 3
+3 2
+3 2
+1 4

fn=(4034)
496 4
+7 3
cfi=(11)
cfn=(456)
calls=1 104 
* 81
* 3
+2 4
+8 3
cfn=(4036)
calls=1 +53 
* 702
* 1
+1 3
cfn=(4038)
calls=1 -50 
* 44
* 2
+2 3
cfi=(13)
cfn=(952)
calls=1 1032 
* 85
+3 6
cfi=(81)
cfn=(3292)
calls=1 47 
* 517
* 1
+2 4
+9 3
cfn=(4036)
calls=1 +36 
* 681
* 1
+1 3
cfi=(13)
cfn=(952)
calls=1 1032 
* 85
+1 3
cfn=(4038)
calls=1 -68 
* 36
* 2
+1 2
+9 2

fn=(4170) find_rendezvous_variable
681 4
+7 3
+4 118
+1 1
+1 1
+1 6
cfi=(31)
cfn=(794)
calls=1 317 
* 3222
* 1
+7 7
cfi=(31)
cfn=(836)
calls=1 910 
* 676
* 1
+6 4
+1 2
+2 2
+1 2

fn=(4174) lookup_external_function
172 5
+1 5
cob=(6)
cfi=(6)
cfn=(4098)
calls=1 0 
* 1110
* 1
+1 2

fl=(253) /home/mithuncy/fsm_code/src/backend/rewrite/../../../src/include/nodes/pg_list.h
fn=(4506) list_head
78 45
+1 57
+1 30

fn=(4510) list_length
90 9
+1 9
+1 6

fl=(320)
fn=(5734)
162 48
+1 40
cfn=(5736) pq_sendint8
calls=8 -33 
* 600
+1 16

fn=(5736)
130 48
+1 32
cfi=(80)
cfn=(1922)
calls=8 271 
* 280
+1 40
cfn=(5738) pq_writeint8
calls=8 -84 
* 184
+1 16

fn=(5738)
48 40
+1 16
+3 64
+1 48
+1 16

fl=(216) /home/mithuncy/fsm_code/src/backend/parser/scan.c
fn=(3900) core_yy_load_buffer_state
10519 3054
+1 2036
+1 10180
+1 14252
+1 10180
+1 5090
+1 2036

fn=(3886) core_yylex_init
11027 2036
+1 1018
+5 1527
cfi=(215) /home/mithuncy/fsm_code/src/backend/parser/scan.l
cfn=(3888) core_yyalloc
calls=509 1574 
* 67697
* 1018
+2 2036
+6 3054
cob=(3)
cfi=(3)
cfn=(828)
calls=509 0 
* 15291
* 509
+2 2036
cfn=(3890) yy_init_globals
calls=509 +40 
* 15270
+1 1018

fn=(3898) core_yyensure_buffer_stack
10692 2036
+2 1018
+2 2036
+6 509
+2 3054
cfi=(215)
cfn=(3888)
calls=509 1574 
* 61080
-1 1018
+3 2036
+3 3563
cob=(3)
cfi=(3)
cfn=(828)
calls=509 0 
* 7635
* 509
+2 1527
+1 1018
+1 509
+20 1018

fn=(3890)
11083 1527
+1 1018
+5 1018
+1 1018
+1 1018
+1 1018
+1 1018
+1 1018
+2 1018
+1 1018
+1 1018
+7 1018
+1 1018
+6 509
+1 1018

fn=(3894) core_yy_scan_buffer
10742 3054
+3 1018
+1 2545
-1 1018
+2 2545
-1 1018
+5 2036
cfi=(215)
cfn=(3888)
calls=509 1574 
* 67697
* 509
+1 1018
+3 2036
+1 3563
+1 1018
+1 1018
+1 2036
+1 1018
+1 1018
+1 1018
+1 1018
+2 2545
cfn=(3896) core_yy_switch_to_buffer
calls=509 10487 
* 138448
+2 509
+1 1018

fn=(3896)
10487 2545
+1 1018
+7 1527
cfn=(3898)
calls=509 10692 
* 88566
+1 7126
+3 6617
+8 4072
+1 1527
cfn=(3900)
calls=509 +11 
* 23414
+7 1018
+1 1018

fn=(3892) core_yyset_extra
10927 2036
+1 1018
+1 1527
+1 1018

fn=(3924) yy_get_next_buffer
10217 8144
+1 2036
+1 8144
+1 2036
+4 16288
+4 10180
+2 9162
+5 1018
+8 1018
10347 7126

fn=(3908) core_yylex
9032 39259
+4 7138
+7 10707
+2 10707
+2 14276
+2 1018
+6 2036
+1 1018
+2 2036
+1 1527
+2 2036
+1 1527
+2 6617
+6 1527
cfn=(3900)
calls=509 10519 
* 23414
+5 14264
+3 21396
+5 7132
+2 28528
+7 21396
+4 164364
-1 123273
-2 164364
+1 41091
-2 82182
+1 28528
+1 7132
-2 14264
+8 15282
+2 114615
+4 40750
fi=(215)
529 1518
+1 1518
+1 5566
+1 2530
+1 1518
+3 1518
+2 506
+20 12144
+1 1012
+5 2530
+4 2530
cfn=(3916) litbufdup
calls=506 1245 
* 89513
* 506
+1 1012
+35 24
cfn=(4322) addlitchar
calls=6 1226 
* 222
+2 6
+1 4608
cfn=(3914) addlit
calls=512 1207 
* 33720
+2 512
+82 11
+1 6
cfi=(13)
cfn=(928)
calls=1 1162 
* 176
* 1
+1 2
+1 3
+2 1
+8 8
cob=(3)
cfi=(3)
cfn=(446)
calls=1 0 
* 42
* 1
* 2
+2 5
cfi=(13)
cfn=(952)
calls=1 1032 
* 72
+1 3
+1 2
+1 5
cfn=(3916)
calls=1 1245 
* 222
* 1
+1 2
+14 9
cfn=(3914)
calls=1 1207 
* 131
+2 1
826 11
+1 2
+4 11
+1 2
+36 154
+1 70
+10 12
+1 20
cob=(3)
cfi=(3)
cfn=(4330)
calls=3 0 
* 132
cob=(1)
cfi=(1)
cfn=(223)
calls=1 0 
* 1340
* 8
* 4
+1 20
cob=(3)
cfi=(3)
cfn=(4330)
calls=4 0 
* 176
* 4
* 4
+2 8
+6 8
+1 8
+1 8
+11 8
+1 28
-1 8
+2 28
-1 8
+28 44
+2 24
+40 8
+3 24
cfi=(13)
cfn=(928)
calls=4 1162 
* 704
* 4
+1 8
+4 22
+1 14
cob=(3)
cfi=(3)
cfn=(2672)
calls=2 0 
* 218
* 2
* 2
+1 4
+4 55
+1 35
cfn=(4292) process_integer_literal
calls=5 1261 
* 946
* 5
+9 27
+1 11
+1 7
cfn=(4292)
calls=1 1261 
* 164
* 1
+28 27775
+5 5050
-2 2525
+1 5050
-1 15150
cfi=(219)
cfn=(3912)
calls=2525 67 
* 1694017
* 2525
+3 5050
+2 10085
+1 8068
+7 4572
cfi=(42)
cfn=(936)
calls=508 132 
* 223465
* 508
+1 2032
+1 1016
+9 5599
+1 1018
fe=(216)
10083 7126
+3 3054
+3 10180
+11 5090
+1 5090
+1 4072
+10 15270
+36 3054
cfn=(3924)
calls=1018 +69 
* 65152
* 3054
+4 1018
+13 2036
+2 4072
+1 509
+23 5599
-1 1018
+3 1527
cfn=(3926) yy_get_previous_state
calls=509 10352 
* 37479
* 509
+2 1018
+1 1018
+1 509
fi=(215)
411 2537
fe=(216)
10206 3563
+1 28552

fn=(3926)
10352 2545
+3 1018
+2 2036
+2 1527
+2 18192
-2 9616
+5 509
+1 2036

fl=(217) /home/mithuncy/fsm_code/src/backend/parser/gram.y
fn=(3928) makeRawStmt
15459 2540
+1 2032
cfi=(13)
cfn=(2950)
calls=508 853 
* 77724
* 2540
+2 1524
+1 1524
+1 1016
+1 508
+1 1016

fn=(3932) updateRawStmtEnd
15471 4
+6 4
+4 6
+1 2

fn=(3902) parser_init
16299 1524
+1 1016
+1 1016

fn=(4318) makeIntConst
15568 20
+1 16
cfi=(13)
cfn=(2950)
calls=4 853 
* 640
* 20
+2 8
+1 12
+1 12
+2 4
+1 8

fn=(5080) makeTypeCast
15538 6
+1 4
cfi=(13)
cfn=(2950)
calls=1 853 
* 160
* 5
+1 3
+1 3
+1 3
+1 1
+1 2

fn=(4334) makeColumnRef
15487 14
+7 8
cfi=(13)
cfn=(2950)
calls=2 853 
* 306
* 10
+1 2
+3 6
+1 6
cfi=(222)
cfn=(4336)
calls=2 78 
* 16
* 8
+33 6
cfi=(220)
cfn=(3920)
calls=2 54 
* 334
* 8
cfi=(45)
cfn=(1586)
calls=2 260 
* 580
* 4
+1 2
+1 4

fn=(4332) makeStringConst
15548 20
+1 16
cfi=(13)
cfn=(2950)
calls=4 853 
* 640
* 20
+2 8
+1 12
+1 12
+2 4
+1 8

fl=(274)
fn=(4710) cost_qual_eval_node
3748 18
+3 6
+1 6
+1 6
+2 15
cfn=(4712) cost_qual_eval_walker
calls=3 +7 
* 4202
+2 15
+1 6

fn=(4712)
3762 15
+1 6
+9 12
+61 12
+2 3
+1 4
cfi=(275)
cfn=(5150) get_func_cost
calls=1 1613 
* 473
* 4
-1 4
+3 8
+1 4
-1 4
+2 4
-1 4
+8 8
+13 8
+1 4
-1 4
+14 8
+16 8
+12 8
+14 8
+1 4
-1 4
+2 4
-1 4
+2 4
-1 4
+2 4
-1 4
+6 8
+5 8
+5 8
+19 8
+13 8
+16 15
cfi=(250)
cfn=(4494)
calls=3 1843 
* 3496
+2 6

fn=(4713)
3762 25
+1 10
+9 20
+61 20
+5 20
+1 8
-1 8
+2 8
-1 8
+4 3
cfi=(250)
cfn=(5042)
calls=1 1620 
* 10
+1 3
+1 4
cfi=(275)
cfn=(5150)
calls=1 1613 
* 473
* 4
-1 4
+3 16
+13 16
+1 8
-1 8
+14 16
+2 2
+6 7
cfi=(275)
cfn=(5126)
calls=1 2609 
* 511
+2 6
cfi=(275)
cfn=(5150)
calls=1 1613 
* 473
* 7
+2 4
cfi=(250)
cfn=(4478)
calls=1 43 
* 24
* 5
cfi=(275)
cfn=(5128)
calls=1 2642 
* 496
+2 6
cfi=(275)
cfn=(5150)
calls=1 1613 
* 473
* 8
+2 12
+12 12
+14 12
+1 6
-1 6
+2 6
-1 6
+2 6
-1 6
+2 6
-1 6
+6 12
+5 12
+5 12
+19 12
+13 12
+16 25
cfi=(250)
cfn=(4495)
calls=5 1843 
* 2918
+2 10

fn=(4704)
5257 18
+1 3
+4 9
+1 9
+2 12
cfi=(273)
cfn=(4698)
calls=3 78 
* 30
* 6
+2 9
+2 12
+42 9
cfi=(250)
cfn=(4576)
calls=3 277 
* 92
* 12
cfi=(250)
cfn=(4478)
calls=3 43 
* 72
* 9
cfi=(275)
cfn=(4706) get_typavgwidth
calls=3 2324 
* 1491
* 3
+2 6
+3 18
cfn=(4710)
calls=3 3748 
* 4274
+1 18
+1 18
-53 21
+58 9
+2 3
+1 12

fl=(54)
fn=(1110)
761 6
+8 2
+2 3
+1 1
+15 2

fn=(1620)
1588 2
+1 1
+1 5
cfn=(1622) load_libraries
calls=1 -54 
* 19
+3 1
+1 2

fn=(2846) SwitchToSharedLatch
343 2
+4 3
+2 3
+1 7
cfi=(122)
cfn=(2848)
calls=1 767 
* 100
+7 3
cfi=(122)
cfn=(2850)
calls=1 +80 
* 24
+1 2

fn=(3442) InitializeSessionUserId
580 6
+19 1
cfi=(155)
cfn=(2988)
calls=1 +81 
* 67
+2 2
+2 4
cfi=(151)
cfn=(3444)
calls=1 1114 
* 487
* 1
+1 2
+1 1
+13 8
+1 3
+1 3
+2 2
+1 3
+3 6
cfn=(3454) SetSessionUserId
calls=1 423 
* 16
+4 3
+7 3
+5 5
+16 4
+10 6
cfi=(29)
cfn=(1206)
calls=1 7172 
* 4940
+2 10
cfi=(29)
cfn=(1206)
calls=1 7172 
* 1283
+4 3
cfi=(151)
cfn=(3418)
calls=1 1161 
* 103
+1 4

fn=(3750) process_session_preload_libraries
1601 2
+1 5
cfn=(1622)
calls=1 -66 
* 19
+3 5
cfn=(1622)
calls=1 -69 
* 19
+3 2

fn=(1950)
1259 30
+9 25
cob=(5)
cfi=(5)
cfn=(676)
calls=5 0 
* 35
* 5
* 5
+1 10
+8 10
cfi=(66) /home/mithuncy/fsm_code/src/backend/utils/init/../../../../src/include/pgstat.h
cfn=(1562) pgstat_report_wait_start
calls=5 -38 
* 70
+1 30
cob=(5)
cfi=(5)
cfn=(684)
calls=5 0 
* 35
* 5
* 5
+1 5
cfi=(66)
cfn=(1572) pgstat_report_wait_end
calls=5 -16 
* 65
+1 10
+9 15
+6 10
+1 10
+2 116
cob=(3)
cfi=(3)
cfn=(1120)
calls=29 0 
* 601
* 29
* 29
+2 58
+2 87
-6 131
+8 50
cob=(3)
cfi=(3)
cfn=(856)
calls=5 0 
* 176
* 5
+1 35
+6 20
+9 60
cfi=(17)
cfn=(462)
calls=5 203 
* 1635
+1 15
cob=(3)
cfi=(3)
cfn=(424)
calls=5 0 
* 81
* 5
* 5
+5 20
cob=(3)
cfi=(3)
cfn=(1120)
calls=5 0 
* 110
* 5
* 15
+2 2
+1 24
cfi=(17)
cfn=(462)
calls=2 203 
* 400
+8 15
cob=(3)
cfi=(3)
cfn=(424)
calls=5 0 
* 142
* 5
* 5
+1 5
cob=(5)
cfi=(5)
cfn=(472)
calls=5 0 
* 15
* 5
* 5
+1 10
cfi=(66)
cfn=(1562)
calls=5 1239 
* 70
+1 25
cob=(5)
cfi=(5)
cfn=(1956)
calls=4 0 
* 28
cob=(1)
cfi=(1)
cfn=(223)
calls=1 0 
* 760
* 9
* 10
+1 35
cob=(5)
cfi=(5)
cfn=(1568)
calls=5 0 
* 35
* 5
-1 10
+14 5
cfi=(66)
cfn=(1572)
calls=5 -91 
* 65
+1 10
cfi=(66)
cfn=(1562)
calls=5 1239 
* 70
+1 15
cfi=(25)
cfn=(1574)
calls=5 334 
* 95
* 10
+7 5
cfi=(66)
cfn=(1572)
calls=5 1263 
* 65
+1 15
cob=(5)
cfi=(5)
cfn=(692)
calls=5 0 
* 35
* 5
* 10
+7 20

fn=(3464)
381 6050
+2 3025
+1 6050

fn=(5790) SwitchBackToLocalLatch
362 2
+4 1
+2 3
+1 7
cfi=(122)
cfn=(2848)
calls=1 767 
* 100
+2 3
cfi=(122)
cfn=(2850)
calls=1 +66 
* 24
+1 2

fn=(1552)
1182 5
+1 8
cfn=(1554) CreateLockFile
calls=1 875 
* 6817
+1 2

fn=(1622)
1536 24
+5 18
+1 3
+39 12

fn=(1554)
875 22
+30 2
cob=(3)
cfi=(3)
cfn=(654)
calls=2 0 
* 10
* 2
* 2
+3 2
cob=(3)
cfi=(3)
cfn=(1560)
calls=1 0 
* 3
cob=(1)
cfi=(1)
cfn=(223)
calls=1 0 
* 1278
* 6
* 2
+10 4
cob=(3)
cfi=(3)
cfn=(234)
calls=2 0 
* 1000
* 2
* 2
+1 4
+3 2
+7 2
+8 12
cob=(5)
cfi=(5)
cfn=(676)
calls=2 0 
* 14
* 2
* 2
+1 4
+1 2
1101 38
cfi=(17)
cfn=(462)
calls=2 203 
* 4317
+11 8
+3 2
cob=(5)
cfi=(5)
cfn=(472)
calls=2 0 
* 6
* 2
* 2
+1 4
cfi=(66)
cfn=(1562)
calls=2 1239 
* 28
+1 6
cob=(3)
cfi=(3)
cfn=(424)
calls=2 0 
* 52
* 2
* 12
cob=(5)
cfi=(5)
cfn=(1568)
calls=1 0 
* 7
cob=(1)
cfi=(1)
cfn=(223)
calls=1 0 
* 768
* 6
* 8
cob=(3)
cfi=(3)
cfn=(424)
calls=2 0 
* 52
* 2
* 4
+12 2
cfi=(66)
cfn=(1572)
calls=2 1263 
* 26
+2 4
cfi=(66)
cfn=(1562)
calls=2 1239 
* 28
+1 6
cfi=(25)
cfn=(1574)
calls=2 334 
* 38
* 4
+11 2
cfi=(66)
cfn=(1572)
calls=2 1263 
* 26
+1 6
cob=(5)
cfi=(5)
cfn=(692)
calls=2 0 
* 14
* 2
* 4
+16 6
+1 3
cfi=(67)
cfn=(1578)
calls=1 306 
* 1479
+6 8
cfi=(13)
cfn=(928)
calls=2 -5 
* 357
* 6
cfi=(45)
cfn=(1586)
calls=2 260 
* 358
* 2
+1 10

fn=(3454)
423 10
+3 4
+1 4
+1 2
+3 4
+1 4
+1 4

fn=(3456)
504 2
+1 4
+1 2

fn=(3460)
715 7
+4 3
+6 5
cfn=(3454)
calls=1 423 
* 16
+2 9
cfi=(29)
cfn=(1207)
calls=1 7172 
* 1283
+3 4

fn=(3532) GetSessionUserId
415 4
+2 2
+1 4

fn=(4118) pg_bindtextdomain
1612 3
+11 2

fn=(1408)
193 4
+6 3
cfi=(11)
cfn=(1262)
calls=1 609 
* 1488
* 1
+2 3
+2 2
+1 2

fn=(1522)
100 5
+5 5
cfi=(9)
cfn=(490)
calls=1 0 
* 15
* 2
+15 4
+16 2
cob=(3)
cfi=(3)
cfn=(638)
calls=1 0 
* 3
* 1
* 2
+20 4
+21 3
cfi=(65)
cfn=(1524)
calls=1 35 
* 12
+2 3
cob=(3)
cfi=(3)
cfn=(710)
calls=1 0 
* 3
* 1
+1 2
+4 3
cfn=(1526) ValidatePgVersion
calls=1 1459 
* 3954
+1 5

fn=(2666)
1387 8
+6 10
cob=(5)
cfi=(5)
cfn=(676)
calls=2 0 
* 14
* 2
* 2
+1 4
+26 4
cfi=(66)
cfn=(1562)
calls=2 1239 
* 28
+1 12
cob=(5)
cfi=(5)
cfn=(684)
calls=2 0 
* 14
* 2
* 2
+1 2
cfi=(66)
cfn=(1572)
calls=2 1263 
* 26
+1 4
+9 6
+1 6
cob=(5)
cfi=(5)
cfn=(692)
calls=2 0 
* 14
* 2
+1 6
cob=(3)
cfi=(3)
cfn=(2672)
calls=1 0 
* 225
cob=(1)
cfi=(1)
cfn=(223)
calls=1 0 
* 1488
* 6
* 2
+1 2
cob=(3)
cfi=(3)
cfn=(654)
calls=2 0 
* 10
* 2
* 6
+1 4
+7 8

fn=(2710)
274 2
+1 1
+2 1
cfi=(20)
cfn=(648)
calls=1 2527 
* 10687
+13 1
cfi=(67)
cfn=(2712)
calls=1 410 
* 27
+3 1
cfi=(122)
cfn=(2716)
calls=1 156 
* 144
+1 1
+1 3
cfi=(122)
cfn=(2718)
calls=1 -66 
* 12
+9 1
cob=(1)
cfi=(1)
cfn=(223)
calls=1 0 
* 1265
* 5
* 2
+5 1
cfi=(102)
cfn=(2726) PostmasterDeathSignalInit
calls=1 +62 
* 1456
+1 2

fn=(1542)
214 4
+3 3
cob=(3)
cfi=(3)
cfn=(510)
calls=1 0 
* 5
* 1
* 2
+5 4

fn=(3458)
513 2
+1 4
+1 2

fn=(3496) SetDatabasePath
87 4
+3 5
cfi=(13)
cfn=(930)
calls=1 1149 
* 178
* 1
+1 2

fn=(2964) GetUserIdAndSecContext
486 8
+1 6
+1 6
+1 4

fn=(1526)
1459 14
+8 2
+2 12
cob=(3)
cfi=(3)
cfn=(1246)
calls=2 0 
* 292
* 2
* 2
+2 16
cfi=(17)
cfn=(462)
calls=2 203 
* 728
+2 8
cfi=(25)
cfn=(1278)
calls=2 2186 
* 1398
* 2
+1 4
+14 2
+1 12
cob=(3)
cfi=(3)
cfn=(1532)
calls=1 0 
* 678
cob=(1)
cfi=(1)
cfn=(223)
calls=1 0 
* 1939
* 6
* 2
+1 12
cob=(3)
cfi=(3)
cfn=(1246)
calls=2 0 
* 256
* 2
* 2
+2 12
+9 6
cfi=(25)
cfn=(1374)
calls=2 2385 
* 1226
+2 6
+7 12

fn=(1964)
1192 7
+3 8
cfi=(17)
cfn=(462)
calls=1 203 
* 361
+1 8
cfn=(1554)
calls=1 875 
* 3281
+1 2

fl=(167)
fn=(2994) AfterTriggerBeginXact
4778 4
+4 2
+1 2
+14 4

fn=(5334) ExecBSInsertTriggers
2450 3000
+5 1500
+2 1000
+1 500
+45 2000

fn=(5508) AfterTriggerEndQuery
4830 2000
+10 2000
+2 1500
+1 500
+66 1000

fn=(3632) AfterTriggerEndXact
5030 10
+10 6
+14 2
+1 2
+8 2
+1 2
+1 2
+3 2
+1 4

fn=(3626) afterTriggerMarkEvents
4417 14
+1 2
+4 12
+39 2
+1 4

fn=(5332) MakeTransitionCaptureState
4688 3000
+8 1000
+1 1000
+69 1000

fn=(5330) AfterTriggerBeginQuery
4810 1000
+2 1500
+1 1000

fn=(5506) ExecASInsertTriggers
2508 3000
+1 1500
+2 1000
+3 1000

fn=(3624) AfterTriggerFireDeferred
4974 6
+2 2
+10 2
+1 8
+10 12
cfn=(3626)
calls=2 4417 
* 34
* 4
+13 4
+2 4

fn=(5304)
2141 2500
+5 1000
+1 1000
+42 2000

fl=(280)
fn=(4732)
2109 12
+9 15
+1 3
+34 6

fn=(4760)
2228 12
+1 12
+1 6

fn=(4736)
2171 15
+5 12
+1 3
+36 6

fl=(287)
fn=(4926)
214 12162
+2 2027
+1 2027
+13 14189
+2 2027
+2 8108
+38 10135
+2 8108
+8 20270
+1 8108
+8 12162
+4 4052
+2 22286
+2 2026
+1 2026
-5 6078
+11 8108
+2 3
+1 1
+11 2
+3 15
+3 10
+1 10
-1 3
+3 1
+2 10
+2 4
+3 9
+2 3
+2 4
-11 7
+16 11
+4 2026
+13 2026
+1 2026
+2 20260
+2 8104
-2 20290
+2 8116
+7 16214
+1 8104
+1 8116
+21 18261
+2 4058
+4 12165
+1 2026
+2 28394
cob=(3)
cfi=(3)
cfn=(424)
calls=2026 0 
* 31206
* 2026
* 10130
+2 4052
-2 3
+2 8110
+1 2026
-46 2026
+47 2026
-47 3
+47 3
+3 81080
+1 4054

fl=(10)
fn=(374)
61 5
+1 1
+10 4
cfi=(11)
cfn=(376) get_progname
calls=1 454 
* 59185
* 1
+5 3
cfn=(414) startup_hacks
calls=1 247 
* 6
+13 5
cfi=(12)
cfn=(416) save_ps_display_args
calls=1 +37 
* 27284
* 1
+9 1
cfi=(13)
cfn=(430)
calls=1 -6 
* 904
+11 5
cfi=(15)
cfn=(438) set_pglocale_pgservice
calls=1 566 
* 28487
+24 4
cfn=(560) init_locale
calls=1 308 
* 18346
+1 4
cfn=(560)
calls=1 308 
* 8632
+4 4
cfn=(560)
calls=1 308 
* 8269
+7 4
cfn=(560)
calls=1 308 
* 3616
+1 4
cfn=(560)
calls=1 308 
* 3651
+1 4
cfn=(560)
calls=1 308 
* 3700
+7 2
cob=(1)
cfi=(1)
cfn=(223)
calls=1 0 
* 4126
* 5
+2 1
cfi=(18)
cfn=(622)
calls=1 994 
* 2210
+6 2
+2 6
cob=(3)
cfi=(3)
cfn=(446)
calls=1 0 
* 22
* 1
* 8
cob=(3)
cfi=(3)
cfn=(446)
calls=1 0 
* 22
* 1
* 2
+5 6
cob=(3)
cfi=(3)
cfn=(446)
calls=1 0 
* 22
* 1
* 8
cob=(3)
cfi=(3)
cfn=(446)
calls=1 0 
* 22
* 1
* 2
+16 6
cob=(3)
cfi=(3)
cfn=(446)
calls=1 0 
* 22
* 1
* 2
+2 8
cob=(3)
cfi=(3)
cfn=(446)
calls=1 0 
* 22
* 1
* 2
+8 2
+1 3
cfn=(632) check_root
calls=1 387 
* 2596
+22 8
cob=(3)
cfi=(3)
cfn=(446)
calls=1 0 
* 22
* 1
* 2
+2 8
cob=(3)
cfi=(3)
cfn=(446)
calls=1 0 
* 22
* 1
* 2
+2 8
cob=(3)
cfi=(3)
cfn=(446)
calls=1 0 
* 22
* 1
* 2
+5 5
cfi=(20)
cfn=(646)
calls=1 577 
* 391698069

fn=(414)
247 3
+48 1
+1 2

fn=(560)
308 36
+1 30
cfi=(18)
cfn=(562)
calls=6 152 
* 46124
* 12
+4 12

fn=(632)
387 5
+2 1
cob=(1)
cfi=(1)
cfn=(223)
calls=1 0 
* 1278
* 5
* 2
+17 1
cob=(1)
cfi=(1)
cfn=(223)
calls=1 0 
* 1287
* 5
* 2
cob=(3)
cfi=(3)
cfn=(638)
calls=1 0 
* 3
* 1
* 2
+17 4

fl=(206) /home/mithuncy/fsm_code/src/backend/storage/buffer/localbuf.c
fn=(3668) CheckForLocalBufferLeaks
544 6
+20 6

fn=(3666) AtEOXact_LocalBuffers
573 10
+1 2
cfn=(3668)
calls=2 -30 
* 8
+1 4

fn=(5768) AtProcExit_LocalBuffers
584 2
+6 1
cfn=(3668)
calls=1 -46 
* 4
+1 2

fl=(226)
fn=(4992)
147 20
+2 12
+1 12
+1 8
+1 12
+1 12
+1 12
+1 8

fn=(3962)
78 5030
+6 5030
+6 4024
+3 3018
cfi=(13)
cfn=(952)
calls=1006 1032 
* 85510
+1 4024

fn=(4450) make_const
471 24
+9 32
+3 8
+2 2
+1 2
+1 2
+1 2
+51 6
+2 2
+1 2
+1 2
+1 2
+32 48
cfi=(221)
cfn=(4452)
calls=4 305 
* 880
* 4
+7 12
+2 4
+1 8

fn=(5010)
162 12
+2 12
+1 8

fn=(3954)
45 4024
+3 2012
cfi=(13)
cfn=(2546)
calls=1006 956 
* 313462
* 1006
+2 3018
+3 2012
+1 2012
+2 2012
+13 1006
+1 2012

fl=(306) /home/mithuncy/fsm_code/src/backend/commands/../../../src/include/utils/palloc.h
fn=(5282) MemoryContextSwitchTo
110 537000
+1 358000
+2 358000
+1 179000
+1 358000

fl=(177) /home/mithuncy/fsm_code/src/backend/access/nbtree/nbtsearch.c
fn=(3340) _bt_compare
463 265662
+1 88554
+1 177108
+10 244464
+1 394
+2 322531
+14 58642
+6 2371567
cfi=(287)
cfn=(4926)
calls=1021 214 
* 227109
* 32966
+3 159725
+9 95835
+17 287505
cfi=(161)
cfn=(3342)
calls=31945 1134 
* 2221793
* 31945
+5 159725
+1 146487
+4 26476
-4 18707
+4 37414
+1 55540
+2 4175
-48 104663
+52 1551
+1 59036

fn=(3180) _bt_first
569 15324
+1 7662
+1 7662
+10 2554
+2 2554
+7 22986
+6 7662
cfi=(111)
cfn=(3182)
calls=2554 757 
* 1141821
+6 12770
+9 10216
+64 2554
+1 10216
+12 2554
+1 2554
+2 2554
+7 10216
+2 42800
+6 8146
+25 8146
+2 24438
+6 12219
+1 8146
+2 1004
+1 1004
+10 14284
+1 7595
-1 3038
+7 4557
+1 1519
+1 1519
+10 32584
+14 7142
+1 3571
+3 1004
+2 1004
+1 1506
+4 502
-99 1004
799 502
698 7142
799 3571
+8 5108
+22 5108
+2 16292
+4 20365
+91 44803
+1 8146
-1 8146
+5 32584
cfi=(175)
cfn=(3188) index_getprocinfo
calls=4073 -72 
* 157732
* 4073
+1 24438
+2 8146
-2 73314
cfi=(178) /home/mithuncy/fsm_code/src/backend/access/common/scankey.c
cfn=(3190) ScanKeyEntryInitializeWithInfo
calls=4073 109 
* 321767
-4 4073
-99 23954
978 15324
+32 4104
+15 2052
+1 2052
+2 2052
+18 502
+1 502
+1 502
+12 28094
cfn=(3194) _bt_search
calls=2554 99 
* 11533376
* 2554
+4 7662
cfi=(111)
cfn=(3328)
calls=2554 176 
* 263621
+2 7662
+6 24
cfi=(92)
cfn=(3572)
calls=4 2453 
* 108
+6 12
cfi=(162) /home/mithuncy/fsm_code/src/backend/access/nbtree/nbtree.c
cfn=(3606) _bt_parallel_done
calls=4 721 
* 64
+1 40
+2 8
+3 12750
cfi=(50)
cfn=(3330)
calls=2550 2612 
* 40800
* 15300
cfi=(92)
cfn=(3332)
calls=2550 2476 
* 71400
+3 12750
cfn=(3336) _bt_initialize_more_data
calls=2550 1981 
* 43350
+3 20400
cfn=(3338) _bt_binsrch
calls=2550 358 
* 5791173
* 2550
+20 5100
+5 7650
+5 15300
cfn=(3348) _bt_readpage
calls=2550 +97 
* 2057936
* 7650
+6 2560
cfi=(50)
cfn=(3240)
calls=512 3553 
* 57856
+1 2560
cfn=(3602) _bt_steppage
calls=512 1375 
* 190934
* 1536
+1 1016
+5 12228
cfn=(3358) _bt_drop_lock_and_maybe_pin
calls=2038 58 
* 790744
+5 24504
+1 12252
+1 8168
+3 2042
+1 10216

fn=(3552) _bt_next
1162 95
+1 57
+7 38
+2 209
+2 20
cfn=(3602)
calls=4 1375 
* 410
* 12
+1 8
+13 180
+1 90
+1 60
+3 15
+1 38

fn=(3324) _bt_moveright
253 55913
+20 20332
+4 8158
-4 1004
+4 37589
+1 30498
cfi=(186) /home/mithuncy/fsm_code/src/backend/access/nbtree/../../../../src/include/storage/bufmgr.h
cfn=(3326) TestForOldSnapshot
calls=5083 -12 
* 55913
+1 30498
+2 20332
+1 2941
+5 4284
+21 27846
cfn=(3340)
calls=2142 463 
* 480467
* 4284
+10 30498
+4 5083
+1 10166

fn=(3358)
58 10210
+1 10210
cfi=(50)
cfn=(3240)
calls=2042 3553 
* 230746
+2 10210
+1 8168
-1 4084
+2 6126
-1 4084
+3 8168
cfi=(50)
cfn=(3360)
calls=2042 3316 
* 492122
+1 4084
+2 4084

fn=(3602)
1375 2580
+1 1548
+1 516
+1 516
+5 2064
+7 2064
+15 1032
+3 2064
+18 1548
+4 1032
+3 4112
cfi=(50)
cfn=(3360)
calls=512 3316 
* 123392
* 1536
+28 3096
cfn=(3604) _bt_readnextpage
calls=516 +21 
* 39060
* 1548
+1 1024
+3 24
cfn=(3358)
calls=4 58 
* 1552
+2 4
+1 1032

fn=(3338)
358 45747
+8 45747
+1 30498
+2 30498
+1 8568
-1 2941
+1 47345
+9 15249
+15 15249
+2 20332
+2 4079
-2 1004
+2 1004
+2 328512
+4 219008
cfn=(3340)
calls=27376 +59 
* 6719107
* 27376
+2 82128
+1 53740
+2 27882
-11 97377
+21 30498
+1 5100
+8 5066
+1 10166

fn=(3604)
1482 3612
+1 1548
+4 516
+2 1548
+2 1032
+8 4078
+2 1536
cfi=(162)
cfn=(3606)
calls=512 721 
* 8192
+1 5120
+1 1024
+3 12
+2 24
cfi=(179) /home/mithuncy/fsm_code/src/backend/access/nbtree/nbtpage.c
cfn=(3198) _bt_getbuf
calls=4 730 
* 5238
* 8
+1 48
+1 28
cfi=(186)
cfn=(3326)
calls=4 266 
* 44
+1 24
+2 24
+2 28
cfi=(92)
cfn=(3332)
calls=4 2476 
* 112
+3 32
cfn=(3348)
calls=2 1217 
* 1748
* 10
cfn=(3348)
calls=2 1217 
* 1390
* 8
+1 8
1649 4
+1 2064

fn=(3194)
99 25540
+1 2554
+1 2554
+3 12770
cfi=(179)
cfn=(3196) _bt_getroot
calls=2554 253 
* 3579073
* 5108
+3 10216
+1 8
+26 86411
cfn=(3324)
calls=5083 253 
* 825806
* 10166
+5 60996
+1 30498
+1 30498
+1 2550
+47 5100
-41 22797
cfn=(3338)
calls=2533 358 
* 2083048
* 2533
+1 22797
+1 17731
+1 25330
+1 10132
cfi=(50)
cfn=(3330)
calls=2533 2612 
* 40528
* 2533
+12 5066
cfi=(13)
cfn=(940)
calls=2533 925 
* 264439
* 2533
+1 7599
+1 7599
+1 7599
+1 7599
+7 15198
+4 17731
cfi=(179)
cfn=(3246) _bt_relandgetbuf
calls=2533 866 
* 4260413
* 5066
+3 5066
+1 2533
+23 2550
+1 5108

fn=(3336)
1981 10200
+2 5100
+2 5100
+1 7650
+7 5100
+1 5100
+1 5100

fn=(3348)
1217 17878
+1 7662
+15 30648
+1 15324
+3 10216
+8 15324
+1 8576
-1 410
+1 19518
+6 10216
cfi=(50)
cfn=(3330)
calls=2554 2612 
* 40864
* 5108
+7 10216
cfi=(50)
cfn=(3350) BufferGetLSNAtomic
calls=2554 2839 
* 122592
* 5108
+7 10216
+3 5108
+8 5108
+3 2554
+2 10216
+2 2554
+2 36768
cfi=(111)
cfn=(3352)
calls=4596 +87 
* 1485456
* 4596
+1 9192
+3 12342
cfn=(3356) _bt_saveitem
calls=2057 +57 
* 69938
+1 2057
+2 18384
+3 5078
+1 2539
+3 2057
-16 13833
+20 5108
+1 10216
+1 7662
+34 15324
+1 5108

fn=(3356)
1347 16456
+1 22627
+2 12342
+1 6171
+1 8228
+8 4114

fl=(45)
fn=(972)
1137 2052
+1 2052
cfn=(974) list_free_private
calls=513 -31 
* 108777
+1 1026

fn=(5074) list_nth_cell
387 2012
+9 2515
+1 1506
+2 9
+3 1
+1 1006

fn=(962) new_list
64 22836
+4 11418
cfi=(13)
cfn=(940)
calls=5709 925 
* 701897
* 5709
+1 11418
+3 11418
cfi=(13)
cfn=(940)
calls=5709 925 
* 688328
* 5709
+1 17127
+1 11418
+1 17127
+1 17127
+2 5709
+1 11418

fn=(5072)
411 2515
+2 2515
cfn=(5074)
calls=503 -26 
* 7049
* 503
+1 1006

fn=(4560)
1164 16
+5 8
+3 16
cfn=(962)
calls=4 64 
* 1411
* 4
+1 16
+6 24
+2 12
+1 16
+1 4
+4 8
cfi=(13)
cfn=(940)
calls=4 925 
* 430
* 4
+1 16
+1 12
+2 8
+1 12
-9 16
+12 8
+1 12
+3 4
+1 8

fn=(4562)
667 16
+3 8
+3 12
cfi=(47)
cfn=(976)
calls=4 78 
* 40
* 24
cfn=(4564) list_delete_cell
calls=4 529 
* 587
+1 8

fn=(1586)
260 7775
+3 3110
+1 3102
cfn=(962)
calls=1551 64 
* 421717
* 3102
+2 12
cfn=(1966) new_head_cell
calls=4 90 
* 545
+2 6220
+2 1555
+1 3110

fn=(974)
1107 3084
+5 1542
cfi=(47)
cfn=(976)
calls=514 78 
* 5134
* 514
+1 514
+2 1034
+2 1551
+1 1034
+1 4
cfi=(13)
cfn=(952)
calls=1 -87 
* 72
+1 1551
cfi=(13)
cfn=(952)
calls=517 -88 
* 43945
-7 2062
+10 1028
+1 1533
cfi=(13)
cfn=(952)
calls=511 -92 
* 43435
+1 1028

fn=(1988)
1151 4
+5 4
cfn=(974)
calls=1 -49 
* 288
+1 2

fn=(4554)
165 5
+3 2
+1 2
cfn=(962)
calls=1 64 
* 272
* 2
+4 4
+2 1
+1 2

fn=(4564)
529 3030
+9 2020
+2 1506
cfn=(972)
calls=502 1137 
* 111444
+1 1004
+7 15
+2 6
+3 12
+2 12
+3 9
cfi=(13)
cfn=(952)
calls=3 1032 
* 255
+1 3
+1 1010

fn=(5258) lappend_int
147 5000
+3 2000
+1 2000
cfn=(962)
calls=1000 -87 
* 272000
* 2000
+4 4000
+2 1000
+1 2000

fn=(5532)
591 2505
+7 501
+1 1503
cfi=(47)
cfn=(976)
calls=501 78 
* 5010
* 1002
+2 2004
+1 3006
cfn=(4564)
calls=501 -73 
* 119739
* 501
-3 1002
+10 1002

fn=(964) new_tail_cell
109 2364
+3 1182
cfi=(13)
cfn=(940)
calls=591 925 
* 72476
* 591
+1 1182
+2 2364
+1 1773
+1 2955
+1 1182

fn=(4556)
296 10
+3 4
+1 2
cfn=(962)
calls=1 64 
* 272
* 2
+2 3
cfn=(1966)
calls=1 90 
* 144
+2 8
+2 2
+1 4

fn=(5290) list_member_int
486 2500
+6 1500
cfi=(47)
cfn=(976)
calls=500 78 
* 5000
* 1000
+2 2000
+1 1000
-3 1000
+7 1000

fn=(1966)
90 20
+3 10
cfi=(13)
cfn=(940)
calls=5 925 
* 584
* 5
+1 20
+2 15
+1 25
+1 10

fn=(5208) list_concat
322 2500
+1 1000
+1 1000
+14 1000

fn=(960)
129 18715
+3 7486
+1 6304
cfn=(962)
calls=3152 -69 
* 842987
* 6304
+2 1773
cfn=(964)
calls=591 -26 
* 86069
+2 14972
+2 3743
+1 7486

fn=(3130)
506 12785
+6 7671
cfi=(47)
cfn=(976)
calls=2557 78 
* 20458
* 5114
+2 4
-2 5119
+6 2557
+1 5114

fl=(110)
fn=(3152) xmin_cmp
945 12282
+1 6141
+1 6141
+2 14329
cfi=(168)
cfn=(3010)
calls=2047 301 
* 34799
* 4094
+2 14329
cfi=(168)
cfn=(3154)
calls=2047 335 
* 34799
* 4094
+3 2047
+1 4094

fn=(3412) FreeSnapshot
716 12200
+5 9150
cfi=(13)
cfn=(952)
calls=3050 1032 
* 259250
+1 6100

fn=(5546) SnapshotSetCommandId
545 1500
+1 2000
+3 1500
+1 1500
+1 1500
+3 1000

fn=(3000) HistoricSnapshotActive
2025 8300
+1 12450
+1 8300

fn=(3142)
864 8188
+1 4094
+3 10235
cfn=(3144) RegisterSnapshotOnOwner
calls=2047 +9 
* 917471
+1 4094

fn=(3146) CopySnapshot
661 12200
+9 6100
-1 18300
+2 12200
+3 15250
cfi=(13)
cfn=(798)
calls=3050 +98 
* 295592
* 3050
+1 18300
cob=(3)
cfi=(3)
cfn=(856)
calls=3050 0 
* 182330
* 3050
+2 6100
+1 6100
+1 6100
+3 12200
+7 6100
+8 12200
+8 6100
+2 3050
+1 6100

fn=(3996)
734 4012
+5 4012
cfi=(13)
cfn=(798)
calls=1003 +33 
* 91335
* 1003
+6 3009
+1 3009
cfn=(3146)
calls=1003 -85 
* 192606
* 3009
+4 3009
+1 1003
cfi=(26)
cfn=(3506)
calls=1003 +7 
* 8024
* 2006
+2 5015
+2 2006
+1 3009
+1 2
+1 2006

fn=(3404)
906 8188
+1 4094
+3 10235
cfn=(3406) UnregisterSnapshotFromOwner
calls=2047 +9 
* 504050
+1 4094

fn=(3720) AtEOXact_Snapshot
1060 14
+10 6
+6 2
+5 6
+31 2
cfn=(3002)
calls=2 511 
* 156
+3 4
+4 6
+4 10
+8 2
+1 2
+1 2
+2 2
+1 2
+2 2
+7 4
+4 4

fn=(2074)
252 6
+3 2
+1 6
+4 2
+1 4

fn=(2288)
268 3
+7 1
cfn=(2074)
calls=1 -23 
* 10
* 4
cfi=(87)
cfn=(2168)
calls=1 +98 
* 1088
-1 1
+4 4
+2 2
+1 2
+1 2
+1 2
+1 2
+1 2
+1 2
+1 2
+1 2
+1 2
+1 2
+2 2

fn=(3136) GetNonHistoricCatalogSnapshot
463 10208
+8 7656
+1 6144
cfi=(151)
cfn=(3472) RelationInvalidatesSnapshotsOnly
calls=2048 1470 
* 32768
* 2048
-1 4096
+2 6141
cfi=(151)
cfn=(3474) RelationHasSysCache
calls=2047 1493 
* 310735
* 2047
-1 4094
+4 7656
+3 1008
cfi=(100)
cfn=(3004) GetSnapshotData
calls=504 1520 
* 278838
* 504
+14 2520
cfi=(176) /home/mithuncy/fsm_code/src/backend/lib/pairingheap.c
cfn=(3138) pairingheap_add
calls=504 113 
* 18144
+3 2552
+1 5104

fn=(4630)
852 1008
+1 1512
+1 1008

fn=(5214)
782 1500
+16 2000
+1 1000
cfi=(26)
cfn=(3012) GetCurrentCommandId
calls=500 662 
* 4500
* 500
+1 500
cfi=(26)
cfn=(1210)
calls=500 910 
* 4000
* 1000
+2 2000
+1 1000

fn=(3002)
511 2038
+1 3057
+2 2520
cfi=(176)
cfn=(3410) pairingheap_remove
calls=504 171 
* 25200
+1 504
+1 504
cfn=(3414) SnapshotResetXmin
calls=504 979 
* 4551
+2 2038

fn=(3144)
877 10235
+3 4094
+4 14329
cfn=(3146)
calls=2047 661 
* 437816
* 2047
+3 6141
cfi=(164)
cfn=(3148) ResourceOwnerEnlargeSnapshots
calls=2047 1187 
* 47718
+1 10235
+1 10235
cfi=(164)
cfn=(3150) ResourceOwnerRememberSnapshot
calls=2047 1198 
* 88021
+2 8188
+1 10235
cfi=(176)
cfn=(3138)
calls=2047 113 
* 262036
+2 2047
+1 4094

fn=(3760) InvalidateCatalogSnapshotConditionally
532 4
+1 6
+4 4

fn=(2998)
305 2008
+7 1004
cfn=(3000)
calls=1004 2025 
* 7028
* 2008
+7 4016
+6 2
cfn=(3002)
calls=2 511 
* 14
+5 2
cfi=(26)
cfn=(1210)
calls=2 910 
* 16
* 4
+11 6
+15 4
cfi=(100)
cfn=(3004)
calls=2 1520 
* 1575
* 2
+2 2
+1 4
+3 3006
+4 1002
cfn=(3002)
calls=1002 511 
* 40080
+2 2004
cfi=(100)
cfn=(3004)
calls=1002 1520 
* 552914
* 1002
+2 1002
+1 2008

fn=(3134)
441 10208
+8 2552
cfn=(3000)
calls=2552 2025 
* 17864
* 5104
+3 7656
cfn=(3136)
calls=2552 +11 
* 702263
+1 5104

fn=(3406)
919 10235
+1 4094
+6 10235
cfi=(164)
cfn=(3408) ResourceOwnerForgetSnapshot
calls=2047 1207 
* 143290
+2 10235
+1 8188
+1 10235
cfi=(176)
cfn=(3410)
calls=2047 171 
* 67571
+2 16376
+2 6141
cfn=(3412)
calls=2047 716 
* 192418
+1 2047
cfn=(3414)
calls=2047 +44 
* 18891
+2 4094

fn=(3998) GetActiveSnapshot
840 4
+3 4
+1 4

fn=(3414)
979 10662
+3 10662
+1 3538
+2 48
+2 6
+1 3
+3 26
cfi=(176)
cfn=(3416) pairingheap_first
calls=13 131 
* 91
* 26
+3 91
cfi=(168)
cfn=(3010)
calls=13 301 
* 221
* 26
+2 7108

fn=(4848)
813 3009
+3 3009
+4 5015
+2 5015
+1 3009
-1 2006
+2 4012
cfn=(3412)
calls=1003 716 
* 94282
+2 3009
cfi=(13)
cfn=(952)
calls=1003 1032 
* 85255
+1 2006
+1 3009
+1 1
+2 1
cfn=(3414)
calls=1 979 
* 48
* 1002
cfn=(3414)
calls=1002 979 
* 9018
+1 2006

fl=(130)
fn=(2390) dsm_impl_posix_resize
352 5
+4 5
cob=(1)
cfi=(1)
cfn=(223)
calls=1 0 
* 1326
* 5
* 1
+11 2
+9 5
cob=(1)
cfi=(1)
cfn=(223)
calls=1 0 
* 1410
* 5
* 1
+1 2
+7 1
cob=(5)
cfi=(5)
cfn=(472)
calls=1 0 
* 3
* 1
* 2
+4 1
+1 2

fn=(2348) dsm_impl_posix
214 10
+6 8
cfi=(17)
cfn=(462)
calls=1 -17 
* 676
+3 4
+32 5
+1 6
cob=(1)
cfi=(1)
cfn=(223)
calls=1 0 
* 8015
* 5
* 3
+14 2
+21 5
cfn=(2390)
calls=1 +61 
* 2777
* 2
+26 9
cob=(3)
cfi=(3)
cfn=(598)
calls=1 0 
* 33
* 1
* 1
+2 2
+17 3
+1 3
+1 3
cob=(5)
cfi=(5)
cfn=(692)
calls=1 0 
* 7
* 1
+2 1
+1 4

fn=(2346)
161 9
+5 7
+4 10
cfn=(2348)
calls=1 +44 
* 11586
* 1
+23 2

fl=(175)
fn=(3166)
314 20432
+2 15324
+6 10216
+6 5108
+2 5108
+2 25540
cfi=(162)
cfn=(3168) btrescan
calls=2554 +62 
* 463950
+2 5108

fn=(3396)
342 10216
+2 15324
+3 10216
+2 8152
cfi=(50)
cfn=(3360)
calls=2038 3316 
* 491158
+1 4076
+4 14266
cfi=(162)
cfn=(3398) btendscan
calls=2038 +99 
* 727044
* 3612
cfi=(162)
cfn=(3398)
calls=516 +99 
* 179750
+3 10216
cfi=(148)
cfn=(3096)
calls=2554 1983 
* 227306
+2 10216
+4 7662
cfi=(173)
cfn=(3400)
calls=2554 147 
* 487814
+1 5108

fn=(3158) index_beginscan_internal
272 25540
+4 12770
+2 15324
+6 7662
cfi=(148)
cfn=(3076)
calls=2554 1970 
* 224752
+5 20432
cfi=(162)
cfn=(3160) btbeginscan
calls=2554 +58 
* 2307506
* 2554
+3 7662
+1 7662
+2 2554
+1 5108

fn=(3156)
226 20432
+3 20432
cfn=(3158)
calls=2554 +43 
* 2639526
* 2554
+6 7662
+1 7662
+2 2554
+1 5108

fn=(3176) index_getnext_tid
528 12865
+4 15438
+10 23157
cfi=(162)
cfn=(3178) btgettuple
calls=2573 215 
* 23391495
* 2573
+3 5146
+3 10292
+3 2064
+2 16
cfi=(50)
cfn=(3360)
calls=4 3316 
* 964
+1 8
+2 1032
+3 28798
+3 4114
+1 5146

fn=(3132)
152 15294
+3 12745
cfi=(171)
cfn=(3037)
calls=1005 1125 
* 2838699
cfi=(171)
cfn=(3036)
calls=1544 1125 
* 4354537
* 2549
+2 12745
+7 2549
+1 10196

fn=(3133)
152 30
+3 25
cfi=(171)
cfn=(3037)
calls=5 1125 
* 11646
* 5
+2 25
+7 5
+1 20

fn=(3402)
178 12770
+1 7662
+5 7662
cfi=(148)
cfn=(3094)
calls=2554 2003 
* 250292
+2 5108
+1 12770
cfi=(159)
cfn=(3102)
calls=2554 -5 
* 6429601
+1 5108

fn=(3362) index_fetch_heap
585 8228
+1 6171
+1 2057
+4 10285
+3 6171
+4 18513
-2 16456
cfi=(50)
cfn=(3248) ReleaseAndReadBuffer
calls=2057 1522 
* 2265793
* 4114
+7 8228
+1 14343
cfi=(188)
cfn=(3364)
calls=2049 75 
* 172116
+4 10285
cfi=(50)
cfn=(3240)
calls=2057 3553 
* 333234
+6 16456
-5 32912
cfi=(171)
cfn=(3372)
calls=2057 2053 
* 692719
* 2057
+6 10285
cfi=(50)
cfn=(3240)
calls=2057 3553 
* 232441
+2 4114
+6 18513
+1 22627
+1 6171
+17 4114

fn=(3188)
859 32584
+5 20365
+4 32584
+2 12219
+4 28511
+3 16292
+2 87
+5 203
+8 58
+4 203
cfi=(161)
cfn=(3116)
calls=29 135 
* 2407
+3 4073
+1 8146

fn=(3174)
661 12865
+6 10292
+13 12865
cfn=(3176)
calls=2573 528 
* 23503108
* 2573
+3 5146
+1 516
+13 1032
-5 6171
cfn=(3362)
calls=2057 585 
* 3918403
* 2057
+1 4114
+1 4114
+4 5146

fl=(271)
fn=(4690)
78 36
+1 60
+1 24
-2 45
+1 63
+1 30
-2 27
+1 39
+1 18
-2 27
+1 45
+1 18

fn=(4702)
90 21
+1 35
+1 14
-2 9
+1 15
+1 6

fl=(314) /home/mithuncy/fsm_code/src/backend/storage/freespace/freespace.c
fn=(5424) fsm_get_child
527 12500
+5 7500
+1 15000
+2 2500
+1 5000

fn=(5408) GetPageWithFreeSpace
133 2500
+1 1500
cfn=(5410) fsm_space_needed_to_cat
calls=500 424 
* 8500
* 500
+2 2500
cfn=(5412) fsm_search
calls=500 704 
* 4680120
+1 1000

fn=(5410)
424 8000
+4 4000
+3 4000
+3 8000
+2 4000
+3 2000
+1 4000

fn=(5414) fsm_readbuf
546 64000
+1 24000
cfn=(5416) fsm_logical_to_physical
calls=8000 447 
* 591000
* 8000
+3 36000
cfi=(140)
cfn=(3204) smgropen
calls=500 153 
* 252335
* 2500
cfi=(140)
cfn=(3208) smgrsetowner
calls=500 209 
* 21000
+8 40000
+1 22500
-1 15000
+3 2500
cfi=(140)
cfn=(5418)
calls=500 303 
* 1543605
* 1000
+1 3500
cfi=(140)
cfn=(3578)
calls=500 688 
* 77000
* 1000
+7 40000
+29 56000
cfi=(50)
cfn=(3202)
calls=8000 +44 
* 8598640
* 8000
+1 88000
+7 8000
+1 32000

fn=(5454) fsm_space_avail_to_cat
384 4500
+5 3000
+3 4500
+6 3000
+3 1500
+1 3000

fn=(5416)
447 24000
+9 16000
+1 16000
+1 27000
-1 60000
+4 8000
+1 16000
+2 120000
+1 168000
-3 88000
+10 16000
+3 16000
+1 16000

fn=(5426) fsm_get_heap_blk
498 2500
+2 2000
+1 1000

fn=(5412)
704 12000
+1 2000
+1 4000
+6 2000
+3 12000
cfn=(5414)
calls=2000 546 
* 4318952
-3 3500
+3 21000
cfn=(5414)
calls=3500 546 
* 4198126
* 5500
+3 11000
+2 22000
cfi=(50)
cfn=(3240)
calls=5500 3553 
* 891000
+2 5500
-1 44000
cfi=(315) /home/mithuncy/fsm_code/src/backend/storage/freespace/fsmpage.c
cfn=(5422) fsm_search_avail
calls=5500 160 
* 247000
* 5500
+3 11000
+1 25000
cfi=(315)
cfn=(5464) fsm_get_max_avail
calls=2500 139 
* 25000
* 2500
+1 7500
cfi=(50)
cfn=(3610)
calls=2500 3339 
* 950000
* 9000
cfi=(50)
cfn=(3610)
calls=3000 3339 
* 1120500
* 5500
+5 11000
+6 9000
+1 3000
cfn=(5426)
calls=500 498 
* 5500
* 500
+2 15000
cfn=(5424)
calls=2500 527 
* 42500
* 5000
+2 7500
+6 3000
+19 5000
cfn=(5466) fsm_get_parent
calls=1000 509 
* 30000
* 1000
+1 8000
cfn=(5458) fsm_set_and_search
calls=1000 -95 
* 2436019
+9 5000
+4 2000
+2 3500
+1 4000

fn=(5452) RecordAndGetPageWithFreeSpace
151 10500
+1 4500
cfn=(5454)
calls=1500 384 
* 19500
* 3000
+1 4500
cfn=(5410)
calls=1500 424 
* 25500
* 3000
+6 7500
cfn=(5456) fsm_get_location
calls=1500 483 
* 49500
* 1500
+2 16500
cfn=(5458)
calls=1500 673 
* 3232983
* 1500
+6 3000
+3 9000
cfn=(5412)
calls=1500 704 
* 9877477
+1 3000

fn=(5456)
483 6000
+3 1500
+1 15000
+1 22500
+2 1500
+1 3000

fn=(5458)
673 25000
+3 2500
+2 15000
cfn=(5414)
calls=2500 546 
* 3018502
* 2500
+1 10000
cfi=(50)
cfn=(3240)
calls=2500 3553 
* 412500
+2 22500
+2 15000
cfi=(315)
cfn=(5460) fsm_set_avail
calls=2500 64 
* 973500
* 5000
+1 10000
cfi=(50)
cfn=(5462) MarkBufferDirtyHint
calls=2500 3386 
* 127500
+2 5000
+4 1500
-1 12000
cfi=(315)
cfn=(5422)
calls=1500 160 
* 42000
* 1500
+5 4500
cfi=(50)
cfn=(3610)
calls=1500 3339 
* 571500
* 3000
cfi=(50)
cfn=(3610)
calls=1000 3339 
* 381000
+2 2500
+1 5000

fn=(5466)
509 4000
+5 3000
+1 7000
+1 13000
+2 1000
+1 2000

fl=(16)
fn=(460)
46 2400
+1 960
+1 960
+1 960
+3 960
+2 480
+2 38324
+1 480
-3 10452
+8 960
+8 2400
+1 960

fl=(132)
fn=(2518)
26 8
+4 10
cob=(5)
cfi=(5)
cfn=(2428)
calls=2 -30 
* 40
* 2
* 2
+1 4
+2 16
cob=(5)
cfi=(5)
cfn=(2428)
calls=2 -33 
* 40
* 2
* 4
+2 2
+7 4

fl=(245)
fn=(4416)
78 6
+1 10
+1 4
-2 3000
+1 4000
+1 2000
-2 1509
+1 2515
+1 1006
-2 3012
+1 5020
+1 2008
-2 6
+1 10
+1 4
-2 6051
+1 10085
+1 4034

fn=(4612)
90 6
+1 10
+1 4
-2 1500
+1 2500
+1 1000
-2 1515
+1 2525
+1 1010

fl=(85)
fn=(1996)
51 4
+1 2
+1 4

fn=(2004)
40 2
+1 1
cfn=(1996)
calls=1 +10 
* 5
* 2
+1 2

fl=(32)
fn=(968)
37 1605
+3 1605
+1 1605
+2 963
-3 770
+1 770
+2 462
+2 536
+2 693
+3 924
+1 454
+1 12
+3 693
+1 1065
+2 524
+1 108
+2 216
-1 154
+2 642

fn=(834) pg_toupper
106 425
+1 282
+1 224
+1 87
+2 85
+1 170

fn=(970)
70 7890
+1 1315
+2 16710
+1 16710
+2 10026
+2 3280
+1 1596
+1 66
+3 1712
+1 62
+1 2367
+3 2460
+1 4030
+2 5072
-20 19255
+23 509
+1 2630

fn=(1510)
123 7130
+1 5704
+1 2852
+3 1426
+1 2852

fl=(84)
fn=(3050)
1023 27420
+1 20565
cfi=(126)
cfn=(2228)
calls=6855 37 
* 82260
+1 13710
+1 13710

fn=(2022)
103 3
+1 1
+3 4
cfi=(87)
cfn=(2002)
calls=1 476 
* 21
* 1
+2 5
cfi=(87)
cfn=(2000)
calls=1 493 
* 23
* 5
cfi=(87)
cfn=(2002)
calls=1 476 
* 21
* 1
+2 3
cfi=(87)
cfn=(2000)
calls=1 493 
* 23
* 5
cfi=(87)
cfn=(2002)
calls=1 476 
* 21
* 1
+2 5
cfi=(87)
cfn=(2000)
calls=1 493 
* 14
* 5
cfi=(87)
cfn=(2002)
calls=1 476 
* 21
* 1
+2 4
cfi=(87)
cfn=(2002)
calls=1 476 
* 21
* 1
+2 5
cfi=(87)
cfn=(2000)
calls=1 493 
* 23
* 5
cfi=(87)
cfn=(2002)
calls=1 476 
* 21
* 1
+1 3
cfi=(87)
cfn=(2000)
calls=1 493 
* 23
* 5
cfi=(87)
cfn=(2002)
calls=1 476 
* 21
* 1
+1 5
cfi=(87)
cfn=(2000)
calls=1 493 
* 14
* 5
cfi=(87)
cfn=(2002)
calls=1 476 
* 21
* 1
+2 1
+1 2

fn=(3678) ProcReleaseLocks
772 10
+1 6
+3 2
cfn=(3680) LockErrorCleanup
calls=2 -80 
* 52
+2 20
cfi=(91)
cfn=(3684)
calls=2 2090 
* 811381
+2 6
cfi=(91)
cfn=(3684)
calls=2 2090 
* 10061
+1 4

fn=(2240)
163 4
+6 5
+4 5
cfi=(87)
cfn=(2168)
calls=1 373 
* 907
-1 1
+7 2
+1 2
+1 2
+1 2
+1 2
+1 2
+1 2
+1 2
+1 2
+1 5
cfi=(117)
cfn=(2146)
calls=1 +39 
* 33
+1 5
cfi=(117)
cfn=(2146)
calls=1 +38 
* 33
+10 4
cfi=(87)
cfn=(2134)
calls=1 -41 
* 67
* 1
+1 24
cob=(3)
cfi=(3)
cfn=(828)
calls=1 0 
* 10775
* 1
+1 3
+2 4
+10 7
cfi=(87)
cfn=(2134)
calls=1 -55 
* 67
* 1
+1 27
cob=(3)
cfi=(3)
cfn=(828)
calls=1 0 
* 163
* 1
+1 3
+2 2
+9 464
+2 696
cfi=(86)
cfn=(2242) PGSemaphoreCreate
calls=116 +24 
* 6487
* 116
+1 928
cfi=(122)
cfn=(2192)
calls=116 +32 
* 1276
+1 1044
cfi=(99)
cfn=(2144)
calls=116 678 
* 7424
+2 812
+10 348
+3 800
+1 700
+1 900
+2 96
+3 32
+1 28
+1 36
+2 36
+3 64
+1 56
+1 64
+4 232
+1 24128
cfi=(126)
cfn=(2228)
calls=1856 37 
* 22272
-1 5800
+4 928
cfi=(127)
cfn=(2252)
calls=116 +10 
* 1392
+6 1044
cfi=(117)
cfn=(2146)
calls=116 -48 
* 3828
+1 1044
cfi=(117)
cfn=(2146)
calls=116 -49 
* 3828
-59 467
+66 6
+1 7
+3 2
cfi=(87)
cfn=(2134)
calls=1 158 
* 67
* 1
+1 2
+1 4

fn=(2868) InitProcessPhase2
465 2
+6 3
cfi=(100)
cfn=(2870) ProcArrayAdd
calls=1 277 
* 331
+5 3
cfi=(67)
cfn=(2110)
calls=1 362 
* 32
+1 2

fn=(5778)
800 6
+7 1
cfi=(56)
cfn=(5780) SyncRepCleanupAtProcExit
calls=1 364 
* 20
+17 1
cfi=(99)
cfn=(5784)
calls=1 1825 
* 8
+3 1
cfi=(128)
cfn=(5786)
calls=1 199 
* 10
+3 3
+4 1
cfi=(106)
cfn=(5788) ReplicationSlotCleanup
calls=1 480 
* 435
+8 4
+33 1
cfi=(54)
cfn=(5790)
calls=1 362 
* 142
+1 2
+1 1
+1 4
cfi=(122)
cfn=(5792)
calls=1 317 
* 7
+2 3
+1 3
cfi=(142) /home/mithuncy/fsm_code/src/backend/storage/lmgr/../../../../src/include/storage/s_lock.h
cfn=(2836) tas
calls=1 225 
* 14
* 2
+7 4
+6 4
+1 3
+4 5
cfi=(143) /home/mithuncy/fsm_code/src/backend/storage/lmgr/s_lock.c
cfn=(5794) update_spins_per_delay
calls=1 208 
* 16
* 1
+2 2
+7 4
cfi=(105)
cfn=(2832)
calls=1 3272 
* 5
* 3
+1 1
cfi=(102)
cfn=(5796) MarkPostmasterChildInactive
calls=1 290 
* 12
+3 3
+2 4

fn=(2830) InitProcess
296 4
+7 3
+3 3
+4 1
cfi=(105)
cfn=(2832)
calls=1 3272 
* 5
* 3
cfi=(105)
cfn=(2834)
calls=1 3278 
* 5
* 2
+2 3
+3 3
+9 3
cfi=(142)
cfn=(2836)
calls=1 -99 
* 14
* 2
+2 4
cfi=(143)
cfn=(2838) set_spins_per_delay
calls=1 197 
* 7
+2 3
+2 3
+2 4
+1 2
+15 11
+14 5
cfi=(105)
cfn=(2832)
calls=1 3272 
* 5
* 3
+1 1
cfi=(102)
cfn=(2840) MarkPostmasterChildActive
calls=1 257 
* 12
+6 3
cfi=(126)
cfn=(2842)
calls=1 58 
* 11
+1 2
+1 2
+1 2
+1 2
+1 2
+1 2
+1 3
+2 2
+1 2
+1 2
+1 2
+1 3
+1 2
+1 2
+2 1
cfi=(105)
cfn=(2834)
calls=1 3278 
* 5
* 2
+2 2
+1 2
+1 2
+1 2
+10 2
+3 2
+1 2
+1 4
cfi=(126)
cfn=(2842)
calls=1 58 
* 11
+3 2
+1 2
+8 2
+3 2
+1 2
+1 2
+1 2
+1 2
+8 4
cfi=(122)
cfn=(2844)
calls=1 297 
* 13
+1 1
cfi=(54)
cfn=(2846)
calls=1 -91 
* 144
+7 4
cfi=(86)
cfn=(2852) PGSemaphoreReset
calls=1 285 
* 893
+5 3
cfi=(67)
cfn=(2110)
calls=1 -84 
* 32
+6 1
cfi=(99)
cfn=(2860)
calls=1 +84 
* 4
+1 1
cfi=(144) /home/mithuncy/fsm_code/src/backend/storage/lmgr/deadlock.c
cfn=(2862) InitDeadLockChecking
calls=1 144 
* 1785
+1 4

fn=(3680)
696 9
+4 9
+2 3
cfi=(91)
cfn=(3682)
calls=3 1667 
* 30
+3 9
+2 12
+44 6

fn=(1994)
129 2
+5 2
+1 2

fn=(5774)
789 5
+2 4
cfi=(100)
cfn=(5776) ProcArrayRemove
calls=1 335 
* 313
+1 2

fl=(137)
fn=(2556)
32 33
+15 33
cob=(3)
cfi=(3)
cfn=(2562)
calls=10 -47 
* 540
cob=(1)
cfi=(1)
cfn=(223)
calls=1 -47 
* 1314
* 15
+1 33
cob=(3)
cfi=(3)
cfn=(2562)
calls=11 -48 
* 594
* 11
+13 11
cob=(5)
cfi=(5)
cfn=(2570) fork
calls=10 -61 
* 1845
cob=(1)
cfi=(1)
cfn=(223)
calls=1 -61 
* 2261
* 15
* 11
+1 22
+23 2
cob=(3)
cfi=(3)
cfn=(234)
calls=1 -85 
* 500
* 1
* 1
+2 2
+31 11
+1 22

fl=(138)
fn=(2804)
526 24
+8 4
+3 12
cfn=(2768) find_active_timeout
calls=4 83 
* 58
* 4
+1 8
+1 6
cfn=(2806) remove_timeout_index
calls=2 121 
* 42
+3 16
+1 16
+3 12
+2 8

fn=(2768)
83 18
+3 12
+2 12
+1 4
-3 18
+6 4
+1 12

fn=(2772) schedule_alarm
186 8
+1 6
+6 110
+3 14
cfi=(21)
cfn=(2774)
calls=2 1646 
* 80
+7 6
+3 4
+1 6
+32 2
+3 10
cob=(3)
cfi=(3)
cfn=(2780)
calls=1 0 
* 5
cob=(1)
cfi=(1)
cfn=(223)
calls=1 0 
* 1310
* 6
* 4
+3 4

fn=(2766) enable_timeout
139 12
+11 6
cfn=(2768)
calls=2 -67 
* 22
* 2
+1 4
+7 10
+13 8
+1 10
+1 10
+2 10
cfn=(2770) insert_timeout
calls=2 -74 
* 56
+1 4

fn=(2770)
101 10
+3 10
+4 14
+3 12
+2 6
+1 4

fn=(2758)
341 6
+4 2
+2 2
+2 4
+2 192
+1 160
+1 160
+1 160
+1 160
-6 100
+9 2
+3 6
cfi=(28)
cfn=(784)
calls=2 41 
* 348
+1 4

fn=(2764)
429 10
+5 2
+3 2
cfi=(21)
cfn=(656)
calls=2 1571 
* 44
* 2
+1 12
+1 12
cfn=(2766)
calls=2 139 
* 154
+3 6
cfn=(2772)
calls=2 186 
* 1575
+1 4

fn=(2762)
374 30
+5 10
+14 25
+2 5
+1 20

fn=(2806)
121 8
+3 10
+4 14
+3 6
+1 4

fn=(5712) handle_sig_alarm
260 4
+1 1
cob=(5)
cfi=(5)
cfn=(472)
calls=1 0 
* 3
* 1
* 2
+7 3
+6 3
cfi=(122)
cfn=(2850)
calls=1 437 
* 49
+5 3
+41 3
+2 1
cob=(5)
cfi=(5)
cfn=(472)
calls=1 0 
* 3
* 1
* 2
+1 2

fl=(163) /home/mithuncy/fsm_code/src/backend/access/transam/../../../../src/include/utils/palloc.h
fn=(2968) MemoryContextSwitchTo
110 24
+1 16
+2 16
+1 8
+1 16

fl=(228) /home/mithuncy/fsm_code/src/backend/access/common/printtup.c
fn=(3986) SetRemoteDestReceiverParams
107 4
+1 2
+5 3
+2 4
+12 2

fn=(3984) printtup_create_DR
79 4
+1 2
cfi=(13)
cfn=(2546)
calls=1 956 
* 243
* 1
+2 2
+1 2
+1 2
+1 2
+1 3
+6 4
+2 2
+1 2
+1 2
+1 2
+2 1
+1 2

fn=(5612) printtup_destroy
558 4
+1 3
cfi=(13)
cfn=(952)
calls=1 1032 
* 85
+1 2

fl=(230)
fn=(5062) pg_proc_aclmask
3983 24
+9 9
cfi=(193)
cfn=(3466)
calls=3 58 
* 42
* 6
+1 6
+36 12

fn=(4014) pg_language_aclcheck
4668 6
+1 6
cfn=(4016) pg_language_aclmask
calls=1 4037 
* 33
* 2
+1 2
+3 2

fn=(4016)
4037 8
+9 3
cfi=(193)
cfn=(3466)
calls=1 58 
* 14
* 2
+1 2
+36 4

fn=(4550)
4694 12
+1 12
cfn=(4552) pg_namespace_aclmask
calls=2 4173 
* 66
* 4
+1 4
+3 4

fn=(5264)
3833 4000
+12 2000
cfi=(151)
cfn=(3444)
calls=500 1114 
* 12620095
* 500
+1 1000
+5 4000
+10 2000
+1 2500
cfi=(172)
cfn=(5266) IsSystemClass
calls=500 80 
* 56000
-1 1000
+15 1500
cfi=(193)
cfn=(3466)
calls=500 58 
* 7000
* 1000
+5 1500
cfi=(151)
cfn=(3418)
calls=500 1161 
* 51500
+1 1000
+39 2000

fn=(4552)
4173 16
+9 6
cfi=(193)
cfn=(3466)
calls=2 58 
* 28
* 4
+1 4
+64 8

fn=(5060)
4656 18
+1 18
cfn=(5062)
calls=3 3983 
* 99
* 6
+1 6
+3 6

fl=(311)
fn=(5362)
122 1042500
+4 1459500
+2 834000
+5 834000
+1 208500
+2 417000

fn=(5360)
145 1042500
+4 1251000
+2 834000
+5 834000
+1 208500
+2 417000

fl=(203) /home/mithuncy/fsm_code/src/backend/commands/tablecmds.c
fn=(3634) PreCommit_on_commit_actions
13150 6
+2 2
+1 2
+2 6
cfi=(46)
cfn=(966)
calls=2 78 
* 16
* 8
+38 4
+3 4
+42 4

fn=(3702) AtEOXact_on_commit_actions
13250 10
+4 2
+1 6
cfi=(46)
cfn=(966)
calls=2 78 
* 16
* 2
+2 6
+24 4

fl=(11)
fn=(376)
454 4
+4 3
cfn=(378) last_dir_separator
calls=1 139 
* 106
* 1
+1 2
+1 2
+8 3
cob=(1)
cfi=(1)
cfn=(223)
calls=1 0 
* 59053
* 5
* 1
+1 2
+13 1
+1 2

fn=(716)
759 5
+1 7
cfn=(526) make_relative_path
calls=1 541 
* 4595
+1 2

fn=(1428)
705 15
+1 21
cfn=(526)
calls=3 541 
* 13911
+1 6

fn=(378)
139 9
+2 3
+2 9
+1 392
+1 22
-2 502
+3 3
+1 6

fn=(458)
220 88
+1 33
+1 24
cfi=(16)
cfn=(460)
calls=4 46 
* 2252
+8 11
+1 2
-1 62
+3 44
+5 22
-2 77
cob=(3)
cfi=(3)
cfn=(424)
calls=11 0 
* 221
* 11
* 66
cob=(3)
cfi=(3)
cfn=(424)
calls=11 0 
* 221
* 11
* 110
cfi=(17)
cfn=(462)
calls=11 -33 
* 5975
+5 55

fn=(484)
255 88
+4 22
+28 66
cfn=(486) trim_trailing_separator
calls=22 900 
* 1006
+5 44
+6 44
+1 22
+3 4451
+2 2559
+2 4265
-7 5206
+9 44
+12 44
+1 22
+3 66
cob=(3)
cfi=(3)
cfn=(424)
calls=22 0 
* 456
* 22
* 22
+2 220
cob=(3)
cfi=(3)
cfn=(446)
calls=22 0 
* 690
* 22
* 44
+2 88
cob=(3)
cfi=(3)
cfn=(446)
calls=22 0 
* 506
* 22
* 44
+7 220
cob=(3)
cfi=(3)
cfn=(446)
calls=22 0 
* 638
* 22
* 44
+1 88
cob=(3)
cfi=(3)
cfn=(446)
calls=22 0 
* 511
* 22
-1 44
+6 44
+13 44
+11 44

fn=(524) get_etc_path
714 5
+1 7
cfn=(526)
calls=1 541 
* 4662
+1 2

fn=(1262)
609 10
+4 4
+3 8
+5 1
+3 3
cob=(3)
cfi=(3)
cfn=(388)
calls=1 0 
* 304
* 1
* 1
+1 2
+12 5
cob=(3)
cfi=(3)
cfn=(454)
calls=1 0 
* 34
* 1
* 2
+1 1
+23 3
cob=(3)
cfi=(3)
cfn=(424)
calls=1 0 
* 21
* 1
* 4
cob=(3)
cfi=(3)
cfn=(424)
calls=1 0 
* 15
* 1
* 4
cob=(3)
cfi=(3)
cfn=(388)
calls=1 0 
* 188
* 1
* 1
+1 2
+12 7
cfi=(17)
cfn=(1138)
calls=1 231 
* 445
+1 3
cob=(3)
cfi=(3)
cfn=(590)
calls=1 0 
* 116
* 1
* 1
+4 3
cob=(3)
cfi=(3)
cfn=(384)
calls=1 0 
* 420
* 1
* 1
+1 2
+14 6
cfn=(484)
calls=2 255 
* 2040
+2 2
+1 8

fn=(456)
104 15
+3 15
+1 112
+1 10
-2 135
+4 10

fn=(526)
541 35
+10 5
+1 10
+2 1295
+1 80
+1 1740
+1 5
-5 2470
+7 10
+2 15
cob=(3)
cfi=(3)
cfn=(424)
calls=5 0 
* 105
* 5
* 25
+6 30
cfi=(16)
cfn=(460)
calls=5 46 
* 3270
+1 15
cfn=(528) trim_directory
calls=5 869 
* 635
+1 15
cfn=(484)
calls=5 255 
* 4527
+5 15
cob=(3)
cfi=(3)
cfn=(424)
calls=5 0 
* 105
* 5
* 10
+1 10
+1 30
-1 10
+2 55
cfn=(530) dir_strcmp
calls=5 -85 
* 340
-1 10
+3 25
+1 15
cfn=(486)
calls=5 900 
* 280
+1 45
cfn=(458)
calls=5 220 
* 2156
+1 15
cfn=(484)
calls=5 255 
* 5735
+1 5
+6 10

fn=(528)
869 20
+5 20
+4 15
cob=(3)
cfi=(3)
cfn=(424)
calls=5 0 
* 105
* 5
* 45
+3 345
+3 45
+3 15
+2 10
+1 10

fn=(530)
492 20
+1 5
+4 60
-2 30
+9 30
-11 140
+13 20
+2 20
+2 5
+1 10

fn=(486)
900 108
+4 81
cob=(3)
cfi=(3)
cfn=(424)
calls=27 0 
* 561
* 27
* 81
+1 81
+1 54
+1 10
-1 229
+2 54

fl=(26)
fn=(3644) RecordTransactionCommit
1122 8
+1 2
cfn=(3646) GetTopTransactionIdIfAny
calls=2 387 
* 10
* 2
+1 6
+1 2
+5 2
+1 2
+1 2
+4 8
cfi=(205)
cfn=(3648)
calls=2 389 
* 60
* 2
+1 6
cfn=(3650) xactGetCommittedChildren
calls=2 5234 
* 32
* 2
+1 6
+1 10
cfi=(155)
cfn=(3652)
calls=2 828 
* 32
* 2
+2 8
+6 8
+8 2
+17 2
+13 4
+1 1
+10 6
+7 1
cfi=(50)
cfn=(5630) BufmgrCommit
calls=1 2598 
* 4
+19 3
+1 2
+2 1
cfn=(5632) SetCurrentTransactionStopTimestamp
calls=1 746 
* 28
+2 22
cfn=(5634) XactLogCommitRecord
calls=1 5264 
* 1507
+7 2
+15 4
+1 2
+2 10
cfi=(95)
cfn=(5686) TransactionTreeSetCommitTsData
calls=1 148 
* 19
+30 2
+1 3
+1 2
+23 3
cfi=(53)
cfn=(5688) XLogSetAsyncXactLSN
calls=1 2643 
* 88
+7 2
+1 6
cfi=(168)
cfn=(5690)
calls=1 274 
* 584
+7 2
+2 2
+1 3
+4 6
cfi=(168)
cfn=(5704)
calls=1 367 
* 15
* 1
+11 2
+4 2
+3 1
+3 6
+3 2
+1 8

fn=(3764) IsTransactionOrTransactionBlock
4464 4
+1 4
+2 8
+1 4
+3 4

fn=(3770) GetCurrentTransactionStopTimestamp
720 4
+1 6
+1 2
+1 1
cfi=(21)
cfn=(656)
calls=1 1571 
* 22
+1 4

fn=(4004)
4446 2
+1 2
+2 8
+1 2
+3 2

fn=(5548) AtCCI_LocalCache
1362 1000
+6 500
cfi=(150)
cfn=(5550)
calls=500 440 
* 5000
+5 500
cfi=(155)
cfn=(5552)
calls=500 1084 
* 4000
+1 1000

fn=(5650) GetCurrentTransactionIdIfAny
417 2
+1 2
+1 2

fn=(1210)
910 5118
+1 10236
+1 5118

fn=(4830)
919 6008
+7 4506
+7 500
cfn=(1210)
calls=500 -23 
* 4000
* 2500
+3 1500
+1 1500
+7 500
+3 1500
cfi=(110)
cfn=(5546)
calls=500 545 
* 9000
+8 500
cfn=(5548)
calls=500 1362 
* 12000
+2 6008

fn=(5382)
400 1500
+1 1000
+2 2000
+1 3
cfn=(5384) AssignTransactionId
calls=1 +68 
* 2580
+1 1000
+1 1000

fn=(3646)
387 4
+1 2
+1 4

fn=(736)
624 2072
+1 2072
+2 2072
+1 2072

fn=(2960) StartTransactionCommand
2697 6
+1 4
+2 14
+7 2
cfn=(2962) StartTransaction
calls=2 1800 
* 390751
+1 4
+1 2
+51 6
cfi=(163)
cfn=(2968)
calls=2 110 
* 20
+1 4

fn=(2996) ShowTransactionState
5100 16
+2 24
+2 8

fn=(3762) IsAbortedTransactionBlockState
353 6
+1 6
+2 12
+1 6
-1 6
+4 3
+1 6

fn=(5750) AbortOutOfAnyTransaction
4342 3
+1 2
+3 1
cfn=(5752) AtAbort_Memory
calls=1 1639 
* 21
+7 7
+3 4
+18 1
+58 4
+6 1
cfn=(5754) AtCleanup_Memory
calls=1 1729 
* 45
+1 2

fn=(986)
333 26
+1 26
+9 52
+1 26

fn=(2958) SetCurrentStatementStartTimestamp
734 4
+1 6
+1 2
cfi=(21)
cfn=(656)
calls=2 1571 
* 44
* 2
+3 4

fn=(2962)
1800 6
+7 2
+1 4
+13 4
+1 4
+7 4
+1 4
+1 4
+1 4
+1 4
+6 14
cfi=(54)
cfn=(2964)
calls=2 486 
* 24
+13 2
cfi=(53)
cfn=(2878)
calls=2 7896 
* 22
* 4
+7 4
+1 4
+2 4
+1 4
+1 2
+1 2
+5 4
+1 2
+1 2
+1 2
+5 2
+1 4
+5 2
cfn=(2966) AtStart_Memory
calls=2 991 
* 1112
+1 2
cfn=(2970) AtStart_ResourceOwner
calls=2 1038 
* 1424
+6 4
+1 2
cfi=(101)
cfn=(2976) GetNextLocalTransactionId
calls=2 770 
* 22
* 2
+5 6
cfi=(91)
cfn=(2978)
calls=2 4297 
* 496
+7 6
+13 6
+2 2
cfi=(165)
cfn=(2980)
calls=2 424 
* 18
* 6
+1 6
+6 6
cfi=(38)
cfn=(2982) pgstat_report_xact_timestamp
calls=2 3193 
* 52
+2 2
+5 2
cfi=(29)
cfn=(2984)
calls=2 5542 
* 16
+1 2
cfn=(2986) AtStart_Cache
calls=2 982 
* 387363
+1 2
cfi=(167)
cfn=(2994)
calls=2 4778 
* 12
+6 4
+2 4
cfn=(2996)
calls=2 5100 
* 24
+1 4

fn=(3164)
868 5108
+1 5108
+1 5108

fn=(5384)
472 4
+1 5
+2 1
+10 1
cfn=(1210)
calls=1 910 
* 8
* 5
+9 2
+33 2
+12 3
cfi=(312)
cfn=(5386)
calls=1 49 
* 370
* 2
+1 4
+1 3
+2 2
+7 4
+1 4
cfi=(92)
cfn=(5396)
calls=1 1835 
* 9
+7 2
+1 3
+2 4
cfi=(159)
cfn=(5398) XactLockTableInsert
calls=1 +20 
* 2136
+2 2
+20 2
+34 2

fn=(5754)
1729 2
+7 3
cfi=(163)
cfn=(2968)
calls=1 110 
* 10
+5 3
+1 3
cfi=(13)
cfn=(3758)
calls=1 137 
* 15
+5 3
+2 1
+1 1
+1 2
+1 2

fn=(1192)
4519 4
+1 4
+2 8
+3 2
+1 4

fn=(3792) TransactionBlockStatusCode
4478 6
+1 4
+2 14
+4 4
+27 4

fn=(5682) MarkCurrentTransactionIdLoggedIfAny
428 2
+1 4
+1 2
+1 2

fn=(3630) CallXactCallbacks
3360 16
+3 12
+1 16
cob=(12)
cfi=(244) /home/mithuncy/fsm_code/src/pl/plpgsql/src/pl_exec.c
cfn=(5628) plpgsql_xact_cb
calls=2 8134 
* 28
-1 18
+2 8

fn=(3650)
5234 6
+1 4
+2 8
+1 6
+4 4
+1 4

fn=(3788) GetCurrentStatementStartTimestamp
708 8
+1 4
+1 8

fn=(2970)
1038 6
+1 4
+10 6
cfi=(164)
cfn=(2972) ResourceOwnerCreate
calls=2 422 
* 1382
* 4
+2 6
+1 6
+1 6
+1 4

fn=(3012)
662 10032
+2 5016
+9 500
+2 500
+1 1000
-1 2008
+1 4016

fn=(3620) CommitTransactionCommand
2768 6
+1 4
+2 14
+19 2
cfn=(3622) CommitTransaction
calls=2 1954 
* 869886
+1 4
+1 2
3001 4

fn=(3730) AtCommit_Memory
1381 4
+5 6
cfi=(163)
cfn=(2968)
calls=2 110 
* 20
+6 6
cfi=(13)
cfn=(1396)
calls=2 212 
* 1188
+1 2
+1 2
+1 4
+1 4

fn=(4162) RegisterXactCallback
3326 5
+4 1
-1 3
cfi=(13)
cfn=(798)
calls=1 772 
* 91
* 1
+2 3
+1 3
+1 3
+1 2
+1 2

fn=(4166) RegisterSubXactCallback
3381 5
+4 1
-1 3
cfi=(13)
cfn=(798)
calls=1 772 
* 122
* 1
+2 3
+1 3
+1 3
+1 2
+1 2

fn=(2966)
991 6
+1 4
+9 6
+2 7
cfi=(14)
cfn=(432)
calls=1 395 
* 493
-1 1
+16 7
cfi=(14)
cfn=(432)
calls=1 395 
* 428
* 7
cfi=(14)
cfn=(432)
calls=1 395 
* 111
-1 2
+9 4
+1 6
+3 6
cfi=(163)
cfn=(2968)
calls=2 110 
* 20
+1 4

fn=(5634)
5264 13
+13 1
+3 2
+1 2
+6 2
+2 2
+2 3
+2 4
+7 3
+7 5
+7 2
+6 2
+6 2
+6 2
+11 3
+8 3
+5 1
cfi=(147) /home/mithuncy/fsm_code/src/backend/access/transam/xloginsert.c
cfn=(5636) XLogBeginInsert
calls=1 121 
* 35
+2 4
cfi=(147)
cfn=(5640) XLogRegisterData
calls=1 324 
* 37
+2 3
+3 4
+3 4
+8 4
+8 4
+7 4
+7 4
+4 2
cfi=(147)
cfn=(5642) XLogSetRecordFlags
calls=1 398 
* 8
+2 4
cfi=(147)
cfn=(5644) XLogInsert
calls=1 416 
* 1336
+1 2

fn=(2986)
982 4
+1 2
cfi=(155)
cfn=(2988)
calls=2 680 
* 387353
+1 4

fn=(3506)
758 3032
+1 3032
+2 3032
+1 3032

fn=(3622)
1954 6
+1 4
+4 10
+3 4
+3 4
cfn=(2996)
calls=2 5100 
* 24
+5 8
+16 2
cfi=(167)
cfn=(3624)
calls=2 4974 
* 76
+7 4
cfi=(156) /home/mithuncy/fsm_code/src/backend/utils/mmgr/portalmem.c
cfn=(3628) PreCommit_Portals
calls=2 671 
* 876
* 6
+1 2
+3 10
cfn=(3630)
calls=2 3360 
* 48
+11 2
cfn=(1210)
calls=2 910 
* 16
* 4
+4 4
cfi=(167)
cfn=(3632)
calls=2 5030 
* 32
+6 2
cfi=(203)
cfn=(3634)
calls=2 13150 
* 52
+3 4
cfi=(204)
cfn=(3636)
calls=2 584 
* 22
+7 2
cfi=(92)
cfn=(3638)
calls=2 4667 
* 32
+7 2
cfi=(113)
cfn=(3640) PreCommit_Notify
calls=2 776 
* 30
+3 6
+3 8
cfi=(150)
cfn=(3642)
calls=2 477 
* 44
+6 4
+1 4
+2 8
+6 2
cfn=(3644)
calls=2 1122 
* 2572
* 4
+24 10
cfi=(100)
cfn=(3654) ProcArrayEndTransaction
calls=2 398 
* 346
+18 6
cfn=(3630)
calls=2 3360 
* 50
+3 12
cfi=(164)
cfn=(3656) ResourceOwnerRelease
calls=2 481 
* 260
+5 4
cfi=(50)
cfn=(3662) AtEOXact_Buffers
calls=2 2422 
* 54
+3 4
cfi=(148)
cfn=(3670) AtEOXact_RelationCache
calls=2 2828 
* 44
+9 4
cfi=(155)
cfn=(3672)
calls=2 948 
* 22
+2 2
cfi=(98)
cfn=(3674) AtEOXact_MultiXact
calls=2 1663 
* 64
+2 12
cfi=(164)
cfn=(3656)
calls=2 481 
* 821682
+3 12
cfi=(164)
cfn=(3656)
calls=2 481 
* 350
+13 4
cfi=(205)
cfn=(3690)
calls=2 306 
* 58
+2 2
cfi=(113)
cfn=(3692) AtCommit_Notify
calls=2 875 
* 24
+1 6
cfi=(29)
cfn=(3694)
calls=2 5576 
* 32
+1 4
cfi=(165)
cfn=(3696)
calls=2 303 
* 60
+1 2
cfi=(208)
cfn=(3700)
calls=2 612 
* 10
+1 4
cfi=(203)
cfn=(3702)
calls=2 13250 
* 46
+1 8
cfi=(55)
cfn=(3704)
calls=2 3962 
* 30
+1 2
cfi=(140)
cfn=(3706) AtEOXact_SMgr
calls=2 814 
* 16
+1 4
cfi=(25)
cfn=(3708)
calls=2 2762 
* 72
+1 2
cfi=(209) /home/mithuncy/fsm_code/src/backend/utils/time/combocid.c
cfn=(3712) AtEOXact_ComboCid
calls=2 184 
* 16
+1 4
cfi=(31)
cfn=(3714) AtEOXact_HashTables
calls=2 1835 
* 30
+1 4
cfi=(38)
cfn=(3716) AtEOXact_PgStat
calls=2 -92 
* 40066
+1 6
cfi=(110)
cfn=(3720)
calls=2 1060 
* 226
+1 4
cfi=(72)
cfn=(3722)
calls=2 858 
* 34
+1 4
cfi=(38)
cfn=(2982)
calls=2 3193 
* 52
+2 2
+1 6
cfi=(164)
cfn=(3724) ResourceOwnerDelete
calls=2 688 
* 876
+1 4
+1 2
+1 2
+2 2
cfn=(3730)
calls=2 1381 
* 1236
+2 4
+1 4
+1 4
+1 4
+1 4
+1 4
+1 4
+2 2
+1 2
+6 4
+2 6
+1 4

fn=(5632)
746 2
+1 1
cfi=(21)
cfn=(656)
calls=1 1571 
* 22
* 1
+1 2

fn=(5752)
1639 2
+9 3
+1 3
cfi=(163)
cfn=(2968)
calls=1 110 
* 10
* 1
+3 2

fl=(101)
fn=(5772)
337 5
+1 2
+6 5
cfi=(99)
cfn=(2170)
calls=1 1122 
* 137
+2 9
+3 3
+3 2
+1 2
+1 2
+1 2
+1 2
+3 4
+2 40
-2 14
+5 3
+2 4
cfi=(99)
cfn=(2182)
calls=1 1726 
* 91
+1 2

fn=(2992)
540 30780
+6 12312
+1 55404
+13 30780
+1 12248
+2 160
cfi=(99)
cfn=(2170)
calls=32 1122 
* 4352
+11 64
+3 128
cfi=(116) /home/mithuncy/fsm_code/src/backend/storage/ipc/../../../../src/include/storage/s_lock.h
cfn=(2138) tas
calls=32 225 
* 448
* 64
+1 96
+1 64
+2 128
+22 32
+1 32
+2 26572
+1 5110
-3 7254
+13 128
+1 3
+2 62
+2 124
cfi=(99)
cfn=(2182)
calls=31 1726 
* 2790
* 4
cfi=(99)
cfn=(2182)
calls=1 1726 
* 90
+1 32
+1 12312

fn=(2872) SharedInvalBackendInit
259 6
+2 1
+1 2
+7 5
cfi=(99)
cfn=(2170)
calls=1 1122 
* 137
+3 2
+2 27
-2 19
+9 2
+2 6
+2 9
+2 6
+15 8
+3 3
+3 3
+3 3
+1 3
+1 4
+1 2
+1 2
+1 2
+1 3
+2 4
cfi=(99)
cfn=(2182)
calls=1 1726 
* 91
+3 4
cfi=(67)
cfn=(2110)
calls=1 +40 
* 32
+2 4
cfi=(57)
cfn=(2084)
calls=1 1286 
* 86
* 6
cfi=(57)
cfn=(2086)
calls=1 1336 
* 105
+1 4

fn=(2976)
770 4
+6 8
+1 4
+2 2
+1 4

fn=(2262)
220 3
+6 1
cfn=(2052)
calls=1 -21 
* 62
* 4
cfi=(87)
cfn=(2168)
calls=1 373 
* 964
-1 1
+2 3
+4 2
+1 2
+1 2
+1 2
+1 3
+1 2
+5 2
+2 784
+1 784
+1 784
+1 784
+1 784
+1 784
+1 784
-8 564
+10 2

fn=(2052)
205 6
+3 2
+1 10
cfi=(87)
cfn=(2000)
calls=2 493 
* 46
* 10
cfi=(87)
cfn=(2002)
calls=2 476 
* 42
* 2
+2 2
+1 4

fl=(143)
fn=(2838)
197 3
+1 2
+1 2

fn=(5794)
208 3
+11 11
+1 2

fn=(3272) finish_spin_delay
176 18024
+1 24032
+3 18024
+1 63
+7 12016

fl=(144)
fn=(2862)
144 3
+4 3
cfi=(145)
cfn=(2864)
calls=1 -38 
* 10
* 1
+6 5
cfi=(13)
cfn=(940)
calls=1 925 
* 92
* 1
+1 8
cfi=(13)
cfn=(940)
calls=1 925 
* 94
* 1
+6 2
+1 5
cfi=(13)
cfn=(940)
calls=1 925 
* 92
* 1
+1 5
cfi=(13)
cfn=(940)
calls=1 925 
* 123
* 1
+9 12
cfi=(13)
cfn=(940)
calls=1 925 
* 123
-1 1
+2 5
cfi=(13)
cfn=(940)
calls=1 925 
* 123
* 1
+10 2
+1 5
cfi=(13)
cfn=(940)
calls=1 925 
* 755
* 1
+10 3
+2 5
cfi=(13)
cfn=(940)
calls=1 925 
* 286
-1 1
+3 3
cfi=(145)
cfn=(2864)
calls=1 -88 
* 10
+1 2

fl=(195) /home/mithuncy/fsm_code/src/backend/access/nbtree/nbtcompare.c
fn=(3548) btint2cmp
83 4722
+1 4722
+1 4722
+2 7870
+1 3148

fn=(3476) btoidcmp
268 57363
+1 57363
+1 57363
+2 57363
+1 16934
+1 31962
+1 6290
+2 7509
+1 38242

fl=(258)
fn=(4558)
110 24
+1 16
+2 16
+1 8
+1 16

fl=(305) /home/mithuncy/fsm_code/src/backend/utils/misc/rls.c
fn=(5274) check_enable_rls
53 4500
+1 1500
cfi=(54)
cfn=(3464)
calls=500 381 
* 2500
* 1000
+8 1000
+4 2000
cfi=(151)
cfn=(3444)
calls=500 1114 
* 171104
* 500
+1 1000
+2 4000
+2 1500
+1 1500
+2 1500
cfi=(151)
cfn=(3418)
calls=500 1161 
* 51500
+3 2000
+1 1000
+55 2500

fl=(74)
fn=(1618)
575 4
+1 4
+1 3
+3 2

fn=(2692)
359 6
+1 10
+1 10
+1 4

fn=(2274)
301 15
+1 12
+3 12
+1 9
+1 12
+1 9
+3 6
-10 20
+1 16
+3 16
+1 12
+1 16
+1 12
+3 8

fn=(2272)
279 6
+1 14
+1 4

fl=(211) /home/mithuncy/fsm_code/src/backend/tcop/../../../src/include/utils/palloc.h
fn=(3756) MemoryContextSwitchTo
110 24
+1 16
+2 16
+1 8
+1 16
-5 15
+1 10
+2 10
+1 5
+1 10

fl=(222)
fn=(4876) list_length
90 3
+1 5
+1 2
-2 3
+1 5
+1 2

fn=(4336)
78 12
+1 12
+1 8
-2 6
+1 6
+1 4
-2 60
+1 60
+1 40
-2 12
+1 20
+1 8
-2 6
+1 10
+1 4
-2 21
+1 33
+1 14
-2 6
+1 6
+1 4
-2 36
+1 60
+1 24

fn=(3930)
84 3
+1 5
+1 2
-2 3
+1 5
+1 2

fl=(182)
fn=(3270)
212 24032
+1 60080
+1 12016

fl=(189)
fn=(3376) XidInMVCCSnapshot
1476 10245
+12 12294
cfi=(168)
cfn=(3010)
calls=2049 301 
* 34603
* 4098
+1 4098
+95 4098

fn=(3374)
965 12342
+1 6171
+5 12342
1073 12342
+1 12294
cfn=(3376)
calls=2049 1476 
* 69436
-1 4098
+7 12342
+1 4114
+67 4114

fl=(290)
fn=(4958)
311 35
+1 7
+9 21
cfi=(291)
cfn=(4960)
calls=7 671 
* 3346
* 7
+1 14
+1 14
+83 14

fl=(148)
fn=(3094)
2003 22488
+2 16866
cfn=(3096)
calls=5622 -22 
* 500358
+8 11244

fn=(3544) AllocateRelationDesc
380 2008
+6 1506
cfi=(152)
cfn=(2898)
calls=502 110 
* 5020
* 502
+5 1004
cfi=(13)
cfn=(2546)
calls=502 956 
* 255982
* 502
+3 1004
+14 1004
cfi=(13)
cfn=(940)
calls=502 925 
* 61715
* 502
+2 3012
cob=(3)
cfi=(3)
cfn=(856)
calls=502 0 
* 37404
* 502
+3 1506
+3 2510
cfi=(158)
cfn=(2928)
calls=502 46 
* 76332
* 1004
+2 1506
+2 1506
cfi=(152)
cfn=(2898)
calls=502 110 
* 5020
+2 502
+1 1004

fn=(3566) RelationInitIndexAccessInfo
1342 6
+22 2
-1 4
cfi=(151)
cfn=(3444)
calls=1 1114 
* 28392
* 1
+2 2
+3 3
cfi=(152)
cfn=(2898)
calls=1 110 
* 10
* 1
+1 3
cfi=(190)
cfn=(3484)
calls=1 683 
* 237
* 2
+1 11
+1 3
cfi=(152)
cfn=(2898)
calls=1 110 
* 10
+1 3
cfi=(151)
cfn=(3418)
calls=1 1161 
* 103
+5 7
cfi=(151)
cfn=(3444)
calls=1 1114 
* 17287
* 1
+1 2
+3 8
+1 4
+1 3
cfi=(151)
cfn=(3418)
calls=1 1161 
* 103
+2 5
+1 6
+3 5
+7 7
cfi=(14)
cfn=(432)
calls=1 395 
* 623
* 1
+3 3
+1 7
cfi=(13)
cfn=(930)
calls=1 1149 
* 192
* 5
cfi=(13)
cfn=(812)
calls=1 330 
* 9
+6 3
cfn=(2936) InitIndexAmRoutine
calls=1 -88 
* 798
+7 7
cfi=(13)
cfn=(2156)
calls=1 815 
* 138
-1 2
+3 7
cfi=(13)
cfn=(2156)
calls=1 815 
* 138
-1 2
+3 4
+1 2
+2 3
+3 7
cfi=(13)
cfn=(2156)
calls=1 815 
* 165
-1 2
+3 11
cfi=(13)
cfn=(2156)
calls=1 815 
* 923
-1 3
+10 7
cfi=(13)
cfn=(2156)
calls=1 815 
* 138
-1 2
+4 7
cfi=(13)
cfn=(2156)
calls=1 815 
* 142
-1 2
+8 16
cfn=(3596) GetPgIndexDescriptor
calls=1 3907 
* 1974
* 6
cfi=(190)
cfn=(3384)
calls=1 428 
* 1618
* 1
+5 2
+1 10
cob=(3)
cfi=(3)
cfn=(856)
calls=1 0 
* 12
* 1
+7 18
cfn=(3596)
calls=1 3907 
* 8
* 6
cfi=(190)
cfn=(3384)
calls=1 428 
* 1513
* 1
+5 2
+7 14
cfn=(3598) IndexSupportInitialize
calls=1 +46 
* 56321
+7 18
cfn=(3596)
calls=1 3907 
* 8
* 6
cfi=(190)
cfn=(3384)
calls=1 428 
* 1605
* 1
+5 2
+1 10
cob=(3)
cfi=(3)
cfn=(856)
calls=1 0 
* 12
* 1
+5 2
+1 2
+1 2
+1 2
+1 2
+1 2
+1 5

fn=(3596)
3907 6
+4 9
+1 3
cfn=(3558) BuildHardcodedDescriptor
calls=1 -48 
* 1962
* 1
+3 1
+1 2
-1 2
+1 4

fn=(3598)
1515 11
+3 2
+4 14
+4 18
cfn=(3600) LookupOpclassInfo
calls=2 +36 
* 56167
* 2
+4 16
+1 16
+1 4
+1 4
+1 4
-1 20
cob=(3)
cfi=(3)
cfn=(856)
calls=2 0 
* 28
* 2
-15 11
+19 2

fn=(2888) RelationCacheInitialize
3440 3
+6 3
+1 1
cfi=(149)
cfn=(2890)
calls=1 630 
* 443
+5 118
+1 1
+1 1
+1 6
cfi=(31)
cfn=(794)
calls=1 317 
* 3136
* 1
+6 1
cfi=(150)
cfn=(2892)
calls=1 585 
* 12
+1 2

fn=(2936)
1318 316
+8 316
cfi=(160)
cfn=(2938)
calls=79 34 
* 41049
* 79
+3 395
cfi=(13)
cfn=(798)
calls=79 772 
* 9638
* 79
+2 474
cob=(3)
cfi=(3)
cfn=(856)
calls=79 0 
* 7116
* 79
+1 237
+2 237
cfi=(13)
cfn=(952)
calls=79 1032 
* 6715
+1 158

fn=(3498) RelationCacheInitializePhase3
3536 3
+4 8
+5 1
cfi=(150)
cfn=(3500)
calls=1 626 
* 1691
+5 3
cfi=(152)
cfn=(2898)
calls=1 110 
* 10
* 1
+7 3
+1 2
cfn=(2926) load_relcache_init_file
calls=1 5326 
* 681293
* 1
-1 2
+17 3
cfi=(152)
cfn=(2898)
calls=1 110 
* 10
+3 3
+28 4
+34 4
+36 5
cfi=(31)
cfn=(3502)
calls=1 1380 
* 53
+2 1
+2 375
+1 125
+5 375
cfn=(3076)
calls=125 1970 
* 11000
+5 625
+50 625
+7 625
+15 625
+11 625
+9 625
+10 375
cfn=(3096)
calls=125 1983 
* 11125
+3 250
3677 378
cfi=(31)
cfn=(3508)
calls=126 1390 
* 14998
* 378
3806 2
+14 2

fn=(3558)
3864 10
+5 6
cfi=(152)
cfn=(2898)
calls=2 110 
* 20
* 2
+2 6
cfi=(158)
cfn=(2928)
calls=2 46 
* 306
* 2
+1 4
+1 4
+2 4
+2 1060
cob=(3)
cfi=(3)
cfn=(856)
calls=53 0 
* 2813
* 53
+2 477
-4 218
+8 4
+4 6
cfi=(152)
cfn=(2898)
calls=2 110 
* 20
+2 2
+1 4

fn=(3866) RelationClearRelation
2313 30
+18 24
cfi=(140)
cfn=(3872) smgrclose
calls=1 312 
* 499
+6 20
+2 15
cfn=(3868) RelationReloadNailed
calls=5 2155 
* 63450
+1 5
2546 10

fn=(3867) RelationClearRelation'2
2313 6
+18 4
+6 4
+2 3
cfn=(3869) RelationReloadNailed'2
calls=1 2155 
* 20568
+1 1
2546 2

fn=(2916) RelationCacheInitializePhase2
3477 3
+6 1
cfi=(150)
cfn=(2918)
calls=1 605 
* 1580
+6 3
+6 3
cfi=(152)
cfn=(2898)
calls=1 110 
* 10
* 1
+6 2
cfn=(2926)
calls=1 5326 
* 120179
* 3
+16 3
cfi=(152)
cfn=(2898)
calls=1 110 
* 10
+1 2

fn=(3862)
2624 24
+3 36
cfi=(31)
cfn=(836)
calls=6 910 
* 1205
* 33
+2 12
+2 9
+1 9
cfn=(3864) RelationFlushRelation
calls=3 -76 
* 993
+2 12

fn=(3538) ScanPgRelation
310 4032
+13 1512
+6 4032
cfi=(178)
cfn=(3482) ScanKeyInit
calls=504 81 
* 57456
+11 1512
cfi=(171)
cfn=(3034)
calls=501 1307 
* 1377129
cfi=(171)
cfn=(3035)
calls=3 1307 
* 27348
* 504
+7 1008
+3 1008
cfi=(110)
cfn=(3134)
calls=504 +91 
* 103320
* 504
+3 4032
-1 4536
cfi=(173)
cfn=(3127)
calls=1 -30 
* 3425
cfi=(173)
cfn=(3126)
calls=503 -30 
* 2232523
* 504
+5 1512
cfi=(173)
cfn=(3172)
calls=504 +49 
* 5059067
* 504
+5 1008
+1 1512
cfi=(190)
cfn=(3484)
calls=504 683 
* 132805
* 504
+3 1512
cfi=(173)
cfn=(3394)
calls=504 489 
* 1845554
+1 2016
cfi=(171)
cfn=(3092)
calls=504 1283 
* 1330877
+2 504
+1 1008

fn=(3539) ScanPgRelation'2
310 8
+13 3
+6 8
cfi=(178)
cfn=(3482)
calls=1 81 
* 114
+11 3
cfi=(171)
cfn=(3035)
calls=1 1307 
* 1450
* 1
+7 2
+3 2
cfi=(110)
cfn=(3134)
calls=1 +91 
* 205
* 1
+3 8
-1 9
cfi=(173)
cfn=(3126)
calls=1 -30 
* 3946
* 1
+5 3
cfi=(173)
cfn=(3172)
calls=1 +49 
* 10897
* 1
+5 2
+1 3
cfi=(190)
cfn=(3484)
calls=1 683 
* 243
* 1
+3 3
cfi=(173)
cfn=(3394)
calls=1 489 
* 2775
+1 4
cfi=(171)
cfn=(3092)
calls=1 1283 
* 557
+2 1
+1 2

fn=(3600)
1562 12
+9 6
+5 118
+1 1
+1 1
+1 6
cfi=(31)
cfn=(794)
calls=1 317 
* 2754
* 1
+4 3
+4 14
cfi=(31)
cfn=(836)
calls=2 910 
* 1345
* 2
+4 8
+3 2
+1 3
+2 2
+2 6
cfi=(13)
cfn=(2156)
calls=1 815 
* 153
-1 3
+22 8
+1 2
+9 7
+10 9
cfi=(178)
cfn=(3482)
calls=1 81 
* 114
+4 3
cfi=(171)
cfn=(3034)
calls=1 1307 
* 2497
* 1
+1 9
cfi=(173)
cfn=(3127)
calls=1 322 
* 4458
* 1
+3 3
cfi=(173)
cfn=(3172)
calls=1 406 
* 10415
* 3
+2 8
+2 4
+1 4
+5 3
cfi=(173)
cfn=(3394)
calls=1 489 
* 3059
+1 4
cfi=(171)
cfn=(3092)
calls=1 1283 
* 1743
+6 3
+5 2
-3 8
cfi=(178)
cfn=(3482)
calls=1 81 
* 114
+7 2
-3 9
cfi=(178)
cfn=(3482)
calls=1 81 
* 114
+7 2
-3 9
cfi=(178)
cfn=(3482)
calls=1 81 
* 114
+4 3
cfi=(171)
cfn=(3034)
calls=1 1307 
* 2503
* 1
+1 9
cfi=(173)
cfn=(3127)
calls=1 322 
* 4709
* 1
+3 1
+2 16
+2 8
+1 4
-1 4
+5 16
+1 4
-1 2
-9 6
cfi=(173)
cfn=(3172)
calls=2 406 
* 1432
* 3
cfi=(173)
cfn=(3172)
calls=1 406 
* 15703
* 9
+13 3
cfi=(173)
cfn=(3394)
calls=1 489 
* 2804
+1 4
cfi=(171)
cfn=(3092)
calls=1 1283 
* 1743
+3 2
+1 1
+1 4

fn=(3670)
2828 10
+16 6
+10 10
+11 6
+10 2
+1 2
+1 2
+1 2
+1 4

fn=(2926)
5326 12
+12 4
+1 7
cfi=(17)
cfn=(462)
calls=1 203 
* 360
* 1
+3 9
cfi=(17)
cfn=(462)
calls=1 203 
* 470
+3 8
cfi=(25)
cfn=(1278)
calls=2 2186 
* 1330
* 2
+1 4
+8 2
+1 10
cfi=(13)
cfn=(940)
calls=2 925 
* 215
* 2
+1 2
+1 6
+3 14
cob=(3)
cfi=(3)
cfn=(1336)
calls=2 0 
* 722
* 2
* 4
+2 6
+3 2
+9 14
cob=(3)
cfi=(3)
cfn=(1336)
calls=2 0 
* 216
* 2
* 875
cob=(3)
cfi=(3)
cfn=(1336)
calls=125 0 
* 13680
* 125
* 127
+1 254
+2 4
5651 5
5383 375
+4 375
+2 1
+1 7
cfi=(13)
cfn=(1514)
calls=1 1045 
* 437
* 1
+3 10
cfi=(13)
cfn=(940)
calls=1 925 
* 123
* 1240
cfi=(13)
cfn=(940)
calls=124 925 
* 15252
* 375
+3 750
cob=(3)
cfi=(3)
cfn=(1336)
calls=125 0 
* 37364
* 125
* 375
+4 875
cob=(3)
cfi=(3)
cfn=(1336)
calls=125 0 
* 13500
* 125
* 250
+3 375
cfi=(13)
cfn=(940)
calls=125 925 
* 13019
* 125
+1 750
cob=(3)
cfi=(3)
cfn=(1336)
calls=125 0 
* 24148
* 125
* 375
+3 375
+3 625
cfi=(158)
cfn=(2928)
calls=125 46 
* 19974
* 250
+1 375
+2 625
+1 375
+3 125
+1 250
+2 6633
+2 4221
cob=(3)
cfi=(3)
cfn=(1336)
calls=603 0 
* 65387
* 603
* 1206
+2 1809
+2 3618
cob=(3)
cfi=(3)
cfn=(1336)
calls=603 0 
* 108068
* 603
* 1809
+3 4824
-11 4243
+15 875
cob=(3)
cfi=(3)
cfn=(1336)
calls=125 0 
* 13500
* 125
* 250
+2 375
+10 250
+4 250
+2 94
cfi=(13)
cfn=(2546)
calls=47 956 
* 8131
* 47
+2 94
+1 188
+7 625
+11 312
+1 13
+3 91
cob=(3)
cfi=(3)
cfn=(1336)
calls=13 0 
* 1404
* 13
* 455
cob=(3)
cfi=(3)
cfn=(1336)
calls=65 0 
* 7020
* 65
* 156
+3 234
cfi=(13)
cfn=(940)
calls=78 925 
* 9594
* 156
+1 546
cob=(3)
cfi=(3)
cfn=(1336)
calls=78 0 
* 17283
* 78
* 234
+4 468
+1 858
+6 546
cfi=(14)
cfn=(432)
calls=78 395 
* 38052
* 78
+3 234
+1 546
cfi=(13)
cfn=(930)
calls=78 1149 
* 14640
* 390
cfi=(13)
cfn=(812)
calls=78 330 
* 702
+9 234
cfn=(2936)
calls=78 1318 
* 66090
+3 546
cob=(3)
cfi=(3)
cfn=(1336)
calls=78 0 
* 8424
* 78
* 156
+3 390
cfi=(13)
cfn=(798)
calls=78 772 
* 8671
* 78
+1 468
cob=(3)
cfi=(3)
cfn=(1336)
calls=78 0 
* 8480
* 78
* 234
+3 234
+3 546
cob=(3)
cfi=(3)
cfn=(1336)
calls=78 0 
* 8424
* 78
* 156
+3 390
cfi=(13)
cfn=(798)
calls=78 772 
* 8671
* 78
+1 468
cob=(3)
cfi=(3)
cfn=(1336)
calls=78 0 
* 8620
* 78
* 234
+3 234
+3 546
cob=(3)
cfi=(3)
cfn=(1336)
calls=78 0 
* 8424
* 78
* 156
+2 390
cfi=(13)
cfn=(798)
calls=78 772 
* 9516
* 78
+1 468
cob=(3)
cfi=(3)
cfn=(1336)
calls=78 0 
* 9408
* 78
* 234
+3 234
+3 546
cob=(3)
cfi=(3)
cfn=(1336)
calls=78 0 
* 8424
* 78
* 156
+3 390
cfi=(13)
cfn=(798)
calls=78 772 
* 8671
* 78
+1 468
cob=(3)
cfi=(3)
cfn=(1336)
calls=78 0 
* 8480
* 78
* 234
+3 234
+3 546
cob=(3)
cfi=(3)
cfn=(1336)
calls=78 0 
* 8424
* 78
* 156
+3 390
cfi=(13)
cfn=(798)
calls=78 772 
* 8502
* 78
+1 468
cob=(3)
cfi=(3)
cfn=(1336)
calls=78 0 
* 8513
* 78
* 234
+3 234
+3 702
+2 858
cfi=(13)
cfn=(2156)
calls=78 815 
* 41957
-1 234
+6 188
+1 9
+22 18
+1 18
+1 18
+1 18
+1 18
+1 18
+1 18
+1 18
+1 18
+1 18
+1 18
+1 18
+1 18
+1 18
+1 18
+5 18
+1 36
-20 232
+1 232
+1 232
+1 232
+1 232
+1 232
+1 232
+1 232
+1 232
+1 232
+1 232
+1 232
+1 232
+1 232
+1 232
+5 232
+1 464
+1 66
+2 206
+1 206
+1 206
+1 206
+1 206
+1 206
+1 206
+1 206
+1 206
+1 206
+1 206
+1 206
+1 206
+1 206
+1 206
+1 206
+1 206
+1 206
+1 206
+1 927
-18 44
+1 44
+1 44
+1 44
+1 44
+1 44
+1 44
+1 44
+1 44
+1 44
+1 44
+1 44
+1 44
+1 44
+1 44
+1 44
+1 44
+1 44
+1 3448
+7 375
cfi=(159)
cfn=(2930) RelationInitLockInfo
calls=125 69 
* 2125
+1 375
cfn=(2932) RelationInitPhysicalAddr
calls=125 1255 
* 12798
5365 125
5637 125
+16 4
+14 4
+16 4
+2 1625
cfi=(31)
cfn=(836)
calls=125 910 
* 41835
* 1500
-2 506
+5 6
cfi=(13)
cfn=(952)
calls=2 1032 
* 170
+1 6
cfi=(25)
cfn=(1374)
calls=2 2385 
* 1046
+2 4
+1 2
+2 1
+1 4
+12 8

fn=(3096)
1983 33208
+2 41510
+1 24906
+1 41510
cfi=(164)
cfn=(3098) ResourceOwnerForgetRelationRef
calls=8302 1072 
* 581140
+1 16604

fn=(3864)
2556 12
+1 12
+1 6
-1 6
+21 15
+2 15
cfn=(3866)
calls=3 2313 
* 921
+2 6

fn=(3868)
2155 20
+7 15
cfn=(2932)
calls=5 1255 
* 485
+3 10
+8 5
cfi=(26)
cfn=(986)
calls=5 333 
* 50
* 23
+1 3
+2 10
+17 6
+9 4
+2 12
cfn=(3538)
calls=2 310 
* 62446
* 2
+2 16
+1 14
cob=(3)
cfi=(3)
cfn=(856)
calls=2 0 
* 119
* 2
+1 6
cfi=(190)
cfn=(3562)
calls=2 1341 
* 188
+6 4
+3 10

fn=(3869)
2155 4
+7 3
cfn=(2932)
calls=1 1255 
* 75
+3 2
+8 1
cfi=(26)
cfn=(986)
calls=1 333 
* 10
* 7
+3 5
+17 3
+9 2
+2 6
cfn=(3539)
calls=1 310 
* 20253
* 1
+2 8
+1 7
cob=(3)
cfi=(3)
cfn=(856)
calls=1 0 
* 79
* 1
+1 3
cfi=(190)
cfn=(3562)
calls=1 1341 
* 94
+6 2
+3 2

fn=(3066)
1904 14396
+9 21594
cfi=(31)
cfn=(836)
calls=3599 910 
* 764042
* 23687
+2 7198
+2 9291
cfn=(3076)
calls=3097 +53 
* 273142
+2 15485
+7 10
+1 6
-1 4
+4 8
cfn=(3866)
calls=2 2313 
* 63132
+12 6194
+7 2008
cfn=(3536) RelationBuildDesc
calls=502 1070 
* 36466849
* 502
+1 1004
+1 1506
cfn=(3076)
calls=502 +19 
* 44176
+1 502
+1 7198

fn=(3067)
1904 8092
+9 12138
cfi=(31)
cfn=(836)
calls=2023 910 
* 433935
* 14161
+2 4046
+2 6069
cfn=(3076)
calls=2023 +53 
* 178024
+2 10115
+7 5
+1 3
-1 2
+4 4
cfn=(3867)
calls=1 2313 
* 20588
+12 4046
+11 4046

fn=(3076)
1970 33208
+1 24906
cfi=(164)
cfn=(3078) ResourceOwnerEnlargeRelationRefs
calls=8302 1052 
* 191552
+1 41510
+1 24906
+1 41510
cfi=(164)
cfn=(3082) ResourceOwnerRememberRelationRef
calls=8302 1063 
* 356986
+1 16604

fn=(3536)
1070 3012
+9 2510
cfn=(3538)
calls=502 310 
* 12140322
* 502
+5 1004
+6 4016
+1 1506
+7 1506
cfn=(3544)
calls=502 380 
* 462557
* 502
+5 1506
+7 1004
+1 1004
+1 1004
+1 1004
+1 4020
+4 1004
+1 1004
+1 502
+37 1506
cfn=(3546) RelationBuildTupleDesc
calls=502 492 
* 13699186
+5 2510
+4 1004
+1 1004
+3 2510
+3 1004
+2 2510
+3 1004
+3 1004
+1 1004
+3 2510
+7 1004
+1 1004
+1 1004
+1 1004
+6 2510
+1 3
cfn=(3566)
calls=1 1342 
* 112787
+3 2510
cfn=(3554) RelationParseRelOptions
calls=502 435 
* 9716617
+5 1506
cfi=(159)
cfn=(2930)
calls=502 69 
* 8534
+5 1506
cfn=(2932)
calls=502 +40 
* 21618
+3 1004
+5 1506
cfi=(190)
cfn=(3562)
calls=502 1341 
* 47188
+14 1004
+1 4016
cfi=(31)
cfn=(836)
calls=502 910 
* 188255
* 3514
+3 1004
+2 502
+1 1004

fn=(3554)
435 2510
+4 1004
+6 5020
+7 501
+1 501
+3 4
+1 1
+10 1
cfn=(3556) GetPgClassDescriptor
calls=1 3894 
* 8
* 501
cfn=(3556)
calls=501 3894 
* 7071
* 3012
cfi=(199) /home/mithuncy/fsm_code/src/backend/access/common/reloptions.c
cfn=(3560) extractRelOptions
calls=502 1000 
* 9552613
* 502
+8 1004
+3 1500
-1 2500
cfi=(13)
cfn=(798)
calls=500 772 
* 60969
* 1000
+2 5000
cob=(3)
cfi=(3)
cfn=(856)
calls=500 0 
* 25391
* 500
+1 1500
cfi=(13)
cfn=(952)
calls=500 1032 
* 42500
* 500
+2 1004

fn=(3556)
3894 1004
+4 1506
+1 3
cfn=(3558)
calls=1 -35 
* 3059
* 1
+3 1
+1 2
-1 501
+1 1002

fn=(2932)
1255 2532
+1 3165
+1 126
+2 1836
+1 2532
+1 63
+2 1836
+2 3165
+12 594
cfi=(110)
cfn=(3000)
calls=594 2025 
* 4158
* 1188
+20 3564
+7 117
-1 234
cfi=(150)
cfn=(2934)
calls=39 160 
* 8366
-1 78
+3 156
+4 1266

fn=(3546)
492 2510
+7 502
+1 502
+1 502
+3 3012
+1 1506
+2 2008
cfi=(13)
cfn=(798)
calls=502 772 
* 45806
* 502
+2 1004
+10 1004
-3 4016
cfi=(178)
cfn=(3482)
calls=502 81 
* 57228
+4 4016
cfi=(178)
cfn=(3482)
calls=502 81 
* 57228
+10 1506
cfi=(171)
cfn=(3034)
calls=501 1307 
* 1387407
cfi=(171)
cfn=(3035)
calls=1 1307 
* 2503
* 502
+1 5020
cfi=(173)
cfn=(3127)
calls=1 322 
* 4209
cfi=(173)
cfn=(3126)
calls=501 322 
* 2508765
* 502
+9 2510
+2 502
+5 4040
+2 2020
+1 4040
+5 8080
cob=(3)
cfi=(3)
cfn=(856)
calls=505 0 
* 27593
* 505
+5 2020
+1 4
+3 2020
+14 2020
+50 505
+1 1010
+1 502
-88 1515
cfi=(173)
cfn=(3172)
calls=505 406 
* 6164662
* 1515
+94 1506
cfi=(173)
cfn=(3394)
calls=502 489 
* 1977183
+1 2008
cfi=(171)
cfn=(3092)
calls=502 1283 
* 1342511
+2 1004
+23 2510
+1 1506
+5 4012
+1 2505
+2 4
+2 2
+11 2
+2 3
+2 5
+9 2
-9 1
+13 1503
cfi=(13)
cfn=(952)
calls=501 1032 
* 42585
+1 1503
+2 2008

fl=(180)
fn=(3236)
170 181590
+12 72636
-5 326862
+7 72636
+1 72636

fn=(3260)
190 6008
+2 7510
+6 1502
+1 3004

fl=(198) /home/mithuncy/fsm_code/src/backend/utils/adt/int.c
fn=(5356) int4in
265 350000
+1 262500
+2 262500
cfi=(298)
cfn=(5358)
calls=87500 -68 
* 26748000
* 87500
+1 175000

fn=(3550) int2gt
464 1515
+1 1515
+1 1515
+2 2525
+1 1010

fn=(5160) int4out
276 2000
+1 1500
+1 1000
cfi=(13)
cfn=(940)
calls=500 925 
* 61500
* 500
+2 2500
cfi=(298)
cfn=(5162)
calls=500 +6 
* 62107
+1 500
+1 1000

fl=(246)
fn=(4420)
4767 60
+3 30
+4 15
cfi=(52)
cfn=(4006)
calls=15 3263 
* 405
+2 120
4954 6
cfn=(5038) _copyParam
calls=2 1407 
* 384
* 2
+1 2
+20 3
cfn=(5036) _copyOpExpr
calls=1 1550 
* 1699
* 1
+1 1
5126 27
cfn=(4426) _copyList
calls=9 4660 
* 30303
* 9
+1 9
+25 9
cfn=(4422) _copyRawStmt
calls=3 3036 
* 10456
* 3
+1 3
5657 15
+1 30

fn=(4421) copyObjectImpl'2
4767 1192
+3 596
+1 414
+3 91
cfi=(52)
cfn=(4006)
calls=91 3263 
* 2457
+2 728
+6 9
cfn=(4772) _copyPlannedStmt
calls=3 79 
* 9200
* 3
+1 3
+5 9
cfn=(4774) _copyResult
calls=3 155 
* 7640
* 3
+1 3
4951 39
cfn=(4520) _copyConst
calls=13 1369 
* 4717
* 13
+1 13
+2 12
cfn=(5038)
calls=4 1407 
* 768
* 4
+1 4
+14 9
cfn=(5034) _copyFuncExpr
calls=3 1513 
* 9190
* 3
+1 3
+5 9
cfn=(5036)
calls=3 1550 
* 4570
* 3
+1 3
+32 6
cfn=(5146) _copyCoerceViaIO
calls=2 1753 
* 880
* 2
+1 2
+65 27
cfn=(4518) _copyTargetEntry
calls=9 2117 
* 14673
* 9
+1 9
+8 18
cfn=(4516) _copyFromExpr
calls=6 2169 
* 1206
* 6
+1 6
+35 9
cfn=(4862) _copyValue
calls=3 4713 
* 1318
* 3
+1 3
+6 69
cfn=(4427) _copyList'2
calls=19 4660 
* 36276
cfn=(4426)
calls=4 4660 
* 9448
* 23
+1 23
+22 18
cfn=(4514) _copyQuery
calls=6 2991 
* 17719
* 6
+1 6
+14 9
cfn=(4424) _copySelectStmt
calls=3 3093 
* 9757
* 3
+1 3
5500 3
cfn=(4864) _copyAExpr
calls=1 2553 
* 2689
* 1
+1 1
+2 3
cfn=(4866) _copyColumnRef
calls=1 2567 
* 1203
* 1
+1 1
+5 12
cfn=(4430) _copyAConst
calls=4 2589 
* 1869
* 4
+1 4
+2 3
cfn=(4860) _copyFuncCall
calls=1 2620 
* 5031
* 1
+1 1
+14 9
cfn=(4428) _copyResTarget
calls=3 2681 
* 6895
* 3
+1 3
5657 91
+1 596

fn=(4516)
2169 24
+1 24
cfi=(13)
cfn=(2950)
calls=6 853 
* 918
* 30
+2 24
cfn=(4421)
calls=6 4767 
* 60
* 12
+1 24
cfn=(4421)
calls=6 4767 
* 60
* 12
+2 6
+1 12

fn=(4774)
155 12
+1 12
cfi=(13)
cfn=(2950)
calls=3 853 
* 690
* 15
+5 15
cfn=(4776) CopyPlanFields
calls=3 -45 
* 6839
+5 12
cfn=(4421)
calls=3 4767 
* 30
* 6
+2 3
+1 6

fn=(4422)
3036 12
+1 12
cfi=(13)
cfn=(2950)
calls=3 853 
* 459
* 15
+2 12
cfn=(4421)
calls=3 4767 
* 9907
* 6
+1 12
+1 12
+2 3
+1 6

fn=(4428)
2681 12
+1 12
cfi=(13)
cfn=(2950)
calls=3 853 
* 501
* 15
+2 21
+1 12
cfn=(4421)
calls=3 4767 
* 30
* 6
+1 12
cfn=(4421)
calls=3 4767 
* 6247
* 6
+1 12
+2 3
+1 6

fn=(4518)
2117 36
+1 36
cfi=(13)
cfn=(2950)
calls=9 853 
* 1566
* 45
+2 36
cfn=(4421)
calls=9 4767 
* 10960
* 18
+1 36
+1 72
cfi=(13)
cfn=(928)
calls=9 1162 
* 1670
* 27
+1 36
+1 36
+1 36
+1 36
+2 9
+1 18

fn=(4866)
2567 4
+1 4
cfi=(13)
cfn=(2950)
calls=1 853 
* 153
* 5
+2 4
cfn=(4421)
calls=1 4767 
* 1024
* 2
+1 4
+2 1
+1 2

fn=(5038)
1407 24
+1 24
cfi=(13)
cfn=(2156)
calls=6 815 
* 912
* 30
+2 24
+1 24
+1 24
+1 24
+1 24
+1 24
+2 6
+1 12

fn=(4776)
116 15
+1 12
+1 12
+1 12
+1 12
+1 12
+1 12
+1 12
+1 12
cfn=(4421)
calls=3 4767 
* 6428
* 6
+1 12
cfn=(4421)
calls=3 4767 
* 30
* 6
+1 12
cfn=(4421)
calls=3 4767 
* 30
* 6
+1 12
cfn=(4421)
calls=3 4767 
* 30
* 6
+1 12
cfn=(4421)
calls=3 4767 
* 30
* 6
+1 12
cfi=(279)
cfn=(4728)
calls=3 +5 
* 30
* 6
+1 12
cfi=(279)
cfn=(4728)
calls=3 +4 
* 30
* 6
+1 6

fn=(4424)
3093 12
+1 12
cfi=(13)
cfn=(2950)
calls=3 853 
* 774
* 15
+2 12
cfn=(4421)
calls=3 4767 
* 30
* 6
+1 12
cfn=(4421)
calls=3 4767 
* 30
* 6
+1 12
cfn=(4421)
calls=3 4767 
* 8173
* 6
+1 12
cfn=(4421)
calls=3 4767 
* 30
* 6
+1 12
cfn=(4421)
calls=3 4767 
* 30
* 6
+1 12
cfn=(4421)
calls=3 4767 
* 30
* 6
+1 12
cfn=(4421)
calls=3 4767 
* 30
* 6
+1 12
cfn=(4421)
calls=3 4767 
* 30
* 6
+1 12
cfn=(4421)
calls=3 4767 
* 30
* 6
+1 12
cfn=(4421)
calls=3 4767 
* 30
* 6
+1 12
cfn=(4421)
calls=3 4767 
* 30
* 6
+1 12
cfn=(4421)
calls=3 4767 
* 30
* 6
+1 12
cfn=(4421)
calls=3 4767 
* 30
* 6
+1 12
cfn=(4421)
calls=3 4767 
* 30
* 6
+1 12
+1 12
+1 12
cfn=(4421)
calls=3 4767 
* 30
* 6
+1 12
cfn=(4421)
calls=3 4767 
* 30
* 6
+2 3
+1 6

fn=(4862)
4713 12
+1 12
cfi=(13)
cfn=(2950)
calls=3 853 
* 438
* 15
+4 12
+1 18
+8 24
cfi=(13)
cfn=(928)
calls=3 1162 
* 766
* 9
+1 3
+9 3
+1 6

fn=(5034)
1513 12
+1 12
cfi=(13)
cfn=(2950)
calls=3 853 
* 522
* 15
+2 12
+1 12
+1 12
+1 12
+1 12
+1 12
+1 12
+1 12
cfn=(4421)
calls=3 4767 
* 8506
* 6
+1 12
+2 3
+1 6

fn=(5036)
1550 16
+1 16
cfi=(13)
cfn=(2950)
calls=4 853 
* 696
* 20
+2 16
+1 16
+1 16
+1 16
+1 16
+1 16
+1 16
cfn=(4421)
calls=4 4767 
* 5373
* 8
+1 16
+2 4
+1 8

fn=(4514)
2991 24
+1 24
cfi=(13)
cfn=(2950)
calls=6 853 
* 1926
* 30
+2 24
+1 24
+1 24
+1 24
+1 24
cfn=(4421)
calls=6 4767 
* 60
* 12
+1 24
+1 24
+1 24
+1 24
+1 24
+1 24
+1 24
+1 24
+1 24
+1 24
+1 24
cfn=(4421)
calls=6 4767 
* 60
* 12
+1 24
cfn=(4421)
calls=6 4767 
* 60
* 12
+1 24
cfn=(4421)
calls=6 4767 
* 1506
* 12
+1 24
cfn=(4421)
calls=6 4767 
* 12079
* 12
+1 24
+1 24
cfn=(4421)
calls=6 4767 
* 60
* 12
+1 24
cfn=(4421)
calls=6 4767 
* 60
* 12
+1 24
cfn=(4421)
calls=6 4767 
* 60
* 12
+1 24
cfn=(4421)
calls=6 4767 
* 60
* 12
+1 24
cfn=(4421)
calls=6 4767 
* 60
* 12
+1 24
cfn=(4421)
calls=6 4767 
* 60
* 12
+1 24
cfn=(4421)
calls=6 4767 
* 60
* 12
+1 24
cfn=(4421)
calls=6 4767 
* 60
* 12
+1 24
cfn=(4421)
calls=6 4767 
* 60
* 12
+1 24
cfn=(4421)
calls=6 4767 
* 60
* 12
+1 24
cfn=(4421)
calls=6 4767 
* 60
* 12
+1 24
cfn=(4421)
calls=6 4767 
* 60
* 12
+1 24
cfn=(4421)
calls=6 4767 
* 60
* 12
+1 24
cfn=(4421)
calls=6 4767 
* 60
* 12
+1 24
+1 24
+2 6
+1 12

fn=(4860)
2620 4
+1 4
cfi=(13)
cfn=(2950)
calls=1 853 
* 430
* 5
+2 4
cfn=(4421)
calls=1 4767 
* 786
* 2
+1 4
cfn=(4421)
calls=1 4767 
* 3719
* 2
+1 4
cfn=(4421)
calls=1 4767 
* 10
* 2
+1 4
cfn=(4421)
calls=1 4767 
* 10
* 2
+1 4
+1 4
+1 4
+1 4
+1 4
cfn=(4421)
calls=1 4767 
* 10
* 2
+1 4
+2 1
+1 2

fn=(4430)
2589 16
+1 16
cfi=(13)
cfn=(2950)
calls=4 853 
* 1312
* 20
+3 16
+1 28
+3 8
+1 2
+4 16
cfi=(13)
cfn=(928)
calls=2 1162 
* 399
* 6
+1 2
+10 16
+2 4
+1 8

fn=(4520)
1369 52
+1 52
cfi=(13)
cfn=(2950)
calls=13 853 
* 2619
* 65
+2 52
+1 52
+1 52
+1 52
+2 80
+6 30
+7 14
+1 14
-1 42
cfi=(257)
cfn=(4546)
calls=7 129 
* 1332
* 14
+5 28
+1 28
+1 28
+2 7
+1 14
-5 24
+1 24
+1 24
+2 6
+1 12

fn=(4426)
4660 65
+7 52
cfi=(13)
cfn=(2950)
calls=13 853 
* 1989
* 65
+1 52
+2 26
cfi=(13)
cfn=(940)
calls=13 925 
* 1599
* 117
cfn=(4421)
calls=13 +97 
* 34881
* 13
+1 39
+1 52
+2 13
+2 2
cfi=(13)
cfn=(940)
calls=1 925 
* 123
* 8
cfn=(4421)
calls=1 +91 
* 490
* 1
+1 3
+1 3
-4 28
+6 26
+1 39
+2 13
+1 52

fn=(4427)
4660 95
+7 76
cfi=(13)
cfn=(2950)
calls=19 853 
* 3229
* 95
+1 76
+2 38
cfi=(13)
cfn=(940)
calls=19 925 
* 2337
* 171
cfn=(4421)
calls=19 +97 
* 20333
* 19
+1 57
+1 76
+2 19
+2 14
cfi=(13)
cfn=(940)
calls=7 925 
* 861
* 56
cfn=(4421)
calls=7 +91 
* 8433
* 7
+1 21
+1 21
-4 52
+6 38
+1 57
+2 19
+1 76

fn=(4772)
79 12
+1 12
cfi=(13)
cfn=(2950)
calls=3 853 
* 732
* 15
+2 12
+1 12
+1 12
+1 12
+1 12
+1 12
+1 12
+1 12
+1 12
+1 12
cfn=(4421)
calls=3 4767 
* 7790
* 6
+1 12
cfn=(4421)
calls=3 4767 
* 30
* 6
+1 12
cfn=(4421)
calls=3 4767 
* 30
* 6
+1 12
cfn=(4421)
calls=3 4767 
* 30
* 6
+1 12
cfn=(4421)
calls=3 4767 
* 30
* 6
+1 12
cfi=(279)
cfn=(4728)
calls=3 +38 
* 30
* 6
+1 12
cfn=(4421)
calls=3 4767 
* 30
* 6
+1 12
cfn=(4421)
calls=3 4767 
* 30
* 6
+1 12
cfn=(4421)
calls=3 4767 
* 30
* 6
+1 12
cfn=(4421)
calls=3 4767 
* 30
* 6
+1 12
cfn=(4421)
calls=3 4767 
* 30
* 6
+1 12
+1 12
+2 3
+1 6

fn=(4864)
2553 4
+1 4
cfi=(13)
cfn=(2950)
calls=1 853 
* 167
* 5
+2 4
+1 4
cfn=(4421)
calls=1 4767 
* 786
* 2
+1 4
cfn=(4421)
calls=1 4767 
* 441
* 2
+1 4
cfn=(4421)
calls=1 4767 
* 1253
* 2
+1 4
+2 1
+1 2

fn=(5146)
1753 8
+1 8
cfi=(13)
cfn=(2950)
calls=2 853 
* 320
* 10
+2 8
cfn=(4421)
calls=2 4767 
* 484
* 4
+1 8
+1 8
+1 8
+1 8
+2 2
+1 4

fl=(49)
fn=(990)
652 12
+2 3
+1 6

fn=(988)
592 21
+5 3
cfi=(26)
cfn=(986)
calls=3 333 
* 30
* 6
+49 3
+1 12

fl=(158)
fn=(2928)
46 2592
+21 3888
-1 1944
cfi=(13)
cfn=(940)
calls=648 925 
* 81289
* 648
+6 1944
+1 1296
+1 1296
+1 1296
+1 1296
+2 648
+1 1296

fn=(3090)
151 80
+2 48
+3 64
cfn=(2928)
calls=16 46 
* 2368
* 16
+5 32
-2 64
+1 32
-1 80
cob=(3)
cfi=(3)
cfn=(856)
calls=16 0 
* 7891
* 16
+5 32
+2 32
cfi=(13)
cfn=(2546)
calls=16 956 
* 2706
* 16
+2 64
+2 128
+11 64
+17 128
+15 48
+4 64
+1 64
+2 16
+1 64

fn=(5516)
391 2000
+3 2500
cfi=(164)
cfn=(5518) ResourceOwnerForgetTupleDesc
calls=500 1161 
* 35000
+1 4500
+2 1000

fn=(4578)
602 30
+15 33
+2 6
+7 6
+2 12
+1 18
cfi=(187)
cfn=(4544)
calls=3 253 
* 290
+2 6
+1 6
+1 9
+2 9
+1 9
+2 6
+1 6
+1 6
+1 6
+1 6
+1 6
+1 6
+3 12
cfi=(151)
cfn=(3444)
calls=3 1114 
* 1026
* 3
+1 6
+2 24
+2 9
+1 12
+1 12
+1 12
+1 12
+1 12
+2 9
cfi=(151)
cfn=(3418)
calls=3 1161 
* 309
+1 6

fn=(4580)
763 18
+8 33
+1 6

fn=(5322)
373 2000
+3 1500
cfi=(164)
cfn=(5324) ResourceOwnerEnlargeTupleDescs
calls=500 1141 
* 11803
+1 2500
+1 2500
cfi=(164)
cfn=(5326) ResourceOwnerRememberTupleDesc
calls=500 1152 
* 21500
+1 1000

fl=(66)
fn=(1562)
1239 63
+1 42
+2 126
+1 21
+7 42

fn=(1572)
1263 42
+1 42
+2 126
+1 21
+7 42

fl=(303) /home/mithuncy/fsm_code/src/backend/utils/adt/arrayutils.c
fn=(5242) ArrayGetNItems
76 3000
+6 1000
+2 500
+1 1000
+5 4000
+6 5500
+2 1000
+1 2000
-14 3500
+21 1500
+5 500
+1 2000

fl=(209)
fn=(3712)
184 4
+5 2
+2 2
+1 2
+1 2
+1 4

fl=(252) /home/mithuncy/fsm_code/src/backend/rewrite/rewriteHandler.c
fn=(4508) fireRIRrules
1727 18
+1 9
+8 3
+1 15
cfi=(253)
cfn=(4510)
calls=3 90 
* 24
* 6
1865 12
cfi=(253)
cfn=(4506)
calls=3 78 
* 24
* 12
+12 12
+10 3
+1 12
cfi=(253)
cfn=(4506)
calls=3 78 
* 24
* 12
+95 3
+1 12

fn=(4502) QueryRewrite
3690 12
+1 9
+19 12
cfn=(4504) RewriteQuery
calls=3 3297 
* 1050
* 3
+9 3
+1 9
cfi=(253)
cfn=(4506)
calls=3 78 
* 30
* 6
+2 9
+2 12
cfn=(4508)
calls=3 1727 
* 201
* 3
+2 9
+2 15
cfi=(45)
cfn=(960)
calls=3 129 
* 870
* 3
-8 21
+27 9
+1 3
+1 3
+2 9
cfi=(253)
cfn=(4506)
calls=3 78 
* 30
* 6
+2 9
+2 12
+4 3
+2 3
-10 6
+23 12
+3 3
+1 6

fn=(4504)
3297 21
+1 9
+1 3
+1 3
+1 3
+1 3
+1 3
+8 12
cfi=(253)
cfn=(4506)
calls=3 78 
* 24
* 12
+63 6
3632 12
+2 12
+9 9
+3 15
cfi=(45)
cfn=(960)
calls=3 129 
* 870
* 3
+12 12
+17 3
+1 15

fl=(257)
fn=(4546)
129 7196
+3 2056
+1 1548
+1 1024
+3 14
+2 28
+18 105
+1 21
cfi=(13)
cfn=(940)
calls=7 925 
* 861
* 7
+1 42
cob=(3)
cfi=(3)
cfn=(856)
calls=7 0 
* 128
* 7
+1 21
+9 3030
cfn=(4548) datumGetSize
calls=505 62 
* 10605
* 505
+2 1515
cfi=(13)
cfn=(940)
calls=505 925 
* 62084
* 505
+1 3030
cob=(3)
cfi=(3)
cfn=(856)
calls=505 0 
* 12120
* 505
+1 1010
+2 505
+1 1010
-1 523
+1 1046

fn=(4548)
62 4040
+3 1010
+8 1010
+3 2020
+33 505
+1 2020

fl=(42)
fn=(958)
188 144
+1 36
+20 72

fn=(934)
222 344
+2 332
+1 160
+1 160
+1 160
+2 12
+1 80
+1 172

fn=(938) downcase_identifier
141 4144
+5 2590
cfi=(13)
cfn=(940)
calls=518 925 
* 63351
* 518
+1 518
cfi=(43)
cfn=(942)
calls=518 1834 
* 9324
* 1554
+11 1036
+2 35814
+2 21092
+1 48
+1 11989
+2 35814
-8 25430
+10 2590
+2 1036
+3 518
+1 1036

fn=(936)
132 3626
+1 3108
cfn=(938)
calls=518 +8 
* 218402
+1 1036

fl=(53)
fn=(1588)
4934 5
+2 2
cfi=(13)
cfn=(940)
calls=1 925 
* 123
* 1
+1 1
cfn=(1590) ReadControlFile
calls=1 4552 
* 4857
+1 2

fn=(2026) XLOGChooseNumBuffers
4874 2
+3 6
+1 7
+2 2
+2 1
+1 2

fn=(5658) XLogBytePosToRecPtr
1961 6
+7 12
+1 12
+2 4
+8 2
+1 2
+2 14
+1 22
+2 18
+3 14
+2 2
+1 4

fn=(5664) GetXLogBuffer
1850 4
+11 6
+12 12
+19 2
+1 7
+2 8
+1 3
+42 1
+7 3
+1 7
+5 4
+1 2

fn=(1610)
4834 5114
+2 10228
+1 5114

fn=(2880) InitXLOGAccess
8143 3
+1 2
+3 3
+4 3
+3 1
cfn=(2882) GetRedoRecPtr
calls=1 +15 
* 36
+2 8
+3 1
cfi=(147)
cfn=(2886) InitXLogInsert
calls=1 1029 
* 5871
+1 2

fn=(5638) XLogInsertAllowed
7991 4
+6 6
+1 4
+5 1
cfn=(2878)
calls=1 7896 
* 11
* 2
+7 1
+1 1
+1 4

fn=(1074)
2286 15
+1 6
+1 3
cfn=(1076) CalculateCheckpointSegments
calls=3 -31 
* 78
+1 6

fn=(1590)
4552 5
+9 3
cfi=(25)
cfn=(1592)
calls=1 921 
* 45
* 1
+2 2
+6 2
cfi=(68)
cfn=(1596)
calls=1 1239 
* 14
+1 6
cob=(5)
cfi=(5)
cfn=(684)
calls=1 0 
* 7
* 1
* 1
+1 2
+13 1
cfi=(68)
cfn=(1598)
calls=1 1263 
* 13
+2 3
cob=(5)
cfi=(5)
cfn=(692)
calls=1 0 
* 7
* 1
+9 4
+9 4
+9 1
+1 6
cfi=(69) /home/mithuncy/fsm_code/src/port/pg_crc32c_sse42_choose.c
cfn=(1600) pg_comp_crc32c_choose
calls=1 55 
* 612
* 1
+3 1
+2 4
+9 4
+7 4
+7 6
+5 4
+7 4
+7 4
+7 4
+7 4
+7 4
+7 4
+9 5
+16 5
+15 3
+2 15
+7 7
cfi=(17)
cfn=(462)
calls=1 203 
* 562
+1 5
cfi=(29)
cfn=(1206)
calls=1 7172 
* 1621
+4 12
+4 12
+5 5
-1 4
+4 1
cfn=(1076)
calls=1 2257 
* 26
+3 1
cfn=(1610)
calls=1 +76 
* 8
* 8
cfi=(29)
cfn=(1206)
calls=1 7172 
* 1763
+2 5

fn=(2882)
8169 3
+8 4
cfi=(146)
cfn=(2884)
calls=1 225 
* 14
* 2
+1 3
+1 2
+2 3
+1 2
+2 1
+1 2

fn=(5662) CopyXLogRecordToWAL
1475 9
+11 2
+1 3
cfn=(5664)
calls=1 1850 
* 59
* 1
+1 11
+9 1
+1 1
+2 6
+1 6
+2 8
+41 14
cob=(3)
cfi=(3)
cfn=(856)
calls=2 0 
* 30
* 2
+1 6
+1 6
+1 4
+1 4
+2 6
-52 6
+61 2
+47 4
+3 3
+2 2

fn=(1076)
2257 8
+17 44
+1 12
-1 8
+4 12
+2 12
+2 8

fn=(2474)
12232 2
+1 2
cob=(3)
cfi=(3)
cfn=(1972)
calls=1 0 
* 9
* 1
+1 2
cob=(3)
cfi=(3)
cfn=(1972)
calls=1 0 
* 9
* 1
+1 2

fn=(2682)
12243 6
+3 8
cfi=(9)
cfn=(490)
calls=2 0 
* 38
* 4
+1 8
cfi=(9)
cfn=(490)
calls=2 0 
* 38
-1 4
+4 2
+1 4

fn=(5646) GetFullPageWriteInfo
8197 4
+1 3
+1 3
+1 2

fn=(2024)
4945 6
+9 6
+4 1
cfn=(2026)
calls=1 -84 
* 20
* 8
cfi=(17)
cfn=(462)
calls=1 203 
* 472
+1 6
cfi=(29)
cfn=(1206)
calls=1 7172 
* 2192
+5 2
+3 6
cfi=(87)
cfn=(2000)
calls=2 493 
* 46
* 10
cfi=(87)
cfn=(2002)
calls=2 476 
* 42
* 2
+2 10
cfi=(87)
cfn=(2000)
calls=2 493 
* 46
* 10
cfi=(87)
cfn=(2002)
calls=2 476 
* 42
* 2
+2 8
cfi=(87)
cfn=(2002)
calls=2 476 
* 42
* 2
+2 10
cfi=(87)
cfn=(2000)
calls=2 493 
* 46
* 10
cfi=(87)
cfn=(2002)
calls=2 476 
* 42
* 2
+8 2
+1 4

fn=(5652) XLogInsertRecord
976 7
+1 2
+3 3
+1 4
+1 7
+4 2
+6 1
cfn=(5638)
calls=1 7991 
* 11
* 3
+35 3
+1 2
+3 1
cfn=(5654) WALInsertLockAcquire
calls=1 1618 
* 168
+18 5
+5 8
+2 3
+1 2
-1 2
+1 2
+16 2
+4 8
cfn=(5656) ReserveXLogInsertLocation
calls=1 1250 
* 238
+2 1
+3 2
+6 3
+1 6
cfi=(71)
cfn=(1608)
calls=1 23 
* 65
* 1
+1 1
+1 3
+6 9
cfn=(5662)
calls=1 1475 
* 196
+8 4
+2 5
+2 7
+15 1
cfn=(5666) WALInsertLockRelease
calls=1 1692 
* 219
+2 1
cfi=(26)
cfn=(5682)
calls=1 428 
* 10
+2 3
+5 7
+16 2
+78 2
+1 2
+2 1
+1 2

fn=(5654)
1618 3
+16 3
+1 8
+1 2
+6 8
cfi=(99)
cfn=(2170)
calls=1 1122 
* 137
* 1
+1 4
+12 2

fn=(5666)
1692 3
+1 3
+14 6
-1 9
cfi=(99)
cfn=(5668)
calls=1 +93 
* 196
+4 2

fn=(5688)
2643 4
+1 2
+3 4
cfi=(146)
cfn=(2884)
calls=1 225 
* 14
* 2
+1 5
+1 3
+1 4
+1 3
+1 2
+7 4
+15 4
+1 4
cfi=(122)
cfn=(2850)
calls=1 437 
* 31
+1 2

fn=(2190)
4986 3
+25 1
cfn=(2024)
calls=1 -66 
* 199
* 4
cfi=(87)
cfn=(2168)
calls=1 373 
* 839
-1 1
+3 2
+2 5
cfi=(87)
cfn=(2168)
calls=1 373 
* 980
-1 1
+3 6
+14 5
cob=(3)
cfi=(3)
cfn=(828)
calls=1 0 
* 72
* 1
+6 2
+2 6
cob=(3)
cfi=(3)
cfn=(856)
calls=1 0 
* 81
* 1
+1 3
cfi=(13)
cfn=(952)
calls=1 1032 
* 85
+8 3
+1 3
+1 8
cob=(3)
cfi=(3)
cfn=(828)
calls=1 0 
* 464
* 1
+1 4
+5 3
-1 3
+2 5
+2 1
+2 3
cfi=(99)
cfn=(2158)
calls=1 603 
* 17
+1 2
+2 64
cfi=(99)
cfn=(2144)
calls=8 678 
* 512
+1 48
+1 48
-4 26
+12 4
+1 3
+1 9
cob=(3)
cfi=(3)
cfn=(828)
calls=1 0 
* 458768
* 1
+6 4
+1 2
+1 2
+1 2
+2 2
+1 2
+1 2
+1 4
cfi=(122)
cfn=(2192)
calls=1 261 
* 11
+1 2

fn=(2878)
7896 32061
+6 42748
+1 21372
+7 2
+2 3
+8 4
+7 1
+1 1
cfn=(2880)
calls=1 8143 
* 5930
+9 1
+2 21374

fn=(5660) XLogBytePosToEndRecPtr
2001 3
+7 6
+1 6
+2 2
+11 1
+1 1
+2 7
+1 11
+2 2
+3 9
+3 7
+2 1
+1 2

fn=(1198)
4890 12
+4 8
+6 3
+1 2
+13 4
+3 1
+1 4

fn=(5656)
1250 7
+1 2
+5 4
+15 3
cfi=(146)
cfn=(2884)
calls=1 225 
* 14
* 2
+2 3
+1 5
+1 3
+1 3
+1 3
+2 2
+2 3
cfn=(5658)
calls=1 1961 
* 56
* 2
+1 3
cfn=(5660)
calls=1 2001 
* 58
* 2
+1 3
cfn=(5658)
calls=1 1961 
* 56
* 2
+9 2

fn=(1204)
10087 6
+1 3
+21 4

fl=(247)
fn=(4468)
2455 48
+1 4
+2 4
+2 4
+1 4
+7 20
cfn=(4470) flatten_grouping_sets
calls=4 2077 
* 164
* 4
+10 20
+7 12
cfi=(222)
cfn=(4336)
calls=4 78 
* 32
* 16
+50 8
+1 12
+2 4
+1 16

fn=(4472)
1713 56
+3 16
+1 16
+10 16

fn=(4438)
120 20
+12 12
cfi=(222)
cfn=(4336)
calls=4 -54 
* 32
* 16
+27 24
cfn=(4440) setNamespaceLateralState
calls=4 1663 
* 100
+1 8

fn=(4470)
2077 28
+2 4
cfi=(52)
cfn=(4006)
calls=4 3263 
* 108
+2 8
+1 8
+83 8

fn=(4440)
1663 32
+3 12
cfi=(222)
cfn=(4336)
calls=4 78 
* 32
* 16
+7 8

fn=(4466)
2557 36
+1 4
+3 12
cfi=(222)
cfn=(4336)
calls=4 78 
* 32
* 16
+16 4
+1 8

fn=(4474)
2588 36
+1 4
+1 4
+3 12
cfi=(222)
cfn=(4336)
calls=4 78 
* 32
* 16
2784 4
+1 24

fn=(4464)
1686 56
+3 16
+1 16
+7 16

fl=(288) /home/mithuncy/fsm_code/src/backend/parser/parse_func.c
fn=(4980) make_fn_arguments
1823 21
+2 3
+2 9
cfi=(222)
cfn=(4336)
calls=3 78 
* 30
* 6
+3 84
+2 12
+6 16
+18 20
-3 4
+2 20
-2 36
cfi=(289)
cfn=(4982)
calls=4 159 
* 3450
* 4
+7 12
+3 4
-36 20
+36 2
-36 16
+38 6

fn=(5016) ParseFuncOrColumn
80 13
+1 3
+1 6
+1 1
+1 9
+1 9
+1 9
+1 9
+1 6
+6 1
+12 1
+6 6
+11 3
cfi=(222)
cfn=(4876)
calls=1 -33 
* 10
* 2
+20 1
+1 3
cfi=(222)
cfn=(4336)
calls=1 -66 
* 10
* 2
+2 6
+1 6
cfi=(250)
cfn=(4478)
calls=2 43 
* 48
* 2
+2 6
+2 4
+7 12
-14 10
+25 1
+1 3
cfi=(222)
cfn=(4336)
calls=1 -92 
* 10
* 2
+2 6
+2 8
+19 4
-23 12
+31 2
+2 3
cfi=(222)
cfn=(4336)
calls=1 78 
* 10
* 2
+15 3
-4 2
+11 2
+30 6
cfi=(226)
cfn=(4992)
calls=1 147 
* 24
+7 5
-3 1
-2 23
cfn=(5018) func_get_detail
calls=1 1390 
* 63273
* 1
+7 3
cfi=(226)
cfn=(5010)
calls=1 162 
* 8
+7 2
+14 2
+10 2
+8 2
+7 2
+6 2
+6 2
+6 2
+6 2
+11 2
631 2
+1 3
cfi=(222)
cfn=(4336)
calls=1 78 
* 8
* 4
+22 7
cfi=(289)
cfn=(4978)
calls=1 1677 
* 103
* 1
+7 6
cfn=(4980)
calls=1 1823 
* 1847
+7 3
+10 6
+36 7
+13 3
+4 2
+2 4
cfi=(13)
cfn=(2950)
calls=1 853 
* 174
* 5
+2 3
+1 3
+1 3
+1 3
+1 2
+2 3
+1 3
+2 2
-12 1
883 3
+3 1
+1 6

fn=(5018)
1390 12
+8 2
+1 2
+1 2
+1 2
+1 2
+1 2
+1 2
+1 2
+3 9
cfi=(55)
cfn=(5020)
calls=1 925 
* 40403
* 1
+8 3
+4 9
cob=(3)
cfi=(3)
cfn=(3074)
calls=1 0 
* 25
* 1
* 2
-2 3
-2 4
+8 2
+41 2
+59 2
+5 6
cfn=(4946) func_match_argtypes
calls=1 908 
* 120
* 1
+6 2
+1 3
+21 2
+11 4
+8 2
+4 4
+1 4
+1 4
+7 4
+16 2
-1 4
cfi=(151)
cfn=(3444)
calls=1 1114 
* 22471
* 1
+2 2
+3 8
+1 4
+1 4
+1 4
+2 6
+68 5
+6 1
+1 1
+13 3
cfi=(151)
cfn=(3418)
calls=1 1161 
* 103
+1 2
+4 2

fn=(4968) func_select_candidate
992 7
+19 2
+21 1
+1 2
+2 16
+1 8
cfi=(275)
cfn=(4936)
calls=1 2267 
* 488
* 4
+4 3
+1 1
-8 11
+16 1
+1 1
+1 1
+1 3
+4 6
+1 2
+1 4
+2 20
+1 18
-1 4
-2 22
+8 10
+2 2
+1 2
+1 2
+1 2
+3 3
+2 3
+1 2
+1 1
-24 3
-2 2
+2 3
-2 4
+31 2
+1 2
+2 2
+10 2
+1 10
cfi=(289)
cfn=(4970)
calls=2 2082 
* 22900
* 6
-1 11
+2 1
+1 1
+1 1
+1 3
+4 6
+1 2
+1 4
+2 20
+2 22
+1 26
cfi=(289)
cfn=(4974)
calls=2 2101 
* 44601
-1 4
-4 22
+10 10
+2 2
+1 2
+1 2
+1 2
+2 3
+2 3
+1 2
+1 1
-25 3
-2 2
+2 3
-2 4
+31 2
+1 2
+2 2
+9 2
+22 1
+1 2
+4 10
+1 1
+1 1
+1 3
+1 3
+1 1
+1 3
+4 6
+1 14
+1 12
cfi=(275)
cfn=(4972)
calls=2 2446 
* 22636
+3 10
+3 4
+1 5
+2 6
+8 3
+11 1
-32 3
-2 2
+2 3
-2 4
+38 7
-48 11
+56 2
+3 1
+1 2
+1 1
+1 3
+4 2
+2 6
+1 4
+2 15
+1 1
+1 14
+1 12
cfi=(275)
cfn=(4972)
calls=2 2446 
* 958
+3 12
+2 1
+1 1
+2 9
-13 14
+19 4
+3 2
+1 2
+5 2
+1 5
-34 6
-2 6
+43 2
+2 2
+2 2
+3 2
+1 2
+61 4

fn=(4946)
908 14
+3 2
+2 4
+2 6
+4 36
+1 84
cfi=(289)
cfn=(4948)
calls=12 545 
* 271714
* 24
+3 12
+1 9
+1 3
-8 6
-2 6
+2 18
-2 22
+14 2
+1 4

fl=(112)
fn=(2296)
136 3
+5 5
cfi=(87)
cfn=(2168)
calls=1 373 
* 1251
-1 1
+5 4
+5 4
+1 4
+2 2
+2 140
+7 40
+1 40
+1 40
+1 40
+3 193
-1 2
+3 2
-3 38
+3 191
-1 2
-16 3
+16 38
-16 59
+22 2

fn=(2078)
127 2
+1 1
+1 2

fl=(174)
fn=(3128)
4029 10216
+1 7662
+1 12770
cfi=(45)
cfn=(3130)
calls=2554 506 
* 58742
-1 10216
+2 5108

fl=(220)
fn=(3920)
54 4040
+1 4040
cfi=(13)
cfn=(2950)
calls=1010 853 
* 147460
* 5050
+2 2020
+1 3030
+1 1010
+1 2020

fl=(283)
fn=(4840) CheckExprStillValid
1765 15
+1 3
+5 9
+1 9
+1 9
+2 6
+2 63
+2 45
cfn=(4842) ExecEvalStepOp
calls=9 2167 
* 1245
* 54
+26 9
-30 57
+33 6

fn=(4844) ExecJustConst
2004 10
+1 6
+2 8
+1 4
+1 4

fn=(4820) ExecReadyInterpretedExpr
169 12
+2 3
cfn=(4822) ExecInitInterpreter
calls=3 2133 
* 29172
+11 18
+9 6
+10 18
+7 12
+49 12
+1 6
-1 4
+3 4
+1 2
+12 2
+2 35
+2 45
-4 29
+7 6
+4 2
+1 6

fn=(4842)
2167 45
+2 54
+5 15
+1 35
cob=(3)
cfi=(3)
cfn=(284)
calls=5 0 
* 1045
* 5
* 5
+6 15
+3 8
+1 18

fn=(4822)
2133 9
+3 9
+5 4
cfn=(4824) ExecInterpExpr
calls=1 299 
* 18
-1 1
+4 2
+2 946
+1 516
-3 260
+7 5
cfi=(36)
cfn=(864)
calls=1 114 
* 27396
+6 6

fn=(4824)
299 3507
403 2505
+1 2
+6 1500
+1 1500
+1 1500
+1 1500
+1 1500
+3 4000
+7 500
620 1500
+3 1000
+1 2500
cfi=(41)
cfn=(5168)
calls=500 5304 
* 2505625
* 500
+1 2000
+1 2500
+2 2000
+5 1500
+1 1500
+5 1000
+2 7000
-2 7000
+8 1000
+1 2500
cfi=(41)
cfn=(5164)
calls=500 +35 
* 150802
* 500
+1 2000
+1 2500
+3 2000
976 3500
cob=(12)
cfi=(244)
cfn=(5158) plpgsql_param_eval_var
calls=500 6429 
* 17500
+1 2000
+70 2500
+9 1500
+1 2500
+1 1000
+2 1000
+1 3000
cfi=(198)
cfn=(5160)
calls=500 276 
* 132607
* 500
+7 4000
+5 1500
+1 1500
+1 2500
+3 1000
+1 3000
cfi=(41)
cfn=(5002)
calls=500 512 
* 96802
* 500
+1 2000
+15 2000
1734 2000
+1 1000
+1 2004

fn=(4826)
2116 2480
+1 1240
+1 1240
+2 3720
+1 764
+1 1428
+1 466
+1 5
+1 1240

fn=(4838) ExecInterpExprStillValid
1745 18
+5 15
cfn=(4840)
calls=3 +15 
* 1530
+3 15
+3 21
cfn=(4824)
calls=1 299 
* 6348
cfn=(4844)
calls=2 2004 
* 32
+1 6

fl=(48)
fn=(1168)
1165 7
+5 4
cfi=(13)
cfn=(928)
calls=1 -8 
* 143
* 1
+3 5
cfi=(41)
cfn=(932)
calls=1 3507 
* 45
* 3
+14 1
cfi=(26)
cfn=(986)
calls=1 333 
* 10
* 2
+74 3
cfi=(13)
cfn=(952)
calls=1 1032 
* 72
+1 3
cfi=(45)
cfn=(972)
calls=1 1137 
* 35
+2 1
+1 4

fn=(1170)
1270 5
+1 2
+9 2
+3 3
cfi=(25)
cfn=(1172)
calls=1 2650 
* 14
+1 2

fn=(984)
1070 7
+5 1
cfi=(26)
cfn=(986)
calls=1 333 
* 10
* 2
+25 1
+1 4

fl=(96)
fn=(2200)
192 3
+1 1
+2 2
-1 8
cfi=(93)
cfn=(2196)
calls=1 -27 
* 4802
+4 1
+1 2

fn=(5394)
325 4
+7 6
+2 1
+10 2

fn=(2036)
186 2
+1 3
cfi=(93)
cfn=(2020)
calls=1 -41 
* 52
+1 2

fl=(131)
fn=(2476)
1536 2
+1 2
cob=(3)
cfi=(3)
cfn=(1972)
calls=1 0 
* 9
* 1
+1 2

fn=(2478)
546 4
+4 4
+1 2
730 4

fl=(178)
fn=(3482)
81 13707
+1 3046
+1 4569
+1 4569
+1 3046
+1 3046
+1 4569
+1 9138
cfi=(161)
cfn=(2943) fmgr_info'2
calls=2 +37 
* 164
cfi=(161)
cfn=(2942)
calls=1521 +37 
* 124722
+1 3046

fn=(3190)
109 40730
+1 12219
+1 12219
+1 12219
+1 12219
+1 12219
+1 12219
+1 28511
cfi=(161)
cfn=(3192) fmgr_info_copy
calls=4073 612 
* 171066
+1 8146

fl=(183)
fn=(3290)
140 12024
+3 3006
+5 4
+4 10
cfi=(81)
cfn=(3292)
calls=2 47 
* 1499
* 4
+2 3002
+3 3002
+2 3002
+1 9000
cfi=(81)
cfn=(3292)
calls=1000 47 
* 1616135
* 2000
+4 3006
cfi=(81)
cfn=(3292)
calls=501 47 
* 620217
* 1002
+42 1503
+1 3006

fn=(3494) GetDatabasePath
108 5
+1 2
+6 2
+3 5
cfi=(81)
cfn=(3292)
calls=1 -71 
* 755
* 1
+8 2

fl=(264)
fn=(4658) list_length
90 9
+1 9
+1 6

fn=(4648)
78 18
+1 18
+1 12
-2 9
+1 9
+1 6
-2 9
+1 9
+1 6

fl=(267)
fn=(4678)
56 21
+1 9
+8 15
+3 9
cfi=(268)
cfn=(4680)
calls=3 1121 
* 2943
* 3
+8 15
+2 21
cfi=(262)
cfn=(4684)
calls=3 1089 
* 57
-1 6
+7 9
-1 6
-1 12
cfi=(270)
cfn=(4686) create_result_path
calls=3 1441 
* 786
* 3
-1 12
cfi=(270)
cfn=(4688)
calls=3 423 
* 1020
+6 9
cfi=(270)
cfn=(4692)
calls=3 245 
* 1092
+6 6
+1 18
cfi=(261)
cfn=(4694)
calls=3 3442 
* 336
+2 6
243 6

fl=(51)
fn=(1026)
78 6
+1 8
+1 4

fl=(87)
fn=(2162)
322 56
+11 21
cfi=(31)
cfn=(2164) hash_select_dirsize
calls=7 780 
* 1164
* 42
+1 14
+1 7
+3 35
cfi=(31)
cfn=(2166) hash_get_shared_size
calls=7 804 
* 70
* 42
cfn=(2168)
calls=7 +35 
* 6821
* 7
+8 21
+4 21
+2 42
cfi=(31)
cfn=(794)
calls=7 -35 
* 691873
+1 14

fn=(2132)
113 3
+1 2
+9 2
cfn=(2130) ShmemAllocUnlocked
calls=1 228 
* 32
* 1
+2 2
+8 6
-1 1
+2 7
+3 2
+1 1
+7 2
cfn=(2134)
calls=1 +13 
* 67
-1 1
+2 5
cob=(3)
cfi=(3)
cfn=(828)
calls=1 0 
* 16
* 1
+1 2

fn=(2160)
273 3
+12 1
+1 1
+1 1
+2 8
cfn=(2162)
calls=1 +33 
* 3234
* 1
+3 2

fn=(2168)
373 364
+4 260
cfi=(99)
cfn=(2170)
calls=52 1122 
* 7124
+2 156
+2 2
+5 3
+18 3
cfn=(2134)
calls=1 158 
* 67
* 1
+1 3
+1 2
+2 4
cfi=(99)
cfn=(2182)
calls=1 1726 
* 91
+1 2
+5 51
-1 306
cfi=(31)
cfn=(836)
calls=51 910 
* 37238
* 51
+3 102
+9 204
+20 153
cfn=(2136) ShmemAllocNoError
calls=51 177 
* 2601
* 51
+1 102
+11 153
+1 153
+3 204
cfi=(99)
cfn=(2182)
calls=51 1726 
* 4641
+6 51
+1 208

fn=(2000)
493 636
+3 408
+1 16
+1 294
+2 490
+4 98
+1 424

fn=(2002)
476 912
+3 608
+2 912
+4 152
+1 608

fn=(2136)
177 2008
+16 2008
+4 1506
cfi=(116)
cfn=(2138)
calls=502 +28 
* 7028
* 1004
+2 1506
+2 2008
+1 2008
+2 2008
+1 2008
+5 1004
+5 502
+1 1004

fn=(2126)
98 3
+1 2
+2 2
+1 2
+1 5
+1 2

fn=(2134)
158 40
+3 24
cfn=(2136)
calls=8 +16 
* 408
* 8
+1 16
+5 8
+1 32

fn=(2130)
228 10
+8 8
+4 6
+2 8
+1 8
+5 6
+2 8
+4 2
+1 8

fl=(119)
fn=(2152)
30 99738
+1 199476
+1 66492
-2 60
+1 120
+1 40

fl=(153)
fn=(3452)
386 10490
+2 8392
+1 2097
+2 3
cfn=(5562)
calls=1 -32 
* 15
+1 5
cfn=(3386)
calls=1 -91 
* 25
+3 4196

fn=(2902)
575 308
+1 308
+1 231
+3 154

fn=(3388) dlist_init
279 3444
+1 8036
+1 2296

fn=(5562)
359 3084
+1 5140
+1 5140
+1 2056
-3 9
+1 15
+1 15
+1 6

fn=(2900)
555 3
+1 2
+1 2

fn=(3386)
301 12910
+1 10328
+1 3444
cfn=(3388)
calls=1148 -24 
* 13776
+2 10328
+1 7746
+1 10328
+1 7746
+3 5164

fn=(4598)
318 15
+1 12
+3 9
+1 12
+1 12
+1 9
+3 6

fl=(218) /home/mithuncy/fsm_code/src/backend/parser/gram.c
fn=(3904) base_yyparse
24993 3556
+17 1016
+40 508
+17 508
+2 2032
+1 2032
+1 2032
+1 508
+4 508
+1 508
+1 508
+1 508
+1 1524
+1 508
+8 12757
+3 51028
+2 89299
-2 2032
+2 3556
+68 26530
+1 508
45285 508
+1 508
25165 12757
+11 51028
+1 25514
+1 5101
+5 15312
+3 21270
cfi=(214) /home/mithuncy/fsm_code/src/backend/parser/parser.c
cfn=(3906) base_yylex
calls=3545 84 
* 3535710
* 3545
+3 15312
+2 6368
+5 54576
+6 12128
+1 12128
-1 3184
+1 64432
+2 17740
+1 7096
+2 6
+2 3
+1 3
+5 7090
+7 3545
+2 7090
+2 14180
+2 14180
+1 3545
+7 46045
+1 18418
+2 9209
+8 46045
+10 73672
+3 18418
-13 15
+10 24
+3 75718
+2 46057
fi=(217)
786 2540
fe=(218)
25271 508
fi=(217)
802 5
+3 8
cfi=(222)
cfn=(3930)
calls=1 84 
* 10
* 4
cfn=(3932)
calls=1 15471 
* 16
+2 4
+3 4
fe=(218)
25287 1
fi=(217)
814 2032
+1 2540
cfn=(3928)
calls=508 15459 
* 90424
* 1524
cfi=(45)
cfn=(1586)
calls=508 260 
* 147289
* 508
fe=(218)
25298 508
fi=(217)
946 1
fe=(218)
25304 1
fi=(217)
2967 2000
cfi=(13)
cfn=(2950)
calls=500 853 
* 90500
* 2500
+1 2500
+1 1000
+1 2500
+1 2500
+1 2500
+1 2500
+2 2000
+6 1000
+2 2500
+2 2500
+2 2000
+1 3500
cfi=(45)
cfn=(5208)
calls=500 322 
* 5500
* 1000
+1 1000
fe=(218)
28020 500
fi=(217)
3013 500
fe=(218)
28049 500
fi=(217)
3019 500
fe=(218)
28067 500
fi=(217)
3028 1500
fe=(218)
28073 500
fi=(217)
3033 1500
fe=(218)
28091 500
fi=(217)
3039 4000
cfi=(45)
cfn=(960)
calls=500 129 
* 145000
* 500
fe=(218)
28103 500
fi=(217)
3040 500
fe=(218)
28109 500
fi=(217)
3062 2000
cfi=(220)
cfn=(3920)
calls=500 54 
* 83500
* 2000
cfi=(221)
cfn=(3922)
calls=500 546 
* 99000
* 500
fe=(218)
28149 500
fi=(217)
3105 500
fe=(218)
28227 500
fi=(217)
3113 500
fe=(218)
28241 500
fi=(217)
3766 500
fe=(218)
29139 500
fi=(217)
6323 4
cfi=(220)
cfn=(3920)
calls=1 54 
* 167
* 3
cfi=(45)
cfn=(1586)
calls=1 260 
* 290
* 1
fe=(218)
32771 1
fi=(217)
8176 4
cfi=(13)
cfn=(2950)
calls=1 853 
* 146
* 5
+1 4
+1 2
fe=(218)
35480 1
fi=(217)
8183 5
cfi=(45)
cfn=(1586)
calls=1 260 
* 290
* 1
fe=(218)
35486 1
fi=(217)
8190 6
cfi=(220)
cfn=(3920)
calls=1 54 
* 167
* 4
cfi=(221)
cfn=(3922)
calls=1 546 
* 198
* 1
fe=(218)
35500 1
fi=(217)
11182 21
fe=(218)
39478 7
fi=(217)
11273 28
cfi=(13)
cfn=(2950)
calls=7 853 
* 2355
* 35
+1 35
+1 35
+1 35
+1 35
+1 35
+1 35
+1 28
+1 14
fe=(218)
39589 7
fi=(217)
11400 7
fe=(218)
39750 7
fi=(217)
11481 7
fe=(218)
39891 7
fi=(217)
11486 2
fe=(218)
39903 2
fi=(217)
11638 7
fe=(218)
40113 7
fi=(217)
11690 7
fe=(218)
40199 7
fi=(217)
11763 7
fe=(218)
40315 7
fi=(217)
12200 7
fe=(218)
40903 7
fi=(217)
12426 4
+1 4
fe=(218)
41192 1
fi=(217)
12466 1
fe=(218)
41258 1
fi=(217)
12470 3
fe=(218)
41264 1
fi=(217)
12522 8
cfi=(220)
cfn=(3920)
calls=1 54 
* 167
* 3
cfi=(45)
cfn=(1586)
calls=1 260 
* 161
* 2
cfi=(221)
cfn=(5078)
calls=1 456 
* 206
* 1
+1 4
+1 4
fe=(218)
41351 1
fi=(217)
12529 1
fe=(218)
41363 1
fi=(217)
12901 42
fe=(218)
41883 14
fi=(217)
12903 11
cfn=(5080)
calls=1 15538 
* 187
* 1
fe=(218)
41889 1
fi=(217)
12957 45
cfi=(221)
cfn=(4338)
calls=3 33 
* 575
* 3
fe=(218)
42001 3
fi=(217)
13398 6
fe=(218)
42693 2
fi=(217)
13399 24
fe=(218)
42699 8
fi=(217)
13402 8
cfi=(13)
cfn=(2156)
calls=2 815 
* 306
* 10
+1 10
+1 8
+1 8
+8 4
fe=(218)
42718 2
fi=(217)
13452 6
fe=(218)
42768 2
fi=(217)
13552 24
cfi=(221)
cfn=(4340)
calls=2 585 
* 458
* 2
+1 10
+1 4
fe=(218)
42909 2
fi=(217)
13617 8
+9 10
+20 10
+1 8
+1 4
fe=(218)
43015 2
fi=(217)
13965 2
fe=(218)
43568 2
fi=(217)
13970 2
fe=(218)
43580 2
fi=(217)
13979 7
fe=(218)
43592 7
fi=(217)
14013 2
fe=(218)
43643 2
fi=(217)
14246 12
cfi=(220)
cfn=(3920)
calls=3 54 
* 501
* 9
cfi=(45)
cfn=(1586)
calls=3 260 
* 870
* 3
fe=(218)
44026 3
fi=(217)
14294 10
cfi=(45)
cfn=(1586)
calls=2 260 
* 580
* 2
fe=(218)
44104 2
fi=(217)
14298 16
cfi=(45)
cfn=(960)
calls=2 129 
* 326
* 2
fe=(218)
44112 2
fi=(217)
14304 12
fe=(218)
44120 4
fi=(217)
14518 16
cfn=(4334)
calls=2 15487 
* 1314
* 2
fe=(218)
44465 2
fi=(217)
14564 2
fe=(218)
44543 2
fi=(217)
14579 21
fe=(218)
44555 7
fi=(217)
14584 35
cfi=(45)
cfn=(1586)
calls=7 260 
* 2030
* 7
fe=(218)
44567 7
fi=(217)
14614 28
cfi=(13)
cfn=(2950)
calls=7 853 
* 1169
* 35
+1 14
+1 14
+1 28
+1 28
fe=(218)
44609 7
fi=(217)
14656 3500
cfi=(221)
cfn=(5206)
calls=500 422 
* 108000
* 500
fe=(218)
44645 500
fi=(217)
14700 3
fe=(218)
44710 1
fi=(217)
14715 8
cfi=(220)
cfn=(3920)
calls=2 54 
* 334
* 6
cfi=(45)
cfn=(1586)
calls=2 260 
* 580
* 2
fe=(218)
44728 2
fi=(217)
14729 28
cfn=(4318)
calls=4 15568 
* 740
* 4
fe=(218)
44745 4
fi=(217)
14737 28
cfn=(4332)
calls=4 15548 
* 740
* 4
fe=(218)
44761 4
fi=(217)
14822 12
fe=(218)
44888 4
fi=(217)
14823 1515
fe=(218)
44894 505
fi=(217)
14920 1506
fe=(218)
45012 502
fi=(217)
14927 9
fe=(218)
45030 3
fi=(217)
14944 4
cfi=(13)
cfn=(928)
calls=1 1162 
* 176
* 1
fe=(218)
45078 1
+22 1016
+15 15240
+1 1016
+3 4064
+1 4064
+6 5080
+2 10160
+1 2032
-14 122940
+1 8196
+3 32784
+1 32784
+6 40980
+2 81960
+1 71625
+1 20480
+4 4096
-2 30696
+2 5116
45306 1016
+10 7620
+2 508
+3 5080
-1 8128
cfn=(3934) yydestruct
calls=1016 24971 
* 11176
+2 3048
-4 4572
+7 1524
+7 508
+1 3048

fn=(3934)
24971 7112
+4 2032
+7 2032

fl=(265)
fn=(4656)
1474 12
+10 15
cfi=(264)
cfn=(4658)
calls=3 90 
* 24
* 3
+1 15
cfi=(264)
cfn=(4648)
calls=3 78 
* 24
* 3
+1 15
+7 6

fl=(276)
fn=(4714)
2987 15
+3 9
+6 12
+1 6
3717 6

fl=(286) /home/mithuncy/fsm_code/src/backend/parser/parse_oper.c
fn=(4914) find_oper_cache_entry
1078 8
+3 6
+5 118
+1 1
+1 1
+1 6
cfi=(31)
cfn=(794)
calls=1 317 
* 2725
* 1
+4 4
cfi=(155)
cfn=(2910)
calls=1 1410 
* 65
+3 4
cfi=(155)
cfn=(2910)
calls=1 1410 
* 65
+6 12
cfi=(31)
cfn=(836)
calls=2 910 
* 1333
* 2
+3 4
+1 4
+3 4

fn=(5012) oprid
246 6
+1 16
+1 4

fn=(4904) oper
379 20
+4 2
+1 2
+5 20
cfn=(4906) make_oper_cache_key
calls=2 1035 
* 800
* 2
+2 4
+2 6
cfn=(4914)
calls=2 1078 
* 4363
* 2
+1 6
+11 12
cfn=(4916) binary_oper_exact
calls=2 270 
* 62958
* 2
+1 6
+8 5
cfi=(55)
cfn=(4940)
calls=1 1568 
* 66688
* 1
+3 2
+8 2
+2 2
+2 2
+1 2
+1 6
cfn=(4944) oper_select_candidate
calls=1 323 
* 364092
* 1
+4 6
+1 10
cfi=(151)
cfn=(3444)
calls=2 1114 
* 52497
* 2
+2 4
+2 4
+1 10
cfn=(4976) make_oper_cache_entry
calls=2 1118 
* 3235
* 2
+5 2
+1 4

fn=(4976)
1118 10
+5 12
cfi=(31)
cfn=(836)
calls=2 910 
* 3201
* 2
+3 6
+1 4

fn=(4916)
270 12
+2 2
+3 6
+2 2
+1 2
+2 2
+6 12
cfi=(55)
cfn=(4918)
calls=2 1465 
* 62410
* 2
+1 4
+1 2
+2 2
+3 3
cfi=(275)
cfn=(4936)
calls=1 2267 
* 488
* 1
+2 3
+8 1
+1 4

fn=(4902) make_op
749 22
+13 4
+7 4
+10 6
cfi=(250)
cfn=(4478)
calls=2 43 
* 48
* 2
+1 6
cfi=(250)
cfn=(4478)
calls=2 43 
* 48
* 2
+1 18
cfn=(4904)
calls=2 379 
* 554784
* 2
+3 16
+3 8
+11 4
+8 4
+11 8
cfi=(45)
cfn=(1586)
calls=2 260 
* 518
* 10
cfi=(45)
cfn=(1586)
calls=2 260 
* 322
* 2
+1 4
+1 4
+1 6
+1 6
+1 2
+8 16
cfi=(289)
cfn=(4978)
calls=2 1677 
* 724
* 2
+7 12
cfi=(288)
cfn=(4980)
calls=2 1823 
* 1928
+3 8
cfi=(13)
cfn=(2950)
calls=2 +13 
* 317
* 10
+1 6
cfn=(5012)
calls=2 246 
* 26
* 4
+1 8
+1 6
+1 8
cfi=(275)
cfn=(5014) get_func_retset
calls=2 1499 
* 44994
* 4
+2 6
+1 6
+3 8
+7 6
cfi=(151)
cfn=(3418)
calls=2 1161 
* 206
+2 2
+1 10

fn=(4906)
1035 18
+5 12
cfi=(55)
cfn=(4908)
calls=2 2792 
* 110
+3 292
+3 12
cfi=(16)
cfn=(460)
calls=2 46 
* 132
+1 6
+1 6
+2 6
+12 10
cfi=(55)
cfn=(4912)
calls=2 4304 
* 186
* 4
+5 2
+1 4

fn=(4944)
323 7
+7 6
cfi=(288)
cfn=(4946)
calls=1 908 
* 271846
* 1
+4 2
+5 2
+10 6
cfi=(288)
cfn=(4968)
calls=1 992 
* 92210
* 1
+2 3
+2 4
+1 2
+5 2

fl=(52)
fn=(2812)
3730 8
+4 1
+1 1
+3 4
+3 1
+5 4
+6 7
cfn=(2814) process_postgres_switches
calls=1 3470 
* 155
+3 3
+11 4
+20 3
+4 3
cfi=(28)
cfn=(784)
calls=1 41 
* 174
+2 3
cfi=(28)
cfn=(784)
calls=1 41 
* 174
+1 3
cfi=(28)
cfn=(784)
calls=1 41 
* 174
+7 3
+1 3
cfi=(28)
cfn=(784)
calls=1 41 
* 174
* 1
+3 1
cfi=(138)
cfn=(2758)
calls=1 341 
* 653
+8 3
cfi=(28)
cfn=(784)
calls=1 41 
* 174
+1 3
cfi=(28)
cfn=(784)
calls=1 41 
* 174
+1 3
cfi=(28)
cfn=(784)
calls=1 41 
* 174
+1 3
cfi=(28)
cfn=(784)
calls=1 41 
* 174
+6 3
cfi=(28)
cfn=(784)
calls=1 41 
* 177
+4 1
cfi=(27)
cfn=(750)
calls=1 42 
* 359
+2 3
+3 3
cob=(3)
cfi=(3)
cfn=(768)
calls=1 0 
* 10
* 1
+3 4
cob=(3)
cfi=(3)
cfn=(774)
calls=1 0 
* 7
* 1
+2 4
+24 1
cfi=(75)
cfn=(2816) BaseInit
calls=1 547 
* 3453
+12 1
cfi=(84)
cfn=(2830)
calls=1 296 
* 3097
+4 4
cob=(3)
cfi=(3)
cfn=(774)
calls=1 0 
* 7
* 1
+9 8
cfi=(75)
cfn=(2866) InitPostgres
calls=1 589 
* 1546683
+9 3
+2 3
cfi=(13)
cfn=(1396)
calls=1 212 
* 1332
+1 1
+3 1
+6 1
cfi=(29)
cfn=(3734)
calls=1 5858 
* 17295
+6 6
+4 3
+7 1
cfi=(54)
cfn=(3750)
calls=1 1601 
* 52
+5 3
+4 4
cfi=(191)
cfn=(3430)
calls=1 88 
* 137
+1 6
cfi=(210)
cfn=(3752)
calls=1 146 
* 74
+1 6
cfi=(210)
cfn=(3752)
calls=1 146 
* 74
+1 3
cfi=(191)
cfn=(3436)
calls=1 299 
* 335
+5 3
+9 7
cfi=(14)
cfn=(432)
calls=1 395 
* 111
* 1
+10 7
cfi=(14)
cfn=(432)
calls=1 395 
* 111
* 1
+3 3
cfi=(211)
cfn=(3756)
calls=1 110 
* 10
+1 2
cfi=(80)
cfn=(1888)
calls=1 47 
* 154
+1 3
cfi=(211)
cfn=(3756)
calls=1 110 
* 10
+5 4
+25 4
cob=(3)
cfi=(3)
cfn=(370)
calls=1 0 
* 42
* 1
* 2
4101 2
+2 4
+1 1
+12 1
+6 3
cfi=(211)
cfn=(3756)
calls=1 110 
* 10
-6 1
+6 3
cfi=(211)
cfn=(3756)
calls=1 110 
* 10
+1 6
cfi=(13)
cfn=(3758)
calls=2 137 
* 210
+2 6
cfi=(80)
cfn=(1888)
calls=2 47 
* 308
+6 2
cfi=(110)
cfn=(3760)
calls=2 532 
* 14
+15 6
+2 2
cfi=(26)
cfn=(3762)
calls=2 353 
* 30
* 4
+13 2
cfi=(26)
cfn=(3764)
calls=2 4464 
* 24
* 4
+15 2
cfi=(113)
cfn=(3766) ProcessCompletedNotifies
calls=2 1102 
* 20
+1 4
cfi=(38)
cfn=(3768) pgstat_report_stat
calls=2 813 
* 103286
+2 6
cfi=(12)
cfn=(2802) set_ps_display
calls=2 332 
* 364
+1 6
cfi=(38)
cfn=(3786) pgstat_report_activity
calls=2 2991 
* 134
+3 6
cfi=(212)
cfn=(3790) ReadyForQuery
calls=2 251 
* 1652
+1 2
+9 2
+5 6
cfn=(3810) ReadCommand
calls=2 510 
* 88738
* 1
+11 3
+1 1
+5 2
+10 3
+10 3
+3 7
+7 1
cfi=(26)
cfn=(2958)
calls=1 734 
* 31
+2 3
cfi=(191)
cfn=(3836) pq_getmsgstring
calls=1 582 
* 2774
* 1
+1 3
cfi=(191)
cfn=(3846) pq_getmsgend
calls=1 638 
* 15
+2 3
+6 3
cfn=(3848) exec_simple_query
calls=1 985 
* 377802643
+2 1
+2 1
4483 1

fn=(3850) start_xact_command
2571 4
+1 8
+2 1
cfi=(26)
cfn=(2960)
calls=1 2697 
* 388607
+2 1
+10 1
cfn=(3876) enable_statement_timeout
calls=1 4698 
* 47
* 1
cfn=(3876)
calls=1 4698 
* 47
+1 4

fn=(1064)
3326 18
+1 15
+1 3
cfn=(1066)
calls=3 4517 
* 1357
* 3
+2 18
+7 3
+1 6

fn=(3878) drop_unnamed_stmt
2670 3
+2 3
+7 2

fn=(4008) stack_is_too_deep
3277 1514
+7 4542
+5 1514
+11 2271
+20 757
+1 1514

fn=(1066)
4517 15
+5 15
+4 4
cob=(1)
cfi=(1)
cfn=(223)
calls=1 0 
* 1310
* 5
* 2
+2 3
+3 4
+3 2
+2 1
+9 2
-9 4
+9 8

fn=(3806)
577 30
+1 6
cob=(5)
cfi=(5)
cfn=(472)
calls=6 0 
* 18
* 6
* 12
+2 18
+35 6
cob=(5)
cfi=(5)
cfn=(472)
calls=6 0 
* 18
* 6
* 12
+1 12

fn=(2414)
3210 2
+8 2
+4 2
+5 1
+1 2

fn=(3966)
947 3024
+1 504
+3 1512
cfi=(223)
cfn=(3942)
calls=504 78 
* 5040
* 1008
+2 1512
+3 2016
+3 2004
cfi=(13)
cfn=(2950)
calls=501 853 
* 122244
* 2505
+1 1002
+1 2004
+1 2004
+1 2004
+1 2505
+4 18
cfn=(4632) pg_plan_query
calls=3 862 
* 272170
* 3
+3 15
cfi=(45)
cfn=(960)
calls=3 129 
* 870
* 2505
cfi=(45)
cfn=(960)
calls=501 129 
* 145290
* 504
-20 3528
+23 504
+1 1008

fn=(5722) ProcessInterrupts
2973 6
+2 6
+2 1
+2 3
+2 1
+1 1
+1 1
cfi=(84)
cfn=(3680)
calls=1 696 
* 26
+2 3
+2 3
+4 1
cfi=(105)
cfn=(2834)
calls=1 3278 
* 5
* 2
+4 1
cfi=(319) /home/mithuncy/fsm_code/src/backend/replication/logical/worker.c
cfn=(5724) IsLogicalWorker
calls=1 1766 
* 7
* 2
+4 1
cfi=(72)
cfn=(5726)
calls=1 1088 
* 9
* 2
+11 3
+8 3
+11 6
cfi=(57)
cfn=(1548)
calls=1 232 
* 361
* 5
cfi=(57)
cfn=(1882)
calls=1 785 
* 789
* 3
cfi=(57)
cfn=(5728)
calls=1 571 
* 18
* 4
cfi=(57)
cfn=(1896)
calls=1 411 
* 84014

fn=(2794)
531 40
+1 8
cob=(5)
cfi=(5)
cfn=(472)
calls=8 0 
* 24
* 8
* 16
+2 24
+3 19
cfn=(5722)
calls=1 2973 
* 85287
+3 15
+4 15
+3 6
+16 7
cob=(5)
cfi=(5)
cfn=(472)
calls=7 0 
* 21
* 7
* 14
+1 14

fn=(2814)
3470 9
+1 3
+1 1
+4 2
+2 1
+3 2
+18 1
+8 7
cob=(3)
cfi=(3)
cfn=(1254)
calls=1 0 
* 106
* 1
* 3
3682 8
+3 5
+23 1
+4 5

fn=(3880)
633 2020
+5 1515
+3 1515
cfi=(214)
cfn=(3882) raw_parser
calls=505 37 
* 6391747
* 505
+2 1515
+24 505
+1 1010

fn=(4006)
3263 3028
+1 757
cfn=(4008)
calls=757 +13 
* 12112
* 1514
+9 3028

fn=(3810)
510 8
+3 6
+1 6
cfn=(3812) SocketBackend
calls=2 333 
* 88713
* 2
+3 1
+1 2

fn=(3848)
985 6
+1 2
+4 2
+1 1
+7 2
+2 4
cfi=(38)
cfn=(3786)
calls=1 2991 
* 250
+8 2
+10 1
cfn=(3850)
calls=1 2571 
* 388665
+8 1
cfn=(3878)
calls=1 2670 
* 8
+5 3
cfi=(211)
cfn=(3756)
calls=1 110 
* 10
* 1
+6 3
cfn=(3880)
calls=1 633 
* 8621
* 1
+3 3
cfn=(3938) check_log_statement
calls=1 2182 
* 11
* 2
+12 3
cfi=(211)
cfn=(3756)
calls=1 110 
* 10
+10 3
cfi=(223)
cfn=(3940)
calls=1 90 
* 10
* 3
+5 3
cfi=(223)
cfn=(3942)
calls=1 78 
* 10
* 2
+2 3
+1 1
+15 4
cfi=(224)
cfn=(3944)
calls=1 2083 
* 17
* 1
+2 4
cfi=(12)
cfn=(2802)
calls=1 332 
* 174
+2 5
cfi=(212)
cfn=(3946) BeginCommand
calls=1 104 
* 6
+10 1
cfi=(26)
cfn=(3762)
calls=1 353 
* 15
* 2
+9 1
cfn=(3850)
calls=1 2571 
* 56
+9 2
+4 3
+5 3
cfi=(225)
cfn=(3948)
calls=1 358 
* 18
* 2
+12 3
cfi=(211)
cfn=(3756)
calls=1 110 
* 10
* 1
+2 7
cfn=(3950)
calls=1 683 
* 1235
* 1
+3 5
cfn=(3966)
calls=1 947 
* 607
* 1
+4 2
+4 3
+6 4
cfi=(156)
cfn=(3968) CreatePortal
calls=1 176 
* 1897
* 1
+2 2
+7 9
cfi=(156)
cfn=(3972) PortalDefineQuery
calls=1 287 
* 27
+10 6
cfi=(227)
cfn=(3974) PortalStart
calls=1 445 
* 220
+8 1
+1 5
+13 5
cfi=(227)
cfn=(3980) PortalSetResultFormat
calls=1 625 
* 16
+5 3
cfi=(212)
cfn=(3982)
calls=1 114 
* 291
* 1
+1 2
+1 5
cfi=(228)
cfn=(3986)
calls=1 107 
* 15
+5 3
cfi=(211)
cfn=(3756)
calls=1 110 
* 10
+5 12
cfi=(227)
cfn=(3988) PortalRun
calls=1 689 
* 376458294
+8 5
cfi=(228)
cfn=(5612)
calls=1 558 
* 94
+2 4
cfi=(156)
cfn=(5614) PortalDrop
calls=1 466 
* 78816
+2 4
+11 2
+2 1
cfn=(5624) finish_xact_command
calls=1 2591 
* 862715
* 1
+25 5
cfi=(212)
cfn=(5708) EndCommand
calls=1 167 
* 270
1067 7
1273 1
cfn=(5624)
calls=1 2591 
* 15
+5 2
+6 5
cfn=(5710) check_log_duration
calls=1 2220 
* 18
* 5
+16 2
+5 1
+1 5

fn=(4632)
862 18
+4 12
+8 9
+4 18
cfi=(261)
cfn=(4634)
calls=3 268 
* 272083
* 3
+2 9
+49 9
+5 3
+1 6

fn=(5710)
2220 7
+1 6
+45 1
+1 4

fn=(3950)
683 4008
+9 1503
+3 4008
cfi=(225)
cfn=(3952)
calls=501 103 
* 443886
* 501
+3 1503
+6 1503
cfn=(3964) pg_rewrite_query
calls=501 +66 
* 159819
* 501
+4 501
+1 1002

fn=(5626) disable_statement_timeout
4719 4
+1 6
+6 4

fn=(1072)
3343 12
+1 12
+2 6
+1 6

fn=(3938)
2182 4
+3 3
+1 2
+14 2

fn=(4432)
722 24
+12 9
+3 6
cfi=(226)
cfn=(3954)
calls=3 45 
* 1038
* 3
+1 9
+1 9
+1 18
cob=(12)
cfi=(234) /home/mithuncy/fsm_code/src/pl/plpgsql/src/pl_comp.c
cfn=(4434) plpgsql_parser_setup
calls=3 1052 
* 54
+2 15
cfi=(225)
cfn=(3956)
calls=3 192 
* 605787
* 3
+2 9
+3 9
cfi=(226)
cfn=(3962)
calls=3 78 
* 318
+2 9
+6 9
cfn=(3964)
calls=3 +15 
* 2472
* 3
+4 3
+1 6

fn=(5720) die
2762 4
+1 1
cob=(5)
cfi=(5)
cfn=(472)
calls=1 0 
* 3
* 1
* 2
+3 4
+2 1
+1 1
+4 3
cfi=(122)
cfn=(2850)
calls=1 437 
* 49
+8 6
+3 1
cob=(5)
cfi=(5)
cfn=(472)
calls=1 0 
* 3
* 1
* 2
+1 2

fn=(3964)
770 2016
+3 1512
+4 1512
+3 2016
+3 2004
cfi=(45)
cfn=(1586)
calls=501 260 
* 145290
* 1002
+5 9
cfi=(252)
cfn=(4502)
calls=3 3690 
* 2391
* 3
+3 1512
+57 1512
+4 504
+1 1008

fn=(3812)
333 10
+6 6
+1 2
cfi=(58)
cfn=(2784)
calls=2 1211 
* 24
+1 2
cfi=(58)
cfn=(3814)
calls=2 1001 
* 88295
* 1
+2 2
+29 7
+3 1
+1 4
+24 1
+89 4
+2 4
cfi=(58)
cfn=(3834)
calls=1 1273 
* 340
* 2
+5 3
+2 1
+1 4

fn=(3876)
4698 4
+4 6
+9 6
cfi=(138)
cfn=(2804)
calls=2 526 
* 74
+1 4

fn=(5624)
2591 4
+2 2
cfn=(5626)
calls=2 4719 
* 14
+2 6
+2 1
cfi=(26)
cfn=(3620)
calls=1 2768 
* 862698
+13 1
+2 4

fl=(191)
fn=(3836)
582 5
+4 7
+7 3
cob=(3)
cfi=(3)
cfn=(424)
calls=1 0 
* 41
* 1
* 1
+1 8
+4 7
+2 5
cfi=(19)
cfn=(3838)
calls=1 -54 
* 2692
+1 4

fn=(3430)
88 96
+1 48
cfi=(80)
cfn=(1888)
calls=16 -42 
* 2061
+7 48
+1 32

fn=(3436)
299 64
+2 192
cfi=(58)
cfn=(3438)
calls=16 1561 
* 3718
+2 64
cfi=(13)
cfn=(952)
calls=16 1032 
* 1360
+1 32
+1 32

fn=(3738)
198 145
+1 87
cob=(3)
cfi=(3)
cfn=(424)
calls=29 0 
* 503
* 29
* 29
+3 145
cfi=(19)
cfn=(3740)
calls=29 624 
* 928
* 29
+1 87
+7 203
cfi=(80)
cfn=(3744) appendBinaryStringInfoNT
calls=29 +31 
* 2369
+1 58

fn=(3846)
638 5
+1 6
+4 4

fl=(36)
fn=(864)
114 63
+14 672
+1 32
-1 44
+1 88
+2 20
+1 45
+2 381
cfn=(872) swapfunc
calls=9 -47 
* 756
-1 66
-1 421
cfi=(151)
cfn=(2904) oid_compare
calls=13 1543 
* 252
cfi=(29)
cfn=(866)
calls=18 4918 
* 3824
* 62
-1 163
+4 4
+2 56
+1 280
+2 29930
cfi=(283)
cfn=(4826)
calls=108 2116 
* 1950
cfi=(151)
cfn=(2904)
calls=49 1543 
* 919
cfi=(29)
cfn=(866)
calls=2836 4918 
* 654117
* 5986
+2 51
+1 51
-5 26870
+8 112
+1 5
+1 357
+1 102
+2 100
+1 350
+1 100
+2 84
+2 273
cfn=(870) med3
calls=21 -51 
* 3582
* 21
+1 294
cfn=(870)
calls=21 -52 
* 3198
* 21
+1 336
cfn=(870)
calls=21 -53 
* 3927
* 21
+2 126
cfn=(870)
calls=21 -55 
* 2959
* 174
cfn=(870)
calls=29 -55 
* 8560
* 50
+2 588
cfn=(872)
calls=15 -76 
* 1228
+1 306
+1 459
+3 51
+2 3480
+2 40
cfn=(872)
calls=5 -85 
* 420
+1 10
+2 10
-7 15
+7 3470
-7 18624
cfi=(283)
cfn=(4826)
calls=44 2116 
* 798
cfi=(151)
cfn=(2904)
calls=251 1543 
* 4843
cfi=(29)
cfn=(866)
calls=1772 4918 
* 142373
* 6201
+9 339
+2 3774
+2 32
cfn=(872)
calls=4 -94 
* 336
+1 12
+2 12
-7 12
+7 5649
-7 19716
cfi=(283)
cfn=(4826)
calls=42 2116 
* 1008
cfi=(151)
cfn=(2904)
calls=301 1543 
* 5932
cfi=(29)
cfn=(866)
calls=1832 4918 
* 141191
* 6525
+9 1017
+1 51
+5 306
+1 510
+1 152
-6 3364
cfn=(872)
calls=76 87 
* 6384
+1 576
+1 864
+1 288
-23 288
+26 500
cfn=(872)
calls=50 87 
* 2676
+1 663
+1 142
cfn=(872)
calls=4 87 
* 336
+1 255
+1 255
+1 153
+3 102
+1 144
cfn=(865) pg_qsort'2
calls=16 -89 
* 251878
+1 102
+4 204
+1 136
+1 34
+6 51
+1 192
cfn=(865)
calls=16 114 
* 2618153
+1 51
+4 68
+1 17
+3 18

fn=(865)
114 938
+14 5454
+1 146
-1 405
+1 810
+2 635
+1 1044
+2 6576
cfn=(872)
calls=121 -47 
* 9876
-1 1095
-1 8079
cfi=(283)
cfn=(4826)
calls=18 2116 
* 378
cfi=(151)
cfn=(2904)
calls=179 1543 
* 3449
cfi=(29)
cfn=(866)
calls=397 4918 
* 79346
* 1188
-1 4021
+4 127
+2 351
+1 1755
+2 65930
cfi=(283)
cfn=(4826)
calls=146 2116 
* 2694
cfi=(151)
cfn=(2904)
calls=63 1543 
* 1224
cfi=(29)
cfn=(866)
calls=6384 4918 
* 1454144
* 13186
+2 344
+1 344
-5 58698
+8 702
+1 7
+1 2408
+1 688
+2 638
+1 2233
+1 638
+2 60
+2 195
cfn=(870)
calls=15 -51 
* 3487
* 15
+1 210
cfn=(870)
calls=15 -52 
* 2570
* 15
+1 240
cfn=(870)
calls=15 -53 
* 3454
* 15
+2 90
cfn=(870)
calls=15 -55 
* 2267
* 1824
cfn=(870)
calls=304 -55 
* 126094
* 319
+2 4242
cfn=(872)
calls=46 -76 
* 3512
+1 2064
+1 3096
+3 344
+2 1880
+2 32
cfn=(872)
calls=4 -85 
* 336
+1 8
+2 8
-7 12
+7 1872
-7 16428
cfi=(283)
cfn=(4826)
calls=54 2116 
* 1086
cfi=(151)
cfn=(2904)
calls=289 1543 
* 5606
cfi=(29)
cfn=(866)
calls=1469 4918 
* 203269
* 5436
+9 916
+2 11196
+2 120
cfn=(872)
calls=15 -94 
* 1260
+1 45
+2 45
-7 45
+7 16749
-7 56517
cfi=(283)
cfn=(4826)
calls=136 2116 
* 3216
cfi=(151)
cfn=(2904)
calls=305 1543 
* 5952
cfi=(29)
cfn=(866)
calls=5729 4918 
* 570796
* 18510
+9 2748
+1 344
+5 2064
+1 3440
+1 1031
-6 6881
cfn=(872)
calls=111 87 
* 9068
+1 1144
+1 1716
+1 572
-23 572
+26 3430
cfn=(872)
calls=343 87 
* 14130
+1 4472
+1 838
cfn=(872)
calls=15 87 
* 1260
+1 1720
+1 1720
+1 1032
+3 861
+1 459
cfn=(865)
calls=51 -89 
* 136876
+1 861
+4 1722
+1 1148
+1 287
+6 171
+1 612
cfn=(865)
calls=51 114 
* 1631422
+1 171
+4 228
+1 57
+3 268

fn=(870)
106 3339
+1 2862
cfi=(283)
cfn=(4826)
calls=18 2116 
* 324
cfi=(151)
cfn=(2904)
calls=61 1543 
* 1184
cfi=(29)
cfn=(866)
calls=398 4918 
* 35394
+2 954
-1 2400
cfi=(283)
cfn=(4826)
calls=18 2116 
* 372
cfi=(151)
cfn=(2904)
calls=33 1543 
* 648
cfi=(29)
cfn=(866)
calls=349 4918 
* 28318
* 2660
cfi=(283)
cfn=(4826)
calls=8 2116 
* 192
cfi=(151)
cfn=(2904)
calls=21 1543 
* 404
cfi=(29)
cfn=(866)
calls=281 4918 
* 65827
* 1420
+1 462
cfi=(151)
cfn=(2904)
calls=28 1543 
* 541
cfi=(29)
cfn=(866)
calls=49 4918 
* 5860
* 508
cfi=(151)
cfn=(2904)
calls=19 1543 
* 364
cfi=(29)
cfn=(866)
calls=40 4918 
* 4857
* 254
+1 954

fn=(872)
87 4908
+1 1636
+1 10072
+2 33326
+1 1636

fl=(109)
fn=(2284)
54 3
+4 1
cfn=(2070)
calls=1 -15 
* 33
* 4
cfi=(87)
cfn=(2168)
calls=1 373 
* 1005
-1 1
+3 4
+3 4
cfn=(2070)
calls=1 -20 
* 33
* 19
cob=(3)
cfi=(3)
cfn=(828)
calls=1 -63 
* 254
* 1
+1 2
+1 2
+1 2
+2 2

fn=(2070)
43 9
+1 3
+2 12
cfi=(87)
cfn=(2002)
calls=3 476 
* 63
* 3
+2 3
+1 6

fl=(194)
fn=(3470)
42 11034
+1 7356
+2 11034
+1 11034
+1 11034
+1 11034
+1 11034
+1 3678
+1 7356

fl=(319)
fn=(5724)
1766 2
+1 3
+1 2

fl=(40)
fn=(916)
608 12
+1 16
+2 20
+3 12
+3 8

fn=(908) clean_encoding_name
526 20
+4 20
+2 26
cob=(3)
cfi=(3)
cfn=(914)
calls=25 0 
* 75
cob=(1)
cfi=(1)
cfn=(223)
calls=1 0 
* 1355
* 30
* 286
+2 184
+1 176
+2 12
-7 146
+10 8
+1 4
+1 8

fn=(904)
488 16
+3 12
cfn=(906) pg_char_to_encoding
calls=4 +61 
* 3620
* 12
+3 16
+3 4
+1 8

fn=(906)
552 20
+1 4
+1 4
+1 24
+6 24
+3 12
cob=(3)
cfi=(3)
cfn=(424)
calls=4 0 
* 60
* 4
* 8
+11 20
cfn=(908)
calls=4 -49 
* 2350
* 4
+2 4
+2 264
+1 240
+2 48
+2 60
cob=(3)
cfi=(3)
cfn=(446)
calls=10 0 
* 220
* 10
* 10
+1 20
+1 12
+2 40
+1 40
+2 30
-14 72
+17 16

fl=(50)
fn=(994)
468 4
+1 2
+7 7
+35 2
+1 6
-1 7
+3 3
+3 10
+1 2

fn=(2876) InitBufferPoolBackend
2468 2
+1 3
cfi=(67)
cfn=(2110)
calls=1 362 
* 32
+1 2

fn=(3216) BufferAlloc
997 176600
+14 158940
+3 52980
cfi=(90)
cfn=(3218)
calls=17660 81 
* 2666660
* 17660
+1 141280
+3 70640
cfi=(99)
cfn=(2170)
calls=17660 1122 
* 2401760
+1 88300
cfi=(90)
cfn=(3220)
calls=17660 93 
* 2769837
* 17660
+1 35320
+7 96948
+2 80790
cfn=(3222) PinBuffer
calls=16158 1578 
* 5001063
* 16158
+3 48474
cfi=(99)
cfn=(2182)
calls=16158 1726 
* 1454220
+2 32316
+2 64632
+19 32316
+7 4506
cfi=(99)
cfn=(2182)
calls=1502 1726 
* 135180
+9 1502
cfn=(3226) ReservePrivateRefCountEntry
calls=1502 187 
* 13518
+6 7510
cfi=(89)
cfn=(3256)
calls=1502 202 
* 387503
* 1502
+5 4506
+3 4506
cfn=(3274) PinBuffer_Locked
calls=1502 1663 
* 199766
+9 6008
+78 6008
+34 6008
cfi=(99)
cfn=(2170)
calls=1502 -84 
* 205774
+2 1502
+2 1502
+10 10514
cfi=(90)
cfn=(3278)
calls=1502 121 
* 419014
* 1502
+2 3004
+51 4506
cfn=(3264)
calls=1502 4099 
* 136696
* 1502
+8 4506
+1 12016
+1 1502
+24 10514
+1 4506
+3 7504
+1 8
+2 4500
+2 12000
cfi=(123)
cfn=(3276)
calls=1500 262 
* 31500
* 16
cfi=(123)
cfn=(3276)
calls=2 262 
* 42
+2 3004
+7 4506
cfi=(99)
cfn=(2182)
calls=1502 1726 
* 136682
+7 6008
cfn=(3280) StartBufferIO
calls=1502 3882 
* 449112
* 3004
+1 4506
+4 1502
+1 35320

fn=(3280)
3882 9012
+11 13518
cfi=(99)
cfn=(2170)
calls=1502 1122 
* 205774
+2 4506
cfn=(3264)
calls=1502 4099 
* 136696
* 1502
+2 6008
+1 1502
+15 15020
+8 1502
+1 12016
cfi=(123)
cfn=(3276)
calls=1502 262 
* 31542
+2 3004
+1 3004
+2 1502
+1 3004

fn=(5450)
1457 10000
+5 5000
+3 5000
+6 17500
+6 10000
cfi=(123)
cfn=(3230)
calls=2500 245 
* 40000
* 2500
+3 10000
+3 5000
+3 2500
+2 17500
cfi=(123)
cfn=(3234)
calls=2500 316 
* 85000
* 5000
+2 2500
+6 11500
+2 4500
+1 4500
+1 4500
+3 5000

fn=(3222)
1578 80790
+1 64632
+4 64632
cfn=(3224) GetPrivateRefCountEntry
calls=16158 279 
* 1955118
* 16158
+2 32316
+5 16158
cfn=(3226)
calls=16158 187 
* 185937
+1 48474
cfn=(3228) NewPrivateRefCountEntry
calls=16158 253 
* 226212
* 16158
+2 64632
cfi=(123)
cfn=(3230)
calls=16158 245 
* 258528
* 16158
+3 64632
+3 32316
+3 16158
+2 32316
+3 78290
+1 42
+8 2500
+4 113106
cfi=(123)
cfn=(3234)
calls=16158 316 
* 549372
* 32316
+3 80790
+1 32316
+10 80790
+2 80790
cfi=(164)
cfn=(3238) ResourceOwnerRememberBuffer
calls=16158 906 
* 710952
+1 16158
+1 32316

fn=(3224)
279 244908
+11 81636
+2 804620
+2 804620
+1 49320
-5 490428
+15 48474
+1 32316
+44 81636

fn=(3264)
4099 24032
+4 36048
cfi=(181)
cfn=(3266)
calls=6008 1012 
* 138184
+5 30040
cfi=(123)
cfn=(3268)
calls=6008 376 
* 168224
* 6008
+2 24032
+1 6008
+3 18024
cfi=(143)
cfn=(3272)
calls=6008 176 
* 72159
+1 12016
+1 12016

fn=(3664) CheckForBufferLeaks
2497 6
+34 6

fn=(2218) WritebackContextInit
4239 4
+3 3
+1 2
+1 2

fn=(3212) ReadBuffer_common
706 194260
+5 88300
+2 35320
+3 52980
cfi=(164)
cfn=(3214) ResourceOwnerEnlargeBuffers
calls=17660 893 
* 406817
+2 52980
+10 35320
+1 7500
cfi=(140)
cfn=(3578)
calls=1500 -41 
* 1231848
* 1500
+2 35320
+17 176600
cfn=(3216)
calls=17660 997 
* 17720351
* 17660
+2 52980
+1 64632
+1 3004
+1 6000
+1 4
+2 6
+6 52980
+2 64632
+3 32316
+1 48474
+2 48474
+15 64632
+2 32316
+3 32316
+4 64632
+70 13518
+2 3004
+3 33000
cob=(3)
cfi=(3)
cfn=(828)
calls=1500 0 
* 1368000
* 1500
+2 10500
cfi=(140)
cfn=(5474) smgrextend
calls=1500 617 
* 876772
* 1500
+15 8
+7 6
+3 12
cfi=(140)
cfn=(3282) smgrread
calls=2 642 
* 7797
+2 6
+9 10
cfi=(185)
cfn=(3320)
calls=2 82 
* 138
* 6
+31 6008
+6 3004
+11 7510
cfn=(3322) TerminateBufferIO
calls=1502 3949 
* 357490
+3 4506
+1 4506
+11 4506
+1 70640

fn=(3330)
2612 582753
+5 388502
+3 1359757
+3 388502
+1 388502

fn=(5630)
2598 2
+2 2

fn=(3240)
3553 191680
+4 76672
+3 268352
+2 76672
+1 76672
cfi=(99)
cfn=(2182)
calls=19168 1726 
* 1731620
* 19168
+1 38336
+1 63340
cfi=(99)
cfn=(2170)
calls=12668 1122 
* 1722848
* 12668
+1 13000
+1 32500
cfi=(99)
cfn=(2170)
calls=6500 1122 
* 890500
* 6500
+3 76672

fn=(3250) UnpinBuffer
1701 126960
+2 84640
+3 84640
cfn=(3224)
calls=21160 279 
* 598840
* 21160
+3 42320
+1 105800
cfi=(164)
cfn=(3252) ResourceOwnerForgetBuffer
calls=21160 915 
* 1517360
+3 105800
+1 84640
+15 70640
cfi=(123)
cfn=(3230)
calls=17660 245 
* 282560
* 17660
+3 70640
+3 35320
+2 17660
+2 123620
cfi=(123)
cfn=(3234)
calls=17660 316 
* 600440
* 35320
+2 17660
+4 70640
+24 52980
cfn=(3254) ForgetPrivateRefCountEntry
calls=17660 382 
* 264900
+2 42320

fn=(3350)
2839 10216
+1 17878
+1 22986
+7 2554
cfi=(53)
cfn=(1610)
calls=2554 4834 
* 20432
* 17878
+1 25540
+11 5108

fn=(3662)
2422 10
+1 2
cfn=(3664)
calls=2 +74 
* 8
+2 6
cfi=(206)
cfn=(3666)
calls=2 573 
* 24
+3 4

fn=(5462)
3386 15000
+2 22500
+2 5000
+3 5000
+6 17500
+17 10000
cfi=(123)
cfn=(3230)
calls=2500 245 
* 40000
* 7500
+96 5000

fn=(3202)
642 158940
+5 70904
cfi=(140)
cfn=(3204)
calls=33 153 
* 19908
* 165
cfi=(140)
cfn=(3208)
calls=33 209 
* 1386
+7 88300
+9 158940
+1 247240
cfn=(3212)
calls=17660 +42 
* 23398101
* 17660
+2 52980
+1 145422
+1 16158
+1 64632
-1 1502
+1 6008

fn=(3226)
187 52980
+2 52980
+1 16159
+9 3002
+4 15005
+2 12004
+2 3002
+1 1501
-9 7502
+47 35320

fn=(3322)
3949 10514
+5 4506
cfn=(3264)
calls=1502 4099 
* 136696
* 1502
+4 1502
+1 3004
+3 3004
+1 12016
cfi=(123)
cfn=(3276)
calls=1502 262 
* 31542
+2 1502
+2 12016
cfi=(99)
cfn=(2182)
calls=1502 1726 
* 136682
+1 3004

fn=(5430) IncrBufferRefCount
3354 14000
+2 10500
cfi=(164)
cfn=(3214)
calls=3500 893 
* 80500
+1 7000
+6 14000
cfn=(3224)
calls=3500 279 
* 84000
* 3500
+2 17500
+2 17500
cfi=(164)
cfn=(3238)
calls=3500 906 
* 154000
+1 7000

fn=(5762)
2478 5
+1 1
cfn=(5764) AbortBufferIO
calls=1 3981 
* 14
+1 1
cfn=(5766) UnlockBuffers
calls=1 3525 
* 9
+2 1
cfn=(3664)
calls=1 +15 
* 4
+3 1
cfi=(206)
cfn=(5768)
calls=1 584 
* 9
+1 2

fn=(2828) InitBufferPoolAccess
2444 3
+3 4
cob=(3)
cfi=(3)
cfn=(828)
calls=1 0 
* 16
* 1
+2 118
+1 1
+1 1
+2 6
cfi=(31)
cfn=(794)
calls=1 317 
* 2722
* 1
+2 2

fn=(3610)
3339 40016
+1 40016
cfn=(3240)
calls=10004 3553 
* 1134952
+1 30012
cfn=(3360)
calls=10004 -25 
* 2314964
+1 20008

fn=(3228)
253 52980
+7 35320
+1 17660
+3 52980
+1 35320
+2 17660
+1 35320

fn=(3248)
1522 27654
+1 4609
+3 9218
+3 5134
+12 17969
+2 10268
+1 32
-1 16
+1 96
+1 16
-1 16
+2 16
+1 10236
cfn=(3250)
calls=2559 1701 
* 568098
+4 23005
cfn=(3200) ReadBuffer
calls=4601 595 
* 5007773
+1 9218

fn=(3254)
382 70640
+3 70640
+3 35320
+7 52980
+15 35320

fn=(3360)
3316 74404
+1 37202
+3 37202
+9 167409
cfn=(3250)
calls=18601 1701 
* 3906422
+1 37202

fn=(3576)
2795 5
+2 12
cfi=(140)
cfn=(3204)
calls=1 153 
* 468
* 5
cfi=(140)
cfn=(3208)
calls=1 209 
* 42
+2 6
cfi=(140)
cfn=(3578)
calls=1 688 
* 2004
+1 2

fn=(5764)
3981 5
+1 2
+2 2
+43 5

fn=(3200)
595 35795
+1 50113
cfn=(3202)
calls=7159 +46 
* 7697975
+1 14318

fn=(3274)
1663 6008
+15 6008
cfi=(123)
cfn=(3230)
calls=1502 245 
* 24032
* 1502
+2 1502
+1 12016
cfi=(123)
cfn=(3276)
calls=1502 262 
* 31542
+2 6008
+2 4506
cfn=(3228)
calls=1502 253 
* 21028
* 1502
+1 7510
+2 7510
cfi=(164)
cfn=(3238)
calls=1502 906 
* 66088
+1 3004

fn=(5766)
3525 3
+1 2
+2 2
+18 2

fl=(70) /usr/lib/gcc/x86_64-redhat-linux/4.8.5/include/cpuid.h
fn=(1604) __get_cpuid
264 9
+1 3
+2 4
cfn=(1606) __get_cpuid_max
calls=1 -60 
* 18
* 2
+3 11
+1 1
+1 4

fn=(1606)
207 5
+40 7
+2 2
+3 1
+1 3

fl=(186)
fn=(3326)
266 30522
+3 15261
+7 10174

fl=(300)
fn=(5216)
796 5000
+2 1500
+1 2500
+3 500
+6 2000
+2 2000
+11 1500
cfi=(54)
cfn=(3464)
calls=500 381 
* 2500
* 1500
cfi=(170)
cfn=(5218)
calls=500 4932 
* 15500
* 1500
+7 2000
+9 2000
+2 2500
+9 3000
cfi=(171)
cfn=(5220)
calls=500 1336 
* 64920070
* 500
+2 1500
+2 4000
cfi=(285)
cfn=(5250)
calls=500 1290 
* 815500
* 500
+2 3000
+2 1500
+1 3500
cfn=(5256) CopyGetAttnums
calls=500 4827 
* 168000
* 500
+1 1500
cfi=(46)
cfn=(966)
calls=500 78 
* 5000
* 1000
+2 2000
+3 1000
+1 3000
cfi=(279)
cfn=(4892)
calls=500 -99 
* 108500
* 1500
-6 3500
+10 2500
cfi=(304)
cfn=(5260)
calls=500 571 
* 12804595
+16 3000
cfi=(305)
cfn=(5274)
calls=500 53 
* 250604
* 1000
+93 500
+16 1000
+5 1500
+2 1000
cfi=(224)
cfn=(5276)
calls=500 258 
* 10000
+2 8000
cfn=(5278) BeginCopyFrom
calls=500 3152 
* 2545960
* 500
+2 1500
cfn=(5300) CopyFrom
calls=500 2285 
* 274352386
* 1000
+1 1500
cfn=(5534) EndCopyFrom
calls=500 3635 
* 541506
* 500
+16 1000
+1 4000
cfi=(171)
cfn=(3092)
calls=500 1283 
* 56500
+1 2500

fn=(5256)
4827 7000
+1 1000
+2 2000
+3 3000
+3 2000
+2 11000
+2 6000
cfi=(45)
cfn=(5258)
calls=1000 147 
* 290000
* 1000
-4 8000
+55 1000
+1 4000

fn=(5344) NextCopyFromRawFields
3395 528000
+8 354000
+7 440000
+3 264000
cfn=(5346) CopyReadLine
calls=88000 3651 
* 45312500
* 88000
+7 178000
+1 1000
+3 350000
+1 262500
cfn=(5354) CopyReadAttributesCSV
calls=87500 4355 
* 14824500
* 175000
+4 350000
+1 262500
+1 87500
+1 176000

fn=(5284) ProcessCopyOptions
1047 5000
+1 500
+4 1000
+3 1500
+2 1000
+3 1500
cfi=(46)
cfn=(966)
calls=500 78 
* 5000
* 1000
+2 1500
+2 2500
cob=(3)
cfi=(3)
cfn=(446)
calls=500 0 
* 26000
* 500
* 1000
+2 1500
cfi=(307)
cfn=(5286)
calls=500 50 
* 11000
* 500
+2 1000
+5 500
+1 2000
cob=(3)
cfi=(3)
cfn=(446)
calls=500 0 
* 11000
* 500
* 1000
+2 2000
cob=(3)
cfi=(3)
cfn=(446)
calls=500 0 
* 11000
* 500
* 1000
+1 1500
+4 500
-21 3500
1238 2000
+5 2000
+6 2000
+1 4000
+2 2000
+1 4000
+1 2000
cob=(3)
cfi=(3)
cfn=(424)
calls=500 0 
* 7500
* 500
* 1500
+2 2000
+2 2000
+1 1000
+1 2000
+1 2000
+4 2000
cob=(3)
cfi=(3)
cfn=(424)
calls=500 0 
* 7500
* 500
* 1000
+6 2500
cob=(3)
cfi=(3)
cfn=(1120)
calls=500 0 
* 11500
* 500
* 1000
+1 2500
cob=(3)
cfi=(3)
cfn=(1120)
calls=500 0 
* 11500
* 500
-1 1000
+6 2500
cob=(3)
cfi=(3)
cfn=(1120)
calls=500 0 
* 11500
* 500
* 1000
+1 2500
cob=(3)
cfi=(3)
cfn=(1120)
calls=500 0 
* 11500
* 500
-1 1000
+16 2500
+8 2500
+6 2500
+5 4000
cob=(3)
cfi=(3)
cfn=(424)
calls=500 0 
* 7500
* 500
* 1000
+5 6000
+6 2500
+5 4000
cob=(3)
cfi=(3)
cfn=(424)
calls=500 0 
* 7500
* 500
* 1000
+6 2500
+4 4000
+6 2500
+4 2000
+6 2500
+5 2000
+6 4500
cob=(3)
cfi=(3)
cfn=(1120)
calls=500 0 
* 11500
* 500
* 1000
+6 2000
+1 4500
cob=(3)
cfi=(3)
cfn=(1120)
calls=500 0 
* 11500
* 500
-1 1000
+5 2500

fn=(5342) NextCopyFrom
3448 704000
+4 264000
+1 264000
+1 264000
+2 264000
+1 264000
+2 352000
+1 264000
+1 352000
cfi=(46)
cfn=(5298)
calls=88000 90 
* 880000
* 88000
+3 3168000
+1 1672000
cob=(3)
cfi=(3)
cfn=(828)
calls=88000 0 
* 1760000
* 88000
+2 440000
+9 528000
cfn=(5344)
calls=88000 -81 
* 63653500
* 264000
+1 1000
+3 525000
+5 87500
+3 350000
cfi=(46)
cfn=(966)
calls=87500 78 
* 875000
* 175000
+2 262500
+1 262500
+1 875000
+2 262500
+5 787500
+2 350000
+7 350000
+2 175000
+9 875000
+13 350000
+1 262500
+1 612500
+2 437500
-2 1225000
cfi=(161)
cfn=(5000) InputFunctionCall
calls=87500 1710 
* 31560500
* 87500
+4 175000
+1 437500
+1 175000
+1 175000
-53 700000
3614 437500
+13 87500
+1 352000

fn=(5536) EndCopy
1736 2500
+1 2000
+6 4000
cfi=(25)
cfn=(1374)
calls=500 2385 
* 255022
* 1000
+7 2000
cfi=(13)
cfn=(1396)
calls=500 212 
* 224484
+1 1500
cfi=(13)
cfn=(952)
calls=500 1032 
* 42500
+1 2000

fn=(5278)
3152 6000
+2 1500
+13 5500
cfn=(5280) BeginCopy
calls=500 1401 
* 1105500
* 500
+1 2000
cfi=(306)
cfn=(5282)
calls=500 110 
* 5000
* 500
+3 1000
+1 1000
+1 3000
+1 1000
+1 1000
+1 1000
+3 2000
cfi=(80)
cfn=(1888)
calls=500 47 
* 77000
+1 2000
cfi=(80)
cfn=(1888)
calls=500 47 
* 77000
+1 1000
+1 1000
cfi=(13)
cfn=(940)
calls=500 925 
* 175748
* 1000
+1 3000
+3 1000
+1 2000
+2 2000
+1 1500
+1 500
+1 500
+8 3500
cfi=(13)
cfn=(940)
calls=500 925 
* 61500
* 500
+1 2000
cfi=(13)
cfn=(940)
calls=500 925 
* 55000
* 500
+1 2000
cfi=(13)
cfn=(940)
calls=500 925 
* 55000
* 500
+1 2000
cfi=(13)
cfn=(940)
calls=500 925 
* 55000
* 500
+2 1000
+2 5500
+3 2000
+4 2000
+5 2000
-1 4000
cfi=(275)
cfn=(5126)
calls=500 2609 
* 255500
+2 6500
cfi=(161)
cfn=(2942)
calls=500 125 
* 41000
+3 3000
cfi=(45)
cfn=(5290)
calls=500 486 
* 15000
* 1500
-18 3500
+55 1500
+1 1500
+1 1500
+1 1500
+1 1500
+1 1500
+1 1500
+2 1000
+5 1000
+10 1500
cfi=(13)
cfn=(928)
calls=500 1162 
* 102500
* 1000
+2 2000
+13 2500
cfi=(25)
cfn=(1278)
calls=500 2186 
* 258417
* 1000
+1 2000
+14 2000
cob=(3)
cfi=(3)
cfn=(1940)
calls=500 0 
* 3000
* 500
* 2000
cfi=(9)
cfn=(5292)
calls=500 0 
* 8795
* 1000
+6 2000
+7 2000
+43 2500
+2 2000
cfi=(46)
cfn=(5298)
calls=500 90 
* 5000
* 500
+2 1500
+1 2000
cfi=(13)
cfn=(940)
calls=500 925 
* 55000
* 1000
+3 1500
cfi=(306)
cfn=(5282)
calls=500 110 
* 5000
+2 500
+1 2500

fn=(5534)
3635 2000
+3 1500
cfn=(5536)
calls=500 1736 
* 537006
+1 1000

fn=(5280)
1401 5500
+7 1000
cfi=(13)
cfn=(2546)
calls=500 956 
* 270500
* 500
+6 3500
cfi=(14)
cfn=(432)
calls=500 395 
* 53500
* 1000
+4 2000
cfi=(306)
cfn=(5282)
calls=500 110 
* 5000
* 500
+3 3000
cfn=(5284)
calls=500 1047 
* 303500
+3 1000
+4 1500
+2 2500
1570 3500
cfn=(5256)
calls=500 4827 
* 168000
* 1000
+2 1500
+3 2000
cfi=(13)
cfn=(2546)
calls=500 956 
* 73000
* 1000
+1 2000
+7 2000
+22 2000
cfi=(13)
cfn=(2546)
calls=500 956 
* 73000
* 1000
+1 2000
+22 2000
cfi=(13)
cfn=(2546)
calls=500 956 
* 73000
* 1000
+1 2000
+22 2000
+24 2000
+1 500
cfi=(19)
cfn=(5288)
calls=500 307 
* 3000
* 1000
+8 1500
cfi=(19)
cfn=(612)
calls=500 1005 
* 3000
* 1000
+1 500
cfi=(43)
cfn=(942)
calls=500 1834 
* 9000
-1 2500
-1 1000
+4 4000
+2 1000
+2 1500
cfi=(306)
cfn=(5282)
calls=500 110 
* 5000
+2 500
+1 2000

fn=(5300)
2285 3000
+7 500
+1 500
cfi=(243)
cfn=(4366)
calls=500 86 
* 335353
* 500
+4 1000
+2 500
+1 500
+2 1000
cfi=(26)
cfn=(3012)
calls=500 662 
* 5000
* 500
+1 500
+3 500
+1 500
+3 500
+4 500
+1 500
+1 500
+1 500
+1 500
+1 1000
+9 3000
+29 2000
+51 3000
+1 1500
-1 1000
+2 1500
-1 1000
+19 2000
+46 2000
cfi=(13)
cfn=(2950)
calls=500 853 
* 134500
* 2500
+1 4000
cfi=(304)
cfn=(5302)
calls=500 1286 
* 148000
+5 1000
+3 2000
cfi=(304)
cfn=(5308)
calls=500 1081 
* 25500
+2 2000
cfi=(310)
cfn=(5312)
calls=500 150 
* 10000
+2 1500
+1 1000
+1 1500
+2 3000
cfi=(243)
cfn=(5314)
calls=500 720 
* 163500
+3 3000
cfi=(260)
cfn=(5316)
calls=500 1683 
* 336803
* 500
+3 2500
cfi=(260)
cfn=(5316)
calls=500 1683 
* 212500
* 1000
+7 2000
cfi=(13)
cfn=(2950)
calls=500 853 
* 211500
* 2500
+1 1000
+1 1500
+1 1000
+1 2000
+2 2000
+6 500
cfi=(167)
cfn=(5330)
calls=500 4810 
* 3500
+12 1000
-1 4000
cfi=(167)
cfn=(5332)
calls=500 4688 
* 6000
-1 3000
+9 3000
+9 2000
+12 1000
+12 2000
+1 1000
-1 1000
+42 1000
+6 500
+2 1000
cfi=(13)
cfn=(940)
calls=500 925 
* 336812
* 500
+3 3500
+3 3500
+9 2500
cfi=(167)
cfn=(5334)
calls=500 2450 
* 8000
+2 3000
cfi=(13)
cfn=(940)
calls=500 925 
* 55000
* 500
+1 2500
cfi=(13)
cfn=(940)
calls=500 925 
* 55000
* 500
+2 500
cfi=(171)
cfn=(5336)
calls=500 2377 
* 725526
* 500
+1 3500
cfi=(243)
cfn=(5340)
calls=500 415 
* 377817
* 500
+3 500
+1 1000
+1 1000
+1 1000
+7 264000
+2 176000
+7 4500
cfi=(13)
cfn=(3758)
calls=500 137 
* 7500
+4 880000
cfi=(306)
cfn=(5282)
calls=88000 110 
* 880000
+2 528000
cfn=(5342)
calls=88000 3448 
* 118822000
* 264000
+1 500
2985 1500
2671 525000
cfi=(190)
cfn=(5364)
calls=87500 1025 
* 42834595
* 87500
+6 437500
+3 262500
cfi=(306)
cfn=(5282)
calls=87500 110 
* 875000
+3 175000
+1 525000
cfi=(260)
cfn=(5372)
calls=87500 1275 
* 6825000
+3 175000
2859 87500
+3 175000
+10 350000
+2 175000
+11 350000
+1 350000
-1 175000
+10 350000
+9 175000
+3 175000
+1 1500
+1 4500
+1 2000
+8 1000
-9 783000
+1 348000
+8 436500
+62 87500
+2 87500
+5 1000
+8 8000
cfn=(5378) CopyFromInsertBatch
calls=500 +69 
* 91203117
+7 1000
+2 1500
cfi=(171)
cfn=(5502)
calls=500 2391 
* 282604
+2 1500
cfi=(306)
cfn=(5282)
calls=500 110 
* 5000
+6 2000
+4 3500
cfi=(167)
cfn=(5506)
calls=500 2508 
* 6500
+3 1500
cfi=(167)
cfn=(5508)
calls=500 4830 
* 7000
+2 1500
cfi=(13)
cfn=(952)
calls=500 1032 
* 36000
+1 1500
cfi=(13)
cfn=(952)
calls=500 1032 
* 36000
+2 2500
cfi=(260)
cfn=(5510)
calls=500 1113 
* 131000
+3 2000
+5 1500
cfi=(310)
cfn=(5520)
calls=500 225 
* 8500
+3 1000
+4 1500
cfi=(304)
cfn=(5522)
calls=500 1454 
* 11000
+2 1500
cfi=(243)
cfn=(5524)
calls=500 195 
* 659259
+6 2000
+3 500
+1 2500

fn=(5348) CopyReadLineText
3740 528000
+4 88000
+1 88000
+1 88000
+4 88000
+1 88000
+1 88000
+1 88000
+1 88000
+2 352000
+2 352000
+1 352000
+2 264000
+1 88000
+3 88000
+23 264000
+1 264000
+1 264000
+17 1480500
+2 4000
+6 3000
cfn=(5350) CopyLoadRawBuf
calls=1000 749 
* 345500
* 3000
+1 500
+1 500
+1 1500
+6 1000
-7 500
+1 1500
+6 1000
+2 500
+1 500
+2 500
+4 1000
+1 4000
+2 2000
-3 591000
+1 2364000
+2 1182000
+11 1184000
+13 592000
+2 888000
+2 888000
+1 296000
+8 592000
+5 592000
+56 1379500
+2 700000
+9 175000
+2 87500
+7 417000
4072 834000
+11 208500
+1 208500
+5 1664500
cfi=(80)
cfn=(1920) appendBinaryStringInfo
calls=87500 215 
* 7615000
* 262500
+2 87500
+1 437500
-1 500
+1 2500

fn=(5350)
749 4000
+4 6000
+8 1000
+2 13000
cfn=(5352) CopyGetData
calls=1000 567 
* 303500
* 1000
+2 2000
+1 6000
+1 2000
+1 3000
+1 2000
+1 2000

fn=(5352)
567 8000
+1 1000
+2 6000
+3 8000
cob=(3)
cfi=(3)
cfn=(1336)
calls=1000 0 
* 226500
* 1000
* 1000
+1 4000
cob=(3)
cfi=(3)
cfn=(1366)
calls=1000 0 
* 36000
* 1000
* 2000
+4 2000
+1 1000
+1 1000
+88 1000
+1 4000

fn=(5354)
4355 437500
+1 350000
+1 350000
+1 350000
+10 350000
+9 350000
cfi=(80)
cfn=(1890)
calls=87500 63 
* 1050000
+9 525000
+2 262500
+3 262500
+1 612500
+3 87500
+3 87500
+1 87500
+6 350000
+8 175000
+1 700000
+16 175000
+1 262500
-1 417000
+1 625500
+1 87500
+1 1042500
+2 625500
+6 625500
+6 1042500
+1 208500
+48 350000
+3 437500
+1 700000
+4 87500
+2 350000
+1 87500
+4 87500
+2 700000
+2 175000
+1 350000

fn=(5378)
3064 4500
+4 1500
+6 1000
+1 1500
+6 5000
cfi=(306)
cfn=(5282)
calls=500 110 
* 5000
* 500
+1 5000
cfi=(171)
cfn=(5380)
calls=500 2699 
* 91164617
+6 1500
cfi=(306)
cfn=(5282)
calls=500 110 
* 5000
+6 2000
+22 2000
+14 1500
+1 1500
+1 1000

fn=(5346)
3651 352000
+3 352000
cfi=(80)
cfn=(1890)
calls=88000 63 
* 1056000
+1 176000
+3 176000
+3 264000
cfn=(5348)
calls=88000 +79 
* 28620000
* 88000
+2 176000
+7 2000
+14 350000
+5 437500
+1 612500
+1 87500
+22 352000
+4 792000
cfi=(19)
cfn=(3840)
calls=88000 562 
* 10539000
* 88000
+3 352000
+10 176000
+2 88000
+1 176000

fl=(82)
fn=(1912) _conv
501 294
+3 294
cfi=(17)
cfn=(1138)
calls=42 231 
* 20595
+1 252
cfn=(1914) _add
calls=42 +5 
* 2100
+1 84

fn=(1914)
510 240
+1 48
+1 102
-1 1950
+2 48
+1 96

fn=(1910) _yconv
527 60
+5 156
+1 180
+1 78
+1 12
+5 12
+5 12
+2 12
+3 36
cfn=(1912)
calls=6 -49 
* 3366
* 6
+2 12
+1 60
cfn=(1912)
calls=6 -52 
* 3366
* 6
+1 6
+1 12

fn=(1906)
123 42
+2 6
+2 60
cfn=(1908) _fmt
calls=6 +10 
* 27075
* 6
+1 30
+2 12
+1 24
+1 12

fn=(1908)
137 48
+1 6
+2 450
+3 378
+55 42
cfn=(1912)
calls=6 501 
* 3384
* 6
+1 6
+18 42
cfn=(1912)
calls=6 501 
* 3384
* 6
+1 6
+42 42
cfn=(1912)
calls=6 501 
* 3366
* 6
+1 6
+2 54
cfn=(1912)
calls=6 501 
* 3384
* 6
+1 6
+17 42
cfn=(1912)
calls=6 501 
* 3369
* 6
+1 6
434 66
cfn=(1910)
calls=6 +93 
* 7392
* 6
+3 6
+2 24
+1 42
cfn=(1914)
calls=6 +70 
* 384
* 6
+7 6
+45 180
+2 360
138 534
496 6
+1 12

fl=(98)
fn=(2042)
1804 3
+8 7
cfi=(87)
cfn=(2000)
calls=1 493 
* 23
* 3
cfi=(87)
cfn=(2002)
calls=1 476 
* 21
* 1
+1 3
cfi=(93)
cfn=(2020)
calls=1 146 
* 52
* 5
cfi=(87)
cfn=(2002)
calls=1 476 
* 21
* 1
+1 3
cfi=(93)
cfn=(2020)
calls=1 146 
* 52
* 5
cfi=(87)
cfn=(2002)
calls=1 476 
* 21
* 1
+2 1
+1 2

fn=(3674)
1663 4
+8 12
+1 12
+6 2
+1 4
cfi=(207)
cfn=(3676)
calls=2 279 
* 24
+1 2
+1 4

fn=(2202)
1821 3
+5 1
+1 1
+4 2
-2 8
cfi=(93)
cfn=(2196)
calls=1 167 
* 2548
+6 2
-2 8
cfi=(93)
cfn=(2196)
calls=1 167 
* 3462
+7 3
-1 4
cfi=(87)
cfn=(2000)
calls=1 493 
* 23
* 3
cfi=(87)
cfn=(2002)
calls=1 476 
* 21
* 4
cfi=(87)
cfn=(2168)
calls=1 373 
* 1091
* 1
+3 4
+5 10
cfi=(87)
cfn=(2000)
calls=1 493 
* 23
* 3
cfi=(87)
cfn=(2002)
calls=1 476 
* 21
* 15
cob=(3)
cfi=(3)
cfn=(828)
calls=1 0 
* 114
* 1
+9 3
+1 8
+1 2

fl=(120)
fn=(2180)
170 307765
+12 123106
-5 553977
+7 123106
+1 123106

fl=(251)
fn=(4488) assign_list_collations
156 20
+3 12
cfi=(222)
cfn=(4336)
calls=4 -81 
* 40
* 8
+2 12
+2 20
cfn=(4490) assign_expr_collations
calls=4 +15 
* 4863
-4 28
+6 8

fn=(4500) merge_collation_state
762 165
+6 60
+3 21
+1 21
+1 21
+2 14
+6 32
+3 31
+6 8
+26 2
-28 10
+51 75

fn=(4486)
127 180
+2 72
+1 56
+6 32
+3 32
+1 20
cfn=(4488)
calls=4 +16 
* 5011
* 4
+2 20
cfn=(4490)
calls=4 +36 
* 648
+2 8
+1 72

fn=(4482)
102 20
+7 24
cfi=(250)
cfn=(4484)
calls=4 2266 
* 6587
+5 8

fn=(4492) assign_collations_walker
256 64
+7 16
+8 24
+1 8
+1 8
+1 8
+2 8
+1 8
+8 80
445 20
cfi=(250)
cfn=(4494)
calls=4 1843 
* 4427
+9 8
+1 8
+1 8
+15 8
+10 4
+7 20
cfi=(250)
cfn=(4494)
calls=4 1843 
* 424
+10 8
742 40
cfn=(4500)
calls=4 +20 
* 124
+7 4
+1 48

fn=(4493)
256 152
+7 38
+1 16
+7 33
+1 11
+1 11
+1 11
+2 11
+1 11
+8 166
555 21
cfi=(250)
cfn=(4496)
calls=7 721 
* 147
* 7
+11 14
+1 6
+2 4
+1 12
cfi=(250)
cfn=(4498)
calls=4 1193 
* 96
* 9
cfi=(250)
cfn=(4498)
calls=3 1193 
* 72
* 7
+1 7
+15 32
+90 20
cfi=(250)
cfn=(4495)
calls=4 1843 
* 3215
+3 4
+6 12
cfi=(250)
cfn=(4478)
calls=4 43 
* 96
* 8
cfi=(275)
cfn=(5028)
calls=4 2791 
* 1896
* 4
+1 8
+3 12
+3 6
+1 6
+1 9
+10 2
+1 1
+1 3
cfi=(250)
cfn=(4498)
calls=1 1193 
* 71
* 2
+16 8
+3 20
cfi=(250)
cfn=(5030)
calls=4 974 
* 76
+6 12
+3 20
cfi=(250)
cfn=(5032)
calls=4 1129 
* 69
+2 4
+6 40
cfn=(4500)
calls=4 +20 
* 126
* 70
cfn=(4500)
calls=7 +20 
* 210
+7 11
+1 114

fn=(4490)
178 40
+4 16
+1 8
+1 8
+1 8
+3 40
cfn=(4492)
calls=8 +68 
* 5375
+1 16

fl=(28)
fn=(784)
41 95
+5 38
+1 76
cob=(3)
cfi=(3)
cfn=(756)
calls=19 -47 
* 722
* 19
+1 19
+2 38
+1 3
+2 6
cob=(5)
cfi=(5)
cfn=(782) sigaction
calls=1 -53 
* 109
* 1
* 108
cob=(5)
cfi=(5)
cfn=(782)
calls=18 -53 
* 1962
* 18
* 38
+2 19
+4 38

fn=(776)
72 35
+4 14
+1 28
cob=(3)
cfi=(3)
cfn=(756)
calls=7 -77 
* 266
* 7
+1 7
+2 14
+1 3
+2 6
cob=(5)
cfi=(5)
cfn=(782)
calls=1 -83 
* 109
* 1
* 36
cob=(5)
cfi=(5)
cfn=(782)
calls=5 -83 
* 545
cob=(1)
cfi=(1)
cfn=(223)
calls=1 -83 
* 922
* 10
* 14
+2 7
+1 14

fl=(77)
fn=(1974) getaddrinfo_unix
167 6
+5 2
+2 69
+2 3
cob=(3)
cfi=(3)
cfn=(424)
calls=1 0 
* 19
* 1
* 2
+3 2
+6 6
cob=(3)
cfi=(3)
cfn=(856)
calls=1 0 
* 22
* 1
+2 3
+3 3
+6 3
cob=(1)
cfi=(1)
cfn=(223)
calls=1 0 
* 1498
* 5
* 1
+1 2
+3 3
cob=(3)
cfi=(3)
cfn=(1722)
calls=1 0 
* 355
* 1
* 1
+1 2
+6 2
+1 3
+1 3
+1 2
+1 2
+1 3
+2 2
+1 3
+1 2
+2 6
cob=(3)
cfi=(3)
cfn=(810)
calls=1 0 
* 62
* 1
+6 1
+1 2

fn=(1630)
59 77
+4 22
+3 44
+1 6
cfn=(1974)
calls=1 167 
* 2104
* 1
+4 130
cob=(3)
cfi=(3)
cfn=(1636)
calls=9 -71 
* 21987
cob=(1)
cfi=(1)
cfn=(223)
calls=1 -71 
* 92076
* 14
* 10
+3 10
+1 22

fn=(1942)
89 55
+2 22
+3 1
+2 2
+2 3
+1 4
cob=(3)
cfi=(3)
cfn=(590)
calls=1 -99 
* 85
* 1
+1 3
cob=(3)
cfi=(3)
cfn=(590)
calls=1 0 
* 89
* 1
-6 5
+13 20
+1 30
cob=(3)
cfi=(3)
cfn=(1948)
calls=9 0 
* 2789
cob=(1)
cfi=(1)
cfn=(223)
calls=1 0 
* 1580
* 14
+2 22

fn=(1832)
126 27
+4 18
+1 10
cfn=(2760) getnameinfo_unix
calls=1 235 
* 457
* 2
+6 20
cob=(3)
cfi=(3)
cfn=(1838)
calls=1 0 
* 1800
cob=(1)
cfi=(1)
cfn=(223)
calls=1 0 
* 2205
* 6
* 2
+5 6
+8 3
+1 6

fn=(2760)
235 9
+4 8
+4 2
+2 8
cfi=(17)
cfn=(462)
calls=1 -42 
* 232
* 1
+1 5
+4 2
+2 10
cfi=(17)
cfn=(462)
calls=1 -49 
* 171
* 1
+1 5
+4 1
+1 2

fl=(94)
fn=(2030) CLOGShmemBuffers
684 4
+1 34
+1 4

fn=(2194)
699 4
+1 1
+2 2
-1 2
cfn=(2030)
calls=1 -17 
* 21
* 8
cfi=(93)
cfn=(2196)
calls=1 167 
* 4671
+2 4

fn=(5698) TransactionIdSetPageStatusInternal
348 9
+18 8
cfi=(93)
cfn=(5700) SimpleLruReadPage
calls=1 +11 
* 111
* 1
+11 2
+3 2
+2 5
+10 6
cfn=(5702) TransactionIdSetStatusBit
calls=1 573 
* 84
+4 5
+6 6
+1 2

fn=(5702)
573 6
+1 4
+1 4
+5 11
+1 9
+8 3
+14 3
+1 7
+1 6
+1 3
+10 2
+2 7
+2 9
+1 8
+2 2

fn=(5694) TransactionIdSetPageStatus
277 11
+19 8
+2 3
-1 2
+2 9
cob=(3)
cfi=(3)
cfn=(3074)
calls=1 0 
* 13
* 1
-1 2
+17 5
cfi=(99)
cfn=(5696)
calls=1 1294 
* 129
* 2
+3 10
cfn=(5698)
calls=1 +30 
* 241
+2 4
cfi=(99)
cfn=(2182)
calls=1 1726 
* 91
+1 1
+16 2

fn=(5390)
868 4
+7 6
+2 1
+10 2

fn=(5692)
165 8
+1 3
+10 5
+9 3
+5 11
cfn=(5694)
calls=1 +87 
* 534
* 1
+38 2

fn=(2028)
693 2
+1 1
cfn=(2030)
calls=1 -10 
* 21
* 3
cfi=(93)
cfn=(2020)
calls=1 146 
* 59
+1 2

fl=(121)
fn=(5680)
203 4
+1 10
+1 2

fn=(2188)
194 246212
+1 307765
+1 123106

fn=(5674)
212 4
+1 10
+1 2

fl=(15)
fn=(448)
130 12
+5 8
cob=(3)
cfi=(3)
cfn=(454)
calls=1 0 
* 34
cob=(1)
cfi=(1)
cfn=(223)
calls=1 0 
* 1294
* 6
* 4
+10 6
cfi=(11)
cfn=(456)
calls=2 -41 
* 54
* 4
+2 8
+3 12
cfi=(11)
cfn=(458)
calls=2 +70 
* 4184
+1 6
cfi=(11)
cfn=(484)
calls=2 255 
* 2197
+2 6
cfn=(488) validate_exec
calls=2 -84 
* 2684
* 4
+1 6
cfn=(504) resolve_symlinks
calls=2 +79 
* 7080
* 2
+63 8

fn=(488)
69 8
+24 10
cfi=(9)
cfn=(490)
calls=2 -93 
* 1318
* 4
+3 8
+8 8
cob=(3)
cfi=(3)
cfn=(502)
calls=1 0 
* 5
cob=(1)
cfi=(1)
cfn=(223)
calls=1 0 
* 1265
* 6
* 8
+1 8
cob=(3)
cfi=(3)
cfn=(502)
calls=2 0 
* 10
* 2
* 8
+5 12
+1 4

fn=(504)
233 10
+19 8
cob=(3)
cfi=(3)
cfn=(454)
calls=2 0 
* 68
* 2
* 4
+12 6
cfi=(11)
cfn=(378)
calls=2 139 
* 840
* 2
+1 4
+2 4
+1 6
cob=(3)
cfi=(3)
cfn=(510)
calls=1 0 
* 5
cob=(1)
cfi=(1)
cfn=(223)
calls=1 0 
* 1258
* 6
* 4
+6 8
+5 10
cfi=(9)
cfn=(512)
calls=2 0 
* 1325
* 4
+1 4
-1 4
+17 12
cfi=(16)
cfn=(460)
calls=2 46 
* 300
+2 8
cob=(3)
cfi=(3)
cfn=(454)
calls=2 0 
* 68
* 2
* 4
+6 12
cfi=(11)
cfn=(458)
calls=2 -84 
* 857
+1 6
cfi=(11)
cfn=(484)
calls=2 -50 
* 2197
+2 6
cob=(3)
cfi=(3)
cfn=(510)
calls=2 0 
* 10
* 2
* 4
+8 2
+1 8

fn=(438)
566 5
+8 4
cob=(1)
cfi=(1)
cfn=(223)
calls=1 0 
* 1325
* 5
* 2
+15 5
cfn=(448)
calls=1 130 
* 13165
* 2
+19 2
cob=(1)
cfi=(1)
cfn=(223)
calls=1 0 
* 1709
* 5
* 2
+2 5
cfi=(11)
cfn=(524)
calls=1 714 
* 4676
+3 8
cfi=(17)
cfn=(462)
calls=1 203 
* 1676
+1 4
cfi=(11)
cfn=(484)
calls=1 255 
* 1165
+1 3
cob=(3)
cfi=(3)
cfn=(384)
calls=1 0 
* 296
* 1
* 1
+1 2
+1 3
cob=(1)
cfi=(1)
cfn=(223)
calls=1 0 
* 4409
* 5
+2 2

fl=(227)
fn=(3976)
220 2016
+10 1512
cfi=(223)
cfn=(3940)
calls=504 90 
* 5040
* 1008
+2 1512
cfi=(223)
cfn=(3942)
calls=504 78 
* 5040
* 1008
+2 2016
+2 1006
+2 2012
+2 2012
+2 12
+3 6
+2 2000
+2 2000
cfi=(224)
cfn=(3978)
calls=500 1747 
* 9000
* 1000
+3 1000
+4 4
+2 2
+2 4
+2 4
+7 4
+2 4
cfi=(224)
cfn=(3978)
calls=1 1747 
* 18
* 2
+3 2
+52 1008

fn=(3980)
625 7
+5 4
+1 1
+29 4

fn=(3988)
689 10
+15 2
+1 2
+2 3
+10 3
cfi=(156)
cfn=(3990) MarkPortalActive
calls=1 393 
* 26
+4 3
+16 2
+1 2
+1 2
+1 2
+1 2
+1 2
+1 8
cob=(3)
cfi=(3)
cfn=(370)
calls=1 0 
* 28
* 1
* 4
+2 2
+1 4
+1 3
+1 3
+2 3
cfi=(211)
cfn=(3756)
calls=1 110 
* 10
+2 6
+44 10
cfn=(3992) PortalRunMulti
calls=1 1206 
* 376458078
+4 3
cfi=(156)
cfn=(5608) MarkPortalDone
calls=1 412 
* 30
+3 1
+1 1
+28 4
+2 4
+1 3
cfi=(211)
cfn=(3756)
calls=1 110 
* 10
* 1
+3 2
+1 3
+1 3
+3 2
+2 3
+5 1
+1 2

fn=(3974)
445 11
+14 2
+1 2
+1 2
+1 8
cob=(3)
cfi=(3)
cfn=(370)
calls=1 0 
* 28
* 1
* 4
+2 2
+1 4
+1 3
+1 3
+2 3
cfi=(211)
cfn=(3756)
calls=1 110 
* 10
* 1
+3 3
+5 4
cfn=(3976)
calls=1 220 
* 84
* 2
+5 7
586 2
+1 1
+15 4
+2 3
cfi=(211)
cfn=(3756)
calls=1 110 
* 10
+2 2
+1 2
+1 2
+2 3
+1 7

fn=(3994) PortalRunUtility
1134 10
+1 3
+14 4
+1 2
-1 2
+2 2
-1 2
+2 2
-1 2
+2 2
-1 2
+3 2
-2 2
+3 2
-1 2
+2 2
-1 2
+2 2
-1 2
+2 2
-10 2
+12 1
cfi=(110)
cfn=(2998)
calls=1 305 
* 588
* 1
+2 2
+5 3
cfi=(110)
cfn=(3996)
calls=1 734 
* 390
+2 1
cfi=(110)
cfn=(3998)
calls=1 840 
* 6
* 2
+5 17
cfi=(224)
cfn=(4000)
calls=1 345 
* 376456472
+9 4
cfi=(211)
cfn=(3756)
calls=1 110 
* 10
+7 3
cfi=(110)
cfn=(4630)
calls=1 852 
* 7
* 2
+1 1
cfi=(110)
cfn=(3998)
calls=1 840 
* 6
-1 2
+2 1
cfi=(110)
cfn=(4848)
calls=1 813 
* 264
+1 2

fn=(3992)
1206 11
+1 1
+13 4
+2 4
+7 4
cfi=(223)
cfn=(3942)
calls=1 78 
* 10
* 2
+2 3
+5 3
+2 4
+79 4
+4 10
cfn=(3994)
calls=1 1134 
* 376457838
* 1
+16 4
+8 4
cfi=(13)
cfn=(3732)
calls=1 257 
* 11
1229 7
1349 2
+15 6
+2 4
+1 6
cob=(3)
cfi=(3)
cfn=(810)
calls=1 0 
* 14
* 1
+1 4
cob=(3)
cfi=(3)
cfn=(446)
calls=1 0 
* 22
* 1
* 2
+2 4
cob=(3)
cfi=(3)
cfn=(446)
calls=1 0 
* 22
* 1
* 2
+2 4
cob=(3)
cfi=(3)
cfn=(446)
calls=1 0 
* 22
* 1
* 2
+2 4
cob=(3)
cfi=(3)
cfn=(446)
calls=1 0 
* 22
* 1
* 2
+3 4

fl=(12)
fn=(416)
127 6
+1 2
+1 2
+9 1
+7 2
+2 26
+1 42
cob=(3)
cfi=(3)
cfn=(424)
calls=2 0 
* 34
cob=(1)
cfi=(1)
cfn=(223)
calls=1 0 
* 1291
* 7
* 6
-3 15
+6 2
+10 2
+2 600
+1 840
cob=(3)
cfi=(3)
cfn=(424)
calls=60 0 
* 1502
* 60
* 120
-3 548
+6 3
+1 8
+5 6
cob=(1)
cfi=(1)
cfn=(223)
calls=1 0 
* 1445
* 5
* 1
+1 2
+5 2
+2 780
cob=(3)
cfi=(3)
cfn=(384)
calls=60 0 
* 17739
* 60
* 60
+1 480
-3 548
+9 6
+1 2
+22 6
cob=(3)
cfi=(3)
cfn=(388)
calls=1 0 
* 188
* 1
* 1
+1 2
+5 2
+2 39
cob=(3)
cfi=(3)
cfn=(384)
calls=3 0 
* 732
* 3
* 3
+1 24
-3 15
+9 6
+11 2
+4 1
+1 4

fn=(2800)
251 7
+7 4
+4 3
+5 3
+18 2
+1 18
-1 11
+20 4
+2 12
cfi=(17)
cfn=(462)
calls=1 203 
* 923
* 1
+11 3
cob=(3)
cfi=(3)
cfn=(424)
calls=1 0 
* 23
* 1
* 3
+2 4
cfn=(2802)
calls=1 +12 
* 743
+2 2

fn=(2802)
332 30
+3 36
+4 20
+5 15
+5 50
cfi=(16)
cfn=(460)
calls=5 46 
* 624
+2 15
cob=(3)
cfi=(3)
cfn=(424)
calls=5 0 
* 118
* 5
* 5
+26 20
+1 80
cob=(3)
cfi=(3)
cfn=(828)
calls=4 0 
* 480
* 4
+2 10
+22 10

fl=(201)
fn=(3592)
266 12
+3 6
+7 4

fl=(100)
fn=(3004)
1520 7540
+1 3016
+5 1508
+1 1508
+1 1508
+1 1508
+1 1508
+15 6032
+7 2
cfn=(3006) GetMaxSnapshotXidCount
calls=2 -85 
* 12
* 8
cob=(3)
cfi=(3)
cfn=(388)
calls=2 0 
* 573
* 2
* 2
-1 4
+2 8
+6 2
cfn=(3008) GetMaxSnapshotSubxidCount
calls=2 -81 
* 20
* 8
cob=(3)
cfi=(3)
cfn=(388)
calls=2 0 
* 587
* 2
* 2
-1 4
+2 8
+10 7540
cfi=(99)
cfn=(2170)
calls=1508 1122 
* 205088
+3 4524
+2 4524
+3 6032
+2 1508
cfi=(53)
cfn=(2878)
calls=1508 7896 
* 16588
* 3016
+2 7540
+2 4524
+8 4524
+1 3016
+2 42938
+1 55206
+7 36804
+5 18402
+1 12268
+1 6344
-1 3172
+5 18402
+8 12268
+1 8982
+1 6134
-31 30568
1720 4524
+1 4524
+2 6032
+1 15
+2 12
cfi=(99)
cfn=(2182)
calls=3 * 
* 270
* 6020
cfi=(99)
cfn=(2182)
calls=1505 * 
* 135450
+7 7540
cfi=(168)
cfn=(3010)
calls=1508 301 
* 25636
* 3016
+4 7540
+1 4524
+4 3016
+5 3016
+6 3016
+4 3016
+2 4524
+1 4524
+1 4524
+1 4524
+1 4524
+2 3016
cfi=(26)
cfn=(3012)
calls=1508 662 
* 13572
* 3016
+6 3016
+1 3016
+1 3016
+2 4524
+6 3016
+1 4524
+14 1508
+1 6032

fn=(2254)
223 3
+8 3
-3 4
cfi=(87)
cfn=(2000)
calls=1 493 
* 23
* 3
cfi=(87)
cfn=(2002)
calls=1 476 
* 21
* 4
cfi=(87)
cfn=(2168)
calls=1 373 
* 888
-1 1
+7 4
+5 2
+1 5
+1 8
+1 2
+1 2
+1 2
+1 2
+1 2
+1 2
+1 2
+3 3
+1 3
+3 3
+5 6
-2 4
cfi=(87)
cfn=(2000)
calls=1 493 
* 23
* 4
cfi=(87)
cfn=(2168)
calls=1 373 
* 1069
-1 1
+7 6
-1 4
cfi=(87)
cfn=(2000)
calls=1 493 
* 23
* 4
cfi=(87)
cfn=(2168)
calls=1 373 
* 1166
-1 1
+7 3
cfi=(99)
cfn=(2158)
calls=1 603 
* 17
+1 2

fn=(2870)
277 5
+1 2
+3 5
cfi=(99)
cfn=(2170)
calls=1 1122 
* 137
+2 6
+22 2
+6 16
-6 4
+11 3
-1 20
cob=(3)
cfi=(3)
cfn=(482)
calls=1 0 
* 19
* 1
+2 7
+1 5
+2 4
cfi=(99)
cfn=(2182)
calls=1 1726 
* 91
+1 4

fn=(3006)
1467 4
+1 4
+1 4

fn=(3008)
1478 4
+1 12
+1 4

fn=(2048)
181 3
+6 1
+1 7
cfi=(87)
cfn=(2000)
calls=1 493 
* 23
* 5
cfi=(87)
cfn=(2002)
calls=1 476 
* 21
* 1
+18 3
+4 6
-2 4
cfi=(87)
cfn=(2000)
calls=1 493 
* 23
* 5
cfi=(87)
cfn=(2002)
calls=1 476 
* 21
* 1
+4 6
-1 4
cfi=(87)
cfn=(2000)
calls=1 493 
* 23
* 5
cfi=(87)
cfn=(2002)
calls=1 476 
* 21
* 1
+4 1
+1 2

fn=(5776)
335 5
+1 2
+9 5
cfi=(99)
cfn=(2170)
calls=1 1122 
* 137
+2 2
+15 2
+2 9
+4 4
-1 20
cob=(3)
cfi=(3)
cfn=(482)
calls=1 0 
* 12
* 1
+2 7
+1 5
+1 4
cfi=(99)
cfn=(2182)
calls=1 1726 
* 91
+1 1
-10 4
+18 2

fn=(3654)
398 10
+1 20
+2 4
+15 5
cfi=(99)
cfn=(5696)
calls=1 1294 
* 129
* 2
+2 6
cfn=(5706) ProcArrayEndTransactionInternal
calls=1 +35 
* 56
+1 4
cfi=(99)
cfn=(2182)
calls=1 1726 
* 91
* 1
+14 2
+1 2
+2 6
+1 2
+1 2
+5 4

fn=(5706)
453 6
+1 2
+1 2
+1 2
+2 6
+1 2
+1 2
+3 2
+1 2
+3 6
cfi=(168)
cfn=(3010)
calls=1 301 
* 17
* 2
+2 3
+1 2

fl=(315)
fn=(5422)
160 56000
+1 63000
+1 21000
+11 28000
+1 8000
+7 9000
+1 15000
+2 3000
+43 6000
+1 3000
+2 18000
+1 3000
-3 6000
+17 9000
+48 9000
+10 15000
+2 3000
+1 14000

fn=(5460)
64 17500
+1 7500
+1 7500
+5 12500
+3 7500
+3 12500
+8 2500
+4 17500
+1 10000
+1 7500
+2 12500
+1 7500
-9 17000
+4 119000
+1 68000
+1 51000
+2 85000
+1 51000
+1 156000
+3 97500
+1 58500
+1 1000
+2 92500
+1 37000
+6 10000
+3 2500
+1 5000

fn=(5464)
139 7500
+1 7500
+2 5000
+1 5000

fl=(95)
fn=(5392)
785 4
+9 5
+1 1
+18 2

fn=(2034) CommitTsShmemBuffers
471 4
+1 34
+1 4

fn=(2032)
480 2
+1 1
cfn=(2034)
calls=1 -10 
* 21
* 3
cfi=(93)
cfn=(2020)
calls=1 146 
* 52
* 1
+2 2

fn=(2198)
491 4
+3 1
+2 2
-1 2
cfn=(2034)
calls=1 -24 
* 21
* 8
cfi=(93)
cfn=(2196)
calls=1 167 
* 3371
+4 5
cfi=(87)
cfn=(2168)
calls=1 373 
* 983
* 1
+4 4
+4 2
+1 3
+1 2
+1 2
+4 4

fn=(5686)
148 11
+13 5
+1 1
+62 2

fl=(249)
fn=(5084) transformParamRef
812 14
+7 8
+1 14
cfi=(293)
cfn=(5086)
calls=2 405 
* 1381
* 4
+4 4
+6 2
+1 10

fn=(4448) transformExprRecurse
165 28
+3 8
+4 4
cfi=(52)
cfn=(4006)
calls=4 3263 
* 108
+2 56
+12 4
+1 6
+2 14
cfi=(226)
cfn=(4450)
calls=2 471 
* 522
* 2
+1 2
+22 2
+2 7
+3 5
cfn=(4870) transformAExprOp
calls=1 849 
* 137929
* 1
+1 1
+40 1
+8 5
cfn=(4868) transformFuncCall
calls=1 1445 
* 595337
* 1
+1 1
379 4
+1 20

fn=(4449) transformExprRecurse'2
165 49
+3 14
+4 7
cfi=(52)
cfn=(4006)
calls=7 3263 
* 189
+2 117
+3 5
cfn=(4872) transformColumnRef
calls=1 510 
* 959
* 1
+1 1
+3 10
cfn=(5084)
calls=2 812 
* 1437
* 2
+1 2
+4 4
+1 6
+2 14
cfi=(226)
cfn=(4450)
calls=2 471 
* 520
* 2
+1 2
+13 5
cfn=(5090) transformTypeCast
calls=1 2663 
* 59947
* 1
+1 1
+8 2
+2 7
+3 5
cfn=(4870)
calls=1 849 
* 528548
* 1
+1 1
+40 1
379 7
+1 35

fn=(5090)
2663 7
+2 3
+8 7
cfi=(291)
cfn=(5092)
calls=1 295 
* 53483
+7 7
+11 4
+27 5
cfn=(4449)
calls=1 165 
* 767
* 1
+2 3
cfi=(250)
cfn=(4478)
calls=1 43 
* 24
* 1
+1 2
+8 3
+1 2
+3 11
cfi=(289)
cfn=(5102)
calls=1 83 
* 5608
* 1
+5 2
+8 1
+1 5

fn=(4446)
147 24
+6 12
+1 12
+2 20
cfn=(4448)
calls=4 +9 
* 734068
* 4
+2 12
+2 4
+1 8

fn=(4872)
510 8
+1 1
+1 1
+1 1
+1 1
+9 1
+6 4
+2 7
cob=(12)
cfi=(234)
cfn=(4874) plpgsql_pre_column_ref
calls=1 1065 
* 16
* 1
+1 2
+27 4
cfi=(222)
cfn=(4876)
calls=1 90 
* 10
* 6
+4 4
cfi=(222)
cfn=(4336)
calls=1 78 
* 10
* 2
+3 3
+3 8
cfi=(285)
cfn=(4878)
calls=1 760 
* 47
* 1
+2 2
+13 9
cfi=(285)
cfn=(4880)
calls=1 89 
* 76
* 1
+3 2
+4 1
761 4
+4 7
cob=(12)
cfi=(234)
cfn=(4884) plpgsql_post_column_ref
calls=1 1079 
* 704
* 1
+1 2
+1 3
+12 2
+28 1
+1 6

fn=(4868)
1445 5
+1 3
+5 1
+1 4
cfi=(222)
cfn=(4336)
calls=1 78 
* 10
* 2
+3 4
-1 8
cfn=(4449)
calls=2 165 
* 528955
* 10
cfi=(45)
cfn=(960)
calls=2 129 
* 453
* 2
-2 12
+14 4
+13 12
cfi=(288)
cfn=(5016)
calls=1 80 
* 65850
+7 2

fn=(4870)
849 10
+1 6
+1 6
+3 6
+27 6
+18 12
+17 12
+16 6
+2 10
cfn=(4449)
calls=2 165 
* 1137
* 2
+1 10
cfn=(4449)
calls=2 165 
* 61043
* 2
+2 24
cfi=(286)
cfn=(4902)
calls=2 749 
* 604177
* 2
+8 2
+1 4

fl=(278)
fn=(4724)
2579 21
+5 3
+3 12
+37 6

fl=(93)
fn=(2318) SlruSelectLRUPage
967 10
+1 6
+7 2
+1 2
+1 2
+1 2
+1 2
+1 2
+3 4
+2 81
+1 63
-1 18
+2 2
-4 48
+34 6
+1 2
+5 9
+1 2
-6 4
+79 4

fn=(2326) SlruPhysicalWritePage
720 7
+1 3
+1 6
+1 7
+1 3
+2 1
+7 4
+40 2
+14 2
+19 11
cfi=(17)
cfn=(462)
calls=1 203 
* 759
+1 4
cfi=(25)
cfn=(2328)
calls=1 2236 
* 122
* 1
+1 2
+7 2
+19 7
cob=(5)
cfi=(5)
cfn=(1956)
calls=1 0 
* 7
* 1
* 2
+9 1
cob=(5)
cfi=(5)
cfn=(472)
calls=1 0 
* 3
* 1
* 1
+1 2
cfi=(68)
cfn=(1596)
calls=1 1239 
* 14
+1 12
cob=(5)
cfi=(5)
cfn=(1568)
calls=1 0 
* 7
* 1
* 2
+12 1
cfi=(68)
cfn=(1598)
calls=1 1263 
* 13
+6 2
+2 2
cfi=(68)
cfn=(1596)
calls=1 1239 
* 14
+1 4
+8 1
cfi=(68)
cfn=(1598)
calls=1 1263 
* 13
+2 3
cfi=(25)
cfn=(2332)
calls=1 2413 
* 74
* 2
+8 1
+1 2

fn=(2020)
146 56
+4 14
+1 84
+1 84
+1 70
+1 84
+1 84
+1 84
+2 28
+1 14
+2 16
+1 4
-1 96
+1 24

fn=(2316) SimpleLruZeroPage
264 5
+1 3
+4 5
cfn=(2318)
calls=1 967 
* 229
* 1
+7 8
+1 7
+1 6
+1 24
+3 28
cob=(3)
cfi=(3)
cfn=(828)
calls=1 0 
* 912
* 1
+3 5
cfn=(2320) SimpleLruZeroLSNs
calls=1 +20 
* 14
+3 3
+2 1
+1 2

fn=(5700)
377 8
+1 3
+9 5
cfn=(2318)
calls=1 967 
* 42
* 1
+3 9
+1 7
-1 2
+7 9
+1 7
-1 2
+9 12
+1 2
+43 2

fn=(2314) SlruInternalDeleteSegment
1248 5
+3 11
cfi=(17)
cfn=(462)
calls=1 203 
* 464
+1 6
cfi=(57)
cfn=(1548)
calls=1 232 
* 50
* 2
+2 3
cob=(3)
cfi=(3)
cfn=(1972)
calls=1 0 
* 5
* 1
+1 2

fn=(2322) SimpleLruWritePage
579 5
+1 6
cfn=(2324) SlruInternalWritePage
calls=1 -72 
* 1760
+1 2

fn=(2300) SlruScanDirectory
1377 6
+1 1
+6 4
cfi=(25)
cfn=(718)
calls=1 2447 
* 340
* 1
+1 1
+4 12
cob=(3)
cfi=(3)
cfn=(424)
calls=3 0 
* 45
* 3
* 3
+2 14
+1 5
cob=(1)
cfi=(1)
cfn=(223)
calls=1 0 
* 1321
* 5
-1 2
+3 6
cob=(3)
cfi=(3)
cfn=(1246)
calls=1 0 
* 171
* 1
* 1
+1 3
+2 4
cfi=(57)
cfn=(2084)
calls=1 1286 
* 79
* 10
cfi=(57)
cfn=(2086)
calls=1 -61 
* 96
+2 7
cfn=(2312) SlruScanDirCbDeleteAll
calls=1 -45 
* 564
* 1
+1 2
-15 24
cfi=(25)
cfn=(2302)
calls=4 2513 
* 589
* 12
+19 3
cfi=(25)
cfn=(738)
calls=1 2565 
* 194
+2 1
+1 2

fn=(2324)
508 6
+1 3
+1 8
+4 10
+10 9
+1 7
-1 2
+2 7
-1 2
+8 7
+1 6
+3 9
cfi=(99)
cfn=(2170)
calls=1 1122 
* 137
+3 4
cfi=(99)
cfn=(2182)
calls=1 1726 
* 118
+3 6
cfn=(2326)
calls=1 720 
* 1129
* 1
+3 4
+9 5
cfi=(99)
cfn=(2170)
calls=1 1122 
* 137
+6 4
+3 7
+2 8
cfi=(99)
cfn=(2182)
calls=1 1726 
* 118
+3 4
+2 2

fn=(2312)
1354 7
+1 5
cfn=(2314)
calls=1 1248 
* 549
+2 1
+1 2

fn=(2196)
167 63
+4 35
cfn=(2020)
calls=7 -25 
* 371
* 42
cfi=(87)
cfn=(2168)
calls=7 373 
* 6530
* 7
+4 28
+9 35
cob=(3)
cfi=(3)
cfn=(828)
calls=7 0 
* 154
* 7
+2 21
+2 21
+1 21
+2 14
+4 14
+1 7
+1 35
+1 42
+1 35
+1 42
+1 35
+1 35
+1 35
+1 42
+1 35
+1 42
+3 35
+1 42
+2 14
+2 5
+1 7
+4 7
cfi=(16)
cfn=(460)
calls=1 46 
* 94
* 42
cfi=(16)
cfn=(460)
calls=6 46 
* 1208
+1 21
+2 28
+1 14
+2 1408
cfi=(99)
cfn=(2144)
calls=128 678 
* 8192
+3 1024
+1 896
+1 768
+1 896
+1 128
-9 533
+20 14
-1 35
cfi=(99)
cfn=(2158)
calls=7 603 
* 119
+7 21
+1 14
+1 84
cob=(3)
cfi=(3)
cfn=(950)
calls=7 0 
* 604
* 7
* 35
+1 14

fn=(2320)
305 5
+1 3
+2 4
+3 2

fl=(199)
fn=(5244) parse_one_reloption
1157 10000
+4 1000
+2 4000
+6 8000
+1 5000
cfi=(13)
cfn=(940)
calls=1000 925 
* 94500
* 1000
+1 13000
cob=(3)
cfi=(3)
cfn=(856)
calls=1000 0 
* 13000
* 1000
+1 5000
+2 6000
+4 3000
cfi=(59)
cfn=(1224)
calls=500 31 
* 88500
* 500
+1 1000
+6 500
+3 1500
+2 3500
cfi=(29)
cfn=(1240)
calls=500 5995 
* 99000
* 500
+1 1000
+5 1000
+9 500
+38 2000
+1 2000
+1 4000
+1 3000
cfi=(13)
cfn=(952)
calls=1000 1032 
* 72000
+1 5000

fn=(5236) initialize_reloptions
474 4
+4 1
+1 2
+4 6
-4 76
+6 2
+4 21
-4 241
+6 2
+4 7
-4 79
+6 2
+4 2
-4 29
+6 2
+2 3
+3 2
-1 6
cfi=(13)
cfn=(798)
calls=1 772 
* 122
* 1
+3 1
+1 2
+2 78
+1 42
+1 90
cob=(3)
cfi=(3)
cfn=(424)
calls=6 0 
* 110
* 6
* 6
+1 6
-5 76
+8 2
+2 273
+1 147
+1 315
cob=(3)
cfi=(3)
cfn=(424)
calls=21 0 
* 419
* 21
* 21
+1 21
-5 241
+8 2
+2 84
+1 49
+1 105
cob=(3)
cfi=(3)
cfn=(424)
calls=7 0 
* 131
* 7
* 7
+1 7
-5 79
+8 2
+2 24
+1 14
+1 30
cob=(3)
cfi=(3)
cfn=(424)
calls=2 0 
* 38
* 2
* 2
+1 2
-5 29
+8 5
+7 6
+3 1
+1 4

fn=(5234) parseRelOptions
1065 4500
+1 500
+1 500
+4 1500
+1 1
cfn=(5236)
calls=1 474 
* 3117
+4 1000
+1 180000
+1 9000
-2 166000
+4 1000
+2 4000
cfi=(13)
cfn=(940)
calls=500 925 
* 61500
* 500
+2 1500
+2 180000
+2 144000
+1 90000
+1 9000
-6 166000
+12 1500
+2 1500
cfi=(161)
cfn=(5008)
calls=500 1918 
* 96000
* 500
+4 6000
cfi=(302) /home/mithuncy/fsm_code/src/backend/utils/adt/arrayfuncs.c
cfn=(5240) deconstruct_array
calls=500 3462 
* 165500
+3 1000
+2 8000
+1 10000
+4 2000
+2 24000
+2 13000
+1 18000
cob=(3)
cfi=(3)
cfn=(1044)
calls=1000 0 
* 47000
* 1000
-1 2000
+3 14000
cfn=(5244)
calls=1000 +38 
* 450000
+2 1000
-9 7000
+13 3000
-20 5500
+36 1500
cfi=(13)
cfn=(952)
calls=500 1032 
* 42500
+1 1500
+1 1500
cfi=(13)
cfn=(952)
calls=500 1032 
* 42500
+3 1500
+1 500
+1 2000

fn=(5246) allocateReloptStruct
1258 3000
+1 1000
+3 1000
+1 117000
-1 37500
+4 1500
cfi=(13)
cfn=(2546)
calls=500 956 
* 99000
+1 1000

fn=(5230) heap_reloptions
1456 4000
+3 3500
+15 3000
cfn=(5232) default_reloptions
calls=500 1359 
* 8465618
* 500
+8 1000

fn=(5248) fillRelOptions
1285 5000
+2 1000
+2 1000
+3 9000
+2 18000
+2 1795500
cob=(3)
cfi=(3)
cfn=(446)
calls=85500 0 
* 3193500
* 85500
* 171000
+3 99000
+3 123000
+3 10000
+1 9000
+1 5500
-1 1500
-1 1000
+3 500
-3 1000
+3 500
+2 70000
+1 19500
+1 65000
-1 6500
-1 13000
+3 6500
-3 1000
+3 500
+2 10000
+1 2000
+1 10000
-1 1000
-1 2000
+3 1000
+24 9000
+1 9000
-49 333000
+52 18000
-57 37500
+61 2000
+1 1000

fn=(3560)
1000 3012
+6 9032
cfi=(190)
cfn=(3384)
calls=500 428 
* 1045935
* 502
+4 1506
+1 4
+2 4000
+3 4500
+6 4000
cfn=(5230)
calls=500 1456 
* 8477618
* 500
+1 500
+17 500
+1 1004

fn=(5232)
1359 3500
+44 3000
cfn=(5234)
calls=500 1065 
* 1994618
* 500
+3 1500
+3 2500
cfn=(5246)
calls=500 1258 
* 261000
* 500
+2 5000
cfn=(5248)
calls=500 1285 
* 6148000
+3 1500
cfi=(13)
cfn=(952)
calls=500 1032 
* 42500
+2 500
+1 1000

fl=(229)
fn=(4012)
2093 8
+1 4
cfi=(13)
cfn=(2950)
calls=1 853 
* 153
* 5
+2 1
+1 1
+7 4
cfi=(46)
cfn=(966)
calls=1 78 
* 10
* 2
+2 3
+2 5
cob=(3)
cfi=(3)
cfn=(446)
calls=1 0 
* 22
* 1
* 2
+2 2
+4 3
-10 7
+25 2
+1 5
+7 2
+3 1
+3 4
cfi=(151)
cfn=(3444)
calls=1 1114 
* 33203
* 1
+1 2
+7 8
+1 4
+1 4
+1 3
+2 4
+5 1
cfi=(54)
cfn=(3464)
calls=1 381 
* 5
* 7
cfi=(230)
cfn=(4014)
calls=1 4668 
* 51
* 1
+2 2
+1 1
+12 3
+1 2
+6 3
cfi=(151)
cfn=(3418)
calls=1 1161 
* 103
+3 5
cfi=(161)
cfn=(4018) OidFunctionCall1Coll
calls=1 1406 
* 376422206
+1 5

fl=(313)
fn=(5406)
317 20000
+1 10000
+1 2000
+2 2000
+1 2000
+5 8000
+8 4000
+7 46000
+3 4000
+3 2000
+15 10000
+6 12000
+1 6000
cfi=(50)
cfn=(3330)
calls=1500 2612 
* 24000
* 3000
+2 3000
+2 5000
+6 3500
cfi=(314)
cfn=(5408)
calls=500 133 
* 4696620
* 500
+7 1000
+10 2000
+15 4000
+3 12000
cfn=(5428) ReadBufferBI
calls=2000 82 
* 849365
* 2000
+1 26000
+1 3000
cfi=(316)
cfn=(5432)
calls=500 221 
* 1907521
+1 8000
cfi=(50)
cfn=(3240)
calls=2000 3553 
* 330000
* 2000
+50 4000
+1 20000
cfn=(5436) GetVisibilityMapPins
calls=2000 125 
* 106500
* 2000
+12 18000
+1 6000
cfi=(185)
cfn=(5440)
calls=2000 663 
* 94000
* 2000
+1 10000
+3 4000
+1 1000
+9 6000
cfi=(50)
cfn=(3240)
calls=1500 3553 
* 171000
+1 3000
+1 4500
cfi=(50)
cfn=(3360)
calls=1500 3316 
* 220500
* 1500
+8 6000
+7 12000
cfi=(314)
cfn=(5452)
calls=1500 151 
* 13272460
* 1500
397 7000
527 19500
+8 3000
+2 6000
+2 6000
cfi=(159)
cfn=(5468) ConditionalLockRelationForExtension
calls=1500 418 
* 3206110
* 4500
+35 7500
cfn=(5428)
calls=1500 82 
* 7691587
* 1500
+6 3000
+6 6000
cfi=(50)
cfn=(3240)
calls=1500 3553 
* 247500
+8 3000
+1 6000
cfi=(159)
cfn=(5492) UnlockRelationForExtension
calls=1500 450 
* 2867238
+7 13500
+2 6000
+5 7500
cfi=(185)
cfn=(5494)
calls=1500 42 
* 1456500
+2 4500
cfi=(185)
cfn=(5440)
calls=1500 +52 
* 63000
* 3000
+15 13500
cfi=(50)
cfn=(3330)
calls=1500 2612 
* 24000
* 1500
+2 1500
+1 8000

fn=(5428)
82 21000
+4 7000
+4 14000
+2 12000
cfi=(50)
cfn=(3330)
calls=3000 2612 
* 48000
* 6000
+2 6000
cfi=(50)
cfn=(5430)
calls=1500 3354 
* 175500
+1 4500
+3 6000
cfi=(50)
cfn=(3360)
calls=1500 3316 
* 361500
+1 3000
+4 13500
cfi=(50)
cfn=(3202)
calls=1500 642 
* 7066087
* 4500
cfi=(50)
cfn=(3202)
calls=500 642 
* 535365
* 2000
+4 6000
cfi=(50)
cfn=(5430)
calls=2000 3354 
* 234000
+1 6000
+2 2000
+1 7000

fn=(5436)
125 18000
+10 22000
+1 7000
cfi=(316)
cfn=(5438)
calls=500 245 
* 20000
* 3500
-1 4000
+4 6000
-2 4000
+3 16000
+1 2000
+28 4000

fn=(5444)
40 700000
+11 787500
+2 875000
cfi=(185)
cfn=(5446)
calls=87500 195 
* 24622500
* 87500
+3 175000
+4 262500
cfi=(50)
cfn=(3330)
calls=87500 2612 
* 1400000
* 612500
cfi=(50)
cfn=(3330)
calls=87500 2612 
* 1400000
* 525000
+7 350000
+2 787500
+1 612500
+2 525000
+2 175000

fl=(80)
fn=(1892)
121 108
+11 126
+1 36
+3 216
cfi=(81)
cfn=(1894) pvsnprintf
calls=18 -29 
* 8924
* 18
+2 72
+3 108
+1 36
+12 36

fn=(1918)
164 2545
+1 1527
cob=(3)
cfi=(3)
cfn=(424)
calls=509 0 
* 9659
* 509
* 3054
cfn=(1920)
calls=509 +50 
* 44816
+1 1018

fn=(1924)
176 180
+2 210
+4 240
+1 150
+1 210
+1 60

fn=(3744)
241 174
+4 145
cfn=(1922)
calls=29 +26 
* 1015
+3 348
cob=(3)
cfi=(3)
cfn=(856)
calls=29 0 
* 426
* 29
+1 174
+1 58

fn=(1888)
47 6140
+1 1535
+2 6140
cfi=(13)
cfn=(940)
calls=1535 925 
* 188472
* 3070
+1 4605
+1 4605
cfn=(1890)
calls=1535 +11 
* 18420
+1 3070

fn=(1926)
79 132
+1 12
cob=(5)
cfi=(5)
cfn=(472)
calls=12 -80 
* 36
* 12
* 24
+8 12
cob=(5)
cfi=(5)
cfn=(472)
calls=12 -88 
* 36
* 12
* 24
+1 72
+1 72
cfn=(1892)
calls=12 +31 
* 5880
* 12
+3 24
+6 24

fn=(1920)
215 528072
+4 440060
cfn=(1922)
calls=88012 +52 
* 3080420
+3 1056144
cob=(3)
cfi=(3)
cfn=(856)
calls=88012 0 
* 1147242
* 88012
+1 528072
+7 616084
+1 176024

fn=(1890)
63 531108
+1 531108
+1 354072
+1 354072
+1 354072

fn=(1922)
271 616385
+7 176110
+2 880550
+7 528330
+4 352220
+1 88055
+22 440275

fl=(192)
fn=(3432)
146 5
+1 4
cfi=(80)
cfn=(1922)
calls=1 271 
* 35
+1 5
cfn=(3434) pq_writeint32
calls=1 -72 
* 23
+1 2

fn=(3434)
76 4
+1 3
+3 8
+1 6
+1 2

fl=(113)
fn=(2298)
444 3
+11 6
cfi=(87)
cfn=(2000)
calls=1 +38 
* 23
* 1
+1 4
cfi=(87)
cfn=(2002)
calls=1 +20 
* 21
* 1
+3 5
cfi=(87)
cfn=(2168)
calls=1 -86 
* 1061
-1 1
+3 4
+5 4
+1 4
+1 2
+2 2
+2 791
+1 791
+1 1582
-4 455
+11 1
+2 2
-1 8
cfi=(93)
cfn=(2196)
calls=1 167 
* 2104
+3 1
+2 4
+5 4
cfi=(93)
cfn=(2300)
calls=1 1377 
* 3533
+3 5
cfi=(99)
cfn=(2170)
calls=1 1122 
* 137
+1 5
cfi=(93)
cfn=(2316)
calls=1 264 
* 1254
* 1
+2 4
cfi=(93)
cfn=(2322)
calls=1 +81 
* 1773
+1 4
cfi=(99)
cfn=(2182)
calls=1 1726 
* 91
+2 2

fn=(2080)
427 3
+4 6
cfi=(87)
cfn=(2000)
calls=1 +62 
* 23
* 1
+1 4
cfi=(87)
cfn=(2002)
calls=1 +44 
* 21
* 1
+2 3
cfi=(93)
cfn=(2020)
calls=1 146 
* 52
* 5
cfi=(87)
cfn=(2002)
calls=1 +42 
* 21
* 1
+2 1
+1 2

fn=(3640)
776 8
+3 12
+1 2
+84 8

fn=(3766)
1102 6
+5 8
+1 2
+50 4

fn=(3692)
875 6
+7 12
+1 2
+30 4

fl=(142)
fn=(2836)
225 8
+1 2
+2 10
+6 2
+1 6

fl=(159)
fn=(5492)
450 7500
+3 15000
+4 9000
cfi=(91)
cfn=(3104)
calls=1500 1885 
* 2832738
+1 3000

fn=(2930)
69 1881
+4 2508
+2 3135
+1 63
+2 1818
+1 1254

fn=(3102)
182 25610
+3 51220
+2 30732
cfi=(91)
cfn=(3104)
calls=5122 1885 
* 12761437
+1 10244

fn=(3038)
106 28110
+5 28110
cfn=(3040) SetLocktagRelationOid
calls=5622 -24 
* 718340
+2 50598
cfi=(91)
cfn=(3044)
calls=5622 738 
* 11822332
* 5622
+18 11244
+2 5621
cfi=(155)
cfn=(2988)
calls=5621 680 
* 376607
+1 16863
cfi=(91)
cfn=(3064)
calls=5621 1709 
* 39347
+2 11244

fn=(3040)
87 28110
+3 16866
cfi=(172)
cfn=(3042) IsSharedRelation
calls=5622 225 
* 560924
* 11244
+1 36
+2 11208
+2 78456
+1 11208
-1 252
+1 36

fn=(3486) LockSharedObject
966 8
+3 9
+6 6
cfi=(91)
cfn=(3488)
calls=1 712 
* 2117
+3 1
cfi=(155)
cfn=(2988)
calls=1 680 
* 67
+1 2

fn=(5468)
418 7500
+3 15000
+4 9000
cfi=(91)
cfn=(3488)
calls=1500 712 
* 3168610
* 3000
+1 3000

fn=(5398)
581 4
+3 7
+2 6
cfi=(91)
cfn=(3488)
calls=1 712 
* 2117
+1 2

fl=(162)
fn=(3178)
215 12865
+1 7719
+4 5146
+7 10292
+17 10292
+1 12770
cfi=(177)
cfn=(3180)
calls=2554 569 
* 23308895
* 5108
+6 76
+21 95
cfi=(177)
cfn=(3552)
calls=19 1162 
* 1232
* 19
+4 5146
+1 2057
+2 2064
+2 2573
+1 5146

fn=(2948) bthandler
107 316
+1 316
cfi=(13)
cfn=(2950)
calls=79 853 
* 23669
* 395
+2 158
+1 158
+1 158
+1 158
+1 158
+1 158
+1 158
+1 158
+1 158
+1 158
+1 158
+1 158
+1 158
+1 158
+1 158
+1 158
+2 158
+1 158
+1 158
+1 158
+1 158
+1 158
+1 158
+1 158
+1 158
+1 158
+1 158
+1 158
+1 158
+1 158
+1 158
+1 158
+1 158
+1 158
+1 158
+1 158
+2 79
+1 158

fn=(3160)
347 15324
+8 15324
cfi=(173)
cfn=(3162)
calls=2554 79 
* 739570
* 2554
+3 5108
cfi=(13)
cfn=(940)
calls=2554 925 
* 1097307
* 2554
+1 25540
+1 25540
+1 10216
+1 22986
cfi=(13)
cfn=(940)
calls=2554 925 
* 266309
* 7662
+4 5108
+1 5108
+1 5108
+1 5108
+2 5108
+1 5108
+7 15324
+2 10216
+2 7662
+2 2554
+1 5108

fn=(3398)
453 10216
+1 7662
+3 10216
+3 8152
+2 8152
+3 5108
+1 10216
+5 10216
+1 10216
cfi=(13)
cfn=(952)
calls=2554 1032 
* 217090
+2 10216
+2 10216
+2 10216
+3 7662
cfi=(13)
cfn=(952)
calls=2554 1032 
* 566132
+1 5108

fn=(3168)
394 20432
+1 7662
+3 10216
+9 5108
+1 5108
+1 10216
+1 25540
+18 10216
+10 15324
+3 5108
-2 30648
cob=(3)
cfi=(3)
cfn=(482)
calls=2554 0 
* 146487
* 2554
+3 5108
+3 7662
cfi=(111)
cfn=(3170)
calls=2554 204 
* 151453
+1 5108

fn=(3606)
721 2064
+1 1548
+1 1548
+2 516
+3 1032
+1 516
+22 1032

fl=(176)
fn=(3410)
171 12755
+10 10204
+2 1512
cfn=(3490) pairingheap_remove_first
calls=504 -37 
* 17640
+1 504
+7 6141
+1 6141
+6 10235
+1 8188
+10 4094
+12 6141
+1 4094
+1 20
+2 5102

fn=(3490)
146 2016
+7 1512
+1 1512
+2 2520
cfn=(3492) merge_children
calls=504 +79 
* 5544
* 1008
+1 2016
+6 504
+1 1008

fn=(3492)
235 2520
+6 1008
+1 1008
+43 1008

fn=(3416)
131 39
+3 26
+1 26

fn=(3138)
113 12755
+1 5102
+3 17857
cfn=(3140) merge
calls=2551 -37 
* 218956
* 5102
+1 7653
+1 7653
+1 5102

fn=(3140)
80 15306
+1 5102
+1 1008
+1 4094
+4 16376
cfi=(110)
cfn=(3152)
calls=2047 945 
* 137149
* 4094
+10 8188
+1 20
+1 15
+1 20
+1 15
+2 5
+1 10
-5 6126
+1 8168
+1 6126
+2 2042
+1 5092

fl=(200) /home/mithuncy/fsm_code/src/backend/catalog/pg_db_role_setting.c
fn=(3564) ApplySetting
222 32
+5 32
cfi=(178)
cfn=(3482)
calls=4 81 
* 456
+5 36
cfi=(178)
cfn=(3482)
calls=4 81 
* 456
+6 40
cfi=(173)
cfn=(3126)
calls=4 +84 
* 178041
* 4
+2 16
cfi=(173)
cfn=(3172)
calls=4 406 
* 13442
* 12
+20 12
cfi=(173)
cfn=(3394)
calls=4 489 
* 11156
+1 8

fl=(236)
fn=(4188)
110 6012
+1 4008
+2 4008
+1 2004
+1 4008
-5 3042
+1 2028
+2 2028
+1 1014
+1 2028

fl=(270)
fn=(4688)
423 30
+1 6
+1 6
+10 18
+3 48
+10 6
+1 24
cfi=(271)
cfn=(4690)
calls=6 78 
* 48
* 24
623 12
+3 12
+3 36
cfi=(45)
cfn=(1586)
calls=6 260 
* 1740
* 18
+8 12

fn=(4686)
1441 21
+1 12
cfi=(13)
cfn=(2950)
calls=3 853 
* 606
* 15
+2 6
+1 9
+1 9
+1 6
+1 6
+1 12
+1 6
+1 6
+1 9
+3 9
+1 12
+1 12
+1 9
-1 6
+7 6
+10 3
+1 6

fn=(4692)
245 36
+9 36
+3 45
+1 9
+2 36
cfi=(271)
cfn=(4690)
calls=9 78 
* 90
* 18
+2 27
+3 36
+51 18
+2 36
+1 9
-59 63
+86 18
+1 45
cfi=(45)
cfn=(1586)
calls=9 -87 
* 2610
* 9
+6 18
+4 27
+1 27
+1 18
+1 27
+1 18

fn=(4720)
2388 21
+1 12
cfi=(13)
cfn=(2950)
calls=3 853 
* 627
* 15
+1 9
+2 6
+1 9
+1 9
+2 6
+1 6
+1 6
+1 12
-1 6
+2 18
cfi=(262)
cfn=(4684)
calls=3 1089 
* 57
-1 15
-1 6
+3 12
+2 12
+2 9
+11 9
cfi=(277)
cfn=(4722)
calls=3 6698 
* 36
* 6
+4 6
+5 12
+1 6
+1 15
-1 9
+2 6
+1 15
-1 3
+2 24
-1 3
-1 9
+21 3
+1 6

fl=(17)
fn=(476) dopr_outch
1395 13055
+1 25804
+10 18277
+1 5222

fn=(1138)
231 638
+4 348
+1 348
cfn=(1140) pg_vsprintf
calls=58 -21 
* 27546
* 58
+2 58
+1 116

fn=(1916) dopr_outchmulti
1411 138
+2 46
+2 105
cfn=(476)
calls=21 -20 
* 378
+1 21
+3 2
+4 8
+1 9
+2 2
+1 4
+11 8
+1 16
cob=(3)
cfi=(3)
cfn=(828)
calls=2 0 
* 41
* 2
+1 14
+1 4
-22 8
+24 46

fn=(2432)
265 33
+4 18
+1 18
cfn=(2434) pg_vfprintf
calls=3 -27 
* 3114
* 3
+2 3
+1 6

fn=(464) pg_vsnprintf
175 14686
+10 4196
+5 8392
+1 10490
+1 2098
+1 2098
+1 2098
+1 12588
cfn=(466) dopr
calls=2098 377 
* 2067895
+1 4196
+1 18882
+1 2098
-1 2098
+2 4196

fn=(1238) trailing_pad
1512 17940
+1 7176
+2 7176

fn=(466)
377 12954
+1 2159
cob=(5)
cfi=(5)
cfn=(472)
calls=2158 0 
* 6474
cob=(1)
cfi=(1)
cfn=(223)
calls=1 0 
* 941
* 2163
* 4318
+1 2159
+27 2159
+2 2159
+3 18948
+3 22985
cob=(3)
cfi=(3)
cfn=(536)
calls=4596 0 
* 105951
cob=(1)
cfi=(1)
cfn=(223)
calls=1 0 
* 1328
* 4601
* 4597
+3 45970
cfn=(474) dostr
calls=4597 1358 
* 258488
+1 18388
+3 18388
+1 30
+1 9134
+8 9414
+1 4304
+3 2152
+3 8608
-3 2555
+3 10220
+2 1119
+1 17896
+2 6
cob=(3)
cfi=(3)
cfn=(424)
calls=2 0 
* 30
* 2
-2 2234
+2 3351
cob=(3)
cfi=(3)
cfn=(424)
calls=1117 0 
* 17003
* 1117
* 6714
cfn=(474)
calls=1119 1358 
* 82353
+1 4476
+2 1119
+3 32292
+1 17940
+1 10764
+1 14352
+2 25164
+1 29358
+10 196
+1 49
+11 490
+1 49
-1 510
+1 51
+85 1012
+3 506
+1 506
+20 316
+2 158
+3 158
+2 158
+11 158
+2 158
+1 76
+2 1194
+2 30
cfn=(1230) fmtint
calls=2 1015 
* 586
-2 219
+2 1095
cfn=(1230)
calls=73 1015 
* 19308
* 60
cfn=(1230)
calls=4 1015 
* 1390
+2 79
+5 14036
+2 7018
+3 7018
+2 7018
+11 7018
+2 7018
+1 9538
+2 57133
+2 45105
cfn=(1230)
calls=3007 1015 
* 869005
* 7530
cfn=(1230)
calls=502 1015 
* 127784
+2 3509
+83 14352
408 29593
738 4318

fn=(474)
1358 55824
+2 18608
+2 18130
cfn=(476)
calls=2590 +33 
* 61980
+1 2590
+3 6714
+4 26844
+1 59985
+2 92
+1 13422
+11 26844
+1 53688
cob=(3)
cfi=(3)
cfn=(482)
calls=6710 0 
* 117358
cob=(1)
cfi=(1)
cfn=(223)
calls=1 0 
* 1310
* 6715
+1 46977
+1 20133
+1 13422
-23 26850
+25 18608

fn=(1232) adjust_sign
1448 395
+1 158
+5 158
+2 79
+1 158

fn=(462)
203 6292
+4 3432
+1 3432
cfn=(464)
calls=572 -33 
* 316995
* 572
+2 572
+1 1144

fn=(1236) leading_pad
1476 25116
+3 14398
+2 42
+6 84
+2 147
cfn=(1916)
calls=21 -78 
* 753
+1 42
+3 84
+1 84
-1 14268
+1 14268
+2 14
cfn=(1916)
calls=2 -85 
* 99
+1 6
+2 7176
+8 7176

fn=(1140)
215 348
+3 232
+1 58
+1 58
+1 58
+1 58
+1 348
cfn=(466)
calls=58 377 
* 25516
+1 116
+1 522
+1 58
-1 58
+2 116

fn=(1230)
1015 35880
+4 3588
+1 3588
+2 3588
+4 25116
+4 79
+1 79
+1 79
+6 3508
+1 3508
+1 3508
+6 1
+1 1
+1 1
+1 1
+11 7808
cfn=(1232)
calls=79 1448 
* 948
* 158
+3 7176
+9 7178
+7 217971
+1 67068
+1 33534
+3 28704
+2 28704
cfn=(1234) compute_padlen
calls=3588 1462 
* 64533
* 3588
+2 21528
cfn=(1236)
calls=3588 1476 
* 83757
+2 7176
+3 39468
cfn=(474)
calls=3588 1358 
* 255253
+2 17940
cfn=(1238)
calls=3588 1512 
* 32292
* 3588
+1 7176

fn=(1234)
1462 17940
+3 17940
+1 7176
+1 3537
+1 7176
+2 3588
+1 7176

fn=(2434)
243 18
+4 6
+5 12
+1 9
+1 6
+1 3
+1 3
+1 18
cfn=(466)
calls=3 377 
* 931
+2 9
cfn=(2436) flushbuffer
calls=3 +40 
* 2081
+1 12
+1 6

fn=(2436)
299 12
+1 24
+6 21
+4 24
cob=(3)
cfi=(3)
cfn=(2442)
calls=2 0 
* 272
cob=(1)
cfi=(1)
cfn=(223)
calls=1 0 
* 1667
* 7
* 3
+1 24
+1 9
+3 12
+1 6

fl=(30)
fn=(788)
364 2
+8 2
cfn=(790)
calls=1 237 
* 15784
* 1
+1 2
+1 2

fn=(1426) pg_TZDIR
44 4
+6 3
+3 3
cfi=(11)
cfn=(1428)
calls=1 705 
* 4651
+1 2
cob=(3)
cfi=(3)
cfn=(424)
calls=1 -54 
* 23
* 1
* 5
cob=(3)
cfi=(3)
cfn=(424)
calls=1 -54 
* 23
* 1
* 5
cfi=(16)
cfn=(460)
calls=1 -8 
* 164
+2 1
+1 1
+5 4

fn=(792) init_timezone_hashtable
203 3
+3 118
+2 1
+1 1
+2 6
cfi=(31)
cfn=(794)
calls=1 317 
* 5889
* 1
+4 3
+3 1
+1 2

fn=(790)
237 35
+7 21
cob=(3)
cfi=(3)
cfn=(424)
calls=7 0 
* 121
* 7
* 14
+3 21
+1 1
cfn=(792)
calls=1 -45 
* 6025
* 3
+9 14
+1 7
+1 850
cfi=(32)
cfn=(834)
calls=85 106 
* 1273
* 85
-1 368
+2 14
+2 42
cfi=(31)
cfn=(836)
calls=7 910 
* 3628
* 7
+4 14
+3 15
+6 8
cob=(3)
cfi=(3)
cfn=(446)
calls=2 0 
* 44
* 2
* 4
+2 6
cfi=(35)
cfn=(846) tzparse
calls=1 938 
* 1484
* 3
+6 5
cob=(3)
cfi=(3)
cfn=(810)
calls=1 0 
* 14
* 1
* 1
+2 6
cfi=(35)
cfn=(1420) tzload
calls=1 589 
* 1248581
* 2
+12 12
cfi=(31)
cfn=(836)
calls=2 910 
* 1144
* 2
+6 12
cob=(3)
cfi=(3)
cfn=(810)
calls=2 0 
* 76
* 2
+1 14
cob=(3)
cfi=(3)
cfn=(856)
calls=2 0 
* 14724
* 2
+2 4
+1 28

fn=(1424) pg_open_tzfile
77 6
+7 1
cfn=(1426)
calls=1 -40 
* 4891
* 6
cfi=(16)
cfn=(460)
calls=1 -38 
* 836
+1 3
cob=(3)
cfi=(3)
cfn=(424)
calls=1 -85 
* 23
* 1
* 3
+2 6
cob=(3)
cfi=(3)
cfn=(424)
calls=1 -87 
* 19
* 1
* 3
+10 2
+18 2
+6 4
cob=(3)
cfi=(3)
cfn=(1120)
calls=1 0 
* 14
* 1
* 4
cob=(3)
cfi=(3)
cfn=(1120)
calls=1 0 
* 27
* 1
* 2
+1 4
+1 6
+2 3
cob=(3)
cfi=(3)
cfn=(424)
calls=1 0 
* 19
* 1
* 1
+1 3
+1 3
-1 8
cfn=(1430) scan_directory_ci
calls=1 +27 
* 30383
* 3
+1 3
-1 8
cfn=(1430)
calls=1 +27 
* 8834
* 6
+4 10
+1 12
cob=(3)
cfi=(3)
cfn=(424)
calls=2 0 
* 34
* 2
* 8
+1 4
+1 3
+3 1
-1 1
+3 2
+1 10
cfi=(16)
cfn=(460)
calls=1 -93 
* 304
+2 6
cob=(5)
cfi=(5)
cfn=(676)
calls=1 0 
* 7
* 1
+1 4

fn=(1430)
153 16
+1 2
+4 6
cfi=(25)
cfn=(718)
calls=2 2447 
* 608
* 2
+2 2
+6 564
+1 4
+2 548
cob=(3)
cfi=(3)
cfn=(424)
calls=137 0 
* 2411
* 137
* 548
+1 104
cfi=(32)
cfn=(970)
calls=13 70 
* 1131
-1 26
+4 16
cfi=(16)
cfn=(460)
calls=2 46 
* 328
+1 2
+1 2
-15 846
cfi=(25)
cfn=(1432)
calls=141 2528 
* 31111
* 423
+19 6
cfi=(25)
cfn=(738)
calls=2 2565 
* 368
+2 2
+1 4

fl=(38)
fn=(3716)
2058 10
+7 4
+1 8
+9 4
+1 4
+6 4
+6 1500
+3 2000
+3 3500
+1 3500
+1 3500
+1 1000
+2 2000
+1 2000
+7 1000
+1 3000
-1 1500
+3 1000
+1 2500
-1 1500
+3 1000
+1 2500
+1 1000
-1 500
-1 2000
+11 1000
-42 2502
+45 2
+3 2
cfn=(3718) pgstat_clear_snapshot
calls=2 5615 
* 22
+1 4

fn=(3780) pgstat_setheader
4156 272
+1 204
+1 136

fn=(3718)
5615 4
+2 6
+4 2
+1 2
+1 2
+1 2
+1 4

fn=(888)
3164 12
+1 6
+3 6
+1 1
+3 6
cob=(3)
cfi=(3)
cfn=(424)
calls=2 0 
* 30
* 2
* 12
cfi=(19)
cfn=(3524)
calls=2 821 
* 416
* 2
+7 10
+2 16
cob=(3)
cfi=(3)
cfn=(856)
calls=2 0 
* 24
* 2
+1 12
+2 10
+1 6

fn=(3086)
1715 22488
+1 16866
+1 22488
+3 16352
+1 5108
+9 39354
+11 22488
+1 15261
-1 10174
+2 5083
+3 4312
cfn=(3088) get_tabstat_entry
calls=539 +8 
* 313975
* 1078
+1 11244

fn=(5498) add_tabstat_xact_level
1885 2500
+8 1500
cfn=(5500) get_tabstat_stack_level
calls=500 -30 
* 7633
* 500
+4 500
-1 1500
cfi=(13)
cfn=(2156)
calls=500 815 
* 95000
* 500
+3 1500
+1 2000
+1 1500
+1 2000
+1 1500
+1 1500
+1 1000

fn=(3088)
1754 3234
+9 1617
+4 10
cob=(3)
cfi=(3)
cfn=(828)
calls=2 0 
* 52
* 2
+1 2
+1 2
+2 12
cfi=(31)
cfn=(794)
calls=2 317 
* 5594
* 2
+9 14
cfi=(31)
cfn=(836)
calls=2 910 
* 1805
* 3759
cfi=(31)
cfn=(836)
calls=537 910 
* 249991
* 539
+1 2156
+3 1078
+6 2156
+8 1617
+4 4
cfi=(13)
cfn=(2156)
calls=1 815 
* 1637
-1 1
+5 2
+1 1
-1 1076
+1 538
+2 4400
+2 20
cfi=(13)
cfn=(2156)
calls=5 815 
* 8774
-1 10
+3 15
-6 20
+6 3285
-6 6536
+13 7546
+1 1617
+1 1617
+5 1617
+2 539
+1 1078

fn=(5760)
2953 5
+1 2
+8 3
+1 2
cfn=(3768)
calls=1 813 
* 25
+7 5
+2 2
+2 5
+1 2

fn=(3778) pgstat_send_tabstat
920 272
+5 204
+7 272
+2 201
+1 201
+1 201
+1 201
+1 67
+1 67
+1 67
+1 134
+4 2
+1 2
+1 2
+1 2
+3 3
+1 8
+3 4
cfn=(3780)
calls=1 4156 
* 9
-4 201
+1 536
+3 268
cfn=(3780)
calls=67 4156 
* 603
+1 340
cfn=(3782) pgstat_send
calls=68 4169 
* 2448
+1 136

fn=(3782)
4169 340
+3 204
+3 204
+5 476
cob=(5)
cfi=(5)
cfn=(2502)
calls=68 0 
* 816
* 68
* 68
+1 136
+7 136

fn=(3784) pgstat_send_funcstats
964 6
+8 6
+40 4

fn=(2256)
2637 3
+7 6
cfi=(87)
cfn=(2000)
calls=1 493 
* 23
* 1
+2 5
cfi=(87)
cfn=(2168)
calls=1 373 
* 1064
-1 1
+3 4
+5 23
cob=(3)
cfi=(3)
cfn=(828)
calls=1 0 
* 4279
* 1
+4 6
cfi=(87)
cfn=(2000)
calls=1 493 
* 23
* 1
+2 5
cfi=(87)
cfn=(2168)
calls=1 373 
* 1270
-1 1
+3 4
+2 23
cob=(3)
cfi=(3)
cfn=(828)
calls=1 0 
* 849
* 1
+3 2
+1 2
+2 1428
+1 119
-3 599
+8 6
cfi=(87)
cfn=(2000)
calls=1 493 
* 23
* 1
+2 5
cfi=(87)
cfn=(2168)
calls=1 373 
* 1259
-1 1
+3 4
+2 23
cob=(3)
cfi=(3)
cfn=(828)
calls=1 0 
* 849
* 1
+3 2
+1 2
+2 1428
+1 119
-3 599
+9 2
-1 6
cfi=(87)
cfn=(2000)
calls=1 493 
* 23
* 1
+3 5
cfi=(87)
cfn=(2168)
calls=1 373 
* 1118
-1 1
+5 4
+2 23
cob=(3)
cfi=(3)
cfn=(828)
calls=1 0 
* 13344
* 1
+3 2
+1 2
+2 1428
+1 357
-3 599
+28 2

fn=(2608)
728 3
+8 3
+9 2
cob=(10)
cfi=(22)
cfn=(1810)
calls=1 0 
* 3
* 1
* 1
+1 7
+3 2
+8 1
cfi=(137)
cfn=(2556)
calls=1 32 
* 295
* 7
+25 1
+5 2

fn=(2914) pgstat_initialize
2750 2
+2 3
+3 13
+19 3
cfi=(67)
cfn=(2110)
calls=1 362 
* 32
+1 2

fn=(3768)
813 15
+12 21
+1 1
-1 2
+1 3
+1 2
-1 2
+2 1
+6 2
cfi=(26)
cfn=(3770)
calls=2 720 
* 39
* 2
+1 8
+1 12
cfi=(21)
cfn=(3772)
calls=2 1672 
* 34
* 2
-1 4
+3 4
+9 6
+1 6
cfi=(31)
cfn=(3774) hash_destroy
calls=2 -33 
* 972
+1 2
+8 4
+1 2
+1 2
+1 2
+2 6
+2 14
+2 5390
+11 3234
cob=(3)
cfi=(3)
cfn=(3074)
calls=539 0 
* 23118
* 539
* 1078
+2 2
+5 3222
+1 5830
+1 2120
+1 4240
cob=(3)
cfi=(3)
cfn=(856)
calls=530 0 
* 30406
* 530
-3 7
+1 77
+1 28
+1 56
cob=(3)
cfi=(3)
cfn=(856)
calls=7 0 
* 407
* 7
+2 4833
+2 195
cfn=(3778)
calls=65 +29 
* 6175
+1 130
-28 2723
+32 217
cob=(3)
cfi=(3)
cfn=(828)
calls=7 0 
* 7196
* 7
+2 14
-36 39
+43 6
+2 6
cfn=(3778)
calls=2 +13 
* 190
+1 6
+1 3
cfn=(3778)
calls=1 +11 
* 86
+3 2
cfn=(3784)
calls=2 +52 
* 16
+1 6

fn=(3786)
2991 15
+1 6
+3 3
+4 6
+3 12
+28 3
cfi=(26)
cfn=(3788)
calls=3 708 
* 15
* 3
+1 6
+7 3
cob=(3)
cfi=(3)
cfn=(424)
calls=1 0 
* 41
* 1
* 8
cob=(3)
cfi=(3)
cfn=(424)
calls=1 0 
* 41
* 1
* 2
+2 1
cfi=(21)
cfn=(656)
calls=1 1571 
* 22
* 2
cfi=(21)
cfn=(656)
calls=2 1571 
* 44
* 3
+5 15
+2 9
+1 9
+2 6
+2 8
cob=(3)
cfi=(3)
cfn=(856)
calls=1 0 
* 68
* 1
+1 6
+1 3
+3 5
+1 2
-1 10
+1 4

fn=(2050)
2609 3
+4 6
cfi=(87)
cfn=(2000)
calls=1 493 
* 23
* 1
+3 2
-1 4
cfi=(87)
cfn=(2000)
calls=1 493 
* 23
* 5
cfi=(87)
cfn=(2002)
calls=1 476 
* 21
* 1
+4 2
-1 4
cfi=(87)
cfn=(2000)
calls=1 493 
* 23
* 5
cfi=(87)
cfn=(2002)
calls=1 476 
* 21
* 1
+4 2
-1 6
cfi=(87)
cfn=(2000)
calls=1 493 
* 23
* 5
cfi=(87)
cfn=(2002)
calls=1 476 
* 21
* 1
+7 1
+1 2

fn=(2480)
356 4
+2 1
+8 1
+17 1
+1 1
+1 1
+1 1
+1 1
+1 1
+1 1
+1 1
+1 7
cfi=(77)
cfn=(1630)
calls=1 59 
* 10405
* 1
+1 5
+16 3
+4 4
+4 3
+7 6
cob=(3)
cfi=(3)
cfn=(1656)
calls=1 0 
* 5
* 1
* 4
+12 9
cob=(3)
cfi=(3)
cfn=(1802)
calls=1 0 
* 5
* 1
* 2
+10 1
+1 6
cob=(1)
cfi=(1)
cfn=(223)
calls=1 0 
* 1340
* 5
* 2
+16 6
cob=(1)
cfi=(1)
cfn=(223)
calls=1 0 
* 790
* 5
* 2
+16 1
+3 6
cob=(1)
cfi=(1)
cfn=(223)
calls=1 0 
* 758
* 5
* 2
+19 27
+1 21
+2 1
+1 1
+1 9
cob=(1)
cfi=(1)
cfn=(223)
calls=1 0 
* 1276
* 5
* 1
+1 2
+3 2
+9 21
+16 3
+3 6
cob=(1)
cfi=(1)
cfn=(223)
calls=1 0 
* 777
* 5
* 2
+12 3
+11 1
408 2
564 5
+8 3
cfi=(132)
cfn=(2518)
calls=1 26 
* 67
* 3
+18 1
+2 9
cob=(1)
cfi=(1)
cfn=(223)
calls=1 0 
* 1326
* 5
* 2
+8 1
+1 4
+8 5
cfi=(77)
cfn=(1942)
calls=1 89 
* 228
* 1
+22 4

fn=(3618) pgstat_bestart
2790 3
+14 3
+1 7
cob=(3)
cfi=(3)
cfn=(856)
calls=1 0 
* 70
* 1
* 1
+10 2
+5 3
+2 1
cfi=(105)
cfn=(2832)
calls=1 3272 
* 5
* 2
+5 1
cfi=(105)
cfn=(2834)
calls=1 3278 
* 5
* 2
+5 3
+5 3
+8 3
+33 5
+1 5
+2 3
+1 3
+1 2
+1 2
+1 2
+1 3
+3 4
+3 1
cfi=(54)
cfn=(3532)
calls=1 415 
* 5
* 3
+4 24
+1 7
+4 3
+16 2
+2 2
+1 3
+1 3
+2 4
+1 4
+1 7
+1 2
+1 2
+8 5
+3 3
+1 3
cfn=(888)
calls=1 3164 
* 281
+1 2

fn=(5500)
1863 2000
+3 1000
+1 2996
+3 1
-1 3
cfi=(13)
cfn=(798)
calls=1 772 
* 122
* 1
+3 3
+1 3
+1 2
+1 2
+2 1
+1 2
-1 499
+1 998

fn=(2982)
3193 12
+1 8
+2 24
+8 20
+1 12
+1 20
+1 8

fn=(5496)
1912 2500
+1 1500
+2 1000
+3 500
cfi=(26)
cfn=(3506)
calls=500 758 
* 4000
* 500
+2 2000
+2 2500
cfn=(5498)
calls=500 -37 
* 120633
+2 4000
+2 1000

fl=(14)
fn=(432)
395 16380
+33 6548
+2 3068
+1 412
+2 204
+2 2
+5 3276
+2 8180
+2 6544
+3 4542
+1 6056
+1 7570
+3 4542
+3 13626
cfi=(13)
cfn=(434)
calls=1514 729 
* 76222
+6 3028
+5 124
+2 248
+1 10
+2 488
+6 366
cob=(3)
cfi=(3)
cfn=(388)
calls=122 0 
* 26185
* 122
* 6
cob=(3)
cfi=(3)
cfn=(388)
calls=2 0 
* 404
* 2
* 124
+1 248
+17 372
+1 372
+1 496
+1 620
+1 248
+1 248
+6 372
+2 372
+3 12276
+2 372
+1 372
+1 372
+1 372
+21 248
+1 124
+2 1536
-2 768
+1 768
-1 884
+1 372
-1 248
+5 1116
cfi=(13)
cfn=(434)
calls=124 729 
* 6492
+6 124
+1 8190

fn=(956)
988 191240
+1 76496
+1 114744
+15 229488
+6 9162
+7 12216
+1 12216
-1 6108
+2 6108
+1 6108
-1 9162
-1 6108
+6 12216
+1 18324
+3 12216
+1 2530
+4 1518
cob=(3)
cfi=(3)
cfn=(590)
calls=506 0 
* 58844
* 506
* 7644
cob=(3)
cfi=(3)
cfn=(590)
calls=2548 0 
* 345718
* 2548
* 3054
+5 140776
cfn=(802) AllocSetFreeIndex
calls=35194 338 
* 747739
* 35194
+2 246358
+10 211164
+2 76496

fn=(1406)
566 12152
+1 6076
+11 300762
+2 9114
+3 12152
+2 3038
+2 15234
+2 20312
+3 9114
+8 9114
+1 6076
+1 9114
+8 6120
cob=(3)
cfi=(3)
cfn=(590)
calls=2040 0 
* 267429
* 2040
+2 10156
-27 16232
+31 12152
+1 6076

fn=(1516)
1069 18
+1 6
+1 9
+6 9
+15 9
+45 12
+7 6
+9 8
+1 8
-1 4
+2 4
+1 4
-1 6
-1 4
+6 8
+1 6
+1 10
cob=(3)
cfi=(3)
cfn=(556)
calls=2 0 
* 2062
* 2
* 2
+1 4
+6 18
+3 6
+1 6
+1 8
+1 10
+3 8
+2 6
+38 4
+18 5
cfn=(800)
calls=1 715 
* 91
* 1
+3 2
+23 6
cob=(3)
cfi=(3)
cfn=(856)
calls=1 0 
* 202
* 1
+3 5
cfn=(956)
calls=1 988 
* 58
+2 1
+2 6

fn=(800)
715 850400
+1 340160
+13 680320
+2 14260
+1 10695
+1 10695
cob=(3)
cfi=(3)
cfn=(388)
calls=3565 0 
* 1069810
* 3565
* 3565
+1 7130
+2 10695
+1 32085
+2 10695
+1 10695
+1 10695
+16 14260
+2 14260
+1 17825
+1 14260
+1 2052
+1 17825
+18 10695
+9 499545
cfn=(802)
calls=166515 338 
* 3530798
* 166515
+1 999090
+1 333030
+4 196994
+2 84426
+22 84426
+6 968611
+7 691865
+2 1106984
+2 553492
+14 1611
+2 5157
+1 5157
cfn=(802)
calls=1719 338 
* 37446
* 1719
+7 13752
+2 1639
+2 11473
+3 4917
+5 11473
+1 9834
+2 4917
+4 11473
+1 9834
-30 3278
+17 240
+5 560
+1 480
+2 240
+4 560
+1 480
-30 3382
+34 1611
+7 276746
+8 4833
+1 8055
+1 9666
+1 8
+6 6
+1 2
-1 4827
+1 1609
+1 508
-1 6357
+4 4833
cob=(3)
cfi=(3)
cfn=(388)
calls=1611 0 
* 353549
* 1611
* 1611
+6 4833
+8 3222
+3 4833
+1 6444
+1 8055
+6 3222
+1 6444
+1 6444
+1 6444
+1 4833
+6 4833
+5 11277
+3 4833
+1 4833
+21 3222
+1 3222
-31 410286
+5 957334
+3 410286
+1 410286
+21 273524
+1 336938

fn=(802)
338 610284
+5 406856
+2 764308
+11 573231
+1 1338669
+5 12351
+2 12351
+1 24702
-1 191077
+1 382154

fn=(1402)
628 6156
+1 3078
+1 4617
+13 6156
+2 9234
+6 7695
+1 4596
cfi=(13)
cfn=(1404)
calls=1532 156 
* 488904
+6 6156
+16 6156
+1 4617
+1 7695
+2 1539
+20 3078

fl=(69)
fn=(1600)
55 6
+1 1
cfn=(1602) pg_crc32c_sse42_available
calls=1 -21 
* 76
* 2
+1 2
+4 6
cfi=(71)
cfn=(1608)
calls=1 -38 
* 517
+1 2

fn=(1602)
35 3
+1 4
+3 11
cfi=(70)
cfn=(1604)
calls=1 264 
* 52
+7 4
+1 2

fl=(75)
fn=(2810)
466 7
+3 3
cfi=(80)
cfn=(1888)
calls=1 47 
* 154
+2 5
+37 3
cfi=(13)
cfn=(952)
calls=1 1032 
* 85
+1 4

fn=(2816)
547 2
+5 1
cfn=(2818) InitCommunication
calls=1 439 
* 8
+1 1
cfi=(57)
cfn=(2820)
calls=1 1846 
* 11
+3 1
cfi=(25)
cfn=(2822)
calls=1 761 
* 348
+1 1
cfi=(140)
cfn=(2824) smgrinit
calls=1 118 
* 202
+1 1
cfi=(50)
cfn=(2828)
calls=1 2444 
* 2875
+1 2

fn=(2866)
589 12
+1 4
+5 4
cfi=(57)
cfn=(2084)
calls=1 1286 
* 68
* 4
cfi=(57)
cfn=(2086)
calls=1 1336 
* 105
+7 1
cfi=(84)
cfn=(2868)
calls=1 465 
* 373
+8 1
+2 2
cfi=(101)
cfn=(2872)
calls=1 259 
* 591
+2 7
+4 3
cfi=(103)
cfn=(2874)
calls=1 106 
* 127
+6 4
+2 3
cfi=(138)
cfn=(2762)
calls=1 374 
* 18
+1 3
cfi=(138)
cfn=(2762)
calls=1 374 
* 18
+1 3
cfi=(138)
cfn=(2762)
calls=1 374 
* 18
+1 3
cfi=(138)
cfn=(2762)
calls=1 374 
* 18
+7 1
cfi=(50)
cfn=(2876)
calls=1 2468 
* 39
+5 3
+8 1
cfi=(53)
cfn=(2878)
calls=1 7896 
* 5951
* 1
+30 1
cfi=(148)
cfn=(2888)
calls=1 3440 
* 3728
+1 1
cfi=(151)
cfn=(2894) InitCatalogCache
calls=1 999 
* 208712
+1 1
cfi=(154)
cfn=(2906)
calls=1 131 
* 515
+3 1
cfi=(156)
cfn=(2912) EnablePortalManager
calls=1 105 
* 3542
+3 4
+1 1
cfi=(38)
cfn=(2914)
calls=1 2750 
* 55
+6 1
cfi=(148)
cfn=(2916)
calls=1 3477 
* 121800
+10 3
cfi=(67)
cfn=(2956)
calls=1 334 
* 32
+3 1
cfi=(105)
cfn=(2832)
calls=1 3272 
* 5
* 2
+16 4
+3 1
cfi=(26)
cfn=(2958)
calls=1 +8 
* 31
+1 1
cfi=(26)
cfn=(2960)
calls=1 2697 
* 2206
+8 1
+2 1
cfi=(110)
cfn=(2998)
calls=1 305 
* 1079
+10 3
cfi=(105)
cfn=(2834)
calls=1 3278 
* 5
* 2
+5 4
+11 3
+17 3
cfn=(3014) PerformAuthentication
calls=1 185 
* 53056
+1 5
cfi=(54)
cfn=(3442)
calls=1 580 
* 6976
+1 1
cfi=(193)
cfn=(3462)
calls=1 48 
* 29517
* 1
+7 7
+17 3
+13 7
+8 3
+16 3
+29 2
+5 2
+5 3
cfn=(3480) GetDatabaseTuple
calls=1 96 
* 26124
* 1
+1 2
+4 8
+1 3
+1 3
+2 6
cfi=(16)
cfn=(460)
calls=1 46 
* 150
* 1
+59 4
+1 6
cfi=(159)
cfn=(3486)
calls=1 +15 
* 2210
+15 3
+8 1
cfi=(110)
cfn=(3002)
calls=1 511 
* 78
+7 4
+4 3
cfn=(3480)
calls=1 96 
* 19436
* 1
+1 2
+1 9
-1 2
+2 9
-1 2
+12 5
cfi=(183)
cfn=(3494)
calls=1 108 
* 772
* 1
+2 4
+2 4
cob=(3)
cfi=(3)
cfn=(502)
calls=1 0 
* 5
* 1
* 2
+16 3
cfi=(54)
cfn=(1526)
calls=1 1459 
* 2699
+3 3
cfi=(54)
cfn=(3496)
calls=1 87 
* 190
+8 1
cfi=(148)
cfn=(3498)
calls=1 3536 
* 726234
+3 1
cfi=(170)
cfn=(3514)
calls=1 4689 
* 76
+8 4
+1 6
cfn=(3516) CheckMyDatabase
calls=1 316 
* 45268
+7 3
+1 5
cfn=(3520) process_startup_options
calls=1 +38 
* 5518
+3 1
cfi=(54)
cfn=(3532)
calls=1 415 
* 5
* 5
cfn=(3534) process_settings
calls=1 1153 
* 270987
+3 3
+9 1
cfi=(55)
cfn=(3612)
calls=1 4206 
* 99
+3 1
cfi=(19)
cfn=(3614)
calls=1 283 
* 80
+3 1
cfi=(202)
cfn=(3616)
calls=1 55 
* 157
+3 4
+1 1
cfi=(38)
cfn=(3618)
calls=1 2790 
* 510
+3 4
+1 1
cfi=(26)
cfn=(3620)
calls=1 2768 
* 7224
+1 5

fn=(3516)
316 10
+7 5
cfi=(151)
cfn=(3444)
calls=1 1114 
* 28484
* 1
+1 2
+2 8
+3 6
cob=(3)
cfi=(3)
cfn=(446)
calls=1 0 
* 22
* 1
* 2
+17 4
cfi=(105)
cfn=(2834)
calls=1 3278 
* 5
* 3
+5 5
+11 4
+18 4
+13 4
cfi=(19)
cfn=(3518)
calls=1 899 
* 15
+2 1
cfi=(19)
cfn=(2650)
calls=1 1011 
* 6
* 5
cfi=(29)
cfn=(1206)
calls=1 7172 
* 2150
+3 1
cfi=(19)
cfn=(2650)
calls=1 1011 
* 6
* 5
cfi=(29)
cfn=(1206)
calls=1 7172 
* 3247
+4 3
+1 3
+2 4
cfi=(18)
cfn=(562)
calls=1 152 
* 3389
* 2
+7 4
cfi=(18)
cfn=(562)
calls=1 152 
* 3631
* 2
+8 6
cfi=(29)
cfn=(1206)
calls=1 7172 
* 1784
+1 6
cfi=(29)
cfn=(1206)
calls=1 7172 
* 1386
+2 1
cfi=(18)
cfn=(622)
calls=1 994 
* 930
+2 3
cfi=(151)
cfn=(3418)
calls=1 1161 
* 103
+1 5

fn=(3520)
1088 6
+4 5
+6 4
+31 4
cfi=(197)
cfn=(3522)
calls=1 78 
* 10
* 1
+1 1
+5 6
+1 6
+2 6
+1 6
+2 12
cfi=(29)
cfn=(1206)
calls=2 7172 
* 5443
-11 6
+13 2

fn=(5748)
1187 5
+2 1
cfi=(26)
cfn=(5750)
calls=1 4342 
* 91
+6 3
cfi=(91)
cfn=(3684)
calls=1 2090 
* 8931
+1 2

fn=(3534)
1153 5
+4 4
+3 3
cfi=(171)
cfn=(3034)
calls=1 1307 
* 64351
* 1
+3 2
cfi=(110)
cfn=(3134)
calls=1 441 
* 54
* 2
cfi=(110)
cfn=(3142)
calls=1 864 
* 438
* 1
+3 7
cfi=(200)
cfn=(3564)
calls=1 222 
* 172552
+1 7
cfi=(200)
cfn=(3564)
calls=1 222 
* 10397
+1 8
cfi=(200)
cfn=(3564)
calls=1 222 
* 10397
+1 8
cfi=(200)
cfn=(3564)
calls=1 222 
* 10397
+2 3
cfi=(110)
cfn=(3404)
calls=1 906 
* 298
+1 4
cfi=(171)
cfn=(3092)
calls=1 1283 
* 2046
+1 2

fn=(1624)
525 2
+4 7
+4 3
+2 2

fn=(3014)
185 4
+2 1
+46 5
cfi=(138)
cfn=(2764)
calls=1 429 
* 257
+5 3
cfi=(169)
cfn=(3016)
calls=1 348 
* 52465
+5 3
cfi=(138)
cfn=(2804)
calls=1 526 
* 68
+2 3
+60 3
cfi=(12)
cfn=(2802)
calls=1 +27 
* 241
+2 1
+1 2

fn=(2818)
439 2
+4 4
+8 2

fn=(3480)
96 8
+9 16
cfi=(178)
cfn=(3482)
calls=2 -24 
* 228
+10 6
cfi=(171)
cfn=(3034)
calls=2 1307 
* 5732
* 2
+1 20
cfi=(173)
cfn=(3126)
calls=2 322 
* 10124
* 2
+5 6
cfi=(173)
cfn=(3172)
calls=2 406 
* 18080
* 2
+3 4
+1 6
cfi=(190)
cfn=(3484)
calls=2 683 
* 506
* 2
+3 6
cfi=(173)
cfn=(3394)
calls=2 489 
* 6719
+1 8
cfi=(171)
cfn=(3092)
calls=2 1283 
* 4077
+2 2
+1 4

fl=(81)
fn=(1894)
107 12208
+3 9156
cfi=(17)
cfn=(464)
calls=1526 +65 
* 1839016
* 1526
+3 7630
+11 6104
+3 4578
+24 6104

fn=(3292)
47 16588
+1 1508
cob=(5)
cfi=(5)
cfn=(472)
calls=1508 -48 
* 4524
* 1508
* 3016
+1 1508
+12 4524
cfi=(13)
cfn=(940)
calls=1508 925 
* 287902
* 1508
+3 1508
cob=(5)
cfi=(5)
cfn=(472)
calls=1508 -64 
* 4524
* 1508
* 3016
+1 9048
+1 9048
cfn=(1894)
calls=1508 +41 
* 1877398
* 1508
+3 4524
+1 3016
+6 3016

fl=(88)
fn=(2010)
162 3
+1 1
+3 5
cfi=(87)
cfn=(2000)
calls=1 493 
* 23
* 5
cfi=(87)
cfn=(2002)
calls=1 476 
* 21
* 1
+2 4
cfi=(87)
cfn=(2002)
calls=1 476 
* 21
* 1
+3 5
cfi=(87)
cfn=(2000)
calls=1 493 
* 23
* 5
cfi=(87)
cfn=(2002)
calls=1 476 
* 21
* 1
+3 1
cfi=(89)
cfn=(2012)
calls=1 455 
* 516
* 5
cfi=(87)
cfn=(2002)
calls=1 476 
* 21
* 1
+11 5
cfi=(87)
cfn=(2000)
calls=1 493 
* 23
* 5
cfi=(87)
cfn=(2002)
calls=1 476 
* 21
* 1
+2 4
cfi=(87)
cfn=(2002)
calls=1 476 
* 21
* 1
+3 5
cfi=(87)
cfn=(2000)
calls=1 493 
* 23
* 5
cfi=(87)
cfn=(2002)
calls=1 476 
* 21
* 1
+2 1
+1 2

fn=(2204)
69 3
+8 9
cfi=(87)
cfn=(2168)
calls=1 373 
* 1091
-1 1
+6 9
cfi=(87)
cfn=(2168)
calls=1 373 
* 994
-1 1
+6 9
cfi=(87)
cfn=(2168)
calls=1 373 
* 1032
-1 1
+5 3
cfi=(99)
cfn=(2158)
calls=1 603 
* 17
+1 3
cfi=(99)
cfn=(2158)
calls=1 603 
* 17
+10 10
cfi=(87)
cfn=(2168)
calls=1 373 
* 1055
-1 1
+4 12
+13 2
+2 98304
+2 163840
+2 81920
cfi=(123)
cfn=(2206)
calls=16384 227 
* 540672
+1 32768
+2 49152
+6 65536
+2 81920
cfi=(99)
cfn=(2144)
calls=16384 678 
* 1048576
+3 147456
cfi=(99)
cfn=(2144)
calls=16384 678 
* 1048576
-20 65539
+25 7
+4 10
cfi=(89)
cfn=(2212)
calls=1 476 
* 237901
+3 3
cfi=(50)
cfn=(2218)
calls=1 4239 
* 11
+2 2

fl=(136)
fn=(2550)
116 48
+4 16
+6 48
cob=(3)
cfi=(3)
cfn=(1246)
calls=8 0 
* 1108
* 8
* 8
+1 64
+4 32
+7 16
+2 20
cob=(3)
cfi=(3)
cfn=(828)
calls=4 0 
* 60
* 4
+2 8
+1 44
+4 12
+1 24
cob=(3)
cfi=(3)
cfn=(856)
calls=4 0 
* 56
* 4
* 4
+10 16
+2 20
cob=(3)
cfi=(3)
cfn=(828)
calls=4 0 
* 56
* 4
+1 8
+2 128
+2 128
+1 256
+6 64
-11 200
+13 24
cob=(3)
cfi=(3)
cfn=(856)
calls=4 0 
* 72
* 4
* 4
+8 32
+1 8
+1 16

fl=(125) /home/mithuncy/fsm_code/src/backend/utils/hash/../../../../src/include/storage/s_lock.h
fn=(2216) tas
225 116332
+1 29083
+2 145415
+6 29083
+1 87249

fl=(156)
fn=(3628)
671 12
+1 2
+4 10
cfi=(31)
cfn=(3502)
calls=2 1380 
* 106
+2 8
cfi=(31)
cfn=(3508)
calls=2 1390 
* 722
* 6
+84 2
+1 8

fn=(3970) GetPortalByName
131 4
+3 2
+1 6
cfi=(31)
cfn=(836)
calls=1 910 
* 225
* 5
+4 1
+1 2

fn=(5614)
466 7
+7 4
+8 4
+16 4
+12 7
cfi=(31)
cfn=(836)
calls=1 910 
* 343
* 3
+3 3
cfn=(5616) PortalReleaseCachedPlan
calls=1 308 
* 10
+8 4
+31 4
+1 2
-1 2
+3 5
+2 7
cfi=(164)
cfn=(3656)
calls=1 -75 
* 130
+3 7
cfi=(164)
cfn=(3656)
calls=1 -78 
* 76658
+3 7
cfi=(164)
cfn=(3656)
calls=1 -81 
* 175
+3 4
cfi=(164)
cfn=(3724)
calls=1 688 
* 892
+2 2
+7 4
+11 4
+4 4
cfi=(13)
cfn=(1396)
calls=1 212 
* 428
+3 3
cfi=(13)
cfn=(952)
calls=1 1032 
* 85
+1 4

fn=(2912)
105 3
+5 7
cfi=(14)
cfn=(432)
calls=1 395 
* 428
* 1
+4 1
+1 1
+6 6
cfi=(31)
cfn=(794)
calls=1 317 
* 3092
* 1
+2 2

fn=(3968)
176 9
+5 3
cfn=(3970)
calls=1 -50 
* 245
* 1
+1 2
+15 4
cfi=(13)
cfn=(2156)
calls=1 815 
* 319
* 1
+3 7
cfi=(14)
cfn=(432)
calls=1 395 
* 111
* 2
+5 4
cfi=(164)
cfn=(2972)
calls=1 422 
* 732
* 2
+4 2
+1 2
+1 1
cfi=(26)
cfn=(736)
calls=1 624 
* 8
* 2
+1 4
+1 2
+1 2
+1 2
+1 2
+1 2
+1 1
cfi=(26)
cfn=(3788)
calls=1 708 
* 5
* 2
+3 7
cfi=(31)
cfn=(836)
calls=1 910 
* 380
* 10
+3 7
cfi=(13)
cfn=(812)
calls=1 330 
* 9
+2 1
+1 4

fn=(5616)
308 4
+1 4
+12 2

fn=(3990)
393 5
+2 4
+5 2
+1 1
cfi=(26)
cfn=(736)
calls=1 624 
* 8
* 2
+1 4

fn=(3972)
287 8
+7 3
+1 3
+1 3
+1 3
+1 3
+1 2
+1 2

fn=(5608)
412 4
+3 2
+10 4
+2 5
cfi=(318)
cfn=(5610)
calls=1 266 
* 11
+1 2
+2 2

fl=(215)
fn=(3888)
1574 7635
+1 4581
cfi=(13)
cfn=(940)
calls=1527 925 
* 181204
+1 3054

fn=(4292)
1261 30
+4 6
cob=(5)
cfi=(5)
cfn=(472)
calls=6 0 
* 18
* 6
* 6
+1 36
cfi=(37)
cfn=(4294)
calls=6 51 
* 894
* 6
+1 30
cob=(5)
cfi=(5)
cfn=(472)
calls=6 0 
* 18
* 6
* 18
+6 18
+1 6
+1 12

fn=(3914)
1207 3591
+2 5130
+10 7182
cob=(3)
cfi=(3)
cfn=(856)
calls=513 0 
* 11279
* 513
+1 4104
+1 2052

fn=(3884) scanner_init
1148 3563
+1 1527
cob=(3)
cfi=(3)
cfn=(424)
calls=509 0 
* 13243
* 509
* 509
+3 1527
cfi=(216)
cfn=(3886)
calls=509 11027 
* 112510
* 1018
+3 2545
cfi=(216)
cfn=(3892)
calls=509 10927 
* 5599
+2 1527
+1 1527
+2 1527
+1 1527
+1 1527
+5 2036
cfi=(13)
cfn=(940)
calls=509 925 
* 62576
* 1018
+1 1527
+1 3563
cob=(3)
cfi=(3)
cfn=(856)
calls=509 0 
* 13329
* 509
+1 6108
+1 4072
cfi=(216)
cfn=(3894)
calls=509 10742 
* 238721
+3 1018
+1 2545
cfi=(13)
cfn=(940)
calls=509 925 
* 62576
* 1018
+1 1018
+2 509
+1 1018

fn=(3916)
1245 2028
+1 2028
+3 2535
cfi=(13)
cfn=(940)
calls=507 925 
* 62330
* 507
+1 4563
cob=(3)
cfi=(3)
cfn=(856)
calls=507 0 
* 11181
* 507
+1 2535
+1 507
+1 1014

fn=(3936) scanner_finish
1187 2036
+11 2545
+2 2545
+2 1018

fn=(4322)
1226 42
+2 54
+7 60
+1 42
+1 24

fl=(308)
fn=(5306)
378 2000
+2 3000
+1 1000
+3 1000

fl=(44)
fn=(954)
113 114750
+14 114750
+4 38250
+1 76500

fl=(76)
fn=(1626)
78 6
+1 10
+1 4

fl=(292)
fn=(5064)
110 6
+1 4
+2 4
+1 2
+1 4

fl=(147)
fn=(5636)
121 2
+6 1
cfi=(53)
cfn=(5638)
calls=1 7991 
* 23
* 3
+3 3
+3 1
+1 2

fn=(5642)
398 4
+2 2
+1 2

fn=(5644)
416 7
+4 4
+7 4
+11 3
+19 5
cfi=(53)
cfn=(5646)
calls=1 8197 
* 12
+2 9
cfn=(5648) XLogRecordAssemble
calls=1 +27 
* 225
* 1
+3 7
cfi=(53)
cfn=(5652)
calls=1 976 
* 1037
* 1
+1 2
+2 1
cfn=(5684) XLogResetInsertion
calls=1 194 
* 15
+2 1
+1 2

fn=(2886)
1029 2
+2 3
+2 7
cfi=(14)
cfn=(432)
calls=1 395 
* 428
* 1
+5 3
+3 4
cfi=(13)
cfn=(2156)
calls=1 815 
* 5021
-1 1
+3 1
+2 3
+2 4
cfi=(13)
cfn=(798)
calls=1 772 
* 122
* 1
+2 1
+6 3
+1 4
cfi=(13)
cfn=(2156)
calls=1 815 
* 259
* 1
+2 2

fn=(5648)
486 9
+2 1
+3 1
+3 2
+8 2
+1 1
+2 1
+1 1
+1 2
+8 6
+8 2
+1 5
738 5
+1 1
-1 2
+9 3
+2 3
+8 4
+1 5
+2 3
+1 2
+1 2
+2 2
+2 5
+1 2
+10 1
+1 9
cfi=(71)
cfn=(1608)
calls=1 23 
* 55
* 1
+1 3
+1 9
cfi=(71)
cfn=(1608)
calls=1 23 
* 41
* 1
-1 7
+8 1
cfi=(26)
cfn=(5650)
calls=1 417 
* 6
* 2
+1 3
+1 3
+1 3
+1 2
+1 3
+2 1
+1 2

fn=(5684)
194 2
+3 5
+3 1
+1 1
+1 1
+1 1
+1 1
+1 1
+1 2

fn=(5640)
324 5
+5 4
+2 11
+2 3
+1 3
+7 3
+1 2
+2 4
+1 2

fl=(151)
fn=(3444)
1114 13100
+5 18340
cfi=(149)
cfn=(3446)
calls=2620 +58 
* 13972665
+1 5240

fn=(3418)
1161 12496
+1 9372
cfi=(149)
cfn=(3420)
calls=3124 1452 
* 293656
+1 6248

fn=(3474)
1493 6141
+1 2047
+1 6141
+2 2047
+2 128568
+2 53570
+1 4094
+1 43335
+1 10220
+2 18336
-9 32142
+13 4094

fn=(3026) SearchSysCache
1104 8040
+4 10050
cfi=(149)
cfn=(3028)
calls=1005 +55 
* 26869824
+1 2010

fn=(3472)
1470 6144
+1 18372
+11 2038
-11 60
+11 9
-2 2
+5 2047
+1 4096

fn=(2894)
999 3
+10 3
+2 2
+2 385
+4 385
-4 1463
cfi=(149)
cfn=(2896)
calls=77 778 
* 89548
* 231
+6 385
+4 231
+1 385
-1 154
+2 231
+1 385
-1 154
+2 231
+1 385
-1 154
-16 233
+26 7
cfi=(36)
cfn=(864)
calls=1 114 
* 33366
+2 3
+2 608
+1 315
-3 307
+5 3
+2 7
cfi=(36)
cfn=(864)
calls=1 114 
* 76446
+2 3
+2 1224
+1 854
-3 615
+5 3
+2 1
+1 2

fn=(3856)
1446 60
+1 48
+4 60
+3 84
cfi=(149)
cfn=(3858)
calls=12 562 
* 588
+1 24

fn=(4026)
1376 40
+7 20
+1 15
-1 10
+3 30
+6 215
cfi=(190)
cfn=(3384)
calls=3 428 
* 5247
* 3
+3 10

fn=(4920)
1427 32
+1 16
+1 12
-1 8
+4 40
cfi=(149)
cfn=(4922)
calls=4 +90 
* 166795
+2 8

fn=(2904)
1543 6448
+1 4836
+1 4836
+2 4836
+1 168
+1 6970
+1 3224

fn=(3024)
1227 10050
+5 8040
cfn=(3026)
calls=1005 1104 
* 26889924
* 1005
+1 2010
+1 1002
+1 22292
cfi=(190)
cfn=(3384)
calls=502 428 
* 48192
* 1006
+4 1512
cfn=(3418)
calls=504 -78 
* 51912
+1 504
+1 2010

fn=(4952)
1125 54
+5 72
cfi=(149)
cfn=(4954)
calls=9 +55 
* 119758
+1 18

fl=(281)
fn=(4812) ExecInitExprRec
645 24
+1 42
+3 3
cfi=(52)
cfn=(4006)
calls=3 3263 
* 81
+4 6
+1 6
+3 24
+60 4
+2 2
+1 6
+1 6
+2 10
cfn=(4814) ExprEvalPushStep
calls=2 2133 
* 370
+1 2
881 2
+2 13
cfn=(5152) ExecInitFunc
calls=1 2160 
* 7585
+3 5
cfn=(4814)
calls=1 2133 
* 57
+1 1
2123 12

fn=(4813) ExecInitExprRec'2
645 24
+1 42
+3 3
cfi=(52)
cfn=(4006)
calls=3 3263 
* 81
+4 6
+1 6
+3 24
+72 2
+3 4
+16 4
+1 4
+6 6
+2 8
cob=(12)
cfi=(244)
cfn=(5154) plpgsql_param_compile
calls=1 6355 
* 247
+10 1
+6 1
892 2
+2 13
cfn=(5153) ExecInitFunc'2
calls=1 2160 
* 5970
+3 5
cfn=(4814)
calls=1 2133 
* 57
+1 1
1245 2
+7 7
cfn=(4813)
calls=1 645 
* 343
+10 1
+3 2
cfi=(13)
cfn=(2546)
calls=1 956 
* 187
* 1
+1 2
cfi=(13)
cfn=(2546)
calls=1 956 
* 964
* 1
+2 4
cfi=(250)
cfn=(4478)
calls=1 43 
* 24
* 5
cfi=(275)
cfn=(5128)
calls=1 2642 
* 496
+2 5
cfi=(161)
cfn=(2942)
calls=1 125 
* 82
+1 3
+1 13
+5 2
cfi=(13)
cfn=(2546)
calls=1 956 
* 187
* 1
+1 2
cfi=(13)
cfn=(2546)
calls=1 956 
* 1399
* 1
+2 7
cfi=(275)
cfn=(5126)
calls=1 2609 
* 511
+2 5
cfi=(161)
cfn=(2942)
calls=1 125 
* 82
+1 3
+1 13
+8 2
+1 4
+1 2
+1 2
+1 2
+2 5
cfn=(4814)
calls=1 2133 
* 57
+1 2
2123 12

fn=(4814)
2133 45
+1 36
+2 6
+1 18
cfi=(13)
cfn=(940)
calls=3 925 
* 369
* 9
+2 36
+7 135
cob=(3)
cfi=(3)
cfn=(856)
calls=9 0 
* 216
* 9
+1 18

fn=(4810) ExecPushExprSlots
2281 15
+1 42
+2 3
+1 3
+3 12
+10 12
+10 12
+10 6

fn=(4816) ExecReadyExpr
627 12
+1 9
cfi=(282)
cfn=(4818)
calls=3 157 
* 36
* 6
+3 9
cfi=(283)
cfn=(4820)
calls=3 169 
* 29394
+1 6

fn=(4804) ExecInitExprWithParams
158 15
+2 42
+3 6
+4 12
cfi=(13)
cfn=(2950)
calls=3 853 
* 690
* 15
+1 9
+1 6
+1 9
+3 15
cfn=(4806) ExecInitExprSlots
calls=3 2263 
* 1008
+3 24
cfn=(4812)
calls=3 645 
* 8261
+3 3
+1 15
cfn=(4814)
calls=3 2133 
* 171
+2 9
cfn=(4816)
calls=3 627 
* 29472
+2 3
+1 6

fn=(5152)
2160 11
+1 3
cfi=(245)
cfn=(4612)
calls=1 90 
* 10
* 1
+8 1
cfi=(54)
cfn=(3464)
calls=1 381 
* 5
* 6
cfi=(230)
cfn=(5060)
calls=1 4656 
* 51
* 1
+1 2
+2 3
+8 2
+9 2
cfi=(13)
cfn=(2546)
calls=1 956 
* 187
* 2
+1 2
cfi=(13)
cfn=(2546)
calls=1 956 
* 964
* 2
+1 3
+1 3
+3 5
cfi=(161)
cfn=(2942)
calls=1 125 
* 82
+1 3
+3 16
+4 4
+1 3
+3 4
+9 1
+1 3
cfi=(245)
cfn=(4416)
calls=1 78 
* 10
* 2
+2 6
+2 8
+6 2
+2 7
+1 7
+4 15
cfn=(4813)
calls=1 645 
* 6114
+3 2
-20 12
+24 6
+2 4
+3 3
+9 5

fn=(5153)
2160 11
+1 3
cfi=(245)
cfn=(4612)
calls=1 90 
* 10
* 1
+8 1
cfi=(54)
cfn=(3464)
calls=1 381 
* 5
* 6
cfi=(230)
cfn=(5060)
calls=1 4656 
* 51
* 1
+1 2
+2 3
+8 2
+9 2
cfi=(13)
cfn=(2546)
calls=1 956 
* 187
* 2
+1 2
cfi=(13)
cfn=(2546)
calls=1 956 
* 964
* 2
+1 3
+1 3
+3 5
cfi=(161)
cfn=(2942)
calls=1 125 
* 82
+1 3
+3 16
+4 4
+1 3
+3 4
+9 1
+1 3
cfi=(245)
cfn=(4416)
calls=1 78 
* 10
* 2
+2 6
+2 8
+6 2
+2 7
+1 7
+4 15
cfn=(4813)
calls=1 645 
* 4497
+3 2
-20 12
+24 6
+2 6
+1 3
+11 5

fn=(4806)
2263 15
+1 9
+5 15
cfn=(4808) get_last_attnums_walker
calls=3 +56 
* 843
+2 15
cfn=(4810)
calls=3 +10 
* 105
+1 6

fn=(4808)
2325 15
+1 6
+2 12
+30 12
+2 12
+2 12
+2 15
cfi=(250)
cfn=(4494)
calls=3 1843 
* 753
+2 6

fn=(4809)
2325 25
+1 10
+2 20
+30 20
+2 20
+2 20
+2 25
cfi=(250)
cfn=(4495)
calls=5 1843 
* 672
+2 10

fl=(140)
fn=(3578)
688 12505
+1 35014
cfi=(141)
cfn=(3580)
calls=2501 847 
* 1335331
+1 5002

fn=(3208)
209 2670
+13 2136
+3 1602
cfn=(3210) remove_from_unowned_list
calls=534 +56 
* 11748
+3 1602
+1 1602
+1 1068

fn=(3210)
281 1602
+4 2670
+4 1602
+2 2136
+1 1068
+1 534
-8 1068
+11 1068

fn=(3282)
642 14
+1 28
cfi=(141)
cfn=(3284)
calls=2 +75 
* 7751
+1 4

fn=(5798)
136 5
+3 2
+2 10
-2 7
+5 2

fn=(3706)
814 4
+5 8
+5 4

fn=(3206) add_to_unowned_list
260 1602
+2 1602
+1 1068
+1 1068

fn=(3872)
312 4
+4 2
+1 56
cfi=(141)
cfn=(3874)
calls=4 614 
* 64
-1 14
+3 3
+2 2
+4 1
-1 5
cfi=(31)
cfn=(836)
calls=1 910 
* 340
* 2
+9 2
+1 2
+1 2

fn=(2824)
118 3
+3 2
+2 10
+1 9
cfi=(141)
cfn=(2826)
calls=1 +83 
* 134
-3 7
+7 3
cfi=(67)
cfn=(1578)
calls=1 306 
* 32
+1 2

fn=(3854)
366 7028
+4 3012
+3 6024
cfi=(31)
cfn=(836)
calls=1004 910 
* 247976
* 1004
+3 2008
+2 2008

fn=(5418)
303 5000
+1 14000
cfi=(141)
cfn=(5420)
calls=1000 -26 
* 2759519
+1 2000

fn=(5474)
617 13500
+1 22500
cfi=(141)
cfn=(5476)
calls=1500 497 
* 837772
+2 3000

fn=(3204)
153 4272
+5 1602
+5 118
+1 1
+1 1
+1 6
cfi=(31)
cfn=(794)
calls=1 317 
* 3181
* 1
+2 1
+4 4
+1 2
+1 7
cfi=(31)
cfn=(836)
calls=1 910 
* 1403
-2 2132
+1 1066
+1 3731
cfi=(31)
cfn=(836)
calls=533 910 
* 219405
* 534
+5 2136
+5 1068
+1 1068
+1 1068
+1 1068
+1 1068
+3 1068
+1 10680
-1 7476
+4 1602
cfn=(3206)
calls=534 +65 
* 5340
+3 534
+1 1068

fl=(164)
fn=(4782)
1108 2525
+1 3030
cfn=(3084) ResourceArrayAdd
calls=505 263 
* 15150
+1 1010

fn=(3390)
982 12496
+1 12496
cfn=(3080) ResourceArrayEnlarge
calls=3124 208 
* 41249
+1 6248

fn=(3724)
688 12
+21 15
+8 12
cfn=(3726) ResourceOwnerNewParent
calls=3 +32 
* 60
+3 12
cfn=(3728) ResourceArrayFree
calls=3 402 
* 208
+1 12
cfn=(3728)
calls=3 402 
* 208
+1 12
cfn=(3728)
calls=3 402 
* 119
+1 12
cfn=(3728)
calls=3 402 
* 208
+1 12
cfn=(3728)
calls=3 402 
* 119
+1 12
cfn=(3728)
calls=3 402 
* 119
+1 12
cfn=(3728)
calls=3 402 
* 208
+1 12
cfn=(3728)
calls=3 402 
* 30
+1 12
cfn=(3728)
calls=3 402 
* 30
+1 12
cfn=(3728)
calls=3 402 
* 30
+2 9
cfi=(13)
cfn=(952)
calls=3 1032 
* 255
+1 6

fn=(5324)
1141 2000
+1 2000
cfn=(3080)
calls=500 208 
* 6803
+1 1000

fn=(2972)
422 15
+3 12
cfi=(13)
cfn=(2156)
calls=3 815 
* 1630
* 3
+2 9
+2 6
+2 3
+1 4
+1 3
+3 5
cfn=(2974) ResourceArrayInit
calls=1 189 
* 9
* 10
cfn=(2974)
calls=2 189 
* 18
+1 15
cfn=(2974)
calls=3 189 
* 27
+1 15
cfn=(2974)
calls=3 189 
* 27
+1 15
cfn=(2974)
calls=3 189 
* 27
+1 15
cfn=(2974)
calls=3 189 
* 27
+1 15
cfn=(2974)
calls=3 189 
* 27
+1 15
cfn=(2974)
calls=3 189 
* 27
+1 15
cfn=(2974)
calls=3 189 
* 27
+1 15
cfn=(2974)
calls=3 189 
* 27
+1 15
cfn=(2974)
calls=3 189 
* 27
+2 3
+1 6

fn=(3078)
1052 33208
+1 33208
cfn=(3080)
calls=8302 208 
* 108532
+1 16604

fn=(3098)
1072 41510
+1 49812
cfn=(3100) ResourceArrayRemove
calls=8302 301 
* 448308
* 24906
+3 16604

fn=(3656)
481 72
+2 54
cfn=(3658) ResourceOwnerReleaseInternal
calls=9 +8 
* 899111
+1 18

fn=(3084)
263 178210
+6 142568
+3 142568
+15 106926
+1 249494
+1 178210
+1 71284

fn=(3100)
301 178210
+3 106926
+5 142568
+2 142568
+1 249494
-1 71284
+3 519630
+1 173210
+2 173210
+1 69284
+2 2000
+2 9000
+2 15000
+1 5000
+2 5000
+1 2000
-8 4000
+37 71284

fn=(3106)
953 38115
+3 30492
+1 7328
+3 1475
+2 2065
+2 3540
+1 1475
+1 295
-6 590
+11 15246

fn=(3252)
915 105800
+1 148120
cfn=(3100)
calls=21160 301 
* 1157640
* 63480
+3 42320

fn=(3392)
993 15620
+1 18744
cfn=(3084)
calls=3124 263 
* 93720
+1 6248

fn=(3658)
491 72
+7 54
+7 18
+1 18
+2 18
+11 21
cfn=(3660) ResourceArrayGetAny
calls=3 370 
* 36
* 6
+10 21
cfn=(3660)
calls=3 370 
* 36
* 6
+10 21
cfn=(3660)
calls=3 370 
* 36
* 6
+10 21
cfn=(3660)
calls=3 370 
* 36
* 9
+7 12
+2 6
+7 6
+2 6
cfi=(84)
cfn=(3678)
calls=2 772 
* 821542
+1 6
cfi=(92)
cfn=(3688)
calls=2 3223 
* 22
* 2
+19 4
+2 1
+1 2
+8 2
+1 5
cfi=(91)
cfn=(5618)
calls=1 2489 
* 76594
* 1
+5 6
+9 21
cfn=(3660)
calls=3 370 
* 36
* 6
+10 21
cfn=(3660)
calls=3 370 
* 36
* 6
+10 21
cfn=(3660)
calls=3 370 
* 36
* 6
+10 21
cfn=(3660)
calls=3 370 
* 36
* 6
+10 21
cfn=(3660)
calls=3 370 
* 36
* 6
+10 21
cfn=(3660)
calls=3 370 
* 36
* 6
+11 45
+3 18
+1 18

fn=(3728)
402 120
+1 120
+1 44
cfi=(13)
cfn=(952)
calls=11 1032 
* 935
+1 60

fn=(4924)
1017 16
+1 16
cfn=(3080)
calls=4 208 
* 355
+1 8

fn=(4794)
1117 2525
+1 3030
cfn=(3100)
calls=505 301 
* 27270
* 1515
+3 1010

fn=(3080)
208 142568
+7 213852
+1 35631
+2 33
+1 33
+3 44
+1 66
cfi=(13)
cfn=(798)
calls=11 772 
* 1094
* 11
+2 22
+1 1232
-1 737
+4 33
+1 33
+1 55
+1 22
+2 22
+20 71284

fn=(3148)
1187 8188
+1 8188
cfn=(3080)
calls=2047 208 
* 27248
+1 4094

fn=(3238)
906 105800
+1 148120
cfn=(3084)
calls=21160 263 
* 634800
+1 42320

fn=(4780)
1097 2020
+1 2020
cfn=(3080)
calls=505 208 
* 6868
+1 1010

fn=(3060)
933 30492
+3 30492
+1 7296
+2 1308
+1 2275
+5 1625
+1 650
-1 10
+1 14596

fn=(3082)
1063 41510
+1 49812
cfn=(3084)
calls=8302 263 
* 249060
+1 16604

fn=(3408)
1207 10235
+1 12282
cfn=(3100)
calls=2047 301 
* 110538
* 6141
+3 4094

fn=(3660)
370 120
+1 120
+1 60
+23 60

fn=(5326)
1152 2500
+1 3000
cfn=(3084)
calls=500 263 
* 15000
+1 1000

fn=(5620)
739 3
+1 2
+1 2

fn=(3726)
749 12
+1 9
+2 6
+2 4
+1 5
+16 6
+9 6
+1 6
+2 6

fn=(4934)
1037 20
+1 24
cfn=(3100)
calls=4 301 
* 216
* 12
+3 8

fn=(3422)
1002 15620
+1 18744
cfn=(3100)
calls=3124 301 
* 168696
* 9372
+3 6248

fn=(4930)
1028 20
+1 24
cfn=(3084)
calls=4 263 
* 120
+1 8

fn=(5518)
1161 2500
+1 3000
cfn=(3100)
calls=500 301 
* 27000
* 1500
+3 1000

fn=(2974)
189 120
+7 90
+2 60

fn=(3150)
1198 10235
+1 12282
cfn=(3084)
calls=2047 263 
* 61410
+1 4094

fn=(3214)
893 84640
+3 84640
cfn=(3080)
calls=21160 208 
* 275717
+1 42320

fl=(214)
fn=(3882)
37 2032
+6 3556
cfi=(215)
cfn=(3884)
calls=508 1148 
* 552202
* 508
+4 508
+3 1524
cfi=(217)
cfn=(3902)
calls=508 16299 
* 3556
+3 1524
cfi=(218)
cfn=(3904)
calls=508 24993 
* 5848301
* 508
+3 1524
cfi=(215)
cfn=(3936)
calls=508 1187 
* 8128
+2 1016
+3 508
+1 1016

fn=(3906)
84 21270
+1 10635
+7 14180
+2 1500
+1 2000
+1 2000
+1 2500
+1 1500
+3 18270
cfi=(216)
cfn=(3908)
calls=3045 9032 
* 2822315
* 3045
+8 23815
+9 500
+1 500
+2 6090
+8 1000
+1 3500
-1 1000
+11 1500
+3 3500
cfi=(216)
cfn=(3908)
calls=500 9032 
* 571000
* 500
+1 1500
+1 2000
+2 1500
+3 2500
+1 1500
+2 1000
+3 2500
+29 2500
+7 1000
+3 500
+1 7090

fl=(263)
fn=(4646)
574 12
+3 15
cfi=(264)
cfn=(4648)
calls=3 78 
* 24
* 12
+22 6

fn=(4650)
611 15
+4 6
+2 6
+1 30
cfn=(4652) pull_up_subqueries_recurse
calls=3 +63 
* 141
-1 3
+4 12
+4 12

fn=(4652)
681 30
+2 12
+50 12
+2 6
+1 3
+9 12
+3 12
cfi=(264)
cfn=(4648)
calls=3 78 
* 24
* 12
+27 6
+4 3
+76 3
+1 6

fl=(275)
fn=(5048)
1556 8
+4 8
cfi=(151)
cfn=(3444)
calls=2 1114 
* 684
* 2
+1 4
+3 18
+1 6
cfi=(151)
cfn=(3418)
calls=2 1161 
* 206
+1 2
+1 4

fn=(5124)
1537 12
+4 12
cfi=(151)
cfn=(3444)
calls=3 1114 
* 45345
* 3
+1 6
+3 27
+1 9
cfi=(151)
cfn=(3418)
calls=3 1161 
* 309
+1 3
+1 6

fn=(4966)
2567 8
+9 8
cfi=(151)
cfn=(3444)
calls=2 1114 
* 684
* 2
+1 4
+2 16
+1 8
+6 8
+3 2
+1 6
cfi=(151)
cfn=(3418)
calls=2 1161 
* 206
+1 4
+9 4

fn=(4972)
2446 60
+4 40
cfi=(151)
cfn=(3444)
calls=10 1114 
* 90617
* 10
+1 20
+2 80
+1 40
+1 40
+1 30
cfi=(151)
cfn=(3418)
calls=10 1161 
* 1030
+1 20

fn=(4706)
2324 15
+1 9
cfn=(4708) get_typlen
calls=3 1943 
* 1422
* 6
+6 6
+1 4
+6 5
cfi=(297)
cfn=(5148)
calls=1 398 
* 14
* 1
+1 2
+25 1
+1 6

fn=(4708)
1943 12
+3 12
cfi=(151)
cfn=(3444)
calls=3 1114 
* 1026
* 3
+1 6
+2 24
+3 9
+1 9
cfi=(151)
cfn=(3418)
calls=3 1161 
* 309
+1 6
+4 6

fn=(4938)
2284 125
+9 100
cfi=(151)
cfn=(3444)
calls=25 1114 
* 139596
* 25
+1 50
+2 200
+1 100
+3 75
cfi=(151)
cfn=(3418)
calls=25 1161 
* 2575
+1 25
+10 25
+1 50

fn=(4956)
2494 44
+3 44
cfi=(151)
cfn=(3444)
calls=11 1114 
* 3762
* 11
+1 22
+2 88
+3 44
+1 36
+2 2
+1 6
cfi=(151)
cfn=(3418)
calls=2 1161 
* 206
* 27
cfi=(151)
cfn=(3418)
calls=9 1161 
* 927
+1 22
+4 22

fn=(5126)
2609 3535
+4 2020
cfi=(151)
cfn=(3444)
calls=505 1114 
* 172710
* 505
+1 1010
+2 4040
+2 2525
+5 2020
+6 2020
+1 1515
cfn=(4996)
calls=505 2049 
* 9595
* 1010
+2 1515
cfi=(151)
cfn=(3418)
calls=505 1161 
* 52015
+1 2020

fn=(5136)
1518 12
+4 12
cfi=(151)
cfn=(3444)
calls=3 1114 
* 1026
* 3
+1 6
+3 27
+1 9
cfi=(151)
cfn=(3418)
calls=3 1161 
* 309
+1 3
+1 6

fn=(5114)
2375 4
+3 4
cfi=(151)
cfn=(3444)
calls=1 1114 
* 342
* 1
+1 2
+2 8
+3 3
+1 3
cfi=(151)
cfn=(3418)
calls=1 1161 
* 103
+1 2
+4 2

fn=(5014)
1499 8
+4 8
cfi=(151)
cfn=(3444)
calls=2 1114 
* 44736
* 2
+1 4
+3 18
+1 6
cfi=(151)
cfn=(3418)
calls=2 1161 
* 206
+1 2
+1 4

fn=(5128)
2642 7035
+4 4020
cfi=(151)
cfn=(3444)
calls=1005 1114 
* 343710
* 1005
+1 2010
+2 8040
+2 5025
+5 4020
+6 4020
+1 11045
+2 15
cfi=(151)
cfn=(3418)
calls=5 1161 
* 515
-2 3000
+2 3000
cfi=(151)
cfn=(3418)
calls=1000 1161 
* 103000
+1 4020

fn=(5228)
1655 5000
+1 9000
cfi=(151)
cfn=(3024)
calls=1000 1227 
* 26892589
+3 2000

fn=(4936)
2267 88
+1 22
+2 110
cfn=(4938)
calls=22 +14 
* 141518
+1 44

fn=(5150)
1613 16
+4 16
cfi=(151)
cfn=(3444)
calls=4 1114 
* 1368
* 4
+1 8
+3 36
+1 12
cfi=(151)
cfn=(3418)
calls=4 1161 
* 412
+1 4
+1 16

fn=(4996)
2049 1521
+1 4056
+6 2028
+3 1014
+1 1014

fn=(5028)
2791 24
+3 24
cfi=(151)
cfn=(3444)
calls=6 1114 
* 2052
* 6
+1 12
+2 48
+3 18
+1 18
cfi=(151)
cfn=(3418)
calls=6 1161 
* 618
+1 12
+4 12

fl=(302)
fn=(5240)
3462 6000
+11 3500
cfi=(303)
cfn=(5242)
calls=500 76 
* 25500
* 500
+1 2500
cfi=(13)
cfn=(940)
calls=500 925 
* 61500
* 2000
+1 1000
+3 500
+1 1500
+2 7000
+1 3000
+1 500
+2 1000
+3 2000
+12 9000
+1 22000
+1 7000
+4 2000
-21 5500
+31 2000

fl=(56)
fn=(1142)
1208 4
+1 3
+6 1
+1 1
+8 2

fn=(1146)
1202 4
+1 2
+1 2

fn=(5780)
364 2
+1 4
cfi=(126)
cfn=(5782)
calls=1 48 
* 9
* 3
+6 2

fn=(1144)
1145 6
+1 9
+49 2
+2 1
+1 2

fl=(106)
fn=(5788)
480 3
+6 5
cfi=(99)
cfn=(2170)
calls=1 1122 
* 136
+1 2
+2 90
+2 50
+1 10
-5 43
+23 4
cfi=(99)
cfn=(2182)
calls=1 1726 
* 90
+1 2

fn=(2064)
115 9
+1 3
+2 9
+3 3
+1 15
cfi=(87)
cfn=(2000)
calls=3 493 
* 69
* 15
cfi=(87)
cfn=(2002)
calls=3 476 
* 63
* 3
+3 3
+1 6

fn=(2276)
133 3
+3 3
+4 1
cfn=(2064)
calls=1 -25 
* 66
* 4
cfi=(87)
cfn=(2168)
calls=1 373 
* 1050
-1 1
+4 3
cfi=(99)
cfn=(2158)
calls=1 603 
* 17
+3 4
+5 4
cfn=(2064)
calls=1 -36 
* 66
* 19
cob=(3)
cfi=(3)
cfn=(828)
calls=1 0 
* 275
* 1
+2 2
+2 90
+3 20
+1 50
cfi=(99)
cfn=(2144)
calls=10 678 
* 640
+1 40
cfi=(128)
cfn=(2278)
calls=10 40 
* 230
-7 43
+10 2

fl=(152)
fn=(2898)
110 9882
+1 6588
+2 6588
+1 3294
+1 6588
-5 4563
+1 3042
+2 3042
+1 1521
+1 3042
-5 3042
+1 2028
+2 2028
+1 1014
+1 2028

fl=(254)
fn=(4762)
210 15
+1 9
+1 12
cfi=(255)
cfn=(4672)
calls=3 90 
* 24
* 3
+8 12
cfn=(4764) add_rtes_to_flat_rtable
calls=3 +32 
* 138
+5 12
cfi=(255)
cfn=(4528)
calls=3 78 
* 24
* 12
+17 18
cfn=(4766) set_plan_refs
calls=3 435 
* 2663
+1 6

fn=(4768) fix_scan_expr
1491 54
+3 18
+1 18
+2 18
+1 18
-1 18
+2 27
-1 18
+2 18
-1 18
+17 45
cfn=(4770) fix_scan_expr_walker
calls=9 +76 
* 2033
+1 9
+2 18

fn=(4526) fix_expr_common
1373 198
+2 132
+5 132
+5 132
+2 12
cfn=(5040)
calls=2 2553 
* 24
* 2
+3 124
+2 6
cfi=(250)
cfn=(5042)
calls=2 1620 
* 20
+1 12
cfn=(5040)
calls=2 2553 
* 24
* 2
+3 116
+6 116
+6 116
+6 116
+2 16
+3 64
+1 8
+4 84
+25 132

fn=(5040)
2553 30
+9 10
+15 20

fn=(4764)
252 18
+1 9
+11 15
cfi=(255)
cfn=(4528)
calls=3 78 
* 24
* 12
+18 3
+1 15
cfi=(255)
cfn=(4528)
calls=3 78 
* 24
* 12
+48 6

fn=(4522)
2637 21
+5 396
+1 3
+1 3
+1 3
+2 3
+2 1467
+1 3
+1 6
+2 15
cfn=(4524) extract_query_dependencies_walker
calls=3 +17 
* 3829
+2 9
+1 9
+1 9
+1 6

fn=(4770)
1592 45
+1 18
+1 12
+2 18
cfn=(4526)
calls=3 1373 
* 138
+1 15
cfi=(250)
cfn=(4494)
calls=3 1843 
* 1769
+2 18

fn=(4771)
1592 55
+1 22
+3 66
cfn=(4526)
calls=11 1373 
* 541
+1 55
cfi=(250)
cfn=(4495)
calls=11 1843 
* 3113
+2 22

fn=(4524)
2670 18
+1 6
+3 12
+40 15
cfn=(4526)
calls=3 1373 
* 138
+1 15
cfi=(250)
cfn=(4494)
calls=3 1843 
* 3613
+2 12

fn=(4525)
2670 294
+1 98
+1 60
+2 76
+2 6
+3 12
+12 12
+4 12
cfi=(255)
cfn=(4528)
calls=3 78 
* 24
* 12
+15 18
cfi=(250)
cfn=(4484)
calls=3 2266 
* 3226
* 3
+4 80
cfn=(4526)
calls=16 1373 
* 771
+1 80
cfi=(250)
cfn=(4495)
calls=16 1843 
* 4661
+2 196

fn=(4766)
435 21
+3 6
+4 21
+5 24
743 6
+6 12
+5 21
cfn=(4768)
calls=3 1491 
* 2066
-1 6
+3 21
cfn=(4768)
calls=3 1491 
* 132
-1 6
+5 21
cfn=(4768)
calls=3 1491 
* 132
-1 6
+3 3
1013 21
cfn=(4767) set_plan_refs'2
calls=3 435 
* 45
* 6
+1 21
cfn=(4767)
calls=3 435 
* 45
* 6
+2 3
+1 12

fn=(4767)
435 42
+3 12
+1 12
1017 24

fl=(23)
fn=(668)
101 35
+69 35
cfn=(670) random_from_file
calls=7 48 
* 2704
* 14
+1 14
+7 14

fn=(670)
48 42
+2 14
+3 42
cob=(5)
cfi=(5)
cfn=(676)
calls=6 -53 
* 42
cob=(1)
cfi=(1)
cfn=(223)
calls=1 -53 
* 745
* 11
* 7
+1 14
+3 7
+2 42
cob=(5)
cfi=(5)
cfn=(684)
calls=6 -59 
* 42
cob=(1)
cfi=(1)
cfn=(223)
calls=1 -59 
* 753
* 11
* 7
+1 14
+9 14
+1 14
-13 28
+16 21
cob=(5)
cfi=(5)
cfn=(692)
calls=6 -73 
* 42
cob=(1)
cfi=(1)
cfn=(223)
calls=1 -73 
* 760
* 11
+1 7
+1 14

fl=(35)
fn=(1420)
589 8
+1 2
cob=(3)
cfi=(3)
cfn=(388)
calls=1 0 
* 345
* 1
* 1
+2 2
+4 8
cfn=(1422) tzloadbody
calls=1 217 
* 1248093
* 1
+2 3
cob=(3)
cfi=(3)
cfn=(590)
calls=1 0 
* 113
* 1
+1 1
+2 2

fn=(1422)
217 9
+5 2
+1 1
+2 6
+2 2
+7 4
+3 5
cfi=(30)
cfn=(1424)
calls=1 77 
* 45550
* 1
+1 2
+3 6
cob=(5)
cfi=(5)
cfn=(684)
calls=1 0 
* 7
* 1
* 1
+1 4
+7 3
cob=(5)
cfi=(5)
cfn=(692)
calls=1 0 
* 7
* 1
* 2
+2 2
+2 8
cfn=(1444) detzcode
calls=2 123 
* 150
* 2
+1 8
cfn=(1444)
calls=2 123 
* 150
* 2
+1 2
+1 2
+1 8
cfn=(1444)
calls=2 123 
* 150
* 2
+1 8
cfn=(1444)
calls=2 123 
* 150
* 2
+1 8
cfn=(1444)
calls=2 123 
* 150
* 2
+1 8
cfn=(1444)
calls=2 123 
* 150
* 2
+1 10
+7 8
+1 8
+1 8
+1 8
+1 6
-4 6
+9 10
+1 4
+1 12
+1 4
+1 8
+1 4
+1 4
-7 2
-1 4
+10 6
+1 6
+1 6
+1 6
+7 2
+1 4
+3 1302
cfn=(1444)
calls=186 123 
* 14050
* 930
cfn=(1446) detzcode64
calls=186 149 
* 25210
-1 372
+3 1488
+1 2232
+2 744
+4 3704
+7 2976
+2 1116
-21 1868
+24 2
+1 4
+2 1860
+2 1860
+2 2232
+1 2604
-7 1868
+9 6
+1 4
+6 90
+1 30
cfn=(1444)
calls=10 123 
* 770
* 20
+1 10
+1 50
+1 20
+2 40
+1 50
+1 50
+2 30
-16 58
+18 4
+1 320
-1 208
+2 8
+3 2
+1 12
+25 6
+2 4
+4 90
+1 20
+4 72
+2 80
-11 58
+14 4
+4 90
+1 20
+4 72
+2 80
-11 58
+18 8
+2 12
+1 12
cob=(3)
cfi=(3)
cfn=(482)
calls=2 0 
* 584
* 2
251 8
419 4
+1 2
-1 2
+1 6
+1 3
-1 2
+3 3
+2 4
+1 7
cfn=(846)
calls=1 938 
* 766889
* 2
+10 1
+1 3
+2 2
+2 26
+3 4
+1 140
cob=(3)
cfi=(3)
cfn=(446)
calls=14 0 
* 308
* 14
* 28
+2 16
+1 2
+1 2
-5 54
+7 6
-12 14
+25 4
+2 3
+7 5
+1 6
+1 6
-1 2
+4 2
+1 2148
+1 7518
-2 2684
+4 1
+3 16104
+1 7320
+1 5856
-1 7320
+2 7320
+1 1464
-7 5860
+1 5856
+8 2
+1 40
-1 14
+5 4
+2 4
+2 2
+1 19788
cfn=(1462) typesequiv
calls=1649 605 
* 132714
* 3298
+1 8240
cfn=(1464) differ_by_repeat
calls=824 175 
* 9888
-1 1648
-1 8249
+7 5
+2 3200
-1 9600
cfn=(1462)
calls=800 +97 
* 64400
* 1600
+2 6000
cfn=(1464)
calls=400 175 
* 4800
-1 800
+4 2
+1 1
-7 2399
+27 2
+1 9900
-1 8254
+3 6
+7 2
+17 2
+16 3
+2 1
+1 2

fn=(846)
938 14
+2 2
+9 4
+1 4
+3 3
cob=(3)
cfi=(3)
cfn=(424)
calls=1 0 
* 15
* 1
* 1
+1 2
+1 2
+4 4
+12 3
cfn=(1448) getzname
calls=1 644 
* 64
* 1
+1 5
+2 4
+2 5
cfn=(1450) getoffset
calls=1 753 
* 98
* 1
+1 2
+3 6
+1 4
+12 12
+1 4
+2 8
+2 4
+11 2
+1 3
cfn=(1448)
calls=1 644 
* 66
* 1
+1 5
+2 2
+2 5
+1 2
+2 8
+7 3
+1 4
+32 4
+8 1
+3 1
+1 5
cfn=(1456) getrule
calls=1 780 
* 206
* 3
+2 6
+2 5
cfn=(1456)
calls=1 780 
* 227
* 3
+2 4
+2 2
+5 9
cfn=(848) init_ttinfo
calls=1 113 
* 22
+1 10
cfn=(848)
calls=1 113 
* 22
+1 2
+1 1
+1 1
+1 1
+5 2332
-1 304
+3 152
+1 1064
cfn=(1458) increment_overflow_time
calls=152 1588 
* 4104
-3 96
-1 96
+3 48
+1 336
cfn=(1458)
calls=48 1588 
* 1296
* 400
+5 400
+2 3
+1 3
+3 6006
cfn=(1460) transtime
calls=1001 842 
* 212203
* 1001
+1 6006
cfn=(1460)
calls=1001 842 
* 334180
* 1001
+2 11923
+2 3036
+2 1518
-4 968
+2 968
+2 484
+7 2002
+1 3003
+1 4004
+2 5005
-2 2002
+4 2002
+1 1
+1 6000
+2 13000
cfn=(1458)
calls=1000 1588 
* 27000
-1 3000
+3 9000
+1 6000
+2 13000
cfn=(1458)
calls=1000 1588 
* 27000
-1 3000
+4 7000
+1 3000
+4 7000
cfn=(1458)
calls=1000 1588 
* 27000
-1 2000
+3 1000
-42 4003
+44 3
+1 2
+5 6
+1 6
-96 1
1250 1
+5 1
+1 2
+1 2
+1 9
cfn=(848)
calls=1 113 
* 22
+1 2
+2 4
+1 3
+1 6
cob=(1)
cfi=(1)
cfn=(223)
calls=1 0 
* 1364
* 5
-2 4
+1 3
+1 6
cob=(3)
cfi=(3)
cfn=(856)
calls=1 0 
* 14
* 1
+1 4
+1 8
+1 4
+2 6
cob=(3)
cfi=(3)
cfn=(856)
calls=1 0 
* 14
* 1
+1 4
+2 1
+1 2
-1 1
+1 2

fn=(1450)
753 5
+1 1
+2 4
+5 4
+2 5
cfn=(1452) getsecs
calls=1 -51 
* 71
* 1
+1 2
+2 2
+2 1
+1 2

fn=(1452)
712 5
+8 6
cfn=(1454) getnum
calls=1 -38 
* 46
* 1
+1 2
+2 4
+1 4
+17 1
+1 2

fn=(1454)
682 42
+4 63
+2 7
+3 70
+1 21
-1 10
+1 3
+2 32
+1 32
+1 21
+2 21
+1 7
+1 14

fn=(1464)
175 4896
+3 7344
+1 2448

fn=(1054) increment_overflow
1570 160
+1 120
+9 360
+2 240
+1 40
+1 80

fn=(1046)
1905 24
+9 6
+1 30
cfn=(1048)
calls=6 1375 
* 7172
* 6
+1 36
+3 6
+1 12

fn=(1052) timesub
1446 96
+11 12
+1 12
+1 72
+1 48
+11 12
+1 132
+1 192
+1 12
+7 240
+1 96
+3 48
+1 48
+1 24
+1 12
+1 30
cfn=(1054)
calls=6 +81 
* 150
-1 36
+1 90
cfn=(1054)
calls=18 +81 
* 450
* 48
+2 96
cfn=(1056) leaps_thru_end_of
calls=24 -54 
* 1008
* 24
+1 96
cfn=(1056)
calls=24 -55 
* 1008
-1 72
+2 312
+1 72
+1 48
-21 606
+27 24
+1 48
+1 12
+2 4
+1 4
-3 32
+5 36
+5 12
+2 16
cfn=(1054)
calls=4 +55 
* 100
* 8
+2 32
-4 32
+6 178
+6 36
+1 60
cfn=(1054)
calls=12 +44 
* 300
* 24
+2 36
+6 204
+2 48
cfn=(1056)
calls=12 -99 
* 504
-1 12
+2 24
cfn=(1056)
calls=12 1437 
* 504
-1 24
+1 36
-4 24
+6 216
+1 48
+2 144
+1 156
+1 168
+6 264
+1 188
+1 30
-1 14
+1 6
+1 352
-1 724
+2 48
+1 24
+1 48
+1 24
+5 48

fn=(1058) leaps_thru_end_of_nonneg
1431 216
+1 1872
+1 144

fn=(1444)
123 624
+3 208
+1 624
+1 832
+1 624
+2 1040
+1 416
+1 7488
-1 2288
+3 832
+7 120
+2 60
+1 120
-1 148
+1 296

fn=(3748)
1890 3
+1 2
+1 2
+2 2

fn=(1048)
1375 60
+1 84
cfn=(1050) localsub
calls=12 -85 
* 13184
+1 24

fn=(1456)
780 10
+1 8
+9 8
+5 4
+1 2
+1 14
cfn=(1454)
calls=2 682 
* 113
* 2
+1 4
+2 12
+2 14
cfn=(1454)
calls=2 682 
* 92
* 2
+1 4
+2 12
+2 14
cfn=(1454)
calls=2 682 
* 92
* 4
+12 4
+2 8
+9 4
+1 2
+1 4

fn=(1458)
1588 12800
+7 6400
+1 1200
-1 600
+2 21000
-2 12400
+4 22400
+1 3200
+1 6400

fn=(1050)
1291 72
+4 36
+2 24
+2 48
+1 24
-1 24
+1 100
+36 98
+2 8
+4 10
+1 30
+2 10
+2 550
+2 880
+1 222
+2 108
-7 360
+9 70
+2 90
+7 70
cfn=(1052)
calls=10 +83 
* 8460
-7 18
+7 14
cfn=(1052)
calls=2 +83 
* 1618
* 12
+1 24
+2 60
+1 108
+2 12
+1 24

fn=(1446)
149 558
+3 186
+1 558
+1 744
+1 558
+2 930
+1 372
+1 15624
-1 4278
+3 744
+7 100
+2 50
+1 100
-1 136
+1 272

fn=(1460)
842 10010
+11 2002
+1 20810
+1 6072
-1 968
+1 9944
+35 36036
+1 12012
+1 20020
+1 26026
+1 20020
+1 40040
-1 36036
+2 4004
+1 373
+6 1492
+1 746
-1 6516
+1 3258
+1 1710
+1 4004
+2 2002
+1 12012
-1 2002
+3 1001
-5 13013
+11 6006
+1 4004
+1 144144
-1 82082
+2 2002
+8 12012
+1 4004

fn=(1462)
605 14694
+3 9796
+1 14694
+1 9796
+4 22041
+1 22041
+2 9796
+3 4898
-2 4896
-1 2448
+2 4896
-1 2448
+2 4896
-1 2448
+3 2448
-1 18360
cob=(3)
cfi=(3)
cfn=(446)
calls=1224 0 
* 26928
* 1224
-1 6121
-3 2450
+7 1225
+1 2450
-8 2448
+7 1224
+1 2448

fn=(848)
113 21
+1 9
+1 9
+1 9
+1 6
+1 6
+1 6

fn=(1056)
1437 288
+3 360
cfn=(1058)
calls=72 -9 
* 2232
+1 144

fn=(1448)
644 6
+3 2
+2 6
-2 110
+3 2
+1 4

fl=(102)
fn=(2726)
371 3
+2 1
+3 4
cfi=(28)
cfn=(784)
calls=1 41 
* 174
+4 5
cob=(1)
cfi=(1)
cfn=(223)
calls=1 0 
* 1259
* 5
* 2
+13 1
+2 2

fn=(2264)
129 4
+4 1
cfn=(2054)
calls=1 -19 
* 73
* 4
cfi=(87)
cfn=(2168)
calls=1 373 
* 948
-1 1
+3 4
+2 4
cfn=(2054)
calls=1 -23 
* 73
* 15
cob=(3)
cfi=(3)
cfn=(828)
calls=1 0 
* 114
* 1
+1 2
cfi=(20)
cfn=(2056)
calls=1 5589 
* 11
* 1
+2 4

fn=(2840)
257 2
+1 2
+3 1
+2 5
+1 2

fn=(2616)
185 15
+1 15
+7 20
+2 15
+1 4
+1 35
+2 25
+1 15
+1 15
-8 10
+15 10

fn=(2690)
219 6
+4 2
+7 16
+1 10
+1 2
+1 4

fn=(5796)
290 2
+1 2
+3 1
+3 5
+1 2

fn=(2054)
114 9
+3 3
+1 3
cfi=(20)
cfn=(2056)
calls=3 5589 
* 33
* 12
cfi=(87)
cfn=(2000)
calls=3 493 
* 69
* 15
cfi=(87)
cfn=(2002)
calls=3 476 
* 63
* 3
+3 3
+1 6

fn=(2676)
164 48
+2 80
+2 6
+1 4
+2 14
+1 32

fl=(172)
fn=(5268) IsToastClass
153 2000
+1 1500
+2 1500
cfn=(5270) IsToastNamespace
calls=500 +26 
* 12000
+1 1000

fn=(3366)
97 10200
+1 17850
cfn=(3368) IsCatalogClass
calls=2550 +11 
* 78750
+1 5100

fn=(3042)
225 16866
+2 22480
+1 11236
+1 11228
+1 11228
+1 11228
+1 11228
+1 11228
+1 11228
+1 11226
+1 11226
+2 18
+2 22450
+1 11222
+1 11222
+1 11222
+1 11218
+1 11216
+1 11216
+1 11216
+1 11216
+1 11216
+1 11216
+1 11216
+1 11216
+1 11208
+1 11208
+1 11208
+1 11208
+2 18
+2 22416
+1 11208
+1 11208
+1 11208
+1 11208
+1 11208
+1 11208
+1 11208
+1 11208
+1 11208
+1 11208
+1 11208
+1 11208
+1 11208
+1 11208
+1 11208
+1 11208
+3 5604
+1 11244

fn=(3368)
109 15250
+1 9150
+6 9150
cfn=(3370) IsSystemNamespace
calls=3050 +52 
* 21350
* 12150
cfn=(5270)
calls=1000 +66 
* 24000
* 3000
+1 2000
+15 4100
+1 6100

fn=(3370)
168 9150
+1 6100
+1 6100

fn=(5266)
80 2500
+1 1500
cfn=(5268)
calls=500 +72 
* 18000
* 3500
cfn=(3368)
calls=500 +28 
* 27500
* 2000
+1 1000

fn=(5270)
182 6000
+1 3000
+1 4500
cfi=(55)
cfn=(5272)
calls=1500 3152 
* 13500
-1 6000
+2 3000

fl=(179)
fn=(3244) _bt_cachemetadata
114 95
+3 95
cfi=(13)
cfn=(798)
calls=19 772 
* 6604
* 38
+10 76
+3 133
cob=(3)
cfi=(3)
cfn=(856)
calls=19 0 
* 380
* 19
* 19
+15 38

fn=(3242) _bt_checkpage
663 35770
+1 45990
+8 20440
+11 51100
+7 25550

fn=(3196)
253 15324
+16 10216
+2 7593
+7 7593
+2 7593
+2 15186
cfn=(3198)
calls=2531 730 
* 3315092
* 2531
+1 22779
+1 15186
+9 15186
+1 5062
-1 5062
+2 5062
-1 5062
+2 5062
-1 5062
+4 5062
+9 115
cfn=(3198)
calls=23 730 
* 45648
* 23
+1 207
+1 138
+1 69
+3 138
+1 46
-1 46
+7 92
+1 46
-1 46
+10 92
+3 8
+2 20
cfn=(3608) _bt_relbuf
calls=4 885 
* 1508
+1 8
438 57
+2 57
+5 95
cfn=(3244)
calls=19 114 
* 7497
+6 38
+4 114
cfn=(3246)
calls=19 866 
* 42504
* 19
+1 171
+1 114
+2 114
+1 19
+10 76
+10 19
+1 10216

fn=(3608)
885 20
+1 12
cfi=(50)
cfn=(3610)
calls=4 3339 
* 1468
+1 8

fn=(3246)
866 17864
+4 5104
+1 10208
cfi=(50)
cfn=(3240)
calls=2552 3553 
* 288376
+1 15312
cfi=(50)
cfn=(3248)
calls=2552 1522 
* 3427581
* 2552
+1 12760
cfi=(50)
cfn=(3240)
calls=2552 3553 
* 413424
+1 12760
cfn=(3242)
calls=2552 663 
* 89320
+1 2552
+1 5104

fn=(3198)
730 15348
+3 5116
+3 12790
cfi=(50)
cfn=(3200)
calls=2558 595 
* 2790428
* 2558
+1 12790
cfi=(50)
cfn=(3240)
calls=2558 3553 
* 414396
+1 12790
cfn=(3242)
calls=2558 -75 
* 89530
* 2558
848 2558
+1 5116

fl=(61)
fn=(1270)
110 18
+1 12
+2 12
+1 6
+1 12
-5 12
+1 8
+2 8
+1 4
+1 8

fl=(212)
fn=(3790)
251 8
+1 10
+5 8
+4 8
cfi=(191)
cfn=(3430)
calls=2 88 
* 336
+1 2
cfi=(26)
cfn=(3792)
calls=2 4478 
* 32
* 10
cfi=(210)
cfn=(3794)
calls=2 162 
* 176
+1 6
cfi=(191)
cfn=(3436)
calls=2 +36 
* 670
* 2
+5 6
cfi=(58)
cfn=(3800)
calls=2 1401 
* 372
+1 2
+13 4

fn=(3946)
104 4
+2 2

fn=(3982)
114 2004
+6 2505
+4 3
cfi=(228)
cfn=(3984)
calls=1 -45 
* 276
* 1
+12 1000
+23 1002

fn=(5708)
167 6
+1 5
+10 5
cob=(3)
cfi=(3)
cfn=(424)
calls=1 0 
* 15
* 1
* 5
cfi=(58)
cfn=(3438)
calls=1 1561 
* 228
+1 1
+13 4

fl=(97)
fn=(2038)
237 6
+4 2
+1 10
cfi=(87)
cfn=(2000)
calls=2 493 
* 28
* 10
cfi=(87)
cfn=(2002)
calls=2 476 
* 42
* 2
+2 8
+1 10
cfi=(87)
cfn=(2000)
calls=2 493 
* 28
* 10
cfi=(87)
cfn=(2002)
calls=2 476 
* 42
* 2
+3 2
+1 4

fn=(2258)
253 3
+3 1
cfn=(2038)
calls=1 -19 
* 103
* 4
cfi=(87)
cfn=(2168)
calls=1 373 
* 1189
* 1
+3 4
+6 2
+1 2
+6 1
+1 5
-2 3
+4 5
+26 2

fl=(115)
fn=(2092) GetHugePageSize
403 5
+8 2
+1 2
+10 3
cfi=(25)
cfn=(1278)
calls=1 2186 
* 598
* 1
+5 2
+2 1
+2 287
cob=(3)
cfi=(3)
cfn=(2098)
calls=40 0 
* 15701
cob=(1)
cfi=(1)
cfn=(223)
calls=1 0 
* 1629
* 45
* 82
+2 3
+2 6
+1 1
-7 205
cob=(3)
cfi=(3)
cfn=(1486)
calls=41 0 
* 8547
* 41
* 82
+12 3
cfi=(25)
cfn=(1374)
calls=1 2385 
* 756
+4 2

fn=(2088)
560 9
+20 3
cfn=(2090) CreateAnonymousSegment
calls=1 458 
* 29604
* 1
+1 2
+3 3
cfi=(67)
cfn=(2110)
calls=1 362 
* 32
+3 1
+6 1
+3 3
+2 1
+3 5
cfn=(2112) InternalIpcMemoryCreate
calls=1 104 
* 4861
* 1
+1 2
+1 1
+56 2
+1 1
cob=(3)
cfi=(3)
cfn=(654)
calls=1 0 
* 5
* 1
* 2
+1 2
+1 2
+3 5
cfi=(9)
cfn=(490)
calls=1 0 
* 15
* 2
+5 3
+1 3
+5 3
+1 2
+1 3
+3 2
+1 3
+9 3
+2 6
cob=(3)
cfi=(3)
cfn=(856)
calls=1 0 
* 22
* 1
+1 1
+4 4

fn=(2090)
458 5
+1 3
+1 1
+1 1
+6 6
+8 5
cfn=(2092)
calls=1 -72 
* 28004
+2 7
+1 9
+2 11
cob=(1)
cfi=(1)
cfn=(223)
calls=1 0 
* 1292
* 5
* 1
+2 1
cob=(5)
cfi=(5)
cfn=(472)
calls=1 0 
* 3
* 1
* 2
+1 5
+1 4
cfi=(57)
cfn=(2084)
calls=1 1286 
* 68
* 6
cfi=(57)
cfn=(2086)
calls=1 1336 
* 96
+5 5
+6 3
+1 8
cob=(3)
cfi=(3)
cfn=(598)
calls=1 0 
* 33
* 1
* 1
+2 1
cob=(5)
cfi=(5)
cfn=(472)
calls=1 0 
* 3
* 1
* 2
+3 2
+15 3
+1 1
+1 4

fn=(2112)
104 9
+2 1
+22 6
cob=(1)
cfi=(1)
cfn=(223)
calls=1 0 
* 1308
* 5
* 1
+2 2
+94 5
cfi=(67)
cfn=(2110)
calls=1 362 
* 32
+3 6
cob=(1)
cfi=(1)
cfn=(223)
calls=1 0 
* 1266
* 5
* 1
+2 2
+5 4
cfi=(67)
cfn=(2110)
calls=1 362 
* 32
+10 9
cfi=(17)
cfn=(1138)
calls=1 -13 
* 1243
+2 4
cfi=(54)
cfn=(1950)
calls=1 1259 
* 912
+3 1
+1 7

fl=(116)
fn=(2138)
225 2008
+1 502
+2 2510
+6 502
+1 1506
-10 128
+1 32
+2 160
+6 32
+1 96

fl=(269)
fn=(4758)
340 15
+5 9
cfi=(271)
cfn=(4690)
calls=3 78 
* 30
* 12
cfi=(271)
cfn=(4690)
calls=3 78 
* 30
* 6
+2 9
+1 9
+3 12
+1 12
+1 12
+1 12
+1 12
-10 36
+12 6

fn=(4682)
672 18
+2 24
cfi=(13)
cfn=(2950)
calls=6 853 
* 1044
* 24
+1 12

fn=(4700)
588 12
+1 12
cfi=(13)
cfn=(2950)
calls=3 853 
* 522
* 15
+4 9
cfi=(271)
cfn=(4702)
calls=3 90 
* 30
* 12
cfi=(13)
cfn=(940)
calls=3 925 
* 330
* 6
+2 3
+1 9
cfi=(271)
cfn=(4690)
calls=3 78 
* 30
* 6
+2 9
+2 21
cfi=(45)
cfn=(960)
calls=3 129 
* 870
* 6
+1 27
+1 3
-6 21
+9 3
+1 6

fl=(86)
fn=(2852)
285 4
+7 3
cob=(1)
cfi=(1)
cfn=(223)
calls=1 0 
* 854
* 5
* 3
cob=(5)
cfi=(5)
cfn=(2858) sem_trywait@@GLIBC_2.2.5
calls=1 0 
* 8
* 1
* 4
+2 1
cob=(5)
cfi=(5)
cfn=(472)
calls=1 0 
* 3
* 1
* 3
+6 1
+1 2

fn=(2242)
252 348
+7 464
+9 696
+1 232
+1 348
cfn=(2244) PosixSemaphoreCreate
calls=116 135 
* 3703
+3 348
+2 116
+1 232

fn=(2128)
200 5
+13 3
cfn=(1998)
calls=1 -48 
* 34
* 2
cfi=(87)
cfn=(2130)
calls=1 +15 
* 32
-1 1
+4 1
+1 2
+1 3
+2 3
cfi=(67)
cfn=(2110)
calls=1 362 
* 32
+1 2

fn=(2244)
135 464
+1 580
cob=(5)
cfi=(5)
cfn=(2250) sem_init@@GLIBC_2.2.5
calls=115 0 
* 1265
cob=(1)
cfi=(1)
cfn=(223)
calls=1 0 
* 810
* 120
* 232
+2 232

fn=(1998)
165 8
+6 10
cfi=(87)
cfn=(2000)
calls=2 493 
* 46
+2 4

fl=(161)
fn=(2940)
1386 395
+5 395
cfn=(2942)
calls=79 125 
* 6478
+2 632
+2 395
cfi=(162)
cfn=(2948)
calls=79 107 
* 30621
* 79
+3 237
+3 79
+1 158

fn=(5196) OidOutputFunctionCall
1834 2500
+3 2500
cfn=(2942)
calls=500 125 
* 41000
+1 2500
cfn=(5180)
calls=500 -84 
* 137000
+1 1000

fn=(5008)
1918 2008
+1 3012
+1 1500
cfi=(301)
cfn=(5238)
calls=500 173 
* 88000
* 500
+2 2
+1 1004

fn=(5182) FunctionCall1Coll
1114 6000
+4 8000
+2 2000
+1 1000
+2 5000
cfi=(41)
cfn=(5184)
calls=1000 523 
* 227000
* 1000
+3 3000
+3 1000
+1 2000

fn=(2942)
125 15535
+1 18642
cfn=(2944) fmgr_info_cxt_security
calls=3107 +20 
* 4070054
+1 6214

fn=(2943)
125 10
+1 12
cfn=(2945) fmgr_info_cxt_security'2
calls=2 +20 
* 138
+1 4

fn=(5000)
1710 612514
+4 175004
+3 612514
+2 175004
+1 175004
+1 262506
+1 262506
+1 87502
+1 87502
+2 437510
cfi=(198)
cfn=(5356)
calls=87500 265 
* 27885500
cfi=(41)
cfn=(5002)
calls=2 512 
* 404
* 87502
+3 175004
+8 262506
+5 87502
+1 175004

fn=(5024)
794 12
+4 14
+2 4
+1 2
+2 8
cfi=(34)
cfn=(5026)
calls=2 208 
* 171
* 2
+3 6
+3 2
+1 4

fn=(2946) fmgr_isbuiltin
74 9486
+4 6324
+1 2
+6 9483
+1 6322
+3 22127
+1 6324

fn=(4030)
1950 10012
+1 25030
+3 2503
+1 5006

fn=(5170)
2130 1500
+7 3000
+3 1500
+2 2000
+1 1500
+3 1000

fn=(5180)
1754 5000
+1 5000
cfn=(5182)
calls=1000 1114 
* 256000
+1 2000

fn=(3192)
612 24438
+1 24438
cob=(3)
cfi=(3)
cfn=(856)
calls=4073 0 
* 89606
* 4073
+1 12219
+1 8146
+1 8146

fn=(3342)
1134 266441
+4 304504
+2 76126
+1 76126
+1 38063
+1 38063
+2 190315
cfi=(198)
cfn=(3550)
calls=505 464 
* 8080
cfi=(195)
cfn=(3548)
calls=1574 83 
* 25184
cfi=(196)
cfn=(3478)
calls=4084 355 
* 63311
cfi=(195)
cfn=(3476)
calls=19121 268 
* 330389
cfi=(187)
cfn=(3354)
calls=1529 136 
* 79835
cfi=(187)
cfn=(3344)
calls=11250 205 
* 812035
* 38063
+3 114189
+3 38063
+1 76126

fn=(4172) fetch_finfo_record
471 7
+5 5
cfi=(81)
cfn=(3292)
calls=1 47 
* 514
* 1
+3 5
cfi=(231)
cfn=(4174)
calls=1 172 
* 1123
* 1
+2 2
+11 2
cob=(12)
cfi=(233)
cfn=(4176) pg_finfo_plpgsql_inline_handler
calls=1 297 
* 5
* 1
+3 2
+2 4
+4 1
+9 3
cfi=(13)
cfn=(952)
calls=1 1032 
* 85
+1 1
+1 5

fn=(4998)
1825 14
+3 10
cfn=(2942)
calls=2 125 
* 164
+1 12
cfn=(5000)
calls=2 1710 
* 488
+1 4

fn=(3116)
135 318
+1 318
cfn=(2945)
calls=2 +10 
* 138
cfn=(2944)
calls=51 +10 
* 3519
+1 106

fn=(5068)
2015 2505
+4 1002
+3 2004
+1 2004
+14 2505
cfi=(294)
cfn=(5070)
calls=501 90 
* 5010
* 1002
+3 2505
cfi=(45)
cfn=(5072)
calls=501 411 
* 13527
* 1002
cfi=(250)
cfn=(4478)
calls=501 43 
* 12024
* 501
+6 2004
+4 501
+1 1002

fn=(2944)
146 28422
+13 6316
+1 6316
+1 9474
+1 6316
+2 9474
cfn=(2946)
calls=3158 -90 
* 59992
* 9474
+5 12628
+1 12628
+1 12628
+1 6314
+1 12628
+1 9471
+1 3157
+4 4
cfi=(151)
cfn=(3444)
calls=1 1114 
* 73322
* 1
+1 2
+2 8
+2 4
+1 4
+1 4
+16 4
+1 2
-1 2
+2 5
cfi=(190)
cfn=(4020)
calls=1 362 
* 42
* 1
-1 2
+2 1
-3 2
+12 4
+32 6
cfn=(4022) fmgr_info_C_lang
calls=1 360 
* 3782171
+1 2
+1 1
+13 3
+1 3
cfi=(151)
cfn=(3418)
calls=1 1161 
* 103
+1 12632

fn=(2945)
146 36
+13 8
+1 8
+1 12
+1 8
+2 12
cfn=(2946)
calls=4 -90 
* 76
* 12
+5 16
+1 16
+1 16
+1 8
+1 16
+1 12
+1 4
+88 16

fn=(4024) lookup_C_func
531 4
+1 9
+3 3
+1 2
+12 2

fn=(4178) record_C_func
556 6
+1 9
+5 3
+4 118
+1 1
+1 1
+1 6
cfi=(31)
cfn=(794)
calls=1 317 
* 2672
* 1
+7 1
-1 6
cfi=(31)
cfn=(836)
calls=1 910 
* 1014
* 1
+6 5
+1 6
+1 3
+1 3
+1 2

fn=(4018)
1406 6
+5 5
cfn=(2942)
calls=1 125 
* 3855753
+2 8
+2 2
+1 1
+2 5
cob=(12)
cfi=(233)
cfn=(4180) plpgsql_inline_handler
calls=1 301 
* 372566419
* 1
+3 3
+3 1
+1 2

fn=(4022)
360 6
+9 3
cfn=(4024)
calls=1 531 
* 20
* 1
+1 2
+18 7
cfi=(151)
cfn=(4026)
calls=1 1376 
* 1985
* 1
+2 3
+2 3
cfi=(41)
cfn=(4028)
calls=1 186 
* 184
* 1
+2 7
cfi=(151)
cfn=(4026)
calls=1 1376 
* 1785
* 1
+2 3
+2 3
cfi=(41)
cfn=(4028)
calls=1 186 
* 213
* 1
+3 7
cfi=(231)
cfn=(4032)
calls=1 109 
* 3772111
* 1
+4 5
cfn=(4172)
calls=1 +66 
* 1767
* 1
+3 6
cfn=(4178)
calls=1 556 
* 3858
+2 3
cfi=(13)
cfn=(952)
calls=1 1032 
* 85
+1 3
cfi=(13)
cfn=(952)
calls=1 1032 
* 85
+3 4
+4 3
+1 1
+7 2

fn=(5176)
1996 2500
+5 3000
+3 3000
cfn=(5068)
calls=500 +11 
* 49000
+1 1000

fl=(188)
fn=(3364)
75 10250
+1 18450
+9 2050
cfi=(53)
cfn=(2878)
calls=2050 7896 
* 22550
* 4100
+17 6150
cfi=(172)
cfn=(3366)
calls=2050 -5 
* 77900
* 4100
+2 6150
+14 14350
+1 2050
+42 4100

fl=(31)
fn=(794)
317 168
+14 84
+3 21
+5 56
+1 4
+2 26
+1 91
cfi=(14)
cfn=(432)
calls=13 +52 
* 5623
* 7
cfi=(14)
cfn=(432)
calls=1 +52 
* 428
* 14
+6 42
cob=(3)
cfi=(3)
cfn=(424)
calls=14 0 
* 266
* 14
* 21
cob=(3)
cfi=(3)
cfn=(424)
calls=7 0 
* 127
* 7
* 63
cfn=(796) DynaHashAlloc
calls=21 -70 
* 2793
* 21
+1 2331
+2 84
+1 126
cob=(3)
cfi=(3)
cfn=(810)
calls=20 0 
* 1205
cob=(1)
cfi=(1)
cfn=(223)
calls=1 0 
* 1308
* 25
+3 84
+1 84
cfi=(13)
cfn=(812)
calls=14 -27 
* 126
+5 84
+1 10
+1 76
+4 60
+1 21
+2 24
+3 8
+12 84
+2 84
+1 12
+2 34
+5 84
+2 84
+1 12
+2 34
+3 84
+1 35
+2 28
+2 84
+7 28
+1 35
+1 14
+1 14
+3 28
+14 28
+1 28
+1 42
+1 28
+3 84
+2 56
cfn=(796)
calls=14 279 
* 1862
* 28
+1 56
+6 42
+2 63
cfn=(814) hdefault
calls=21 571 
* 16863
+2 63
+2 84
+12 20
+3 84
+7 84
+6 84
+2 28
+1 28
+7 84
+3 84
+1 84
+4 84
+1 84
+1 84
+3 105
cfn=(816) init_htab
calls=21 637 
* 118081
* 63
+11 84
+1 42
-1 28
+12 60
+1 10
+2 7
+2 42
+1 14
-1 30
+1 10
+7 60
+4 24
+2 24
+2 668
+2 930
cfn=(832) element_alloc
calls=155 1658 
* 544484
-2 12
+2 72
cfn=(832)
calls=12 1658 
* 32945
* 501
-4 704
+11 84
+1 6
+1 3
+1 12
-1 18
+1 72

fn=(2164)
780 28
+6 21
cfn=(2008) next_pow2_long
calls=7 1735 
* 626
* 7
+2 63
cfn=(2008)
calls=7 1735 
* 356
* 7
+2 7
+1 28
+3 7
+1 14

fn=(3502)
1380 45
+1 27
+1 18
+1 18
+1 45
+1 27
cfn=(3504) register_seq_scan
calls=9 1788 
* 279
+1 18

fn=(3504)
1788 45
+1 27
+3 36
+1 18
cfi=(26)
cfn=(3506)
calls=9 758 
* 72
* 18
+1 27
+1 36

fn=(814)
571 84
+1 63
+2 16296
+2 42
+1 42
+3 42
+1 42
+2 42
+2 42
+3 42
+2 42
+1 42
+5 42

fn=(816)
637 126
+1 63
+9 84
+1 10
+1 1440
-1 490
+8 210
cfn=(818) next_pow2_int
calls=21 1743 
* 1475
* 21
+8 147
+3 189
+1 126
+5 189
+1 84
cfn=(818)
calls=21 1743 
* 790
* 21
+6 126
+9 84
+2 42
+2 98
cfn=(796)
calls=14 279 
* 1862
-1 28
+2 56
+5 84
+2 891
cfn=(822) seg_alloc
calls=297 1639 
* 102676
* 594
+1 1188
-3 3690
+8 84
cfn=(830) choose_nelem_alloc
calls=21 604 
* 966
* 42
+14 21
+1 84

fn=(832)
1658 1410
+1 705
+7 940
+4 1410
+2 705
+1 1645
cfi=(87)
cfn=(2136)
calls=162 177 
* 8262
cfn=(796)
calls=73 279 
* 17388
* 235
+2 470
+4 235
+1 470
+1 470
+2 157272
+1 104848
+1 104848
-4 210401
+8 940
+1 1600
cfi=(125)
cfn=(2216)
calls=160 225 
* 2240
* 320
+3 2820
+1 2585
+2 940
+1 1440
+2 160
+1 320
-1 75
+1 150

fn=(2006)
733 35
+10 21
cfn=(2008)
calls=7 1735 
* 626
* 7
+2 63
cfn=(2008)
calls=7 1735 
* 356
* 7
+2 7
+1 28
+4 7
+2 28
cfi=(87)
cfn=(2000)
calls=7 493 
* 161
* 35
cfi=(87)
cfn=(2002)
calls=7 476 
* 147
* 7
+2 28
cfi=(87)
cfn=(2000)
calls=7 493 
* 161
* 35
cfi=(87)
cfn=(2002)
calls=7 476 
* 147
* 7
+3 21
cfn=(830)
calls=7 604 
* 308
* 14
+1 42
+1 35
+1 35
cfi=(87)
cfn=(2000)
calls=7 493 
* 161
* 35
cfi=(87)
cfn=(2000)
calls=7 493 
* 161
* 35
cfi=(87)
cfn=(2002)
calls=7 476 
* 147
* 7
+4 7
+1 14

fn=(2166)
804 28
+3 28
+1 14

fn=(3714)
1835 10
+10 4
+4 10
+6 2
+1 4

fn=(820) my_log2
1719 210
+5 210
+3 2605
+2 70
+1 140

fn=(3774)
815 8
+1 4
+7 8
cfn=(3776) hash_stats
calls=2 +11 
* 12
+5 8
cfi=(13)
cfn=(1396)
calls=2 212 
* 928
+2 4

fn=(796)
279 572
+2 715
cfi=(13)
cfn=(798)
calls=143 772 
* 25794
+1 286

fn=(836)
910 204918
+3 58548
-2 175644
cfi=(33)
cfn=(2952)
calls=6797 65 
* 387429
cfi=(33)
cfn=(2224)
calls=22413 53 
* 2798673
cfi=(33)
cfn=(838)
calls=64 35 
* 11320
* 234192
cfn=(842)
calls=29274 +13 
* 5656329
+5 58548

fn=(3508)
1390 4548
+11 5685
+3 1576
+1 1576
+1 1470
+1 1182
+6 2229
+1 2229
+1 2229
+1 2229
+1 2229
+2 2229
+2 6
cfn=(3510) hash_seq_term
calls=2 +45 
* 102
+1 4
+6 5928
+1 3705
+2 5187
+8 741
+3 7416
+2 21
+1 21
cfn=(3510)
calls=7 +21 
* 357
+1 14
+2 7388
+2 3
+1 3
+1 21
-13 20704
+18 2936
+1 2936
+1 440
+1 1320
+1 880
+1 880
-2 882
+1 588
+1 1394

fn=(5556) has_seq_scans
1821 3045
+3 5075
+5 1015
+1 2030

fn=(2226)
861 126350
+1 202160
cfi=(33)
cfn=(2224)
calls=25270 53 
* 3135920
+1 50540

fn=(818)
1743 168
+1 84
+2 126
cfn=(820)
calls=42 -27 
* 1635
* 168
+1 84

fn=(2008)
1735 112
+2 84
cfn=(820)
calls=28 -18 
* 1600
* 112
+1 56

fn=(5558) expand_table
1503 5075
+1 3045
+20 5075
+1 7105
+1 5075
+2 4060
+3 20
+3 40
cfn=(822)
calls=5 1639 
* 2764
* 20
+2 25
+4 25
+8 25
+5 30
-13 5050
+8 5050
+5 6060
+2 24
+1 42
+9 42
+1 30
+2 42
+1 42
+2 30
+1 30
+2 24
-9 7063
+1 5045
+2 7063
+1 7063
+2 5045
+1 5045
+2 4036
+4 4290
+1 8580
cfn=(844) calc_bucket
calls=1430 868 
* 21450
* 4290
+2 2094
+1 2094
+4 2196
+1 1464
-11 1464
-2 1464
+2 1396
-2 3426
+17 2030
+1 2030
+2 1015
+1 4060

fn=(844)
868 309144
+3 309144
+1 309144
+1 85200
+2 28400
+1 56800
-1 48886
+1 97772

fn=(3512) deregister_seq_scan
1800 36
+4 36
+2 45
+2 63
+1 63
+1 27
+1 9
-7 18
+12 18

fn=(822)
1639 1208
+3 906
+1 2114
cfi=(87)
cfn=(2136)
calls=281 177 
* 14331
cfn=(796)
calls=21 279 
* 3462
* 302
+2 604
+3 7550
cob=(3)
cfi=(3)
cfn=(828)
calls=301 0 
* 72240
cob=(1)
cfi=(1)
cfn=(223)
calls=1 0 
* 1511
* 306
+2 302
+1 604

fn=(830)
604 84
+7 140
+10 28
+3 28
+1 112
+1 56
-2 106
+1 424
+1 212
+2 28
+1 56

fn=(842)
924 682704
+1 227568
+1 501719
+23 58546
-23 46583
+23 224206
+7 140808
+1 97724
-1 17768
+2 3045
cfn=(5556)
calls=1015 1821 
* 11165
* 1015
-1 2030
+2 3045
cfn=(5558)
calls=1015 1503 
* 152553
+6 379280
cfn=(844)
calls=75856 -97 
* 1223040
* 75856
+2 606848
+1 455136
+2 530992
+2 151712
+3 379280
+1 227568
+5 227568
+1 227568
+2 75856
+2 284804
+1 341215
cob=(3)
cfi=(3)
cfn=(3074)
calls=48738 0 
* 1062814
cob=(1)
cfi=(1)
cfn=(223)
calls=1 0 
* 1360
cfn=(1036) string_compare
calls=6 294 
* 1704
* 48743
-1 97490
+2 48745
+1 44912
+1 67368
-6 196624
+13 151712
+1 96372
+5 455322
+3 61848
+1 83724
+1 6032
+3 41670
+3 83340
+1 137100
cfi=(125)
cfn=(2216)
calls=13710 225 
* 191940
* 27420
+4 437535
+3 83340
+3 250020
+1 229185
+2 83340
+1 123390
+7 62505
+11 48194
+1 6
+3 96380
+4 120475
cfn=(858) get_hash_entry
calls=24095 1251 
* 2187989
* 24095
+1 48190
+17 72285
+1 48190
+3 72285
+1 192760
cob=(3)
cfi=(3)
cfn=(856)
calls=24040 0 
* 351598
cfi=(16)
cfn=(460)
calls=55 46 
* 15418
* 24040
+9 72285
+6 303424

fn=(858)
1251 120475
+1 72285
+6 96652
+1 152130
cfi=(125)
cfn=(2216)
calls=15213 225 
* 212982
* 30426
+3 265793
+2 48326
+1 24095
+57 289140
+1 505995
+2 111593

ob=(7)
fl=(7)
fn=(2354) shm_open
0 16
cob=(1)
cfi=(1)
cfn=(223)
calls=1 0 
0 2288
0 5
0 14
cob=(1)
cfi=(1)
cfn=(223)
calls=1 0 
0 1291
0 5
0 10
cob=(1)
cfi=(1)
cfn=(223)
calls=1 0 
0 1310
0 5
0 4
cob=(1)
cfi=(1)
cfn=(223)
calls=1 0 
0 1366
0 5
0 6
cob=(1)
cfi=(1)
cfn=(223)
calls=1 0 
0 745
0 5
0 10

fn=(5860)
0 8
cob=(1)
cfi=(1)
cfn=(223)
calls=1 0 
0 1448
0 5
0 1
cfn=(5872) 0x0000000000002340
calls=1 0 
0 9
0 3

fn=(318)
0 13

ob=(9)
fl=(31)
fn=(858)
1267 272
+15 476
cfn=(832)
calls=68 1658 
* 47875
* 204
+37 68
+7 136917
+2 15213
+1 30426
-1 8882
+1 17764

fn=(1036)
294 36
+1 42
cob=(3)
cfi=(3)
cfn=(1044)
calls=5 0 
* 265
cob=(1)
cfi=(1)
cfn=(223)
calls=1 0 
* 1339
* 10
+1 12

fn=(3776)
834 8
+13 4

fn=(3510)
1466 36
+1 54
+1 36
cfn=(3512)
calls=9 1800 
* 315
+1 18

fl=(259)
fn=(4568)
78 12
+1 18
+1 8
-2 10584
+1 14616
+1 7056

fn=(4928)
90 12
+1 18
+1 8

fl=(114)
fn=(2334)
48 2
+2 2

fn=(2082)
42 2
+1 1
+1 2

fl=(124)
fn=(3232)
47 120960
+1 80640
+1 80640

fn=(2210)
56 65536
+1 49152
+1 32768
-2 24032
+1 18024
+1 12016
-2 8
+1 6
+1 4

fn=(2208)
162 81920
+1 81920
cfn=(2210)
calls=16384 56 
* 147456
+1 32768
-2 10
+1 10
cfn=(2210)
calls=2 56 
* 18

ob=(7)
fl=(7)
fn=(318)
0 3

fn=(2362) where_is_shmfs
0 11
cob=(1)
cfi=(1)
cfn=(223)
calls=1 0 
0 1312
0 5
0 16

fn=(5872)
0 9

ob=(9)
fl=(124)
fn=(2208)
164 4

ob=(8)
fl=(8)
fn=(330)
0 16

fn=(5834)
0 8
cob=(1)
cfi=(1)
cfn=(223)
calls=1 0 
0 934
0 5
0 1
cfn=(5852) 0x0000000000000630
calls=1 0 
0 9
0 3

fn=(5852)
0 9

ob=(10)
fl=(22)
fn=(1810)
0 39

fn=(662)
0 60

ob=(12)
fl=(241) /home/mithuncy/fsm_code/src/pl/plpgsql/src/pl_gram.y
fn=(4296) tok_is_keyword
2549 7
+1 3
+5 2
+11 1
+1 2

fn=(4298) read_sql_construct
2661 48
+4 3
+1 3
+3 9
cob=(9)
cfi=(80)
cfn=(1888)
calls=3 47 
* 400
* 3
+1 15
cob=(9)
cfi=(80)
cfn=(1918)
calls=3 164 
* 360
* 3
+3 9
+1 6
+4 3
cfi=(237) /home/mithuncy/fsm_code/src/pl/plpgsql/src/pl_scanner.c
cfn=(4258) plpgsql_yylex
calls=3 256 
* 2332
* 3
* 10
cfi=(237)
cfn=(4258)
calls=10 256 
* 7874
* 10
* 13
+1 26
+1 9
+1 43
+1 2
+1 33
+2 35
+1 1
+1 38
+1 2
+1 34
+2 1
+1 2
+8 40
+17 10
+2 9
+2 6
+1 3
+1 6
+1 9
+3 12
+8 21
cfi=(237)
cfn=(4306) plpgsql_append_source_text
calls=3 527 
* 374
* 3
+3 6
+2 3
+1 8
-1 48
cob=(9)
cfi=(42)
cfn=(934)
calls=4 222 
* 61
* 4
* 8
+4 6
cob=(9)
cfi=(13)
cfn=(2546)
calls=3 956 
* 635
* 3
* 3
+1 9
cob=(9)
cfi=(13)
cfn=(928)
calls=3 1162 
* 651
* 3
* 6
+1 6
+1 6
+1 6
+1 3
cfi=(239) /home/mithuncy/fsm_code/src/pl/plpgsql/src/pl_funcs.c
cfn=(4274) plpgsql_ns_top
calls=3 84 
* 15
* 3
* 6
+1 9
cob=(9)
cfi=(13)
cfn=(952)
calls=3 1032 
* 255
* 3
+2 6
+1 6
cob=(3)
cfi=(3)
cfn=(424)
calls=2 0 
* 30
* 2
* 14
cfn=(4314) check_sql_expr
calls=2 3598 
* 27498
+2 3
+1 15

fn=(4344) check_labels
3693 16
+1 4
+16 10

fn=(4314)
3598 18
+5 15
+3 6
+1 6
+2 6
+1 6
+1 9
+1 9
+2 12
cfi=(238) /home/mithuncy/fsm_code/src/pl/plpgsql/src/../../../../src/include/utils/palloc.h
cfn=(4208) MemoryContextSwitchTo
calls=3 110 
* 36
* 3
+1 9
cob=(9)
cfi=(214)
cfn=(3882)
calls=3 37 
* 34664
* 3
+1 9
cfi=(238)
cfn=(4208)
calls=3 110 
* 36
+3 9
+1 6

fn=(4320) read_sql_expression2
2622 7
+1 14
cfn=(4298)
calls=1 +38 
* 10091
+2 2

fl=(239)
fn=(5588) free_stmt
381 8
+1 24
+21 3
cfn=(5590) free_fori
calls=1 556 
* 5336
+1 1
+14 3
cfn=(5600) free_return
calls=1 645 
* 18
+1 1
+53 4

fn=(5589) free_stmt'2
381 4
+1 12
+54 3
cfn=(5598) free_dynexecute
calls=1 700 
* 1948
+1 1
+35 2

fn=(5598)
700 4
+3 4
cfn=(5582) free_expr
calls=1 +27 
* 1922
+1 4
cfi=(242) /home/mithuncy/fsm_code/src/pl/plpgsql/src/../../../../src/include/nodes/pg_list.h
cfn=(4398) list_head
calls=1 78 
* 8
* 4
+4 2

fn=(5590)
556 4
+1 4
cfn=(5582)
calls=1 730 
* 1652
+1 4
cfn=(5582)
calls=1 730 
* 1652
+1 4
cfn=(5582)
calls=1 730 
* 8
+1 4
cfn=(5587) free_stmts'2
calls=1 -84 
* 2002
+1 2

fn=(5580) plpgsql_free_function_memory
740 4
+7 2
+2 16
+2 24
+5 4
+2 8
cfn=(5582)
calls=2 -28 
* 16
+1 8
cfn=(5582)
calls=2 -29 
* 16
+2 2
-14 14
+33 2
+3 4
+1 4
cfn=(5584) free_block
calls=1 487 
* 5453
+1 2
+7 4
+1 4
cob=(9)
cfi=(13)
cfn=(1396)
calls=1 212 
* 304
* 1
+1 2
+1 2

fn=(4222) plpgsql_ns_additem
95 30
+7 15
cob=(3)
cfi=(3)
cfn=(424)
calls=5 0 
* 83
* 5
* 15
cob=(9)
cfi=(13)
cfn=(940)
calls=5 925 
* 615
* 5
* 5
+1 15
+1 15
+1 15
+1 30
cob=(3)
cfi=(3)
cfn=(810)
calls=5 0 
* 114
* 5
+1 10
+1 10

fn=(4348) plpgsql_ns_pop
70 4
+2 2
+1 3
-1 12
+2 6
+1 4

fn=(5582)
730 36
+1 30
+2 12
cob=(9)
cfi=(165)
cfn=(5594)
calls=3 +8 
* 5169
* 3
+1 6
+2 18

fn=(4278) plpgsql_ns_lookup
135 20
+2 2
+5 12
+4 12
cob=(3)
cfi=(3)
cfn=(446)
calls=2 0 
* 44
* 2
* 4
+2 2
+3 2
+1 2
+1 2
-9 3
-1 2
-1 2
+1 8
-1 8
+17 6
+20 6
+3 9
-45 10
+49 2
+2 1
+1 4

fn=(5600)
645 4
+1 4
cfn=(5582)
calls=1 +84 
* 8
+1 2

fn=(4274)
84 8
+1 4
+1 8

fn=(4218) plpgsql_ns_push
57 15
+1 6
+1 4
+1 10
cfn=(4222)
calls=2 +35 
* 362
* 2
* 5
cfn=(4222)
calls=1 +35 
* 245
* 1
+1 6

fn=(5584)
487 4
+1 4
cfn=(5586) free_stmts
calls=1 -12 
* 5439
+1 4
+11 2

fn=(4214) plpgsql_ns_init
46 2
+1 1
+1 2

fn=(5586)
476 4
+3 3
cfi=(242)
cfn=(4398)
calls=1 78 
* 10
* 2
+2 8
cfn=(5588)
calls=2 381 
* 5398
-2 12
+4 2

fn=(5587)
476 4
+3 3
cfi=(242)
cfn=(4398)
calls=1 78 
* 10
* 2
+2 4
cfn=(5589)
calls=1 381 
* 1970
-2 7
+4 2

fl=(238)
fn=(4208)
110 18
+1 18
+2 18
+1 6
+1 12
-5 12
+1 12
+2 12
+1 4
+1 8
-5 9060
+1 9060
+2 9060
+1 3020
+1 6040

fl=(234)
fn=(4358) add_dummy_return
1011 5
+6 5
+10 5
+1 5
cfi=(242)
cfn=(4360) list_tail
calls=1 84 
* 10
* 2
-1 2
+5 2
cob=(9)
cfi=(13)
cfn=(2546)
calls=1 -76 
* 166
* 1
* 1
+1 2
+1 2
+1 4
+2 9
cob=(9)
cfi=(45)
cfn=(960)
calls=1 129 
* 163
* 1
* 1
+2 4

fn=(4240) build_datatype
2021 14
+1 16
+3 10
+6 4
cob=(9)
cfi=(13)
cfn=(940)
calls=2 925 
* 184
* 2
* 2
+2 8
cob=(9)
cfi=(13)
cfn=(928)
calls=2 1162 
* 352
* 2
* 4
+1 8
+1 28
+5 4
+1 2
+21 8
+1 8
+1 8
+1 8
+1 4
+4 8
+6 4
+1 8
-1 6
+13 6
+2 2
+1 8

fn=(4250) plpgsql_adddatum
2207 8
+1 10
+6 8
+1 24
+1 4

fn=(4886) resolve_column_ref
1151 10
+4 1
+1 1
+1 1
+2 1
+1 1
+1 1
+7 4
+12 4
cfi=(242)
cfn=(4606) list_length
calls=1 90 
* 10
* 6
+4 4
cfi=(242)
cfn=(4398)
calls=1 78 
* 10
* 2
+3 3
+1 1
+1 1
+1 1
+58 11
cfi=(239)
cfn=(4278)
calls=1 135 
* 61
* 1
* 1
+4 2
+3 4
+3 3
+1 8
cfn=(4888) make_datum_param
calls=1 +55 
* 503
* 1
+47 5

fn=(4154) plpgsql_HashTableInit
2449 3
+6 5
cob=(3)
cfi=(3)
cfn=(828)
calls=1 0 
* 22
* 1
+1 1
+1 1
+1 6
cob=(9)
cfi=(31)
cfn=(794)
calls=1 317 
* 2849
* 1
* 1
+4 2

fn=(4246) plpgsql_build_variable
1804 18
+3 12
+7 4
cob=(9)
cfi=(13)
cfn=(2546)
calls=2 956 
* 354
* 2
* 2
+1 4
+1 6
cob=(9)
cfi=(13)
cfn=(928)
calls=2 1162 
* 354
* 2
* 4
+1 6
+1 6
+4 4
+1 4
+1 4
+2 6
cfn=(4250)
calls=2 2207 
* 54
* 2
+1 4
+1 12
cfi=(239)
cfn=(4222)
calls=2 95 
* 380
* 2
+3 4
+1 2
+26 2
+1 8

fn=(4192) plpgsql_compile_inline
826 4
+1 2
+12 3
cfi=(237)
cfn=(4196) plpgsql_scanner_init
calls=1 708 
* 1193
* 1
+2 3
+5 2
+1 2
+1 3
+1 3
+3 4
+3 2
cob=(9)
cfi=(13)
cfn=(2546)
calls=1 956 
* 621
* 1
* 1
+2 3
+6 8
cob=(9)
cfi=(14)
cfn=(432)
calls=1 395 
* 428
* 1
* 1
+3 3
cfi=(238)
cfn=(4208)
calls=1 110 
* 12
* 2
+2 3
cob=(9)
cfi=(13)
cfn=(928)
calls=1 1162 
* 195
* 1
* 2
+1 2
+1 2
+1 3
+1 2
+1 5
+1 4
+6 2
+1 2
+2 1
cfi=(239)
cfn=(4214)
calls=1 46 
* 5
* 1
+1 4
cfi=(239)
cfn=(4218)
calls=1 57 
* 260
* 1
+1 2
+1 1
cfn=(4230) plpgsql_start_datums
calls=1 2190 
* 141
+3 2
+1 2
+1 2
+1 2
+1 2
+2 2
+1 2
+6 2
+5 4
cfn=(4236) plpgsql_build_datatype
calls=1 2001 
* 54140
* 1
* 5
cfn=(4246)
calls=1 1804 
* 641
* 1
* 1
+5 4
+5 1
cfi=(240) /home/mithuncy/fsm_code/src/pl/plpgsql/src/pl_gram.c
cfn=(4254) plpgsql_yyparse
calls=1 1872 
* 86607
* 1
* 1
+1 2
+2 4
+2 1
cfi=(237)
cfn=(4354) plpgsql_scanner_finish
calls=1 735 
* 26
* 1
+6 4
+1 3
cfn=(4358)
calls=1 +82 
* 390
+5 2
+2 3
cfn=(4362) plpgsql_finish_datums
calls=1 2224 
* 222
+5 3
+1 2
+2 2
+2 4
cfi=(238)
cfn=(4208)
calls=1 110 
* 12
+1 2
+1 1
+1 2

fn=(4230)
2190 2
+1 1
+1 2
+2 8
cob=(9)
cfi=(13)
cfn=(798)
calls=1 772 
* 122
* 1
* 2
+3 1
+1 2

fn=(4270) plpgsql_parse_word
1365 21
+8 12
+5 1
cfi=(239)
cfn=(4274)
calls=1 84 
* 5
* 1
* 7
cfi=(239)
cfn=(4278)
calls=1 135 
* 104
* 1
* 1
+4 2
+24 9
+1 18
+1 3
+1 6

fn=(4362)
2224 4
+1 1
+3 4
+1 6
cob=(9)
cfi=(13)
cfn=(940)
calls=1 925 
* 123
* 1
* 2
+1 2
+2 28
+3 28
+4 2
+1 2
-10 14
+18 3
+1 2

fn=(4434)
1052 12
+1 9
+1 9
+1 9
+2 9
+1 6

fn=(4236)
2001 12
+4 8
cob=(9)
cfi=(151)
cfn=(3444)
calls=2 1114 
* 76029
* 2
* 2
+1 4
+3 12
cfn=(4240)
calls=2 +12 
* 718
* 2
+2 6
cob=(9)
cfi=(151)
cfn=(3418)
calls=2 1161 
* 206
* 2
+2 2
+1 4

fn=(4884)
1079 9
+1 3
+3 5
+3 5
+13 8
cfn=(4886)
calls=1 +52 
* 662
* 1
+2 4
+14 1
+1 6

fn=(4888)
1314 6
+7 4
+2 8
+5 5
cfi=(238)
cfn=(4208)
calls=1 110 
* 12
* 1
+1 6
cob=(9)
cfi=(279)
cfn=(4892)
calls=1 765 
* 217
* 1
* 2
+1 3
cfi=(238)
cfn=(4208)
calls=1 110 
* 12
+2 5
cob=(9)
cfi=(13)
cfn=(2156)
calls=1 815 
* 152
* 1
* 5
+1 2
+1 4
+1 11
cfi=(244)
cfn=(4900) plpgsql_exec_get_datum_type_info
calls=1 5562 
* 39
* 1
+5 3
+2 1
+1 2

fn=(4874)
1065 5
+1 3
+2 5
+3 1
+1 2

fl=(240)
fn=(4350) yydestruct
1836 12
+3 4
+7 4

fn=(4254)
1872 6
+36 1
+17 1
+2 4
+1 4
+1 4
+1 1
+4 1
+1 1
+1 2
+1 2
+1 4
+1 1
+8 32
+3 128
+2 224
-2 4
+2 7
+68 66
+1 1
4821 1
+1 1
2023 32
+11 224
+1 64
+1 15
+5 68
+3 11
cfi=(237)
cfn=(4258)
calls=11 256 
* 7270
* 11
* 22
+3 68
+2 5
+5 192
+6 32
+1 32
-1 2
+1 172
+2 84
+1 24
+4 1
+1 1
+5 22
+7 22
+2 22
+2 121
+2 55
+1 11
+7 120
+1 40
+2 20
+8 120
+10 300
+3 40
-13 6
+10 15
+3 217
+2 210
fi=(241)
361 5
fe=(240)
2129 1
fi=(241)
413 2
cob=(9)
cfi=(13)
cfn=(2546)
calls=1 956 
* 187
* 1
* 1
+2 2
+1 5
cfi=(237)
cfn=(4286) plpgsql_location_to_lineno
calls=1 660 
* 97
* 1
* 2
+1 5
+1 5
+1 5
+1 5
+1 5
+2 10
cfn=(4344)
calls=1 3693 
* 15
+1 1
cfi=(239)
cfn=(4348)
calls=1 70 
* 12
* 1
+2 2
fe=(240)
2213 1
fi=(241)
434 2
+1 3
+1 1
+1 1
fe=(240)
2225 1
fi=(241)
838 2
fe=(240)
2712 2
fi=(241)
842 8
+3 16
cob=(9)
cfi=(45)
cfn=(960)
calls=2 129 
* 580
* 2
* 2
fe=(240)
2724 2
fi=(241)
862 3
fe=(240)
2766 1
fi=(241)
876 3
fe=(240)
2808 1
fi=(241)
1287 6
+4 4
+1 5
cfi=(237)
cfn=(4286)
calls=1 660 
* 142
* 1
* 2
+1 5
+1 4
+1 3
+17 10
cfn=(4344)
calls=1 3693 
* 15
+2 1
cfi=(239)
cfn=(4348)
calls=1 70 
* 19
* 1
fe=(240)
3376 1
fi=(241)
1320 1
cfi=(237)
cfn=(4258)
calls=1 256 
* 464
* 1
* 1
+1 3
+2 3
+48 3
+45 1
+14 6
cfn=(4296)
calls=1 2549 
* 15
* 2
+4 3
cfi=(237)
cfn=(4290) plpgsql_push_back_token
calls=1 492 
* 62
* 1
+9 13
cfn=(4298)
calls=1 2661 
* 1283
* 1
+11 3
+9 7
cfn=(4314)
calls=1 3598 
* 7364
+3 6
cfn=(4320)
calls=1 2622 
* 10114
* 1
+5 3
+4 1
+3 5
+8 4
cfi=(234)
cfn=(4236)
calls=1 2001 
* 22869
* 1
* 1
+1 2
-1 4
-1 3
cfi=(234)
cfn=(4246)
calls=1 1804 
* 621
* 1
* 1
+8 2
cob=(9)
cfi=(13)
cfn=(2546)
calls=1 956 
* 170
* 1
* 1
+1 2
+1 3
+1 3
+1 3
+1 3
+1 3
+2 3
fe=(240)
3617 1
fi=(241)
1605 3
+1 4
cfi=(237)
cfn=(4286)
calls=1 660 
* 114
* 1
* 1
+1 1
+1 1
+2 1
cfi=(237)
cfn=(4258)
calls=1 256 
* 68
* 1
* 1
+1 3
cfi=(237)
cfn=(4290)
calls=1 492 
* 62
* 1
+1 2
fe=(240)
3665 1
fi=(241)
1926 4
+1 4
+1 3
fe=(240)
4008 1
fi=(241)
1978 12
cfn=(4298)
calls=1 2661 
* 29789
* 1
+6 2
cob=(9)
cfi=(13)
cfn=(940)
calls=1 925 
* 123
* 1
* 1
+1 2
+1 4
cfi=(237)
cfn=(4286)
calls=1 660 
* 75
* 1
* 2
+1 3
+1 2
+1 2
+1 2
+1 2
+11 3
+8 3
+14 3
+1 1
+5 2
fe=(240)
4116 1
fi=(241)
2264 1
fe=(240)
4381 1
fi=(241)
2397 3
cfi=(239)
cfn=(4218)
calls=1 57 
* 198
* 1
+1 1
fe=(240)
4550 1
fi=(241)
2409 3
cfi=(239)
cfn=(4218)
calls=1 57 
* 198
* 1
+1 1
fe=(240)
4568 1
fi=(241)
2421 2
fe=(240)
4585 2
+51 2
+15 30
+1 2
+3 20
+1 8
+6 12
+2 24
+1 4
-14 285
+1 19
+3 190
+1 76
+6 114
+2 228
+1 137
+1 42
+4 6
-2 120
+2 15
4842 4
+10 15
+2 1
+3 12
-1 12
cfn=(4350)
calls=2 1836 
* 20
+2 6
-4 9
+7 3
+7 1
+1 6

fl=(233)
fn=(4180)
301 4
+1 3
+11 7
cob=(9)
cfi=(165)
cfn=(4184)
calls=1 96 
* 1087
* 1
* 3
+4 4
cfi=(234)
cfn=(4192)
calls=1 826 
* 145051
* 1
* 1
+3 5
+7 846
+1 69
+1 2
+1 1
+1 3
+3 1
cob=(9)
cfi=(243)
cfn=(4366)
calls=1 86 
* 987
* 1
* 1
+3 10
cob=(3)
cfi=(3)
cfn=(370)
calls=1 0 
* 28
* 1
* 5
+2 8
cfi=(244)
cfn=(4372) plpgsql_exec_function
calls=1 452 
* 372410844
* 1
* 1
+35 6
+3 3
cob=(9)
cfi=(243)
cfn=(5524)
calls=1 195 
* 454
* 1
+3 5
+4 3
cfi=(239)
cfn=(5580)
calls=1 740 
* 5896
* 1
+5 1
cob=(9)
cfi=(165)
cfn=(5606)
calls=1 177 
* 1066
* 1
* 3
+3 1
+1 2

fn=(4144)
130 4
+1 4
+1 2

fn=(4114)
148 3
+4 3
+3 2
cob=(9)
cfi=(54)
cfn=(4118)
calls=1 1612 
* 5
* 1
+2 13
cob=(9)
cfi=(29)
cfn=(4122)
calls=1 8381 
* 698777
* 1
+9 12
cob=(9)
cfi=(29)
cfn=(4132)
calls=1 8269 
* 699528
* 1
+8 12
cob=(9)
cfi=(29)
cfn=(4132)
calls=1 8269 
* 694938
* 1
+8 14
cob=(9)
cfi=(29)
cfn=(4136)
calls=1 8355 
* 697145
* 1
+10 14
cob=(9)
cfi=(29)
cfn=(4136)
calls=1 8355 
* 706474
* 1
+10 2
cob=(9)
cfi=(29)
cfn=(4150)
calls=1 8399 
* 5138
* 1
+2 1
cfi=(234)
cfn=(4154)
calls=1 2449 
* 2892
* 1
+1 4
cob=(9)
cfi=(26)
cfn=(4162)
calls=1 3326 
* 114
* 1
+1 4
cob=(9)
cfi=(26)
cfn=(4166)
calls=1 3381 
* 145
* 1
+3 2
cob=(9)
cfi=(231)
cfn=(4170)
calls=1 681 
* 4050
* 1
* 2
+2 1
+1 2

fn=(4176)
297 5

fn=(4138)
63 12
+4 2
+3 10
cob=(9)
cfi=(32)
cfn=(968)
calls=2 -33 
* 84
* 2
* 4
+2 10
cob=(9)
cfi=(32)
cfn=(968)
calls=2 -35 
* 178
* 2
* 4
+1 4
+46 4
cob=(3)
cfi=(3)
cfn=(388)
calls=2 0 
* 335
* 2
* 2
+1 4
+2 6
+1 6
+2 2
+1 4

fn=(4146)
136 4
+1 4
+1 2

fn=(4112)
36 5

fl=(284) /home/mithuncy/fsm_code/src/pl/plpgsql/src/../../../../src/include/executor/executor.h
fn=(4836) ExecEvalExpr
277 3012
+1 3514
cob=(9)
cfi=(283)
cfn=(4824)
calls=499 +21 
* 2995988
cob=(9)
cfi=(283)
cfn=(4838)
calls=3 1745 
* 7985
+1 1004

fl=(237)
fn=(4354)
735 2
+2 3
cob=(9)
cfi=(215)
cfn=(3936)
calls=1 1187 
* 16
* 1
+2 1
+1 1
+1 2

fn=(4306)
527 18
+2 33
cob=(9)
cfi=(80)
cfn=(1920)
calls=3 215 
* 314
* 3
+2 6

fn=(4200) location_lineno_init
684 6
+1 6
+1 3
+2 12
cob=(3)
cfi=(3)
cfn=(1120)
calls=3 0 
* 42
* 3
* 3
+1 6

fn=(4260) internal_yylex
430 116
+4 87
+2 15
+1 30
+1 95
+4 168
cob=(9)
cfi=(216)
cfn=(3908)
calls=24 9032 
* 13830
* 24
* 24
+5 144
+1 72
cob=(3)
cfi=(3)
cfn=(424)
calls=24 0 
* 389
* 24
* 72
+3 48
+2 5
cob=(3)
cfi=(3)
cfn=(446)
calls=1 0 
* 22
* 1
* 2
+2 5
cob=(3)
cfi=(3)
cfn=(446)
calls=1 0 
* 22
* 1
* 2
+2 5
cob=(3)
cfi=(3)
cfn=(446)
calls=1 0 
* 22
* 1
* 2
+5 46
+6 29
+1 58

fn=(4286)
660 16
+3 20
+2 20
+3 12
+1 2
cfn=(4200)
calls=2 +15 
* 54
+2 4
+2 18
+1 18
+1 24
cob=(3)
cfi=(3)
cfn=(1120)
calls=6 0 
* 156
* 6
* 6
-4 60
+7 4
+1 8

fn=(4290)
492 8
+3 18
+1 6
+1 4
+1 10
cfn=(4266) push_back_token
calls=2 -22 
* 74
+1 4

fn=(4266)
476 25
+1 15
+2 30
+1 90
+1 15
+1 10

fn=(4196)
708 4
+2 7
cob=(9)
cfi=(215)
cfn=(3884)
calls=1 1148 
* 1144
* 1
* 1
+9 2
+3 2
+1 1
+2 1
+2 1
cfn=(4200)
calls=1 -43 
* 27
+1 2

fn=(4258)
256 78
+5 78
cfn=(4260)
calls=26 430 
* 14360
* 26
+1 98
+5 9
cfn=(4260)
calls=3 430 
* 1001
* 3
+1 6
+81 15
cfn=(4266)
calls=3 476 
* 111
+11 45
+24 6
-1 21
cfi=(234)
cfn=(4270)
calls=3 1365 
* 191
* 3
* 6
+5 12
+1 6
-1 9
cob=(9)
cfi=(219)
cfn=(3912)
calls=3 67 
* 1415
* 3
* 9
+9 3
+18 27
+1 9
+1 6
+1 6
+1 3
+1 6
-5 207
+1 69
+1 46
+1 46
+1 23
+1 46

fl=(244)
fn=(4852) exec_eval_cleanup
3974 2012
+2 2012
+2 1006
+6 2012
+1 2510
cob=(9)
cfi=(13)
cfn=(3758)
calls=502 137 
* 98018
* 502
+1 1006

fn=(5570) exec_stmt_return
3085 6
+6 4
+4 2
+1 2
+1 2
+14 4
+71 4
+27 4
+1 3
-1 2
+3 2
+1 2
+1 2
+3 1
+1 4

fn=(4384) copy_plpgsql_datums
1215 5
+1 3
+9 5
cob=(9)
cfi=(13)
cfn=(940)
calls=1 925 
* 123
* 1
-1 2
+7 4
cob=(9)
cfi=(13)
cfn=(940)
calls=1 925 
* 123
* 1
* 1
+1 2
+3 3
+1 3
+1 2
+2 14
+4 24
+4 4
+1 12
cob=(3)
cfi=(3)
cfn=(856)
calls=2 0 
* 48
* 2
+1 2
+1 2
+26 14
-39 11
+43 2

fn=(4372)
452 9
+9 7
cfn=(4374) plpgsql_estate_setup
calls=1 3832 
* 4696
+2 2
+5 2
+1 2
+1 3
+1 3
+5 2
+1 5
cfn=(4384)
calls=1 1215 
* 413
+5 2
+1 6
+87 2
+5 4
cfn=(4388) exec_set_found
calls=1 8044 
* 67
+5 5
+6 1
+1 3
+1 6
cfn=(4392) exec_stmt
calls=1 1894 
* 372404874
* 1
+1 2
+12 1
+1 2
+2 3
+2 3
+25 4
+8 3
+65 14
cfn=(4850) exec_cast_value
calls=1 7550 
* 18
* 1
+14 10
+23 2
+5 5
+4 3
cfn=(5572) plpgsql_destroy_econtext
calls=1 8112 
* 631
+1 3
cfn=(4852)
calls=1 3974 
* 16
+6 3
+5 1
+1 4

fn=(4390) assign_simple_var
8193 5020
+14 7028
+25 2008
+10 1506
+1 1506
+1 1506
+7 1004
+1 1004

fn=(4900)
5562 9
+1 8
+5 2
+2 5
+1 5
+1 5
+1 1
+69 4

fn=(5190) convert_value_to_string
7518 3000
+6 2500
cfi=(238)
cfn=(4208)
calls=500 110 
* 6000
* 500
+1 3000
cob=(9)
cfi=(275)
cfn=(5128)
calls=500 2642 
* 250500
* 500
+1 2500
cob=(9)
cfi=(161)
cfn=(5196)
calls=500 1834 
* 186500
* 500
* 500
+1 1500
cfi=(238)
cfn=(4208)
calls=500 110 
* 6000
+2 500
+1 1000

fn=(4858) get_stmt_mcontext
1449 2000
+1 2000
+3 8
cob=(9)
cfi=(14)
cfn=(432)
calls=1 395 
* 464
* 1
-1 2
+5 2
+1 2
-1 998
+1 998

fn=(5158)
6429 2500
+3 2000
+4 1500
+1 1500
+4 4000
+4 2500
+1 2500
+4 1000

fn=(4392)
1894 5
+2 1
+2 3
+1 3
+3 5
+3 4
+2 12
+3 5
cfn=(4394) exec_stmt_block
calls=1 1534 
* 372404823
* 1
+1 1
2027 5
+3 3
+2 1
+1 2

fn=(4393) exec_stmt'2
1894 2510
+2 502
+2 1506
+1 1506
+3 2510
+3 2008
+2 6024
+39 5
cfn=(4400) exec_stmt_fori
calls=1 2588 
* 372404581
* 1
+1 1
+19 5
cfn=(5570)
calls=1 3085 
* 44
* 1
+1 1
+23 2500
cfn=(4856) exec_stmt_dynexecute
calls=500 4268 
* 372144667
* 500
+1 500
+36 2510
+3 1506
+2 502
+1 1004

fn=(4394)
1534 5
+1 1
+6 3
+2 6
+85 4
1816 2
+2 6
cfn=(4396) exec_stmts
calls=1 +42 
* 372404782
* 1
+3 2
+7 7
+5 2
+17 2

fn=(4600) exec_simple_check_plan
7759 15
+10 6
+12 12
cob=(9)
cfi=(165)
cfn=(4604)
calls=3 1722 
* 21
* 3
* 3
+1 9
cfi=(242)
cfn=(4606)
calls=3 90 
* 30
* 6
+2 9
cfi=(242)
cfn=(4398)
calls=3 78 
* 30
* 6
+5 12
cfi=(242)
cfn=(4606)
calls=3 90 
* 30
* 6
+2 12
cfi=(242)
cfn=(4398)
calls=3 78 
* 30
* 6
+5 12
+2 12
+2 12
+9 12
+1 6
-1 6
+2 6
-1 6
+2 6
-1 6
+2 6
-1 6

ob=(5)
fl=(5)
fn=(2250)
0 1276

fn=(692)
0 3094
cfn=(694) __close_nocancel
calls=1547 0 
0 7735

fn=(1296)
0 15274

fn=(214) __libc_sigaction
0 2864

fn=(1686)
0 92
cob=(6)
cfi=(6)
cfn=(312)
calls=1 0 
0 811
cob=(7)
cfi=(7)
cfn=(2362)
calls=1 0 
0 1344
cob=(3)
cfi=(3)
cfn=(1796)
calls=1 0 
0 854
cob=(3)
cfi=(3)
cfn=(1688)
calls=1 0 
0 4800
0 40

fn=(1956)
0 5014
cfn=(1958) __lseek_nocancel
calls=2507 0 
0 12535

fn=(2494) connect
0 2
cfn=(2496) __connect_nocancel
calls=1 0 
0 5

fn=(5486) __pwrite_nocancel
0 9000

fn=(678) __open_nocancel
0 7625

fn=(212) __pthread_initialize_minimal
0 67
cfn=(214)
calls=1 0 
0 67
0 7
cfn=(214)
calls=1 0 
0 67
0 11
cob=(1)
cfi=(1)
cfn=(222)
calls=1 0 
0 1607
0 5
0 13
cob=(1)
cfi=(1)
cfn=(222)
calls=1 0 
0 1926
0 5
0 7
cob=(1)
cfi=(1)
cfn=(222)
calls=1 0 
0 1382
0 5
0 18
cob=(1)
cfi=(1)
cfn=(222)
calls=1 0 
0 1481
0 5
0 2
cob=(1)
cfi=(1)
cfn=(82)
calls=1 0 
0 2
0 22
cob=(1)
cfi=(1)
cfn=(222)
calls=1 0 
0 1929
0 5
0 18

fn=(2570)
0 11
cob=(3)
cfi=(3)
cfn=(2576)
calls=10 0 
0 1825
cob=(1)
cfi=(1)
cfn=(223)
calls=1 0 
0 1516
0 15

fn=(4076) pthread_setspecific
0 34

fn=(5484)
0 3000
cfn=(5486)
calls=1500 0 
0 9000

fn=(5880)
0 8
cob=(1)
cfi=(1)
cfn=(223)
calls=1 0 
0 1448
0 5
0 1
cfn=(5892) 0x00000000000066d0
calls=1 0 
0 9
0 3

fn=(396)
0 358

fn=(472)
0 33312

fn=(684)
0 38
cfn=(686) __read_nocancel
calls=19 0 
0 95

fn=(268)
0 12

fn=(2516)
0 100

fn=(2634)
0 4
cfn=(2636) __accept_nocancel
calls=2 0 
0 10

fn=(570)
0 594

fn=(782)
0 104
cfn=(214)
calls=26 0 
0 2730

fn=(1570) __write_nocancel
0 80

fn=(4060) pthread_key_create
0 19

fn=(694)
0 7735

fn=(1958)
0 5014

ob=(12)
fl=(244)
fn=(4600)
7814 9
-1 6
+2 9
-1 6
+2 6
-1 6
+2 6
-1 6
+2 6
-1 6
+2 6
-1 6
+2 6
-1 6
+2 6
-1 6
+2 6
-1 6
+2 6
-1 6
+2 6
-1 6
+7 12
cfi=(242)
cfn=(4606)
calls=3 90 
* 30
* 6
+9 15
cfi=(238)
cfn=(4208)
calls=3 110 
* 36
* 3
+1 12
cob=(9)
cfi=(165)
cfn=(4610)
calls=3 1738 
* 298992
* 3
* 3
+1 9
cfi=(238)
cfn=(4208)
calls=3 110 
* 36
+6 15
cfn=(4784) exec_save_simple_expr
calls=3 +11 
* 383
+3 12
cob=(9)
cfi=(154)
cfn=(4792)
calls=3 1263 
* 282
* 3
+1 6

fn=(4796) exec_eval_simple_expr
6026 4518
+1 1506
+1 2008
+8 2008
+6 2008
+8 2510
cfi=(238)
cfn=(4208)
calls=502 110 
* 6024
* 502
+1 2008
cob=(9)
cfi=(165)
cfn=(4610)
calls=502 1738 
* 279614
* 502
* 502
+1 1506
cfi=(238)
cfn=(4208)
calls=502 110 
* 6024
+10 3012
+11 2008
+1 2008
+6 2008
+2 2510
cfn=(4800) setup_param_list
calls=502 +84 
* 11024
* 1004
+7 2008
+2 15
cfi=(238)
cfn=(4208)
calls=3 110 
* 36
* 3
+2 21
cob=(9)
cfi=(281)
cfn=(4804)
calls=3 158 
* 39791
* 3
-1 6
+3 6
+1 9
+1 9
cfi=(238)
cfn=(4208)
calls=3 110 
* 36
+9 2510
cfi=(238)
cfn=(4208)
calls=502 110 
* 6024
* 502
+1 2510
+2 502
cob=(9)
cfi=(26)
cfn=(4830)
calls=502 919 
* 5522
* 502
+1 502
cob=(9)
cfi=(110)
cfn=(2998)
calls=502 305 
* 326632
* 502
* 1004
cob=(9)
cfi=(110)
cfn=(3996)
calls=502 734 
* 164185
* 502
+6 1004
+5 3514
cfi=(284)
cfn=(4836)
calls=502 277 
* 3011503
* 1004
+5 1004
+2 1004
+2 2008
+2 2510
+1 502
cob=(9)
cfi=(110)
cfn=(4848)
calls=502 813 
* 112448
* 502
+2 1506
cfi=(238)
cfn=(4208)
calls=502 110 
* 6024
+5 2008
cob=(9)
cfi=(154)
cfn=(4792)
calls=502 1263 
* 47188
* 502
+5 502
+1 1004

fn=(4374)
3832 7
+4 3
+2 3
+1 2
+1 2
+2 2
+1 2
+1 2
+2 4
+1 4
+1 4
+2 4
+1 2
+2 2
+1 2
+2 2
+1 2
+1 2
+7 2
+1 2
+2 3
+2 4
+1 4
+1 2
+2 4
+4 2
cob=(9)
cfi=(13)
cfn=(940)
calls=1 925 
* 123
* 1
-1 2
+2 4
+1 4
+1 4
+1 3
+1 4
+1 3
+1 5
+3 2
+2 3
+2 5
cob=(3)
cfi=(3)
cfn=(828)
calls=1 0 
* 22
* 1
+1 1
+1 1
+1 3
+1 6
cob=(9)
cfi=(31)
cfn=(794)
calls=1 317 
* 3167
* 1
* 2
+4 5
+29 2
+1 4
+2 2
+1 2
+1 2
+2 2
+1 2
+2 2
+5 3
cfn=(4376) plpgsql_create_econtext
calls=1 8060 
* 1222
+8 5
+8 2

fn=(4376)
8060 4
+11 4
+16 4
cob=(9)
cfi=(243)
cfn=(4380)
calls=1 242 
* 1055
* 1
* 2
+7 2
-1 3
cob=(9)
cfi=(13)
cfn=(798)
calls=1 772 
* 122
* 1
* 1
+4 4
+1 1
cob=(9)
cfi=(26)
cfn=(736)
calls=1 624 
* 8
* 1
* 2
+2 3
+1 2
+1 2

fn=(4400)
2588 6
+9 1
+1 1
+2 10
+5 9
cfn=(4402) exec_eval_expr
calls=1 5705 
* 123653
* 1
+5 2
-3 1
+2 2
-2 9
cfn=(4850)
calls=1 7550 
* 18
* 1
+4 3
+4 2
+1 3
cfn=(4852)
calls=1 3974 
* 217
+5 9
cfn=(4402)
calls=1 5705 
* 48116
* 1
+5 2
-3 1
+2 2
-2 9
cfn=(4850)
calls=1 7550 
* 18
* 1
+4 3
+4 2
+1 3
cfn=(4852)
calls=1 3974 
* 217
+5 4
+20 1
+10 2004
+7 1503
+1 1
+3 500
+5 4000
cfn=(4390)
calls=500 8193 
* 20500
+5 3000
cfn=(4397) exec_stmts'2
calls=500 1860 
* 372191667
* 500
+2 3000
+6 2000
+8 2000
+2 1000
+2 500
+8 5
cfn=(4388)
calls=1 8044 
* 68
+2 1
+1 4

fn=(4402)
5705 4518
+1 502
+7 2008
+1 18
cfn=(4404) exec_prepare_plan
calls=3 3997 
* 1036810
+6 5020
cfn=(4796)
calls=502 6026 
* 4083893
* 1004
+2 1004
+53 2008

fn=(5154)
6355 8
+8 3
+1 3
+3 4
+4 8
+2 1
+1 2
+1 2
+9 4
+2 4
+1 3
-1 2
+4 3
+24 1
+1 3
+1 3
+1 5
cob=(9)
cfi=(281)
cfn=(4814)
calls=1 2133 
* 185
* 1
+1 2

fn=(4388)
8044 12
+3 18
+1 13
cfn=(4390)
calls=1 8193 
* 41
* 6
cfn=(4390)
calls=1 8193 
* 41
+1 4

fn=(5572)
8112 4
+6 3
+1 3
cob=(9)
cfi=(13)
cfn=(952)
calls=1 1032 
* 85
* 1
+1 2
+2 5
cob=(9)
cfi=(243)
cfn=(5526)
calls=1 373 
* 523
* 1
+1 2
+1 2

fn=(5628)
8134 10
+7 6
+2 1
+2 3
+2 2
+2 2
+5 4

fn=(4800)
6166 2008
+15 2008
+3 1500
+7 1500
+7 2500
+9 2
+2 2
+1 4
-1 500
+1 1000

fn=(4850)
7550 27
+4 18
+29 3
+1 6

fn=(4784)
7858 15
+12 12
cfi=(242)
cfn=(4398)
calls=3 78 
* 30
* 6
+11 9
+5 12
cfi=(242)
cfn=(4398)
calls=3 78 
* 30
* 9
+2 12
+7 3
+26 9
+1 12
+1 6
+1 6
+1 6
+2 9
cob=(9)
cfi=(250)
cfn=(4478)
calls=3 43 
* 72
* 3
* 6
+1 9
cob=(9)
cfi=(250)
cfn=(4576)
calls=3 277 
* 92
* 3
* 6
+1 6

fn=(4396)
1860 5
+3 2
+11 3
cfi=(242)
cfn=(4398)
calls=1 78 
* 10
* 2
+2 6
+1 10
cfn=(4393)
calls=2 +17 
* 372404727
* 2
+2 4
+1 2
-6 7
+10 2

fn=(4397)
1860 2500
+3 1000
+11 1500
cfi=(242)
cfn=(4398)
calls=500 78 
* 5000
* 1000
+2 1500
+1 2500
cfn=(4393)
calls=500 +17 
* 372170167

ob=(5)
fl=(5)
fn=(1958)
0 7521

fn=(2428)
0 180

fn=(2496)
0 5

fn=(4066) pthread_getspecific
0 80

fn=(1298)
0 8728

fn=(606)
0 561

fn=(676)
0 3050
cfn=(678)
calls=1525 0 
0 7625

fn=(686)
0 95

fn=(2502)
0 864

fn=(2636)
0 10

fn=(2708)
0 48

fn=(3316) __pread_nocancel
0 12

fn=(2602)
0 66

fn=(2694)
0 5

fn=(3314)
0 4
cfn=(3316)
calls=2 0 
0 12

fn=(398)
0 324

fn=(1568)
0 32
cfn=(1570)
calls=16 0 
0 80

ob=(12)
fl=(244)
fn=(4397)
1877 500
+2 1000
-5 3500
+9 500
+1 1000

fn=(4404)
3997 24
+7 12
+5 21
cob=(9)
cfi=(165)
cfn=(4408)
calls=3 658 
* 735644
* 3
* 3
+4 6
+3 6
+1 9
cob=(9)
cfi=(165)
cfn=(4592)
calls=3 692 
* 705
* 3
+1 9
+3 15
cfn=(4600)
calls=3 7759 
* 300338
+7 6
+1 6

fn=(4856)
4268 3500
+7 500
+1 1500
cfn=(4858)
calls=500 1449 
* 6475
* 500
+6 4500
cfn=(4402)
calls=500 5705 
* 4965016
* 500
+1 1500
+6 3000
cfn=(5190)
calls=500 7518 
* 465000
* 500
+3 2500
cob=(9)
cfi=(13)
cfn=(930)
calls=500 1149 
* 101500
* 500
* 500
+2 1500
cfn=(4852)
calls=500 3974 
* 108628
+5 2000
+9 4000
cob=(9)
cfi=(165)
cfn=(5202)
calls=500 436 
* 366349548
* 500
* 500
+2 6000
+19 500
+37 2000
+3 2000
+72 2000
cob=(9)
cfi=(165)
cfn=(5544)
calls=500 1102 
* 5000
* 500
+1 1500
cob=(9)
cfi=(13)
cfn=(3758)
calls=500 137 
* 97500
* 500
+2 500
+1 2500

fl=(242)
fn=(4606)
90 3
+1 5
+1 2
-2 27
+1 45
+1 18

fn=(4398)
78 3
+1 2

ob=(5)
fl=(5)
fn=(260)
0 16

fn=(2858)
0 18

fn=(5892)
0 9

ob=(12)
fl=(242)
fn=(4398)
79 3
+1 2
-2 1539
+1 2565
+1 1026
-2 9
+1 13
+1 6

fn=(4360)
84 3
+1 5
+1 2

fl=(232)
fn=(5966)
0 8
cob=(3)
cfi=(3)
cfn=(5846)
calls=1 0 
0 59
0 1
0 1
cfn=(5976) 0x0000000000008e70
calls=1 0 
0 9
0 3

fn=(4084)
0 16

fn=(5976)
0 9

ob=(6)
fl=(6)
fn=(4098)
0 52
cob=(5)
cfi=(5)
cfn=(396)
calls=4 0 
0 124
0 12
cfn=(4048) _dlerror_run
calls=4 0 
0 4644
0 16
cob=(5)
cfi=(5)
cfn=(398)
calls=4 0 
0 116
0 20

fn=(4100)
0 24
cob=(3)
cfi=(3)
cfn=(4106)
calls=3 0 
0 2193
cob=(1)
cfi=(1)
cfn=(223)
calls=1 0 
0 1911
0 8
0 12

fn=(312)
0 6
cob=(1)
cfi=(1)
cfn=(223)
calls=1 0 
0 796
0 5
0 7

fn=(4046) dlopen@@GLIBC_2.2.5
0 11
cfn=(4048)
calls=1 0 
0 253832
0 6

fn=(5902) check_free
0 9

fn=(304)
0 16

fn=(4078)
0 22
cob=(1)
cfi=(1)
cfn=(1714)
calls=1 0 
0 248925
0 6

ob=(2)
fl=(2)
fn=(356)
0 6

fn=(5898)
0 3

fn=(326)
0 6

fn=(5832)
0 3

fn=(4080)
0 6

fn=(5944)
0 3

fn=(314)
0 6

fn=(210)
0 2
cob=(5)
cfi=(5)
cfn=(212)
calls=1 0 
0 8651
0 2

ob=(6)
fl=(6)
fn=(5900)
0 2
cfn=(5902)
calls=1 0 
0 9

fn=(5916) 0x0000000000000e70
0 9

fn=(5904)
0 8
cob=(1)
cfi=(1)
cfn=(223)
calls=1 0 
0 1448
0 5
0 1
cfn=(5916)
calls=1 0 
0 9
0 3

fn=(4048)
0 50
cob=(5)
cfi=(5)
cfn=(1686)
calls=4 0 
0 16
cob=(1)
cfi=(1)
cfn=(223)
calls=1 0 
0 1553
0 9
0 65
cob=(1)
cfi=(1)
cfn=(80)
calls=5 0 
0 253396
0 80
cob=(5)
cfi=(5)
cfn=(4066)
calls=4 0 
0 68
cob=(1)
cfi=(1)
cfn=(223)
calls=1 0 
0 804
0 9
0 18
cob=(1)
cfi=(1)
cfn=(223)
calls=1 0 
0 1563
0 5
0 5

ob=(2)
fl=(2)
fn=(5878)
0 3

fn=(1724)
0 6

fn=(5922)
0 3

fn=(288)
0 6

fn=(300)
0 6

fn=(5858)
0 3

fn=(5964)
0 3

fn=(5982)
0 3

ob=(6)
fl=(6)
fn=(4048)
0 3
cob=(1)
cfi=(1)
cfn=(223)
calls=1 0 
0 826
0 5
0 1

totals: 394821337
callgrind.out.115483_after_patchapplication/octet-stream; name=callgrind.out.115483_after_patchDownload
# callgrind format
version: 1
creator: callgrind-3.13.0
pid: 115483
cmd:  ./postgres -D data
part: 1


desc: I1 cache: 
desc: D1 cache: 
desc: LL cache: 

desc: Timerange: Basic block 0 - 61499774
desc: Trigger: Program termination

positions: line
events: Ir
summary: 397545624


ob=(5) /usr/lib64/libpthread-2.17.so
fl=(5) ???
fn=(472) __errno_location
0 75240

fn=(570) pthread_rwlock_wrlock
0 594

fn=(782) sigaction
0 104
cfn=(214) __libc_sigaction
calls=26 0 
0 2730

fn=(2428) fcntl
0 180

fn=(2494) connect
0 2
cfn=(2496) __connect_nocancel
calls=1 0 
0 5

fn=(694) __close_nocancel
0 5255

fn=(2602) waitpid
0 44

fn=(5866) 0x00000000000066d0
0 9

fn=(260) 0x0000000000006780
0 16

fn=(1956) lseek
0 8088
cfn=(1958) __lseek_nocancel
calls=4044 0 
0 20220

fn=(2516) recv
0 84

fn=(2636) __accept_nocancel
0 10

fn=(5464) __pwrite_nocancel
0 9000

fn=(606) pthread_rwlock_unlock
0 561

fn=(676) open
0 6056
cfn=(678) __open_nocancel
calls=3028 0 
0 23140

fn=(686) __read_nocancel
0 80

fn=(1296) _pthread_cleanup_push_defer
0 15330

fn=(214)
0 2864

fn=(1686) pthread_once
0 92
cob=(6) /usr/lib64/libdl-2.17.so
cfi=(6) ???
cfn=(312) init
calls=1 0 
0 811
cob=(7) /usr/lib64/librt-2.17.so
cfi=(7) ???
cfn=(2362) where_is_shmfs
calls=1 0 
0 1344
cob=(3) /usr/lib64/libc-2.17.so
cfi=(3) ???
cfn=(1796) gaiconf_init
calls=1 0 
0 854
cob=(3)
cfi=(3)
cfn=(1688) do_init
calls=1 0 
0 4827
0 40

fn=(4032) pthread_setspecific
0 34

fn=(5462) pwrite
0 3000
cfn=(5464)
calls=1500 0 
0 9000

fn=(5854) 0x0000000000006740
0 8
cob=(1) /usr/lib64/ld-2.17.so
cfi=(1) ???
cfn=(223) _dl_runtime_resolve_xsave'2
calls=1 0 
0 1448
0 5
0 1
cfn=(5866)
calls=1 0 
0 9
0 3

fn=(398) pthread_mutex_unlock
0 324

fn=(1568) write
0 30
cfn=(1570) __write_nocancel
calls=15 0 
0 75

fn=(212) __pthread_initialize_minimal
0 67
cfn=(214)
calls=1 0 
0 67
0 7
cfn=(214)
calls=1 0 
0 67
0 11
cob=(1)
cfi=(1)
cfn=(222) _dl_runtime_resolve_xsave
calls=1 0 
0 1607
0 5
0 13
cob=(1)
cfi=(1)
cfn=(222)
calls=1 0 
0 1926
0 5
0 7
cob=(1)
cfi=(1)
cfn=(222)
calls=1 0 
0 1382
0 5
0 18
cob=(1)
cfi=(1)
cfn=(222)
calls=1 0 
0 1481
0 5
0 2
cob=(1)
cfi=(1)
cfn=(82) _dl_initial_error_catch_tsd
calls=1 0 
0 2
0 22
cob=(1)
cfi=(1)
cfn=(222)
calls=1 0 
0 1929
0 5
0 18

fn=(2496)
0 5

fn=(2570) fork
0 10
cob=(3)
cfi=(3)
cfn=(2576) fork
calls=9 0 
0 1659
cob=(1)
cfi=(1)
cfn=(223)
calls=1 0 
0 1516
0 14

fn=(268) elision_init
0 12

fn=(2708) __reclaim_stacks
0 48

fn=(4016) pthread_key_create
0 19

fn=(2250) sem_init@@GLIBC_2.2.5
0 1276

fn=(692) close
0 2102
cfn=(694)
calls=1051 0 
0 5255

fn=(1958)
0 20220

fn=(2502) send
0 864

fn=(2694) __nptl_set_robust
0 5

fn=(4022) pthread_getspecific
0 80

fn=(396) pthread_mutex_lock
0 358

fn=(678)
0 23140

fn=(2634) accept
0 4
cfn=(2636)
calls=2 0 
0 10

fn=(2858) sem_trywait@@GLIBC_2.2.5
0 18

fn=(684) read
0 32
cfn=(686)
calls=16 0 
0 80

fn=(1298) _pthread_cleanup_pop_restore
0 8760

fn=(1570)
0 75

ob=(11) /usr/lib64/libnss_files-2.17.so
fl=(78) ???
fn=(5932) 0x00000000000021d0
0 9

fn=(5920) 0x0000000000002240
0 8
cob=(1)
cfi=(1)
cfn=(223)
calls=1 0 
0 1448
0 5
0 1
cfn=(5932)
calls=1 0 
0 9
0 3

fn=(1754) internal_getent
0 218
cob=(3)
cfi=(3)
cfn=(1690) fgets_unlocked
calls=5 0 
0 1373
cob=(1)
cfi=(1)
cfn=(223)
calls=1 0 
0 1916
0 10
0 70
cob=(3)
cfi=(3)
cfn=(914) __ctype_b_loc
calls=3 0 
0 9
cob=(1)
cfi=(1)
cfn=(223)
calls=1 0 
0 1355
0 8
0 3208
cob=(3)
cfi=(3)
cfn=(1646) inet_pton
calls=3 0 
0 285
cob=(1)
cfi=(1)
cfn=(223)
calls=1 0 
0 1523
0 8
0 28
cob=(3)
cfi=(3)
cfn=(1770) __rawmemchr_sse42
calls=3 0 
0 87
cob=(1)
cfi=(1)
cfn=(223)
calls=1 0 
0 1374
0 8
0 2362
cob=(3)
cfi=(3)
cfn=(1646)
calls=2 0 
0 394
0 2
0 12

fn=(1728) 0x0000000000002280
0 16

fn=(1742) _nss_files_gethostbyname4_r
0 34
cob=(5)
cfi=(5)
cfn=(396)
calls=1 0 
0 24
cob=(1)
cfi=(1)
cfn=(223)
calls=1 0 
0 801
0 6
0 58
cfn=(1754)
calls=2 0 
0 9876
0 68
cfn=(1754)
calls=4 0 
0 4374
0 30
cob=(3)
cfi=(3)
cfn=(1780) __strcasecmp_avx
calls=3 0 
0 168
cob=(1)
cfi=(1)
cfn=(223)
calls=1 0 
0 1402
0 8
0 160
cob=(3)
cfi=(3)
cfn=(856) __memcpy_ssse3
calls=3 0 
0 40
cob=(1)
cfi=(1)
cfn=(223)
calls=1 0 
0 1362
0 8
0 106
cob=(5)
cfi=(5)
cfn=(398)
calls=1 0 
0 17
cob=(1)
cfi=(1)
cfn=(223)
calls=1 0 
0 824
0 6
0 26
cob=(3)
cfi=(3)
cfn=(1380) fclose@@GLIBC_2.2.5
calls=1 0 
0 446
cob=(1)
cfi=(1)
cfn=(223)
calls=1 0 
0 1731
0 6
0 10
cob=(3)
cfi=(3)
cfn=(1284) fopen@@GLIBC_2.2.5
calls=1 0 
0 569
cob=(1)
cfi=(1)
cfn=(223)
calls=1 0 
0 1859
0 6
0 6

ob=(9) /home/mithuncy/zheap_fsmp11bin/bin/postgres
fl=(11) /home/mithuncy/fsm_p11patch/src/port/path.c
fn=(376) get_progname
454 4
+4 3
cfn=(378) last_dir_separator
calls=1 139 
* 106
* 1
+1 2
+1 2
+8 3
cob=(1)
cfi=(1)
cfn=(223)
calls=1 0 
* 59053
* 5
* 1
+1 2
+13 1
+1 2

fn=(486) trim_trailing_separator
900 108
+4 81
cob=(3)
cfi=(3)
cfn=(424) __strlen_sse42
calls=27 0 
* 545
* 27
* 81
+1 81
+1 54
+1 10
-1 229
+2 54

fn=(526) make_relative_path
541 35
+10 5
+1 10
+2 1260
+1 80
+1 1680
+1 5
-5 2395
+7 10
+2 15
cob=(3)
cfi=(3)
cfn=(424)
calls=5 0 
* 105
* 5
* 25
+6 30
cfi=(16) /home/mithuncy/fsm_p11patch/src/port/strlcpy.c
cfn=(460) strlcpy
calls=5 46 
* 3200
+1 15
cfn=(528) trim_directory
calls=5 869 
* 635
+1 15
cfn=(484) canonicalize_path
calls=5 255 
* 4464
+5 15
cob=(3)
cfi=(3)
cfn=(424)
calls=5 0 
* 105
* 5
* 10
+1 10
+1 30
-1 10
+2 55
cfn=(530) dir_strcmp
calls=5 -85 
* 340
-1 10
+3 25
+1 15
cfn=(486)
calls=5 900 
* 270
+1 45
cfn=(458) join_path_components
calls=5 220 
* 2160
+1 15
cfn=(484)
calls=5 255 
* 5628
+1 5
+6 10

fn=(528)
869 20
+5 20
+4 15
cob=(3)
cfi=(3)
cfn=(424)
calls=5 0 
* 105
* 5
* 45
+3 345
+3 45
+3 15
+2 10
+1 10

fn=(378)
139 9
+2 3
+2 9
+1 384
+1 22
-2 492
+3 3
+1 6

fn=(716) get_pkglib_path
759 5
+1 7
cfn=(526)
calls=1 541 
* 4534
+1 2

fn=(1428) get_share_path
705 15
+1 21
cfn=(526)
calls=3 541 
* 13684
+1 6

fn=(458)
220 88
+1 33
+1 24
cfi=(16)
cfn=(460)
calls=4 46 
* 2196
+8 11
+1 2
-1 62
+3 44
+5 22
-2 77
cob=(3)
cfi=(3)
cfn=(424)
calls=11 0 
* 221
* 11
* 66
cob=(3)
cfi=(3)
cfn=(424)
calls=11 0 
* 221
* 11
* 110
cfi=(17) /home/mithuncy/fsm_p11patch/src/port/snprintf.c
cfn=(462) pg_snprintf
calls=11 -33 
* 5979
+5 55

fn=(484)
255 88
+4 22
+28 66
cfn=(486)
calls=22 900 
* 1000
+5 44
+6 44
+1 22
+3 4356
+2 2502
+2 4170
-7 5092
+9 44
+12 44
+1 22
+3 66
cob=(3)
cfi=(3)
cfn=(424)
calls=22 0 
* 450
* 22
* 22
+2 220
cob=(3)
cfi=(3)
cfn=(446) __strcmp_sse42
calls=22 0 
* 582
* 22
* 44
+2 88
cob=(3)
cfi=(3)
cfn=(446)
calls=22 0 
* 484
* 22
* 44
+7 220
cob=(3)
cfi=(3)
cfn=(446)
calls=22 0 
* 626
* 22
* 44
+1 88
cob=(3)
cfi=(3)
cfn=(446)
calls=22 0 
* 484
* 22
-1 44
+6 44
+13 44
+11 44

fn=(1262) make_absolute_path
609 10
+4 4
+3 8
+5 1
+3 3
cob=(3)
cfi=(3)
cfn=(388) malloc
calls=1 0 
* 304
* 1
* 1
+1 2
+12 5
cob=(3)
cfi=(3)
cfn=(454) getcwd
calls=1 0 
* 34
* 1
* 2
+1 1
+23 3
cob=(3)
cfi=(3)
cfn=(424)
calls=1 0 
* 21
* 1
* 4
cob=(3)
cfi=(3)
cfn=(424)
calls=1 0 
* 15
* 1
* 4
cob=(3)
cfi=(3)
cfn=(388)
calls=1 0 
* 188
* 1
* 1
+1 2
+12 7
cfi=(17)
cfn=(1138) pg_sprintf
calls=1 231 
* 445
+1 3
cob=(3)
cfi=(3)
cfn=(590) free
calls=1 0 
* 116
* 1
* 1
+4 3
cob=(3)
cfi=(3)
cfn=(384) strdup
calls=1 0 
* 429
* 1
* 1
+1 2
+14 6
cfn=(484)
calls=2 255 
* 2046
+2 2
+1 8

fn=(456) first_dir_separator
104 15
+3 15
+1 112
+1 10
-2 135
+4 10

fn=(524) get_etc_path
714 5
+1 7
cfn=(526)
calls=1 541 
* 4534
+1 2

fn=(530)
492 20
+1 5
+4 60
-2 30
+9 30
-11 140
+13 20
+2 20
+2 5
+1 10

fl=(94) /home/mithuncy/fsm_p11patch/src/backend/access/transam/clog.c
fn=(2194) CLOGShmemInit
699 4
+1 1
+2 2
-1 2
cfn=(2030) CLOGShmemBuffers
calls=1 -17 
* 21
* 8
cfi=(93) /home/mithuncy/fsm_p11patch/src/backend/access/transam/slru.c
cfn=(2196) SimpleLruInit
calls=1 167 
* 4671
+2 4

fn=(5676) TransactionIdSetPageStatusInternal
348 9
+18 8
cfi=(93)
cfn=(5678) SimpleLruReadPage
calls=1 +11 
* 111
* 1
+11 2
+3 2
+2 5
+10 6
cfn=(5680) TransactionIdSetStatusBit
calls=1 573 
* 84
+4 5
+6 6
+1 2

fn=(5680)
573 6
+1 4
+1 4
+5 11
+1 9
+8 3
+14 3
+1 7
+1 6
+1 3
+10 2
+2 7
+2 9
+1 8
+2 2

fn=(2028) CLOGShmemSize
693 2
+1 1
cfn=(2030)
calls=1 -10 
* 21
* 3
cfi=(93)
cfn=(2020) SimpleLruShmemSize
calls=1 146 
* 59
+1 2

fn=(5672) TransactionIdSetPageStatus
277 11
+19 8
+2 3
-1 2
+2 9
cob=(3)
cfi=(3)
cfn=(3062) __memcmp_sse4_1
calls=1 0 
* 13
* 1
-1 2
+17 5
cfi=(99) /home/mithuncy/fsm_p11patch/src/backend/storage/lmgr/lwlock.c
cfn=(5674) LWLockConditionalAcquire
calls=1 1294 
* 129
* 2
+3 10
cfn=(5676)
calls=1 +30 
* 241
+2 4
cfi=(99)
cfn=(2182) LWLockRelease
calls=1 1726 
* 91
+1 1
+16 2

fn=(2030)
684 4
+1 34
+1 4

fn=(5670) TransactionIdSetTreeStatus
165 8
+1 3
+10 5
+9 3
+5 11
cfn=(5672)
calls=1 +87 
* 534
* 1
+38 2

fn=(5340) ExtendCLOG
868 4
+7 6
+2 1
+10 2

fl=(130) /home/mithuncy/fsm_p11patch/src/backend/storage/ipc/dsm_impl.c
fn=(2390) dsm_impl_posix_resize
352 5
+4 5
cob=(1)
cfi=(1)
cfn=(223)
calls=1 0 
* 1326
* 5
* 1
+11 2
+9 5
cob=(1)
cfi=(1)
cfn=(223)
calls=1 0 
* 1410
* 5
* 1
+1 2
+7 1
cob=(5)
cfi=(5)
cfn=(472)
calls=1 0 
* 3
* 1
* 2
+4 1
+1 2

fn=(2348) dsm_impl_posix
214 10
+6 8
cfi=(17)
cfn=(462)
calls=1 -17 
* 716
+3 4
+32 5
+1 6
cob=(1)
cfi=(1)
cfn=(223)
calls=1 0 
* 8015
* 5
* 3
+14 2
+21 5
cfn=(2390)
calls=1 +61 
* 2777
* 2
+26 9
cob=(3)
cfi=(3)
cfn=(598) mmap
calls=1 0 
* 33
* 1
* 1
+2 2
+17 3
+1 3
+1 3
cob=(5)
cfi=(5)
cfn=(692)
calls=1 0 
* 7
* 1
+2 1
+1 4

fn=(2346) dsm_impl_op
161 9
+5 7
+4 10
cfn=(2348)
calls=1 +44 
* 11626
* 1
+23 2

fl=(135) /home/mithuncy/fsm_p11patch/src/backend/libpq/../../../src/include/nodes/pg_list.h
fn=(2542) list_head
78 225
+1 371
+1 150

fl=(146) /home/mithuncy/fsm_p11patch/src/backend/access/transam/../../../../src/include/storage/s_lock.h
fn=(2884) tas
225 12
+1 3
+2 15
+6 3
+1 9

fl=(198) /home/mithuncy/fsm_p11patch/src/backend/catalog/pg_db_role_setting.c
fn=(3582) ApplySetting
222 32
+5 32
cfi=(184) /home/mithuncy/fsm_p11patch/src/backend/access/common/scankey.c
cfn=(3342) ScanKeyInit
calls=4 81 
* 456
+5 36
cfi=(184)
cfn=(3342)
calls=4 81 
* 456
+6 40
cfi=(172) /home/mithuncy/fsm_p11patch/src/backend/access/index/genam.c
cfn=(3118) systable_beginscan
calls=4 +84 
* 94103
* 4
+2 16
cfi=(172)
cfn=(3186) systable_getnext
calls=4 406 
* 13442
* 12
+20 12
cfi=(172)
cfn=(3254) systable_endscan
calls=4 489 
* 11156
+1 8

fl=(303) /home/mithuncy/fsm_p11patch/src/backend/commands/define.c
fn=(5236) defGetString
50 2500
+1 2000
+5 2500
+12 2000
+11 2000

fl=(199) /home/mithuncy/fsm_p11patch/src/backend/access/common/session.c
fn=(3592) InitializeSession
55 2
+1 4
cfi=(13) /home/mithuncy/fsm_p11patch/src/backend/utils/mmgr/mcxt.c
cfn=(2156) MemoryContextAllocZero
calls=1 815 
* 148
* 1
+1 2

fl=(248) /home/mithuncy/fsm_p11patch/src/backend/parser/parse_collate.c
fn=(4456) merge_collation_state
762 165
+6 60
+3 21
+1 21
+1 21
+2 14
+6 32
+3 31
+6 8
+26 2
-28 10
+51 75

fn=(4442) assign_query_collations_walker
127 180
+2 72
+1 56
+6 32
+3 32
+1 20
cfn=(4444) assign_list_collations
calls=4 +16 
* 5011
* 4
+2 20
cfn=(4446) assign_expr_collations
calls=4 +36 
* 648
+2 8
+1 72

fn=(4438) assign_query_collations
102 20
+7 24
cfi=(247) /home/mithuncy/fsm_p11patch/src/backend/nodes/nodeFuncs.c
cfn=(4440) query_tree_walker
calls=4 2266 
* 6587
+5 8

fn=(4448) assign_collations_walker
256 64
+7 16
+8 24
+1 8
+1 8
+1 8
+2 8
+1 8
+8 80
445 20
cfi=(247)
cfn=(4450) expression_tree_walker
calls=4 1843 
* 4427
+9 8
+1 8
+1 8
+15 8
+10 4
+7 20
cfi=(247)
cfn=(4450)
calls=4 1843 
* 424
+10 8
742 40
cfn=(4456)
calls=4 +20 
* 124
+7 4
+1 48

fn=(4449) assign_collations_walker'2
256 152
+7 38
+1 16
+7 33
+1 11
+1 11
+1 11
+2 11
+1 11
+8 166
555 21
cfi=(247)
cfn=(4452) exprCollation
calls=7 721 
* 147
* 7
+11 14
+1 6
+2 4
+1 12
cfi=(247)
cfn=(4454) exprLocation
calls=4 1193 
* 96
* 9
cfi=(247)
cfn=(4454)
calls=3 1193 
* 72
* 7
+1 7
+15 32
+90 20
cfi=(247)
cfn=(4451) expression_tree_walker'2
calls=4 1843 
* 3215
+3 4
+6 12
cfi=(247)
cfn=(4434) exprType
calls=4 43 
* 96
* 8
cfi=(272) /home/mithuncy/fsm_p11patch/src/backend/utils/cache/lsyscache.c
cfn=(4978) get_typcollation
calls=4 2791 
* 1896
* 4
+1 8
+3 12
+3 6
+1 6
+1 9
+10 2
+1 1
+1 3
cfi=(247)
cfn=(4454)
calls=1 1193 
* 71
* 2
+16 8
+3 20
cfi=(247)
cfn=(4980) exprSetCollation
calls=4 974 
* 76
+6 12
+3 20
cfi=(247)
cfn=(4982) exprSetInputCollation
calls=4 1129 
* 69
+2 4
+6 40
cfn=(4456)
calls=4 +20 
* 126
* 70
cfn=(4456)
calls=7 +20 
* 210
+7 11
+1 114

fn=(4446)
178 40
+4 16
+1 8
+1 8
+1 8
+3 40
cfn=(4448)
calls=8 +68 
* 5375
+1 16

fn=(4444)
156 20
+3 12
cfi=(219) /home/mithuncy/fsm_p11patch/src/backend/parser/../../../src/include/nodes/pg_list.h
cfn=(4292) list_head
calls=4 -81 
* 40
* 8
+2 12
+2 20
cfn=(4446)
calls=4 +15 
* 4863
-4 28
+6 8

fl=(80) /home/mithuncy/fsm_p11patch/src/backend/lib/stringinfo.c
fn=(1890) resetStringInfo
63 531108
+1 531108
+1 354072
+1 354072
+1 354072

fn=(1926) appendStringInfo
79 132
+1 12
cob=(5)
cfi=(5)
cfn=(472)
calls=12 -80 
* 36
* 12
* 24
+8 12
cob=(5)
cfi=(5)
cfn=(472)
calls=12 -88 
* 36
* 12
* 24
+1 72
+1 72
cfn=(1892) appendStringInfoVA
calls=12 +31 
* 5880
* 12
+3 24
+6 24

fn=(1920) appendBinaryStringInfo
215 528072
+4 440060
cfn=(1922) enlargeStringInfo
calls=88012 +52 
* 3080420
+3 1056144
cob=(3)
cfi=(3)
cfn=(856)
calls=88012 0 
* 1147242
* 88012
+1 528072
+7 616084
+1 176024

fn=(1892)
121 108
+11 126
+1 36
+3 216
cfi=(81) /home/mithuncy/fsm_p11patch/src/common/psprintf.c
cfn=(1894) pvsnprintf
calls=18 -29 
* 8924
* 18
+2 72
+3 108
+1 36
+12 36

fn=(1922)
271 616385
+7 176110
+2 880550
+7 528330
+4 352220
+1 88055
+22 440275

fn=(3720) appendBinaryStringInfoNT
241 174
+4 145
cfn=(1922)
calls=29 +26 
* 1015
+3 348
cob=(3)
cfi=(3)
cfn=(856)
calls=29 0 
* 426
* 29
+1 174
+1 58

fn=(1888) initStringInfo
47 6140
+1 1535
+2 6140
cfi=(13)
cfn=(940) palloc
calls=1535 925 
* 188441
* 3070
+1 4605
+1 4605
cfn=(1890)
calls=1535 +11 
* 18420
+1 3070

fn=(1918) appendStringInfoString
164 2545
+1 1527
cob=(3)
cfi=(3)
cfn=(424)
calls=509 0 
* 9659
* 509
* 3054
cfn=(1920)
calls=509 +50 
* 44816
+1 1018

fn=(1924) appendStringInfoChar
176 180
+2 210
+4 240
+1 150
+1 210
+1 60

fl=(119) /home/mithuncy/fsm_p11patch/src/backend/storage/lmgr/../../../../src/include/storage/proclist.h
fn=(2152) proclist_init
30 99738
+1 199476
+1 66492
-2 60
+1 120
+1 40

fl=(254) /home/mithuncy/fsm_p11patch/src/backend/utils/adt/datum.c
fn=(4498) datumCopy
129 7196
+3 2056
+1 1548
+1 1024
+3 14
+2 28
+18 105
+1 21
cfi=(13)
cfn=(940)
calls=7 925 
* 861
* 7
+1 42
cob=(3)
cfi=(3)
cfn=(856)
calls=7 0 
* 128
* 7
+1 21
+9 3030
cfn=(4500) datumGetSize
calls=505 62 
* 10605
* 505
+2 1515
cfi=(13)
cfn=(940)
calls=505 925 
* 62115
* 505
+1 3030
cob=(3)
cfi=(3)
cfn=(856)
calls=505 0 
* 12120
* 505
+1 1010
+2 505
+1 1010
-1 523
+1 1046

fn=(4500)
62 4040
+3 1010
+8 1010
+3 2020
+33 505
+1 2020

fl=(24) /home/mithuncy/fsm_p11patch/src/backend/postmaster/../../../src/include/utils/palloc.h
fn=(712) MemoryContextSwitchTo
110 12
+1 8
+2 8
+1 4
+1 8

fl=(103) /home/mithuncy/fsm_p11patch/src/backend/storage/ipc/procsignal.c
fn=(2058) ProcSignalShmemSize
75 4
+1 18
+1 4

fn=(2266) ProcSignalShmemInit
85 3
+1 1
cfn=(2058)
calls=1 -11 
* 13
* 1
+4 5
cfi=(87) /home/mithuncy/fsm_p11patch/src/backend/storage/ipc/shmem.c
cfn=(2168) ShmemInitStruct
calls=1 373 
* 994
-1 1
+4 4
+1 19
cob=(3)
cfi=(3)
cfn=(828) __GI_memset
calls=1 -94 
* 583
* 1
+1 2

fn=(2874) ProcSignalInit
106 4
+5 12
+3 4
+5 63
+3 3
+3 2
+3 5
cfi=(67) /home/mithuncy/fsm_p11patch/src/backend/storage/ipc/ipc.c
cfn=(2110) on_shmem_exit
calls=1 362 
* 32
+1 2

fn=(5744) CleanupProcSignalState
139 5
+1 2
+3 12
+8 1
+3 5
+11 2
+1 2

fl=(127) /home/mithuncy/fsm_p11patch/src/backend/storage/lmgr/../../../../src/include/lib/ilist.h
fn=(2252) dlist_init
279 348
+1 812
+1 232

fl=(269) /home/mithuncy/fsm_p11patch/src/backend/optimizer/path/pathkeys.c
fn=(4648) make_pathkeys_for_sortclauses
877 18
+1 3
+3 9
cfi=(270) /home/mithuncy/fsm_p11patch/src/backend/optimizer/path/../../../../src/include/nodes/pg_list.h
cfn=(4650) list_head
calls=3 78 
* 24
* 12
+20 3
+1 6

fl=(315) /home/mithuncy/fsm_p11patch/src/backend/storage/file/../../../../src/include/pgstat.h
fn=(5456) pgstat_report_wait_start
1239 4500
+1 3000
+2 9000
+7 4500
+1 3000

fn=(5466) pgstat_report_wait_end
1263 3000
+1 3000
+2 9000
+7 3000
+1 3000

fl=(118) /home/mithuncy/fsm_p11patch/src/backend/storage/lmgr/../../../../src/include/port/atomics/generic.h
fn=(2176) pg_atomic_read_u32_impl
47 158124
+1 105416
+1 105416

fn=(2150) pg_atomic_write_u32_impl
56 936
+1 702
+1 468
-2 132984
+1 99738
+1 66492

fn=(2186) pg_atomic_sub_fetch_u32_impl
241 263540
+1 263540
cfi=(121) /home/mithuncy/fsm_p11patch/src/backend/storage/lmgr/../../../../src/include/port/atomics/generic-gcc.h
cfn=(2188) pg_atomic_fetch_sub_u32_impl
calls=52708 -48 
* 579788
* 105416
+1 105416

fn=(2148) pg_atomic_init_u32_impl
162 1170
+1 1170
cfn=(2150)
calls=234 56 
* 2106
+1 468
-2 166230
+1 166230
cfn=(2150)
calls=33246 56 
* 299214
+1 66492

fl=(131) /home/mithuncy/fsm_p11patch/src/backend/postmaster/syslogger.c
fn=(2476) RemoveLogrotateSignalFiles
1536 2
+1 2
cob=(3)
cfi=(3)
cfn=(1972) unlink
calls=1 0 
* 9
* 1
+1 2

fn=(2478) SysLogger_Start
546 4
+4 4
+1 2
730 4

fl=(294) /home/mithuncy/fsm_p11patch/src/backend/utils/adt/numutils.c
fn=(5518) pg_strtouint64
559 3000
+6 3000
cob=(3)
cfi=(3)
cfn=(1638) strtoul
calls=499 0 
* 72854
cob=(1)
cfi=(1)
cfn=(223)
calls=1 0 
* 1430
* 504
+2 1000

fn=(5112) pg_ltoa
286 2500
+1 1000
+1 500
+6 1000
+5 1000
+10 2784
+2 13920
+1 13920
+1 8352
+1 2784
+2 1000
+4 2000
+3 500
+2 1473
+2 2946
+1 2455
-5 2973
+7 1000

fn=(5308) pg_strtoint32
200 437500
+1 175000
+1 87500
+1 87500
+3 787500
cob=(3)
cfi=(3)
cfn=(914)
calls=87500 0 
* 262500
* 87500
* 962500
+4 350000
+5 350000
+4 87500
cob=(3)
cfi=(3)
cfn=(914)
calls=87500 0 
* 262500
* 87500
* 1225000
+4 87500
+2 1251000
+2 1042500
cfi=(307) /home/mithuncy/fsm_p11patch/src/backend/utils/adt/../../../../src/include/common/int.h
cfn=(5310) pg_mul_s32_overflow
calls=208500 -82 
* 4587000
* 625500
+1 1251000
cfi=(307)
cfn=(5312) pg_sub_s32_overflow
calls=208500 122 
* 4795500
* 208500
-1 417000
-4 1392500
cob=(3)
cfi=(3)
cfn=(914)
calls=208500 0 
* 625500
* 208500
* 2293500
+10 437500
+3 612500
+3 350000
+3 525000
+2 262500
+3 175000
+15 350000

fl=(20) /home/mithuncy/fsm_p11patch/src/backend/postmaster/postmaster.c
fn=(2588) bgworker_should_start_now
5778 6
+1 12
+12 2
+1 2
+11 2
+6 1
+1 4

fn=(2590) ServerLoop
1630 4
+6 2
cob=(10) /usr/lib64/valgrind/callgrind-amd64-linux
cfi=(22) ???
cfn=(1810) 0x000000005803d96d
calls=1 0 
* 3
* 1
* 3
+2 3
cfn=(2592) initMasks
calls=1 1870 
* 160
* 1
+18 32
+2 3
-2 192
+2 18
+15 21
cfn=(2594) DetermineSleepTime
calls=7 1532 
* 203
+2 28
cob=(3)
cfi=(3)
cfn=(774) sigprocmask
calls=7 0 
* 49
* 7
+2 56
cob=(3)
cfi=(3)
cfn=(2508) select
calls=7 0 
* 72
* 7
* 7
+2 28
cob=(3)
cfi=(3)
cfn=(774)
calls=7 0 
* 49
* 7
+4 14
+2 4
cob=(5)
cfi=(5)
cfn=(472)
calls=4 0 
* 12
* 4
* 12
+13 14
+4 4
+2 35
+1 1
+1 138
+4 10
cfn=(2626) ConnCreate
calls=2 2405 
* 1832
* 2
+1 4
+2 6
cfn=(2638) BackendStartup
calls=2 4031 
* 385144902
+6 4
cfi=(58) /home/mithuncy/fsm_p11patch/src/backend/libpq/pqcomm.c
cfn=(2644) StreamClose
calls=1 845 
* 17
+1 3
cfn=(2646) ConnFree
calls=1 2449 
* 128
-18 19
+25 36
+8 18
+3 18
+2 18
+9 18
+9 42
+10 18
+5 54
+4 18
+8 18
+4 36
+20 12
cob=(10)
cfi=(22)
cfn=(1810)
calls=6 0 
* 18
* 6
* 6
+10 36
+20 36
+2 1
cfi=(54) /home/mithuncy/fsm_p11patch/src/backend/utils/init/miscinit.c
cfn=(2666) RecheckDataDirLockFile
calls=1 1387 
* 1594
* 3
+6 2
+8 36
+6 6

fn=(2592)
1870 3
+1 1
+3 27
+2 2
+2 16
+2 8
+1 1
+1 72
+2 9
+1 6
-9 11
+12 2
+1 2

fn=(2688) LogChildExit
3609 8
+6 1
+2 2
+5 6
+1 7
cfi=(57) /home/mithuncy/fsm_p11patch/src/backend/utils/error/elog.c
cfn=(1548) errstart
calls=1 232 
* 50
* 3
+41 4

fn=(2612) assign_backendlist_entry
5822 5
+9 2
cfn=(2614) RandomCancelKey
calls=1 5258 
* 91
* 3
+8 2
cob=(3)
cfi=(3)
cfn=(388)
calls=1 0 
* 339
* 1
* 1
+1 2
+8 3
+1 1
cfi=(102) /home/mithuncy/fsm_p11patch/src/backend/storage/ipc/pmsignal.c
cfn=(2616) AssignPostmasterChildSlot
calls=1 185 
* 39
* 4
+1 2
+1 2
+1 2
+2 3
+1 4
+2 1
+1 4

fn=(2416) InitPostmasterDeathWatchHandle
6456 4
+13 2
cob=(1)
cfi=(1)
cfn=(223)
calls=1 0 
* 1235
* 5
* 2
+9 6
cob=(1)
cfi=(1)
cfn=(223)
calls=1 0 
* 773
* 5
* 2
+20 4

fn=(2594)
1532 35
+1 7
+6 21
+1 14
-1 14
+1 28
+2 21
+10 14
+1 14
+2 7
+66 28

fn=(2620) PostmasterStateMachine
3674 4
+1 6
+9 6
+24 6
+76 6
+18 6
+42 6
+33 6
+8 6
+22 4

fn=(2626)
2405 10
+3 6
cob=(3)
cfi=(3)
cfn=(1722) calloc
calls=2 0 
* 892
* 2
* 6
+8 10
cfi=(58)
cfn=(2628) StreamConnection
calls=2 717 
* 892
* 4
+24 2
+1 8

fn=(2642) CountChildren
5299 12
+2 3
+2 30
+2 15
+2 20
+7 10
+14 5
-25 47
+27 3
+1 6

fn=(2648) SIGHUP_handler
2594 4
+1 1
cob=(5)
cfi=(5)
cfn=(472)
calls=1 0 
* 3
* 1
* 2
+2 4
cob=(3)
cfi=(3)
cfn=(774)
calls=1 0 
* 7
* 1
+2 3
+2 6
cfi=(57)
cfn=(1548)
calls=1 232 
* 341
* 5
cfi=(57)
cfn=(1882) errmsg
calls=1 785 
* 787
* 3
cfi=(57)
cfn=(1896) errfinish
calls=1 411 
* 10126
+2 2
cfi=(60) /home/mithuncy/fsm_p11patch/src/backend/utils/misc/guc-file.l
cfn=(1268) ProcessConfigFile
calls=1 125 
* 2459705
+1 3
cfn=(2656) SignalSomeChildren
calls=1 3954 
* 1471
+1 3
+2 3
+1 4
cfn=(2658) signal_child
calls=1 3928 
* 26
+1 3
+1 4
cfn=(2658)
calls=1 3928 
* 26
+1 3
+1 4
cfn=(2658)
calls=1 3928 
* 26
+1 3
+2 3
+1 4
cfn=(2658)
calls=1 3928 
* 26
+1 3
+2 3
+2 3
+1 4
cfn=(2658)
calls=1 3928 
* 26
+3 1
cfi=(133) /home/mithuncy/fsm_p11patch/src/backend/libpq/hba.c
cfn=(2528) load_hba
calls=1 2127 
* 167995
* 3
+4 1
cfi=(133)
cfn=(2552) load_ident
calls=1 2917 
* 41820
* 3
+27 4
cob=(3)
cfi=(3)
cfn=(774)
calls=1 0 
* 7
* 1
+2 1
cob=(5)
cfi=(5)
cfn=(472)
calls=1 0 
* 3
* 1
* 2
+1 2

fn=(646) PostmasterMain
577 7
+3 1
+1 1
+2 1
+2 1
cfn=(648) InitProcessGlobals
calls=1 2527 
* 16866
+2 2
+2 1
+10 2
cob=(1)
cfi=(1)
cfn=(223)
calls=1 0 
* 1248
* 5
+8 7
cfi=(14) /home/mithuncy/fsm_p11patch/src/backend/utils/mmgr/aset.c
cfn=(432) AllocSetContextCreateInternal
calls=1 395 
* 628
* 1
+3 3
cfi=(24)
cfn=(712)
calls=1 110 
* 10
+3 4
cfn=(714) getInstallationPaths
calls=1 1450 
* 12311
+21 1
cfi=(27) /home/mithuncy/fsm_p11patch/src/backend/libpq/pqsignal.c
cfn=(750) pqinitmask
calls=1 42 
* 4390
+1 4
cob=(1)
cfi=(1)
cfn=(223)
calls=1 0 
* 1350
* 5
+2 3
cfi=(28) /home/mithuncy/fsm_p11patch/src/port/pqsignal.c
cfn=(776) pqsignal_no_restart
calls=1 72 
* 991
+2 3
cfi=(28)
cfn=(776)
calls=1 72 
* 174
+1 3
cfi=(28)
cfn=(776)
calls=1 72 
* 174
+1 3
cfi=(28)
cfn=(776)
calls=1 72 
* 174
+1 3
cfi=(28)
cfn=(784) pqsignal
calls=1 41 
* 174
+1 3
cfi=(28)
cfn=(784)
calls=1 41 
* 174
+1 3
cfi=(28)
cfn=(776)
calls=1 72 
* 174
+2 3
cfi=(28)
cfn=(776)
calls=1 72 
* 174
+2 3
cfi=(28)
cfn=(776)
calls=1 72 
* 177
+10 3
cfi=(28)
cfn=(784)
calls=1 41 
* 174
+3 3
cfi=(28)
cfn=(784)
calls=1 41 
* 174
+5 3
cfi=(28)
cfn=(784)
calls=1 41 
* 174
+6 1
cfi=(29) /home/mithuncy/fsm_p11patch/src/backend/utils/misc/guc.c
cfn=(786) InitializeGUCOptions
calls=1 4964 
* 519261
+2 1
+7 1
+2 7
+16 3
cob=(3)
cfi=(3)
cfn=(384)
calls=1 0 
* 242
* 1
* 1
+1 1
-19 12
cob=(3)
cfi=(3)
cfn=(1254) getopt
calls=1 0 
* 105
cob=(1)
cfi=(1)
cfn=(223)
calls=1 0 
* 1929
* 6
* 6
856 3
+13 5
cfi=(29)
cfn=(1260) SelectConfigFiles
calls=1 5186 
* 5190721
* 3
+3 2
+15 1
cfi=(54)
cfn=(1522) checkDataDir
calls=1 100 
* 4014
+3 1
cfn=(1540) checkControlFile
calls=1 1503 
* 1572
+3 1
cfi=(54)
cfn=(1542) ChangeToDataDir
calls=1 214 
* 19
+5 6
+7 3
+3 6
+8 1
cfi=(64) /home/mithuncy/fsm_p11patch/src/backend/utils/adt/datetime.c
cfn=(1544) CheckDateTokenTables
calls=1 4453 
* 9981
* 3
+10 1
+10 6
cfi=(57)
cfn=(1548)
calls=1 232 
* 50
* 2
+3 6
cfi=(57)
cfn=(1548)
calls=1 232 
* 50
* 2
+2 3
+1 402
cfi=(57)
cfn=(1548)
calls=67 232 
* 3350
* 134
-1 339
+3 6
cfi=(57)
cfn=(1548)
calls=1 232 
* 50
* 2
+18 2
cfi=(54)
cfn=(1552) CreateDataDirLockFile
calls=1 1182 
* 6832
+11 2
cfi=(53) /home/mithuncy/fsm_p11patch/src/backend/access/transam/xlog.c
cfn=(1588) LocalProcessControlFile
calls=1 4934 
* 4991
+19 1
cfi=(72) /home/mithuncy/fsm_p11patch/src/backend/replication/logical/launcher.c
cfn=(1612) ApplyLauncherRegister
calls=1 789 
* 1505
+5 1
cfi=(54)
cfn=(1620) process_shared_preload_libraries
calls=1 1588 
* 30
+6 1
cfi=(75) /home/mithuncy/fsm_p11patch/src/backend/utils/init/postinit.c
cfn=(1624) InitializeMaxBackends
calls=1 525 
* 14
+8 2
+1 192
-1 194
+3 3
cfi=(67)
cfn=(1578) on_proc_exit
calls=1 306 
* 32
+2 3
+5 1
+3 3
cfi=(13)
cfn=(928) pstrdup
calls=1 1162 
* 158
* 1
+3 5
cfi=(41) /home/mithuncy/fsm_p11patch/src/backend/utils/adt/varlena.c
cfn=(932) SplitIdentifierString
calls=1 3507 
* 1275
* 3
+9 3
cfi=(76) /home/mithuncy/fsm_p11patch/src/backend/postmaster/../../../src/include/nodes/pg_list.h
cfn=(1626) list_head
calls=1 78 
* 10
* 2
+2 3
+2 4
cob=(3)
cfi=(3)
cfn=(446)
calls=1 0 
* 22
* 1
* 2
+7 1
-1 8
cfi=(58)
cfn=(1628) StreamServerPort
calls=1 333 
* 130706
* 1
+5 2
+2 1
+2 4
+2 4
cfi=(54)
cfn=(1950) AddToDataDirLockFile
calls=1 1259 
* 1630
+1 2
-22 7
+31 2
+4 3
cfi=(45) /home/mithuncy/fsm_p11patch/src/backend/nodes/list.c
cfn=(972) list_free
calls=1 +66 
* 222
+1 3
cfi=(13)
cfn=(952) pfree
calls=1 -40 
* 85
+42 3
+5 1
+3 3
cfi=(13)
cfn=(928)
calls=1 +40 
* 145
* 1
+3 5
cfi=(41)
cfn=(1960) SplitDirectoriesString
calls=1 3634 
* 952
* 3
+9 3
cfi=(76)
cfn=(1626)
calls=1 78 
* 10
* 2
+2 3
+3 1
-1 9
cfi=(58)
cfn=(1628)
calls=1 333 
* 21613
* 1
+5 2
+2 1
+2 2
+1 4
cfi=(54)
cfn=(1950)
calls=1 1259 
* 1084
* 1
-14 7
+22 2
+4 3
cfi=(45)
cfn=(1988) list_free_deep
calls=1 -9 
* 298
+1 3
cfi=(13)
cfn=(952)
calls=1 1032 
* 72
+7 3
+9 4
+6 3
cfn=(1990) reset_shared
calls=1 2576 
* 5251611
+6 1
cfi=(25) /home/mithuncy/fsm_p11patch/src/backend/storage/file/fd.c
cfn=(2404) set_max_safe_fds
calls=1 878 
* 61686
+5 1
cfi=(52) /home/mithuncy/fsm_p11patch/src/backend/tcop/postgres.c
cfn=(2414) set_stack_base
calls=1 3210 
* 9
+6 1
cfn=(2416)
calls=1 6456 
* 2038
+17 6
cfn=(2430) CreateOptsFile
calls=1 5549 
* 5650
* 3
+11 3
+25 1
cfi=(25)
cfn=(2462) RemovePgTempFiles
calls=1 2864 
* 479045
+20 1
cfi=(53)
cfn=(2474) RemovePromoteSignalFiles
calls=1 12232 
* 28
+3 1
cfi=(131)
cfn=(2476)
calls=1 1536 
* 16
+3 2
cob=(3)
cfi=(3)
cfn=(1972)
calls=1 0 
* 9
* 1
* 3
cob=(5)
cfi=(5)
cfn=(472)
calls=1 0 
* 3
* 1
* 3
+9 1
cfi=(131)
cfn=(2478)
calls=1 546 
* 14
* 1
+13 4
+6 1
+6 1
cfi=(38) /home/mithuncy/fsm_p11patch/src/backend/postmaster/pgstat.c
cfn=(2480) pgstat_init
calls=1 356 
* 17233
+5 1
cfi=(105) /home/mithuncy/fsm_p11patch/src/backend/postmaster/autovacuum.c
cfn=(2526) autovac_init
calls=1 3258 
* 15
+5 1
cfi=(133)
cfn=(2528)
calls=1 2127 
* 165914
* 3
+9 1
cfi=(133)
cfn=(2552)
calls=1 2917 
* 42273
+31 1
cfi=(21) /home/mithuncy/fsm_p11patch/src/backend/utils/adt/timestamp.c
cfn=(656) GetCurrentTimestamp
calls=1 1571 
* 22
* 1
+10 3
cfi=(54)
cfn=(1950)
calls=1 1259 
* 998
+5 2
cfn=(2554) StartChildProcess
calls=1 5345 
* 4216
* 1
+2 1
+1 1
+3 1
cfn=(2586) maybe_start_bgworkers
calls=1 5873 
* 74
+2 1
cfn=(2590)
calls=1 1630 
* 385150171

fn=(2638)
4031 10
+8 4
cob=(3)
cfi=(3)
cfn=(388)
calls=2 0 
* 274
* 2
* 2
+1 4
+13 4
cfn=(2614)
calls=2 5258 
* 182
* 6
+9 6
+3 2
cfn=(2640) canAcceptConnections
calls=2 2349 
* 155
* 4
+1 16
+6 10
+1 2
cfi=(102)
cfn=(2616)
calls=2 185 
* 70
* 10
+5 4
+5 2
cfi=(137) /home/mithuncy/fsm_p11patch/src/backend/postmaster/fork_process.c
cfn=(2556) fork_process
calls=2 32 
* 1261
* 2
+1 4
+2 3
cob=(3)
cfi=(3)
cfn=(590)
calls=1 0 
* 85
* 1
+3 1
cfi=(54)
cfn=(2710) InitPostmasterChild
calls=1 274 
* 13612
+3 2
cfn=(2734) ClosePostmasterPorts
calls=1 2471 
* 623
+3 3
cfn=(2736) BackendInitialize
calls=1 +86 
* 14386
+3 3
cfn=(2808) BackendRun
calls=1 4357 
* 385114047
+4 2
+16 6
cfi=(57)
cfn=(1548)
calls=1 232 
* 50
* 2
+8 3
+1 2
+1 5
cfi=(74) /home/mithuncy/fsm_p11patch/src/backend/postmaster/../../../src/include/lib/ilist.h
cfn=(2274) dlist_push_head
calls=1 301 
* 25
+7 1
+1 4

fn=(2656)
3954 5
+2 1
+2 10
+2 6
+2 8
+7 4
+14 12
cfi=(57)
cfn=(1548)
calls=2 232 
* 100
* 4
+3 12
cfn=(2658)
calls=2 -58 
* 1286
+1 2
-29 18
+31 1
+1 2

fn=(2678) StartAutovacuumWorker
5449 4
+10 1
cfn=(2640)
calls=1 2349 
* 86
* 2
+8 2
cfn=(2614)
calls=1 5258 
* 91
* 3
+8 2
cob=(3)
cfi=(3)
cfn=(388)
calls=1 0 
* 103
* 1
* 1
+1 2
+2 3
+3 2
+1 1
cfi=(102)
cfn=(2616)
calls=1 185 
* 35
* 4
+1 2
+2 1
cfi=(105)
cfn=(2680) StartAutoVacWorker
calls=1 1471 
* 309
* 2
+1 4
+2 2
+1 5
cfi=(74)
cfn=(2274)
calls=1 301 
* 25
+5 1
+30 4

fn=(2554)
5345 16
+3 4
+6 20
+7 32
cfi=(17)
cfn=(462)
calls=4 203 
* 2096
+1 24
+2 12
+6 4
cfi=(137)
cfn=(2556)
calls=4 32 
* 4541
* 4
+2 8
+17 8
+46 4
+1 8

fn=(2736)
4181 6
+8 2
+9 3
+4 1
+3 2
+1 2
+6 1
cfi=(58)
cfn=(2738) pq_init
calls=1 195 
* 4987
+1 1
+17 3
cfi=(28)
cfn=(784)
calls=1 41 
* 174
+1 3
cfi=(28)
cfn=(784)
calls=1 41 
* 174
+1 1
cfi=(138) /home/mithuncy/fsm_p11patch/src/backend/utils/misc/timeout.c
cfn=(2758) InitializeTimeouts
calls=1 341 
* 653
+1 4
cob=(3)
cfi=(3)
cfn=(774)
calls=1 0 
* 7
* 1
+5 1
+1 1
+1 16
cfi=(77) /home/mithuncy/fsm_p11patch/src/common/ip.c
cfn=(1832) pg_getnameinfo_all
calls=1 126 
* 489
* 3
+7 3
+1 8
cfi=(17)
cfn=(462)
calls=1 203 
* 229
* 1
+8 3
cob=(3)
cfi=(3)
cfn=(384)
calls=1 0 
* 153
* 1
* 3
+1 3
cob=(3)
cfi=(3)
cfn=(384)
calls=1 0 
* 153
* 1
* 3
+3 3
+24 3
+21 3
cfi=(138)
cfn=(2762) RegisterTimeout
calls=1 374 
* 18
+1 5
cfi=(138)
cfn=(2764) enable_timeout_after
calls=1 429 
* 1566
+6 4
cfn=(2782) ProcessStartupPacket
calls=1 1905 
* 3820
* 1
+6 2
+15 3
+4 12
cfi=(12) /home/mithuncy/fsm_p11patch/src/backend/utils/misc/ps_status.c
cfn=(2800) init_ps_display
calls=1 251 
* 1762
+6 3
cfi=(138)
cfn=(2804) disable_timeout
calls=1 526 
* 68
+1 4
cob=(3)
cfi=(3)
cfn=(774)
calls=1 0 
* 7
* 1
+1 5

fn=(2782)
1905 8
+6 1
cfi=(58)
cfn=(2784) pq_startmsgread
calls=1 1211 
* 12
+1 4
cfi=(58)
cfn=(2786) pq_getbytes
calls=1 1095 
* 227
* 2
+14 3
+1 3
+2 3
+1 1
-1 2
+15 3
+1 2
cfi=(13)
cfn=(2546) palloc0
calls=1 956 
* 152
* 2
+4 6
cfi=(58)
cfn=(2786)
calls=1 1095 
* 105
* 2
+7 1
cfi=(58)
cfn=(2798) pq_endmsgread
calls=1 1235 
* 5
+6 7
+2 2
+7 2
+40 2
+3 4
+1 2
-1 2
+18 3
cfi=(24)
cfn=(712)
calls=1 110 
* 10
* 1
+2 4
+2 1
+1 1
+7 2
+2 1
+2 25
+4 20
+1 1
+1 12
cob=(3)
cfi=(3)
cfn=(424)
calls=4 0 
* 68
* 4
* 20
+1 12
+2 20
+2 16
cob=(3)
cfi=(3)
cfn=(446)
calls=4 0 
* 110
* 4
* 8
+1 3
cfi=(13)
cfn=(928)
calls=1 1162 
* 193
* 3
+1 12
cob=(3)
cfi=(3)
cfn=(446)
calls=3 0 
* 93
* 3
* 6
+1 3
cfi=(13)
cfn=(928)
calls=1 1162 
* 193
* 3
+1 8
cob=(3)
cfi=(3)
cfn=(446)
calls=2 0 
* 71
* 2
* 4
+2 8
cob=(3)
cfi=(3)
cfn=(446)
calls=2 0 
* 71
* 2
* 4
+22 10
cob=(3)
cfi=(3)
cfn=(1044) __strncmp_sse42
calls=2 0 
* 80
* 2
* 4
+14 6
cfi=(13)
cfn=(928)
calls=2 1162 
* 357
* 2
-1 10
cfi=(45)
cfn=(960) lappend
calls=2 129 
* 453
* 4
+3 6
cfi=(13)
cfn=(928)
calls=2 1162 
* 352
* 2
-1 10
cfi=(45)
cfn=(960)
calls=2 129 
* 326
* 4
+9 8
cob=(3)
cfi=(3)
cfn=(446)
calls=2 0 
* 105
* 2
* 4
+2 3
cfi=(13)
cfn=(928)
calls=1 1162 
* 176
* 1
+2 3
cfi=(37) /home/mithuncy/fsm_p11patch/src/common/string.c
cfn=(884) pg_clean_ascii
calls=1 83 
* 64
+2 3
+3 3
cob=(3)
cfi=(3)
cfn=(424)
calls=1 0 
* 15
* 1
* 9
cob=(3)
cfi=(3)
cfn=(424)
calls=3 0 
* 53
* 3
* 20
-74 15
+81 4
+11 6
+2 1
+25 9
+6 9
+3 3
+22 4
cob=(3)
cfi=(3)
cfn=(424)
calls=1 0 
* 19
* 1
* 2
+2 4
cob=(3)
cfi=(3)
cfn=(424)
calls=1 0 
* 19
* 1
* 2
+11 3
+6 3
cfi=(24)
cfn=(712)
calls=1 110 
* 10
+7 7
+24 1
+5 1
+1 5

fn=(1990)
2576 4
+9 4
cfi=(83) /home/mithuncy/fsm_p11patch/src/backend/storage/ipc/ipci.c
cfn=(1992) CreateSharedMemoryAndSemaphores
calls=1 97 
* 5251601
+1 2

fn=(2586)
5873 6
+2 2
+1 2
+7 6
+8 2
+1 2
+2 24
+4 6
+3 8
+4 8
+13 8
+30 8
cfn=(2588)
calls=2 5778 
* 29
* 4
+3 2
+13 3
cfn=(2610) do_start_bgworker
calls=1 5687 
* 949
* 3
+12 3
-82 30
+89 4

fn=(2596) reaper
2846 8
+1 2
cob=(5)
cfi=(5)
cfn=(472)
calls=2 0 
* 6
* 2
* 4
+4 8
cob=(3)
cfi=(3)
cfn=(774)
calls=2 0 
* 14
* 2
+2 12
cfi=(57)
cfn=(1548)
calls=2 232 
* 100
* 4
+3 2
+5 6
+2 1
+6 3
+9 13
+17 6
+18 3
+14 1
+1 1
+2 1
+1 1
+7 3
+1 2
cfn=(2554)
calls=1 5345 
* 855
* 1
+1 3
+1 2
cfn=(2554)
calls=1 5345 
* 855
* 1
+1 3
+1 2
cfn=(2554)
calls=1 5345 
* 855
* 1
+6 5
cfi=(105)
cfn=(2604) AutoVacuumingActive
calls=1 3204 
* 13
* 5
+1 1
cfi=(105)
cfn=(2606) StartAutoVacLauncher
calls=1 395 
* 309
* 1
+1 6
+2 3
+1 1
cfi=(38)
cfn=(2608) pgstat_start
calls=1 728 
* 328
* 1
+3 1
cfn=(2586)
calls=1 5873 
* 1035
+3 6
cfi=(57)
cfn=(1548)
calls=1 232 
* 341
* 5
cfi=(57)
cfn=(1882)
calls=1 785 
* 787
* 3
cfi=(57)
cfn=(1896)
calls=1 411 
* 10131
+4 3
cfi=(54)
cfn=(1950)
calls=1 1259 
* 1182
+5 1
+8 3
+12 3
+58 3
+15 3
+15 3
+16 3
+16 3
+12 3
+12 5
cfn=(2684) CleanupBackgroundWorker
calls=1 +37 
* 43
* 2
+10 5
cfn=(2686) CleanupBackend
calls=1 3270 
* 266
2856 20
cob=(5)
cfi=(5)
cfn=(2602)
calls=3 0 
* 33
cob=(1)
cfi=(1)
cfn=(223)
calls=1 0 
* 794
* 8
* 12
3150 2
cfn=(2620)
calls=2 3674 
* 56
+3 8
cob=(3)
cfi=(3)
cfn=(774)
calls=2 0 
* 14
* 2
+2 2
cob=(5)
cfi=(5)
cfn=(472)
calls=2 0 
* 6
* 2
* 4
+1 4

fn=(2610)
5687 4
+14 3
cfn=(2612)
calls=1 5822 
* 511
* 3
+6 6
cfi=(57)
cfn=(1548)
calls=1 232 
* 50
* 2
+7 1
cfi=(137)
cfn=(2556)
calls=1 32 
* 295
* 7
+44 3
+1 5
+1 3
cfi=(73) /home/mithuncy/fsm_p11patch/src/backend/postmaster/bgworker.c
cfn=(2618) ReportBackgroundWorkerPID
calls=1 441 
* 22
+2 6
cfi=(74)
cfn=(2274)
calls=1 301 
* 25
+4 1
+4 2

fn=(2614)
5258 16
+2 16
cfi=(23) /home/mithuncy/fsm_p11patch/src/port/pg_strong_random.c
cfn=(668) pg_strong_random
calls=4 101 
* 324
+31 8

fn=(2658)
3928 35
+1 35
cob=(3)
cfi=(3)
cfn=(2664) kill
calls=6 0 
* 30
cob=(1)
cfi=(1)
cfn=(223)
calls=1 0 
* 1235
* 11
* 14
+3 35
+11 7
+3 14

fn=(648)
2527 6
+3 2
cob=(3)
cfi=(3)
cfn=(654) getpid
calls=1 0 
* 5
cob=(1)
cfi=(1)
cfn=(223)
calls=1 0 
* 1266
* 6
* 2
+1 2
cfi=(21)
cfn=(656)
calls=2 1571 
* 1430
* 2
+1 6
cfi=(21)
cfn=(666) timestamptz_to_time_t
calls=2 1713 
* 34
* 2
+21 8
cfi=(23)
cfn=(668)
calls=2 101 
* 2411
* 6
+14 6
cob=(3)
cfi=(3)
cfn=(700) srand
calls=1 0 
* 10537
cob=(1)
cfi=(1)
cfn=(223)
calls=1 0 
* 11812
* 6
+1 4

fn=(714)
1450 6
+4 4
cfi=(15) /home/mithuncy/fsm_p11patch/src/common/exec.c
cfn=(448) find_my_exec
calls=1 130 
* 4393
* 2
+16 3
cfi=(11)
cfn=(716)
calls=1 759 
* 4548
+9 2
cfi=(25)
cfn=(718) AllocateDir
calls=1 2447 
* 1846
* 1
+1 2
+7 3
cfi=(25)
cfn=(738) FreeDir
calls=1 2565 
* 1496
+6 5

fn=(2646)
2449 4
+4 4
+2 3
cob=(3)
cfi=(3)
cfn=(590)
calls=1 0 
* 114
* 1
+1 2

fn=(2808)
4357 4
+13 1
+1 2
cob=(3)
cfi=(3)
cfn=(424)
calls=1 0 
* 15
* 1
* 6
+2 7
cfi=(13)
cfn=(798) MemoryContextAlloc
calls=1 772 
* 122
* 1
+2 1
+2 8
+6 6
cfi=(75)
cfn=(2810) pg_split_opts
calls=1 466 
* 261
+2 6
+7 6
cfi=(57)
cfn=(1548)
calls=1 232 
* 59
* 2
+3 2
+1 6
cfi=(57)
cfn=(1548)
calls=1 232 
* 59
* 2
-1 7
+3 6
cfi=(57)
cfn=(1548)
calls=1 232 
* 59
* 2
+7 3
cfi=(24)
cfn=(712)
calls=1 110 
* 10
+2 8
cfi=(52)
cfn=(2812) PostgresMain
calls=1 3730 
* 385113375

fn=(2056) MaxLivePostmasterChildren
5589 14
+1 49
+2 14

fn=(2674) sigusr1_handler
5056 4
+1 1
cob=(5)
cfi=(5)
cfn=(472)
calls=1 0 
* 3
* 1
* 2
+2 4
cob=(3)
cfi=(3)
cfn=(774)
calls=1 0 
* 7
* 1
+3 2
cfi=(102)
cfn=(2676) CheckPostmasterSignal
calls=1 164 
* 11
* 2
+12 2
cfi=(102)
cfn=(2676)
calls=1 164 
* 11
* 2
+39 2
cfi=(102)
cfn=(2676)
calls=1 164 
* 11
* 2
+23 6
+3 2
cfi=(102)
cfn=(2676)
calls=1 164 
* 11
* 2
+11 3
+13 2
cfi=(102)
cfn=(2676)
calls=1 164 
* 11
* 2
+15 2
cfi=(102)
cfn=(2676)
calls=1 164 
* 15
* 2
+1 1
-1 2
+4 1
cfn=(2678)
calls=1 5449 
* 698
+3 2
cfi=(102)
cfn=(2676)
calls=1 164 
* 11
* 2
+8 2
cfi=(102)
cfn=(2676)
calls=1 164 
* 11
* 2
+7 1
cfi=(53)
cfn=(2682) CheckPromoteSignal
calls=1 12243 
* 56
* 2
+8 4
cob=(3)
cfi=(3)
cfn=(774)
calls=1 0 
* 7
* 1
+2 1
cob=(5)
cfi=(5)
cfn=(472)
calls=1 0 
* 3
* 1
* 2
+1 2

fn=(2686)
3270 5
+3 7
cfn=(2688)
calls=1 3609 
* 81
+25 2
+6 13
+2 3
+2 4
+2 5
+2 4
cfi=(102)
cfn=(2690) ReleasePostmasterChildSlot
calls=1 219 
* 20
* 3
+13 4
+12 3
cfi=(74)
cfn=(2692) dlist_delete
calls=1 359 
* 15
+1 3
cob=(3)
cfi=(3)
cfn=(590)
calls=1 0 
* 85
* 1
+1 2
-35 4
+38 2

fn=(1540)
1503 3
+4 8
cfi=(17)
cfn=(462)
calls=1 203 
* 381
+2 4
cfi=(25)
cfn=(1278) AllocateFile
calls=1 2186 
* 677
* 1
+1 2
+8 3
cfi=(25)
cfn=(1374) FreeFile
calls=1 2385 
* 491
+1 2

fn=(2430)
5549 6
+6 3
cob=(3)
cfi=(3)
cfn=(1284)
calls=1 0 
* 522
* 1
* 3
+6 6
cfi=(17)
cfn=(2432) pg_fprintf
calls=1 265 
* 1959
+1 2
+1 22
cfi=(17)
cfn=(2432)
calls=2 265 
* 1240
-1 11
+2 4
cob=(1)
cfi=(1)
cfn=(223)
calls=1 0 
* 1309
* 5
+2 3
cob=(3)
cfi=(3)
cfn=(1380)
calls=1 0 
* 548
* 1
* 2
+6 1
+1 2

fn=(2640)
2349 12
+1 3
+12 9
+29 6
cfn=(2642)
calls=3 5299 
* 151
* 6
cfn=(2056)
calls=3 5589 
* 33
* 6
+3 3
+1 12

fn=(2684)
3170 5
+4 12
+4 3
+2 4
-6 16
+83 1
+1 2

fn=(2734)
2471 6
+10 3
cob=(5)
cfi=(5)
cfn=(692)
calls=1 0 
* 7
* 1
* 2
+4 1
+4 2
+2 320
+2 15
cfi=(58)
cfn=(2644)
calls=3 845 
* 51
+1 9
-5 194
+10 4
+3 3
+2 1
+13 4

fl=(29)
fn=(862) guc_malloc
4473 96
+4 32
+2 48
cob=(3)
cfi=(3)
cfn=(388)
calls=16 0 
* 3288
* 16
* 16
+1 32
+4 16
+1 64

fn=(876) call_bool_check_hook
10312 1089
+2 396
+1 178
+3 10
+1 10
+1 10
+1 10
+2 70
cfi=(39) /home/mithuncy/fsm_p11patch/src/backend/commands/variable.c
cfn=(1196) check_transaction_read_only
calls=2 487 
* 34
cfi=(39)
cfn=(1190) check_transaction_deferrable
calls=2 563 
* 52
cfn=(1134) check_ssl
calls=1 10688 
* 13
cfn=(1032) check_log_stats
calls=1 10712 
* 13
cfn=(1030) check_stage_log_stats
calls=3 10701 
* 39
cfn=(900) check_bonjour
calls=1 10675 
* 13
* 30
+17 10
+1 594

fn=(886) assign_application_name
10987 10
+2 6
cfi=(38)
cfn=(888) pgstat_report_appname
calls=2 3164 
* 292
+1 4

fn=(1024) check_log_destination
10567 6
+4 1
+4 4
cfi=(13)
cfn=(928)
calls=1 1162 
* 145
* 1
+3 5
cfi=(41)
cfn=(932)
calls=1 3507 
* 1039
* 3
+9 3
cfi=(51) /home/mithuncy/fsm_p11patch/src/backend/utils/misc/../../../../src/include/nodes/pg_list.h
cfn=(1026) list_head
calls=1 78 
* 10
* 2
+2 3
+2 4
cfi=(32) /home/mithuncy/fsm_p11patch/src/port/pgstrcasecmp.c
cfn=(968) pg_strcasecmp
calls=1 37 
* 121
* 2
+1 2
-5 7
+25 3
cfi=(13)
cfn=(952)
calls=1 1032 
* 72
+1 3
cfi=(45)
cfn=(972)
calls=1 1137 
* 222
+2 3
cfn=(862)
calls=1 4473 
* 242
* 1
+1 3
+1 3
+2 1
+1 2

fn=(1032)
10712 6
+1 4
+8 1
+1 2

fn=(1084) assign_recovery_target
11102 5
+1 3
+4 6
+3 1
+1 2

fn=(1158) assign_tcp_keepalives_idle
10805 5
+12 5
cfi=(58)
cfn=(1160) pq_setkeepalivesidle
calls=1 1731 
* 11
+1 2

fn=(3710) BeginReportingGUCOptions
5858 3
+7 3
+1 2
-1 2
+4 1
+3 2
+2 2198
+2 1570
+1 33
cfn=(1468) ReportGUCOption
calls=11 +9 
* 12220
-5 1259
+7 2

fn=(4092) DefineCustomStringVariable
8355 18
+3 18
cfn=(4080) init_custom_variable
calls=2 8025 
* 1264
* 2
+3 6
+1 6
+1 6
+1 6
+1 6
+1 6
cfn=(4082) define_custom_variable
calls=2 8079 
* 1402043
+1 4

fn=(1062) check_maxconnections
10866 15
+1 27
+3 3
+1 6

fn=(1086) check_recovery_target_lsn
11247 6
+1 5
+36 1
+1 2

fn=(1240) parse_int
5995 3584
+5 1024
+1 1024
+1 1024
+1 24
+3 12
cob=(5)
cfi=(5)
cfn=(472)
calls=12 0 
* 36
* 12
* 500
cob=(5)
cfi=(5)
cfn=(472)
calls=500 0 
* 1500
* 500
* 512
+1 3072
cob=(3)
cfi=(3)
cfn=(1246) strtol
calls=511 0 
* 64214
cob=(1)
cfi=(1)
cfn=(223)
calls=1 0 
* 1460
* 516
* 512
+2 1536
+3 512
cob=(5)
cfi=(5)
cfn=(472)
calls=512 0 
* 1536
* 512
* 4096
+8 1024
cob=(3)
cfi=(3)
cfn=(914)
calls=512 0 
* 1536
* 512
* 5632
+4 2048
+4 6
+2 24
+3 6
+1 6
+2 108
-2 84
cob=(3)
cfi=(3)
cfn=(914)
calls=12 0 
* 36
* 12
* 156
+3 18
+2 12
cob=(3)
cfi=(3)
cfn=(914)
calls=6 0 
* 18
* 6
* 66
+3 24
+1 60
cfn=(1418) convert_to_base_unit
calls=6 5911 
* 2456
* 6
+2 24
+14 30
+8 1024
+1 2048
+1 512
+1 1024

fn=(1260)
5186 5
+6 2
+1 3
cfi=(11)
cfn=(1262)
calls=1 609 
* 2211
* 2
+4 7
cfi=(9) ???
cfn=(490) stat
calls=1 0 
* 15
* 2
+17 3
+2 2
+3 3
cob=(3)
cfi=(3)
cfn=(424)
calls=1 0 
* 21
* 1
-1 4
cfn=(862)
calls=1 4473 
* 306
* 1
+2 7
cfi=(17)
cfn=(1138)
calls=1 231 
* 444
* 1
+15 6
cfn=(1206) SetConfigOption
calls=1 7172 
* 1886
+1 3
cob=(3)
cfi=(3)
cfn=(590)
calls=1 0 
* 85
* 1
+5 5
cfi=(9)
cfn=(490)
calls=1 0 
* 15
* 2
+13 2
cfi=(60)
cfn=(1268)
calls=1 125 
* 1502316
+9 3
+2 2
+1 3
cfi=(54)
cfn=(1408) SetDataDir
calls=1 193 
* 1493
* 1
+19 6
cfn=(1206)
calls=1 7172 
* 1784
+8 2
cfi=(60)
cfn=(1268)
calls=1 125 
* 2879293
+9 1
cfn=(1470) pg_timezone_abbrev_initialize
calls=1 10789 
* 796088
+5 3
+2 2
+3 3
cob=(3)
cfi=(3)
cfn=(424)
calls=1 0 
* 21
* 1
-1 4
cfn=(862)
calls=1 4473 
* 258
* 1
+2 7
cfi=(17)
cfn=(1138)
calls=1 231 
* 447
* 1
+11 6
cfn=(1206)
calls=1 7172 
* 1388
+1 3
cob=(3)
cfi=(3)
cfn=(590)
calls=1 0 
* 85
* 1
+5 3
+2 2
+3 3
cob=(3)
cfi=(3)
cfn=(424)
calls=1 0 
* 21
* 1
-1 4
cfn=(862)
calls=1 4473 
* 117
* 1
+2 7
cfi=(17)
cfn=(1138)
calls=1 231 
* 447
* 1
+11 6
cfn=(1206)
calls=1 7172 
* 1659
+1 3
cob=(3)
cfi=(3)
cfn=(590)
calls=1 0 
* 85
* 1
+2 3
cob=(3)
cfi=(3)
cfn=(590)
calls=1 0 
* 85
* 1
+2 1
+1 2

fn=(1466) extra_field_used
4561 128
+3 128
+1 24
+1 140
+15 80
+1 20
+1 10
+6 60
+7 10
+1 64

fn=(2972) AtStart_GUC
5542 4
+6 6
+3 2
+1 4

fn=(4080)
8025 45
+10 10
+10 20
+9 10
+1 16
cob=(3)
cfi=(3)
cfn=(446)
calls=4 0 
* 115
* 4
-1 8
+2 16
cob=(3)
cfi=(3)
cfn=(446)
calls=4 0 
* 115
* 4
-1 8
+4 15
cfn=(862)
calls=5 4473 
* 1258
* 5
+1 25
cob=(3)
cfi=(3)
cfn=(828)
calls=5 0 
* 157
* 5
+2 20
cfn=(878) guc_strdup
calls=5 4505 
* 1294
* 10
+1 15
+1 10
+1 15
+1 15
+1 15
+1 15
+2 5
+1 10

fn=(1030)
10701 18
+1 12
+5 3
+1 6

fn=(1080) check_primary_slot_name
11305 6
+1 9
+4 1
+1 2

fn=(1082) check_recovery_target
11091 6
+1 5
cob=(3)
cfi=(3)
cfn=(446)
calls=1 0 
* 22
* 1
* 7
+5 1
+1 2

fn=(1200) check_wal_consistency_checking
10487 6
+7 18
cob=(3)
cfi=(3)
cfn=(828)
calls=1 0 
* 14
* 1
+3 4
cfi=(13)
cfn=(928)
calls=1 1162 
* 143
* 1
+3 5
cfi=(41)
cfn=(932)
calls=1 3507 
* 45
* 3
+9 3
cfi=(51)
cfn=(1026)
calls=1 78 
* 8
* 4
+41 3
cfi=(13)
cfn=(952)
calls=1 1032 
* 72
+1 3
cfi=(45)
cfn=(972)
calls=1 1137 
* 35
+3 3
cfn=(862)
calls=1 4473 
* 208
* 2
+1 10
+1 1
+1 2

fn=(1206)
7172 161
+1 230
cfn=(1208) set_config_option
calls=23 6409 
* 1637370
+2 46

fn=(1207) SetConfigOption'2
7172 7
+1 10
cfn=(1209) set_config_option'2
calls=1 6409 
* 1264
+2 2

fn=(1220) config_enum_lookup_by_name
6139 18
+3 12
+2 30
cfi=(32)
cfn=(968)
calls=5 37 
* 575
* 10
+2 12
+1 6
-5 32
+11 6

fn=(1266) string_field_used
4522 312
+3 390
+1 96
-1 96
+2 48
-1 48
+2 108
+1 144
+6 24
+1 156

fn=(868) guc_name_compare
4930 91016
+6 22754
+2 485195
+1 485195
+2 388080
+1 330
+1 388080
+1 178
+1 291117
+1 110170
-10 779464
+12 2880
+1 136
+1 2608
+1 1038
+1 133
+1 45508

fn=(890) call_enum_check_hook
10448 363
+2 132
+1 62
+3 2
+1 2
+1 2
+1 2
+2 14
cfi=(39)
cfn=(1194) check_XactIsoLevel
calls=2 526 
* 43
* 6
+18 2
+1 198

fn=(892) call_int_check_hook
10346 1320
+2 480
+1 214
+3 13
+1 13
+1 13
+1 13
+2 91
cfi=(53)
cfn=(1198) check_wal_buffers
calls=2 4890 
* 34
cfn=(1166) check_temp_buffers
calls=1 10661 
* 12
cfn=(1078) check_max_worker_processes
calls=1 10906 
* 17
cfi=(52)
cfn=(1064) check_max_stack_depth
calls=3 3326 
* 1423
cfn=(1062)
calls=3 10866 
* 51
cfn=(992) check_effective_io_concurrency
calls=1 10914 
* 1391
cfn=(898) check_autovacuum_work_mem
calls=1 10883 
* 13
cfn=(896) check_autovacuum_max_workers
calls=1 10875 
* 17
* 39
+17 13
+1 720

fn=(896)
10875 5
+1 9
+2 1
+1 2

fn=(898)
10883 5
+7 4
+1 2
+11 2

fn=(1028) assign_log_destination
10624 4
+1 3
+1 2

fn=(1096) assign_recovery_target_time
11202 5
+1 3
+4 6
+6 1
+1 2

fn=(1188) assign_timezone_abbreviations
10769 15
+2 6
+1 1
+2 6
cfi=(64)
cfn=(1520) InstallTimeZoneAbbrevs
calls=2 4592 
* 100
+1 6

fn=(1218) parse_and_validate_value
6225 572
+1 364
+4 14
+2 35
cfi=(59) /home/mithuncy/fsm_p11patch/src/backend/utils/adt/bool.c
cfn=(1224) parse_bool
calls=7 31 
* 1029
* 21
+9 63
cfn=(876)
calls=7 10312 
* 230
* 21
+4 7
+3 24
+3 84
cfn=(1240)
calls=12 5995 
* 7236
* 36
+11 144
+10 108
cfn=(892)
calls=12 10346 
* 454
* 36
+4 12
+31 60
+6 150
cfn=(878)
calls=30 4505 
* 6384
* 60
+1 120
+7 150
+2 24
cob=(3)
cfi=(3)
cfn=(424)
calls=6 0 
* 90
* 6
-1 42
cfi=(42) /home/mithuncy/fsm_p11patch/src/backend/parser/scansup.c
cfn=(958) truncate_identifier
calls=6 188 
* 84
+4 270
cfn=(880) call_string_check_hook
calls=30 10414 
* 2903945
* 90
+8 30
+3 6
+2 18
cfn=(1220)
calls=3 6139 
* 701
* 9
+19 27
cfn=(890)
calls=3 10448 
* 97
* 9
+4 3
+3 3
+1 15
-1 49
+1 245

fn=(1470)
10789 4
+1 10
cfn=(1206)
calls=2 7172 
* 1588960
+2 4

fn=(4082)
8079 25
+1 15
+1 10
+7 40
cob=(3)
cfi=(3)
cfn=(284) bsearch
calls=5 0 
* 6468
* 5
* 5
+5 10
+6 15
cfn=(874) InitializeOneGUCOption
calls=5 5066 
* 1724
+1 20
cfn=(4084) add_guc_variable
calls=5 4783 
* 3485185
* 5
+68 20

fn=(874)
5066 1276
+1 638
+1 638
+1 638
+1 638
+1 638
+1 638
+1 638
+1 638
+1 638
+2 2233
+4 184
+1 276
+1 92
+2 644
cfn=(876)
calls=92 10312 
* 2341
* 276
+4 368
+2 736
+1 644
+1 184
+4 216
+1 324
+1 108
+4 756
cfn=(892)
calls=108 10346 
* 5433
* 324
+4 432
+1 42
cfn=(1162) assign_tcp_keepalives_interval
calls=1 10832 
* 23
cfn=(1158)
calls=1 10805 
* 23
cfn=(1154) assign_tcp_keepalives_count
calls=1 10849 
* 23
cfi=(53)
cfn=(1074) assign_max_wal_size
calls=1 2286 
* 36
cfi=(52)
cfn=(1072) assign_max_stack_depth
calls=1 3343 
* 12
cfn=(1002) assign_effective_io_concurrency
calls=1 10941 
* 9
+1 864
+1 756
+1 216
+4 40
+1 60
+1 20
+4 140
cfn=(894) call_real_check_hook
calls=20 10380 
* 686
* 60
+4 80
+1 8
cfi=(39)
cfn=(1126) assign_random_seed
calls=1 603 
* 13
+1 160
+1 140
+1 40
+4 138
+2 69
+3 276
+1 310
cfn=(878)
calls=62 4505 
* 16222
* 124
+2 7
+2 49
cfn=(880)
calls=7 10414 
* 241
* 434
cfn=(880)
calls=62 10414 
* 25856
* 207
+4 276
+1 196
cob=(12) /home/mithuncy/zheap_fsmp11bin/lib/postgresql/plpgsql.so
cfi=(230) /home/mithuncy/fsm_p11patch/src/pl/plpgsql/src/pl_handler.c
cfn=(4102) plpgsql_extra_errors_assign_hook
calls=1 136 
* 10
cob=(12)
cfi=(230)
cfn=(4100) plpgsql_extra_warnings_assign_hook
calls=1 130 
* 10
cfn=(1202) assign_wal_consistency_checking
calls=1 10561 
* 8
cfn=(1188)
calls=1 10769 
* 10
cfi=(39)
cfn=(1184) assign_timezone
calls=1 374 
* 9
cfi=(48) /home/mithuncy/fsm_p11patch/src/backend/commands/tablespace.c
cfn=(1170) assign_temp_tablespaces
calls=1 1270 
* 28
cfn=(1152) assign_syslog_ident
calls=1 10640 
* 55
cfi=(56) /home/mithuncy/fsm_p11patch/src/backend/replication/syncrep.c
cfn=(1146) assign_synchronous_standby_names
calls=1 1202 
* 8
cfn=(1136) assign_pgstat_temp_directory
calls=1 10949 
* 1637
cfi=(39)
cfn=(1130) assign_session_authorization
calls=1 793 
* 12
cfi=(55) /home/mithuncy/fsm_p11patch/src/backend/catalog/namespace.c
cfn=(1122) assign_search_path
calls=1 4190 
* 7
cfi=(39)
cfn=(1108) assign_role
calls=1 882 
* 31
cfn=(1104) assign_recovery_target_xid
calls=1 11135 
* 17
cfn=(1100) assign_recovery_target_timeline
calls=1 11059 
* 14
cfn=(1096)
calls=1 11202 
* 17
cfn=(1092) assign_recovery_target_name
calls=1 11231 
* 17
cfn=(1088) assign_recovery_target_lsn
calls=1 11289 
* 17
cfn=(1084)
calls=1 11102 
* 17
cfi=(39)
cfn=(1060) assign_log_timezone
calls=1 447 
* 9
cfn=(1028)
calls=1 10624 
* 9
cfi=(18) /home/mithuncy/fsm_p11patch/src/backend/utils/adt/pg_locale.c
cfn=(1022) assign_locale_time
calls=1 338 
* 7
cfi=(18)
cfn=(1018) assign_locale_numeric
calls=1 326 
* 7
cfi=(18)
cfn=(1014) assign_locale_monetary
calls=1 314 
* 7
cfi=(18)
cfn=(1008) assign_locale_messages
calls=1 377 
* 8029
cfi=(49) /home/mithuncy/fsm_p11patch/src/backend/utils/cache/ts_cache.c
cfn=(990) assign_TSCurrentConfig
calls=1 652 
* 7
cfi=(39)
cfn=(982) assign_datestyle
calls=1 237 
* 14
cfi=(39)
cfn=(920) assign_client_encoding
calls=1 699 
* 39
cfn=(886)
calls=1 10987 
* 21
+1 552
+1 483
+1 138
+4 60
+1 90
+1 30
+2 210
cfn=(890)
calls=30 10448 
* 731
* 90
+4 120
+1 28
cfi=(53)
cfn=(1204) assign_xlog_sync_method
calls=1 10087 
* 13
cfn=(1148) assign_syslog_facility
calls=1 10630 
* 280
cfi=(56)
cfn=(1142) assign_synchronous_commit
calls=1 1208 
* 11
cfn=(1132) assign_session_replication_role
calls=1 10650 
* 10
+1 240
+1 210
+1 30
+3 638

fn=(878)
4505 750
+3 375
cob=(3)
cfi=(3)
cfn=(384)
calls=125 0 
* 29475
* 125
* 125
+1 250
+4 125
+1 500

fn=(880)
10414 1089
+2 396
+1 88
+3 55
+1 55
+1 55
+1 55
+2 385
cob=(12)
cfi=(230)
cfn=(4094) plpgsql_extra_checks_check_hook
calls=2 63 
* 696
cfn=(1200)
calls=1 +62 
* 594
cfn=(1186) check_timezone_abbreviations
calls=3 10739 
* 1585022
cfi=(39)
cfn=(1174) check_timezone
calls=3 254 
* 8423
cfi=(48)
cfn=(1168) check_temp_tablespaces
calls=1 1165 
* 339
cfi=(56)
cfn=(1144) check_synchronous_standby_names
calls=1 1145 
* 20
cfi=(39)
cfn=(1128) check_session_authorization
calls=2 745 
* 866
cfi=(55)
cfn=(1112) check_search_path
calls=1 4156 
* 3187
cfi=(39)
cfn=(1106) check_role
calls=1 815 
* 245
cfn=(1102) check_recovery_target_xid
calls=1 11115 
* 14
cfn=(1098) check_recovery_target_timeline
calls=1 11030 
* 235
cfn=(1094) check_recovery_target_time
calls=1 11151 
* 14
cfn=(1090) check_recovery_target_name
calls=1 11218 
* 31
cfn=(1086)
calls=1 11247 
* 14
cfn=(1082)
calls=1 11091 
* 44
cfn=(1080)
calls=1 11305 
* 18
cfi=(39)
cfn=(1034) check_log_timezone
calls=3 409 
* 1264855
cfn=(1024)
calls=1 10567 
* 1913
cfi=(18)
cfn=(1020) check_locale_time
calls=3 332 
* 13446
cfi=(18)
cfn=(1016) check_locale_numeric
calls=3 320 
* 13502
cfi=(18)
cfn=(1010) check_locale_monetary
calls=3 308 
* 13640
cfi=(18)
cfn=(1006) check_locale_messages
calls=3 354 
* 1170
cfn=(1004) check_canonical_path
calls=3 10726 
* 745
cfi=(49)
cfn=(988) check_TSCurrentConfig
calls=3 592 
* 75
cfi=(48)
cfn=(984) check_default_tablespace
calls=1 1070 
* 25
cfi=(39)
cfn=(926) check_datestyle
calls=3 45 
* 12840
cfn=(924) check_cluster_name
calls=1 10994 
* 25
cfi=(39)
cfn=(902) check_client_encoding
calls=4 623 
* 4950
cfn=(882) check_application_name
calls=2 10978 
* 102
* 165
+17 55
+1 594

fn=(894)
10380 220
+2 80
+1 38
+3 1
+1 1
+1 1
+1 1
+2 7
cfi=(39)
cfn=(1124) check_random_seed
calls=1 591 
* 213
* 3
+17 1
+1 120

fn=(924)
10994 6
+2 4
cfi=(37)
cfn=(884)
calls=1 83 
* 12
+2 1
+1 2

fn=(1078)
10906 5
+1 9
+2 1
+1 2

fn=(1102)
11115 6
+1 5
+14 1
+1 2

fn=(1132)
10650 5
+5 3
+2 2

fn=(1152)
10640 5
+2 5
cfi=(57)
cfn=(1150) set_syslog_parameters
calls=1 1897 
* 43
+3 2

fn=(1154)
10849 5
+2 5
cfi=(58)
cfn=(1156) pq_setkeepalivescount
calls=1 1889 
* 11
+1 2

fn=(1208)
6409 663
+3 51
+1 51
+3 102
+2 204
+6 168
+2 92
+1 46
+1 46
+4 23
+12 23
cfi=(26) /home/mithuncy/fsm_p11patch/src/backend/access/transam/xact.c
cfn=(1210) IsInParallelMode
calls=23 911 
* 184
* 28
cfi=(26)
cfn=(1210)
calls=28 911 
* 224
* 102
+5 255
cfn=(1212) find_option
calls=51 4869 
* 65286
* 51
+1 102
+12 357
+3 12
+8 6
+2 22
+11 6
+2 16
+8 11
+2 24
+15 8
+50 16
+8 4
+3 22
+21 255
+2 1
cfi=(54)
cfn=(3318) InLocalUserIdChange
calls=1 504 
* 8
* 2
+12 1
cfi=(54)
cfn=(3320) InSecurityRestrictedOperation
calls=1 513 
* 8
* 2
+16 510
+10 204
+14 357
+4 12
+4 12
+2 66
cfn=(1218)
calls=6 6225 
* 1398
* 18
+20 12
+15 12
+3 24
+3 24
+2 24
+1 42
cfn=(1222) set_extra_field
calls=6 4606 
* 96
+2 18
+1 18
+2 12
+4 24
+2 18
+1 42
cfn=(1222)
calls=6 4606 
* 96
+2 18
+1 18
+2 36
+14 18
+2 6
+7 24
+4 24
+2 132
cfn=(1218)
calls=12 6225 
* 8422
* 36
+20 24
+2 12
+9 12
+1 4
+3 20
+3 40
+3 40
+1 28
cfi=(53)
cfn=(1074)
calls=2 2286 
* 72
cfi=(52)
cfn=(1072)
calls=2 3343 
* 24
+1 40
+1 70
cfn=(1222)
calls=10 4606 
* 160
+2 30
+1 30
+2 20
+4 40
+2 30
+1 70
cfn=(1222)
calls=10 4606 
* 160
+2 30
+1 30
+2 60
+14 30
+2 10
+97 60
+4 60
+2 330
cfn=(1218)
calls=30 6225 
* 2912225
* 90
+36 60
+17 60
+3 120
+3 120
+1 161
cfn=(886)
calls=1 10987 
* 291
cfi=(39)
cfn=(1130)
calls=1 793 
* 1346
cfi=(39)
cfn=(920)
calls=3 699 
* 117
cfn=(1188)
calls=2 10769 
* 124
cfi=(49)
cfn=(990)
calls=2 652 
* 14
cfi=(18)
cfn=(1022)
calls=2 338 
* 14
cfi=(18)
cfn=(1018)
calls=2 326 
* 14
cfi=(18)
cfn=(1014)
calls=2 314 
* 14
cfi=(18)
cfn=(1008)
calls=2 377 
* 6976
cfi=(39)
cfn=(1184)
calls=2 374 
* 18
cfi=(39)
cfn=(982)
calls=2 237 
* 28
cfi=(39)
cfn=(1060)
calls=2 447 
* 18
+1 210
cfn=(1264) set_string_field
calls=30 4545 
* 1080
+1 210
cfn=(1222)
calls=30 4606 
* 790
+2 90
+1 90
+3 60
+4 120
+2 210
cfn=(1264)
calls=30 4545 
* 3468
+1 210
cfn=(1222)
calls=30 4606 
* 1807
+2 90
+1 90
+2 180
+15 240
cfn=(1266)
calls=30 4522 
* 390
* 90
+3 150
cfn=(1466)
calls=12 4561 
* 144
* 36
+2 30
+7 6
+4 6
+2 33
cfn=(1218)
calls=3 6225 
* 942
* 9
+20 6
+2 6
+9 6
+1 2
+3 4
+3 8
+3 8
+2 8
+1 14
cfn=(1222)
calls=2 4606 
* 32
+2 6
+1 6
+2 4
+4 8
+2 6
+1 14
cfn=(1222)
calls=2 4606 
* 32
+2 6
+1 6
+2 12
+14 6
+2 2
+6 336
+1 33
cfn=(1468)
calls=11 5886 
* 99
+2 192
+1 204

fn=(1209)
6409 13
+3 1
+1 1
+3 2
+2 4
+8 4
+1 2
+1 2
+4 1
+12 1
cfi=(26)
cfn=(1210)
calls=1 911 
* 8
* 2
+5 5
cfn=(1212)
calls=1 4869 
* 851
* 1
+1 2
+12 7
+3 2
+8 1
6595 5
+30 10
+10 4
+14 7
+4 2
+4 2
+2 11
cfn=(1218)
calls=1 6225 
* 190
* 3
+20 2
+15 2
+3 4
+3 4
+2 4
+1 7
cfn=(1222)
calls=1 4606 
* 16
+2 3
+1 3
+2 2
+4 4
+2 3
+1 7
cfn=(1222)
calls=1 4606 
* 16
+2 3
+1 3
+2 6
+14 3
+2 1
7125 7
+1 3
cfn=(1468)
calls=1 5886 
* 9
+2 4
+1 4

fn=(1212)
4869 931
+1 266
+10 1064
cob=(3)
cfi=(3)
cfn=(284)
calls=132 0 
* 161489
cob=(1)
cfi=(1)
cfn=(223)
calls=1 0 
* 2932
* 137
* 133
+5 266
+1 399
+24 266

fn=(1222)
4606 588
+1 294
+3 294
+3 296
cfn=(1466)
calls=20 -52 
* 520
* 60
+1 30
cob=(3)
cfi=(3)
cfn=(590)
calls=10 0 
* 917
* 10
+1 196

fn=(1228) InitializeGUCOptionsFromEnvironment
5020 6
+4 4
cob=(3)
cfi=(3)
cfn=(234) getenv
calls=2 0 
* 974
* 2
* 2
+1 4
+3 4
cob=(3)
cfi=(3)
cfn=(234)
calls=2 0 
* 992
* 2
* 2
+1 4
+3 4
cob=(3)
cfi=(3)
cfn=(234)
calls=2 0 
* 1000
* 2
* 2
+1 4
+8 2
cfi=(52)
cfn=(1066) get_stack_depth_rlimit
calls=2 4517 
* 18
* 2
+1 4
+2 14
+2 4
+4 8
+1 12
cfi=(17)
cfn=(1138)
calls=2 231 
* 984
+1 12
cfn=(1206)
calls=2 7172 
* 4819
+4 4

fn=(4078) DefineCustomEnumVariable
8381 9
+3 10
cfn=(4080)
calls=1 8025 
* 540
* 1
+3 3
+1 3
+1 3
+1 3
+1 3
+1 3
+1 3
+1 3
cfn=(4082)
calls=1 8079 
* 698256
+1 2

fn=(4088) DefineCustomBoolVariable
8269 20
+3 18
cfn=(4080)
calls=2 8025 
* 1456
* 2
+3 6
+1 6
+1 6
+1 6
+1 6
+1 6
+1 6
cfn=(4082)
calls=2 8079 
* 1393248
+1 4

fn=(786)
4964 3
+7 1
cfi=(30) /home/mithuncy/fsm_p11patch/src/timezone/pgtz.c
cfn=(788) pg_timezone_initialize
calls=1 364 
* 15793
+5 1
cfn=(860) build_guc_variables
calls=1 4696 
* 403842
+6 2
+2 2512
cfn=(874)
calls=314 +82 
* 82758
-2 1259
+5 1
+2 1
+6 5
cfn=(1206)
calls=1 7172 
* 3716
+2 5
cfn=(1206)
calls=1 7172 
* 1689
+2 5
cfn=(1206)
calls=1 7172 
* 2571
+7 1
cfn=(1228)
calls=1 +14 
* 5094
+1 2

fn=(866) guc_var_compare
4918 113155
+1 67893
+1 67893
+2 158417
cfn=(868)
calls=22631 +8 
* 3088839
+1 45262

fn=(882)
10978 12
+2 8
cfi=(37)
cfn=(884)
calls=2 83 
* 76
+2 2
+1 4

fn=(992)
10914 6
+4 6
cfi=(50) /home/mithuncy/fsm_p11patch/src/backend/storage/buffer/bufmgr.c
cfn=(994) ComputeIoConcurrency
calls=1 468 
* 43
* 2
+2 3
cfn=(862)
calls=1 4473 
* 195
* 1
+2 4
cob=(1)
cfi=(1)
cfn=(223)
calls=1 0 
* 1116
* 5
* 3
+1 3
+2 2
+12 2

fn=(1004)
10726 18
+6 12
+1 8
cfi=(11)
cfn=(484)
calls=2 255 
* 698
+1 3
+1 6

fn=(1088)
11289 5
+1 3
+4 6
+6 1
+1 2

fn=(1148)
10630 5
+2 8
cfi=(57)
cfn=(1150)
calls=1 1897 
* 265
+4 2

fn=(1162)
10832 5
+2 5
cfi=(58)
cfn=(1164) pq_setkeepalivesinterval
calls=1 1813 
* 11
+1 2

fn=(1202)
10561 4
+1 2
+1 2

fn=(3670) AtEOXact_GUC
5576 12
+14 8
+2 6
+1 2
5849 4

fn=(4106) EmitWarningsOnPlaceholders
8399 5
+1 3
cob=(3)
cfi=(3)
cfn=(424)
calls=1 0 
* 15
* 1
* 1
+3 2
+2 2233
+2 1595
-4 1279
+14 4

fn=(860)
4696 3
+2 1
+4 2
+2 900
+3 180
+1 90
-6 1182
+9 2
+2 864
+2 216
+1 108
-5 1198
+8 2
+2 200
+2 40
+1 20
-5 272
+8 2
+2 670
+2 134
+1 67
-5 883
+8 2
+2 232
+2 58
+1 29
-5 329
+11 9
+3 3
-1 3
cfn=(862)
calls=1 4473 
* 192
* 1
+3 1
+2 2
+1 1530
-1 1182
+3 2
+1 1620
-1 1198
+3 2
+1 340
-1 272
+3 2
+1 1139
-1 883
+3 2
+1 435
-1 329
+3 3
+2 2
+1 2
+1 2
+1 7
cfi=(36) /home/mithuncy/fsm_p11patch/src/port/qsort.c
cfn=(864) pg_qsort
calls=1 114 
* 386991
+2 2

fn=(900)
10675 6
+2 4
+6 1
+1 2

fn=(1166)
10661 6
+4 3
+5 1
+1 2

fn=(1186)
10739 18
+12 12
+3 2
+4 8
cfi=(63) /home/mithuncy/fsm_p11patch/src/backend/utils/misc/tzparser.c
cfn=(1472) load_tzoffsets
calls=2 439 
* 1584962
* 4
+3 8
+3 2
+1 6

fn=(1416) set_config_sourcefile
7137 168
+8 140
+2 140
cfn=(1212)
calls=28 4869 
* 35242
* 28
+2 56
+3 140
cfn=(878)
calls=28 4505 
* 7825
* 28
+1 112
+1 56
cob=(3)
cfi=(3)
cfn=(590)
calls=14 0 
* 1190
* 14
+1 84
+1 84
+1 56

fn=(3712) _ShowOption
9168 66
+4 77
+4 6
+2 12
+3 24
+2 3
+49 14
+2 28
+1 3
cfi=(39)
cfn=(3722) show_timezone
calls=1 383 
* 22
* 2
+1 66
+1 30
+4 7
+4 2
+2 4
+3 7
cfn=(2654) config_enum_lookup_by_value
calls=1 6115 
* 24
* 1
+2 1
+8 33
cfi=(13)
cfn=(928)
calls=11 1162 
* 1756
+1 22

fn=(4084)
4783 25
+1 25
+26 45
+1 35
cfi=(36)
cfn=(864)
calls=5 114 
* 3485040
+2 5
+1 10

fn=(1002)
10941 4
+2 3
+2 2

fn=(1090)
11218 6
+2 4
cob=(3)
cfi=(3)
cfn=(424)
calls=1 0 
* 15
* 1
* 2
+6 1
+1 2

fn=(1092)
11231 5
+1 3
+4 6
+6 1
+1 2

fn=(1100)
11059 5
+1 3
+1 3
+3 1
+1 2

fn=(1134)
10688 6
+2 4
+6 1
+1 2

fn=(1136)
10949 5
+7 3
cob=(3)
cfi=(3)
cfn=(424)
calls=1 0 
* 15
* 1
* 4
cfn=(862)
calls=1 4473 
* 208
* 1
+1 6
cfi=(17)
cfn=(1138)
calls=1 231 
* 218
+3 3
cob=(3)
cfi=(3)
cfn=(424)
calls=1 0 
* 15
* 1
* 4
cfn=(862)
calls=1 4473 
* 208
* 1
+1 6
cfi=(17)
cfn=(1138)
calls=1 231 
* 337
+1 3
cob=(3)
cfi=(3)
cfn=(424)
calls=1 0 
* 15
* 1
* 4
cfn=(862)
calls=1 4473 
* 208
* 1
+1 6
cfi=(17)
cfn=(1138)
calls=1 231 
* 346
+2 3
+2 2
+1 3
+2 2
+1 3
+2 2
+1 2

fn=(1094)
11151 6
+1 5
+45 1
+1 2

fn=(1098)
11030 6
+1 1
+3 5
+1 2
+15 3
cfn=(862)
calls=1 4473 
* 208
* 1
+1 3
+1 3
+2 1
+1 2

fn=(1104)
11135 5
+1 3
+4 6
+6 1
+1 2

fn=(1264)
4545 360
+1 180
+3 180
+3 360
cfn=(1266)
calls=48 -30 
* 1032
* 144
+1 72
cob=(3)
cfi=(3)
cfn=(590)
calls=24 0 
* 2076
* 24
+1 120

fn=(1418)
5911 48
+4 24
+1 12
+4 12
+2 774
+1 176
cob=(3)
cfi=(3)
cfn=(446)
calls=16 0 
* 352
* 16
-1 32
+3 54
+3 66
+1 12
-9 854
+13 24

fn=(1468)
5886 92
+1 124
+2 44
cfn=(3712)
calls=11 9168 
* 2210
* 11
+3 44
cfi=(179) /home/mithuncy/fsm_p11patch/src/backend/libpq/pqformat.c
cfn=(3292) pq_beginmessage
calls=11 88 
* 1507
+1 66
cfi=(179)
cfn=(3714) pq_sendstring
calls=11 198 
* 1766
+1 55
cfi=(179)
cfn=(3714)
calls=11 198 
* 1720
+1 33
cfi=(179)
cfn=(3298) pq_endmessage
calls=11 299 
* 3733
+2 33
cfi=(13)
cfn=(952)
calls=11 1032 
* 844
+2 46

fn=(2652) GetConfigOption
7195 225
+4 125
cfn=(1212)
calls=25 4869 
* 31262
* 25
+1 50
+9 50
+8 175
+3 14
+4 12
-1 42
cfi=(17)
cfn=(462)
calls=6 203 
* 2844
+2 12
+8 64
+4 2
-1 5
cfn=(2654)
calls=1 6115 
* 24
* 1
+4 100

fn=(2654)
6115 10
+3 8
+2 8
+1 6
-3 12
+9 4

fl=(81)
fn=(3170) psprintf
47 33143
+1 3013
cob=(5)
cfi=(5)
cfn=(472)
calls=3013 -48 
* 9039
* 3013
* 6026
+1 3013
+12 9039
cfi=(13)
cfn=(940)
calls=3013 925 
* 430608
* 3013
+3 3013
cob=(5)
cfi=(5)
cfn=(472)
calls=3013 -64 
* 9039
* 3013
* 6026
+1 18078
+1 18078
cfn=(1894)
calls=3013 +41 
* 3871773
* 3013
+3 9039
+1 6026
+6 6026

fn=(1894)
107 24248
+3 18186
cfi=(17)
cfn=(464) pg_vsnprintf
calls=3031 +65 
* 3786736
* 3031
+3 15155
+11 12124
+3 9093
+24 12124

fl=(95) /home/mithuncy/fsm_p11patch/src/backend/access/transam/commit_ts.c
fn=(2034) CommitTsShmemBuffers
471 4
+1 34
+1 4

fn=(5342) ExtendCommitTs
785 4
+9 5
+1 1
+18 2

fn=(2032) CommitTsShmemSize
480 2
+1 1
cfn=(2034)
calls=1 -10 
* 21
* 3
cfi=(93)
cfn=(2020)
calls=1 146 
* 52
* 1
+2 2

fn=(2198) CommitTsShmemInit
491 4
+3 1
+2 2
-1 2
cfn=(2034)
calls=1 -24 
* 21
* 8
cfi=(93)
cfn=(2196)
calls=1 167 
* 3371
+4 5
cfi=(87)
cfn=(2168)
calls=1 373 
* 983
* 1
+4 4
+4 2
+1 3
+1 2
+1 2
+4 4

fn=(5664) TransactionTreeSetCommitTsData
148 11
+13 5
+1 1
+62 2

fl=(106) /home/mithuncy/fsm_p11patch/src/backend/replication/slot.c
fn=(2064) ReplicationSlotsShmemSize
115 9
+1 3
+2 9
+3 3
+1 15
cfi=(87)
cfn=(2000) mul_size
calls=3 493 
* 69
* 15
cfi=(87)
cfn=(2002) add_size
calls=3 476 
* 63
* 3
+3 3
+1 6

fn=(2276) ReplicationSlotsShmemInit
133 3
+3 3
+4 1
cfn=(2064)
calls=1 -25 
* 66
* 4
cfi=(87)
cfn=(2168)
calls=1 373 
* 1050
-1 1
+4 3
cfi=(99)
cfn=(2158) LWLockRegisterTranche
calls=1 603 
* 17
+3 4
+5 4
cfn=(2064)
calls=1 -36 
* 66
* 19
cob=(3)
cfi=(3)
cfn=(828)
calls=1 0 
* 275
* 1
+2 2
+2 90
+3 20
+1 50
cfi=(99)
cfn=(2144) LWLockInitialize
calls=10 678 
* 640
+1 40
cfi=(128) /home/mithuncy/fsm_p11patch/src/backend/storage/lmgr/condition_variable.c
cfn=(2278) ConditionVariableInit
calls=10 40 
* 230
-7 43
+10 2

fn=(5762) ReplicationSlotCleanup
480 3
+6 5
cfi=(99)
cfn=(2170) LWLockAcquire
calls=1 1122 
* 136
+1 2
+2 90
+2 50
+1 10
-5 43
+23 4
cfi=(99)
cfn=(2182)
calls=1 1726 
* 90
+1 2

fl=(141) /home/mithuncy/fsm_p11patch/src/backend/storage/smgr/md.c
fn=(5468) register_dirty_segment
1416 10500
+4 4500
+7 13500
cfi=(104) /home/mithuncy/fsm_p11patch/src/backend/postmaster/checkpointer.c
cfn=(5470) ForwardFsyncRequest
calls=1500 1096 
* 465000
* 3000
+1 1500
+11 6000

fn=(3164) mdnblocks
847 20190
+1 24228
cfn=(3166) mdopen
calls=4038 560 
* 1119381
* 4038
+2 4038
+18 28266
+1 36342
+4 24228
cfn=(3182) _mdnblocks
calls=4038 1965 
* 246318
* 4038
+1 8076
+2 8076
+1 24228
+18 8076

fn=(3166)
560 45766
+6 45766
+1 21180
+2 36096
cfi=(174) /home/mithuncy/fsm_p11patch/src/common/relpath.c
cfn=(3168) GetRelationPath
calls=3008 140 
* 4538888
* 3008
+2 12032
cfi=(25)
cfn=(3172) PathNameOpenFile
calls=3008 1298 
* 1620919
* 3008
+2 6016
+8 6000
+2 4000
+2 8000
+1 2000
cob=(5)
cfi=(5)
cfn=(472)
calls=2000 0 
* 6000
* 2000
* 2000
-1 4000
+3 6000
cfi=(13)
cfn=(952)
calls=2000 1032 
* 170000
+1 4000
+8 3024
cfi=(13)
cfn=(952)
calls=1008 1032 
* 85680
+2 6048
cfn=(3180) _fdvec_resize
calls=1008 1738 
* 147236
+1 6048
+1 3024
+1 2016
+4 1008
+1 26152

fn=(2826) mdinit
207 3
+1 7
cfi=(14)
cfn=(432)
calls=1 395 
* 111
* 1
+9 10
+28 2

fn=(3180)
1738 6048
+1 2016
+8 7056
+3 7056
cfi=(13)
cfn=(798)
calls=1008 772 
* 110948
-1 6048
+16 6048
+1 2016

fn=(5372) mdclose
614 12500
+1 15000
+3 5000
+1 2500
+19 5000

fn=(5448) _mdfd_getseg
1838 15000
+9 4500
+3 10500
+2 13500
+1 3000
1958 6000

fn=(3182)
1965 28266
+3 16152
cfi=(25)
cfn=(3184) FileSize
calls=4038 +46 
* 153444
* 4038
+1 8076
+6 20190
+1 16152

fn=(5370) mdexists
278 12500
+5 12500
cfn=(5372)
calls=2500 614 
* 40000
+2 15000
cfn=(3166)
calls=2500 560 
* 5707534
* 5000
+1 5000

fn=(5446) mdextend
497 16500
+15 3000
+7 10500
cfn=(5448)
calls=1500 1838 
* 52500
* 1500
+2 6000
+4 13500
cfi=(25)
cfn=(5450) FileWrite
calls=1500 1892 
* 236272
* 4500
+17 12000
+1 9000
cfn=(5468)
calls=1500 1416 
* 504000
+3 7500

fl=(295) /home/mithuncy/fsm_p11patch/src/backend/utils/adt/ruleutils.c
fn=(5136) quote_identifier
10555 2000
+6 500
+10 6000
+2 1500
+2 17676
+2 27568
+1 6176
-5 31460
+18 1500
+3 1000
+10 2500
cfi=(216) /home/mithuncy/fsm_p11patch/src/common/keywords.c
cfn=(3864) ScanKeywordLookup
calls=500 67 
* 430272
* 500
+4 1000
+4 1000
+1 1000
+18 1000

fl=(9)
fn=(1580) atexit
0 6
cob=(1)
cfi=(1)
cfn=(223)
calls=1 0 
0 1433
0 5

fn=(5800) 0x00000000004773a0
0 8

fn=(354) __libc_csu_init
0 16
cob=(2) ???
cfi=(2) ???
cfn=(356) 0x0000000000476418
calls=1 0 
0 6
0 7
cfn=(360) 0x0000000000477430
calls=1 0 
0 15
0 11

fn=(340) 0x0000000000477370
0 11
cob=(1)
cfi=(1)
cfn=(222)
calls=1 0 
0 397298141
0 5

fn=(5796) 0x0000000000477410
0 5
cfn=(5800)
calls=1 0 
0 8
0 3

fn=(512) lstat
0 8
cob=(3)
cfi=(3)
cfn=(518) _lxstat
calls=1 0 
0 10
cob=(1)
cfi=(1)
cfn=(223)
calls=1 0 
0 1301
0 6

fn=(5242) fstat
0 2000
cob=(3)
cfi=(3)
cfn=(596) _fxstat
calls=499 0 
0 4990
cob=(1)
cfi=(1)
cfn=(223)
calls=1 0 
0 1301
0 504

fn=(360)
0 15

fn=(490)
0 44
cob=(3)
cfi=(3)
cfn=(496) _xstat
calls=10 0 
0 112
cob=(1)
cfi=(1)
cfn=(223)
calls=1 0 
0 1294
0 15

fl=(93)
fn=(2312) SlruScanDirCbDeleteAll
1354 7
+1 5
cfn=(2314) SlruInternalDeleteSegment
calls=1 1248 
* 549
+2 1
+1 2

fn=(2020)
146 56
+4 14
+1 84
+1 84
+1 70
+1 84
+1 84
+1 84
+2 28
+1 14
+2 16
+1 4
-1 96
+1 24

fn=(2196)
167 63
+4 35
cfn=(2020)
calls=7 -25 
* 371
* 42
cfi=(87)
cfn=(2168)
calls=7 373 
* 6530
* 7
+4 28
+9 35
cob=(3)
cfi=(3)
cfn=(828)
calls=7 0 
* 154
* 7
+2 21
+2 21
+1 21
+2 14
+4 14
+1 7
+1 35
+1 42
+1 35
+1 42
+1 35
+1 35
+1 35
+1 42
+1 35
+1 42
+3 35
+1 42
+2 14
+2 5
+1 7
+4 7
cfi=(16)
cfn=(460)
calls=1 46 
* 94
* 42
cfi=(16)
cfn=(460)
calls=6 46 
* 1208
+1 21
+2 28
+1 14
+2 1408
cfi=(99)
cfn=(2144)
calls=128 678 
* 8192
+3 1024
+1 896
+1 768
+1 896
+1 128
-9 533
+20 14
-1 35
cfi=(99)
cfn=(2158)
calls=7 603 
* 119
+7 21
+1 14
+1 84
cob=(3)
cfi=(3)
cfn=(950) __strncpy_ssse3
calls=7 0 
* 604
* 7
* 35
+1 14

fn=(2320) SimpleLruZeroLSNs
305 5
+1 3
+2 4
+3 2

fn=(2318) SlruSelectLRUPage
967 10
+1 6
+7 2
+1 2
+1 2
+1 2
+1 2
+1 2
+3 4
+2 81
+1 63
-1 18
+2 2
-4 48
+34 6
+1 2
+5 9
+1 2
-6 4
+79 4

fn=(2326) SlruPhysicalWritePage
720 7
+1 3
+1 6
+1 7
+1 3
+2 1
+7 4
+40 2
+14 2
+19 11
cfi=(17)
cfn=(462)
calls=1 203 
* 759
+1 4
cfi=(25)
cfn=(2328) OpenTransientFile
calls=1 2236 
* 122
* 1
+1 2
+7 2
+19 7
cob=(5)
cfi=(5)
cfn=(1956)
calls=1 0 
* 7
* 1
* 2
+9 1
cob=(5)
cfi=(5)
cfn=(472)
calls=1 0 
* 3
* 1
* 1
+1 2
cfi=(68) /home/mithuncy/fsm_p11patch/src/backend/access/transam/../../../../src/include/pgstat.h
cfn=(1596) pgstat_report_wait_start
calls=1 1239 
* 14
+1 12
cob=(5)
cfi=(5)
cfn=(1568)
calls=1 0 
* 7
* 1
* 2
+12 1
cfi=(68)
cfn=(1598) pgstat_report_wait_end
calls=1 1263 
* 13
+6 2
+2 2
cfi=(68)
cfn=(1596)
calls=1 1239 
* 14
+1 4
+8 1
cfi=(68)
cfn=(1598)
calls=1 1263 
* 13
+2 3
cfi=(25)
cfn=(2332) CloseTransientFile
calls=1 2413 
* 74
* 2
+8 1
+1 2

fn=(2316) SimpleLruZeroPage
264 5
+1 3
+4 5
cfn=(2318)
calls=1 967 
* 229
* 1
+7 8
+1 7
+1 6
+1 24
+3 28
cob=(3)
cfi=(3)
cfn=(828)
calls=1 0 
* 912
* 1
+3 5
cfn=(2320)
calls=1 +20 
* 14
+3 3
+2 1
+1 2

fn=(5678)
377 8
+1 3
+9 5
cfn=(2318)
calls=1 967 
* 42
* 1
+3 9
+1 7
-1 2
+7 9
+1 7
-1 2
+9 12
+1 2
+43 2

fn=(2314)
1248 5
+3 11
cfi=(17)
cfn=(462)
calls=1 203 
* 464
+1 6
cfi=(57)
cfn=(1548)
calls=1 232 
* 50
* 2
+2 3
cob=(3)
cfi=(3)
cfn=(1972)
calls=1 0 
* 5
* 1
+1 2

fn=(2322) SimpleLruWritePage
579 5
+1 6
cfn=(2324) SlruInternalWritePage
calls=1 -72 
* 1760
+1 2

fn=(2300) SlruScanDirectory
1377 6
+1 1
+6 4
cfi=(25)
cfn=(718)
calls=1 2447 
* 340
* 1
+1 1
+4 12
cob=(3)
cfi=(3)
cfn=(424)
calls=3 0 
* 45
* 3
* 3
+2 14
+1 5
cob=(1)
cfi=(1)
cfn=(223)
calls=1 0 
* 1321
* 5
-1 2
+3 6
cob=(3)
cfi=(3)
cfn=(1246)
calls=1 0 
* 171
* 1
* 1
+1 3
+2 4
cfi=(57)
cfn=(2084) elog_start
calls=1 1286 
* 79
* 10
cfi=(57)
cfn=(2086) elog_finish
calls=1 -61 
* 96
+2 7
cfn=(2312)
calls=1 -45 
* 564
* 1
+1 2
-15 24
cfi=(25)
cfn=(2302) ReadDir
calls=4 2513 
* 589
* 12
+19 3
cfi=(25)
cfn=(738)
calls=1 2565 
* 194
+2 1
+1 2

fn=(2324)
508 6
+1 3
+1 8
+4 10
+10 9
+1 7
-1 2
+2 7
-1 2
+8 7
+1 6
+3 9
cfi=(99)
cfn=(2170)
calls=1 1122 
* 137
+3 4
cfi=(99)
cfn=(2182)
calls=1 1726 
* 118
+3 6
cfn=(2326)
calls=1 720 
* 1129
* 1
+3 4
+9 5
cfi=(99)
cfn=(2170)
calls=1 1122 
* 137
+6 4
+3 7
+2 8
cfi=(99)
cfn=(2182)
calls=1 1726 
* 118
+3 4
+2 2

fl=(290) /home/mithuncy/fsm_p11patch/src/backend/utils/fmgr/../../../../src/include/nodes/pg_list.h
fn=(5020) list_length
90 1503
+1 2505
+1 1002

fl=(25)
fn=(2330) OpenTransientFilePerm
2245 21
+7 3
cfn=(720) reserveAllocatedDesc
calls=3 2113 
* 42
* 9
+7 3
cfn=(722) ReleaseLruFiles
calls=3 1127 
* 33
+2 18
cfn=(1594) BasicOpenFilePerm
calls=3 943 
* 93
* 3
+2 6
+2 18
+2 6
+1 9
+1 3
cfi=(26)
cfn=(736) GetCurrentSubTransactionId
calls=3 625 
* 24
* 6
+1 9
+2 6
+4 12

fn=(1432) ReadDirExtended
2528 18655
+4 5330
+9 2665
cob=(5)
cfi=(5)
cfn=(472)
calls=2665 0 
* 7995
* 2665
* 2665
+1 7995
cob=(3)
cfi=(3)
cfn=(1438) readdir
calls=2664 0 
* 351447
cob=(1)
cfi=(1)
cfn=(223)
calls=1 0 
* 6787
* 2669
* 7995
+1 5318
+2 6
cob=(5)
cfi=(5)
cfn=(472)
calls=6 0 
* 18
* 6
* 18
+5 6
+1 10660

fn=(1576) pg_fsync_no_writethrough
351 28
+1 21
+3 7
+1 14

fn=(2404)
878 5
+12 6
cfn=(2406) count_usable_fds
calls=1 -96 
* 61479
+3 7
+5 3
+5 3
+8 4
cfi=(57)
cfn=(2084)
calls=1 1286 
* 68
* 10
cfi=(57)
cfn=(2086)
calls=1 1336 
* 96
+2 5

fn=(2464) RemovePgTempFilesInDir
2924 9
+5 3
cfn=(718)
calls=1 2447 
* 89
* 1
+2 3
cob=(5)
cfi=(5)
cfn=(472)
calls=1 0 
* 3
* 1
* 5
+54 4

fn=(3176) AllocateVfd
1137 12032
+8 12032
+7 18
+3 12
+1 1
+5 8
cob=(3)
cfi=(3)
cfn=(556) realloc
calls=1 0 
* 408
* 1
* 40
cob=(3)
cfi=(3)
cfn=(556)
calls=5 0 
* 13317
* 5
* 6
+1 12
+4 12
+5 18
+2 83886
+1 10230
+1 8184
-4 4110
+6 54
+1 18
+5 12
+3 18
+2 66
+2 6
+1 24
-5 9006
+2 33022
+2 3002
+1 12008

fn=(3184)
2014 16152
+6 44418
+6 52494
cob=(5)
cfi=(5)
cfn=(1956)
calls=4038 0 
* 28266
* 4038
+1 8076

fn=(5376) FreeVfd
1195 8000
+1 18000
+5 8000
+5 4000
+2 8000
+1 6000
+1 4000

fn=(718)
2447 50
+7 10
cfn=(720)
calls=10 2113 
* 367
* 30
+7 10
cfn=(722)
calls=10 1127 
* 110
+3 30
cob=(3)
cfi=(3)
cfn=(728) opendir
calls=9 0 
* 1902
cob=(1)
cfi=(1)
cfn=(223)
calls=1 0 
* 1541
* 14
* 30
+2 54
+2 18
+1 27
+1 9
cfi=(26)
cfn=(736)
calls=9 625 
* 72
* 18
+1 27
+1 27
+3 1
cob=(5)
cfi=(5)
cfn=(472)
calls=1 0 
* 3
* 1
* 4
cob=(5)
cfi=(5)
cfn=(472)
calls=1 0 
* 3
* 1
* 3
+13 1
+1 40

fn=(720)
2113 2128
+5 2128
+1 1062
+8 3
+2 1
+1 5
cob=(3)
cfi=(3)
cfn=(388)
calls=1 0 
* 210
* 1
* 1
+2 2
+4 2
+1 2
+1 2
+27 2128

fn=(740) FreeDesc
2346 2116
+4 3204
+3 2068
cob=(3)
cfi=(3)
cfn=(1380)
calls=516 0 
* 231492
cob=(1)
cfi=(1)
cfn=(223)
calls=1 0 
* 1732
* 521
* 517
+1 517
+5 36
cob=(3)
cfi=(3)
cfn=(746) closedir
calls=8 0 
* 996
cob=(1)
cfi=(1)
cfn=(223)
calls=1 0 
* 1425
* 13
* 9
+1 9
+2 12
cob=(5)
cfi=(5)
cfn=(692)
calls=3 0 
* 21
* 3
* 3
+1 3
+8 1587
+1 5290
+2 529
+1 1058

fn=(2302)
2513 20
+1 24
cfn=(1432)
calls=4 +14 
* 537
+1 8

fn=(2472) looks_like_temp_rel_name
3046 10032
+5 10032
+1 5016
+38 5016

fn=(3686) CleanupTempFiles
2794 21
+7 12
+3 2
+2 9207
+2 8184
-4 5119
+26 1
+4 12
+5 12
+2 6

fn=(5544) ReleaseLruFile
1105 52
+3 78
+7 104
cfn=(5546) LruDelete
calls=26 1010 
* 2028
+1 52
+3 52

fn=(2468) RemovePgTempRelationFilesInDbspace
3018 15
+5 9
cfn=(718)
calls=3 2447 
* 912
* 3
+2 3
+2 10032
cfn=(2472)
calls=2508 +19 
* 30096
* 7524
+1 2508
-3 15066
cfn=(1432)
calls=2511 2528 
* 400080
* 7533
+15 9
cfn=(738)
calls=3 2565 
* 582
+1 12

fn=(3684) AtEOXact_Files
2762 10
+1 8
cfn=(3686)
calls=2 +31 
* 46
+1 2
+1 2
+1 4

fn=(5454) Delete
991 1578
+9 4734
+2 6312
+1 6312
+3 1052

fn=(738)
2565 36
+4 18
+6 27
+2 54
+2 72
+1 27
cfn=(740)
calls=9 2346 
* 2740
* 9
-5 27
+12 18

fn=(1172) SetTempTablespaces
2650 5
+2 2
+1 2
+10 2
+3 1
+1 2

fn=(2462)
2864 3
+8 7
cfi=(17)
cfn=(462)
calls=1 203 
* 356
+1 5
cfn=(2464)
calls=1 +51 
* 118
+1 2
cfn=(2466) RemovePgTempRelationFiles
calls=1 2990 
* 477538
+5 2
cfn=(718)
calls=1 2447 
* 304
* 1
+2 1
+2 10
cob=(3)
cfi=(3)
cfn=(446)
calls=2 0 
* 44
* 2
* 4
+1 5
cob=(3)
cfi=(3)
cfn=(446)
calls=1 0 
* 22
* 1
-1 2
+2 2
-4 15
cfn=(1432)
calls=3 2528 
* 393
* 9
+15 3
cfn=(738)
calls=1 2565 
* 194
+9 2

fn=(5452) FileAccess
1215 6000
+11 16500
+6 6000
+7 1500
cfn=(5454)
calls=500 991 
* 19000
+1 1500
cfn=(3178) Insert
calls=500 1036 
* 17000
+3 1500
+1 3000

fn=(722)
1127 7080
+1 3540
+2 26
cfn=(5544)
calls=26 -25 
* 2366
* 78
-2 21396
+5 7080

fn=(1374)
2385 2068
+6 1551
+2 3102
+2 4136
+1 1551
cfn=(740)
calls=517 -50 
* 250289
* 517
-5 1551
+12 1034

fn=(1574) pg_fsync
334 28
+7 21
cfn=(1576)
calls=7 +10 
* 70
+1 14

fn=(2328)
2236 15
+1 21
cfn=(2330)
calls=3 +8 
* 324
+1 6

fn=(2406)
794 6
+3 1
+1 1
+8 1
+1 5
cfi=(13)
cfn=(940)
calls=1 925 
* 125
* 1
+4 4
cob=(3)
cfi=(3)
cfn=(242) getrlimit
calls=1 0 
* 5
* 1
* 1
+4 2
+15 8000
+4 2000
cob=(3)
cfi=(3)
cfn=(2412) dup
calls=999 0 
* 4995
cob=(1)
cfi=(1)
cfn=(223)
calls=1 0 
* 1220
* 1004
* 1000
+1 2000
+8 3000
+5 9000
+2 3000
+1 2000
+2 3000
+1 1
+1 999
+3 2
+1 8000
cob=(5)
cfi=(5)
cfn=(692)
calls=1000 0 
* 7000
* 1000
-1 4003
+3 3
cfi=(13)
cfn=(952)
calls=1 1032 
* 87
+7 3
+1 7
+1 2

fn=(3174) PathNameOpenFilePerm
1311 21056
+11 9024
cob=(3)
cfi=(3)
cfn=(384)
calls=3008 0 
* 753461
* 3008
* 3008
+1 6016
+5 3008
cfn=(3176)
calls=3008 1137 
* 201568
* 3008
+1 27072
+3 3008
cfn=(722)
calls=3008 1127 
* 35714
+2 18048
cfn=(1594)
calls=3008 943 
* 131248
* 6016
+2 12032
+2 2000
cob=(5)
cfi=(5)
cfn=(472)
calls=2000 0 
* 6000
* 2000
* 4000
+2 6000
cfn=(5376)
calls=2000 1195 
* 56000
+1 6000
cob=(3)
cfi=(3)
cfn=(590)
calls=2000 0 
* 170016
* 2000
+1 2000
cob=(5)
cfi=(5)
cfn=(472)
calls=2000 0 
* 6000
* 2000
* 4000
+1 4000
+2 3024
+4 3024
cfn=(3178)
calls=1008 1036 
* 34272
+2 3024
+2 5040
+1 3024
+1 2016
+1 2016
+1 2016
+2 1008
+1 12032

fn=(5450)
1892 13500
+11 4500
cfn=(5452)
calls=1500 1215 
* 72000
* 1500
+1 3000
+3 13500
+10 4500
+18 1500
cob=(5)
cfi=(5)
cfn=(472)
calls=1500 0 
* 4500
* 1500
* 1500
+1 4500
cfi=(315)
cfn=(5456)
calls=1500 1239 
* 24000
+1 22500
cob=(5)
cfi=(5)
cfn=(5462)
calls=1499 0 
* 11992
cob=(1)
cfi=(1)
cfn=(223)
calls=1 0 
* 776
* 1504
* 1500
+1 1500
cfi=(315)
cfn=(5466)
calls=1500 1263 
* 21000
+3 4500
+3 3000
+9 9000
+7 1500
+28 1500
+1 6000

fn=(1592) BasicOpenFile
921 5
+1 7
cfn=(1594)
calls=1 +21 
* 31
+1 2

fn=(1594)
943 21084
+4 21084
cob=(5)
cfi=(5)
cfn=(676)
calls=3012 0 
* 29084
* 3012
* 3012
+2 6024
+1 2024
+2 2000
cob=(5)
cfi=(5)
cfn=(472)
calls=2000 0 
* 6000
* 2000
* 8000
cob=(5)
cfi=(5)
cfn=(472)
calls=2000 0 
* 6000
* 2000
* 6000
+13 2000
+1 12048

fn=(2466)
2990 5
+5 3
cfn=(718)
calls=1 2447 
* 304
* 1
+2 1
+7 25
cob=(3)
cfi=(3)
cfn=(2310) __strspn_sse42
calls=5 0 
* 195
* 5
* 25
cob=(3)
cfi=(3)
cfn=(424)
calls=5 0 
* 83
* 5
* 10
+1 2
+3 6
-1 27
cfi=(17)
cfn=(462)
calls=3 203 
* 1368
+2 9
cfn=(2468)
calls=3 +9 
* 474384
-12 36
cfn=(1432)
calls=6 2528 
* 825
* 18
+15 3
cfn=(738)
calls=1 2565 
* 194
+1 4

fn=(1278)
2186 3114
+7 519
cfn=(720)
calls=519 -80 
* 7266
* 1557
+7 519
cfn=(722)
calls=519 1127 
* 5709
+3 2595
cob=(3)
cfi=(3)
cfn=(1284)
calls=518 0 
* 231558
cob=(1)
cfi=(1)
cfn=(223)
calls=1 0 
* 1860
* 523
* 1557
+2 3102
+2 1034
+1 1551
+1 517
cfi=(26)
cfn=(736)
calls=517 625 
* 4136
* 1034
+1 1551
+1 1551
+3 2
cob=(5)
cfi=(5)
cfn=(472)
calls=2 0 
* 6
* 2
* 8
cob=(5)
cfi=(5)
cfn=(472)
calls=2 0 
* 6
* 2
* 6
+13 2
+1 2076

fn=(2822) InitFileAccess
761 4
+4 2
cob=(3)
cfi=(3)
cfn=(388)
calls=1 0 
* 255
* 1
* 1
+1 3
+5 76
+1 2
+2 1
+3 3
cfi=(67)
cfn=(1578)
calls=1 306 
* 32
+1 4

fn=(3172)
1298 15040
+1 21056
cfn=(3174)
calls=3008 +12 
* 1578807
+1 6016

fn=(5546)
1010 130
+8 234
+6 104
cob=(5)
cfi=(5)
cfn=(692)
calls=26 0 
* 182
* 26
* 52
+3 52
+1 78
+3 78
cfn=(5454)
calls=26 -40 
* 988
+1 104

fn=(2332)
2413 12
+6 9
+2 18
+2 24
+1 9
cfn=(740)
calls=3 -78 
* 132
* 3
-5 9
+12 6

fn=(3178)
1036 4524
+9 13572
+2 3016
+1 6032
+1 4524
+1 16588
+3 3016

fn=(5774) AtProcExit_Files
2776 5
+1 3
cfn=(3686)
calls=1 +17 
* 22530
+1 2

fl=(178) /home/mithuncy/fsm_p11patch/src/backend/access/common/heaptuple.c
fn=(5320) fill_val
184 962500
+2 262500
+6 175000
+24 350000
+3 787500
+1 1225000
+1 437500
+71 175000
+1 262500
+1 175000

fn=(5318) heap_fill_tuple
310 787500
+4 262500
+6 175000
+8 87500
+1 87500
+3 525000
+2 175000
+2 875000
+8 962500
-6 262500
+5 437500
-5 175000
+1 87500
-1 1137500
cfn=(5320)
calls=87500 184 
* 4812500
-4 612500
+14 175000

fn=(3238) nocachegetattr
428 94110
+1 47055
+2 47055
+1 15685
+12 15685
+2 109795
+7 47046
+1 47046
+3 266594
+1 1006
+6 30358
+2 2821
-2 47149
+11 94110
+2 62740
+8 151820
+1 60728
+1 308220
+7 1743
+4 482
+2 39402
+2 238
+1 238
-5 14099
+11 3008
+2 33
+1 11
+11 22
+3 165
+3 110
+1 110
-1 33
+3 11
+2 1600
+2 640
+1 9
+2 1412
+2 210
+2 280
-11 280
+7 81
+2 243
+2 324
-11 357
+16 121
+4 741
+13 741
+1 741
+2 7410
+2 5187
-2 193870
+2 437629
+2 515
+1 515
+4 113766
+1 73344
+1 5108
+8 2434
+1 2629
-1 478
+2 8
+3 13311
+2 1638
-2 396
+2 792
+6 590
+2 62
-2 29
+2 58
+1 180
+3 58839
+1 741
+2 218589
+2 111332
+1 3
-46 3
+47 3
-47 19384
+47 19384
+3 11391
+1 31370

fn=(3390) heap_freetuple
1341 2472
+1 1854
cfi=(13)
cfn=(952)
calls=618 1032 
* 52530
+1 1236

fn=(3976) heap_attisnull
362 12
+6 14
+8 4
+2 14
+2 36
+19 4

fn=(5316) heap_compute_data_size
124 525000
+1 87500
+2 262500
+2 175000
+5 612500
+3 612500
+1 875000
+2 350000
+9 350000
+12 1225000
+2 962500
-34 612500
+39 87500
+1 175000

fn=(5314) heap_form_tuple
1025 612500
+6 87500
+1 262500
+3 175000
+9 175000
+2 612500
-2 612500
+12 87500
+2 175000
+3 525000
+2 525000
cfn=(5316)
calls=87500 124 
* 6912500
* 87500
+2 175000
+6 350000
cfi=(13)
cfn=(2546)
calls=87500 956 
* 13696205
* 87500
+1 525000
+7 350000
+1 525000
+1 175000
+2 350000
+1 350000
+1 350000
+2 525000
+2 787500
+1 350000
+2 1312500
cfn=(5318)
calls=87500 310 
* 11637500
+8 87500
+1 350000

fn=(3346) heap_copytuple
683 2796
+3 4194
+3 4194
cfi=(13)
cfn=(940)
calls=699 925 
* 82350
* 699
+1 2796
+1 4194
+1 2796
+1 2796
+1 6990
cob=(3)
cfi=(3)
cfn=(856)
calls=699 0 
* 61967
* 699
+1 699
+1 1398

fl=(246) /home/mithuncy/fsm_p11patch/src/backend/parser/parse_expr.c
fn=(4824) transformColumnRef
510 8
+1 1
+1 1
+1 1
+1 1
+9 1
+6 4
+2 7
cob=(12)
cfi=(231) /home/mithuncy/fsm_p11patch/src/pl/plpgsql/src/pl_comp.c
cfn=(4826) plpgsql_pre_column_ref
calls=1 1065 
* 16
* 1
+1 2
+27 4
cfi=(219)
cfn=(4828) list_length
calls=1 90 
* 10
* 6
+4 4
cfi=(219)
cfn=(4292)
calls=1 78 
* 10
* 2
+3 3
+3 8
cfi=(282) /home/mithuncy/fsm_p11patch/src/backend/parser/parse_relation.c
cfn=(4830) colNameToVar
calls=1 760 
* 47
* 1
+2 2
+13 9
cfi=(282)
cfn=(4832) refnameRangeTblEntry
calls=1 89 
* 76
* 1
+3 2
+4 1
761 4
+4 7
cob=(12)
cfi=(231)
cfn=(4836) plpgsql_post_column_ref
calls=1 1079 
* 715
* 1
+1 2
+1 3
+12 2
+28 1
+1 6

fn=(4820) transformFuncCall
1445 5
+1 3
+5 1
+1 4
cfi=(219)
cfn=(4292)
calls=1 78 
* 10
* 2
+3 4
-1 8
cfn=(4405) transformExprRecurse'2
calls=2 165 
* 512804
* 10
cfi=(45)
cfn=(960)
calls=2 129 
* 453
* 2
-2 12
+14 4
+13 12
cfi=(284) /home/mithuncy/fsm_p11patch/src/backend/parser/parse_func.c
cfn=(4966) ParseFuncOrColumn
calls=1 80 
* 59912
+7 2

fn=(5034) transformParamRef
812 14
+7 8
+1 14
cfi=(289) /home/mithuncy/fsm_p11patch/src/backend/executor/functions.c
cfn=(5036) sql_fn_param_ref
calls=2 405 
* 1381
* 4
+4 4
+6 2
+1 10

fn=(4822) transformAExprOp
849 10
+1 6
+1 6
+3 6
+27 6
+18 12
+17 12
+16 6
+2 10
cfn=(4405)
calls=2 165 
* 1137
* 2
+1 10
cfn=(4405)
calls=2 165 
* 55583
* 2
+2 24
cfi=(283) /home/mithuncy/fsm_p11patch/src/backend/parser/parse_oper.c
cfn=(4854) make_op
calls=2 749 
* 587959
* 2
+8 2
+1 4

fn=(4404) transformExprRecurse
165 28
+3 8
+4 4
cfi=(52)
cfn=(3958) check_stack_depth
calls=4 3263 
* 108
+2 56
+12 4
+1 6
+2 14
cfi=(223) /home/mithuncy/fsm_p11patch/src/backend/parser/parse_node.c
cfn=(4406) make_const
calls=2 471 
* 522
* 2
+1 2
+22 2
+2 7
+3 5
cfn=(4822)
calls=1 849 
* 132402
* 1
+1 1
+40 1
+8 5
cfn=(4820)
calls=1 1445 
* 573248
* 1
+1 1
379 4
+1 20

fn=(4405)
165 49
+3 14
+4 7
cfi=(52)
cfn=(3958)
calls=7 3263 
* 189
+2 117
+3 5
cfn=(4824)
calls=1 510 
* 970
* 1
+1 1
+3 10
cfn=(5034)
calls=2 812 
* 1437
* 2
+1 2
+4 4
+1 6
+2 14
cfi=(223)
cfn=(4406)
calls=2 471 
* 520
* 2
+1 2
+13 5
cfn=(5040) transformTypeCast
calls=1 2663 
* 54476
* 1
+1 1
+8 2
+2 7
+3 5
cfn=(4822)
calls=1 849 
* 512397
* 1
+1 1
+40 1
379 7
+1 35

fn=(4402) transformExpr
147 24
+6 12
+1 12
+2 20
cfn=(4404)
calls=4 +9 
* 706452
* 4
+2 12
+2 4
+1 8

fn=(5040)
2663 7
+2 3
+8 7
cfi=(287) /home/mithuncy/fsm_p11patch/src/backend/parser/parse_type.c
cfn=(5042) typenameTypeIdAndMod
calls=1 295 
* 48012
+7 7
+11 4
+27 5
cfn=(4405)
calls=1 165 
* 767
* 1
+2 3
cfi=(247)
cfn=(4434)
calls=1 43 
* 24
* 1
+1 2
+8 3
+1 2
+3 11
cfi=(285) /home/mithuncy/fsm_p11patch/src/backend/parser/parse_coerce.c
cfn=(5052) coerce_to_target_type
calls=1 83 
* 5608
* 1
+5 2
+8 1
+1 5

fl=(266) /home/mithuncy/fsm_p11patch/src/backend/optimizer/util/tlist.c
fn=(4634) create_empty_pathtarget
672 18
+2 24
cfi=(13)
cfn=(3400) MemoryContextAllocZeroAligned
calls=6 853 
* 1044
* 24
+1 12

fn=(4652) make_pathtarget_from_tlist
588 12
+1 12
cfi=(13)
cfn=(3400)
calls=3 853 
* 522
* 15
+4 9
cfi=(268) /home/mithuncy/fsm_p11patch/src/backend/optimizer/util/../../../../src/include/nodes/pg_list.h
cfn=(4654) list_length
calls=3 90 
* 30
* 12
cfi=(13)
cfn=(940)
calls=3 925 
* 330
* 6
+2 3
+1 9
cfi=(268)
cfn=(4642) list_head
calls=3 78 
* 30
* 6
+2 9
+2 21
cfi=(45)
cfn=(960)
calls=3 129 
* 870
* 6
+1 27
+1 3
-6 21
+9 3
+1 6

fn=(4710) apply_tlist_labeling
340 15
+5 9
cfi=(268)
cfn=(4642)
calls=3 78 
* 30
* 12
cfi=(268)
cfn=(4642)
calls=3 78 
* 30
* 6
+2 9
+1 9
+3 12
+1 12
+1 12
+1 12
+1 12
-10 36
+12 6

fl=(158) /home/mithuncy/fsm_p11patch/src/backend/utils/adt/name.c
fn=(3966) btnamecmp
205 44968
+1 33726
+1 33726
+2 78694
cfn=(3968) namecmp
calls=11242 -53 
* 917721
* 11242
+1 22484

fn=(2930) namestrcpy
253 2585
+1 2068
+2 5687
cob=(3)
cfi=(3)
cfn=(950)
calls=517 0 
* 35916
* 517
* 2585
+1 517
+1 1034

fn=(3968)
156 89936
+2 22484
+1 67452
cob=(3)
cfi=(3)
cfn=(1044)
calls=11242 0 
* 659155
* 11242
* 11242
+6 56210

fn=(3242) nameeq
136 6104
+1 4578
+1 4578
+3 9156
cob=(3)
cfi=(3)
cfn=(1044)
calls=1526 0 
* 92874
* 1526
* 5601
+1 3052

fl=(77)
fn=(1832)
126 27
+4 18
+1 10
cfn=(2760) getnameinfo_unix
calls=1 235 
* 457
* 2
+6 20
cob=(3)
cfi=(3)
cfn=(1838) getnameinfo
calls=1 0 
* 1800
cob=(1)
cfi=(1)
cfn=(223)
calls=1 0 
* 2205
* 6
* 2
+5 6
+8 3
+1 6

fn=(2760)
235 9
+4 8
+4 2
+2 8
cfi=(17)
cfn=(462)
calls=1 -42 
* 232
* 1
+1 5
+4 2
+2 10
cfi=(17)
cfn=(462)
calls=1 -49 
* 171
* 1
+1 5
+4 1
+1 2

fn=(1630) pg_getaddrinfo_all
59 77
+4 22
+3 44
+1 6
cfn=(1974) getaddrinfo_unix
calls=1 167 
* 2104
* 1
+4 130
cob=(3)
cfi=(3)
cfn=(1636) getaddrinfo
calls=9 -71 
* 22591
cob=(1)
cfi=(1)
cfn=(223)
calls=1 -71 
* 92010
* 14
* 10
+3 10
+1 22

fn=(1942) pg_freeaddrinfo_all
89 55
+2 22
+3 1
+2 2
+2 3
+1 4
cob=(3)
cfi=(3)
cfn=(590)
calls=1 -99 
* 85
* 1
+1 3
cob=(3)
cfi=(3)
cfn=(590)
calls=1 0 
* 89
* 1
-6 5
+13 20
+1 30
cob=(3)
cfi=(3)
cfn=(1948) freeaddrinfo
calls=9 0 
* 2789
cob=(1)
cfi=(1)
cfn=(223)
calls=1 0 
* 1580
* 14
+2 22

fn=(1974)
167 6
+5 2
+2 69
+2 3
cob=(3)
cfi=(3)
cfn=(424)
calls=1 0 
* 19
* 1
* 2
+3 2
+6 6
cob=(3)
cfi=(3)
cfn=(856)
calls=1 0 
* 22
* 1
+2 3
+3 3
+6 3
cob=(1)
cfi=(1)
cfn=(223)
calls=1 0 
* 1498
* 5
* 1
+1 2
+3 3
cob=(3)
cfi=(3)
cfn=(1722)
calls=1 0 
* 355
* 1
* 1
+1 2
+6 2
+1 3
+1 3
+1 2
+1 2
+1 3
+2 2
+1 3
+1 2
+2 6
cob=(3)
cfi=(3)
cfn=(810) __strcpy_ssse3
calls=1 0 
* 62
* 1
+6 1
+1 2

fl=(206) /home/mithuncy/fsm_p11patch/src/backend/utils/time/combocid.c
fn=(3688) AtEOXact_ComboCid
184 4
+5 2
+2 2
+1 2
+1 2
+1 4

fl=(215) /home/mithuncy/fsm_p11patch/src/backend/parser/gram.c
fn=(3856) base_yyparse
24993 3556
+17 1016
+40 508
+17 508
+2 2032
+1 2032
+1 2032
+1 508
+4 508
+1 508
+1 508
+1 508
+1 1524
+1 508
+8 12757
+3 51028
+2 89299
-2 2032
+2 3556
+68 26530
+1 508
45285 508
+1 508
25165 12757
+11 51028
+1 25514
+1 5101
+5 15312
+3 21270
cfi=(211) /home/mithuncy/fsm_p11patch/src/backend/parser/parser.c
cfn=(3858) base_yylex
calls=3545 84 
* 3535690
* 3545
+3 15312
+2 6368
+5 54576
+6 12128
+1 12128
-1 3184
+1 64432
+2 17740
+1 7096
+2 6
+2 3
+1 3
+5 7090
+7 3545
+2 7090
+2 14180
+2 14180
+1 3545
+7 46045
+1 18418
+2 9209
+8 46045
+10 73672
+3 18418
-13 15
+10 24
+3 75718
+2 46057
fi=(214) /home/mithuncy/fsm_p11patch/src/backend/parser/gram.y
786 2540
fe=(215)
25271 508
fi=(214)
802 5
+3 8
cfi=(219)
cfn=(3882) list_tail
calls=1 84 
* 10
* 4
cfn=(3884) updateRawStmtEnd
calls=1 15471 
* 16
+2 4
+3 4
fe=(215)
25287 1
fi=(214)
814 2032
+1 2540
cfn=(3880) makeRawStmt
calls=508 15459 
* 90424
* 1524
cfi=(45)
cfn=(1586) lcons
calls=508 260 
* 147289
* 508
fe=(215)
25298 508
fi=(214)
946 1
fe=(215)
25304 1
fi=(214)
2967 2000
cfi=(13)
cfn=(3400)
calls=500 853 
* 90500
* 2500
+1 2500
+1 1000
+1 2500
+1 2500
+1 2500
+1 2500
+2 2000
+6 1000
+2 2500
+2 2500
+2 2000
+1 3500
cfi=(45)
cfn=(5158) list_concat
calls=500 322 
* 5500
* 1000
+1 1000
fe=(215)
28020 500
fi=(214)
3013 500
fe=(215)
28049 500
fi=(214)
3019 500
fe=(215)
28067 500
fi=(214)
3028 1500
fe=(215)
28073 500
fi=(214)
3033 1500
fe=(215)
28091 500
fi=(214)
3039 4000
cfi=(45)
cfn=(960)
calls=500 129 
* 145000
* 500
fe=(215)
28103 500
fi=(214)
3040 500
fe=(215)
28109 500
fi=(214)
3062 2000
cfi=(217) /home/mithuncy/fsm_p11patch/src/backend/nodes/value.c
cfn=(3872) makeString
calls=500 54 
* 83500
* 2000
cfi=(218) /home/mithuncy/fsm_p11patch/src/backend/nodes/makefuncs.c
cfn=(3874) makeDefElem
calls=500 546 
* 99000
* 500
fe=(215)
28149 500
fi=(214)
3105 500
fe=(215)
28227 500
fi=(214)
3113 500
fe=(215)
28241 500
fi=(214)
3766 500
fe=(215)
29139 500
fi=(214)
6323 4
cfi=(217)
cfn=(3872)
calls=1 54 
* 167
* 3
cfi=(45)
cfn=(1586)
calls=1 260 
* 290
* 1
fe=(215)
32771 1
fi=(214)
8176 4
cfi=(13)
cfn=(3400)
calls=1 853 
* 146
* 5
+1 4
+1 2
fe=(215)
35480 1
fi=(214)
8183 5
cfi=(45)
cfn=(1586)
calls=1 260 
* 290
* 1
fe=(215)
35486 1
fi=(214)
8190 6
cfi=(217)
cfn=(3872)
calls=1 54 
* 167
* 4
cfi=(218)
cfn=(3874)
calls=1 546 
* 198
* 1
fe=(215)
35500 1
fi=(214)
11182 21
fe=(215)
39478 7
fi=(214)
11273 28
cfi=(13)
cfn=(3400)
calls=7 853 
* 2315
* 35
+1 35
+1 35
+1 35
+1 35
+1 35
+1 35
+1 28
+1 14
fe=(215)
39589 7
fi=(214)
11400 7
fe=(215)
39750 7
fi=(214)
11481 7
fe=(215)
39891 7
fi=(214)
11486 2
fe=(215)
39903 2
fi=(214)
11638 7
fe=(215)
40113 7
fi=(214)
11690 7
fe=(215)
40199 7
fi=(214)
11763 7
fe=(215)
40315 7
fi=(214)
12200 7
fe=(215)
40903 7
fi=(214)
12426 4
+1 4
fe=(215)
41192 1
fi=(214)
12466 1
fe=(215)
41258 1
fi=(214)
12470 3
fe=(215)
41264 1
fi=(214)
12522 8
cfi=(217)
cfn=(3872)
calls=1 54 
* 167
* 3
cfi=(45)
cfn=(1586)
calls=1 260 
* 161
* 2
cfi=(218)
cfn=(5028) makeTypeNameFromNameList
calls=1 456 
* 206
* 1
+1 4
+1 4
fe=(215)
41351 1
fi=(214)
12529 1
fe=(215)
41363 1
fi=(214)
12901 42
fe=(215)
41883 14
fi=(214)
12903 11
cfn=(5030) makeTypeCast
calls=1 15538 
* 187
* 1
fe=(215)
41889 1
fi=(214)
12957 45
cfi=(218)
cfn=(4294) makeA_Expr
calls=3 33 
* 575
* 3
fe=(215)
42001 3
fi=(214)
13398 6
fe=(215)
42693 2
fi=(214)
13399 24
fe=(215)
42699 8
fi=(214)
13402 8
cfi=(13)
cfn=(2156)
calls=2 815 
* 306
* 10
+1 10
+1 8
+1 8
+8 4
fe=(215)
42718 2
fi=(214)
13452 6
fe=(215)
42768 2
fi=(214)
13552 24
cfi=(218)
cfn=(4296) makeFuncCall
calls=2 585 
* 458
* 2
+1 10
+1 4
fe=(215)
42909 2
fi=(214)
13617 8
+9 10
+20 10
+1 8
+1 4
fe=(215)
43015 2
fi=(214)
13965 2
fe=(215)
43568 2
fi=(214)
13970 2
fe=(215)
43580 2
fi=(214)
13979 7
fe=(215)
43592 7
fi=(214)
14013 2
fe=(215)
43643 2
fi=(214)
14246 12
cfi=(217)
cfn=(3872)
calls=3 54 
* 501
* 9
cfi=(45)
cfn=(1586)
calls=3 260 
* 870
* 3
fe=(215)
44026 3
fi=(214)
14294 10
cfi=(45)
cfn=(1586)
calls=2 260 
* 580
* 2
fe=(215)
44104 2
fi=(214)
14298 16
cfi=(45)
cfn=(960)
calls=2 129 
* 326
* 2
fe=(215)
44112 2
fi=(214)
14304 12
fe=(215)
44120 4
fi=(214)
14518 16
cfn=(4290) makeColumnRef
calls=2 15487 
* 1314
* 2
fe=(215)
44465 2
fi=(214)
14564 2
fe=(215)
44543 2
fi=(214)
14579 21
fe=(215)
44555 7
fi=(214)
14584 35
cfi=(45)
cfn=(1586)
calls=7 260 
* 2030
* 7
fe=(215)
44567 7
fi=(214)
14614 28
cfi=(13)
cfn=(3400)
calls=7 853 
* 1169
* 35
+1 14
+1 14
+1 28
+1 28
fe=(215)
44609 7
fi=(214)
14656 3500
cfi=(218)
cfn=(5156) makeRangeVar
calls=500 422 
* 108000
* 500
fe=(215)
44645 500
fi=(214)
14700 3
fe=(215)
44710 1
fi=(214)
14715 8
cfi=(217)
cfn=(3872)
calls=2 54 
* 334
* 6
cfi=(45)
cfn=(1586)
calls=2 260 
* 580
* 2
fe=(215)
44728 2
fi=(214)
14729 28
cfn=(4274) makeIntConst
calls=4 15568 
* 740
* 4
fe=(215)
44745 4
fi=(214)
14737 28
cfn=(4288) makeStringConst
calls=4 15548 
* 740
* 4
fe=(215)
44761 4
fi=(214)
14822 12
fe=(215)
44888 4
fi=(214)
14823 1515
fe=(215)
44894 505
fi=(214)
14920 1506
fe=(215)
45012 502
fi=(214)
14927 9
fe=(215)
45030 3
fi=(214)
14944 4
cfi=(13)
cfn=(928)
calls=1 1162 
* 176
* 1
fe=(215)
45078 1
+22 1016
+15 15240
+1 1016
+3 4064
+1 4064
+6 5080
+2 10160
+1 2032
-14 122940
+1 8196
+3 32784
+1 32784
+6 40980
+2 81960
+1 71625
+1 20480
+4 4096
-2 30696
+2 5116
45306 1016
+10 7620
+2 508
+3 5080
-1 8128
cfn=(3886) yydestruct
calls=1016 24971 
* 11176
+2 3048
-4 4572
+7 1524
+7 508
+1 3048

fn=(3886)
24971 7112
+4 2032
+7 2032

fl=(45)
fn=(964) new_tail_cell
109 2364
+3 1182
cfi=(13)
cfn=(940)
calls=591 925 
* 72476
* 591
+1 1182
+2 2364
+1 1773
+1 2955
+1 1182

fn=(3414) list_member_oid
506 14250
+6 8550
cfi=(47) /home/mithuncy/fsm_p11patch/src/backend/nodes/../../../src/include/nodes/pg_list.h
cfn=(976) list_head
calls=2850 78 
* 22802
* 5700
+2 4
-2 5705
+6 2850
+1 5700

fn=(4506) lappend_oid
165 5
+3 2
+1 2
cfn=(962) new_list
calls=1 64 
* 272
* 2
+4 4
+2 1
+1 2

fn=(4508) lcons_oid
296 10
+3 4
+1 2
cfn=(962)
calls=1 64 
* 272
* 2
+2 3
cfn=(1966) new_head_cell
calls=1 90 
* 144
+2 8
+2 2
+1 4

fn=(1586)
260 7775
+3 3110
+1 3102
cfn=(962)
calls=1551 64 
* 421717
* 3102
+2 12
cfn=(1966)
calls=4 90 
* 545
+2 6220
+2 1555
+1 3110

fn=(4512) list_copy
1164 16
+5 8
+3 16
cfn=(962)
calls=4 64 
* 1411
* 4
+1 16
+6 24
+2 12
+1 16
+1 4
+4 8
cfi=(13)
cfn=(940)
calls=4 925 
* 430
* 4
+1 16
+1 12
+2 8
+1 12
-9 16
+12 8
+1 12
+3 4
+1 8

fn=(4514) list_delete_first
667 16
+3 8
+3 12
cfi=(47)
cfn=(976)
calls=4 78 
* 40
* 24
cfn=(4516) list_delete_cell
calls=4 529 
* 587
+1 8

fn=(960)
129 18715
+3 7486
+1 6304
cfn=(962)
calls=3152 -69 
* 842987
* 6304
+2 1773
cfn=(964)
calls=591 -26 
* 86069
+2 14972
+2 3743
+1 7486

fn=(972)
1137 2052
+1 2052
cfn=(974) list_free_private
calls=513 -31 
* 108777
+1 1026

fn=(1988)
1151 4
+5 4
cfn=(974)
calls=1 -49 
* 288
+1 2

fn=(4516)
529 3030
+9 2020
+2 1506
cfn=(972)
calls=502 1137 
* 111444
+1 1004
+7 15
+2 6
+3 12
+2 12
+3 9
cfi=(13)
cfn=(952)
calls=3 1032 
* 255
+1 3
+1 1010

fn=(5512) list_delete_ptr
591 2505
+7 501
+1 1503
cfi=(47)
cfn=(976)
calls=501 78 
* 5010
* 1002
+2 2004
+1 3006
cfn=(4516)
calls=501 -73 
* 119739
* 501
-3 1002
+10 1002

fn=(962)
64 22836
+4 11418
cfi=(13)
cfn=(940)
calls=5709 925 
* 701897
* 5709
+1 11418
+3 11418
cfi=(13)
cfn=(940)
calls=5709 925 
* 688328
* 5709
+1 17127
+1 11418
+1 17127
+1 17127
+2 5709
+1 11418

fn=(5024) list_nth_cell
387 2012
+9 2515
+1 1506
+2 9
+3 1
+1 1006

fn=(5022) list_nth
411 2515
+2 2515
cfn=(5024)
calls=503 -26 
* 7049
* 503
+1 1006

fn=(5208) lappend_int
147 5000
+3 2000
+1 2000
cfn=(962)
calls=1000 -87 
* 272000
* 2000
+4 4000
+2 1000
+1 2000

fn=(1966)
90 20
+3 10
cfi=(13)
cfn=(940)
calls=5 925 
* 584
* 5
+1 20
+2 15
+1 25
+1 10

fn=(5158)
322 2500
+1 1000
+1 1000
+14 1000

fn=(5240) list_member_int
486 2500
+6 1500
cfi=(47)
cfn=(976)
calls=500 78 
* 5000
* 1000
+2 2000
+1 1000
-3 1000
+7 1000

fn=(974)
1107 3084
+5 1542
cfi=(47)
cfn=(976)
calls=514 78 
* 5134
* 514
+1 514
+2 1034
+2 1551
+1 1034
+1 4
cfi=(13)
cfn=(952)
calls=1 -87 
* 72
+1 1551
cfi=(13)
cfn=(952)
calls=517 -88 
* 43945
-7 2062
+10 1028
+1 1533
cfi=(13)
cfn=(952)
calls=511 -92 
* 43435
+1 1028

fl=(120) /home/mithuncy/fsm_p11patch/src/backend/storage/lmgr/../../../../src/include/port/atomics/arch-x86.h
fn=(2180) pg_atomic_compare_exchange_u32_impl
170 263540
+12 105416
-5 474372
+7 105416
+1 105416

fl=(197) /home/mithuncy/fsm_p11patch/src/backend/utils/init/../../../../src/include/nodes/pg_list.h
fn=(3568) list_head
78 3
+1 5
+1 2

fl=(222) /home/mithuncy/fsm_p11patch/src/backend/parser/analyze.c
fn=(3904) parse_analyze
103 4008
+1 1002
cfi=(223)
cfn=(3906) make_parsestate
calls=501 -59 
* 173346
* 501
+5 1503
+2 1002
+3 1503
+2 2505
cfn=(3908) transformTopLevelStmt
calls=501 +76 
* 200400
* 501
+2 1503
+3 1503
cfi=(223)
cfn=(3914) free_parsestate
calls=501 -43 
* 53106
+2 501
+1 1002

fn=(3910) transformOptionalSelectInto
216 2525
+1 2020
+2 8
+3 28
+4 16
+20 2525
cfn=(3912) transformStmt
calls=505 +9 
* 901128
+1 1010

fn=(4392) transformSelectStmt
1209 28
+1 16
cfi=(13)
cfn=(3400)
calls=4 853 
* 1284
* 20
+4 8
+3 16
+8 16
+8 16
+3 16
+3 24
cfi=(244) /home/mithuncy/fsm_p11patch/src/backend/parser/parse_clause.c
cfn=(4394) transformFromClause
calls=4 120 
* 212
+3 28
cfi=(245) /home/mithuncy/fsm_p11patch/src/backend/parser/parse_target.c
cfn=(4398) transformTargetList
calls=4 133 
* 709128
* 8
+4 24
cfi=(245)
cfn=(4416) markTargetListOrigins
calls=4 330 
* 220
+3 28
cfi=(244)
cfn=(4420) transformWhereClause
calls=4 1686 
* 52
* 4
+4 28
cfi=(244)
cfn=(4420)
calls=4 1686 
* 52
* 8
+9 36
cfi=(244)
cfn=(4422) transformSortClause
calls=4 2557 
* 112
* 8
+6 56
cfi=(244)
cfn=(4424) transformGroupClause
calls=4 2455 
* 372
* 8
+8 16
+2 8
+1 12
+22 28
cfi=(244)
cfn=(4428) transformLimitClause
calls=4 1713 
* 52
* 8
+2 28
cfi=(244)
cfn=(4428)
calls=4 1713 
* 52
* 8
+4 32
cfi=(244)
cfn=(4430) transformWindowDefinitions
calls=4 2588 
* 132
* 8
+5 16
+1 24
cfi=(245)
cfn=(4432) resolveTargetListUnknowns
calls=4 300 
* 252
+2 16
+1 24
cfi=(218)
cfn=(4436) makeFromExpr
calls=4 285 
* 704
* 8
+2 16
+1 16
+1 16
+1 16
+1 64
+3 16
cfi=(219)
cfn=(4292)
calls=4 78 
* 32
* 16
+6 20
cfi=(248)
cfn=(4438)
calls=4 102 
* 6639
+2 4
+1 20

fn=(3900) analyze_requires_snapshot
358 3
+3 10
+24 1
+1 1
+3 1
+1 2

fn=(3908)
192 2525
+4 3030
cfn=(3910)
calls=505 +20 
* 909260
* 505
+2 2020
+1 2020
+2 505
+1 1010

fn=(3912)
255 2525
+22 6529
+19 8
+2 16
+2 16
+1 20
cfn=(4392)
calls=4 1209 
* 720131
* 8
+4 4
+31 2004
cfi=(13)
cfn=(3400)
calls=501 853 
* 160821
* 2505
+1 1002
+1 1503
+1 501
+4 1002
+1 1002
+2 501
+1 1002
-4 8
+1 8
+2 4
+1 8

fl=(53)
fn=(1074)
2286 15
+1 6
+1 3
cfn=(1076) CalculateCheckpointSegments
calls=3 -31 
* 78
+1 6

fn=(2024) XLOGShmemSize
4945 6
+9 6
+4 1
cfn=(2026) XLOGChooseNumBuffers
calls=1 -84 
* 20
* 8
cfi=(17)
cfn=(462)
calls=1 203 
* 472
+1 6
cfi=(29)
cfn=(1206)
calls=1 7172 
* 2192
+5 2
+3 6
cfi=(87)
cfn=(2000)
calls=2 493 
* 46
* 10
cfi=(87)
cfn=(2002)
calls=2 476 
* 42
* 2
+2 10
cfi=(87)
cfn=(2000)
calls=2 493 
* 46
* 10
cfi=(87)
cfn=(2002)
calls=2 476 
* 42
* 2
+2 8
cfi=(87)
cfn=(2002)
calls=2 476 
* 42
* 2
+2 10
cfi=(87)
cfn=(2000)
calls=2 493 
* 46
* 10
cfi=(87)
cfn=(2002)
calls=2 476 
* 42
* 2
+8 2
+1 4

fn=(2682)
12243 3
+3 4
cfi=(9)
cfn=(490)
calls=1 0 
* 19
* 2
+1 4
cfi=(9)
cfn=(490)
calls=1 0 
* 19
-1 2
+4 1
+1 2

fn=(5636) XLogBytePosToRecPtr
1961 6
+7 12
+1 12
+2 4
+8 2
+1 2
+2 14
+1 22
+2 18
+3 14
+2 2
+1 4

fn=(5642) GetXLogBuffer
1850 4
+11 6
+12 12
+19 2
+1 7
+2 8
+1 3
+42 1
+7 3
+1 7
+5 4
+1 2

fn=(1076)
2257 8
+17 44
+1 12
-1 8
+4 12
+2 12
+2 8

fn=(2880) InitXLOGAccess
8143 3
+1 2
+3 3
+4 3
+3 1
cfn=(2882) GetRedoRecPtr
calls=1 +15 
* 36
+2 8
+3 1
cfi=(147) /home/mithuncy/fsm_p11patch/src/backend/access/transam/xloginsert.c
cfn=(2886) InitXLogInsert
calls=1 1029 
* 5871
+1 2

fn=(5616) XLogInsertAllowed
7991 4
+6 6
+1 4
+5 1
cfn=(2878) RecoveryInProgress
calls=1 7896 
* 11
* 2
+7 1
+1 1
+1 4

fn=(2882)
8169 3
+8 4
cfi=(146)
cfn=(2884)
calls=1 225 
* 14
* 2
+1 3
+1 2
+2 3
+1 2
+2 1
+1 2

fn=(5640) CopyXLogRecordToWAL
1475 9
+11 2
+1 3
cfn=(5642)
calls=1 1850 
* 59
* 1
+1 11
+9 1
+1 1
+2 6
+1 6
+2 8
+41 14
cob=(3)
cfi=(3)
cfn=(856)
calls=2 0 
* 30
* 2
+1 6
+1 6
+1 4
+1 4
+2 6
-52 6
+61 2
+47 4
+3 3
+2 2

fn=(5624) GetFullPageWriteInfo
8197 4
+1 3
+1 3
+1 2

fn=(1198)
4890 12
+4 8
+6 3
+1 2
+13 4
+3 1
+1 4

fn=(2474)
12232 2
+1 2
cob=(3)
cfi=(3)
cfn=(1972)
calls=1 0 
* 9
* 1
+1 2
cob=(3)
cfi=(3)
cfn=(1972)
calls=1 0 
* 9
* 1
+1 2

fn=(5630) XLogInsertRecord
976 7
+1 2
+3 3
+1 4
+1 7
+4 2
+6 1
cfn=(5616)
calls=1 7991 
* 11
* 3
+35 3
+1 2
+3 1
cfn=(5632) WALInsertLockAcquire
calls=1 1618 
* 168
+18 5
+5 8
+2 3
+1 2
-1 2
+1 2
+16 2
+4 8
cfn=(5634) ReserveXLogInsertLocation
calls=1 1250 
* 238
+2 1
+3 2
+6 3
+1 6
cfi=(71) /home/mithuncy/fsm_p11patch/src/port/pg_crc32c_sse42.c
cfn=(1608) pg_comp_crc32c_sse42
calls=1 23 
* 65
* 1
+1 1
+1 3
+6 9
cfn=(5640)
calls=1 1475 
* 196
+8 4
+2 5
+2 7
+15 1
cfn=(5644) WALInsertLockRelease
calls=1 1692 
* 219
+2 1
cfi=(26)
cfn=(5660) MarkCurrentTransactionIdLoggedIfAny
calls=1 429 
* 10
+2 3
+5 7
+16 2
+78 2
+1 2
+2 1
+1 2

fn=(5632)
1618 3
+16 3
+1 8
+1 2
+6 8
cfi=(99)
cfn=(2170)
calls=1 1122 
* 137
* 1
+1 4
+12 2

fn=(5644)
1692 3
+1 3
+14 6
-1 9
cfi=(99)
cfn=(5646) LWLockReleaseClearVar
calls=1 +93 
* 196
+4 2

fn=(5666) XLogSetAsyncXactLSN
2643 4
+1 2
+3 4
cfi=(146)
cfn=(2884)
calls=1 225 
* 14
* 2
+1 5
+1 3
+1 4
+1 3
+1 2
+7 4
+15 4
+1 4
cfi=(122) /home/mithuncy/fsm_p11patch/src/backend/storage/ipc/latch.c
cfn=(2850) SetLatch
calls=1 437 
* 31
+1 2

fn=(2026)
4874 2
+3 6
+1 7
+2 2
+2 1
+1 2

fn=(2190) XLOGShmemInit
4986 3
+25 1
cfn=(2024)
calls=1 -66 
* 199
* 4
cfi=(87)
cfn=(2168)
calls=1 373 
* 839
-1 1
+3 2
+2 5
cfi=(87)
cfn=(2168)
calls=1 373 
* 980
-1 1
+3 6
+14 5
cob=(3)
cfi=(3)
cfn=(828)
calls=1 0 
* 72
* 1
+6 2
+2 6
cob=(3)
cfi=(3)
cfn=(856)
calls=1 0 
* 81
* 1
+1 3
cfi=(13)
cfn=(952)
calls=1 1032 
* 85
+8 3
+1 3
+1 8
cob=(3)
cfi=(3)
cfn=(828)
calls=1 0 
* 464
* 1
+1 4
+5 3
-1 3
+2 5
+2 1
+2 3
cfi=(99)
cfn=(2158)
calls=1 603 
* 17
+1 2
+2 64
cfi=(99)
cfn=(2144)
calls=8 678 
* 512
+1 48
+1 48
-4 26
+12 4
+1 3
+1 9
cob=(3)
cfi=(3)
cfn=(828)
calls=1 0 
* 458768
* 1
+6 4
+1 2
+1 2
+1 2
+2 2
+1 2
+1 2
+1 4
cfi=(122)
cfn=(2192) InitSharedLatch
calls=1 261 
* 11
+1 2

fn=(2878)
7896 36414
+6 48552
+1 24274
+7 2
+2 3
+8 4
+7 1
+1 1
cfn=(2880)
calls=1 8143 
* 5930
+9 1
+2 24276

fn=(5638) XLogBytePosToEndRecPtr
2001 3
+7 6
+1 6
+2 2
+11 1
+1 1
+2 7
+1 11
+2 2
+3 9
+3 7
+2 1
+1 2

fn=(1204)
10087 6
+1 3
+21 4

fn=(1588)
4934 5
+2 2
cfi=(13)
cfn=(940)
calls=1 925 
* 123
* 1
+1 1
cfn=(1590) ReadControlFile
calls=1 4552 
* 4857
+1 2

fn=(5634)
1250 7
+1 2
+5 4
+15 3
cfi=(146)
cfn=(2884)
calls=1 225 
* 14
* 2
+2 3
+1 5
+1 3
+1 3
+1 3
+2 2
+2 3
cfn=(5636)
calls=1 1961 
* 56
* 2
+1 3
cfn=(5638)
calls=1 2001 
* 58
* 2
+1 3
cfn=(5636)
calls=1 1961 
* 56
* 2
+9 2

fn=(1610) DataChecksumsEnabled
4834 5696
+2 11392
+1 5696

fn=(1590)
4552 5
+9 3
cfi=(25)
cfn=(1592)
calls=1 921 
* 45
* 1
+2 2
+6 2
cfi=(68)
cfn=(1596)
calls=1 1239 
* 14
+1 6
cob=(5)
cfi=(5)
cfn=(684)
calls=1 0 
* 7
* 1
* 1
+1 2
+13 1
cfi=(68)
cfn=(1598)
calls=1 1263 
* 13
+2 3
cob=(5)
cfi=(5)
cfn=(692)
calls=1 0 
* 7
* 1
+9 4
+9 4
+9 1
+1 6
cfi=(69) /home/mithuncy/fsm_p11patch/src/port/pg_crc32c_sse42_choose.c
cfn=(1600) pg_comp_crc32c_choose
calls=1 55 
* 612
* 1
+3 1
+2 4
+9 4
+7 4
+7 6
+5 4
+7 4
+7 4
+7 4
+7 4
+7 4
+7 4
+9 5
+16 5
+15 3
+2 15
+7 7
cfi=(17)
cfn=(462)
calls=1 203 
* 562
+1 5
cfi=(29)
cfn=(1206)
calls=1 7172 
* 1621
+4 12
+4 12
+5 5
-1 4
+4 1
cfn=(1076)
calls=1 2257 
* 26
+3 1
cfn=(1610)
calls=1 +76 
* 8
* 8
cfi=(29)
cfn=(1206)
calls=1 7172 
* 1763
+2 5

fl=(69)
fn=(1600)
55 6
+1 1
cfn=(1602) pg_crc32c_sse42_available
calls=1 -21 
* 76
* 2
+1 2
+4 6
cfi=(71)
cfn=(1608)
calls=1 -38 
* 517
+1 2

fn=(1602)
35 3
+1 4
+3 11
cfi=(70) /usr/lib/gcc/x86_64-redhat-linux/4.8.5/include/cpuid.h
cfn=(1604) __get_cpuid
calls=1 264 
* 52
+7 4
+1 2

fl=(169) /home/mithuncy/fsm_p11patch/src/backend/access/heap/heapam.c
fn=(3150) initscan
221 266
+15 152
+3 190
cfi=(50)
cfn=(3152) RelationGetNumberOfBlocksInFork
calls=38 2795 
* 33510
* 76
+14 228
+1 266
-1 76
+7 114
+2 76
+8 152
+2 76
+3 152
+5 76
+9 76
+7 76
+1 76
+3 76
+1 76
+1 76
+1 228
+1 76
+1 76
+7 76
+1 532
cob=(3)
cfi=(3)
cfn=(856)
calls=38 0 
* 1413
* 38
+7 380
+1 418
+1 76

fn=(3500) heap_hot_search_buffer
2053 29029
+1 23751
+1 2639
+7 5278
+1 7917
+5 7917
+1 5278
+1 18473
+2 15834
+8 39645
+3 23787
+3 13215
+3 28
+3 16
+1 4
+1 4
+88 4
-82 21112
+1 15834
+1 10556
+1 7917
+5 18453
+7 5278
+12 10556
+9 7917
cfi=(50)
cfn=(3476) BufferGetBlockNumber
calls=2639 2612 
* 42224
* 18473
cfi=(50)
cfn=(3476)
calls=2639 2612 
* 42224
* 15834
+3 18473
cfi=(195) /home/mithuncy/fsm_p11patch/src/backend/utils/time/tqual.c
cfn=(3502) HeapTupleSatisfiesMVCC
calls=2639 965 
* 187681
* 2639
+1 21112
cfi=(92) /home/mithuncy/fsm_p11patch/src/backend/storage/lmgr/predicate.c
cfn=(3236) CheckForSerializableConflictOut
calls=2639 3902 
* 102921
+3 15834
+2 5278
+2 7917
+1 15834
cfi=(92)
cfn=(3506) PredicateLockTuple
calls=2639 2498 
* 76531
+1 5278
+1 5278
+1 5278
+34 5278

fn=(5350) heap_prepare_insert
2643 787500
+9 262500
+5 612500
+1 612500
+1 612500
+1 350000
+1 350000
+3 962500
+1 262500
+1 350000
+6 437500
+7 962500
+3 87500
+1 350000

fn=(3022) heap_open
1307 17286
+3 14405
cfn=(3025) relation_open'2
calls=1206 1125 
* 3149666
cfn=(3024) relation_open
calls=1675 1125 
* 7394856
* 2881
+2 14405
+1 8643
-1 5762
+6 14405
+6 2881
+1 11524

fn=(3023) heap_open'2
1307 468
+3 390
cfn=(3025)
calls=78 1125 
* 159053
* 78
+2 390
+1 234
-1 156
+6 390
+6 78
+1 312

fn=(3080) relation_close
1283 17295
+1 10377
+5 10377
cfi=(148) /home/mithuncy/fsm_p11patch/src/backend/utils/cache/relcache.c
cfn=(3082) RelationClose
calls=3459 2003 
* 338982
+2 6918
+1 14795
cfi=(160) /home/mithuncy/fsm_p11patch/src/backend/storage/lmgr/lmgr.c
cfn=(3090) UnlockRelationId
calls=2959 182 
* 7064982
+1 6918

fn=(3256) heap_endscan
1585 152
+6 152
+1 144
cfi=(50)
cfn=(3258) ReleaseBuffer
calls=36 3316 
* 8676
+5 152
cfi=(148)
cfn=(3084) RelationDecrementReferenceCount
calls=38 1983 
* 3382
+2 152
+1 152
cfi=(13)
cfn=(952)
calls=38 1032 
* 3230
+2 152
+3 152
+3 114
cfi=(13)
cfn=(952)
calls=38 1032 
* 3230
+1 76

fn=(3192) heapgetpage
352 1455
+13 1164
+2 1012
cfi=(50)
cfn=(3258)
calls=253 3316 
* 60973
+1 506
+8 873
+3 2910
cfi=(50)
cfn=(3194) ReadBufferExtended
calls=291 642 
* 311848
* 582
+2 873
+2 1455
+3 873
+1 873
+5 1746
cfi=(176) /home/mithuncy/fsm_p11patch/src/backend/access/heap/pruneheap.c
cfn=(3224) heap_page_prune_opt
calls=291 75 
* 24444
+7 1164
cfi=(50)
cfn=(3232) LockBuffer
calls=291 3553 
* 47142
+2 2619
+1 2037
cfi=(177) /home/mithuncy/fsm_p11patch/src/backend/access/heap/../../../../src/include/storage/bufmgr.h
cfn=(3234) TestForOldSnapshot
calls=291 266 
* 3201
+1 3201
+1 291
+22 4365
+2 3201
+4 79080
+5 58360
+1 102130
+1 72950
+1 102130
+2 29180
+1 29180
+4 131310
cfi=(92)
cfn=(3236)
calls=14590 3902 
* 569010
+3 29180
+1 116720
-21 58360
-1 14590
-1 29180
+2 4904
-1 1226
-1 2452
+1 291
-1 582
+27 1164
cfi=(50)
cfn=(3232)
calls=291 3553 
* 32883
+3 873
+1 582

fn=(5170) heap_openrv
1336 3000
+3 2500
cfn=(5172) relation_openrv
calls=500 1215 
* 65231981
* 500
+2 2500
+1 1500
-1 1000
+6 2500
+6 500
+1 2000

fn=(3142) heap_beginscan_strat
1437 418
+1 570
cfn=(3144) heap_beginscan_internal
calls=38 +33 
* 54503
+3 76

fn=(3188) heap_getnext
1848 420
+5 336
+1 672
cfn=(3190) heapgettup_pagemode
calls=84 793 
* 5837790
* 84
+5 336
+3 4
+9 902
+2 164
+1 168

fn=(5330) heap_multi_insert
2699 5000
+1 500
cfi=(26)
cfn=(5332) GetCurrentTransactionId
calls=500 401 
* 9080
* 500
+8 3000
+1 3000
+5 6000
+1 11500
+4 2500
cfi=(13)
cfn=(940)
calls=500 925 
* 61500
* 500
+1 1000
+1 1575000
cfn=(5350)
calls=87500 -78 
* 7000000
* 87500
-1 351500
+27 2500
cfi=(92)
cfn=(5352) CheckForSerializableConflictIn
calls=500 4282 
* 16000
+2 500
+1 500
+3 2000
+1 2000
+3 6000
+6 38000
cfi=(309) /home/mithuncy/fsm_p11patch/src/backend/access/heap/hio.c
cfn=(5356) RelationGetBufferForTuple
calls=2000 323 
* 28565610
* 2000
+3 18000
+3 6000
+6 22000
cfi=(309)
cfn=(5400) RelationPutHeapTuple
calls=2000 40 
* 560000
+1 4000
+2 783000
+2 261000
cfi=(312) /home/mithuncy/fsm_p11patch/src/backend/storage/page/bufpage.c
cfn=(5394) PageGetHeapFreeSpace
calls=87000 663 
* 4089000
* 870000
+1 1500
+2 513000
cfi=(309)
cfn=(5400)
calls=85500 40 
* 33337500
+6 171000
-13 523000
+17 12000
+2 500
+1 3000
+1 2000
cfi=(50)
cfn=(3476)
calls=500 2612 
* 8000
* 3000
cfi=(311) /home/mithuncy/fsm_p11patch/src/backend/access/heap/visibilitymap.c
cfn=(5404) visibilitymap_clear
calls=500 170 
* 240500
+9 6000
cfi=(50)
cfn=(5406) MarkBufferDirty
calls=2000 1457 
* 201000
+3 4000
2915 6000
+2 6000
cfi=(50)
cfn=(3586) UnlockReleaseBuffer
calls=2000 3339 
* 555500
+1 6000
+1 1500
cfi=(50)
cfn=(3258)
calls=500 3316 
* 134500
+2 4000
2750 7500
2938 2500
cfi=(92)
cfn=(5352)
calls=500 4282 
* 16000
+8 1500
cfi=(170) /home/mithuncy/fsm_p11patch/src/backend/catalog/catalog.c
cfn=(3226) IsCatalogRelation
calls=500 97 
* 34000
* 1000
+11 1000
+1 1400000
-1 351500
+3 3000
cfi=(38)
cfn=(5478) pgstat_count_heap_insert
calls=500 1912 
* 140133
+1 2000

fn=(3144)
1471 760
+10 114
cfi=(148)
cfn=(3064) RelationIncrementReferenceCount
calls=38 1970 
* 3344
+5 76
cfi=(13)
cfn=(940)
calls=38 925 
* 3527
* 38
+2 114
+1 114
+1 114
+1 114
+1 114
+1 76
+1 114
+1 114
+1 114
+1 114
+5 418
+13 152
+1 190
cfi=(92)
cfn=(3146) PredicateLockRelation
calls=38 2453 
* 1026
+3 152
+6 76
+1 304
cfi=(13)
cfn=(940)
calls=38 925 
* 3589
* 114
+4 228
cfn=(3150)
calls=38 221 
* 39179
+2 38
+1 76

fn=(3024)
1125 19105
+6 7642
+1 16605
cfi=(160)
cfn=(3026) LockRelationOid
calls=3321 106 
* 7518304
+3 11463
cfi=(148)
cfn=(3054) RelationIdGetRelation
calls=3821 1904 
* 45521082
* 3821
+2 7642
+12 19105
+3 11463
cfi=(38)
cfn=(3074) pgstat_initstats
calls=3821 1715 
* 486499
+2 3821
+1 7642

fn=(3025)
1125 12800
+6 5120
+1 12800
cfi=(160)
cfn=(3026)
calls=2560 106 
* 5705435
+3 7680
cfi=(148)
cfn=(3055) RelationIdGetRelation'2
calls=2560 1904 
* 853970
* 2560
+2 5120
+12 12800
+3 7680
cfi=(38)
cfn=(3074)
calls=2560 1715 
* 88173
+2 2560
+1 5120

fn=(5172)
1215 2500
+14 1000
+1 500
cfi=(155) /home/mithuncy/fsm_p11patch/src/backend/utils/cache/inval.c
cfn=(2976) AcceptInvalidationMessages
calls=500 680 
* 33500
+3 3500
cfi=(55)
cfn=(5174) RangeVarGetRelidExtended
calls=500 230 
* 28506035
* 500
+3 2000
cfn=(3024)
calls=500 1125 
* 36681446
+1 1000

fn=(5286) GetBulkInsertState
2377 1500
+3 1000
cfi=(13)
cfn=(940)
calls=500 925 
* 61500
* 500
+1 1000
cfi=(89) /home/mithuncy/fsm_p11patch/src/backend/storage/buffer/freelist.c
cfn=(5288) GetAccessStrategy
calls=500 543 
* 662601
* 1000
+1 1000
+1 500
+1 1000

fn=(5484) FreeBulkInsertState
2391 2000
+1 2000
+1 2000
cfi=(50)
cfn=(3258)
calls=500 3316 
* 120500
+1 2000
cfi=(89)
cfn=(5486) FreeAccessStrategy
calls=500 598 
* 109468
+1 1500
cfi=(13)
cfn=(952)
calls=500 1032 
* 42500
+1 1000

fn=(3190)
793 588
+1 252
+1 252
+13 168
+2 420
+5 304
+6 152
+15 114
+1 190
cfn=(3192)
calls=38 352 
* 201698
+1 38
+1 114
+5 138
+1 184
+3 1008
+1 672
cfi=(177)
cfn=(3234)
calls=84 266 
* 924
+1 252
+3 504
+95 337
+2 82314
+1 123471
+3 109752
+1 82314
+1 164628
+5 27438
+4 543527
cfi=(178)
cfn=(3238)
calls=1 428 
* 335
* 397297
cfi=(178)
cfn=(3238)
calls=12816 428 
* 1232201
* 192229
cfi=(171) /home/mithuncy/fsm_p11patch/src/backend/utils/fmgr/fmgr.c
cfn=(3240) FunctionCall2Coll
calls=13801 1134 
* 662825
* 138256
+2 27438
+2 246
+1 82
+12 13637
+1 27274
+3 13637
-38 27948
+45 510
+8 1020
+7 255
+1 1020
+1 2
+1 1020
+1 506
-1 1269
+15 1012
-15 4
+15 8
+7 510
+2 8
+1 8
cfi=(50)
cfn=(3258)
calls=2 3316 
* 482
+1 4
+1 4
+1 4
+1 4
+1 2
+3 1265
cfn=(3192)
calls=253 352 
* 1743427
+2 3036
+1 2024
cfi=(177)
cfn=(3234)
calls=253 266 
* 2783
+1 759
+1 506
+1 506
+3 253
+1 253
+1 168

fl=(117) /home/mithuncy/fsm_p11patch/src/backend/storage/lmgr/../../../../src/include/port/atomics.h
fn=(2146) pg_atomic_init_u32
227 1170
+3 1170
cfi=(118)
cfn=(2148)
calls=234 -68 
* 4914
+1 468
-4 166230
+3 166230
cfi=(118)
cfn=(2148)
calls=33246 -68 
* 698166
+1 66492

fn=(5650) pg_atomic_fetch_or_u32
376 5
+2 5
cfi=(121)
cfn=(5652) pg_atomic_fetch_or_u32_impl
calls=1 212 
* 16
+1 2

fn=(2174) pg_atomic_read_u32
245 210832
+2 158124
cfi=(118)
cfn=(2176)
calls=52708 47 
* 368956
+1 105416

fn=(2178) pg_atomic_compare_exchange_u32
316 316248
+4 316248
cfi=(120)
cfn=(2180)
calls=52708 170 
* 1054160
+1 105416

fn=(2184) pg_atomic_sub_fetch_u32
405 263540
+3 263540
cfi=(118)
cfn=(2186)
calls=52708 241 
* 1317700
+1 105416

fn=(5656) pg_atomic_fetch_and_u32
362 5
+2 5
cfi=(121)
cfn=(5658) pg_atomic_fetch_and_u32_impl
calls=1 203 
* 16
+1 2

fl=(121)
fn=(5658)
203 4
+1 10
+1 2

fn=(2188)
194 210832
+1 263540
+1 105416

fn=(5652)
212 4
+1 10
+1 2

fl=(175) /home/mithuncy/fsm_p11patch/src/backend/storage/buffer/../../../../src/include/port/atomics/arch-x86.h
fn=(5420) pg_atomic_fetch_add_u32_impl
190 6000
+2 7500
+6 1500
+1 3000

fn=(3220) pg_atomic_compare_exchange_u32_impl
170 127620
+12 51048
-5 229716
+7 51048
+1 51048

fl=(187) /home/mithuncy/fsm_p11patch/src/backend/access/index/amapi.c
fn=(3394) GetIndexAmRoutine
34 316
+4 316
cfi=(171)
cfn=(3396) OidFunctionCall0Coll
calls=79 1386 
* 37051
* 79
+1 158
+2 474
+4 79
+1 158

fl=(126) /home/mithuncy/fsm_p11patch/src/backend/storage/ipc/shmqueue.c
fn=(2234) SHMQueueNext
146 2920
+1 1752
+4 1752
+1 160
+2 2520
+1 1168

fn=(2842) SHMQueueElemInit
58 6
+2 12
+1 4

fn=(2230) SHMQueueInsertBefore
90 82004
+1 61503
+5 82004
+1 82004
+1 61503
+1 61503
+1 41002

fn=(2228) SHMQueueInit
37 46944
+2 109536
+1 31296

fn=(2236) SHMQueueDelete
69 41343
+1 41343
+1 41343
+6 55124
+1 55124
+2 82686
+1 27562

fn=(5756) SHMQueueIsDetached
48 3
+2 4
+1 2

fl=(15)
fn=(448)
130 12
+5 8
cob=(3)
cfi=(3)
cfn=(454)
calls=1 0 
* 34
cob=(1)
cfi=(1)
cfn=(223)
calls=1 0 
* 1294
* 6
* 4
+10 6
cfi=(11)
cfn=(456)
calls=2 -41 
* 54
* 4
+2 8
+3 12
cfi=(11)
cfn=(458)
calls=2 +70 
* 4156
+1 6
cfi=(11)
cfn=(484)
calls=2 255 
* 2110
+2 6
cfn=(488) validate_exec
calls=2 -84 
* 2684
* 4
+1 6
cfn=(504) resolve_symlinks
calls=2 +79 
* 6975
* 2
+63 8

fn=(488)
69 8
+24 10
cfi=(9)
cfn=(490)
calls=2 -93 
* 1318
* 4
+3 8
+8 8
cob=(3)
cfi=(3)
cfn=(502) access
calls=1 0 
* 5
cob=(1)
cfi=(1)
cfn=(223)
calls=1 0 
* 1265
* 6
* 8
+1 8
cob=(3)
cfi=(3)
cfn=(502)
calls=2 0 
* 10
* 2
* 8
+5 12
+1 4

fn=(504)
233 10
+19 8
cob=(3)
cfi=(3)
cfn=(454)
calls=2 0 
* 68
* 2
* 4
+12 6
cfi=(11)
cfn=(378)
calls=2 139 
* 822
* 2
+1 4
+2 4
+1 6
cob=(3)
cfi=(3)
cfn=(510) chdir
calls=1 0 
* 5
cob=(1)
cfi=(1)
cfn=(223)
calls=1 0 
* 1258
* 6
* 4
+6 8
+5 10
cfi=(9)
cfn=(512)
calls=2 0 
* 1325
* 4
+1 4
-1 4
+17 12
cfi=(16)
cfn=(460)
calls=2 46 
* 300
+2 8
cob=(3)
cfi=(3)
cfn=(454)
calls=2 0 
* 68
* 2
* 4
+6 12
cfi=(11)
cfn=(458)
calls=2 -84 
* 857
+1 6
cfi=(11)
cfn=(484)
calls=2 -50 
* 2110
+2 6
cob=(3)
cfi=(3)
cfn=(510)
calls=2 0 
* 10
* 2
* 4
+8 2
+1 8

fn=(438) set_pglocale_pgservice
566 5
+8 4
cob=(1)
cfi=(1)
cfn=(223)
calls=1 0 
* 1325
* 5
* 2
+15 5
cfn=(448)
calls=1 130 
* 13006
* 2
+19 2
cob=(1)
cfi=(1)
cfn=(223)
calls=1 0 
* 1709
* 5
* 2
+2 5
cfi=(11)
cfn=(524)
calls=1 714 
* 4548
+3 8
cfi=(17)
cfn=(462)
calls=1 203 
* 1676
+1 4
cfi=(11)
cfn=(484)
calls=1 255 
* 1097
+1 3
cob=(3)
cfi=(3)
cfn=(384)
calls=1 0 
* 301
* 1
* 1
+1 2
+1 3
cob=(1)
cfi=(1)
cfn=(223)
calls=1 0 
* 4409
* 5
+2 2

fl=(85) /home/mithuncy/fsm_p11patch/src/backend/storage/lmgr/spin.c
fn=(1996) SpinlockSemas
51 4
+1 2
+1 4

fn=(2004) SpinlockSemaSize
40 2
+1 1
cfn=(1996)
calls=1 +10 
* 5
* 2
+1 2

fl=(99)
fn=(2154) RegisterLWLockTranches
492 3
+3 3
+2 1
+2 7
cfi=(13)
cfn=(2156)
calls=1 815 
* 1040
-1 1
+6 2
+1 322
cfn=(2158)
calls=46 +98 
* 782
-1 140
+3 3
cfn=(2158)
calls=1 +96 
* 17
+1 3
cfn=(2158)
calls=1 +95 
* 17
+1 3
cfn=(2158)
calls=1 +94 
* 17
+2 3
cfn=(2158)
calls=1 +92 
* 17
+2 3
cfn=(2158)
calls=1 +90 
* 17
+2 3
cfn=(2158)
calls=1 +88 
* 17
+2 3
cfn=(2158)
calls=1 +86 
* 17
+2 3
cfn=(2158)
calls=1 +84 
* 17
+2 3
cfn=(2158)
calls=1 +82 
* 17
+1 3
cfn=(2158)
calls=1 +81 
* 17
+1 3
cfn=(2158)
calls=1 +80 
* 17
+3 5
+3 2

fn=(2182)
1726 210832
+10 158124
+1 368970
+1 52708
-2 158130
+4 105416
+3 316248
+2 158124
+1 52708
+1 26
-1 158132
+9 105416
+1 151930
cfi=(117)
cfn=(2184)
calls=30386 405 
* 1124282
* 60772
+2 111610
cfi=(117)
cfn=(2184)
calls=22322 405 
* 825914
* 22322
+10 210832
+5 52708
+6 105416
+12 158124
+1 105416

fn=(5648) LWLockWaitListLock
811 4
+12 5
cfi=(117)
cfn=(5650)
calls=1 376 
* 28
* 1
+1 4
+1 1
+28 2

fn=(2140) CreateLWLocks
382 3
+8 4
+2 1
cfn=(2044) LWLockShmemSize
calls=1 -42 
* 127
* 1
+5 3
cfi=(87)
cfn=(2134) ShmemAlloc
calls=1 158 
* 67
* 1
+3 1
+3 6
+2 2
+6 3
+1 2
+3 1
cfn=(2142) InitializeLWLocks
calls=1 +12 
* 14926
+4 1
cfn=(2154)
calls=1 +73 
* 2528
+1 2

fn=(2144)
678 166230
+1 166230
cfi=(117)
cfn=(2146)
calls=33246 227 
* 1097118
+4 132984
+1 132984
cfi=(119)
cfn=(2152)
calls=33246 30 
* 365706
+1 66492

fn=(2860) InitLWLockAccess
536 2
+4 2

fn=(5646)
1799 6
+1 3
cfn=(5648)
calls=1 811 
* 45
+7 3
+1 3
cfn=(5654) LWLockWaitListUnlock
calls=1 863 
* 40
+2 3
cfn=(2182)
calls=1 -84 
* 91
+1 2

fn=(2046) NumLWLocksByNamedTranches
335 6
+1 3
+3 15
+3 3
+1 6

fn=(2142)
427 3
+1 1
cfn=(2046)
calls=1 -93 
* 11
* 1
+7 4
+1 230
cfn=(2144)
calls=46 678 
* 2944
-1 186
+4 3
+1 2
+1 512
cfn=(2144)
calls=128 678 
* 8192
-1 514
+4 3
+1 2
+1 64
cfn=(2144)
calls=16 678 
* 1024
-1 66
+5 1
-1 2
+2 2
+1 64
cfn=(2144)
calls=16 678 
* 1024
-1 66
+4 3
+30 2

fn=(5674)
1294 10
+8 6
+8 6
+3 10
cfn=(2172) LWLockAttemptLock
calls=2 740 
* 176
* 2
+2 4
+11 12
+1 16
+3 12
+1 4

fn=(2158)
603 350
+3 210
+15 490
+1 140

fn=(2170)
1122 263530
+1 105412
+1 52706
+1 52706
+27 158118
+8 158118
+26 263530
cfn=(2172)
calls=52706 740 
* 4615806
* 52706
+2 210824
+3 52706
+82 316236
+1 421648
+5 316236
+3 52706
+1 105412

fn=(2172)
740 263540
+9 210832
cfi=(117)
cfn=(2174)
calls=52708 245 
* 843328
* 52708
+8 105416
+2 105416
+2 151930
+1 60772
+1 60772
+4 111610
+1 44644
+1 22322
+13 156254
cfi=(117)
cfn=(2178)
calls=22322 316 
* 758948
* 212702
cfi=(117)
cfn=(2178)
calls=30386 316 
* 1033124
* 105416
+3 105416
+7 105416
+7 105416

fn=(2044)
350 6
+3 2
+2 2
cfn=(2046)
calls=2 -20 
* 22
* 2
+3 10
cfi=(87)
cfn=(2000)
calls=2 493 
* 46
* 2
+3 8
cfi=(87)
cfn=(2002)
calls=2 476 
* 42
* 2
+3 10
cfi=(87)
cfn=(2000)
calls=2 493 
* 28
* 10
cfi=(87)
cfn=(2002)
calls=2 476 
* 42
* 2
+3 10
+4 2
+2 2
+1 4

fn=(5758) LWLockReleaseAll
1825 2
+1 4
+6 2

fn=(5654)
863 4
+3 5
cfi=(117)
cfn=(5656)
calls=1 362 
* 28
* 1
+3 2

fl=(108) /home/mithuncy/fsm_p11patch/src/backend/replication/walsender.c
fn=(2068) WalSndShmemSize
3028 9
+1 3
+2 3
+1 15
cfi=(87)
cfn=(2000)
calls=3 493 
* 69
* 15
cfi=(87)
cfn=(2002)
calls=3 476 
* 63
* 3
+2 3
+1 6

fn=(2282) WalSndShmemInit
3040 3
+5 1
cfn=(2068)
calls=1 -17 
* 63
* 4
cfi=(87)
cfn=(2168)
calls=1 373 
* 1012
-1 1
+3 4
+3 4
cfn=(2068)
calls=1 -22 
* 63
* 19
cob=(3)
cfi=(3)
cfn=(828)
calls=1 0 
* 135
* 1
+2 2
+1 21
cfi=(126)
cfn=(2228)
calls=3 37 
* 36
-1 11
+3 2
+2 120
+2 20
-4 43
+7 2

fl=(300) /home/mithuncy/fsm_p11patch/src/backend/executor/execMain.c
fn=(5258) CheckValidResultRel
1081 3500
+1 1500
+1 1500
+3 5000
+4 2500
cfi=(305) /home/mithuncy/fsm_p11patch/src/backend/executor/execReplication.c
cfn=(5260) CheckCmdReplicaIdentity
calls=500 569 
* 8500
+1 500
1207 2500

fn=(5210) ExecCheckRTPerms
571 3500
+2 500
+2 1500
cfi=(242) /home/mithuncy/fsm_p11patch/src/backend/executor/../../../src/include/nodes/pg_list.h
cfn=(4372) list_head
calls=500 78 
* 5000
* 1000
+2 1500
+2 1500
cfn=(5212) ExecCheckRTEPerms
calls=500 +23 
* 12763284
* 500
+1 2000
-5 3500
+15 1500
+3 500
+1 2000

fn=(5212)
602 2000
+12 2000
+6 1500
+1 1000
+3 1500
+10 2500
cfi=(54)
cfn=(3326) GetUserId
calls=500 381 
* 2500
* 500
+7 3000
cfi=(227) /home/mithuncy/fsm_p11patch/src/backend/catalog/aclchk.c
cfn=(5214) pg_class_aclmask
calls=500 3833 
* 12741784
* 500
+1 2000
+1 1000
+69 500
+1 1000

fn=(5252) InitResultRelInfo
1286 4000
+1 500
+2 97500
+1 1000
+1 1500
+1 1500
+1 1000
+1 1000
+1 1000
+2 2000
cfi=(165) /home/mithuncy/fsm_p11patch/src/backend/commands/trigger.c
cfn=(5254) CopyTriggerDesc
calls=500 2141 
* 6500
* 1000
+1 2000
+13 1000
+1 1000
+1 1000
+2 2500
+3 1000
+3 1000
+1 1000
+1 1000
+1 1000
+1 1000
+1 1000
+1 1000
+15 1500
cfi=(304) /home/mithuncy/fsm_p11patch/src/backend/utils/cache/partcache.c
cfn=(5256) RelationGetPartitionQual
calls=500 378 
* 7000
* 500
+2 1500
+1 1500
+1 1000
+1 1000

fn=(5504) ExecCleanUpTriggerState
1454 2000
+3 2000
cfi=(242)
cfn=(4372)
calls=500 78 
* 4000
* 2000
+19 1000

fl=(306) /home/mithuncy/fsm_p11patch/src/backend/executor/execIndexing.c
fn=(5502) ExecCloseIndices
225 2000
+5 1500
+1 1500
+2 2500
+13 1000

fn=(5262) ExecOpenIndices
150 3000
+1 1500
+8 1000
+3 3000
+1 500
+52 1000

fl=(84) /home/mithuncy/fsm_p11patch/src/backend/storage/lmgr/proc.c
fn=(1994) ProcGlobalSemas
129 2
+5 2
+1 2

fn=(2868) InitProcessPhase2
465 2
+6 3
cfi=(100) /home/mithuncy/fsm_p11patch/src/backend/storage/ipc/procarray.c
cfn=(2870) ProcArrayAdd
calls=1 277 
* 331
+5 3
cfi=(67)
cfn=(2110)
calls=1 362 
* 32
+1 2

fn=(3656) LockErrorCleanup
696 9
+4 9
+2 3
cfi=(91) /home/mithuncy/fsm_p11patch/src/backend/storage/lmgr/lock.c
cfn=(3658) AbortStrongLockAcquire
calls=3 1667 
* 30
+3 9
+2 12
+44 6

fn=(2830) InitProcess
296 4
+7 3
+3 3
+4 1
cfi=(105)
cfn=(2832) IsAutoVacuumLauncherProcess
calls=1 3272 
* 5
* 3
cfi=(105)
cfn=(2834) IsAutoVacuumWorkerProcess
calls=1 3278 
* 5
* 2
+2 3
+3 3
+9 3
cfi=(142) /home/mithuncy/fsm_p11patch/src/backend/storage/lmgr/../../../../src/include/storage/s_lock.h
cfn=(2836) tas
calls=1 -99 
* 14
* 2
+2 4
cfi=(143) /home/mithuncy/fsm_p11patch/src/backend/storage/lmgr/s_lock.c
cfn=(2838) set_spins_per_delay
calls=1 197 
* 7
+2 3
+2 3
+2 4
+1 2
+15 11
+14 5
cfi=(105)
cfn=(2832)
calls=1 3272 
* 5
* 3
+1 1
cfi=(102)
cfn=(2840) MarkPostmasterChildActive
calls=1 257 
* 12
+6 3
cfi=(126)
cfn=(2842)
calls=1 58 
* 11
+1 2
+1 2
+1 2
+1 2
+1 2
+1 2
+1 3
+2 2
+1 2
+1 2
+1 2
+1 3
+1 2
+1 2
+2 1
cfi=(105)
cfn=(2834)
calls=1 3278 
* 5
* 2
+2 2
+1 2
+1 2
+1 2
+10 2
+3 2
+1 2
+1 4
cfi=(126)
cfn=(2842)
calls=1 58 
* 11
+3 2
+1 2
+8 2
+3 2
+1 2
+1 2
+1 2
+1 2
+8 4
cfi=(122)
cfn=(2844) OwnLatch
calls=1 297 
* 13
+1 1
cfi=(54)
cfn=(2846) SwitchToSharedLatch
calls=1 -91 
* 144
+7 4
cfi=(86) /home/mithuncy/fsm_p11patch/src/backend/port/pg_sema.c
cfn=(2852) PGSemaphoreReset
calls=1 285 
* 893
+5 3
cfi=(67)
cfn=(2110)
calls=1 -84 
* 32
+6 1
cfi=(99)
cfn=(2860)
calls=1 +84 
* 4
+1 1
cfi=(144) /home/mithuncy/fsm_p11patch/src/backend/storage/lmgr/deadlock.c
cfn=(2862) InitDeadLockChecking
calls=1 144 
* 1785
+1 4

fn=(3038) ProcQueueInit
1023 27560
+1 20670
cfi=(126)
cfn=(2228)
calls=6890 37 
* 82680
+1 13780
+1 13780

fn=(5752) ProcKill
800 6
+7 1
cfi=(56)
cfn=(5754) SyncRepCleanupAtProcExit
calls=1 364 
* 20
+17 1
cfi=(99)
cfn=(5758)
calls=1 1825 
* 8
+3 1
cfi=(128)
cfn=(5760) ConditionVariableCancelSleep
calls=1 199 
* 10
+3 3
+4 1
cfi=(106)
cfn=(5762)
calls=1 480 
* 435
+8 4
+33 1
cfi=(54)
cfn=(5764) SwitchBackToLocalLatch
calls=1 362 
* 142
+1 2
+1 1
+1 4
cfi=(122)
cfn=(5766) DisownLatch
calls=1 317 
* 7
+2 3
+1 3
cfi=(142)
cfn=(2836)
calls=1 225 
* 14
* 2
+7 4
+6 4
+1 3
+4 5
cfi=(143)
cfn=(5768) update_spins_per_delay
calls=1 208 
* 16
* 1
+2 2
+7 4
cfi=(105)
cfn=(2832)
calls=1 3272 
* 5
* 3
+1 1
cfi=(102)
cfn=(5770) MarkPostmasterChildInactive
calls=1 290 
* 12
+3 3
+2 4

fn=(2022) ProcGlobalShmemSize
103 3
+1 1
+3 4
cfi=(87)
cfn=(2002)
calls=1 476 
* 21
* 1
+2 5
cfi=(87)
cfn=(2000)
calls=1 493 
* 23
* 5
cfi=(87)
cfn=(2002)
calls=1 476 
* 21
* 1
+2 3
cfi=(87)
cfn=(2000)
calls=1 493 
* 23
* 5
cfi=(87)
cfn=(2002)
calls=1 476 
* 21
* 1
+2 5
cfi=(87)
cfn=(2000)
calls=1 493 
* 14
* 5
cfi=(87)
cfn=(2002)
calls=1 476 
* 21
* 1
+2 4
cfi=(87)
cfn=(2002)
calls=1 476 
* 21
* 1
+2 5
cfi=(87)
cfn=(2000)
calls=1 493 
* 23
* 5
cfi=(87)
cfn=(2002)
calls=1 476 
* 21
* 1
+1 3
cfi=(87)
cfn=(2000)
calls=1 493 
* 23
* 5
cfi=(87)
cfn=(2002)
calls=1 476 
* 21
* 1
+1 5
cfi=(87)
cfn=(2000)
calls=1 493 
* 14
* 5
cfi=(87)
cfn=(2002)
calls=1 476 
* 21
* 1
+2 1
+1 2

fn=(5748) RemoveProcFromArray
789 5
+2 4
cfi=(100)
cfn=(5750) ProcArrayRemove
calls=1 335 
* 313
+1 2

fn=(2240) InitProcGlobal
163 4
+6 5
+4 5
cfi=(87)
cfn=(2168)
calls=1 373 
* 907
-1 1
+7 2
+1 2
+1 2
+1 2
+1 2
+1 2
+1 2
+1 2
+1 2
+1 5
cfi=(117)
cfn=(2146)
calls=1 +39 
* 33
+1 5
cfi=(117)
cfn=(2146)
calls=1 +38 
* 33
+10 4
cfi=(87)
cfn=(2134)
calls=1 -41 
* 67
* 1
+1 24
cob=(3)
cfi=(3)
cfn=(828)
calls=1 0 
* 10775
* 1
+1 3
+2 4
+10 7
cfi=(87)
cfn=(2134)
calls=1 -55 
* 67
* 1
+1 27
cob=(3)
cfi=(3)
cfn=(828)
calls=1 0 
* 163
* 1
+1 3
+2 2
+9 464
+2 696
cfi=(86)
cfn=(2242) PGSemaphoreCreate
calls=116 +24 
* 6487
* 116
+1 928
cfi=(122)
cfn=(2192)
calls=116 +32 
* 1276
+1 1044
cfi=(99)
cfn=(2144)
calls=116 678 
* 7424
+2 812
+10 348
+3 800
+1 700
+1 900
+2 96
+3 32
+1 28
+1 36
+2 36
+3 64
+1 56
+1 64
+4 232
+1 24128
cfi=(126)
cfn=(2228)
calls=1856 37 
* 22272
-1 5800
+4 928
cfi=(127)
cfn=(2252)
calls=116 +10 
* 1392
+6 1044
cfi=(117)
cfn=(2146)
calls=116 -48 
* 3828
+1 1044
cfi=(117)
cfn=(2146)
calls=116 -49 
* 3828
-59 467
+66 6
+1 7
+3 2
cfi=(87)
cfn=(2134)
calls=1 158 
* 67
* 1
+1 2
+1 4

fn=(3654) ProcReleaseLocks
772 10
+1 6
+3 2
cfn=(3656)
calls=2 -80 
* 52
+2 20
cfi=(91)
cfn=(3660) LockReleaseAll
calls=2 2090 
* 811401
+2 6
cfi=(91)
cfn=(3660)
calls=2 2090 
* 10061
+1 4

fl=(183) /home/mithuncy/fsm_p11patch/src/backend/utils/adt/oid.c
fn=(3338) oideq
355 56181
+1 56181
+1 56181
+2 77670
+1 37454

fl=(261) /home/mithuncy/fsm_p11patch/src/backend/optimizer/prep/../../../../src/include/nodes/pg_list.h
fn=(4600) list_head
78 18
+1 18
+1 12
-2 9
+1 9
+1 6
-2 9
+1 9
+1 6

fn=(4610) list_length
90 9
+1 9
+1 6

fl=(289)
fn=(5038) sql_fn_make_param
422 12
+3 8
cfi=(13)
cfn=(2156)
calls=2 815 
* 273
* 10
+1 4
+1 6
+1 20
+1 4
+1 8
cfi=(272)
cfn=(4978)
calls=2 2791 
* 948
* 4
+1 6
+7 16
+1 4
+2 1
+1 2
-1 1
+1 2

fn=(5062) check_sql_fn_retval
1589 10
+11 2
+1 2
+1 2
+7 2
+8 1
+1 3
cfi=(242)
cfn=(4372)
calls=1 78 
* 10
* 2
+2 3
+2 4
+1 2
-5 7
+19 2
+1 2
-1 2
+3 3
+1 4
+30 3
cfi=(240) /home/mithuncy/fsm_p11patch/src/backend/executor/execUtils.c
cfn=(4526) ExecCleanTargetListLength
calls=1 1091 
* 39
* 1
+2 3
cfi=(272)
cfn=(5064) get_typtype
calls=1 2375 
* 474
* 1
+2 2
+12 2
+8 3
cfi=(242)
cfn=(4372)
calls=1 78 
* 10
* 2
+3 4
cfi=(247)
cfn=(4434)
calls=1 43 
* 24
* 1
+1 5
cfi=(285)
cfn=(5066) IsBinaryCoercible
calls=1 2136 
* 12
* 3
+7 5
+13 2
-40 1
1959 1
+1 5

fn=(5016) prepare_sql_fn_parse_info
187 7
+2 8
+3 2
cfi=(13)
cfn=(2546)
calls=1 956 
* 180
* 1
+3 4
cfi=(13)
cfn=(928)
calls=1 1162 
* 189
* 2
+3 3
+6 7
+1 2
+5 5
cfi=(13)
cfn=(940)
calls=1 925 
* 110
* 1
+1 3
+1 2
-1 4
cob=(3)
cfi=(3)
cfn=(856)
calls=1 0 
* 12
* 1
+4 2
+2 14
+2 16
+2 5
cfi=(171)
cfn=(5018) get_call_expr_argtype
calls=1 2015 
* 98
* 1
+1 2
+5 7
-12 11
+16 3
+6 2
+7 7
cfi=(151) /home/mithuncy/fsm_p11patch/src/backend/utils/cache/syscache.c
cfn=(3982) SysCacheGetAttr
calls=1 1376 
* 65
* 1
+3 3
+1 1
+2 7
cfi=(151)
cfn=(3982)
calls=1 1376 
* 65
* 1
+3 3
+1 1
+2 7
cfi=(291) /home/mithuncy/fsm_p11patch/src/backend/utils/fmgr/funcapi.c
cfn=(5026) get_func_input_arg_names
calls=1 974 
* 14
* 1
+4 3
+1 3
+5 1
+1 4

fn=(5032) sql_fn_parser_setup
274 4
+1 2
+1 2
+1 2
+2 3
+1 2

fn=(5036)
405 10
+1 6
+1 6
+3 12
+3 14
cfn=(5038)
calls=2 +9 
* 1329
+1 4

fl=(52)
fn=(5604) disable_statement_timeout
4719 4
+1 6
+6 4

fn=(5696) ProcessInterrupts
2973 6
+2 6
+2 1
+2 3
+2 1
+1 1
+1 1
cfi=(84)
cfn=(3656)
calls=1 696 
* 26
+2 3
+2 3
+4 1
cfi=(105)
cfn=(2834)
calls=1 3278 
* 5
* 2
+4 1
cfi=(318) /home/mithuncy/fsm_p11patch/src/backend/replication/logical/worker.c
cfn=(5698) IsLogicalWorker
calls=1 1766 
* 7
* 2
+4 1
cfi=(72)
cfn=(5700) IsLogicalLauncher
calls=1 1088 
* 9
* 2
+11 3
+8 3
+11 6
cfi=(57)
cfn=(1548)
calls=1 232 
* 361
* 5
cfi=(57)
cfn=(1882)
calls=1 785 
* 789
* 3
cfi=(57)
cfn=(5702) errcode
calls=1 571 
* 18
* 4
cfi=(57)
cfn=(1896)
calls=1 411 
* 61489

fn=(3788) SocketBackend
333 10
+6 6
+1 2
cfi=(58)
cfn=(2784)
calls=2 1211 
* 24
+1 2
cfi=(58)
cfn=(3790) pq_getbyte
calls=2 1001 
* 65304
* 1
+2 2
+29 7
+3 1
+1 4
+24 1
+89 4
+2 4
cfi=(58)
cfn=(3810) pq_getmessage
calls=1 1273 
* 343
* 2
+5 3
+2 1
+1 4

fn=(3826) start_xact_command
2571 4
+1 8
+2 1
cfi=(26)
cfn=(2948) StartTransactionCommand
calls=1 2704 
* 1388
+2 1
+10 1
cfn=(3828) enable_statement_timeout
calls=1 4698 
* 47
* 1
cfn=(3828)
calls=1 4698 
* 47
+1 4

fn=(3828)
4698 4
+4 6
+9 6
cfi=(138)
cfn=(2804)
calls=2 526 
* 74
+1 4

fn=(4584) pg_plan_query
862 18
+4 12
+8 9
+4 18
cfi=(258) /home/mithuncy/fsm_p11patch/src/backend/optimizer/plan/planner.c
cfn=(4586) planner
calls=3 268 
* 266512
* 3
+2 9
+49 9
+5 3
+1 6

fn=(4388) pg_analyze_and_rewrite_params
722 24
+12 9
+3 6
cfi=(223)
cfn=(3906)
calls=3 45 
* 1038
* 3
+1 9
+1 9
+1 18
cob=(12)
cfi=(231)
cfn=(4390) plpgsql_parser_setup
calls=3 1052 
* 54
+2 15
cfi=(222)
cfn=(3908)
calls=3 192 
* 583698
* 3
+2 9
+3 9
cfi=(223)
cfn=(3914)
calls=3 78 
* 318
+2 9
+6 9
cfn=(3916) pg_rewrite_query
calls=3 +15 
* 2472
* 3
+4 3
+1 6

fn=(1064)
3326 18
+1 15
+1 3
cfn=(1066)
calls=3 4517 
* 1357
* 3
+2 18
+7 3
+1 6

fn=(2414)
3210 2
+8 2
+4 2
+5 1
+1 2

fn=(3830) drop_unnamed_stmt
2670 3
+2 3
+7 2

fn=(3890) check_log_statement
2182 4
+3 3
+1 2
+14 2

fn=(3918) pg_plan_queries
947 3024
+1 504
+3 1512
cfi=(220) /home/mithuncy/fsm_p11patch/src/backend/tcop/../../../src/include/nodes/pg_list.h
cfn=(3894) list_head
calls=504 78 
* 5040
* 1008
+2 1512
+3 2016
+3 2004
cfi=(13)
cfn=(3400)
calls=501 853 
* 122244
* 2505
+1 1002
+1 2004
+1 2004
+1 2004
+1 2505
+4 18
cfn=(4584)
calls=3 862 
* 266599
* 3
+3 15
cfi=(45)
cfn=(960)
calls=3 129 
* 870
* 2505
cfi=(45)
cfn=(960)
calls=501 129 
* 145290
* 504
-20 3528
+23 504
+1 1008

fn=(5602) finish_xact_command
2591 4
+2 2
cfn=(5604)
calls=2 4719 
* 14
+2 6
+2 1
cfi=(26)
cfn=(3596) CommitTransactionCommand
calls=1 2775 
* 862720
+13 1
+2 4

fn=(1066)
4517 15
+5 15
+4 4
cob=(1)
cfi=(1)
cfn=(223)
calls=1 0 
* 1310
* 5
* 2
+2 3
+3 4
+3 2
+2 1
+9 2
-9 4
+9 8

fn=(3782) ProcessClientWriteInterrupt
577 30
+1 6
cob=(5)
cfi=(5)
cfn=(472)
calls=6 0 
* 18
* 6
* 12
+2 18
+35 6
cob=(5)
cfi=(5)
cfn=(472)
calls=6 0 
* 18
* 6
* 12
+1 12

fn=(2812)
3730 8
+4 1
+1 1
+3 4
+3 1
+5 4
+6 7
cfn=(2814) process_postgres_switches
calls=1 3470 
* 155
+3 3
+11 4
+20 3
+4 3
cfi=(28)
cfn=(784)
calls=1 41 
* 174
+2 3
cfi=(28)
cfn=(784)
calls=1 41 
* 174
+1 3
cfi=(28)
cfn=(784)
calls=1 41 
* 174
+7 3
+1 3
cfi=(28)
cfn=(784)
calls=1 41 
* 174
* 1
+3 1
cfi=(138)
cfn=(2758)
calls=1 341 
* 653
+8 3
cfi=(28)
cfn=(784)
calls=1 41 
* 174
+1 3
cfi=(28)
cfn=(784)
calls=1 41 
* 174
+1 3
cfi=(28)
cfn=(784)
calls=1 41 
* 174
+1 3
cfi=(28)
cfn=(784)
calls=1 41 
* 174
+6 3
cfi=(28)
cfn=(784)
calls=1 41 
* 177
+4 1
cfi=(27)
cfn=(750)
calls=1 42 
* 359
+2 3
+3 3
cob=(3)
cfi=(3)
cfn=(768) sigdelset
calls=1 0 
* 10
* 1
+3 4
cob=(3)
cfi=(3)
cfn=(774)
calls=1 0 
* 7
* 1
+2 4
+24 1
cfi=(75)
cfn=(2816) BaseInit
calls=1 547 
* 3525
+12 1
cfi=(84)
cfn=(2830)
calls=1 296 
* 3097
+4 4
cob=(3)
cfi=(3)
cfn=(774)
calls=1 0 
* 7
* 1
+9 8
cfi=(75)
cfn=(2866) InitPostgres
calls=1 589 
* 16283274
+9 3
+2 3
cfi=(13)
cfn=(1396) MemoryContextDelete
calls=1 212 
* 1332
+1 1
+3 1
+6 1
cfi=(29)
cfn=(3710)
calls=1 5858 
* 17295
+6 6
+4 3
+7 1
cfi=(54)
cfn=(3726) process_session_preload_libraries
calls=1 1601 
* 52
+5 3
+4 4
cfi=(179)
cfn=(3292)
calls=1 88 
* 137
+1 6
cfi=(207) /home/mithuncy/fsm_p11patch/src/backend/tcop/../../../src/include/libpq/pqformat.h
cfn=(3728) pq_sendint32
calls=1 146 
* 74
+1 6
cfi=(207)
cfn=(3728)
calls=1 146 
* 74
+1 3
cfi=(179)
cfn=(3298)
calls=1 299 
* 335
+5 3
+9 7
cfi=(14)
cfn=(432)
calls=1 395 
* 111
* 1
+10 7
cfi=(14)
cfn=(432)
calls=1 395 
* 111
* 1
+3 3
cfi=(208) /home/mithuncy/fsm_p11patch/src/backend/tcop/../../../src/include/utils/palloc.h
cfn=(3732) MemoryContextSwitchTo
calls=1 110 
* 10
+1 2
cfi=(80)
cfn=(1888)
calls=1 47 
* 154
+1 3
cfi=(208)
cfn=(3732)
calls=1 110 
* 10
+5 4
+25 4
cob=(3)
cfi=(3)
cfn=(370) __sigsetjmp
calls=1 0 
* 42
* 1
* 2
4101 2
+2 4
+1 1
+12 1
+6 3
cfi=(208)
cfn=(3732)
calls=1 110 
* 10
-6 1
+6 3
cfi=(208)
cfn=(3732)
calls=1 110 
* 10
+1 6
cfi=(13)
cfn=(3734) MemoryContextReset
calls=2 137 
* 210
+2 6
cfi=(80)
cfn=(1888)
calls=2 47 
* 308
+6 2
cfi=(110) /home/mithuncy/fsm_p11patch/src/backend/utils/time/snapmgr.c
cfn=(3736) InvalidateCatalogSnapshotConditionally
calls=2 532 
* 14
+15 6
+2 2
cfi=(26)
cfn=(3738) IsAbortedTransactionBlockState
calls=2 354 
* 30
* 4
+13 2
cfi=(26)
cfn=(3740) IsTransactionOrTransactionBlock
calls=2 4471 
* 24
* 4
+15 2
cfi=(113) /home/mithuncy/fsm_p11patch/src/backend/commands/async.c
cfn=(3742) ProcessCompletedNotifies
calls=2 1102 
* 20
+1 4
cfi=(38)
cfn=(3744) pgstat_report_stat
calls=2 813 
* 112794
+2 6
cfi=(12)
cfn=(2802) set_ps_display
calls=2 332 
* 364
+1 6
cfi=(38)
cfn=(3762) pgstat_report_activity
calls=2 2991 
* 134
+3 6
cfi=(209) /home/mithuncy/fsm_p11patch/src/backend/tcop/dest.c
cfn=(3766) ReadyForQuery
calls=2 251 
* 1652
+1 2
+9 2
+5 6
cfn=(3786) ReadCommand
calls=2 510 
* 65750
* 1
+11 3
+1 1
+5 2
+10 3
+10 3
+3 7
+7 1
cfi=(26)
cfn=(2946) SetCurrentStatementStartTimestamp
calls=1 735 
* 31
+2 3
cfi=(179)
cfn=(3812) pq_getmsgstring
calls=1 582 
* 2774
* 1
+1 3
cfi=(179)
cfn=(3822) pq_getmsgend
calls=1 638 
* 15
+2 3
+6 3
cfn=(3824) exec_simple_query
calls=1 985 
* 368616545
+2 1
+2 1
4483 1

fn=(5690) die
2762 4
+1 1
cob=(5)
cfi=(5)
cfn=(472)
calls=1 0 
* 3
* 1
* 2
+3 4
+2 1
+1 1
+4 3
cfi=(122)
cfn=(2850)
calls=1 437 
* 49
+8 6
+3 1
cob=(5)
cfi=(5)
cfn=(472)
calls=1 0 
* 3
* 1
* 2
+1 2

fn=(3824)
985 6
+1 2
+4 2
+1 1
+7 2
+2 4
cfi=(38)
cfn=(3762)
calls=1 2991 
* 250
+8 2
+10 1
cfn=(3826)
calls=1 2571 
* 1446
+8 1
cfn=(3830)
calls=1 2670 
* 8
+5 3
cfi=(208)
cfn=(3732)
calls=1 110 
* 10
* 1
+6 3
cfn=(3832) pg_parse_query
calls=1 633 
* 8601
* 1
+3 3
cfn=(3890)
calls=1 2182 
* 11
* 2
+12 3
cfi=(208)
cfn=(3732)
calls=1 110 
* 10
+10 3
cfi=(220)
cfn=(3892) list_length
calls=1 90 
* 10
* 3
+5 3
cfi=(220)
cfn=(3894)
calls=1 78 
* 10
* 2
+2 3
+1 1
+15 4
cfi=(221) /home/mithuncy/fsm_p11patch/src/backend/tcop/utility.c
cfn=(3896) CreateCommandTag
calls=1 2083 
* 17
* 1
+2 4
cfi=(12)
cfn=(2802)
calls=1 332 
* 174
+2 5
cfi=(209)
cfn=(3898) BeginCommand
calls=1 104 
* 6
+10 1
cfi=(26)
cfn=(3738)
calls=1 354 
* 15
* 2
+9 1
cfn=(3826)
calls=1 2571 
* 56
+9 2
+4 3
+5 3
cfi=(222)
cfn=(3900)
calls=1 358 
* 18
* 2
+12 3
cfi=(208)
cfn=(3732)
calls=1 110 
* 10
* 1
+2 7
cfn=(3902) pg_analyze_and_rewrite
calls=1 683 
* 1235
* 1
+3 5
cfn=(3918)
calls=1 947 
* 607
* 1
+4 2
+4 3
+6 4
cfi=(156) /home/mithuncy/fsm_p11patch/src/backend/utils/mmgr/portalmem.c
cfn=(3920) CreatePortal
calls=1 176 
* 1897
* 1
+2 2
+7 9
cfi=(156)
cfn=(3924) PortalDefineQuery
calls=1 287 
* 27
+10 6
cfi=(224) /home/mithuncy/fsm_p11patch/src/backend/tcop/pquery.c
cfn=(3926) PortalStart
calls=1 445 
* 220
+8 1
+1 5
+13 5
cfi=(224)
cfn=(3932) PortalSetResultFormat
calls=1 625 
* 16
+5 3
cfi=(209)
cfn=(3934) CreateDestReceiver
calls=1 114 
* 291
* 1
+1 2
+1 5
cfi=(225) /home/mithuncy/fsm_p11patch/src/backend/access/common/printtup.c
cfn=(3938) SetRemoteDestReceiverParams
calls=1 107 
* 15
+5 3
cfi=(208)
cfn=(3732)
calls=1 110 
* 10
+5 12
cfi=(224)
cfn=(3940) PortalRun
calls=1 689 
* 367659483
+8 5
cfi=(225)
cfn=(5590) printtup_destroy
calls=1 558 
* 94
+2 4
cfi=(156)
cfn=(5592) PortalDrop
calls=1 466 
* 78746
+2 4
+11 2
+2 1
cfn=(5602)
calls=1 2591 
* 862737
* 1
+25 5
cfi=(209)
cfn=(5686) EndCommand
calls=1 167 
* 270
1067 7
1273 1
cfn=(5602)
calls=1 2591 
* 15
+5 2
+6 5
cfn=(5688) check_log_duration
calls=1 2220 
* 18
* 5
+16 2
+5 1
+1 5

fn=(3832)
633 2020
+5 1515
+3 1515
cfi=(211)
cfn=(3834) raw_parser
calls=505 37 
* 6395248
* 505
+2 1515
+24 505
+1 1010

fn=(3786)
510 8
+3 6
+1 6
cfn=(3788)
calls=2 333 
* 65725
* 2
+3 1
+1 2

fn=(3902)
683 4008
+9 1503
+3 4008
cfi=(222)
cfn=(3904)
calls=501 103 
* 443886
* 501
+3 1503
+6 1503
cfn=(3916)
calls=501 +66 
* 159819
* 501
+4 501
+1 1002

fn=(3960) stack_is_too_deep
3277 1514
+7 4542
+5 1514
+11 2271
+20 757
+1 1514

fn=(2794) ProcessClientReadInterrupt
531 35
+1 7
cob=(5)
cfi=(5)
cfn=(472)
calls=7 0 
* 21
* 7
* 14
+2 21
+3 16
cfn=(5696)
calls=1 2973 
* 62762
+3 12
+4 12
+3 6
+16 6
cob=(5)
cfi=(5)
cfn=(472)
calls=6 0 
* 18
* 6
* 12
+1 12

fn=(2814)
3470 9
+1 3
+1 1
+4 2
+2 1
+3 2
+18 1
+8 7
cob=(3)
cfi=(3)
cfn=(1254)
calls=1 0 
* 106
* 1
* 3
3682 8
+3 5
+23 1
+4 5

fn=(1072)
3343 12
+1 12
+2 6
+1 6

fn=(3916)
770 2016
+3 1512
+4 1512
+3 2016
+3 2004
cfi=(45)
cfn=(1586)
calls=501 260 
* 145290
* 1002
+5 9
cfi=(249) /home/mithuncy/fsm_p11patch/src/backend/rewrite/rewriteHandler.c
cfn=(4458) QueryRewrite
calls=3 3690 
* 2391
* 3
+3 1512
+57 1512
+4 504
+1 1008

fn=(3958)
3263 3028
+1 757
cfn=(3960)
calls=757 +13 
* 12112
* 1514
+9 3028

fn=(5688)
2220 7
+1 6
+45 1
+1 4

fl=(221)
fn=(3954) standard_ProcessUtility
384 10
+1 3
+1 3
+1 3
cfi=(26)
cfn=(3956) IsTransactionBlock
calls=1 4453 
* 16
* 5
+4 1
cfi=(52)
cfn=(3958)
calls=1 3263 
* 27
+2 3
cfn=(3962) check_xact_readonly
calls=1 135 
* 23
+2 2
+1 2
+2 2
cfi=(223)
cfn=(3906)
calls=1 45 
* 346
* 1
+1 3
+2 8
523 5
cfi=(226) /home/mithuncy/fsm_p11patch/src/backend/commands/functioncmds.c
cfn=(3964) ExecuteDoStmt
calls=1 2093 
* 367657059
+1 1
929 3
cfi=(223)
cfn=(3914)
calls=1 78 
* 106
+1 4

fn=(3955) standard_ProcessUtility'2
384 5000
+1 1500
+1 1500
+1 4000
+4 500
cfi=(52)
cfn=(3958)
calls=500 3263 
* 13500
+2 1500
cfn=(3962)
calls=500 135 
* 11500
+2 1000
+1 1000
+2 1000
cfi=(223)
cfn=(3906)
calls=500 45 
* 157500
* 500
+1 1500
+2 4000
551 5000
cfi=(296) /home/mithuncy/fsm_p11patch/src/backend/commands/copy.c
cfn=(5166) DoCopy
calls=500 796 
* 347999946
+3 1000
+1 3500
cfi=(17)
cfn=(462)
calls=500 203 
* 295500
+3 500
929 1500
cfi=(223)
cfn=(3914)
calls=500 78 
* 53000
+1 2000

fn=(3962)
135 2004
+2 2505
cfi=(26)
cfn=(1210)
calls=501 911 
* 4008
* 1503
+1 501
+92 1002

fn=(3930) UtilityReturnsTuples
1747 2004
+1 5511
+41 501
+2 1002

fn=(3952) ProcessUtility
345 9
+10 3
+5 10
cfn=(3954)
calls=1 +24 
* 367657636
+3 2

fn=(3953) ProcessUtility'2
345 4500
+10 1500
+5 5000
cfn=(3955)
calls=500 +24 
* 348567446
+3 1000

fn=(5226) PreventCommandIfParallelMode
258 2500
+1 500
cfi=(26)
cfn=(1210)
calls=500 911 
* 4000
* 1000
+6 2000

fn=(3896)
2083 2016
+3 4032
+21 3
+1 3
2382 500
+1 500
2529 1
+1 1
2928 504
+1 1008

fl=(262) /home/mithuncy/fsm_p11patch/src/backend/optimizer/prep/prepunion.c
fn=(4608) expand_inherited_tables
1474 12
+10 15
cfi=(261)
cfn=(4610)
calls=3 90 
* 24
* 3
+1 15
cfi=(261)
cfn=(4600)
calls=3 78 
* 24
* 3
+1 15
+7 6

fl=(66) /home/mithuncy/fsm_p11patch/src/backend/utils/init/../../../../src/include/pgstat.h
fn=(1562) pgstat_report_wait_start
1239 60
+1 40
+2 120
+1 20
+7 40

fn=(1572) pgstat_report_wait_end
1263 40
+1 40
+2 120
+1 20
+7 40

fl=(63)
fn=(1508) validateTzEntry
52 1568
+7 1568
cob=(3)
cfi=(3)
cfn=(424)
calls=392 -59 
* 5880
* 392
* 784
+11 1568
+1 784
-1 784
+12 1568
+1 7130
cfi=(32)
cfn=(1510) pg_tolower
calls=1426 +40 
* 19964
* 2852
-1 8698
+3 392
+1 784

fn=(1472)
439 8
+1 2
+11 14
cfi=(14)
cfn=(432)
calls=2 -56 
* 713
* 2
+3 6
cfi=(61) /home/mithuncy/fsm_p11patch/src/backend/utils/misc/../../../../src/include/utils/palloc.h
cfn=(1270) MemoryContextSwitchTo
calls=2 110 
* 20
* 2
+3 2
+1 16
cfi=(13)
cfn=(940)
calls=2 925 
* 879
* 2
+3 14
cfn=(1474) ParseTzFile
calls=2 278 
* 1510104
* 2
+3 4
+2 10
cfi=(64)
cfn=(1518) ConvertTimeZoneAbbrevs
calls=2 4508 
* 71378
* 2
+1 4
+5 6
cfi=(61)
cfn=(1270)
calls=2 110 
* 20
+1 6
cfi=(13)
cfn=(1396)
calls=2 212 
* 1740
+2 2
+1 4

fn=(1512) addToArray
190 3528
+10 1176
+1 392
+1 1176
+1 392
+2 12380
+1 24760
+3 17332
cob=(3)
cfi=(3)
cfn=(446)
calls=2476 0 
* 64804
* 2476
* 2476
+1 4952
+1 3952
+1 2976
+1 5952
-10 8604
+46 1568
+2 10
+1 26
cfi=(13)
cfn=(1514) repalloc
calls=2 1045 
* 2334
* 4
+3 20
+2 32
cob=(3)
cfi=(3)
cfn=(482) __memmove_ssse3
calls=2 0 
* 258
* 2
-2 3900
+2 6240
cob=(3)
cfi=(3)
cfn=(482)
calls=390 0 
* 176242
* 390
+2 2352
cob=(3)
cfi=(3)
cfn=(856)
calls=392 0 
* 7840
* 392
+2 784
+1 784

fn=(1474)
278 16
+7 2
+1 2
+9 6
+2 14
cob=(3)
cfi=(3)
cfn=(914)
calls=14 0 
* 42
* 14
* 154
-2 78
+17 4
+7 8
cfi=(11)
cfn=(1428)
calls=2 705 
* 9167
+1 20
cfi=(17)
cfn=(462)
calls=2 203 
* 1028
+2 8
cfi=(25)
cfn=(1278)
calls=2 2186 
* 1290
* 2
+1 4
+36 2
+2 1266
+1 6330
cob=(3)
cfi=(3)
cfn=(1486) fgets
calls=1265 0 
* 308214
cob=(1)
cfi=(1)
cfn=(223)
calls=1 0 
* 1783
* 1270
* 2532
+2 6
cob=(3)
cfi=(3)
cfn=(1366) ferror
calls=2 0 
* 72
* 2
* 4
+7 2
+2 3792
cob=(3)
cfi=(3)
cfn=(424)
calls=1264 0 
* 27004
* 1264
* 2528
+9 2528
+1 1264
+1 12148
-1 67016
cob=(3)
cfi=(3)
cfn=(914)
calls=13368 0 
* 40104
* 13368
* 147048
+3 5056
+1 44
+1 4880
+1 828
+2 1960
cfi=(32)
cfn=(970) pg_strncasecmp
calls=392 70 
* 18032
* 784
+19 1960
cfi=(32)
cfn=(970)
calls=392 70 
* 18032
* 784
+6 2352
cfn=(1500) splitTzLine
calls=392 99 
* 325415
* 1176
+2 1176
cfn=(1508)
calls=392 52 
* 54716
* 1176
+2 3136
cfn=(1512)
calls=392 190 
* 360506
* 392
+1 784
-62 3798
cob=(3)
cfi=(3)
cfn=(1480) feof
calls=1265 0 
* 45540
cob=(1)
cfi=(1)
cfn=(223)
calls=1 0 
* 1290
* 1270
* 2532
+66 6
cfi=(25)
cfn=(1374)
calls=2 2385 
* 1067
+2 2
+1 4

fn=(1500)
99 2744
+7 1176
+1 1176
+2 1568
cob=(3)
cfi=(3)
cfn=(1506) strtok
calls=391 0 
* 38327
cob=(1)
cfi=(1)
cfn=(223)
calls=1 0 
* 1374
* 396
* 392
+1 784
+6 1176
cfi=(13)
cfn=(928)
calls=392 1162 
* 69030
* 784
+2 1176
cob=(3)
cfi=(3)
cfn=(1506)
calls=392 0 
* 47944
* 392
* 392
+1 784
+8 392
cob=(3)
cfi=(3)
cfn=(914)
calls=392 0 
* 1176
* 392
* 5784
+2 580
+1 1740
cob=(3)
cfi=(3)
cfn=(1246)
calls=290 0 
* 53034
* 290
* 870
+1 2030
+7 870
cob=(3)
cfi=(3)
cfn=(1506)
calls=290 0 
* 28138
* 290
* 290
+1 1740
cfi=(32)
cfn=(968)
calls=290 37 
* 11502
* 580
+2 192
+1 288
cob=(3)
cfi=(3)
cfn=(1506)
calls=96 0 
* 8928
* 96
* 96
-3 96
+8 388
+1 388
-9 194
+19 306
cfi=(13)
cfn=(928)
calls=102 1162 
* 20994
* 204
+1 204
+1 204
+1 306
cob=(3)
cfi=(3)
cfn=(1506)
calls=102 0 
* 9486
* 102
* 102
+3 784
+3 1568
+6 392
+1 784

fl=(75)
fn=(3580) process_settings
1153 5
+4 4
+3 3
cfi=(169)
cfn=(3022)
calls=1 1307 
* 53091
* 1
+3 2
cfi=(110)
cfn=(3120) GetCatalogSnapshot
calls=1 441 
* 54
* 2
cfi=(110)
cfn=(3128) RegisterSnapshot
calls=1 864 
* 438
* 1
+3 7
cfi=(198)
cfn=(3582)
calls=1 222 
* 88614
+1 7
cfi=(198)
cfn=(3582)
calls=1 222 
* 10397
+1 8
cfi=(198)
cfn=(3582)
calls=1 222 
* 10397
+1 8
cfi=(198)
cfn=(3582)
calls=1 222 
* 10397
+2 3
cfi=(110)
cfn=(3266) UnregisterSnapshot
calls=1 906 
* 298
+1 4
cfi=(169)
cfn=(3080)
calls=1 1283 
* 2046
+1 2

fn=(2818) InitCommunication
439 2
+4 4
+8 2

fn=(5722) ShutdownPostgres
1187 5
+2 1
cfi=(26)
cfn=(5724) AbortOutOfAnyTransaction
calls=1 4349 
* 91
+6 3
cfi=(91)
cfn=(3660)
calls=1 2090 
* 8931
+1 2

fn=(3340) GetDatabaseTuple
96 8
+9 16
cfi=(184)
cfn=(3342)
calls=2 -24 
* 228
+10 6
cfi=(169)
cfn=(3022)
calls=2 1307 
* 5763
* 2
+1 20
cfi=(172)
cfn=(3118)
calls=2 322 
* 5465
* 2
+5 6
cfi=(172)
cfn=(3186)
calls=2 406 
* 5243
* 2
+3 4
+1 6
cfi=(178)
cfn=(3346)
calls=2 683 
* 506
* 2
+3 6
cfi=(172)
cfn=(3254)
calls=2 489 
* 1890
+1 8
cfi=(169)
cfn=(3080)
calls=2 1283 
* 4077
+2 2
+1 4

fn=(3562) CheckMyDatabase
316 10
+7 5
cfi=(151)
cfn=(3306) SearchSysCache1
calls=1 1114 
* 22107
* 1
+1 2
+2 8
+3 6
cob=(3)
cfi=(3)
cfn=(446)
calls=1 0 
* 22
* 1
* 2
+17 4
cfi=(105)
cfn=(2834)
calls=1 3278 
* 5
* 3
+5 5
+11 4
+18 4
+13 4
cfi=(19) /home/mithuncy/fsm_p11patch/src/backend/utils/mb/mbutils.c
cfn=(3564) SetDatabaseEncoding
calls=1 899 
* 15
+2 1
cfi=(19)
cfn=(2650) GetDatabaseEncodingName
calls=1 1011 
* 6
* 5
cfi=(29)
cfn=(1206)
calls=1 7172 
* 2195
+3 1
cfi=(19)
cfn=(2650)
calls=1 1011 
* 6
* 5
cfi=(29)
cfn=(1206)
calls=1 7172 
* 3257
+4 3
+1 3
+2 4
cfi=(18)
cfn=(562) pg_perm_setlocale
calls=1 152 
* 3389
* 2
+7 4
cfi=(18)
cfn=(562)
calls=1 152 
* 3631
* 2
+8 6
cfi=(29)
cfn=(1206)
calls=1 7172 
* 1784
+1 6
cfi=(29)
cfn=(1206)
calls=1 7172 
* 1386
+2 1
cfi=(18)
cfn=(622) check_strxfrm_bug
calls=1 994 
* 930
+2 3
cfi=(151)
cfn=(3280) ReleaseSysCache
calls=1 1161 
* 103
+1 5

fn=(1624)
525 2
+4 7
+4 3
+2 2

fn=(2810)
466 7
+3 3
cfi=(80)
cfn=(1888)
calls=1 47 
* 154
+2 5
+37 3
cfi=(13)
cfn=(952)
calls=1 1032 
* 85
+1 4

fn=(2816)
547 2
+5 1
cfn=(2818)
calls=1 439 
* 8
+1 1
cfi=(57)
cfn=(2820) DebugFileOpen
calls=1 1846 
* 11
+3 1
cfi=(25)
cfn=(2822)
calls=1 761 
* 384
+1 1
cfi=(140) /home/mithuncy/fsm_p11patch/src/backend/storage/smgr/smgr.c
cfn=(2824) smgrinit
calls=1 118 
* 202
+1 1
cfi=(50)
cfn=(2828) InitBufferPoolAccess
calls=1 2444 
* 2911
+1 2

fn=(2866)
589 12
+1 4
+5 4
cfi=(57)
cfn=(2084)
calls=1 1286 
* 68
* 4
cfi=(57)
cfn=(2086)
calls=1 1336 
* 105
+7 1
cfi=(84)
cfn=(2868)
calls=1 465 
* 373
+8 1
+2 2
cfi=(101) /home/mithuncy/fsm_p11patch/src/backend/storage/ipc/sinvaladt.c
cfn=(2872) SharedInvalBackendInit
calls=1 259 
* 591
+2 7
+4 3
cfi=(103)
cfn=(2874)
calls=1 106 
* 127
+6 4
+2 3
cfi=(138)
cfn=(2762)
calls=1 374 
* 18
+1 3
cfi=(138)
cfn=(2762)
calls=1 374 
* 18
+1 3
cfi=(138)
cfn=(2762)
calls=1 374 
* 18
+1 3
cfi=(138)
cfn=(2762)
calls=1 374 
* 18
+7 1
cfi=(50)
cfn=(2876) InitBufferPoolBackend
calls=1 2468 
* 39
+5 3
+8 1
cfi=(53)
cfn=(2878)
calls=1 7896 
* 5951
* 1
+30 1
cfi=(148)
cfn=(2888) RelationCacheInitialize
calls=1 3440 
* 3728
+1 1
cfi=(151)
cfn=(2894) InitCatalogCache
calls=1 999 
* 208712
+1 1
cfi=(154) /home/mithuncy/fsm_p11patch/src/backend/utils/cache/plancache.c
cfn=(2906) InitPlanCache
calls=1 131 
* 515
+3 1
cfi=(156)
cfn=(2912) EnablePortalManager
calls=1 105 
* 3542
+3 4
+1 1
cfi=(38)
cfn=(2914) pgstat_initialize
calls=1 2750 
* 55
+6 1
cfi=(148)
cfn=(2916) RelationCacheInitializePhase2
calls=1 3477 
* 17056
+10 3
cfi=(67)
cfn=(2944) before_shmem_exit
calls=1 334 
* 32
+3 1
cfi=(105)
cfn=(2832)
calls=1 3272 
* 5
* 2
+16 4
+3 1
cfi=(26)
cfn=(2946)
calls=1 +9 
* 31
+1 1
cfi=(26)
cfn=(2948)
calls=1 2704 
* 2151
+8 1
+2 1
cfi=(110)
cfn=(2986) GetTransactionSnapshot
calls=1 305 
* 1069
+10 3
cfi=(105)
cfn=(2834)
calls=1 3278 
* 5
* 2
+5 4
+11 3
+17 3
cfn=(3002) PerformAuthentication
calls=1 185 
* 39288
+1 5
cfi=(54)
cfn=(3304) InitializeSessionUserId
calls=1 580 
* 6862
+1 1
cfi=(181) /home/mithuncy/fsm_p11patch/src/backend/utils/misc/superuser.c
cfn=(3324) superuser
calls=1 48 
* 17061
* 1
+7 7
+17 3
+13 7
+8 3
+16 3
+29 2
+5 2
+5 3
cfn=(3340)
calls=1 96 
* 12856
* 1
+1 2
+4 8
+1 3
+1 3
+2 6
cfi=(16)
cfn=(460)
calls=1 46 
* 150
* 1
+59 4
+1 6
cfi=(160)
cfn=(3348) LockSharedObject
calls=1 +15 
* 2210
+15 3
+8 1
cfi=(110)
cfn=(2990) InvalidateCatalogSnapshot
calls=1 511 
* 78
+7 4
+4 3
cfn=(3340)
calls=1 96 
* 10410
* 1
+1 2
+1 9
-1 2
+2 9
-1 2
+12 5
cfi=(174)
cfn=(3356) GetDatabasePath
calls=1 108 
* 772
* 1
+2 4
+2 4
cob=(3)
cfi=(3)
cfn=(502)
calls=1 0 
* 5
* 1
* 2
+16 3
cfi=(54)
cfn=(1526) ValidatePgVersion
calls=1 1459 
* 2624
+3 3
cfi=(54)
cfn=(3358) SetDatabasePath
calls=1 87 
* 190
+8 1
cfi=(148)
cfn=(3360) RelationCacheInitializePhase3
calls=1 3536 
* 15717861
+3 1
cfi=(168) /home/mithuncy/fsm_p11patch/src/backend/utils/adt/acl.c
cfn=(3560) initialize_acl
calls=1 4689 
* 76
+8 4
+1 6
cfn=(3562)
calls=1 316 
* 38946
+7 3
+1 5
cfn=(3566) process_startup_options
calls=1 +38 
* 5518
+3 1
cfi=(54)
cfn=(3578) GetSessionUserId
calls=1 415 
* 5
* 5
cfn=(3580)
calls=1 1153 
* 175789
+3 3
+9 1
cfi=(55)
cfn=(3588) InitializeSearchPath
calls=1 4206 
* 99
+3 1
cfi=(19)
cfn=(3590) InitializeClientEncoding
calls=1 283 
* 80
+3 1
cfi=(199)
cfn=(3592)
calls=1 55 
* 157
+3 4
+1 1
cfi=(38)
cfn=(3594) pgstat_bestart
calls=1 2790 
* 510
+3 4
+1 1
cfi=(26)
cfn=(3596)
calls=1 2775 
* 7224
+1 5

fn=(3002)
185 4
+2 1
+46 5
cfi=(138)
cfn=(2764)
calls=1 429 
* 257
+5 3
cfi=(167) /home/mithuncy/fsm_p11patch/src/backend/libpq/auth.c
cfn=(3004) ClientAuthentication
calls=1 348 
* 38697
+5 3
cfi=(138)
cfn=(2804)
calls=1 526 
* 68
+2 3
+60 3
cfi=(12)
cfn=(2802)
calls=1 +27 
* 241
+2 1
+1 2

fn=(3566)
1088 6
+4 5
+6 4
+31 4
cfi=(197)
cfn=(3568)
calls=1 78 
* 10
* 1
+1 1
+5 6
+1 6
+2 6
+1 6
+2 12
cfi=(29)
cfn=(1206)
calls=2 7172 
* 5443
-11 6
+13 2

fl=(177)
fn=(3234)
266 3768
+3 1884
+7 1256

fl=(182) /home/mithuncy/fsm_p11patch/src/backend/utils/cache/../../../../src/include/utils/hashutils.h
fn=(3332) murmurhash32
42 11529
+1 7686
+2 11529
+1 11529
+1 11529
+1 11529
+1 11529
+1 3843
+1 7686

fl=(291)
fn=(5026)
974 6
+10 2
+2 2
+1 2
+57 2

fl=(313) /home/mithuncy/fsm_p11patch/src/backend/storage/buffer/../../../../src/include/storage/s_lock.h
fn=(5426) init_spin_delay
1012 36000
+1 12000
+1 12000
+1 12000
+1 18000
+1 18000
+1 18000
+1 12000

fn=(5422) tas
225 6000
+1 1500
+2 7500
+6 1500
+1 4500

fl=(143)
fn=(5432) finish_spin_delay
176 18000
+1 24000
+3 18000
+1 63
+7 12000

fn=(2838)
197 3
+1 2
+1 2

fn=(5768)
208 3
+11 11
+1 2

fl=(144)
fn=(2862)
144 3
+4 3
cfi=(145) /home/mithuncy/fsm_p11patch/src/backend/storage/lmgr/../../../../src/include/utils/palloc.h
cfn=(2864) MemoryContextSwitchTo
calls=1 -38 
* 10
* 1
+6 5
cfi=(13)
cfn=(940)
calls=1 925 
* 92
* 1
+1 8
cfi=(13)
cfn=(940)
calls=1 925 
* 94
* 1
+6 2
+1 5
cfi=(13)
cfn=(940)
calls=1 925 
* 92
* 1
+1 5
cfi=(13)
cfn=(940)
calls=1 925 
* 123
* 1
+9 12
cfi=(13)
cfn=(940)
calls=1 925 
* 123
-1 1
+2 5
cfi=(13)
cfn=(940)
calls=1 925 
* 123
* 1
+10 2
+1 5
cfi=(13)
cfn=(940)
calls=1 925 
* 755
* 1
+10 3
+2 5
cfi=(13)
cfn=(940)
calls=1 925 
* 286
-1 1
+3 3
cfi=(145)
cfn=(2864)
calls=1 -88 
* 10
+1 2

fl=(156)
fn=(3942) MarkPortalActive
393 5
+2 4
+5 2
+1 1
cfi=(26)
cfn=(736)
calls=1 625 
* 8
* 2
+1 4

fn=(5586) MarkPortalDone
412 4
+3 2
+10 4
+2 5
cfi=(317) /home/mithuncy/fsm_p11patch/src/backend/commands/portalcmds.c
cfn=(5588) PortalCleanup
calls=1 266 
* 11
+1 2
+2 2

fn=(3922) GetPortalByName
131 4
+3 2
+1 6
cfi=(31) /home/mithuncy/fsm_p11patch/src/backend/utils/hash/dynahash.c
cfn=(836) hash_search
calls=1 910 
* 225
* 5
+4 1
+1 2

fn=(2912)
105 3
+5 7
cfi=(14)
cfn=(432)
calls=1 395 
* 428
* 1
+4 1
+1 1
+6 6
cfi=(31)
cfn=(794) hash_create
calls=1 317 
* 3092
* 1
+2 2

fn=(3920)
176 9
+5 3
cfn=(3922)
calls=1 -50 
* 245
* 1
+1 2
+15 4
cfi=(13)
cfn=(2156)
calls=1 815 
* 319
* 1
+3 7
cfi=(14)
cfn=(432)
calls=1 395 
* 111
* 2
+5 4
cfi=(162) /home/mithuncy/fsm_p11patch/src/backend/utils/resowner/resowner.c
cfn=(2960) ResourceOwnerCreate
calls=1 422 
* 732
* 2
+4 2
+1 2
+1 1
cfi=(26)
cfn=(736)
calls=1 625 
* 8
* 2
+1 4
+1 2
+1 2
+1 2
+1 2
+1 2
+1 1
cfi=(26)
cfn=(3764) GetCurrentStatementStartTimestamp
calls=1 709 
* 5
* 2
+3 7
cfi=(31)
cfn=(836)
calls=1 910 
* 380
* 10
+3 7
cfi=(13)
cfn=(812) MemoryContextSetIdentifier
calls=1 330 
* 9
+2 1
+1 4

fn=(3924)
287 8
+7 3
+1 3
+1 3
+1 3
+1 3
+1 2
+1 2

fn=(5592)
466 7
+7 4
+8 4
+16 4
+12 7
cfi=(31)
cfn=(836)
calls=1 910 
* 343
* 3
+3 3
cfn=(5594) PortalReleaseCachedPlan
calls=1 308 
* 10
+8 4
+31 4
+1 2
-1 2
+3 5
+2 7
cfi=(162)
cfn=(3632) ResourceOwnerRelease
calls=1 -75 
* 130
+3 7
cfi=(162)
cfn=(3632)
calls=1 -78 
* 76588
+3 7
cfi=(162)
cfn=(3632)
calls=1 -81 
* 175
+3 4
cfi=(162)
cfn=(3700) ResourceOwnerDelete
calls=1 688 
* 892
+2 2
+7 4
+11 4
+4 4
cfi=(13)
cfn=(1396)
calls=1 212 
* 428
+3 3
cfi=(13)
cfn=(952)
calls=1 1032 
* 85
+1 4

fn=(3604) PreCommit_Portals
671 12
+1 2
+4 10
cfi=(31)
cfn=(3528) hash_seq_init
calls=2 1380 
* 106
+2 8
cfi=(31)
cfn=(3534) hash_seq_search
calls=2 1390 
* 722
* 6
+84 2
+1 8

fn=(5594)
308 4
+1 4
+12 2

fl=(167)
fn=(3004)
348 6
+1 1
+1 1
+8 3
cfi=(133)
cfn=(3006) hba_getauthmethod
calls=1 3028 
* 38074
+2 3
+7 5
+23 8
599 1
+1 1
+3 3
+3 2
+1 6
cfn=(3290) sendAuthRequest
calls=1 +11 
* 577
* 1
+3 5

fn=(3290)
618 7
+3 3
+2 4
cfi=(179)
cfn=(3292)
calls=1 88 
* 137
+1 5
cfi=(180) /home/mithuncy/fsm_p11patch/src/backend/libpq/../../../src/include/libpq/pqformat.h
cfn=(3294) pq_sendint32
calls=1 146 
* 74
+1 2
+3 3
cfi=(179)
cfn=(3298)
calls=1 299 
* 335
+7 2
+3 3
+1 2

fl=(259) /home/mithuncy/fsm_p11patch/src/backend/optimizer/util/clauses.c
fn=(4616) eval_const_expressions_mutator
2573 24
+1 6
+2 15
3835 3
+10 15
cfi=(247)
cfn=(4618) expression_tree_mutator
calls=3 2429 
* 223341
+1 18

fn=(4617) eval_const_expressions_mutator'2
2573 112
+1 28
+2 97
+4 4
+1 6
+3 12
+63 6
cfi=(243) /home/mithuncy/fsm_p11patch/src/backend/nodes/copyfuncs.c
cfn=(4376) copyObjectImpl
calls=2 4767 
* 484
* 2
+54 2
+1 3
+17 2
-6 8
cfi=(247)
cfn=(4528) exprTypmod
calls=1 277 
* 54
* 16
cfn=(5002) simplify_function
calls=1 4197 
* 220720
* 1
+10 2
+9 4
cfi=(13)
cfn=(3400)
calls=1 853 
* 174
* 5
+1 4
+1 4
+1 4
+1 4
+1 4
+1 4
+1 4
+1 3
+1 4
+1 2
+4 4
+1 6
+8 6
cfi=(247)
cfn=(4992) set_opfuncid
calls=2 1620 
* 20
+6 40
cfn=(5003) simplify_function'2
calls=2 4197 
* 223639
* 2
+9 4
+1 2
+7 4
+1 2
-1 2
+14 4
cfi=(13)
cfn=(3400)
calls=1 853 
* 174
* 5
+1 4
+1 4
+1 4
+1 4
+1 4
+1 4
+1 3
+1 4
+1 2
3061 2
+10 5
cfi=(45)
cfn=(1586)
calls=1 260 
* 290
* 1
+11 4
cfi=(247)
cfn=(4434)
calls=1 43 
* 24
* 5
cfi=(272)
cfn=(5078) getTypeOutputInfo
calls=1 2642 
* 496
+2 7
cfi=(272)
cfn=(5076) getTypeInputInfo
calls=1 2609 
* 511
+3 14
cfn=(5003)
calls=1 4197 
* 1364
* 1
+9 2
+41 4
cfi=(13)
cfn=(3400)
calls=1 853 
* 160
* 5
+1 3
cfi=(268)
cfn=(4642)
calls=1 78 
* 10
* 3
+1 4
+1 4
+1 4
+1 4
+1 2
3835 8
+10 40
cfi=(247)
cfn=(4619) expression_tree_mutator'2
calls=8 2429 
* 223172
+1 84

fn=(4996) max_parallel_hazard_checker
1160 10
+1 6
cfi=(272)
cfn=(4998) func_parallel
calls=2 1556 
* 942
* 10
cfn=(5000) max_parallel_hazard_test
calls=2 -29 
* 26
+2 4

fn=(5084) contain_nonstrict_functions_checker
1336 15
+1 9
cfi=(272)
cfn=(5086) func_strict
calls=3 1518 
* 1413
* 18
+1 6

fn=(5006) evaluate_function
4512 44
+1 32
+1 4
+1 4
+7 16
+14 16
+6 12
cfi=(268)
cfn=(4642)
calls=4 78 
* 40
* 8
+2 35
+1 30
+2 4
-5 43
+14 22
+9 8
+1 8
+34 8

fn=(5008) inline_function
4639 22
+1 16
+23 8
+1 2
-1 2
+2 2
-1 2
+2 2
-1 2
+2 2
-1 2
+2 4
cfi=(178)
cfn=(3976)
calls=1 362 
* 42
* 1
-1 2
+2 6
cfi=(268)
cfn=(4654)
calls=1 90 
* 10
-1 2
+2 2
+3 6
cfi=(45)
cfn=(3414)
calls=1 506 
* 23
* 2
+4 1
cfi=(54)
cfn=(3326)
calls=1 381 
* 5
* 6
cfi=(227)
cfn=(5010) pg_proc_aclcheck
calls=1 -21 
* 51
* 2
+4 6
+7 7
cfi=(14)
cfn=(432)
calls=1 395 
* 473
* 1
+3 3
cfi=(288) /home/mithuncy/fsm_p11patch/src/backend/optimizer/util/../../../../src/include/utils/palloc.h
cfn=(5014) MemoryContextSwitchTo
calls=1 110 
* 10
* 1
+3 6
cfi=(151)
cfn=(3982)
calls=1 1376 
* 1690
* 1
+4 3
+2 3
cfi=(41)
cfn=(3984) text_to_cstring
calls=1 186 
* 217
* 1
+6 3
+1 2
+2 1
+1 2
+1 2
+1 2
+8 4
cfi=(13)
cfn=(3400)
calls=1 853 
* 174
* 5
+1 3
+1 3
+1 2
+1 3
+1 2
+1 3
+1 3
+1 3
+1 2
+2 5
cfi=(289)
cfn=(5016)
calls=1 187 
* 891
* 1
+10 3
cfi=(52)
cfn=(3832)
calls=1 633 
* 15412
* 1
+1 3
cfi=(268)
cfn=(4654)
calls=1 90 
* 10
* 2
+3 2
cfi=(223)
cfn=(3906)
calls=1 45 
* 346
* 1
+1 3
+1 5
cfi=(289)
cfn=(5032)
calls=1 274 
* 15
+2 3
cfi=(268)
cfn=(4642)
calls=1 78 
* 10
* 5
cfi=(222)
cfn=(3908)
calls=1 192 
* 136777
* 1
+2 3
cfi=(223)
cfn=(3914)
calls=1 78 
* 106
+10 4
+1 2
-1 2
+2 2
-1 2
+2 2
-1 2
+2 2
-1 2
+2 2
-1 2
+2 2
-1 2
+2 2
-1 2
+2 3
-1 2
+2 3
-1 2
+2 2
-1 2
+2 2
-1 2
+2 2
-1 2
+2 2
-1 2
+2 2
-1 2
+2 2
-1 2
+2 2
-1 2
+2 2
-1 2
+2 2
-1 2
+2 4
cfi=(268)
cfn=(4654)
calls=1 90 
* 10
-1 2
+14 4
cfi=(45)
cfn=(1586)
calls=1 260 
* 290
* 7
cfi=(289)
cfn=(5062)
calls=1 1589 
* 666
* 2
+5 4
cfi=(268)
cfn=(4642)
calls=1 78 
* 10
* 3
+10 3
cfi=(247)
cfn=(4434)
calls=1 43 
* 24
* 2
+14 4
+3 4
+1 3
cfn=(5068) contain_volatile_functions
calls=1 959 
* 47314
-1 2
+4 4
+1 3
cfn=(5080) contain_nonstrict_functions
calls=1 1330 
* 3351
-1 2
+8 3
cfn=(5088) contain_context_dependent_node
calls=1 1466 
* 281
* 2
+9 6
cfi=(13)
cfn=(2546)
calls=1 956 
* 139
* 1
+1 8
cfn=(5092) substitute_actual_parameters
calls=1 4956 
* 1154
* 1
+4 1
+1 3
cfi=(268)
cfn=(4642)
calls=1 78 
* 10
* 2
+2 6
+2 16
+6 16
+25 2
-35 12
+42 3
cfi=(288)
cfn=(5014)
calls=1 110 
* 10
+2 3
cfi=(243)
cfn=(4376)
calls=1 4767 
* 1749
* 1
+2 3
cfi=(13)
cfn=(1396)
calls=1 212 
* 297
+8 2
+2 3
cfi=(247)
cfn=(4452)
calls=1 721 
* 21
* 1
+2 5
+16 4
+1 6
cfi=(251) /home/mithuncy/fsm_p11patch/src/backend/optimizer/plan/setrefs.c
cfn=(4990) record_plan_function_dependency
calls=1 2553 
* 12
+6 6
cfi=(45)
cfn=(4508)
calls=1 296 
* 290
* 2
+1 5
cfn=(4617)
calls=1 2573 
* 4769
* 1
+1 4
cfi=(45)
cfn=(4514)
calls=1 667 
* 266
* 2
+2 2
+2 2
+9 8

fn=(5009) inline_function'2
4639 22
+1 16
+23 8
+7 4
4948 8

fn=(4592) max_parallel_hazard_walker
1167 18
+1 6
+4 15
cfi=(247)
cfn=(4594) check_functions_in_node
calls=3 1659 
* 45
* 6
+15 12
+6 12
+14 12
+9 12
+11 12
+12 12
+28 12
+21 12
+2 6
+3 12
+7 18
cfi=(247)
cfn=(4440)
calls=3 2266 
* 4165
* 3
+9 12

fn=(4593) max_parallel_hazard_walker'2
1167 276
+1 92
+1 60
+3 80
cfi=(247)
cfn=(4594)
calls=16 1659 
* 1279
* 32
+15 64
+6 64
+14 64
+9 64
+11 64
+12 64
+28 64
+2 2
+2 4
+1 2
+16 60
+18 75
cfi=(247)
cfn=(4451)
calls=9 1843 
* 3948
cfi=(247)
cfn=(4450)
calls=6 1843 
* 2947
+3 184

fn=(5000)
1132 12
+1 6
+4 2
+17 2
+1 4

fn=(4614) eval_const_expressions
2494 15
+3 6
+1 15
+3 6
+1 3
+1 3
+1 3
+1 15
cfn=(4616)
calls=3 +68 
* 223422
+1 6

fn=(5004) expand_function_arguments
4291 24
+1 32
+1 4
+4 12
cfi=(268)
cfn=(4642)
calls=4 78 
* 40
* 8
+2 21
+2 28
-4 43
+12 8
+6 12
cfi=(268)
cfn=(4654)
calls=4 90 
* 40
* 20
+8 4
+1 8

fn=(5080)
1330 4
+1 4
cfn=(5082) contain_nonstrict_functions_walker
calls=1 +11 
* 3341
+1 2

fn=(5082)
1342 5
+1 2
+2 4
+5 4
+8 4
+5 4
+7 4
+5 4
+5 4
+14 4
+5 4
+2 4
+2 4
+2 4
+11 4
+2 4
+2 4
+2 4
+2 4
+2 4
+2 4
+2 4
+2 4
+4 5
cfi=(247)
cfn=(4594)
calls=1 1659 
* 529
* 2
+4 5
cfi=(247)
cfn=(4450)
calls=1 1843 
* 2707
+2 2

fn=(5083) contain_nonstrict_functions_walker'2
1342 15
+1 6
+2 12
+5 12
+8 12
+5 12
+7 12
+5 12
+5 12
+14 12
+5 12
+2 12
+2 12
+2 12
+11 12
+2 12
+2 12
+2 12
+2 12
+2 12
+2 12
+2 12
+2 12
+4 15
cfi=(247)
cfn=(4594)
calls=3 1659 
* 2087
* 6
+4 15
cfi=(247)
cfn=(4451)
calls=3 1843 
* 319
+2 6

fn=(5092)
4956 7
+3 2
+1 2
+1 2
+2 5
cfn=(5094) substitute_actual_parameters_mutator
calls=1 +6 
* 1134
+1 2

fn=(5094)
4969 5
+1 2
+2 4
+16 5
cfi=(247)
cfn=(4619)
calls=1 2429 
* 1116
+2 2

fn=(5095) substitute_actual_parameters_mutator'2
4969 20
+1 8
+2 16
+2 4
+2 8
+2 20
+4 22
+4 16
cfi=(45)
cfn=(5022)
calls=2 411 
* 61
* 2
+2 10
cfi=(247)
cfn=(4619)
calls=2 2429 
* 1201
+2 8

fn=(5002)
4197 15
+1 3
+17 4
cfi=(151)
cfn=(3306)
calls=1 1114 
* 342
* 1
+1 2
+2 8
+8 2
+2 6
cfn=(5004)
calls=1 +63 
* 79
* 1
+1 5
cfi=(247)
cfn=(4619)
calls=1 2429 
* 219982
* 1
+4 3
+5 15
cfn=(5006)
calls=1 4512 
* 87
* 1
+5 8
+25 4
+1 12
cfn=(5008)
calls=1 4639 
* 29
* 1
+4 3
cfi=(151)
cfn=(3280)
calls=1 1161 
* 103
+2 1
+1 2

fn=(5003)
4197 45
+1 9
+17 12
cfi=(151)
cfn=(3306)
calls=3 1114 
* 1026
* 3
+1 6
+2 24
+8 6
+2 18
cfn=(5004)
calls=3 +63 
* 225
* 3
+1 15
cfi=(247)
cfn=(4619)
calls=3 2429 
* 5464
* 3
+4 9
+5 45
cfn=(5006)
calls=3 4512 
* 247
* 3
+5 24
+25 12
+1 36
cfn=(5009)
calls=2 4639 
* 58
cfn=(5008)
calls=1 4639 
* 217380
* 3
+4 9
cfi=(151)
cfn=(3280)
calls=3 1161 
* 309
+2 3
+1 6

fn=(5072) contain_volatile_functions_checker
965 15
+1 9
cfi=(272)
cfn=(5074) func_volatile
calls=3 1537 
* 45692
* 6
+1 6

fn=(5068)
959 4
+1 4
cfn=(5070) contain_volatile_functions_walker
calls=1 +11 
* 47304
+1 2

fn=(5070)
971 5
+1 2
+3 5
cfi=(247)
cfn=(4594)
calls=1 1659 
* 525
* 2
+4 4
+13 4
+7 5
cfi=(247)
cfn=(4450)
calls=1 1843 
* 46750
+2 2

fn=(5071) contain_volatile_functions_walker'2
971 15
+1 6
+3 15
cfi=(247)
cfn=(4594)
calls=3 1659 
* 46358
* 6
+4 12
+13 12
+7 15
cfi=(247)
cfn=(4451)
calls=3 1843 
* 243
+2 6

fn=(5088)
1466 4
+1 1
+2 5
cfn=(5090) contain_context_dependent_node_walker
calls=1 +7 
* 269
+1 2

fn=(5090)
1476 5
+1 2
+2 4
+2 4
+30 4
+18 5
cfi=(247)
cfn=(4450)
calls=1 1843 
* 243
+2 2

fn=(5091) contain_context_dependent_node_walker'2
1476 10
+1 4
+2 8
+2 8
+30 8
+18 10
cfi=(247)
cfn=(4451)
calls=2 1843 
* 96
+2 4

fn=(4636) is_parallel_safe
1089 75
+11 75
+1 45
-1 30
+2 30
+25 30

fn=(4590) max_parallel_hazard
1070 12
+3 3
+1 3
+1 3
+1 15
cfn=(4592)
calls=3 +91 
* 4402
+1 3
+1 6

fl=(274) /home/mithuncy/fsm_p11patch/src/backend/optimizer/plan/createplan.c
fn=(4706) make_result
6514 18
+1 12
cfi=(13)
cfn=(3400)
calls=3 853 
* 690
* 15
+1 6
+2 9
+1 6
+1 9
+1 6
+1 9
+2 3
+1 6

fn=(4692) create_plan
307 15
+7 6
+1 6
+3 18
cfn=(4694) create_plan_recurse
calls=3 +40 
* 3513
* 3
+9 12
+1 21
cfi=(266)
cfn=(4710)
calls=3 +12 
* 222
+9 15
cfi=(277) /home/mithuncy/fsm_p11patch/src/backend/optimizer/plan/subselect.c
cfn=(4712) SS_attach_initplans
calls=3 2228 
* 30
+3 12
+7 6
+2 3
+1 6

fn=(4704) order_qual_clauses
4899 15
+7 9
cfi=(252) /home/mithuncy/fsm_p11patch/src/backend/optimizer/plan/../../../../src/include/nodes/pg_list.h
cfn=(4624) list_length
calls=3 90 
* 24
* 3
+7 6
+1 6
+70 6

fn=(4694)
358 18
+4 3
cfi=(52)
cfn=(3958)
calls=3 3263 
* 81
+2 24
+34 12
+2 18
cfn=(4696) create_projection_plan
calls=3 1636 
* 3339
* 6
+15 3
+87 3
+1 6

fn=(4695) create_plan_recurse'2
358 18
+4 3
cfi=(52)
cfn=(3958)
calls=3 3263 
* 81
+2 24
+34 12
+6 12
+8 15
cfn=(4700) create_result_plan
calls=3 1269 
* 1143
* 3
+3 3
+87 3
+1 6

fn=(4702) build_path_tlist
744 30
+1 6
+1 24
+1 6
+3 30
cfi=(252)
cfn=(4484) list_head
calls=6 78 
* 54
* 12
+2 9
+9 12
+3 21
cfi=(218)
cfn=(4414) makeTargetEntry
calls=3 241 
* 636
* 3
+4 6
+1 27
+2 15
cfi=(45)
cfn=(960)
calls=3 129 
* 870
* 3
+1 3
-22 27
+24 6
+1 12

fn=(4708) copy_generic_path_info
4993 12
+1 12
+1 12
+1 12
+1 15
+1 12
+1 12
+1 6

fn=(4674) is_projection_capable_path
6698 18
+2 30
+32 6
+2 6
+1 12

fn=(4696)
1636 18
+4 3
+15 18
cfn=(4698) use_physical_tlist
calls=3 784 
* 51
* 6
+13 12
cfn=(4674)
calls=3 6698 
* 36
* 6
+8 21
cfn=(4695)
calls=3 358 
* 1323
* 3
+2 15
cfn=(4702)
calls=3 744 
* 1719
* 6
+21 12
+3 6
+1 9
+3 12
+1 12
+1 12
+1 15
+1 15
+11 3
+1 6

fn=(4698)
784 18
+1 9
+7 12
+1 6
894 6

fn=(4700)
1269 15
+5 15
cfn=(4702)
calls=3 744 
* 93
* 3
+3 18
cfn=(4704)
calls=3 4899 
* 69
* 3
+2 18
cfn=(4706)
calls=3 6514 
* 789
* 3
+2 15
cfn=(4708)
calls=3 4993 
* 93
+2 3
+1 6

fl=(74)
fn=(2692)
359 3
+1 5
+1 5
+1 2

fn=(1618) slist_push_head
575 4
+1 4
+1 3
+3 2

fn=(2274)
301 15
+1 12
+3 12
+1 9
+1 12
+1 9
+3 6
-10 15
+1 12
+3 12
+1 9
+1 12
+1 9
+3 6

fn=(2272) dlist_init
279 6
+1 14
+1 4

fl=(76)
fn=(1626)
78 6
+1 10
+1 4

fl=(17)
fn=(464)
175 25249
+10 7214
+5 14428
+1 18035
+1 3607
+1 3607
+1 3607
+1 21642
cfn=(466) dopr
calls=3607 377 
* 3954892
+1 7214
+1 32463
+1 3607
-1 3607
+2 7214

fn=(1238) trailing_pad
1512 33000
+1 13200
+2 13200

fn=(1232) adjust_sign
1448 405
+1 162
+5 162
+2 81
+1 162

fn=(466)
377 22008
+1 3668
cob=(5)
cfi=(5)
cfn=(472)
calls=3667 0 
* 11001
cob=(1)
cfi=(1)
cfn=(223)
calls=1 0 
* 941
* 3672
* 7336
+1 3668
+27 3668
+2 3668
+3 37020
+3 45565
cob=(3)
cfi=(3)
cfn=(536) strchrnul
calls=9112 0 
* 209828
cob=(1)
cfi=(1)
cfn=(223)
calls=1 0 
* 1328
* 9117
* 9113
+3 91130
cfn=(474) dostr
calls=9113 1358 
* 496384
+1 36452
+3 36452
+1 30
+1 18166
+8 18450
+1 7322
+3 3661
+3 14644
-3 5564
+3 22256
+2 2625
+1 41992
+2 6
cob=(3)
cfi=(3)
cfn=(424)
calls=2 0 
* 30
* 2
-2 5246
+2 7869
cob=(3)
cfi=(3)
cfn=(424)
calls=2623 0 
* 39617
* 2623
* 15750
cfn=(474)
calls=2625 1358 
* 193797
+1 10500
+2 2625
+3 59400
+1 33000
+1 19800
+1 26400
+2 43236
+1 50442
+10 196
+1 49
+11 490
+1 49
-1 510
+1 51
+85 1012
+3 506
+1 506
+20 324
+2 162
+3 162
+2 162
+11 162
+2 162
+1 76
+2 1226
+2 30
cfn=(1230) fmtint
calls=2 1015 
* 586
-2 225
+2 1125
cfn=(1230)
calls=75 1015 
* 19994
* 60
cfn=(1230)
calls=4 1015 
* 1390
+2 81
+5 26076
+2 13038
+3 13038
+2 13038
+11 13038
+2 13038
+1 9538
+2 114323
+2 90255
cfn=(1230)
calls=6017 1015 
* 1738830
* 7530
cfn=(1230)
calls=502 1015 
* 127784
+2 6519
+83 26400
408 55210
738 7336

fn=(474)
1358 110028
+2 36676
+2 39221
cfn=(476) dopr_outch
calls=5603 +33 
* 134268
+1 5603
+3 12735
+4 50928
+1 114210
+2 84
+1 25464
+11 50928
+1 101856
cob=(3)
cfi=(3)
cfn=(482)
calls=12731 0 
* 222727
cob=(1)
cfi=(1)
cfn=(223)
calls=1 0 
* 1310
* 12736
+1 89124
+1 38196
+1 25464
-23 50934
+25 36676

fn=(1236) leading_pad
1476 46200
+3 26454
+2 50
+6 100
+2 175
cfn=(1916) dopr_outchmulti
calls=25 -78 
* 889
+1 50
+3 100
+1 100
-1 26300
+1 26300
+2 14
cfn=(1916)
calls=2 -85 
* 99
+1 6
+2 13200
+8 13200

fn=(2434) pg_vfprintf
243 18
+4 6
+5 12
+1 9
+1 6
+1 3
+1 3
+1 18
cfn=(466)
calls=3 377 
* 931
+2 9
cfn=(2436) flushbuffer
calls=3 +40 
* 2085
+1 12
+1 6

fn=(2436)
299 12
+1 24
+6 21
+4 24
cob=(3)
cfi=(3)
cfn=(2442) fwrite
calls=2 0 
* 272
cob=(1)
cfi=(1)
cfn=(223)
calls=1 0 
* 1671
* 7
* 3
+1 24
+1 9
+3 12
+1 6

fn=(462)
203 6336
+4 3456
+1 3456
cfn=(464)
calls=576 -33 
* 319650
* 576
+2 576
+1 1152

fn=(1140) pg_vsprintf
215 348
+3 232
+1 58
+1 58
+1 58
+1 58
+1 348
cfn=(466)
calls=58 377 
* 25536
+1 116
+1 522
+1 58
-1 58
+2 116

fn=(1230)
1015 66000
+4 6600
+1 6600
+2 6600
+4 46200
+4 81
+1 81
+1 81
+6 6518
+1 6518
+1 6518
+6 1
+1 1
+1 1
+1 1
+11 13848
cfn=(1232)
calls=81 1448 
* 972
* 162
+3 13200
+9 13210
+7 413686
+1 127288
+1 63644
+3 52800
+2 52800
cfn=(1234) compute_padlen
calls=6600 1462 
* 118749
* 6600
+2 39600
cfn=(1236)
calls=6600 1476 
* 153237
+2 13200
+3 72600
cfn=(474)
calls=6600 1358 
* 468987
+2 33000
cfn=(1238)
calls=6600 1512 
* 59400
* 6600
+1 13200

fn=(1234)
1462 33000
+3 33000
+1 13200
+1 6549
+1 13200
+2 6600
+1 13200

fn=(2432)
265 33
+4 18
+1 18
cfn=(2434)
calls=3 -27 
* 3118
* 3
+2 3
+1 6

fn=(1138)
231 638
+4 348
+1 348
cfn=(1140)
calls=58 -21 
* 27566
* 58
+2 58
+1 116

fn=(1916)
1411 162
+2 54
+2 125
cfn=(476)
calls=25 -20 
* 450
+1 25
+3 2
+4 8
+1 9
+2 2
+1 4
+11 8
+1 16
cob=(3)
cfi=(3)
cfn=(828)
calls=2 0 
* 41
* 2
+1 14
+1 4
-22 8
+24 54

fn=(476)
1395 28140
+1 55926
+10 39396
+1 11256

fl=(42)
fn=(958)
188 144
+1 36
+20 72

fn=(934) scanner_isspace
222 344
+2 332
+1 160
+1 160
+1 160
+2 12
+1 80
+1 172

fn=(938) downcase_identifier
141 4144
+5 2590
cfi=(13)
cfn=(940)
calls=518 925 
* 63351
* 518
+1 518
cfi=(43) /home/mithuncy/fsm_p11patch/src/backend/utils/mb/wchar.c
cfn=(942) pg_database_encoding_max_length
calls=518 1834 
* 9324
* 1554
+11 1036
+2 35814
+2 21092
+1 48
+1 11989
+2 35814
-8 25430
+10 2590
+2 1036
+3 518
+1 1036

fn=(936) downcase_truncate_identifier
132 3626
+1 3108
cfn=(938)
calls=518 +8 
* 218402
+1 1036

fl=(151)
fn=(3014) SearchSysCache
1104 8040
+4 10050
cfi=(149) /home/mithuncy/fsm_p11patch/src/backend/utils/cache/catcache.c
cfn=(3016) SearchCatCache
calls=1005 +55 
* 27210233
+1 2010

fn=(3540) InitCatalogCachePhase2
1072 3
+5 2
+1 462
cfi=(149)
cfn=(3542) InitCatCachePhase2
calls=77 -34 
* 8004652
-1 233
+2 2

fn=(2894)
999 3
+10 3
+2 2
+2 385
+4 385
-4 1463
cfi=(149)
cfn=(2896) InitCatCache
calls=77 778 
* 89548
* 231
+6 385
+4 231
+1 385
-1 154
+2 231
+1 385
-1 154
+2 231
+1 385
-1 154
-16 233
+26 7
cfi=(36)
cfn=(864)
calls=1 114 
* 33366
+2 3
+2 608
+1 315
-3 307
+5 3
+2 7
cfi=(36)
cfn=(864)
calls=1 114 
* 76446
+2 3
+2 1224
+1 854
-3 615
+5 3
+2 1
+1 2

fn=(2904) oid_compare
1543 6448
+1 4836
+1 4836
+2 4836
+1 168
+1 6970
+1 3224

fn=(3012) GetSysCacheOid
1227 10050
+5 8040
cfn=(3014)
calls=1005 1104 
* 27230333
* 1005
+1 2010
+1 1002
+1 22292
cfi=(178)
cfn=(3238)
calls=502 428 
* 48192
* 1006
+4 1512
cfn=(3280)
calls=504 -78 
* 51912
+1 504
+1 2010

fn=(3280)
1161 13156
+1 9867
cfi=(149)
cfn=(3282) ReleaseCatCache
calls=3289 1452 
* 309166
+1 6578

fn=(4872) SearchSysCacheList
1427 32
+1 16
+1 12
-1 8
+4 40
cfi=(149)
cfn=(4874) SearchCatCacheList
calls=4 +90 
* 155243
+2 8

fn=(3336) RelationHasSysCache
1493 7131
+1 2377
+1 7131
+2 2377
+2 149592
+2 62330
+1 4754
+1 50445
+1 12628
+2 20796
-9 37398
+13 4754

fn=(4902) SearchSysCache2
1125 54
+5 72
cfi=(149)
cfn=(4904) SearchCatCache2
calls=9 +55 
* 114736
+1 18

fn=(3558) RelationSupportsSysCache
1518 315
+1 105
+1 315
+2 105
+2 7560
+2 3150
+1 210
+1 2625
+1 1076
+2 768
-9 1890
+13 210

fn=(3306)
1114 13925
+5 19495
cfi=(149)
cfn=(3308) SearchCatCache1
calls=2785 +58 
* 16156818
+1 5570

fn=(3334) RelationInvalidatesSnapshotsOnly
1470 7134
+1 20832
+11 2283
-11 570
+11 94
-2 2
+5 2377
+1 4756

fn=(3982)
1376 40
+7 20
+1 15
-1 10
+3 30
+6 215
cfi=(178)
cfn=(3238)
calls=3 428 
* 5247
* 3
+3 10

fl=(12)
fn=(2800)
251 7
+7 4
+4 3
+5 3
+18 2
+1 18
-1 11
+20 4
+2 12
cfi=(17)
cfn=(462)
calls=1 203 
* 923
* 1
+11 3
cob=(3)
cfi=(3)
cfn=(424)
calls=1 0 
* 21
* 1
* 3
+2 4
cfn=(2802)
calls=1 +12 
* 740
+2 2

fn=(2802)
332 30
+3 36
+4 20
+5 15
+5 50
cfi=(16)
cfn=(460)
calls=5 46 
* 624
+2 15
cob=(3)
cfi=(3)
cfn=(424)
calls=5 0 
* 115
* 5
* 5
+26 20
+1 80
cob=(3)
cfi=(3)
cfn=(828)
calls=4 0 
* 480
* 4
+2 10
+22 10

fn=(416) save_ps_display_args
127 6
+1 2
+1 2
+9 1
+7 2
+2 26
+1 42
cob=(3)
cfi=(3)
cfn=(424)
calls=2 0 
* 30
cob=(1)
cfi=(1)
cfn=(223)
calls=1 0 
* 1291
* 7
* 6
-3 15
+6 2
+10 2
+2 600
+1 840
cob=(3)
cfi=(3)
cfn=(424)
calls=60 0 
* 1516
* 60
* 120
-3 548
+6 3
+1 8
+5 6
cob=(1)
cfi=(1)
cfn=(223)
calls=1 0 
* 1445
* 5
* 1
+1 2
+5 2
+2 780
cob=(3)
cfi=(3)
cfn=(384)
calls=60 0 
* 17802
* 60
* 60
+1 480
-3 548
+9 6
+1 2
+22 6
cob=(3)
cfi=(3)
cfn=(388)
calls=1 0 
* 188
* 1
* 1
+1 2
+5 2
+2 39
cob=(3)
cfi=(3)
cfn=(384)
calls=3 0 
* 732
* 3
* 3
+1 24
-3 15
+9 6
+11 2
+4 1
+1 4

fl=(14)
fn=(432)
395 16380
+33 6548
+2 3068
+1 412
+2 204
+2 2
+5 3276
+2 8180
+2 6544
+3 4542
+1 6056
+1 7570
+3 4542
+3 13626
cfi=(13)
cfn=(434) MemoryContextCreate
calls=1514 729 
* 76222
+6 3028
+5 124
+2 248
+1 10
+2 488
+6 366
cob=(3)
cfi=(3)
cfn=(388)
calls=122 0 
* 26130
* 122
* 6
cob=(3)
cfi=(3)
cfn=(388)
calls=2 0 
* 349
* 2
* 124
+1 248
+17 372
+1 372
+1 496
+1 620
+1 248
+1 248
+6 372
+2 372
+3 12276
+2 372
+1 372
+1 372
+1 372
+21 248
+1 124
+2 1536
-2 768
+1 768
-1 884
+1 372
-1 248
+5 1116
cfi=(13)
cfn=(434)
calls=124 729 
* 6492
+6 124
+1 8190

fn=(800) AllocSetAlloc
715 872105
+1 348842
+13 697684
+2 15432
+1 11574
+1 11574
cob=(3)
cfi=(3)
cfn=(388)
calls=3858 0 
* 1202847
* 3858
* 3858
+1 7716
+2 11574
+1 34722
+2 11574
+1 11574
+1 11574
+16 15432
+2 15432
+1 19290
+1 15432
+1 2044
+1 19290
+18 11574
+9 511689
cfn=(802) AllocSetFreeIndex
calls=170563 338 
* 3626234
* 170563
+1 1023378
+1 341126
+4 226954
+2 97266
+22 97266
+6 966987
+7 690705
+2 1105128
+2 552564
+14 1608
+2 5124
+1 5124
cfn=(802)
calls=1708 338 
* 37386
* 1708
+7 13664
+2 1631
+2 11417
+3 4893
+5 11417
+1 9786
+2 4893
+4 11417
+1 9786
-30 3262
+17 231
+5 539
+1 462
+2 231
+4 539
+1 462
-30 3370
+34 1608
+7 276282
+8 4824
+1 8040
+1 9648
+1 8
+6 6
+1 2
-1 4818
+1 1606
+1 508
-1 6348
+4 4824
cob=(3)
cfi=(3)
cfn=(388)
calls=1608 0 
* 354698
* 1608
* 1608
+6 4824
+8 3216
+3 4824
+1 6432
+1 8040
+6 3216
+1 6432
+1 6432
+1 6432
+1 4824
+6 4824
+5 11256
+3 4824
+1 4824
+21 3216
+1 3216
-31 409599
+5 955731
+3 409599
+1 409599
+21 273066
+1 345626

fn=(956) AllocSetFree
988 214035
+1 85614
+1 128421
+15 256842
+6 10041
+7 13388
+1 13388
-1 6694
+2 6694
+1 6694
-1 10041
-1 6694
+6 13388
+1 20082
+3 13388
+1 2520
+4 1512
cob=(3)
cfi=(3)
cfn=(590)
calls=504 0 
* 58984
* 504
* 8529
cob=(3)
cfi=(3)
cfn=(590)
calls=2843 0 
* 383994
* 2843
* 3347
+5 157840
cfn=(802)
calls=39460 338 
* 841591
* 39460
+2 276220
+10 236760
+2 85614

fn=(1402) AllocSetDelete
628 6156
+1 3078
+1 4617
+13 6156
+2 9234
+6 7695
+1 4596
cfi=(13)
cfn=(1404) MemoryContextResetOnly
calls=1532 156 
* 586727
+6 6156
+16 6156
+1 4617
+1 7695
+2 1539
+20 3078

fn=(802)
338 635193
+5 423462
+2 799536
+11 599652
+1 1400328
+5 11847
+2 11847
+1 23694
-1 199884
+1 399768

fn=(1516) AllocSetRealloc
1069 12
+1 4
+1 6
+6 6
+15 6
+45 8
+7 6
+9 8
+1 8
-1 4
+2 4
+1 4
-1 6
-1 4
+6 8
+1 6
+1 10
cob=(3)
cfi=(3)
cfn=(556)
calls=2 0 
* 2062
* 2
* 2
+1 4
+6 18
+3 6
+1 6
+1 8
+1 10
+3 8
+2 6
+38 4
+51 4

fn=(1406) AllocSetReset
566 12152
+1 6076
+11 300762
+2 9114
+3 12152
+2 3038
+2 15237
+2 20316
+3 9114
+8 9114
+1 6076
+1 9114
+8 6123
cob=(3)
cfi=(3)
cfn=(590)
calls=2041 0 
* 361581
* 2041
+2 10158
-27 16234
+31 12152
+1 6076

fl=(125) /home/mithuncy/fsm_p11patch/src/backend/utils/hash/../../../../src/include/storage/s_lock.h
fn=(2216) tas
225 116884
+1 29221
+2 146105
+6 29221
+1 87663

fl=(161) /home/mithuncy/fsm_p11patch/src/backend/access/transam/../../../../src/include/utils/palloc.h
fn=(2956) MemoryContextSwitchTo
110 24
+1 16
+2 16
+1 8
+1 16

fl=(268)
fn=(4654)
90 21
+1 35
+1 14
-2 9
+1 15
+1 6

fn=(4642)
78 36
+1 60
+1 24
-2 45
+1 63
+1 30
-2 27
+1 39
+1 18
-2 27
+1 45
+1 18

fl=(152) /home/mithuncy/fsm_p11patch/src/backend/utils/cache/../../../../src/include/utils/palloc.h
fn=(2898) MemoryContextSwitchTo
110 10770
+1 7180
+2 7180
+1 3590
+1 7180
-5 4563
+1 3042
+2 3042
+1 1521
+1 3042
-5 4206
+1 2804
+2 2804
+1 1402
+1 2804

fl=(191) /home/mithuncy/fsm_p11patch/src/backend/access/nbtree/nbtsearch.c
fn=(3454) _bt_search
99 28470
+1 2847
+1 2847
+3 14235
cfi=(192) /home/mithuncy/fsm_p11patch/src/backend/access/nbtree/nbtpage.c
cfn=(3456) _bt_getroot
calls=2847 253 
* 3958360
* 5694
+3 11388
+1 8
+26 95149
cfn=(3470) _bt_moveright
calls=5597 253 
* 830137
* 11194
+5 67164
+1 33582
+1 33582
+1 2843
+47 5686
-41 24786
cfn=(3482) _bt_binsrch
calls=2754 358 
* 2300302
* 2754
+1 24786
+1 19278
+1 27540
+1 11016
cfi=(50)
cfn=(3476)
calls=2754 2612 
* 44064
* 2754
+12 5508
cfi=(13)
cfn=(940)
calls=2754 925 
* 284771
* 2754
+1 8262
+1 8262
+1 8262
+1 8262
+7 16524
+4 19278
cfi=(192)
cfn=(3466) _bt_relandgetbuf
calls=2754 866 
* 4631974
* 5508
+3 5508
+1 2754
+23 2843
+1 5694

fn=(3518) _bt_next
1162 1565
+1 939
+7 626
+2 3443
+2 50
cfn=(3520) _bt_steppage
calls=10 1375 
* 3727
* 30
+1 18
+13 3648
+1 1824
+1 1216
+3 304
+1 626

fn=(3522) _bt_readnextpage
1482 3647
+1 1563
+4 521
+2 1563
+2 1042
+8 4118
+2 1551
cfi=(188) /home/mithuncy/fsm_p11patch/src/backend/access/nbtree/nbtree.c
cfn=(3524) _bt_parallel_done
calls=517 721 
* 8272
+1 5170
+1 1034
+3 12
+2 24
cfi=(192)
cfn=(3458) _bt_getbuf
calls=4 730 
* 5259
* 8
+1 48
+1 28
cfi=(193) /home/mithuncy/fsm_p11patch/src/backend/access/nbtree/../../../../src/include/storage/bufmgr.h
cfn=(3472) TestForOldSnapshot
calls=4 266 
* 44
+1 24
+2 24
+2 28
cfi=(92)
cfn=(3478) PredicateLockPage
calls=4 2476 
* 112
+3 32
cfn=(3488) _bt_readpage
calls=2 1217 
* 1748
* 10
cfn=(3488)
calls=2 1217 
* 1390
* 8
+1 8
1649 4
+1 2084

fn=(3482)
358 50373
+8 50373
+1 33582
+2 33582
+1 7776
-1 3653
+1 53791
+9 16791
+15 16791
+2 22388
+2 4383
-2 1214
+2 1214
+2 367440
+4 244960
cfn=(3484) _bt_compare
calls=30620 +59 
* 7752140
* 30620
+2 91860
+1 61112
+2 30684
-11 108651
+21 33582
+1 5686
+8 5508
+1 11194

fn=(3440) _bt_first
569 17082
+1 8541
+1 8541
+10 2847
+2 2847
+7 25623
+6 8541
cfi=(111) /home/mithuncy/fsm_p11patch/src/backend/access/nbtree/nbtutils.c
cfn=(3442) _bt_preprocess_keys
calls=2847 757 
* 1238823
+6 14235
+9 11388
+64 2847
+1 11388
+12 2847
+1 2847
+2 2847
+7 11388
+2 47236
+6 8962
+25 8962
+2 26886
+6 13443
+1 8962
+2 1214
+1 1214
+10 15496
+1 8170
-1 3268
+7 4902
+1 1634
+1 1634
+10 35848
+14 7748
+1 3874
+3 1214
+2 1214
+1 1821
+4 607
-99 1214
799 607
698 7748
799 3874
+8 5694
+22 5694
+2 17924
+4 22405
+91 49291
+1 8962
-1 8962
+5 35848
cfi=(190) /home/mithuncy/fsm_p11patch/src/backend/access/index/indexam.c
cfn=(3448) index_getprocinfo
calls=4481 -72 
* 172930
* 4481
+1 26886
+2 8962
-2 80658
cfi=(184)
cfn=(3450) ScanKeyEntryInitializeWithInfo
calls=4481 109 
* 353999
-4 4481
-99 26465
978 17082
+32 4480
+15 2240
+1 2240
+2 2240
+18 607
+1 607
+1 607
+12 31317
cfn=(3454)
calls=2847 99 
* 12576630
* 2847
+4 8541
cfi=(111)
cfn=(3474) _bt_freestack
calls=2847 176 
* 287253
+2 8541
+6 24
cfi=(92)
cfn=(3146)
calls=4 2453 
* 108
+6 12
cfi=(188)
cfn=(3524)
calls=4 721 
* 64
+1 40
+2 8
+3 14215
cfi=(50)
cfn=(3476)
calls=2843 2612 
* 45488
* 17058
cfi=(92)
cfn=(3478)
calls=2843 2476 
* 79604
+3 14215
cfn=(3480) _bt_initialize_more_data
calls=2843 1981 
* 48331
+3 22744
cfn=(3482)
calls=2843 358 
* 6739046
* 2843
+20 5686
+5 8529
+5 17058
cfn=(3488)
calls=2843 +97 
* 2465768
* 8529
+6 2555
cfi=(50)
cfn=(3232)
calls=511 3553 
* 57743
+1 2555
cfn=(3520)
calls=511 1375 
* 187928
* 1533
+1 1016
+5 13992
cfn=(3496) _bt_drop_lock_and_maybe_pin
calls=2332 58 
* 904816
+5 28020
+1 14010
+1 9340
+3 2335
+1 11388

fn=(3470)
253 61567
+20 22388
+4 8766
-4 1214
+4 41607
+1 33582
cfi=(193)
cfn=(3472)
calls=5597 -12 
* 61567
+1 33582
+2 22388
+1 3653
+5 3888
+21 25272
cfn=(3484)
calls=1944 463 
* 456402
* 3888
+10 33582
+4 5597
+1 11194

fn=(3480)
1981 11372
+2 5686
+2 5686
+1 8529
+7 5686
+1 5686
+1 5686

fn=(3494) _bt_saveitem
1347 21112
+1 29029
+2 15834
+1 7917
+1 10556
+8 5278

fn=(3496)
58 11680
+1 11680
cfi=(50)
cfn=(3232)
calls=2336 3553 
* 263968
+2 11680
+1 9344
-1 4672
+2 7008
-1 4672
+3 9344
cfi=(50)
cfn=(3258)
calls=2336 3316 
* 562989
+1 4672
+2 4672

fn=(3488)
1217 19929
+1 8541
+15 34164
+1 17082
+3 11388
+8 17082
+1 7784
-1 901
+1 23533
+6 11388
cfi=(50)
cfn=(3476)
calls=2847 2612 
* 45552
* 5694
+7 11388
cfi=(50)
cfn=(3490) BufferGetLSNAtomic
calls=2847 2839 
* 136656
* 5694
+7 11388
+3 5694
+8 5694
+3 2847
+2 11388
+2 2847
+2 43760
cfi=(111)
cfn=(3492) _bt_checkkeys
calls=5470 +87 
* 1806034
* 5470
+1 10940
+3 15834
cfn=(3494)
calls=2639 +57 
* 89726
+1 2639
+2 21880
+3 5662
+1 2831
+3 2639
-16 16458
+20 5694
+1 11388
+1 8541
+34 17082
+1 5694

fn=(3484)
463 293076
+1 97692
+1 195384
+10 268878
+1 654
+2 354607
+14 64474
+6 2649543
cfi=(196) /home/mithuncy/fsm_p11patch/src/backend/access/common/indextuple.c
cfn=(3516) nocache_index_getattr
calls=1023 214 
* 227580
* 36158
+3 175675
+9 105405
+17 316215
cfi=(171)
cfn=(3240)
calls=35135 1134 
* 2713446
* 35135
+5 175675
+1 160724
+4 29902
-4 20184
+4 40368
+1 60992
+2 4639
-48 115267
+52 1741
+1 65128

fn=(3520)
1375 2605
+1 1563
+1 521
+1 521
+5 2084
+7 2084
+15 1042
+3 2084
+18 1563
+4 1042
+3 4128
cfi=(50)
cfn=(3258)
calls=511 3316 
* 123151
* 1533
+28 3126
cfn=(3522)
calls=521 +21 
* 39376
* 1563
+1 1034
+3 24
cfn=(3496)
calls=4 58 
* 1565
+2 4
+1 1042

fl=(304)
fn=(5256)
378 2000
+2 3000
+1 1000
+3 1000

fl=(10) /home/mithuncy/fsm_p11patch/src/backend/main/main.c
fn=(374) main
61 5
+1 1
+10 4
cfi=(11)
cfn=(376)
calls=1 454 
* 59185
* 1
+5 3
cfn=(414) startup_hacks
calls=1 247 
* 6
+13 5
cfi=(12)
cfn=(416)
calls=1 +37 
* 27357
* 1
+9 1
cfi=(13)
cfn=(430) MemoryContextInit
calls=1 -6 
* 904
+11 5
cfi=(15)
cfn=(438)
calls=1 566 
* 28137
+24 4
cfn=(560) init_locale
calls=1 308 
* 18346
+1 4
cfn=(560)
calls=1 308 
* 8632
+4 4
cfn=(560)
calls=1 308 
* 8269
+7 4
cfn=(560)
calls=1 308 
* 3616
+1 4
cfn=(560)
calls=1 308 
* 3651
+1 4
cfn=(560)
calls=1 308 
* 3700
+7 2
cob=(1)
cfi=(1)
cfn=(223)
calls=1 0 
* 4126
* 5
+2 1
cfi=(18)
cfn=(622)
calls=1 994 
* 2210
+6 2
+2 6
cob=(3)
cfi=(3)
cfn=(446)
calls=1 0 
* 22
* 1
* 8
cob=(3)
cfi=(3)
cfn=(446)
calls=1 0 
* 22
* 1
* 2
+5 6
cob=(3)
cfi=(3)
cfn=(446)
calls=1 0 
* 22
* 1
* 8
cob=(3)
cfi=(3)
cfn=(446)
calls=1 0 
* 22
* 1
* 2
+16 6
cob=(3)
cfi=(3)
cfn=(446)
calls=1 0 
* 22
* 1
* 2
+2 8
cob=(3)
cfi=(3)
cfn=(446)
calls=1 0 
* 22
* 1
* 2
+8 2
+1 3
cfn=(632) check_root
calls=1 387 
* 2596
+22 8
cob=(3)
cfi=(3)
cfn=(446)
calls=1 0 
* 22
* 1
* 2
+2 8
cob=(3)
cfi=(3)
cfn=(446)
calls=1 0 
* 22
* 1
* 2
+2 8
cob=(3)
cfi=(3)
cfn=(446)
calls=1 0 
* 22
* 1
* 2
+5 5
cfi=(20)
cfn=(646)
calls=1 577 
* 397125417

fn=(414)
247 3
+48 1
+1 2

fn=(560)
308 36
+1 30
cfi=(18)
cfn=(562)
calls=6 152 
* 46124
* 12
+4 12

fn=(632)
387 5
+2 1
cob=(1)
cfi=(1)
cfn=(223)
calls=1 0 
* 1278
* 5
* 2
+17 1
cob=(1)
cfi=(1)
cfn=(223)
calls=1 0 
* 1287
* 5
* 2
cob=(3)
cfi=(3)
cfn=(638) geteuid
calls=1 0 
* 3
* 1
* 2
+17 4

fl=(19)
fn=(3716) pg_server_to_client
624 145
+1 232
cfn=(3718) pg_server_to_any
calls=29 +10 
* 493
+1 58

fn=(3816) pg_any_to_server
562 616007
+1 176002
+1 1000
+2 437505
+6 612507
cfi=(43)
cfn=(3818) pg_verify_mbstr
calls=87501 1878 
* 8171650
+1 175002
+42 352004

fn=(614) SetMessageEncoding
909 6
+4 10
+2 4

fn=(922) SetClientEncoding
202 20
+7 20
+4 20
+2 8
+1 8
+3 1
cfn=(612) GetDatabaseEncoding
calls=1 1005 
* 6
* 1
+5 3
+4 5
+1 1
+1 1
+1 2
+44 10

fn=(2650)
1011 6
+1 6
+1 6

fn=(3564)
899 4
+1 4
+3 5
+2 2

fn=(612)
1005 3044
+1 3044
+1 3044

fn=(3718)
635 174
+1 58
+3 145
+2 58
+18 58

fn=(918) PrepareClientEncoding
104 20
+4 20
+4 20
+1 8
+2 1
cfn=(612)
calls=1 1005 
* 6
* 1
+5 3
+3 2
+69 10

fn=(3572) pg_encoding_mbcliplen
832 14
+2 2
+4 6
cfi=(43)
cfn=(3574) pg_encoding_max_length
calls=2 1821 
* 26
* 4
+3 18
+2 2
+2 32
cfi=(43)
cfn=(3576) pg_utf_mblen
calls=8 542 
* 96
* 8
+1 40
+2 16
+1 24
+2 16
+1 24
-9 52
+11 2
+1 4

fn=(3814) pg_client_to_server
546 5
+1 8
cfn=(3816)
calls=1 +15 
* 2677
+1 2

fn=(5238) pg_get_client_encoding
307 1000
+1 1000
+1 1000

fn=(3590)
283 4
+2 1
+2 3
cfn=(918)
calls=1 104 
* 27
* 2
+1 3
cfn=(922)
calls=1 -86 
* 34
-1 2
+13 4

fn=(3570) pg_mbcliplen
821 12
+1 14
cfn=(3572)
calls=2 +10 
* 386
+2 4

fl=(219)
fn=(4292)
78 12
+1 12
+1 8
-2 6
+1 6
+1 4
-2 60
+1 60
+1 40
-2 12
+1 20
+1 8
-2 6
+1 10
+1 4
-2 21
+1 33
+1 14
-2 6
+1 6
+1 4
-2 36
+1 60
+1 24

fn=(4828)
90 3
+1 5
+1 2
-2 3
+1 5
+1 2

fn=(3882)
84 3
+1 5
+1 2
-2 3
+1 5
+1 2

fl=(258)
fn=(4646) standard_qp_callback
3442 18
+1 9
+1 6
+1 9
+1 9
+7 12
+7 6
+3 6
+9 6
+2 12
+7 6
+3 21
cfi=(269)
cfn=(4648)
calls=3 877 
* 75
-1 6
+23 12
+2 12
+2 12
cfi=(252)
cfn=(4624)
calls=3 90 
* 24
* 3
+1 12
cfi=(252)
cfn=(4624)
calls=3 90 
* 24
-1 6
+3 12
+3 6
+1 12

fn=(4690) get_cheapest_fractional_path
5780 15
+1 9
+4 9
+1 6
+18 6

fn=(4586)
268 18
+3 9
+3 18
cfn=(4588) standard_planner
calls=3 +6 
* 266455
* 3
+1 3
+1 6

fn=(4596) subquery_planner
604 30
+9 12
cfi=(13)
cfn=(3400)
calls=3 853 
* 1782
* 15
+1 9
+1 9
+1 15
+1 9
+1 6
+1 6
+1 9
+1 6
+1 6
+1 6
+1 6
+1 6
+1 6
+1 18
cob=(3)
cfi=(3)
cfn=(828)
calls=3 0 
* 48
* 3
+1 18
cob=(3)
cfi=(3)
cfn=(828)
calls=3 0 
* 48
* 3
+1 6
+1 6
+1 6
+1 6
+1 6
+1 9
+1 6
+3 6
+1 6
+1 6
+6 12
+9 12
+8 9
cfi=(260) /home/mithuncy/fsm_p11patch/src/backend/optimizer/prep/prepjointree.c
cfn=(4598) inline_set_returning_functions
calls=3 -89 
* 69
+6 9
cfi=(260)
cfn=(4602) pull_up_subqueries
calls=3 -58 
* 225
+8 12
+10 6
+1 6
+1 3
+1 12
cfi=(252)
cfn=(4484)
calls=3 78 
* 24
* 12
+20 9
cfn=(4606) preprocess_rowmarks
calls=3 2498 
* 66
+10 9
cfi=(262)
cfn=(4608)
calls=3 1474 
* 117
+7 18
+3 6
+9 21
cfn=(4612) preprocess_expression
calls=3 1008 
* 223596
-1 6
+5 12
+3 3
+1 12
cfi=(252)
cfn=(4484)
calls=3 78 
* 24
* 12
+9 9
+3 21
cfn=(4612)
calls=3 1008 
* 36
-1 6
+4 18
cfn=(4620) preprocess_qual_conditions
calls=3 1095 
* 171
+2 21
cfn=(4612)
calls=3 1008 
* 36
* 6
+3 12
cfi=(252)
cfn=(4484)
calls=3 78 
* 24
* 12
+11 21
cfn=(4612)
calls=3 1008 
* 36
* 6
+2 21
cfn=(4612)
calls=3 1008 
* 36
* 6
+3 12
+22 21
cfn=(4612)
calls=3 1008 
* 36
-1 6
+5 12
cfi=(252)
cfn=(4484)
calls=3 78 
* 24
* 12
+74 12
+41 3
+1 12
cfi=(252)
cfn=(4484)
calls=3 78 
* 24
* 12
+27 9
+3 9
cfn=(4622) remove_useless_groupby_columns
calls=3 2917 
* 81
+7 6
+7 12
+4 21
cfn=(4626) grouping_planner
calls=3 1651 
* 23986
+6 9
cfi=(277)
cfn=(4684) SS_identify_outer_params
calls=3 2109 
* 36
+8 15
cfi=(265) /home/mithuncy/fsm_p11patch/src/backend/optimizer/util/relnode.c
cfn=(4678) fetch_upper_rel
calls=3 1155 
* 162
* 3
+1 15
cfi=(277)
cfn=(4688) SS_charge_for_initplans
calls=3 2171 
* 36
+7 9
cfi=(267) /home/mithuncy/fsm_p11patch/src/backend/optimizer/util/pathnode.c
cfn=(4644) set_cheapest
calls=3 245 
* 1092
+2 3
+1 12

fn=(4668) apply_scanjoin_target_to_paths
6887 33
+3 36
+2 3
cfi=(52)
cfn=(3958)
calls=3 3263 
* 81
+6 12
+26 9
cfi=(252)
cfn=(4670) list_tail
calls=3 84 
* 30
* 9
+3 6
+31 9
cfi=(252)
cfn=(4484)
calls=3 78 
* 30
* 6
+9 12
cfi=(252)
cfn=(4484)
calls=3 78 
* 30
* 6
+2 9
+5 6
+5 18
cfi=(267)
cfn=(4672) create_projection_path
calls=3 2388 
* 1041
* 3
+2 9
-14 21
+19 12
cfi=(252)
cfn=(4484)
calls=3 78 
* 24
* 12
+22 15
+11 12
+55 48
+1 18
cfi=(275) /home/mithuncy/fsm_p11patch/src/backend/optimizer/path/allpaths.c
cfn=(4676) generate_gather_paths
calls=3 2579 
* 42
+7 9
cfi=(267)
cfn=(4644)
calls=3 245 
* 1092
+1 6

fn=(4612)
1008 126
+6 42
+1 36
+11 12
+22 15
cfi=(259)
cfn=(4614)
calls=3 2494 
* 223494
* 3
+5 6
+11 15
+9 12
+9 6
+3 3
+1 42

fn=(4588)
280 18
+17 12
cfi=(13)
cfn=(3400)
calls=3 853 
* 711
* 15
+2 9
+1 6
+1 6
+1 6
+1 6
+1 6
+1 6
+1 6
+1 6
+1 6
+1 6
+1 6
+1 6
+1 6
+1 6
+1 6
+32 21
+2 6
-1 6
+2 9
-1 6
+2 3
-1 6
+2 3
-1 6
+2 3
-1 6
+4 9
cfi=(259)
cfn=(4590)
calls=3 1070 
* 4447
* 6
+1 21
+26 12
+1 3
-1 18
+4 12
+24 6
+4 24
cfn=(4596)
calls=3 604 
* 252661
* 3
+4 15
cfi=(265)
cfn=(4678)
calls=3 1155 
* 162
* 3
+1 18
cfn=(4690)
calls=3 5780 
* 45
* 3
+2 15
cfi=(274)
cfn=(4692)
calls=3 307 
* 3888
* 3
+6 12
+10 9
+51 12
+18 15
cfi=(251)
cfn=(4714) set_plan_references
calls=3 210 
* 2948
* 3
+3 12
cfi=(252)
cfn=(4484)
calls=3 78 
* 24
* 15
cfi=(252)
cfn=(4484)
calls=3 78 
* 24
* 12
+9 12
cfi=(13)
cfn=(3400)
calls=3 853 
* 732
* 15
+2 12
+1 12
+1 18
+1 12
+1 12
+1 12
+1 12
+1 12
+1 9
+1 12
+1 12
+1 12
+1 12
+1 12
+1 12
+1 12
+1 12
+1 12
+2 12
+1 12
+1 12
+2 6
+1 21
+1 9
-1 6
+24 3
+1 6

fn=(4620)
1095 15
+1 6
+2 12
+4 12
+2 6
+3 12
cfi=(252)
cfn=(4484)
calls=3 78 
* 24
* 12
+3 21
cfn=(4612)
calls=3 1008 
* 36
* 9
+14 6

fn=(4626)
1651 33
+1 9
+2 3
+1 3
+1 6
+1 3
+10 24
+14 9
+2 12
+88 3
+1 3
+1 3
+7 12
+7 12
+5 9
cfi=(263) /home/mithuncy/fsm_p11patch/src/backend/optimizer/prep/preptlist.c
cfn=(4628) preprocess_targetlist
calls=3 71 
* 189
* 3
+9 9
+15 207
+1 12
+14 12
+16 12
+9 12
+1 6
-1 6
+2 6
-1 6
+2 6
-1 6
+2 6
-1 6
+2 6
-1 6
+2 6
-1 6
+4 9
+3 6
+1 6
+3 12
-2 3
+11 21
cfi=(264) /home/mithuncy/fsm_p11patch/src/backend/optimizer/plan/planmain.c
cfn=(4630) query_planner
calls=3 56 
* 6420
* 3
+10 9
cfi=(266)
cfn=(4652)
calls=3 588 
* 1962
* 15
cfi=(271) /home/mithuncy/fsm_p11patch/src/backend/optimizer/path/costsize.c
cfn=(4656) set_pathtarget_cost_width
calls=3 5257 
* 6175
* 3
+2 6
-1 12
cfi=(259)
cfn=(4636)
calls=3 1089 
* 57
* 3
+8 12
+10 6
+1 6
+8 6
+10 6
+1 6
+8 6
+1 6
-1 12
+1 6
-1 6
+1 15
-1 6
+2 6
+8 6
+1 6
+9 12
+30 9
+1 9
+1 9
+1 12
cfi=(45)
cfn=(1586)
calls=3 260 
* 870
* 3
+1 3
+4 9
cfi=(252)
cfn=(4624)
calls=3 90 
* 30
+1 30
cfi=(273) /home/mithuncy/fsm_p11patch/src/backend/nodes/equalfuncs.c
cfn=(4666) equal
calls=3 2987 
* 48
* 9
-1 6
+2 30
cfn=(4668)
calls=3 6887 
* 2709
+12 9
+1 9
+1 9
+7 6
+19 6
+21 12
+14 12
+18 15
cfi=(265)
cfn=(4678)
calls=3 1155 
* 3102
* 3
+9 12
+1 18
cfi=(259)
cfn=(4636)
calls=3 1089 
* 57
-1 6
+2 18
cfi=(259)
cfn=(4636)
calls=3 1089 
* 57
-1 6
+2 6
+5 12
+1 12
+1 12
+1 12
+6 12
cfi=(252)
cfn=(4484)
calls=3 78 
* 30
* 6
+2 9
+9 12
+10 9
cfn=(4682) limit_needed
calls=3 2860 
* 48
* 6
+12 12
+59 15
cfi=(267)
cfn=(4640) add_path
calls=3 423 
* 1020
-92 21
+99 24
+16 12
+7 9
+5 21

fn=(4682)
2860 9
+3 9
+1 6
+12 9
+1 6
+17 3
+1 6

fn=(4606)
2498 12
+1 9
+6 12
+17 12
+1 6
-1 6
+2 3
+78 6

fn=(4622)
2917 15
+1 9
+7 12
cfi=(252)
cfn=(4624)
calls=3 90 
* 24
* 6
+1 3
3049 12

fl=(311)
fn=(5392) visibilitymap_pin_ok
245 2500
+1 3500
+2 2500
cfi=(50)
cfn=(3476)
calls=500 2612 
* 8000
* 2500
+1 1000

fn=(5404)
170 4000
+1 3500
+1 6000
+1 2000
+1 3000
+2 500
+8 2500
cfi=(50)
cfn=(3476)
calls=500 2612 
* 8000
* 1000
+3 2000
cfi=(50)
cfn=(3232)
calls=500 3553 
* 82500
+1 5000
+2 5000
+2 6500
+2 1500
cfi=(50)
cfn=(5406)
calls=500 1457 
* 46500
+1 500
+3 2000
cfi=(50)
cfn=(3232)
calls=500 3553 
* 57000
+2 500
+1 1000

fn=(5386) visibilitymap_pin
221 3000
+1 3500
+3 2000
+7 3000
cfn=(5388) vm_readbuf
calls=500 575 
* 1915970
* 1000
+1 1000

fn=(5388)
575 4000
+10 2000
+6 2500
+2 2500
cfi=(140)
cfn=(5368) smgrexists
calls=500 303 
* 1259027
* 1000
+1 3500
cfi=(140)
cfn=(3162) smgrnblocks
calls=500 +94 
* 77000
* 1000
+7 2500
+27 3500
cfi=(50)
cfn=(3194)
calls=500 +14 
* 548943
* 500
+2 5500
+7 500
+1 2000

fl=(87)
fn=(2132) InitShmemAllocation
113 3
+1 2
+9 2
cfn=(2130) ShmemAllocUnlocked
calls=1 228 
* 32
* 1
+2 2
+8 6
-1 1
+2 7
+3 2
+1 1
+7 2
cfn=(2134)
calls=1 +13 
* 67
-1 1
+2 5
cob=(3)
cfi=(3)
cfn=(828)
calls=1 0 
* 16
* 1
+1 2

fn=(2136) ShmemAllocNoError
177 2008
+16 2008
+4 1506
cfi=(116) /home/mithuncy/fsm_p11patch/src/backend/storage/ipc/../../../../src/include/storage/s_lock.h
cfn=(2138) tas
calls=502 +28 
* 7028
* 1004
+2 1506
+2 2008
+1 2008
+2 2008
+1 2008
+5 1004
+5 502
+1 1004

fn=(2162) ShmemInitHash
322 56
+11 21
cfi=(31)
cfn=(2164) hash_select_dirsize
calls=7 780 
* 1164
* 42
+1 14
+1 7
+3 35
cfi=(31)
cfn=(2166) hash_get_shared_size
calls=7 804 
* 70
* 42
cfn=(2168)
calls=7 +35 
* 6821
* 7
+8 21
+4 21
+2 42
cfi=(31)
cfn=(794)
calls=7 -35 
* 691873
+1 14

fn=(2000)
493 636
+3 408
+1 16
+1 294
+2 490
+4 98
+1 424

fn=(2002)
476 912
+3 608
+2 912
+4 152
+1 608

fn=(2126) InitShmemAccess
98 3
+1 2
+2 2
+1 2
+1 5
+1 2

fn=(2134)
158 40
+3 24
cfn=(2136)
calls=8 +16 
* 408
* 8
+1 16
+5 8
+1 32

fn=(2160) InitShmemIndex
273 3
+12 1
+1 1
+1 1
+2 8
cfn=(2162)
calls=1 +33 
* 3234
* 1
+3 2

fn=(2168)
373 364
+4 260
cfi=(99)
cfn=(2170)
calls=52 1122 
* 7124
+2 156
+2 2
+5 3
+18 3
cfn=(2134)
calls=1 158 
* 67
* 1
+1 3
+1 2
+2 4
cfi=(99)
cfn=(2182)
calls=1 1726 
* 91
+1 2
+5 51
-1 306
cfi=(31)
cfn=(836)
calls=51 910 
* 37238
* 51
+3 102
+9 204
+20 153
cfn=(2136)
calls=51 177 
* 2601
* 51
+1 102
+11 153
+1 153
+3 204
cfi=(99)
cfn=(2182)
calls=51 1726 
* 4641
+6 51
+1 208

fn=(2130)
228 10
+8 8
+4 6
+2 8
+1 8
+5 6
+2 8
+4 2
+1 8

fl=(36)
fn=(864)
114 63
+14 672
+1 32
-1 44
+1 88
+2 20
+1 45
+2 381
cfn=(872) swapfunc
calls=9 -47 
* 756
-1 66
-1 421
cfi=(151)
cfn=(2904)
calls=13 1543 
* 252
cfi=(29)
cfn=(866)
calls=18 4918 
* 3824
* 62
-1 163
+4 4
+2 56
+1 280
+2 29930
cfi=(280) /home/mithuncy/fsm_p11patch/src/backend/executor/execExprInterp.c
cfn=(4778) dispatch_compare_ptr
calls=108 2116 
* 1950
cfi=(151)
cfn=(2904)
calls=49 1543 
* 919
cfi=(29)
cfn=(866)
calls=2836 4918 
* 654117
* 5986
+2 51
+1 51
-5 26870
+8 112
+1 5
+1 357
+1 102
+2 100
+1 350
+1 100
+2 84
+2 273
cfn=(870) med3
calls=21 -51 
* 3582
* 21
+1 294
cfn=(870)
calls=21 -52 
* 3198
* 21
+1 336
cfn=(870)
calls=21 -53 
* 3927
* 21
+2 126
cfn=(870)
calls=21 -55 
* 2959
* 174
cfn=(870)
calls=29 -55 
* 8560
* 50
+2 588
cfn=(872)
calls=15 -76 
* 1228
+1 306
+1 459
+3 51
+2 3480
+2 40
cfn=(872)
calls=5 -85 
* 420
+1 10
+2 10
-7 15
+7 3470
-7 18624
cfi=(280)
cfn=(4778)
calls=44 2116 
* 798
cfi=(151)
cfn=(2904)
calls=251 1543 
* 4843
cfi=(29)
cfn=(866)
calls=1772 4918 
* 142373
* 6201
+9 339
+2 3774
+2 32
cfn=(872)
calls=4 -94 
* 336
+1 12
+2 12
-7 12
+7 5649
-7 19716
cfi=(280)
cfn=(4778)
calls=42 2116 
* 1008
cfi=(151)
cfn=(2904)
calls=301 1543 
* 5932
cfi=(29)
cfn=(866)
calls=1832 4918 
* 141191
* 6525
+9 1017
+1 51
+5 306
+1 510
+1 152
-6 3364
cfn=(872)
calls=76 87 
* 6384
+1 576
+1 864
+1 288
-23 288
+26 500
cfn=(872)
calls=50 87 
* 2676
+1 663
+1 142
cfn=(872)
calls=4 87 
* 336
+1 255
+1 255
+1 153
+3 102
+1 144
cfn=(865) pg_qsort'2
calls=16 -89 
* 251878
+1 102
+4 204
+1 136
+1 34
+6 51
+1 192
cfn=(865)
calls=16 114 
* 2618153
+1 51
+4 68
+1 17
+3 18

fn=(865)
114 938
+14 5454
+1 146
-1 405
+1 810
+2 635
+1 1044
+2 6576
cfn=(872)
calls=121 -47 
* 9876
-1 1095
-1 8079
cfi=(280)
cfn=(4778)
calls=18 2116 
* 378
cfi=(151)
cfn=(2904)
calls=179 1543 
* 3449
cfi=(29)
cfn=(866)
calls=397 4918 
* 79346
* 1188
-1 4021
+4 127
+2 351
+1 1755
+2 65930
cfi=(280)
cfn=(4778)
calls=146 2116 
* 2694
cfi=(151)
cfn=(2904)
calls=63 1543 
* 1224
cfi=(29)
cfn=(866)
calls=6384 4918 
* 1454144
* 13186
+2 344
+1 344
-5 58698
+8 702
+1 7
+1 2408
+1 688
+2 638
+1 2233
+1 638
+2 60
+2 195
cfn=(870)
calls=15 -51 
* 3487
* 15
+1 210
cfn=(870)
calls=15 -52 
* 2570
* 15
+1 240
cfn=(870)
calls=15 -53 
* 3454
* 15
+2 90
cfn=(870)
calls=15 -55 
* 2267
* 1824
cfn=(870)
calls=304 -55 
* 126094
* 319
+2 4242
cfn=(872)
calls=46 -76 
* 3512
+1 2064
+1 3096
+3 344
+2 1880
+2 32
cfn=(872)
calls=4 -85 
* 336
+1 8
+2 8
-7 12
+7 1872
-7 16428
cfi=(280)
cfn=(4778)
calls=54 2116 
* 1086
cfi=(151)
cfn=(2904)
calls=289 1543 
* 5606
cfi=(29)
cfn=(866)
calls=1469 4918 
* 203269
* 5436
+9 916
+2 11196
+2 120
cfn=(872)
calls=15 -94 
* 1260
+1 45
+2 45
-7 45
+7 16749
-7 56517
cfi=(280)
cfn=(4778)
calls=136 2116 
* 3216
cfi=(151)
cfn=(2904)
calls=305 1543 
* 5952
cfi=(29)
cfn=(866)
calls=5729 4918 
* 570796
* 18510
+9 2748
+1 344
+5 2064
+1 3440
+1 1031
-6 6881
cfn=(872)
calls=111 87 
* 9068
+1 1144
+1 1716
+1 572
-23 572
+26 3430
cfn=(872)
calls=343 87 
* 14130
+1 4472
+1 838
cfn=(872)
calls=15 87 
* 1260
+1 1720
+1 1720
+1 1032
+3 861
+1 459
cfn=(865)
calls=51 -89 
* 136876
+1 861
+4 1722
+1 1148
+1 287
+6 171
+1 612
cfn=(865)
calls=51 114 
* 1631422
+1 171
+4 228
+1 57
+3 268

fn=(870)
106 3339
+1 2862
cfi=(280)
cfn=(4778)
calls=18 2116 
* 324
cfi=(151)
cfn=(2904)
calls=61 1543 
* 1184
cfi=(29)
cfn=(866)
calls=398 4918 
* 35394
+2 954
-1 2400
cfi=(280)
cfn=(4778)
calls=18 2116 
* 372
cfi=(151)
cfn=(2904)
calls=33 1543 
* 648
cfi=(29)
cfn=(866)
calls=349 4918 
* 28318
* 2660
cfi=(280)
cfn=(4778)
calls=8 2116 
* 192
cfi=(151)
cfn=(2904)
calls=21 1543 
* 404
cfi=(29)
cfn=(866)
calls=281 4918 
* 65827
* 1420
+1 462
cfi=(151)
cfn=(2904)
calls=28 1543 
* 541
cfi=(29)
cfn=(866)
calls=49 4918 
* 5860
* 508
cfi=(151)
cfn=(2904)
calls=19 1543 
* 364
cfi=(29)
cfn=(866)
calls=40 4918 
* 4857
* 254
+1 954

fn=(872)
87 4908
+1 1636
+1 10072
+2 33326
+1 1636

fl=(173) /home/mithuncy/fsm_p11patch/src/backend/lib/pairingheap.c
fn=(3272) pairingheap_remove
171 13840
+10 11072
+2 1512
cfn=(3352) pairingheap_remove_first
calls=504 -37 
* 17640
+1 504
+7 6792
+1 6792
+6 11320
+1 9056
+10 4528
+12 6792
+1 4528
+1 8
+2 5536

fn=(3278) pairingheap_first
131 690
+3 460
+1 460

fn=(3352)
146 2016
+7 1512
+1 1512
+2 2520
cfn=(3354) merge_children
calls=504 +79 
* 5544
* 1008
+1 2016
+6 504
+1 1008

fn=(3354)
235 2520
+6 1008
+1 1008
+43 1008

fn=(3124) pairingheap_add
113 13840
+1 5536
+3 19376
cfn=(3126) merge
calls=2768 -37 
* 241512
* 5536
+1 8304
+1 8304
+1 5536

fn=(3126)
80 16608
+1 5536
+1 1008
+1 4528
+4 18112
cfi=(110)
cfn=(3138) xmin_cmp
calls=2264 945 
* 151688
* 4528
+10 9056
+1 8
+1 6
+1 8
+1 6
+2 2
+1 4
-5 6786
+1 9048
+1 6786
+2 2262
+1 5532

fl=(203) /home/mithuncy/fsm_p11patch/src/backend/storage/buffer/localbuf.c
fn=(5742) AtProcExit_LocalBuffers
584 2
+6 1
cfn=(3644) CheckForLocalBufferLeaks
calls=1 -46 
* 4
+1 2

fn=(3644)
544 6
+20 6

fn=(3642) AtEOXact_LocalBuffers
573 10
+1 2
cfn=(3644)
calls=2 -30 
* 8
+1 4

fl=(320) /home/mithuncy/fsm_p11patch/src/backend/storage/ipc/../../../../src/include/lib/ilist.h
fn=(5732) dlist_is_empty
290 6
+3 24
+1 4

fl=(27)
fn=(750)
42 4
+1 4
cob=(3)
cfi=(3)
cfn=(756) sigemptyset
calls=1 -43 
* 38
cob=(1)
cfi=(1)
cfn=(223)
calls=1 -43 
* 1390
* 6
+3 4
cob=(3)
cfi=(3)
cfn=(762) sigfillset
calls=1 -46 
* 21
cob=(1)
cfi=(1)
cfn=(223)
calls=1 -46 
* 1382
* 6
+1 4
cob=(3)
cfi=(3)
cfn=(762)
calls=2 -47 
* 42
* 2
+8 6
cob=(3)
cfi=(3)
cfn=(768)
calls=1 -55 
* 10
cob=(1)
cfi=(1)
cfn=(223)
calls=1 -55 
* 1316
* 6
+1 6
cob=(3)
cfi=(3)
cfn=(768)
calls=2 -56 
* 20
* 2
+3 6
cob=(3)
cfi=(3)
cfn=(768)
calls=2 -59 
* 20
* 2
+1 6
cob=(3)
cfi=(3)
cfn=(768)
calls=2 -60 
* 20
* 2
+3 6
cob=(3)
cfi=(3)
cfn=(768)
calls=2 -63 
* 20
* 2
+1 6
cob=(3)
cfi=(3)
cfn=(768)
calls=2 -64 
* 20
* 2
+3 6
cob=(3)
cfi=(3)
cfn=(768)
calls=2 -67 
* 20
* 2
+1 6
cob=(3)
cfi=(3)
cfn=(768)
calls=2 -68 
* 20
* 2
+3 6
cob=(3)
cfi=(3)
cfn=(768)
calls=2 -71 
* 20
* 2
+1 6
cob=(3)
cfi=(3)
cfn=(768)
calls=2 -72 
* 20
* 2
+3 6
cob=(3)
cfi=(3)
cfn=(768)
calls=2 -75 
* 20
* 2
+1 6
cob=(3)
cfi=(3)
cfn=(768)
calls=2 -76 
* 20
* 2
+3 6
cob=(3)
cfi=(3)
cfn=(768)
calls=2 -79 
* 20
* 2
+1 6
cob=(3)
cfi=(3)
cfn=(768)
calls=2 -80 
* 20
* 2
+3 6
cob=(3)
cfi=(3)
cfn=(768)
calls=2 -83 
* 20
* 2
+1 6
cob=(3)
cfi=(3)
cfn=(768)
calls=2 -84 
* 20
* 2
+5 6
cob=(3)
cfi=(3)
cfn=(768)
calls=2 -89 
* 20
* 2
+3 6
cob=(3)
cfi=(3)
cfn=(768)
calls=2 -92 
* 20
* 2
+3 6
cob=(3)
cfi=(3)
cfn=(768)
calls=2 -95 
* 20
* 2
+2 4

fl=(207)
fn=(3774) pq_writeint8
48 10
+1 4
+3 16
+1 12
+1 4

fn=(3728)
146 10
+1 8
cfi=(80)
cfn=(1922)
calls=2 271 
* 70
+1 10
cfn=(3730) pq_writeint32
calls=2 -72 
* 46
+1 4

fn=(3770) pq_sendbyte
162 12
+1 10
cfn=(3772) pq_sendint8
calls=2 -33 
* 150
+1 4

fn=(3730)
76 8
+1 6
+3 16
+1 12
+1 4

fn=(3772)
130 12
+1 8
cfi=(80)
cfn=(1922)
calls=2 271 
* 70
+1 10
cfn=(3774)
calls=2 -84 
* 46
+1 4

fl=(90) /home/mithuncy/fsm_p11patch/src/backend/storage/buffer/buf_table.c
fn=(2014) BufTableShmemSize
44 4
+1 5
cfi=(31)
cfn=(2006) hash_estimate_size
calls=1 733 
* 441
+1 2

fn=(3204) BufTableLookup
93 61310
+4 12262
-1 73572
cfi=(31)
cfn=(842) hash_search_with_hash_value
calls=12262 924 
* 1669365
* 12262
+7 24524
+1 3000
+2 21524
+1 24524

fn=(5440) BufTableInsert
121 9000
+8 1500
-1 10500
cfi=(31)
cfn=(842)
calls=1500 924 
* 381703
* 1500
+7 4500
+3 4500
+2 1500
+1 3000

fn=(2214) InitBufTable
54 4
+6 1
+1 1
+1 1
+2 9
cfi=(87)
cfn=(2162)
calls=1 322 
* 236609
* 1
+4 2

fn=(3202) BufTableHashCode
81 49048
+1 61310
cfi=(31)
cfn=(2226) get_hash_value
calls=12262 861 
* 1716680
+1 24524

fl=(174)
fn=(3356)
108 5
+1 2
+6 2
+3 5
cfi=(81)
cfn=(3170)
calls=1 -71 
* 755
* 1
+8 2

fn=(3168)
140 24064
+3 6016
+5 4
+4 10
cfi=(81)
cfn=(3170)
calls=2 47 
* 1499
* 4
+2 6012
+3 6012
+2 6012
+1 22500
cfi=(81)
cfn=(3170)
calls=2500 47 
* 3822350
* 5000
+4 3036
cfi=(81)
cfn=(3170)
calls=506 47 
* 626333
* 1012
+42 3008
+1 6016

fl=(284)
fn=(4896) func_match_argtypes
908 14
+3 2
+2 4
+2 6
+4 36
+1 84
cfi=(285)
cfn=(4898) can_coerce_type
calls=12 545 
* 266654
* 24
+3 12
+1 9
+1 3
-8 6
-2 6
+2 18
-2 22
+14 2
+1 4

fn=(4930) make_fn_arguments
1823 21
+2 3
+2 9
cfi=(219)
cfn=(4292)
calls=3 78 
* 30
* 6
+3 84
+2 12
+6 16
+18 20
-3 4
+2 20
-2 36
cfi=(285)
cfn=(4932) coerce_type
calls=4 159 
* 3450
* 4
+7 12
+3 4
-36 20
+36 2
-36 16
+38 6

fn=(4966)
80 13
+1 3
+1 6
+1 1
+1 9
+1 9
+1 9
+1 9
+1 6
+6 1
+12 1
+6 6
+11 3
cfi=(219)
cfn=(4828)
calls=1 -33 
* 10
* 2
+20 1
+1 3
cfi=(219)
cfn=(4292)
calls=1 -66 
* 10
* 2
+2 6
+1 6
cfi=(247)
cfn=(4434)
calls=2 43 
* 48
* 2
+2 6
+2 4
+7 12
-14 10
+25 1
+1 3
cfi=(219)
cfn=(4292)
calls=1 -92 
* 10
* 2
+2 6
+2 8
+19 4
-23 12
+31 2
+2 3
cfi=(219)
cfn=(4292)
calls=1 78 
* 10
* 2
+15 3
-4 2
+11 2
+30 6
cfi=(223)
cfn=(4942) setup_parser_errposition_callback
calls=1 147 
* 24
+7 5
-3 1
-2 23
cfn=(4968) func_get_detail
calls=1 1390 
* 57335
* 1
+7 3
cfi=(223)
cfn=(4960) cancel_parser_errposition_callback
calls=1 162 
* 8
+7 2
+14 2
+10 2
+8 2
+7 2
+6 2
+6 2
+6 2
+6 2
+11 2
631 2
+1 3
cfi=(219)
cfn=(4292)
calls=1 78 
* 8
* 4
+22 7
cfi=(285)
cfn=(4928) enforce_generic_type_consistency
calls=1 1677 
* 103
* 1
+7 6
cfn=(4930)
calls=1 1823 
* 1847
+7 3
+10 6
+36 7
+13 3
+4 2
+2 4
cfi=(13)
cfn=(3400)
calls=1 853 
* 174
* 5
+2 3
+1 3
+1 3
+1 3
+1 2
+2 3
+1 3
+2 2
-12 1
883 3
+3 1
+1 6

fn=(4968)
1390 12
+8 2
+1 2
+1 2
+1 2
+1 2
+1 2
+1 2
+1 2
+3 9
cfi=(55)
cfn=(4970) FuncnameGetCandidates
calls=1 925 
* 34466
* 1
+8 3
+4 9
cob=(3)
cfi=(3)
cfn=(3062)
calls=1 0 
* 25
* 1
* 2
-2 3
-2 4
+8 2
+41 2
+59 2
+5 6
cfn=(4896)
calls=1 908 
* 120
* 1
+6 2
+1 3
+21 2
+11 4
+8 2
+4 4
+1 4
+1 4
+7 4
+16 2
-1 4
cfi=(151)
cfn=(3306)
calls=1 1114 
* 22470
* 1
+2 2
+3 8
+1 4
+1 4
+1 4
+2 6
+68 5
+6 1
+1 1
+13 3
cfi=(151)
cfn=(3280)
calls=1 1161 
* 103
+1 2
+4 2

fn=(4918) func_select_candidate
992 7
+19 2
+21 1
+1 2
+2 16
+1 8
cfi=(272)
cfn=(4886) getBaseType
calls=1 2267 
* 488
* 4
+4 3
+1 1
-8 11
+16 1
+1 1
+1 1
+1 3
+4 6
+1 2
+1 4
+2 20
+1 18
-1 4
-2 22
+8 10
+2 2
+1 2
+1 2
+1 2
+3 3
+2 3
+1 2
+1 1
-24 3
-2 2
+2 3
-2 4
+31 2
+1 2
+2 2
+10 2
+1 10
cfi=(285)
cfn=(4920) TypeCategory
calls=2 2082 
* 22893
* 6
-1 11
+2 1
+1 1
+1 1
+1 3
+4 6
+1 2
+1 4
+2 20
+2 22
+1 26
cfi=(285)
cfn=(4924) IsPreferredType
calls=2 2101 
* 44578
-1 4
-4 22
+10 10
+2 2
+1 2
+1 2
+1 2
+2 3
+2 3
+1 2
+1 1
-25 3
-2 2
+2 3
-2 4
+31 2
+1 2
+2 2
+9 2
+22 1
+1 2
+4 10
+1 1
+1 1
+1 3
+1 3
+1 1
+1 3
+4 6
+1 14
+1 12
cfi=(272)
cfn=(4922) get_type_category_preferred
calls=2 2446 
* 22626
+3 10
+3 4
+1 5
+2 6
+8 3
+11 1
-32 3
-2 2
+2 3
-2 4
+38 7
-48 11
+56 2
+3 1
+1 2
+1 1
+1 3
+4 2
+2 6
+1 4
+2 15
+1 1
+1 14
+1 12
cfi=(272)
cfn=(4922)
calls=2 2446 
* 958
+3 12
+2 1
+1 1
+2 9
-13 14
+19 4
+3 2
+1 2
+5 2
+1 5
-34 6
-2 6
+43 2
+2 2
+2 2
+3 2
+1 2
+61 4

fl=(319) /home/mithuncy/fsm_p11patch/src/backend/utils/error/../../../../src/include/libpq/pqformat.h
fn=(5710) pq_sendint8
130 48
+1 32
cfi=(80)
cfn=(1922)
calls=8 271 
* 280
+1 40
cfn=(5712) pq_writeint8
calls=8 -84 
* 184
+1 16

fn=(5712)
48 40
+1 16
+3 64
+1 48
+1 16

fn=(5708) pq_sendbyte
162 48
+1 40
cfn=(5710)
calls=8 -33 
* 600
+1 16

fl=(21)
fn=(2774) TimestampDifference
1646 12
+1 10
+2 4
+7 20
+1 30
+2 4

fn=(666)
1713 6
+3 22
+3 2
+1 4

fn=(656)
1571 42
+4 56
cob=(10)
cfi=(22)
cfn=(662) 0x000000005803d963
calls=13 0 
* 39
cob=(1)
cfi=(1)
cfn=(223)
calls=1 0 
* 1385
* 18
+2 42
+2 70
+2 14
+1 28

fn=(3748) TimestampDifferenceExceeds
1672 10
+1 10
+2 10
+1 4

fl=(40) /home/mithuncy/fsm_p11patch/src/backend/utils/mb/encnames.c
fn=(908) clean_encoding_name
526 20
+4 20
+2 26
cob=(3)
cfi=(3)
cfn=(914)
calls=25 0 
* 75
cob=(1)
cfi=(1)
cfn=(223)
calls=1 0 
* 1355
* 30
* 286
+2 184
+1 176
+2 12
-7 146
+10 8
+1 4
+1 8

fn=(904) pg_valid_client_encoding
488 16
+3 12
cfn=(906) pg_char_to_encoding
calls=4 +61 
* 3620
* 12
+3 16
+3 4
+1 8

fn=(906)
552 20
+1 4
+1 4
+1 24
+6 24
+3 12
cob=(3)
cfi=(3)
cfn=(424)
calls=4 0 
* 60
* 4
* 8
+11 20
cfn=(908)
calls=4 -49 
* 2350
* 4
+2 4
+2 264
+1 240
+2 48
+2 60
cob=(3)
cfi=(3)
cfn=(446)
calls=10 0 
* 220
* 10
* 10
+1 20
+1 12
+2 40
+1 40
+2 30
-14 72
+17 16

fn=(916) pg_encoding_to_char
608 12
+1 16
+2 20
+3 12
+3 8

fl=(186) /home/mithuncy/fsm_p11patch/src/backend/access/common/reloptions.c
fn=(5186) initialize_reloptions
474 4
+4 1
+1 2
+4 6
-4 76
+6 2
+4 21
-4 241
+6 2
+4 7
-4 79
+6 2
+4 2
-4 29
+6 2
+2 3
+3 2
-1 6
cfi=(13)
cfn=(798)
calls=1 772 
* 122
* 1
+3 1
+1 2
+2 78
+1 42
+1 90
cob=(3)
cfi=(3)
cfn=(424)
calls=6 0 
* 110
* 6
* 6
+1 6
-5 76
+8 2
+2 273
+1 147
+1 315
cob=(3)
cfi=(3)
cfn=(424)
calls=21 0 
* 419
* 21
* 21
+1 21
-5 241
+8 2
+2 84
+1 49
+1 105
cob=(3)
cfi=(3)
cfn=(424)
calls=7 0 
* 131
* 7
* 7
+1 7
-5 79
+8 2
+2 24
+1 14
+1 30
cob=(3)
cfi=(3)
cfn=(424)
calls=2 0 
* 38
* 2
* 2
+1 2
-5 29
+8 5
+7 6
+3 1
+1 4

fn=(5196) allocateReloptStruct
1258 3000
+1 1000
+3 1000
+1 117000
-1 37500
+4 1500
cfi=(13)
cfn=(2546)
calls=500 956 
* 99000
+1 1000

fn=(5184) parseRelOptions
1065 4500
+1 500
+1 500
+4 1500
+1 1
cfn=(5186)
calls=1 474 
* 3117
+4 1000
+1 180000
+1 9000
-2 166000
+4 1000
+2 4000
cfi=(13)
cfn=(940)
calls=500 925 
* 61500
* 500
+2 1500
+2 180000
+2 144000
+1 90000
+1 9000
-6 166000
+12 1500
+2 1500
cfi=(171)
cfn=(4958) pg_detoast_datum
calls=500 1918 
* 96000
* 500
+4 6000
cfi=(298) /home/mithuncy/fsm_p11patch/src/backend/utils/adt/arrayfuncs.c
cfn=(5190) deconstruct_array
calls=500 3462 
* 165500
+3 1000
+2 8000
+1 10000
+4 2000
+2 24000
+2 13000
+1 18000
cob=(3)
cfi=(3)
cfn=(1044)
calls=1000 0 
* 47000
* 1000
-1 2000
+3 14000
cfn=(5194) parse_one_reloption
calls=1000 +38 
* 450000
+2 1000
-9 7000
+13 3000
-20 5500
+36 1500
cfi=(13)
cfn=(952)
calls=500 1032 
* 42500
+1 1500
+1 1500
cfi=(13)
cfn=(952)
calls=500 1032 
* 42500
+3 1500
+1 500
+1 2000

fn=(5198) fillRelOptions
1285 5000
+2 1000
+2 1000
+3 9000
+2 18000
+2 1795500
cob=(3)
cfi=(3)
cfn=(446)
calls=85500 0 
* 3193500
* 85500
* 171000
+3 99000
+3 123000
+3 10000
+1 9000
+1 5500
-1 1500
-1 1000
+3 500
-3 1000
+3 500
+2 70000
+1 19500
+1 65000
-1 6500
-1 13000
+3 6500
-3 1000
+3 500
+2 10000
+1 2000
+1 10000
-1 1000
-1 2000
+3 1000
+24 9000
+1 9000
-49 333000
+52 18000
-57 37500
+61 2000
+1 1000

fn=(5180) heap_reloptions
1456 4000
+3 3500
+15 3000
cfn=(5182) default_reloptions
calls=500 1359 
* 8465618
* 500
+8 1000

fn=(5194)
1157 10000
+4 1000
+2 4000
+6 8000
+1 5000
cfi=(13)
cfn=(940)
calls=1000 925 
* 94500
* 1000
+1 13000
cob=(3)
cfi=(3)
cfn=(856)
calls=1000 0 
* 13000
* 1000
+1 5000
+2 6000
+4 3000
cfi=(59)
cfn=(1224)
calls=500 31 
* 88500
* 500
+1 1000
+6 500
+3 1500
+2 3500
cfi=(29)
cfn=(1240)
calls=500 5995 
* 99000
* 500
+1 1000
+5 1000
+9 500
+38 2000
+1 2000
+1 4000
+1 3000
cfi=(13)
cfn=(952)
calls=1000 1032 
* 72000
+1 5000

fn=(3388) extractRelOptions
1000 3762
+6 11032
cfi=(178)
cfn=(3238)
calls=500 428 
* 1045935
* 627
+4 1881
+1 254
+2 4000
+3 4500
+6 4000
cfn=(5180)
calls=500 1456 
* 8477618
* 500
+1 500
+17 500
+1 1254

fn=(5182)
1359 3500
+44 3000
cfn=(5184)
calls=500 1065 
* 1994618
* 500
+3 1500
+3 2500
cfn=(5196)
calls=500 1258 
* 261000
* 500
+2 5000
cfn=(5198)
calls=500 1285 
* 6148000
+3 1500
cfi=(13)
cfn=(952)
calls=500 1032 
* 42500
+2 500
+1 1000

fl=(212) /home/mithuncy/fsm_p11patch/src/backend/parser/scan.l
fn=(4248) process_integer_literal
1261 30
+4 6
cob=(5)
cfi=(5)
cfn=(472)
calls=6 0 
* 18
* 6
* 6
+1 36
cfi=(37)
cfn=(4250) strtoint
calls=6 51 
* 894
* 6
+1 30
cob=(5)
cfi=(5)
cfn=(472)
calls=6 0 
* 18
* 6
* 18
+6 18
+1 6
+1 12

fn=(3836) scanner_init
1148 3563
+1 1527
cob=(3)
cfi=(3)
cfn=(424)
calls=509 0 
* 13243
* 509
* 509
+3 1527
cfi=(213) /home/mithuncy/fsm_p11patch/src/backend/parser/scan.c
cfn=(3838) core_yylex_init
calls=509 11027 
* 116031
* 1018
+3 2545
cfi=(213)
cfn=(3844) core_yyset_extra
calls=509 10927 
* 5599
+2 1527
+1 1527
+2 1527
+1 1527
+1 1527
+5 2036
cfi=(13)
cfn=(940)
calls=509 925 
* 62576
* 1018
+1 1527
+1 3563
cob=(3)
cfi=(3)
cfn=(856)
calls=509 0 
* 13329
* 509
+1 6108
+1 4072
cfi=(213)
cfn=(3846) core_yy_scan_buffer
calls=509 10742 
* 238721
+3 1018
+1 2545
cfi=(13)
cfn=(940)
calls=509 925 
* 62576
* 1018
+1 1018
+2 509
+1 1018

fn=(3866) addlit
1207 3591
+2 5130
+10 7182
cob=(3)
cfi=(3)
cfn=(856)
calls=513 0 
* 11279
* 513
+1 4104
+1 2052

fn=(3868) litbufdup
1245 2028
+1 2028
+3 2535
cfi=(13)
cfn=(940)
calls=507 925 
* 62330
* 507
+1 4563
cob=(3)
cfi=(3)
cfn=(856)
calls=507 0 
* 11181
* 507
+1 2535
+1 507
+1 1014

fn=(3840) core_yyalloc
1574 7635
+1 4581
cfi=(13)
cfn=(940)
calls=1527 925 
* 181204
+1 3054

fn=(4278) addlitchar
1226 42
+2 54
+7 60
+1 42
+1 24

fn=(3888) scanner_finish
1187 2036
+11 2545
+2 2545
+2 1018

fl=(250) /home/mithuncy/fsm_p11patch/src/backend/rewrite/../../../src/include/nodes/pg_list.h
fn=(4462) list_head
78 45
+1 57
+1 30

fn=(4466) list_length
90 9
+1 9
+1 6

fl=(111)
fn=(3474)
176 11388
+3 2847
+2 5508
+1 8262
+1 8262
cfi=(13)
cfn=(952)
calls=2754 1032 
* 234090
-4 11202
+6 5694

fn=(3446) _bt_mark_scankey_required
1313 17924
+3 35848
+7 3874
+1 3874
+3 607
+1 607
+8 26886
+2 22405
+10 8962

fn=(3442)
757 11388
+1 8541
+1 8541
+1 11388
+13 5694
+1 5694
+2 5694
+6 11388
+3 8541
+2 8541
+1 5694
+2 11388
+4 5694
+3 6105
cfn=(3444) _bt_fix_scankey_strategy
calls=1221 1211 
* 46398
* 3663
+2 7326
cob=(3)
cfi=(3)
cfn=(856)
calls=1221 0 
* 29304
* 1221
+1 2442
+2 4884
+1 3663
cfn=(3446)
calls=1221 1313 
* 32967
+1 1221
+6 1626
+1 1626
+8 1626
+1 8130
cob=(3)
cfi=(3)
cfn=(828)
calls=1626 0 
* 26016
* 1626
+7 1626
+2 14658
+3 16300
cfn=(3444)
calls=3260 1211 
* 123880
* 9780
+12 27698
+2 6520
+3 16316
+14 9780
+2 5306
+2 5306
+2 53060
+2 31836
+1 13265
-5 47754
+29 2653
+4 9780
+17 9780
+1 1821
+20 6520
+2 81500
+2 39120
+2 26080
cob=(3)
cfi=(3)
cfn=(856)
calls=3260 0 
* 78240
* 3260
+1 13040
+1 9780
cfn=(3446)
calls=3260 1313 
* 88020
-8 58680
+15 9780
+1 1626
+65 6504
-62 4902
+1 8170
cob=(3)
cfi=(3)
cfn=(828)
calls=1634 0 
* 26144
* 1634
+4 16300
+3 16300
+17 16300
+3 16300
827 6520
1017 3260
+3 5694

fn=(2076) BTreeShmemSize
2014 6
+3 2
+1 10
cfi=(87)
cfn=(2000)
calls=2 493 
* 46
* 10
cfi=(87)
cfn=(2002)
calls=2 476 
* 42
* 2
+1 2
+1 4

fn=(3492)
1373 49230
+1 49230
+9 10940
+10 49230
+23 5470
+2 38290
+2 21880
+1 16410
+1 16410
+2 27350
+8 37000
+7 543900
cfi=(196)
cfn=(3516)
calls=1006 214 
* 223814
* 8406
+5 37000
+33 22200
+41 66600
cfi=(171)
cfn=(3240)
calls=7400 1134 
* 463112
* 7400
+3 14800
+12 19817
+2 8493
+8 5662
1424 39255
1548 10556
+4 2639
+1 10940

fn=(2290) BTreeShmemInit
2027 4
+3 1
cfn=(2076)
calls=1 -16 
* 62
* 4
cfi=(87)
cfn=(2168)
calls=1 373 
* 1113
* 1
+4 4
+10 3
cob=(1)
cfi=(1)
cfn=(223)
calls=1 0 
* 1258
* 5
* 1
+2 2
+1 3
+4 4

fn=(3432) _bt_preprocess_array_keys
204 11388
+1 8541
+1 8541
+1 11388
+7 2847
+1 5694
+2 44810
+1 22405
-3 26465
+18 5694
+2 5694
+1 5694
+1 2847
365 5694

fn=(3444)
1211 17924
+3 49291
+22 22405
+35 17924
+2 26886
+3 22405
+17 4481
+1 8962

fl=(89)
fn=(2212) StrategyInitialize
476 5
+13 4
cfi=(90)
cfn=(2214)
calls=1 54 
* 236628
+6 5
cfi=(87)
cfn=(2168)
calls=1 373 
* 1164
-1 1
+5 4
+7 2
+6 2
+1 4
+3 5
cfi=(123) /home/mithuncy/fsm_p11patch/src/backend/storage/buffer/../../../../src/include/port/atomics.h
cfn=(2206) pg_atomic_init_u32
calls=1 227 
* 33
+3 2
+1 5
cfi=(123)
cfn=(2206)
calls=1 227 
* 33
+3 2
+4 2

fn=(2012) StrategyShmemSize
455 3
+1 1
+3 4
cfi=(90)
cfn=(2014)
calls=1 44 
* 452
* 5
cfi=(87)
cfn=(2002)
calls=1 +17 
* 21
* 1
+3 4
cfi=(87)
cfn=(2002)
calls=1 +14 
* 21
* 1
+2 1
+1 2

fn=(5486)
598 2000
+2 1000
+1 1500
cfi=(13)
cfn=(952)
calls=500 1032 
* 103968
+1 1000

fn=(5288)
543 2000
+10 3500
+10 500
+1 500
+12 5000
+4 2000
-1 1000
cfi=(13)
cfn=(2546)
calls=500 956 
* 643101
* 500
+5 1500
+1 1500
+2 500
+1 1000

fn=(5434) AddBufferToRing
670 6000
+1 13500
+1 3000

fn=(5414) StrategyGetBuffer
202 9000
+10 3000
+2 7500
cfn=(5416) GetBufferFromRing
calls=1500 612 
* 46500
* 1500
+1 3000
+16 4500
+1 3000
+3 4
+7 18
cfi=(122)
cfn=(2850)
calls=2 437 
* 62
+8 7500
cfi=(123)
cfn=(5418) pg_atomic_fetch_add_u32
calls=1500 +82 
* 36000
+18 6000
+5 4500
cfi=(313)
cfn=(5422)
calls=1500 -48 
* 21000
* 3000
+2 6000
+6 10500
+4 6000
+1 3000
+6 3000
+9 4500
cfi=(50)
cfn=(5424) LockBufHdr
calls=1500 4099 
* 136521
* 1500
+1 6000
+1 7500
+2 3000
+1 7500
cfn=(5434)
calls=1500 670 
* 22500
+1 4500
+1 3000
+50 6000

fn=(5416)
612 7500
+7 16500
+8 10500
+1 3000
+2 3000
+1 3000
+29 3000

fl=(179)
fn=(3714)
198 145
+1 87
cob=(3)
cfi=(3)
cfn=(424)
calls=29 0 
* 503
* 29
* 29
+3 145
cfi=(19)
cfn=(3716)
calls=29 624 
* 928
* 29
+1 87
+7 203
cfi=(80)
cfn=(3720)
calls=29 +31 
* 2369
+1 58

fn=(3822)
638 5
+1 6
+4 4

fn=(3812)
582 5
+4 7
+7 3
cob=(3)
cfi=(3)
cfn=(424)
calls=1 0 
* 41
* 1
* 1
+1 8
+4 7
+2 5
cfi=(19)
cfn=(3814)
calls=1 -54 
* 2692
+1 4

fn=(3298)
299 64
+2 192
cfi=(58)
cfn=(3300) socket_putmessage
calls=16 1561 
* 3718
+2 64
cfi=(13)
cfn=(952)
calls=16 1032 
* 1360
+1 32
+1 32

fn=(3292)
88 96
+1 48
cfi=(80)
cfn=(1888)
calls=16 -42 
* 2030
+7 48
+1 32

fl=(101)
fn=(2052) SInvalShmemSize
205 6
+3 2
+1 10
cfi=(87)
cfn=(2000)
calls=2 493 
* 46
* 10
cfi=(87)
cfn=(2002)
calls=2 476 
* 42
* 2
+2 2
+1 4

fn=(5746) CleanupInvalidationState
337 5
+1 2
+6 5
cfi=(99)
cfn=(2170)
calls=1 1122 
* 137
+2 9
+3 3
+3 2
+1 2
+1 2
+1 2
+1 2
+3 4
+2 40
-2 14
+5 3
+2 4
cfi=(99)
cfn=(2182)
calls=1 1726 
* 91
+1 2

fn=(2980) SIGetDataEntries
540 34895
+6 13958
+1 62811
+13 34895
+1 13958
+63 13958

fn=(2872)
259 6
+2 1
+1 2
+7 5
cfi=(99)
cfn=(2170)
calls=1 1122 
* 137
+3 2
+2 27
-2 19
+9 2
+2 6
+2 9
+2 6
+15 8
+3 3
+3 3
+3 3
+1 3
+1 4
+1 2
+1 2
+1 2
+1 3
+2 4
cfi=(99)
cfn=(2182)
calls=1 1726 
* 91
+3 4
cfi=(67)
cfn=(2110)
calls=1 +40 
* 32
+2 4
cfi=(57)
cfn=(2084)
calls=1 1286 
* 86
* 6
cfi=(57)
cfn=(2086)
calls=1 1336 
* 105
+1 4

fn=(2964) GetNextLocalTransactionId
770 4
+6 8
+1 4
+2 2
+1 4

fn=(2262) CreateSharedInvalidationState
220 3
+6 1
cfn=(2052)
calls=1 -21 
* 62
* 4
cfi=(87)
cfn=(2168)
calls=1 373 
* 964
-1 1
+2 3
+4 2
+1 2
+1 2
+1 2
+1 3
+1 2
+5 2
+2 784
+1 784
+1 784
+1 784
+1 784
+1 784
+1 784
-8 564
+10 2

fl=(139) /home/mithuncy/fsm_p11patch/src/backend/libpq/be-secure.c
fn=(3780) secure_write
252 21
+5 6
cfi=(52)
cfn=(3782)
calls=3 577 
* 72
+3 3
+9 18
cfn=(3784) secure_raw_write
calls=3 +47 
* 90
* 3
+1 3
+3 6
+36 6
cfi=(52)
cfn=(3782)
calls=3 577 
* 72
+2 3
+1 12

fn=(3784)
316 18
+6 21
cob=(5)
cfi=(5)
cfn=(2502)
calls=3 0 
* 36
* 3
* 3
+5 3
+1 6

fn=(2792) secure_read
147 21
+5 6
cfi=(52)
cfn=(2794)
calls=3 531 
* 93
+12 30
cfn=(2796) secure_raw_read
calls=5 +64 
* 162
* 5
+1 5
+4 28
cob=(5)
cfi=(5)
cfn=(472)
calls=3 0 
* 9
* 3
* 9
+6 18
cfi=(122)
cfn=(2848) ModifyWaitEvent
calls=3 767 
* 155
+2 21
cfi=(122)
cfn=(3792) WaitEventSetWait
calls=3 954 
* 1775
+20 12
+6 12
+2 6
cfi=(122)
cfn=(3798) ResetLatch
calls=2 520 
* 16
+1 4
cfi=(52)
cfn=(2794)
calls=2 531 
* 62814
+8 4
+7 4
cfi=(52)
cfn=(2794)
calls=2 531 
* 60
+2 2
+1 8

fn=(2796)
228 30
+10 35
cob=(5)
cfi=(5)
cfn=(2516)
calls=5 0 
* 72
* 5
* 5
+5 5
+1 10

fn=(5778) secure_close
135 3
+5 2

fl=(211)
fn=(3834)
37 2032
+6 3556
cfi=(212)
cfn=(3836)
calls=508 1148 
* 555723
* 508
+4 508
+3 1524
cfi=(214)
cfn=(3854) parser_init
calls=508 16299 
* 3556
+3 1524
cfi=(215)
cfn=(3856)
calls=508 24993 
* 5848241
* 508
+3 1524
cfi=(212)
cfn=(3888)
calls=508 1187 
* 8128
+2 1016
+3 508
+1 1016

fn=(3858)
84 21270
+1 10635
+7 14180
+2 1500
+1 2000
+1 2000
+1 2500
+1 1500
+3 18270
cfi=(213)
cfn=(3860) core_yylex
calls=3045 9032 
* 2822295
* 3045
+8 23815
+9 500
+1 500
+2 6090
+8 1000
+1 3500
-1 1000
+11 1500
+3 3500
cfi=(213)
cfn=(3860)
calls=500 9032 
* 571000
* 500
+1 1500
+1 2000
+2 1500
+3 2500
+1 1500
+2 1000
+3 2500
+29 2500
+7 1000
+3 500
+1 7090

fl=(308) /home/mithuncy/fsm_p11patch/src/backend/access/transam/varsup.c
fn=(5336) GetNewTransactionId
49 7
+7 1
cfi=(26)
cfn=(1210)
calls=1 911 
* 8
* 2
+7 3
+8 1
cfi=(53)
cfn=(2878)
calls=1 7896 
* 11
* 2
+3 5
cfi=(99)
cfn=(2170)
calls=1 1122 
* 137
+2 3
+15 6
cfi=(166) /home/mithuncy/fsm_p11patch/src/backend/access/transam/transam.c
cfn=(5338) TransactionIdFollowsOrEquals
calls=1 350 
* 18
* 2
+80 3
cfi=(94)
cfn=(5340)
calls=1 868 
* 13
+1 3
cfi=(95)
cfn=(5342)
calls=1 785 
* 12
+1 3
cfi=(96) /home/mithuncy/fsm_p11patch/src/backend/access/transam/subtrans.c
cfn=(5344) ExtendSUBTRANS
calls=1 325 
* 13
+8 8
+36 4
+1 4
+15 4
cfi=(99)
cfn=(2182)
calls=1 1726 
* 91
+2 1
+1 5

fl=(208)
fn=(3732)
110 24
+1 16
+2 16
+1 8
+1 16
-5 15
+1 10
+2 10
+1 5
+1 10

fl=(124) /home/mithuncy/fsm_p11patch/src/backend/storage/buffer/../../../../src/include/port/atomics/generic.h
fn=(2210) pg_atomic_write_u32_impl
56 65536
+1 49152
+1 32768
-2 24000
+1 18000
+1 12000
-2 8
+1 6
+1 4

fn=(3216) pg_atomic_read_u32_impl
47 81072
+1 54048
+1 54048

fn=(2208) pg_atomic_init_u32_impl
162 81920
+1 81920
cfn=(2210)
calls=16384 56 
* 147456
+1 32768
-2 10
+1 10
cfn=(2210)
calls=2 56 
* 18
+1 4

fl=(192)
fn=(3464) _bt_cachemetadata
114 80
+3 80
cfi=(13)
cfn=(798)
calls=16 772 
* 5056
* 32
+10 64
+3 112
cob=(3)
cfi=(3)
cfn=(856)
calls=16 0 
* 320
* 16
* 16
+15 32

fn=(3462) _bt_checkpage
663 39347
+1 50589
+8 22484
+11 56210
+7 28105

fn=(3466)
866 19390
+4 5540
+1 11080
cfi=(50)
cfn=(3232)
calls=2770 3553 
* 313010
+1 16620
cfi=(50)
cfn=(3468) ReleaseAndReadBuffer
calls=2770 1522 
* 3708794
* 2770
+1 13850
cfi=(50)
cfn=(3232)
calls=2770 3553 
* 448740
+1 13850
cfn=(3462)
calls=2770 663 
* 96950
+1 2770
+1 5540

fn=(3456)
253 17082
+16 11388
+2 8481
+7 8481
+2 8481
+2 16962
cfn=(3458)
calls=2827 730 
* 3702921
* 2827
+1 25443
+1 16962
+9 16962
+1 5654
-1 5654
+2 5654
-1 5654
+2 5654
-1 5654
+4 5654
+9 100
cfn=(3458)
calls=20 730 
* 35450
* 20
+1 180
+1 120
+1 60
+3 120
+1 40
-1 40
+7 80
+1 40
-1 40
+10 80
+3 8
+2 20
cfn=(3584) _bt_relbuf
calls=4 885 
* 1508
+1 8
438 48
+2 48
+5 80
cfn=(3464)
calls=16 114 
* 5808
+6 32
+4 96
cfn=(3466)
calls=16 866 
* 26930
* 16
+1 144
+1 96
+2 96
+1 16
+10 64
+10 16
+1 11388

fn=(3584)
885 20
+1 12
cfi=(50)
cfn=(3586)
calls=4 3339 
* 1468
+1 8

fn=(3458)
730 17106
+3 5702
+3 14255
cfi=(50)
cfn=(3460) ReadBuffer
calls=2851 595 
* 3102155
* 2851
+1 14255
cfi=(50)
cfn=(3232)
calls=2851 3553 
* 461862
+1 14255
cfn=(3462)
calls=2851 -75 
* 99785
* 2851
848 2851
+1 5702

fl=(217)
fn=(3872)
54 4040
+1 4040
cfi=(13)
cfn=(3400)
calls=1010 853 
* 147460
* 5050
+2 2020
+1 3030
+1 1010
+1 2020

fl=(247)
fn=(4450)
1843 174
+11 58
+4 29
cfi=(52)
cfn=(3958)
calls=29 3263 
* 783
+2 232
+79 4
+2 14
cfn=(4451)
calls=2 -98 
* 3939
* 4
+4 2
+7 4
+2 14
cfn=(4451)
calls=2 1843 
* 49339
* 4
+4 2
2093 32
cfi=(248)
cfn=(4449)
calls=4 256 
* 4207
* 4
+30 30
cfi=(47)
cfn=(976)
calls=10 78 
* 100
* 20
+2 88
cfi=(259)
cfn=(5091)
calls=2 1476 
* 148
cfi=(251)
cfn=(4723) fix_scan_expr_walker'2
calls=3 1592 
* 1529
cfi=(259)
cfn=(4593)
calls=3 1167 
* 2413
cfi=(251)
cfn=(4481) extract_query_dependencies_walker'2
calls=3 2670 
* 3373
* 22
-2 75
+5 10
+3 14
+2 56
cfi=(259)
cfn=(4593)
calls=3 1167 
* 42
cfi=(248)
cfn=(4449)
calls=4 256 
* 72
* 14
+2 56
cfi=(259)
cfn=(4593)
calls=3 1167 
* 42
cfi=(248)
cfn=(4449)
calls=4 256 
* 72
* 14
+3 7
+27 4
+78 4
+1 8
-1 21
+1 50

fn=(4451)
1843 438
+11 146
+4 73
cfi=(52)
cfn=(3958)
calls=73 3263 
* 1971
+2 584
+79 8
+2 28
cfn=(4451)
calls=4 -98 
* 3987
* 8
+4 4
+7 14
+2 49
cfn=(4451)
calls=7 1843 
* 5451
* 14
+4 7
+63 48
cfi=(278) /home/mithuncy/fsm_p11patch/src/backend/executor/execExpr.c
cfn=(4761) get_last_attnums_walker'2
calls=1 2325 
* 78
cfi=(251)
cfn=(4723)
calls=1 1592 
* 114
cfi=(271)
cfn=(4665) cost_qual_eval_walker'2
calls=1 3762 
* 146
cfi=(259)
cfn=(5083)
calls=1 1342 
* 168
cfi=(259)
cfn=(5071)
calls=1 971 
* 92
cfi=(248)
cfn=(4449)
calls=1 256 
* 137
* 6
+72 72
cfi=(251)
cfn=(4723)
calls=3 1592 
* 1166
cfi=(259)
cfn=(4593)
calls=3 1167 
* 2035
cfi=(251)
cfn=(4481)
calls=3 2670 
* 1087
* 9
+30 54
cfi=(47)
cfn=(976)
calls=18 78 
* 180
* 36
+2 264
cfi=(278)
cfn=(4761)
calls=4 2325 
* 744
cfi=(251)
cfn=(4723)
calls=4 1592 
* 1065
cfi=(271)
cfn=(4665)
calls=4 3762 
* 5665
cfi=(259)
cfn=(5083)
calls=2 1342 
* 2553
cfi=(259)
cfn=(5071)
calls=2 971 
* 46596
cfi=(259)
cfn=(4593)
calls=4 1167 
* 1248
cfi=(248)
cfn=(4449)
calls=6 256 
* 2561
cfi=(251)
cfn=(4481)
calls=7 2670 
* 2327
* 66
-2 201
+5 18
+3 6
+2 24
cfi=(251)
cfn=(4481)
calls=3 2670 
* 42
* 6
+2 24
cfi=(251)
cfn=(4481)
calls=3 2670 
* 42
* 6
+3 3
+27 26
+78 26
+1 52
-1 32
+1 94

fn=(4982)
1129 16
+1 32
+9 3
+1 1
+2 6
+1 2
+14 1
+2 8

fn=(5060) leftmostLoc
1568 4
+1 2
+2 2
+3 3
+1 2

fn=(4454)
1193 40
+3 16
+2 64
+12 12
+1 4
+2 9
+1 3
+95 2
+4 2
-1 2
cfn=(4455) exprLocation'2
calls=1 1193 
* 24
* 6
cfn=(5060)
calls=1 1568 
* 13
* 1
+3 1
1558 8
+1 32

fn=(4455)
1193 5
+3 2
+2 8
+15 3
+1 1
1558 1
+1 4

fn=(4994) exprIsLengthCoercion
514 20
+1 8
+1 8
+6 24
+2 8
+7 16
+1 8
-1 8
+2 8
+44 8

fn=(4434)
43 2660
+3 1064
+3 4256
+6 30
+1 10
+2 27
+1 9
+22 15
+1 5
+5 1518
+1 506
188 6
+1 2
+78 532
+1 2128

fn=(4594)
1659 162
+1 153
+20 2
+2 7
cfi=(259)
cfn=(4996)
calls=1 1160 
* 499
* 2
+3 1
+5 6
+3 9
cfn=(4992)
calls=3 -73 
* 30
+1 21
cfi=(259)
cfn=(5084)
calls=1 1336 
* 487
cfi=(259)
cfn=(5072)
calls=1 965 
* 483
cfi=(259)
cfn=(4996)
calls=1 1160 
* 499
* 6
+3 3
+12 4
+6 14
cfi=(272)
cfn=(5076)
calls=2 2609 
* 1022
+2 12
cfi=(259)
cfn=(5084)
calls=1 1336 
* 487
cfi=(259)
cfn=(5072)
calls=1 965 
* 22652
* 4
+3 8
cfn=(4434)
calls=2 43 
* 48
* 10
cfi=(272)
cfn=(5078)
calls=2 2642 
* 992
+2 12
cfi=(259)
cfn=(5084)
calls=1 1336 
* 487
cfi=(259)
cfn=(5072)
calls=1 965 
* 22593
* 4
+3 2
+16 21
+2 21
+1 42
-1 6
+1 12

fn=(4486) range_table_walker
2310 42
+3 18
cfi=(47)
cfn=(976)
calls=6 78 
* 48
* 24
+46 6
+1 12

fn=(4618)
2429 18
+18 6
+4 3
cfi=(52)
cfn=(3958)
calls=3 3263 
* 81
+2 24
2916 3
+1 9
cfi=(47)
cfn=(976)
calls=3 78 
* 30
* 6
+3 24
cfi=(259)
cfn=(4617)
calls=3 2573 
* 222247
* 3
-1 12
cfi=(45)
cfn=(960)
calls=3 129 
* 839
* 3
-2 21
+6 6
3076 6

fn=(4619)
2429 90
+18 30
+4 15
cfi=(52)
cfn=(3958)
calls=15 3263 
* 405
+2 120
+18 10
+3 10
cfi=(13)
cfn=(940)
calls=5 925 
* 615
* 35
cob=(3)
cfi=(3)
cfn=(856)
calls=5 0 
* 100
* 5
+2 10
2587 2
+3 2
cfi=(13)
cfn=(940)
calls=1 925 
* 92
* 7
cob=(3)
cfi=(3)
cfn=(856)
calls=1 0 
* 22
* 1
+1 8
cfi=(259)
cfn=(5095)
calls=1 4969 
* 932
* 2
+1 2
2709 2
+3 2
cfi=(13)
cfn=(940)
calls=1 925 
* 123
* 7
cob=(3)
cfi=(3)
cfn=(856)
calls=1 0 
* 18
* 1
+1 8
cfi=(259)
cfn=(5095)
calls=1 4969 
* 76
* 2
+1 2
2867 6
+3 6
cfi=(13)
cfn=(940)
calls=3 925 
* 369
* 21
cob=(3)
cfi=(3)
cfn=(856)
calls=3 0 
* 66
* 3
+1 24
cfi=(259)
cfn=(4617)
calls=3 2573 
* 221512
* 6
+1 6
+44 5
+1 15
cfi=(47)
cfn=(976)
calls=5 78 
* 50
* 10
+3 72
cfi=(259)
cfn=(5095)
calls=2 4969 
* 388
cfi=(259)
cfn=(4617)
calls=7 2573 
* 223431
* 9
-1 36
cfi=(45)
cfn=(960)
calls=9 129 
* 2040
* 9
-2 55
+6 10
3076 30

fn=(4980)
974 20
+1 32
+24 3
+1 1
+5 6
+1 2
+49 3
+1 1
+61 8

fn=(4992)
1620 32
+1 32
+2 16

fn=(4452)
721 44
+3 22
+3 88
+6 18
+1 6
+2 9
+1 3
+14 3
+1 1
+5 3
+1 1
915 11
+1 22

fn=(4528)
277 40
+1 20
+3 80
+5 18
+11 20
cfn=(4994)
calls=4 514 
* 116
* 8
+3 4
498 4
+1 20

fn=(4440)
2266 70
+3 80
cfi=(259)
cfn=(4593)
calls=3 1167 
* 2866
cfi=(251)
cfn=(4481)
calls=3 2670 
* 1924
cfi=(248)
cfn=(4442)
calls=4 127 
* 5107
* 20
+2 80
cfi=(259)
cfn=(4593)
calls=3 1167 
* 42
cfi=(251)
cfn=(4481)
calls=3 2670 
* 42
cfi=(248)
cfn=(4442)
calls=4 127 
* 44
* 20
+2 80
cfi=(259)
cfn=(4593)
calls=3 1167 
* 42
cfi=(251)
cfn=(4481)
calls=3 2670 
* 42
cfi=(248)
cfn=(4442)
calls=4 127 
* 44
* 20
+2 80
cfi=(259)
cfn=(4593)
calls=3 1167 
* 42
cfi=(251)
cfn=(4481)
calls=3 2670 
* 42
cfi=(248)
cfn=(4442)
calls=4 127 
* 44
* 20
+2 80
cfi=(259)
cfn=(4593)
calls=3 1167 
* 507
cfi=(251)
cfn=(4481)
calls=3 2670 
* 510
cfi=(248)
cfn=(4442)
calls=4 127 
* 740
* 20
+2 80
cfi=(259)
cfn=(4593)
calls=3 1167 
* 42
cfi=(251)
cfn=(4481)
calls=3 2670 
* 42
cfi=(248)
cfn=(4442)
calls=4 127 
* 44
* 20
+2 80
cfi=(259)
cfn=(4593)
calls=3 1167 
* 42
cfi=(251)
cfn=(4481)
calls=3 2670 
* 42
cfi=(248)
cfn=(4442)
calls=4 127 
* 44
* 20
+2 80
cfi=(259)
cfn=(4593)
calls=3 1167 
* 42
cfi=(251)
cfn=(4481)
calls=3 2670 
* 42
cfi=(248)
cfn=(4442)
calls=4 127 
* 44
* 20
+2 80
cfi=(259)
cfn=(4593)
calls=3 1167 
* 42
cfi=(251)
cfn=(4481)
calls=3 2670 
* 42
cfi=(248)
cfn=(4442)
calls=4 127 
* 44
* 20
+2 40
+2 48
cfi=(259)
cfn=(4593)
calls=3 1167 
* 42
cfi=(251)
cfn=(4481)
calls=3 2670 
* 42
* 12
+3 40
+2 42
cfn=(4486)
calls=6 +16 
* 150
* 12
+3 10
+1 20

fl=(115) /home/mithuncy/fsm_p11patch/src/backend/port/pg_shmem.c
fn=(2092) GetHugePageSize
403 5
+8 2
+1 2
+10 3
cfi=(25)
cfn=(1278)
calls=1 2186 
* 598
* 1
+5 2
+2 1
+2 287
cob=(3)
cfi=(3)
cfn=(2098) sscanf
calls=40 0 
* 15701
cob=(1)
cfi=(1)
cfn=(223)
calls=1 0 
* 1629
* 45
* 82
+2 3
+2 6
+1 1
-7 205
cob=(3)
cfi=(3)
cfn=(1486)
calls=41 0 
* 8547
* 41
* 82
+12 3
cfi=(25)
cfn=(1374)
calls=1 2385 
* 756
+4 2

fn=(2112) InternalIpcMemoryCreate
104 9
+2 1
+22 6
cob=(1)
cfi=(1)
cfn=(223)
calls=1 0 
* 1308
* 5
* 1
+2 2
+94 5
cfi=(67)
cfn=(2110)
calls=1 362 
* 32
+3 6
cob=(1)
cfi=(1)
cfn=(223)
calls=1 0 
* 1266
* 5
* 1
+2 2
+5 4
cfi=(67)
cfn=(2110)
calls=1 362 
* 32
+10 9
cfi=(17)
cfn=(1138)
calls=1 -13 
* 1243
+2 4
cfi=(54)
cfn=(1950)
calls=1 1259 
* 938
+3 1
+1 7

fn=(2088) PGSharedMemoryCreate
560 9
+20 3
cfn=(2090) CreateAnonymousSegment
calls=1 458 
* 29604
* 1
+1 2
+3 3
cfi=(67)
cfn=(2110)
calls=1 362 
* 32
+3 1
+6 1
+3 3
+2 1
+3 5
cfn=(2112)
calls=1 104 
* 4887
* 1
+1 2
+1 1
+56 2
+1 1
cob=(3)
cfi=(3)
cfn=(654)
calls=1 0 
* 5
* 1
* 2
+1 2
+1 2
+3 5
cfi=(9)
cfn=(490)
calls=1 0 
* 15
* 2
+5 3
+1 3
+5 3
+1 2
+1 3
+3 2
+1 3
+9 3
+2 6
cob=(3)
cfi=(3)
cfn=(856)
calls=1 0 
* 22
* 1
+1 1
+4 4

fn=(2090)
458 5
+1 3
+1 1
+1 1
+6 6
+8 5
cfn=(2092)
calls=1 -72 
* 28004
+2 7
+1 9
+2 11
cob=(1)
cfi=(1)
cfn=(223)
calls=1 0 
* 1292
* 5
* 1
+2 1
cob=(5)
cfi=(5)
cfn=(472)
calls=1 0 
* 3
* 1
* 2
+1 5
+1 4
cfi=(57)
cfn=(2084)
calls=1 1286 
* 68
* 6
cfi=(57)
cfn=(2086)
calls=1 1336 
* 96
+5 5
+6 3
+1 8
cob=(3)
cfi=(3)
cfn=(598)
calls=1 0 
* 33
* 1
* 1
+2 1
cob=(5)
cfi=(5)
cfn=(472)
calls=1 0 
* 3
* 1
* 2
+3 2
+15 3
+1 1
+1 4

fl=(137)
fn=(2556)
32 30
+15 30
cob=(3)
cfi=(3)
cfn=(2562) fflush
calls=9 -47 
* 486
cob=(1)
cfi=(1)
cfn=(223)
calls=1 -47 
* 1314
* 14
+1 30
cob=(3)
cfi=(3)
cfn=(2562)
calls=10 -48 
* 540
* 10
+13 10
cob=(5)
cfi=(5)
cfn=(2570)
calls=9 -61 
* 1677
cob=(1)
cfi=(1)
cfn=(223)
calls=1 -61 
* 2261
* 14
* 10
+1 20
+23 2
cob=(3)
cfi=(3)
cfn=(234)
calls=1 -85 
* 500
* 1
* 1
+2 2
+31 10
+1 20

fl=(316) /home/mithuncy/fsm_p11patch/src/backend/executor/../../../src/include/executor/tuptable.h
fn=(5494) ExecClearTuple
405 4000
+1 6000
cfi=(257) /home/mithuncy/fsm_p11patch/src/backend/executor/execTuples.c
cfn=(5326) tts_heap_clear
calls=1000 301 
* 26000
+2 1000
+1 2000

fl=(18)
fn=(1008)
377 15
+6 12
cfn=(562)
calls=3 152 
* 14972
+2 6

fn=(1012) check_locale
265 66
+4 22
+3 44
cob=(3)
cfi=(3)
cfn=(568) setlocale
calls=11 0 
* 286
* 11
* 11
+1 22
+4 33
cfi=(13)
cfn=(928)
calls=11 1162 
* 1603
* 11
+3 55
cob=(3)
cfi=(3)
cfn=(568)
calls=11 0 
* 20271
* 11
* 11
+3 44
+4 55
cob=(3)
cfi=(3)
cfn=(568)
calls=11 0 
* 18093
* 11
* 22
+2 33
cfi=(13)
cfn=(952)
calls=11 1032 
* 818
+2 22
+1 22

fn=(1018)
326 12
+1 3
+1 6

fn=(1020)
332 18
+1 18
cfn=(1012)
calls=3 -68 
* 13404
+1 6

fn=(562)
152 55
+6 55
cob=(3)
cfi=(3)
cfn=(568)
calls=10 0 
* 14697
cob=(1)
cfi=(1)
cfn=(223)
calls=1 0 
* 14946
* 15
* 11
+21 22
+10 22
+5 10
cfi=(16)
cfn=(460)
calls=2 46 
* 356
+1 2
+5 2
cfi=(19)
cfn=(612)
calls=2 1005 
* 12
* 4
cfi=(19)
cfn=(614)
calls=2 909 
* 20
+4 55
+3 2
+1 2
+1 2
+2 2
+1 2
+1 2
+3 4
+1 4
+6 4
+3 1
+1 1
+1 1
+2 1
+1 1
+1 1
+2 1
+1 1
+1 1
+8 110
cfi=(17)
cfn=(462)
calls=11 -41 
* 4970
+2 33
cob=(3)
cfi=(3)
cfn=(542) putenv
calls=11 0 
* 32620
* 11
* 22
+3 11
+1 22

fn=(622)
994 10
+2 2
+1 2
+12 4
+1 10
cob=(3)
cfi=(3)
cfn=(628) strxfrm
calls=1 0 
* 527
cob=(1)
cfi=(1)
cfn=(223)
calls=1 0 
* 1803
* 6
+1 8
+13 4
+1 10
cob=(3)
cfi=(3)
cfn=(628)
calls=2 0 
* 726
* 2
+1 8
+3 8
+6 10

fn=(1022)
338 12
+1 3
+1 6

fn=(1010)
308 18
+1 18
cfn=(1012)
calls=3 -44 
* 13598
+1 6

fn=(1014)
314 12
+1 3
+1 6

fn=(1016)
320 18
+1 18
cfn=(1012)
calls=3 -56 
* 13460
+1 6

fn=(1006)
354 18
+1 15
+2 2
+1 2
+11 12
cfn=(1012)
calls=2 265 
* 1115
+4 6

fl=(105)
fn=(2062) AutoVacuumShmemSize
3289 6
+6 2
+1 8
+1 10
cfi=(87)
cfn=(2000)
calls=2 493 
* 46
* 10
cfi=(87)
cfn=(2002)
calls=2 476 
* 42
* 2
+2 2
+1 4

fn=(2832)
3272 10
+1 5
+1 10

fn=(2834)
3278 12
+1 6
+1 12

fn=(2526)
3258 4
+1 7
+4 4

fn=(2270) AutoVacuumShmemInit
3308 3
+4 1
cfn=(2062)
calls=1 -23 
* 66
* 4
cfi=(87)
cfn=(2168)
calls=1 373 
* 1035
-1 1
+5 4
+7 2
+1 4
cfi=(74)
cfn=(2272)
calls=1 279 
* 12
+1 4
cfi=(74)
cfn=(2272)
calls=1 279 
* 12
+1 2
+1 6
cob=(3)
cfi=(3)
cfn=(828)
calls=1 0 
* 576
* 1
+3 3
+4 2
+2 21
-1 15
cfi=(74)
cfn=(2274)
calls=3 301 
* 75
-1 15
+6 2

fn=(2606)
395 3
+6 1
cfi=(137)
cfn=(2556)
calls=1 32 
* 295
* 7
+20 1
+5 2

fn=(2604)
3204 2
+1 8
+2 1
+1 2

fn=(2680)
1471 3
+6 1
cfi=(137)
cfn=(2556)
calls=1 32 
* 295
* 7
+20 1
+5 2

fl=(168)
fn=(3010) get_role_oid
5191 7
+3 8
cfi=(151)
cfn=(3012)
calls=1 1227 
* 37800
* 1
+2 2
+4 1
+1 4

fn=(3560)
4689 2
+1 3
+6 4
cfi=(155)
cfn=(2910) CacheRegisterSyscacheCallback
calls=1 1410 
* 65
+4 2

fn=(5168) is_member_of_role
4932 2500
+2 1500
+4 1500
cfi=(181)
cfn=(3328) superuser_arg
calls=500 58 
* 7000
* 1000
+1 1000
+7 1000

fl=(112) /home/mithuncy/fsm_p11patch/src/backend/access/heap/syncscan.c
fn=(2078) SyncScanShmemSize
127 2
+1 1
+1 2

fn=(2296) SyncScanShmemInit
136 3
+5 5
cfi=(87)
cfn=(2168)
calls=1 373 
* 1251
-1 1
+5 4
+5 4
+1 4
+2 2
+2 140
+7 40
+1 40
+1 40
+1 40
+3 193
-1 2
+3 2
-3 38
+3 191
-1 2
-16 3
+16 38
-16 59
+22 2

fl=(263)
fn=(4628)
71 15
+1 9
+1 9
+1 9
+1 9
+1 3
+1 3
+9 6
+22 12
+8 9
+1 12
+9 12
cfi=(261)
cfn=(4600)
calls=3 -48 
* 24
* 12
+67 12
+35 12
+7 6
+3 3
+1 12

fl=(282)
fn=(4832)
89 8
+1 1
+2 2
+1 2
+2 2
+20 1
+4 2
+3 6
cfn=(4834) scanNameSpaceForRefname
calls=1 +34 
* 31
* 1
+2 2
+3 2
+1 5
+4 4
-17 4
+19 1
+1 2

fn=(4834)
156 8
+1 1
+3 4
cfi=(219)
cfn=(4292)
calls=1 -82 
* 8
* 4
+24 1
+1 5

fn=(5204) buildRelationAliases
1032 3500
+1 1500
+4 500
+4 1000
+9 500
+1 500
+3 1000
+2 5000
+3 2000
+8 1000
+9 2000
cfi=(13)
cfn=(928)
calls=500 +86 
* 72500
* 1000
cfi=(217)
cfn=(3872)
calls=500 54 
* 83500
* 500
+4 3000
cfi=(45)
cfn=(960)
calls=500 129 
* 145000
* 1000
-26 3500
+30 1000
+5 2000

fn=(4830)
760 10
+1 1
+1 2
+2 1
+4 4
cfi=(219)
cfn=(4292)
calls=1 78 
* 8
* 4
+30 4
+3 3
-37 4
+40 1
+1 5

fn=(5200) addRangeTableEntryForRelation
1290 5500
+1 2000
cfi=(13)
cfn=(3400)
calls=500 853 
* 141500
* 2500
+1 3000
+9 1000
+1 1500
+1 2000
+1 2500
+1 1500
+6 2000
cfi=(218)
cfn=(5202) makeAlias
calls=500 387 
* 154500
* 1000
+1 4000
cfn=(5204)
calls=500 1032 
* 331500
+8 1000
+1 1500
+1 1500
+2 1000
+1 1000
+1 1000
+1 1000
+1 1000
+6 3000
cfi=(45)
cfn=(960)
calls=500 129 
* 145000
* 1000
+2 500
+1 1000

fl=(65) /home/mithuncy/fsm_p11patch/src/common/file_perm.c
fn=(1524) SetDataDirectoryCreatePerm
35 3
+2 4
+9 1
+1 1
+1 1
+2 2

fl=(302) /home/mithuncy/fsm_p11patch/src/backend/commands/../../../src/include/utils/palloc.h
fn=(5232) MemoryContextSwitchTo
110 537000
+1 358000
+2 358000
+1 179000
+1 358000

fl=(56)
fn=(5754)
364 2
+1 4
cfi=(126)
cfn=(5756)
calls=1 48 
* 9
* 3
+6 2

fn=(1142)
1208 4
+1 3
+6 1
+1 1
+8 2

fn=(1146)
1202 4
+1 2
+1 2

fn=(1144)
1145 6
+1 9
+49 2
+2 1
+1 2

fl=(67)
fn=(2712) on_exit_reset
410 2
+1 1
+1 1
+1 1
+1 1
cfi=(129) /home/mithuncy/fsm_p11patch/src/backend/storage/ipc/dsm.c
cfn=(2714) reset_on_dsm_detach
calls=1 1016 
* 19
+1 2

fn=(5716) proc_exit
105 4
+2 3
cfn=(5718) proc_exit_prepare
calls=1 +55 
* 33980
+43 4
cfi=(57)
cfn=(2084)
calls=1 1286 
* 68
* 6
cfi=(57)
cfn=(2086)
calls=1 1336 
* 109
+2 3
cob=(1)
cfi=(1)
cfn=(223)
calls=1 0 
* 13412
* 5

fn=(5788) atexit_callback
291 2
+3 2
cfn=(5718)
calls=1 162 
* 645
+1 2

fn=(1578)
306 30
+1 15
+5 30
+1 30
+2 15
+2 20
+2 2
cfi=(9)
cfn=(1580)
calls=1 0 
* 1444
+1 1
+2 20

fn=(2944)
334 6
+1 3
+5 6
+1 6
+2 3
+2 4
+5 4

fn=(5720) shmem_exit
225 8
+1 2
+10 8
cfi=(57)
cfn=(2084)
calls=2 1286 
* 136
* 16
cfi=(57)
cfn=(2086)
calls=2 1336 
* 218
+2 2
+1 14
cfi=(75)
cfn=(5722)
calls=1 1187 
* 9033
-1 18
+3 2
+18 2
cfi=(129)
cfn=(5730) dsm_backend_shutdown
calls=2 621 
* 56
+10 8
cfi=(57)
cfn=(2084)
calls=2 1286 
* 136
* 16
cfi=(57)
cfn=(2086)
calls=2 1336 
* 218
+2 2
+1 84
cfi=(84)
cfn=(5752)
calls=1 800 
* 736
cfi=(84)
cfn=(5748)
calls=1 789 
* 324
cfi=(101)
cfn=(5746)
calls=1 +65 
* 329
cfi=(103)
cfn=(5744)
calls=1 139 
* 29
cfi=(50)
cfn=(5736) AtProcExit_Buffers
calls=1 2478 
* 47
cfi=(38)
cfn=(5734) pgstat_beshutdown_hook
calls=1 2953 
* 51
-1 48
+3 2
+2 2
+1 4

fn=(5718)
162 8
+5 2
+7 2
+1 2
+1 2
+1 2
+1 2
+11 2
+2 2
+3 6
cfn=(5720)
calls=2 +31 
* 11551
+2 8
cfi=(57)
cfn=(2084)
calls=2 1286 
* 136
* 16
cfi=(57)
cfn=(2086)
calls=2 1336 
* 218
+12 2
+1 42
cfi=(58)
cfn=(5776) socket_close
calls=1 +48 
* 20
cfi=(25)
cfn=(5774)
calls=1 2776 
* 22540
cfi=(140)
cfn=(5772) smgrshutdown
calls=1 -73 
* 26
-1 30
+4 2
+1 4

fn=(2110)
362 66
+1 33
+5 66
+1 66
+2 33
+2 44
+5 44

fl=(128)
fn=(2278)
40 80
+1 40
+1 80
cfi=(119)
cfn=(2152)
calls=20 -12 
* 220
+1 40

fn=(5760)
199 3
+1 2
+2 2
+1 1
+8 2

fl=(184)
fn=(3450)
109 44810
+1 13443
+1 13443
+1 13443
+1 13443
+1 13443
+1 13443
+1 31367
cfi=(171)
cfn=(3452) fmgr_info_copy
calls=4481 612 
* 188202
+1 8962

fn=(3342)
81 17064
+1 3792
+1 5688
+1 5688
+1 3792
+1 3792
+1 5688
+1 11376
cfi=(171)
cfn=(3344) fmgr_info
calls=1896 +37 
* 155472
+1 3792

fl=(227)
fn=(5214)
3833 4000
+12 2000
cfi=(151)
cfn=(3306)
calls=500 1114 
* 12603284
* 500
+1 1000
+5 4000
+10 2000
+1 2500
cfi=(170)
cfn=(5216) IsSystemClass
calls=500 80 
* 56000
-1 1000
+15 1500
cfi=(181)
cfn=(3328)
calls=500 58 
* 7000
* 1000
+5 1500
cfi=(151)
cfn=(3280)
calls=500 1161 
* 51500
+1 1000
+39 2000

fn=(4502) pg_namespace_aclcheck
4694 12
+1 12
cfn=(4504) pg_namespace_aclmask
calls=2 4173 
* 66
* 4
+1 4
+3 4

fn=(3970) pg_language_aclcheck
4668 6
+1 6
cfn=(3972) pg_language_aclmask
calls=1 4037 
* 33
* 2
+1 2
+3 2

fn=(4504)
4173 16
+9 6
cfi=(181)
cfn=(3328)
calls=2 58 
* 28
* 4
+1 4
+64 8

fn=(5010)
4656 18
+1 18
cfn=(5012) pg_proc_aclmask
calls=3 3983 
* 99
* 6
+1 6
+3 6

fn=(3972)
4037 8
+9 3
cfi=(181)
cfn=(3328)
calls=1 58 
* 14
* 2
+1 2
+36 4

fn=(5012)
3983 24
+9 9
cfi=(181)
cfn=(3328)
calls=3 58 
* 42
* 6
+1 6
+36 12

fl=(314) /home/mithuncy/fsm_p11patch/src/backend/storage/buffer/../../../../src/include/port/atomics/generic-gcc.h
fn=(5430) pg_atomic_fetch_or_u32_impl
212 24000
+1 60000
+1 12000

fl=(79) /home/mithuncy/fsm_p11patch/src/backend/utils/error/../../../../src/include/utils/palloc.h
fn=(1884) MemoryContextSwitchTo
110 108
+1 72
+2 72
+1 36
+1 72

fl=(260)
fn=(4598)
574 12
+3 15
cfi=(261)
cfn=(4600)
calls=3 78 
* 24
* 12
+22 6

fn=(4602)
611 15
+4 6
+2 6
+1 30
cfn=(4604) pull_up_subqueries_recurse
calls=3 +63 
* 141
-1 3
+4 12
+4 12

fn=(4604)
681 30
+2 12
+50 12
+2 6
+1 3
+9 12
+3 12
cfi=(261)
cfn=(4600)
calls=3 78 
* 24
* 12
+27 6
+4 3
+76 3
+1 6

fl=(150) /home/mithuncy/fsm_p11patch/src/backend/utils/cache/relmapper.c
fn=(3618) AtEOXact_RelationMap
477 14
+1 12
+13 6
+5 8
+17 4

fn=(2892) RelationMapInitialize
585 2
+2 1
+1 1
+1 1
+1 1
+1 1
+1 1
+1 1
+1 1
+1 2

fn=(2918) RelationMapInitializePhase2
605 2
+4 3
+6 2
cfn=(2920) load_relmap_file
calls=1 +84 
* 1571
+1 2

fn=(2920)
699 12
+7 4
+2 7
cfi=(17)
cfn=(462)
calls=1 203 
* 360
+2 2
+4 9
cfi=(17)
cfn=(462)
calls=1 203 
* 470
+2 1
+4 4
cfi=(25)
cfn=(2328)
calls=1 2236 
* 122
* 4
cfi=(25)
cfn=(2328)
calls=1 2236 
* 122
* 2
+1 4
+13 4
cfi=(157) /home/mithuncy/fsm_p11patch/src/backend/utils/cache/../../../../src/include/pgstat.h
cfn=(2922) pgstat_report_wait_start
calls=2 1239 
* 32
+1 12
cob=(5)
cfi=(5)
cfn=(684)
calls=2 0 
* 14
* 2
* 2
+1 4
+12 2
cfi=(157)
cfn=(2924) pgstat_report_wait_end
calls=2 1263 
* 28
+2 6
cfi=(25)
cfn=(2332)
calls=2 2413 
* 148
+3 8
+1 4
-1 4
+2 4
-1 4
+7 2
+1 12
cfi=(71)
cfn=(1608)
calls=2 23 
* 1818
* 2
+1 2
+2 8
+4 8

fn=(3362) RelationMapInitializePhase3
626 2
+4 3
+6 2
cfn=(2920)
calls=1 +63 
* 1682
+1 2

fn=(2938) RelationMapOidToFilenode
160 165
+5 66
+2 21
+1 126
+5 21
+1 42
+2 3294
+1 105
-3 2724
+8 12
+1 72
+5 12
+1 24
+2 684
+1 60
-3 558
+8 66

fn=(5530) AtCCI_RelationMap
440 1000
+1 1500
+7 1500
+7 1000

fl=(228) /home/mithuncy/fsm_p11patch/src/backend/utils/fmgr/dfmgr.c
fn=(4126) find_rendezvous_variable
681 4
+7 3
+4 118
+1 1
+1 1
+1 6
cfi=(31)
cfn=(794)
calls=1 317 
* 3227
* 1
+7 7
cfi=(31)
cfn=(836)
calls=1 910 
* 676
* 1
+6 4
+1 2
+2 2
+1 2

fn=(4130) lookup_external_function
172 5
+1 5
cob=(6)
cfi=(6)
cfn=(4054) dlsym
calls=1 0 
* 1110
* 1
+1 2

fn=(3996) internal_load_library
185 5
+10 5
+6 2
+5 5
cfi=(9)
cfn=(490)
calls=1 0 
* 15
* 2
+6 5
+7 2
+6 3
cob=(3)
cfi=(3)
cfn=(424)
calls=1 0 
* 26
* 1
* 1
-1 2
cob=(3)
cfi=(3)
cfn=(388)
calls=1 0 
* 332
* 1
* 1
+2 2
+5 55
+1 6
cob=(3)
cfi=(3)
cfn=(810)
calls=1 0 
* 99
* 1
+1 3
+2 3
+2 2
+2 5
cob=(1)
cfi=(1)
cfn=(223)
calls=1 0 
* 254568
* 5
* 2
+1 4
+13 5
cob=(1)
cfi=(1)
cfn=(223)
calls=1 0 
* 3134
* 5
-1 1
+2 2
+2 2
cob=(12)
cfi=(230)
cfn=(4068) Pg_magic_func
calls=1 36 
* 5
* 1
+2 5
+1 6
cob=(3)
cfi=(3)
cfn=(3062)
calls=1 0 
* 27
* 1
-1 2
+29 5
cob=(6)
cfi=(6)
cfn=(4054)
calls=1 0 
* 765
* 1
* 1
+1 3
+1 2
cob=(12)
cfi=(230)
cfn=(4070) _PG_init
calls=1 148 
* 3509517
+3 3
+1 3
+3 2
+3 2
+1 4

fn=(3988) load_external_function
109 9
+6 3
cfn=(3990) expand_dynamic_library_name
calls=1 496 
* 2258
* 1
+3 3
cfn=(3996)
calls=1 +67 
* 3768667
* 1
+3 2
+1 3
+3 5
cob=(6)
cfi=(6)
cfn=(4054)
calls=1 0 
* 975
* 1
* 1
+2 2
+6 3
cfi=(13)
cfn=(952)
calls=1 1032 
* 85
+1 1
+1 4

fn=(3992) substitute_libpath_macro
566 10
+6 8
+3 6
cfi=(11)
cfn=(456)
calls=2 104 
* 162
* 6
+3 12
+1 10
cob=(3)
cfi=(3)
cfn=(1044)
calls=2 0 
* 54
* 2
-1 4
+7 12
cfi=(81)
cfn=(3170)
calls=2 47 
* 1063
+1 8

fn=(3990)
496 4
+7 3
cfi=(11)
cfn=(456)
calls=1 104 
* 81
* 3
+2 4
+8 3
cfn=(3992)
calls=1 +53 
* 676
* 1
+1 3
cfn=(3994) file_exists
calls=1 -50 
* 44
* 2
+2 3
cfi=(13)
cfn=(952)
calls=1 1032 
* 85
+3 6
cfi=(81)
cfn=(3170)
calls=1 47 
* 517
* 1
+2 4
+9 3
cfn=(3992)
calls=1 +36 
* 681
* 1
+1 3
cfi=(13)
cfn=(952)
calls=1 1032 
* 85
+1 3
cfn=(3994)
calls=1 -68 
* 36
* 2
+1 2
+9 2

fn=(3994)
464 10
+5 10
cfi=(9)
cfn=(490)
calls=2 0 
* 34
* 4
+1 5
+1 1
cob=(5)
cfi=(5)
cfn=(472)
calls=1 0 
* 3
* 1
* 3
+5 1
+1 8

fl=(71)
fn=(1608)
23 30
+1 12
+1 24
+10 6
+2 820
fi=(321) /usr/lib/gcc/x86_64-redhat-linux/4.8.5/include/smmintrin.h
822 492
fe=(71)
37 164
+1 164
-3 680
+7 24
+2 5
fi=(321)
815 3
fe=(71)
44 1
+1 1
+16 6
+2 12
fi=(321)
803 6
fe=(71)
63 2
+1 2
-3 24
+6 6
+1 12

fl=(107) /home/mithuncy/fsm_p11patch/src/backend/replication/logical/origin.c
fn=(2280) ReplicationOriginShmemInit
496 3
+3 3
+4 1
cfn=(2066) ReplicationOriginShmemSize
calls=1 -27 
* 91
* 4
cfi=(87)
cfn=(2168)
calls=1 373 
* 1167
-1 1
+4 3
+2 4
+4 2
+2 4
cfn=(2066)
calls=1 -38 
* 91
* 521
+2 2
+3 10
-1 130
cfi=(99)
cfn=(2144)
calls=10 678 
* 640
+2 110
cfi=(128)
cfn=(2278)
calls=10 40 
* 230
-4 43
+8 5
cfi=(99)
cfn=(2158)
calls=1 +79 
* 17
+2 2

fn=(2066)
476 9
+1 3
+7 9
+3 12
cfi=(87)
cfn=(2002)
calls=3 -11 
* 63
* 3
+2 15
cfi=(87)
cfn=(2000)
calls=3 +4 
* 69
* 15
cfi=(87)
cfn=(2002)
calls=3 -13 
* 63
* 3
+2 3
+1 6

fl=(123)
fn=(2206)
227 81920
+3 81920
cfi=(124)
cfn=(2208)
calls=16384 -68 
* 344064
+1 32768
-4 10
+3 10
cfi=(124)
cfn=(2208)
calls=2 -68 
* 42
+1 4

fn=(5418)
332 7500
+2 7500
cfi=(175)
cfn=(5420)
calls=1500 190 
* 18000
+1 3000

fn=(3214) pg_atomic_read_u32
245 108096
+2 81072
cfi=(124)
cfn=(3216)
calls=27024 47 
* 189168
+1 54048

fn=(3218) pg_atomic_compare_exchange_u32
316 153144
+4 153144
cfi=(175)
cfn=(3220)
calls=25524 170 
* 510480
+1 51048

fn=(5428) pg_atomic_fetch_or_u32
376 30000
+2 30000
cfi=(314)
cfn=(5430)
calls=6000 212 
* 96000
+1 12000

fn=(5438) pg_atomic_write_u32
262 30000
+3 30000
cfi=(124)
cfn=(2210)
calls=6000 56 
* 54000
+1 12000

fl=(264)
fn=(4630)
56 21
+1 9
+8 15
+3 9
cfi=(265)
cfn=(4632) build_empty_join_rel
calls=3 1121 
* 2943
* 3
+8 15
+2 21
cfi=(259)
cfn=(4636)
calls=3 1089 
* 57
-1 6
+7 9
-1 6
-1 12
cfi=(267)
cfn=(4638) create_result_path
calls=3 1441 
* 786
* 3
-1 12
cfi=(267)
cfn=(4640)
calls=3 423 
* 1020
+6 9
cfi=(267)
cfn=(4644)
calls=3 245 
* 1092
+6 6
+1 18
cfi=(258)
cfn=(4646)
calls=3 3442 
* 336
+2 6
243 6

fl=(134) /home/mithuncy/fsm_p11patch/src/backend/libpq/../../../src/include/utils/palloc.h
fn=(2532) MemoryContextSwitchTo
110 48
+1 32
+2 32
+1 16
+1 32

fl=(232) /home/mithuncy/fsm_p11patch/src/backend/executor/../../../src/include/lib/ilist.h
fn=(4142) slist_init
555 3
+1 2
+1 2

fl=(245)
fn=(4416)
330 20
+3 12
cfi=(219)
cfn=(4292)
calls=4 78 
* 40
* 8
+2 12
+2 28
cfn=(4418) markTargetListOrigin
calls=4 +16 
* 64
-4 28
+6 8

fn=(4418)
353 28
+5 24
+1 4
+68 8

fn=(4432)
300 20
+3 12
cfi=(219)
cfn=(4292)
calls=4 78 
* 40
* 8
+2 12
+1 16
cfi=(247)
cfn=(4434)
calls=4 43 
* 96
* 4
+2 8
-5 28
+14 8

fn=(4398)
133 24
+1 4
+8 12
+2 12
cfi=(219)
cfn=(4292)
calls=4 -66 
* 40
* 8
+2 12
+7 8
+2 20
+14 20
+22 48
cfn=(4400) transformTargetEntry
calls=4 91 
* 707742
* 4
-1 16
cfi=(45)
cfn=(960)
calls=4 -61 
* 1098
* 4
-46 28
+61 16
+7 4
+1 8

fn=(4400)
91 40
+2 8
+7 8
+3 24
cfi=(246)
cfn=(4402)
calls=4 +44 
* 706548
* 4
+3 24
+6 12
cfn=(4410) FigureColname
calls=4 1652 
* 201
* 4
+3 4
+1 20
-1 20
cfi=(218)
cfn=(4414)
calls=4 241 
* 817
+4 8

fn=(4410)
1652 16
+1 4
+2 20
cfn=(4412) FigureColnameInternal
calls=4 +36 
* 136
+1 12
+1 2
+2 3
+1 8

fn=(4412)
1691 20
+1 4
+2 8
+3 62
1928 2
1742 4
cfi=(219)
cfn=(3882)
calls=1 84 
* 10
* 4
+1 2
+2 4
+6 4
+5 1
1931 3
+1 8

fl=(38)
fn=(3756) pgstat_setheader
4156 272
+1 204
+1 136

fn=(3762)
2991 15
+1 6
+3 3
+4 6
+3 12
+28 3
cfi=(26)
cfn=(3764)
calls=3 709 
* 15
* 3
+1 6
+7 3
cob=(3)
cfi=(3)
cfn=(424)
calls=1 0 
* 41
* 1
* 8
cob=(3)
cfi=(3)
cfn=(424)
calls=1 0 
* 41
* 1
* 2
+2 1
cfi=(21)
cfn=(656)
calls=1 1571 
* 22
* 2
cfi=(21)
cfn=(656)
calls=2 1571 
* 44
* 3
+5 15
+2 9
+1 9
+2 6
+2 8
cob=(3)
cfi=(3)
cfn=(856)
calls=1 0 
* 68
* 1
+1 6
+1 3
+3 5
+1 2
-1 10
+1 4

fn=(2050) BackendStatusShmemSize
2609 3
+4 6
cfi=(87)
cfn=(2000)
calls=1 493 
* 23
* 1
+3 2
-1 4
cfi=(87)
cfn=(2000)
calls=1 493 
* 23
* 5
cfi=(87)
cfn=(2002)
calls=1 476 
* 21
* 1
+4 2
-1 4
cfi=(87)
cfn=(2000)
calls=1 493 
* 23
* 5
cfi=(87)
cfn=(2002)
calls=1 476 
* 21
* 1
+4 2
-1 6
cfi=(87)
cfn=(2000)
calls=1 493 
* 23
* 5
cfi=(87)
cfn=(2002)
calls=1 476 
* 21
* 1
+7 1
+1 2

fn=(3694) pgstat_clear_snapshot
5615 4
+2 6
+4 2
+1 2
+1 2
+1 2
+1 4

fn=(3594)
2790 3
+14 3
+1 7
cob=(3)
cfi=(3)
cfn=(856)
calls=1 0 
* 70
* 1
* 1
+10 2
+5 3
+2 1
cfi=(105)
cfn=(2832)
calls=1 3272 
* 5
* 2
+5 1
cfi=(105)
cfn=(2834)
calls=1 3278 
* 5
* 2
+5 3
+5 3
+8 3
+33 5
+1 5
+2 3
+1 3
+1 2
+1 2
+1 2
+1 3
+3 4
+3 1
cfi=(54)
cfn=(3578)
calls=1 415 
* 5
* 3
+4 24
+1 7
+4 3
+16 2
+2 2
+1 3
+1 3
+2 4
+1 4
+1 7
+1 2
+1 2
+8 5
+3 3
+1 3
cfn=(888)
calls=1 3164 
* 281
+1 2

fn=(3754) pgstat_send_tabstat
920 272
+5 204
+7 272
+2 201
+1 201
+1 201
+1 201
+1 67
+1 67
+1 67
+1 134
+4 2
+1 2
+1 2
+1 2
+3 3
+1 8
+3 4
cfn=(3756)
calls=1 4156 
* 9
-4 201
+1 536
+3 268
cfn=(3756)
calls=67 4156 
* 603
+1 340
cfn=(3758) pgstat_send
calls=68 4169 
* 2448
+1 136

fn=(3758)
4169 340
+3 204
+3 204
+5 476
cob=(5)
cfi=(5)
cfn=(2502)
calls=68 0 
* 816
* 68
* 68
+1 136
+7 136

fn=(5480) add_tabstat_xact_level
1885 2500
+8 1500
cfn=(5482) get_tabstat_stack_level
calls=500 -30 
* 7633
* 500
+4 500
-1 1500
cfi=(13)
cfn=(2156)
calls=500 815 
* 95000
* 500
+3 1500
+1 2000
+1 1500
+1 2000
+1 1500
+1 1500
+1 1000

fn=(888)
3164 12
+1 6
+3 6
+1 1
+3 6
cob=(3)
cfi=(3)
cfn=(424)
calls=2 0 
* 30
* 2
* 12
cfi=(19)
cfn=(3570)
calls=2 821 
* 416
* 2
+7 10
+2 16
cob=(3)
cfi=(3)
cfn=(856)
calls=2 0 
* 24
* 2
+1 12
+2 10
+1 6

fn=(2256) CreateSharedBackendStatus
2637 3
+7 6
cfi=(87)
cfn=(2000)
calls=1 493 
* 23
* 1
+2 5
cfi=(87)
cfn=(2168)
calls=1 373 
* 1064
-1 1
+3 4
+5 23
cob=(3)
cfi=(3)
cfn=(828)
calls=1 0 
* 4279
* 1
+4 6
cfi=(87)
cfn=(2000)
calls=1 493 
* 23
* 1
+2 5
cfi=(87)
cfn=(2168)
calls=1 373 
* 1270
-1 1
+3 4
+2 23
cob=(3)
cfi=(3)
cfn=(828)
calls=1 0 
* 849
* 1
+3 2
+1 2
+2 1428
+1 119
-3 599
+8 6
cfi=(87)
cfn=(2000)
calls=1 493 
* 23
* 1
+2 5
cfi=(87)
cfn=(2168)
calls=1 373 
* 1259
-1 1
+3 4
+2 23
cob=(3)
cfi=(3)
cfn=(828)
calls=1 0 
* 849
* 1
+3 2
+1 2
+2 1428
+1 119
-3 599
+9 2
-1 6
cfi=(87)
cfn=(2000)
calls=1 493 
* 23
* 1
+3 5
cfi=(87)
cfn=(2168)
calls=1 373 
* 1118
-1 1
+5 4
+2 23
cob=(3)
cfi=(3)
cfn=(828)
calls=1 0 
* 13344
* 1
+3 2
+1 2
+2 1428
+1 357
-3 599
+28 2

fn=(3744)
813 15
+12 21
+1 1
-1 2
+1 3
+1 2
-1 2
+2 1
+6 2
cfi=(26)
cfn=(3746) GetCurrentTransactionStopTimestamp
calls=2 721 
* 39
* 2
+1 8
+1 12
cfi=(21)
cfn=(3748)
calls=2 1672 
* 34
* 2
-1 4
+3 4
+9 6
+1 6
cfi=(31)
cfn=(3750) hash_destroy
calls=2 -33 
* 1061
+1 2
+8 4
+1 2
+1 2
+1 2
+2 6
+2 16
+2 6430
+11 3858
cob=(3)
cfi=(3)
cfn=(3062)
calls=643 0 
* 28837
* 643
* 1286
+2 109
+5 3204
+1 5830
+1 2120
+1 4240
cob=(3)
cfi=(3)
cfn=(856)
calls=530 0 
* 30375
* 530
-3 4
+1 44
+1 16
+1 32
cob=(3)
cfi=(3)
cfn=(856)
calls=4 0 
* 243
* 4
+2 4806
+2 195
cfn=(3754)
calls=65 +29 
* 6175
+1 130
-28 3247
+32 248
cob=(3)
cfi=(3)
cfn=(828)
calls=8 0 
* 8563
* 8
+2 16
-36 44
+43 6
+2 6
cfn=(3754)
calls=2 +13 
* 190
+1 6
+1 3
cfn=(3754)
calls=1 +11 
* 86
+3 2
cfn=(3760) pgstat_send_funcstats
calls=2 +52 
* 16
+1 6

fn=(3074)
1715 25524
+1 19143
+1 25524
+3 18606
+1 5844
+9 44667
+11 25524
+1 17274
-1 11516
+2 5738
+3 5144
cfn=(3076) get_tabstat_entry
calls=643 +8 
* 356120
* 1286
+1 12762

fn=(5734)
2953 5
+1 2
+8 3
+1 2
cfn=(3744)
calls=1 813 
* 25
+7 5
+2 2
+2 5
+1 2

fn=(3760)
964 6
+8 6
+40 4

fn=(2480)
356 4
+2 1
+8 1
+17 1
+1 1
+1 1
+1 1
+1 1
+1 1
+1 1
+1 1
+1 7
cfi=(77)
cfn=(1630)
calls=1 59 
* 10405
* 1
+1 5
+16 3
+4 4
+4 3
+7 6
cob=(3)
cfi=(3)
cfn=(1656) socket
calls=1 0 
* 5
* 1
* 4
+12 9
cob=(3)
cfi=(3)
cfn=(1802) bind
calls=1 0 
* 5
* 1
* 2
+10 1
+1 6
cob=(1)
cfi=(1)
cfn=(223)
calls=1 0 
* 1340
* 5
* 2
+16 6
cob=(1)
cfi=(1)
cfn=(223)
calls=1 0 
* 790
* 5
* 2
+16 1
+3 6
cob=(1)
cfi=(1)
cfn=(223)
calls=1 0 
* 758
* 5
* 2
+19 27
+1 21
+2 1
+1 1
+1 9
cob=(1)
cfi=(1)
cfn=(223)
calls=1 0 
* 1276
* 5
* 1
+1 2
+3 2
+9 21
+16 3
+3 6
cob=(1)
cfi=(1)
cfn=(223)
calls=1 0 
* 777
* 5
* 2
+12 3
+11 1
408 2
564 5
+8 3
cfi=(132) /home/mithuncy/fsm_p11patch/src/port/noblock.c
cfn=(2518) pg_set_noblock
calls=1 26 
* 67
* 3
+18 1
+2 9
cob=(1)
cfi=(1)
cfn=(223)
calls=1 0 
* 1326
* 5
* 2
+8 1
+1 4
+8 5
cfi=(77)
cfn=(1942)
calls=1 89 
* 228
* 1
+22 4

fn=(2970) pgstat_report_xact_timestamp
3193 12
+1 8
+2 24
+8 20
+1 12
+1 20
+1 8

fn=(3076)
1754 3858
+9 1929
+4 10
cob=(3)
cfi=(3)
cfn=(828)
calls=2 0 
* 44
* 2
+1 2
+1 2
+2 12
cfi=(31)
cfn=(794)
calls=2 317 
* 5503
* 2
+9 14
cfi=(31)
cfn=(836)
calls=2 910 
* 1805
* 4487
cfi=(31)
cfn=(836)
calls=641 910 
* 285585
* 643
+1 2572
+3 1286
+6 2572
+8 1929
+4 4
cfi=(13)
cfn=(2156)
calls=1 815 
* 1637
-1 1
+5 2
+1 1
-1 1284
+1 642
+2 4492
+2 20
cfi=(13)
cfn=(2156)
calls=5 815 
* 8619
-1 10
+3 15
-6 20
+6 3354
-6 7044
+13 9002
+1 1929
+1 1929
+5 1929
+2 643
+1 1286

fn=(5482)
1863 2000
+3 1000
+1 2996
+3 1
-1 3
cfi=(13)
cfn=(798)
calls=1 772 
* 122
* 1
+3 3
+1 3
+1 2
+1 2
+2 1
+1 2
-1 499
+1 998

fn=(2608)
728 3
+8 3
+9 2
cob=(10)
cfi=(22)
cfn=(1810)
calls=1 0 
* 3
* 1
* 1
+1 7
+3 2
+8 1
cfi=(137)
cfn=(2556)
calls=1 32 
* 295
* 7
+25 1
+5 2

fn=(2914)
2750 2
+2 3
+3 13
+19 3
cfi=(67)
cfn=(2110)
calls=1 362 
* 32
+1 2

fn=(3692) AtEOXact_PgStat
2058 10
+7 4
+1 8
+9 4
+1 4
+6 4
+6 1500
+3 2000
+3 3500
+1 3500
+1 3500
+1 1000
+2 2000
+1 2000
+7 1000
+1 3000
-1 1500
+3 1000
+1 2500
-1 1500
+3 1000
+1 2500
+1 1000
-1 500
-1 2000
+11 1000
-42 2502
+45 2
+3 2
cfn=(3694)
calls=2 5615 
* 22
+1 4

fn=(5478)
1912 2500
+1 1500
+2 1000
+3 500
cfi=(26)
cfn=(3532) GetCurrentTransactionNestLevel
calls=500 759 
* 4000
* 500
+2 2000
+2 2500
cfn=(5480)
calls=500 -37 
* 120633
+2 4000
+2 1000

fl=(61)
fn=(1270)
110 18
+1 12
+2 12
+1 6
+1 12
-5 12
+1 8
+2 8
+1 4
+1 8

fl=(32)
fn=(968)
37 1605
+3 1605
+1 1605
+2 963
-3 770
+1 770
+2 462
+2 536
+2 693
+3 924
+1 454
+1 12
+3 693
+1 1065
+2 524
+1 108
+2 216
-1 154
+2 642

fn=(1510)
123 7130
+1 5704
+1 2852
+3 1426
+1 2852

fn=(834) pg_toupper
106 425
+1 282
+1 224
+1 87
+2 85
+1 170

fn=(970)
70 7890
+1 1315
+2 16710
+1 16710
+2 10026
+2 3280
+1 1596
+1 66
+3 1712
+1 62
+1 2367
+3 2460
+1 4030
+2 5072
-20 19255
+23 509
+1 2630

fl=(97) /home/mithuncy/fsm_p11patch/src/backend/access/transam/twophase.c
fn=(2038) TwoPhaseShmemSize
237 6
+4 2
+1 10
cfi=(87)
cfn=(2000)
calls=2 493 
* 28
* 10
cfi=(87)
cfn=(2002)
calls=2 476 
* 42
* 2
+2 8
+1 10
cfi=(87)
cfn=(2000)
calls=2 493 
* 28
* 10
cfi=(87)
cfn=(2002)
calls=2 476 
* 42
* 2
+3 2
+1 4

fn=(2258) TwoPhaseShmemInit
253 3
+3 1
cfn=(2038)
calls=1 -19 
* 103
* 4
cfi=(87)
cfn=(2168)
calls=1 373 
* 1189
* 1
+3 4
+6 2
+1 2
+6 1
+1 5
-2 3
+4 5
+26 2

fl=(172)
fn=(3118)
322 28820
+4 5764
+1 5688
-1 5688
+2 8532
cfi=(189) /home/mithuncy/fsm_p11patch/src/backend/catalog/index.c
cfn=(3412) ReindexIsProcessingIndex
calls=2844 4029 
* 116604
* 2844
-1 5688
+2 11376
cfi=(190)
cfn=(3417) index_open'2
calls=203 152 
* 431142
cfi=(190)
cfn=(3416) index_open
calls=2641 152 
* 7346690
* 5688
+2 38
+2 76
cfi=(13)
cfn=(940)
calls=38 925 
* 3527
* 5688
cfi=(13)
cfn=(940)
calls=2844 925 
* 277427
* 2882
+2 8646
+1 8646
+2 5764
+2 6783
+2 6783
cfi=(110)
cfn=(3120)
calls=2261 +99 
* 692803
* 4522
cfi=(110)
cfn=(3128)
calls=2261 864 
* 1037834
* 2261
+1 9044
+5 1242
+3 5764
+5 5688
+4 8954
+2 110124
+2 53724
+1 4477
-5 38349
+8 26862
-12 26440
+16 19908
cfi=(190)
cfn=(3418) index_beginscan
calls=2844 226 
* 3032444
* 5688
+2 22752
cfi=(190)
cfn=(3428) index_rescan
calls=2844 -60 
* 606893
+1 8532
+11 304
cfi=(169)
cfn=(3142)
calls=38 1437 
* 55567
* 76
+3 76
+3 38
+1 76
-1 2844
+1 5688

fn=(3119) systable_beginscan'2
322 30
+4 6
+1 6
-1 6
+2 9
cfi=(189)
cfn=(3412)
calls=3 4029 
* 123
* 3
-1 6
+2 12
cfi=(190)
cfn=(3417)
calls=3 152 
* 6351
* 6
+4 6
cfi=(13)
cfn=(940)
calls=3 925 
* 276
* 3
+2 9
+1 9
+2 6
+2 6
+2 6
cfi=(110)
cfn=(3120)
calls=2 +99 
* 441
* 4
cfi=(110)
cfn=(3128)
calls=2 864 
* 884
* 2
+1 8
+5 2
+3 6
+5 6
+4 8
+2 90
+2 48
+1 4
-5 31
+8 24
-12 25
+16 21
cfi=(190)
cfn=(3418)
calls=3 226 
* 2584
* 6
+2 24
cfi=(190)
cfn=(3428)
calls=3 -60 
* 572
+1 9
+17 3
+1 6

fn=(3186)
406 12976
+3 12976
+2 15800
cfi=(190)
cfn=(3434) index_getnext
calls=3160 661 
* 31136502
* 3160
+9 19515
+1 3160
+3 420
cfi=(169)
cfn=(3188)
calls=84 1848 
* 5840876
* 84
+2 84
+1 168
-1 3160
+1 6320

fn=(3254)
489 11540
+1 11540
+2 11388
cfi=(190)
cfn=(3508) index_endscan
calls=2847 342 
* 2478029
+1 14235
cfi=(190)
cfn=(3514) index_close
calls=2847 178 
* 7221175
* 2847
+3 152
cfi=(169)
cfn=(3256)
calls=38 1585 
* 19916
+2 11540
+1 9052
cfi=(110)
cfn=(3266)
calls=2263 906 
* 595017
+2 8655
cfi=(13)
cfn=(952)
calls=2885 1032 
* 245225
+1 5770

fn=(3424) RelationGetIndexScan
79 17082
+3 5694
cfi=(13)
cfn=(940)
calls=2847 925 
* 277579
* 2847
+2 5694
+1 8541
+1 5694
+1 8541
+1 8541
+5 5694
+1 22776
cfi=(13)
cfn=(940)
calls=2847 925 
* 293569
* 8541
+3 5694
+3 5694
+2 5694
+12 5694
+1 2847
cfi=(26)
cfn=(3426) TransactionStartedDuringRecovery
calls=2847 869 
* 17082
* 5694
+1 28470
+2 5694
+2 5694
+1 5694
+1 5694
+1 5694
+2 17082
+1 5694
+1 5694
+1 5694
+2 2847
+1 5694

fn=(3512) IndexScanEnd
147 11388
+1 11388
+1 11388
cfi=(13)
cfn=(952)
calls=2847 1032 
* 241995
+1 11388
+3 8541
cfi=(13)
cfn=(952)
calls=2847 1032 
* 241995
+1 5694

fl=(223)
fn=(3914)
78 5030
+6 5030
+6 4024
+3 3018
cfi=(13)
cfn=(952)
calls=1006 1032 
* 85510
+1 4024

fn=(4960)
162 12
+2 12
+1 8

fn=(3906)
45 4024
+3 2012
cfi=(13)
cfn=(2546)
calls=1006 956 
* 313462
* 1006
+2 3018
+3 2012
+1 2012
+2 2012
+13 1006
+1 2012

fn=(4406)
471 24
+9 32
+3 8
+2 2
+1 2
+1 2
+1 2
+51 6
+2 2
+1 2
+1 2
+1 2
+32 48
cfi=(218)
cfn=(4408) makeConst
calls=4 305 
* 880
* 4
+7 12
+2 4
+1 8

fn=(4942)
147 20
+2 12
+1 12
+1 8
+1 12
+1 12
+1 12
+1 8

fl=(240)
fn=(5264) ExecInitRangeTable
720 2500
+5 1500
+3 1500
cfi=(242)
cfn=(4564) list_length
calls=500 90 
* 5000
* 1500
+2 3000
cfi=(13)
cfn=(940)
calls=500 925 
* 55000
-1 1000
+2 500
+1 1500
cfi=(242)
cfn=(4372)
calls=500 78 
* 5000
* 1000
+2 5500
-2 3500
+11 3000
cfi=(13)
cfn=(2546)
calls=500 956 
* 69500
-1 1000
+7 1000
+1 1000

fn=(5290) MakePerTupleExprContext
415 2000
+1 2000
+1 1500
cfn=(4336) CreateExprContext
calls=500 242 
* 369317
* 1000
+2 1000
+1 1000

fn=(4526)
1091 16
+1 4
+3 12
cfi=(242)
cfn=(4372)
calls=4 78 
* 40
* 8
+2 12
+2 20
+1 4
-5 28
+7 4
+1 8

fn=(5508) FreeExprContext
373 3006
+4 2505
cfn=(5510) ShutdownExprContext
calls=501 926 
* 6513
+2 2004
cfi=(13)
cfn=(1396)
calls=501 212 
* 319117
+2 1503
+1 1002
+1 3006
cfi=(45)
cfn=(5512)
calls=501 591 
* 137775
* 1002
+3 1503
cfi=(13)
cfn=(952)
calls=501 1032 
* 42585
+1 1002

fn=(4322) CreateExecutorState
86 1503
+8 3507
cfi=(14)
cfn=(432)
calls=501 395 
* 56281
* 501
+8 1503
cfi=(233) /home/mithuncy/fsm_p11patch/src/backend/executor/../../../src/include/utils/palloc.h
cfn=(4144) MemoryContextSwitchTo
calls=501 +8 
* 5010
* 501
+2 2004
cfi=(13)
cfn=(3400)
calls=501 853 
* 213426
* 2505
+5 1002
+1 1002
+1 1002
+1 1002
+1 1002
+1 1002
+1 1002
+1 1002
+1 1002
+2 1002
+2 1002
+2 1002
+1 1002
+1 1002
+2 1002
+1 1002
+2 1002
+2 1002
+1 1002
+1 1002
+1 1002
+2 1002
+1 1002
+2 1002
+2 1503
+2 1002
+2 1002
+2 1002
+1 1002
+1 1002
+2 1002
+2 1002
+2 1002
+2 1002
+2 1002
+1 1002
+1 1002
+1 1002
+2 1002
+2 1002
+1 1002
+5 1503
cfi=(233)
cfn=(4144)
calls=501 -63 
* 5010
+2 501
+1 1002

fn=(4336)
242 2004
+5 2004
cfi=(233)
cfn=(4144)
calls=501 110 
* 5010
* 501
+2 2004
cfi=(13)
cfn=(3400)
calls=501 853 
* 122244
* 2505
+3 1002
+1 1002
+1 1002
+2 2004
+6 4008
cfi=(14)
cfn=(432)
calls=501 395 
* 54241
-1 1002
+5 2004
+1 2004
+2 1002
+1 1002
+2 1002
+1 1002
+2 1002
+1 1002
+2 1503
+2 1002
+7 3006
cfi=(45)
cfn=(1586)
calls=501 -27 
* 145290
* 1002
+2 1503
cfi=(233)
cfn=(4144)
calls=501 110 
* 5010
+2 501
+1 1002

fn=(5506) FreeExecutorState
195 2004
+7 501
+6 2000
cfi=(242)
cfn=(4372)
calls=500 78 
* 5000
* 2000
cfn=(5508)
calls=500 373 
* 522000
-6 4004
+12 2004
+10 2004
cfi=(13)
cfn=(1396)
calls=501 -12 
* 151435
+1 1002

fn=(5510)
926 3006
+5 2004
+1 501
+20 1002

fl=(301) /home/mithuncy/fsm_p11patch/src/backend/utils/misc/rls.c
fn=(5224) check_enable_rls
53 4500
+1 1500
cfi=(54)
cfn=(3326)
calls=500 381 
* 2500
* 1000
+8 1000
+4 2000
cfi=(151)
cfn=(3306)
calls=500 1114 
* 171000
* 500
+1 1000
+2 4000
+2 1500
+1 1500
+2 1500
cfi=(151)
cfn=(3280)
calls=500 1161 
* 51500
+3 2000
+1 1000
+55 2500

fl=(26)
fn=(736)
625 2072
+1 2072
+2 2072
+1 2072

fn=(986) IsTransactionState
334 14
+1 14
+9 28
+1 14

fn=(3740)
4471 4
+1 4
+2 8
+1 4
+3 4

fn=(3746)
721 4
+1 6
+1 2
+1 1
cfi=(21)
cfn=(656)
calls=1 1571 
* 22
+1 4

fn=(2946)
735 4
+1 6
+1 2
cfi=(21)
cfn=(656)
calls=2 1571 
* 44
* 2
+3 4

fn=(2950) StartTransaction
1801 6
+7 2
+1 4
+13 4
+1 4
+7 4
+1 4
+1 4
+1 4
+1 4
+6 14
cfi=(54)
cfn=(2952) GetUserIdAndSecContext
calls=2 486 
* 24
+13 2
cfi=(53)
cfn=(2878)
calls=2 7896 
* 22
* 4
+7 4
+1 4
+2 4
+1 4
+1 2
+1 2
+5 4
+1 2
+1 2
+1 2
+5 2
+1 4
+5 2
cfn=(2954) AtStart_Memory
calls=2 992 
* 1057
+1 2
cfn=(2958) AtStart_ResourceOwner
calls=2 1039 
* 1424
+6 4
+1 2
cfi=(101)
cfn=(2964)
calls=2 770 
* 22
* 2
+5 6
cfi=(91)
cfn=(2966) VirtualXactLockTableInsert
calls=2 4297 
* 496
+7 6
+13 6
+2 2
cfi=(163) /home/mithuncy/fsm_p11patch/src/backend/executor/spi.c
cfn=(2968) SPI_inside_nonatomic_context
calls=2 424 
* 18
* 6
+1 6
+6 6
cfi=(38)
cfn=(2970)
calls=2 3193 
* 52
+2 2
+5 2
cfi=(29)
cfn=(2972)
calls=2 5542 
* 16
+1 2
cfn=(2974) AtStart_Cache
calls=2 983 
* 144
+1 2
cfi=(165)
cfn=(2982) AfterTriggerBeginXact
calls=2 4778 
* 12
+6 4
+2 4
cfn=(2984) ShowTransactionState
calls=2 5114 
* 24
+1 4

fn=(3000) GetCurrentCommandId
663 10032
+2 5016
+9 500
+2 500
+1 1000
-1 2008
+1 4016

fn=(5628) GetCurrentTransactionIdIfAny
418 2
+1 2
+1 2

fn=(3596)
2775 6
+1 4
+2 14
+19 2
cfn=(3598) CommitTransaction
calls=2 1955 
* 869908
+1 4
+1 2
3008 4

fn=(2958)
1039 6
+1 4
+10 6
cfi=(162)
cfn=(2960)
calls=2 422 
* 1382
* 4
+2 6
+1 6
+1 6
+1 4

fn=(3622) GetTopTransactionIdIfAny
388 4
+1 2
+1 4

fn=(3956)
4453 2
+1 2
+2 8
+1 2
+3 2

fn=(1192) IsSubTransaction
4526 4
+1 4
+2 8
+3 2
+1 4

fn=(3768) TransactionBlockStatusCode
4485 6
+1 4
+2 14
+4 4
+27 4

fn=(2984)
5114 16
+2 24
+2 8

fn=(3426)
869 5694
+1 5694
+1 5694

fn=(5528) AtCCI_LocalCache
1363 1000
+6 500
cfi=(150)
cfn=(5530)
calls=500 440 
* 5000
+5 500
cfi=(155)
cfn=(5532) CommandEndInvalidationMessages
calls=500 1084 
* 4000
+1 1000

fn=(5726) AtAbort_Memory
1640 2
+9 3
+1 3
cfi=(161)
cfn=(2956)
calls=1 110 
* 10
* 1
+3 2

fn=(3532)
759 3054
+1 3054
+2 3054
+1 3054

fn=(5332)
401 1500
+1 1000
+2 2000
+1 3
cfn=(5334) AssignTransactionId
calls=1 +68 
* 2577
+1 1000
+1 1000

fn=(3598)
1955 6
+1 4
+4 10
+3 4
+3 4
cfn=(2984)
calls=2 5114 
* 24
+5 8
+16 2
cfi=(165)
cfn=(3600) AfterTriggerFireDeferred
calls=2 4974 
* 76
+7 4
cfi=(156)
cfn=(3604)
calls=2 671 
* 876
* 6
+1 2
+3 10
cfn=(3606) CallXactCallbacks
calls=2 3367 
* 48
+11 2
cfn=(1210)
calls=2 911 
* 16
* 4
+4 4
cfi=(165)
cfn=(3608) AfterTriggerEndXact
calls=2 5030 
* 32
+6 2
cfi=(200) /home/mithuncy/fsm_p11patch/src/backend/commands/tablecmds.c
cfn=(3610) PreCommit_on_commit_actions
calls=2 13150 
* 52
+3 4
cfi=(201) /home/mithuncy/fsm_p11patch/src/backend/libpq/be-fsstubs.c
cfn=(3612) AtEOXact_LargeObject
calls=2 584 
* 22
+7 2
cfi=(92)
cfn=(3614) PreCommit_CheckForSerializationFailure
calls=2 4667 
* 32
+7 2
cfi=(113)
cfn=(3616) PreCommit_Notify
calls=2 776 
* 30
+3 6
+3 8
cfi=(150)
cfn=(3618)
calls=2 477 
* 44
+6 4
+1 4
+2 8
+6 2
cfn=(3620) RecordTransactionCommit
calls=2 1123 
* 2572
* 4
+24 10
cfi=(100)
cfn=(3630) ProcArrayEndTransaction
calls=2 398 
* 346
+18 6
cfn=(3606)
calls=2 3367 
* 50
+3 12
cfi=(162)
cfn=(3632)
calls=2 481 
* 260
+5 4
cfi=(50)
cfn=(3638) AtEOXact_Buffers
calls=2 2422 
* 54
+3 4
cfi=(148)
cfn=(3646) AtEOXact_RelationCache
calls=2 2828 
* 44
+9 4
cfi=(155)
cfn=(3648) AtEOXact_Inval
calls=2 948 
* 22
+2 2
cfi=(98) /home/mithuncy/fsm_p11patch/src/backend/access/transam/multixact.c
cfn=(3650) AtEOXact_MultiXact
calls=2 1663 
* 64
+2 12
cfi=(162)
cfn=(3632)
calls=2 481 
* 821702
+3 12
cfi=(162)
cfn=(3632)
calls=2 481 
* 350
+13 4
cfi=(202) /home/mithuncy/fsm_p11patch/src/backend/catalog/storage.c
cfn=(3666) smgrDoPendingDeletes
calls=2 306 
* 58
+2 2
cfi=(113)
cfn=(3668) AtCommit_Notify
calls=2 875 
* 24
+1 6
cfi=(29)
cfn=(3670)
calls=2 5576 
* 32
+1 4
cfi=(163)
cfn=(3672) AtEOXact_SPI
calls=2 303 
* 60
+1 2
cfi=(205) /home/mithuncy/fsm_p11patch/src/backend/catalog/pg_enum.c
cfn=(3676) AtEOXact_Enum
calls=2 612 
* 10
+1 4
cfi=(200)
cfn=(3678) AtEOXact_on_commit_actions
calls=2 13250 
* 46
+1 8
cfi=(55)
cfn=(3680) AtEOXact_Namespace
calls=2 3962 
* 30
+1 2
cfi=(140)
cfn=(3682) AtEOXact_SMgr
calls=2 814 
* 16
+1 4
cfi=(25)
cfn=(3684)
calls=2 2762 
* 72
+1 2
cfi=(206)
cfn=(3688)
calls=2 184 
* 16
+1 4
cfi=(31)
cfn=(3690) AtEOXact_HashTables
calls=2 1835 
* 30
+1 4
cfi=(38)
cfn=(3692)
calls=2 -93 
* 40066
+1 6
cfi=(110)
cfn=(3696) AtEOXact_Snapshot
calls=2 1060 
* 226
+1 4
cfi=(72)
cfn=(3698) AtEOXact_ApplyLauncher
calls=2 858 
* 34
+1 4
cfi=(38)
cfn=(2970)
calls=2 3193 
* 52
+2 2
+1 6
cfi=(162)
cfn=(3700)
calls=2 688 
* 876
+1 4
+1 2
+1 2
+2 2
cfn=(3706) AtCommit_Memory
calls=2 1382 
* 1238
+2 4
+1 4
+1 4
+1 4
+1 4
+1 4
+1 4
+2 2
+1 2
+6 4
+2 6
+1 4

fn=(2954)
992 6
+1 4
+9 6
+2 7
cfi=(14)
cfn=(432)
calls=1 395 
* 438
-1 1
+16 7
cfi=(14)
cfn=(432)
calls=1 395 
* 428
* 7
cfi=(14)
cfn=(432)
calls=1 395 
* 111
-1 2
+9 4
+1 6
+3 6
cfi=(161)
cfn=(2956)
calls=2 110 
* 20
+1 4

fn=(3626) xactGetCommittedChildren
5248 6
+1 4
+2 8
+1 6
+4 4
+1 4

fn=(5660)
429 2
+1 4
+1 2
+1 2

fn=(4782) CommandCounterIncrement
920 6008
+7 4506
+7 500
cfn=(1210)
calls=500 -23 
* 4000
* 2500
+3 1500
+1 1500
+7 500
+3 1500
cfi=(110)
cfn=(5526) SnapshotSetCommandId
calls=500 545 
* 9000
+8 500
cfn=(5528)
calls=500 1363 
* 12000
+2 6008

fn=(3706)
1382 4
+5 6
cfi=(161)
cfn=(2956)
calls=2 110 
* 20
+6 6
cfi=(13)
cfn=(1396)
calls=2 212 
* 1190
+1 2
+1 2
+1 4
+1 4

fn=(4118) RegisterXactCallback
3333 5
+4 1
-1 3
cfi=(13)
cfn=(798)
calls=1 772 
* 91
* 1
+2 3
+1 3
+1 3
+1 2
+1 2

fn=(4122) RegisterSubXactCallback
3388 5
+4 1
-1 3
cfi=(13)
cfn=(798)
calls=1 772 
* 122
* 1
+2 3
+1 3
+1 3
+1 2
+1 2

fn=(5334)
473 4
+1 5
+2 1
+10 1
cfn=(1210)
calls=1 911 
* 8
* 5
+9 2
+33 2
+12 3
cfi=(308)
cfn=(5336)
calls=1 49 
* 370
* 2
+1 4
+1 3
+2 2
+7 4
+1 4
cfi=(92)
cfn=(5346) RegisterPredicateLockingXid
calls=1 1835 
* 9
+7 2
+1 3
+2 4
cfi=(160)
cfn=(5348) XactLockTableInsert
calls=1 +19 
* 2133
+2 2
+20 2
+34 2

fn=(5724)
4349 3
+1 2
+3 1
cfn=(5726)
calls=1 1640 
* 21
+7 7
+3 4
+18 1
+58 4
+6 1
cfn=(5728) AtCleanup_Memory
calls=1 1730 
* 45
+1 2

fn=(5728)
1730 2
+7 3
cfi=(161)
cfn=(2956)
calls=1 110 
* 10
+5 3
+1 3
cfi=(13)
cfn=(3734)
calls=1 137 
* 15
+5 3
+2 1
+1 1
+1 2
+1 2

fn=(3606)
3367 16
+3 12
+1 16
cob=(12)
cfi=(241) /home/mithuncy/fsm_p11patch/src/pl/plpgsql/src/pl_exec.c
cfn=(5606) plpgsql_xact_cb
calls=2 8134 
* 28
-1 18
+2 8

fn=(5612) XactLogCommitRecord
5278 13
+13 1
+3 2
+1 2
+6 2
+2 2
+2 3
+2 4
+7 3
+7 5
+7 2
+6 2
+6 2
+6 2
+11 3
+8 3
+5 1
cfi=(147)
cfn=(5614) XLogBeginInsert
calls=1 121 
* 35
+2 4
cfi=(147)
cfn=(5618) XLogRegisterData
calls=1 324 
* 37
+2 3
+3 4
+3 4
+8 4
+8 4
+7 4
+7 4
+4 2
cfi=(147)
cfn=(5620) XLogSetRecordFlags
calls=1 398 
* 8
+2 4
cfi=(147)
cfn=(5622) XLogInsert
calls=1 416 
* 1336
+1 2

fn=(1210)
911 5118
+1 10236
+1 5118

fn=(3738)
354 6
+1 6
+2 12
+1 6
-1 6
+4 3
+1 6

fn=(3764)
709 8
+1 4
+1 8

fn=(2948)
2704 6
+1 4
+2 14
+7 2
cfn=(2950)
calls=2 1801 
* 3477
+1 4
+1 2
+51 6
cfi=(161)
cfn=(2956)
calls=2 110 
* 20
+1 4

fn=(2974)
983 4
+1 2
cfi=(155)
cfn=(2976)
calls=2 680 
* 134
+1 4

fn=(3620)
1123 8
+1 2
cfn=(3622)
calls=2 388 
* 10
* 2
+1 6
+1 2
+5 2
+1 2
+1 2
+4 8
cfi=(202)
cfn=(3624) smgrGetPendingDeletes
calls=2 389 
* 60
* 2
+1 6
cfn=(3626)
calls=2 5248 
* 32
* 2
+1 6
+1 10
cfi=(155)
cfn=(3628) xactGetCommittedInvalidationMessages
calls=2 828 
* 32
* 2
+2 8
+6 8
+8 2
+17 2
+13 4
+1 1
+10 6
+7 1
cfi=(50)
cfn=(5608) BufmgrCommit
calls=1 2598 
* 4
+19 3
+1 2
+2 1
cfn=(5610) SetCurrentTransactionStopTimestamp
calls=1 747 
* 28
+2 22
cfn=(5612)
calls=1 5278 
* 1507
+7 2
+15 4
+1 2
+2 10
cfi=(95)
cfn=(5664)
calls=1 148 
* 19
+30 2
+1 3
+1 2
+23 3
cfi=(53)
cfn=(5666)
calls=1 2643 
* 88
+7 2
+1 6
cfi=(166)
cfn=(5668) TransactionIdAsyncCommitTree
calls=1 274 
* 584
+7 2
+2 2
+1 3
+4 6
cfi=(166)
cfn=(5682) TransactionIdLatest
calls=1 367 
* 15
* 1
+11 2
+4 2
+3 1
+3 6
+3 2
+1 8

fn=(5610)
747 2
+1 1
cfi=(21)
cfn=(656)
calls=1 1571 
* 22
* 1
+1 2

fl=(220)
fn=(3892)
90 3
+1 5
+1 2
-2 1512
+1 2520
+1 1008

fn=(3894)
78 1515
+1 2525
+1 1010
-2 1515
+1 2525
+1 1010

fl=(44) /home/mithuncy/fsm_p11patch/src/backend/utils/mmgr/../../../../src/include/utils/memutils.h
fn=(954) GetMemoryChunkContext
113 128427
+14 128427
+4 42809
+1 85618

fl=(88) /home/mithuncy/fsm_p11patch/src/backend/storage/buffer/buf_init.c
fn=(2010) BufferShmemSize
162 3
+1 1
+3 5
cfi=(87)
cfn=(2000)
calls=1 493 
* 23
* 5
cfi=(87)
cfn=(2002)
calls=1 476 
* 21
* 1
+2 4
cfi=(87)
cfn=(2002)
calls=1 476 
* 21
* 1
+3 5
cfi=(87)
cfn=(2000)
calls=1 493 
* 23
* 5
cfi=(87)
cfn=(2002)
calls=1 476 
* 21
* 1
+3 1
cfi=(89)
cfn=(2012)
calls=1 455 
* 516
* 5
cfi=(87)
cfn=(2002)
calls=1 476 
* 21
* 1
+11 5
cfi=(87)
cfn=(2000)
calls=1 493 
* 23
* 5
cfi=(87)
cfn=(2002)
calls=1 476 
* 21
* 1
+2 4
cfi=(87)
cfn=(2002)
calls=1 476 
* 21
* 1
+3 5
cfi=(87)
cfn=(2000)
calls=1 493 
* 23
* 5
cfi=(87)
cfn=(2002)
calls=1 476 
* 21
* 1
+2 1
+1 2

fn=(2204) InitBufferPool
69 3
+8 9
cfi=(87)
cfn=(2168)
calls=1 373 
* 1091
-1 1
+6 9
cfi=(87)
cfn=(2168)
calls=1 373 
* 994
-1 1
+6 9
cfi=(87)
cfn=(2168)
calls=1 373 
* 1032
-1 1
+5 3
cfi=(99)
cfn=(2158)
calls=1 603 
* 17
+1 3
cfi=(99)
cfn=(2158)
calls=1 603 
* 17
+10 10
cfi=(87)
cfn=(2168)
calls=1 373 
* 1055
-1 1
+4 12
+13 2
+2 98304
+2 163840
+2 81920
cfi=(123)
cfn=(2206)
calls=16384 227 
* 540672
+1 32768
+2 49152
+6 65536
+2 81920
cfi=(99)
cfn=(2144)
calls=16384 678 
* 1048576
+3 147456
cfi=(99)
cfn=(2144)
calls=16384 678 
* 1048576
-20 65539
+25 7
+4 10
cfi=(89)
cfn=(2212)
calls=1 476 
* 237901
+3 3
cfi=(50)
cfn=(2218) WritebackContextInit
calls=1 4239 
* 11
+2 2

fl=(180)
fn=(3294)
146 5
+1 4
cfi=(80)
cfn=(1922)
calls=1 271 
* 35
+1 5
cfn=(3296) pq_writeint32
calls=1 -72 
* 23
+1 2

fn=(3296)
76 4
+1 3
+3 8
+1 6
+1 2

fl=(226)
fn=(3964)
2093 8
+1 4
cfi=(13)
cfn=(3400)
calls=1 853 
* 153
* 5
+2 1
+1 1
+7 4
cfi=(46) /home/mithuncy/fsm_p11patch/src/backend/commands/../../../src/include/nodes/pg_list.h
cfn=(966) list_head
calls=1 78 
* 10
* 2
+2 3
+2 5
cob=(3)
cfi=(3)
cfn=(446)
calls=1 0 
* 22
* 1
* 2
+2 2
+4 3
-10 7
+25 2
+1 5
+7 2
+3 1
+3 4
cfi=(151)
cfn=(3306)
calls=1 1114 
* 28190
* 1
+1 2
+7 8
+1 4
+1 4
+1 3
+2 4
+5 1
cfi=(54)
cfn=(3326)
calls=1 381 
* 5
* 7
cfi=(227)
cfn=(3970)
calls=1 4668 
* 51
* 1
+2 2
+1 1
+12 3
+1 2
+6 3
cfi=(151)
cfn=(3280)
calls=1 1161 
* 103
+3 5
cfi=(171)
cfn=(3974) OidFunctionCall1Coll
calls=1 1406 
* 367628407
+1 5

fl=(68)
fn=(1598)
1263 4
+1 4
+2 12
+1 2
+7 4
-11 2
+1 2
+2 6
+1 1
+7 2

fn=(1596)
1239 6
+1 4
+2 12
+1 2
+7 4
-11 3
+1 2
+2 6
+1 1
+7 2

fl=(96)
fn=(2036) SUBTRANSShmemSize
186 2
+1 3
cfi=(93)
cfn=(2020)
calls=1 -41 
* 52
+1 2

fn=(2200) SUBTRANSShmemInit
192 3
+1 1
+2 2
-1 8
cfi=(93)
cfn=(2196)
calls=1 -27 
* 4802
+4 1
+1 2

fn=(5344)
325 4
+7 6
+2 1
+10 2

fl=(194) /home/mithuncy/fsm_p11patch/src/backend/access/nbtree/nbtcompare.c
fn=(3486) btoidcmp
268 66201
+1 66201
+1 66201
+2 66201
+1 18604
+1 38295
+1 7224
+2 9153
+1 44134

fn=(3526) btint2cmp
83 5478
+1 5478
+1 5478
+2 9130
+1 3652

fl=(275)
fn=(4676)
2579 21
+5 3
+3 12
+37 6

fl=(142)
fn=(2836)
225 8
+1 2
+2 10
+6 2
+1 6

fl=(149)
fn=(3016)
1163 8040
+1 11055
cfn=(3018) SearchCatCacheInternal
calls=1005 +51 
* 27189128
+1 2010

fn=(3410) int4eqfast
172 8708
+1 10885
+1 4354

fn=(3312) nameeqfast
143 10
+1 4
+1 4
+2 12
cob=(3)
cfi=(3)
cfn=(1044)
calls=2 0 
* 58
* 2
* 4
+1 4

fn=(3542)
1044 462
+1 308
+1 216
cfn=(3020) CatalogCacheInitializeCache
calls=72 933 
* 2350472
+2 154
+1 154
-1 154
+2 152
-1 152
+11 375
cfi=(160)
cfn=(3026)
calls=75 106 
* 132653
+1 375
cfi=(190)
cfn=(3416)
calls=75 152 
* 5251092
* 75
+11 300
cfi=(190)
cfn=(3514)
calls=75 178 
* 133927
+1 375
cfi=(160)
cfn=(3408) UnlockRelationOid
calls=75 197 
* 133102
+2 154

fn=(3020)
933 308
+8 385
cfi=(169)
cfn=(3022)
calls=77 1307 
* 2589733
* 77
+8 231
cfi=(152)
cfn=(2898)
calls=77 110 
* 770
* 77
+5 308
cfi=(159) /home/mithuncy/fsm_p11patch/src/backend/access/common/tupdesc.c
cfn=(3078) CreateTupleDescCopyConstr
calls=77 151 
* 48290
* 77
+6 385
cfi=(13)
cfn=(928)
calls=77 1162 
* 14699
* 154
+1 385
+5 231
cfi=(152)
cfn=(2898)
calls=77 110 
* 770
+2 308
cfi=(169)
cfn=(3080)
calls=77 1283 
* 137038
+8 154
+7 875
+2 1875
+3 500
+11 2250
cfn=(3102) GetCCHashEqFuncs
calls=125 209 
* 2755
+9 1750
cfi=(171)
cfn=(3104) fmgr_info_cxt
calls=125 135 
* 10375
+5 2000
+3 1250
+1 1250
+2 1250
-43 933
+54 231
+1 154

fn=(3110) CatalogCacheComputeHashValue
279 34353
+1 3817
+2 11451
+7 22703
+3 72
cfn=(3330) int4hashfast
calls=12 178 
* 384
* 12
+2 36
+1 36
+3 72
cfn=(3330)
calls=12 178 
* 384
* 24
cfn=(3330)
calls=4 178 
* 128
* 16
+2 48
+1 48
+3 96
cfn=(4972) oidvectorhashfast
calls=2 202 
* 247
cfn=(3330)
calls=14 178 
* 448
* 6060
cfn=(3330)
calls=1010 178 
* 32320
* 1026
+2 3078
+1 3078
+3 5130
cfn=(3330)
calls=9 178 
* 288
cfn=(3112) namehashfast
calls=1017 152 
* 138729
* 13955
cfn=(3330)
calls=2782 178 
* 89024
cfn=(3112)
calls=9 152 
* 993
* 3817
+2 7634
+1 3817
+6 3817
+1 7634

fn=(3116) IndexScanOK
1095 6508
+1 6775
+10 316
+1 14
+1 72
+11 2
+10 8
+1 4
+4 1545
+4 1545
+1 3090
-1 72
+1 164

fn=(3310) CatalogCacheCompareTuple
386 15232
+1 6528
+3 4352
+2 45759
cfn=(3410)
calls=2177 172 
* 23947
cfn=(3312)
calls=2 143 
* 98
* 6537
-2 15244
+5 2176
+1 4352

fn=(3018)
1215 34191
+16 26593
+1 15
cfn=(3020)
calls=5 933 
* 471356
+7 7598
+1 7598
+1 7598
+1 7598
+5 37990
cfn=(3110)
calls=3799 279 
* 390120
* 3799
+1 18995
+8 22794
+1 40719
+2 12693
+2 16924
+3 16924
+1 2055
+2 19584
cfn=(3310)
calls=2176 386 
* 124225
* 6528
+9 13056
cfi=(153) /home/mithuncy/fsm_p11patch/src/backend/utils/cache/../../../../src/include/lib/ilist.h
cfn=(3314) dlist_move_head
calls=2176 386 
* 26112
+6 10880
+2 6519
cfi=(162)
cfn=(3250) ResourceOwnerEnlargeCatCacheRefs
calls=2173 982 
* 49979
+1 10865
+1 13038
cfi=(162)
cfn=(3252) ResourceOwnerRememberCatCacheRef
calls=2173 993 
* 93439
+9 6519
+11 6
-49 29581
+53 19476
cfn=(3114) SearchCatCacheMiss
calls=1623 +19 
* 41855798
+1 7598

fn=(4892) CatalogCacheComputeTupleHashValue
329 84
+1 14
+1 14
+1 14
+1 14
+1 14
+1 42
+1 42
+3 122
+3 998
cfi=(178)
cfn=(3238)
calls=1 +86 
* 637
* 13
+7 1130
cfi=(178)
cfn=(3238)
calls=2 +79 
* 982
* 14
+7 1130
cfi=(178)
cfn=(3238)
calls=2 +72 
* 1817
* 14
+7 728
cfi=(178)
cfn=(3238)
calls=2 +65 
* 170
* 14
+5 14
+6 140
cfn=(3110)
calls=14 -95 
* 3927
+1 28

fn=(4904)
1185 54
+1 72
cfn=(3018)
calls=9 +29 
* 114592
+1 18

fn=(5540) RehashCatCache
870 12
+5 12
cfi=(57)
cfn=(2084)
calls=3 1286 
* 204
* 48
cfi=(57)
cfn=(2086)
calls=3 1336 
* 327
+4 12
+1 24
cfi=(13)
cfn=(2156)
calls=3 -65 
* 2272
* 3
+3 6
+4 9582
+2 3081
+1 6162
+2 3081
cfi=(153)
cfn=(5542) dlist_delete
calls=1027 359 
* 15405
+1 11297
cfi=(153)
cfn=(3246) dlist_push_head
calls=1027 301 
* 35260
-6 11291
-4 2572
+15 12
cfi=(13)
cfn=(952)
calls=3 1032 
* 257
+1 9
+1 9
+1 6

fn=(4874)
1522 32
+1 4
+17 16
+10 8
+1 8
+1 8
+1 8
+7 40
cfn=(3110)
calls=4 279 
* 728
* 4
+8 44
+2 9
+2 12
+3 12
+1 3
-8 37
+53 12
cfi=(162)
cfn=(4876) ResourceOwnerEnlargeCatCacheListRefs
calls=4 1017 
* 395
+2 4
+2 32
cob=(3)
cfi=(3)
cfn=(370)
calls=4 0 
* 112
* 4
* 16
+10 56
cob=(3)
cfi=(3)
cfn=(856)
calls=4 0 
* 325
* 4
+1 8
+1 8
+1 8
+1 8
+2 20
cfi=(169)
cfn=(3022)
calls=4 1307 
* 8928
* 4
+4 20
cfn=(3116)
calls=4 1095 
* 48
-2 44
cfi=(172)
cfn=(3118)
calls=4 322 
* 18258
* 4
+8 20
+2 4
+4 14
+6 14
+1 98
cfn=(4892)
calls=14 329 
* 12116
* 14
+1 70
+2 84
+1 128
+2 3
+2 8
+3 4
+3 7
cfi=(292) /home/mithuncy/fsm_p11patch/src/backend/storage/page/itemptr.c
cfn=(5058) ItemPointerEquals
calls=1 30 
* 34
* 3
+7 4
+1 1
-18 63
+24 56
+3 126
cfn=(3244) CatalogCacheCreateEntry
calls=14 1819 
* 12211
* 14
+7 70
cfi=(45)
cfn=(960)
calls=14 129 
* 2570
* 14
+1 70
-50 42
cfi=(172)
cfn=(3186)
calls=14 406 
* 21429
* 12
cfi=(172)
cfn=(3186)
calls=4 406 
* 55232
* 54
+53 12
cfi=(172)
cfn=(3254)
calls=4 489 
* 11029
+2 16
cfi=(169)
cfn=(3080)
calls=4 1283 
* 6948
+3 12
cfi=(152)
cfn=(2898)
calls=4 110 
* 40
* 4
+1 12
cfi=(256) /home/mithuncy/fsm_p11patch/src/backend/utils/cache/../../../../src/include/nodes/pg_list.h
cfn=(4878) list_length
calls=4 90 
* 38
* 4
+2 16
-1 8
cfi=(13)
cfn=(940)
calls=4 925 
* 492
* 4
+5 8
-1 44
cfn=(4496) CatCacheCopyKeys
calls=4 1949 
* 1676
+2 12
cfi=(152)
cfn=(2898)
calls=4 110 
* 40
+30 16
+2 8
+1 12
+1 8
+1 8
+1 12
+1 16
+1 12
+1 12
+2 4
+1 12
cfi=(256)
cfn=(4520) list_head
calls=4 78 
* 38
* 8
+2 154
+2 42
+3 70
+2 56
-9 78
+14 28
cfi=(153)
cfn=(3246)
calls=4 301 
* 130
+3 20
+1 20
cfi=(162)
cfn=(4880) ResourceOwnerRememberCatCacheListRef
calls=4 1028 
* 172
+5 4
+1 8

fn=(3112)
152 4104
+1 2052
+2 3078
cob=(3)
cfi=(3)
cfn=(424)
calls=1026 0 
* 19414
* 1026
* 5130
cfi=(34) /home/mithuncy/fsm_p11patch/src/backend/access/hash/hashfunc.c
cfn=(840) hash_any
calls=1026 429 
* 102866
+1 2052

fn=(3330)
178 15372
+1 11529
cfi=(182)
cfn=(3332)
calls=3843 42 
* 88389
+1 7686

fn=(4496)
1949 4599
+8 1022
+2 7147
+1 11231
+1 7147
+9 4084
+2 2525
cfi=(158)
cfn=(2930)
calls=505 253 
* 49691
+1 1010
+3 2525
+2 1010
-2 505
+1 1010
-1 2525
cfi=(254)
cfn=(4498)
calls=505 129 
* 102010
* 2580
+2 1032
-2 516
+1 1032
-1 2580
cfi=(254)
cfn=(4498)
calls=516 129 
* 7740
* 1021
-19 5617
+24 2044

fn=(4972)
202 8
+1 10
cfi=(171)
cfn=(4974) DirectFunctionCall1Coll
calls=2 794 
* 225
+1 4

fn=(2896)
778 693
+23 231
+3 231
cfi=(152)
cfn=(2898)
calls=77 110 
* 770
* 77
+5 231
+2 2
cfi=(13)
cfn=(940)
calls=1 925 
* 123
* 1
+1 3
cfi=(153)
cfn=(2900) slist_init
calls=1 555 
* 7
+1 2
+12 1
+1 3
cfi=(13)
cfn=(2546)
calls=1 956 
* 649
-1 76
+1 228
cfi=(13)
cfn=(2546)
calls=76 956 
* 50188
* 231
+1 385
cfi=(13)
cfn=(2546)
calls=77 956 
* 28536
* 154
+7 231
+1 154
+1 231
+1 231
+1 154
+1 154
+1 154
+1 231
+1 231
+1 154
+1 1375
-1 731
+12 462
cfi=(153)
cfn=(2902) slist_push_head
calls=77 575 
* 1001
+5 231
cfi=(152)
cfn=(2898)
calls=77 110 
* 770
+2 77
+1 154

fn=(3102)
209 875
+1 755
+3 2
+1 2
+1 2
+1 1
+2 4
+1 4
+1 4
+1 2
+2 50
+1 50
+1 50
+1 25
+2 8
+1 8
+1 8
+1 4
+2 10
+1 10
+1 10
+1 5
+2 2
+1 2
+1 2
+1 1
+12 172
+1 172
+1 172
+1 86
+2 2
+1 2
+1 2
+1 1
+8 250

fn=(3308)
1177 13925
+1 22280
cfn=(3018)
calls=2785 +37 
* 16115043
+1 5570

fn=(3114)
1329 14607
+9 3246
+1 3246
+1 3246
+1 3246
+6 21099
cob=(3)
cfi=(3)
cfn=(856)
calls=1623 0 
* 76211
* 1623
+1 3246
+1 3246
+1 3246
+1 3246
+17 8115
cfi=(169)
cfn=(3022)
calls=1623 -61 
* 4394392
* 1623
+4 8115
cfn=(3116)
calls=1623 1095 
* 20067
-2 17853
cfi=(172)
cfn=(3119)
calls=1 322 
* 4085
cfi=(172)
cfn=(3118)
calls=1622 322 
* 8312573
* 1623
+7 1623
+2 4869
cfi=(172)
cfn=(3186)
calls=1623 406 
* 17341371
* 4869
+2 10044
cfn=(3244)
calls=1116 1819 
* 731876
* 1116
+4 3348
cfi=(162)
cfn=(3250)
calls=1116 982 
* 26305
+1 5580
+1 6696
cfi=(162)
cfn=(3252)
calls=1116 993 
* 47988
+1 1116
+3 3348
cfi=(172)
cfn=(3254)
calls=1116 489 
* 4267169
* 1521
cfi=(172)
cfn=(3254)
calls=507 489 
* 1857042
+2 6492
cfi=(169)
cfn=(3080)
calls=1623 1283 
* 4183977
+12 3246
+2 1521
+3 4563
cfn=(3244)
calls=507 1819 
* 425165
* 507
+14 1014
+12 2232
+1 3246

fn=(4882) ReleaseCatCacheList
1794 16
+4 20
+1 20
cfi=(162)
cfn=(4884) ResourceOwnerForgetCatCacheListRef
calls=4 1037 
* 280
+4 8
-2 8
+6 8

fn=(2890) CreateCacheMemoryContext
630 2
+5 3
+1 7
cfi=(14)
cfn=(432)
calls=1 395 
* 428
* 1
+3 2

fn=(3244)
1819 16370
+6 3274
+13 7910
+3 2260
+3 3390
cfi=(152)
cfn=(2898)
calls=1130 110 
* 11300
* 1130
+3 2260
-1 4520
cfi=(13)
cfn=(940)
calls=1130 925 
* 138959
* 1130
+2 4520
+1 6780
+1 4520
+2 4520
-1 3390
+5 2260
-2 1130
+1 2260
-1 5650
cob=(3)
cfi=(3)
cfn=(856)
calls=1130 0 
* 101603
* 1130
+3 3390
cfi=(152)
cfn=(2898)
calls=1130 110 
* 11300
+2 3390
+4 2260
+5 49618
cfi=(178)
cfn=(3238)
calls=1 428 
* 251
* 59867
cfi=(178)
cfn=(3238)
calls=1618 428 
* 152696
* 3289
+5 8355
-10 14005
+16 1521
cfi=(152)
cfn=(2898)
calls=507 110 
* 5070
* 507
+1 1014
cfi=(13)
cfn=(940)
calls=507 925 
* 62330
* 507
+7 1014
-1 6084
cfn=(4496)
calls=507 +63 
* 220527
+2 1521
cfi=(152)
cfn=(2898)
calls=507 110 
* 5070
+7 3274
+1 4911
+1 3274
+1 3274
+1 3274
+1 4911
+1 4911
+2 16370
cfi=(153)
cfn=(3246)
calls=1637 301 
* 49145
+2 8185
+1 6548
+6 11459
+1 9
cfn=(5540)
calls=3 870 
* 100944
+2 1637
+1 3274

fn=(3282)
1452 13156
+1 9867
+7 16445
+1 19734
cfi=(162)
cfn=(3284) ResourceOwnerForgetCatCacheRef
calls=3289 1002 
* 230230
+4 6578
-2 6578
+7 6578

fl=(58)
fn=(2788) pq_recvbuf
940 12
+1 9
+2 8
+9 6
+4 4
cfn=(2790) socket_set_nonblocking
calls=2 -33 
* 32
* 2
cfn=(2790)
calls=1 -33 
* 16
+8 12
-1 24
cfi=(139)
cfn=(2792)
calls=3 147 
* 65282
* 2
+3 4
+15 4
+9 8
+1 2
+2 8

fn=(3778) internal_flush
1423 12
+3 15
+1 15
+2 3
+4 30
cfi=(139)
cfn=(3780)
calls=3 252 
* 315
* 3
+2 6
+44 3
+1 9
+1 12
-52 18
+55 9
+1 3
+1 12

fn=(3790)
1001 4
+3 2
+2 2
cfn=(2788)
calls=2 -66 
* 65274
* 2
-2 12
+5 6
+1 2

fn=(2784)
1211 12
+5 9
+5 3
+1 12

fn=(3300)
1561 119
+1 102
+2 17
+1 51
+1 68
cfn=(3302) internal_putbytes
calls=17 1370 
* 1003
* 34
+2 68
+4 68
+1 68
cfn=(3302)
calls=17 1370 
* 1003
* 34
+3 85
cfn=(3302)
calls=17 1370 
* 1107
* 34
+2 17
+1 34
+5 34

fn=(1156)
1889 5
+1 2
+1 2
+37 2

fn=(2644)
845 16
+1 12
cob=(5)
cfi=(5)
cfn=(692)
calls=4 0 
* 28
* 4
+1 8

fn=(2738)
195 2
+2 1
+1 6
cfi=(13)
cfn=(798)
calls=1 772 
* 1393
* 1
+1 7
+1 1
+1 1
+1 1
+3 3
cfi=(67)
cfn=(1578)
calls=1 306 
* 32
+13 4
cfi=(132)
cfn=(2518)
calls=1 26 
* 67
* 3
+5 4
cfi=(122)
cfn=(2740) CreateWaitEventSet
calls=1 543 
* 1738
* 1
+1 8
cfi=(122)
cfn=(2748) AddWaitEventToSet
calls=1 692 
* 1465
+2 8
cfi=(122)
cfn=(2748)
calls=1 692 
* 122
+1 7
cfi=(122)
cfn=(2748)
calls=1 692 
* 110
+1 2

fn=(5776)
257 5
+2 3
+30 3
cfi=(139)
cfn=(5778)
calls=1 135 
* 5
+12 2
+2 2

fn=(1164)
1813 5
+1 2
+1 2
+41 2

fn=(3810)
1273 6
+5 3
cfi=(80)
cfn=(1890)
calls=1 63 
* 12
+3 4
cfn=(2786)
calls=1 1095 
* 59
* 2
+8 3
+2 5
+9 3
+2 3
+7 8
cob=(3)
cfi=(3)
cfn=(370)
calls=1 0 
* 28
* 1
* 4
+2 5
cfi=(80)
cfn=(1922)
calls=1 271 
* 35
+13 4
+3 7
cfn=(2786)
calls=1 1095 
* 134
* 2
+7 3
+2 6
+4 1
+2 1
+1 4

fn=(5704) socket_endcopyout
1637 5
+1 4
+1 1
+5 2

fn=(2628)
717 12
+2 4
+1 4
+1 4
-1 10
cob=(5)
cfi=(5)
cfn=(2634)
calls=1 0 
* 7
cob=(1)
cfi=(1)
cfn=(223)
calls=1 0 
* 775
* 6
* 12
+20 4
+1 4
+1 4
-1 12
cob=(3)
cfi=(3)
cfn=(1804) getsockname
calls=2 0 
* 10
* 2
* 4
+9 8
+80 2
+1 8

fn=(2790)
923 36
+1 18
+5 18
+1 24

fn=(2798)
1235 2
+3 1
+1 2

fn=(3302)
1370 255
+3 51
+3 204
+6 306
+1 153
+1 102
+1 459
cob=(3)
cfi=(3)
cfn=(856)
calls=51 0 
* 716
* 51
+1 255
+1 102
+1 102
-15 204
+17 51
+1 102

fn=(1962) Lock_AF_UNIX
615 5
+9 5
cfi=(54)
cfn=(1964) CreateSocketLockFile
calls=1 1192 
* 3667
+6 3
cob=(1)
cfi=(1)
cfn=(223)
calls=1 0 
* 1315
* 5
+5 3
cfi=(13)
cfn=(928)
calls=1 1162 
* 195
* 5
cfi=(45)
cfn=(960)
calls=1 129 
* 290
* 1
+2 1
+1 2

fn=(2786)
1095 20
+5 4
+2 4
+2 1
cfn=(2788)
calls=1 940 
* 161
* 2
-2 20
+5 24
+1 12
+1 4
+1 16
cob=(3)
cfi=(3)
cfn=(856)
calls=2 0 
* 24
* 2
* 16
cob=(3)
cfi=(3)
cfn=(856)
calls=2 0 
* 149
* 2
+1 20
+1 8
+1 8
-13 16
+15 4
+1 8

fn=(1628)
333 24
+11 2
+3 2
+1 2
+6 2
+4 138
+1 4
+1 2
+1 2
+3 4
+6 16
cfi=(17)
cfn=(462)
calls=1 203 
* 749
+1 3
cob=(3)
cfi=(3)
cfn=(424)
calls=1 0 
* 19
* 1
* 2
+8 5
cfn=(1962)
calls=1 615 
* 5497
* 2
+2 3
+5 8
cfi=(17)
cfn=(462)
calls=1 203 
* 489
+1 2
+3 6
cfi=(77)
cfn=(1630)
calls=1 59 
* 92045
* 6
cfi=(77)
cfn=(1630)
calls=1 59 
* 2126
* 2
+1 10
+15 6
+2 14
+10 3
+2 48
+1 3
-3 21
+5 9
+9 18
+3 1
+1 1
+3 1
+1 1
+4 1
+1 1
+12 12
+1 3
+5 4
-1 20
cfi=(77)
cfn=(1832)
calls=2 126 
* 4073
+5 4
+3 12
cob=(3)
cfi=(3)
cfn=(1656)
calls=1 0 
* 5
cob=(1)
cfi=(1)
cfn=(223)
calls=1 0 
* 1273
* 6
* 6
cob=(3)
cfi=(3)
cfn=(1656)
calls=1 0 
* 5
* 1
* 9
+23 12
+2 16
cob=(3)
cfi=(3)
cfn=(1862) setsockopt
calls=1 0 
* 6
cob=(1)
cfi=(1)
cfn=(223)
calls=1 0 
* 1326
* 6
* 4
+15 12
+2 8
cob=(3)
cfi=(3)
cfn=(1862)
calls=1 0 
* 6
* 1
* 2
+20 27
cob=(3)
cfi=(3)
cfn=(1802)
calls=2 0 
* 10
cob=(1)
cfi=(1)
cfn=(223)
calls=1 0 
* 1267
* 7
* 3
+1 6
+19 12
+2 3
cfn=(1980) Setup_AF_UNIX
calls=1 +92 
* 1277
* 2
+13 9
+1 6
+3 15
cob=(3)
cfi=(3)
cfn=(1872) listen
calls=2 0 
* 10
cob=(1)
cfi=(1)
cfn=(223)
calls=1 0 
* 1265
* 7
* 3
+1 6
+12 12
+1 6
cfi=(57)
cfn=(1548)
calls=1 232 
* 323
* 7
cfi=(57)
cfn=(1882)
calls=1 785 
* 1009
* 3
cfi=(57)
cfn=(1896)
calls=1 411 
* 10095
* 1
+5 12
cfi=(57)
cfn=(1548)
calls=2 232 
* 1969
* 18
cfi=(57)
cfn=(1882)
calls=2 785 
* 3422
* 6
cfi=(57)
cfn=(1896)
calls=2 411 
* 21497
+5 21
+1 3
406 19
599 10
cfi=(77)
cfn=(1942)
calls=2 89 
* 1802
+2 4
+3 2
+1 10

fn=(1160)
1731 5
+1 2
+1 2
+42 2

fn=(3776) socket_flush
1401 9
+4 9
+2 3
+1 6
cfn=(2790)
calls=3 923 
* 48
+1 3
cfn=(3778)
calls=3 +14 
* 465
* 3
+1 3
+1 3
+1 6

fn=(1980)
646 5
+7 4
+39 6
cob=(1)
cfi=(1)
cfn=(223)
calls=1 0 
* 1250
* 5
* 2
+8 1
+1 4

fl=(160)
fn=(2934) RelationInitLockInfo
69 1881
+4 2508
+2 3135
+1 63
+2 1818
+1 1254

fn=(3026)
106 32410
+5 32410
cfn=(3028) SetLocktagRelationOid
calls=6482 -24 
* 825909
+2 58338
cfi=(91)
cfn=(3032) LockAcquireExtended
calls=6482 738 
* 13084503
* 6482
+18 12964
+2 6473
cfi=(155)
cfn=(2976)
calls=6473 680 
* 433691
+1 19419
cfi=(91)
cfn=(3052) MarkLockClear
calls=6473 1709 
* 45311
+2 12964

fn=(3028)
87 32915
+3 19749
cfi=(170)
cfn=(3030) IsSharedRelation
calls=6583 225 
* 652809
* 13166
+1 150
+2 13016
+2 91112
+1 13016
-1 1050
+1 150

fn=(5412) ConditionalLockRelationForExtension
418 7500
+3 15000
+4 9000
cfi=(91)
cfn=(3350) LockAcquire
calls=1500 712 
* 3169384
* 3000
+1 3000

fn=(3348)
966 8
+3 9
+6 6
cfi=(91)
cfn=(3350)
calls=1 712 
* 2117
+3 1
cfi=(155)
cfn=(2976)
calls=1 680 
* 67
+1 2

fn=(5348)
581 4
+3 7
+2 6
cfi=(91)
cfn=(3350)
calls=1 712 
* 2114
+1 2

fn=(5474) UnlockRelationForExtension
450 7500
+3 15000
+4 9000
cfi=(91)
cfn=(3092) LockRelease
calls=1500 1885 
* 2834706
+1 3000

fn=(3408)
197 505
+3 505
cfn=(3028)
calls=101 87 
* 11224
+2 606
cfi=(91)
cfn=(3092)
calls=101 1885 
* 168198
+1 202

fn=(3090)
182 29405
+3 58810
+2 35286
cfi=(91)
cfn=(3092)
calls=5881 1885 
* 13940025
+1 11762

fl=(164) /home/mithuncy/fsm_p11patch/src/backend/storage/ipc/sinval.c
fn=(2978) ReceiveSharedInvalidMessages
74 34895
+12 34895
+12 20937
+3 20937
cfi=(101)
cfn=(2980)
calls=6979 540 
* 174475
* 6979
+2 13958
+10 6979
+1 13958
+2 34895
+12 20937
+10 20937
+6 13958

fl=(205)
fn=(3676)
612 4
+6 2
+1 4

fl=(307)
fn=(5312)
122 1042500
+4 1459500
+2 834000
+5 834000
+1 208500
+2 417000

fn=(5310)
145 1042500
+4 1251000
+2 834000
+5 834000
+1 208500
+2 417000

fl=(72)
fn=(2286) ApplyLauncherShmemInit
818 3
+4 1
cfn=(2072) ApplyLauncherShmemSize
calls=1 -52 
* 66
* 4
cfi=(87)
cfn=(2168)
calls=1 373 
* 1303
-1 1
+5 4
+4 1
cfn=(2072)
calls=1 -60 
* 66
* 5
cob=(3)
cfi=(3)
cfn=(828)
calls=1 0 
* 58
* 1
+3 2
+2 48
+2 20
cob=(3)
cfi=(3)
cfn=(828)
calls=4 0 
* 104
* 4
+1 8
-5 19
+8 2

fn=(5700)
1088 2
+1 5
+1 2

fn=(1612)
789 3
+3 3
+3 5
cob=(3)
cfi=(3)
cfn=(828)
calls=1 0 
* 72
* 1
+1 1
+2 1
+1 7
cfi=(17)
cfn=(462)
calls=1 203 
* 216
+1 7
cfi=(17)
cfn=(462)
calls=1 203 
* 229
+1 6
cfi=(17)
cfn=(462)
calls=1 203 
* 240
+2 7
cfi=(17)
cfn=(462)
calls=1 203 
* 240
+2 1
+1 1
+1 1
+2 3
cfi=(73)
cfn=(1614) RegisterBackgroundWorker
calls=1 +40 
* 459
+1 2

fn=(2072)
770 9
+6 3
+1 12
+1 15
cfi=(87)
cfn=(2000)
calls=3 493 
* 69
* 15
cfi=(87)
cfn=(2002)
calls=3 476 
* 63
* 3
+2 3
+1 6

fn=(3698)
858 10
+6 4
+4 6
+12 6
+8 2
+1 2
+1 4

fl=(82) /home/mithuncy/fsm_p11patch/src/timezone/strftime.c
fn=(1908) _fmt
137 48
+1 6
+2 450
+3 378
+55 42
cfn=(1912) _conv
calls=6 501 
* 3384
* 6
+1 6
+18 42
cfn=(1912)
calls=6 501 
* 3384
* 6
+1 6
+42 42
cfn=(1912)
calls=6 501 
* 3366
* 6
+1 6
+2 54
cfn=(1912)
calls=6 501 
* 3384
* 6
+1 6
+17 42
cfn=(1912)
calls=6 501 
* 3389
* 6
+1 6
434 66
cfn=(1910) _yconv
calls=6 +93 
* 7392
* 6
+3 6
+2 24
+1 42
cfn=(1914) _add
calls=6 +70 
* 384
* 6
+7 6
+45 180
+2 360
138 534
496 6
+1 12

fn=(1912)
501 294
+3 294
cfi=(17)
cfn=(1138)
calls=42 231 
* 20615
+1 252
cfn=(1914)
calls=42 +5 
* 2100
+1 84

fn=(1914)
510 240
+1 48
+1 102
-1 1950
+2 48
+1 96

fn=(1910)
527 60
+5 156
+1 180
+1 78
+1 12
+5 12
+5 12
+2 12
+3 36
cfn=(1912)
calls=6 -49 
* 3366
* 6
+2 12
+1 60
cfn=(1912)
calls=6 -52 
* 3366
* 6
+1 6
+1 12

fn=(1906) pg_strftime
123 42
+2 6
+2 60
cfn=(1908)
calls=6 +10 
* 27095
* 6
+1 30
+2 12
+1 24
+1 12

fl=(225)
fn=(3938)
107 4
+1 2
+5 3
+2 4
+12 2

fn=(3936) printtup_create_DR
79 4
+1 2
cfi=(13)
cfn=(2546)
calls=1 956 
* 243
* 1
+2 2
+1 2
+1 2
+1 2
+1 3
+6 4
+2 2
+1 2
+1 2
+1 2
+2 1
+1 2

fn=(5590)
558 4
+1 3
cfi=(13)
cfn=(952)
calls=1 1032 
* 85
+1 2

fl=(299) /home/mithuncy/fsm_p11patch/src/backend/utils/adt/arrayutils.c
fn=(5192) ArrayGetNItems
76 3000
+6 1000
+2 500
+1 1000
+5 4000
+6 5500
+2 1000
+1 2000
-14 3500
+21 1500
+5 500
+1 2000

fl=(35) /home/mithuncy/fsm_p11patch/src/timezone/localtime.c
fn=(1456) getrule
780 10
+1 8
+9 8
+5 4
+1 2
+1 14
cfn=(1454) getnum
calls=2 682 
* 113
* 2
+1 4
+2 12
+2 14
cfn=(1454)
calls=2 682 
* 92
* 2
+1 4
+2 12
+2 14
cfn=(1454)
calls=2 682 
* 92
* 4
+12 4
+2 8
+9 4
+1 2
+1 4

fn=(1050) localsub
1291 72
+4 36
+2 24
+2 48
+1 24
-1 24
+1 100
+36 98
+2 8
+4 10
+1 30
+2 10
+2 550
+2 880
+1 222
+2 108
-7 360
+9 70
+2 90
+7 70
cfn=(1052) timesub
calls=10 +83 
* 8460
-7 18
+7 14
cfn=(1052)
calls=2 +83 
* 1618
* 12
+1 24
+2 60
+1 108
+2 12
+1 24

fn=(1458) increment_overflow_time
1588 12800
+7 6400
+1 1200
-1 600
+2 21000
-2 12400
+4 22400
+1 3200
+1 6400

fn=(1056) leaps_thru_end_of
1437 288
+3 360
cfn=(1058) leaps_thru_end_of_nonneg
calls=72 -9 
* 2232
+1 144

fn=(1446) detzcode64
149 558
+3 186
+1 558
+1 744
+1 558
+2 930
+1 372
+1 15624
-1 4278
+3 744
+7 100
+2 50
+1 100
-1 136
+1 272

fn=(1460) transtime
842 10010
+11 2002
+1 20810
+1 6072
-1 968
+1 9944
+35 36036
+1 12012
+1 20020
+1 26026
+1 20020
+1 40040
-1 36036
+2 4004
+1 373
+6 1492
+1 746
-1 6516
+1 3258
+1 1710
+1 4004
+2 2002
+1 12012
-1 2002
+3 1001
-5 13013
+11 6006
+1 4004
+1 144144
-1 82082
+2 2002
+8 12012
+1 4004

fn=(1464) differ_by_repeat
175 4896
+3 7344
+1 2448

fn=(1448) getzname
644 6
+3 2
+2 6
-2 110
+3 2
+1 4

fn=(1422) tzloadbody
217 9
+5 2
+1 1
+2 6
+2 2
+7 4
+3 5
cfi=(30)
cfn=(1424) pg_open_tzfile
calls=1 77 
* 45394
* 1
+1 2
+3 6
cob=(5)
cfi=(5)
cfn=(684)
calls=1 0 
* 7
* 1
* 1
+1 4
+7 3
cob=(5)
cfi=(5)
cfn=(692)
calls=1 0 
* 7
* 1
* 2
+2 2
+2 8
cfn=(1444) detzcode
calls=2 123 
* 150
* 2
+1 8
cfn=(1444)
calls=2 123 
* 150
* 2
+1 2
+1 2
+1 8
cfn=(1444)
calls=2 123 
* 150
* 2
+1 8
cfn=(1444)
calls=2 123 
* 150
* 2
+1 8
cfn=(1444)
calls=2 123 
* 150
* 2
+1 8
cfn=(1444)
calls=2 123 
* 150
* 2
+1 10
+7 8
+1 8
+1 8
+1 8
+1 6
-4 6
+9 10
+1 4
+1 12
+1 4
+1 8
+1 4
+1 4
-7 2
-1 4
+10 6
+1 6
+1 6
+1 6
+7 2
+1 4
+3 1302
cfn=(1444)
calls=186 123 
* 14050
* 930
cfn=(1446)
calls=186 149 
* 25210
-1 372
+3 1488
+1 2232
+2 744
+4 3704
+7 2976
+2 1116
-21 1868
+24 2
+1 4
+2 1860
+2 1860
+2 2232
+1 2604
-7 1868
+9 6
+1 4
+6 90
+1 30
cfn=(1444)
calls=10 123 
* 770
* 20
+1 10
+1 50
+1 20
+2 40
+1 50
+1 50
+2 30
-16 58
+18 4
+1 320
-1 208
+2 8
+3 2
+1 12
+25 6
+2 4
+4 90
+1 20
+4 72
+2 80
-11 58
+14 4
+4 90
+1 20
+4 72
+2 80
-11 58
+18 8
+2 12
+1 12
cob=(3)
cfi=(3)
cfn=(482)
calls=2 0 
* 584
* 2
251 8
419 4
+1 2
-1 2
+1 6
+1 3
-1 2
+3 3
+2 4
+1 7
cfn=(846) tzparse
calls=1 938 
* 766889
* 2
+10 1
+1 3
+2 2
+2 26
+3 4
+1 140
cob=(3)
cfi=(3)
cfn=(446)
calls=14 0 
* 433
* 14
* 28
+2 16
+1 2
+1 2
-5 54
+7 6
-12 14
+25 4
+2 3
+7 5
+1 6
+1 6
-1 2
+4 2
+1 2148
+1 7518
-2 2684
+4 1
+3 16104
+1 7320
+1 5856
-1 7320
+2 7320
+1 1464
-7 5860
+1 5856
+8 2
+1 40
-1 14
+5 4
+2 4
+2 2
+1 19788
cfn=(1462) typesequiv
calls=1649 605 
* 132714
* 3298
+1 8240
cfn=(1464)
calls=824 175 
* 9888
-1 1648
-1 8249
+7 5
+2 3200
-1 9600
cfn=(1462)
calls=800 +97 
* 64400
* 1600
+2 6000
cfn=(1464)
calls=400 175 
* 4800
-1 800
+4 2
+1 1
-7 2399
+27 2
+1 9900
-1 8254
+3 6
+7 2
+17 2
+16 3
+2 1
+1 2

fn=(1450) getoffset
753 5
+1 1
+2 4
+5 4
+2 5
cfn=(1452) getsecs
calls=1 -51 
* 71
* 1
+1 2
+2 2
+2 1
+1 2

fn=(1452)
712 5
+8 6
cfn=(1454)
calls=1 -38 
* 46
* 1
+1 2
+2 4
+1 4
+17 1
+1 2

fn=(1454)
682 42
+4 63
+2 7
+3 70
+1 21
-1 10
+1 3
+2 32
+1 32
+1 21
+2 21
+1 7
+1 14

fn=(848) init_ttinfo
113 21
+1 9
+1 9
+1 9
+1 6
+1 6
+1 6

fn=(1054) increment_overflow
1570 160
+1 120
+9 360
+2 240
+1 40
+1 80

fn=(1046) pg_tz_acceptable
1905 24
+9 6
+1 30
cfn=(1048) pg_localtime
calls=6 1375 
* 7172
* 6
+1 36
+3 6
+1 12

fn=(1052)
1446 96
+11 12
+1 12
+1 72
+1 48
+11 12
+1 132
+1 192
+1 12
+7 240
+1 96
+3 48
+1 48
+1 24
+1 12
+1 30
cfn=(1054)
calls=6 +81 
* 150
-1 36
+1 90
cfn=(1054)
calls=18 +81 
* 450
* 48
+2 96
cfn=(1056)
calls=24 -54 
* 1008
* 24
+1 96
cfn=(1056)
calls=24 -55 
* 1008
-1 72
+2 312
+1 72
+1 48
-21 606
+27 24
+1 48
+1 12
+2 4
+1 4
-3 32
+5 36
+5 12
+2 16
cfn=(1054)
calls=4 +55 
* 100
* 8
+2 32
-4 32
+6 178
+6 36
+1 60
cfn=(1054)
calls=12 +44 
* 300
* 24
+2 36
+6 204
+2 48
cfn=(1056)
calls=12 -99 
* 504
-1 12
+2 24
cfn=(1056)
calls=12 1437 
* 504
-1 24
+1 36
-4 24
+6 216
+1 48
+2 144
+1 156
+1 168
+6 264
+1 188
+1 30
-1 14
+1 6
+1 352
-1 724
+2 48
+1 24
+1 48
+1 24
+5 48

fn=(1058)
1431 216
+1 1872
+1 144

fn=(3724) pg_get_timezone_name
1890 3
+1 2
+1 2
+2 2

fn=(846)
938 14
+2 2
+9 4
+1 4
+3 3
cob=(3)
cfi=(3)
cfn=(424)
calls=1 0 
* 15
* 1
* 1
+1 2
+1 2
+4 4
+12 3
cfn=(1448)
calls=1 644 
* 64
* 1
+1 5
+2 4
+2 5
cfn=(1450)
calls=1 753 
* 98
* 1
+1 2
+3 6
+1 4
+12 12
+1 4
+2 8
+2 4
+11 2
+1 3
cfn=(1448)
calls=1 644 
* 66
* 1
+1 5
+2 2
+2 5
+1 2
+2 8
+7 3
+1 4
+32 4
+8 1
+3 1
+1 5
cfn=(1456)
calls=1 780 
* 206
* 3
+2 6
+2 5
cfn=(1456)
calls=1 780 
* 227
* 3
+2 4
+2 2
+5 9
cfn=(848)
calls=1 113 
* 22
+1 10
cfn=(848)
calls=1 113 
* 22
+1 2
+1 1
+1 1
+1 1
+5 2332
-1 304
+3 152
+1 1064
cfn=(1458)
calls=152 1588 
* 4104
-3 96
-1 96
+3 48
+1 336
cfn=(1458)
calls=48 1588 
* 1296
* 400
+5 400
+2 3
+1 3
+3 6006
cfn=(1460)
calls=1001 842 
* 212203
* 1001
+1 6006
cfn=(1460)
calls=1001 842 
* 334180
* 1001
+2 11923
+2 3036
+2 1518
-4 968
+2 968
+2 484
+7 2002
+1 3003
+1 4004
+2 5005
-2 2002
+4 2002
+1 1
+1 6000
+2 13000
cfn=(1458)
calls=1000 1588 
* 27000
-1 3000
+3 9000
+1 6000
+2 13000
cfn=(1458)
calls=1000 1588 
* 27000
-1 3000
+4 7000
+1 3000
+4 7000
cfn=(1458)
calls=1000 1588 
* 27000
-1 2000
+3 1000
-42 4003
+44 3
+1 2
+5 6
+1 6
-96 1
1250 1
+5 1
+1 2
+1 2
+1 9
cfn=(848)
calls=1 113 
* 22
+1 2
+2 4
+1 3
+1 6
cob=(1)
cfi=(1)
cfn=(223)
calls=1 0 
* 1364
* 5
-2 4
+1 3
+1 6
cob=(3)
cfi=(3)
cfn=(856)
calls=1 0 
* 14
* 1
+1 4
+1 8
+1 4
+2 6
cob=(3)
cfi=(3)
cfn=(856)
calls=1 0 
* 14
* 1
+1 4
+2 1
+1 2
-1 1
+1 2

fn=(1048)
1375 60
+1 84
cfn=(1050)
calls=12 -85 
* 13184
+1 24

fn=(1420) tzload
589 8
+1 2
cob=(3)
cfi=(3)
cfn=(388)
calls=1 0 
* 385
* 1
* 1
+2 2
+4 8
cfn=(1422)
calls=1 217 
* 1248062
* 1
+2 3
cob=(3)
cfi=(3)
cfn=(590)
calls=1 0 
* 113
* 1
+1 1
+2 2

fn=(1444)
123 624
+3 208
+1 624
+1 832
+1 624
+2 1040
+1 416
+1 7488
-1 2288
+3 832
+7 120
+2 60
+1 120
-1 148
+1 296

fn=(1462)
605 14694
+3 9796
+1 14694
+1 9796
+4 22041
+1 22041
+2 9796
+3 4898
-2 4896
-1 2448
+2 4896
-1 2448
+2 4896
-1 2448
+3 2448
-1 18360
cob=(3)
cfi=(3)
cfn=(446)
calls=1224 0 
* 26928
* 1224
-1 6121
-3 2450
+7 1225
+1 2450
-8 2448
+7 1224
+1 2448

fl=(73)
fn=(1614)
849 7
+4 4
+1 6
cfi=(57)
cfn=(1548)
calls=1 232 
* 50
* 2
+3 4
+1 5
cob=(3)
cfi=(3)
cfn=(446)
calls=1 0 
* 22
* 1
-1 2
+11 4
cfn=(1616) SanityCheckBackgroundWorker
calls=1 584 
* 47
* 3
+3 4
+15 7
+16 2
cob=(3)
cfi=(3)
cfn=(388)
calls=1 0 
* 176
* 1
* 1
+1 2
+8 75
+1 2
+1 2
+1 2
+1 2
+1 2
+2 5
cfi=(74)
cfn=(1618)
calls=1 575 
* 13
+1 6

fn=(2260) BackgroundWorkerShmemInit
160 3
+3 1
cfn=(2040) BackgroundWorkerShmemSize
calls=1 -19 
* 62
* 4
cfi=(87)
cfn=(2168)
calls=1 373 
* 1110
* 1
+3 4
+3 1
+2 3
+1 2
+1 2
+8 3
+2 7
+3 3
+2 2
+1 2
+1 2
+1 2
+1 3
+1 2
+1 7
cob=(3)
cfi=(3)
cfn=(856)
calls=1 0 
* 121
* 1
+1 1
-14 9
+20 1
+2 49
+2 14
+1 7
-5 24
+10 2

fn=(1616)
584 6
+2 5
+2 5
+9 4
+12 4
+2 2
-1 2
+15 4
+1 3
-1 2
+13 5
+3 1
+1 4

fn=(2040)
144 6
+4 2
+1 10
cfi=(87)
cfn=(2000)
calls=2 493 
* 46
* 10
cfi=(87)
cfn=(2002)
calls=2 476 
* 42
* 2
+3 2
+1 4

fn=(2618)
441 4
+4 8
+1 4
+2 4
+2 2

fl=(297) /home/mithuncy/fsm_p11patch/src/backend/access/heap/tuptoaster.c
fn=(5188) heap_tuple_untoast_attr
173 2000
+1 2000
+15 2000
+26 2000
+9 3000
+7 3000
+5 3500
+1 1500
+3 1500
cfi=(13)
cfn=(940)
calls=500 925 
* 46000
* 500
+1 2000
+1 4000
cob=(3)
cfi=(3)
cfn=(856)
calls=500 0 
* 12000
* 500
+1 1000
+3 500
+1 1000

fl=(312)
fn=(5476) PageInit
42 9000
+1 3000
+2 6000
+6 34500
cob=(3)
cfi=(3)
cfn=(828)
calls=1500 -51 
* 1368000
* 1500
+2 3000
+1 3000
+1 9000
+1 9000
+1 7500
+2 3000

fn=(5394)
663 368000
+3 276000
cfn=(5396) PageGetFreeSpace
calls=92000 -87 
* 1932000
* 92000
+1 184000
+8 914000
+1 3000
-1 90500
+1 181000
+35 92000
+1 184000

fn=(5402) PageAddItemExtended
195 875000
+1 175000
+6 87500
+5 350000
+1 350000
-1 175000
+2 350000
-1 175000
+2 175000
-1 175000
+10 955000
+3 3000
-3 86000
+3 522000
+25 525000
+7 43000
+2 4450500
+1 2580000
+1 21500
-4 2902500
+6 64500
+9 132000
+5 262500
+7 525000
+12 305500
+1 396000
+2 86000
+2 86000
+2 150500
+2 64500
-4 264000
+2 462000
+2 198000
+6 787500
+2 175000
+5 2100000
+17 787500
cob=(3)
cfi=(3)
cfn=(856)
calls=87500 0 
* 1575000
* 87500
+3 350000
+1 350000
+2 87500
+1 350000

fn=(5396)
579 276000
+7 276000
+1 276000
-1 276000
+3 184000
+2 276000
+2 184000
+1 184000

fl=(122)
fn=(3798)
520 6
+4 4
+8 2
+1 4

fn=(2848)
767 35
+5 50
+8 20
+1 12
-1 8
+1 8
+1 2
+2 15
+1 4
-1 4
+7 15
+6 9
+2 6
+2 6
+4 12
cfn=(2750) WaitEventAdjustEpoll
calls=2 +14 
* 80
* 6
cfn=(2750)
calls=1 +14 
* 53
+6 10

fn=(2850)
437 24
+12 6
+3 24
+3 12
+26 18
+1 12
+2 18
+2 9
+1 1
cfn=(5692) sendSelfPipeByte
calls=1 1520 
* 23
* 1
+3 12
cob=(3)
cfi=(3)
cfn=(2664)
calls=3 0 
* 15
* 3
+22 12

fn=(2718) InitLatch
229 3
+1 2
+1 3
+1 2
+10 2

fn=(2748)
692 24
+6 6
+6 6
+2 5
+2 4
+2 4
+1 1
+4 8
+5 14
+3 33
+1 21
+1 9
+1 9
+1 9
+5 6
+2 3
+1 4
+2 4
+3 4
+3 3
+6 6
cfn=(2750)
calls=1 +70 
* 44
* 12
cfn=(2750)
calls=2 +70 
* 1446
+7 6
+1 6

fn=(2750)
819 42
+5 12
+2 6
+3 24
+3 12
+2 12
+2 4
+7 10
+1 3
+1 10
+1 3
+8 8
cob=(1)
cfi=(1)
cfn=(223)
calls=1 0 
* 1355
* 5
* 40
cob=(3)
cfi=(3)
cfn=(2756) epoll_ctl
calls=5 0 
* 30
* 5
* 6
+2 12
+4 24

fn=(3800) WaitEventSetWaitBlock
1071 16
+1 2
+6 16
cob=(3)
cfi=(3)
cfn=(3806) epoll_wait
calls=1 0 
* 12
cob=(1)
cfi=(1)
cfn=(223)
calls=1 0 
* 1329
* 6
* 2
+4 4
+3 1
cob=(5)
cfi=(5)
cfn=(472)
calls=1 0 
* 3
* 1
* 3
+7 2
+2 2
+11 4
+6 3
+2 4
+1 4
+1 2
+2 4
+14 4
+24 5
+4 5
+1 3
-1 2
+4 6
+3 5
+7 4
+2 4
+1 1
+1 1
-69 1
-2 9
-1 2
+1 9
-1 2
+1 3
+76 1
+1 8

fn=(2716) InitializeLatchSupport
156 3
+4 3
+8 3
+37 3
cob=(3)
cfi=(3)
cfn=(2422) pipe
calls=1 0 
* 5
* 1
* 2
+2 6
cob=(5)
cfi=(5)
cfn=(2428)
calls=1 0 
* 20
* 1
* 2
+2 6
cob=(5)
cfi=(5)
cfn=(2428)
calls=1 0 
* 20
* 1
* 2
+2 6
cob=(5)
cfi=(5)
cfn=(2428)
calls=1 0 
* 20
* 1
* 2
+2 6
cob=(5)
cfi=(5)
cfn=(2428)
calls=1 0 
* 20
* 1
* 2
+3 2
+1 2
+1 2
+4 2

fn=(2740)
543 5
+3 1
+8 1
+1 9
+3 9
+8 5
cfi=(13)
cfn=(2156)
calls=1 815 
* 284
* 1
+2 2
+1 1
+2 3
+1 9
+3 3
+1 9
+9 2
+1 3
+1 2
+4 2
cob=(1)
cfi=(1)
cfn=(223)
calls=1 0 
* 1373
* 5
* 2
+1 4
+25 1
+1 2

fn=(3792)
954 24
+1 3
+3 3
+8 6
+7 9
cfi=(210) /home/mithuncy/fsm_p11patch/src/backend/storage/ipc/../../../../src/include/pgstat.h
cfn=(3794) pgstat_report_wait_start
calls=3 1239 
* 48
+3 3
+5 3
+31 36
+2 4
+1 8
+2 22
-1 4
+2 4
+1 2
+1 2
+2 2
+8 14
cfn=(3800)
calls=2 +41 
* 1495
* 2
+3 4
+3 4
+3 6
-58 10
+68 3
+3 3
cfi=(210)
cfn=(3796) pgstat_report_wait_end
calls=3 1263 
* 42
+2 3
+1 6

fn=(2844)
297 4
+9 4
+3 3
+1 2

fn=(2192)
261 351
+16 234
+1 234
+1 234
+1 234

fn=(5692)
1520 3
+2 1
+3 6
cob=(5)
cfi=(5)
cfn=(1568)
calls=1 0 
* 7
* 1
* 1
+1 2
+20 2

fn=(5766)
317 3
+4 2
+1 2

fl=(133)
fn=(2530) tokenize_file
471 40
+1 4
+4 28
cfi=(14)
cfn=(432)
calls=4 -81 
* 456
* 4
+3 12
cfi=(134)
cfn=(2532)
calls=4 110 
* 40
* 4
+2 8
+2 4
+4 274
+1 274
+2 1370
cob=(3)
cfi=(3)
cfn=(1486)
calls=274 0 
* 65504
* 274
* 548
+2 4
cob=(5)
cfi=(5)
cfn=(472)
calls=4 0 
* 12
* 4
* 8
+2 12
cob=(3)
cfi=(3)
cfn=(1366)
calls=4 0 
* 144
* 4
* 8
+1 8
+9 810
cob=(3)
cfi=(3)
cfn=(424)
calls=270 0 
* 5932
* 270
* 540
+12 810
cob=(3)
cfi=(3)
cfn=(424)
calls=270 0 
* 5932
* 270
* 1080
+1 270
+1 1080
-1 5304
+4 540
+1 270
+4 1812
cfn=(2534) next_field_expand
calls=302 332 
* 211137
* 302
+3 604
+1 280
cfi=(45)
cfn=(960)
calls=56 129 
* 10652
* 56
-8 3194
+12 1314
+4 24
cfi=(13)
cfn=(940)
calls=12 925 
* 1476
* 12
+1 36
+1 36
+1 36
cfi=(13)
cfn=(928)
calls=12 1162 
* 3883
* 24
+1 36
+1 72
cfi=(45)
cfn=(960)
calls=12 129 
* 2148
* 24
+3 12
-63 36
cob=(3)
cfi=(3)
cfn=(1480)
calls=12 0 
* 432
* 12
+63 258
-63 774
cob=(3)
cfi=(3)
cfn=(1480)
calls=258 0 
* 9288
* 258
* 12
cob=(3)
cfi=(3)
cfn=(1480)
calls=4 0 
* 144
* 4
* 1370
cob=(3)
cfi=(3)
cfn=(1366)
calls=274 0 
* 9864
* 274
* 548
+66 12
cfi=(134)
cfn=(2532)
calls=4 110 
* 40
+2 4
+1 24

fn=(2552)
2917 8
+2 2
+3 2
+1 2
+6 8
cfi=(25)
cfn=(1278)
calls=2 2186 
* 1465
* 2
+1 4
+10 12
cfn=(2530)
calls=2 471 
* 79930
* 2
+1 6
cfi=(25)
cfn=(1374)
calls=2 2385 
* 1049
+4 14
cfi=(14)
cfn=(432)
calls=2 395 
* 1087
* 2
+3 6
cfi=(134)
cfn=(2532)
calls=2 110 
* 20
* 2
+1 6
cfi=(135)
cfn=(2542)
calls=2 78 
* 16
* 8
+28 6
cfi=(13)
cfn=(1396)
calls=2 212 
* 248
+1 6
cfi=(134)
cfn=(2532)
calls=2 110 
* 20
+2 8
+18 6
+9 6
+1 3
cfi=(13)
cfn=(1396)
calls=1 212 
* 119
+2 4
+1 4
+2 2
+1 8

fn=(3286) check_db
611 7
+4 3
cfi=(135)
cfn=(2542)
calls=1 78 
* 10
* 2
+2 3
+1 3
+9 10
cob=(3)
cfi=(3)
cfn=(446)
calls=1 0 
* 22
* 1
* 2
+1 2
-13 2
+31 2

fn=(2538) pg_isblank
161 5680
+1 9104
+1 1712
-1 564
+1 1128

fn=(2540) make_hba_token
289 480
+4 240
cob=(3)
cfi=(3)
cfn=(424)
calls=80 0 
* 1224
* 80
* 80
+2 400
cfi=(13)
cfn=(940)
calls=80 925 
* 9778
* 80
+1 320
+1 240
+1 720
cob=(3)
cfi=(3)
cfn=(856)
calls=80 0 
* 1040
* 80
+2 80
+1 160

fn=(2544) parse_hba_line
946 108
+1 36
+1 36
+13 24
cfi=(13)
cfn=(2546)
calls=12 -5 
* 10409
* 12
+1 36
+1 48
cfi=(13)
cfn=(928)
calls=12 1162 
* 3836
* 24
+4 48
cfi=(135)
cfn=(2542)
calls=12 78 
* 120
* 12
+1 36
+1 48
+11 36
cfi=(135)
cfn=(2542)
calls=12 78 
* 120
* 24
+1 60
cob=(3)
cfi=(3)
cfn=(446)
calls=12 0 
* 536
* 12
* 24
+3 12
+11 40
cob=(3)
cfi=(3)
cfn=(446)
calls=8 0 
* 203
* 8
* 16
+5 48
+25 48
+7 16
-32 8
+48 36
+1 24
+10 24
+1 36
+1 36
cfi=(135)
cfn=(2542)
calls=12 78 
* 120
* 24
+3 48
cfn=(2548) copy_hba_token
calls=12 308 
* 2410
* 12
-1 60
cfi=(45)
cfn=(960)
calls=12 129 
* 3480
* 24
-2 84
+7 36
+1 24
+10 24
+1 36
+1 36
cfi=(135)
cfn=(2542)
calls=12 78 
* 120
* 24
+3 48
cfn=(2548)
calls=12 308 
* 2436
* 12
-1 60
cfi=(45)
cfn=(960)
calls=12 129 
* 3480
* 24
-2 84
+6 48
+3 24
+1 16
+10 24
+1 32
+11 24
cfi=(135)
cfn=(2542)
calls=8 78 
* 80
* 16
+2 80
cob=(3)
cfi=(3)
cfn=(446)
calls=8 0 
* 230
* 8
* 16
+4 80
cob=(3)
cfi=(3)
cfn=(446)
calls=8 0 
* 220
* 8
* 16
+5 80
cob=(3)
cfi=(3)
cfn=(446)
calls=8 0 
* 230
* 8
* 16
+8 16
+3 32
cfi=(13)
cfn=(928)
calls=8 +27 
* 1344
* 8
+3 32
cob=(3)
cfi=(3)
cfn=(1120) __strchr_sse42
calls=8 0 
* 216
* 8
* 8
+1 16
+1 16
+3 8
+1 8
+1 8
+1 8
+1 8
+1 8
+1 8
+1 8
+2 48
cfi=(77)
cfn=(1630)
calls=8 59 
* 12465
* 8
+1 40
+2 16
-1 64
cob=(3)
cfi=(3)
cfn=(856)
calls=8 0 
* 128
* 8
* 8
+19 40
cfi=(77)
cfn=(1942)
calls=8 89 
* 2696
+3 16
+2 32
+14 16
-1 64
cfi=(136) /home/mithuncy/fsm_p11patch/src/backend/libpq/ifaddr.c
cfn=(2550) pg_sockaddr_cidr_mask
calls=8 116 
* 2624
* 16
+13 24
cfi=(13)
cfn=(952)
calls=8 1032 
* 628
* 8
+67 36
+1 24
+10 36
+1 48
+11 36
cfi=(135)
cfn=(2542)
calls=12 78 
* 120
* 24
+2 12
+1 60
cob=(3)
cfi=(3)
cfn=(446)
calls=12 0 
* 554
* 12
* 24
+1 36
+76 24
+17 48
+1 8
-1 8
+5 48
+1 8
-1 8
+12 48
+1 16
-1 16
+18 48
+1 24
-1 24
+21 48
+1 24
-1 24
+9 48
+7 72
+38 48
+56 48
+53 48
+5 12
+1 84

fn=(2548)
308 96
+1 192
cfn=(2540)
calls=24 -20 
* 4462
* 24
+2 24
+1 48

fn=(3008) check_hba
2026 4
+6 5
cfi=(168)
cfn=(3010)
calls=1 5191 
* 37823
* 1
+2 3
cfi=(135)
cfn=(2542)
calls=1 78 
* 10
* 2
+2 3
+3 4
+2 4
+55 9
cfn=(3286)
calls=1 611 
* 69
* 3
+4 8
cfn=(3288) check_role
calls=1 587 
* 106
* 3
+4 3
+1 1
-71 2
+78 2

fn=(3006)
3028 4
+1 3
cfn=(3008)
calls=1 2026 
* 38065
+1 2

fn=(2528)
2127 8
+2 2
+2 2
+1 2
+5 8
cfi=(25)
cfn=(1278)
calls=2 +49 
* 1379
* 2
+1 4
+9 12
cfn=(2530)
calls=2 471 
* 272750
* 2
+1 6
cfi=(25)
cfn=(1374)
calls=2 2385 
* 1020
+4 14
cfi=(14)
cfn=(432)
calls=2 395 
* 1177
* 2
+3 6
cfi=(134)
cfn=(2532)
calls=2 110 
* 20
* 2
+1 6
cfi=(135)
cfn=(2542)
calls=2 78 
* 20
* 4
+2 36
+4 48
+6 48
cfn=(2544)
calls=12 946 
* 52677
* 36
+13 60
cfi=(45)
cfn=(960)
calls=12 129 
* 2086
* 12
-25 64
+33 8
+10 6
cfi=(13)
cfn=(1396)
calls=2 212 
* 1454
+1 6
cfi=(134)
cfn=(2532)
calls=2 110 
* 20
+2 8
+8 6
+1 3
cfi=(13)
cfn=(1396)
calls=1 212 
* 865
+1 4
+1 4
+2 2
+1 8

fn=(2534)
332 2114
+4 302
+4 3926
cfn=(2536) next_token
calls=302 198 
* 173368
* 906
+3 246
+3 392
+4 336
cfn=(2540)
calls=56 -61 
* 10540
* 280
cfi=(45)
cfn=(960)
calls=56 129 
* 17597
* 56
+1 168
+2 302
+1 604

fn=(3288)
587 6
+4 3
cfi=(135)
cfn=(2542)
calls=1 78 
* 10
* 2
+2 3
+1 10
+5 6
cob=(3)
cfi=(3)
cfn=(446)
calls=1 0 
* 22
* 1
* 2
+1 3
-1 2
+1 5
cob=(3)
cfi=(3)
cfn=(446)
calls=1 0 
* 22
* 1
* 2
+1 2
-10 2
+13 2

fn=(2536)
198 3020
+2 604
+1 1812
+1 302
+1 302
+1 302
+4 604
+1 604
+3 11810
cfn=(2538)
calls=822 -51 
* 9948
* 2248
+7 302
+4 2092
+2 112246
+2 246
+3 924
+17 616
+6 616
+1 1540
+3 616
+3 308
+2 616
+8 2464
-51 1220
+1 2392
cfn=(2538)
calls=598 -59 
* 8240
* 598
-1 1196
+1 88
+57 1510
+2 604
+2 2114
+1 984
-1 56
+1 224

fl=(318)
fn=(5698)
1766 2
+1 3
+1 2

fl=(147)
fn=(5662) XLogResetInsertion
194 2
+3 5
+3 1
+1 1
+1 1
+1 1
+1 1
+1 1
+1 2

fn=(5618)
324 5
+5 4
+2 11
+2 3
+1 3
+7 3
+1 2
+2 4
+1 2

fn=(2886)
1029 2
+2 3
+2 7
cfi=(14)
cfn=(432)
calls=1 395 
* 428
* 1
+5 3
+3 4
cfi=(13)
cfn=(2156)
calls=1 815 
* 5021
-1 1
+3 1
+2 3
+2 4
cfi=(13)
cfn=(798)
calls=1 772 
* 122
* 1
+2 1
+6 3
+1 4
cfi=(13)
cfn=(2156)
calls=1 815 
* 259
* 1
+2 2

fn=(5614)
121 2
+6 1
cfi=(53)
cfn=(5616)
calls=1 7991 
* 23
* 3
+3 3
+3 1
+1 2

fn=(5620)
398 4
+2 2
+1 2

fn=(5622)
416 7
+4 4
+7 4
+11 3
+19 5
cfi=(53)
cfn=(5624)
calls=1 8197 
* 12
+2 9
cfn=(5626) XLogRecordAssemble
calls=1 +27 
* 225
* 1
+3 7
cfi=(53)
cfn=(5630)
calls=1 976 
* 1037
* 1
+1 2
+2 1
cfn=(5662)
calls=1 194 
* 15
+2 1
+1 2

fn=(5626)
486 9
+2 1
+3 1
+3 2
+8 2
+1 1
+2 1
+1 1
+1 2
+8 6
+8 2
+1 5
738 5
+1 1
-1 2
+9 3
+2 3
+8 4
+1 5
+2 3
+1 2
+1 2
+2 2
+2 5
+1 2
+10 1
+1 9
cfi=(71)
cfn=(1608)
calls=1 23 
* 55
* 1
+1 3
+1 9
cfi=(71)
cfn=(1608)
calls=1 23 
* 41
* 1
-1 7
+8 1
cfi=(26)
cfn=(5628)
calls=1 418 
* 6
* 2
+1 3
+1 3
+1 3
+1 2
+1 3
+2 1
+1 2

fl=(154)
fn=(4536) CachedPlanSetParentContext
1292 15
+6 12
+2 12
+4 18
cfi=(13)
cfn=(1400) MemoryContextSetParent
calls=3 355 
* 156
+7 12
+5 6

fn=(4580) BuildCachedPlan
882 3521
+6 1006
+16 2515
+8 1006
+2 2515
+1 12
cfi=(243)
cfn=(4376)
calls=3 4767 
* 9925
* 6
+2 1500
+7 500
+1 500
cfi=(110)
cfn=(4582) ActiveSnapshotSet
calls=500 -73 
* 3500
-1 3
+1 3
cfi=(110)
cfn=(4582)
calls=3 -73 
* 21
* 1509
+11 3521
cfi=(52)
cfn=(3918)
calls=503 +11 
* 571125
* 503
+3 1006
+9 2515
+2 21
cfi=(14)
cfn=(432)
calls=3 395 
* 1586
* 3
+3 18
cfi=(13)
cfn=(930) MemoryContextStrdup
calls=3 1149 
* 600
* 15
cfi=(13)
cfn=(812)
calls=3 330 
* 27
+5 9
cfi=(152)
cfn=(2898)
calls=3 110 
* 30
+2 9
cfi=(243)
cfn=(4376)
calls=3 4767 
* 10478
* 6
+3 1000
+5 1000
cfi=(13)
cfn=(940)
calls=500 -43 
* 61500
* 6
cfi=(13)
cfn=(940)
calls=3 -43 
* 369
* 503
+1 1006
+1 1509
+7 503
cfi=(54)
cfn=(3326)
calls=503 381 
* 2515
* 1006
+1 2012
+1 503
+1 1509
cfi=(256)
cfn=(4520)
calls=503 78 
* 5030
* 1006
+2 1509
+2 2012
+1 500
+2 12
+2 12
-9 3521
+12 1006
+6 1006
+1 1006
+1 1509
+1 2012
+1 1006
+1 1006
+3 4527
+2 1509
cfi=(152)
cfn=(2898)
calls=503 110 
* 5030
+2 503
+1 1006

fn=(4568) RevalidateCachedQuery
558 6030
+16 9070
+3 1000
+8 2020
+3 2020
cfi=(55)
cfn=(4570) OverrideSearchPathMatchesCurrent
calls=505 3395 
* 54035
* 1515
+13 4040
+10 2020
+2 2525
cfn=(4572) AcquirePlannerLocks
calls=505 1619 
* 43430
+6 2020
+3 1010
784 4020

fn=(4572)
1619 3030
+3 1515
cfi=(256)
cfn=(4520)
calls=505 78 
* 5050
* 1010
+2 1515
+2 2020
+9 2525
cfn=(4574) ScanQueryForLocks
calls=505 +9 
* 22220
-13 3535
+15 1010

fn=(4574)
1644 3030
+9 2020
cfi=(256)
cfn=(4520)
calls=505 78 
* 4040
* 2020
+26 2020
cfi=(256)
cfn=(4520)
calls=505 78 
* 4040
* 2020
+11 2020
+6 1010

fn=(4374) CreateCachedPlan
170 18
+14 21
cfi=(14)
cfn=(432)
calls=3 395 
* 1338
* 3
+8 9
cfi=(152)
cfn=(2898)
calls=3 -82 
* 30
* 3
+2 6
cfi=(13)
cfn=(2546)
calls=3 956 
* 939
* 3
+1 6
+1 9
cfi=(243)
cfn=(4376)
calls=3 4767 
* 10918
* 6
+1 9
cfi=(13)
cfn=(928)
calls=3 1162 
* 633
* 6
+1 18
cfi=(13)
cfn=(812)
calls=3 330 
* 27
+1 9
+1 6
+1 6
+1 6
+1 6
+1 6
+1 6
+1 6
+1 9
+1 6
+1 6
+1 6
+1 6
+1 6
+1 6
+1 6
+1 6
+1 6
+1 6
+1 6
+1 6
+1 6
+1 6
+1 9
+1 9
+1 6
+2 9
cfi=(152)
cfn=(2898)
calls=3 110 
* 30
+2 3
+1 6

fn=(4468) CompleteCachedPlan
348 5533
+1 1509
+1 1006
+13 2012
+2 1500
+2 6
+8 21
cfi=(14)
cfn=(432)
calls=3 +20 
* 1556
* 3
+3 9
cfi=(152)
cfn=(2898)
calls=3 110 
* 30
+1 9
cfi=(243)
cfn=(4376)
calls=3 4767 
* 10350
* 3
+3 9
+1 9
+2 15
-3 1500
+1 1500
+2 2530
+8 27
cfi=(251)
cfn=(4478) extract_query_dependencies
calls=3 2637 
* 5782
+6 3
cfi=(54)
cfn=(3326)
calls=3 -18 
* 15
* 6
+1 9
+9 9
cfi=(55)
cfn=(4488) GetOverrideSearchPath
calls=3 3343 
* 45340
* 6
+8 9
cfi=(152)
cfn=(2898)
calls=3 110 
* 30
* 1500
cfi=(152)
cfn=(2898)
calls=500 110 
* 5000
+2 1006
+6 1006
+1 1509
+1 1509
+1 1509
+1 1509
+1 1509
+1 1509
cfn=(4518) PlanCacheComputeResultDesc
calls=503 1732 
* 51352
* 1006
+2 1509
cfi=(152)
cfn=(2898)
calls=503 110 
* 5030
+2 1006
+1 1006
+1 1006

fn=(4578) CheckCachedPlan
797 2525
+1 1515
+6 1010
+1 6
+9 4016
+8 2008
+8 2510
cfn=(4750) AcquireExecutorLocks
calls=502 1564 
* 26606
+6 2008
+1 1004
-1 1004
+9 2008
+3 1004
+13 2020

fn=(4744) ReleaseCachedPlan
1263 6048
+2 2016
+3 2525
cfi=(162)
cfn=(4746) ResourceOwnerForgetPlanCacheRef
calls=505 1117 
* 35350
+3 5040
+1 4032
+3 1006
+3 2515
+1 12
cfi=(13)
cfn=(1396)
calls=3 212 
* 1041
+2 2016

fn=(5160) CreateOneShotCachedPlan
253 3000
+9 1000
cfi=(13)
cfn=(2546)
calls=500 956 
* 156500
* 500
+1 1000
+1 1500
+1 1500
+1 1500
+1 1000
+1 1000
+1 1000
+1 1000
+1 1000
+1 1000
+1 1000
+1 1500
+1 1000
+1 1000
+1 1000
+1 1000
+1 1000
+1 1000
+1 1000
+1 1000
+1 1000
+1 1000
+1 1000
+1 1000
+1 1000
+1 1000
+1 1500
+1 1500
+1 1000
+2 500
+1 1000

fn=(5574) DropCachedPlan
500 12
+4 12
+2 12
cfi=(153)
cfn=(5542)
calls=3 359 
* 45
+1 6
+4 9
cfn=(4548) ReleaseGenericPlan
calls=3 +18 
* 1188
+3 6
+6 15
+1 12
cfi=(13)
cfn=(1396)
calls=3 212 
* 2798
+1 6

fn=(4566) GetCachedPlan
1143 8040
+1 1005
+8 4535
+4 5025
cfn=(4568)
calls=1005 558 
* 134755
* 1005
+3 5025
cfn=(4576) choose_custom_plan
calls=1005 1020 
* 13070
* 1005
+2 4020
+2 1515
cfn=(4578)
calls=505 797 
* 49244
* 1010
+3 2008
+6 21
cfn=(4580)
calls=3 882 
* 291183
* 3
+2 9
cfn=(4548)
calls=3 529 
* 30
+2 9
+1 15
+2 12
+3 18
cfi=(13)
cfn=(1400)
calls=3 355 
* 156
+1 9
+9 12
cfn=(4730) cached_plan_cost
calls=3 1077 
* 153
* 12
+11 15
cfn=(4576)
calls=3 1020 
* 42
* 3
+7 3
+4 2010
+3 3000
cfn=(4580)
calls=500 882 
* 438000
* 500
+2 2000
+2 3500
cfn=(4730)
calls=500 1077 
* 22000
* 1500
+1 2500
+7 2010
+1 1515
cfi=(162)
cfn=(4732) ResourceOwnerEnlargePlanCacheRefs
calls=505 1097 
* 11918
+1 5025
+1 2010
+1 2525
cfi=(162)
cfn=(4734) ResourceOwnerRememberPlanCacheRef
calls=505 1108 
* 21715
+8 4010
+6 1005
+1 2010

fn=(4730)
1077 3018
+1 1006
+3 2012
cfi=(256)
cfn=(4520)
calls=503 78 
* 5030
* 1006
+2 1509
+2 2012
+1 500
+2 18
+2 6
-9 3521
+38 503
+1 2012

fn=(4518)
1732 2012
+3 1509
cfi=(224)
cfn=(3928) ChoosePortalStrategy
calls=503 220 
* 40168
* 2515
+4 9
cfi=(256)
cfn=(4520)
calls=3 78 
* 30
* 6
+1 12
cfi=(257)
cfn=(4522) ExecCleanTypeFromTL
calls=3 +61 
* 3082
* 3
+14 500
+2 500
+1 1006

fn=(4546) SaveCachedPlan
456 12
+7 12
+10 9
cfn=(4548)
calls=3 +56 
* 30
+7 18
cfi=(13)
cfn=(1400)
calls=3 355 
* 171
+5 15
cfi=(153)
cfn=(4550) dlist_push_tail
calls=3 318 
* 75
+2 6
+1 6

fn=(4548)
529 36
+2 36
+2 9
+3 6
+1 12
cfn=(4744)
calls=3 1263 
* 1131
+2 18

fn=(4750)
1564 3012
+3 1506
cfi=(256)
cfn=(4520)
calls=502 78 
* 5020
* 1004
+2 1506
+3 2008
+16 2008
cfi=(256)
cfn=(4520)
calls=502 78 
* 4016
* 2008
-21 3514
+40 1004

fn=(2906)
131 2
+1 3
cfi=(155)
cfn=(2908) CacheRegisterRelcacheCallback
calls=1 1451 
* 25
+1 4
cfi=(155)
cfn=(2910)
calls=1 1410 
* 65
+1 4
cfi=(155)
cfn=(2910)
calls=1 1410 
* 65
+1 4
cfi=(155)
cfn=(2910)
calls=1 1410 
* 65
+1 4
cfi=(155)
cfn=(2910)
calls=1 1410 
* 65
+1 4
cfi=(155)
cfn=(2910)
calls=1 1410 
* 65
+1 4
cfi=(155)
cfn=(2910)
calls=1 1410 
* 65
+1 4
cfi=(155)
cfn=(2910)
calls=1 1410 
* 65
+1 2

fn=(4576)
1020 4032
+4 4032
+1 1000
+3 1016
+1 1016
+37 2016

fl=(140)
fn=(3156) add_to_unowned_list
260 1590
+2 1590
+1 1060
+1 1060

fn=(2824)
118 3
+3 2
+2 10
+1 9
cfi=(141)
cfn=(2826)
calls=1 +83 
* 134
-3 7
+7 3
cfi=(67)
cfn=(1578)
calls=1 306 
* 32
+1 2

fn=(5772)
136 5
+3 2
+2 10
-2 7
+5 2

fn=(3154) smgropen
153 4240
+5 1590
+5 118
+1 1
+1 1
+1 6
cfi=(31)
cfn=(794)
calls=1 317 
* 3181
* 1
+2 1
+4 4
+1 2
+1 7
cfi=(31)
cfn=(836)
calls=1 910 
* 1403
-2 2116
+1 1058
+1 3703
cfi=(31)
cfn=(836)
calls=529 910 
* 217461
* 530
+5 2120
+5 1060
+1 1060
+1 1060
+1 1060
+1 1060
+3 1060
+1 10600
-1 7420
+4 1590
cfn=(3156)
calls=530 +65 
* 5300
+3 530
+1 1060

fn=(5444) smgrextend
617 13500
+1 22500
cfi=(141)
cfn=(5446)
calls=1500 497 
* 876772
+2 3000

fn=(3162)
688 20190
+1 56532
cfi=(141)
cfn=(3164)
calls=4038 847 
* 1559523
+1 8076

fn=(5368)
303 12500
+1 35000
cfi=(141)
cfn=(5370)
calls=2500 -26 
* 5797534
+1 5000

fn=(3158) smgrsetowner
209 2650
+13 2120
+3 1590
cfn=(3160) remove_from_unowned_list
calls=530 +56 
* 11660
+3 1590
+1 1590
+1 1060

fn=(3160)
281 1590
+4 2650
+4 1590
+2 2120
+1 1060
+1 530
-8 1060
+11 1060

fn=(3682)
814 4
+5 8
+5 4

fl=(210)
fn=(3796)
1263 6
+1 6
+2 18
+7 6
+1 6

fn=(3794)
1239 9
+1 6
+2 18
+7 9
+1 6

fl=(110)
fn=(3736)
532 4
+1 6
+4 4

fn=(2988) HistoricSnapshotActive
2025 8960
+1 13440
+1 8960

fn=(3128)
864 9056
+1 4528
+3 11320
cfn=(3130) RegisterSnapshotOnOwner
calls=2264 +9 
* 1009724
+1 4528

fn=(3132) CopySnapshot
661 13068
+9 6534
-1 19602
+2 13068
+3 16335
cfi=(13)
cfn=(798)
calls=3267 +98 
* 315423
* 3267
+1 19602
cob=(3)
cfi=(3)
cfn=(856)
calls=3267 0 
* 192135
* 3267
+2 6534
+1 6534
+1 6534
+3 13068
+7 6534
+8 13068
+8 6534
+2 3267
+1 6534

fn=(3138)
945 13584
+1 6792
+1 6792
+2 15848
cfi=(166)
cfn=(2998) TransactionIdPrecedes
calls=2264 301 
* 38488
* 4528
+2 15848
cfi=(166)
cfn=(3140) TransactionIdFollows
calls=2264 335 
* 38488
* 4528
+3 2264
+1 4528

fn=(3696)
1060 14
+10 6
+6 2
+5 6
+31 2
cfn=(2990)
calls=2 511 
* 156
+3 4
+4 6
+4 10
+8 2
+1 2
+1 2
+2 2
+1 2
+2 2
+7 4
+4 4

fn=(5164) UpdateActiveSnapshotCommandId
782 1500
+16 2000
+1 1000
cfi=(26)
cfn=(3000)
calls=500 663 
* 4500
* 500
+1 500
cfi=(26)
cfn=(1210)
calls=500 911 
* 4000
* 1000
+2 2000
+1 1000

fn=(3274) FreeSnapshot
716 13068
+5 9801
cfi=(13)
cfn=(952)
calls=3267 1032 
* 277695
+1 6534

fn=(3948) PushActiveSnapshot
734 4012
+5 4012
cfi=(13)
cfn=(798)
calls=1003 +33 
* 91335
* 1003
+6 3009
+1 3009
cfn=(3132)
calls=1003 -85 
* 191605
* 3009
+4 3009
+1 1003
cfi=(26)
cfn=(3532)
calls=1003 +8 
* 8024
* 2006
+2 5015
+2 2006
+1 3009
+1 2
+1 2006

fn=(4800) PopActiveSnapshot
813 3009
+3 3009
+4 5015
+2 5015
+1 3009
-1 2006
+2 4012
cfn=(3274)
calls=1003 716 
* 94282
+2 3009
cfi=(13)
cfn=(952)
calls=1003 1032 
* 85255
+1 2006
+1 3009
+1 1
+2 1
cfn=(3276) SnapshotResetXmin
calls=1 979 
* 48
* 1002
cfn=(3276)
calls=1002 979 
* 9018
+1 2006

fn=(5526)
545 1500
+1 2000
+3 1500
+1 1500
+1 1500
+3 1000

fn=(2288) SnapMgrInit
268 3
+7 1
cfn=(2074) SnapMgrShmemSize
calls=1 -23 
* 10
* 4
cfi=(87)
cfn=(2168)
calls=1 +98 
* 1088
-1 1
+4 4
+2 2
+1 2
+1 2
+1 2
+1 2
+1 2
+1 2
+1 2
+1 2
+1 2
+1 2
+2 2

fn=(3122) GetNonHistoricCatalogSnapshot
463 11528
+8 8646
+1 7134
cfi=(151)
cfn=(3334)
calls=2378 1470 
* 38048
* 2378
-1 4756
+2 7131
cfi=(151)
cfn=(3336)
calls=2377 1493 
* 361713
* 2377
-1 4754
+4 8646
+3 1008
cfi=(100)
cfn=(2992) GetSnapshotData
calls=504 1520 
* 277297
* 504
+14 2520
cfi=(173)
cfn=(3124)
calls=504 113 
* 18144
+3 2882
+1 5764

fn=(2990)
511 2014
+1 3021
+2 2520
cfi=(173)
cfn=(3272)
calls=504 171 
* 25200
+1 504
+1 504
cfn=(3276)
calls=504 979 
* 4551
+2 2014

fn=(3130)
877 11320
+3 4528
+4 15848
cfn=(3132)
calls=2264 661 
* 479303
* 2264
+3 6792
cfi=(162)
cfn=(3134) ResourceOwnerEnlargeSnapshots
calls=2264 1187 
* 52709
+1 11320
+1 11320
cfi=(162)
cfn=(3136) ResourceOwnerRememberSnapshot
calls=2264 1198 
* 97352
+2 9056
+1 11320
cfi=(173)
cfn=(3124)
calls=2264 113 
* 289800
+2 2264
+1 4528

fn=(3266)
906 9056
+1 4528
+3 11320
cfn=(3268) UnregisterSnapshotFromOwner
calls=2264 +9 
* 565883
+1 4528

fn=(2074)
252 6
+3 2
+1 6
+4 2
+1 4

fn=(2986)
305 2008
+7 1004
cfn=(2988)
calls=1004 2025 
* 7028
* 2008
+7 4016
+6 2
cfn=(2990)
calls=2 511 
* 14
+5 2
cfi=(26)
cfn=(1210)
calls=2 911 
* 16
* 4
+11 6
+15 4
cfi=(100)
cfn=(2992)
calls=2 1520 
* 1565
* 2
+2 2
+1 4
+3 3006
+4 1002
cfn=(2990)
calls=1002 511 
* 40080
+2 2004
cfi=(100)
cfn=(2992)
calls=1002 1520 
* 550074
* 1002
+2 1002
+1 2008

fn=(3120)
441 11528
+8 2882
cfn=(2988)
calls=2882 2025 
* 20174
* 5764
+3 8646
cfn=(3122)
calls=2882 +11 
* 765230
+1 5764

fn=(4582)
852 1008
+1 1512
+1 1008

fn=(3950) GetActiveSnapshot
840 4
+3 4
+1 4

fn=(3268)
919 11320
+1 4528
+6 11320
cfi=(162)
cfn=(3270) ResourceOwnerForgetSnapshot
calls=2264 1207 
* 158480
+2 11320
+1 9056
+1 11320
cfi=(173)
cfn=(3272)
calls=2264 171 
* 74720
+2 18112
+2 6792
cfn=(3274)
calls=2264 716 
* 212816
+1 2264
cfn=(3276)
calls=2264 +44 
* 29307
+2 4528

fn=(3276)
979 11313
+3 11313
+1 3538
+2 699
+2 6
+1 3
+3 460
cfi=(173)
cfn=(3278)
calls=230 131 
* 1610
* 460
+3 1610
cfi=(166)
cfn=(2998)
calls=230 301 
* 3910
* 460
+2 7542

fl=(155)
fn=(3648)
948 10
+2 6
+1 2
+34 4

fn=(2976)
680 13958
+1 20937
cfi=(164)
cfn=(2978)
calls=6979 74 
* 418740
+42 13958

fn=(5532)
1084 1000
+6 1500
+1 500
+6 1000

fn=(2908)
1451 5
+1 3
+3 6
+1 6
+2 3
+1 2

fn=(2910)
1410 72
+1 48
+2 36
+3 60
+3 66
+5 6
+2 11
+2 10
+3 10
+1 8
+1 9
+1 9
+2 3
+1 2
-6 110
+1 88
+1 99
+1 99
+2 33
+1 22

fn=(3628)
828 10
+4 6
+2 4
+1 4
+1 4
+35 4

fl=(163)
fn=(3672)
303 14
+2 6
+3 10
+6 2
cfn=(3674) SPICleanup
calls=2 -25 
* 18
+1 10

fn=(5154) _SPI_prepare_oneshot_plan
1982 2500
+9 500
+1 1000
+1 1000
+1 1000
+5 1500
cfi=(52)
cfn=(3832)
calls=500 633 
* 6345564
* 500
+5 500
+2 1500
cfi=(242)
cfn=(4372)
calls=500 78 
* 5000
* 1000
+2 1500
+3 2000
cfi=(221)
cfn=(3896)
calls=500 +72 
* 8500
* 3000
cfi=(154)
cfn=(5160)
calls=500 253 
* 194500
* 500
+4 2500
cfi=(45)
cfn=(960)
calls=500 129 
* 145000
* 500
-9 3500
+12 1500
+1 1000
+5 1000
+1 1000

fn=(3674)
289 4
+1 2
+1 2
+2 2
+1 2
+1 2
+1 4

fn=(2968)
424 4
+1 6
+1 4
+4 4

fn=(4538) _SPI_end_call
2624 2515
+1 1006
+3 503
cfn=(4540) _SPI_procmem
calls=503 -41 
* 9054
+2 1006
+2 2012
cfi=(13)
cfn=(3734)
calls=503 137 
* 174590
+3 503
+1 1006

fn=(4544) SPI_keepplan
692 12
+3 18
+1 6
-1 6
+1 12
+8 6
+1 18
cfi=(13)
cfn=(1400)
calls=3 355 
* 177
+2 12
cfi=(242)
cfn=(4372)
calls=3 78 
* 30
* 6
+2 9
+2 9
cfi=(154)
cfn=(4546)
calls=3 456 
* 354
-4 21
+7 3
+1 6

fn=(4366) _SPI_begin_call
2600 3024
+1 1512
+3 1008
+3 1006
cfi=(26)
cfn=(736)
calls=503 625 
* 4024
* 503
+2 503
cfn=(4368) _SPI_execmem
calls=503 -28 
* 9054
+3 504
+1 2016

fn=(4370) _SPI_prepare_plan
1877 15
+9 3
+1 6
+1 6
+1 6
+5 9
cfi=(52)
cfn=(3832)
calls=3 633 
* 34256
* 3
+6 3
+2 9
cfi=(242)
cfn=(4372)
calls=3 78 
* 30
* 6
+2 9
+8 12
cfi=(221)
cfn=(3896)
calls=3 2083 
* 51
* 18
cfi=(154)
cfn=(4374)
calls=3 170 
* 14218
* 3
+8 12
+7 3
-4 30
cfi=(52)
cfn=(4388)
calls=3 722 
* 587724
* 6
+16 57
cfi=(154)
cfn=(4468)
calls=3 348 
* 66827
+10 15
cfi=(45)
cfn=(960)
calls=3 129 
* 870
* 3
-47 21
+50 9
+1 6
+5 6
+1 6

fn=(4364) SPI_prepare_params
658 21
+4 6
+6 6
cfn=(4366)
calls=3 2600 
* 138
* 3
+1 9
+3 15
cob=(3)
cfi=(3)
cfn=(828)
calls=3 0 
* 48
* 3
+1 3
+1 6
+1 3
+1 3
+1 6
+1 6
+2 15
cfn=(4370)
calls=3 1877 
* 704258
+3 9
cfn=(4534) _SPI_make_plan_non_temp
calls=3 2664 
* 3890
* 3
+2 6
cfn=(4538)
calls=3 2624 
* 690
+2 3
+1 6

fn=(5162) _SPI_execute_plan
2042 6000
+1 500
+1 500
+1 500
+1 500
+1 500
+2 500
+6 500
+1 500
+1 1000
+1 1000
+24 1000
+15 2000
cfi=(242)
cfn=(4372)
calls=500 78 
* 5000
* 1000
+2 1500
+4 1500
+5 2000
+2 1500
+1 1500
+7 1000
+2 2000
+15 500
-4 5000
cfi=(52)
cfn=(3902)
calls=500 683 
* 617500
* 500
+8 9500
cfi=(154)
cfn=(4468)
calls=500 348 
* 93000
+15 4500
cfi=(154)
cfn=(4566)
calls=500 1143 
* 510500
* 500
+1 1500
+6 5500
+2 1000
+2 500
cfi=(110)
cfn=(2986)
calls=500 305 
* 290994
* 1000
cfi=(110)
cfn=(3948)
calls=500 734 
* 163000
+1 500
+3 1500
cfi=(242)
cfn=(4372)
calls=500 78 
* 5000
* 1000
+2 1500
+1 1500
+3 1000
+1 1000
+2 2000
+2 2500
+2 1500
+2 2000
+3 500
+10 1000
+7 500
cfi=(26)
cfn=(1210)
calls=500 911 
* 4000
* 1000
+7 4500
+2 500
cfi=(26)
cfn=(4782)
calls=500 920 
* 5500
+1 500
cfi=(110)
cfn=(5164)
calls=500 782 
* 18000
+3 3000
cfi=(209)
cfn=(3934)
calls=500 114 
* 6500
* 500
+2 2000
+32 4500
+1 1000
+8 500
-4 5500
cfi=(221)
cfn=(3953)
calls=500 345 
* 348579446
+9 2000
+4 500
+6 2500
+25 2500
+3 3500
cfi=(294)
cfn=(5518)
calls=500 559 
* 81788
* 500
+10 1000
+2 1500
+1 1500
cfn=(5524) SPI_freetuptable
calls=500 1102 
* 5000
+1 1500
+1 1500
+8 1000
2169 3500
2334 3500
cfi=(154)
cfn=(4744)
calls=500 1263 
* 13000
+1 500
+7 2000
+1 500
cfi=(26)
cfn=(4782)
calls=500 920 
* 39000
2097 3500
2349 1000
+1 500
cfi=(110)
cfn=(4800)
calls=500 813 
* 112000
+3 1000
+6 1000
+3 1000
+1 1000
+3 1000
+7 1000
+3 500
+1 2000

fn=(5572) SPI_freeplan
741 12
+3 18
+4 12
cfi=(242)
cfn=(4372)
calls=3 78 
* 30
* 6
+2 9
+2 9
cfi=(154)
cfn=(5574)
calls=3 500 
* 4121
-4 21
+8 12
cfi=(13)
cfn=(1396)
calls=3 212 
* 910
+2 3
+1 6

fn=(4540)
2587 1006
+1 2012
cfi=(233)
cfn=(4144)
calls=503 110 
* 5030
+1 1006

fn=(4140) SPI_connect_ext
96 5
+4 3
+2 6
+2 1
+2 13
cfi=(13)
cfn=(798)
calls=1 772 
* 91
-1 1
+3 3
+17 3
+3 11
+1 2
+1 2
+1 2
+1 4
cfi=(232)
cfn=(4142)
calls=1 555 
* 7
+1 2
+1 2
+1 2
cfi=(26)
cfn=(736)
calls=1 625 
* 8
* 1
+1 2
+1 6
+1 2
+1 3
+1 3
+1 3
+14 12
cfi=(14)
cfn=(432)
calls=1 395 
* 424
* 1
+3 13
cfi=(14)
cfn=(432)
calls=1 395 
* 424
* 1
+4 5
cfi=(233)
cfn=(4144)
calls=1 -52 
* 10
* 1
+6 1
+1 1
+1 1
+2 1
+1 4

fn=(5524)
1102 4000
+1 1000
+3 2000
+1 1000
+44 2000

fn=(4534)
2664 12
+2 9
+15 21
cfi=(14)
cfn=(432)
calls=3 395 
* 1859
* 3
+3 9
cfi=(233)
cfn=(4144)
calls=3 110 
* 30
* 3
+3 6
cfi=(13)
cfn=(2546)
calls=3 956 
* 582
* 3
+1 6
+1 9
+1 12
+1 12
+1 12
+6 6
+1 12
+1 12
+8 12
cfi=(242)
cfn=(4372)
calls=3 78 
* 30
* 6
+2 9
+2 15
cfi=(154)
cfn=(4536)
calls=3 1292 
* 231
+3 18
cfi=(45)
cfn=(960)
calls=3 129 
* 870
* 6
-7 21
+10 9
cfi=(233)
cfn=(4144)
calls=3 110 
* 30
+3 6
+2 3
+1 6

fn=(4562) SPI_plan_get_cached_plan
1738 2020
+8 2020
+4 2020
cfi=(242)
cfn=(4564)
calls=505 90 
* 5050
* 1010
+2 2020
cfi=(242)
cfn=(4372)
calls=505 78 
* 5050
* 1010
+3 505
+1 1515
+1 1010
+1 1010
+4 505
-1 4040
cfi=(154)
cfn=(4566)
calls=505 1143 
* 541220
* 505
+5 1010
+2 505
+1 1010

fn=(5152) SPI_execute
436 3500
+4 2000
+3 1000
cfn=(4366)
calls=500 2600 
* 23000
* 500
+1 1000
+3 2500
cob=(3)
cfi=(3)
cfn=(828)
calls=500 0 
* 8000
* 500
+1 500
+1 500
+2 2500
cfn=(5154)
calls=500 1982 
* 6727564
+2 5500
cfn=(5162)
calls=500 2042 
* 350690728
* 500
+4 1000
cfn=(4538)
calls=500 2624 
* 191505
+1 500
+1 1000

fn=(5584) SPI_finish
177 3
+3 2
cfn=(4366)
calls=1 2600 
* 16
* 1
+1 2
+4 4
cfi=(233)
cfn=(4144)
calls=1 -75 
* 10
+3 4
cfi=(13)
cfn=(1396)
calls=1 +24 
* 119
+1 2
+1 4
cfi=(13)
cfn=(1396)
calls=1 +22 
* 877
+1 2
+6 3
+1 3
+1 3
+3 3
+1 3
+1 2
+4 1
+1 2

fn=(4368)
2581 1006
+1 2012
cfi=(233)
cfn=(4144)
calls=503 110 
* 5030
+1 1006

fn=(4556) SPI_plan_get_plan_sources
1722 9
+2 6
+1 6

fl=(201)
fn=(3612)
584 10
+3 6
+1 2
+26 4

fl=(86)
fn=(2128) PGReserveSemaphores
200 5
+13 3
cfn=(1998) PGSemaphoreShmemSize
calls=1 -48 
* 34
* 2
cfi=(87)
cfn=(2130)
calls=1 +15 
* 32
-1 1
+4 1
+1 2
+1 3
+2 3
cfi=(67)
cfn=(2110)
calls=1 362 
* 32
+1 2

fn=(2242)
252 348
+7 464
+9 696
+1 232
+1 348
cfn=(2244) PosixSemaphoreCreate
calls=116 135 
* 3703
+3 348
+2 116
+1 232

fn=(2852)
285 4
+7 3
cob=(1)
cfi=(1)
cfn=(223)
calls=1 0 
* 854
* 5
* 3
cob=(5)
cfi=(5)
cfn=(2858)
calls=1 0 
* 8
* 1
* 4
+2 1
cob=(5)
cfi=(5)
cfn=(472)
calls=1 0 
* 3
* 1
* 3
+6 1
+1 2

fn=(2244)
135 464
+1 580
cob=(5)
cfi=(5)
cfn=(2250)
calls=115 0 
* 1265
cob=(1)
cfi=(1)
cfn=(223)
calls=1 0 
* 810
* 120
* 232
+2 232

fn=(1998)
165 8
+6 10
cfi=(87)
cfn=(2000)
calls=2 493 
* 46
+2 4

fl=(100)
fn=(2048) ProcArrayShmemSize
181 3
+6 1
+1 7
cfi=(87)
cfn=(2000)
calls=1 493 
* 23
* 5
cfi=(87)
cfn=(2002)
calls=1 476 
* 21
* 1
+18 3
+4 6
-2 4
cfi=(87)
cfn=(2000)
calls=1 493 
* 23
* 5
cfi=(87)
cfn=(2002)
calls=1 476 
* 21
* 1
+4 6
-1 4
cfi=(87)
cfn=(2000)
calls=1 493 
* 23
* 5
cfi=(87)
cfn=(2002)
calls=1 476 
* 21
* 1
+4 1
+1 2

fn=(5684) ProcArrayEndTransactionInternal
453 6
+1 2
+1 2
+1 2
+2 6
+1 2
+1 2
+3 2
+1 2
+3 6
cfi=(166)
cfn=(2998)
calls=1 301 
* 17
* 2
+2 3
+1 2

fn=(5750)
335 5
+1 2
+9 5
cfi=(99)
cfn=(2170)
calls=1 1122 
* 137
+2 2
+15 2
+2 9
+4 4
-1 20
cob=(3)
cfi=(3)
cfn=(482)
calls=1 0 
* 12
* 1
+2 7
+1 5
+1 4
cfi=(99)
cfn=(2182)
calls=1 1726 
* 91
+1 1
-10 4
+18 2

fn=(2992)
1520 7540
+1 3016
+5 1508
+1 1508
+1 1508
+1 1508
+1 1508
+15 6032
+7 2
cfn=(2994) GetMaxSnapshotXidCount
calls=2 -85 
* 12
* 8
cob=(3)
cfi=(3)
cfn=(388)
calls=2 0 
* 442
* 2
* 2
-1 4
+2 8
+6 2
cfn=(2996) GetMaxSnapshotSubxidCount
calls=2 -81 
* 20
* 8
cob=(3)
cfi=(3)
cfn=(388)
calls=2 0 
* 587
* 2
* 2
-1 4
+2 8
+10 7540
cfi=(99)
cfn=(2170)
calls=1508 1122 
* 205088
+3 4524
+2 4524
+3 6032
+2 1508
cfi=(53)
cfn=(2878)
calls=1508 7896 
* 16588
* 3016
+2 7540
+2 4524
+8 4524
+1 3016
+2 42224
+1 54288
+7 36192
+5 18096
+1 12064
+1 6020
-1 3010
+5 18096
+8 12064
+1 8982
+1 6032
-31 30160
1720 4524
+1 4524
+2 6032
+1 15
+2 12
cfi=(99)
cfn=(2182)
calls=3 * 
* 270
* 6020
cfi=(99)
cfn=(2182)
calls=1505 * 
* 135450
+7 7540
cfi=(166)
cfn=(2998)
calls=1508 301 
* 25636
* 3016
+4 7540
+1 4524
+4 3016
+5 3016
+6 3016
+4 3016
+2 4524
+1 4524
+1 4524
+1 4524
+1 4524
+2 3016
cfi=(26)
cfn=(3000)
calls=1508 663 
* 13572
* 3016
+6 3016
+1 3016
+1 3016
+2 4524
+6 3016
+1 4524
+14 1508
+1 6032

fn=(2254) CreateSharedProcArray
223 3
+8 3
-3 4
cfi=(87)
cfn=(2000)
calls=1 493 
* 23
* 3
cfi=(87)
cfn=(2002)
calls=1 476 
* 21
* 4
cfi=(87)
cfn=(2168)
calls=1 373 
* 888
-1 1
+7 4
+5 2
+1 5
+1 8
+1 2
+1 2
+1 2
+1 2
+1 2
+1 2
+1 2
+3 3
+1 3
+3 3
+5 6
-2 4
cfi=(87)
cfn=(2000)
calls=1 493 
* 23
* 4
cfi=(87)
cfn=(2168)
calls=1 373 
* 1069
-1 1
+7 6
-1 4
cfi=(87)
cfn=(2000)
calls=1 493 
* 23
* 4
cfi=(87)
cfn=(2168)
calls=1 373 
* 1166
-1 1
+7 3
cfi=(99)
cfn=(2158)
calls=1 603 
* 17
+1 2

fn=(3630)
398 10
+1 20
+2 4
+15 5
cfi=(99)
cfn=(5674)
calls=1 1294 
* 129
* 2
+2 6
cfn=(5684)
calls=1 +35 
* 56
+1 4
cfi=(99)
cfn=(2182)
calls=1 1726 
* 91
* 1
+14 2
+1 2
+2 6
+1 2
+1 2
+5 4

fn=(2870)
277 5
+1 2
+3 5
cfi=(99)
cfn=(2170)
calls=1 1122 
* 137
+2 6
+22 2
+6 16
-6 4
+11 3
-1 20
cob=(3)
cfi=(3)
cfn=(482)
calls=1 0 
* 19
* 1
+2 7
+1 5
+2 4
cfi=(99)
cfn=(2182)
calls=1 1726 
* 91
+1 4

fn=(2994)
1467 4
+1 4
+1 4

fn=(2996)
1478 4
+1 12
+1 4

fl=(113)
fn=(3742)
1102 6
+5 8
+1 2
+50 4

fn=(3668)
875 6
+7 12
+1 2
+30 4

fn=(2080) AsyncShmemSize
427 3
+4 6
cfi=(87)
cfn=(2000)
calls=1 +62 
* 23
* 1
+1 4
cfi=(87)
cfn=(2002)
calls=1 +44 
* 21
* 1
+2 3
cfi=(93)
cfn=(2020)
calls=1 146 
* 52
* 5
cfi=(87)
cfn=(2002)
calls=1 +42 
* 21
* 1
+2 1
+1 2

fn=(2298) AsyncShmemInit
444 3
+11 6
cfi=(87)
cfn=(2000)
calls=1 +38 
* 23
* 1
+1 4
cfi=(87)
cfn=(2002)
calls=1 +20 
* 21
* 1
+3 5
cfi=(87)
cfn=(2168)
calls=1 -86 
* 1061
-1 1
+3 4
+5 4
+1 4
+1 2
+2 2
+2 791
+1 791
+1 1582
-4 455
+11 1
+2 2
-1 8
cfi=(93)
cfn=(2196)
calls=1 167 
* 2104
+3 1
+2 4
+5 4
cfi=(93)
cfn=(2300)
calls=1 1377 
* 3533
+3 5
cfi=(99)
cfn=(2170)
calls=1 1122 
* 137
+1 5
cfi=(93)
cfn=(2316)
calls=1 264 
* 1254
* 1
+2 4
cfi=(93)
cfn=(2322)
calls=1 +81 
* 1773
+1 4
cfi=(99)
cfn=(2182)
calls=1 1726 
* 91
+2 2

fn=(3616)
776 8
+3 12
+1 2
+84 8

fl=(129)
fn=(2336) dsm_postmaster_startup
146 4
+1 1
+12 3
+5 3
-1 1
+2 4
cfi=(57)
cfn=(2084)
calls=1 1286 
* 68
* 6
cfi=(57)
cfn=(2086)
calls=1 1336 
* 96
+2 3
cfn=(2338) dsm_control_bytes_needed
calls=1 1101 
* 11
* 1
+12 1
cob=(1)
cfi=(1)
cfn=(223)
calls=1 0 
* 1303
* 5
* 1
+1 3
+2 10
cfi=(130)
cfn=(2346)
calls=1 -21 
* 11655
* 2
+3 1
+2 2
+1 4
cfi=(67)
cfn=(2110)
calls=1 362 
* 32
+1 4
cfi=(57)
cfn=(2084)
calls=1 1286 
* 68
* 8
cfi=(57)
cfn=(2086)
calls=1 1336 
* 96
+3 3
+3 2
+1 2
+1 3
+1 2

fn=(2714)
1016 3
+3 14
+21 2

fn=(5730)
621 6
+1 6
cfi=(320)
cfn=(5732)
calls=2 290 
* 34
* 6
+7 4

fn=(2338)
1101 3
+2 5
-1 1
+2 2

fl=(181)
fn=(3324)
48 2
+1 1
cfi=(54)
cfn=(3326)
calls=1 381 
* 5
* 2
cfn=(3328)
calls=1 +9 
* 17049
+1 2

fn=(3328)
58 4028
+5 6039
+1 2012
+3 4
+4 4
cfi=(151)
cfn=(3306)
calls=1 1114 
* 16834
* 1
+1 2
+2 9
+1 3
cfi=(151)
cfn=(3280)
calls=1 1161 
* 103
* 1
+9 4
+2 4
cfi=(155)
cfn=(2910)
calls=1 1410 
* 65
+3 1
+4 2
+1 2
+2 1
+1 2014

fl=(287)
fn=(4934) typeidType
560 8
+3 8
cfi=(151)
cfn=(3306)
calls=2 1114 
* 684
* 2
+1 4
+2 2
+1 4

fn=(5042)
295 7
+3 6
cfn=(5044) typenameType
calls=1 -50 
* 47880
* 1
+1 10
+1 3
cfi=(151)
cfn=(3280)
calls=1 1161 
* 103
+1 2

fn=(4938) typeLen
581 6
+3 16
+1 4
+1 4

fn=(5044)
248 8
+3 6
cfn=(5046) LookupTypeName
calls=1 59 
* 47846
* 1
+1 2
+6 11
+6 1
+1 5

fn=(5046)
59 10
+5 4
+5 4
+83 7
cfi=(55)
cfn=(4860) DeconstructQualifiedName
calls=1 2792 
* 68
+2 3
+6 7
cfi=(223)
cfn=(4942)
calls=1 -13 
* 24
+2 5
cfi=(55)
cfn=(5048) LookupExplicitNamespace
calls=1 2874 
* 18504
* 1
+1 2
+1 9
cfi=(151)
cfn=(3012)
calls=1 1227 
* 28791
* 2
+6 3
cfi=(223)
cfn=(4960)
calls=1 -8 
* 8
* 1
+9 4
+4 2
+7 4
cfi=(151)
cfn=(3306)
calls=1 1114 
* 342
* 1
+1 2
+3 6
cfn=(5050) typenameTypeMod
calls=1 316 
* 20
* 1
+2 2
+1 3
+2 1
+1 5

fn=(4936) typeTypeCollation
622 6
+3 16
+1 4
+1 4

fn=(4940) typeByVal
591 6
+3 16
+1 4
+1 4

fn=(5050)
316 8
+10 4
+1 3
+82 5

fn=(4910) typeOrDomainTypeRelid
671 56
+7 56
cfi=(151)
cfn=(3306)
calls=14 1114 
* 4788
* 14
+1 28
+2 112
+1 56
+3 14
+6 42
+1 42
cfi=(151)
cfn=(3280)
calls=14 1161 
* 1442
+1 14
+1 28

fn=(4944) stringTypeDatum
636 12
+1 16
+1 6
+1 6
cfi=(272)
cfn=(4946) getTypeIOParam
calls=2 2049 
* 38
* 2
+2 12
cfi=(171)
cfn=(4948) OidInputFunctionCall
calls=2 1825 
* 692
+1 4

fl=(265)
fn=(4632)
1121 12
+6 12
cfi=(13)
cfn=(3400)
calls=3 853 
* 1404
* 15
+1 6
+1 6
+1 9
+1 6
+1 3
cfi=(266)
cfn=(4634)
calls=3 672 
* 561
* 6
+2 18
cfi=(45)
cfn=(960)
calls=3 129 
* 870
* 6
+2 3
+1 6

fn=(4678)
1155 54
+12 54
cfi=(268)
cfn=(4642)
calls=9 78 
* 84
* 18
+2 18
+2 36
cfi=(276) /home/mithuncy/fsm_p11patch/src/backend/nodes/bitmapset.c
cfn=(4686) bms_equal
calls=6 154 
* 78
* 12
+1 12
-5 18
+8 12
cfi=(13)
cfn=(3400)
calls=3 853 
* 1404
* 15
+1 6
+1 9
cfi=(276)
cfn=(4680) bms_copy
calls=3 134 
* 30
* 6
+3 21
+1 6
+1 6
+1 3
cfi=(266)
cfn=(4634)
calls=3 672 
* 561
* 6
+1 6
+1 6
+1 6
+1 6
+1 6
+2 24
cfi=(45)
cfn=(960)
calls=3 129 
* 870
* 12
+2 3
+1 18

fl=(157)
fn=(2922)
1239 6
+1 4
+2 12
+7 6
+1 4

fn=(2924)
1263 4
+1 4
+2 12
+7 4
+1 4

fl=(162)
fn=(4734)
1108 2525
+1 3030
cfn=(3072) ResourceArrayAdd
calls=505 263 
* 15150
+1 1010

fn=(3262) ResourceOwnerForgetBuffer
915 86310
+1 120834
cfn=(3088) ResourceArrayRemove
calls=17262 301 
* 947148
* 51786
+3 34524

fn=(5274) ResourceOwnerEnlargeTupleDescs
1141 2000
+1 2000
cfn=(3068) ResourceArrayEnlarge
calls=500 208 
* 6803
+1 1000

fn=(3222) ResourceOwnerRememberBuffer
906 86310
+1 120834
cfn=(3072)
calls=17262 263 
* 517860
+1 34524

fn=(3702) ResourceOwnerNewParent
749 12
+1 9
+2 6
+2 4
+1 5
+16 6
+9 6
+1 6
+2 6

fn=(5598) ResourceOwnerGetParent
739 3
+1 2
+1 2

fn=(3066) ResourceOwnerEnlargeRelationRefs
1052 37720
+1 37720
cfn=(3068)
calls=9430 208 
* 123196
+1 18860

fn=(3134)
1187 9056
+1 9056
cfn=(3068)
calls=2264 208 
* 30069
+1 4528

fn=(3250)
982 13156
+1 13156
cfn=(3068)
calls=3289 208 
* 43394
+1 6578

fn=(3284)
1002 16445
+1 19734
cfn=(3088)
calls=3289 301 
* 177606
* 9867
+3 6578

fn=(3632)
481 72
+2 54
cfn=(3634) ResourceOwnerReleaseInternal
calls=9 +8 
* 899061
+1 18

fn=(4876)
1017 16
+1 16
cfn=(3068)
calls=4 208 
* 355
+1 8

fn=(4746)
1117 2525
+1 3030
cfn=(3088)
calls=505 301 
* 27270
* 1515
+3 1010

fn=(3072)
263 166270
+6 133016
+3 133016
+15 99762
+1 232778
+1 166270
+1 66508

fn=(3086) ResourceOwnerForgetRelationRef
1072 47150
+1 56580
cfn=(3088)
calls=9430 301 
* 509220
* 28290
+3 18860

fn=(3270)
1207 11320
+1 13584
cfn=(3088)
calls=2264 301 
* 122256
* 6792
+3 4528

fn=(3634)
491 72
+7 54
+7 18
+1 18
+2 18
+11 21
cfn=(3636) ResourceArrayGetAny
calls=3 370 
* 36
* 6
+10 21
cfn=(3636)
calls=3 370 
* 36
* 6
+10 21
cfn=(3636)
calls=3 370 
* 36
* 6
+10 21
cfn=(3636)
calls=3 370 
* 36
* 9
+7 12
+2 6
+7 6
+2 6
cfi=(84)
cfn=(3654)
calls=2 772 
* 821562
+1 6
cfi=(92)
cfn=(3664) ReleasePredicateLocks
calls=2 3223 
* 22
* 2
+19 4
+2 1
+1 2
+8 2
+1 5
cfi=(91)
cfn=(5596) LockReassignCurrentOwner
calls=1 2489 
* 76524
* 1
+5 6
+9 21
cfn=(3636)
calls=3 370 
* 36
* 6
+10 21
cfn=(3636)
calls=3 370 
* 36
* 6
+10 21
cfn=(3636)
calls=3 370 
* 36
* 6
+10 21
cfn=(3636)
calls=3 370 
* 36
* 6
+10 21
cfn=(3636)
calls=3 370 
* 36
* 6
+10 21
cfn=(3636)
calls=3 370 
* 36
* 6
+11 45
+3 18
+1 18

fn=(5276) ResourceOwnerRememberTupleDesc
1152 2500
+1 3000
cfn=(3072)
calls=500 263 
* 15000
+1 1000

fn=(4732)
1097 2020
+1 2020
cfn=(3068)
calls=505 208 
* 6868
+1 1010

fn=(2962) ResourceArrayInit
189 120
+7 90
+2 60

fn=(3068)
208 133016
+7 199524
+1 33243
+2 33
+1 33
+3 44
+1 66
cfi=(13)
cfn=(798)
calls=11 772 
* 1094
* 11
+2 22
+1 1232
-1 737
+4 33
+1 33
+1 55
+1 22
+2 22
+20 66508

fn=(3088)
301 166270
+3 99762
+5 133016
+2 133016
+1 232778
-1 66508
+3 483810
+1 161270
+2 161270
+1 64508
+2 2000
+2 9000
+2 15000
+1 5000
+2 5000
+1 2000
-8 4000
+37 66508

fn=(3094) ResourceOwnerForgetLock
953 42375
+3 33900
+1 7328
+3 5735
+2 8029
+2 13764
+1 5735
+1 1147
-6 2294
+11 16950

fn=(3700)
688 12
+21 15
+8 12
cfn=(3702)
calls=3 +32 
* 60
+3 12
cfn=(3704) ResourceArrayFree
calls=3 402 
* 208
+1 12
cfn=(3704)
calls=3 402 
* 208
+1 12
cfn=(3704)
calls=3 402 
* 119
+1 12
cfn=(3704)
calls=3 402 
* 208
+1 12
cfn=(3704)
calls=3 402 
* 119
+1 12
cfn=(3704)
calls=3 402 
* 119
+1 12
cfn=(3704)
calls=3 402 
* 208
+1 12
cfn=(3704)
calls=3 402 
* 30
+1 12
cfn=(3704)
calls=3 402 
* 30
+1 12
cfn=(3704)
calls=3 402 
* 30
+2 9
cfi=(13)
cfn=(952)
calls=3 1032 
* 255
+1 6

fn=(5500) ResourceOwnerForgetTupleDesc
1161 2500
+1 3000
cfn=(3088)
calls=500 301 
* 27000
* 1500
+3 1000

fn=(3048) ResourceOwnerRememberLock
933 33900
+3 33900
+1 7296
+2 4716
+1 8239
+5 5885
+1 2354
-1 10
+1 14596

fn=(3070) ResourceOwnerRememberRelationRef
1063 47150
+1 56580
cfn=(3072)
calls=9430 263 
* 282900
+1 18860

fn=(3252)
993 16445
+1 19734
cfn=(3072)
calls=3289 263 
* 98670
+1 6578

fn=(3636)
370 120
+1 120
+1 60
+23 60

fn=(4884)
1037 20
+1 24
cfn=(3088)
calls=4 301 
* 216
* 12
+3 8

fn=(3136)
1198 11320
+1 13584
cfn=(3072)
calls=2264 263 
* 67920
+1 4528

fn=(3198) ResourceOwnerEnlargeBuffers
893 69048
+3 69048
cfn=(3068)
calls=17262 208 
* 225043
+1 34524

fn=(4880)
1028 20
+1 24
cfn=(3072)
calls=4 263 
* 120
+1 8

fn=(2960)
422 15
+3 12
cfi=(13)
cfn=(2156)
calls=3 815 
* 1630
* 3
+2 9
+2 6
+2 3
+1 4
+1 3
+3 5
cfn=(2962)
calls=1 189 
* 9
* 10
cfn=(2962)
calls=2 189 
* 18
+1 15
cfn=(2962)
calls=3 189 
* 27
+1 15
cfn=(2962)
calls=3 189 
* 27
+1 15
cfn=(2962)
calls=3 189 
* 27
+1 15
cfn=(2962)
calls=3 189 
* 27
+1 15
cfn=(2962)
calls=3 189 
* 27
+1 15
cfn=(2962)
calls=3 189 
* 27
+1 15
cfn=(2962)
calls=3 189 
* 27
+1 15
cfn=(2962)
calls=3 189 
* 27
+1 15
cfn=(2962)
calls=3 189 
* 27
+2 3
+1 6

fn=(3704)
402 120
+1 120
+1 44
cfi=(13)
cfn=(952)
calls=11 1032 
* 935
+1 60

fl=(252)
fn=(4484)
78 18
+1 24
+1 12
-2 108
+1 126
+1 72
-2 36
+1 36
+1 24

fn=(4624)
90 9
+1 9
+1 6
-2 36
+1 42
+1 24
-2 9
+1 9
+1 6

fn=(4670)
84 9
+1 15
+1 6

fl=(283)
fn=(4962) oprid
246 6
+1 16
+1 4

fn=(4856) oper
379 20
+4 2
+1 2
+5 20
cfn=(4858) make_oper_cache_key
calls=2 1035 
* 800
* 2
+2 4
+2 6
cfn=(4866) find_oper_cache_entry
calls=2 1078 
* 4363
* 2
+1 6
+11 12
cfn=(4868) binary_oper_exact
calls=2 270 
* 57330
* 2
+1 6
+8 5
cfi=(55)
cfn=(4890) OpernameGetCandidates
calls=1 1568 
* 66701
* 1
+3 2
+8 2
+2 2
+2 2
+1 2
+1 6
cfn=(4894) oper_select_candidate
calls=1 323 
* 358992
* 1
+4 6
+1 10
cfi=(151)
cfn=(3306)
calls=2 1114 
* 47206
* 2
+2 4
+2 4
+1 10
cfn=(4926) make_oper_cache_entry
calls=2 1118 
* 3074
* 2
+5 2
+1 4

fn=(4926)
1118 10
+5 12
cfi=(31)
cfn=(836)
calls=2 910 
* 3040
* 2
+3 6
+1 4

fn=(4868)
270 12
+2 2
+3 6
+2 2
+1 2
+2 2
+6 12
cfi=(55)
cfn=(4870) OpernameGetOprid
calls=2 1465 
* 56782
* 2
+1 4
+1 2
+2 2
+3 3
cfi=(272)
cfn=(4886)
calls=1 2267 
* 488
* 1
+2 3
+8 1
+1 4

fn=(4854)
749 22
+13 4
+7 4
+10 6
cfi=(247)
cfn=(4434)
calls=2 43 
* 48
* 2
+1 6
cfi=(247)
cfn=(4434)
calls=2 43 
* 48
* 2
+1 18
cfn=(4856)
calls=2 379 
* 538617
* 2
+3 16
+3 8
+11 4
+8 4
+11 8
cfi=(45)
cfn=(1586)
calls=2 260 
* 518
* 10
cfi=(45)
cfn=(1586)
calls=2 260 
* 322
* 2
+1 4
+1 4
+1 6
+1 6
+1 2
+8 16
cfi=(285)
cfn=(4928)
calls=2 1677 
* 724
* 2
+7 12
cfi=(284)
cfn=(4930)
calls=2 1823 
* 1928
+3 8
cfi=(13)
cfn=(3400)
calls=2 +13 
* 317
* 10
+1 6
cfn=(4962)
calls=2 246 
* 26
* 4
+1 8
+1 6
+1 8
cfi=(272)
cfn=(4964) get_func_retset
calls=2 1499 
* 44943
* 4
+2 6
+1 6
+3 8
+7 6
cfi=(151)
cfn=(3280)
calls=2 1161 
* 206
+2 2
+1 10

fn=(4858)
1035 18
+5 12
cfi=(55)
cfn=(4860)
calls=2 2792 
* 110
+3 292
+3 12
cfi=(16)
cfn=(460)
calls=2 46 
* 132
+1 6
+1 6
+2 6
+12 10
cfi=(55)
cfn=(4864) fetch_search_path_array
calls=2 4304 
* 186
* 4
+5 2
+1 4

fn=(4894)
323 7
+7 6
cfi=(284)
cfn=(4896)
calls=1 908 
* 266786
* 1
+4 2
+5 2
+10 6
cfi=(284)
cfn=(4918)
calls=1 992 
* 92170
* 1
+2 3
+2 4
+1 2
+5 2

fn=(4866)
1078 8
+3 6
+5 118
+1 1
+1 1
+1 6
cfi=(31)
cfn=(794)
calls=1 317 
* 2725
* 1
+4 4
cfi=(155)
cfn=(2910)
calls=1 1410 
* 65
+3 4
cfi=(155)
cfn=(2910)
calls=1 1410 
* 65
+6 12
cfi=(31)
cfn=(836)
calls=2 910 
* 1333
* 2
+3 4
+1 4
+3 4

fl=(91)
fn=(3034) LockTagHashCode
491 33844
+1 42305
cfi=(31)
cfn=(2226)
calls=8461 861 
* 1159157
+1 16922

fn=(2966)
4297 8
+3 10
cfi=(99)
cfn=(2170)
calls=2 1122 
* 274
+6 4
+1 6
+2 8
cfi=(99)
cfn=(2182)
calls=2 1726 
* 182
+1 4

fn=(5596)
2489 5
+1 3
cfi=(162)
cfn=(5598)
calls=1 739 
* 7
* 1
+4 2
+5 5
cfi=(31)
cfn=(3528)
calls=1 1380 
* 53
+2 1
+1 2505
cfn=(5600) LockReassignOwner
calls=501 +17 
* 40764
-1 1506
cfi=(31)
cfn=(3534)
calls=502 1390 
* 30163
* 1507
+10 2

fn=(3032)
738 103792
+1 31936
+11 7984
+2 31936
+2 31936
+1 47904
+3 7984
cfi=(53)
cfn=(2878)
calls=7984 7896 
* 87824
* 15968
+18 15968
+3 15968
+5 143712
cob=(3)
cfi=(3)
cfn=(828)
calls=7984 0 
* 111776
* 7984
+1 39920
+1 15968
+2 55888
cfi=(31)
cfn=(836)
calls=7984 910 
* 3202420
* 7984
+7 31936
+2 15950
+1 15950
+1 23925
cfn=(3034)
calls=7975 491 
* 1180300
* 15950
+1 15950
+1 15950
+1 15950
+1 15950
+1 15950
+1 15950
+3 15950
-1 55825
cfi=(13)
cfn=(798)
calls=7975 -35 
* 742295
-1 23925
+7 54
+10 23952
+2 15968
+1 19446
+8 31936
+2 45
cfn=(3046) GrantLockLocal
calls=9 1602 
* 360
+1 36
+1 18
+17 15950
+19 128280
+1 6420
-1 12840
+3 3255
+9 5425
cfi=(99)
cfn=(2170)
calls=1085 1122 
* 148645
+1 5425
+3 6510
cfn=(3366) FastPathGrantRelationLock
calls=1085 2565 
* 362784
* 1085
+2 4340
cfi=(99)
cfn=(2182)
calls=1085 1726 
* 98735
+1 2170
+7 2170
+1 2170
+1 5425
cfn=(3046)
calls=1085 1602 
* 80058
+1 2170
+10 87342
+28 55120
+2 27560
cfi=(99)
cfn=(2170)
calls=6890 1122 
* 943930
+11 55120
cfn=(3036) SetupLockInTable
calls=6890 1121 
* 5758560
* 6890
+2 13780
+16 20670
+1 20670
+1 20670
+7 82680
+3 41340
cfn=(3042) LockCheckConflicts
calls=6890 1348 
* 192920
* 6890
+3 13780
+3 41340
cfn=(3044) GrantLock
calls=6890 1468 
* 454740
+1 34450
cfn=(3046)
calls=6890 1602 
* 407920
* 6890
+95 6890
cfn=(3050) FinishStrongLockAcquire
calls=6890 1657 
* 34450
+2 20670
cfi=(99)
cfn=(2182)
calls=6890 1726 
* 626990
+6 13780
+11 6890
+1 39920

fn=(3378) FastPathUnGrantRelationLock
2602 23744
+2 5936
+2 5936
+1 11872
+2 569856
+1 16635
+3 18445
+1 1085
+3 1139712
+1 240837
-11 296800
+13 5936
+1 11872

fn=(3050)
1657 13780
+1 6890
+1 13780

fn=(3052)
1709 19419
+2 12946
+1 12946

fn=(3096) UnGrantLock
1492 41340
+1 6890
+9 34450
+1 75790
+1 34450
+1 75790
+2 48230
+3 75790
+14 82680
+6 75790
+3 6890
+1 13780

fn=(3660)
2090 40
+9 5
+2 20
+2 20
+13 10
+1 2
cfn=(3662) VirtualXactLockTableCleanup
calls=2 4320 
* 512
+2 15
+10 25
cfi=(31)
cfn=(3528)
calls=5 1380 
* 265
+2 5
+7 2008
+7 2510
+8 2008
+2 1506
+3 1004
+2 4518
+3 5522
cfi=(162)
cfn=(3094)
calls=502 953 
* 6055
-5 4518
+8 2008
+1 1004
-1 1004
+11 1004
+7 3952
+2 48
+4 288
+11 64
+2 5
cfi=(99)
cfn=(2170)
calls=1 1122 
* 137
+1 1
+4 3
+1 5
cfn=(3378)
calls=1 2602 
* 427
-1 45
+1 75
cfn=(3378)
calls=15 2602 
* 6045
* 32
+2 48
cfn=(3100) RemoveLocalLock
calls=16 1297 
* 7472
+1 16
+25 1944
+1 6318
+3 1458
cfn=(3100)
calls=486 1297 
* 227001
2131 1521
cfi=(31)
cfn=(3534)
calls=507 1390 
* 47265
* 1521
2245 10
+1 4
cfi=(99)
cfn=(2182)
calls=1 1726 
* 91
+5 10
+3 640
+3 560
+21 480
cfi=(126)
cfn=(2234)
calls=80 146 
* 1251
* 160
+2 63
+2 68
cfi=(99)
cfn=(2170)
calls=17 1122 
* 2329
+2 102
cfi=(126)
cfn=(2234)
calls=17 146 
* 306
* 34
+5 486
+4 972
-1 2430
cfi=(126)
cfn=(2234)
calls=486 146 
* 8697
* 486
+6 1458
+3 2430
+7 972
+9 1944
+13 972
+2 34992
+1 3402
cfn=(3096)
calls=486 1492 
* 40338
* 2430
-3 17010
+10 972
+3 486
+2 486
-2 972
cfn=(3034)
calls=486 491 
* 71928
* 3402
cfn=(3098) CleanUpLock
calls=486 1550 
* 281895
-56 972
-3 1006
+65 51
cfi=(99)
cfn=(2182)
calls=17 1726 
* 1547
-98 250
2356 20

fn=(5600)
2519 2505
+3 501
+1 501
+6 1503
+1 2505
+2 5010
+1 1500
+1 9
+1 2
-5 2505
+8 1002
+1 1
+2 1000
+3 4000
+1 2500
cfi=(162)
cfn=(3048)
calls=500 933 
* 5718
* 500
+11 2500
cfi=(162)
cfn=(3094)
calls=500 953 
* 6000
+1 1002

fn=(2016) LockShmemSize
3437 3
+1 1
+4 7
cfi=(87)
cfn=(2002)
calls=1 476 
* 21
* 6
cfi=(87)
cfn=(2000)
calls=1 493 
* 23
* 1
+1 4
cfi=(31)
cfn=(2006)
calls=1 733 
* 435
* 5
cfi=(87)
cfn=(2002)
calls=1 476 
* 21
* 1
+3 1
+1 4
cfi=(31)
cfn=(2006)
calls=1 733 
* 438
* 5
cfi=(87)
cfn=(2002)
calls=1 476 
* 21
* 1
+5 8
cfi=(87)
cfn=(2002)
calls=1 476 
* 21
* 1
+2 1
+1 2

fn=(3046)
1602 39920
+1 23952
+5 39920
+2 15968
+2 81
+2 81
+1 9
-5 31936
+8 63800
+1 55825
+1 39875
+1 15950
+1 39875
cfi=(162)
cfn=(3048)
calls=7975 933 
* 105178
+1 15968

fn=(3658)
1667 9
+2 6
+2 6
+1 3
+10 6

fn=(3040) ProcLockHashCode
539 55120
+1 27560
+6 41340
+1 41340
+2 13780
+1 27560

fn=(3092)
1885 52374
+1 29928
+9 29928
+2 29928
+1 44892
+13 134676
cob=(3)
cfi=(3)
cfn=(828)
calls=7482 0 
* 104748
* 7482
+1 37410
+1 14964
+2 44892
cfi=(31)
cfn=(836)
calls=7482 910 
* 2199674
* 7482
+7 44892
+11 22446
+5 14964
+3 14964
+2 37410
+2 67338
+3 89784
+2 14946
+1 37365
cfi=(162)
cfn=(3094)
calls=7473 953 
* 125202
+2 37365
+1 29892
+3 7482
-14 14964
+17 14964
+13 37410
+2 29928
+1 18
+9 14946
+3 119264
+1 5920
-1 11840
+9 29600
cfi=(99)
cfn=(2170)
calls=5920 1122 
* 811040
+1 35520
cfn=(3378)
calls=5920 2602 
* 2342194
* 5920
+2 23680
cfi=(99)
cfn=(2182)
calls=5920 1726 
* 538720
+1 11840
+2 3207
cfn=(3100)
calls=1069 1297 
* 503068
+1 2138
+7 57636
+2 25616
cfi=(99)
cfn=(2170)
calls=6404 1122 
* 877348
+10 19212
+1 12808
+24 19212
+7 57636
+13 38424
cfn=(3096)
calls=6404 1492 
* 531532
* 6404
+2 57636
cfn=(3098)
calls=6404 1550 
* 3719143
+4 19212
cfi=(99)
cfn=(2182)
calls=6404 1726 
* 582764
+2 19212
cfn=(3100)
calls=6404 1297 
* 3039157
+1 6404
+1 14964

fn=(2220) InitLocks
378 3
+10 7
cfi=(87)
cfn=(2002)
calls=1 +88 
* 21
* 6
cfi=(87)
cfn=(2000)
calls=1 493 
* 23
* 1
+1 6
+6 118
+1 1
+1 1
+1 1
+2 7
cfi=(87)
cfn=(2162)
calls=1 -78 
* 53886
* 1
+7 1
+1 1
+6 1
+1 1
+1 1
+1 1
+2 7
cfi=(87)
cfn=(2162)
calls=1 -97 
* 99180
* 1
+10 5
cfi=(87)
cfn=(2168)
calls=1 -56 
* 1322
-1 1
+3 4
+1 2
+11 3
+3 1
+1 1
+2 6
cfi=(31)
cfn=(794)
calls=1 317 
* 2788
* 1
+4 2

fn=(3098)
1550 62010
+5 27560
+5 27560
cfi=(126)
cfn=(2236)
calls=6890 69 
* 172250
+1 27560
cfi=(126)
cfn=(2236)
calls=6890 69 
* 172250
+1 34450
cfn=(3040)
calls=6890 539 
* 103350
* 6890
+2 6890
-1 41340
cfi=(31)
cfn=(842)
calls=6890 924 
* 1595057
* 13780
+8 27560
+9 6890
-1 41340
cfi=(31)
cfn=(842)
calls=6890 924 
* 1599851
* 13780
+5 6890
+7 13780

fn=(3350)
712 12016
+1 12016
cfn=(3032)
calls=1502 +25 
* 3146579
+2 3004

fn=(3044)
1468 34450
+1 34450
+1 75790
+1 68900
+1 82680
+1 75790
+1 68900
+4 13780

fn=(3100)
1297 31900
+3 55825
+5 15950
+1 31900
+1 31900
cfi=(13)
cfn=(952)
calls=7975 1032 
* 677875
+1 15950
+2 31900
+14 7975
-1 39875
cfi=(31)
cfn=(836)
calls=7975 910 
* 2803748
* 15950
+4 15950

fn=(3366)
2565 4340
+2 1085
+3 2170
+2 208320
+1 44091
+1 15978
-4 54250
+13 2170
+2 5425
+1 17360
+1 3255
+1 2170
+5 2170

fn=(3662)
4320 6
+9 10
cfi=(99)
cfn=(2170)
calls=2 1122 
* 274
+2 6
+1 6
+1 4
+1 4
+2 8
cfi=(99)
cfn=(2182)
calls=2 1726 
* 182
+6 8
+12 4

fn=(3036)
1121 55120
+10 55120
cfi=(31)
cfn=(842)
calls=6890 924 
* 1793134
* 6890
+5 13780
+6 27560
+2 13780
+1 13780
+1 27560
cfi=(126)
cfn=(2228)
calls=6890 37 
* 82680
+1 27560
cfi=(84)
cfn=(3038)
calls=6890 1023 
* 158470
+1 13780
+1 13780
+1 434070
+1 103350
cob=(3)
cfi=(3)
cfn=(828)
calls=6890 0 
* 110240
* 6890
+14 13780
+1 13780
+2 34450
cfn=(3040)
calls=6890 539 
* 103350
* 6890
+5 55120
cfi=(31)
cfn=(842)
calls=6890 924 
* 1788186
* 6890
+5 13780
+25 27560
+2 20670
+12 13780
+1 20670
-1 13780
+2 13780
+1 13780
+2 48230
cfi=(126)
cfn=(2230)
calls=6890 90 
* 158470
+1 82680
cfi=(126)
cfn=(2230)
calls=6890 90 
* 158470
+52 34450
+1 75790
+7 62010
+6 6890
+1 13780

fn=(3042)
1348 48230
+1 20670
+2 55120
+2 6890
+14 34450
+3 13780
+83 13780

fl=(305)
fn=(5260)
569 3500
+4 2000
+1 500
+25 2500

fl=(47)
fn=(976)
78 126
+1 198
+1 84
-2 13107
+1 16141
+1 8738

fl=(209)
fn=(5686)
167 6
+1 5
+10 5
cob=(3)
cfi=(3)
cfn=(424)
calls=1 0 
* 15
* 1
* 5
cfi=(58)
cfn=(3300)
calls=1 1561 
* 228
+1 1
+13 4

fn=(3898)
104 4
+2 2

fn=(3766)
251 8
+1 10
+5 8
+4 8
cfi=(179)
cfn=(3292)
calls=2 88 
* 336
+1 2
cfi=(26)
cfn=(3768)
calls=2 4485 
* 32
* 10
cfi=(207)
cfn=(3770)
calls=2 162 
* 176
+1 6
cfi=(179)
cfn=(3298)
calls=2 +36 
* 670
* 2
+5 6
cfi=(58)
cfn=(3776)
calls=2 1401 
* 372
+1 2
+13 4

fn=(3934)
114 2004
+6 2505
+4 3
cfi=(225)
cfn=(3936)
calls=1 -45 
* 276
* 1
+12 1000
+23 1002

fl=(116)
fn=(2138)
225 2008
+1 502
+2 2510
+6 502
+1 1506

fl=(171)
fn=(3974)
1406 6
+5 5
cfn=(3344)
calls=1 125 
* 3808854
+2 8
+2 2
+1 1
+2 5
cob=(12)
cfi=(230)
cfn=(4136) plpgsql_inline_handler
calls=1 301 
* 363819519
* 1
+3 3
+3 1
+1 2

fn=(3978) fmgr_info_C_lang
360 6
+9 3
cfn=(3980) lookup_C_func
calls=1 531 
* 20
* 1
+1 2
+18 7
cfi=(151)
cfn=(3982)
calls=1 1376 
* 1985
* 1
+2 3
+2 3
cfi=(41)
cfn=(3984)
calls=1 186 
* 184
* 1
+2 7
cfi=(151)
cfn=(3982)
calls=1 1376 
* 1785
* 1
+2 3
+2 3
cfi=(41)
cfn=(3984)
calls=1 186 
* 213
* 1
+3 7
cfi=(228)
cfn=(3988)
calls=1 109 
* 3772024
* 1
+4 5
cfn=(4128) fetch_finfo_record
calls=1 +66 
* 1767
* 1
+3 6
cfn=(4134) record_C_func
calls=1 556 
* 3958
+2 3
cfi=(13)
cfn=(952)
calls=1 1032 
* 85
+1 3
cfi=(13)
cfn=(952)
calls=1 1032 
* 85
+3 4
+4 3
+1 1
+7 2

fn=(4950) InputFunctionCall
1710 612514
+4 175004
+3 612514
+2 175004
+1 175004
+1 262506
+1 262506
+1 87502
+1 87502
+2 437510
cfi=(185) /home/mithuncy/fsm_p11patch/src/backend/utils/adt/int.c
cfn=(5306) int4in
calls=87500 265 
* 27885500
cfi=(41)
cfn=(4952) textin
calls=2 512 
* 404
* 87502
+3 175004
+8 262506
+5 87502
+1 175004

fn=(5146) OidOutputFunctionCall
1834 2500
+3 2500
cfn=(3344)
calls=500 125 
* 41000
+1 2500
cfn=(5130) OutputFunctionCall
calls=500 -84 
* 137000
+1 1000

fn=(5018)
2015 2505
+4 1002
+3 2004
+1 2004
+14 2505
cfi=(290)
cfn=(5020)
calls=501 90 
* 5010
* 1002
+3 2505
cfi=(45)
cfn=(5022)
calls=501 411 
* 13527
* 1002
cfi=(247)
cfn=(4434)
calls=501 43 
* 12024
* 501
+6 2004
+4 501
+1 1002

fn=(3344)
125 17410
+1 20892
cfn=(3106) fmgr_info_cxt_security
calls=3482 +20 
* 4049030
+1 6964

fn=(3452)
612 26886
+1 26886
cob=(3)
cfi=(3)
cfn=(856)
calls=4481 0 
* 98582
* 4481
+1 13443
+1 8962
+1 8962

fn=(4948)
1825 14
+3 10
cfn=(3344)
calls=2 125 
* 164
+1 12
cfn=(4950)
calls=2 1710 
* 488
+1 4

fn=(3104)
135 906
+1 906
cfn=(3107) fmgr_info_cxt_security'2
calls=1 +10 
* 69
cfn=(3106)
calls=150 +10 
* 10350
+1 302

fn=(3240)
1134 394352
+4 450688
+2 112672
+1 112672
+1 56336
+1 56336
+2 281680
cfi=(158)
cfn=(3966)
calls=11242 205 
* 1142561
cfi=(194)
cfn=(3526)
calls=1826 83 
* 29216
cfi=(194)
cfn=(3486)
calls=22067 268 
* 382214
cfi=(185)
cfn=(3376) int2gt
calls=948 464 
* 15168
cfi=(183)
cfn=(3338)
calls=18727 355 
* 283667
cfi=(158)
cfn=(3242)
calls=1526 136 
* 127469
* 56336
+3 169008
+3 56336
+1 112672

fn=(3108) fmgr_isbuiltin
74 10899
+4 7266
+1 2
+6 10896
+1 7264
+3 25424
+1 7266

fn=(3396)
1386 395
+5 395
cfn=(3344)
calls=79 125 
* 6478
+2 632
+2 395
cfi=(188)
cfn=(3398) bthandler
calls=79 107 
* 28203
* 79
+3 237
+3 79
+1 158

fn=(3986) pg_detoast_datum_packed
1950 10012
+1 25030
+3 2503
+1 5006

fn=(5126) get_fn_expr_argtype
1996 2500
+5 3000
+3 3000
cfn=(5018)
calls=500 +11 
* 49000
+1 1000

fn=(4128)
471 7
+5 5
cfi=(81)
cfn=(3170)
calls=1 47 
* 514
* 1
+3 5
cfi=(228)
cfn=(4130)
calls=1 172 
* 1123
* 1
+2 2
+11 2
cob=(12)
cfi=(230)
cfn=(4132) pg_finfo_plpgsql_inline_handler
calls=1 297 
* 5
* 1
+3 2
+2 4
+4 1
+9 3
cfi=(13)
cfn=(952)
calls=1 1032 
* 85
+1 1
+1 5

fn=(5132) FunctionCall1Coll
1114 6000
+4 8000
+2 2000
+1 1000
+2 5000
cfi=(41)
cfn=(5134) textout
calls=1000 523 
* 227000
* 1000
+3 3000
+3 1000
+1 2000

fn=(3106)
146 32688
+13 7264
+1 7264
+1 10896
+1 7264
+2 10896
cfn=(3108)
calls=3632 -90 
* 68998
* 10896
+5 14524
+1 14524
+1 14524
+1 7262
+1 14524
+1 10893
+1 3631
+4 4
cfi=(151)
cfn=(3306)
calls=1 1114 
* 26410
* 1
+1 2
+2 8
+2 4
+1 4
+1 4
+16 4
+1 2
-1 2
+2 5
cfi=(178)
cfn=(3976)
calls=1 362 
* 42
* 1
-1 2
+2 1
-3 2
+12 4
+32 6
cfn=(3978)
calls=1 360 
* 3782184
+1 2
+1 1
+13 3
+1 3
cfi=(151)
cfn=(3280)
calls=1 1161 
* 103
+1 14528

fn=(3107)
146 9
+13 2
+1 2
+1 3
+1 2
+2 3
cfn=(3108)
calls=1 -90 
* 19
* 3
+5 4
+1 4
+1 4
+1 2
+1 4
+1 3
+1 1
+88 4

fn=(3980)
531 4
+1 9
+3 3
+1 2
+12 2

fn=(4134)
556 6
+1 9
+5 3
+4 118
+1 1
+1 1
+1 6
cfi=(31)
cfn=(794)
calls=1 317 
* 2772
* 1
+7 1
-1 6
cfi=(31)
cfn=(836)
calls=1 910 
* 1014
* 1
+6 5
+1 6
+1 3
+1 3
+1 2

fn=(4958)
1918 2008
+1 3012
+1 1500
cfi=(297)
cfn=(5188)
calls=500 173 
* 88000
* 500
+2 2
+1 1004

fn=(4974)
794 12
+4 14
+2 4
+1 2
+2 8
cfi=(34)
cfn=(4976) hashoidvector
calls=2 208 
* 171
* 2
+3 6
+3 2
+1 4

fn=(5120) get_fn_expr_variadic
2130 1500
+7 3000
+3 1500
+2 2000
+1 1500
+3 1000

fn=(5130)
1754 5000
+1 5000
cfn=(5132)
calls=1000 1114 
* 256000
+1 2000

fl=(202)
fn=(3624)
389 12
+1 2
cfi=(26)
cfn=(3532)
calls=2 759 
* 16
* 2
+5 2
+1 10
+6 4
+2 4
+1 4
+14 4

fn=(3666)
306 10
+1 2
cfi=(26)
cfn=(3532)
calls=2 759 
* 16
* 2
+4 2
+1 2
+1 2
+1 2
+2 2
+1 10
+42 4
+9 4

fl=(13)
fn=(430)
93 2
+6 6
cfi=(14)
cfn=(432)
calls=1 395 
* 412
* 1
+8 2
+15 7
cfi=(14)
cfn=(432)
calls=1 395 
* 457
* 1
+5 4
cfn=(436) MemoryContextAllowInCriticalSection
calls=1 412 
* 10
+1 2

fn=(2156)
815 7077
+6 2022
+3 2022
+2 8088
cfi=(14)
cfn=(800)
calls=1011 715 
* 88120
* 1011
+1 5055
+12 78863
cob=(3)
cfi=(3)
cfn=(828)
calls=317 0 
* 19634
* 317
+2 1011
+1 5055

fn=(812)
330 400
+2 300
+1 200

fn=(1404)
156 12152
+4 15190
+2 9114
cfn=(1398) MemoryContextCallResetCallbacks
calls=3038 303 
* 36456
+12 18228
cfi=(14)
cfn=(1406)
calls=3038 566 
* 826630
+1 6076
+4 6076

fn=(1514)
1045 14
+1 6
cfi=(44)
cfn=(954)
calls=2 113 
* 18
* 2
+3 4
+8 16
cfi=(14)
cfn=(1516)
calls=2 +12 
* 2250
* 2
+1 10
+12 2
+1 10

fn=(2546)
956 569550
+3 189850
+5 189850
+3 189850
+2 759400
cfi=(14)
cfn=(800)
calls=94925 715 
* 8789080
* 94925
+1 474625
+12 2354247
cob=(3)
cfi=(3)
cfn=(828)
calls=89518 0 
* 1888864
* 89518
+2 94925
+1 474625

fn=(3708) MemoryContextDeleteChildren
257 24
+7 6
+1 28
cfn=(1397) MemoryContextDelete'2
calls=7 -53 
* 2701
-1 52
+2 12

fn=(940)
925 322014
+3 107338
+5 107338
+3 107338
+2 429352
cfi=(14)
cfn=(800)
calls=53669 715 
* 5798308
* 53669
+1 268345
+12 53669
+1 268345

fn=(434)
729 11466
+5 4914
+1 3276
+1 4914
+1 4914
+1 3276
+1 3276
+1 4914
+1 3276
+1 3276
+3 3276
+2 6548
+1 6548
+1 2464
+1 1848
+2 3080
-2 3063
+2 5105
+4 2
+1 2
+4 3276

fn=(3400)
853 51100
+6 14600
+3 14600
+2 58400
cfi=(14)
cfn=(800)
calls=7300 715 
* 602040
* 7300
+1 36500
+12 891713
+2 7300
+1 36500

fn=(436)
412 5
+3 3
+1 2

fn=(928)
1162 9200
+1 11500
cfn=(930)
calls=2300 -14 
* 381033
+1 4600

fn=(930)
1149 14415
+2 8649
cob=(3)
cfi=(3)
cfn=(424)
calls=2883 0 
* 57900
* 2883
* 5766
+2 14415
cfn=(798)
calls=2883 772 
* 311202
* 2883
+2 17298
cob=(3)
cfi=(3)
cfn=(856)
calls=2883 0 
* 51178
* 2883
+2 2883
+1 5766

fn=(1396)
212 6128
+8 6128
+1 15
cfn=(3708)
calls=5 +36 
* 2812
+8 4596
cfn=(1398)
calls=1532 +74 
* 18384
+7 6128
cfn=(1400)
calls=1532 355 
* 59324
+7 3064
+2 9192
cfi=(14)
cfn=(1402)
calls=1532 628 
* 655327
+3 3064

fn=(1397)
212 28
+8 28
+9 21
cfn=(1398)
calls=7 +74 
* 84
+7 28
cfn=(1400)
calls=7 355 
* 269
+7 14
+2 42
cfi=(14)
cfn=(1402)
calls=7 628 
* 2173
+3 14

fn=(1400)
355 6204
+5 6204
+4 6204
+2 4653
+2 6204
+1 138
+4 6112
+3 6204
+1 2640
+4 3102
+3 36
+1 24
+1 48
+1 48
+1 48
+1 48
+4 3078
+1 3078
+1 3078
+2 3102

fn=(952)
1032 171228
+1 128421
cfi=(44)
cfn=(954)
calls=42807 113 
* 385263
* 42807
+2 342456
cfi=(14)
cfn=(956)
calls=42807 -47 
* 2905122
+2 85614

fn=(798)
772 122612
+6 35032
+3 35032
+2 140128
cfi=(14)
cfn=(800)
calls=17516 -68 
* 1192752
* 17516
+1 87580
+19 17516
+1 87580

fn=(1398)
303 18308
+8 27462
+5 9154

fn=(3734)
137 8032
+4 8032
+4 10040
+1 4518
cfn=(1404)
calls=1506 +10 
* 343195
+1 4016

fl=(55)
fn=(4890)
1568 8
+1 1
+1 1
+1 1
+8 6
cfn=(4860)
calls=1 2792 
* 55
+2 3
+10 1
+1 1
cfn=(4490) recomputeNamespacePath
calls=1 3691 
* 22
+4 7
cfi=(151)
cfn=(4872)
calls=1 1427 
* 65125
* 1
+14 4
+1 9
cfi=(13)
cfn=(940)
calls=1 925 
* 123
* 1
+2 2
+2 77
+1 88
+1 11
+4 66
+3 22
+15 33
cfi=(253) /home/mithuncy/fsm_p11patch/src/backend/catalog/../../../src/include/nodes/pg_list.h
cfn=(4492) list_head
calls=11 78 
* 110
* 22
+2 66
+1 33
-1 22
+2 11
-4 22
+7 22
+14 22
+4 40
+2 60
+1 8
-1 4
+4 20
+13 20
+17 55
+1 33
+2 33
+1 44
+1 22
+1 22
+1 22
+1 22
+1 44
+1 44
+1 33
+1 22
-99 59
1715 3
cfi=(149)
cfn=(4882)
calls=1 +79 
* 90
+2 1
+1 2

fn=(5048)
2874 6
+5 4
cob=(3)
cfi=(3)
cfn=(446)
calls=1 0 
* 47
* 1
* 2
+12 5
cfn=(4494) get_namespace_oid
calls=1 3026 
* 18364
* 1
+1 2
+3 1
cfi=(54)
cfn=(3326)
calls=1 381 
* 5
* 6
cfi=(227)
cfn=(4502)
calls=1 4694 
* 51
* 1
+1 2
+4 3
+2 1
+1 2

fn=(1122)
4190 4
+6 1
+1 2

fn=(5174)
230 4500
+3 500
+1 500
+1 2500
+8 2000
+33 1000
+10 2000
+25 2000
+14 2000
cfn=(5176) RelnameGetRelid
calls=500 674 
* 27310487
* 500
+13 1000
+10 1000
+12 1000
+15 1000
+2 2000
+1 2500
cfi=(160)
cfn=(3026)
calls=500 106 
* 1163548
* 500
+22 1500
+1 500
+11 1000
+15 500
+1 2000

fn=(4870)
1465 12
+7 12
cfn=(4860)
calls=2 2792 
* 110
+2 6
+29 18
cfi=(151)
cfn=(4872)
calls=2 -76 
* 56346
* 2
+5 8
+3 3
cfi=(149)
cfn=(4882)
calls=1 1794 
* 90
+1 2
+8 1
cfn=(4490)
calls=1 3691 
* 22
+2 3
cfi=(253)
cfn=(4492)
calls=1 78 
* 10
* 2
+2 3
+3 3
+3 2
+2 7
+1 8
+2 4
+2 3
+2 3
cfi=(149)
cfn=(4882)
calls=1 1794 
* 90
+1 2
-10 4
-8 2
+25 4

fn=(4860)
2792 49
+2 7
+1 7
+2 21
cfi=(253)
cfn=(4862) list_length
calls=7 90 
* 70
* 38
+3 18
cfi=(253)
cfn=(4492)
calls=6 78 
* 60
* 18
+1 6
+2 3
cfi=(253)
cfn=(4492)
calls=1 78 
* 10
* 3
+1 3
cfi=(253)
cfn=(4492)
calls=1 78 
* 10
* 4
+1 1
+23 21
+1 21
+1 28

fn=(4864)
4304 10
+1 2
+3 2
cfn=(4490)
calls=2 3691 
* 44
+2 6
cfi=(253)
cfn=(4492)
calls=2 78 
* 20
* 4
+2 12
+2 12
+3 12
+1 28
+1 4
-9 24
+12 2
+1 4

fn=(5176)
674 2000
+4 500
cfn=(4490)
calls=500 3691 
* 11000
+2 1500
cfi=(253)
cfn=(4492)
calls=500 78 
* 5000
* 1000
+2 3000
+2 5000
cfi=(272)
cfn=(5178) get_relname_relid
calls=1000 1655 
* 27272987
* 1000
+1 2000
+1 1000
-6 3500
+11 1000

fn=(4570)
3395 2020
+4 505
cfn=(4490)
calls=505 3691 
* 11110
+3 1515
cfi=(253)
cfn=(4492)
calls=505 78 
* 5050
* 505
+3 2020
+8 2020
+2 3030
+1 2020
+5 4040
+3 2020
cfi=(253)
cfn=(4492)
calls=505 78 
* 5050
* 1010
+2 4040
+1 1515
-3 4040
+7 1010
+2 505
+1 1010

fn=(4490)
3691 3039
+1 1013
cfi=(54)
cfn=(3326)
calls=1013 381 
* 5065
* 1013
+11 3039
+4 6075
+1 1012
+3 3
cfi=(13)
cfn=(928)
calls=1 1162 
* 189
* 1
+3 5
cfi=(41)
cfn=(932)
calls=1 3507 
* 1707
* 3
+13 1
+1 1
+1 3
cfi=(253)
cfn=(4492)
calls=1 78 
* 10
* 2
+2 6
+3 8
cob=(3)
cfi=(3)
cfn=(446)
calls=2 0 
* 93
* 2
* 4
+5 4
cfi=(151)
cfn=(3306)
calls=1 1114 
* 342
* 1
+1 2
+4 9
+1 4
cfn=(4494)
calls=1 3026 
* 19306
* 1
+1 3
cfi=(151)
cfn=(3280)
calls=1 1161 
* 103
+1 2
+5 1
+3 4
cob=(3)
cfi=(3)
cfn=(446)
calls=1 0 
* 47
* 1
* 2
+19 4
cfn=(4494)
calls=1 3026 
* 18693
* 1
+1 2
+1 5
cfi=(45)
cfn=(3414)
calls=1 506 
* 23
* 1
-1 2
+2 6
cfi=(227)
cfn=(4502)
calls=1 4694 
* 51
-1 2
+3 1
-1 5
+2 5
cfi=(45)
cfn=(4506)
calls=1 165 
* 290
* 1
-51 12
+60 2
+3 3
cfi=(253)
cfn=(4492)
calls=1 78 
* 10
* 2
+7 4
cfi=(45)
cfn=(3414)
calls=1 506 
* 34
* 3
+1 4
cfi=(45)
cfn=(4508)
calls=1 296 
* 161
* 1
+2 3
+8 3
cfi=(255) /home/mithuncy/fsm_p11patch/src/backend/catalog/../../../src/include/utils/palloc.h
cfn=(4510) MemoryContextSwitchTo
calls=1 110 
* 10
* 1
+1 3
cfi=(45)
cfn=(4512)
calls=1 1164 
* 420
* 1
+1 3
cfi=(255)
cfn=(4510)
calls=1 110 
* 10
+3 3
cfi=(45)
cfn=(972)
calls=1 1137 
* 35
+1 2
+1 2
+1 2
+3 1
+1 2
+3 2
+1 2
+1 2
+3 3
cfi=(13)
cfn=(952)
calls=1 1032 
* 85
+1 3
cfi=(45)
cfn=(972)
calls=1 1137 
* 319
+1 3
cfi=(45)
cfn=(972)
calls=1 1137 
* 319
+1 2026

fn=(3680)
3962 14
+9 6
+27 6
+18 4

fn=(3588)
4206 3
+1 3
+25 4
cfi=(155)
cfn=(2910)
calls=1 1410 
* 86
+4 1
+2 2

fn=(4488)
3343 12
+5 3
cfn=(4490)
calls=3 3691 
* 42499
+2 9
cfi=(255)
cfn=(4510)
calls=3 110 
* 30
* 3
+2 6
cfi=(13)
cfn=(2546)
calls=3 956 
* 446
* 3
+1 9
cfi=(45)
cfn=(4512)
calls=3 1164 
* 1645
* 3
+1 3
+2 9
cfi=(253)
cfn=(4492)
calls=3 78 
* 30
* 12
+5 6
+2 9
cfi=(45)
cfn=(4514)
calls=3 667 
* 429
* 3
-9 30
cfi=(253)
cfn=(4492)
calls=6 78 
* 60
* 24
+11 9
+2 9
cfi=(255)
cfn=(4510)
calls=3 110 
* 30
+2 3
+1 6

fn=(4970)
925 12
+1 1
+1 1
+11 6
cfn=(4860)
calls=1 2792 
* 55
+2 3
+10 1
+1 1
cfn=(4490)
calls=1 3691 
* 22
+4 7
cfi=(151)
cfn=(4872)
calls=1 1427 
* 33888
* 1
+2 2
+2 14
+1 16
+1 8
+2 2
+4 2
+3 4
+14 6
cfi=(253)
cfn=(4492)
calls=2 78 
* 20
* 4
+2 12
+1 6
-1 4
+2 2
-4 4
+7 4
+4 4
+50 10
+2 6
+1 6
+1 14
+11 6
+9 2
+3 18
+1 1
+9 4
+2 4
-1 2
cfi=(13)
cfn=(940)
calls=1 925 
* 92
* 1
+3 3
+1 4
+1 3
+1 3
+1 3
+12 10
cob=(3)
cfi=(3)
cfn=(856)
calls=1 0 
* 12
* 1
+3 2
+4 7
+2 4
+1 6
-1 8
+5 5
+10 2
1258 3
+1 2
957 14
1262 3
cfi=(149)
cfn=(4882)
calls=1 1794 
* 90
+2 1
+1 2

fn=(5222) isTempToastNamespace
3152 4500
+1 4500
+2 1500
+1 3000

fn=(1112)
4156 6
+5 4
cfi=(13)
cfn=(928)
calls=1 1162 
* 158
* 1
+3 5
cfi=(41)
cfn=(932)
calls=1 3507 
* 2597
* 3
+17 3
cfi=(13)
cfn=(952)
calls=1 1032 
* 85
+1 3
cfi=(45)
cfn=(972)
calls=1 1137 
* 319
+2 1
+1 2

fn=(4494)
3026 21
+3 24
cfi=(151)
cfn=(3012)
calls=3 1227 
* 56290
* 3
+2 10
+5 3
+1 12

fl=(233)
fn=(4144)
110 6012
+1 4008
+2 4008
+1 2004
+1 4008
-5 3042
+1 2028
+2 2028
+1 1014
+1 2028

fl=(43)
fn=(3820) pg_verify_mbstr_len
1895 700008
+9 262503
cfn=(3574)
calls=87501 -83 
* 1137513
* 175002
+12 787509
+2 87501
+2 87501
+5 834740
+2 834740
+2 208685
+1 208685
+1 208685
+1 208685
-12 592372
+32 87501
+1 175002

fn=(3818)
1878 700008
+1 525006
cfn=(3820)
calls=87501 +16 
* 6596632
* 175002
+1 175002

fn=(3576)
542 24
+3 32
+1 16
+15 8
+1 16

fn=(942)
1834 2036
+1 1018
cfi=(19)
cfn=(612)
calls=1018 1005 
* 6108
* 7126
+1 2036

fn=(3574)
1821 262509
+3 700024
+1 175006

fl=(41)
fn=(5116) text_catenate
698 2500
+7 7500
+1 7500
+3 1000
+2 1000
+3 2500
+1 2000
cfi=(13)
cfn=(940)
calls=500 925 
* 61500
* 500
+3 2000
+3 1500
+1 1000
+1 7000
cob=(3)
cfi=(3)
cfn=(856)
calls=500 0 
* 7000
* 500
+1 1000
+1 8500
cob=(3)
cfi=(3)
cfn=(856)
calls=500 0 
* 6802
* 500
+2 500
+1 1000

fn=(5134)
523 4000
+1 3000
+2 3000
cfn=(3984)
calls=1000 186 
* 215000
+1 2000

fn=(5138) text_format_append_string
5757 4000
+1 500
+4 1000
+2 2500
cfi=(80)
cfn=(1918)
calls=500 164 
* 62000
+1 500
+32 2000

fn=(1960)
3634 7
+1 2
+1 1
+2 2
+2 6
cfi=(42)
cfn=(934)
calls=1 222 
* 17
* 2
+3 4
+9 4
+21 4
+1 1
+3 20
cfi=(42)
cfn=(934)
calls=4 222 
* 68
* 12
+1 12
+1 4
-5 36
+7 3
+4 6
cfi=(42)
cfn=(934)
calls=1 222 
* 17
* 2
+3 4
+7 4
+1 2
+5 2
+3 3
cob=(3)
cfi=(3)
cfn=(424)
calls=1 0 
* 15
* 1
* 2
+6 3
cfi=(13)
cfn=(928)
calls=1 1162 
* 145
* 1
+1 3
cfi=(11)
cfn=(484)
calls=1 255 
* 294
+1 6
cfi=(45)
cfn=(960)
calls=1 129 
* 228
* 2
+3 4
+2 1
+1 2

fn=(5114) textcat
683 2000
+1 2000
cfi=(171)
cfn=(3986)
calls=500 1950 
* 8500
* 500
+1 2000
cfi=(171)
cfn=(3986)
calls=500 1950 
* 8500
* 500
+2 2500
cfn=(5116)
calls=500 +11 
* 123302
+1 1000

fn=(932)
3507 63
+1 18
+1 9
+2 18
+2 54
cfi=(42)
cfn=(934)
calls=9 222 
* 153
* 18
+3 36
+1 4
+8 48
+3 6
+3 10
cob=(3)
cfi=(3)
cfn=(1120)
calls=1 0 
* 27
cob=(1)
cfi=(1)
cfn=(223)
calls=1 0 
* 1301
* 6
* 2
+1 4
+2 10
+1 2
+6 6
+32 2
-24 20
+1 10
+2 45
-2 412
+1 225
cfi=(42)
cfn=(934)
calls=45 222 
* 765
* 45
-1 90
+3 20
+1 30
+12 50
+1 60
cfi=(42)
cfn=(936)
calls=10 132 
* 2707
* 10
+2 70
cob=(3)
cfi=(3)
cfn=(950)
calls=9 0 
* 280
cob=(1)
cfi=(1)
cfn=(223)
calls=1 0 
* 1321
* 14
+1 30
cfi=(13)
cfn=(952)
calls=10 1032 
* 733
+3 70
cfi=(42)
cfn=(934)
calls=12 222 
* 204
* 24
+3 48
+2 5
+1 5
+1 5
-1 25
cfi=(42)
cfn=(934)
calls=5 222 
* 85
* 25
cfi=(42)
cfn=(934)
calls=5 222 
* 50
* 25
+4 28
+1 14
+5 24
+3 36
cob=(3)
cfi=(3)
cfn=(424)
calls=12 0 
* 188
* 12
* 72
cfi=(42)
cfn=(958)
calls=12 188 
* 168
+5 72
cfi=(45)
cfn=(960)
calls=12 129 
* 2910
* 24
+3 48
+2 7
+1 18

fn=(4956) cstring_to_text_with_len
165 5010
+1 5010
cfi=(13)
cfn=(940)
calls=1002 925 
* 116715
* 1002
+2 5010
+1 8016
cob=(3)
cfi=(3)
cfn=(856)
calls=1002 0 
* 19840
* 1002
+2 1002
+1 2004

fn=(5118) text_format
5304 3000
+10 500
+1 500
+1 500
+1 500
+1 500
+5 2000
+4 2000
cfi=(171)
cfn=(5120)
calls=500 2130 
* 10500
* 1000
+44 2000
+1 500
+4 2000
cfi=(171)
cfn=(3986)
calls=500 1950 
* 8500
* 500
+1 4500
+1 9000
+1 1500
cfi=(80)
cfn=(1888)
calls=500 47 
* 77473
+1 500
+3 1500
+14 134000
+2 660000
+1 33000
+3 2000
+3 2000
+7 5000
cfn=(5122) text_format_parse_format
calls=500 5632 
* 60000
* 500
+12 3000
cob=(3)
cfi=(3)
cfn=(1120)
calls=500 0 
* 13500
* 500
* 1000
+8 1500
+60 1500
+2 1500
+6 2000
+2 3000
+1 2500
+1 3000
cfi=(171)
cfn=(5126)
calls=500 1996 
* 58500
* 1000
+8 1000
+3 500
+7 1500
+5 3000
cfi=(272)
cfn=(5078)
calls=500 2642 
* 250500
+1 2500
cfi=(171)
cfn=(3344)
calls=500 125 
* 41000
+1 1000
+6 4500
+5 6000
cfn=(5128) text_format_string_conversion
calls=500 5710 
* 798152
+3 1000
5383 135500
5557 1500
+2 1500
+4 2500
cfn=(4956)
calls=500 165 
* 88500
* 500
+1 1500
cfi=(13)
cfn=(952)
calls=500 1032 
* 42500
+2 500
+1 2500

fn=(5122)
5632 5500
+1 1000
+4 1000
+1 1000
+1 1000
+1 1000
+3 3000
cfn=(5124) text_format_parse_digits
calls=500 -62 
* 17000
* 1000
+19 2500
+6 2000
+26 3000
cfn=(5124)
calls=500 5581 
* 17000
* 1000
+5 500
+1 2500

fn=(5128)
5710 6000
+4 1000
+14 2500
cfi=(171)
cfn=(5130)
calls=500 1754 
* 131000
* 500
+3 1000
+3 1500
cfi=(295)
cfn=(5136)
calls=500 10555 
* 532652
* 3000
cfn=(5138)
calls=500 +23 
* 72500
* 500
+14 1500
cfi=(13)
cfn=(952)
calls=500 1032 
* 42500
+1 2000

fn=(4952)
512 2008
+1 1506
+2 1506
cfn=(4954) cstring_to_text
calls=502 153 
* 91182
+1 1004

fn=(3984)
186 4012
+2 3009
cfi=(171)
cfn=(3986)
calls=1003 1950 
* 17051
* 1003
+1 15051
+3 5000
cfi=(13)
cfn=(940)
calls=1000 925 
* 123000
-3 3
+3 15
cfi=(13)
cfn=(940)
calls=3 925 
* 338
* 1003
+1 14033
cob=(3)
cfi=(3)
cfn=(856)
calls=1000 0 
* 20000
* 1000
* 12
cob=(3)
cfi=(3)
cfn=(856)
calls=3 0 
* 48
* 3
+1 5015
+2 3009
+3 1003
+1 2006

fn=(4954)
153 2008
+1 1506
cob=(3)
cfi=(3)
cfn=(424)
calls=502 0 
* 7541
* 502
* 2510
cfn=(4956)
calls=502 +11 
* 76111
+1 1004

fn=(5124)
5581 8000
+1 1000
+1 3000
+1 1000
+2 9000
+13 3000
+1 3000
+2 1000
+1 5000

fl=(273)
fn=(4666)
2987 15
+3 9
+6 12
+1 6
3717 6

fl=(296)
fn=(5166)
796 5000
+2 1500
+1 2500
+3 500
+6 2000
+2 2000
+11 1500
cfi=(54)
cfn=(3326)
calls=500 381 
* 2500
* 1500
cfi=(168)
cfn=(5168)
calls=500 4932 
* 15500
* 1500
+7 2000
+9 2000
+2 2500
+9 3000
cfi=(169)
cfn=(5170)
calls=500 1336 
* 65247981
* 500
+2 1500
+2 4000
cfi=(282)
cfn=(5200)
calls=500 1290 
* 815500
* 500
+2 3000
+2 1500
+1 3500
cfn=(5206) CopyGetAttnums
calls=500 4827 
* 168000
* 500
+1 1500
cfi=(46)
cfn=(966)
calls=500 78 
* 5000
* 1000
+2 2000
+3 1000
+1 3000
cfi=(276)
cfn=(4844) bms_add_member
calls=500 -99 
* 108500
* 1500
-6 3500
+10 2500
cfi=(300)
cfn=(5210)
calls=500 571 
* 12787784
+16 3000
cfi=(301)
cfn=(5224)
calls=500 53 
* 250500
* 1000
+93 500
+16 1000
+5 1500
+2 1000
cfi=(221)
cfn=(5226)
calls=500 258 
* 10000
+2 8000
cfn=(5228) BeginCopyFrom
calls=500 3152 
* 2548802
* 500
+2 1500
cfn=(5250) CopyFrom
calls=500 2285 
* 265291287
* 1000
+1 1500
cfn=(5514) EndCopyFrom
calls=500 3635 
* 605092
* 500
+16 1000
+1 4000
cfi=(169)
cfn=(3080)
calls=500 1283 
* 56500
+1 2500

fn=(5302) CopyGetData
567 8000
+1 1000
+2 6000
+3 8000
cob=(3)
cfi=(3)
cfn=(1336) fread
calls=1000 0 
* 226500
* 1000
* 1000
+1 4000
cob=(3)
cfi=(3)
cfn=(1366)
calls=1000 0 
* 36000
* 1000
* 2000
+4 2000
+1 1000
+1 1000
+88 1000
+1 4000

fn=(5304) CopyReadAttributesCSV
4355 437500
+1 350000
+1 350000
+1 350000
+10 350000
+9 350000
cfi=(80)
cfn=(1890)
calls=87500 63 
* 1050000
+9 525000
+2 262500
+3 262500
+1 612500
+3 87500
+3 87500
+1 87500
+6 350000
+8 175000
+1 700000
+16 175000
+1 262500
-1 417000
+1 625500
+1 87500
+1 1042500
+2 625500
+6 625500
+6 1042500
+1 208500
+48 350000
+3 437500
+1 700000
+4 87500
+2 350000
+1 87500
+4 87500
+2 700000
+2 175000
+1 350000

fn=(5328) CopyFromInsertBatch
3064 4500
+4 1500
+6 1000
+1 1500
+6 5000
cfi=(302)
cfn=(5232)
calls=500 110 
* 5000
* 500
+1 5000
cfi=(169)
cfn=(5330)
calls=500 2699 
* 82065823
+6 1500
cfi=(302)
cfn=(5232)
calls=500 110 
* 5000
+6 2000
+22 2000
+14 1500
+1 1500
+1 1000

fn=(5206)
4827 7000
+1 1000
+2 2000
+3 3000
+3 2000
+2 11000
+2 6000
cfi=(45)
cfn=(5208)
calls=1000 147 
* 290000
* 1000
-4 8000
+55 1000
+1 4000

fn=(5516) EndCopy
1736 2500
+1 2000
+6 4000
cfi=(25)
cfn=(1374)
calls=500 2385 
* 255117
* 1000
+7 2000
cfi=(13)
cfn=(1396)
calls=500 212 
* 287975
+1 1500
cfi=(13)
cfn=(952)
calls=500 1032 
* 42500
+1 2000

fn=(5234) ProcessCopyOptions
1047 5000
+1 500
+4 1000
+3 1500
+2 1000
+3 1500
cfi=(46)
cfn=(966)
calls=500 78 
* 5000
* 1000
+2 1500
+2 2500
cob=(3)
cfi=(3)
cfn=(446)
calls=500 0 
* 26000
* 500
* 1000
+2 1500
cfi=(303)
cfn=(5236)
calls=500 50 
* 11000
* 500
+2 1000
+5 500
+1 2000
cob=(3)
cfi=(3)
cfn=(446)
calls=500 0 
* 11000
* 500
* 1000
+2 2000
cob=(3)
cfi=(3)
cfn=(446)
calls=500 0 
* 11000
* 500
* 1000
+1 1500
+4 500
-21 3500
1238 2000
+5 2000
+6 2000
+1 4000
+2 2000
+1 4000
+1 2000
cob=(3)
cfi=(3)
cfn=(424)
calls=500 0 
* 7500
* 500
* 1500
+2 2000
+2 2000
+1 1000
+1 2000
+1 2000
+4 2000
cob=(3)
cfi=(3)
cfn=(424)
calls=500 0 
* 7500
* 500
* 1000
+6 2500
cob=(3)
cfi=(3)
cfn=(1120)
calls=500 0 
* 11500
* 500
* 1000
+1 2500
cob=(3)
cfi=(3)
cfn=(1120)
calls=500 0 
* 11500
* 500
-1 1000
+6 2500
cob=(3)
cfi=(3)
cfn=(1120)
calls=500 0 
* 11500
* 500
* 1000
+1 2500
cob=(3)
cfi=(3)
cfn=(1120)
calls=500 0 
* 11500
* 500
-1 1000
+16 2500
+8 2500
+6 2500
+5 4000
cob=(3)
cfi=(3)
cfn=(424)
calls=500 0 
* 7500
* 500
* 1000
+5 6000
+6 2500
+5 4000
cob=(3)
cfi=(3)
cfn=(424)
calls=500 0 
* 7500
* 500
* 1000
+6 2500
+4 4000
+6 2500
+4 2000
+6 2500
+5 2000
+6 4500
cob=(3)
cfi=(3)
cfn=(1120)
calls=500 0 
* 11500
* 500
* 1000
+6 2000
+1 4500
cob=(3)
cfi=(3)
cfn=(1120)
calls=500 0 
* 11500
* 500
-1 1000
+5 2500

fn=(5296) CopyReadLine
3651 352000
+3 352000
cfi=(80)
cfn=(1890)
calls=88000 63 
* 1056000
+1 176000
+3 176000
+3 264000
cfn=(5298) CopyReadLineText
calls=88000 +79 
* 28620000
* 88000
+2 176000
+7 2000
+14 350000
+5 437500
+1 612500
+1 87500
+22 352000
+4 792000
cfi=(19)
cfn=(3816)
calls=88000 562 
* 10539000
* 88000
+3 352000
+10 176000
+2 88000
+1 176000

fn=(5514)
3635 2000
+3 1500
cfn=(5516)
calls=500 1736 
* 600592
+1 1000

fn=(5250)
2285 3000
+7 500
+1 500
cfi=(240)
cfn=(4322)
calls=500 86 
* 335353
* 500
+4 1000
+2 500
+1 500
+2 1000
cfi=(26)
cfn=(3000)
calls=500 663 
* 5000
* 500
+1 500
+3 500
+1 500
+3 500
+4 500
+1 500
+1 500
+1 500
+1 500
+1 1000
+9 3000
+29 2000
+51 3000
+1 1500
-1 1000
+2 1500
-1 1000
+19 2000
+46 2000
cfi=(13)
cfn=(3400)
calls=500 853 
* 134500
* 2500
+1 4000
cfi=(300)
cfn=(5252)
calls=500 1286 
* 148000
+5 1000
+3 2000
cfi=(300)
cfn=(5258)
calls=500 1081 
* 25500
+2 2000
cfi=(306)
cfn=(5262)
calls=500 150 
* 10000
+2 1500
+1 1000
+1 1500
+2 3000
cfi=(240)
cfn=(5264)
calls=500 720 
* 163500
+3 3000
cfi=(257)
cfn=(5266) ExecInitExtraTupleSlot
calls=500 1683 
* 336803
* 500
+3 2500
cfi=(257)
cfn=(5266)
calls=500 1683 
* 212500
* 1000
+7 2000
cfi=(13)
cfn=(3400)
calls=500 853 
* 211500
* 2500
+1 1000
+1 1500
+1 1000
+1 2000
+2 2000
+6 500
cfi=(165)
cfn=(5280) AfterTriggerBeginQuery
calls=500 4810 
* 3500
+12 1000
-1 4000
cfi=(165)
cfn=(5282) MakeTransitionCaptureState
calls=500 4688 
* 6000
-1 3000
+9 3000
+9 2000
+12 1000
+12 2000
+1 1000
-1 1000
+42 1000
+6 500
+2 1000
cfi=(13)
cfn=(940)
calls=500 925 
* 334717
* 500
+3 3500
+3 3500
+9 2500
cfi=(165)
cfn=(5284) ExecBSInsertTriggers
calls=500 2450 
* 8000
+2 3000
cfi=(13)
cfn=(940)
calls=500 925 
* 55000
* 500
+1 2500
cfi=(13)
cfn=(940)
calls=500 925 
* 55000
* 500
+2 500
cfi=(169)
cfn=(5286)
calls=500 2377 
* 731601
* 500
+1 3500
cfi=(240)
cfn=(5290)
calls=500 415 
* 377817
* 500
+3 500
+1 1000
+1 1000
+1 1000
+7 264000
+2 176000
+7 4500
cfi=(13)
cfn=(3734)
calls=500 137 
* 7500
+4 880000
cfi=(302)
cfn=(5232)
calls=88000 110 
* 880000
+2 528000
cfn=(5292) NextCopyFrom
calls=88000 3448 
* 118822000
* 264000
+1 500
2985 1500
2671 525000
cfi=(178)
cfn=(5314)
calls=87500 1025 
* 42833705
* 87500
+6 437500
+3 262500
cfi=(302)
cfn=(5232)
calls=87500 110 
* 875000
+3 175000
+1 525000
cfi=(257)
cfn=(5322) ExecStoreHeapTuple
calls=87500 1275 
* 6825000
+3 175000
2859 87500
+3 175000
+10 350000
+2 175000
+11 350000
+1 350000
-1 175000
+10 350000
+9 175000
+3 175000
+1 1500
+1 4500
+1 2000
+8 1000
-9 783000
+1 348000
+8 436500
+62 87500
+2 87500
+5 1000
+8 8000
cfn=(5328)
calls=500 +69 
* 82104323
+7 1000
+2 1500
cfi=(169)
cfn=(5484)
calls=500 2391 
* 282968
+2 1500
cfi=(302)
cfn=(5232)
calls=500 110 
* 5000
+6 2000
+4 3500
cfi=(165)
cfn=(5488) ExecASInsertTriggers
calls=500 2508 
* 6500
+3 1500
cfi=(165)
cfn=(5490) AfterTriggerEndQuery
calls=500 4830 
* 7000
+2 1500
cfi=(13)
cfn=(952)
calls=500 1032 
* 36000
+1 1500
cfi=(13)
cfn=(952)
calls=500 1032 
* 36000
+2 2500
cfi=(257)
cfn=(5492) ExecResetTupleTable
calls=500 1113 
* 131000
+3 2000
+5 1500
cfi=(306)
cfn=(5502)
calls=500 225 
* 8500
+3 1000
+4 1500
cfi=(300)
cfn=(5504)
calls=500 1454 
* 11000
+2 1500
cfi=(240)
cfn=(5506)
calls=500 195 
* 693500
+6 2000
+3 500
+1 2500

fn=(5294) NextCopyFromRawFields
3395 528000
+8 354000
+7 440000
+3 264000
cfn=(5296)
calls=88000 3651 
* 45312500
* 88000
+7 178000
+1 1000
+3 350000
+1 262500
cfn=(5304)
calls=87500 4355 
* 14824500
* 175000
+4 350000
+1 262500
+1 87500
+1 176000

fn=(5228)
3152 6000
+2 1500
+13 5500
cfn=(5230) BeginCopy
calls=500 1401 
* 1105500
* 500
+1 2000
cfi=(302)
cfn=(5232)
calls=500 110 
* 5000
* 500
+3 1000
+1 1000
+1 3000
+1 1000
+1 1000
+1 1000
+3 2000
cfi=(80)
cfn=(1888)
calls=500 47 
* 77000
+1 2000
cfi=(80)
cfn=(1888)
calls=500 47 
* 77000
+1 1000
+1 1000
cfi=(13)
cfn=(940)
calls=500 925 
* 177757
* 1000
+1 3000
+3 1000
+1 2000
+2 2000
+1 1500
+1 500
+1 500
+8 3500
cfi=(13)
cfn=(940)
calls=500 925 
* 61500
* 500
+1 2000
cfi=(13)
cfn=(940)
calls=500 925 
* 55000
* 500
+1 2000
cfi=(13)
cfn=(940)
calls=500 925 
* 55000
* 500
+1 2000
cfi=(13)
cfn=(940)
calls=500 925 
* 55000
* 500
+2 1000
+2 5500
+3 2000
+4 2000
+5 2000
-1 4000
cfi=(272)
cfn=(5076)
calls=500 2609 
* 255500
+2 6500
cfi=(171)
cfn=(3344)
calls=500 125 
* 41000
+3 3000
cfi=(45)
cfn=(5240)
calls=500 486 
* 15000
* 1500
-18 3500
+55 1500
+1 1500
+1 1500
+1 1500
+1 1500
+1 1500
+1 1500
+2 1000
+5 1000
+10 1500
cfi=(13)
cfn=(928)
calls=500 1162 
* 102500
* 1000
+2 2000
+13 2500
cfi=(25)
cfn=(1278)
calls=500 2186 
* 259250
* 1000
+1 2000
+14 2000
cob=(3)
cfi=(3)
cfn=(1940) fileno
calls=500 0 
* 3000
* 500
* 2000
cfi=(9)
cfn=(5242)
calls=500 0 
* 8795
* 1000
+6 2000
+7 2000
+43 2500
+2 2000
cfi=(46)
cfn=(5248) list_length
calls=500 90 
* 5000
* 500
+2 1500
+1 2000
cfi=(13)
cfn=(940)
calls=500 925 
* 55000
* 1000
+3 1500
cfi=(302)
cfn=(5232)
calls=500 110 
* 5000
+2 500
+1 2500

fn=(5292)
3448 704000
+4 264000
+1 264000
+1 264000
+2 264000
+1 264000
+2 352000
+1 264000
+1 352000
cfi=(46)
cfn=(5248)
calls=88000 90 
* 880000
* 88000
+3 3168000
+1 1672000
cob=(3)
cfi=(3)
cfn=(828)
calls=88000 0 
* 1760000
* 88000
+2 440000
+9 528000
cfn=(5294)
calls=88000 -81 
* 63653500
* 264000
+1 1000
+3 525000
+5 87500
+3 350000
cfi=(46)
cfn=(966)
calls=87500 78 
* 875000
* 175000
+2 262500
+1 262500
+1 875000
+2 262500
+5 787500
+2 350000
+7 350000
+2 175000
+9 875000
+13 350000
+1 262500
+1 612500
+2 437500
-2 1225000
cfi=(171)
cfn=(4950)
calls=87500 1710 
* 31560500
* 87500
+4 175000
+1 437500
+1 175000
+1 175000
-53 700000
3614 437500
+13 87500
+1 352000

fn=(5230)
1401 5500
+7 1000
cfi=(13)
cfn=(2546)
calls=500 956 
* 270500
* 500
+6 3500
cfi=(14)
cfn=(432)
calls=500 395 
* 53500
* 1000
+4 2000
cfi=(302)
cfn=(5232)
calls=500 110 
* 5000
* 500
+3 3000
cfn=(5234)
calls=500 1047 
* 303500
+3 1000
+4 1500
+2 2500
1570 3500
cfn=(5206)
calls=500 4827 
* 168000
* 1000
+2 1500
+3 2000
cfi=(13)
cfn=(2546)
calls=500 956 
* 73000
* 1000
+1 2000
+7 2000
+22 2000
cfi=(13)
cfn=(2546)
calls=500 956 
* 73000
* 1000
+1 2000
+22 2000
cfi=(13)
cfn=(2546)
calls=500 956 
* 73000
* 1000
+1 2000
+22 2000
+24 2000
+1 500
cfi=(19)
cfn=(5238)
calls=500 307 
* 3000
* 1000
+8 1500
cfi=(19)
cfn=(612)
calls=500 1005 
* 3000
* 1000
+1 500
cfi=(43)
cfn=(942)
calls=500 1834 
* 9000
-1 2500
-1 1000
+4 4000
+2 1000
+2 1500
cfi=(302)
cfn=(5232)
calls=500 110 
* 5000
+2 500
+1 2000

fn=(5298)
3740 528000
+4 88000
+1 88000
+1 88000
+4 88000
+1 88000
+1 88000
+1 88000
+1 88000
+2 352000
+2 352000
+1 352000
+2 264000
+1 88000
+3 88000
+23 264000
+1 264000
+1 264000
+17 1480500
+2 4000
+6 3000
cfn=(5300) CopyLoadRawBuf
calls=1000 749 
* 345500
* 3000
+1 500
+1 500
+1 1500
+6 1000
-7 500
+1 1500
+6 1000
+2 500
+1 500
+2 500
+4 1000
+1 4000
+2 2000
-3 591000
+1 2364000
+2 1182000
+11 1184000
+13 592000
+2 888000
+2 888000
+1 296000
+8 592000
+5 592000
+56 1379500
+2 700000
+9 175000
+2 87500
+7 417000
4072 834000
+11 208500
+1 208500
+5 1664500
cfi=(80)
cfn=(1920)
calls=87500 215 
* 7615000
* 262500
+2 87500
+1 437500
-1 500
+1 2500

fn=(5300)
749 4000
+4 6000
+8 1000
+2 13000
cfn=(5302)
calls=1000 567 
* 303500
* 1000
+2 2000
+1 6000
+1 2000
+1 3000
+1 2000
+1 2000

fl=(138)
fn=(2804)
526 24
+8 4
+3 12
cfn=(2768) find_active_timeout
calls=4 83 
* 58
* 4
+1 8
+1 6
cfn=(2806) remove_timeout_index
calls=2 121 
* 42
+3 16
+1 16
+3 12
+2 8

fn=(2768)
83 18
+3 12
+2 12
+1 4
-3 18
+6 4
+1 12

fn=(2772) schedule_alarm
186 8
+1 6
+6 110
+3 14
cfi=(21)
cfn=(2774)
calls=2 1646 
* 80
+7 6
+3 4
+1 6
+32 2
+3 10
cob=(3)
cfi=(3)
cfn=(2780) setitimer
calls=1 0 
* 5
cob=(1)
cfi=(1)
cfn=(223)
calls=1 0 
* 1310
* 6
* 4
+3 4

fn=(2766) enable_timeout
139 12
+11 6
cfn=(2768)
calls=2 -67 
* 22
* 2
+1 4
+7 10
+13 8
+1 10
+1 10
+2 10
cfn=(2770) insert_timeout
calls=2 -74 
* 56
+1 4

fn=(2770)
101 10
+3 10
+4 14
+3 12
+2 6
+1 4

fn=(2758)
341 6
+4 2
+2 2
+2 4
+2 192
+1 160
+1 160
+1 160
+1 160
-6 100
+9 2
+3 6
cfi=(28)
cfn=(784)
calls=2 41 
* 348
+1 4

fn=(2764)
429 10
+5 2
+3 2
cfi=(21)
cfn=(656)
calls=2 1571 
* 44
* 2
+1 12
+1 12
cfn=(2766)
calls=2 139 
* 154
+3 6
cfn=(2772)
calls=2 186 
* 1575
+1 4

fn=(2762)
374 30
+5 10
+14 25
+2 5
+1 20

fn=(2806)
121 8
+3 10
+4 14
+3 6
+1 4

fl=(190)
fn=(3436) index_getnext_tid
528 15800
+4 18960
+10 28440
cfi=(188)
cfn=(3438) btgettuple
calls=3160 215 
* 26214337
* 3160
+3 6320
+3 12640
+3 2084
+2 36
cfi=(50)
cfn=(3258)
calls=9 3316 
* 2169
+1 18
+2 1042
+3 36946
+3 5278
+1 6320

fn=(3498) index_fetch_heap
585 10556
+1 7917
+1 2639
+4 13195
+3 7917
+4 23751
-2 21112
cfi=(50)
cfn=(3468)
calls=2639 1522 
* 2609594
* 5278
+7 10556
+1 16450
cfi=(176)
cfn=(3224)
calls=2350 75 
* 197400
+4 13195
cfi=(50)
cfn=(3232)
calls=2639 3553 
* 427518
+6 21112
-5 42224
cfi=(169)
cfn=(3500)
calls=2639 2053 
* 884529
* 2639
+6 13195
cfi=(50)
cfn=(3232)
calls=2639 3553 
* 298207
+2 5278
+6 23751
+1 29029
+1 7917
+17 5278

fn=(3514)
178 14610
+1 8766
+5 8766
cfi=(148)
cfn=(3082)
calls=2922 2003 
* 286356
+2 5844
+1 14610
cfi=(160)
cfn=(3090)
calls=2922 -5 
* 7010306
+1 5844

fn=(3428)
314 22776
+2 17082
+6 11388
+6 5694
+2 5694
+2 28470
cfi=(188)
cfn=(3430) btrescan
calls=2847 +62 
* 510667
+2 5694

fn=(3434)
661 15800
+6 12640
+13 15800
cfn=(3436)
calls=3160 528 
* 26353550
* 3160
+3 6320
+1 521
+13 1042
-5 7917
cfn=(3498)
calls=2639 585 
* 4700237
* 2639
+1 5278
+1 5278
+4 6320

fn=(3420) index_beginscan_internal
272 28470
+4 14235
+2 17082
+6 8541
cfi=(148)
cfn=(3064)
calls=2847 1970 
* 250536
+5 22776
cfi=(188)
cfn=(3422) btbeginscan
calls=2847 +58 
* 2590896
* 2847
+3 8541
+1 8541
+2 2847
+1 5694

fn=(3418)
226 22776
+3 22776
cfn=(3420)
calls=2847 +43 
* 2961006
* 2847
+6 8541
+1 8541
+2 2847
+1 5694

fn=(3448)
859 35848
+5 22405
+4 35848
+2 13443
+4 31367
+3 17924
+2 78
+5 182
+8 52
+4 182
cfi=(171)
cfn=(3104)
calls=26 135 
* 2158
+3 4481
+1 8962

fn=(3508)
342 11388
+2 17082
+3 11388
+2 9304
cfi=(50)
cfn=(3258)
calls=2326 3316 
* 560566
+1 4652
+4 16282
cfi=(188)
cfn=(3510) btendscan
calls=2326 +99 
* 826954
* 3647
cfi=(188)
cfn=(3510)
calls=521 +99 
* 182595
+3 11388
cfi=(148)
cfn=(3084)
calls=2847 1983 
* 253383
+2 11388
+4 8541
cfi=(172)
cfn=(3512)
calls=2847 147 
* 543777
+1 5694

fn=(3416)
152 16296
+3 13580
cfi=(169)
cfn=(3025)
calls=1070 1125 
* 2980138
cfi=(169)
cfn=(3024)
calls=1646 1125 
* 9557892
* 2716
+2 13580
+7 2716
+1 10864

fn=(3417)
152 1236
+3 1030
cfi=(169)
cfn=(3025)
calls=206 1125 
* 432961
* 206
+2 1030
+7 206
+1 824

fl=(292)
fn=(5058)
30 4
+8 9
+1 9
-1 2
+2 2
+1 2
-2 2
+3 2
+3 2

fl=(28)
fn=(784)
41 95
+5 38
+1 76
cob=(3)
cfi=(3)
cfn=(756)
calls=19 -47 
* 722
* 19
+1 19
+2 38
+1 3
+2 6
cob=(5)
cfi=(5)
cfn=(782)
calls=1 -53 
* 109
* 1
* 108
cob=(5)
cfi=(5)
cfn=(782)
calls=18 -53 
* 1962
* 18
* 38
+2 19
+4 38

fn=(776)
72 35
+4 14
+1 28
cob=(3)
cfi=(3)
cfn=(756)
calls=7 -77 
* 266
* 7
+1 7
+2 14
+1 3
+2 6
cob=(5)
cfi=(5)
cfn=(782)
calls=1 -83 
* 109
* 1
* 36
cob=(5)
cfi=(5)
cfn=(782)
calls=5 -83 
* 545
cob=(1)
cfi=(1)
cfn=(223)
calls=1 -83 
* 922
* 10
* 14
+2 7
+1 14

fl=(57)
fn=(1886) in_error_recursion_trouble
194 26
+2 39
+1 26

fn=(1882)
785 66
+1 30
+3 18
+1 18
+1 24
cfi=(79)
cfn=(1884)
calls=6 110 
* 60
* 6
+2 18
+1 6
cfn=(1886)
calls=6 194 
* 42
* 30
cfi=(80)
cfn=(1888)
calls=6 47 
* 769
* 6
cob=(5)
cfi=(5)
cfn=(472)
calls=6 0 
* 18
* 6
* 90
cfi=(80)
cfn=(1892)
calls=6 121 
* 3800
* 66
cfi=(13)
cfn=(928)
calls=6 1162 
* 1067
* 30
cfi=(13)
cfn=(952)
calls=6 1032 
* 510
+2 18
cfi=(79)
cfn=(1884)
calls=6 110 
* 60
+1 18
+1 6
+1 12

fn=(1896)
411 66
+1 30
+5 18
+1 18
+1 18
+6 18
cfi=(79)
cfn=(1884)
calls=6 110 
* 60
* 6
+7 30
+9 12
+33 15
+1 4
cfi=(58)
cfn=(5704)
calls=1 1637 
* 12
+3 6
cfn=(1898) EmitErrorReport
calls=6 1434 
* 64351
+3 24
+1 24
cfi=(13)
cfn=(952)
calls=6 1032 
* 510
+1 24
+2 24
+2 24
+2 24
+2 24
+2 24
+2 24
+2 24
+2 24
+2 24
+3 18
+3 18
cfi=(79)
cfn=(1884)
calls=6 110 
* 60
+1 18
+5 12
+8 3
+9 3
cob=(3)
cfi=(3)
cfn=(2562)
calls=1 0 
* 54
* 1
+1 3
cob=(3)
cfi=(3)
cfn=(2562)
calls=1 0 
* 54
* 1
+7 2
cfi=(67)
cfn=(5716)
calls=1 105 
* 47594
+3 10
+19 15
+1 10

fn=(1900) send_message_to_server_log
2852 42
+3 18
cfi=(80)
cfn=(1888)
calls=6 47 
* 738
+2 6
+1 6
+2 30
cfn=(1902) log_line_prefix
calls=6 2301 
* 43813
+1 24
cfn=(1928) error_severity
calls=6 3323 
* 90
* 12
cfn=(1930) err_gettext
calls=6 206 
* 36
* 36
cfi=(80)
cfn=(1926)
calls=6 79 
* 2700
+2 18
+3 24
+1 36
cfn=(1932) append_with_tabs
calls=6 3374 
* 10098
* 6
+4 24
+3 24
+4 24
cfi=(80)
cfn=(1924)
calls=6 176 
* 210
+2 18
+2 24
+7 24
+7 24
+7 24
+7 24
+7 18
+22 36
cfn=(1550) is_log_level_output
calls=6 3439 
* 87
* 12
+1 6
-1 12
+12 24
+47 24
+7 18
+15 30
cfn=(1934) write_console
calls=6 2145 
* 1489
+4 18
+4 24
+25 18
cfi=(13)
cfn=(952)
calls=6 1032 
* 510
+2 36

fn=(1930)
206 21
+7 7
+2 14

fn=(1904) setup_formatted_log_time
2216 18
+4 24
+2 18
cob=(10)
cfi=(22)
cfn=(662)
calls=6 0 
* 18
* 6
+1 6
+3 12
+10 30
cfi=(35)
cfn=(1048)
calls=6 1375 
* 6180
-3 30
cfi=(82)
cfn=(1906)
calls=6 123 
* 27287
+6 90
cfi=(17)
cfn=(1138)
calls=6 231 
* 3606
+1 30
cob=(3)
cfi=(3)
cfn=(856)
calls=6 0 
* 72
* 6
+1 12

fn=(5714) err_sendstring
3123 35
+1 7
cfn=(1886)
calls=7 194 
* 49
* 14
+3 35
cfi=(179)
cfn=(3714)
calls=7 198 
* 1126
+1 14

fn=(1902)
2301 30
+15 24
+2 2
+1 4
+1 2
+2 6
+2 6
-2 12
+2 12
+3 18
+2 144
+3 168
cfi=(80)
cfn=(1924)
calls=24 176 
* 840
+1 24
+4 12
+1 48
+2 48
+22 48
+1 24
+5 108
+64 18
+3 36
cfi=(80)
cfn=(1926)
calls=6 79 
* 3684
+1 6
+8 6
cfn=(1904)
calls=6 2216 
* 37445
+1 18
+3 24
cfi=(80)
cfn=(1918)
calls=6 164 
* 768
+1 6
2327 210
2602 12

fn=(1932)
3374 30
+3 6
+2 7506
+1 556
-3 1988
+6 12

fn=(2820)
1846 4
+4 3
+37 4

fn=(2084)
1286 108
+4 54
+8 108
+13 90
+1 36
+5 72
cob=(3)
cfi=(3)
cfn=(1880) __strrchr_sse42
calls=18 0 
* 317
* 18
* 18
+1 36
+3 54
+1 54
+1 54
+2 18
cob=(5)
cfi=(5)
cfn=(472)
calls=18 0 
* 54
* 18
* 54
+3 54
+1 36

fn=(1150)
1897 10
+11 11
cob=(3)
cfi=(3)
cfn=(446)
calls=1 0 
* 22
* 1
* 2
+1 1
-1 2
+3 3
+5 3
+2 3
cob=(3)
cfi=(3)
cfn=(384)
calls=1 0 
* 242
* 1
* 1
+2 2
+2 4

fn=(1898)
1434 18
+1 30
+3 18
+1 18
+1 24
cfi=(79)
cfn=(1884)
calls=6 110 
* 60
* 6
+21 42
+4 24
+1 18
cfn=(1900)
calls=6 2852 
* 60515
+3 24
+1 3
cfn=(5706) send_message_to_frontend
calls=1 3135 
* 3443
+2 18
cfi=(79)
cfn=(1884)
calls=6 110 
* 60
+1 18
+1 12

fn=(5706)
3135 5
+4 9
cfi=(179)
cfn=(3292)
calls=1 88 
* 137
+2 4
+8 4
cfn=(1928)
calls=1 3323 
* 15
* 1
+1 4
cfi=(319)
cfn=(5708)
calls=1 162 
* 88
+1 3
cfn=(1930)
calls=1 206 
* 6
* 5
cfn=(5714)
calls=1 -28 
* 182
+1 4
cfi=(319)
cfn=(5708)
calls=1 162 
* 88
+1 5
cfn=(5714)
calls=1 -30 
* 182
+3 3
+1 2
+2 30
+1 5
-3 17
+5 3
+2 4
cfi=(319)
cfn=(5708)
calls=1 162 
* 88
+1 5
cfn=(5714)
calls=1 -42 
* 178
+3 4
cfi=(319)
cfn=(5708)
calls=1 162 
* 88
+1 4
+1 6
cfn=(5714)
calls=1 -47 
* 194
* 1
+4 4
+8 4
+6 4
+6 4
+6 4
+6 4
+6 4
+6 4
+6 4
+7 4
+7 4
+6 4
+2 4
cfi=(319)
cfn=(5708)
calls=1 162 
* 88
+1 6
cfn=(5714)
calls=1 3123 
* 182
+3 4
+2 9
cfi=(17)
cfn=(462)
calls=1 203 
* 489
+1 4
cfi=(319)
cfn=(5708)
calls=1 162 
* 88
+1 5
cfn=(5714)
calls=1 3123 
* 178
+3 4
+2 4
cfi=(319)
cfn=(5708)
calls=1 162 
* 88
+1 6
cfn=(5714)
calls=1 3123 
* 184
+3 4
cfi=(319)
cfn=(5708)
calls=1 162 
* 88
* 1
+33 3
cfi=(179)
cfn=(3298)
calls=1 299 
* 389
+10 3
cfi=(58)
cfn=(3776)
calls=1 1401 
* 186
+1 4

fn=(1928)
3323 21
+3 49
+11 5
+1 5
+14 2
+1 2
+9 7
+1 14

fn=(2086)
1336 198
+1 90
+3 54
+5 54
+1 18
cob=(5)
cfi=(5)
cfn=(472)
calls=18 0 
* 54
* 18
* 54
+1 180
cfn=(1548)
calls=18 232 
* 1048
* 54
+1 18
+18 36

fn=(5702)
571 4
+1 5
+3 3
+2 3
+2 1
+1 2

fn=(1548)
232 848
+3 106
+7 212
+6 3
+15 2
+16 5
+11 530
cfn=(1550)
calls=106 3439 
* 1687
* 106
+3 350
+8 48
+1 20
+2 85
+5 20
-5 2
+5 1012
+1 200
+6 18
+12 30
+21 36
+12 30
+1 1128
+1 18
+1 18
+1 18
+1 12
+5 24
cob=(3)
cfi=(3)
cfn=(1880)
calls=5 0 
* 134
cob=(1)
cfi=(1)
cfn=(223)
calls=1 0 
* 1335
* 10
* 6
+1 12
+3 18
+1 18
+1 18
+2 30
+2 24
+2 12
+1 3
+1 10
+3 10
+2 5
cob=(5)
cfi=(5)
cfn=(472)
calls=5 0 
* 15
* 5
* 1
cob=(5)
cfi=(5)
cfn=(472)
calls=1 0 
* 3
* 1
* 18
+5 18
+2 18
+1 6
+1 212

fn=(1550)
3439 448
+1 428
+2 40
+1 20
+2 204
+7 306
+1 4
+2 100
+1 224

fn=(1934)
2145 36
+62 30
cob=(3)
cfi=(3)
cfn=(1940)
calls=5 0 
* 30
cob=(1)
cfi=(1)
cfn=(223)
calls=1 0 
* 1275
* 10
* 30
cob=(5)
cfi=(5)
cfn=(1568)
calls=6 0 
* 42
* 6
* 6
+2 24

fl=(136)
fn=(2550)
116 48
+4 16
+6 48
cob=(3)
cfi=(3)
cfn=(1246)
calls=8 0 
* 1108
* 8
* 8
+1 64
+4 32
+7 16
+2 20
cob=(3)
cfi=(3)
cfn=(828)
calls=4 0 
* 60
* 4
+2 8
+1 44
+4 12
+1 24
cob=(3)
cfi=(3)
cfn=(856)
calls=4 0 
* 56
* 4
* 4
+10 16
+2 20
cob=(3)
cfi=(3)
cfn=(828)
calls=4 0 
* 56
* 4
+1 8
+2 128
+2 128
+1 256
+6 64
-11 200
+13 24
cob=(3)
cfi=(3)
cfn=(856)
calls=4 0 
* 72
* 4
* 4
+8 32
+1 8
+1 16

fl=(193)
fn=(3472)
266 33606
+3 16803
+7 11202

fl=(278)
fn=(4764) ExecInitExprRec
645 24
+1 42
+3 3
cfi=(52)
cfn=(3958)
calls=3 3263 
* 81
+4 6
+1 6
+3 24
+60 4
+2 2
+1 6
+1 6
+2 10
cfn=(4766) ExprEvalPushStep
calls=2 2133 
* 370
+1 2
881 2
+2 13
cfn=(5102) ExecInitFunc
calls=1 2160 
* 7585
+3 5
cfn=(4766)
calls=1 2133 
* 57
+1 1
2123 12

fn=(4765) ExecInitExprRec'2
645 24
+1 42
+3 3
cfi=(52)
cfn=(3958)
calls=3 3263 
* 81
+4 6
+1 6
+3 24
+72 2
+3 4
+16 4
+1 4
+6 6
+2 8
cob=(12)
cfi=(241)
cfn=(5104) plpgsql_param_compile
calls=1 6355 
* 247
+10 1
+6 1
892 2
+2 13
cfn=(5103) ExecInitFunc'2
calls=1 2160 
* 5970
+3 5
cfn=(4766)
calls=1 2133 
* 57
+1 1
1245 2
+7 7
cfn=(4765)
calls=1 645 
* 343
+10 1
+3 2
cfi=(13)
cfn=(2546)
calls=1 956 
* 187
* 1
+1 2
cfi=(13)
cfn=(2546)
calls=1 956 
* 964
* 1
+2 4
cfi=(247)
cfn=(4434)
calls=1 43 
* 24
* 5
cfi=(272)
cfn=(5078)
calls=1 2642 
* 496
+2 5
cfi=(171)
cfn=(3344)
calls=1 125 
* 82
+1 3
+1 13
+5 2
cfi=(13)
cfn=(2546)
calls=1 956 
* 187
* 1
+1 2
cfi=(13)
cfn=(2546)
calls=1 956 
* 1399
* 1
+2 7
cfi=(272)
cfn=(5076)
calls=1 2609 
* 511
+2 5
cfi=(171)
cfn=(3344)
calls=1 125 
* 82
+1 3
+1 13
+8 2
+1 4
+1 2
+1 2
+1 2
+2 5
cfn=(4766)
calls=1 2133 
* 57
+1 2
2123 12

fn=(4766)
2133 45
+1 36
+2 6
+1 18
cfi=(13)
cfn=(940)
calls=3 925 
* 369
* 9
+2 36
+7 135
cob=(3)
cfi=(3)
cfn=(856)
calls=9 0 
* 216
* 9
+1 18

fn=(4762) ExecPushExprSlots
2281 15
+1 42
+2 3
+1 3
+3 12
+10 12
+10 12
+10 6

fn=(4756) ExecInitExprWithParams
158 15
+2 42
+3 6
+4 12
cfi=(13)
cfn=(3400)
calls=3 853 
* 690
* 15
+1 9
+1 6
+1 9
+3 15
cfn=(4758) ExecInitExprSlots
calls=3 2263 
* 1008
+3 24
cfn=(4764)
calls=3 645 
* 8261
+3 3
+1 15
cfn=(4766)
calls=3 2133 
* 171
+2 9
cfn=(4768) ExecReadyExpr
calls=3 627 
* 29472
+2 3
+1 6

fn=(5102)
2160 11
+1 3
cfi=(242)
cfn=(4564)
calls=1 90 
* 10
* 1
+8 1
cfi=(54)
cfn=(3326)
calls=1 381 
* 5
* 6
cfi=(227)
cfn=(5010)
calls=1 4656 
* 51
* 1
+1 2
+2 3
+8 2
+9 2
cfi=(13)
cfn=(2546)
calls=1 956 
* 187
* 2
+1 2
cfi=(13)
cfn=(2546)
calls=1 956 
* 964
* 2
+1 3
+1 3
+3 5
cfi=(171)
cfn=(3344)
calls=1 125 
* 82
+1 3
+3 16
+4 4
+1 3
+3 4
+9 1
+1 3
cfi=(242)
cfn=(4372)
calls=1 78 
* 10
* 2
+2 6
+2 8
+6 2
+2 7
+1 7
+4 15
cfn=(4765)
calls=1 645 
* 6114
+3 2
-20 12
+24 6
+2 4
+3 3
+9 5

fn=(5103)
2160 11
+1 3
cfi=(242)
cfn=(4564)
calls=1 90 
* 10
* 1
+8 1
cfi=(54)
cfn=(3326)
calls=1 381 
* 5
* 6
cfi=(227)
cfn=(5010)
calls=1 4656 
* 51
* 1
+1 2
+2 3
+8 2
+9 2
cfi=(13)
cfn=(2546)
calls=1 956 
* 187
* 2
+1 2
cfi=(13)
cfn=(2546)
calls=1 956 
* 964
* 2
+1 3
+1 3
+3 5
cfi=(171)
cfn=(3344)
calls=1 125 
* 82
+1 3
+3 16
+4 4
+1 3
+3 4
+9 1
+1 3
cfi=(242)
cfn=(4372)
calls=1 78 
* 10
* 2
+2 6
+2 8
+6 2
+2 7
+1 7
+4 15
cfn=(4765)
calls=1 645 
* 4497
+3 2
-20 12
+24 6
+2 6
+1 3
+11 5

fn=(4758)
2263 15
+1 9
+5 15
cfn=(4760) get_last_attnums_walker
calls=3 +56 
* 843
+2 15
cfn=(4762)
calls=3 +10 
* 105
+1 6

fn=(4760)
2325 15
+1 6
+2 12
+30 12
+2 12
+2 12
+2 15
cfi=(247)
cfn=(4450)
calls=3 1843 
* 753
+2 6

fn=(4761)
2325 25
+1 10
+2 20
+30 20
+2 20
+2 20
+2 25
cfi=(247)
cfn=(4451)
calls=5 1843 
* 672
+2 10

fn=(4768)
627 12
+1 9
cfi=(279) /home/mithuncy/fsm_p11patch/src/backend/jit/jit.c
cfn=(4770) jit_compile_expr
calls=3 157 
* 36
* 6
+3 9
cfi=(280)
cfn=(4772) ExecReadyInterpretedExpr
calls=3 169 
* 29394
+1 6

fl=(279)
fn=(4770)
157 12
+10 12
+1 6
+15 6

fl=(242)
fn=(4564)
90 6
+1 10
+1 4
-2 1500
+1 2500
+1 1000
-2 1515
+1 2525
+1 1010

fn=(4372)
78 6
+1 10
+1 4
-2 3000
+1 4000
+1 2000
-2 1509
+1 2515
+1 1006
-2 3012
+1 5020
+1 2008
-2 6
+1 10
+1 4
-2 6051
+1 10085
+1 4034

fl=(270)
fn=(4650)
78 9
+1 15
+1 6
-2 9
+1 9
+1 6

fl=(276)
fn=(4680)
134 48
+4 24
+1 24
+5 24

fn=(4686)
154 30
+8 12
+2 12
+1 12
+30 12

fn=(4844)
765 2505
+4 1002
+2 1002
+1 1503
cfn=(4846) bms_make_singleton
calls=501 246 
* 101202
* 501
+19 1002

fn=(4846)
246 2004
+5 1002
+2 3006
+1 3507
+1 3507
cfi=(13)
cfn=(2546)
calls=501 956 
* 79659
* 501
+1 2004
+1 4509
+1 501
+1 1002

fl=(310) /home/mithuncy/fsm_p11patch/src/backend/storage/freespace/freespace.c
fn=(5364) fsm_readbuf
673 4000
+1 1500
cfn=(5366) fsm_logical_to_physical
calls=500 574 
* 40000
* 500
+3 6000
cfi=(140)
cfn=(3154)
calls=500 153 
* 251916
* 2500
cfi=(140)
cfn=(3158)
calls=500 209 
* 21000
+8 2500
+3 2500
cfi=(140)
cfn=(5368)
calls=500 303 
* 1311629
* 1000
+4 1500
+4 2500
+2 1000
+3 1000
+33 2000

fn=(5366)
574 1500
+9 1000
+1 1000
+1 3000
-1 5500
+4 500
+1 1000
+2 7500
+1 10500
-3 5500
+10 1000
+3 1000
+1 1000

fn=(5362) fsm_search
831 3000
+1 500
+1 1000
+6 500
+3 3000
cfn=(5364)
calls=500 673 
* 1653045
* 500
+3 1000
+11 500
+2 1000
+11 1500
+6 1000
+36 1000

fn=(5398) FSMClearLocalMap
291 4000
+1 2000
+1 8000
cob=(3)
cfi=(3)
cfn=(828)
calls=2000 0 
* 34000
* 2000
+1 4000

fn=(5378) fsm_local_set
1105 8000
+8 6000
+1 7000
-1 20000
+4 4000
+3 18000
+1 8500
+2 3000
+1 4000

fn=(5380) fsm_local_search
1133 7000
+1 7000
+4 3500
+1 14000
-1 3500
+1 14000
+1 4000
+2 10000
+2 1500
+1 7000

fn=(5358) GetPageWithFreeSpace
158 3500
+1 1500
cfn=(5360) fsm_space_needed_to_cat
calls=500 551 
* 8500
* 500
+5 2500
cfn=(5362)
calls=500 831 
* 1667545
* 500
+2 1000
+1 1500
-1 1000
+2 1000
-1 1000
+3 2000
cfi=(50)
cfn=(3152)
calls=500 2795 
* 1089493
* 500
+2 1000
+9 1000
+3 2500
cfn=(5378)
calls=500 1105 
* 15500
+1 500
cfn=(5380)
calls=500 1133 
* 6500
* 500
+4 500
+1 1000

fn=(5408) RecordAndGetPageWithFreeSpace
207 21000
+6 3000
+3 9000
+5 3000
+1 1500
cfn=(5380)
calls=1500 1133 
* 38000
* 1500
+3 10500
cfn=(5410) fsm_allow_writes
calls=1500 1048 
* 3615378
* 4500
+7 7500
cfn=(5378)
calls=1500 1105 
* 63000
+1 1500
cfn=(5380)
calls=1500 1133 
* 27000
* 1500
+21 6000

fn=(5410)
1048 10500
+3 3000
+4 7500
+9 3000
+9 7500
+1 4500
-1 3000
+4 1500
+3 6000
+1 7500
cfi=(140)
cfn=(5368)
calls=1500 303 
* 3279378
* 3000
+3 3000
+4 6000
cfi=(50)
cfn=(3152)
calls=1500 2795 
* 256500
* 3000
+1 6000
+3 1500
+1 3000

fn=(5360)
551 2000
+4 1000
+3 1000
+3 2000
+2 1000
+3 500
+1 1000

fl=(60)
fn=(1272) ProcessConfigFileInternal
173 24
+1 3
+1 3
+8 6
+1 9
+2 39
cfn=(1274) ParseConfigFile
calls=3 566 
* 4489777
* 9
+15 9
+2 24
cfn=(1274)
calls=2 566 
* 26991
* 6
+20 1
+5 3
+2 65
+1 65
cob=(3)
cfi=(3)
cfn=(446)
calls=13 0 
* 560
* 13
-1 26
-2 67
+7 2
+2 4
+9 3
+1 1
+8 4
+2 4396
+2 3768
-4 2518
+20 6
+5 112
+7 168
cfi=(29)
cfn=(1212)
calls=28 4869 
* 35242
* 28
+2 56
+3 140
+17 196
-34 144
+54 4
+4 2
+8 4
+2 4396
+3 2512
+1 42
-1 28
+2 628
-7 2518
+67 6
+2 1
cfi=(29)
cfn=(1228)
calls=1 5020 
* 3797
+1 1
cfi=(29)
cfn=(1470)
calls=1 10789 
* 792890
+2 1
cfi=(19)
cfn=(2650)
calls=1 1011 
* 6
* 5
cfi=(29)
cfn=(1206)
calls=1 7172 
* 3552
+7 6
+2 28
+4 112
+4 140
+2 84
cfi=(29)
cfn=(2652)
calls=14 7195 
* 20066
* 14
+3 28
+3 42
cfi=(13)
cfn=(928)
calls=14 1162 
* 2241
* 14
+3 182
cfi=(29)
cfn=(1208)
calls=14 6409 
* 60218
* 182
cfi=(29)
cfn=(1208)
calls=14 6409 
* 1317860
* 28
+3 56
+3 50
+2 66
cfi=(29)
cfn=(2652)
calls=11 7195 
* 14966
* 11
+2 22
+2 55
cob=(3)
cfi=(3)
cfn=(446)
calls=11 0 
* 359
* 11
* 22
+5 75
+2 6
+9 6
+9 112
+1 252
cfi=(29)
cfn=(1416)
calls=28 7137 
* 45363
+3 56
+1 42
cfi=(13)
cfn=(952)
calls=14 1032 
* 1112
-63 144
+67 4
+1 2
cfi=(21)
cfn=(656)
calls=2 1571 
* 44
* 2
+3 6
+21 3
+1 12

fn=(1308) ParseConfigFp
701 50
+1 5
+1 10
+1 10
+2 5
+4 20
cob=(3)
cfi=(3)
cfn=(370)
calls=4 0 
* 168
cob=(1)
cfi=(1)
cfn=(223)
calls=1 0 
* 1386
* 9
* 10
+1 10
+20 5
+1 5
+2 20
cfi=(62) /home/mithuncy/fsm_p11patch/src/backend/utils/misc/guc-file.c
cfn=(1314) GUC_yy_create_buffer
calls=5 1374 
* 2708
* 5
+1 15
cfi=(62)
cfn=(1322) GUC_yy_switch_to_buffer
calls=5 1329 
* 2391
+3 5
+2 2226
+1 2226
+3 4452
+1 2185
+3 82
+2 123
cfi=(13)
cfn=(928)
calls=41 1162 
* 7822
* 41
+3 41
cfi=(62)
cfn=(1328) GUC_yylex
calls=41 +1 
* 9389
* 41
+1 82
+1 41
cfi=(62)
cfn=(1328)
calls=41 -1 
* 28664
* 41
+3 158
+1 24
+5 82
+1 78
cfn=(1360) GUC_scanstr
calls=26 1088 
* 14630
* 52
+2 45
cfi=(13)
cfn=(928)
calls=15 1162 
* 2640
* 15
+3 15
cfi=(62)
cfn=(1328)
calls=15 -16 
* 14973
* 26
cfi=(62)
cfn=(1328)
calls=26 -16 
* 26513
* 41
+1 82
+9 164
cfi=(29)
cfn=(868)
calls=41 4930 
* 1681
* 82
+15 164
cfi=(29)
cfn=(868)
calls=41 4930 
* 1681
* 82
+15 164
cfi=(29)
cfn=(868)
calls=41 4930 
* 1681
* 82
+18 82
cfi=(13)
cfn=(940)
calls=41 +97 
* 5043
* 41
+1 123
+1 123
+1 82
+1 123
cfi=(13)
cfn=(928)
calls=41 1162 
* 8409
* 82
+1 205
+1 82
+1 82
+1 82
+1 164
+1 12
+2 152
+1 114
+4 76
-4 9
+4 6
+2 41
738 2231
cfi=(62)
cfn=(1328)
calls=2231 +16 
* 4346973
* 6693
905 15
cfi=(62)
cfn=(1370) GUC_yy_delete_buffer
calls=5 1402 
* 1426
+2 10
+1 10
+1 5
+1 20

fn=(1274)
566 55
+2 5
+8 10
+12 25
cfn=(1276) AbsoluteConfigLocation
calls=5 -66 
* 5939
* 5
+1 20
cfi=(25)
cfn=(1278)
calls=5 2186 
* 4351
* 5
+1 10
+23 45
cfn=(1308)
calls=5 +88 
* 4501964
* 5
+3 10
+1 15
cfi=(25)
cfn=(1374)
calls=5 2385 
* 3839
+1 15
cfi=(13)
cfn=(952)
calls=5 1032 
* 425
+2 5
+1 20

fn=(1268)
125 12
+16 15
+8 21
cfi=(14)
cfn=(432)
calls=3 395 
* 1271
* 3
+3 9
cfi=(61)
cfn=(1270)
calls=3 -42 
* 30
* 3
+5 15
cfn=(1272)
calls=3 +16 
* 6838985
+3 9
cfi=(61)
cfn=(1270)
calls=3 -50 
* 30
+1 9
cfi=(13)
cfn=(1396)
calls=3 +51 
* 896
+1 6

fn=(1276)
522 25
+3 20
+1 9
cfi=(13)
cfn=(928)
calls=3 1162 
* 615
* 3
+3 4
+10 12
cfi=(11)
cfn=(458)
calls=2 220 
* 2060
+1 6
cfi=(11)
cfn=(484)
calls=2 255 
* 2817
+2 6
cfi=(13)
cfn=(928)
calls=2 1162 
* 352
+2 10

fn=(1360)
1088 104
+7 78
cob=(3)
cfi=(3)
cfn=(424)
calls=26 0 
* 468
* 26
* 26
+5 52
+3 104
cfi=(13)
cfn=(940)
calls=26 925 
* 3172
* 26
+2 78
+2 2408
+45 2616
+6 3440
+1 344
-54 1454
+59 156
+2 26
+1 52

fl=(102)
fn=(5770)
290 2
+1 2
+3 1
+3 5
+1 2

fn=(2054) PMSignalShmemSize
114 9
+3 3
+1 3
cfi=(20)
cfn=(2056)
calls=3 5589 
* 33
* 12
cfi=(87)
cfn=(2000)
calls=3 493 
* 69
* 15
cfi=(87)
cfn=(2002)
calls=3 476 
* 63
* 3
+3 3
+1 6

fn=(2616)
185 12
+1 12
+7 16
+2 12
+1 4
+1 28
+2 20
+1 12
+1 12
-8 8
+15 8

fn=(2690)
219 3
+4 1
+7 8
+1 5
+1 1
+1 2

fn=(2726) PostmasterDeathSignalInit
371 3
+2 1
+3 4
cfi=(28)
cfn=(784)
calls=1 41 
* 174
+4 5
cob=(1)
cfi=(1)
cfn=(223)
calls=1 0 
* 1259
* 5
* 2
+13 1
+2 2

fn=(2264) PMSignalShmemInit
129 4
+4 1
cfn=(2054)
calls=1 -19 
* 73
* 4
cfi=(87)
cfn=(2168)
calls=1 373 
* 948
-1 1
+3 4
+2 4
cfn=(2054)
calls=1 -23 
* 73
* 15
cob=(3)
cfi=(3)
cfn=(828)
calls=1 0 
* 114
* 1
+1 2
cfi=(20)
cfn=(2056)
calls=1 5589 
* 11
* 1
+2 4

fn=(2676)
164 24
+2 40
+2 3
+1 2
+2 7
+1 16

fn=(2840)
257 2
+1 2
+3 1
+2 5
+1 2

fl=(114) /home/mithuncy/fsm_p11patch/src/backend/utils/misc/backend_random.c
fn=(2082) BackendRandomShmemSize
42 2
+1 1
+1 2

fn=(2334) BackendRandomShmemInit
48 2
+2 2

fl=(285)
fn=(4928)
1677 33
+2 3
+1 3
+1 3
+1 3
+1 3
+4 6
-1 6
+1 9
-1 6
+3 9
+1 9
+6 6
+2 42
+1 42
+2 24
+1 10
+3 3
+1 2
+1 2
+3 2
+5 2
+2 2
+7 3
+2 10
+20 10
-50 33
+76 12
+1 4
+3 2
+38 2
+38 2
+18 4
+3 3
cfi=(272)
cfn=(4916) get_base_element_type
calls=1 2567 
* 480
* 2
+7 2
+13 2
+42 2
+15 2
+13 4
+1 2
+5 1
+1 15

fn=(4900) find_coercion_pathway
2234 63
+1 9
+3 18
+3 18
+1 27
cfi=(272)
cfn=(4886)
calls=9 +25 
* 4392
* 9
+1 18
+1 27
cfi=(272)
cfn=(4886)
calls=9 +23 
* 135400
* 9
+3 27
+4 45
cfi=(151)
cfn=(4902)
calls=9 1125 
* 114880
* 9
+4 18
+62 36
+5 27
cfi=(272)
cfn=(4906) get_element_type
calls=9 2494 
* 4311
* 27
+27 18
+2 18
+1 6
cfn=(4920)
calls=2 2082 
* 984
-1 4
+2 4
+1 14
+6 9
+1 18

fn=(4912) typeIsOfTypedTable
2451 35
+1 21
cfi=(287)
cfn=(4910)
calls=7 671 
* 3346
* 7
+1 7
+2 14
+16 7
+1 14

fn=(4924)
2101 12
+4 12
cfi=(272)
cfn=(4922)
calls=2 2446 
* 44538
+1 10
+3 2
+1 4

fn=(4914) check_generic_type_consistency
1478 24
+2 4
+1 4
+2 4
+2 4
+1 4
+1 4
+6 8
+2 56
+1 56
+2 28
+1 10
+3 3
+1 6
+1 2
+1 4
+2 6
+1 1
+1 4
+2 6
+2 10
+2 8
+1 2
+1 6
cfi=(272)
cfn=(4886)
calls=2 2267 
* 976
* 2
+1 4
+2 6
+2 2
-29 44
+41 8
+2 4
+8 6
cfi=(272)
cfn=(4906)
calls=2 2494 
* 952
* 2
+1 4
+1 4
+17 4
+20 4
+3 3
cfi=(272)
cfn=(4916)
calls=1 2567 
* 480
* 2
+4 4
+8 2
+1 8

fn=(4898)
545 91
+1 13
+4 26
+2 175
+1 175
+5 75
+4 50
+1 1
+3 192
+2 8
+1 8
+7 32
+1 8
+6 48
cfn=(4900)
calls=8 2234 
* 258097
* 8
+2 16
+1 1
+6 14
+7 14
+18 14
+7 35
cfi=(286) /home/mithuncy/fsm_p11patch/src/backend/catalog/pg_inherits.c
cfn=(4908) typeInheritsFrom
calls=7 311 
* 3458
* 14
+1 35
cfn=(4912)
calls=7 2451 
* 3451
* 14
+6 14
-81 111
+85 12
+2 24
cfn=(4914)
calls=4 1478 
* 2785
* 12
+2 4
+3 4
+1 26

fn=(5054) build_coercion_expression
816 9
+1 1
+2 2
+28 2
+44 2
+60 2
+3 4
cfi=(13)
cfn=(3400)
calls=1 853 
* 160
* 5
+4 3
+1 3
+2 3
+1 3
+2 2
+8 2

fn=(4932)
159 50
+5 25
+6 18
+1 8
+15 4
+2 12
+1 6
+36 14
+19 4
+1 8
cfi=(13)
cfn=(3400)
calls=2 853 
* 272
* 10
+15 4
+1 10
cfi=(272)
cfn=(4888) getBaseTypeAndTypmod
calls=2 2284 
* 952
* 2
+11 4
+3 2
+2 6
cfi=(287)
cfn=(4934)
calls=2 560 
* 712
* 2
+2 6
+1 6
+1 6
cfi=(287)
cfn=(4936)
calls=2 622 
* 30
* 4
+1 6
cfi=(287)
cfn=(4938)
calls=2 581 
* 30
* 6
+1 6
cfi=(287)
cfn=(4940)
calls=2 591 
* 30
* 4
+1 8
+7 8
+6 14
cfi=(223)
cfn=(4942)
calls=2 147 
* 48
+6 10
+2 4
-1 12
cfi=(287)
cfn=(4944)
calls=2 636 
* 788
* 6
+13 18
+2 8
cfi=(171)
cfn=(4958)
calls=2 1918 
* 26
* 2
-1 4
+31 6
cfi=(223)
cfn=(4960)
calls=2 162 
* 16
+2 4
+3 6
+7 6
cfi=(151)
cfn=(3280)
calls=2 1161 
* 206
+2 4
+2 6
+1 4
+15 4
+19 6
cfn=(4900)
calls=1 2234 
* 2348
* 1
+2 2
+2 2
+12 2
+1 5
cfi=(272)
cfn=(4888)
calls=1 2284 
* 476
* 1
+2 12
cfn=(5054)
calls=1 816 
* 203
* 1
+8 3
+1 1
+36 2
+68 20

fn=(4920)
2082 16
+4 24
cfi=(272)
cfn=(4922)
calls=4 2446 
* 23825
+2 4
+1 8

fn=(5052)
83 9
+4 6
cfn=(4898)
calls=1 545 
* 2411
* 3
+12 2
+1 7
+3 12
cfn=(4932)
calls=1 +56 
* 3112
* 1
+12 10
-3 11
cfn=(5056) coerce_type_typmod
calls=1 744 
* 17
* 1
+5 3
+12 1
+1 2

fn=(5056)
744 11
+8 2
+1 2
+16 2

fn=(5066)
2136 5
+6 3
+1 2
+58 2

fl=(166)
fn=(3140)
335 9056
+3 9056
+3 11320
+1 4528
+1 4528

fn=(5668)
274 7
+1 8
cfi=(94)
cfn=(5670)
calls=1 165 
* 567
+2 2

fn=(5682)
367 6
+10 2
+1 4
+5 1
+1 2

fn=(2998)
301 26376
+7 25196
+1 2360
+2 30020
+1 12008
+1 13188

fn=(5338)
350 4
+3 4
+3 5
+1 3
+1 2

fl=(195)
fn=(3504) XidInMVCCSnapshot
1476 12955
+12 15546
cfi=(166)
cfn=(2998)
calls=2591 301 
* 41097
* 5182
+1 5182
+95 5182

fn=(3502)
965 15834
+1 7917
+5 15834
1073 15834
+1 15546
cfn=(3504)
calls=2591 1476 
* 85144
-1 5182
+7 15834
+1 5278
+67 5278

fl=(253)
fn=(4492)
78 4635
+1 7725
+1 3090

fn=(4862)
90 21
+1 35
+1 14

fl=(277)
fn=(4712)
2228 12
+1 12
+1 6

fn=(4684)
2109 12
+9 15
+1 3
+34 6

fn=(4688)
2171 15
+5 12
+1 3
+36 6

fl=(33) /home/mithuncy/fsm_p11patch/src/backend/utils/hash/hashfn.c
fn=(2224) tag_hash
53 223500
+1 268200
cfi=(34)
cfn=(840)
calls=44700 429 
* 4981089
+2 89400

fn=(2940) uint32_hash
65 38915
+2 31132
cfi=(34)
cfn=(2942) hash_uint32
calls=7783 894 
* 358018
+1 15566

fn=(838) string_hash
35 320
+6 192
cob=(3)
cfi=(3)
cfn=(424)
calls=64 -41 
* 1164
* 64
* 64
+2 384
+1 384
cfi=(34)
cfn=(840)
calls=64 429 
* 8620
+2 128

fl=(34)
fn=(840)
429 412128
+7 45792
+1 137376
+3 183168
+3 45763
+3 45763
+2 91150
+1 136725
+1 136725
+1 1367250
+1 45575
+1 45575
-7 182676
+11 45763
+41 228815
+3 915
+3 915
+3 915
+4 549
+1 366
+1 183
-9 115
+3 115
+4 69
+1 46
+1 23
-6 10
+4 6
+1 4
+1 2
-2 107139
+1 71426
+1 35713
+2 45
+3 45
+3 36
+3 18
+1 9
-7 15
+3 12
+3 6
+1 3
-1 18000
+1 9000
+2 30
+3 30
+3 24
-3 90
+3 45009
+10 29
+7 450
+1 475
+1 475
+2 750
+1 25
+1 25
-13 108
+56 145
+6 15
+3 15
+4 15
+3 15
+3 15
+3 12
+3 15
+3 15
+3 15
+3 9
+6 39
-31 5
+4 5
+3 5
+3 5
+3 4
+3 5
+3 5
+3 5
+3 3
+6 18
-27 10
+3 10
+3 10
+3 8
+3 10
+3 10
+3 10
+3 6
+6 46
-24 5
+3 5
+3 4
+3 5
+3 5
+3 5
+3 3
+6 28
-21 20
+3 16
+3 20
+3 20
+3 20
+3 12
+6 112
+3 4
+1 16
-22 12
+3 15
+3 15
+3 15
+3 9
+6 84
+3 3
+1 21
-19 20
+3 20
+3 20
+3 12
+6 112
+3 4
+1 28
-16 10
+3 10
+3 6
+6 56
+3 2
+1 14
-13 15
+3 9
+6 84
+3 3
+1 21
-10 6
+6 56
+3 2
+1 14
-4 1281476
+3 45767
+1 320369
-4 45
+3 3
+1 21
-4 10
+3 1
+1 7
-4 10
+3 2
+1 14
-1 1
+1 19

fn=(2942)
894 46698
+5 23349
+1 23349
+2 217924
+3 7783
+1 38915

fn=(4976)
208 8
+1 6
+2 16
cfn=(840)
calls=2 429 
* 137
+1 4

fl=(59)
fn=(1226) parse_bool_with_len
37 3042
+1 4563
+13 2500
cfi=(32)
cfn=(970)
calls=500 +19 
* 57500
* 1000
+2 1000
+1 1000
+1 1000
+14 15
cfi=(32)
cfn=(970)
calls=3 +1 
* 165
* 6
+2 6
+1 6
+1 6
+6 32
cfi=(32)
cfn=(970)
calls=4 -9 
* 248
* 8
+2 4
+1 4
+1 4
+2 16
cfi=(32)
cfn=(970)
calls=2 -15 
* 150
* 4
+2 4
+1 4
+1 4
+26 1014

fn=(1224)
31 2535
+1 1521
cob=(3)
cfi=(3)
cfn=(424)
calls=507 -32 
* 7605
* 507
* 3042
cfn=(1226)
calls=507 +5 
* 73305
+1 1014

fl=(109) /home/mithuncy/fsm_p11patch/src/backend/replication/walreceiverfuncs.c
fn=(2070) WalRcvShmemSize
43 9
+1 3
+2 12
cfi=(87)
cfn=(2002)
calls=3 476 
* 63
* 3
+2 3
+1 6

fn=(2284) WalRcvShmemInit
54 3
+4 1
cfn=(2070)
calls=1 -15 
* 33
* 4
cfi=(87)
cfn=(2168)
calls=1 373 
* 1005
-1 1
+3 4
+3 4
cfn=(2070)
calls=1 -20 
* 33
* 19
cob=(3)
cfi=(3)
cfn=(828)
calls=1 -63 
* 254
* 1
+1 2
+1 2
+1 2
+2 2

fl=(224)
fn=(3926)
445 11
+14 2
+1 2
+1 2
+1 8
cob=(3)
cfi=(3)
cfn=(370)
calls=1 0 
* 28
* 1
* 4
+2 2
+1 4
+1 3
+1 3
+2 3
cfi=(208)
cfn=(3732)
calls=1 110 
* 10
* 1
+3 3
+5 4
cfn=(3928)
calls=1 220 
* 84
* 2
+5 7
586 2
+1 1
+15 4
+2 3
cfi=(208)
cfn=(3732)
calls=1 110 
* 10
+2 2
+1 2
+1 2
+2 3
+1 7

fn=(3940)
689 10
+15 2
+1 2
+2 3
+10 3
cfi=(156)
cfn=(3942)
calls=1 393 
* 26
+4 3
+16 2
+1 2
+1 2
+1 2
+1 2
+1 2
+1 8
cob=(3)
cfi=(3)
cfn=(370)
calls=1 0 
* 28
* 1
* 4
+2 2
+1 4
+1 3
+1 3
+2 3
cfi=(208)
cfn=(3732)
calls=1 110 
* 10
+2 6
+44 10
cfn=(3944) PortalRunMulti
calls=1 1206 
* 367659267
+4 3
cfi=(156)
cfn=(5586)
calls=1 412 
* 30
+3 1
+1 1
+28 4
+2 4
+1 3
cfi=(208)
cfn=(3732)
calls=1 110 
* 10
* 1
+3 2
+1 3
+1 3
+3 2
+2 3
+5 1
+1 2

fn=(3928)
220 2016
+10 1512
cfi=(220)
cfn=(3892)
calls=504 90 
* 5040
* 1008
+2 1512
cfi=(220)
cfn=(3894)
calls=504 78 
* 5040
* 1008
+2 2016
+2 1006
+2 2012
+2 2012
+2 12
+3 6
+2 2000
+2 2000
cfi=(221)
cfn=(3930)
calls=500 1747 
* 9000
* 1000
+3 1000
+4 4
+2 2
+2 4
+2 4
+7 4
+2 4
cfi=(221)
cfn=(3930)
calls=1 1747 
* 18
* 2
+3 2
+52 1008

fn=(3946) PortalRunUtility
1134 10
+1 3
+14 4
+1 2
-1 2
+2 2
-1 2
+2 2
-1 2
+2 2
-1 2
+3 2
-2 2
+3 2
-1 2
+2 2
-1 2
+2 2
-1 2
+2 2
-10 2
+12 1
cfi=(110)
cfn=(2986)
calls=1 305 
* 588
* 1
+2 2
+5 3
cfi=(110)
cfn=(3948)
calls=1 734 
* 391
+2 1
cfi=(110)
cfn=(3950)
calls=1 840 
* 6
* 2
+5 17
cfi=(221)
cfn=(3952)
calls=1 345 
* 367657660
+9 4
cfi=(208)
cfn=(3732)
calls=1 110 
* 10
+7 3
cfi=(110)
cfn=(4582)
calls=1 852 
* 7
* 2
+1 1
cfi=(110)
cfn=(3950)
calls=1 840 
* 6
-1 2
+2 1
cfi=(110)
cfn=(4800)
calls=1 813 
* 264
+1 2

fn=(3944)
1206 11
+1 1
+13 4
+2 4
+7 4
cfi=(220)
cfn=(3894)
calls=1 78 
* 10
* 2
+2 3
+5 3
+2 4
+79 4
+4 10
cfn=(3946)
calls=1 1134 
* 367659027
* 1
+16 4
+8 4
cfi=(13)
cfn=(3708)
calls=1 257 
* 11
1229 7
1349 2
+15 6
+2 4
+1 6
cob=(3)
cfi=(3)
cfn=(810)
calls=1 0 
* 14
* 1
+1 4
cob=(3)
cfi=(3)
cfn=(446)
calls=1 0 
* 22
* 1
* 2
+2 4
cob=(3)
cfi=(3)
cfn=(446)
calls=1 0 
* 22
* 1
* 2
+2 4
cob=(3)
cfi=(3)
cfn=(446)
calls=1 0 
* 22
* 1
* 2
+2 4
cob=(3)
cfi=(3)
cfn=(446)
calls=1 0 
* 22
* 1
* 2
+3 4

fn=(3932)
625 7
+5 4
+1 1
+29 4

fl=(256)
fn=(4878)
90 12
+1 18
+1 8

fn=(4520)
78 12
+1 18
+1 8
-2 10584
+1 14616
+1 7056

fl=(165)
fn=(5284)
2450 3000
+5 1500
+2 1000
+1 500
+45 2000

fn=(3600)
4974 6
+2 2
+10 2
+1 8
+10 12
cfn=(3602) afterTriggerMarkEvents
calls=2 4417 
* 34
* 4
+13 4
+2 4

fn=(5490)
4830 2000
+10 2000
+2 1500
+1 500
+66 1000

fn=(3608)
5030 10
+10 6
+14 2
+1 2
+8 2
+1 2
+1 2
+3 2
+1 4

fn=(5254)
2141 2500
+5 1000
+1 1000
+42 2000

fn=(5282)
4688 3000
+8 1000
+1 1000
+69 1000

fn=(5280)
4810 1000
+2 1500
+1 1000

fn=(5488)
2508 3000
+1 1500
+2 1000
+3 1000

fn=(3602)
4417 14
+1 2
+4 12
+39 2
+1 4

fn=(2982)
4778 4
+4 2
+1 2
+14 4

fl=(204) /home/mithuncy/fsm_p11patch/src/backend/access/transam/../../../../src/include/lib/ilist.h
fn=(3652) dlist_init
279 6
+1 14
+1 4

fl=(243)
fn=(4472) _copyFromExpr
2169 24
+1 24
cfi=(13)
cfn=(3400)
calls=6 853 
* 918
* 30
+2 24
cfn=(4377) copyObjectImpl'2
calls=6 4767 
* 60
* 12
+1 24
cfn=(4377)
calls=6 4767 
* 60
* 12
+2 6
+1 12

fn=(4728) CopyPlanFields
116 15
+1 12
+1 12
+1 12
+1 12
+1 12
+1 12
+1 12
+1 12
cfn=(4377)
calls=3 4767 
* 6428
* 6
+1 12
cfn=(4377)
calls=3 4767 
* 30
* 6
+1 12
cfn=(4377)
calls=3 4767 
* 30
* 6
+1 12
cfn=(4377)
calls=3 4767 
* 30
* 6
+1 12
cfn=(4377)
calls=3 4767 
* 30
* 6
+1 12
cfi=(276)
cfn=(4680)
calls=3 +5 
* 30
* 6
+1 12
cfi=(276)
cfn=(4680)
calls=3 +4 
* 30
* 6
+1 6

fn=(4386) _copyAConst
2589 16
+1 16
cfi=(13)
cfn=(3400)
calls=4 853 
* 1463
* 20
+3 16
+1 28
+3 8
+1 2
+4 16
cfi=(13)
cfn=(928)
calls=2 1162 
* 399
* 6
+1 2
+10 16
+2 4
+1 8

fn=(4988) _copyParam
1407 24
+1 24
cfi=(13)
cfn=(2156)
calls=6 815 
* 912
* 30
+2 24
+1 24
+1 24
+1 24
+1 24
+1 24
+2 6
+1 12

fn=(4382) _copyList
4660 65
+7 52
cfi=(13)
cfn=(3400)
calls=13 853 
* 1989
* 65
+1 52
+2 26
cfi=(13)
cfn=(940)
calls=13 925 
* 1599
* 117
cfn=(4377)
calls=13 +97 
* 35193
* 13
+1 39
+1 52
+2 13
+2 2
cfi=(13)
cfn=(940)
calls=1 925 
* 123
* 8
cfn=(4377)
calls=1 +91 
* 490
* 1
+1 3
+1 3
-4 28
+6 26
+1 39
+2 13
+1 52

fn=(4383) _copyList'2
4660 95
+7 76
cfi=(13)
cfn=(3400)
calls=19 853 
* 3229
* 95
+1 76
+2 38
cfi=(13)
cfn=(940)
calls=19 925 
* 2337
* 171
cfn=(4377)
calls=19 +97 
* 20494
* 19
+1 57
+1 76
+2 19
+2 14
cfi=(13)
cfn=(940)
calls=7 925 
* 861
* 56
cfn=(4377)
calls=7 +91 
* 8594
* 7
+1 21
+1 21
-4 52
+6 38
+1 57
+2 19
+1 76

fn=(4474) _copyTargetEntry
2117 36
+1 36
cfi=(13)
cfn=(3400)
calls=9 853 
* 1566
* 45
+2 36
cfn=(4377)
calls=9 4767 
* 10960
* 18
+1 36
+1 72
cfi=(13)
cfn=(928)
calls=9 1162 
* 1670
* 27
+1 36
+1 36
+1 36
+1 36
+2 9
+1 18

fn=(4818) _copyColumnRef
2567 4
+1 4
cfi=(13)
cfn=(3400)
calls=1 853 
* 153
* 5
+2 4
cfn=(4377)
calls=1 4767 
* 1185
* 2
+1 4
+2 1
+1 2

fn=(4984) _copyFuncExpr
1513 12
+1 12
cfi=(13)
cfn=(3400)
calls=3 853 
* 522
* 15
+2 12
+1 12
+1 12
+1 12
+1 12
+1 12
+1 12
+1 12
cfn=(4377)
calls=3 4767 
* 8506
* 6
+1 12
+2 3
+1 6

fn=(4986) _copyOpExpr
1550 16
+1 16
cfi=(13)
cfn=(3400)
calls=4 853 
* 696
* 20
+2 16
+1 16
+1 16
+1 16
+1 16
+1 16
+1 16
cfn=(4377)
calls=4 4767 
* 5373
* 8
+1 16
+2 4
+1 8

fn=(4814) _copyValue
4713 12
+1 12
cfi=(13)
cfn=(3400)
calls=3 853 
* 438
* 15
+4 12
+1 18
+8 24
cfi=(13)
cfn=(928)
calls=3 1162 
* 927
* 9
+1 3
+9 3
+1 6

fn=(4376)
4767 60
+3 30
+4 15
cfi=(52)
cfn=(3958)
calls=15 3263 
* 405
+2 120
4954 6
cfn=(4988)
calls=2 1407 
* 384
* 2
+1 2
+20 3
cfn=(4986)
calls=1 1550 
* 1699
* 1
+1 1
5126 27
cfn=(4382)
calls=9 4660 
* 30303
* 9
+1 9
+25 9
cfn=(4378) _copyRawStmt
calls=3 3036 
* 10768
* 3
+1 3
5657 15
+1 30

fn=(4377)
4767 1192
+3 596
+1 414
+3 91
cfi=(52)
cfn=(3958)
calls=91 3263 
* 2457
+2 728
+6 9
cfn=(4724) _copyPlannedStmt
calls=3 79 
* 9200
* 3
+1 3
+5 9
cfn=(4726) _copyResult
calls=3 155 
* 7640
* 3
+1 3
4951 39
cfn=(4476) _copyConst
calls=13 1369 
* 4717
* 13
+1 13
+2 12
cfn=(4988)
calls=4 1407 
* 768
* 4
+1 4
+14 9
cfn=(4984)
calls=3 1513 
* 9190
* 3
+1 3
+5 9
cfn=(4986)
calls=3 1550 
* 4570
* 3
+1 3
+32 6
cfn=(5096) _copyCoerceViaIO
calls=2 1753 
* 880
* 2
+1 2
+65 27
cfn=(4474)
calls=9 2117 
* 14673
* 9
+1 9
+8 18
cfn=(4472)
calls=6 2169 
* 1206
* 6
+1 6
+35 9
cfn=(4814)
calls=3 4713 
* 1479
* 3
+1 3
+6 69
cfn=(4383)
calls=19 4660 
* 36598
cfn=(4382)
calls=4 4660 
* 9760
* 23
+1 23
+22 18
cfn=(4470) _copyQuery
calls=6 2991 
* 17719
* 6
+1 6
+14 9
cfn=(4380) _copySelectStmt
calls=3 3093 
* 10069
* 3
+1 3
5500 3
cfn=(4816) _copyAExpr
calls=1 2553 
* 2850
* 1
+1 1
+2 3
cfn=(4818)
calls=1 2567 
* 1364
* 1
+1 1
+5 12
cfn=(4386)
calls=4 2589 
* 2020
* 4
+1 4
+2 3
cfn=(4812) _copyFuncCall
calls=1 2620 
* 5192
* 1
+1 1
+14 9
cfn=(4384) _copyResTarget
calls=3 2681 
* 7207
* 3
+1 3
5657 91
+1 596

fn=(4470)
2991 24
+1 24
cfi=(13)
cfn=(3400)
calls=6 853 
* 1926
* 30
+2 24
+1 24
+1 24
+1 24
+1 24
cfn=(4377)
calls=6 4767 
* 60
* 12
+1 24
+1 24
+1 24
+1 24
+1 24
+1 24
+1 24
+1 24
+1 24
+1 24
+1 24
cfn=(4377)
calls=6 4767 
* 60
* 12
+1 24
cfn=(4377)
calls=6 4767 
* 60
* 12
+1 24
cfn=(4377)
calls=6 4767 
* 1506
* 12
+1 24
cfn=(4377)
calls=6 4767 
* 12079
* 12
+1 24
+1 24
cfn=(4377)
calls=6 4767 
* 60
* 12
+1 24
cfn=(4377)
calls=6 4767 
* 60
* 12
+1 24
cfn=(4377)
calls=6 4767 
* 60
* 12
+1 24
cfn=(4377)
calls=6 4767 
* 60
* 12
+1 24
cfn=(4377)
calls=6 4767 
* 60
* 12
+1 24
cfn=(4377)
calls=6 4767 
* 60
* 12
+1 24
cfn=(4377)
calls=6 4767 
* 60
* 12
+1 24
cfn=(4377)
calls=6 4767 
* 60
* 12
+1 24
cfn=(4377)
calls=6 4767 
* 60
* 12
+1 24
cfn=(4377)
calls=6 4767 
* 60
* 12
+1 24
cfn=(4377)
calls=6 4767 
* 60
* 12
+1 24
cfn=(4377)
calls=6 4767 
* 60
* 12
+1 24
cfn=(4377)
calls=6 4767 
* 60
* 12
+1 24
cfn=(4377)
calls=6 4767 
* 60
* 12
+1 24
+1 24
+2 6
+1 12

fn=(4812)
2620 4
+1 4
cfi=(13)
cfn=(3400)
calls=1 853 
* 430
* 5
+2 4
cfn=(4377)
calls=1 4767 
* 786
* 2
+1 4
cfn=(4377)
calls=1 4767 
* 3880
* 2
+1 4
cfn=(4377)
calls=1 4767 
* 10
* 2
+1 4
cfn=(4377)
calls=1 4767 
* 10
* 2
+1 4
+1 4
+1 4
+1 4
+1 4
cfn=(4377)
calls=1 4767 
* 10
* 2
+1 4
+2 1
+1 2

fn=(4724)
79 12
+1 12
cfi=(13)
cfn=(3400)
calls=3 853 
* 732
* 15
+2 12
+1 12
+1 12
+1 12
+1 12
+1 12
+1 12
+1 12
+1 12
+1 12
cfn=(4377)
calls=3 4767 
* 7790
* 6
+1 12
cfn=(4377)
calls=3 4767 
* 30
* 6
+1 12
cfn=(4377)
calls=3 4767 
* 30
* 6
+1 12
cfn=(4377)
calls=3 4767 
* 30
* 6
+1 12
cfn=(4377)
calls=3 4767 
* 30
* 6
+1 12
cfi=(276)
cfn=(4680)
calls=3 +38 
* 30
* 6
+1 12
cfn=(4377)
calls=3 4767 
* 30
* 6
+1 12
cfn=(4377)
calls=3 4767 
* 30
* 6
+1 12
cfn=(4377)
calls=3 4767 
* 30
* 6
+1 12
cfn=(4377)
calls=3 4767 
* 30
* 6
+1 12
cfn=(4377)
calls=3 4767 
* 30
* 6
+1 12
+1 12
+2 3
+1 6

fn=(4476)
1369 52
+1 52
cfi=(13)
cfn=(3400)
calls=13 853 
* 2619
* 65
+2 52
+1 52
+1 52
+1 52
+2 80
+6 30
+7 14
+1 14
-1 42
cfi=(254)
cfn=(4498)
calls=7 129 
* 1332
* 14
+5 28
+1 28
+1 28
+2 7
+1 14
-5 24
+1 24
+1 24
+2 6
+1 12

fn=(5096)
1753 8
+1 8
cfi=(13)
cfn=(3400)
calls=2 853 
* 320
* 10
+2 8
cfn=(4377)
calls=2 4767 
* 484
* 4
+1 8
+1 8
+1 8
+1 8
+2 2
+1 4

fn=(4378)
3036 12
+1 12
cfi=(13)
cfn=(3400)
calls=3 853 
* 459
* 15
+2 12
cfn=(4377)
calls=3 4767 
* 10219
* 6
+1 12
+1 12
+2 3
+1 6

fn=(4384)
2681 12
+1 12
cfi=(13)
cfn=(3400)
calls=3 853 
* 501
* 15
+2 21
+1 12
cfn=(4377)
calls=3 4767 
* 30
* 6
+1 12
cfn=(4377)
calls=3 4767 
* 6559
* 6
+1 12
+2 3
+1 6

fn=(4816)
2553 4
+1 4
cfi=(13)
cfn=(3400)
calls=1 853 
* 167
* 5
+2 4
+1 4
cfn=(4377)
calls=1 4767 
* 786
* 2
+1 4
cfn=(4377)
calls=1 4767 
* 441
* 2
+1 4
cfn=(4377)
calls=1 4767 
* 1414
* 2
+1 4
+2 1
+1 2

fn=(4726)
155 12
+1 12
cfi=(13)
cfn=(3400)
calls=3 853 
* 690
* 15
+5 15
cfn=(4728)
calls=3 -45 
* 6839
+5 12
cfn=(4377)
calls=3 4767 
* 30
* 6
+2 3
+1 6

fn=(4380)
3093 12
+1 12
cfi=(13)
cfn=(3400)
calls=3 853 
* 774
* 15
+2 12
cfn=(4377)
calls=3 4767 
* 30
* 6
+1 12
cfn=(4377)
calls=3 4767 
* 30
* 6
+1 12
cfn=(4377)
calls=3 4767 
* 8485
* 6
+1 12
cfn=(4377)
calls=3 4767 
* 30
* 6
+1 12
cfn=(4377)
calls=3 4767 
* 30
* 6
+1 12
cfn=(4377)
calls=3 4767 
* 30
* 6
+1 12
cfn=(4377)
calls=3 4767 
* 30
* 6
+1 12
cfn=(4377)
calls=3 4767 
* 30
* 6
+1 12
cfn=(4377)
calls=3 4767 
* 30
* 6
+1 12
cfn=(4377)
calls=3 4767 
* 30
* 6
+1 12
cfn=(4377)
calls=3 4767 
* 30
* 6
+1 12
cfn=(4377)
calls=3 4767 
* 30
* 6
+1 12
cfn=(4377)
calls=3 4767 
* 30
* 6
+1 12
cfn=(4377)
calls=3 4767 
* 30
* 6
+1 12
+1 12
+1 12
cfn=(4377)
calls=3 4767 
* 30
* 6
+1 12
cfn=(4377)
calls=3 4767 
* 30
* 6
+2 3
+1 6

fl=(30)
fn=(788)
364 2
+8 2
cfn=(790) pg_tzset
calls=1 237 
* 15784
* 1
+1 2
+1 2

fn=(792) init_timezone_hashtable
203 3
+3 118
+2 1
+1 1
+2 6
cfi=(31)
cfn=(794)
calls=1 317 
* 5889
* 1
+4 3
+3 1
+1 2

fn=(1426) pg_TZDIR
44 4
+6 3
+3 3
cfi=(11)
cfn=(1428)
calls=1 705 
* 4559
+1 2
cob=(3)
cfi=(3)
cfn=(424)
calls=1 -54 
* 21
* 1
* 5
cob=(3)
cfi=(3)
cfn=(424)
calls=1 -54 
* 21
* 1
* 5
cfi=(16)
cfn=(460)
calls=1 -8 
* 164
+2 1
+1 1
+5 4

fn=(790)
237 35
+7 21
cob=(3)
cfi=(3)
cfn=(424)
calls=7 0 
* 121
* 7
* 14
+3 21
+1 1
cfn=(792)
calls=1 -45 
* 6025
* 3
+9 14
+1 7
+1 850
cfi=(32)
cfn=(834)
calls=85 106 
* 1273
* 85
-1 368
+2 14
+2 42
cfi=(31)
cfn=(836)
calls=7 910 
* 3680
* 7
+4 14
+3 15
+6 8
cob=(3)
cfi=(3)
cfn=(446)
calls=2 0 
* 44
* 2
* 4
+2 6
cfi=(35)
cfn=(846)
calls=1 938 
* 1484
* 3
+6 5
cob=(3)
cfi=(3)
cfn=(810)
calls=1 0 
* 14
* 1
* 1
+2 6
cfi=(35)
cfn=(1420)
calls=1 589 
* 1248590
* 2
+12 12
cfi=(31)
cfn=(836)
calls=2 910 
* 1144
* 2
+6 12
cob=(3)
cfi=(3)
cfn=(810)
calls=2 0 
* 76
* 2
+1 14
cob=(3)
cfi=(3)
cfn=(856)
calls=2 0 
* 14724
* 2
+2 4
+1 28

fn=(1424)
77 6
+7 1
cfn=(1426)
calls=1 -40 
* 4795
* 6
cfi=(16)
cfn=(460)
calls=1 -38 
* 822
+1 3
cob=(3)
cfi=(3)
cfn=(424)
calls=1 -85 
* 23
* 1
* 3
+2 6
cob=(3)
cfi=(3)
cfn=(424)
calls=1 -87 
* 19
* 1
* 3
+10 2
+18 2
+6 4
cob=(3)
cfi=(3)
cfn=(1120)
calls=1 0 
* 14
* 1
* 4
cob=(3)
cfi=(3)
cfn=(1120)
calls=1 0 
* 27
* 1
* 2
+1 4
+1 6
+2 3
cob=(3)
cfi=(3)
cfn=(424)
calls=1 0 
* 19
* 1
* 1
+1 3
+1 3
-1 8
cfn=(1430) scan_directory_ci
calls=1 +27 
* 30333
* 3
+1 3
-1 8
cfn=(1430)
calls=1 +27 
* 8838
* 6
+4 10
+1 12
cob=(3)
cfi=(3)
cfn=(424)
calls=2 0 
* 34
* 2
* 8
+1 4
+1 3
+3 1
-1 1
+3 2
+1 10
cfi=(16)
cfn=(460)
calls=1 -93 
* 304
+2 6
cob=(5)
cfi=(5)
cfn=(676)
calls=1 0 
* 7
* 1
+1 4

fn=(1430)
153 16
+1 2
+4 6
cfi=(25)
cfn=(718)
calls=2 2447 
* 608
* 2
+2 2
+6 564
+1 4
+2 548
cob=(3)
cfi=(3)
cfn=(424)
calls=137 0 
* 2411
* 137
* 548
+1 104
cfi=(32)
cfn=(970)
calls=13 70 
* 1131
-1 26
+4 16
cfi=(16)
cfn=(460)
calls=2 46 
* 328
+1 2
+1 2
-15 846
cfi=(25)
cfn=(1432)
calls=141 2528 
* 31065
* 423
+19 6
cfi=(25)
cfn=(738)
calls=2 2565 
* 368
+2 2
+1 4

fl=(145)
fn=(2864)
110 6
+1 4
+2 4
+1 2
+1 4

fl=(49)
fn=(990)
652 12
+2 3
+1 6

fn=(988)
592 21
+5 3
cfi=(26)
cfn=(986)
calls=3 334 
* 30
* 6
+49 3
+1 12

fl=(196)
fn=(3516)
214 12174
+2 2029
+1 2029
+13 14203
+2 2029
+2 8116
+38 10145
+2 8116
+8 20290
+1 8116
+8 12174
+4 4052
+2 22286
+2 2026
+1 2026
-5 6078
+11 8116
+2 9
+1 3
+11 6
+3 45
+3 30
+1 30
-1 9
+3 3
+2 50
+2 20
+3 61
+2 15
+2 20
-11 29
+16 33
+4 2026
+13 2026
+1 2026
+2 20260
+2 8104
-2 20290
+2 8116
+7 16214
+1 8104
+1 8116
+21 18261
+2 4058
+4 12165
+1 2026
+2 28394
cob=(3)
cfi=(3)
cfn=(424)
calls=2026 0 
* 31206
* 2026
* 10130
+2 4052
-2 3
+2 8110
+1 2026
-46 2026
+47 2026
-47 3
+47 3
+3 81171
+1 4058

fl=(251)
fn=(4478)
2637 21
+5 396
+1 3
+1 3
+1 3
+2 3
+2 1467
+1 3
+1 6
+2 15
cfn=(4480) extract_query_dependencies_walker
calls=3 +17 
* 3829
+2 9
+1 9
+1 9
+1 6

fn=(4716) add_rtes_to_flat_rtable
252 18
+1 9
+11 15
cfi=(252)
cfn=(4484)
calls=3 78 
* 24
* 12
+18 3
+1 15
cfi=(252)
cfn=(4484)
calls=3 78 
* 24
* 12
+48 6

fn=(4990)
2553 30
+9 10
+15 20

fn=(4480)
2670 18
+1 6
+3 12
+40 15
cfn=(4482) fix_expr_common
calls=3 1373 
* 138
+1 15
cfi=(247)
cfn=(4450)
calls=3 1843 
* 3613
+2 12

fn=(4481)
2670 294
+1 98
+1 60
+2 76
+2 6
+3 12
+12 12
+4 12
cfi=(252)
cfn=(4484)
calls=3 78 
* 24
* 12
+15 18
cfi=(247)
cfn=(4440)
calls=3 2266 
* 3226
* 3
+4 80
cfn=(4482)
calls=16 1373 
* 771
+1 80
cfi=(247)
cfn=(4451)
calls=16 1843 
* 4661
+2 196

fn=(4714)
210 15
+1 9
+1 12
cfi=(252)
cfn=(4624)
calls=3 90 
* 24
* 3
+8 12
cfn=(4716)
calls=3 +32 
* 138
+5 12
cfi=(252)
cfn=(4484)
calls=3 78 
* 24
* 12
+17 18
cfn=(4718) set_plan_refs
calls=3 435 
* 2663
+1 6

fn=(4722) fix_scan_expr_walker
1592 45
+1 18
+1 12
+2 18
cfn=(4482)
calls=3 1373 
* 138
+1 15
cfi=(247)
cfn=(4450)
calls=3 1843 
* 1769
+2 18

fn=(4723)
1592 55
+1 22
+3 66
cfn=(4482)
calls=11 1373 
* 541
+1 55
cfi=(247)
cfn=(4451)
calls=11 1843 
* 3113
+2 22

fn=(4482)
1373 198
+2 132
+5 132
+5 132
+2 12
cfn=(4990)
calls=2 2553 
* 24
* 2
+3 124
+2 6
cfi=(247)
cfn=(4992)
calls=2 1620 
* 20
+1 12
cfn=(4990)
calls=2 2553 
* 24
* 2
+3 116
+6 116
+6 116
+6 116
+2 16
+3 64
+1 8
+4 84
+25 132

fn=(4718)
435 21
+3 6
+4 21
+5 24
743 6
+6 12
+5 21
cfn=(4720) fix_scan_expr
calls=3 1491 
* 2066
-1 6
+3 21
cfn=(4720)
calls=3 1491 
* 132
-1 6
+5 21
cfn=(4720)
calls=3 1491 
* 132
-1 6
+3 3
1013 21
cfn=(4719) set_plan_refs'2
calls=3 435 
* 45
* 6
+1 21
cfn=(4719)
calls=3 435 
* 45
* 6
+2 3
+1 12

fn=(4719)
435 42
+3 12
+1 12
1017 24

fn=(4720)
1491 54
+3 18
+1 18
+2 18
+1 18
-1 18
+2 27
-1 18
+2 18
-1 18
+17 45
cfn=(4722)
calls=9 +76 
* 2033
+1 9
+2 18

fl=(271)
fn=(4662) cost_qual_eval_node
3748 18
+3 6
+1 6
+1 6
+2 15
cfn=(4664) cost_qual_eval_walker
calls=3 +7 
* 4202
+2 15
+1 6

fn=(4664)
3762 15
+1 6
+9 12
+61 12
+2 3
+1 4
cfi=(272)
cfn=(5100) get_func_cost
calls=1 1613 
* 473
* 4
-1 4
+3 8
+1 4
-1 4
+2 4
-1 4
+8 8
+13 8
+1 4
-1 4
+14 8
+16 8
+12 8
+14 8
+1 4
-1 4
+2 4
-1 4
+2 4
-1 4
+2 4
-1 4
+6 8
+5 8
+5 8
+19 8
+13 8
+16 15
cfi=(247)
cfn=(4450)
calls=3 1843 
* 3496
+2 6

fn=(4665)
3762 25
+1 10
+9 20
+61 20
+5 20
+1 8
-1 8
+2 8
-1 8
+4 3
cfi=(247)
cfn=(4992)
calls=1 1620 
* 10
+1 3
+1 4
cfi=(272)
cfn=(5100)
calls=1 1613 
* 473
* 4
-1 4
+3 16
+13 16
+1 8
-1 8
+14 16
+2 2
+6 7
cfi=(272)
cfn=(5076)
calls=1 2609 
* 511
+2 6
cfi=(272)
cfn=(5100)
calls=1 1613 
* 473
* 7
+2 4
cfi=(247)
cfn=(4434)
calls=1 43 
* 24
* 5
cfi=(272)
cfn=(5078)
calls=1 2642 
* 496
+2 6
cfi=(272)
cfn=(5100)
calls=1 1613 
* 473
* 8
+2 12
+12 12
+14 12
+1 6
-1 6
+2 6
-1 6
+2 6
-1 6
+2 6
-1 6
+6 12
+5 12
+5 12
+19 12
+13 12
+16 25
cfi=(247)
cfn=(4451)
calls=5 1843 
* 2918
+2 10

fn=(4656)
5257 18
+1 3
+4 9
+1 9
+2 12
cfi=(270)
cfn=(4650)
calls=3 78 
* 30
* 6
+2 9
+2 12
+42 9
cfi=(247)
cfn=(4528)
calls=3 277 
* 92
* 12
cfi=(247)
cfn=(4434)
calls=3 43 
* 72
* 9
cfi=(272)
cfn=(4658) get_typavgwidth
calls=3 2324 
* 1491
* 3
+2 6
+3 18
cfn=(4662)
calls=3 3748 
* 4274
+1 18
+1 18
-53 21
+58 9
+2 3
+1 12

fl=(62)
fn=(1322)
1329 20
+7 5
cfn=(1324) GUC_yyensure_buffer_stack
calls=5 1527 
* 2061
+1 55
+3 50
+8 30
+1 5
cfn=(1326) GUC_yy_load_buffer_state
calls=5 +11 
* 150
+7 5
+1 10

fn=(1316) GUC_yyalloc
1837 44
+1 33
cob=(3)
cfi=(3)
cfn=(388)
calls=11 0 
* 2235
* 11
+1 22

fn=(1324)
1527 15
+3 15
+6 1
+2 4
cfn=(1316)
calls=1 1837 
* 212
-1 1
+3 3
+3 6
cob=(3)
cfi=(3)
cfn=(828)
calls=1 0 
* 15
* 1
+2 2
+1 1
+1 1
+3 20
+3 1
+2 5
+2 6
cfn=(1410) GUC_yyrealloc
calls=1 1842 
* 1709
-1 1
+4 3
+4 10
cob=(3)
cfi=(3)
cfn=(828)
calls=1 0 
* 16
* 1
+1 2
+2 10

fn=(1372) GUC_yyfree
1854 40
+1 30
cob=(3)
cfi=(3)
cfn=(590)
calls=10 0 
* 1151
* 10
+1 20

fn=(1328)
754 16478
+10 7062
+2 1
+6 3
+1 1
+2 3
+3 3
+1 2
+2 10
+6 1
cfn=(1326)
calls=1 1360 
* 30
+5 4873
+3 9746
+5 4873
+2 4873
+4 24365
+1 19492
-1 394420
+1 315536
+2 78561
+1 78561
+2 83757
+2 234834
+1 156556
+1 293252
-4 1620350
+6 670056
+1 83757
+2 167514
+1 4887
+1 4887
+3 14661
+2 48870
+4 9774
-6 15
+2 50
+4 14711
fi=(60)
96 11130
+4 88
+2 52
+2 24
+2 82
fe=(62)
904 10
+5 144
+3 48
+3 192
+11 35
+1 35
+1 30
+10 264
+37 24
cfn=(1330) yy_get_next_buffer
calls=24 +69 
* 12837
* 114
+4 5
+13 10
+2 35
+1 5
+13 56
-1 14
+3 14
cfn=(1356) yy_get_previous_state
calls=14 1178 
* 12532
* 14
+2 14
+1 14
+1 14
+4 40
-1 5
+3 5
cfn=(1356)
calls=5 1178 
* 265
* 5
+2 5
+1 5
+1 5
fi=(60)
98 2519
fe=(62)
1033 2519
+1 16478

fn=(1318) GUC_yy_init_buffer
1422 50
+1 10
cob=(5)
cfi=(5)
cfn=(472)
calls=10 0 
* 30
* 10
* 20
+2 30
cfn=(1320) GUC_yy_flush_buffer
calls=10 +24 
* 510
+2 30
+1 20
+6 105
+1 10
+1 10
+3 10
+2 5
cob=(5)
cfi=(5)
cfn=(472)
calls=5 0 
* 15
* 5
-2 10
+2 5
cob=(5)
cfi=(5)
cfn=(472)
calls=5 0 
* 15
* 5
* 20
+1 20

fn=(1326)
1360 32
+1 112
+1 144
+1 112
+1 48
+1 32

fn=(1330)
1044 168
+1 144
+1 24
+4 288
+4 192
+22 144
+2 48
+1 1344
-1 720
+3 192
+4 45
+5 171
-1 38
+3 57
+37 38
+1 19
+3 171
cob=(5)
cfi=(5)
cfn=(472)
calls=19 0 
* 57
* 19
* 304
cob=(3)
cfi=(3)
cfn=(1336)
calls=18 0 
* 3210
cob=(1)
cfi=(1)
cfn=(223)
calls=1 0 
* 1531
* 23
* 91
cob=(3)
cfi=(3)
cfn=(1366)
calls=4 0 
* 144
cob=(1)
cfi=(1)
cfn=(223)
calls=1 0 
* 1296
* 9
* 10
+3 133
+3 72
+2 20
+2 5
+1 15
cfn=(1368) GUC_yyrestart
calls=5 1312 
* 860
* 5
+5 5
+1 35
+6 14
+2 264
+8 96
+1 216
+1 240
+2 168
+2 24
+1 168

fn=(1356)
1178 95
+4 19
+2 38
+2 2016
+1 896
+2 210
+1 210
+2 224
+2 630
+1 420
+1 840
-4 4340
+6 1792
-14 953
+17 19
+1 95

fn=(1368)
1312 25
+2 50
+6 65
cfn=(1318)
calls=5 1422 
* 545
+1 5
cfn=(1326)
calls=5 +39 
* 150
+1 20

fn=(1370)
1402 20
+2 10
+3 55
+1 25
+2 20
+1 20
cfn=(1372)
calls=5 1854 
* 776
+2 15
cfn=(1372)
calls=5 1854 
* 475
+1 10

fn=(1314)
1374 25
+3 10
cfn=(1316)
calls=5 1837 
* 693
* 5
+1 10
+3 20
+5 25
cfn=(1316)
calls=5 1837 
* 1440
* 10
+1 20
+3 10
+2 25
cfn=(1318)
calls=5 +30 
* 400
+2 5
+1 10

fn=(1410)
1842 5
+8 5
cob=(1)
cfi=(1)
cfn=(223)
calls=1 0 
* 1692
* 5
+1 2

fn=(1320)
1449 40
+1 20
+3 20
+6 30
+1 40
+2 40
+2 20
+1 20
+2 105
+1 5
cfn=(1326)
calls=5 1360 
* 150
+1 20

fl=(64)
fn=(1546) CheckDateTokenTable
4421 12
+1 2
+3 4
+3 1096
cob=(3)
cfi=(3)
cfn=(424)
calls=137 0 
* 2055
* 137
* 274
+10 274
+1 2160
cob=(3)
cfi=(3)
cfn=(446)
calls=135 0 
* 2970
* 135
-1 270
-13 554
+23 2
+1 4

fn=(1544)
4453 4
+1 1
+5 6
cfn=(1546)
calls=1 -38 
* 5376
* 5
+1 6
cfn=(1546)
calls=1 -39 
* 4573
* 5
+1 1
+1 4

fn=(1518)
4508 10
+7 6
-1 4
+2 8
+2 4
+2 3920
+2 1568
+5 408
cob=(3)
cfi=(3)
cfn=(424)
calls=102 0 
* 1814
* 102
-1 204
+2 408
-10 1574
+15 6
cob=(3)
cfi=(3)
cfn=(388)
calls=2 0 
* 546
* 2
* 2
+1 4
+4 6
+1 6
+3 6
-1 4
+2 8
+1 4
+2 3920
+1 3136
+3 2744
cfi=(16)
cfn=(460)
calls=392 46 
* 34860
+1 1568
+6 408
+1 204
+1 714
cob=(3)
cfi=(3)
cfn=(810)
calls=102 0 
* 4582
* 102
+2 204
+2 408
+3 408
cob=(3)
cfi=(3)
cfn=(424)
calls=102 0 
* 1814
* 102
-1 204
+2 510
+4 1934
+1 776
-28 776
+27 192
+1 384
-28 798
+38 2
+1 4

fn=(1520)
4592 8
+1 4
+2 8
cob=(3)
cfi=(3)
cfn=(828)
calls=2 0 
* 74
* 2
+1 4

fl=(176)
fn=(3224)
75 13205
+1 23769
+9 2641
cfi=(53)
cfn=(2878)
calls=2641 7896 
* 29051
* 5282
+17 7923
cfi=(170)
cfn=(3226)
calls=2641 -5 
* 100358
* 5282
+2 7923
+14 18487
+1 2641
+42 5282

fl=(216)
fn=(3864)
67 18168
+7 9084
cob=(3)
cfi=(3)
cfn=(424)
calls=3028 -74 
* 49400
* 3028
* 3028
+2 6056
+7 6056
+2 116418
+2 72044
+1 6087
+1 24348
-6 24348
+6 53264
-6 62348
+8 9084
+5 6056
+1 21196
+1 3028
+5 352562
+1 151098
cob=(3)
cfi=(3)
cfn=(446)
calls=25183 0 
* 811674
* 25183
* 25183
+1 50366
+1 4034
+1 46332
+1 44336
+2 36246
-12 78582
+15 1011
+1 6056

fl=(309)
fn=(5356)
323 20000
+1 10000
+1 2000
+2 2000
+1 2000
+5 8000
+8 4000
+7 46000
+3 4000
+3 2000
+15 10000
+6 12000
+1 6000
cfi=(50)
cfn=(3476)
calls=1500 2612 
* 24000
* 3000
+2 3000
+2 5000
+6 4000
cfi=(310)
cfn=(5358)
calls=500 158 
* 2811038
* 500
+6 2000
+15 7000
+3 21000
cfn=(5382) ReadBufferBI
calls=3500 82 
* 3081309
* 3500
+1 45500
+1 3000
cfi=(311)
cfn=(5386)
calls=500 221 
* 1929470
+1 14000
cfi=(50)
cfn=(3232)
calls=3500 3553 
* 577500
* 3500
+50 7000
+1 35000
cfn=(5390) GetVisibilityMapPins
calls=3500 125 
* 168000
* 3500
+12 31500
+1 10500
cfi=(312)
cfn=(5394)
calls=3500 663 
* 164500
* 3500
+1 17500
+3 4000
+6 1000
+1 500
cfi=(310)
cfn=(5398)
calls=500 291 
* 13500
+2 1000
+9 12000
cfi=(50)
cfn=(3232)
calls=3000 3553 
* 342000
+1 6000
+1 9000
cfi=(50)
cfn=(3258)
calls=3000 3316 
* 441000
* 3000
+8 12000
+7 24000
cfi=(310)
cfn=(5408)
calls=3000 207 
* 3813878
* 3000
392 10000
530 19500
+8 3000
+2 6000
+2 6000
cfi=(160)
cfn=(5412)
calls=1500 418 
* 3206884
* 4500
+38 7500
cfn=(5382)
calls=1500 82 
* 6728325
* 1500
+6 3000
+6 6000
cfi=(50)
cfn=(3232)
calls=1500 3553 
* 247500
+8 3000
+1 6000
cfi=(160)
cfn=(5474)
calls=1500 450 
* 2869206
+7 13500
+2 6000
+5 7500
cfi=(312)
cfn=(5476)
calls=1500 42 
* 1456500
+2 4500
cfi=(312)
cfn=(5394)
calls=1500 +46 
* 63000
* 3000
+15 13500
cfi=(50)
cfn=(3476)
calls=1500 2612 
* 24000
* 1500
+7 1500
cfi=(310)
cfn=(5398)
calls=1500 291 
* 40500
+2 1500
+1 8000

fn=(5382)
82 30000
+4 10000
+4 20000
+2 18000
cfi=(50)
cfn=(3476)
calls=4500 2612 
* 72000
* 9000
+2 6000
cfi=(50)
cfn=(5384) IncrBufferRefCount
calls=1500 3354 
* 175500
+1 4500
+3 12000
cfi=(50)
cfn=(3258)
calls=3000 3316 
* 723000
+1 6000
+4 27000
cfi=(50)
cfn=(3194)
calls=3000 642 
* 7709285
* 4500
cfi=(50)
cfn=(3194)
calls=500 642 
* 535349
* 3500
+4 10500
cfi=(50)
cfn=(5384)
calls=3500 3354 
* 409500
+1 10500
+2 3500
+1 10000

fn=(5400)
40 700000
+11 787500
+2 875000
cfi=(312)
cfn=(5402)
calls=87500 195 
* 24622500
* 87500
+3 175000
+4 262500
cfi=(50)
cfn=(3476)
calls=87500 2612 
* 1400000
* 612500
cfi=(50)
cfn=(3476)
calls=87500 2612 
* 1400000
* 525000
+7 350000
+2 787500
+1 612500
+2 525000
+2 175000

fn=(5390)
125 31500
+10 38500
+1 10000
cfi=(311)
cfn=(5392)
calls=500 245 
* 20000
* 5000
-1 7000
+4 10500
-2 7000
+3 28000
+1 3500
+28 7000

fl=(92)
fn=(2018) PredicateLockShmemSize
1266 3
+1 1
+4 7
cfi=(87)
cfn=(2002)
calls=1 476 
* 21
* 6
cfi=(87)
cfn=(2000)
calls=1 493 
* 23
* 1
+1 4
cfi=(31)
cfn=(2006)
calls=1 733 
* 421
* 5
cfi=(87)
cfn=(2002)
calls=1 476 
* 21
* 1
+4 1
+1 4
cfi=(31)
cfn=(2006)
calls=1 733 
* 438
* 5
cfi=(87)
cfn=(2002)
calls=1 476 
* 21
* 1
+7 8
cfi=(87)
cfn=(2002)
calls=1 476 
* 21
* 1
+3 5
+1 6
+1 4
cfi=(87)
cfn=(2002)
calls=1 476 
* 21
* 1
+1 4
cfi=(87)
cfn=(2000)
calls=1 493 
* 23
* 5
cfi=(87)
cfn=(2002)
calls=1 476 
* 21
* 1
+4 4
cfi=(31)
cfn=(2006)
calls=1 733 
* 394
* 5
cfi=(87)
cfn=(2002)
calls=1 476 
* 21
* 1
+4 5
+1 4
cfi=(87)
cfn=(2002)
calls=1 476 
* 21
* 1
+1 4
cfi=(87)
cfn=(2000)
calls=1 493 
* 23
* 5
cfi=(87)
cfn=(2002)
calls=1 476 
* 21
* 1
+4 4
cfi=(87)
cfn=(2002)
calls=1 476 
* 21
* 1
+3 4
cfi=(87)
cfn=(2002)
calls=1 476 
* 21
* 1
+1 3
cfi=(93)
cfn=(2020)
calls=1 146 
* 52
* 5
cfi=(87)
cfn=(2002)
calls=1 476 
* 21
* 1
+2 1
+1 2

fn=(3148) SerializationNeededForRead
497 113785
+2 68271
+1 45514
+33 45514

fn=(3478)
2476 17082
+3 14235
cfn=(3148)
calls=2847 497 
* 34164
* 8541
+8 5694

fn=(2232) CreatePredXact
563 3
+5 2
-1 1
-1 4
cfi=(126)
cfn=(2234)
calls=1 146 
* 18
* 1
+4 2
+3 3
cfi=(126)
cfn=(2236)
calls=1 69 
* 25
+1 6
cfi=(126)
cfn=(2230)
calls=1 90 
* 23
+1 2
+1 2

fn=(2238) OldSerXidInit
797 3
+6 1
+2 2
-1 8
cfi=(93)
cfn=(2196)
calls=1 167 
* 3099
+4 1
+6 5
cfi=(87)
cfn=(2168)
calls=1 373 
* 1055
-1 1
+4 4
+5 2
+1 2
+1 2
+2 2

fn=(3236)
3902 206748
+7 86145
cfn=(3148)
calls=17229 497 
* 206748
* 51687
+1 17229
4095 103374

fn=(2222) InitPredicateLocks
1063 4
+14 7
cfi=(87)
cfn=(2002)
calls=1 476 
* 21
* 6
cfi=(87)
cfn=(2000)
calls=1 493 
* 23
* 1
+6 118
+1 1
+1 1
+1 1
+2 7
cfi=(87)
cfn=(2162)
calls=1 322 
* 99447
* 1
+13 4
+2 7
cfi=(31)
cfn=(836)
calls=1 910 
* 400
+6 4
cfi=(31)
cfn=(2226)
calls=1 861 
* 137
* 1
+1 8
+6 118
+1 1
+1 1
+1 1
+1 1
+3 1
+2 7
cfi=(87)
cfn=(2162)
calls=1 322 
* 189628
* 1
+11 5
+10 6
+2 5
cfi=(87)
cfn=(2168)
calls=1 373 
* 991
* 1
+4 4
+4 3
cfi=(126)
cfn=(2228)
calls=1 37 
* 12
+1 4
cfi=(126)
cfn=(2228)
calls=1 37 
* 12
+1 2
+1 2
+1 2
+1 2
+1 2
+1 2
+1 4
cfi=(87)
cfn=(2000)
calls=1 493 
* 23
* 1
+2 4
cfi=(87)
cfn=(2134)
calls=1 158 
* 67
* 1
+2 6
cob=(3)
cfi=(3)
cfn=(828)
calls=1 0 
* 18636
* 1
+1 2
+3 12320
-1 5600
cfi=(126)
cfn=(2230)
calls=1120 90 
* 25760
-2 5604
+5 2
cfn=(2232)
calls=1 563 
* 92
* 1
+1 6
+1 3
+1 3
+1 3
+1 5
cfi=(126)
cfn=(2228)
calls=1 37 
* 12
+1 5
cfi=(126)
cfn=(2228)
calls=1 37 
* 12
+1 5
cfi=(126)
cfn=(2228)
calls=1 37 
* 12
+1 5
cfi=(126)
cfn=(2228)
calls=1 37 
* 12
+1 5
cfi=(126)
cfn=(2228)
calls=1 37 
* 12
+1 3
+1 3
+1 3
+1 3
+1 3
+3 3
+6 118
+1 1
+1 1
+2 7
cfi=(87)
cfn=(2162)
calls=1 322 
* 18266
* 1
+18 5
+2 5
cfi=(87)
cfn=(2168)
calls=1 373 
* 1016
* 1
+4 4
+4 3
cfi=(126)
cfn=(2228)
calls=1 37 
* 12
+1 4
cfi=(87)
cfn=(2000)
calls=1 493 
* 23
* 1
+2 4
cfi=(87)
cfn=(2134)
calls=1 158 
* 67
* 1
+2 6
cob=(3)
cfi=(3)
cfn=(828)
calls=1 0 
* 29416
* 1
+1 2
+3 50400
-1 28000
cfi=(126)
cfn=(2230)
calls=5600 90 
* 128800
-2 28004
+12 5
cfi=(87)
cfn=(2168)
calls=1 373 
* 1273
-1 1
+5 4
+1 3
cfi=(126)
cfn=(2228)
calls=1 37 
* 12
+6 1
cfn=(2238)
calls=1 797 
* 4187
+1 4

fn=(5346)
1835 4
+9 3
+22 2

fn=(3146)
2453 210
+3 210
cfn=(3148)
calls=42 497 
* 504
* 126
+7 84

fn=(3614)
4667 12
+3 6
+1 2
+74 12

fn=(3506)
2498 15834
+5 13195
cfn=(3148)
calls=2639 497 
* 31668
* 7917
+1 2639
+46 5278

fn=(3664)
3223 10
+18 6
+3 2
3533 4

fn=(5352)
4282 9000
+3 3000
cfn=(5354) SerializationNeededForWrite
calls=1000 541 
* 11000
* 3000
+49 6000

fn=(5354)
541 4000
+2 3000
+1 2000
+7 2000

fl=(189)
fn=(3412)
4029 11388
+1 8541
+1 14235
cfi=(45)
cfn=(3414)
calls=2847 506 
* 65481
-1 11388
+2 5694

fl=(249)
fn=(4464) fireRIRrules
1727 18
+1 9
+8 3
+1 15
cfi=(250)
cfn=(4466)
calls=3 90 
* 24
* 6
1865 12
cfi=(250)
cfn=(4462)
calls=3 78 
* 24
* 12
+12 12
+10 3
+1 12
cfi=(250)
cfn=(4462)
calls=3 78 
* 24
* 12
+95 3
+1 12

fn=(4458)
3690 12
+1 9
+19 12
cfn=(4460) RewriteQuery
calls=3 3297 
* 1050
* 3
+9 3
+1 9
cfi=(250)
cfn=(4462)
calls=3 78 
* 30
* 6
+2 9
+2 12
cfn=(4464)
calls=3 1727 
* 201
* 3
+2 9
+2 15
cfi=(45)
cfn=(960)
calls=3 129 
* 870
* 3
-8 21
+27 9
+1 3
+1 3
+2 9
cfi=(250)
cfn=(4462)
calls=3 78 
* 30
* 6
+2 9
+2 12
+4 3
+2 3
-10 6
+23 12
+3 3
+1 6

fn=(4460)
3297 21
+1 9
+1 3
+1 3
+1 3
+1 3
+1 3
+8 12
cfi=(250)
cfn=(4462)
calls=3 78 
* 24
* 12
+63 6
3632 12
+2 12
+9 9
+3 15
cfi=(45)
cfn=(960)
calls=3 129 
* 870
* 3
+12 12
+17 3
+1 15

fl=(293) /home/mithuncy/fsm_p11patch/src/backend/utils/adt/format_type.c
fn=(5098) type_maximum_size
398 6
+1 2
+1 2
+25 4

fl=(16)
fn=(460)
46 2400
+1 960
+1 960
+1 960
+3 960
+2 480
+2 38214
+1 480
-3 10422
+8 960
+8 2400
+1 960

fl=(83)
fn=(1992)
97 6
+1 1
+2 4
+7 1
cfi=(84)
cfn=(1994)
calls=1 +22 
* 6
* 1
+1 1
cfi=(85)
cfn=(1996)
calls=1 -57 
* 5
* 1
+11 1
+1 3
cfi=(86)
cfn=(1998)
calls=1 +45 
* 34
* 5
cfi=(87)
cfn=(2002)
calls=1 476 
* 21
* 1
+1 1
cfi=(85)
cfn=(2004)
calls=1 -81 
* 12
* 5
cfi=(87)
cfn=(2002)
calls=1 476 
* 21
* 1
+1 3
cfi=(31)
cfn=(2006)
calls=1 733 
* 368
* 5
cfi=(87)
cfn=(2002)
calls=1 476 
* 21
* 1
+2 1
cfi=(88)
cfn=(2010)
calls=1 +38 
* 823
* 5
cfi=(87)
cfn=(2002)
calls=1 476 
* 21
* 1
+1 1
cfi=(91)
cfn=(2016)
calls=1 3437 
* 1031
* 5
cfi=(87)
cfn=(2002)
calls=1 476 
* 21
* 1
+1 1
cfi=(92)
cfn=(2018)
calls=1 1266 
* 1752
* 5
cfi=(87)
cfn=(2002)
calls=1 476 
* 21
* 1
+1 1
cfi=(84)
cfn=(2022)
calls=1 -24 
* 367
* 5
cfi=(87)
cfn=(2002)
calls=1 476 
* 21
* 1
+1 1
cfi=(53)
cfn=(2024)
calls=1 4945 
* 2898
* 5
cfi=(87)
cfn=(2002)
calls=1 476 
* 21
* 1
+1 1
cfi=(94)
cfn=(2028)
calls=1 693 
* 88
* 5
cfi=(87)
cfn=(2002)
calls=1 476 
* 21
* 1
+1 1
cfi=(95)
cfn=(2032)
calls=1 480 
* 82
* 5
cfi=(87)
cfn=(2002)
calls=1 476 
* 21
* 1
+1 1
cfi=(96)
cfn=(2036)
calls=1 +55 
* 59
* 5
cfi=(87)
cfn=(2002)
calls=1 476 
* 21
* 1
+1 1
cfi=(97)
cfn=(2038)
calls=1 237 
* 103
* 5
cfi=(87)
cfn=(2002)
calls=1 476 
* 21
* 1
+1 1
cfi=(73)
cfn=(2040)
calls=1 +11 
* 62
* 5
cfi=(87)
cfn=(2002)
calls=1 476 
* 21
* 1
+1 1
cfi=(98)
cfn=(2042) MultiXactShmemSize
calls=1 1804 
* 225
* 5
cfi=(87)
cfn=(2002)
calls=1 476 
* 21
* 1
+1 1
cfi=(99)
cfn=(2044)
calls=1 350 
* 127
* 5
cfi=(87)
cfn=(2002)
calls=1 476 
* 21
* 1
+1 1
cfi=(100)
cfn=(2048)
calls=1 +45 
* 187
* 5
cfi=(87)
cfn=(2002)
calls=1 476 
* 21
* 1
+1 1
cfi=(38)
cfn=(2050)
calls=1 2609 
* 206
* 5
cfi=(87)
cfn=(2002)
calls=1 476 
* 21
* 1
+1 1
cfi=(101)
cfn=(2052)
calls=1 +67 
* 62
* 5
cfi=(87)
cfn=(2002)
calls=1 476 
* 21
* 1
+1 1
cfi=(102)
cfn=(2054)
calls=1 -25 
* 73
* 5
cfi=(87)
cfn=(2002)
calls=1 476 
* 21
* 1
+1 1
cfi=(103)
cfn=(2058)
calls=1 -65 
* 13
* 5
cfi=(87)
cfn=(2002)
calls=1 476 
* 21
* 1
+1 1
cfi=(104)
cfn=(2060) CheckpointerShmemSize
calls=1 880 
* 62
* 5
cfi=(87)
cfn=(2002)
calls=1 476 
* 21
* 1
+1 1
cfi=(105)
cfn=(2062)
calls=1 3289 
* 66
* 5
cfi=(87)
cfn=(2002)
calls=1 476 
* 21
* 1
+1 1
cfi=(106)
cfn=(2064)
calls=1 -28 
* 66
* 5
cfi=(87)
cfn=(2002)
calls=1 476 
* 21
* 1
+1 1
cfi=(107)
cfn=(2066)
calls=1 476 
* 91
* 5
cfi=(87)
cfn=(2002)
calls=1 476 
* 21
* 1
+1 1
cfi=(108)
cfn=(2068)
calls=1 3028 
* 63
* 5
cfi=(87)
cfn=(2002)
calls=1 476 
* 21
* 1
+1 1
cfi=(109)
cfn=(2070)
calls=1 43 
* 33
* 5
cfi=(87)
cfn=(2002)
calls=1 476 
* 21
* 1
+1 1
cfi=(72)
cfn=(2072)
calls=1 770 
* 66
* 5
cfi=(87)
cfn=(2002)
calls=1 476 
* 21
* 1
+1 1
cfi=(110)
cfn=(2074)
calls=1 252 
* 10
* 5
cfi=(87)
cfn=(2002)
calls=1 476 
* 21
* 1
+1 1
cfi=(111)
cfn=(2076)
calls=1 2014 
* 62
* 5
cfi=(87)
cfn=(2002)
calls=1 476 
* 21
* 1
+1 1
cfi=(112)
cfn=(2078)
calls=1 -23 
* 5
* 5
cfi=(87)
cfn=(2002)
calls=1 476 
* 21
* 1
+1 1
cfi=(113)
cfn=(2080)
calls=1 427 
* 144
* 5
cfi=(87)
cfn=(2002)
calls=1 476 
* 21
* 1
+1 1
cfi=(114)
cfn=(2082)
calls=1 42 
* 5
* 5
cfi=(87)
cfn=(2002)
calls=1 476 
* 21
* 1
+6 1
+1 5
cfi=(87)
cfn=(2002)
calls=1 476 
* 21
* 1
+3 10
cfi=(87)
cfn=(2002)
calls=1 476 
* 21
* 1
+2 4
cfi=(57)
cfn=(2084)
calls=1 1286 
* 68
* 6
cfi=(57)
cfn=(2086)
calls=1 1336 
* 96
+5 6
cfi=(115)
cfn=(2088)
calls=1 560 
* 34649
* 1
+2 3
cfi=(87)
cfn=(2126)
calls=1 -73 
* 16
+5 5
cfi=(86)
cfn=(2128)
calls=1 +24 
* 120
+27 5
+1 1
cfi=(87)
cfn=(2132)
calls=1 -91 
* 153
+6 1
cfi=(99)
cfn=(2140)
calls=1 382 
* 17679
+5 1
cfi=(87)
cfn=(2160)
calls=1 +58 
* 3251
+5 1
cfi=(53)
cfn=(2190)
calls=1 4986 
* 462330
+1 1
cfi=(94)
cfn=(2194)
calls=1 699 
* 4713
+1 1
cfi=(95)
cfn=(2198)
calls=1 491 
* 4415
+1 1
cfi=(96)
cfn=(2200)
calls=1 -31 
* 4819
+1 1
cfi=(98)
cfn=(2202) MultiXactShmemInit
calls=1 1821 
* 7389
+1 1
cfi=(88)
cfn=(2204)
calls=1 69 
* 3666463
+5 1
cfi=(91)
cfn=(2220)
calls=1 378 
* 157412
+5 1
cfi=(92)
cfn=(2222)
calls=1 1063 
* 648914
+5 4
+1 1
cfi=(84)
cfn=(2240)
calls=1 -78 
* 99625
+1 1
cfi=(100)
cfn=(2254)
calls=1 -19 
* 3325
+1 1
cfi=(38)
cfn=(2256)
calls=1 2637 
* 30983
+1 1
cfi=(97)
cfn=(2258)
calls=1 +9 
* 1325
+1 1
cfi=(73)
cfn=(2260)
calls=1 -85 
* 1455
+5 1
cfi=(101)
cfn=(2262)
calls=1 -30 
* 7107
+5 1
cfi=(102)
cfn=(2264)
calls=1 129 
* 1260
+1 1
cfi=(103)
cfn=(2266)
calls=1 85 
* 1627
+1 1
cfi=(104)
cfn=(2268) CheckpointerShmemInit
calls=1 899 
* 37047
+1 1
cfi=(105)
cfn=(2270)
calls=1 3308 
* 1866
+1 1
cfi=(106)
cfn=(2276)
calls=1 133 
* 2634
+1 1
cfi=(107)
cfn=(2280)
calls=1 496 
* 3084
+1 1
cfi=(108)
cfn=(2282)
calls=1 3040 
* 1567
+1 1
cfi=(109)
cfn=(2284)
calls=1 54 
* 1370
+1 1
cfi=(72)
cfn=(2286)
calls=1 818 
* 1720
+5 1
cfi=(110)
cfn=(2288)
calls=1 * 
* 1135
+1 1
cfi=(111)
cfn=(2290)
calls=1 2027 
* 2465
+1 1
cfi=(112)
cfn=(2296)
calls=1 136 
* 2104
+1 1
cfi=(113)
cfn=(2298)
calls=1 444 
* 13694
+1 1
cfi=(114)
cfn=(2334)
calls=1 48 
* 4
+12 4
+1 3
cfi=(129)
cfn=(2336)
calls=1 146 
* 13408
+5 3
+2 2

fl=(188)
fn=(3422)
347 17082
+8 17082
cfi=(172)
cfn=(3424)
calls=2847 79 
* 818837
* 2847
+3 5694
cfi=(13)
cfn=(940)
calls=2847 925 
* 1251065
* 2847
+1 28470
+1 28470
+1 11388
+1 25623
cfi=(13)
cfn=(940)
calls=2847 925 
* 293234
* 8541
+4 5694
+1 5694
+1 5694
+1 5694
+2 5694
+1 5694
+7 17082
+2 11388
+2 8541
+2 2847
+1 5694

fn=(3430)
394 22776
+1 8541
+3 11388
+9 5694
+1 5694
+1 11388
+1 28470
+18 11388
+10 17082
+3 5694
-2 34164
cob=(3)
cfi=(3)
cfn=(482)
calls=2847 0 
* 157910
* 2847
+3 5694
+3 8541
cfi=(111)
cfn=(3432)
calls=2847 204 
* 167702
+1 5694

fn=(3524)
721 2084
+1 1563
+1 1563
+2 521
+3 1042
+1 521
+22 1042

fn=(3510)
453 11388
+1 8541
+3 11388
+3 9304
+2 9304
+3 5694
+1 11388
+5 11388
+1 11388
cfi=(13)
cfn=(952)
calls=2847 1032 
* 241995
+2 11388
+2 11388
+2 11388
+3 8541
cfi=(13)
cfn=(952)
calls=2847 1032 
* 629372
+1 5694

fn=(3398)
107 316
+1 316
cfi=(13)
cfn=(3400)
calls=79 853 
* 21251
* 395
+2 158
+1 158
+1 158
+1 158
+1 158
+1 158
+1 158
+1 158
+1 158
+1 158
+1 158
+1 158
+1 158
+1 158
+1 158
+1 158
+2 158
+1 158
+1 158
+1 158
+1 158
+1 158
+1 158
+1 158
+1 158
+1 158
+1 158
+1 158
+1 158
+1 158
+1 158
+1 158
+1 158
+1 158
+1 158
+1 158
+2 79
+1 158

fn=(3438)
215 15800
+1 9480
+4 6320
+7 12640
+17 12640
+1 14235
cfi=(191)
cfn=(3440)
calls=2847 569 
* 26095859
* 5694
+6 1252
+21 1565
cfi=(191)
cfn=(3518)
calls=313 1162 
* 18016
* 313
+4 6320
+1 2639
+2 2084
+2 3160
+1 6320

fl=(213)
fn=(3842) yy_init_globals
11083 1527
+1 1018
+5 1018
+1 1018
+1 1018
+1 1018
+1 1018
+1 1018
+2 1018
+1 1018
+1 1018
+7 1018
+1 1018
+6 509
+1 1018

fn=(3846)
10742 3054
+3 1018
+1 2545
-1 1018
+2 2545
-1 1018
+5 2036
cfi=(212)
cfn=(3840)
calls=509 1574 
* 67697
* 509
+1 1018
+3 2036
+1 3563
+1 1018
+1 1018
+1 2036
+1 1018
+1 1018
+1 1018
+1 1018
+2 2545
cfn=(3848) core_yy_switch_to_buffer
calls=509 10487 
* 138448
+2 509
+1 1018

fn=(3848)
10487 2545
+1 1018
+7 1527
cfn=(3850) core_yyensure_buffer_stack
calls=509 10692 
* 88566
+1 7126
+3 6617
+8 4072
+1 1527
cfn=(3852) core_yy_load_buffer_state
calls=509 +11 
* 23414
+7 1018
+1 1018

fn=(3844)
10927 2036
+1 1018
+1 1527
+1 1018

fn=(3876) yy_get_next_buffer
10217 8144
+1 2036
+1 8144
+1 2036
+4 16288
+4 10180
+2 9162
+5 1018
+8 1018
10347 7126

fn=(3860)
9032 39259
+4 7138
+7 10707
+2 10707
+2 14276
+2 1018
+6 2036
+1 1018
+2 2036
+1 1527
+2 2036
+1 1527
+2 6617
+6 1527
cfn=(3852)
calls=509 10519 
* 23414
+5 14264
+3 21396
+5 7132
+2 28528
+7 21396
+4 164364
-1 123273
-2 164364
+1 41091
-2 82182
+1 28528
+1 7132
-2 14264
+8 15282
+2 114615
+4 40750
fi=(212)
529 1518
+1 1518
+1 5566
+1 2530
+1 1518
+3 1518
+2 506
+20 12144
+1 1012
+5 2530
+4 2530
cfn=(3868)
calls=506 1245 
* 89513
* 506
+1 1012
+35 24
cfn=(4278)
calls=6 1226 
* 222
+2 6
+1 4608
cfn=(3866)
calls=512 1207 
* 33720
+2 512
+82 11
+1 6
cfi=(13)
cfn=(928)
calls=1 1162 
* 176
* 1
+1 2
+1 3
+2 1
+8 8
cob=(3)
cfi=(3)
cfn=(446)
calls=1 0 
* 22
* 1
* 2
+2 5
cfi=(13)
cfn=(952)
calls=1 1032 
* 72
+1 3
+1 2
+1 5
cfn=(3868)
calls=1 1245 
* 222
* 1
+1 2
+14 9
cfn=(3866)
calls=1 1207 
* 131
+2 1
826 11
+1 2
+4 11
+1 2
+36 154
+1 70
+10 12
+1 20
cob=(3)
cfi=(3)
cfn=(4286) __strstr_sse42
calls=3 0 
* 132
cob=(1)
cfi=(1)
cfn=(223)
calls=1 0 
* 1340
* 8
* 4
+1 20
cob=(3)
cfi=(3)
cfn=(4286)
calls=4 0 
* 176
* 4
* 4
+2 8
+6 8
+1 8
+1 8
+11 8
+1 28
-1 8
+2 28
-1 8
+28 44
+2 24
+40 8
+3 24
cfi=(13)
cfn=(928)
calls=4 1162 
* 704
* 4
+1 8
+4 22
+1 14
cob=(3)
cfi=(3)
cfn=(2672) atol
calls=2 0 
* 218
* 2
* 2
+1 4
+4 55
+1 35
cfn=(4248)
calls=5 1261 
* 946
* 5
+9 27
+1 11
+1 7
cfn=(4248)
calls=1 1261 
* 164
* 1
+28 27775
+5 5050
-2 2525
+1 5050
-1 15150
cfi=(216)
cfn=(3864)
calls=2525 67 
* 1694017
* 2525
+3 5050
+2 10085
+1 8068
+7 4572
cfi=(42)
cfn=(936)
calls=508 132 
* 223465
* 508
+1 2032
+1 1016
+9 5599
+1 1018
fe=(213)
10083 7126
+3 3054
+3 10180
+11 5090
+1 5090
+1 4072
+10 15270
+36 3054
cfn=(3876)
calls=1018 +69 
* 65152
* 3054
+4 1018
+13 2036
+2 4072
+1 509
+23 5599
-1 1018
+3 1527
cfn=(3878) yy_get_previous_state
calls=509 10352 
* 37479
* 509
+2 1018
+1 1018
+1 509
fi=(212)
411 2537
fe=(213)
10206 3563
+1 28552

fn=(3878)
10352 2545
+3 1018
+2 2036
+2 1527
+2 18192
-2 9616
+5 509
+1 2036

fn=(3852)
10519 3054
+1 2036
+1 10180
+1 14252
+1 10180
+1 5090
+1 2036

fn=(3838)
11027 2036
+1 1018
+5 1527
cfi=(212)
cfn=(3840)
calls=509 1574 
* 67697
* 1018
+2 2036
+6 3054
cob=(3)
cfi=(3)
cfn=(828)
calls=509 0 
* 18812
* 509
+2 2036
cfn=(3842)
calls=509 +40 
* 15270
+1 1018

fn=(3850)
10692 2036
+2 1018
+2 2036
+6 509
+2 3054
cfi=(212)
cfn=(3840)
calls=509 1574 
* 61080
-1 1018
+3 2036
+3 3563
cob=(3)
cfi=(3)
cfn=(828)
calls=509 0 
* 7635
* 509
+2 1527
+1 1018
+1 509
+20 1018

fl=(214)
fn=(3854)
16299 1524
+1 1016
+1 1016

fn=(3884)
15471 4
+6 4
+4 6
+1 2

fn=(4274)
15568 20
+1 16
cfi=(13)
cfn=(3400)
calls=4 853 
* 640
* 20
+2 8
+1 12
+1 12
+2 4
+1 8

fn=(4290)
15487 14
+7 8
cfi=(13)
cfn=(3400)
calls=2 853 
* 306
* 10
+1 2
+3 6
+1 6
cfi=(219)
cfn=(4292)
calls=2 78 
* 16
* 8
+33 6
cfi=(217)
cfn=(3872)
calls=2 54 
* 334
* 8
cfi=(45)
cfn=(1586)
calls=2 260 
* 580
* 4
+1 2
+1 4

fn=(5030)
15538 6
+1 4
cfi=(13)
cfn=(3400)
calls=1 853 
* 160
* 5
+1 3
+1 3
+1 3
+1 1
+1 2

fn=(3880)
15459 2540
+1 2032
cfi=(13)
cfn=(3400)
calls=508 853 
* 77724
* 2540
+2 1524
+1 1524
+1 1016
+1 508
+1 1016

fn=(4288)
15548 20
+1 16
cfi=(13)
cfn=(3400)
calls=4 853 
* 640
* 20
+2 8
+1 12
+1 12
+2 4
+1 8

fl=(244)
fn=(4396) setNamespaceLateralState
1663 32
+3 12
cfi=(219)
cfn=(4292)
calls=4 78 
* 32
* 16
+7 8

fn=(4422)
2557 36
+1 4
+3 12
cfi=(219)
cfn=(4292)
calls=4 78 
* 32
* 16
+16 4
+1 8

fn=(4430)
2588 36
+1 4
+1 4
+3 12
cfi=(219)
cfn=(4292)
calls=4 78 
* 32
* 16
2784 4
+1 24

fn=(4420)
1686 56
+3 16
+1 16
+7 16

fn=(4424)
2455 48
+1 4
+2 4
+2 4
+1 4
+7 20
cfn=(4426) flatten_grouping_sets
calls=4 2077 
* 164
* 4
+10 20
+7 12
cfi=(219)
cfn=(4292)
calls=4 78 
* 32
* 16
+50 8
+1 12
+2 4
+1 16

fn=(4428)
1713 56
+3 16
+1 16
+10 16

fn=(4394)
120 20
+12 12
cfi=(219)
cfn=(4292)
calls=4 -54 
* 32
* 16
+27 24
cfn=(4396)
calls=4 1663 
* 100
+1 8

fn=(4426)
2077 28
+2 4
cfi=(52)
cfn=(3958)
calls=4 3263 
* 108
+2 8
+1 8
+83 8

fl=(185)
fn=(3376)
464 2844
+1 2844
+1 2844
+2 4740
+1 1896

fn=(5306)
265 350000
+1 262500
+2 262500
cfi=(294)
cfn=(5308)
calls=87500 -68 
* 26748000
* 87500
+1 175000

fn=(5110) int4out
276 2000
+1 1500
+1 1000
cfi=(13)
cfn=(940)
calls=500 925 
* 61500
* 500
+2 2500
cfi=(294)
cfn=(5112)
calls=500 +6 
* 62107
+1 500
+1 1000

fl=(288)
fn=(5014)
110 6
+1 4
+2 4
+1 2
+1 4

fl=(298)
fn=(5190)
3462 6000
+11 3500
cfi=(299)
cfn=(5192)
calls=500 76 
* 25500
* 500
+1 2500
cfi=(13)
cfn=(940)
calls=500 925 
* 61500
* 2000
+1 1000
+3 500
+1 1500
+2 7000
+1 3000
+1 500
+2 1000
+3 2000
+12 9000
+1 22000
+1 7000
+4 2000
-21 5500
+31 2000

fl=(104)
fn=(2060)
880 6
+7 2
+1 10
cfi=(87)
cfn=(2000)
calls=2 493 
* 46
* 10
cfi=(87)
cfn=(2002)
calls=2 476 
* 42
* 2
+2 2
+1 4

fn=(5470)
1096 12000
+4 6000
+3 4500
+3 7500
cfi=(99)
cfn=(2170)
calls=1500 +16 
* 205500
+3 4500
+1 6000
+7 6000
+1 6000
-1 3000
+15 21000
+1 7500
+1 4500
+1 4500
+3 3000
+1 9000
-1 4500
+3 6000
cfi=(99)
cfn=(2182)
calls=1500 1726 
* 136500
+3 3000
+3 1500
+1 3000

fn=(2268)
899 3
+1 1
cfn=(2060)
calls=1 -20 
* 62
* 1
+4 5
cfi=(87)
cfn=(2168)
calls=1 373 
* 1083
-1 1
+5 4
+7 23
cob=(3)
cfi=(3)
cfn=(828)
calls=1 0 
* 35856
* 1
+1 2
+1 3
+2 2

fl=(132)
fn=(2518)
26 8
+4 10
cob=(5)
cfi=(5)
cfn=(2428)
calls=2 -30 
* 40
* 2
* 2
+1 4
+2 16
cob=(5)
cfi=(5)
cfn=(2428)
calls=2 -33 
* 40
* 2
* 4
+2 2
+7 4

fl=(148)
fn=(2916)
3477 3
+6 1
cfi=(150)
cfn=(2918)
calls=1 605 
* 1580
+6 3
+6 3
cfi=(152)
cfn=(2898)
calls=1 110 
* 10
* 1
+6 2
cfn=(2926) load_relcache_init_file
calls=1 5326 
* 1213
* 3
+2 6
cfn=(2928) formrdesc
calls=1 1727 
* 4170
+2 6
cfn=(2928)
calls=1 1727 
* 2958
+2 6
cfn=(2928)
calls=1 1727 
* 2159
+2 6
cfn=(2928)
calls=1 1727 
* 2190
+2 6
cfn=(2928)
calls=1 1727 
* 2715
+6 3
cfi=(152)
cfn=(2898)
calls=1 110 
* 10
+1 2

fn=(3374) RelationBuildTupleDesc
492 3090
+7 618
+1 618
+1 618
+3 3708
+1 1854
+2 2472
cfi=(13)
cfn=(798)
calls=618 772 
* 58563
* 618
+2 1236
+10 1236
-3 4944
cfi=(184)
cfn=(3342)
calls=618 81 
* 70452
+4 4944
cfi=(184)
cfn=(3342)
calls=618 81 
* 70452
+10 1854
cfi=(169)
cfn=(3023)
calls=39 1307 
* 82982
cfi=(169)
cfn=(3022)
calls=579 1307 
* 1542655
* 618
+1 6180
cfi=(172)
cfn=(3119)
calls=1 322 
* 4208
cfi=(172)
cfn=(3118)
calls=617 322 
* 2988296
* 618
+9 3090
+2 618
+5 7584
+2 3792
+1 7584
+5 15168
cob=(3)
cfi=(3)
cfn=(856)
calls=948 0 
* 51754
* 948
+5 3792
+1 554
+3 3792
+14 3792
+50 948
+1 1896
+1 618
-88 2844
cfi=(172)
cfn=(3186)
calls=948 406 
* 12285365
* 2844
+94 1854
cfi=(172)
cfn=(3254)
calls=618 489 
* 2319244
+1 2472
cfi=(169)
cfn=(3080)
calls=618 1283 
* 1529687
+2 1236
+23 3090
+1 1854
+5 4788
+1 2895
+2 156
+2 78
+11 78
+2 117
+2 195
+9 78
-9 39
+13 1737
cfi=(13)
cfn=(952)
calls=579 1032 
* 49215
+1 1737
+2 2472

fn=(3546) write_relcache_init_file
5715 14
+13 6
+8 4
+2 9
cfi=(17)
cfn=(462)
calls=1 203 
* 896
+2 7
cfi=(17)
cfn=(462)
calls=1 203 
* 360
* 1
+5 11
cfi=(17)
cfn=(462)
calls=1 203 
* 997
+2 9
cfi=(17)
cfn=(462)
calls=1 203 
* 470
+4 6
cob=(3)
cfi=(3)
cfn=(1972)
calls=2 0 
* 18
* 2
+2 8
cfi=(25)
cfn=(1278)
calls=2 2186 
* 1289
* 2
+1 4
+18 2
+1 14
cob=(3)
cfi=(3)
cfn=(2442)
calls=2 0 
* 772
* 2
* 4
+6 10
cfi=(31)
cfn=(3528)
calls=2 1380 
* 106
+2 2
+2 750
+1 750
+3 1000
+1 125
+12 924
cfn=(3556) RelationIdIsInInitFile
calls=106 5932 
* 20126
* 318
+8 625
cfn=(3548) write_item
calls=125 5913 
* 57130
+3 625
cfn=(3548)
calls=125 5913 
* 45294
+3 250
+2 9045
cfn=(3548)
calls=603 +97 
* 208660
-2 4243
+8 250
-1 1125
cfn=(3548)
calls=125 +92 
* 22125
+8 625
+5 234
-1 624
cfn=(3548)
calls=78 +80 
* 30885
+6 156
-1 624
cfn=(3548)
calls=78 +75 
* 22628
+6 156
-1 624
cfn=(3548)
calls=78 +70 
* 22855
+6 624
-1 546
cfn=(3548)
calls=78 +65 
* 23278
+6 156
-1 624
cfn=(3548)
calls=78 +60 
* 22628
+6 156
-1 624
cfn=(3548)
calls=78 +55 
* 22582
-77 756
cfi=(31)
cfn=(3534)
calls=252 1390 
* 29996
* 756
+83 6
cfi=(25)
cfn=(1374)
calls=2 2385 
* 1246
* 4
+14 10
cfi=(99)
cfn=(2170)
calls=2 1122 
* 274
+3 2
cfi=(155)
cfn=(2976)
calls=2 680 
* 134
+6 6
+11 10
cob=(3)
cfi=(3)
cfn=(3554) rename
calls=1 0 
* 5
cob=(1)
cfi=(1)
cfn=(223)
calls=1 0 
* 1309
* 6
* 4
+9 8
cfi=(99)
cfn=(2182)
calls=2 1726 
* 182
+1 10

fn=(3360)
3536 3
+4 8
+5 1
cfi=(150)
cfn=(3362)
calls=1 626 
* 1691
+5 3
cfi=(152)
cfn=(2898)
calls=1 110 
* 10
* 1
+7 3
+1 2
cfn=(2926)
calls=1 5326 
* 1420
* 1
-1 2
+3 1
+2 6
cfn=(2928)
calls=1 1727 
* 5001
+2 6
cfn=(2928)
calls=1 1727 
* 4142
+2 6
cfn=(2928)
calls=1 1727 
* 4658
+2 6
cfn=(2928)
calls=1 1727 
* 4915
+6 3
cfi=(152)
cfn=(2898)
calls=1 110 
* 10
+3 3
+28 4
+2 3
cfn=(3364) load_critical_index
calls=1 3830 
* 1800234
+2 3
cfn=(3364)
calls=1 3830 
* 850313
+2 3
cfn=(3364)
calls=1 3830 
* 697842
+2 3
cfn=(3364)
calls=1 3830 
* 720174
+2 3
cfn=(3364)
calls=1 3830 
* 652901
+2 3
cfn=(3364)
calls=1 3830 
* 788599
+2 3
cfn=(3364)
calls=1 3830 
* 755756
+5 1
+15 4
+2 3
cfn=(3364)
calls=1 3830 
* 92531
+2 3
cfn=(3364)
calls=1 3830 
* 82312
+2 3
cfn=(3364)
calls=1 3830 
* 82714
+2 3
cfn=(3364)
calls=1 3830 
* 82497
+2 3
cfn=(3364)
calls=1 3830 
* 85443
+2 3
cfn=(3364)
calls=1 3830 
* 131552
+5 1
+19 5
cfi=(31)
cfn=(3528)
calls=1 1380 
* 53
+2 1
+2 492
+1 164
+5 492
cfn=(3064)
calls=164 1970 
* 14432
+5 820
+6 18
-1 36
cfi=(151)
cfn=(3306)
calls=9 1114 
* 204667
* 9
+2 18
+3 72
+6 63
cob=(3)
cfi=(3)
cfn=(856)
calls=9 0 
* 537
* 9
+3 36
+2 45
cfn=(3382) RelationParseRelOptions
calls=9 435 
* 621
+11 27
cfi=(151)
cfn=(3280)
calls=9 1161 
* 927
+3 45
+4 9
+11 820
+7 820
+15 820
+11 820
+9 820
+10 492
cfn=(3084)
calls=164 1983 
* 14596
+3 328
+2 27
cfi=(31)
cfn=(3536) hash_seq_term
calls=9 1466 
* 459
+1 45
cfi=(31)
cfn=(3528)
calls=9 1380 
* 477
3677 495
cfi=(31)
cfn=(3534)
calls=165 1390 
* 58824
* 495
3806 2
+8 1
cfi=(151)
cfn=(3540)
calls=1 1072 
* 8005354
+3 2
cfn=(3546)
calls=1 5715 
* 88951
+1 2
cfn=(3546)
calls=1 5715 
* 474792
+2 2

fn=(3372) AllocateRelationDesc
380 2472
+6 1854
cfi=(152)
cfn=(2898)
calls=618 110 
* 6180
* 618
+5 1236
cfi=(13)
cfn=(2546)
calls=618 956 
* 315924
* 618
+3 1236
+14 1236
cfi=(13)
cfn=(940)
calls=618 925 
* 75983
* 618
+2 3708
cob=(3)
cfi=(3)
cfn=(856)
calls=618 0 
* 45440
* 618
+3 1854
+3 3090
cfi=(159)
cfn=(2932) CreateTemplateTupleDesc
calls=618 46 
* 93326
* 1236
+2 1854
+2 1854
cfi=(152)
cfn=(2898)
calls=618 110 
* 6180
+2 618
+1 1236

fn=(3386) BuildHardcodedDescriptor
3864 10
+5 6
cfi=(152)
cfn=(2898)
calls=2 110 
* 20
* 2
+2 6
cfi=(159)
cfn=(2932)
calls=2 46 
* 306
* 2
+1 4
+1 4
+2 4
+2 1060
cob=(3)
cfi=(3)
cfn=(856)
calls=53 0 
* 3076
* 53
+2 477
-4 218
+8 4
+4 6
cfi=(152)
cfn=(2898)
calls=2 110 
* 20
+2 2
+1 4

fn=(3406) LookupOpclassInfo
1562 786
+9 393
+5 118
+1 1
+1 1
+1 6
cfi=(31)
cfn=(794)
calls=1 317 
* 2932
* 1
+4 3
+4 917
cfi=(31)
cfn=(836)
calls=131 910 
* 32254
* 131
+4 524
+3 16
+1 24
+2 16
+2 48
cfi=(13)
cfn=(2156)
calls=8 815 
* 1224
-1 24
+22 524
+1 246
+9 24
+1 3
-1 6
+2 2
-1 4
-1 18
+10 18
cfi=(184)
cfn=(3342)
calls=2 81 
* 228
-10 12
+10 54
cfi=(184)
cfn=(3342)
calls=6 81 
* 684
+4 24
cfi=(169)
cfn=(3022)
calls=8 1307 
* 241446
* 8
+1 72
cfi=(172)
cfn=(3118)
calls=8 322 
* 30371
* 8
+3 24
cfi=(172)
cfn=(3186)
calls=8 406 
* 75642
* 24
+2 64
+2 32
+1 32
+5 24
cfi=(172)
cfn=(3254)
calls=8 489 
* 20233
+1 32
cfi=(169)
cfn=(3080)
calls=8 1283 
* 13986
+6 24
+5 16
-3 64
cfi=(184)
cfn=(3342)
calls=8 81 
* 912
+7 16
-3 72
cfi=(184)
cfn=(3342)
calls=8 81 
* 912
+7 16
-3 72
cfi=(184)
cfn=(3342)
calls=8 81 
* 912
+4 24
cfi=(169)
cfn=(3022)
calls=8 1307 
* 258562
* 8
+1 72
cfi=(172)
cfn=(3118)
calls=8 322 
* 31545
* 8
+3 8
+2 120
+2 60
+1 30
-1 30
+5 120
+1 30
-1 15
-9 45
cfi=(172)
cfn=(3186)
calls=15 406 
* 273057
* 24
cfi=(172)
cfn=(3186)
calls=8 406 
* 136485
* 69
+13 24
cfi=(172)
cfn=(3254)
calls=8 489 
* 18228
+1 32
cfi=(169)
cfn=(3080)
calls=8 1283 
* 14008
+3 16
+1 8
+1 262

fn=(2926)
5326 12
+12 4
+1 7
cfi=(17)
cfn=(462)
calls=1 203 
* 360
* 1
+3 9
cfi=(17)
cfn=(462)
calls=1 203 
* 470
+3 8
cfi=(25)
cfn=(1278)
calls=2 2186 
* 1744
* 2
+1 4
+1 4
5707 8

fn=(3380) RelationInitIndexAccessInfo
1342 474
+22 158
-1 316
cfi=(151)
cfn=(3306)
calls=79 1114 
* 1878868
* 79
+2 158
+3 237
cfi=(152)
cfn=(2898)
calls=79 110 
* 790
* 79
+1 237
cfi=(178)
cfn=(3346)
calls=79 683 
* 18791
* 158
+1 869
+1 237
cfi=(152)
cfn=(2898)
calls=79 110 
* 790
+1 237
cfi=(151)
cfn=(3280)
calls=79 1161 
* 8137
+5 553
cfi=(151)
cfn=(3306)
calls=79 1114 
* 268928
* 79
+1 158
+3 632
+1 316
+1 237
cfi=(151)
cfn=(3280)
calls=79 1161 
* 8137
+2 395
+1 474
+3 395
+7 553
cfi=(14)
cfn=(432)
calls=79 395 
* 38343
* 79
+3 237
+1 553
cfi=(13)
cfn=(930)
calls=79 1149 
* 14810
* 395
cfi=(13)
cfn=(812)
calls=79 330 
* 711
+6 237
cfn=(3392) InitIndexAmRoutine
calls=79 -88 
* 62937
+7 553
cfi=(13)
cfn=(2156)
calls=79 815 
* 11293
-1 158
+3 553
cfi=(13)
cfn=(2156)
calls=79 815 
* 11293
-1 158
+3 316
+1 158
+2 237
+3 553
cfi=(13)
cfn=(2156)
calls=79 815 
* 12492
-1 158
+3 869
cfi=(13)
cfn=(2156)
calls=79 815 
* 41815
-1 237
+10 553
cfi=(13)
cfn=(2156)
calls=79 815 
* 10952
-1 158
+4 553
cfi=(13)
cfn=(2156)
calls=79 815 
* 11334
-1 158
+8 1264
cfn=(3402) GetPgIndexDescriptor
calls=79 3907 
* 2867
* 474
cfi=(178)
cfn=(3238)
calls=79 428 
* 111969
* 79
+5 158
+1 790
cob=(3)
cfi=(3)
cfn=(856)
calls=79 0 
* 974
* 79
+7 1422
cfn=(3402)
calls=79 3907 
* 632
* 474
cfi=(178)
cfn=(3238)
calls=79 428 
* 119898
* 79
+5 158
+7 1106
cfn=(3404) IndexSupportInitialize
calls=79 +46 
* 1169500
+7 1422
cfn=(3402)
calls=79 3907 
* 632
* 474
cfi=(178)
cfn=(3238)
calls=79 428 
* 127166
* 79
+5 158
+1 790
cob=(3)
cfi=(3)
cfn=(856)
calls=79 0 
* 966
* 79
+5 158
+1 158
+1 158
+1 158
+1 158
+1 158
+1 395

fn=(3054)
1904 15284
+9 22926
cfi=(31)
cfn=(836)
calls=3821 910 
* 809029
* 24932
+2 7642
+2 9648
cfn=(3064)
calls=3216 +53 
* 283614
+2 16080
+23 6432
+7 2420
cfn=(3368) RelationBuildDesc
calls=601 1070 
* 43357096
cfn=(3369) RelationBuildDesc'2
calls=4 1070 
* 900862
* 605
+1 1210
+1 1815
cfn=(3064)
calls=605 +19 
* 53240
+1 605
+1 7642

fn=(3055)
1904 10240
+9 15360
cfi=(31)
cfn=(836)
calls=2560 910 
* 549330
* 17920
+2 5120
+2 7680
cfn=(3064)
calls=2560 +53 
* 225280
+2 12800
+23 5120
+11 5120

fn=(3064)
1970 37720
+1 28290
cfi=(162)
cfn=(3066)
calls=9430 1052 
* 217496
+1 47150
+1 28290
+1 47150
cfi=(162)
cfn=(3070)
calls=9430 1063 
* 405490
+1 18860

fn=(3084)
1983 37720
+2 47150
+1 28290
+1 47150
cfi=(162)
cfn=(3086)
calls=9430 1072 
* 660100
+1 18860

fn=(3370) ScanPgRelation
310 4944
+13 1854
+6 4944
cfi=(184)
cfn=(3342)
calls=618 81 
* 70452
+11 1854
cfi=(169)
cfn=(3023)
calls=39 1307 
* 78567
cfi=(169)
cfn=(3022)
calls=579 1307 
* 1542144
* 618
+7 1236
+3 1236
cfi=(110)
cfn=(3120)
calls=618 +91 
* 126690
* 618
+3 4326
-1 99
cfi=(172)
cfn=(3118)
calls=11 -30 
* 12127
+1 607
-1 5463
cfi=(172)
cfn=(3119)
calls=1 -30 
* 3394
cfi=(172)
cfn=(3118)
calls=606 -30 
* 2597020
* 618
+5 1854
cfi=(172)
cfn=(3186)
calls=618 +49 
* 6847935
* 618
+5 1236
+1 1854
cfi=(178)
cfn=(3346)
calls=618 683 
* 159271
* 618
+3 1854
cfi=(172)
cfn=(3254)
calls=618 489 
* 2140090
+1 2472
cfi=(169)
cfn=(3080)
calls=618 1283 
* 1522377
+2 618
+1 1236

fn=(3364)
3830 65
+9 52
cfi=(160)
cfn=(3026)
calls=13 106 
* 25354
+1 52
cfi=(160)
cfn=(3026)
calls=13 106 
* 25580
+1 52
cfn=(3368)
calls=13 1070 
* 6723354
* 13
+1 26
+2 26
+1 26
+1 52
cfi=(160)
cfn=(3408)
calls=13 197 
* 24165
+1 52
cfi=(160)
cfn=(3408)
calls=13 197 
* 23973
+1 26

fn=(3392)
1318 316
+8 316
cfi=(187)
cfn=(3394)
calls=79 34 
* 38631
* 79
+3 395
cfi=(13)
cfn=(798)
calls=79 772 
* 9638
* 79
+2 474
cob=(3)
cfi=(3)
cfn=(856)
calls=79 0 
* 5583
* 79
+1 237
+2 237
cfi=(13)
cfn=(952)
calls=79 1032 
* 6715
+1 158

fn=(3556)
5932 424
+1 424
+1 210
+1 210
+8 2
+2 315
cfi=(151)
cfn=(3558)
calls=105 1518 
* 18329
+1 212

fn=(3382)
435 3135
+4 1254
+6 6270
+7 548
+1 548
+3 316
+1 79
+10 79
cfn=(3384) GetPgClassDescriptor
calls=79 3894 
* 632
* 548
cfn=(3384)
calls=548 3894 
* 7441
* 3762
cfi=(186)
cfn=(3388)
calls=627 1000 
* 9556363
* 627
+8 1254
+3 1500
-1 2500
cfi=(13)
cfn=(798)
calls=500 772 
* 60969
* 1000
+2 5000
cob=(3)
cfi=(3)
cfn=(856)
calls=500 0 
* 24856
* 500
+1 1500
cfi=(13)
cfn=(952)
calls=500 1032 
* 42500
* 500
+2 1254

fn=(3384)
3894 1254
+4 1881
+1 3
cfn=(3386)
calls=1 -35 
* 3053
* 1
+3 1
+1 2
-1 626
+1 1252

fn=(3646)
2828 10
+16 6
+10 10
+11 6
+10 2
+1 2
+1 2
+1 2
+1 4

fn=(2888)
3440 3
+6 3
+1 1
cfi=(149)
cfn=(2890)
calls=1 630 
* 443
+5 118
+1 1
+1 1
+1 6
cfi=(31)
cfn=(794)
calls=1 317 
* 3136
* 1
+6 1
cfi=(150)
cfn=(2892)
calls=1 585 
* 12
+1 2

fn=(2928)
1727 81
+8 18
cfi=(13)
cfn=(2546)
calls=9 956 
* 4550
* 9
+3 18
+5 18
+6 18
+1 18
+1 18
+1 18
+1 18
+11 18
cfi=(13)
cfn=(2546)
calls=9 956 
* 1542
* 18
+2 63
cfi=(158)
cfn=(2930)
calls=9 253 
* 928
+1 27
+1 36
+6 36
+1 18
+1 15
+3 15
+3 15
+2 15
+1 15
+1 20
+1 15
+1 15
+1 20
+9 15
cfi=(159)
cfn=(2932)
calls=5 46 
* 755
-19 12
+3 12
+2 12
+1 12
+1 16
+1 12
+1 12
+1 16
+9 12
cfi=(159)
cfn=(2932)
calls=4 46 
* 612
* 18
+1 27
+2 36
+1 27
+5 9
+1 18
+2 320
+1 800
-1 2240
cob=(3)
cfi=(3)
cfn=(856)
calls=160 0 
* 8518
* 160
+3 2240
+2 1600
-7 667
+11 27
+3 18
+2 18
cfi=(13)
cfn=(2546)
calls=9 956 
* 1557
* 9
+2 18
+1 36
+6 45
+8 27
+1 27
+8 27
cfi=(160)
cfn=(2934)
calls=9 69 
* 153
+5 27
cfn=(2936) RelationInitPhysicalAddr
calls=9 1255 
* 1064
+5 27
+8 27
+6 72
cfi=(31)
cfn=(836)
calls=9 910 
* 3837
* 63
+3 18
+1 18

fn=(3082)
2003 25524
+2 19143
cfn=(3084)
calls=6381 -22 
* 567909
+8 12762

fn=(3368)
1070 3684
+9 3070
cfn=(3370)
calls=614 310 
* 14730601
* 614
+5 1228
+6 4912
+1 1842
+7 1842
cfn=(3372)
calls=614 380 
* 565340
* 614
+5 1842
+7 1228
+1 1228
+1 1228
+1 1228
+1 5140
+4 1228
+1 1228
+1 614
+37 1842
cfn=(3374)
calls=614 492 
* 20691624
+5 3070
+4 1228
+1 1228
+3 3070
+3 1228
+2 3070
+3 1228
+3 1228
+1 1228
+3 3070
+7 1228
+1 1228
+1 1228
+1 1228
+6 3070
+1 237
cfn=(3380)
calls=79 1342 
* 3959357
+3 3070
cfn=(3382)
calls=614 435 
* 9720981
+5 1842
cfi=(160)
cfn=(2934)
calls=614 69 
* 10438
+5 1842
cfn=(2936)
calls=614 +40 
* 33184
+3 1228
+5 1842
cfi=(178)
cfn=(3390)
calls=614 1341 
* 57716
+14 1228
+1 4912
cfi=(31)
cfn=(836)
calls=614 910 
* 225398
* 4298
+3 1228
+2 614
+1 1228

fn=(3369)
1070 24
+9 20
cfn=(3370)
calls=4 310 
* 410243
* 4
+5 8
+6 32
+1 12
+7 12
cfn=(3372)
calls=4 380 
* 3649
* 4
+5 12
+7 8
+1 8
+1 8
+1 8
+1 40
+4 8
+1 8
+1 4
+37 12
cfn=(3374)
calls=4 492 
* 481215
+5 20
+4 8
+1 8
+3 20
+3 8
+2 20
+3 8
+3 8
+1 8
+3 20
+7 8
+1 8
+1 8
+1 8
+6 20
+4 20
cfn=(3382)
calls=4 435 
* 3333
+5 12
cfi=(160)
cfn=(2934)
calls=4 69 
* 68
+5 12
cfn=(2936)
calls=4 +40 
* 168
+3 8
+5 12
cfi=(178)
cfn=(3390)
calls=4 1341 
* 376
+14 8
+1 32
cfi=(31)
cfn=(836)
calls=4 910 
* 1246
* 28
+3 8
+2 4
+1 8

fn=(3402)
3907 474
+4 711
+1 3
cfn=(3386)
calls=1 -48 
* 2231
* 1
+3 1
+1 2
-1 236
+1 472

fn=(3404)
1515 869
+3 158
+4 917
+4 1179
cfn=(3406)
calls=131 +36 
* 1159170
* 131
+4 1048
+1 1048
+1 262
+1 262
+1 262
-1 1310
cob=(3)
cfi=(3)
cfn=(856)
calls=131 0 
* 1834
* 131
-15 761
+19 158

fn=(2936)
1255 2508
+1 3135
+1 126
+2 1818
+1 2508
+1 63
+2 1818
+2 3135
+12 594
cfi=(110)
cfn=(2988)
calls=594 2025 
* 4158
* 1188
+20 3564
+7 99
-1 198
cfi=(150)
cfn=(2938)
calls=33 160 
* 8052
-1 66
+3 132
+4 1254

fn=(3548)
5913 8676
+1 10122
cob=(3)
cfi=(3)
cfn=(2442)
calls=1446 0 
* 189835
* 1446
* 2892
+2 8676
cob=(3)
cfi=(3)
cfn=(2442)
calls=1446 0 
* 247742
* 1446
* 4338
+2 2892

fl=(159)
fn=(4532) TupleDescInitEntryCollation
763 18
+8 33
+1 6

fn=(2932)
46 2836
+21 4254
-1 2127
cfi=(13)
cfn=(940)
calls=709 925 
* 87901
* 709
+6 2127
+1 1418
+1 1418
+1 1418
+1 1418
+2 709
+1 1418

fn=(4530) TupleDescInitEntry
602 30
+15 33
+2 6
+7 6
+2 12
+1 18
cfi=(158)
cfn=(2930)
calls=3 253 
* 290
+2 6
+1 6
+1 9
+2 9
+1 9
+2 6
+1 6
+1 6
+1 6
+1 6
+1 6
+1 6
+3 12
cfi=(151)
cfn=(3306)
calls=3 1114 
* 1026
* 3
+1 6
+2 24
+2 9
+1 12
+1 12
+1 12
+1 12
+1 12
+2 9
cfi=(151)
cfn=(3280)
calls=3 1161 
* 309
+1 6

fn=(5498) DecrTupleDescRefCount
391 2000
+3 2500
cfi=(162)
cfn=(5500)
calls=500 1161 
* 35000
+1 4500
+2 1000

fn=(5272) IncrTupleDescRefCount
373 2000
+3 1500
cfi=(162)
cfn=(5274)
calls=500 1141 
* 11803
+1 2500
+1 2500
cfi=(162)
cfn=(5276)
calls=500 1152 
* 21500
+1 1000

fn=(3078)
151 385
+2 231
+3 308
cfn=(2932)
calls=77 46 
* 12301
* 77
+5 154
-2 308
+1 154
-1 385
cob=(3)
cfi=(3)
cfn=(856)
calls=77 0 
* 18271
* 77
+5 154
+2 154
cfi=(13)
cfn=(2546)
calls=77 956 
* 12174
* 77
+2 308
+2 616
+11 308
+17 616
+15 231
+4 308
+1 308
+2 77
+1 308

fl=(200)
fn=(3610)
13150 6
+2 2
+1 2
+2 6
cfi=(46)
cfn=(966)
calls=2 78 
* 16
* 8
+38 4
+3 4
+42 4

fn=(3678)
13250 10
+4 2
+1 6
cfi=(46)
cfn=(966)
calls=2 78 
* 16
* 2
+2 6
+24 4

fl=(46)
fn=(966)
78 265500
+1 442500
+1 177000
-2 3
+1 5
+1 2
-2 12
+1 12
+1 8
-2 9
+1 15
+1 6

fn=(5248)
90 265500
+1 442500
+1 177000

fl=(48)
fn=(1168)
1165 7
+5 4
cfi=(13)
cfn=(928)
calls=1 -8 
* 143
* 1
+3 5
cfi=(41)
cfn=(932)
calls=1 3507 
* 45
* 3
+14 1
cfi=(26)
cfn=(986)
calls=1 334 
* 10
* 2
+74 3
cfi=(13)
cfn=(952)
calls=1 1032 
* 72
+1 3
cfi=(45)
cfn=(972)
calls=1 1137 
* 35
+2 1
+1 4

fn=(1170)
1270 5
+1 2
+9 2
+3 3
cfi=(25)
cfn=(1172)
calls=1 2650 
* 14
+1 2

fn=(984)
1070 7
+5 1
cfi=(26)
cfn=(986)
calls=1 334 
* 10
* 2
+25 1
+1 4

fl=(98)
fn=(3650)
1663 4
+8 12
+1 12
+6 2
+1 4
cfi=(204)
cfn=(3652)
calls=2 279 
* 24
+1 2
+1 4

fn=(2202)
1821 3
+5 1
+1 1
+4 2
-2 8
cfi=(93)
cfn=(2196)
calls=1 167 
* 2548
+6 2
-2 8
cfi=(93)
cfn=(2196)
calls=1 167 
* 3462
+7 3
-1 4
cfi=(87)
cfn=(2000)
calls=1 493 
* 23
* 3
cfi=(87)
cfn=(2002)
calls=1 476 
* 21
* 4
cfi=(87)
cfn=(2168)
calls=1 373 
* 1091
* 1
+3 4
+5 10
cfi=(87)
cfn=(2000)
calls=1 493 
* 23
* 3
cfi=(87)
cfn=(2002)
calls=1 476 
* 21
* 15
cob=(3)
cfi=(3)
cfn=(828)
calls=1 0 
* 114
* 1
+9 3
+1 8
+1 2

fn=(2042)
1804 3
+8 7
cfi=(87)
cfn=(2000)
calls=1 493 
* 23
* 3
cfi=(87)
cfn=(2002)
calls=1 476 
* 21
* 1
+1 3
cfi=(93)
cfn=(2020)
calls=1 146 
* 52
* 5
cfi=(87)
cfn=(2002)
calls=1 476 
* 21
* 1
+1 3
cfi=(93)
cfn=(2020)
calls=1 146 
* 52
* 5
cfi=(87)
cfn=(2002)
calls=1 476 
* 21
* 1
+2 1
+1 2

fl=(23)
fn=(668)
101 30
+69 30
cfn=(670) random_from_file
calls=6 48 
* 2639
* 12
+1 12
+7 12

fn=(670)
48 36
+2 12
+3 36
cob=(5)
cfi=(5)
cfn=(676)
calls=5 -53 
* 35
cob=(1)
cfi=(1)
cfn=(223)
calls=1 -53 
* 745
* 10
* 6
+1 12
+3 6
+2 36
cob=(5)
cfi=(5)
cfn=(684)
calls=5 -59 
* 35
cob=(1)
cfi=(1)
cfn=(223)
calls=1 -59 
* 753
* 10
* 6
+1 12
+9 12
+1 12
-13 24
+16 18
cob=(5)
cfi=(5)
cfn=(692)
calls=5 -73 
* 35
cob=(1)
cfi=(1)
cfn=(223)
calls=1 -73 
* 760
* 10
+1 6
+1 12

fl=(51)
fn=(1026)
78 6
+1 8
+1 4

fl=(54)
fn=(4074) pg_bindtextdomain
1612 3
+11 2

fn=(3304)
580 6
+19 1
cfi=(155)
cfn=(2976)
calls=1 +81 
* 67
+2 2
+2 4
cfi=(151)
cfn=(3306)
calls=1 1114 
* 454
* 1
+1 2
+1 1
+13 8
+1 3
+1 3
+2 2
+1 3
+3 6
cfn=(3316) SetSessionUserId
calls=1 423 
* 16
+4 3
+7 3
+5 5
+16 4
+10 6
cfi=(29)
cfn=(1206)
calls=1 7172 
* 4859
+2 10
cfi=(29)
cfn=(1206)
calls=1 7172 
* 1283
+4 3
cfi=(151)
cfn=(3280)
calls=1 1161 
* 103
+1 4

fn=(3358)
87 4
+3 5
cfi=(13)
cfn=(930)
calls=1 1149 
* 178
* 1
+1 2

fn=(3578)
415 4
+2 2
+1 4

fn=(1552)
1182 5
+1 8
cfn=(1554) CreateLockFile
calls=1 875 
* 6817
+1 2

fn=(1620)
1588 2
+1 1
+1 5
cfn=(1622) load_libraries
calls=1 -54 
* 19
+3 1
+1 2

fn=(1950)
1259 30
+9 25
cob=(5)
cfi=(5)
cfn=(676)
calls=5 0 
* 35
* 5
* 5
+1 10
+8 10
cfi=(66)
cfn=(1562)
calls=5 -38 
* 70
+1 30
cob=(5)
cfi=(5)
cfn=(684)
calls=5 0 
* 35
* 5
* 5
+1 5
cfi=(66)
cfn=(1572)
calls=5 -16 
* 65
+1 10
+9 15
+6 10
+1 10
+2 116
cob=(3)
cfi=(3)
cfn=(1120)
calls=29 0 
* 715
* 29
* 29
+2 58
+2 87
-6 131
+8 50
cob=(3)
cfi=(3)
cfn=(856)
calls=5 0 
* 176
* 5
+1 35
+6 20
+9 60
cfi=(17)
cfn=(462)
calls=5 203 
* 1635
+1 15
cob=(3)
cfi=(3)
cfn=(424)
calls=5 0 
* 85
* 5
* 5
+5 20
cob=(3)
cfi=(3)
cfn=(1120)
calls=5 0 
* 111
* 5
* 15
+2 2
+1 24
cfi=(17)
cfn=(462)
calls=2 203 
* 400
+8 15
cob=(3)
cfi=(3)
cfn=(424)
calls=5 0 
* 142
* 5
* 5
+1 5
cob=(5)
cfi=(5)
cfn=(472)
calls=5 0 
* 15
* 5
* 5
+1 10
cfi=(66)
cfn=(1562)
calls=5 1239 
* 70
+1 25
cob=(5)
cfi=(5)
cfn=(1956)
calls=4 0 
* 28
cob=(1)
cfi=(1)
cfn=(223)
calls=1 0 
* 760
* 9
* 10
+1 35
cob=(5)
cfi=(5)
cfn=(1568)
calls=5 0 
* 35
* 5
-1 10
+14 5
cfi=(66)
cfn=(1572)
calls=5 -91 
* 65
+1 10
cfi=(66)
cfn=(1562)
calls=5 1239 
* 70
+1 15
cfi=(25)
cfn=(1574)
calls=5 334 
* 95
* 10
+7 5
cfi=(66)
cfn=(1572)
calls=5 1263 
* 65
+1 15
cob=(5)
cfi=(5)
cfn=(692)
calls=5 0 
* 35
* 5
* 10
+7 20

fn=(2710)
274 2
+1 1
+2 1
cfi=(20)
cfn=(648)
calls=1 2527 
* 10687
+13 1
cfi=(67)
cfn=(2712)
calls=1 410 
* 27
+3 1
cfi=(122)
cfn=(2716)
calls=1 156 
* 144
+1 1
+1 3
cfi=(122)
cfn=(2718)
calls=1 -66 
* 12
+9 1
cob=(1)
cfi=(1)
cfn=(223)
calls=1 0 
* 1265
* 5
* 2
+5 1
cfi=(102)
cfn=(2726)
calls=1 +62 
* 1456
+1 2

fn=(2952)
486 8
+1 6
+1 6
+1 4

fn=(5764)
362 2
+4 1
+2 3
+1 7
cfi=(122)
cfn=(2848)
calls=1 767 
* 100
+2 3
cfi=(122)
cfn=(2850)
calls=1 +66 
* 24
+1 2

fn=(1526)
1459 14
+8 2
+2 12
cob=(3)
cfi=(3)
cfn=(1246)
calls=2 0 
* 292
* 2
* 2
+2 16
cfi=(17)
cfn=(462)
calls=2 203 
* 728
+2 8
cfi=(25)
cfn=(1278)
calls=2 2186 
* 1320
* 2
+1 4
+14 2
+1 12
cob=(3)
cfi=(3)
cfn=(1532) fscanf
calls=1 0 
* 678
cob=(1)
cfi=(1)
cfn=(223)
calls=1 0 
* 1939
* 6
* 2
+1 12
cob=(3)
cfi=(3)
cfn=(1246)
calls=2 0 
* 256
* 2
* 2
+2 12
+9 6
cfi=(25)
cfn=(1374)
calls=2 2385 
* 1214
+2 6
+7 12

fn=(1554)
875 22
+30 2
cob=(3)
cfi=(3)
cfn=(654)
calls=2 0 
* 10
* 2
* 2
+3 2
cob=(3)
cfi=(3)
cfn=(1560) getppid
calls=1 0 
* 3
cob=(1)
cfi=(1)
cfn=(223)
calls=1 0 
* 1278
* 6
* 2
+10 4
cob=(3)
cfi=(3)
cfn=(234)
calls=2 0 
* 1000
* 2
* 2
+1 4
+3 2
+7 2
+8 12
cob=(5)
cfi=(5)
cfn=(676)
calls=2 0 
* 14
* 2
* 2
+1 4
+1 2
1101 38
cfi=(17)
cfn=(462)
calls=2 203 
* 4317
+11 8
+3 2
cob=(5)
cfi=(5)
cfn=(472)
calls=2 0 
* 6
* 2
* 2
+1 4
cfi=(66)
cfn=(1562)
calls=2 1239 
* 28
+1 6
cob=(3)
cfi=(3)
cfn=(424)
calls=2 0 
* 52
* 2
* 12
cob=(5)
cfi=(5)
cfn=(1568)
calls=1 0 
* 7
cob=(1)
cfi=(1)
cfn=(223)
calls=1 0 
* 768
* 6
* 8
cob=(3)
cfi=(3)
cfn=(424)
calls=2 0 
* 52
* 2
* 4
+12 2
cfi=(66)
cfn=(1572)
calls=2 1263 
* 26
+2 4
cfi=(66)
cfn=(1562)
calls=2 1239 
* 28
+1 6
cfi=(25)
cfn=(1574)
calls=2 334 
* 38
* 4
+11 2
cfi=(66)
cfn=(1572)
calls=2 1263 
* 26
+1 6
cob=(5)
cfi=(5)
cfn=(692)
calls=2 0 
* 14
* 2
* 4
+16 6
+1 3
cfi=(67)
cfn=(1578)
calls=1 306 
* 1479
+6 8
cfi=(13)
cfn=(928)
calls=2 -5 
* 357
* 6
cfi=(45)
cfn=(1586)
calls=2 260 
* 358
* 2
+1 10

fn=(1522)
100 5
+5 5
cfi=(9)
cfn=(490)
calls=1 0 
* 15
* 2
+15 4
+16 2
cob=(3)
cfi=(3)
cfn=(638)
calls=1 0 
* 3
* 1
* 2
+20 4
+21 3
cfi=(65)
cfn=(1524)
calls=1 35 
* 12
+2 3
cob=(3)
cfi=(3)
cfn=(710) umask
calls=1 0 
* 3
* 1
+1 2
+4 3
cfn=(1526)
calls=1 1459 
* 3939
+1 5

fn=(1622)
1536 24
+5 18
+1 3
+39 12

fn=(1964)
1192 7
+3 8
cfi=(17)
cfn=(462)
calls=1 203 
* 361
+1 8
cfn=(1554)
calls=1 875 
* 3281
+1 2

fn=(3326)
381 6050
+2 3025
+1 6050

fn=(1110) SetCurrentRoleId
761 6
+8 2
+2 3
+1 1
+15 2

fn=(1408)
193 4
+6 3
cfi=(11)
cfn=(1262)
calls=1 609 
* 1478
* 1
+2 3
+2 2
+1 2

fn=(1542)
214 4
+3 3
cob=(3)
cfi=(3)
cfn=(510)
calls=1 0 
* 5
* 1
* 2
+5 4

fn=(3726)
1601 2
+1 5
cfn=(1622)
calls=1 -66 
* 19
+3 5
cfn=(1622)
calls=1 -69 
* 19
+3 2

fn=(3316)
423 10
+3 4
+1 4
+1 2
+3 4
+1 4
+1 4

fn=(3318)
504 2
+1 4
+1 2

fn=(3322) SetSessionAuthorization
715 7
+4 3
+6 5
cfn=(3316)
calls=1 423 
* 16
+2 9
cfi=(29)
cfn=(1207)
calls=1 7172 
* 1283
+3 4

fn=(2846)
343 2
+4 3
+2 3
+1 7
cfi=(122)
cfn=(2848)
calls=1 767 
* 100
+7 3
cfi=(122)
cfn=(2850)
calls=1 +80 
* 24
+1 2

fn=(2666)
1387 4
+6 5
cob=(5)
cfi=(5)
cfn=(676)
calls=1 0 
* 7
* 1
* 1
+1 2
+26 2
cfi=(66)
cfn=(1562)
calls=1 1239 
* 14
+1 6
cob=(5)
cfi=(5)
cfn=(684)
calls=1 0 
* 7
* 1
* 1
+1 1
cfi=(66)
cfn=(1572)
calls=1 1263 
* 13
+1 2
+9 3
+1 3
cob=(5)
cfi=(5)
cfn=(692)
calls=1 0 
* 7
* 1
+1 3
cob=(1)
cfi=(1)
cfn=(223)
calls=1 0 
* 1488
* 5
* 1
+1 1
cob=(3)
cfi=(3)
cfn=(654)
calls=1 0 
* 5
* 1
* 3
+1 2
+7 4

fn=(3320)
513 2
+1 4
+1 2

fl=(257)
fn=(5278) tts_heap_init
291 3000
+1 2000

fn=(5496) tts_heap_release
296 3000
+1 2000

fn=(5322)
1275 612500
+8 612500
+2 525000
cfn=(5324) tts_heap_store_tuple
calls=87500 426 
* 4812500
+2 87500
+1 175000

fn=(5266)
1683 6000
+1 7000
cfn=(5268) ExecAllocTableSlot
calls=1000 1093 
* 534303
+1 2000

fn=(5270) MakeTupleTableSlot
1036 5000
+3 3000
+6 2000
+1 2000
+1 3000
-1 500
+2 2500
-2 1500
+4 1000
+2 1500
cfi=(13)
cfn=(2546)
calls=500 -96 
* 85000
* 1500
cfi=(13)
cfn=(2546)
calls=500 -96 
* 92000
* 1000
+2 4000
+1 2000
+1 6000
+1 2000
+1 3000
+1 1500
+1 1500
+1 1000
+2 1000
-4 1500
+1 1500
+1 1000
+2 1000
+4 1000
-2 3000
+5 1000
+1 4500
-3 2000
+5 3500
cfi=(159)
cfn=(5272)
calls=500 373 
* 42803
+6 6000
cfn=(5278)
calls=1000 291 
* 5000
+2 1000
+1 2000

fn=(5492)
1113 3000
+3 1500
cfi=(242)
cfn=(4372)
calls=500 78 
* 5000
* 1000
+2 3000
+3 3000
cfi=(316)
cfn=(5494)
calls=1000 405 
* 39000
+1 6000
cfn=(5496)
calls=1000 296 
* 5000
+1 4000
+2 4500
cfi=(159)
cfn=(5498)
calls=500 391 
* 45000
+1 1000
+4 2000
-14 6000
+28 1000
+2 1000

fn=(4524) ExecTypeFromTLInternal
1807 21
+4 3
+2 6
+1 9
cfi=(240)
cfn=(4526)
calls=3 1091 
* 117
* 6
+3 9
cfi=(159)
cfn=(2932)
calls=3 46 
* 453
* 3
+2 9
cfi=(242)
cfn=(4372)
calls=3 78 
* 30
* 6
+2 9
+2 18
+6 6
-4 6
cfi=(247)
cfn=(4528)
calls=3 277 
* 92
* 3
+3 6
-3 6
cfi=(247)
cfn=(4434)
calls=3 43 
* 72
* 3
+2 6
-2 21
cfi=(159)
cfn=(4530)
calls=3 602 
* 1940
+8 6
-2 6
cfi=(247)
cfn=(4452)
calls=3 721 
* 63
* 21
cfi=(159)
cfn=(4532)
calls=3 763 
* 57
+3 3
-15 21
+18 3
+1 12

fn=(5268)
1093 6000
+1 5000
cfn=(5270)
calls=1000 -58 
* 300303
* 1000
+2 6000
cfi=(45)
cfn=(960)
calls=1000 129 
* 211000
* 2000
+2 1000
+1 2000

fn=(5324)
426 612500
+1 175000
+2 262500
cfn=(5326)
calls=87500 301 
* 2275000
+2 175000
+1 262500
+1 175000
+1 525000
+2 175000
+2 175000

fn=(4522)
1801 12
+1 12
cfn=(4524)
calls=3 +5 
* 3052
+1 6

fn=(5326)
301 354000
+1 177000
+3 531000
+6 177000
+1 531000
+1 177000
+1 177000
+1 177000

fl=(39)
fn=(926)
45 21
+1 6
+1 6
+1 3
+1 3
+1 3
+8 12
cfi=(13)
cfn=(928)
calls=3 1162 
* 567
* 3
+3 15
cfi=(41)
cfn=(932)
calls=3 3507 
* 6218
* 9
+9 9
cfi=(46)
cfn=(966)
calls=3 +8 
* 30
* 6
+2 18
+4 24
cfi=(32)
cfn=(968)
calls=6 -39 
* 486
* 12
+2 6
+2 3
+1 6
+2 12
cfi=(32)
cfn=(968)
calls=3 -46 
* 123
* 6
+7 15
cfi=(32)
cfn=(970)
calls=3 -20 
* 144
* 6
+7 12
cfi=(32)
cfn=(968)
calls=3 -60 
* 123
* 6
+10 12
cfi=(32)
cfn=(968)
calls=3 -70 
* 123
* 6
+7 12
cfi=(32)
cfn=(968)
calls=3 -77 
* 123
* 6
+1 15
cfi=(32)
cfn=(970)
calls=3 -45 
* 144
-1 6
+8 12
cfi=(32)
cfn=(968)
calls=3 -85 
* 363
* 6
+4 6
+2 3
+1 6
-59 36
172 9
cfi=(13)
cfn=(952)
calls=3 1032 
* 255
+1 9
cfi=(45)
cfn=(972)
calls=3 1137 
* 957
+2 12
+9 6
cob=(3)
cfi=(3)
cfn=(388)
calls=3 0 
* 805
* 3
* 3
+1 6
+3 21
+3 6
+1 3
+11 18
+9 48
+1 3
+3 12
cob=(3)
cfi=(3)
cfn=(590)
calls=2 0 
* 178
cob=(1)
cfi=(1)
cfn=(223)
calls=1 0 
* 1324
* 7
+1 9
+5 6
cob=(3)
cfi=(3)
cfn=(388)
calls=3 0 
* 291
* 3
* 3
+1 6
+2 9
+1 12
+1 9
+2 3
+1 12

fn=(1106)
815 6
+7 5
cob=(3)
cfi=(3)
cfn=(446)
calls=1 0 
* 22
* 1
* 2
+3 1
+1 2
+44 2
cob=(3)
cfi=(3)
cfn=(388)
calls=1 0 
* 188
* 1
* 1
+1 2
+2 3
+1 3
+1 3
+2 1
+1 2

fn=(3722)
383 3
+4 3
cfi=(35)
cfn=(3724)
calls=1 1890 
* 9
* 1
+2 2
+1 2
+3 2

fn=(982)
237 12
+1 6
+2 9
+1 9
+1 6

fn=(1060)
447 12
+1 9
+1 6

fn=(1190)
563 12
+1 2
cfi=(26)
cfn=(1192)
calls=2 4526 
* 22
* 4
+6 6
+7 2
+1 4

fn=(1194)
526 12
+1 6
+2 7
cfi=(26)
cfn=(986)
calls=1 334 
* 10
* 2
+25 2
+1 4

fn=(902)
623 24
+5 16
cfi=(40)
cfn=(904)
calls=4 488 
* 3688
* 4
+1 8
+4 12
cfi=(40)
cfn=(916)
calls=4 -25 
* 68
* 4
+16 12
cfi=(19)
cfn=(918)
calls=4 104 
* 64
* 8
+28 24
cob=(3)
cfi=(3)
cfn=(446)
calls=4 0 
* 88
* 4
* 8
+12 8
cob=(3)
cfi=(3)
cfn=(388)
calls=4 0 
* 850
* 4
* 12
+1 16
+2 16
+2 4
+1 8

fn=(1174)
254 18
+6 18
cfi=(32)
cfn=(970)
calls=3 70 
* 144
* 6
+61 18
cob=(3)
cfi=(3)
cfn=(1180) strtod
calls=2 0 
* 166
cob=(1)
cfi=(1)
cfn=(223)
calls=1 0 
* 1384
* 7
* 9
+1 15
+11 12
cfi=(30)
cfn=(790)
calls=3 -96 
* 2514
* 3
+2 6
+6 9
cfi=(35)
cfn=(1046)
calls=3 1905 
* 3646
* 9
+11 6
+9 6
cob=(3)
cfi=(3)
cfn=(388)
calls=3 0 
* 382
* 3
* 9
+1 12
+2 12
+2 3
+1 6

fn=(1128)
745 12
+8 8
+1 2
+2 1
cfi=(26)
cfn=(986)
calls=1 334 
* 10
* 3
+11 5
cfi=(151)
cfn=(3306)
calls=1 1114 
* 450
* 1
+1 2
+6 8
+1 3
+1 3
+2 3
cfi=(151)
cfn=(3280)
calls=1 1161 
* 103
+3 2
cob=(3)
cfi=(3)
cfn=(388)
calls=1 0 
* 232
* 1
* 1
+1 2
+2 3
+1 3
+1 3
+2 1
+1 4

fn=(1130)
793 10
+1 4
+3 4
+1 1
+2 8
cfi=(54)
cfn=(3322)
calls=1 -85 
* 1327
+1 4

fn=(920)
699 24
+1 12
+6 12
+21 12
cfi=(19)
cfn=(922)
calls=4 202 
* 72
* 8
+2 16

fn=(1124)
591 6
+1 2
cob=(3)
cfi=(3)
cfn=(388)
calls=1 0 
* 188
* 1
* 3
+1 4
+3 6
+2 1
+1 2

fn=(1034)
409 18
+6 12
cfi=(30)
cfn=(790)
calls=3 237 
* 1260509
* 3
+2 6
+6 9
cfi=(35)
cfn=(1046)
calls=3 1905 
* 3646
* 9
+11 6
cob=(3)
cfi=(3)
cfn=(388)
calls=3 0 
* 592
* 3
* 9
+1 12
+2 12
+2 3
+1 6

fn=(1108)
882 5
+1 2
+2 8
cfi=(54)
cfn=(1110)
calls=1 761 
* 14
+1 2

fn=(1126)
603 5
+2 4
+2 2
+1 2

fn=(1184)
374 12
+1 9
+1 6

fn=(1196)
487 12
+1 16
+25 2
+1 4

fl=(70)
fn=(1604)
264 9
+1 3
+2 4
cfn=(1606) __get_cpuid_max
calls=1 -60 
* 18
* 2
+3 11
+1 1
+1 4

fn=(1606)
207 5
+40 7
+2 2
+3 1
+1 3

fl=(286)
fn=(4908)
311 35
+1 7
+9 21
cfi=(287)
cfn=(4910)
calls=7 671 
* 3346
* 7
+1 14
+1 14
+83 14

fl=(31)
fn=(796) DynaHashAlloc
279 584
+2 730
cfi=(13)
cfn=(798)
calls=146 772 
* 26796
+1 292

fn=(2166)
804 28
+3 28
+1 14

fn=(5538) expand_table
1503 5060
+1 3036
+20 5060
+1 7084
+1 5060
+2 4048
+3 20
+3 40
cfn=(822) seg_alloc
calls=5 1639 
* 2764
* 20
+2 25
+4 25
+8 25
+5 30
-13 5035
+8 5035
+5 6042
+2 24
+1 42
+9 42
+1 30
+2 42
+1 42
+2 30
+1 30
+2 24
-9 7042
+1 5030
+2 7042
+1 7042
+2 5030
+1 5030
+2 4024
+4 4281
+1 8562
cfn=(844) calc_bucket
calls=1427 868 
* 21405
* 4281
+2 2007
+1 2007
+4 2274
+1 1516
-11 1516
-2 1516
+2 1338
-2 3362
+17 2024
+1 2024
+2 1012
+1 4048

fn=(2226)
861 103620
+1 165792
cfi=(33)
cfn=(2224)
calls=20724 53 
* 2565114
+1 41448

fn=(3750)
815 8
+1 4
+7 8
cfn=(3752) hash_stats
calls=2 +11 
* 12
+5 8
cfi=(13)
cfn=(1396)
calls=2 212 
* 1017
+2 4

fn=(818) next_pow2_int
1743 168
+1 84
+2 126
cfn=(820) my_log2
calls=42 -27 
* 1635
* 168
+1 84

fn=(2008) next_pow2_long
1735 112
+2 84
cfn=(820)
calls=28 -18 
* 1600
* 112
+1 56

fn=(3528)
1380 100
+1 60
+1 40
+1 40
+1 100
+1 60
cfn=(3530) register_seq_scan
calls=20 1788 
* 620
+1 40

fn=(3530)
1788 100
+1 60
+3 80
+1 40
cfi=(26)
cfn=(3532)
calls=20 759 
* 160
* 40
+1 60
+1 80

fn=(1036) string_compare
294 36
+1 42
cob=(3)
cfi=(3)
cfn=(1044)
calls=5 0 
* 291
cob=(1)
cfi=(1)
cfn=(223)
calls=1 0 
* 1365
* 10
+1 12

fn=(822)
1639 1208
+3 906
+1 2114
cfi=(87)
cfn=(2136)
calls=281 177 
* 14331
cfn=(796)
calls=21 279 
* 3462
* 302
+2 604
+3 7550
cob=(3)
cfi=(3)
cfn=(828)
calls=301 0 
* 72240
cob=(1)
cfi=(1)
cfn=(223)
calls=1 0 
* 1511
* 306
+2 302
+1 604

fn=(830) choose_nelem_alloc
604 84
+7 140
+10 28
+3 28
+1 112
+1 56
-2 106
+1 424
+1 212
+2 28
+1 56

fn=(836)
910 222761
+3 63646
-2 190938
cfi=(33)
cfn=(2940)
calls=7783 65 
* 443631
cfi=(33)
cfn=(2224)
calls=23976 53 
* 2997075
cfi=(33)
cfn=(838)
calls=64 35 
* 11320
* 254584
cfn=(842)
calls=31823 +13 
* 6135062
+5 63646

fn=(794)
317 168
+14 84
+3 21
+5 56
+1 4
+2 26
+1 91
cfi=(14)
cfn=(432)
calls=13 +52 
* 5900
* 7
cfi=(14)
cfn=(432)
calls=1 +52 
* 428
* 14
+6 42
cob=(3)
cfi=(3)
cfn=(424)
calls=14 0 
* 266
* 14
* 21
cob=(3)
cfi=(3)
cfn=(424)
calls=7 0 
* 127
* 7
* 63
cfn=(796)
calls=21 -70 
* 2793
* 21
+1 2331
+2 84
+1 126
cob=(3)
cfi=(3)
cfn=(810)
calls=20 0 
* 1205
cob=(1)
cfi=(1)
cfn=(223)
calls=1 0 
* 1308
* 25
+3 84
+1 84
cfi=(13)
cfn=(812)
calls=14 -27 
* 126
+5 84
+1 10
+1 76
+4 60
+1 21
+2 24
+3 8
+12 84
+2 84
+1 12
+2 34
+5 84
+2 84
+1 12
+2 34
+3 84
+1 35
+2 28
+2 84
+7 28
+1 35
+1 14
+1 14
+3 28
+14 28
+1 28
+1 42
+1 28
+3 84
+2 56
cfn=(796)
calls=14 279 
* 1862
* 28
+1 56
+6 42
+2 63
cfn=(814) hdefault
calls=21 571 
* 16863
+2 63
+2 84
+12 20
+3 84
+7 84
+6 84
+2 28
+1 28
+7 84
+3 84
+1 84
+4 84
+1 84
+1 84
+3 105
cfn=(816) init_htab
calls=21 637 
* 118081
* 63
+11 84
+1 42
-1 28
+12 60
+1 10
+2 7
+2 42
+1 14
-1 30
+1 10
+7 60
+4 24
+2 24
+2 668
+2 930
cfn=(832) element_alloc
calls=155 1658 
* 544484
-2 12
+2 72
cfn=(832)
calls=12 1658 
* 32945
* 501
-4 704
+11 84
+1 6
+1 3
+1 12
-1 18
+1 72

fn=(814)
571 84
+1 63
+2 16296
+2 42
+1 42
+3 42
+1 42
+2 42
+2 42
+3 42
+2 42
+1 42
+5 42

fn=(816)
637 126
+1 63
+9 84
+1 10
+1 1440
-1 490
+8 210
cfn=(818)
calls=21 1743 
* 1475
* 21
+8 147
+3 189
+1 126
+5 189
+1 84
cfn=(818)
calls=21 1743 
* 790
* 21
+6 126
+9 84
+2 42
+2 98
cfn=(796)
calls=14 279 
* 1862
-1 28
+2 56
+5 84
+2 891
cfn=(822)
calls=297 1639 
* 102676
* 594
+1 1188
-3 3690
+8 84
cfn=(830)
calls=21 604 
* 966
* 42
+14 21
+1 84

fn=(832)
1658 1428
+1 714
+7 952
+4 1428
+2 714
+1 1666
cfi=(87)
cfn=(2136)
calls=162 177 
* 8262
cfn=(796)
calls=76 279 
* 18423
* 238
+2 476
+4 238
+1 476
+1 476
+2 157560
+1 105040
+1 105040
-4 210794
+8 952
+1 1600
cfi=(125)
cfn=(2216)
calls=160 225 
* 2240
* 320
+3 2856
+1 2618
+2 952
+1 1440
+2 160
+1 320
-1 78
+1 156

fn=(3752)
834 8
+13 4

fn=(2006)
733 35
+10 21
cfn=(2008)
calls=7 1735 
* 626
* 7
+2 63
cfn=(2008)
calls=7 1735 
* 356
* 7
+2 7
+1 28
+4 7
+2 28
cfi=(87)
cfn=(2000)
calls=7 493 
* 161
* 35
cfi=(87)
cfn=(2002)
calls=7 476 
* 147
* 7
+2 28
cfi=(87)
cfn=(2000)
calls=7 493 
* 161
* 35
cfi=(87)
cfn=(2002)
calls=7 476 
* 147
* 7
+3 21
cfn=(830)
calls=7 604 
* 308
* 14
+1 42
+1 35
+1 35
cfi=(87)
cfn=(2000)
calls=7 493 
* 161
* 35
cfi=(87)
cfn=(2000)
calls=7 493 
* 161
* 35
cfi=(87)
cfn=(2002)
calls=7 476 
* 147
* 7
+4 7
+1 14

fn=(3534)
1390 5712
+11 7140
+3 1624
+1 1624
+1 1420
+1 1218
+6 3066
+1 3066
+1 3066
+1 3066
+1 3066
+2 3066
+2 6
cfn=(3536)
calls=2 +45 
* 102
+1 4
+6 8160
+1 5100
+2 7140
+8 1020
+3 20724
+2 27
+1 27
cfn=(3536)
calls=9 +21 
* 459
+1 18
+2 20688
+2 11
+1 11
+1 77
-13 49536
+18 4044
+1 4044
+1 727
+1 2181
+1 1454
+1 1454
-2 852
+1 568
+1 1402

fn=(3538) deregister_seq_scan
1800 80
+4 80
+2 100
+2 140
+1 140
+1 60
+1 20
-7 40
+12 40

fn=(844)
868 298288
+3 298288
+1 298288
+1 81858
+2 27286
+1 54572
-1 47286
+1 94572

fn=(2164)
780 28
+6 21
cfn=(2008)
calls=7 1735 
* 626
* 7
+2 63
cfn=(2008)
calls=7 1735 
* 356
* 7
+2 7
+1 28
+3 7
+1 14

fn=(3536)
1466 80
+1 120
+1 80
cfn=(3538)
calls=20 1800 
* 700
+1 40

fn=(5536) has_seq_scans
1821 3036
+3 5060
+5 1012
+1 2024

fn=(820)
1719 210
+5 210
+3 2605
+2 70
+1 140

fn=(842)
924 658305
+1 219435
+1 480193
+23 63644
-23 41323
+23 206090
+7 150881
+1 109703
-1 19946
+2 3036
cfn=(5536)
calls=1012 1821 
* 11132
* 1012
-1 2024
+2 3036
cfn=(5538)
calls=1012 1503 
* 152128
+6 365725
cfn=(844)
calls=73145 -97 
* 1179033
* 73145
+2 585160
+1 438870
+2 512015
+2 146290
+3 365725
+1 219435
+5 219435
+1 219435
+2 73145
+2 254288
+1 321391
cob=(3)
cfi=(3)
cfn=(3062)
calls=45906 0 
* 992890
cob=(1)
cfi=(1)
cfn=(223)
calls=1 0 
* 1360
cfn=(1036)
calls=6 294 
* 1756
* 45911
-1 91826
+2 45913
+1 35318
+1 52977
-6 181608
+13 146290
+1 101000
+5 441715
+3 52270
+1 72075
+1 4220
+3 43512
+3 87024
+1 137800
cfi=(125)
cfn=(2216)
calls=13780 225 
* 192920
* 27560
+4 456876
+3 87024
+3 261072
+1 239316
+2 87024
+1 124020
+7 65268
+11 50508
+1 396
+3 100488
+4 125610
cfn=(858) get_hash_entry
calls=25122 1251 
* 2260628
* 25122
+1 50244
+17 75366
+1 50244
+3 75366
+1 200976
cob=(3)
cfi=(3)
cfn=(856)
calls=25067 0 
* 367454
cfi=(16)
cfn=(460)
calls=55 46 
* 15418
* 25067
+9 75366
+6 292580

fn=(858)
1251 125610
+1 75366
+6 100772
+1 152810
cfi=(125)
cfn=(2216)
calls=15281 225 
* 213934
* 30562
+3 277123
+2 50386
+1 25122
+57 301464
+1 527562
+2 115769
-58 284
+15 497
cfn=(832)
calls=71 1658 
* 50188
* 213
+37 71
+7 137529
+2 15281
+1 30562
-1 9841
+1 19682

fn=(3690)
1835 10
+10 4
+4 10
+6 2
+1 4

fl=(280)
fn=(4792) CheckExprStillValid
1765 15
+1 3
+5 9
+1 9
+1 9
+2 6
+2 63
+2 45
cfn=(4794) ExecEvalStepOp
calls=9 2167 
* 1245
* 54
+26 9
-30 57
+33 6

fn=(4796) ExecJustConst
2004 10
+1 6
+2 8
+1 4
+1 4

fn=(4772)
169 12
+2 3
cfn=(4774) ExecInitInterpreter
calls=3 2133 
* 29172
+11 18
+9 6
+10 18
+7 12
+49 12
+1 6
-1 4
+3 4
+1 2
+12 2
+2 35
+2 45
-4 29
+7 6
+4 2
+1 6

fn=(4794)
2167 45
+2 54
+5 15
+1 35
cob=(3)
cfi=(3)
cfn=(284)
calls=5 0 
* 1045
* 5
* 5
+6 15
+3 8
+1 18

fn=(4774)
2133 9
+3 9
+5 4
cfn=(4776) ExecInterpExpr
calls=1 299 
* 18
-1 1
+4 2
+2 946
+1 516
-3 260
+7 5
cfi=(36)
cfn=(864)
calls=1 114 
* 27396
+6 6

fn=(4776)
299 3507
403 2505
+1 2
+6 1500
+1 1500
+1 1500
+1 1500
+1 1500
+3 4000
+7 500
620 1500
+3 1000
+1 2500
cfi=(41)
cfn=(5118)
calls=500 5304 
* 2505625
* 500
+1 2000
+1 2500
+2 2000
+5 1500
+1 1500
+5 1000
+2 7000
-2 7000
+8 1000
+1 2500
cfi=(41)
cfn=(5114)
calls=500 +35 
* 150802
* 500
+1 2000
+1 2500
+3 2000
976 3500
cob=(12)
cfi=(241)
cfn=(5108) plpgsql_param_eval_var
calls=500 6429 
* 17500
+1 2000
+70 2500
+9 1500
+1 2500
+1 1000
+2 1000
+1 3000
cfi=(185)
cfn=(5110)
calls=500 276 
* 132607
* 500
+7 4000
+5 1500
+1 1500
+1 2500
+3 1000
+1 3000
cfi=(41)
cfn=(4952)
calls=500 512 
* 96802
* 500
+1 2000
+15 2000
1734 2000
+1 1000
+1 2004

fn=(4778)
2116 2480
+1 1240
+1 1240
+2 3720
+1 764
+1 1428
+1 466
+1 5
+1 1240

fn=(4790) ExecInterpExprStillValid
1745 18
+5 15
cfn=(4792)
calls=3 +15 
* 1530
+3 15
+3 21
cfn=(4776)
calls=1 299 
* 6348
cfn=(4796)
calls=2 2004 
* 32
+1 6

fl=(218)
fn=(4408)
305 48
+1 16
cfi=(13)
cfn=(3400)
calls=4 853 
* 668
* 20
+7 24
+3 12
+1 12
+1 12
+1 12
+1 12
+1 12
+1 12
+1 8
+2 4
+1 8

fn=(4296)
585 12
+1 8
cfi=(13)
cfn=(3400)
calls=2 853 
* 376
* 10
+2 6
+1 6
+1 4
+1 4
+1 4
+1 4
+1 4
+1 4
+1 4
+1 6
+1 2
+1 4

fn=(5202)
387 2500
+1 2000
cfi=(13)
cfn=(3400)
calls=500 853 
* 61000
* 2500
+2 1500
cfi=(13)
cfn=(928)
calls=500 1162 
* 81000
* 1000
+1 1500
+2 500
+1 1000

fn=(4294)
33 24
+1 12
cfi=(13)
cfn=(3400)
calls=3 853 
* 470
* 15
+2 9
+1 9
+1 9
+1 9
+1 9
+1 3
+1 6

fn=(4414)
241 56
+1 28
cfi=(13)
cfn=(3400)
calls=7 853 
* 1187
* 35
+2 21
+1 21
+1 21
+7 14
+1 14
+1 14
+2 21
+2 7
+1 14

fn=(5028)
456 4
+1 4
cfi=(13)
cfn=(3400)
calls=1 853 
* 181
* 5
+2 3
+1 2
+1 2
+1 2
+1 1
+1 2

fn=(3874)
546 3006
+1 2004
cfi=(13)
cfn=(3400)
calls=501 853 
* 83667
* 2505
+2 1002
+1 1503
+1 1503
+1 1002
+1 1503
+2 501
+1 1002

fn=(4436)
285 20
+1 16
cfi=(13)
cfn=(3400)
calls=4 853 
* 612
* 20
+2 12
+1 12
+1 4
+1 8

fn=(5156)
422 3000
+1 2000
cfi=(13)
cfn=(3400)
calls=500 853 
* 90500
* 2500
+2 1000
+1 1500
+1 1500
+1 1000
+1 1000
+1 1000
+1 1500
+2 500
+1 1000

fl=(255)
fn=(4510)
110 24
+1 16
+2 16
+1 8
+1 16

fl=(267)
fn=(4640)
423 30
+1 6
+1 6
+10 18
+3 48
+10 6
+1 24
cfi=(268)
cfn=(4642)
calls=6 78 
* 48
* 24
623 12
+3 12
+3 36
cfi=(45)
cfn=(1586)
calls=6 260 
* 1740
* 18
+8 12

fn=(4638)
1441 21
+1 12
cfi=(13)
cfn=(3400)
calls=3 853 
* 606
* 15
+2 6
+1 9
+1 9
+1 6
+1 6
+1 12
+1 6
+1 6
+1 9
+3 9
+1 12
+1 12
+1 9
-1 6
+7 6
+10 3
+1 6

fn=(4644)
245 36
+9 36
+3 45
+1 9
+2 36
cfi=(268)
cfn=(4642)
calls=9 78 
* 90
* 18
+2 27
+3 36
+51 18
+2 36
+1 9
-59 63
+86 18
+1 45
cfi=(45)
cfn=(1586)
calls=9 -87 
* 2610
* 9
+6 18
+4 27
+1 27
+1 18
+1 27
+1 18

fn=(4672)
2388 21
+1 12
cfi=(13)
cfn=(3400)
calls=3 853 
* 627
* 15
+1 9
+2 6
+1 9
+1 9
+2 6
+1 6
+1 6
+1 12
-1 6
+2 18
cfi=(259)
cfn=(4636)
calls=3 1089 
* 57
-1 15
-1 6
+3 12
+2 12
+2 9
+11 9
cfi=(274)
cfn=(4674)
calls=3 6698 
* 36
* 6
+4 6
+5 12
+1 6
+1 15
-1 9
+2 6
+1 15
-1 3
+2 24
-1 3
-1 9
+21 3
+1 6

fl=(37)
fn=(884)
83 12
+4 12
+2 64
-2 56
+5 8

fn=(4250)
51 36
+3 36
cob=(3)
cfi=(3)
cfn=(1246)
calls=6 -54 
* 768
* 6
* 6
+1 24
+2 6
+1 12

fl=(50)
fn=(3586)
3339 8016
+1 8016
cfn=(3232)
calls=2004 3553 
* 228452
+1 6012
cfn=(3258)
calls=2004 -25 
* 302464
+1 4008

fn=(5738) AbortBufferIO
3981 5
+1 2
+2 2
+43 5

fn=(2218)
4239 4
+3 3
+1 2
+1 2

fn=(3194)
642 110358
+5 49224
cfi=(140)
cfn=(3154)
calls=22 153 
* 10391
* 110
cfi=(140)
cfn=(3158)
calls=22 209 
* 924
+7 61310
+9 110358
+1 171668
cfn=(3196) ReadBuffer_common
calls=12262 +42 
* 16931408
* 12262
+2 36786
+1 96858
+1 10762
+1 43048
-1 1500
+1 6000

fn=(3200) BufferAlloc
997 122620
+14 110358
+3 36786
cfi=(90)
cfn=(3202)
calls=12262 81 
* 1851562
* 12262
+1 98096
+3 49048
cfi=(99)
cfn=(2170)
calls=12262 1122 
* 1667632
+1 61310
cfi=(90)
cfn=(3204)
calls=12262 93 
* 1902343
* 12262
+1 24524
+7 64572
+2 53810
cfn=(3206) PinBuffer
calls=10762 1578 
* 3317516
* 10762
+3 32286
cfi=(99)
cfn=(2182)
calls=10762 1726 
* 968580
+2 21524
+2 43048
+19 21524
+7 4500
cfi=(99)
cfn=(2182)
calls=1500 1726 
* 135000
+9 1500
cfn=(3210) ReservePrivateRefCountEntry
calls=1500 187 
* 13500
+6 7500
cfi=(89)
cfn=(5414)
calls=1500 202 
* 387105
* 1500
+5 4500
+3 4500
cfn=(5436) PinBuffer_Locked
calls=1500 1663 
* 199500
+9 6000
+78 6000
+34 6000
cfi=(99)
cfn=(2170)
calls=1500 -84 
* 205500
+2 1500
+2 1500
+10 10500
cfi=(90)
cfn=(5440)
calls=1500 121 
* 417703
* 1500
+2 3000
+51 4500
cfn=(5424)
calls=1500 4099 
* 136514
* 1500
+8 4500
+1 12000
+1 1500
+24 10500
+1 4500
+3 7500
+3 4500
+2 12000
cfi=(123)
cfn=(5438)
calls=1500 262 
* 31500
+2 3000
+7 4500
cfi=(99)
cfn=(2182)
calls=1500 1726 
* 136500
+7 6000
cfn=(5442) StartBufferIO
calls=1500 3882 
* 448514
* 3000
+1 4500
+4 1500
+1 24524

fn=(5608)
2598 2
+2 2

fn=(5740) UnlockBuffers
3525 3
+1 2
+2 2
+18 2

fn=(3152)
2795 10190
+2 8216
cfi=(140)
cfn=(3154)
calls=8 153 
* 8096
* 40
cfi=(140)
cfn=(3158)
calls=8 209 
* 336
+2 12228
cfi=(140)
cfn=(3162)
calls=2038 688 
* 1336321
+1 4076

fn=(3206)
1578 53810
+1 43048
+4 43048
cfn=(3208) GetPrivateRefCountEntry
calls=10762 279 
* 1302202
* 10762
+2 21524
+5 10762
cfn=(3210)
calls=10762 187 
* 110400
+1 32286
cfn=(3212) NewPrivateRefCountEntry
calls=10762 253 
* 150668
* 10762
+2 43048
cfi=(123)
cfn=(3214)
calls=10762 245 
* 172192
* 10762
+3 43048
+3 21524
+3 10762
+2 21524
+3 43810
+1 40
+8 10000
+4 75334
cfi=(123)
cfn=(3218)
calls=10762 316 
* 365908
* 21524
+3 53810
+1 21524
+10 53810
+2 53810
cfi=(162)
cfn=(3222)
calls=10762 906 
* 473528
+1 10762
+1 21524

fn=(3208)
279 198144
+11 66048
+2 544295
+2 544295
+1 44524
-5 325839
+15 32286
+1 21524
+44 66048

fn=(3232)
3553 140510
+4 56204
+3 196714
+2 56204
+1 56204
cfi=(99)
cfn=(2182)
calls=14051 1726 
* 1270090
* 14051
+1 28102
+1 42755
cfi=(99)
cfn=(2170)
calls=8551 1122 
* 1162936
* 8551
+1 11000
+1 27500
cfi=(99)
cfn=(2170)
calls=5500 1122 
* 753500
* 5500
+3 56204

fn=(3260) UnpinBuffer
1701 103572
+2 69048
+3 69048
cfn=(3208)
calls=17262 279 
* 420801
* 17262
+3 34524
+1 86310
cfi=(162)
cfn=(3262)
calls=17262 915 
* 1240602
+3 86310
+1 69048
+15 49048
cfi=(123)
cfn=(3214)
calls=12262 245 
* 196192
* 12262
+3 49048
+3 24524
+2 12262
+2 85834
cfi=(123)
cfn=(3218)
calls=12262 316 
* 416908
* 24524
+2 12262
+4 49048
+24 36786
cfn=(3264) ForgetPrivateRefCountEntry
calls=12262 382 
* 183930
+2 34524

fn=(3490)
2839 11388
+1 19929
+1 25623
+7 2847
cfi=(53)
cfn=(1610)
calls=2847 4834 
* 22776
* 19929
+1 28470
+11 5694

fn=(5384)
3354 20000
+2 15000
cfi=(162)
cfn=(3198)
calls=5000 893 
* 115000
+1 10000
+6 20000
cfn=(3208)
calls=5000 279 
* 120000
* 5000
+2 25000
+2 25000
cfi=(162)
cfn=(3222)
calls=5000 906 
* 220000
+1 10000

fn=(3196)
706 134882
+5 61310
+2 24524
+3 36786
cfi=(162)
cfn=(3198)
calls=12262 893 
* 282663
+2 36786
+10 24524
+1 7500
cfi=(140)
cfn=(3162)
calls=1500 -41 
* 231000
* 1500
+2 24524
+17 122620
cfn=(3200)
calls=12262 997 
* 12763785
* 12262
+2 36786
+1 43048
+1 3000
+1 6000
+9 36786
+2 43048
+3 21524
+1 32286
+2 32286
+15 43048
+2 21524
+3 21524
+4 43048
+70 13500
+2 3000
+3 33000
cob=(3)
cfi=(3)
cfn=(828)
calls=1500 0 
* 1368000
* 1500
+2 10500
cfi=(140)
cfn=(5444)
calls=1500 617 
* 915772
* 1500
+67 6000
+6 3000
+11 7500
cfn=(5472) TerminateBufferIO
calls=1500 3949 
* 357014
+3 4500
+1 4500
+11 4500
+1 49048

fn=(3460)
595 39855
+1 55797
cfn=(3194)
calls=7971 +46 
* 8547542
+1 15942

fn=(2828)
2444 3
+3 4
cob=(3)
cfi=(3)
cfn=(828)
calls=1 0 
* 16
* 1
+2 118
+1 1
+1 1
+2 6
cfi=(31)
cfn=(794)
calls=1 317 
* 2758
* 1
+2 2

fn=(3476)
2612 593166
+5 395444
+3 1384054
+3 395444
+1 395444

fn=(3640) CheckForBufferLeaks
2497 6
+34 6

fn=(994)
468 4
+1 2
+7 7
+35 2
+1 6
-1 7
+3 3
+3 10
+1 2

fn=(3210)
187 36786
+2 36786
+1 11760
+9 1004
+4 5015
+2 4012
+2 1004
+1 502
-9 2507
+47 24524

fn=(3468)
1522 32454
+1 5409
+3 10818
+3 6148
+12 21518
+2 12296
+1 1156
-1 578
+1 3468
+1 578
-1 578
+2 578
+1 11140
cfn=(3260)
calls=2785 1701 
* 618270
+4 25600
cfn=(3460)
calls=5120 595 
* 5556981
+1 10818

fn=(5424)
4099 24000
+4 36000
cfi=(313)
cfn=(5426)
calls=6000 1012 
* 138000
+5 30000
cfi=(123)
cfn=(5428)
calls=6000 376 
* 168000
* 6000
+2 24000
+1 6000
+3 18000
cfi=(143)
cfn=(5432)
calls=6000 176 
* 72063
+1 12000
+1 12000

fn=(3258)
3316 57908
+1 28954
+3 28954
+9 130293
cfn=(3260)
calls=14477 1701 
* 2765407
+1 28954

fn=(3264)
382 49048
+3 49048
+3 24524
+7 36786
+15 24524

fn=(3638)
2422 10
+1 2
cfn=(3640)
calls=2 +74 
* 8
+2 6
cfi=(203)
cfn=(3642)
calls=2 573 
* 24
+3 4

fn=(5406)
1457 10000
+5 5000
+3 5000
+6 17500
+6 10000
cfi=(123)
cfn=(3214)
calls=2500 245 
* 40000
* 2500
+3 10000
+3 5000
+3 2500
+2 17500
cfi=(123)
cfn=(3218)
calls=2500 316 
* 85000
* 5000
+2 2500
+6 11500
+2 4500
+1 4500
+1 4500
+3 5000

fn=(5436)
1663 6000
+15 6000
cfi=(123)
cfn=(3214)
calls=1500 245 
* 24000
* 1500
+2 1500
+1 12000
cfi=(123)
cfn=(5438)
calls=1500 262 
* 31500
+2 6000
+2 4500
cfn=(3212)
calls=1500 253 
* 21000
* 1500
+1 7500
+2 7500
cfi=(162)
cfn=(3222)
calls=1500 906 
* 66000
+1 3000

fn=(5736)
2478 5
+1 1
cfn=(5738)
calls=1 3981 
* 14
+1 1
cfn=(5740)
calls=1 3525 
* 9
+2 1
cfn=(3640)
calls=1 +15 
* 4
+3 1
cfi=(203)
cfn=(5742)
calls=1 584 
* 9
+1 2

fn=(3212)
253 36786
+7 24524
+1 12262
+3 36786
+1 24524
+2 12262
+1 24524

fn=(2876)
2468 2
+1 3
cfi=(67)
cfn=(2110)
calls=1 362 
* 32
+1 2

fn=(5442)
3882 9000
+11 13500
cfi=(99)
cfn=(2170)
calls=1500 1122 
* 205500
+2 4500
cfn=(5424)
calls=1500 4099 
* 136514
* 1500
+2 6000
+1 1500
+15 15000
+8 1500
+1 12000
cfi=(123)
cfn=(5438)
calls=1500 262 
* 31500
+2 3000
+1 3000
+2 1500
+1 3000

fn=(5472)
3949 10500
+5 4500
cfn=(5424)
calls=1500 4099 
* 136514
* 1500
+4 1500
+1 3000
+3 3000
+1 12000
cfi=(123)
cfn=(5438)
calls=1500 262 
* 31500
+2 1500
+2 12000
cfi=(99)
cfn=(2182)
calls=1500 1726 
* 136500
+1 3000

fl=(170)
fn=(3226)
97 12564
+1 21987
cfn=(3228) IsCatalogClass
calls=3141 +11 
* 93525
+1 6282

fn=(5216)
80 2500
+1 1500
cfn=(5218) IsToastClass
calls=500 +72 
* 18000
* 3500
cfn=(3228)
calls=500 +28 
* 27500
* 2000
+1 1000

fn=(5220) IsToastNamespace
182 6000
+1 3000
+1 4500
cfi=(55)
cfn=(5222)
calls=1500 3152 
* 13500
-1 6000
+2 3000

fn=(3228)
109 18205
+1 10923
+6 10923
cfn=(3230) IsSystemNamespace
calls=3641 +52 
* 25487
* 13923
cfn=(5220)
calls=1000 +66 
* 24000
* 3000
+1 2000
+15 5282
+1 7282

fn=(3030)
225 19749
+2 26308
+1 13126
+1 13106
+1 13106
+1 13106
+1 13106
+1 13102
+1 13096
+1 13094
+1 13082
+2 96
+2 26134
+1 13058
+1 13056
+1 13050
+1 13046
+1 13038
+1 13038
+1 13038
+1 13038
+1 13038
+1 13034
+1 13032
+1 13032
+1 13024
+1 13022
+1 13020
+1 13018
+2 54
+2 26032
+1 13016
+1 13016
+1 13016
+1 13016
+1 13016
+1 13016
+1 13016
+1 13016
+1 13016
+1 13016
+1 13016
+1 13016
+1 13016
+1 13016
+1 13016
+1 13016
+3 6508
+1 13166

fn=(3230)
168 10923
+1 7282
+1 7282

fn=(5218)
153 2000
+1 1500
+2 1500
cfn=(5220)
calls=500 +26 
* 12000
+1 1000

fl=(272)
fn=(4658)
2324 15
+1 9
cfn=(4660) get_typlen
calls=3 1943 
* 1422
* 6
+6 6
+1 4
+6 5
cfi=(293)
cfn=(5098)
calls=1 398 
* 14
* 1
+1 2
+25 1
+1 6

fn=(4660)
1943 12
+3 12
cfi=(151)
cfn=(3306)
calls=3 1114 
* 1026
* 3
+1 6
+2 24
+3 9
+1 9
cfi=(151)
cfn=(3280)
calls=3 1161 
* 309
+1 6
+4 6

fn=(4946)
2049 1521
+1 4056
+6 2028
+3 1014
+1 1014

fn=(5178)
1655 5000
+1 9000
cfi=(151)
cfn=(3012)
calls=1000 1227 
* 27256987
+3 2000

fn=(4888)
2284 125
+9 100
cfi=(151)
cfn=(3306)
calls=25 1114 
* 139558
* 25
+1 50
+2 200
+1 100
+3 75
cfi=(151)
cfn=(3280)
calls=25 1161 
* 2575
+1 25
+10 25
+1 50

fn=(4922)
2446 60
+4 40
cfi=(151)
cfn=(3306)
calls=10 1114 
* 90577
* 10
+1 20
+2 80
+1 40
+1 40
+1 30
cfi=(151)
cfn=(3280)
calls=10 1161 
* 1030
+1 20

fn=(5076)
2609 3535
+4 2020
cfi=(151)
cfn=(3306)
calls=505 1114 
* 172710
* 505
+1 1010
+2 4040
+2 2525
+5 2020
+6 2020
+1 1515
cfn=(4946)
calls=505 2049 
* 9595
* 1010
+2 1515
cfi=(151)
cfn=(3280)
calls=505 1161 
* 52015
+1 2020

fn=(5086)
1518 12
+4 12
cfi=(151)
cfn=(3306)
calls=3 1114 
* 1026
* 3
+1 6
+3 27
+1 9
cfi=(151)
cfn=(3280)
calls=3 1161 
* 309
+1 3
+1 6

fn=(5064)
2375 4
+3 4
cfi=(151)
cfn=(3306)
calls=1 1114 
* 342
* 1
+1 2
+2 8
+3 3
+1 3
cfi=(151)
cfn=(3280)
calls=1 1161 
* 103
+1 2
+4 2

fn=(4916)
2567 8
+9 8
cfi=(151)
cfn=(3306)
calls=2 1114 
* 684
* 2
+1 4
+2 16
+1 8
+6 8
+3 2
+1 6
cfi=(151)
cfn=(3280)
calls=2 1161 
* 206
+1 4
+9 4

fn=(5078)
2642 7035
+4 4020
cfi=(151)
cfn=(3306)
calls=1005 1114 
* 343710
* 1005
+1 2010
+2 8040
+2 5025
+5 4020
+6 4020
+1 11045
+2 15
cfi=(151)
cfn=(3280)
calls=5 1161 
* 515
-2 3000
+2 3000
cfi=(151)
cfn=(3280)
calls=1000 1161 
* 103000
+1 4020

fn=(4886)
2267 88
+1 22
+2 110
cfn=(4888)
calls=22 +14 
* 141480
+1 44

fn=(5100)
1613 16
+4 16
cfi=(151)
cfn=(3306)
calls=4 1114 
* 1368
* 4
+1 8
+3 36
+1 12
cfi=(151)
cfn=(3280)
calls=4 1161 
* 412
+1 4
+1 16

fn=(4964)
1499 8
+4 8
cfi=(151)
cfn=(3306)
calls=2 1114 
* 44685
* 2
+1 4
+3 18
+1 6
cfi=(151)
cfn=(3280)
calls=2 1161 
* 206
+1 2
+1 4

fn=(4906)
2494 44
+3 44
cfi=(151)
cfn=(3306)
calls=11 1114 
* 3762
* 11
+1 22
+2 88
+3 44
+1 36
+2 2
+1 6
cfi=(151)
cfn=(3280)
calls=2 1161 
* 206
* 27
cfi=(151)
cfn=(3280)
calls=9 1161 
* 927
+1 22
+4 22

fn=(4978)
2791 24
+3 24
cfi=(151)
cfn=(3306)
calls=6 1114 
* 2052
* 6
+1 12
+2 48
+3 18
+1 18
cfi=(151)
cfn=(3280)
calls=6 1161 
* 618
+1 12
+4 12

fn=(4998)
1556 8
+4 8
cfi=(151)
cfn=(3306)
calls=2 1114 
* 684
* 2
+1 4
+3 18
+1 6
cfi=(151)
cfn=(3280)
calls=2 1161 
* 206
+1 2
+1 4

fn=(5074)
1537 12
+4 12
cfi=(151)
cfn=(3306)
calls=3 1114 
* 45305
* 3
+1 6

ob=(7)
fl=(7)
fn=(5834) 0x00000000000023b0
0 8
cob=(1)
cfi=(1)
cfn=(223)
calls=1 0 
0 1448
0 5
0 1
cfn=(5846) 0x0000000000002340
calls=1 0 
0 9
0 3

fn=(2354) shm_open
0 16
cob=(1)
cfi=(1)
cfn=(223)
calls=1 0 
0 2288
0 5
0 14
cob=(1)
cfi=(1)
cfn=(223)
calls=1 0 
0 1291
0 5
0 10
cob=(1)
cfi=(1)
cfn=(223)
calls=1 0 
0 1310
0 5
0 4
cob=(1)
cfi=(1)
cfn=(223)
calls=1 0 
0 1366
0 5
0 6
cob=(1)
cfi=(1)
cfn=(223)
calls=1 0 
0 745
0 5
0 10

fn=(318) 0x00000000000023f0
0 11

ob=(9)
fl=(272)
fn=(5074)
1545 27
+1 9
cfi=(151)
cfn=(3280)
calls=3 1161 
* 309
+1 3
+1 6

fl=(153)
fn=(3246)
301 13340
+1 10672
+1 3567
cfn=(3248) dlist_init
calls=1189 -24 
* 14268
+2 10672
+1 8004
+1 10672
+1 8004
+3 5336

fn=(4550)
318 15
+1 12
+3 9
+1 12
+1 12
+1 9
+3 6

fn=(2902)
575 308
+1 308
+1 231
+3 154

fn=(3314)
386 10880
+2 8704
+1 2176
+6 4352

fn=(5542)
359 3081
+1 5135
+1 5135
+1 2054

ob=(7)
fl=(7)
fn=(318)
0 5

fn=(2362)
0 11
cob=(1)
cfi=(1)
cfn=(223)
calls=1 0 
0 1312
0 5
0 16

fn=(5846)
0 9

ob=(9)
fl=(153)
fn=(5542)
359 9
+1 15
+1 15
+1 6

fn=(3248)
279 3567
+1 8323
+1 2378

fn=(2900)
555 3
+1 2
+1 2

fl=(317)
fn=(5588)
266 4
+14 3
+1 2
+26 2

ob=(4) /usr/lib64/libm-2.17.so
fl=(4) ???
fn=(178) rint
0 10

fn=(1000) __rint_sse41
0 2

fn=(196) sin
0 8

fn=(5912) 0x0000000000005680
0 9

fn=(188) floorf
0 5

fn=(190) floor
0 5

fn=(182) __log_finite
0 8

ob=(8) /usr/lib64/valgrind/vgpreload_core-amd64-linux.so
fl=(8) ???
fn=(330) 0x00000000000006e0
0 11

ob=(4)
fl=(4)
fn=(186) __acos_finite
0 5

fn=(5898) 0x00000000000056f0
0 8
cob=(1)
cfi=(1)
cfn=(223)
calls=1 0 
0 1448
0 5
0 1
cfn=(5912)
calls=1 0 
0 9
0 3

fn=(176) cos
0 8

fn=(180) __pow_finite
0 5

fn=(292) 0x0000000000005730
0 16

fn=(174) __exp_finite
0 8

fn=(194) __atan2_finite
0 8

fn=(184) rintf
0 5

ob=(8)
fl=(8)
fn=(330)
0 5

fn=(5808) 0x00000000000006a0
0 8
cob=(1)
cfi=(1)
cfn=(223)
calls=1 0 
0 934
0 5

ob=(4)
fl=(4)
fn=(192) __asin_finite
0 3

ob=(8)
fl=(8)
fn=(5808)
0 1
cfn=(5826) 0x0000000000000630
calls=1 0 
0 9

ob=(4)
fl=(4)
fn=(192)
0 2

ob=(8)
fl=(8)
fn=(5808)
0 3

fn=(5826)
0 9

ob=(3)
fl=(3)
fn=(348) (below main)
0 25
cfn=(350) __cxa_atexit
calls=1 0 
0 61
0 13
cob=(9)
cfi=(9)
cfn=(354)
calls=1 0 
0 55
0 8
cfn=(368) _setjmp
calls=1 0 
0 30
0 14
cob=(9)
cfi=(10)
cfn=(374)
calls=1 61 
0 397296509

fn=(408) sbrk
0 367
cfn=(410) brk
calls=16 0 
0 208
0 193
cfn=(410)
calls=23 0 
0 299
0 110

fn=(548) __GI_strnlen
0 249

fn=(608) _int_realloc
0 578
cfn=(400) _int_malloc
calls=10 0 
0 3155
0 188
cfn=(592) _int_free
calls=10 0 
0 868
0 114
cfn=(412) __GI_memcpy
calls=8 0 
0 11358
0 40

fn=(774)
0 231

fn=(948) strncpy
0 9

fn=(1118) index
0 12

fn=(1336)
0 33627
cfn=(1338) _IO_sgetn
calls=1019 0 
0 171924
0 24429

fn=(1340) _IO_file_xsgetn
0 66082
cfn=(1350) _IO_file_read
calls=1524 0 
0 16764
0 20371
cfn=(1342) _IO_doallocbuf
calls=505 0 
0 65145
0 505

fn=(1382) _IO_un_link
0 46697
cob=(5)
cfi=(5)
cfn=(1298)
calls=526 0 
0 4208
0 5786
cob=(5)
cfi=(5)
cfn=(1296)
calls=526 0 
0 7364
0 5768

fn=(1442) __GI_memmove
0 35613
cfn=(2470) _wordcopy_bwd_dest_aligned
calls=4 0 
0 148
0 135024

fn=(1492) __uflow
0 798
cfn=(1494) _IO_default_uflow
calls=38 0 
0 4888
0 190

fn=(1532)
0 30
cfn=(1534) vfscanf
calls=2 0 
0 1322
0 4

fn=(1644) inet_aton
0 226
cfn=(1638)
calls=4 0 
0 620
0 48
cfn=(1638)
calls=12 0 
0 1344
0 428

fn=(1666) __nss_database_lookup
0 58
cfn=(572) __GI_strcmp
calls=2 0 
0 48
0 84
cfn=(572)
calls=28 0 
0 672
0 193
cfn=(1284)
calls=1 0 
0 569
0 6
cfn=(388)
calls=1 0 
0 103
0 1
0 400
cfn=(1668) getline
calls=65 0 
0 11075
0 514
cfn=(536)
calls=64 0 
0 1616
0 1538
cfn=(236) __GI_strlen
calls=15 0 
0 210
0 60
cfn=(388)
calls=15 0 
0 2749
0 15
0 105
cfn=(412)
calls=15 0 
0 347
0 30
cfn=(1674) nss_parse_service_list
calls=15 0 
0 8178
0 329
cfn=(590)
calls=1 0 
0 85
0 1
0 2
cfn=(1380)
calls=1 0 
0 402
0 6

fn=(1668)
0 195
cfn=(1670) getdelim
calls=65 0 
0 10880

fn=(1690)
0 210
cfn=(1488) _IO_getline
calls=10 0 
0 2763
0 134

fn=(1804)
0 45

fn=(1818) recvmsg
0 12
cfn=(1820) __recvmsg_nocancel
calls=6 0 
0 30

fn=(1840) inet_ntop
0 88
cfn=(1704) __GI_strcpy
calls=1 0 
0 29
0 17
cfn=(1842) sprintf
calls=1 0 
0 1650
0 6
cfn=(1704)
calls=1 0 
0 30
0 17
cfn=(1842)
calls=1 0 
0 590
0 59

fn=(1940)
0 3036

fn=(2104) __strtoul_internal
0 3
cfn=(1640) ____strtoul_l_internal
calls=1 0 
0 164

fn=(2124) shmat
0 5

fn=(2380) __mempcpy_ssse3
0 15

fn=(2422)
0 10

fn=(2448) _IO_do_write@@GLIBC_2.2.5
0 991
cfn=(2456) _IO_file_write@@GLIBC_2.2.5
calls=43 0 
0 1849
0 1204

fn=(2456)
0 946
cfn=(2458) write
calls=43 0 
0 301
0 602

fn=(2482) known_compare
0 5
cfn=(572)
calls=1 0 
0 48

fn=(2584) _IO_list_unlock
0 72

fn=(2672)
0 9
cfn=(1246)
calls=3 0 
0 434

fn=(404) sysmalloc
0 1039
cfn=(598)
calls=4 0 
0 132
0 146
cfn=(406) __default_morecore
calls=13 0 
0 842
0 377
cfn=(406)
calls=1 0 
0 45
0 34

fn=(444) strcmp
0 10

fn=(510)
0 25

fn=(518)
0 20

fn=(536)
0 211674

fn=(552) __GI_strncmp
0 27143

fn=(594) __open_nocancel
0 2647

fn=(604) __GI_stpcpy
0 16682

fn=(628)
0 12
cfn=(630) strxfrm_l
calls=4 0 
0 1768

fn=(732) __openat_nocancel
0 84

fn=(808) strcpy
0 18

fn=(828)
0 7511436

fn=(1044)
0 799567

fn=(1180)
0 12
cfn=(1182) ____strtod_l_internal
calls=3 0 
0 237

fn=(1248) ____strtol_l_internal
0 117148

fn=(1286) __fopen_internal
0 5260
cfn=(388)
calls=526 0 
0 53988
0 526
0 5786
cfn=(1288) _IO_no_init
calls=526 0 
0 30508
0 2104
cfn=(1292) _IO_file_init@@GLIBC_2.2.5
calls=526 0 
0 67328
0 2630
cfn=(1300) _IO_file_fopen@@GLIBC_2.2.5
calls=526 0 
0 59565
0 4716
cfn=(1306) __fopen_maybe_mmap
calls=523 0 
0 2092
0 3
cfn=(1382)
calls=3 0 
0 339
0 6
cfn=(590)
calls=3 0 
0 370
0 3
0 21

fn=(1302) open
0 1040
cfn=(594)
calls=520 0 
0 2608

fn=(1344) _IO_file_doallocate
0 5742
cfn=(1346) _IO_file_stat
calls=522 0 
0 7308
0 8352
cfn=(598)
calls=522 0 
0 17226
0 3654
cfn=(1348) _IO_setb
calls=522 0 
0 10962
0 4698

fn=(1352) read
0 3108
cfn=(1354) __read_nocancel
calls=1554 0 
0 7770

fn=(1386) _IO_unsave_markers
0 4707

fn=(1494)
0 152
cfn=(1496) _IO_file_underflow@@GLIBC_2.2.5
calls=38 0 
0 4472
0 264

fn=(1496)
0 640
cfn=(1498) _IO_switch_to_get_mode
calls=40 0 
0 800
0 480
cfn=(1350)
calls=40 0 
0 460
0 539
cfn=(1342)
calls=14 0 
0 1806
0 28

fn=(1560)
0 6

fn=(160) _dl_vdso_vsym
0 42

fn=(232) secure_getenv
0 5
cfn=(234)
calls=1 0 
0 421

fn=(256) __register_atfork
0 50

fn=(276) __ctype_init
0 16

fn=(286) intel_02_known_compare
0 324

fn=(1638)
0 2068
cfn=(1640)
calls=517 0 
0 73064

fn=(1696) __res_vinit
0 39
cfn=(234)
calls=1 0 
0 501
0 5
cfn=(1284)
calls=1 0 
0 541
0 26
cfn=(1690)
calls=1 0 
0 437
0 4
cfn=(1690)
calls=1 0 
0 183
0 22
cfn=(1380)
calls=1 0 
0 402
0 13
cfn=(234)
calls=1 0 
0 450
0 19
cfn=(1700) gethostname
calls=1 0 
0 97
0 5
cfn=(544) __GI_strchr
calls=1 0 
0 28
0 5
cfn=(1704)
calls=1 0 
0 93
0 5
cfn=(654)
calls=1 0 
0 5
0 5
cfn=(1698) inet_makeaddr
calls=1 0 
0 8
0 7

fn=(1700)
0 10
cfn=(1702) uname
calls=1 0 
0 5
0 6
cfn=(236)
calls=1 0 
0 27
0 7
cfn=(412)
calls=1 0 
0 32
0 10

fn=(1702)
0 5

fn=(1780)
0 212

fn=(1796)
0 16
cfn=(1284)
calls=1 0 
0 770
0 24
cfn=(590)
calls=1 0 
0 7
0 1
0 6
cfn=(590)
calls=1 0 
0 7
0 1
0 6
cfn=(590)
calls=1 0 
0 7
0 1
0 8

fn=(1850) _IO_default_xsputn
0 1770
cfn=(1676) __GI_mempcpy
calls=32 0 
0 2682
0 821

fn=(1862)
0 18

fn=(1948)
0 132
cfn=(590)
calls=18 0 
0 126
0 18
0 30
cfn=(590)
calls=10 0 
0 70
0 10
0 56
cfn=(590)
calls=28 0 
0 2436
0 28
0 96

fn=(1972)
0 68

fn=(2118) shmget
0 5

fn=(2578) _IO_list_lock
0 120

fn=(2698) _IO_iter_begin
0 2

fn=(2702) _IO_iter_file
0 12

fn=(5784) exit
0 4
cfn=(5786) __run_exit_handlers
calls=1 0 
0 12169

fn=(5820) __cxa_finalize
0 322
cfn=(5822) __unregister_atfork
calls=7 0 
0 91

fn=(156) strcasecmp
0 10

fn=(158) time
0 18
cfn=(160)
calls=2 0 
0 14
0 12

fn=(402) malloc_consolidate
0 95238

fn=(424)
0 328561

fn=(496)
0 122

fn=(544)
0 1053

fn=(556)
0 988
cfn=(608)
calls=15 0 
0 16301
0 174
cfn=(558) realloc_hook_ini
calls=1 0 
0 208

fn=(580) _nl_load_locale_from_archive
0 130
cfn=(582) sysconf
calls=10 0 
0 340
0 58
cfn=(572)
calls=9 0 
0 216
0 164
cfn=(544)
calls=1 0 
0 28
0 8
cfn=(236)
calls=1 0 
0 14
0 103
cfn=(572)
calls=1 0 
0 24
0 223
cfn=(388)
calls=1 0 
0 188
0 1
0 6
cfn=(384)
calls=1 0 
0 156
0 133
cfn=(600) _nl_intern_locale_data
calls=12 0 
0 7863
0 130
cfn=(536)
calls=1 0 
0 23
0 6
cfn=(586) _nl_normalize_codeset
calls=1 0 
0 308
0 7
cfn=(552)
calls=1 0 
0 29
0 6
cfn=(590)
calls=1 0 
0 85
0 1
0 7
cfn=(594)
calls=1 0 
0 5
0 7
cfn=(596)
calls=1 0 
0 10
0 10
cfn=(598)
calls=1 0 
0 33
0 27

fn=(602) new_composite_name
0 2176
cfn=(236)
calls=176 0 
0 2464
0 32
cfn=(236)
calls=16 0 
0 224
0 1524
cfn=(572)
calls=24 0 
0 576
0 646
cfn=(388)
calls=16 0 
0 3363
0 16
0 2256
cfn=(604)
calls=176 0 
0 10863
0 48
cfn=(604)
calls=16 0 
0 1073
0 768
cfn=(604)
calls=192 0 
0 4668
0 912

fn=(620) unsetenv
0 12
cfn=(544)
calls=1 0 
0 34
0 4
cfn=(236)
calls=1 0 
0 14
0 282
cfn=(552)
calls=67 0 
0 2077
0 413

fn=(644) getuid
0 3

fn=(710)
0 6

fn=(854) memcpy@@GLIBC_2.14
0 40

fn=(950)
0 36826

fn=(1254)
0 18
cfn=(1256) _getopt_internal
calls=3 0 
0 847
0 6

fn=(1300)
0 24283
cfn=(1302)
calls=520 0 
0 3648
0 6802
cfn=(1294) _IO_link_in
calls=523 0 
0 5753
0 1569
cfn=(1304) __GI_strstr
calls=523 0 
0 13190
0 4274
cfn=(594)
calls=6 0 
0 34
0 12

fn=(1304)
0 13190

fn=(1348)
0 27546
cfn=(1390) munmap
calls=522 0 
0 2610
0 2088

fn=(1366)
0 46260

fn=(1380)
0 18798
cfn=(1392) _IO_file_finish@@GLIBC_2.2.5
calls=3 0 
0 96
0 2080
cfn=(1392)
calls=520 0 
0 16640
0 6276
cfn=(590)
calls=523 0 
0 60273
0 523
0 4707
cfn=(1384) _IO_file_close_it@@GLIBC_2.2.5
calls=523 0 
0 59387
0 2092
cfn=(1382)
calls=523 0 
0 59024
0 4689

fn=(1390)
0 2610

fn=(1394) _IO_default_finish
0 7322
cfn=(1382)
calls=523 0 
0 5230

fn=(1498)
0 800

fn=(234)
0 432
cfn=(236)
calls=48 0 
0 856
0 19712
cfn=(552)
calls=45 0 
0 1549
0 106

fn=(248) __libc_dl_error_tsd
0 42

fn=(1642) gaih_inet
0 1240
cfn=(1644)
calls=10 0 
0 2666
0 70
cfn=(544)
calls=6 0 
0 159
0 54
cfn=(1646)
calls=6 0 
0 960
0 128
cfn=(1692) __res_maybe_init
calls=2 0 
0 2920
0 762
cfn=(388)
calls=8 0 
0 1819
0 8
0 12
cfn=(388)
calls=6 0 
0 1385
0 6
0 724
cfn=(388)
calls=8 0 
0 2045
0 8
0 12
cfn=(388)
calls=6 0 
0 1062
0 6
0 78
cfn=(1706) __nss_lookup_function
calls=2 0 
0 30259
0 14
cfn=(1740) _dl_mcount_wrapper_check
calls=2 0 
0 8
0 16
cob=(11)
cfi=(78)
cfn=(1742)
calls=2 0 
0 24031
0 152
cfn=(1648) __nscd_getai
calls=1 0 
0 866
0 48
cfn=(1666)
calls=2 0 
0 29396
0 13
cfn=(1684) _res_hconf_init
calls=1 0 
0 4864
0 1

fn=(1648)
0 17
cfn=(236)
calls=1 0 
0 14
0 7
cfn=(1650) __nscd_get_map_ref
calls=1 0 
0 177
0 22
cfn=(1664) __nscd_open_socket
calls=1 0 
0 108
0 14
cfn=(234)
calls=1 0 
0 501
0 6

fn=(1658) connect
0 12
cfn=(1660) __connect_nocancel
calls=6 0 
0 38

fn=(1698)
0 8

fn=(1708) tsearch
0 50
cfn=(2482)
calls=1 0 
0 53
0 9
cfn=(388)
calls=1 0 
0 270
0 1
0 32

fn=(1722)
0 333
cfn=(400)
calls=9 0 
0 1971
0 282
cfn=(828)
calls=7 0 
0 525
0 49

fn=(1802)
0 30

fn=(1824) qsort_r
0 100
cfn=(590)
calls=2 0 
0 14
0 2
0 120
cfn=(1826) msort_with_tmp.part.0
calls=2 0 
0 3354
0 4
cfn=(590)
calls=2 0 
0 14
0 2
0 10

fn=(1846) _IO_str_init_static_internal
0 553
cfn=(2102) __GI___rawmemchr
calls=41 0 
0 984
0 246
cfn=(1348)
calls=41 0 
0 861
0 10
cfn=(1348)
calls=2 0 
0 42
0 696

fn=(1880)
0 467

fn=(2310)
0 239

fn=(2378) mempcpy
0 10

fn=(2454) fputc
0 39

fn=(2524) getsockopt
0 6

fn=(2576)
0 310
cfn=(2578)
calls=10 0 
0 120
0 10
cfn=(2580) __malloc_fork_lock_parent
calls=10 0 
0 430
0 177
cfn=(2696) __malloc_fork_unlock_child
calls=1 0 
0 31
0 1
cfn=(2698)
calls=1 0 
0 2
0 8
cfn=(2704) _IO_iter_next
calls=3 0 
0 6
0 6
cfn=(2700) _IO_iter_end
calls=3 0 
0 6
0 1
cfn=(2700)
calls=1 0 
0 2
0 14
cfn=(2702)
calls=3 0 
0 6
0 15
cfn=(2702)
calls=3 0 
0 6
0 16
cfn=(2706) _IO_list_resetlock
calls=1 0 
0 4
0 14
cob=(5)
cfi=(5)
cfn=(2708)
calls=1 0 
0 48
0 32
cfn=(2582) __malloc_fork_unlock_parent
calls=9 0 
0 261
0 9
cfn=(2584)
calls=9 0 
0 72
0 212
cob=(5)
cfi=(5)
cfn=(2694)
calls=1 0 
0 5
0 1

fn=(2780)
0 10

fn=(4062) _dl_sym
0 12
cfn=(4064) do_sym
calls=4 0 
0 2802

fn=(1838)
0 159
cfn=(1840)
calls=1 0 
0 1715
0 11
cfn=(1840)
calls=1 0 
0 771
0 5

fn=(388)
0 171278
cfn=(400)
calls=9515 0 
0 1859116
0 209335
cfn=(390) malloc_hook_ini
calls=1 0 
0 57691

fn=(389) malloc'2
0 18
cfn=(400)
calls=1 0 
0 1056
0 22

fn=(400)
0 454918
cfn=(402)
calls=27 0 
0 4878
0 1317989
cfn=(402)
calls=1 0 
0 666
0 92
cfn=(404)
calls=17 0 
0 2615
0 84140

fn=(542)
0 96
cfn=(544)
calls=12 0 
0 336
0 108
cfn=(548)
calls=12 0 
0 249
0 12
0 108
cfn=(412)
calls=12 0 
0 289
0 60
cfn=(550) __add_to_environ
calls=12 0 
0 34442
0 60

fn=(574) _nl_find_locale
0 304
cfn=(572)
calls=16 0 
0 384
0 62
cfn=(572)
calls=10 0 
0 240
0 40
cfn=(236)
calls=10 0 
0 140
0 80
cfn=(576) memmem
calls=10 0 
0 510
0 130
cfn=(578) memchr
calls=10 0 
0 190
0 80
cfn=(580)
calls=10 0 
0 10349
0 156
cfn=(234)
calls=4 0 
0 2043
0 36
cfn=(234)
calls=4 0 
0 2012
0 20
cfn=(234)
calls=3 0 
0 948
0 65

fn=(576)
0 200
cfn=(578)
calls=10 0 
0 190
0 120

fn=(584) getpagesize
0 30

fn=(1256)
0 39
cfn=(1258) _getopt_internal_r
calls=3 0 
0 775
0 33

fn=(1258)
0 74
cfn=(234)
calls=1 0 
0 450
0 49
cfn=(544)
calls=1 0 
0 28
0 174

fn=(1284)
0 1052
cfn=(1286)
calls=526 0 
0 235245

fn=(1652) __nscd_get_mapping
0 14
cfn=(236)
calls=1 0 
0 14
0 15
cfn=(1654) open_socket
calls=1 0 
0 74
0 19

fn=(1676)
0 118594

fn=(1704)
0 244

fn=(1706)
0 44
cfn=(1708)
calls=2 0 
0 415
0 43
cfn=(388)
calls=1 0 
0 175
0 1
0 19
cfn=(236)
calls=1 0 
0 14
0 4
cfn=(236)
calls=1 0 
0 27
0 8
cfn=(604)
calls=1 0 
0 39
0 4
cfn=(1704)
calls=1 0 
0 92
0 4
cfn=(1736) __libc_dlsym
calls=1 0 
0 810
0 21
cfn=(236)
calls=1 0 
0 14
0 11
cfn=(604)
calls=1 0 
0 39
0 8
cfn=(1710) __libc_dlopen_mode
calls=1 0 
0 28264
0 12
cfn=(388)
calls=1 0 
0 175
0 1
0 15

fn=(1740)
0 8

fn=(1806) make_request
0 42
cob=(10)
cfi=(22)
cfn=(1810)
calls=2 0 
0 6
0 2
0 42
cfn=(1814) sendto
calls=2 0 
0 16
0 100
cfn=(1818)
calls=6 0 
0 42
0 678

fn=(1822) qsort
0 4
cfn=(1824)
calls=2 0 
0 128

fn=(1828) rfc3484_sort
0 3130

fn=(1852) _itoa_word
0 131

fn=(2368) statfs
0 5

fn=(2470)
0 148

fn=(2484) __nscd_get_nl_timestamp
0 5

fn=(2510) __select_nocancel
0 64

fn=(2704)
0 6

fn=(3544) systrim.isra.2
0 15909
cfn=(406)
calls=3 0 
0 135
0 7968
cfn=(406)
calls=3 0 
0 204
0 18
cfn=(406)
calls=3 0 
0 135
0 36

fn=(4284) strstr
0 17

fn=(5786)
0 55
cfn=(5958) _IO_cleanup
calls=1 0 
0 138
0 5
cfn=(5962) _Exit
calls=1 0 
0 5
0 12
cob=(1)
cfi=(1)
cfn=(5790) _dl_fini
calls=1 0 
0 11301
cob=(9)
cfi=(67)
cfn=(5788)
calls=1 291 
0 651
0 2

fn=(5962)
0 5

fn=(170) memcpy@GLIBC_2.2.5
0 30

fn=(350)
0 16
cfn=(352) __new_exitfn
calls=2 0 
0 83
0 28

fn=(352)
0 83

fn=(368)
0 2
cfn=(370)
calls=1 0 
0 28

fn=(446)
0 4155685

fn=(482)
0 557769

fn=(558)
0 32
cfn=(388)
calls=1 0 
0 176

fn=(578)
0 66796

fn=(590)
0 129082
cfn=(592)
calls=8047 0 
0 919511
0 55

fn=(700)
0 22
cfn=(702) srandom_r
calls=2 0 
0 21040
0 12

fn=(728)
0 30
cfn=(730) __opendirat
calls=10 0 
0 2138

fn=(730)
0 60
cfn=(732)
calls=10 0 
0 84
0 74
cfn=(734) __alloc_dir
calls=9 0 
0 1917
0 3

fn=(810)
0 6194

fn=(1042) strncmp
0 5

fn=(1246)
0 3296
cfn=(1248)
calls=824 0 
0 117148

fn=(1306)
0 2092

fn=(1480)
0 55440

fn=(254) __libc_pthread_init
0 8
cfn=(256)
calls=1 0 
0 50
0 385

fn=(278) init_cacheinfo
0 39
cfn=(280) handle_intel.isra.0
calls=1 0 
0 844
0 3
cfn=(280)
calls=1 0 
0 885
0 108

fn=(280)
0 40
cfn=(282) intel_check_word
calls=2 0 
0 1446
0 14
cfn=(282)
calls=2 0 
0 189
0 40

fn=(1650)
0 36
cfn=(1652)
calls=1 0 
0 136
0 5

fn=(1654)
0 30
cfn=(1656)
calls=2 0 
0 10
0 48
cfn=(1658)
calls=2 0 
0 22
0 38

fn=(1656)
0 60

fn=(1672) __underflow
0 43
cfn=(1496)
calls=2 0 
0 281
0 8

fn=(1688)
0 22
cfn=(234)
calls=1 0 
0 463
0 8
cfn=(1284)
calls=1 0 
0 541
0 13
cfn=(1690)
calls=1 0 
0 404
0 4
cfn=(1690)
calls=1 0 
0 183
0 8
cfn=(536)
calls=1 0 
0 23
0 76
cfn=(1680) __strncasecmp_avx
calls=1 0 
0 51
0 1
0 6
cfn=(1680)
calls=1 0 
0 51
0 1
0 6
cfn=(1680)
calls=1 0 
0 51
0 1
0 6
cfn=(1680)
calls=1 0 
0 46
0 1
0 31
cfn=(1380)
calls=1 0 
0 402
0 2
cfn=(234)
calls=1 0 
0 464
0 4
cfn=(234)
calls=1 0 
0 450
0 5
cfn=(234)
calls=1 0 
0 450
0 5
cfn=(234)
calls=1 0 
0 463
0 4
cfn=(234)
calls=1 0 
0 463
0 31
cfn=(1680)
calls=1 0 
0 73
0 1
0 13

fn=(1694) __res_ninit
0 2
cfn=(1696)
calls=1 0 
0 2900

fn=(1736)
0 14
cob=(1)
cfi=(1)
cfn=(80) _dl_catch_error
calls=1 0 
0 784
0 12

fn=(1820)
0 30

fn=(1848) vfprintf
0 66
cfn=(536)
calls=2 0 
0 46
0 24
cfn=(1850)
calls=2 0 
0 30
0 10
cfn=(590)
calls=2 0 
0 14
0 2
0 4
cfn=(590)
calls=2 0 
0 14
0 2
0 309
cfn=(536)
calls=5 0 
0 115
0 35
cfn=(1850)
calls=5 0 
0 198
0 301
cfn=(1850)
calls=5 0 
0 290
0 105
cfn=(1852)
calls=5 0 
0 131
0 238

fn=(2458)
0 86
cfn=(2460) __write_nocancel
calls=43 0 
0 215

fn=(2508)
0 16
cfn=(2510)
calls=8 0 
0 64

fn=(2564) _IO_file_sync@@GLIBC_2.2.5
0 286

fn=(2582)
0 261

fn=(2696)
0 31

fn=(2700)
0 8

fn=(2724) setsid
0 5

fn=(5822)
0 91

fn=(1830) __free_in6ai
0 50

fn=(370)
0 285
cfn=(372) __sigjmp_save
calls=15 0 
0 219

fn=(394) _dl_addr
0 14
cob=(5)
cfi=(5)
cfn=(396)
calls=1 0 
0 31
0 56068
cob=(5)
cfi=(5)
cfn=(398)
calls=1 0 
0 29
0 31

fn=(406)
0 46
cfn=(408)
calls=23 0 
0 1177
0 138

fn=(592)
0 766808
cfn=(3544)
calls=883 0 
0 24405
0 6155
cfn=(402)
calls=506 0 
0 89694
0 33317

fn=(600)
0 403
cfn=(388)
calls=12 0 
0 2196
0 12
0 5252

fn=(702)
0 1216
cfn=(704) random_r
calls=2 0 
0 52
0 2472
cfn=(704)
calls=618 0 
0 16048
0 1252

fn=(756)
0 1064

fn=(856)
0 4126593

fn=(1120)
0 83832

fn=(1350)
0 6236
cfn=(1352)
calls=1554 0 
0 10878
0 30
cfn=(1354)
calls=10 0 
0 50
0 30

fn=(1354)
0 7820

fn=(1384)
0 7845
cfn=(1386)
calls=523 0 
0 4707
0 5230
cfn=(1348)
calls=523 0 
0 20379
0 4184
cfn=(1382)
calls=523 0 
0 5230
0 6799
cfn=(1388) _IO_file_close
calls=523 0 
0 3661
0 1067
cfn=(2448)
calls=3 0 
0 279
0 6

fn=(1506)
0 132920

fn=(1534)
0 4
cfn=(1536) _IO_vfscanf
calls=2 0 
0 1318

fn=(1536)
0 5388
cfn=(1538) _IO_sputbackc
calls=4 0 
0 56
0 1298
cob=(5)
cfi=(5)
cfn=(1298)
calls=43 0 
0 344
0 294
cfn=(1538)
calls=1 0 
0 14
0 123
cfn=(2104)
calls=1 0 
0 167
0 309
cob=(5)
cfi=(5)
cfn=(1296)
calls=43 0 
0 602
0 294
cfn=(1538)
calls=2 0 
0 28
0 113
cfn=(1492)
calls=2 0 
0 490
0 172
cfn=(1538)
calls=40 0 
0 560
0 64

fn=(274) __GI_strrchr
0 51

fn=(1674)
0 1739
cfn=(388)
calls=24 0 
0 4427
0 24
0 192
cfn=(1676)
calls=24 0 
0 540
0 820
cfn=(1680)
calls=1 0 
0 95
0 1
0 241
cfn=(1680)
calls=1 0 
0 93
0 1
0 5

fn=(1710)
0 16
cob=(1)
cfi=(1)
cfn=(80)
calls=1 0 
0 28241
0 7

fn=(1826)
0 94
cfn=(412)
calls=2 0 
0 46
0 10
cfn=(412)
calls=2 0 
0 36
0 34
cfn=(1828)
calls=2 0 
0 3130
0 4

fn=(1842)
0 30
cfn=(1844) vsprintf
calls=2 0 
0 2206
0 4

fn=(1844)
0 30
cfn=(1288)
calls=2 0 
0 84
0 14
cfn=(1846)
calls=2 0 
0 112
0 8
cfn=(1848)
calls=2 0 
0 1934
0 24

fn=(1872)
0 15

fn=(2732) prctl
0 6

fn=(3808) __epoll_wait_nocancel
0 16

fn=(4066) _dl_addr_inside_object
0 260

fn=(162) strnlen
0 5

fn=(164) strncasecmp
0 5

fn=(166) memset
0 24

fn=(384)
0 16070
cfn=(236)
calls=3214 0 
0 86819
0 9642
cfn=(388)
calls=3214 0 
0 621605
0 3214
0 28926
cfn=(412)
calls=3214 0 
0 96651

fn=(412)
0 219552

fn=(572)
0 3049

fn=(582)
0 290
cfn=(584)
calls=10 0 
0 30
0 20

fn=(596)
0 10230

fn=(598)
0 17495

fn=(610) _nl_postload_ctype
0 45

fn=(734)
0 117
cfn=(388)
calls=9 0 
0 1665
0 9
0 126

fn=(762)
0 84

fn=(914)
0 1193502

fn=(1182)
0 57
cfn=(236)
calls=3 0 
0 42
0 138

fn=(1292)
0 4208
cfn=(1294)
calls=526 0 
0 60490
0 2630

fn=(1294)
0 44677
cob=(5)
cfi=(5)
cfn=(1298)
calls=526 0 
0 4208
0 5786
cob=(5)
cfi=(5)
cfn=(1296)
calls=526 0 
0 7364
0 4208

fn=(1338)
0 3057
cfn=(1340)
calls=1019 0 
0 168867

fn=(1342)
0 8352
cfn=(1344)
calls=522 0 
0 57942
0 1044

fn=(1388)
0 1046
cfn=(748) __close_nocancel
calls=523 0 
0 2615

fn=(1392)
0 4184
cfn=(1394)
calls=523 0 
0 12552

fn=(168) gettimeofday
0 18
cfn=(160)
calls=2 0 
0 14
0 12

fn=(270) _init
0 27
cfn=(160)
calls=1 0 
0 7
0 8
cfn=(160)
calls=1 0 
0 7
0 10
cfn=(272) __init_misc
calls=1 0 
0 75
0 1
cfn=(276)
calls=1 0 
0 16
0 14

fn=(284)
0 13431
cob=(9)
cfi=(280)
cfn=(4778)
calls=28 2116 
0 565
cob=(9)
cfi=(29)
cfn=(866)
calls=1077 4918 
0 152143
cfn=(286)
calls=54 0 
0 324
0 5507

fn=(1636)
0 494
cfn=(1642)
calls=10 0 
0 105792
0 280
cfn=(1822)
calls=2 0 
0 132
0 58
cfn=(1658)
calls=4 0 
0 28
0 126
cfn=(1656)
calls=4 0 
0 20
0 67
cfn=(1804)
calls=4 0 
0 20
0 60
cfn=(284)
calls=2 0 
0 50
0 8
cfn=(284)
calls=2 0 
0 50
0 56
cfn=(1824)
calls=2 0 
0 3492
0 76
cfn=(1830)
calls=10 0 
0 50
0 145
cfn=(1638)
calls=1 0 
0 168
0 18
cob=(5)
cfi=(5)
cfn=(1686)
calls=2 0 
0 886
0 42
cfn=(1800) __check_pf
calls=2 0 
0 1137
0 2

fn=(1660)
0 38

fn=(1670)
0 1756
cfn=(388)
calls=1 0 
0 188
0 1
0 712
cfn=(412)
calls=64 0 
0 2999
0 512
cfn=(578)
calls=64 0 
0 2177
0 2191
cfn=(1672)
calls=2 0 
0 332
0 12

fn=(1738) do_dlsym
0 14
cob=(1)
cfi=(1)
cfn=(150) _dl_lookup_symbol_x
calls=1 0 
0 707
0 4

fn=(1800)
0 43
cfn=(2484)
calls=1 0 
0 5
0 10
cfn=(1656)
calls=2 0 
0 10
0 26
cfn=(1802)
calls=2 0 
0 10
0 81
cfn=(1804)
calls=2 0 
0 10
0 10
cfn=(1806)
calls=2 0 
0 928
0 4

fn=(1878) rindex
0 6

fn=(2098)
0 615
cfn=(2100) vsscanf
calls=41 0 
0 15353
0 82

fn=(2100)
0 615
cfn=(1288)
calls=41 0 
0 1722
0 287
cfn=(1846)
calls=41 0 
0 3280
0 205
cfn=(1536)
calls=41 0 
0 8998
0 246

fn=(2308) strspn
0 12

fn=(2402) posix_fallocate
0 14

fn=(2442)
0 115039
cfn=(2444) _IO_file_xsputn@@GLIBC_2.2.5
calls=3 0 
0 989
0 13845
cfn=(2444)
calls=2769 0 
0 261152
0 47999

fn=(2446) _IO_file_overflow@@GLIBC_2.2.5
0 1000
cfn=(2448)
calls=43 0 
0 3765
0 6
cfn=(1342)
calls=3 0 
0 387
0 18

fn=(2580)
0 430

fn=(2706)
0 4

fn=(2746) epoll_create1
0 5

fn=(3806)
0 4
cfn=(3808)
calls=2 0 
0 16

fn=(4286)
0 352

fn=(5958)
0 8
cfn=(5960) _IO_flush_all_lockp
calls=1 0 
0 88
0 42

fn=(372)
0 99
cfn=(774)
calls=6 0 
0 42
0 78

fn=(392) ptmalloc_init.part.7
0 401
cfn=(394)
calls=1 0 
0 56173
0 10

fn=(422) strlen
0 27

fn=(586)
0 63
cfn=(388)
calls=1 0 
0 188
0 1
0 56

fn=(654)
0 35

fn=(704)
0 16126

fn=(746)
0 45
cfn=(590)
calls=9 0 
0 997
0 9
0 27
cfn=(748)
calls=9 0 
0 45

fn=(1290) _IO_old_init
0 14096

fn=(1440) __getdents
0 279
cfn=(236)
calls=9 0 
0 126
0 13595
cfn=(236)
calls=2719 0 
0 43489
0 10912
cfn=(1442)
calls=2728 0 
0 170785
0 13745

fn=(1490) _IO_getline_info
0 46174
cfn=(578)
calls=1596 0 
0 64239
0 4878
cfn=(412)
calls=15 0 
0 645
0 8277
cfn=(1492)
calls=36 0 
0 5386
0 24069
cfn=(412)
calls=1581 0 
0 106953
0 17433

fn=(1538)
0 658

fn=(242)
0 15

fn=(282)
0 188
cfn=(284)
calls=8 0 
0 1228
0 219

fn=(1640)
0 73228

fn=(1664)
0 19
cfn=(1654)
calls=1 0 
0 74
0 15

fn=(1768) rawmemchr
0 7

fn=(1770)
0 116

fn=(1816) __sendto_nocancel
0 12

fn=(1986) chmod
0 5

fn=(2102)
0 984

fn=(2344) random
0 10
cfn=(704)
calls=1 0 
0 26
0 7

fn=(2396) ftruncate
0 5

fn=(2562)
0 506
cfn=(2564)
calls=22 0 
0 286
0 396

fn=(3060) bcmp
0 7

fn=(3062)
0 1021809

fn=(3554)
0 10

fn=(4064)
0 144
cfn=(4066)
calls=4 0 
0 260
0 84
cob=(1)
cfi=(1)
cfn=(150)
calls=4 0 
0 2198
0 116

fn=(390)
0 8
cfn=(392)
calls=1 0 
0 56584
0 3
cfn=(389)
calls=1 0 
0 1096

fn=(410)
0 507

fn=(454)
0 238

fn=(502)
0 25

fn=(550)
0 168
cfn=(236)
calls=12 0 
0 168
0 264
cfn=(552)
calls=12 0 
0 372
0 2984
cfn=(552)
calls=746 0 
0 23116
0 5326
cfn=(556)
calls=7 0 
0 1495
0 7
0 94
cfn=(412)
calls=1 0 
0 196
0 252

fn=(568)
0 913
cfn=(572)
calls=33 0 
0 841
0 598
cob=(5)
cfi=(5)
cfn=(606)
calls=17 0 
0 289
0 98
cfn=(234)
calls=16 0 
0 7702
0 176
cfn=(574)
calls=16 0 
0 17789
0 154
cfn=(384)
calls=10 0 
0 2023
0 78
cfn=(602)
calls=16 0 
0 31609
0 129
cfn=(610)
calls=1 0 
0 45
0 103
cfn=(590)
calls=7 0 
0 595
0 7
0 111
cfn=(590)
calls=15 0 
0 2223
0 15
0 128
cfn=(590)
calls=16 0 
0 112
0 16
0 197
cob=(5)
cfi=(5)
cfn=(570)
calls=33 0 
0 594
0 146
cob=(5)
cfi=(5)
cfn=(606)
calls=16 0 
0 272
0 16

fn=(630)
0 68
cfn=(236)
calls=4 0 
0 56
0 1644

fn=(638)
0 9

fn=(748)
0 2660

fn=(768)
0 390

fn=(1288)
0 5690
cfn=(1290)
calls=569 0 
0 14096
0 12528

fn=(1346)
0 2088
cfn=(596)
calls=522 0 
0 5220

fn=(1438)
0 74623
cfn=(1440)
calls=15 0 
0 252931
0 29405

fn=(1486)
0 61659
cfn=(1488)
calls=1581 0 
0 278473
0 42663

fn=(1488)
0 3182
cfn=(1490)
calls=1591 0 
0 278054

fn=(236)
0 134732

fn=(272)
0 12
cfn=(274)
calls=1 0 
0 51
0 12

fn=(1646)
0 418
cfn=(544)
calls=14 0 
0 440
0 998

fn=(1680)
0 460

fn=(1684)
0 9
cob=(5)
cfi=(5)
cfn=(1686)
calls=1 0 
0 4855

fn=(1692)
0 15
cfn=(1694)
calls=1 0 
0 2902
0 3

fn=(1712) do_dlopen
0 14
cob=(1)
cfi=(1)
cfn=(1714) _dl_open
calls=1 0 
0 28164
0 4

fn=(1814)
0 4
cfn=(1816)
calls=2 0 
0 12

fn=(2412)
0 5000

fn=(2444)
0 85882
cfn=(1676)
calls=2767 0 
0 115372
0 50053
cfn=(2446)
calls=43 0 
0 5176
0 817
cfn=(1850)
calls=43 0 
0 4755
0 86

fn=(2460)
0 215

fn=(2664)
0 50

fn=(2756)
0 36

fn=(5960)
0 88

ob=(10)
fl=(22)
fn=(662)
0 60

fn=(1810)
0 33

ob=(1)
fl=(1)
fn=(124) _dl_cache_libcmp
0 5440

fn=(50) uname
0 5

fn=(104) mprotect
0 90

fn=(110) access
0 9

fn=(5792) _dl_sort_fini
0 27
cfn=(106) memset
calls=1 0 
0 26
0 86
cfn=(106)
calls=8 0 
0 120
0 1524
cfn=(130) memmove
calls=3 0 
0 195
0 72
cfn=(130)
calls=3 0 
0 139
0 15

fn=(16) dl_main
0 33
cfn=(18) _dl_process_tunable_env_entries
calls=1 0 
0 369
0 7
cfn=(20) _dl_next_ld_env_entry
calls=1 0 
0 138
0 4
cfn=(20)
calls=2 0 
0 256
0 170
cfn=(24) _dl_new_object
calls=1 0 
0 244
0 10
cfn=(40) _dl_add_to_namespace_list
calls=1 0 
0 34
0 138
cfn=(46) strcmp
calls=1 0 
0 7
0 263
cfn=(4) _dl_setup_hash
calls=1 0 
0 23
0 5
cfn=(48) _dl_discover_osversion
calls=1 0 
0 93
0 78
cfn=(22) bcmp
calls=1 0 
0 120
0 9
cfn=(22)
calls=1 0 
0 26
0 14
cfn=(22)
calls=1 0 
0 80
0 7
cfn=(52) _dl_init_paths
calls=1 0 
0 4941
0 3
cfn=(72) _dl_debug_initialize
calls=1 0 
0 17
0 57
cfn=(74) _dl_count_modids
calls=1 0 
0 4
0 19
cfn=(110)
calls=1 0 
0 9
0 19
cfn=(112) _dl_map_object_deps
calls=1 0 
0 48003
0 121
cfn=(78) handle_ld_preload
calls=1 0 
0 3438
0 34
cfn=(132) _dl_receive_error
calls=1 0 
0 16404
0 5
cfn=(142) init_tls
calls=1 0 
0 644
0 35
cfn=(198) _dl_allocate_tls_init
calls=1 0 
0 238
0 5
cfn=(200) _dl_sysdep_start_cleanup
calls=1 0 
0 1
0 6
cfn=(72)
calls=1 0 
0 8
0 3
cfn=(76) _dl_debug_state
calls=1 0 
0 1
0 2
cfn=(202) _dl_unload_cache
calls=1 0 
0 15
0 21
cfn=(148) _dl_relocate_object
calls=1 0 
0 8118
0 167
cfn=(148)
calls=7 0 
0 150291
0 60
cfn=(172) _dl_add_to_slotinfo
calls=1 0 
0 24
0 13
cfn=(76)
calls=1 0 
0 1
0 15

fn=(66) strsep
0 1562

fn=(132)
0 11
cfn=(82)
calls=1 0 
0 2
0 7
cfn=(134) version_check_doit
calls=1 0 
0 16374
0 10

fn=(42) rtld_lock_default_lock_recursive
0 14

fn=(86) map_doit
0 9
cfn=(88) _dl_map_object
calls=1 0 
0 2613
0 3

fn=(120) _dl_load_cache_lookup
0 1123
cfn=(124)
calls=59 0 
0 4966
0 272
cfn=(122) _dl_sysdep_read_whole_file
calls=2 0 
0 188
0 20
cfn=(22)
calls=2 0 
0 224
0 30
cfn=(22)
calls=2 0 
0 222
0 86
cfn=(124)
calls=6 0 
0 474
0 252
cfn=(12) strlen
calls=6 0 
0 361
0 60
cfn=(38) memcpy
calls=6 0 
0 177
0 12
cfn=(126) strdup
calls=6 0 
0 868
0 48

fn=(172)
0 24

fn=(200)
0 1

fn=(226) _dl_get_tls_static_info
0 5

fn=(1714)
0 36
cob=(5)
cfi=(5)
cfn=(396)
calls=2 0 
0 62
0 44
cfn=(81) _dl_catch_error'2
calls=2 0 
0 276618
0 4
cfn=(202)
calls=2 0 
0 20
0 8
cob=(5)
cfi=(5)
cfn=(398)
calls=2 0 
0 58
0 18

fn=(92) open_verify
0 1102
cfn=(94) open
calls=58 0 
0 490
0 246
cfn=(96) read
calls=8 0 
0 40
0 112
cfn=(22)
calls=8 0 
0 695
0 72
cfn=(22)
calls=8 0 
0 640
0 792
cfn=(22)
calls=6 0 
0 438
0 32
cfn=(22)
calls=8 0 
0 640
0 686
cfn=(22)
calls=3 0 
0 264
0 6

fn=(128) _dl_next_tls_modid
0 6

fn=(144) _dl_determine_tlsoffset
0 56

fn=(46)
0 17638
cfn=(47) strcmp'2
calls=1735 0 
0 91211
0 7324

fn=(47)
0 85917
cfn=(47)
calls=11060 0 
0 544440
0 5294

fn=(80)
0 198
cob=(3)
cfi=(3)
cfn=(248)
calls=7 0 
0 21
cfn=(82)
calls=15 0 
0 30
0 132
cfn=(84) __sigsetjmp
calls=22 0 
0 440
0 176
cob=(6)
cfi=(6)
cfn=(4056) dlsym_doit
calls=4 0 
0 4148
cob=(6)
cfi=(6)
cfn=(4034) dlopen_doit
calls=1 0 
0 248732
cob=(3)
cfi=(3)
cfn=(1738)
calls=1 0 
0 725
cob=(3)
cfi=(3)
cfn=(1712)
calls=1 0 
0 28182
cfn=(114) openaux
calls=14 0 
0 41934
cfn=(86)
calls=1 0 
0 2625
0 286

fn=(81)
0 54
cob=(3)
cfi=(3)
cfn=(248)
calls=6 0 
0 18
0 36
cfn=(84)
calls=6 0 
0 120
0 48
cfn=(114)
calls=4 0 
0 3078
cfn=(1716) dl_open_worker
calls=2 0 
0 276500
0 78

fn=(150)
0 108572
cfn=(152) do_lookup_x
calls=639 0 
0 370047
0 1066
cfn=(152)
calls=82 0 
0 14415
0 23798

fn=(4048) add_to_global
0 101
cob=(3)
cfi=(3)
cfn=(388)
calls=1 0 
0 383
0 1
0 7
cfn=(38)
calls=1 0 
0 42
0 5

fn=(84)
0 560

fn=(114)
0 252
cfn=(88)
calls=18 0 
0 44706
0 54

fn=(136) _dl_check_all_versions
0 68
cfn=(138) _dl_check_map_versions
calls=8 0 
0 16233
0 63

fn=(154) check_match.9515
0 14745
cfn=(46)
calls=469 0 
0 48503
0 16173
cfn=(46)
calls=287 0 
0 25046
0 1148

fn=(20)
0 394

fn=(64) fillin_rpath
0 40
cfn=(66)
calls=2 0 
0 404
0 12
cfn=(66)
calls=4 0 
0 1158
0 26
cfn=(12)
calls=4 0 
0 248
0 134
cfn=(12)
calls=1 0 
0 10
0 11
cfn=(32) malloc
calls=1 0 
0 34
0 1
0 27
cfn=(32)
calls=3 0 
0 102
0 3
0 44
cfn=(56) mempcpy
calls=4 0 
0 226
0 156
cfn=(38)
calls=1 0 
0 18
0 74

fn=(74)
0 4

fn=(134)
0 6
cfn=(136)
calls=1 0 
0 16364
0 4

fn=(204) munmap
0 10

fn=(224) _dl_fixup
0 7181
cfn=(150)
calls=153 0 
0 168303
0 3390
cob=(3)
cfi=(3)
cfn=(4284)
calls=1 0 
0 17
cob=(3)
cfi=(3)
cfn=(3060)
calls=1 0 
0 7
cob=(3)
cfi=(3)
cfn=(2378)
calls=1 0 
0 10
cob=(3)
cfi=(3)
cfn=(2308)
calls=1 0 
0 6
cob=(3)
cfi=(3)
cfn=(158)
calls=1 0 
0 22
cob=(3)
cfi=(3)
cfn=(1878)
calls=1 0 
0 6
cob=(3)
cfi=(3)
cfn=(156)
calls=1 0 
0 5
cob=(3)
cfi=(3)
cfn=(1768)
calls=1 0 
0 7
cob=(3)
cfi=(3)
cfn=(1118)
calls=1 0 
0 6
cob=(3)
cfi=(3)
cfn=(1042)
calls=1 0 
0 5
cob=(4)
cfi=(4)
cfn=(178)
calls=1 0 
0 5
cob=(3)
cfi=(3)
cfn=(948)
calls=1 0 
0 9
cob=(3)
cfi=(3)
cfn=(854)
calls=3 0 
0 30
cob=(3)
cfi=(3)
cfn=(166)
calls=1 0 
0 8
cob=(3)
cfi=(3)
cfn=(808)
calls=1 0 
0 9
cob=(3)
cfi=(3)
cfn=(168)
calls=1 0 
0 22
cob=(3)
cfi=(3)
cfn=(170)
calls=1 0 
0 15
cob=(3)
cfi=(3)
cfn=(444)
calls=1 0 
0 5
cob=(3)
cfi=(3)
cfn=(422)
calls=2 0 
0 18
0 22

fn=(0) 0x0000000000001170
0 2
cfn=(2) _dl_start
calls=1 0 
0 236230
0 14
cfn=(208) _dl_init
calls=1 0 
0 11218
0 3
cob=(9)
cfi=(9)
cfn=(340)
calls=1 0 
0 397298157

fn=(4)
0 230

fn=(44) rtld_lock_default_unlock_recursive
0 14

fn=(54) _dl_important_hwcaps
0 83
cfn=(32)
calls=1 0 
0 34
0 1
0 162
cfn=(56)
calls=1 0 
0 22
0 5
cfn=(56)
calls=1 0 
0 22
0 4

fn=(94)
0 500

fn=(112)
0 2224
cfn=(62) index
calls=18 0 
0 1260
0 162
cfn=(81)
calls=4 0 
0 3314
cfn=(80)
calls=14 0 
0 42746
0 362
cfn=(32)
calls=6 0 
0 204
0 6
0 60
cfn=(38)
calls=6 0 
0 149
0 30
cfn=(38)
calls=6 0 
0 149
0 196
cob=(3)
cfi=(3)
cfn=(388)
calls=2 0 
0 278
cfn=(32)
calls=1 0 
0 34
0 3
0 239
cfn=(106)
calls=3 0 
0 46
0 866
cfn=(106)
calls=8 0 
0 94
0 196
cfn=(130)
calls=1 0 
0 63
0 79
cfn=(130)
calls=1 0 
0 33
0 806
cfn=(38)
calls=3 0 
0 96
0 9

fn=(138)
0 1024
cfn=(90) _dl_name_match_p
calls=102 0 
0 6494
0 886
cfn=(140) match_symbol
calls=10 0 
0 1621
0 84
cfn=(140)
calls=28 0 
0 5418
0 970
cob=(3)
cfi=(3)
cfn=(1722)
calls=2 0 
0 470
cfn=(28) calloc
calls=7 0 
0 349
0 9
0 2107

fn=(12)
0 2404

fn=(62)
0 2564

fn=(78)
0 634
cfn=(80)
calls=1 0 
0 2683
0 22
cfn=(38)
calls=1 0 
0 95
0 4

fn=(102) mmap
0 819

fn=(142)
0 11
cfn=(28)
calls=1 0 
0 43
0 1
0 61
cfn=(144)
calls=1 0 
0 56
0 1
cfn=(146) _dl_allocate_tls_storage
calls=1 0 
0 455
0 16

fn=(208)
0 321
cob=(2)
cfi=(2)
cfn=(4036) 0x0000000014dfccf0
calls=1 0 
0 6
cob=(2)
cfi=(2)
cfn=(1724) 0x000000000be3df18
calls=1 0 
0 6
cob=(2)
cfi=(2)
cfn=(326) 0x0000000004a245c0
calls=1 0 
0 6
cob=(2)
cfi=(2)
cfn=(314) 0x0000000004e43e98
calls=1 0 
0 6
cob=(2)
cfi=(2)
cfn=(300) 0x000000000504ad30
calls=1 0 
0 6
cob=(2)
cfi=(2)
cfn=(288) 0x00000000052531c0
calls=1 0 
0 6
cob=(3)
cfi=(3)
cfn=(270)
calls=1 0 
0 165
0 126
cob=(12)
cfi=(229) ???
cfn=(4040) 0x0000000000008f20
calls=1 0 
0 16
cob=(11)
cfi=(78)
cfn=(1728)
calls=1 0 
0 16
cob=(8)
cfi=(8)
cfn=(330)
calls=1 0 
0 16
cob=(7)
cfi=(7)
cfn=(318)
calls=1 0 
0 16
cob=(6)
cfi=(6)
cfn=(304) 0x0000000000000f20
calls=1 0 
0 16
cob=(4)
cfi=(4)
cfn=(292)
calls=1 0 
0 16
cob=(3)
cfi=(3)
cfn=(278)
calls=1 0 
0 1879
0 4
cob=(6)
cfi=(6)
cfn=(312)
calls=1 0 
0 3
0 119
cob=(2)
cfi=(2)
cfn=(210) 0x0000000004c2b458
calls=1 0 
0 8655
0 19
cob=(5)
cfi=(5)
cfn=(260)
calls=1 0 
0 16
0 5
cob=(5)
cfi=(5)
cfn=(268)
calls=1 0 
0 12
0 14

fn=(1716)
0 32
cfn=(1718) _dl_check_caller
calls=2 0 
0 347
0 10
cfn=(62)
calls=2 0 
0 214
0 136
cfn=(72)
calls=2 0 
0 16
0 20
cfn=(88)
calls=2 0 
0 16037
0 38
cfn=(112)
calls=2 0 
0 5701
0 74
cfn=(72)
calls=2 0 
0 16
0 6
cfn=(76)
calls=2 0 
0 2
0 126
cfn=(208)
calls=2 0 
0 252
0 66
cfn=(148)
calls=2 0 
0 249485
0 162
cfn=(138)
calls=2 0 
0 3199
0 12
cfn=(4048)
calls=1 0 
0 539
0 10

fn=(5790)
0 23
cob=(5)
cfi=(5)
cfn=(396)
calls=1 0 
0 31
0 143
cfn=(5792)
calls=1 0 
0 2204
0 2
cob=(5)
cfi=(5)
cfn=(398)
calls=1 0 
0 29
0 193
cob=(6)
cfi=(6)
cfn=(5878) 0x0000000000000ee0
calls=1 0 
0 1474
0 16
cob=(12)
cfi=(229)
cfn=(5940) 0x0000000000008ee0
calls=1 0 
0 81
cob=(11)
cfi=(78)
cfn=(5920)
calls=1 0 
0 1474
cob=(4)
cfi=(4)
cfn=(5898)
calls=1 0 
0 1474
cob=(6)
cfi=(6)
cfn=(5874) fini
calls=1 0 
0 11
cob=(5)
cfi=(5)
cfn=(5854)
calls=1 0 
0 1474
cob=(7)
cfi=(7)
cfn=(5834)
calls=1 0 
0 1474
cob=(8)
cfi=(8)
cfn=(5808)
calls=1 0 
0 960
cob=(9)
cfi=(9)
cfn=(5796)
calls=1 0 
0 16
0 75
cob=(2)
cfi=(2)
cfn=(5956) 0x0000000014e1c83c
calls=1 0 
0 3
cob=(2)
cfi=(2)
cfn=(5938) 0x000000000be453e4
calls=1 0 
0 3
cob=(2)
cfi=(2)
cfn=(5918) 0x00000000052be278
calls=1 0 
0 3
cob=(2)
cfi=(2)
cfn=(5896) 0x000000000504b960
calls=1 0 
0 3
cob=(2)
cfi=(2)
cfn=(5872) 0x0000000004c36d34
calls=1 0 
0 3
cob=(2)
cfi=(2)
cfn=(5852) 0x0000000004e470b4
calls=1 0 
0 3
cob=(2)
cfi=(2)
cfn=(5832) 0x0000000004a2487c
calls=1 0 
0 3
cob=(2)
cfi=(2)
cfn=(5806) 0x0000000000a17680
calls=1 0 
0 3
0 123

fn=(148)
0 7564
cob=(4)
cfi=(4)
cfn=(196)
calls=1 0 
0 8
cob=(4)
cfi=(4)
cfn=(194)
calls=1 0 
0 8
cob=(4)
cfi=(4)
cfn=(192)
calls=1 0 
0 5
cob=(4)
cfi=(4)
cfn=(190)
calls=1 0 
0 5
cob=(4)
cfi=(4)
cfn=(188)
calls=1 0 
0 5
cob=(4)
cfi=(4)
cfn=(186)
calls=1 0 
0 5
cob=(4)
cfi=(4)
cfn=(184)
calls=1 0 
0 5
cob=(4)
cfi=(4)
cfn=(182)
calls=1 0 
0 8
cob=(4)
cfi=(4)
cfn=(180)
calls=1 0 
0 5
cob=(4)
cfi=(4)
cfn=(178)
calls=1 0 
0 5
cob=(4)
cfi=(4)
cfn=(176)
calls=1 0 
0 8
cob=(4)
cfi=(4)
cfn=(174)
calls=1 0 
0 8
0 38581
cfn=(150)
calls=475 0 
0 342556
0 12852
cob=(3)
cfi=(3)
cfn=(170)
calls=1 0 
0 15
cob=(3)
cfi=(3)
cfn=(168)
calls=1 0 
0 22
cob=(3)
cfi=(3)
cfn=(166)
calls=1 0 
0 8
cob=(3)
cfi=(3)
cfn=(164)
calls=1 0 
0 5
cob=(3)
cfi=(3)
cfn=(162)
calls=1 0 
0 5
cob=(3)
cfi=(3)
cfn=(158)
calls=1 0 
0 22
cob=(3)
cfi=(3)
cfn=(156)
calls=1 0 
0 5
0 978
cfn=(38)
calls=8 0 
0 149
0 165
cfn=(104)
calls=10 0 
0 50
0 351
cfn=(150)
calls=6 0 
0 4134
0 204
cob=(3)
cfi=(3)
cfn=(854)
calls=1 0 
0 10
cob=(3)
cfi=(3)
cfn=(444)
calls=1 0 
0 5
cob=(3)
cfi=(3)
cfn=(2308)
calls=1 0 
0 6
cob=(3)
cfi=(3)
cfn=(166)
calls=1 0 
0 8
cob=(3)
cfi=(3)
cfn=(1118)
calls=1 0 
0 6
cob=(3)
cfi=(3)
cfn=(422)
calls=1 0 
0 9
cob=(3)
cfi=(3)
cfn=(808)
calls=1 0 
0 9
0 100

fn=(8) brk
0 12

fn=(14) sbrk
0 17

fn=(36) __libc_memalign
0 958
cfn=(102)
calls=4 0 
0 132
0 487

fn=(222)
0 150
cfn=(224)
calls=6 0 
0 8629
0 90

fn=(223)
0 3675
cfn=(224)
calls=147 0 
0 170479
0 2205

fn=(1720) cache_rpath.part.5
0 34

fn=(5794) _wordcopy_fwd_aligned
0 40

fn=(2)
0 605
cfn=(4)
calls=1 0 
0 23
0 17
cfn=(6) _dl_sysdep_start
calls=1 0 
0 235521
0 64

fn=(28)
0 128
cfn=(32)
calls=16 0 
0 693
0 16

fn=(40)
0 63
cob=(5)
cfi=(5)
cfn=(396)
calls=2 0 
0 62
cfn=(42)
calls=7 0 
0 14
0 352
cob=(5)
cfi=(5)
cfn=(398)
calls=2 0 
0 58
cfn=(44)
calls=6 0 
0 12
0 13
cfn=(44)
calls=1 0 
0 2
0 2

fn=(56)
0 3570

fn=(90)
0 9380
cfn=(46)
calls=1340 0 
0 9443
0 16131
cfn=(46)
calls=1363 0 
0 28443
0 10766

fn=(98) _dl_map_object_from_fd
0 144
cfn=(72)
calls=8 0 
0 64
0 40
cfn=(100) _fxstat
calls=8 0 
0 80
0 548
cfn=(24)
calls=8 0 
0 5035
0 2133
cfn=(128)
calls=1 0 
0 6
0 251
cfn=(102)
calls=8 0 
0 280
0 400
cfn=(106)
calls=8 0 
0 12463
0 248
cfn=(102)
calls=8 0 
0 248
0 198
cfn=(76)
calls=2 0 
0 2
0 2575
cfn=(108) close
calls=1 0 
0 5
0 14
cfn=(108)
calls=7 0 
0 35
0 120
cfn=(4)
calls=8 0 
0 184
0 138
cfn=(40)
calls=8 0 
0 544
0 144
cfn=(104)
calls=8 0 
0 40
0 32
cfn=(102)
calls=3 0 
0 93
0 130

fn=(122)
0 22
cfn=(94)
calls=2 0 
0 10
0 14
cfn=(100)
calls=2 0 
0 20
0 16
cfn=(108)
calls=2 0 
0 10
0 26
cfn=(102)
calls=2 0 
0 66
0 4

fn=(126)
0 30
cfn=(12)
calls=6 0 
0 238
0 18
cob=(3)
cfi=(3)
cfn=(388)
calls=1 0 
0 175
cfn=(32)
calls=5 0 
0 170
0 6
0 54
cfn=(38)
calls=6 0 
0 177

fn=(6)
0 417
cfn=(8)
calls=1 0 
0 12
0 6
cfn=(10) init_cpu_features.constprop.0
calls=1 0 
0 112
0 4
cfn=(12)
calls=1 0 
0 41
0 3
cfn=(14)
calls=1 0 
0 17
0 12
cfn=(16)
calls=1 0 
0 234870
0 27

fn=(10)
0 112

fn=(24)
0 135
cfn=(12)
calls=9 0 
0 468
0 171
cob=(3)
cfi=(3)
cfn=(1722)
calls=2 0 
0 1009
cfn=(28)
calls=7 0 
0 402
0 9
0 108
cfn=(38)
calls=9 0 
0 276
0 475
cfn=(12)
calls=8 0 
0 390
0 228
cfn=(56)
calls=8 0 
0 278
0 548
cob=(3)
cfi=(3)
cfn=(388)
calls=2 0 
0 526
cfn=(32)
calls=6 0 
0 204
0 8
0 44

fn=(38)
0 1577

fn=(48)
0 21
cfn=(50)
calls=1 0 
0 5
0 67

fn=(1718)
0 347

fn=(60) expand_dynamic_string_token
0 39
cfn=(62)
calls=3 0 
0 403
0 12
cfn=(12)
calls=3 0 
0 241
0 9
cob=(3)
cfi=(3)
cfn=(388)
calls=1 0 
0 357
cfn=(32)
calls=2 0 
0 68
0 3
0 39
cfn=(38)
calls=3 0 
0 189

fn=(76)
0 6

fn=(82)
0 34

fn=(108)
0 50

fn=(118) _xstat
0 147

fn=(130)
0 386
cfn=(5794)
calls=2 0 
0 40
0 4

fn=(18)
0 369

fn=(52)
0 14
cfn=(54)
calls=1 0 
0 333
0 3
cfn=(32)
calls=1 0 
0 34
0 1
0 15
cfn=(32)
calls=1 0 
0 34
0 1
0 81
cfn=(58) decompose_rpath
calls=1 0 
0 1384
0 8
cfn=(62)
calls=1 0 
0 191
0 4
cfn=(12)
calls=1 0 
0 101
0 8
cfn=(38)
calls=1 0 
0 60
0 584
cfn=(32)
calls=1 0 
0 34
0 1
0 10
cfn=(64)
calls=1 0 
0 2026
0 14

fn=(100)
0 100

fn=(116) open_path
0 546
cfn=(56)
calls=23 0 
0 808
0 1116
cfn=(56)
calls=50 0 
0 961
0 200
cfn=(56)
calls=50 0 
0 1230
0 550
cfn=(92)
calls=50 0 
0 2000
0 682
cfn=(118)
calls=12 0 
0 147
0 515

fn=(146)
0 7
cfn=(36)
calls=1 0 
0 78
0 1
0 315
cfn=(28)
calls=1 0 
0 43
0 1
0 10

fn=(152)
0 162233
cfn=(90)
calls=1120 0 
0 60186
0 53340
cfn=(154)
calls=614 0 
0 105615
0 3088

fn=(32)
0 135
cfn=(36)
calls=45 0 
0 1499
0 45

fn=(58)
0 14
cfn=(60)
calls=1 0 
0 356
0 249
cfn=(32)
calls=1 0 
0 34
0 1
0 10
cfn=(64)
calls=1 0 
0 702
0 2
cfn=(70) free
calls=1 0 
0 6
0 1
0 9

fn=(70)
0 6

fn=(88)
0 1868
cfn=(90)
calls=118 0 
0 7483
0 513
cfn=(62)
calls=8 0 
0 496
0 28
cfn=(60)
calls=2 0 
0 1004
0 22
cfn=(92)
calls=2 0 
0 894
0 158
cfn=(98)
calls=8 0 
0 26194
0 20
cfn=(12)
calls=6 0 
0 306
0 150
cfn=(116)
calls=6 0 
0 6996
0 150
cfn=(116)
calls=5 0 
0 1759
0 48
cfn=(1720)
calls=1 0 
0 17
0 59
cfn=(120)
calls=6 0 
0 9383
0 108
cfn=(92)
calls=6 0 
0 3361
0 86
cfn=(1720)
calls=1 0 
0 17
0 658
cfn=(46)
calls=68 0 
0 1442
0 136

fn=(140)
0 3370
cfn=(46)
calls=38 0 
0 3289
0 380

fn=(22)
0 3349

fn=(72)
0 121

fn=(96)
0 40

fn=(106)
0 12883

fn=(198)
0 61
cfn=(56)
calls=1 0 
0 23
0 4
cfn=(106)
calls=1 0 
0 134
0 16

fn=(202)
0 19
cfn=(204)
calls=2 0 
0 10

ob=(2)
fl=(2)
fn=(314)
0 6

fn=(5918)
0 3

fn=(5852)
0 3

fn=(210)
0 2
cob=(5)
cfi=(5)
cfn=(212)
calls=1 0 
0 8651
0 2

fn=(288)
0 6

fn=(300)
0 6

fn=(5896)
0 3

fn=(356)
0 6

fn=(1724)
0 6

fn=(4036)
0 6

fn=(5832)
0 3

fn=(5938)
0 3

fn=(5956)
0 3

fn=(326)
0 6

fn=(5872)
0 3

fn=(5806)
0 3

ob=(6)
fl=(6)
fn=(5878)
0 8
cob=(1)
cfi=(1)
cfn=(223)
calls=1 0 
0 1448
0 5
0 1
cfn=(5890) 0x0000000000000e70
calls=1 0 
0 9
0 3

fn=(4004) _dlerror_run
0 50
cob=(5)
cfi=(5)
cfn=(1686)
calls=4 0 
0 16
cob=(1)
cfi=(1)
cfn=(223)
calls=1 0 
0 1553
0 9
0 65
cob=(1)
cfi=(1)
cfn=(80)
calls=5 0 
0 253175
0 80
cob=(5)
cfi=(5)
cfn=(4022)
calls=4 0 
0 68
cob=(1)
cfi=(1)
cfn=(223)
calls=1 0 
0 804
0 9
0 18
cob=(1)
cfi=(1)
cfn=(223)
calls=1 0 
0 1488
0 5
0 8
cob=(1)
cfi=(1)
cfn=(223)
calls=1 0 
0 826
0 5
0 1

fn=(312)
0 6
cob=(1)
cfi=(1)
cfn=(223)
calls=1 0 
0 796
0 5
0 7

fn=(304)
0 16

fn=(4002) dlopen@@GLIBC_2.2.5
0 11
cfn=(4004)
calls=1 0 
0 253536
0 6

fn=(5876) check_free
0 9

fn=(4034)
0 22
cob=(1)
cfi=(1)
cfn=(1714)
calls=1 0 
0 248704
0 6

fn=(4054)
0 52
cob=(5)
cfi=(5)
cfn=(396)
calls=4 0 
0 124
0 12
cfn=(4004)
calls=4 0 
0 4644
0 16
cob=(5)
cfi=(5)
cfn=(398)
calls=4 0 
0 116
0 20

fn=(4056)
0 24
cob=(3)
cfi=(3)
cfn=(4062)
calls=3 0 
0 2193
cob=(1)
cfi=(1)
cfn=(223)
calls=1 0 
0 1911
0 8
0 12

fn=(5874)
0 2
cfn=(5876)
calls=1 0 
0 9

fn=(5890)
0 9

ob=(1)
fl=(1)
fn=(202)
0 6

ob=(12)
fl=(236) /home/mithuncy/fsm_p11patch/src/pl/plpgsql/src/pl_funcs.c
fn=(4234) plpgsql_ns_lookup
135 20
+2 2
+5 12
+4 12
cob=(3)
cfi=(3)
cfn=(446)
calls=2 0 
* 55
* 2
* 4
+2 2
+3 2
+1 2
+1 2
-9 3
-1 2
-1 2
+1 8
-1 8
+17 6
+20 6
+3 9
-45 10
+49 2
+2 1
+1 4

fn=(4178) plpgsql_ns_additem
95 30
+7 15
cob=(3)
cfi=(3)
cfn=(424)
calls=5 0 
* 83
* 5
* 15
cob=(9)
cfi=(13)
cfn=(940)
calls=5 925 
* 615
* 5
* 5
+1 15
+1 15
+1 15
+1 30
cob=(3)
cfi=(3)
cfn=(810)
calls=5 0 
* 114
* 5
+1 10
+1 10

fn=(4230) plpgsql_ns_top
84 8
+1 4
+1 8

fn=(5562) free_block
487 4
+1 4
cfn=(5564) free_stmts
calls=1 -12 
* 5439
+1 4
+11 2

fn=(5564)
476 4
+3 3
cfi=(239) /home/mithuncy/fsm_p11patch/src/pl/plpgsql/src/../../../../src/include/nodes/pg_list.h
cfn=(4354) list_head
calls=1 78 
* 10
* 2
+2 8
cfn=(5566) free_stmt
calls=2 381 
* 5398
-2 12
+4 2

fn=(5565) free_stmts'2
476 4
+3 3
cfi=(239)
cfn=(4354)
calls=1 78 
* 10
* 2
+2 4
cfn=(5567) free_stmt'2
calls=1 381 
* 1970
-2 7
+4 2

fn=(4174) plpgsql_ns_push
57 15
+1 6
+1 4
+1 10
cfn=(4178)
calls=2 +35 
* 362
* 2
* 5
cfn=(4178)
calls=1 +35 
* 245
* 1
+1 6

fn=(5566)
381 8
+1 24
+21 3
cfn=(5568) free_fori
calls=1 556 
* 5336
+1 1
+14 3
cfn=(5578) free_return
calls=1 645 
* 18
+1 1
+53 4

fn=(5567)
381 4
+1 12
+54 3
cfn=(5576) free_dynexecute
calls=1 700 
* 1948
+1 1
+35 2

fn=(5576)
700 4
+3 4
cfn=(5560) free_expr
calls=1 +27 
* 1922
+1 4
cfi=(239)
cfn=(4354)
calls=1 78 
* 8
* 4
+4 2

fn=(4170) plpgsql_ns_init
46 2
+1 1
+1 2

fn=(5568)
556 4
+1 4
cfn=(5560)
calls=1 730 
* 1652
+1 4
cfn=(5560)
calls=1 730 
* 1652
+1 4
cfn=(5560)
calls=1 730 
* 8
+1 4
cfn=(5565)
calls=1 -84 
* 2002
+1 2

fn=(5558) plpgsql_free_function_memory
740 4
+7 2
+2 16
+2 24
+5 4
+2 8
cfn=(5560)
calls=2 -28 
* 16
+1 8
cfn=(5560)
calls=2 -29 
* 16
+2 2
-14 14
+33 2
+3 4
+1 4
cfn=(5562)
calls=1 487 
* 5453
+1 2
+7 4
+1 4
cob=(9)
cfi=(13)
cfn=(1396)
calls=1 212 
* 304
* 1
+1 2
+1 2

fn=(5560)
730 36
+1 30
+2 12
cob=(9)
cfi=(163)
cfn=(5572)
calls=3 +8 
* 5169
* 3
+1 6
+2 18

fn=(4304) plpgsql_ns_pop
70 4
+2 2
+1 3
-1 12
+2 6
+1 4

fn=(5578)
645 4
+1 4
cfn=(5560)
calls=1 +84 
* 8
+1 2

fl=(235) /home/mithuncy/fsm_p11patch/src/pl/plpgsql/src/../../../../src/include/utils/palloc.h
fn=(4164) MemoryContextSwitchTo
110 18
+1 18
+2 18
+1 6
+1 12
-5 12
+1 12
+2 12
+1 4
+1 8
-5 9060
+1 9060
+2 9060
+1 3020
+1 6040

fl=(238) /home/mithuncy/fsm_p11patch/src/pl/plpgsql/src/pl_gram.y
fn=(4252) tok_is_keyword
2549 7
+1 3
+5 2
+11 1
+1 2

fn=(4254) read_sql_construct
2661 48
+4 3
+1 3
+3 9
cob=(9)
cfi=(80)
cfn=(1888)
calls=3 47 
* 400
* 3
+1 15
cob=(9)
cfi=(80)
cfn=(1918)
calls=3 164 
* 360
* 3
+3 9
+1 6
+4 3
cfi=(234) /home/mithuncy/fsm_p11patch/src/pl/plpgsql/src/pl_scanner.c
cfn=(4214) plpgsql_yylex
calls=3 256 
* 2332
* 3
* 10
cfi=(234)
cfn=(4214)
calls=10 256 
* 7874
* 10
* 13
+1 26
+1 9
+1 43
+1 2
+1 33
+2 35
+1 1
+1 38
+1 2
+1 34
+2 1
+1 2
+8 40
+17 10
+2 9
+2 6
+1 3
+1 6
+1 9
+3 12
+8 21
cfi=(234)
cfn=(4262) plpgsql_append_source_text
calls=3 527 
* 374
* 3
+3 6
+2 3
+1 8
-1 48
cob=(9)
cfi=(42)
cfn=(934)
calls=4 222 
* 61
* 4
* 8
+4 6
cob=(9)
cfi=(13)
cfn=(2546)
calls=3 956 
* 635
* 3
* 3
+1 9
cob=(9)
cfi=(13)
cfn=(928)
calls=3 1162 
* 651
* 3
* 6
+1 6
+1 6
+1 6
+1 3
cfi=(236)
cfn=(4230)
calls=3 84 
* 15
* 3
* 6
+1 9
cob=(9)
cfi=(13)
cfn=(952)
calls=3 1032 
* 255
* 3
+2 6
+1 6
cob=(3)
cfi=(3)
cfn=(424)
calls=2 0 
* 30
* 2
* 14
cfn=(4270) check_sql_expr
calls=2 3598 
* 27465
+2 3
+1 15

fn=(4300) check_labels
3693 16
+1 4
+16 10

fn=(4270)
3598 18
+5 15
+3 6
+1 6
+2 6
+1 6
+1 9
+1 9
+2 12
cfi=(235)
cfn=(4164)
calls=3 110 
* 36
* 3
+1 9
cob=(9)
cfi=(211)
cfn=(3834)
calls=3 37 
* 34624
* 3
+1 9
cfi=(235)
cfn=(4164)
calls=3 110 
* 36
+3 9
+1 6

fn=(4276) read_sql_expression2
2622 7
+1 14
cfn=(4254)
calls=1 +38 
* 10051
+2 2

fl=(231)
fn=(4196) build_datatype
2021 14
+1 16
+3 10
+6 4
cob=(9)
cfi=(13)
cfn=(940)
calls=2 925 
* 184
* 2
* 2
+2 8
cob=(9)
cfi=(13)
cfn=(928)
calls=2 1162 
* 352
* 2
* 4
+1 8
+1 28
+5 4
+1 2
+21 8
+1 8
+1 8
+1 8
+1 4
+4 8
+6 4
+1 8
-1 6
+13 6
+2 2
+1 8

fn=(4206) plpgsql_adddatum
2207 8
+1 10
+6 8
+1 24
+1 4

fn=(4836)
1079 9
+1 3
+3 5
+3 5
+13 8
cfn=(4838) resolve_column_ref
calls=1 +52 
* 673
* 1
+2 4
+14 1
+1 6

fn=(4840) make_datum_param
1314 6
+7 4
+2 8
+5 5
cfi=(235)
cfn=(4164)
calls=1 110 
* 12
* 1
+1 6
cob=(9)
cfi=(276)
cfn=(4844)
calls=1 765 
* 217
* 1
* 2
+1 3
cfi=(235)
cfn=(4164)
calls=1 110 
* 12
+2 5
cob=(9)
cfi=(13)
cfn=(2156)
calls=1 815 
* 152
* 1
* 5
+1 2
+1 4
+1 11
cfi=(241)
cfn=(4852) plpgsql_exec_get_datum_type_info
calls=1 5562 
* 39
* 1
+5 3
+2 1
+1 2

fn=(4202) plpgsql_build_variable
1804 18
+3 12
+7 4
cob=(9)
cfi=(13)
cfn=(2546)
calls=2 956 
* 354
* 2
* 2
+1 4
+1 6
cob=(9)
cfi=(13)
cfn=(928)
calls=2 1162 
* 354
* 2
* 4
+1 6
+1 6
+4 4
+1 4
+1 4
+2 6
cfn=(4206)
calls=2 2207 
* 54
* 2
+1 4
+1 12
cfi=(236)
cfn=(4178)
calls=2 95 
* 380
* 2
+3 4
+1 2
+26 2
+1 8

fn=(4826)
1065 5
+1 3
+2 5
+3 1
+1 2

fn=(4148) plpgsql_compile_inline
826 4
+1 2
+12 3
cfi=(234)
cfn=(4152) plpgsql_scanner_init
calls=1 708 
* 1193
* 1
+2 3
+5 2
+1 2
+1 3
+1 3
+3 4
+3 2
cob=(9)
cfi=(13)
cfn=(2546)
calls=1 956 
* 621
* 1
* 1
+2 3
+6 8
cob=(9)
cfi=(14)
cfn=(432)
calls=1 395 
* 428
* 1
* 1
+3 3
cfi=(235)
cfn=(4164)
calls=1 110 
* 12
* 2
+2 3
cob=(9)
cfi=(13)
cfn=(928)
calls=1 1162 
* 195
* 1
* 2
+1 2
+1 2
+1 3
+1 2
+1 5
+1 4
+6 2
+1 2
+2 1
cfi=(236)
cfn=(4170)
calls=1 46 
* 5
* 1
+1 4
cfi=(236)
cfn=(4174)
calls=1 57 
* 260
* 1
+1 2
+1 1
cfn=(4186) plpgsql_start_datums
calls=1 2190 
* 141
+3 2
+1 2
+1 2
+1 2
+1 2
+2 2
+1 2
+6 2
+5 4
cfn=(4192) plpgsql_build_datatype
calls=1 2001 
* 27059
* 1
* 5
cfn=(4202)
calls=1 1804 
* 641
* 1
* 1
+5 4
+5 1
cfi=(237) /home/mithuncy/fsm_p11patch/src/pl/plpgsql/src/pl_gram.c
cfn=(4210) plpgsql_yyparse
calls=1 1872 
* 86520
* 1
* 1
+1 2
+2 4
+2 1
cfi=(234)
cfn=(4310) plpgsql_scanner_finish
calls=1 735 
* 26
* 1
+6 4
+1 3
cfn=(4314) add_dummy_return
calls=1 +82 
* 390
+5 2
+2 3
cfn=(4318) plpgsql_finish_datums
calls=1 2224 
* 222
+5 3
+1 2
+2 2
+2 4
cfi=(235)
cfn=(4164)
calls=1 110 
* 12
+1 2
+1 1
+1 2

fn=(4226) plpgsql_parse_word
1365 21
+8 12
+5 1
cfi=(236)
cfn=(4230)
calls=1 84 
* 5
* 1
* 7
cfi=(236)
cfn=(4234)
calls=1 135 
* 104
* 1
* 1
+4 2
+24 9
+1 18
+1 3
+1 6

fn=(4318)
2224 4
+1 1
+3 4
+1 6
cob=(9)
cfi=(13)
cfn=(940)
calls=1 925 
* 123
* 1
* 2
+1 2
+2 28
+3 28
+4 2
+1 2
-10 14
+18 3
+1 2

fn=(4390)
1052 12
+1 9
+1 9
+1 9
+2 9
+1 6

fn=(4838)
1151 10
+4 1
+1 1
+1 1
+2 1
+1 1
+1 1
+7 4
+12 4
cfi=(239)
cfn=(4558) list_length
calls=1 90 
* 10
* 6
+4 4
cfi=(239)
cfn=(4354)
calls=1 78 
* 10
* 2
+3 3
+1 1
+1 1
+1 1
+58 11
cfi=(236)
cfn=(4234)
calls=1 135 
* 72
* 1
* 1
+4 2
+3 4
+3 3
+1 8
cfn=(4840)
calls=1 +55 
* 503
* 1
+47 5

fn=(4186)
2190 2
+1 1
+1 2
+2 8
cob=(9)
cfi=(13)
cfn=(798)
calls=1 772 
* 122
* 1
* 2
+3 1
+1 2

fn=(4192)
2001 12
+4 8
cob=(9)
cfi=(151)
cfn=(3306)
calls=2 1114 
* 48901
* 2
* 2
+1 4
+3 12
cfn=(4196)
calls=2 +12 
* 718
* 2
+2 6
cob=(9)
cfi=(151)
cfn=(3280)
calls=2 1161 
* 206
* 2
+2 2
+1 4

fn=(4314)
1011 5
+6 5
+10 5
+1 5
cfi=(239)
cfn=(4316) list_tail
calls=1 84 
* 10
* 2
-1 2
+5 2
cob=(9)
cfi=(13)
cfn=(2546)
calls=1 -76 
* 166
* 1
* 1
+1 2
+1 2
+1 4
+2 9
cob=(9)
cfi=(45)
cfn=(960)
calls=1 129 
* 163
* 1
* 1
+2 4

fn=(4110) plpgsql_HashTableInit
2449 3
+6 5
cob=(3)
cfi=(3)
cfn=(828)
calls=1 0 
* 22
* 1
+1 1
+1 1
+1 6
cob=(9)
cfi=(31)
cfn=(794)
calls=1 317 
* 2898
* 1
* 1
+4 2

fl=(234)
fn=(4216) internal_yylex
430 116
+4 87
+2 15
+1 30
+1 95
+4 168
cob=(9)
cfi=(213)
cfn=(3860)
calls=24 9032 
* 13830
* 24
* 24
+5 144
+1 72
cob=(3)
cfi=(3)
cfn=(424)
calls=24 0 
* 389
* 24
* 72
+3 48
+2 5
cob=(3)
cfi=(3)
cfn=(446)
calls=1 0 
* 22
* 1
* 2
+2 5
cob=(3)
cfi=(3)
cfn=(446)
calls=1 0 
* 22
* 1
* 2
+2 5
cob=(3)
cfi=(3)
cfn=(446)
calls=1 0 
* 22
* 1
* 2
+5 46
+6 29
+1 58

fn=(4156) location_lineno_init
684 6
+1 6
+1 3
+2 12
cob=(3)
cfi=(3)
cfn=(1120)
calls=3 0 
* 42
* 3
* 3
+1 6

fn=(4242) plpgsql_location_to_lineno
660 16
+3 20
+2 20
+3 12
+1 2
cfn=(4156)
calls=2 +15 
* 54
+2 4
+2 18
+1 18
+1 24
cob=(3)
cfi=(3)
cfn=(1120)
calls=6 0 
* 156
* 6
* 6
-4 60
+7 4
+1 8

fn=(4246) plpgsql_push_back_token
492 8
+3 18
+1 6
+1 4
+1 10
cfn=(4222) push_back_token
calls=2 -22 
* 74
+1 4

fn=(4222)
476 25
+1 15
+2 30
+1 90
+1 15
+1 10

fn=(4214)
256 78
+5 78
cfn=(4216)
calls=26 430 
* 14360
* 26
+1 98
+5 9
cfn=(4216)
calls=3 430 
* 1001
* 3
+1 6
+81 15
cfn=(4222)
calls=3 476 
* 111
+11 45
+24 6
-1 21
cfi=(231)
cfn=(4226)
calls=3 1365 
* 191
* 3
* 6
+5 12
+1 6
-1 9
cob=(9)
cfi=(216)
cfn=(3864)
calls=3 67 
* 1415
* 3
* 9
+9 3
+18 27
+1 9
+1 6
+1 6
+1 3
+1 6
-5 207
+1 69
+1 46
+1 46
+1 23
+1 46

fn=(4152)
708 4
+2 7
cob=(9)
cfi=(212)
cfn=(3836)
calls=1 1148 
* 1144
* 1
* 1
+9 2
+3 2
+1 1
+2 1
+2 1
cfn=(4156)
calls=1 -43 
* 27
+1 2

fn=(4310)
735 2
+2 3
cob=(9)
cfi=(212)
cfn=(3888)
calls=1 1187 
* 16
* 1
+2 1
+1 1
+1 2

fn=(4262)
527 18
+2 33
cob=(9)
cfi=(80)
cfn=(1920)
calls=3 215 
* 314
* 3
+2 6

fl=(281) /home/mithuncy/fsm_p11patch/src/pl/plpgsql/src/../../../../src/include/executor/executor.h
fn=(4788) ExecEvalExpr
277 3012
+1 3514
cob=(9)
cfi=(280)
cfn=(4776)
calls=499 +21 
* 2995988
cob=(9)
cfi=(280)
cfn=(4790)
calls=3 1745 
* 7985
+1 1004

fl=(237)
fn=(4306) yydestruct
1836 12
+3 4
+7 4

fn=(4210)
1872 6
+36 1
+17 1
+2 4
+1 4
+1 4
+1 1
+4 1
+1 1
+1 2
+1 2
+1 4
+1 1
+8 32
+3 128
+2 224
-2 4
+2 7
+68 66
+1 1
4821 1
+1 1
2023 32
+11 224
+1 64
+1 15
+5 68
+3 11
cfi=(234)
cfn=(4214)
calls=11 256 
* 7270
* 11
* 22
+3 68
+2 5
+5 192
+6 32
+1 32
-1 2
+1 172
+2 84
+1 24
+4 1
+1 1
+5 22
+7 22
+2 22
+2 121
+2 55
+1 11
+7 120
+1 40
+2 20
+8 120
+10 300
+3 40
-13 6
+10 15
+3 217
+2 210
fi=(238)
361 5
fe=(237)
2129 1
fi=(238)
413 2
cob=(9)
cfi=(13)
cfn=(2546)
calls=1 956 
* 187
* 1
* 1
+2 2
+1 5
cfi=(234)
cfn=(4242)
calls=1 660 
* 97
* 1
* 2
+1 5
+1 5
+1 5
+1 5
+1 5
+2 10
cfn=(4300)
calls=1 3693 
* 15
+1 1
cfi=(236)
cfn=(4304)
calls=1 70 
* 12
* 1
+2 2
fe=(237)
2213 1
fi=(238)
434 2
+1 3
+1 1
+1 1
fe=(237)
2225 1
fi=(238)
838 2
fe=(237)
2712 2
fi=(238)
842 8
+3 16
cob=(9)
cfi=(45)
cfn=(960)
calls=2 129 
* 580
* 2
* 2
fe=(237)
2724 2
fi=(238)
862 3
fe=(237)
2766 1
fi=(238)
876 3
fe=(237)
2808 1
fi=(238)
1287 6
+4 4
+1 5
cfi=(234)
cfn=(4242)
calls=1 660 
* 142
* 1
* 2
+1 5
+1 4
+1 3
+17 10
cfn=(4300)
calls=1 3693 
* 15
+2 1
cfi=(236)
cfn=(4304)
calls=1 70 
* 19
* 1
fe=(237)
3376 1
fi=(238)
1320 1
cfi=(234)
cfn=(4214)
calls=1 256 
* 464
* 1
* 1
+1 3
+2 3
+48 3
+45 1
+14 6
cfn=(4252)
calls=1 2549 
* 15
* 2
+4 3
cfi=(234)
cfn=(4246)
calls=1 492 
* 62
* 1
+9 13
cfn=(4254)
calls=1 2661 
* 1283
* 1
+11 3
+9 7
cfn=(4270)
calls=1 3598 
* 7357
+3 6
cfn=(4276)
calls=1 2622 
* 10074
* 1
+5 3
+4 1
+3 5
+8 4
cfi=(231)
cfn=(4192)
calls=1 2001 
* 22822
* 1
* 1
+1 2
-1 4
-1 3
cfi=(231)
cfn=(4202)
calls=1 1804 
* 621
* 1
* 1
+8 2
cob=(9)
cfi=(13)
cfn=(2546)
calls=1 956 
* 170
* 1
* 1
+1 2
+1 3
+1 3
+1 3
+1 3
+1 3
+2 3
fe=(237)
3617 1
fi=(238)
1605 3
+1 4
cfi=(234)
cfn=(4242)
calls=1 660 
* 114
* 1
* 1
+1 1
+1 1
+2 1
cfi=(234)
cfn=(4214)
calls=1 256 
* 68
* 1
* 1
+1 3
cfi=(234)
cfn=(4246)
calls=1 492 
* 62
* 1
+1 2
fe=(237)
3665 1
fi=(238)
1926 4
+1 4
+1 3
fe=(237)
4008 1
fi=(238)
1978 12
cfn=(4254)
calls=1 2661 
* 29796
* 1
+6 2
cob=(9)
cfi=(13)
cfn=(940)
calls=1 925 
* 123
* 1
* 1
+1 2
+1 4
cfi=(234)
cfn=(4242)
calls=1 660 
* 75
* 1
* 2
+1 3
+1 2
+1 2
+1 2
+1 2
+11 3
+8 3
+14 3
+1 1
+5 2
fe=(237)
4116 1
fi=(238)
2264 1
fe=(237)
4381 1
fi=(238)
2397 3
cfi=(236)
cfn=(4174)
calls=1 57 
* 198
* 1
+1 1
fe=(237)
4550 1
fi=(238)
2409 3
cfi=(236)
cfn=(4174)
calls=1 57 
* 198
* 1
+1 1
fe=(237)
4568 1
fi=(238)
2421 2
fe=(237)
4585 2
+51 2
+15 30
+1 2
+3 20
+1 8
+6 12
+2 24
+1 4
-14 285
+1 19
+3 190
+1 76
+6 114
+2 228
+1 137
+1 42
+4 6
-2 120
+2 15
4842 4
+10 15
+2 1
+3 12
-1 12
cfn=(4306)
calls=2 1836 
* 20
+2 6
-4 9
+7 3
+7 1
+1 6

fl=(230)
fn=(4136)
301 4
+1 3
+11 7
cob=(9)
cfi=(163)
cfn=(4140)
calls=1 96 
* 1087
* 1
* 3
+4 4
cfi=(231)
cfn=(4148)
calls=1 826 
* 117883
* 1
* 1
+3 5
+7 846
+1 69
+1 2
+1 1
+1 3
+3 1
cob=(9)
cfi=(240)
cfn=(4322)
calls=1 86 
* 987
* 1
* 1
+3 10
cob=(3)
cfi=(3)
cfn=(370)
calls=1 0 
* 28
* 1
* 5
+2 8
cfi=(241)
cfn=(4328) plpgsql_exec_function
calls=1 452 
* 363691112
* 1
* 1
+35 6
+3 3
cob=(9)
cfi=(240)
cfn=(5506)
calls=1 195 
* 454
* 1
+3 5
+4 3
cfi=(236)
cfn=(5558)
calls=1 740 
* 5896
* 1
+5 1
cob=(9)
cfi=(163)
cfn=(5584)
calls=1 177 
* 1066
* 1
* 3
+3 1
+1 2

fn=(4100)
130 4
+1 4
+1 2

fn=(4070)
148 3
+4 3
+3 2
cob=(9)
cfi=(54)
cfn=(4074)
calls=1 1612 
* 5
* 1
+2 13
cob=(9)
cfi=(29)
cfn=(4078)
calls=1 8381 
* 698842
* 1
+9 12
cob=(9)
cfi=(29)
cfn=(4088)
calls=1 8269 
* 699535
* 1
+8 12
cob=(9)
cfi=(29)
cfn=(4088)
calls=1 8269 
* 695255
* 1
+8 14
cob=(9)
cfi=(29)
cfn=(4092)
calls=1 8355 
* 697084
* 1
+10 14
cob=(9)
cfi=(29)
cfn=(4092)
calls=1 8355 
* 706301
* 1
+10 2
cob=(9)
cfi=(29)
cfn=(4106)
calls=1 8399 
* 5138
* 1
+2 1
cfi=(231)
cfn=(4110)
calls=1 2449 
* 2941
* 1
+1 4
cob=(9)
cfi=(26)
cfn=(4118)
calls=1 3333 
* 114
* 1
+1 4
cob=(9)
cfi=(26)
cfn=(4122)
calls=1 3388 
* 145
* 1
+3 2
cob=(9)
cfi=(228)
cfn=(4126)
calls=1 681 
* 4055
* 1
* 2
+2 1
+1 2

fn=(4132)
297 5

fn=(4094)
63 12
+4 2
+3 10
cob=(9)
cfi=(32)
cfn=(968)
calls=2 -33 
* 84
* 2
* 4
+2 10
cob=(9)
cfi=(32)
cfn=(968)
calls=2 -35 
* 178
* 2
* 4
+1 4
+46 4
cob=(3)
cfi=(3)
cfn=(388)
calls=2 0 
* 354
* 2
* 2
+1 4
+2 6
+1 6
+2 2
+1 4

fn=(4102)
136 4
+1 4
+1 2

fn=(4068)
36 5

fl=(229)
fn=(4040)
0 16

fn=(5940)
0 8
cob=(3)
cfi=(3)
cfn=(5820)
calls=1 0 
0 59
0 1
0 1
cfn=(5950) 0x0000000000008e70
calls=1 0 
0 9
0 3

fn=(5950)
0 9

fl=(241)
fn=(4344) exec_set_found
8044 12
+3 18
+1 13
cfn=(4346) assign_simple_var
calls=1 8193 
* 41
* 6
cfn=(4346)
calls=1 8193 
* 41
+1 4

fn=(4852)
5562 9
+1 8
+5 2
+2 5
+1 5
+1 5
+1 1
+69 4

fn=(4748) exec_eval_simple_expr
6026 4518
+1 1506
+1 2008
+8 2008
+6 2008
+8 2510
cfi=(235)
cfn=(4164)
calls=502 110 
* 6024
* 502
+1 2008
cob=(9)
cfi=(163)
cfn=(4562)
calls=502 1738 
* 279614
* 502
* 502
+1 1506
cfi=(235)
cfn=(4164)
calls=502 110 
* 6024
+10 3012
+11 2008
+1 2008
+6 2008
+2 2510
cfn=(4752) setup_param_list
calls=502 +84 
* 11024
* 1004
+7 2008
+2 15
cfi=(235)
cfn=(4164)
calls=3 110 
* 36
* 3
+2 21
cob=(9)
cfi=(278)
cfn=(4756)
calls=3 158 
* 39791
* 3
-1 6
+3 6
+1 9
+1 9
cfi=(235)
cfn=(4164)
calls=3 110 
* 36
+9 2510
cfi=(235)
cfn=(4164)
calls=502 110 
* 6024
* 502
+1 2510
+2 502
cob=(9)
cfi=(26)
cfn=(4782)
calls=502 920 
* 5522
* 502
+1 502
cob=(9)
cfi=(110)
cfn=(2986)
calls=502 305 
* 325212
* 502
* 1004
cob=(9)
cfi=(110)
cfn=(3948)
calls=502 734 
* 163683
* 502
+6 1004
+5 3514
cfi=(281)
cfn=(4788)
calls=502 277 
* 3011503
* 1004
+5 1004
+2 1004
+2 2008
+2 2510
+1 502
cob=(9)
cfi=(110)
cfn=(4800)
calls=502 813 
* 112448
* 502
+2 1506
cfi=(235)
cfn=(4164)
calls=502 110 
* 6024
+5 2008
cob=(9)
cfi=(154)
cfn=(4744)
calls=502 1263 
* 47188
* 502
+5 502
+1 1004

fn=(4810) get_stmt_mcontext
1449 2000
+1 2000
+3 8
cob=(9)
cfi=(14)
cfn=(432)
calls=1 395 
* 464
* 1
-1 2
+5 2
+1 2
-1 998
+1 998

fn=(5104)
6355 8
+8 3
+1 3
+3 4
+4 8
+2 1
+1 2
+1 2
+9 4
+2 4
+1 3
-1 2
+4 3
+24 1
+1 3
+1 3
+1 5
cob=(9)
cfi=(278)
cfn=(4766)
calls=1 2133 
* 185
* 1
+1 2

fn=(4352) exec_stmts
1860 5
+3 2
+11 3
cfi=(239)
cfn=(4354)
calls=1 78 
* 10
* 2
+2 6
+1 10
cfn=(4349) exec_stmt'2
calls=2 +17 
* 363684995
* 2
+2 4
+1 2
-6 7
+10 2

fn=(4353) exec_stmts'2
1860 2500
+3 1000
+11 1500
cfi=(239)
cfn=(4354)
calls=500 78 
* 5000
* 1000
+2 1500
+1 2500
cfn=(4349)
calls=500 +17 
* 363455004
* 500
+2 1000
-5 3500
+9 500
+1 1000

fn=(4360) exec_prepare_plan
3997 24
+7 12
+5 21
cob=(9)
cfi=(163)
cfn=(4364)
calls=3 658 
* 709156
* 3
* 3
+4 6
+3 6
+1 9
cob=(9)
cfi=(163)
cfn=(4544)
calls=3 692 
* 705
* 3
+1 9
+3 15
cfn=(4552) exec_simple_check_plan
calls=3 7759 
* 294767
+7 6
+1 6

fn=(5140) convert_value_to_string
7518 3000
+6 2500
cfi=(235)
cfn=(4164)
calls=500 110 
* 6000
* 500
+1 3000
cob=(9)
cfi=(272)
cfn=(5078)
calls=500 2642 
* 250500
* 500
+1 2500
cob=(9)
cfi=(171)
cfn=(5146)
calls=500 1834 
* 186500
* 500
* 500
+1 1500
cfi=(235)
cfn=(4164)
calls=500 110 
* 6000
+2 500
+1 1000

fn=(5548) exec_stmt_return
3085 6
+6 4
+4 2
+1 2
+1 2
+14 4
+71 4
+27 4
+1 3
-1 2
+3 2
+1 2
+1 2
+3 1
+1 4

fn=(4752)
6166 2008
+15 2008
+3 1500
+7 1500
+7 2500
+9 2
+2 2
+1 4
-1 500
+1 1000

fn=(4736) exec_save_simple_expr
7858 15
+12 12
cfi=(239)
cfn=(4354)
calls=3 78 
* 30
* 6
+11 9
+5 12
cfi=(239)
cfn=(4354)
calls=3 78 
* 30
* 9
+2 12
+7 3
+26 9
+1 12
+1 6
+1 6
+1 6
+2 9
cob=(9)
cfi=(247)
cfn=(4434)
calls=3 43 
* 72
* 3
* 6
+1 9
cob=(9)
cfi=(247)
cfn=(4528)
calls=3 277 
* 92
* 3
* 6
+1 6

fn=(4340) copy_plpgsql_datums
1215 5
+1 3
+9 5
cob=(9)
cfi=(13)
cfn=(940)
calls=1 925 
* 123
* 1
-1 2
+7 4
cob=(9)
cfi=(13)
cfn=(940)
calls=1 925 
* 123
* 1
* 1
+1 2
+3 3
+1 3
+1 2
+2 14
+4 24
+4 4
+1 12
cob=(3)
cfi=(3)
cfn=(856)
calls=2 0 
* 48
* 2
+1 2
+1 2
+26 14
-39 11
+43 2

fn=(4552)
7759 15
+10 6
+12 12
cob=(9)
cfi=(163)
cfn=(4556)
calls=3 1722 
* 21
* 3
* 3
+1 9
cfi=(239)
cfn=(4558)
calls=3 90 
* 30
* 6
+2 9
cfi=(239)
cfn=(4354)
calls=3 78 
* 30
* 6
+5 12
cfi=(239)
cfn=(4558)
calls=3 90 
* 30
* 6
+2 12
cfi=(239)
cfn=(4354)
calls=3 78 
* 30
* 6
+5 12
+2 12
+2 12
+9 12
+1 6
-1 6
+2 6
-1 6
+2 6
-1 6
+2 6
-1 6
+2 9
-1 6
+2 9
-1 6
+2 6
-1 6
+2 6
-1 6
+2 6
-1 6
+2 6
-1 6
+2 6
-1 6
+2 6
-1 6
+2 6
-1 6
+2 6
-1 6
+2 6
-1 6
+7 12
cfi=(239)
cfn=(4558)
calls=3 90 
* 30
* 6
+9 15
cfi=(235)
cfn=(4164)
calls=3 110 
* 36
* 3
+1 12
cob=(9)
cfi=(163)
cfn=(4562)
calls=3 1738 
* 293421
* 3
* 3
+1 9
cfi=(235)
cfn=(4164)
calls=3 110 
* 36
+6 15
cfn=(4736)
calls=3 +11 
* 383
+3 12
cob=(9)
cfi=(154)
cfn=(4744)
calls=3 1263 
* 282
* 3
+1 6

fn=(4328)
452 9
+9 7
cfn=(4330) plpgsql_estate_setup
calls=1 3832 
* 4696
+2 2
+5 2
+1 2
+1 3
+1 3
+5 2
+1 5
cfn=(4340)
calls=1 1215 
* 413
+5 2
+1 6
+87 2
+5 4
cfn=(4344)
calls=1 8044 
* 67
+5 5
+6 1
+1 3
+1 6
cfn=(4348) exec_stmt
calls=1 1894 
* 363685142
* 1
+1 2
+12 1
+1 2
+2 3
+2 3
+25 4
+8 3
+65 14
cfn=(4802) exec_cast_value
calls=1 7550 
* 18
* 1
+14 10
+23 2
+5 5
+4 3
cfn=(5550) plpgsql_destroy_econtext
calls=1 8112 
* 631
+1 3
cfn=(4804) exec_eval_cleanup
calls=1 3974 
* 16
+6 3
+5 1
+1 4

fn=(4346)
8193 5020
+14 7028
+25 2008
+10 1506
+1 1506
+1 1506
+7 1004
+1 1004

fn=(4802)
7550 27
+4 18
+29 3
+1 6

fn=(4808) exec_stmt_dynexecute
4268 3500
+7 500
+1 1500
cfn=(4810)
calls=500 1449 
* 6475
* 500
+6 4500
cfn=(4358) exec_eval_expr
calls=500 5705 
* 4935604
* 500
+1 1500
+6 3000
cfn=(5140)
calls=500 7518 
* 465000
* 500
+3 2500
cob=(9)
cfi=(13)
cfn=(930)
calls=500 1149 
* 101500
* 500
* 500
+2 1500
cfn=(4804)
calls=500 3974 
* 108628
+5 2000
+9 4000
cob=(9)
cfi=(163)
cfn=(5152)
calls=500 436 
* 357663797
* 500
* 500
+2 6000
+19 500
+37 2000
+3 2000
+72 2000
cob=(9)
cfi=(163)
cfn=(5524)
calls=500 1102 
* 5000
* 500
+1 1500
cob=(9)
cfi=(13)
cfn=(3734)
calls=500 137 
* 97500
* 500
+2 500
+1 2500

fn=(4348)
1894 5
+2 1
+2 3
+1 3
+3 5
+3 4
+2 12
+3 5
cfn=(4350) exec_stmt_block
calls=1 1534 
* 363685091
* 1
+1 1
2027 5
+3 3
+2 1
+1 2

fn=(4349)
1894 2510
+2 502
+2 1506
+1 1506
+3 2510
+3 2008
+2 6024
+39 5
cfn=(4356) exec_stmt_fori
calls=1 2588 
* 363684849
* 1
+1 1
+19 5
cfn=(5548)
calls=1 3085 
* 44
* 1
+1 1
+23 2500
cfn=(4808)
calls=500 4268 
* 363429504
* 500
+1 500
+36 2510
+3 1506
+2 502
+1 1004

fn=(4350)
1534 5
+1 1
+6 3
+2 6
+85 4
1816 2
+2 6
cfn=(4352)
calls=1 +42 
* 363685050
* 1
+3 2
+7 7
+5 2
+17 2

fn=(4804)
3974 2012
+2 2012
+2 1006
+6 2012
+1 2510
cob=(9)
cfi=(13)
cfn=(3734)
calls=502 137 
* 98018
* 502
+1 1006

fn=(4330)
3832 7
+4 3
+2 3
+1 2
+1 2
+2 2
+1 2
+1 2
+2 4
+1 4
+1 4
+2 4
+1 2
+2 2
+1 2
+2 2
+1 2
+1 2
+7 2
+1 2
+2 3
+2 4
+1 4
+1 2
+2 4
+4 2
cob=(9)
cfi=(13)
cfn=(940)
calls=1 925 
* 123
* 1
-1 2
+2 4
+1 4
+1 4
+1 3
+1 4
+1 3
+1 5
+3 2
+2 3
+2 5
cob=(3)
cfi=(3)
cfn=(828)
calls=1 0 
* 22
* 1
+1 1
+1 1
+1 3
+1 6
cob=(9)
cfi=(31)
cfn=(794)
calls=1 317 
* 3167
* 1
* 2
+4 5
+29 2
+1 4
+2 2
+1 2
+1 2
+2 2
+1 2
+2 2
+5 3
cfn=(4332) plpgsql_create_econtext
calls=1 8060 
* 1222
+8 5
+8 2

fn=(4332)
8060 4
+11 4
+16 4
cob=(9)
cfi=(240)
cfn=(4336)
calls=1 242 
* 1055
* 1
* 2
+7 2
-1 3
cob=(9)
cfi=(13)
cfn=(798)
calls=1 772 
* 122
* 1
* 1
+4 4
+1 1
cob=(9)
cfi=(26)
cfn=(736)
calls=1 625 
* 8
* 1
* 2
+2 3
+1 2
+1 2

fn=(4356)
2588 6
+9 1
+1 1
+2 10
+5 9
cfn=(4358)
calls=1 5705 
* 119078
* 1
+5 2
-3 1
+2 2
-2 9
cfn=(4802)
calls=1 7550 
* 18
* 1
+4 3
+4 2
+1 3
cfn=(4804)
calls=1 3974 
* 217
+5 9
cfn=(4358)
calls=1 5705 
* 48122
* 1
+5 2
-3 1
+2 2
-2 9
cfn=(4802)
calls=1 7550 
* 18
* 1
+4 3
+4 2
+1 3
cfn=(4804)
calls=1 3974 
* 217
+5 4
+20 1
+10 2004
+7 1503
+1 1
+3 500
+5 4000
cfn=(4346)
calls=500 8193 
* 20500
+5 3000
cfn=(4353)
calls=500 1860 
* 363476504
* 500
+2 3000
+6 2000
+8 2000
+2 1000
+2 500
+8 5
cfn=(4344)
calls=1 8044 
* 68
+2 1
+1 4

fn=(4358)
5705 4518
+1 502
+7 2008
+1 18
cfn=(4360)
calls=3 3997 
* 1004751
+6 5020
cfn=(4748)
calls=502 6026 
* 4081971
* 1004
+2 1004
+53 2008

fn=(5108)
6429 2500
+3 2000
+4 1500
+1 1500
+4 4000
+4 2500
+1 2500
+4 1000

fn=(5550)
8112 4
+6 3
+1 3
cob=(9)
cfi=(13)
cfn=(952)
calls=1 1032 
* 85
* 1
+1 2
+2 5
cob=(9)
cfi=(240)
cfn=(5508)
calls=1 373 
* 523
* 1
+1 2
+1 2

fn=(5606)
8134 10
+7 6
+2 1
+2 3
+2 2
+2 2
+5 4

fl=(239)
fn=(4558)
90 3
+1 5
+1 2
-2 27
+1 45
+1 18

fn=(4354)
78 3
+1 5
+1 2
-2 1539
+1 2565
+1 1026
-2 9
+1 13
+1 6

fn=(4316)
84 3
+1 5
+1 2

totals: 400247405
#64Mithun Cy
mithun.cy@enterprisedb.com
In reply to: John Naylor (#60)
1 attachment(s)
Re: WIP: Avoid creation of the free space map for small tables

On Sun, Dec 30, 2018 at 3:49 AM John Naylor <jcnaylor@gmail.com> wrote:

On 12/29/18, Mithun Cy <mithun.cy@enterprisedb.com> wrote:
That's curious, because once the table exceeds the threshold, it would
be allowed to update the FSM, and in the process write 3 pages that it
didn't have to in the 4 page test. The master branch has the FSM
already, so I would expect the 8 page case to regress more.

I tested with configuration HEAP_FSM_CREATION_THRESHOLD = 4 and just
tried to insert till 8 blocks to see if regression is carried on with
further inserts.

What I can do later is provide a supplementary patch to go on top of
mine that only checks the last block. If that improves performance,
I'll alter my patch to only check every other page.

Running callgrind for same test shows below stats
Before patch
==========
Number of calls function_name
2000 heap_multi_insert
2000 RelationGetBufferForTuple
3500 ReadBufferBI

After Patch
=========
Number of calls function_name
2000 heap_multi_insert
2000 RelationGetBufferForTuple
5000 ReadBufferBI

I guess Increase in ReadBufferBI() calls might be the reason which is
causing regression. Sorry I have not investigated it. I will check
same with your next patch!

--
Thanks and Regards
Mithun Chicklore Yogendra
EnterpriseDB: http://www.enterprisedb.com

Attachments:

callgrind_report.zipapplication/zip; name=callgrind_report.zipDownload
PK�"N callgrind.out.115483_after_patchUXt�.\��,\�����G�&|�����#�R����mFE�jh��������"#�b���z����{�L���SV�L�K�r�����M���q���O����8�������j�����v������V�o��ny�P�F3Y����o�������?L��������n�?B7��}X�a�N���?L������c��?�e�����c�����r1���.>M����+�RV��/�<������|==���r3?���L��������r�O����1���~rxZ���/���u^�<������������j��[��;~�+r��U���v������������?��7�����7�Y�&
�M�����#.t�L����wx���{���s��S!������{P��,��,�����`{��}^����G�V�o���q���q��,��M�8B��&���M~���_q��zw��O8��j{����k��	�������|X�7�_�E���>w������#��<y Dx@yzB%��X��-v1�+��#�|3~�Y�+�i-k�T�i�/~���L��J��~wl_O�>Z����}�< ���u�d��6��^�S!?������s�^$�/t��_�t:�k%��G�0�LFv\i�Z��b��7O�����qv�?�{x5g�������Da��|�{�7����_��U�!��%>W_��|(���qx��R�Yw�?;Mg�x8b�}?[f������_e���������_���,��|������l]�TsC���o���Q��Kl;�����a�/��E~��r��<b�1��E9}���:��<�'xz�,��HW�����j�X�����f���1�|���o���a�[�Oz���F$��r��%x��I�������W�h9}����2�Z#-��F7PV��
B��f	�g9_-���2�X��pY|�4v8a;���r~�7���|���-���,�����Q�������e�xu#7���D~U^]`���,������p?�&�/tt�-S��p1�MeH�C�a>�>{?�C������K��b�S��CxE>��j	2]�����B�,/V��zv8��H�
���~���P�������{�5v�����|���3���C/9�>�cXX�1S>-��������a�9"��C��]8�f���W@�f���������tC�M��I~|����(���SY[f�ydb��t�/��E�����X����'�&cE�~����+Vj��T�D�9&�����r2�|^��$O�s���0{X���@��/�K�%��\�VVrI�KZI��'��h����
�^��,`o�5�{�ei<u�[Lp7�P0y��8�H�"�;�n��.\�Dr���e��>�)�I�����s��pD���g=,H��c��y�|�'-��`��P���~���_/>�g�Co�p�x���^��x�,L=�z��f�e.�N�5�q(��{89�����f���lO���t/���9�1{�K�rI���(��O�y��Kke.9�U���q����z7���y�1��p);�;����CF�R?���|��g���/�u���q��Z���@��g`���
)�P����w
F6��@�4���������Et���D�S&�����zy���Y|y����|7{8�wJ}Xn��b<A��b�&?=���@�zs�/r���M���o�[A�y
��>�}�Xg3�|m3���������e&�n��N��2i:y���N^�|��G�^I�_M]����mF�$It��~	�y�\-7��d��ga�Q��3�-��U��[��O���Y�z����g����|��\�<�Z�G�Fu��z�	������:���Y�e���#5����7����R�o7�s����`���Wh ���U���'-V�_y`92���F
VF���|�����������_�]�-��3��k[X�4Y��n���p��Q�.�Q��y��W-��d�,�����9��zx�3�]�J7w�6��1����}N���# ?���r��5[l������
5�S���x���OG��b>�K>���Bw^!�i�j�����E?s7p�d'r�'p�����pi#^������M;�O�c%D��cXi��Kt����5���y�\y��H���q���:<��:��HO�1�$yJ�9X���jp� �m���po:�Z%�L1-����[<��!���)���~���q��=�J)����;������P/9�\�|��u�;c��/'�P8�)l~��:��GWCk�
�J�X%�?������$�������.L])��z����������~�0������e�?��\���F��_�j<�|�����y�{�������Y|:�J{zfF�y���a��j5�/�%$(�,�-�~vl��<��,��5�En�p�L�/�����/~�u"}�P�;�'�^�5�_����P�����yoN�2���b�R��
o,��!A��b��}��FV��l/o�E�~��6�Y�M�N��n��H��to�@
U��r"����qJ��A9F�U���,o?��<�Yp�IfE��m�������
J
�#����
��24��^"���O���
��7Y���7Yyd�:3������������{>���CL�D<h�%��?>=<�����S��H���W����?	#�����r�[�?������qT��W^�;��}���������������316���)�f����s?���e` Rx��h��4S-{��)uT��dh"l^��j��|{r��	<��Z����'�c�r:�(T�m����B�"m.����������O�RV����J��h�ro]�n���c$��4x9p._����^4��
�K|�����Z��7gjD��u���79Ui/Z���I�Y��oV��C�_)����c���vs��������OY������ �����CCO^Zs��\�*W�4������!��O����u�a[�J�����=9sl����Dy7���9�_|"eW�D���Y�k+Q�y�>���1��C��4��\�&���[�g�[������g�[��3P|C7�T�4Q�+M�p�Pr-)H74��Y�T�7S��G�M=���3u��D+di����y{L�����p���J��+�K�Gt	����2��_��W���@/�O�����M�^�Gb��UP��B�H,������ =��&�u��:nw��#�u@Qm�������e�G��I�z�����9����[�?|��,VO������?���jy8~��=\`��f���=##�	D�^a~����tF3�+w@��L)�tw�g:���d,�$��9��^;���8��,����~���yw\nD�1��w����{�"�@�;,�:�������v��n�����������?���K#�����A��:p������tM���\n���o��|]������y�>���
�E�u�c�2I2�`�6�:�����,o���um��,Z����^��2�F�BU��S����2��"����� W�N�s�o��������4`��GIl�u���X��*������o��� '�NM�;��rF����`6������h"B�h7���q�:�Y�P�^|>V9�������KI�y��}�?��������X����7���`�=��-����(KoQ[��G����I�p�H�%��b���L�A�<E|��"r6�
0�Z���������O��K�0�}���g%PD���+N�� /A'�kKHbkw�)p;��5�}i�����7��[�tQ�
�\���_x�������P�+�o�g�L������b�� ��`�,����t��4_\�X��N�t���[�2�B�����������
�#���$��tm�N1ZC�@0�H��H��0�iW8ap)��H���Ivt��g��������O�G9M$?�m�L1������>Gv���hZ��2$O6�#F��
(�F++��-�L��:�Q�e�T��J ���
�1\�
�����_�����K�^@{u��&#��soa�-~���+���gQY����#���*�8��\��ep��[�6#���h7"/w� 'e�g���{R�D?���.��*=u{f�S�{���i��PJ�W�R���n�{:����/R�����t�`A��G�<��@���������%�?!8��J�1k'�4���&N
3�d��D����n��Q^%��18
�{Y�;�;<���=�<
�"f�frg��|�|�A���	�f����<l���C��� ���������
�����8��=��!|����vy����@�����������I}��&^�8�6V,,���������j7����b�X&6���(0����?.7�����3
�:q�2q�]�+���oV�=�J>�Y��;M���Y>����^p �z��=�����D��N����+��/S��W�e�"�"�pMfIO���
P�����O����{���O�wD[���E�3S9}�{S/�����1���+���wvIK~i�&o���L��m~\�����;���L���B���<M��i���w�S���ckvL'q��.����UEp���9/6�������-�
�@�
i��i���L��]�c���\��(��m*��h5C"��Lh��K�
���r9����o�u�0	� �'���e��������Fbyb9(�t^o?��6�h���Z��tK�.xQ#oas�K��~�h�B
d?�������X�L�,<`%�����)�'��m2�����~~|Z
�<������D����"H���;Zs��]EzTD_��*�b|4�4�2z%B������RF�F�u�_N3�6����vP=�sS�cF���*N���f<U��*������9O6�4�g����?��\�N�Iy���2[����� �0���
7�9��q=?/�:tP����
�20V��}���e;����UM���H�b j�p=@%�7Ah���������
����Z�5D��GC`td�,�4�����q��y�7h��k`�j���2�L����h���/?B�O��������w�Y�^}�c�hZ��V��#_�^jV���1�2��E�_����*�Y�2�*��������e;������-�@4��6*�9���B	x���SLfJ���%� p/[�����W��5G��2��Fx�V����|�������/���FF��7���~v��������&\��4�nP/F���(��$����d�!����$L�������/Nn��M�.��O�h���6�0�����lY6Bc@�kM��`?j?����AtS�
�q���s�Cn��^uT�7?n���|�~�(�H����k
�}2�k �*�f<��"}�_"�tm%Yz�*yB�~:���H��HE)b	;�i����a��Cx_������$:��X��B������q�������Ta�e�,"@�����#�@P�k�M��)0�+�����l��&3/�v�]z��a@9�u��m�4NI������7,q#p�V[H� <����9K��?n�[ �D���;���x����*�6���Sa$�Y���E����8��{����R�C���P�"}������5�C�[N1���?n��V������s���p(p1P��[ ��t	��`H %b%[J�wu��':��wSL�MR���1�~���I���?�q�a�6���3�#8����*��:�kH�yh'i�f�f.�;�0)�,�A��G�0��b���V����q^q��������������_A�m���bN�5l@]w7�1�P^�ll���*��E�|���2��Ws����.d���&wQ�g<�_"���O���t� �L/w�;�����NV8����v��s��v��d�g9Lf����d�
�1�f����)���7U
e�
it�S><�������1��{Nf��h.d�����,��������y��"j�<��t��������
�#%�������t��3����d� <����'?�f32�pp�s�L�>U��'i����GT
q�!P/�
%�#w����=������~�}�M!3M�d�V��g(����O�B��|�$l"�������C�W}Q���m�6���??�e������\n��n+���o,��9���w��<�����yKy
��vl\4�W�������HYlA��a���&:em������ �k�+P��XzP�J���o1;A�QX�q�=����%�����t�-p�!J4Kr�E9v�Z�Da��#r�3��/Z�>���)x	���A���a&����	\���a�e�(�->��O�������@��W�I�Q����z��������<�k��0"tI,DJ�6�����D^B=m��in�����ru�D�D&p��#2��f���C�����q z��I����$���W�*��;Gu���_&.jM�\��{���|s�]��l2��)�df$���K��ih�1��Xm] !v7x���u����c���O�u�.�_m���L�:��M��'(O��u���}&C����y����Y��R����.'r�6%���jm���]�W��l���DQ��GoM �O�GD��y_�9���3Z��2_|�Dr��R<M��������P�@��B�������� �&k����|}�:���Q�W�����G��Sj�&g�4��z�8�60(Sd
�is�c��7��Ov��� ���]�0��e2m���A\�F���w������#<%1�~����gx��l�C�j��������������XZ�[Y����������>�F����~������!����y|Z�������I��L��<,����+Y�K�s~�0�m�y��pr�AQ����Cz�(�A��4o�j�4� �A���33y��k[�B��
~��>~�r������~�?�g��(b��8:��#Jk�lc��=d�)��i��f���W\����EF@I������P���r:�"���A����N��W��UU=�r��D���B���y
�v�J���YfC����y�B�&�
#�q$��@�������aS!i�%�Y`�8��@�Z��dI��b?e>�hi�	gE�c5n���<?�1�i�Q��w�g�������A�"{X��9^�sP�����h�fu�r��b���S��j����	�oyb,d�
_x���O^����p����+'j�~�]��/'�_��w��}v��{��]D��&O>]�	=D�`)�s���{@���#@�e*��i�"�������]S�0�����(��8�u*cy4R����u
������Jj��X�+c���,�7a;e���4�q ���j(����
�����P|������H?\�VM��h�����C��Fsw9�v�I~��i��u�3�����L$J�E	��e�q��"�t��V>9���2�E�^{��*�p�l2�./�:Y�}4bL�N�>�����@�<\�ON�M���/Q�5�[@��~�ZR$��<H��f5�m>���=LJ��~��~�� G5j��tt������w��;����Gq�*������������Oc��yk��S�-���3""��HKv��`f�Z>����v��#�J���9�����@����i@(*�j���<���6�eE��l��������|X�1��e��#�H�L=�����, D�uyQQ-���m7 ����j��	���B5&
����m�6C���^9P��_O��><�	������?%)����vD'�m�(R����p
h]qQe��#����0�u#����H�A�;K������u�����gY'��p&���o�.��'���uz&�����1������wZghN7�
�n���v��(�e��6�Ri
t�l����+5�K�������]�����0e������iIOP�@�V~�Z���}�/��ey�����0�g
���M���������������*^�>��6�V��W�ry-���������]��,���9r9/~Ef�����O����/�z7h����;�����L1�XpDr��z;������������4����G$?_��C�����������I57�Q.�)I��6������	�W�L�
RoP=��iPA�����|����������i�X� ��>��>��X��%^�l���'�;0�����������8@��K�����������~�E�_�������F}����<�[��w�'?K��r�Z�$�G�e/�6�a���gH�-��"���m,���3��	���SA�D�y���M��S���EL�7��ue�����'����A���F�f���0�}u�J����a~O�r���E��a�I��������p\Z������	3�%��q\JA�)� ���W���LR�!}�EZk5:�e��|;p*h
�U�s��44�W�������[�^����/����T	+2}4���bW�??U��5.��T�=#t���oR���L�,��'F��(z6A��>��A
�tDC[�<����UsG~7�P��-��g�_��+���M<r���_@���1j�;��u@e�+,�oHl&�&�-0��6{Aw4z�}J�!���i���Z��)���B@tP�)��������_�:�F�.
.���5��� =����mFvP2gyv�|CgnR���.12Ub�X	�[C�JK��H[���`	@ _����O������S�Y���j��z�&�u(?(�����k�?b���d�2n���7�
��*�[��/�u����N��7y]���$N
Wp&A��j\�!�*dW��{���Y����n ����&�������/���kD��Y`_h�^�T�F����2����a��+:hi<6�J��|6h��V����\,l@��>�������Y1M9�>r�o��tw��GOU��d������a��W�VV��rx-j�p!"(��U�
��t=�k�*�`�&�,�<� �I�������J3"d`�h�����/�V����h�y%�iE7���Nd��eC;p�S�iW:N��9�m�W�:����|���hf����7�>�N�����$�.��'Wy�_5FC!C�529�����n������ ��Z��p~����V�r���j��\�������66����<�|-�N�w����\���Rds��]�l��T9��^T��B:6�C�!LW���6$�i����q������$��2t]��r_-���EI����%y��Pcb����\�l~X,������"�^���w���������k(R@I�#���d�����I��e?�������fd������������JY?P���l�������-���Rq��G[6e �ns��_�w����P���@�K�m95�����A"kK��
X$����w�Ws�0g�I]�&R|EA4��~;�/U��	S�,��
["�\cj �X7x��j��������2D����]nd��V����� �5�fd�4l_'��Zx��c�X������z�����U�"�6
,Hq��f�=S��P����vl"Q�Q��N�P�{��$R�C��0%6��],v�1��\����=O��3�jt�3���)�0��-�lT�6{��VO�D�\����v�O����S�^cQNN,�����is?�L�6d47L7���4�LNC�HO��,e�;{]�t��}��+��D���F�Z_����c�����)����64j%���#y��Q��O�X7��HYD������ g����R �`��g5VM!�MdL�p��c��������
��/���n�jZ+ Z�(�J���w!`+FUo7��=F#o�/!����?(���|PM(\�^�`s�tO���}Z����?7��P���P���	�������3�q��^�o�{.����Z�Z�	��8$_�5����a;�}v���`v��E�T��c�./�[E����:b����`�8���M��\Y�I����Y)��R��J}\�^e�����,�4~Xn�g�/3��r	r�Y��jW��L8�f��X��Q��Z7~��)6��:�%?l���a3.c�XK!�t��y��%OR�D,a�9��6��*�����g$x���������x���]�4�y]Y�k���M�!��������mw��2�������k�C��������11�i�p�F�6M����c����gV�HFKH������,����>��A��6Q���������^��8�q@�SX�9�c�!���(�a���\��/�����&��@��Z������f��N���Ym�!�5��:���"��|��Vf�li`j�zM��]qr�7G��,?A��Pf�"!�|Bu~�c�\
�C2��h�`��RP�KkE8@�����X��t�r�E~��=6z(+H/<��@3�A(G-	���0lCx��eb[��A�C�J�:��>�:�����By����&�t��	jj!b����bm���W���2R�Y[�>��32OORS�5V$=��ZP���R�����D����=#%`�����X���`�xP�)L��SM�a��������(��>�(�����\��F�D�k+���S]�amo��LJ�KvK]�Z��2�A�B�C��)/��DN%A�*���d�-�EN"�
�7�3��i1���Yt4P��������l���)m���G������#�Rh8���BHt����������� R�fB9����ku�SS���
�n���o������U$iF�Z���n7�/�rX2�[F/=t�z������vZO�E��+hQ���aC���%X��H�l�}D�p�������2���c�7����Q�J�����>�Qj>�bR��Nw0�,,�������J�� 
y�S54���*s{lV�F��u��
9��E��!��H@�@��j���@�#�i�n	W���Kh�������R����)bW�
a��tN����i���s���t	^}9x����04Ek-�9&b����O*V�B�iBF
�����r����ev�
��RPL�q�Z+W�������WY':���)&w�9�AO��=��������fe-���������md�[n��]�]|UD���Y��TR��x!$�b�Q&���9A�:��A�2-��h�=�W{�t8n�a��L�'�8W3Y��EA�,��L�u!�����
E���oN~H�����<�q������P_��z�y� ��~z�2�E���0�2:K��!��,i�+
����R@R�VZ�&.%H�)Av'�p��uA��\�dT��$1|�U�`�(m!�d�J~\�j]�93K�Y�2P���
�C=
�eX�!$H��xkWj�8#]@�u�4B�����q<�E���0462e��rQ��t���ANwG��DI��z8�����V���
��|���<�a��fO��3Wl�u^,o��']Y38x�wR+��z�P�	�;����@�C
9g�VkU�c���&�����3VB=�J����M�����,�1]������pWtA*�d���$)�.���I+$�"�$FA*��>�R����Z�b|����GLp]�_�38X6�:I-���k�d:�c�&��Kq����7^77C����D�p�Y��m�����o�U�3dy�t��|#e��/::Z���>:b�P/����+����*��^��Q�������������Y��=,�������O2yT���oV���7r	YQc����Q�(k�������Y��b��|�H�:�&(a���:���p8��� L�����)_����bx&\=tHb����U=�:6N�l{��J|Z��`-8-�FP/�k���O��UW4�5�N��(�w������/��,�V�#+��t��c�c-C_��MR"��o T\�"�^�;���R+���
Hv����q}Y�R!�Vc��%�����M����pEX�N��	�yP���N$=�uvQ�_U!�u��d�n)O_H���U�����gl�Tf��v��!���)�������4
x*2J:3J����0�s��T�Q�yZ�V�������:�j��R���bm���r/i9��P��1a�]�������I��RY(�NA��s-K�w����wXL�em$�RJ�9�=�x��.��e��,�t��:
=�:8���JT����s����*���/1�YQ��|��(�]&�!$����#?NIBG��u����u�cH��D*����j-�?&k�,���<�����e��������a�c�[/����+�����������:2�Z�L�9�2�TWdu��78t������}xzx����m��]��(����w�h��f��$�F��q�{����p{I�\�fw��]P��~w�t�����hu����wA��(����#��
���-�p�����N��z���c]���/E���1��z�A�iW�]�$�9��.��t'������Y�P��iNh���tWb��F�SK���A�l���x���el��_������Z���V>������o�a7&������=}�5���_nD�%[�4���~��$Z�?�2	�Y�s����)��oN�KS$��4��'��k��"���!z9B�-�!��&��"}���!��U�h�BV�F$�L�Q��rZ[�Q�,7"�A���k�G�{]��:M��@%:����r�F��EH���jo������|sx�Fx0,��)�����*#+rE<Z�0�(\��iC���g�������WB������u���TPh��I���V���L�7K��R�m	�D���pAX{G�@xL��M�a,�����)���($���:@���g��`��p�����"�������j�c%��:a�����~l/�������Mf�:
.����$#�4�����G��}�
`�[i.��E���W>��t*G�4�S�q��=��I�wA���MPqe��`.�IGT�����9�O�u��v���Bd,	;��S���}�����X�.2[��j3_��f�����R��M	��Es��{���54���5aO�`����������5C������!�1���;�R�d�J1�2��*A��Y�4�~�:�3�Q*�4���Z6���T7�!��C����-h����'i��L>��J�aS�������kR��D�@�
!mX�L�� �g����S.����'4(mLn�S�����|7�,"s��
�&��c����V������v�8�+r��J;���-�Kr�332qaA���7��N�\��,oQ'S:���>�o2����R����{�xQ��#�^8������t><j��W����MY����j�@N���v7_4�0N�����g�Lj�S^�������$����J���g�IZ_6���:_���7����f���	6�lh'���F��������|qH����d�L]���^�5���������$U2�pC������o���{���G��Vs�J����z�~�x�#��5�<xz0�������wI��Ymg���i�;�f����qpJ�������7@l�ZAi��P�<�MK��[[�vN���`u;�
������T��z�o)w[�%�@�zV����W�tVF���
�Sq�n�����)Y�4�����y���2��N�v'����?6��������U��<�7�,/�E�Iuy�9���Y�����V�u�A+>������A+]\��y�Y�(����x������Y>
H������X��'�$�S&�M��^�U�(�z�%�S���������q��L���3���{���a�X�����rA��R�s��>K������t�$[�P����a��+1)������AeR�7���������M<�Y����Z�O�E�����T|E��$�J5�������`!v���d��\������<%��O�!�x*_{�)���8�`��*y0���dx����T�j����8�������d�hnL:=j�����Oe:]f�����|���pt?�#�.��{JdT<��+�k�����*^r��r#�/5<���fW�����sV�:pw��XPq �tq(d�0�8�o���~���ku���RCq�@�''��uEW���7v�IJ���S��v?��h�'�k�?i��������Sk'�)����G�=7g�k|)?�p���#a�>%������b��n�nC{	���8b��[ys9���z��d�nDCR,��������"�FG�������c� �?c��-RE�/VO
5:�]J��8���#,�U�S������OP�B�����Fk�w�Xa�R�X�-*�l���m���C�QL���3�8��ZI� ���7��Mh}|6�OlE�(*�	$;�\k�=DH%'D+�Fx
E�n� \iP6}i�)=Fq�
�&`�v�v�}��������@����+��A��:
��#k>#�@�=������S����Q^r��rp������j������1�E-m�1������L�U������^3e��BG����0x]+�(km��C��B�5�`�@#H�d���A$.Y�)
R�1*!2fU�l��*XVLV�O}A��(��v�I#[P��(���s������S��zw(�C�uA>����i����{p�,���_w�~h�p�_A:������B�U�+������s��B�)��z�X�JW�Y@�6_���Z�&
��tm=�����^��V��h������P�������}}����/��T�����5��D�S���������i�R��4�����$�K�=��>����+rc�Vy���.�������\� ��M��l�%��5*���%�ACFE}RY�h�uzNq����wb�3"E
t��}�`�jk��U���c����Zlb&he��>�O�f��8g��O1T������.>��"���yN���G�i��Sy���X���������&����Y��b7jXW�����TL$����CK	|:��~<�������@@U��m����O}�4�@�o�/��
�
��.����;U�T�x��t�3mKS��N�^)�!r�v��������"�x�M����d�>�
����0Y��E1�G��(�hK4��"����{+V�D��:��J$f�n��UYgq!�6����C� @���LRw�r�]�[-���5I���������]@����vO$�� �K��[���8��@��n`��2��u�������y�0��101�d%�2�K'�������C���	s���I]\Il]~��+�w��h��<^����(��o�L%������v�����~�Y��.k�5���54����V�*
|R��<���q�_�8��n����l��'��f�����z*a6m�e[��j�s�#ZGAU
��,D�F�h���6>������N��r����i����:���M�v����t�U��8���4����U���7���x:�&V�JB�gce_f�n82��+icC0�96M��k�b�{�{<������3�ZFr�TJc��	n�O��E���J��LV8R����U��59g#����M�nv%"�WNs.B�"��>�5���C�%�+����I�t]����x�hx���(2$��i��@�hE��M�>�
�����2"�$%/�a��Z��)R�C�fCP�)��,�yB8f�����0��7�~����IV�b<�w��gP�����P��8��J|������'���]U[�\'dVUTBA7��0k���1�(t�F(�q
���B�-�����
Z�Nla��&(��&��`��L~�`^T��=;��)�8�w��
�6���U��mIgm�M�C>VcP�_7?�����vu��|�������I��pJ�^������K���!u�t,h��I��/�~�
'z r�!)1�<�'��y���������������5�>FS��F�X��@���4��^�$Z��V3U�pz�X�T�v3}(��`�)��s�	a�a����A1N�4���������b�_�g���)�?~���"f�8���yt&�1G4��e�Q(�����=p�N�?����\�����#��z�w��k��Z�P!�����C��MLBqg���Y!�-��R�m��a��_�P�5�&��:>SW�h���X�4�(�����y�)r�0r3D4LQ��"��.����|	`E���S������9������A�)�&U��a(�~5��f����kR�/&�A5wzw�"�H���t=a���$	����=
)��G��0J_�\��&�S0�UJ�da���]z
J.�(F��X�:��"]G�c�Kd����
���$G�o��
T�$�b�&�c{�a�-G �<����Q�R��!��%b`<�`����9����(��q������9��N��Q������yke���Cc�A�J��k���
1@bH��� �	��j��Z��&`�����hF5���U�0���Q������� Ca�r�4�U3y����H�c��	&���9�}ub.�^NEP:���@��LYx<w~���Q�����`h�"�%�������Hz��TZ�b���n�E��v��������kY�,�h��?@J/�i��95����2n���������=�	��������uM6|^7���S�l�&�|�_\���-��/��5�sn3�(3���>c���"P@z����@�@�v��(8��Og�	�;�T��B�<G�0�3Z��m]�1���9�����6����QQO���'|��kE�L�^.�M�8��v���������	D�n��%�1Y�y�S���22���
xqb����/M�)p���B0�$�OXL����I�#��5�r�,x��>	��6���Jj�fc�>P�jgH�qdeR�����D5.���tC`��A����C�AB��[�������~�G|��� ���P����si6�r9X<��Q���G����kf|�;��;U���O�������~%=������q���,.�L���J��g�3P����e��(��XR%��Yb�5�h�N[�j-������R#������3x��A�����LQ�l���X�]�+�yV�c9'0��������N�D��P����.G1'��Ac�����$�����:l(�6���9����g'��@S������y�_��,��1���Ri��?�����S)I�wu��Q�8:1��������QNL]��w�xGW���
��r��lPM�=-�����PB'���a���Z?�3]��/�8���1��[�^�������2P�"�PN|��� p�+�B�)���?�Jz���>-��2�u���&�$O���Y�����xXf,a
�����*`��|]f`��1�����,�=��.xV	����e�������iV��aB�?m�����l����O��l��H2�#G��:�����f��c����|X��9Lb�ct�x���G�	]���]/�8��L��z����!k'��g��_��eZ�-@qgu����X`����%x�<Am)�������I��fg]�����m�P��X���WlW��+�_M�-�h�s��+�S��:���v8c$��cL^'��K=�,VB��������_�r7u
�;����]R���w����=����������'[`7s�D��c�P9�g4	�Et�|�y�rZ���Q�RD�������[0{���_��}��-���0m	
��05%O*E���>i���<���N�I��+�&+�Q;H�����(��.BNw����h����e�J)�o%�����)��/?���J8D���j{�a��U����P��>`z�j�V>�C��L�&*���6��������
��Y+�C���ufb`��N�>��q_wI�k�%�
%qR_)����D���s����F�(�����TE[����1�v|y��+l�e��B^�E���i���f0��b9&���qQ�~@�#�f�)���%�Kn[NSV�Yp��J�m���`���	7<xt^�^BX�����N��&��S�@� =�lq�"U�v�O��%��}�3��%r��a�|�I�;x�iG�Dv+p�a�j`�^�D�TW���>�_~����
����b����G����N�.t��,1�����w�?HC�������>N:�����6��I'��r'���sW�g��>�&��m4+������	����"���y������_o������Sb��<��p�~(��=3���C�����g>����t2�`U7)�]q���D����[j�I��K�T�*�V���������}4��%�Q5�x���OM�xe;�M�z��:�()lm����^r��,��q��G��)���\�4��W�'�}�/�o?|�U��[��f�,�-�*h�2O��z3_���Y�/��&���'�Pd3[����m���
q��� ����g�T�N0�xT�%`�5����N���K�j�A4j�0�9.����������c����{�q����u�_�������3��[����-���1�o�%		�o����<��A����0����j���HY�c�="�����v2��A*��,_$+�rs�#�f��v������������ :`��e��p��p��8�rW����#FA�_�w������������01]udi��.7.���wgq����	|��\�T��1��~0;�31,Y����`[@�l
����BA��{��O� 4�L����_�K0��Q������l��`����]����bvy.yQ@cC�"��K�i���K}-�����b�E�q���^Y����T{E��
�����R�$�,T�$!����}���W�H*r�_
��F�f)j��/P7�N�Z��miv�}�a&h��~Z�`�\����gG(��S�}P�.KH<F��*%A1�������m����5�J�+:%:�<^��B�:yRgVl����,o+��")�x+P�g�m�`��}��i�O	/�SK����<���z�}[��%��mJn
i���V���U�Z_y$��g��[�y�n0��������$�	��nH�k#|6�_��� G���bL��p��s��r��Sr���R
s,~4jTK�Jm��J�$�s�����S�<�i3����t�	K�(Z��kC9��a�����)�}��r'��CS����x�����gF��\����Rw<�A���uq�#���9��.�BD������CS����"|T=�-^�i��f��z�4���*��	���h�1O���_]�)&�A���~�x�8I�u��z��dJN�%
9�S~�������i%���������}
���j����Ie�T�2���� M�#�����N0��8�����q^�*Qw*��D��R��@<K�b�`W(�����]	��z]"���J�jF)�z��o��O��*���!�a9��q�es{~����������O��4k�+5��/�?���RP��J2�yo�A������}�-����obD��6s�S�d�����~Nu���>=~��)����FI����!r�F��s�@.���\����otG�0�lH��#����������c���4�>kL�6������������K���x�v����DS��Vc/��0���)X
��(Xz����p?��*�����M)Eu�.���I��x�`|�I-�K��]�i���1*�$A :���p��kSF��M@YT��qfk���B}������7��w\���r�I�tFLt�t*_���������������i>��qSx�_N��\q�)�C>p'�<�z�&���q�X�T����b�����m&���pq��rh����(����J�����8A�k���@�����~�u�mD5AoV�/����x{neC`�q�5V$s����RA{�.&O<���U(�.�'��
CS�90��r�kE�O��k��/\��V�x/�O��m
�Xv$�S9��0����>3t^�%p�J�$J-i&�M=1Z�����)�'i��a(i��!*���XT��
��>T�=4.c["F	d/m9
h�����O=�n��+�Lf:���!�v��a/�Q���������v&:$��]�d��U��C��C���E�cj����Y;��0
`��c#�+�63?Gf�"�L!���BP�������w
�Bx��Dg:����p�HMa�d�0%���oQ���u�T&�A{����")���]�PM%�	��#������L;9V�\d�S��6���{^�qU`>6���z�o	A�Zp���8��Yo�W�������L���@*���7Rr$Thr�j.��?��.J����6��&Q��DrM aGJ�@GEcM�,]�q��s����_����sm2)��gNc�?Q�q����f���_������VRO�g��
�����]���G��sl�P�*�^4�b��-K���'JC����g���I ������g�(��J-�M�R��#k���������Zd���8(���(�M�B�jd�W�6(��D�f v�d����*V�q$�s�@�(G�||[ ���t��(&��O��pm��L��LM�!�:�E�*��Dl�1�x~�n�c���t��&�����E����u���E����$V�??�z<���q��d`.}U"�����_���)�uJSb1�-�
�Bc�H0yU`� �HVO,�������L)��/��|[�G�y�Py������������@V�����1��/�(L���X�X�����`E���\@M�(xE�xEG��K���hV��o���Q@zm�d��ML.�_7!������_�P^���IQ�_���Wh��oJ`I����jw/F����)/C����&���	9i�)�w��fSH=���1�r�[4&-�0@ZfM ��k��g�4�X��,x)�1��1�EE��2��W��BfT������P��j}ql��-V�T>#��]�=�#2��?O'��%��V�l��4��L-���t_A�����%w��,��%� ��
�e�	���R��.^��}K<��f]$�i+3�0r����\��W4��n���E%��A���d*J��b]���R������Jb��%��R���`�T.��;V.�Fr�E�R�-�u"��BY�;��.�Hd�Ed�,(�_!�6����i}>��/B�Di�����wT@-�M/�fa��n�6�BG��]��7�������\�Z8��Cc�)3��'
�"}���9
�Q6������9����������xkO����XNu�D.5�F��Dvz��|���QR�s �P$�HU�:���/^I��{;(������$�s(~�V\@3��1���	�K�A!S�a�]"���/����k�|%����M6'��=��",���q)
���:����Eh���w�N����0]��D���-���� �8����
2Y���/��Uh:�i�]��yY�'��$Rc�	$pc(�3���p;@���P:�����;�����\� L�h�4y��u�y�'�P��@�c��I�>�4R����
h=*f�yM�B����)�i��0��@{�+�����|���4A�-���0�}�(+$��@�
�)\�.���b/h4xB7[�h�������XHlO���Z��$��/���Q��D��C�)������ER;�91�qt�c����ke9-
�����v�|�XB
�����K�(-��ge���c(���u/�^T��1��0����e6�AN:fE�H�\K"��IC��;�1��"��'�)8�`
�X ��I[�������P���@��d"�:���kJ�Hv�e�@P�^0�2�8,Ja��8��A�4���4���$$O.�f�����dx�%�"�;��RBB2���ws�A���w����o��`Z4b"
��l@�����=�=e,�md7U�	����U
�sB���Q�	���}>����i����2+I�,Pj4?��C� �^PNF(�2�����_h@%V��r/M���.�B�R�s�Z"t����J�����jn�k&e
2�JS_[�TM�jj7��u����<�=�kQ�nH�(��O�#�N���������JT�*�]ym:W�Re6�.f�K�d����t�N���o�����l���be�3jXw�G�����B{�!AYHHT��������
��0j��J�`oY���o_�[N��U5��\{�����/,�A�){C����f������L�-���op��nWO�����$�9��|�#	� ��zvWD����^*c�������-�j����U}p����fP���\��V��RW�U��=j�C�T�/M8e���<�&�Vk�n+����/`���`��e���}��gW�h�y\�S(]h��<���g(@�����cS��j^;N!���rnWK���l���C���jP���(�O%�����9���v�R�����v�6ap�����k��!_�������']=�B����u��2���Y�"+��+�(��$*E���C~��^���sX������m%OD�2r0,��W�3���GEL84%$p�7�*�?��;n�o`����d�����!y�P����@*.9DI8U���A]9���w�a�M [o��aX������
������YN�x�U��/?���%
t�?�r��v�k��G�������2n���.f= M8��U�-�������v�V�[I�o���0kB��1%�����@x������>@���#l_��7�"I��<�������xV�M���Y?�Jt���*t
�F�dSu�|.��`|�z���op�m�����.����"��&����zmC�8���CdC��g��K���f�O��k:Pen`-j��/_v��yM��(��
��p�r��!�x�`�%rS�\�NzfT�K����X�pY'�F��y����y�bZ	r�R`hNAp������U�Nd��3�����6�iJ5kr����P[�p��<)!O��@���m���T��9�e5�H�2(�x������~A����RT6�|=
���|�\[�������@m�uV�����q
,�z,���Y������_J������J�����~��y����GD0C��w��������c�I��$�	�z ��gu|�H�'d�G����G!�H6��H��V8Z�k�>�}��T�6,`c���k��"E�2�eq�U���w��Z\�����k�V��r��-n$�\��BTr�|s�FB���n���h������c��w:�s�,b����I��B�N~BVE��
{�	:�&
&�*%�G�h��M��?�Y%��	�����K���l���o��VO���&"Z�S���u���@
�����b�e�8�"��:�2I�c���$����~��������@���o�y�a�<����&_�t�<(�s�����L
Zs1kx�������#O��$����^J_?���%e�E�v��������$���R�&��2��Hu��(�D������i��\��!v�X�����2�]��h�+��u����0�'3D��'0��e�89�M9����������x��oIgP�����C��'������������hnK`�#s��Wi1X|NO�UW�_�����AW{���K�4;��'�)������]^8��H���o�gI+�Y-�����T�az��v_u������tG8��_\����(��y7�/^	�h���'e�)�
K=����}&�}������:O�7��ZW��z�����y.�	Pa��H�������F���A�}v�_z�(g��B~�&�
����.�B�X?lK��i<,+h������=�Xm�b=|;�������~���a��Y����h����'�e��I?p��kve�����>�K����cL�@���K�Zb�)�����4�V9��m����}k�
���t������r%���%w�
yV[�e_3���������(�@�`���T��Y�t�L ~�#��A�ORQ%�
�?�b�"+g�aB�Z�Ibk�N�v'��X$��ot����O�JW�P���'�o�i0>pt"<sfK��n�����I�	Z����xL�L����/��CO���m�t=���Lb_/�^e�H8���>��#[���|��g-��������m��v%5X�V�N*Bu�:%��#��I��<HG�Q���c�yT�*?�aRs����������������{X�ff)�+A V���l;w
)J�����%����d��_(�������>�[�����w��������C��7��b�FR�����5����|*<Q^K��C6�<�N�a�� K���?e��SI�<��|QI%.��q��u���q��;}��e�n��V7������*�l�x����;KPLW��<�
�)
	�����o�b�}����_�����W�d�1Xp�����W��H����G%eF�yS3���M�2V0�3
�>G4����Q�)��R�Pr��%��,�|]�*�^$U�����:�����:Iht���z��3�<J��������*(:V��H���#:P����d�!;yu&����%�_3��i8~	>�O����j�DLj��lf� �/4Ox�>l�~�G�wFO��LZ��'�z��������	��T��)q�����Y�]= /j����'��U��O����:6:�EG4���������e�R������F�K�IF���Ka�>�:Lc�<#:���R��u���8}�s��<����N�h\ ��h-�NL����7G���L���p����9�vl�	���y���q6P�U��#i�GlWmB��kd�bxmK�4�q�5Y���Yd�f8��GO8�8��%b�hAD��\d�[)����v����0^����w�k�
�4��
1Wz���A
��	,4x"
.�qI.��T�<��p?������e5|Y]70=sY�\Vr�G-�	?8jpXO� moZz#O�Vuv����E��+1��t���3�����mo���
����[]�^e���)��Qv<���C���>����[��qCV��-�g�.l(�C�����|v�������
��L��rc�q|�F�8��/
���
�����-9,gu���4b�PP�
`7�^�����{�{i��P��;�A�{� M�jJ&hL��m� _a���."�[��>��`B�g��Vq����-���n�,?� 1��#T�m�P��kK����A`_���� �g�����$Y{"��uu���~�_]�-/Eq(-��!Y;�J�A%aQ��+��;,��I�E(��8�]����X��9<B�<=����LVu�<���>�A0�3�|P�#p#��@h?`X$�:�=���{��=-jnv�W��b"&��@�(r(WZ"��M	[�n'�AP��K�qp��.�|�7��ha�-z"'5�Q��o�K%�@���q������lt Kv����
(q�����~?�.�'V�jG�r'E�������}����:����N#��\ ���������`~I^t��|�������J�-�P���Z���AR�
A8
����#���,=�[��z����p,�~o��8��n�j}�b�/i0��eB�5��Q�'SpNfa3�F�t	���d
�����5]��
���`'�
Y�v_@q�SJo@1*�d.�'��bP���k�3���������m*��}	H+
h!�����X�C��=f�=,��XxH��'Ry^��xJ�Y��9�&�J������l2����Jh �e�G��K9���R�zf�WO���l����$�����-�����w���G���c�|0�2R�������l��������%�����LY	�1�
j�X���A���W���c�@B��3����vr��h��fI������f��������qRy�5��D&iW�C����;�{�;���4g�
�5�K�3��S~�O�cx�IJb���,-Hmv��B0���;��hG�q����#��RX��"�	]	K	����o�m�w]�����2�f��W��;~�zY\<��#5�n�#[j�l�u_�PdVZ @`I�_cO;1�@�}�q�I���=~��Y7��Hqk��`(��������~
(W���
�evQ�!�6loA|�����Am��l�4xiw������%2'�)����
m@N�#K�
��e�A(����/f��Orj"dbE��E�B-l��Z�d���P
��B������r���A���q���h�_EbzX� ���*�GS��+;���� ����G�3��/�����Z�� \�/`��q�#�^�����X��R�;X�Qv*{m�K��wGg�y�5�\�^�=!T=Kw����\�7�����������sdxn�,�U���c��b�`��V�?;;x��_N$2��
� i`^��M����'z�r�2J@�u�8���R�8�+�9i��z��z����������0���7�����{bK��7�����1(Dd��{`H�q����5�u
������������mb�1p�I���s�L�=����=�D�P5R���^��������h�"������DBa	F2,3��-i�v�+�K:�������`hm�w]���=���.+b9$���!�<C��8q����~:��\��s���W��]/�qE��@p���;>,C�Z�B��n�>����O�Q�& ���_�bP9��J���
y�[a�Ko�������9xH��L���4NS?)
���q;�F���3���fN�A�c����Te��s�z�J+7��k������v��t��L���dNGi����_IO���Fx82�i7������J���p�)Y�6�};����
]����h�P��n��8�����/��oz��C����2�NB&u���,
V��	`G?���"��*ME3�L�(i��n�7z�Tbt��IIY�P`@'�|;"'�n�[/�v6���41r�uY������A��D�';���j-JI���X�hH�'zW]�
Z�3�����B#�N�>�m��&X���DF%l0��r�A7dC���������`B-"��&2����C��� �*[�g���
��I�nhO�#�Z/V���zp~���������M�����������?��P5q��U��Gf��p��p�76������������X������wa�"X���pc�N�h�,�
�Fh�tf�aPq+_��j�+���*,�I_���v��Q�����L�wmD"jk=�	��L�Q���*`s��wF*���X�������~�q��y��x��~������)}�����B��]����<��)�Pg��p/� +LP���<�a�@��
����-W�c�����X��TP�Wd�=fi2�!Ff��F�e��z��<��iZ����A�H��3b�f����@a��j���m���h�{�~-�f��(��kx~���V��oc5���Si�-����&����|���[������59��J��K
��!�������xA��YS�X�\���{N�4}-�Z|�y��}�>����W������Z��}[�}�r`l������������J�x�V7��b�v�0��6�fL7�n��u���y��<���JMr���1]�0�@��3plY�Tb/�p����D�W��\J����n�3��Is8+U@&�y��]EY����� v�9qA�/��Y�5B�~s��W��X��)Cz*V4f5�j��"�xc%�A�#�2������.�aB�e^�\����.A����������{�II��v��3��o9�\n�TtD�b������
�+pA�	}����1q�!.�D��s��$LD(.�K��
mB�V�����������sN���n�LN�U��'-�����:����y������<��=�p�^�a<���
�K�}�j��e��~nI���������q�@�Cu��o�
��-��u��%o�t9c������G����+�O�_����Tf�����}Z)4�[F�����E�m�h����6
�f��3��
J��1��	�e���O2�a,`�;�6������*��`��9��c��*�^,x;*��
@�oxC��~�w������ �����Fq�Y�4f��6n<�������<���3����Y��_�jQ1�P�f2J����!},�����b;>L��rZ�j�u+��L�8�9U��mE����ll��o�Y[(��0���E(��(�\?�b����I�Au��!%Q��
b��tR�lu��S#i�:;������
�)^��,NZ���������&��iaNs�lx^��4��X���D�U���f�4c�b�x���(�|����e/���n�	WG���~��������k�0z�R�����?|1k�:��Au��0k���=�V�w�������xF=�R�#���K	�_#1���-D���y�*Z����6�G�����#M�.�������-�BB��F
��g~57��f*���(D�.q�hC���!
�W�,2����zTZ;.����$w��k�H�����Y��a���msA���Z|\,W�g��@�=�����Uw���{�RZ�gb�x��� ���~�Z���������8���%���r�������Zt���y� �z�iE��$�Pg�g�>+u%5�,�g����^sn@����~��Y��`3NK�W,�U;�G��bFS�Z�}�L��}��z�����6�_�y�?����$R�,gjG������(TG��D�+X��/|1�����g���������X�J
�U����!���l���������f?�����%������h]�T�1�T'�\���%�6�{�}�M���\�T�^���C�,%����L����8�nAj	�D['�N���%�.9X����+g����W�;��D���TC�/t��o�.;}�)W�L��������� �Y��g~S����r�����|�;Th�L��E��A%e�3L+Ly�b	$��S<�x��m�f�.��?A�Um��jy���y�{���u	��5����m]���m�T��-��dF�)F"4��'t�4����A�E}GLU!�(Y�]�G�>��x�5���
�������hiLP������p�m&�p}<XCU�n�/n��p����d������w�=1�vOr�*�xJe���'�AW��dH��j���W�b���2N�L�����mQ�*���['@�D4\Z9p9J.�5��

/M�k4����["�nU��F1��!>�H��V��F9Cb�/���C�8CV��7���9@r��9�u�\(�?�����@�����?zO����zE^�9�dC������"k��0�X���<�
�2k�!���
��r����N�3���"e-�>�m�|�o���Q����������y����)Y���9��pd��N>���m��2/d���a4�a���T'�ji�}aDA�<���S�&S\�8��a�H��]��kC��9K�����u��>���@�6���\���;v��?
��/�N�
`#��=m��#|�g���9^P��^�����c:w��;2p��A1Yep�������%:*�����>��os.�P�aU�`~h��������S����I�������W��B�Y�Etr����X�U���"��Z������W��`>�����
���U��*��v�4�����d$�;2n�@Ga!_���e�g�TA�^Z|�g��t�z�8�D��:p���f���c�GT���<9��=%Y�c�u?��5��1��|'9�=�Y��~�/���B�U���R�]�=���������~���.zn���sBf=Y��q�}PaU���X1�F�H��I��3m�����U=)�3A7(�[r�(\b��h��\N���y�_v���!��e�-�\�<�Q����U����:��V�j�o����Ep.U�I�d�Y0��C�<)��C�l��~����I��m���}Y��n���f���I����CKn�9U+�L{}�iP�.���M���Dgo��L�F��%�:'��v�I~�%��~|�7;I?�(��d������� ����3���;���P�[��X�:���8����6�w�m��\dmmU�4w���������$u������w$�L������������U�����+��r�|�\-����t`������Rw(!@-``#-w? �?�~i~���?������_�w=XDJ�S�:Uk���6K���3:� �����:B����\��CH��]���q^(d�p</��jx/V���[�k�@�������%']�.�1Jtz�J:����O��{���x�,u���"|�!�������u3�*���++#*+����VF���=���%�r�"6����O��������4�f��#=�OS7��|���+o�S3���Q���w#\b�����}�e��b��N}�GG���(yR�\ e
7gA$�_^�������8��&c�,�r��~�����y�dqx��:�gF�OHFo0v�J�'r�9P?�����n��d�����<D���	2LA��fV7
%X�����q�a��z,�1'F%���l�������^��S�r��S?g:(��xr6�k�����D��W@
�Q+�&\��%�r��{c-�@z�SU���8��Y=�wJ��BADZ���V�����.ls<u��%WCpA�O�jG��4u�N�sz�i�\�	��f�_(��
f������J�gh���r�:�l�*g���1f���.g�2%��ci|�Iu&PvB�6"2�A���w4
�I��C1��i����m�pxS��><����+>���p�&��N��'�s30�����8�Mdb
���B;c�O���r�	Q��X�����d���x=�nh��E�B�y�n����L�+`dR6�u��zob����������,��#�����{�{Tl�����VY��/�`s�x����ZZ��Z+h�$`N���GW� E�OL��M}��f�qC�!#�<o����F�t���4H$�]tBN����;��B��F�b�e�#�<���D��K�0y^ra2Q�K�����ig�S>[6�?�/kc8^��/
�����5��K9Ah-���^ ��r�_�D"E�~�������^]}���A��E��J@����-�(7ZnZ!����^�.�;����vH�;(g���v���V�����S��!f�X���"&���:��;�����<�#]D&����
�[*+�4���I��������Aycl��M[���l��o<41�0-O���k�3X�����H��o<����;z,�������y�����<J�D�B�r{'��^4�(`���c8z"�l��d���B��s���w0����&s�
�vfp	�
Lf�e�o�k:���[@���t�V�Q�
��@}������G#��F�����4����9{���(s���b���,�)�>��\�S���e�i�r��xZJZ:��F������6��[�3�{��F?<Y:;,���>u
�'EM�I�p"�����S�D��UuE�J���><��<>�����������EO{���E�����pRp��J����A�@��qL7�	'5~<�r-��_��6��`�@E*Z
���?��0T&��k7 B��xe	t�:c%��b����-"!�b��:��O?T��|�P�bf�4H�-��j������4�=���I���y8��8e�L���i��_�RcA_Y�7��X�t��\
~�,�|1u���nI�{8}�����
�����t,���MV�}�����]j�Pa��r~����Z���N:�I�D�����T��qmO����s1�3������<aB	��$��g+
������:���;���"r��c~�r�"���mR�������!�r�T����3u���?<,��=X�)�K;���g0GC���`�rt�1��Q2 ��������g�`|e�J���w���]tn|�,�^�,{�#v�~��~�������-��Y������e�0�<:q�NTw|�0Hjq�
�Xk�]�k��.uJ���>+^���ML�
zv�H3����9=�(���	>Si����y�o�5�+H��L[n��\�z`
h/o�9z3>.v����~� w�u��0��M���z����2�������!����n?n�<������|��lVjq��&
Xo����Rw&�j���;0I�����l)!d`��K�6�\h2����^��
{�
���kW0�KW�W�x��������zE{'h�b(��</�XJ�X��Z�r9u�$�]���d!Fhs����V�
/������
�-��=
����e7�.�+��,D3A��K��b��Z�Zt+-d���"+��U^;H�c��~���	�����X"�|�e#u���O��h�I�q��3�+�>5�G�������^�g{�)$�%��U�P^��\|�j�TA)�,p�W�5��@�����R���u9���&00Q�u��(��;�1Z����V�G�X����LqH��T�k$�!�0>A�!g!��'nC���it���p���92��/�T���xz	w��V������R�&�$������{%�d"J���M�@������<Y_���v48Z�%���).�9�0n[���
�c��(]|[���o-� 8rd�>#������v3`	�1���1��������p��.���V�x��"�{�f��
��|�V���������j����w=�Pn:X�;p����g���FI��K���[9`���w�u��	��'WyhE�?��A���Q^�(���i��[C�K��H�z��;�[=Z���=�N��#�1��+"��DC�.������������?�q�������A���3��1�k�
�Do����HG
�`6r��z�<=%�88g�����)���cV�	�I+%�{��C���Z
.|��U�e(V�6O�UYd�{��}�-�������*
���}_��"����^	@GTr�����(,��O�%A�|��b��,�������b�f��u��,,�����I�qu2�H\s�R���������<�P��:D�C �tj�`w&�/���"��l��v	\�5#6�K�!�$��V�o�MU�r\;��;�BN����p��pE�8���Y���h&e����;8�~w�+�$������@�~;�����n��������0{��D��o�����~��$:0w��T������~���c}����?����]%y7+Y�=G��+rx��\NZ���%ga�����Rv�R���
�Z
N�X�N(�2�A�h���=��
7]��N����{P�!"k=)W�o�q;��wdwZ���T�fU��O/]���?��������j�����_&]p2N���qj�����Zi{��E�S%
���&#v���������+�����q�~������0���H����o����:^8'1�l[w��:����u��j��
�j�q����'U��T�X�@8��zn�/�z�����X87SL�]��XO����xl)���[]�"��V���Hp�3�|�����"�8�(]�����P�{��_����J~l8x�V��&� r+?<�ki��������pzo�^-_1�%����#������W����^R�������@���W���Ui�3�Dm�kZ��n-�����,9�������F���i'K����a}���q�O���������,���'u�@WW��MK�k�-�1�z�����f����~��d����M��n���by�_0��hN�����@����k����������p�J+m�,��W�q3~��?6�_N6��s�;���Fe�(UK.��q�?��Y�/�r��f�s����z��9�����i�7���*�`��hA�@�b�9�Y<3S����Y�����f���z?n���\=|u�_~�>K�1�=����qW�Giz����5��?h�S�����Z:��@��	0��^���������V�n�?��>�+�����)w�H���w��9�+w�(�����*����]��
��n������f;�if�\����}��
��R����.�X��k�Z��&{���t�E�&��Q��}=��>���A���CGJO��[�a�ko�eo��=#@���	I3thWeH}��G���j5���h��*Z�m-���5�v|}�����/��Dx��=�S��g*�@Y�V���\�T����/�K�r]������8>)a��Y��}k�����8w�
�^���u����j���6�oD3����V������p/:3��F�>�|�a���%��]"{�]�������v`Db��h[���{H��t�n�8��Z�-�����Nt���f$~lG�=��2���F��%��i�D�owU�G��U�������c���k���o�&`��#�������`� �U�i���"��M��o/��L��b�����%f�|��.��_�$:���K�^��~��up������E��v�p���U,N��
����?v�)���X�$����?0]���&��OX>�|*����~��P|_�4��%�+�\
%J�F8?E��9��s�L��Nb��L��m
i����������n0���B�^D����GhG�n`���������*�-p%#y������a���������gc�����]��Kn)� ��u���� �����Yd���/��}��z����,�$Dy��
TN#%~Y3��@��� �%���0�7T�K����G��i�}���+lU��-�_n�����������1DC�q��MJ�2�\���o����~�Xu
6<��t��#����������[�9;�'7b����~��i�����2'��v�����s�~\<����C�]��g%U�&�j���a4-���65�f���6�!H�ii!u0�vB���Y9�at����b;�?�Ir�<�,\�(�v�
K2���.����H�w����q����F������4Gr������I��0���"�? @��?=������
YTx���]5\M����{-����6~�i��w�?�^��O�l���R�W	��d6�B�^���ii�����B������$�����95��W~�*G	�l���vC����y��t��"���)�=�~
K�J�e�:�O����9=�Y��N�n�Pu�2-hb>�����7],����������H/i5bw��T�"7�O�)�e�$�7�v���P��WW�� �0�xV�D5u�������WR�2lid�C]�O�{��z�8v'nI���e�q�C?��,�M�K�|7���f6���n"I�7��M%0��y�����7�B��:�A�4}=,w�n�#9/@���x����dJ�����H����}0t���=x�����G������(:Vea����]����=��zg>3�h�j�_�����"P�~����J���$����Nt��@wh�K�C
�N.�{�2}����a%b��5jq4�n��Ks����2�\Z�X�g����(���s��q]��){5_�'�.A����}���i�g���Xs��V��t���&#A\� >�
��o?5;
C�w�>&m!M]r���4)�:h>���#A����d[C��$U�R�>����j������*��,�)k]=��M���7p��9��o�GB�1.���K��js\���m�"�ex2J����������< �(��m&��f��Fdn�v|�����b=��y�~��H�����)�iD;
Wli�������og�n�e�wZ/�1�YP���_�9����\����P��n=R����TPf��������qY���f�����8���F\+�r�VO��l�,-�;
F �B4��O b�v5���k�j���0����3�����V/#� �m���.�O<�~2����"���8��N��p�+$���-�^����,�������-Ay�n?l7O��5�u3=Zi����eS��!}�� ��2���
����&XV��x���R�+R�����n����������Tr�o�m�S������&���]�0�q��,e�G��:"=��g���;���F�
���^�Jv5����lx�b�7_n��W(��� -�a��e�"CC#�U=P��|���(l5[�.��D����MM	�G7p(,_>%�\���,����m�2&P�1e_\����4����Wb��c�������oV��C���U�YH��S�O�+�n�F���)3=/��3oGW����u�
���bP�G��'9�0c�^m�����#�:����<���VQC�a���6w8��V�eI^�^��\|��<���Vvx�O��N���R������2^veR�~sQ']�������������������u���8ysR��|c�i�d�t+
���;J:h�>Po94�0�K�r�h�$%8.�[���UdJ�y��4�B��S�V���1���q>�*T~�3I�K1���mC�A�(�\��&!s�����I8L)p��.v���?m��f�P����������'��o���:c5�W;
e`�+r��+�{O�~������q�5�6E5���d���N�k�R�U_����u'�Q[��#��G�4����d)pi�����e�������9?��XzZ@]mFpMV�$`)_���n�f�$W�^h����h���_W5���
�6��\�����*����i�y=�)���f0�*���V��/w����:f�L�����2�N��b��97�V�����]�r+6��z��!�C�&@<��-�-�����(�&H��6�:�0���wY!D�3Je��\���aF�w�9�<��v~�6���'q�|� �m������O��JY�<>� ��f�|��'8�F"�����+�|[���������q�2 ^�bzb������?,wO=�
0*����zx�����^\,�hI<rM�^���b�Zt�>t1���?m���n���� �fN�B���0�j�A�H��:KY�����_��D�t������<���L^��s�h)��$?F����-]u�:�[�wA�ZB-�u��[�)s������=uQA��IX����)�!�s���;]��y�c��>��8 ������"(7M�I�}�������$�/�"�3��\%���n]����#{bWN@�x�0r�vg��HqI#�u�M�HVV9��-_���Z$�Q�@N�7R�Yf�ih�~ �k2��������1��
Z�������k�������8xN'xh�a{E
�}U�5��K�YN,H~^��YG@���	�S���5'P�*$j���!D�5P$�A9�c[UG�g�����EH���
5����K����/�/z�������}���Z�"��\�z�B*Ox|{��f$\��O
�#�v��n�z{T�6`���:����00]zZ�.�w;�[�����M�I�K3����rW-�'����Q��T����vhy+�����
�(�����B3�Og���*�/��m=%���GH$ 6�R��f�+W��2v+(f���O�T>�>�s�[<n�����}�%9B�����x4�������V+�,��b(>��I�2��I�=��+m7}���E��@O/kn������o:���j���$t��u����4T�?��dY��=��!o��/>���R��4�u���y�YN���v�(���Ih(2w���\rJ A�����Yb��v����s=p�g��%��!px!��������uf@�Ke��:�w��� ��$��t��cL�����KsE�"�"�������J{�n�7���1�dS�FO�8�����
�iZ��������i�,Ru��
������@�`�,�i���X$��m�w������)5������t� �����
�`�F�#�9"0y�)w�sK�E�/��Ch<�~btR������7gR��=6Cd����V�Ihc?4yT��:�]��qZ��VC�]������2!O����$0E���b��
#�5���U��T��To���i�jT�7��	�)�~C���^�(BV�{�0l��r���{�V�,���-���P���B���D���b�(0W�De+����w��a�}��v�)�3�=����q�3�\$_O���0iE���,��H,�Y�Y��e�b�6����%��N�[���d���D�c��1�2X��\��5��;�e�|�uE!2��sU6o ��-*���;
��af���I�J5��K��)x��L�X��0B�o��8��<!���qc�����g�4�����tz����Y���eI��`nBo�|��U�����`	��FTO{|*�>j��Npu
��I���%(��h��sr�����r�G��������j�����,���FP���-vr�B�������v�C��������&������������h0��x&@�T	D#��`[����QX��Y/P>�>�,�jH�>J��M�����j��~���j\�2m����O��1��wh��'s	�# g����I`���6�"/[l>8_�2�
\������&T+Z�K{��0���0�C��X%I�����hZ���>)�LjiO\�Q�S__�>��W��@t����\�������Kt�W�����&��l`gTV�nf�J�������,�/6����M
�����q��V?`���)^��4p|+���
Tp�@�X�c`�1�f �5�����m�����M#3�����6�uc��xs������3d������i���WD=��r��v77���8�	�B�qb������(v�,w�g���h&@T���b��VvBJ�<�V�)rj���
�����?���d�7��a?����E�g,#�����
��f=~��m�w=�T�i��M�����`5'^�D��z��x4����JZ������*.�J6C�Z�d��3�'�"G��#�m��������g���Lc�	x�3V�����@�������9�����/��a�Eh9����V��������C2�|�8>BE�|����5G�h��j#\�-0`�k���A�����Zh��,�Z�R�R]��[����C�ZhN�;�����Qy�q�L���2z�H�-Xo��$>z5J����m�
h��V8�V�u��1��4�D���N�#��3�a�.�������p<dk.�U
?�	�{:��O?����n,��jJ$��+NR9�8E��<Q�T�`�D�-]�9~��
�qa&�C�.�b������E�*���1mcJ��$$2������V�k��v}����-&��s3�ir|�s��|_�M��<����Z��?�N�~+'��1>Cb�����"�$�=�	_���69d���0���������S}F���5����;Z�>7�I
������ST�u�2��t|��.Y�&Bq���
�Y����,����6F�$����1�^�������3���Jef,����2�g�}(����}��t2�����2�N��L`��t�\1V��r�T{�9���X�u���?_}�����FX����V�!��F��&�^���e���rAxk�����!ZD������M!���Ryd��P�[�J-������Ahm��z�
�)����&F]%N��e��m���9����}��Lp7�0�sMl���N�V)V'����^��	(����)�b��;uw�4?G�f����!�Kzdi����-Ag���������)�/�y@��-�[o��!�{K\��x��
���$���'t��0�(xE��\5�&����X\��%������-��@{8U�Qo��������w_�?)�J�!4��3'O�v���Q�$��<-�o�B{[�vtl�
r��n��Z]���I�#��H|i����St�v-�9Z���;�Gw��]3��YS��7X�,a�������6�,�04����X�;�9=���/�#����������P��$��f ��Bw���;V*��
�s���A��X	��f��qm{�/Y��
�%p9���`*-\�b������F��C�1�@�������N����7X��A
�?��7*c�k�g����T��+���]3y�������F��	
=1r���}�����#IvNp-������@n���=5l�^x������%����������>��������}{X8��H�����	�r����@4�FF�*�?@�s��q��{5�]:*O)A��@)mLP���A!��dY�ly&%�7��T���8���?0S���e[�ol��$.��������C`b�o1y�Y���z��k�{
�w|�~�4�?n6���T��{I��\AU��������yf�/z�R�����uT������|�N��'��`m��B������^����x�Xl���B/�.��i�*exh�:YWn��}9�qHU�U�����10JV!���M'�T��KJ�*��"T'�5��IMq�(
%��?����r��(�:w^����Q�]�D���m�G�b���B�a]���I����Z�'0?��T�W�t q+fr6����K�|a*(��/�u]��v&8�	xs��bzu��xm".�T����&83L)�g�`�M"GZK����JM�"�|��q���`u�@w-�Fy-�'�=nL2
�3EQ�BI��.�&��K�����(;���r�����!{�L:�6%��Xo~�P�������OS
�XK^��&��5#����P� �$	�8� ���g����=�z�0H��N�����#&P���� D���m����es-������za�	n��F
{B��O��P�q�����x�W��y���za���Z�>=�2������|G`��,��Q>)~��WJ������������lz�9���ws�����"!���<?�����MV����F��Lj��<��&}�TxS=	�[�qxY���k�9�*�9N�����tq�Rf]�H������%Y�)2�{����.��e.��v�������9�|l������B0��u��<,������l���P����@p		�<%���<[`�Of�[��J9et�P���������
�����,���p���o���D�&rBB���N'�4QwrI���#|	��@�K����Qi����[���M{E�<U�/�)��+r����9����2y�I�,#Y5���~�����%bc���q��R.Rb2���;=K��q���j��F��V}j���|������b��
;�eJ�X������v\���!
��9\ZS}9�����X� ��9������jh���k�8��_\��Z���L	i��/�{�$=�����I"�����-�2�Sa<B �8�9#�ab��sj���?(NB��?j�8LSY�d��� �b�pA
������b��Bc'�D���AV�0i�v��~�B��~����8@y?���'���F�T�U}�!������ld%"�u��X�����'����.0��a�Z��/M��z���^�>m��:�Bh7�K�Tg��������O\��S�f�Q��c�e&�r�	��P���I��D!��b���[�v�g�����
������S��� T�Tw���{����������D	�A�}�[?3���6$��
9��_>|Z/��t�������>���gI��0q=��c~G��<�b��������z�Q���;�	arCi�J3 |OQ�,��H��89��h���?�2oe��4wW��X��5��k�\mG Z���|�~)2mv������iJ�q�)��s�{�|�������rs����b(�Y�����	g/FG�������h���=�3�[*�s�7q�k��3���
-����TEc��(�b�^\Z�^�N����B@����)��&�x"�s������[M	���� �Sec���!}���b�d��-����C��\�a.h��~1JOzw�r�(�Et��~6���N�%7�4�D���<��Y���H�s���,&�!�v������u��C�D�[fO<U�:�n�i��p�&lv�#�n�m�B����Z�r�F1W����]Y.*"m���p�x�D������Z����Ap���G(���|�@C�	�{�a������*1���|�)�,�n�E�%�������������|
��E/��(sV��������*�HG��Ap�|y�Z<��]+
���q���o��=�1��h7|��}��o�@��v9s��Jj5@��#�7�����8����Avn@�<����f�k��K�2�'	���o�@��T���0�BahgJqu���s���Sg%���
|���;�����`���7����������ZI:��i���\jV��0����B��	��c'b�����}�z�{�E�R�l��^vX�z0����oo�N���>��]���"��&MOJs|l���_���a+��YW��zw����p����6ST;�xT��x�?=�����4�o�%*-arl��>���7N��jb��q���k�������w+S�M�h�a��s����X��>����rV,����`2�NZ��/P����Q���t�a�O(��������FS�G�K OH�"��M��P-L�������	�eQ��RB��Z���|
bt�������]���/�KkX��t��P��3��x���<{�C��\���Lr�>VO�qy�����Z<w�M"�3- �*�,�]zH��jDP}��(�\�W���]�<X��#uFI�������BIj�3	/��M��Eu%u�E���9�M�8��g
;��"AN��9�������.����p�t5�r��<)j.��������?�5�k<���^�@����WH�L��'��^�V���7���G�7�)�-j�;���W�g�����_;B].}-��1������%����IBc��M�����'����y90�9��[6	b���z���	I=SjxpW��S��5���'w���������ke�(L�x.���j�1��.�)�����t^"���(�S���V��Q�k�Q��<��%0V_8���!oW5�`����{x�����Q�UZk�,�xp6��k�N�
$E_����?������=�D��+������K#&4�s�����IzkE}�KW���e�1��"_��FN�F_�1[yU��`����%1>�=���g*���������)?�:����u�������j�H�#��-�{Q�G9����a��1b��-R%&�j�������t(|�IP��m?������W���z����,7{�L<�y��X�������g��=��� �k���:���,	H��
�!c,G1�K9`������h#G��cjq��^=H94�M���� �j��K�]��������p���hol�
P�3J$Tx����q��
������"%y�_r���	�%����������X�_�'�+m�D���A��1��8J�%Mb�ue�s����k��R���?ha�oEv�,o�yk��o?m�.���!:��U����Y^�j;�RH.��<�XX�u�^����S��C��k��������k������y,��F=�d��m�'�@N T>QF�o���]�����
���-Y7lD�Z�:O�g�
���t��_��%�ko�������Q���������?�J�#		�$#O������������P�H-2a��x������W6@��
��d��[��t��xb�#f@�q�(cL��q	�uN9x��*�[�b�\Qi�O�!��b���aR��Q��5�]k���K�r�@����ii���V�*��0�[3-�E�N��jJp��O\8���j�+3>4Q�n-eo�V���C��
� j�-�**}�����v�u���������������l�F'G���4���J�5��M�6�B=�N�rE��o'��x���p��7��um@�g�����,}n\�g��dLC~q�M���������Ax��9��K�]s����T}�����2�E������p�)mh�d^���c���TX�MI��*w������d���v��d,Z�%s��T}m�����+"�v�X�0�w�)P���0)�t����I2�f}��5ez���g������W�Tq�nz����t�0Q��$���'N5��u��PE�H��u�c�x7Bx�Vl��\�P(��������L��������#��j1u���@�+*LnJu��yO��~�[$S��`��f�j���.���*W���~��0������?�A�l�I�j#Z����������,��t�8eM�2m�c�d+i0�[���i�/]��y�������[9q} ���/�������+w�����2t:
Y�j�}��_A��$���:����p[���'��=�� �9i���� (d&,?��+�h�P��E��NV+�$�U��@j�F�l6�T��:��v�p}��+����]�b����\4~���NWQL����;�s�������C@��=L�,A����bK����\DP���Q��={�p�hm�5
�@�*?W���l��H�wQT!�W����p�r�e�p����Ns"�!S������!J����_�f8��i�d/�}q�/������Xhi����*�i�BB\������q�v�����v���<�2)����9������/0L�.�4Q���*eJ%gyiY�.����$���~����C�Os���z�������W�����v@��>����G��
��6�����);�A0�r91*j��J�ky
�gR�G]E���M�eHT���{z�}��R�&�4�r@=.�B��/}���%��z�4]%�vsGm*�z�x�����D�'I��%�S>=g��.U�x*nO:
��=c2���'�A��ok�ok�����S�����8JR��t����G����&-]@/a��i�],W�5p�Um
�@'`�ug0�~��\����H����P��o<��DrQE��n&o0�[��9�'�|���A����\�Y<��D,�N���@(������4D`���g;�����]?K�P1F���x�[���|��:�d<�w}^�^��Ie�����^��G��&�a��I���\�]������T�b�vN�hI�7�����Z+��3FL�����r�8����J��oP��
H�<��0�%�4R����$mI���~�3F��D=x�
�Q����� �^G� ` �n�x>�����h3�/c���a UK�c2�u�$��~�VY��CM�EO�jlP7��)��M! �8_��U�P�����
��U�����1�_���_TT�Nt/�+�G'�3��w��a��n�yB����R���j������v��E�+���=�`��6� �t�o��-�?���I�;��%����1����3Q4�M��7�~�`h�5qh�a����
�\�(���s1x����Sw@�3G.>�u(V�$n����C��u���jn��H2���G����KY�AJYr.�a�;�F��R����m���Y��R���S
$^?�,d�@��wH��nf�c�3������"�����t�".<�����0TA}h��!+�:��oIi�:Fb-��A��8�i-9}��x��$�k��EJ�mz��zf�c��s�@���}Srx��Er�$�
&�>D�C,8����
��5n)D�����K��<1��#�l��;j��J�DK�L�p"��G����g���� �(a�;�:��f���&%Y��g�C!�>;hI�@���8�����ZT�`3u�>�c0��	bVu?���hL3�)�F^h�zm��&��U�'���9b�m����Dy��dB�u�zF�^�	:��hS3UF=z�����W�_&����,����C�����mpeI�|������;�8�!8m������W.���0��i���g]��������=E
��e�x������T8��pD�u�L����Zm�b�#"�"�O�c �HIe
�2�Yq��h����tz������[������/��q;_�vO�������'
��$mD��[�N����`����j(�`��>Q���\�1	\$�$����_����E�I���*0�i>2&���$��d�NK�����4���rs ����+������;"�Q��3q��K�?y,�����'����:��,"f��P�����R�M5[�����!z1�|
f<3@��?P}�d�����00���B9���o�	`a}��-AU�l��h�����h����r����w��`���V��S={q��������
�����(�����2j�����y��n��]?�?7�F.x{G����%8Al����_�o0�BlU��� _H�B�R$tPe<{L�
�tk/j+E�{[���r@s9
�AN�-�X>���]l������6E���4�m��
Y������*'�
Y�?,���&^���0H���	��
3���X�3���@^\��q��im���g�y&��@����!�!6���(~��E��vI� mK�
��V��%�t��m�
��`��$�����@!I&)!�ND���U��Z������;<}+^�}��g{�����is���!p�W�j�S ����uy���0ZB.���m��`���.����
s�W�U-'%`�(��L�.����h  ����KGB������H�"���65�~����i�<?r�zo��=�� C�wwU�H5����{���/`!0}�����?Sm�
b�u^�@-,7���L|�2Ht�0E���3=��PF�5;�N�(w?�.p(�������@�f�7��
�"�Y����P'��>Se�
]�Ig,����|/md'�8�4���x�QqL���L,882�~hP�
gUT���t�q�����1_)�p#���#i�hG�B#���K����
��6O������AM#;��8�Uw�x�	���l�,�3�<J�:6�����wk��,l��n���q���r��Z|�,�]=8�,���pa)+��������r�)�$ s�	����tlh���y��Q8�nE�b
������e�������dH�b���s��q���V����������g=�Nc�3�Y�e}�3w�]�:��r�r���s@=�2����S`��yf"�=:��y��>�)�mI���L*����-T�� �P�@�xB�&��#�8�_nR:�X�(d���9*����gG}b������H�`����q��(���ex����]����Q��~y2r#��Rg-/�DS�82�;m@���#��a 1�lD��9&���4\��2U���6���� u�q���p�����{�L�>��	��������g
@����B^�jd�/u�����6���u�PMj�y����}��!��"�g�M]�^�%���bf�/-mD�������2���(NC�X���=����%vU�N&C%!��m��M��<�c�����j��/
6p�A��~����[�{s�`rDp��:���X��VM�|o.��M_T�%e�e
��&�s�yoqs��W�\W�����/���C^���
�#���@^��D�w ��9%2G��������b�>�7|��
T���R2�m;������k�:������t���/����g�-��;�#�}�Y��j���9}��
�#U����V\6^����dH��������e�!4a�q�c��Z1��G`�c�0����
��b�r���oUI��y2"_&'E���?�L3���v���X��d��L�f�'R���p��l��Q�&�:��������g.&����)|�a��vl
��d�k�p5�/ P���X85��$�����i��{4J��uH��Q�D�,���A�����P�{+�5��sW�}��v�6y*��2��\b`��08>�
�x�3��aY.���V�\i�j��4.�D�������Y� ^��F�Ir�����m0k�GVJKQ�8��B<P���W�A�n�%����J6)���a�w�U?L����,D8�M`E+�x��~��Dc<�x
�q���&�)�4���Z�>���{��c�3u�P�������x������i�����X��^�Nm-,���#��GKD&�W@|�)�~WTy/�Q��=��<^��B�C���aQ�6�N���{����2��W��,�
��p������[���K�7������K�8l@�������@eq��[��c�!M��X�!�#5��B�a4J�P�����
�9o�G�
�Y�!t�Q&G�����^�\�Z�o~�$�'�C�J�����Q
s��4I"&3IWY+n�r�u�������&����v�xU���.�y����P���wF�G�f\���R
�{�|�����Jk1�@#����2��O'��N>�!}[� $~�a������1<��r�S��)xI��U~:4�-;U���������`����qWh�����W����}x�m��>a���)�
}�7H�`�IG}n�@�y��j�~������~nf<����+��B�/mf��`��g�}������F�!���J8Of6G�m���t>,���~|������\w6�C���@�5~���a����j[������>��emP� ��j�Y������a��q;]��u�����Zcy����M#��^b�l�P���������G�r��}���O05�N�G�hIWD������\�����3�����i��a�p@�������E�K]Uo�?n��P�X���� ���T��6����Pk��F�e�����2�`�Y�S�9lJ!��	37��&�lh)�H�����K�h"~�j	���(i!�"	�)v���jqx
�[�K�/�O��l��zKU�)�q���
��LB4�Xqza�!G���J6�H��eB���������@�-�{ �@�|�Y�
d��W��5��swJ�	v�/��p>�2~���/�}����0Qt�E�i9�������[LE��VP������	\���i1Vt�
iS�x� 1`1a�j�<f�v:�~p�$�2"q�RNbL��C2�'bI&.���y�_@�
6_P��k�C��B���X3P�Qj�i�t'��c,�����)^�K�~.�#�d�$$L�����?�:����a���&�r?��!�_g;����7����?a�W���G��wO3���Q]
B���`tm�R5t��;Q�
8|�)�1/�w�����/��:�Z��rf�k��X�l��k�����v�:��-��,�@ap����T]t��e"�Q��	��i�ax`���GRi2k�=������h�S&
���2��O�T%���"��M��=�'�k�VL!�O������+�U_�JjL��A\ER���&���~���
Z�e����R�MRe��J��{�c��P�5��������.���T��$8vuJ�v�����J���<��>��������i)��b�4u2�Q���/J(�Sf�c����3�-���p����h�c�J7�\\}��XS����-�;ZE��:��r�W9�Q��G3Yu��[<d"C�-�	�3��!�2��B���5�����N�����Jcs�q\��G@)�G�x�zt�G��p�U%DJn��6�1/H���������\j �e���J�D�,��9�
�@�|����6����y�x��C�m������T����(=���a,�v�����&'���|��b))��m&u:s3���<��q����~��<.�'�e_�pR�N����x���
�|���IPXUB��$Hy�e��zH�
^,�B���}[����Ar#�&�^�/)_5�d��},H��;����B=�k�������L�2dq?�&�S��)��P	H��Ojv�$6>�'*���@��F	��J�H�6k�]��O+e7�?s�A����1�}+��"Dp�t(��-�y���4�!P�f�S�7�Qyja0�i���E��=�@�.��kx4�;H�?��s��8pa��i�e� G��dDn��i�g��\j��;����@��G�|���|���/���.%<�d�Q~C����-����'�1�j_nnICq�n�C�d�[�����p��O8,��$F���7 �����H�k%TRQ%9]W������2!�A=�#�m�E&>��P&��������Y7�/��?�C}h������������4��-!4A�#5\��0x��[+&����CR|s�<v*S'4H^G@�$����,V�C�)�2 a�}��59:+|J�.A ���%ug�� ��������
/M���((�:_5-\),����a���5�1�>r�T�������2�3�D��s[�xm��'�[��G�
�
e�|�����-4-��Q_� U[�Lf"Uf ?@��)H�tX�\�?,TE�A�}Ec��7��W��i~d��F�j��w"�!�yr(�#���y�0�����Z�_���
����n�~����\��h���
��4�{r�b-���i���rZg~F�n��gu���2�LU)��G*�S�Pl��0p@���R_ z�����m�F��NpOq-JUbb�B��O��C��E����*[��c#8/Cah:�g�X�������p<��y���3�'��8����#6u,������D���G�|��1P��Q�-�-���y
�S(k�hE�W�s�&�gm�gt>J�c��cC���d��!<x��jP���	"j�G+�C�
����
��u?AYkvX-N�������?���x�������4x"��=n�����]�H����C�O%�p���������M���3�G�_��z+y�"�moh���>��4D���Z��a�M�H#Z$�%$~TS���q(8�i4�����iM�b�h�	�BV��RY��Q+U�����f�VXK��W��a���0�	.f/�]�	�x���ZT���!H?wVR,������
�F�t�2(@$�$����30��/D.�����f�~��_��0F��� ����4Da��J��9w��/;�`+�^��d:�S�*�Lb�E�R��xy�������w��OG�M,�����[���u����04.�Ln	2��R
~��*p-��n�
�uk
�@vC�>4��	X���������S�=�Xw���$�I�����8����sFmSE*N�T�t}�=g; }t�?l`a�@�z�W��
��T���7����)��d@�����5��/�
1S����!Y������Z����������i,�������% ��4e�GR�gR�_n7�=.��(�MOy�
�[����@o�3M�I�o!���������Iz+� �	`���
��.�!'}8z��'y���'��)�Y?,�slfOp�A_4qt�ksa�W�,�G&\��DX��3�i�yk����Ia�g���3�~�y~z��N���Q��������vZU��p;�H�j�n�
��:x/Z���7o���U�A�UG$j�)n�+2ZX���
pf�0����n�wU�T{�mt�y���h�'^%�����q�n�=�[W��IG����/���M�'�Y9�����,�I�k�OO�Os�i=�#�*�����|���Qqg�u��������6@E$��b���G1@�����||����7E}�_v�%�~����M��=���Ph���A���%��K{���HSd#	"�K����_����=��u�����3�^/$����W-���M�A�A1J������<L]	6����	��3(pA�����h$4�'�:Z�F���2�/3��T�+~8���V�
����|�
m�T��=�4A��K�����L`�GrB6�-Z�Zsk-��l����D+Q�������h�����.	����NV��g��[�hv�;���h�>����n�V�|��7��Et����p������c�nPv���gy���?��o�:2}���e��Bw@��{W�n(�xV����A<��F��c���HGs�(���b�K�+rxO�D�����E���)&7�V4�����>^;�*�m8�D���|;}�����y��T����<N���MHD������D��jm>�K�zg��c��c�~����?{�p�I�3�Lp�����������,�p��.�G��zy��A���%X�������	�p�R0����A�S��Nk'8��\z��De� ]���"bK|J����^1�CQ������+�p��
lH�N��@?�c7�m��������m�������-��?���BA<Q�K?l�����������a|�3�cwH��pz���5����j����
%�&H��M�%���f�;3|2��,���vH�0F��ig&k�H������Gc�y��1=���c�
��I!��0�^p���q�[�]���O��'���o~���mCnw�r�T�[�k�|�}J=���yf����:��,X��Xb $��.)4v8�Sg�C�X������(`|����I/�'a�co��n���}2|�����YkZ��������D�����2��8���PR��gW������y��
!`T�
�������{�7v�}�?��F��~��v ���Y��<c��-Yl)��O�����coz�"6Ayv���x�F!PSA-N�D��!�q���������"�0�2�:X���r�)h��m
�2����(1s��4:p1c��m2,�4�)
�Z�v��+��o���/&����;�������n�t���?��6x��"UR���O�����{g*
���7�4�i���a`��<�LXA���z��/�f�?�3��0}��L�+����Jk����v�]M7l����^b���&Y
�u��[Ep�a���&3���}[]
I7������q���������o����wkn���E��+�v���(��G���������\�	��&	6�������Y@5�qN�7A�UYYy]�����I��jK�p)5j:
b"J�`$����P~�YpBw�V3���r��:���N��t�K�|C����jnP����;O,�ct��]..	�F_!��^�Jf�5+���L�N�8~�#�]3��(����3��b�`�*���=c�#�3O	�7����U�JR�����������S����EK��io����h)�:��#���K��8M!���\.�
���[-��^9v�����~��o!���0�G���:l������O�-�`���B�C���nL�E�F�	��N�����9���|����^\���H�&��tVd����H���56�MJ��o$�M/�������RP�������g���������s[���o�x����6O]c"%��wJV��������U)g_�]~�j���wm����H�'V��!D����,
gd��.�Ht����N8L���t/�k�n�T�^\Q,������L�~���q-�X	r%�_�����xw�R�U�(���EU.*�h"�<*�Z�%�a�=)�x����8�@cI����,Q	�F�w;���&$���J�lD�,�a$� �����/@�*&����.9;1�.�=N�vO�->��0�������4��t!���8c�"H]��Sq��\���|?�Z�����\��~�"VubL6�t�H�>&ecj`+��������K�J���+�� ��hf���"\�{gb��F�K��A���Fa�����A�������7��G��[�2D�
N�;�Y�0I���7+	�%�L!x8�'��{V�,l*53,i�w�
�SJw��jh����B�#q��!��=��0�i���	���y�&�S������������N���y���1�Z"���RK���[5�Ho7�f�����NU8�]�����0/"jJ�L���������bJa�QF�M6�m����K$��b��aXYy�*'���f�RR����p�R��4T�\I;�#������c<����F!T[�t17U��>
V�y�L� +
jJ<��������}�+j����� 9b�#'�aE-���A�zYQ����+jHUG�3��rg���UPm�X���-O�4i7A�;���n������'�����'O�q�7N���g�-������7�f�#+�H� l86�65�����
-\�ilYU�fV���!�LX�a+�/����1 ���YC���6o����xb-��}���G+��=��Gk[&E��*������Qr��$Z�A��5�����djE�	�"NKkIE�CD������^7�=l�����|=�j$�x0��q�q'�i_��P���&S�x~r)���x�8Y	7���D��b�3G!�'[�]2������pz�=bx�X�b?�q�v:Q�`��P0p��.��O�S� M
{P��5�����\p�k��"Fw�����ns���h���������E\.���gm-�b�;�q�Nf5��m2��+aLQN�aH�Y�A���h�[�EG�Ar)q���"����LkBU��AV�������B��92���L-eGi�B"�
@�7����n4�^��X1�a��Q�X*V}��Z������Io�����-���o���]�n]1�Z��f/=x���2�s*�.�+������q�94,�dVb=!��:S���*h��h���x�{��yx�����sF�E $�9Ak���Y�M%����(<������[-%=��b�tm�V�����~��3Pc}��q����������w���.bA�V��.���w����z3\��j9$~_��F\�x���&|k#AM����������g��9nx�4��Q�Q������uN�V�;D���������z�����h+'����.��B�LA��gc/�w��<��
I��9�|-�������0zv���]�s�4:%�������@*'^�����9�)C4��MC4JN�(����&����h�"��#�kD"�sSo:�I�|�����'��yR��'��x��^�$bq{����<�kFD��Q�fD��e2"�R)��T��z�k��N��g~�,i�����k�J�{��E(������E����`YN��
�qo�4Vp�[������������H��j�����|��kfgR����*]�o��5Z���	������kFA1�I�_��9��v�7^���g{�����#�����m�����a�@��A���z����H b�$���a�-4�`x������OO��:zE��~f?�]�@��=pv_������my����2.��#y�>Er#�������L�%��CUj��q����������IN�E�L*��
c�.C=
(�����$z�@1m�J3�X��
�p��,����=���ov6�(H*��������v�������?{#�a*�jw�J"�rn}P���x�d��v\��) e)*��4���lY92	R���@�
�Fg@-�x�x�@K��Z���f�
�C;�j�,�����I�}R9����F�����h�"�����K�	�����,��0X��|�}yZm�o���V��@�S,+��,��j�������^�z�?%tN;��f��m��Y�N$
@;����������������va��1�R�72P��2��z��2�^��@�-p����_�"������+��3'(�$I����;V�&>��e!Xm��If7bV�8�����d��
�x�D�SW���V:��;���y��{�6	$�a�+�W2N& DGE�&`���2���H��`�o����%��w;y=?A
j[��W���z�����AA6�]F9@���VU������h�<H^x R}CPAX%�1��w��?�N����(y�e�������fI�v*�����*����l����5��*���Y���vN_5e�5A����Ig����B�"��$����4�<~ 5�Ue;��eN���7������R<���Yhw/�[�S��xY�bo;0S�k��q����j�n�LQ����zC&��$�bVi���kh����+��X�@�����Oz�zV�6�����)5����`����ww�����D�]�� G�V�"��a	-���2��G����L����B��p3<�FzbQ+�|-���J�%�8�E��������v���b��Q�P�Mga��_�g�q�M�a$���e�� lad����:��|�y|W���#��{\_L��N�I�.����D���/�Lc
����0X��N��nf���������Y����!�*��6��2G��5N<�qh8�R=s����P9L_W��a&>.��� �@��_5����
�g�3>�I�����n��J�D��>[�vh�s���_���T�2����@{*�^����{-��A����x���S�B����zY+����B?����?�&�,luE[3u ��?8�������a�����sEn`7�-,1�X�
����=&�/�A�}����M�!�,4�G�Ur�����
��r��S�A�%uG�X�NR/��2� ��s��R.�b����^��l�$��mo�����b1��&�tZ���g�Dz��-���D:�3:N|= y1���q�Z���L�NVAMv/Nx�������+2������7��v^S�=��"�@��'�#��j�%�_����H�H��|�Dp��
���\
�������=��k�$�h�WC��@�d%�)�c��L��B��'��{,��G|�R��3�K��,���hHq0������x�@\/�H>�;�[�a����FH^��|8LgxA&,���#�� 
/0�QTj�NT�����]$��~Ive��I�������=�Z���D@��A��_����r���������(���>�~��������N�/����G�\��uf����G����%����c%��������U�7)��I	_�#�bC�Ny�Q;�.�N(�`�p�������Eg������@��\{�C7��� R��Ex#{7T����h�� "�����V?�����<��o6�y�v���DH���<p=gT���0�����0���.�p�*�QkRd_��?�zv9x�]���y����1��C��)��P)}��[���{��0��&PZ��g����
�M�X;��[O�pA�2r�������<?U�P����J1f`�+��h+\���.7���	-@D9��8px\�5C]@;��1�c�Q�2�6o�&�T~�������J^���
{%Y����V]����qX��.I�W	���G`2�Se�-y8�kt�P�$Ad���������]z?8a����3��4��N>=G\x��/��[��;���[=M���R~�^p~X7����h�F}�B�����D U��#�x��Qi���$����q�P��+M�I/��(mw�,�iZ�.km�0�Nw^�:�i���u��k�����~7�8O���)�d������b�3o���l����Ug/{5�>�.�����c:��t}�_�4�#5QbHW��'��2��2~��d��!#�����y���Q�W`����d�T~��&�S@�tv��s�(V���w���b:�-��~mV�9��?0@��=/Vt�'G�`aM@��G�k���2i�8�r���D�:�1T��(����;LW���5�Kza[ke��1+m�C�9��8N�(�{�b���f-������+D�)�8"���Y��Vi���n�y������6����':�A�D�i���`~1��h
K`�k����c��w@)��R�M��Q������;�*A80,�[?�������)BC�
����h��#��+*���tE��@��"�U��7��������o�C����-6���!��6b����R.
x�p����J����9��6�����K��Akb�V5WA,S����i�Z�;mo@10���d��I�	Q�	)3y�FQ��4y�_o����!�W���h%����0���&��$c.�-G�cc���Z��1(,����:�!x��^����=���c�����O�h�/�=�q�q��������������sZ�Up�q������B,��U���V�=��F���! ����!�ka?`���N�����p|j3q�K[:J�����Hyb����j�pnV���TcZ;�
��f;f�mF�-7�
��{��*��e��Q��@���B��������8ua�<~��\�Aw/����C[��A1�	8�u�����4���w�"	���E9�hr�_5|K�f�d�T��<�.��;(i��
#�&3}�C�8�U��-K��bdB
W@t����7n{"�4�����R�+y�#�����N���w4}�x�@���8��h��B$,�F{cRo�G�&��tD	�$����K�]�1��ris����o��	>��������v��J���8�M�B�
�192����<�v_�z�_��I��-�������O�]Ag:R����������Fz�V����|`�#�}q�+/����T��9�.j�����W <�X[k�-�,��FW���9����u>H�q~6���)�2�JO�*m����~/?�mklk�����*�Y9�D;�bi������of/b��R�ewO�b+�hz�\�TV��&�u�� /6P<�W��)�<���	G<3��Dj1����*t��`��q�k������!�17���nH���7
��'�)m+��L/���X�������\=i�����T |����nX~�r#1�%x�_Qb��Kq��Q���A��5���Y����`�AV@8�l�(�s�Q�8������/�!�Q���/n&����E�z=��q���,c��a����'���������m�'��DSw@�'��#T�;z�3V�L�$���.������k@	���$��}����V� pe��x^g���z����R
����_��?xZovo���U<�qJ�e����]�l(�P
5�8z����z74���Q�'3mn�64�I��"L����;�k{���r��0�B!�v�]�����h�5I����ba������GH�D��/��BC)xK�g�}�8���BI{���-eV���	��)%Z������PM�;�������U_�[/w���^���m�?
�������K:>0ha��g��$�+���8��������;Q�t�X����09���d���p#q���z�n�u�&v�l�J�z��
�?�K&���CVY��}�����������k�a��4�����g��������K��>1����e�������Ub�:�'��'����1������1)2�
��n.����X^t�8�p�WD��(��oK�S��U~����)���{v�Yi(�]]FA��N����H*�]El��_x7��/:K;�.���K��c,s/�8�������'�Q���c�t��f=<�HFU�i �$�K&�Q��>����JO������!
Hi^"bl��^�;�����87�Cd����[��vy��0���,������@�����p���!��;t���*�'���x��� ����}`���RyR�V�}x�J��>�P�.f�Jh���6�]�����Y�k�oT(���(��\���ff�w���U�x��F����F����{e+�	���h�
_
�i��2�Y�H?�P<�����=���a��
������c�4
?o��[R�|��@���L~��h(o��:����l�
Y�F�5L��+�=�T�nv�������q"��N�D,Y(�+��������n�7���3�����m$�T@��S�������,���"E����n��s�r�%3�����Q�~��>r�m�h��>����50�G:-H�������\]��B��|���N�U�v�J��B���I�v�2�"��L�mK�<��8*/��E*�G�p���	!���o�>}�������V���),�*���m��}X��w���.ms���S�\��j5�i�]���q�[PtB�~�I.�-���a���N�9���E�~N�����sl�t�K����yK�=b��7���
"�4���F�W�F6�����F�i��Z2�c��Qh�<��plTrRm�"�@�6�'z����g�{�:�P����Vj1���A)�7(,��
Gq!x$�'�:;���NR�1@�hK�e9,��5�P,�!�"�����_�&��Rq<���L;�*.��bE���]�s��
y��*XeZ����O�y�<���uS��p�V���''��.���4�|�W`�������omh=qY�>�6��t���%v�M�JaN��,��sR�
%�8�R������:��hf���^���v�OESz@L����������oAz�')�1��
8����2��cN&��Hn4]���T&//��w�>�_�KB|��?v����������kq��3�<����_a����L���g���1�^�
��+Q�3H��}�H��[�-��r0�9�zR/�I����{x�_�f	�[����'��fnK�770��q�N��`x��4��w x����~�j�2����!����7V�~������X����@N_E�zntr�H�f��M������/���n�L�%�K\���rLJH������6�M��cY+c�����rG��.��.�5��'�@�v~��sL��B.��!�=������@H	8Im$F�T���;�F�%�%`��	�%w�;��0k���������0������@$�b6%#r���q�gW%����6i�����xU�AH�o�M�"�Lq�t����H��>�~�T������� R�=�yW)�8���@��N<�����'��N�;�gE%��Z�C$��R�iN>Q\�w��8���7�0���4�
427��.�fK'��,�/�NP"��Sf'��b��1�R�^;������5������k�U�g$��w��}�TX���� ��*�V�T���Z�d"�98_!�z0IL���Q�i�e�Y���o��f
g��3#���x��������\�Imx�#���!�c���##ma��>;����mf�%�g$���-ysN0�����-���y�#�aq�C�:���BL0�r��i\�Q���U%��J.��1{��[�^pq��M�T�����{C�C�Ev��Lwz�����R��m(+2��E9P����d��U��A��g�^�����}y��j�2pc������5*�^�Y���t*`���foWO�Z=������u��$$��2#G��������J���O����=.pP�"��W��m��+xJh���p���a�X<�A&�,�6�i/��8�q��	���"��{����X~3����H��8
� u��d��������������0�#M��q��2��xz]���c�������A�_�;���+��|���9�m��A=9���$8m"����
��}�a�6����k��~{(�O3����<�m�����Ud�B��O�q��d��>o�?C8�����Iq�G��=�^9�uN�����T�9���b=��A[�����N��������]��
�rs��R�������g�h`���A�6P!\�U1��b�U��0�����G[X02�u�@�g���j�p�_}�=���=�S���S~����
��giC:��9(��CdF�Q���g�a�zB�o����PI������E��mW�����i�p^�� ��3&b�
Y�P����#�X� M5���P���#�2�j\��[�	x���������L���.:�T�Y�9������,jK�m�"�XpV�;��>J�L�F+@u������#!$���U�_�����;�P����-��Y�@$GAT�p	<L�2�B9X*N�Wf�u�'����O�X
@"��8"�9P���U����j&!T&���e�,��������JY�sU��Rb����]l���W������y@��)����[�.������]�f�*��
�{�0���F~�V���U<���u9����u���s�.���s@��bD�{%�������2�)4xE�o����R��������C��}q�q%��G7�i�Sa`T@'��YM���;o],YX��'(i3��_v�	�BqJ�g��|��T)�;��]6���Y���]5��j�,'5+�9AN$z%JL���b���P(���b4��	s��F�J��'O�����F�\[8mx�+�����Y�
�t|�U�f�`�H�y	Kdh�iV��5���X�-�m��y�9��OE�`�dM�Q�CLH�r$�+,`e���M%;>��mV[0��!���HN��l�$Mh���Y�����E����'����)!)Xw��x�)�,��	��P-�A_�r�E{d��G8<�������������zV��<������`3���3k��r���r=~��Z�`�^�H_������I_�~����[��x������������W��b�<;�2+��Vh���p�������XG������*>l
D	}L��	'F�!r>�YY%��,�
�UG�M;�w��JDCAMXt�/��pr�bg�3�8|n!������n��zXo�<uaM �/����_������r���wF���?��]7>)���q��"x��+��a,G��S�����vQb�,�[@��_	�;i��0������f ��������y�a���C"��m�f�1��Euv#[��f�h+�$�����?��v�|�H|77rS�O���R�%R5���$��8�9w��gw��������N����v�b��E�x��v���f��bL '{��z={TW7��#��0�.(�5�.�����`�D|9����kb0);�|3��`�#mM���W�.�C_��s0�E�]���2U���O���������W�Y}�b�1��4/&>�Y9q-�s���w����a����S��T��nG����������c�m�?8������������YT��u��D"VL�*b�V7�����������g�d�_�R� � �v�k��
f�
D24��wi/����;��)��3:���cq������|/�����FU���Y��d����	q�;���.+&� U���T���T�g��#i{��q�v�i����\��s���;�[L�R9�k=$�X��+�Q��N:�	���ia
$&z��S!�$�)��/��@4CB���JN�s�Pl���9��/��F�I�A��@E�9��H��>��'�oP6����`u5i�rp�W#������tn��m�a�u'�Y�tyj�
�$K6�R+�rI� ���[=��7��� 0�:���J�FRk�W�`MZ{dH����m���y�����C���������M�-��������"�IPf'��R&NM��2����|�����l�5��f`V�@9�s�.����Ad�����(9�5J�+������7��=���R/�Ri|h�r�+�%��8�5�_��&q%�qd�gM`�E{/�<-z�]���K�H�	�f���*d��C��t����#	X��K�^$5�)�Y�iT���:$��m�#_�C�6����gy��{��Xm#:P`rO^��[���5A����%p�����i0��4��G��f}��^��.��8~��&39O
�I.f��
B����J��]��Rj W��;�����*d�_���<Pw�
��$��tq��nc��js���o��@�K�|�	�|v��|??�6��������Y0��_J�U([�k([9�,���/�7LJ�@q����}u������p�`3�g��������h���.r����T�?=$
"����O����8d����H�'�@^���e������(���[�� ��M�e�����%�b�X'2�G��Z_Q���x',����0nF�NFT[9J������a��iy��n��i�	�_�.=���3u�j~eI��N�K��VI����9�"$q����`&���������V��f���n�]q�w����I��Him�n������S�j7Cp��nb�a`�@�/'��0��d
I��G��+�83t?���%~c�3�M��o��2�F�t,��d?L��!c�M#���~��9�	�)��_p(Q?�������k�y���{����N!���<I�����ix����(X��8|������{��]8���k����)���MSQ���k��[�=xG_^�YK��]�d�#!H`nK7q���n����K��v��+�e�?79I�}���X>�n�=6$����^q�@������������kL���O�%�� �!i���Xc�S��~e���L�����>���*	��
f-���3l��Qd�W%��MhL�o�
�����p���\��y���!� �i��-�J/���7z���|�=����jv���|�u{x���*�e�ax��1+s�����<�����m������)EB��
���;��#����97(,y��!$����FL�fNvp��f49�R��0�c�F��S������m8�&��A�#P�����t����,���4�����vb����H�<9����p��s����p���jXu9�i�wv����
�x
1X�:�T #fP�a��z����v���V!!NL��&Z�%��fx��X�������0� ���]�����~I�/�Qm?��M��h��5�[�M�ov?���-�t���.0��a*��;Q�o�[��?����Y����)Km� ����sS�9��g��-���I���3a^8�N��������w��n�������S���t�1�~����5]�&8��_h}>o�F�p�C�]B�N�@��o�%��Z$;<a��uB"g��+�b��]�R?5C������e
`��;"[� �-�\QO�����ij��mK5'3���z9�XO��<����������f�$l��8����8&�����OQ�1��DChX'b��O�~�����j�LZ#�_���Btr/��������9�x/a/7����h�rt���M\���� ��(���\{����~���v�zxw���z!�Y�V!{�or�S2�qV������N^�����Z@���p��^��cDmR������������W]-������9��y��� ���\��,����7|�;�vxL,/��9���]`} ��*|z��7�+C�S��P�n1�9�#� [-����8#
q!�E�K{���.�-
�3NT�r1`�/�t7AW">�����*�saa�q���o�gHU�>���(xsH���t�g�KB� ����,{=s|kb8u|c�
S�b�����?I05� �@��<�c�S��(x��_-���L_��+`�>��_??]o�?B&8�o��l;��%q_�f�n(�?Z�"5���
i����^���Q�����z������P����v�OO��P'B�P3����? !^�<[>-B�]���d��l�{<	���M�{,49sl=�����)��_���[$�	�|Jg�>d����kz�k��t����c�>,�T+{e���7��d\_�/��gy���N�%�G�uC���k��8��k�-�(9�`������`/�;������e;:�/6����Uq�*���_J�5n�e}x1=�n�Wf��^i��b��Km���n`$g���E��ht�o#����f��O
n�",hV3jum'�c3G�_����h�~��T�dp��D������wmV�$�r@m�b�K��u8�5��2B�d&�C�J2�2�F���F��^��F�H)���"li����{?]k��������
��e��z~{?y�����t������?[?o�[n����y`�>��/�5J	��jN8V����_��%z��}	��d��q�f��������m{U�^�}
:����N�Vqf%�Y
�1��y{�����$>>.���/��}�������r�eaQ���P����h�DB����gr�;j�?e�����!~��}����?����F�����n3��x�$��`������!�^J����nw|��F���?~�~X~c�
�������T[�	>�^%�.��S�lzgN���2G8
]�����|��d��6���~`�q
��8ngf
�/���n��`�V��/������$r�xb8!�eL�p�WH%�,�v���MWs����n����V�&���q���=�V��m�������z���������G���������c��9o���u�Ge������L��O!_h�-�Ox�>ZcMI@I�~���FyrQ�zl��J���G��u����>����Hz��-�8xA������c��(�+�p�rC�5��/��!x�#Fg6�r\�H��cV�C������'{��[�K@E���CS���Gg��������v�~�GI�)\mV��,wW�w���
�R�%���}x�m��f� <�����{�/a��v��e���>sQ0An�����p��Q!'��^�c$z@��+��f��q���u� ��o����w�_Y�������M�F4_:v��:��9vq.������3md�2�.�O�E�]��Xr0
��@�;�E@i�P��j�v��wc� �����Q�4x���>a`���dda����@6u�IJDW�9����"J��eQ�,3�.q
D��+'%�i����0�5��3�+g��K��������~��}n�g��-���a6
���N����Y��	��U��"E�����������=�nx��HR,�����J�i��������b�m���b�������m�����/�1�J��j�7i07��E����t�pF^���/��#�(��K{H����C/\��aM��{�N�C����.��A�b�,��(<L�z��&�Qh����������{���k)`��<!���8�Zq�H%�@�����#�|7.u���#*���k0�zy�rr!v�#���'���p���Wd�xuu}��<���^�����V����r�u9����i��
Q���6i�����tXw��6`�.�(������S�@�B)�y�0%�v�,�/����8�G.MXM@�����j�}���Z������,h�/������L@VGH� �b�+��[wJ�3�{&��,o�U�:���!P`���,�/���8����J*}��u�I�v�D��O��5-�"��JS���i{�_s�4?�T
�]�D�Ac5�Bk����
Wx`�
z�fx�K���&� P�$5~���������~8��$sd�7+7������c�`�~t�`�����K:,�8�������UF�;y�it�_
��$��9��v��V�T\`[o�g}58j`����'���Lb�������rY(���j�K�!V�E��0��@x�\/�VA�'5������7��sN�:���/.����U��G��O���nO�>M��1s�1^~�J�W������
B�E��T�0s?)�����H�]I~���Cl��������v�-�C������-�t���8�������%:�������U����9��������i������2�4S��| pP�\�Hv65]2�	u����u9*~x3L���8{}�\_&�U&�y��iN�sZ|^`�����8��eGE�i=��2fz�A����
QS�S���R4���o�;-���1���-�_�?XV)��+b�1���Hy�'��g������Vdq�+�(��Q����)�-����^V&o)��v���@�����y���SX�~D�1/���R�8Z�L��,��������������
��?��mO�>���������<{�=��i�����v6N�g�i��B�?H9�o;���Q��Q�Y��(u��Sr�������5.��G_u��b��6�"��2�?�)����1O�9�(F=��&��&����������gT��������������S�RxC��+�VB�{�Xx�����A��~�N�c��W��vW��3����9�������7��;�7p��#��(�����O�6y�������d$���y�Y=�I�����w���=<���4�}��Yx�NmX?@�a��A�����@��:Gt@�	����r���m��f�E���2%��s��,*�i-R�Cy����������OKQE��-�w9�\8	����cx3z�����w��y�� +�GA����5js�R���%e�%�YR/dV@P�?��}��.�A^���t0y)	�h�����qE�������%�E�!��N~b<AL����3#P�o ��f�zdM�j	���x2��P��Tv�+�L���4�b���H�hzZ��	��M���#��=
�-�G9i6���-u�n��=�S��HR��1��x�)[��W9��1�h�ae%R�����E�deL~XS#���I���4�@-��g��p&����)�B��#����S+t�Y�(����8��,�<��\�7�6�w�KSY�������y����(y�)�t�kj��P;:�A�h��k �Q
���Fl����}�}���.�M��V��ESf�O!#���.�wP����C��j��p�,�8�a6��L<j�tw��4be?E�H�c�f�����V�hKXuu��^\���c���no#�(n3�/F�IU��p}Np}m��)D�:��#��%Y�3����������SVSm=�j�9���c�&!<C�N�G�hRfI������tA1&�A x�����\)��|F�t����r<�mIB���j%7(!��QE�
_��q�h�5�e���U�bV���J�OU����:��=8�W2��4�����S��j�����=�%k��4����
��?�r�L$��?\�)�Z���>��O�2���g�Mo�������R����S1r�> �����7�X�	������S8��u����w�s=H`(r� ����}�� �d���!-�$�N|4�
�u����#�$q"
��(�F�(y���U]F�_����T�d��G��?A�xD.X�6S�CHd�qD��0����M��O����63
m���$;�'�c����Z:~�L���v�ZH��MN JN����!�e�"RtM	ztA`�'3��`[d����oJq�v��,:��Q��c��X5�C������������?2�K6$S�{5"[H�{����/����	�
�
��_c����y���GM�F1�s��^A}��O����{Y������4J�Y����y�C��W&(��S���*h�C�&��,j��F!�_�3T
���$i����g���e�[��?�m���bZz����/�o���������i�v>lc�Ykl"Jq�v����\�����X�
�^?��z$H1�m�@�2sg����r�33�������VcN��>PD�;�z�r|u��A�?����q
�����;����'c������r���+�'�#~�����Ln*���=;����J���$��J�(4���V��Z�����N3m���DuO ����1���)3]U��>�>�=!����)�x���r����y��mV�e]��]2��VRH�L1��:�m?�5i�l�G<0e\����tU��ph�������������-�x�9Kl���R�"���d�8-�P�0fr���
����Q�6
���rXt��3�t�]�2JC��G���R��%��K�5!�A��"p���4��i"����!l��J�`^v���A�����;7��bYo��#���(�0
ECZC�`o�����=�������D��6�|;~M��V#�>�����Q����j��S�W�\�����^�;E���1������;�����������L'bk/V�m���S^p��;�b�eF6,�R(<�vt�$�^Y����6S�|[��1�oUM<\A]��;H���^�!hvI�q?�>� B*�h��g�=�5���p��E�`XZ�����n���&b���������(��M�Q�w�#s������2��������J���dXNB*��nu���M�'~Z��[�W�^C��q�L�6������NZ�����o����
�����@���g������q�cn�������y��:�/�@��I?�.B�����&p]	@��Op/��L��Q����>������@J���lFL�/	Y�d^F<}V@nAB��/����<H��nM~D�Eg� ���]4��$����f�'��
C37���Q6��F�#��|�[��F�zV����o.2�c�@q#�~�*D(q��(�<�(�A8&cG�_�6Zb�p�tv��Z�)M�(\N�-�u�,�v�*�0��0����.���A�AN��ZG��"��o�x�0L��{);�\�������pxO�Sf���G�G@�tk��H�2=�dG�F�"W���w��6�I��4�q?�	���L6����JM�g���Fe}:�J�����j�a�y�"S4t���eD�P��c��W��SQG�3�SV��";o�V��A��'�����Z���,0��#h�L����-9����2<J����w��e;Pm Q�H�C��%O5k���}7���B��,��h<O�����<v���^*�>���>���s�S��{�d��������W�?�!^Kv(�C��J���WF����#�}s� �xa5��"��mhA�����'}����vH�,Y��jl�����kl���jr�y\s�	�_1�MR���P���cO�D�kr?�	n����C��s�r�i������k�!
v�Wz���2r-F���<�mo�n����n�D�j������E������g�&V�/�n0r��wxb�C���B�������w��(
����d'I�"9h{�!���o
]�_����0j`��B+���r�`0�%��CD���gQ���%b^���1��+����sSC�P)�x�^za��$~�*5�$����r`x@��_�����oo?�n���,y�1B	�fm��,a��Eo�^=������S�Hg�e��.��5Y
�Piz�������o�i�]?onV?�����V7���]��8�Aa%5
a���j�#^_��������yy����7�����ck��U]%���X<�z9��w�kL����Bk �y�����w��������Q�������@�4f�b9�.���pD����gRNS�jW���1p>��<�-J���-L[6����o����];m�>^m��kh�!~F{
���0��AD������V�WJ��d��N���;�x�H	-
J�mHRa�����i��hs@���������y��ze2U$1�v������V
���n���<��10����jV"����� !	����t:�p_x9p:����
G������7�eD+,�!�h-4��k-�B�o?<�����`�s)����3�(+�P��P�[���I�[�����G�O������=6O\f��A�����I0$�b����8���Bw�����O�����m���-��n��n��.?�F�ck(�4z*�C��o>��JmS0�1��*3}�����43q���7�M�!�}����H�^��!��o������q���D��b�����qv-p�p��0�g�h�[Y�4�oxT'��ww��_V�Vm��L�������&3�R�'24(��t�X����]�(|������2���'�{ �� ���������������,���WOu0� �U�j�<����O�0���aE]���:��- c�lq]�5b���������?���j�C���jl�d���Gf��&��S�wp����Vd��������y��3��K�j�����z�_��>}Lts�sP�3����]2j/��Z��l�>24��7����
�~��!�Y���YuL���]�|��,��15����l=0���5$3��2�����r>�����2Y�d�����)��0�l(zwH3\�S;�W��k_�tc
pq���e�`y�WP������ww��=�����O��M�*"x��m]���L=�]i�9��'1z3��A��/��uw�����_�V�r���2���|K���N��c�=�_D��i��c������q�i�����f<��3�������������M����O}b�*��I���zjqvLT���4���/����H�c��w�Z$��I���s?8v���
��-d
`��}s.cr]9,�'��:���Zn�c��"���Fr_I�0-�X}��4��
��T�� �����$<�6�IX�n��������6�~�%�R<W������j��S�X:�n��Lf��g�-b*S���=2���N?@���oY���D�F���KFj3�����\i���VuWu��Y#���.A<9�����N�������_��o��v](���e�����	eo]����i7��*��������f�zhGfd]Hx���RM��6�F*����.�����y���7C"DC/db|X
����Hd�����/x����|����0x���������9-�ov���%��v����������_�����W�A/[��#��}�������5s��x\���T�/(��`Y9�Pf��	�����p�Y��d"a�Fn��NM��C�����[�']����q����T�{q|��1���������[9��t�x��]A:�D���])���V��E�E���0-���p#YF������ta�T:N�������/�.��/�fS�m��S
�9�V3-�,$T7�����>Ex8��t��{����=����bdE<����x�q0R<S������">��?�JMG��H�BX~Ja��t��"3st��k5���)?^�������vo�1E�����-t�L������}�������%H.��~�|8�B�mQ����~�y;���@<_;X�����
,4�}��)��DQf0���/x�Hd�0lEd	";L!�H��i�L(�M�t6a�{����`Fa�	�4r��������_�_����PB*��=530�yq��'a0o=VXqu�i�)����n�B��u��9v���4/��G���ec-�������r:��^�I��U)$1�o����eW=�M�=q~1����i�S(�kZ��5���i[1q;���R�42{��o]=D������S�hjnP��F�=�����q��F�m�����3ux�~�4&����������:5�#�,����ND�
�vR��mg���`���~����?�
��g��� � ��]�rz�Z0���B������[\��R	�k9�]��k�������,��E���n���Im1��fC��S~��������!���T��X`���W�������j�"L(r��E�-{��3�E�=�����w�?����YE���C�8e���%[����d�q�H�����q��_�JY�/w��Zv9����5��@�*�/�G��)m�3.53���5��ID�f�0~����xP���p����$�DQ/��p9�|(r^�Kd5�����r���7B.6<��"�ej+i!��5��Q����p����������G����y�U,XY���
���RR������z:�iM�Y�D����N��"'���1
�_��'o��a�K��f�3U����M;�4�N�����������m�����X� a�04wlb�9.a�u��`�Qk&`^�a^��A��D�A�]�um#&���*N=G��#�`#c�|�p4]Y'JD���q�"K������f��V���J�W�A��M?��~�j]���������@!"�4C�P*�_0��%�d�uO�������{|y<��c;jV���#?Og �������������J)I�[Z�t]4�����G7���^��n�)������xz�v�)c�s(H�2�
#��/��t�O��'�P}�������f��+���l���������]'a�����o���{q�)��*�$�k��9q����9xH;O����'�M� ��,kY� H�p1CXd���Y%/s88$xr.*���\�����K��6A��i$!�DY�
�V���/��;�f�����D�/,�f�����

sk�����e;,�hd���(�2g�P����~�>x�B��l�7R@Uq���3@*A�(�*���`J\���)�����a��2��1M����}���/��eY������3%C"{�\���o�RT�Pb~;���
��-8�����%�N�v��Dp7W?�T��G��	��uhC!��m�X�
���\@KaC�Q��k}5@�rE�R3�:�k��v7eT8c����25���">�oz_	�!��������.�~�V�")^������w��/����C�#J��
���5��M��"���"EP��H��h������{$\��������p.��#���9���Y�DT� ���?`U/,&Pt"G����l� ��v�����Q�3`=����4JX#�E�~�@��aF��6�C����������[A��my�����V#�p��
m����LFD����w.�WRo�R���:������#w�pxM��J�D�O2d+/a`�m��mu�[o�* KaO���>%�~K2��\e���v��U����G�@��gJ�r�+Bwoe��oQ��Q������Uw��X���d�F����R��jE����|�]�����2��������T���j����I��@�^�w`���� �b����<���{���m��;�9��pE�� �O �s��Y��0���U�����"��t����O+!��-�5�����V�A���������f��3�6����jK48����\��<�}��GB���q,��d�!�A��K��f��Jk�����2'qb�8g"-}�7��ax�
�@$�����y������u��@����_R+���������x�k���0���Pu|���rq�}�����?�>m{�m�!N�5W���]�2S��+��U;O|\m�L�'o[m�2R�c�a:���W����v�o��tl�}��ow[����6��f]�QFf7����
�s}���
������hH��O���F�K�������V�D�or��Y1��B���D�j!n�+���k7%��I��N���63C��rEX&11��X���������������Xi}T��#6��E;b��{���c����"��\/��ggV'd�z����'��DX4�;����ul��i���o]:Du?�����]��=�}��<���_��6.��y������p9D�*a)�i�����!��,2��W�G�����9��"�y����G��FAV��XX� ��]T����/�
��U'�^�@�pX��K���2����y�2�-C��+���Y�V��K8h"a�>���RA�RmI�6�|�����L,��w�W]�m����s�X!q� ���,��4,�~8��t�El,��O�D{M��=Z����p��=�����n�c �}����x8�����~��t1q��/��+�<��(���-���2���]��������9'��������M���a9tX_�,Phr8*��|�z�<�qI��\���>�h^�
Qm�t8<�x���g�t���g�A��A���&��c��5���J=Cx����\ �u���)�g�������a�*fz��y���W_��F��<%n|��{a�B|���7jP������jF����2�T��c��$k��z�IeU-�����\=�Z@f���^�-�}���a�#��%5��E�F8,����q_��l�a^�k�AN�o�@w���
��5Y�J
�������W���)�,���"�����������K�H��R�|,<�8d82�W�c�eK$x#�z��]h�?Q&<z���'�tb��2�	�qB�)r%��b�����ZU�X��v"����1��GM�	�q���"m�"s��]�����pP<XN�)3!��N��q���mV7�c���������n��Q[/�i��k��3���R3���u���W�vJ�
1�A�Zf Q�G7-`��Oy�
D�k����w�'+E`l���<��Nn�r�+�x#������M��~�_NNxOaN�O6�J}�[��v1������su����<�pD�#�X�WSoQ*���O��{vl�H���a��G����1�(s����%�h���v%p�sE�����r;�^2�<�e��fH�J�
^��+��d2qCV��.aS��&�����`MK�
A#N��(����,�e����?���{�d��������Hf�xD�}Z��-�q��2�����m�m��)�'R���R���l���C�KH
���2*����u�-�6�(��E��s.,3��=` �@p�HJ)���77����������RJ���YCof[;��m�@��U���QP�"�%���N��vz��W\&�:G�����41<TZ8��/��a���3������.������r;9�7��aG8e�=3��u;��������0�W
��]�H���#3�"�.�l_��7���F���$��{���[�l�8�����SK;��4��z�"��<�<P^�q(A��f���E8�#4����=�|A�`�G9����c�/7b
8�&�'�Wx������
���H��68�A
�ZR>y}+Oni���7���G��!j�a���N���F�
M��=�q������L�A:�)�!s������N�W�r�h���l*������>���@�Z�tl72&,�HR8a�GL�Gq�r%��25l4k�x�X�H/�����S�h��m�9\�_Xu����)gk8��K~
>�j���0�v�����E�x>�W���d�RgeX�H��%�Q������X���U�}��J��fi��CP1��;���C0���8a��"u)i
UF�]�o��H���K
/�������e�k�!��68��7�
�� �a��}�U�6k�|�n�L���
�����N�p,7��t����?V�3����m�YS��NxR�@�N�dO���_z8���wO^Lh�b!��II'�6���Z���G��D�-�F�q���*e�*�^��(!v����@� ���;���=�>IN��=���MD�U��Y��C���zgc
a:/�]�<]8�`��ig*/�U�?��lt���n��o�GHc����Hz_��e������~^�e�*`#>���p5�i��.�f�13��Bf�7�|/39��Y���O�!��f��!:���z[f�~R��q����,�������E0����(FpL�z8�ak�g��vT?�B�V��8e��7���C�o��������s3�a��z���BB2�"��*� ���I�NHa����R�����q����@�������,��S���w�b&)z�V�M��a(�,�.��G�����+%.��\'�,~"���5��aK��`��(i.�ByV���R��
e(��|K��6��8�����_���?�N���G��5-�V�*��	����}O�
G������s�qs����E����t�� ���$ca/�
�
��l`�������	D��L{���6'��!/Gt�����;�x��*N�?� 2-4	����
�XM����L�Dy+f��)e�i\�(+6�^�Hd��)E��p ���2W{���uS:U�@�7p���G�mj�������L�:'#�(@��~!�#��V�J$7���-t�B=�����^�2�Y2��|�M���O�!�B����{J*~�t������9v{�UhK���iOm���.q=�|a�Xq���O�ySD����g�%I���GYlU��2
��??���h01�2OP��r�dt����XA�������wj�)^����s���B���������-*>g��1�(0yi��s�g`^cM����5������8���Nw��e�g��8�bi"�t_]�Z5�7+d�.�k��������1Zo�\5�=��b�����7�K�K_���A���N^���W\R`HQ@�����5Qf(�c0����
/����6����z�A��q�y��i
)���,+`�R�i"poM�!!Mp���_$\��O�����a�K
������X
�r,^�J5��df}s�������?�T�]MJj�76��/����.�=����P��X��B��-�A0�C������W��7m�2l���=;��
m�E_���R�����2A^����_����4�<�5��3d�o[�s���)�ZF��7x�������~�~����,��2��[o���H(�4lq�p�*��[�z�4���"�S�R����������D��:��M���?*����R,����nNy<T�3c�r.�tg?3���L�����y�h*�|����h������44_� m�,�:b4�����]�,�d���C����Tl�\E�_@O_���~n[V(n�������^�o�&L�9I�jz�G��wO7o�w@2$$5#�������/� R����U*�J�o�O���
�AA��MS�H������0������O��<����WQr���Vd�]�l�$� J>�
1'��0p#$`Kce���s��o�����������a��8����*��Ti/�4�	ojO�n�9�U�~.��lu���2Y��:����Z�������hu�����s<l��Y�^��h�n�3A������t :�M)�J����p*�Jpy��?��Y����_Cv'����g]���K>y)���U*+!��f%����eC'��s[.>o��������������|�����S�E��{����
#/E�3'�,��7�S����)+=�h9�&G�^������?����fn>�?x�����?=����.�Ke���	��P�����d!ln�^����S�7�pyp/]��p�������b]j�<���\����/�����b��K'�:�Im^/oo�����\9�p���@�>���hf�"�t!��E�8Jz���S�j=3�d����c�IJP6��_wIV����}���t�yL��h�;��v���A8,l	��7������\]1�������������i�����H_!qC�]���3@f:L�)�+�^N�����bp��N6�0��L+p�<m�w���A��_~I�	��IT�^��{�>���)��H�2��`��X��f��<@�.�X��__�@)����%H]����*`�u��;��l����`���1�%A��D�oT�����ej�(85]����������H����m�A"��i���RqV��)�2�`�v����t7nz��-�}�4*��#z=eI0p���>\@��a�?�B��\����`���m�s����RE�6�*��0�
����:�Q�U�C��%��J UF�r�M`uw�PI�7��v�&aM��t�eDa0c����������kZT�Y��D���PG�i��HC
J,z��J�����*���i{��e�1���'�~���+ho�2s1@ZW�f���@�������i�����oW)��T�k�a��o�\`��t��L��x��hG�xq�� �g����$,���n�
<���%�<�L�����A�(���lC�!f�GhHv!{�X�d\�|���������)���(�6�*�T��-@�T��3���WRmO�s0��A�j���=��Q�]/��7�k�� ����?~�������9B���4<+U��q��?1��BP�U�	�h�_���)����O��	5�����(�.V�l�5c��F0P��

i�������]UP�H>�a�������������\D���=\���p���w��)�S.���).���zpx~x��_������r��Z�D�T�[����<l%��7"cVM9l�C<h���
����x
�l�������Ws����~��V�4�S��k!�.
���oU11����7���� ��..8�&()�b�U����)�		�Q�8�9Ot(B��Ii�1��*%
Z�b��u��%K@!�m���g���(aH����J�6R��Mb��>��E��Hg��p
g������l��s<#�� X^����g�s���v�%����g#:�+.� ���y��]d	����v��x�4����7��\���I����S��[��l�������Z-u^i��P��|���#���p��$�"h8^���-
!U8s�:��LINt�{��p�R��91#���A�J�����O�������^�r�?ya��/������gy@�W(_G�T�V���c%�/�'y���1H/K����!���Z<��k#�g�S��%(�C@w$Vz�0��c���)�����Pd�� >~|��6%q���q��F�{���d���:�?2����\�x������:D�T��������7�>��#_��b8��&�E�J��(��$5eC7e����n d�0N������"��C�r��$����Ld��@�������]B��#V��tu�b��*�,	��!;]�4��!��6�x����c,�+�+������B�ED���M+2������������8a������';y�G#rI2D��B�c?���0�3��?��Q����<{`��W����������+�$���������N��t��UT]�Z�|h-�R�v
��"�L���(�{�u���	�$�����y�gi��#����r�.�-��3����'�[x"�a��Z=������)'o����Z���N�.��q�
��N��F�0��
�['��)�	��k��'[i������8F�&f��� ��Y����F�!�z�y#�s� O�4Y����� �0^F��1���%e�f�\����E��}H��S���+�xBT���)}1�����!�� 3$Q���@|����������-!~b�E����nB�Zmo�X!��F��{O�o#��$��ii�1>��![�j�^~E.��
~������'�[��=C�Jb7�dcs����2Y��3p����I�m$����>V��DF���D@,�"h���g�������uj�#������eQJ�1�����A�<�y��%A�x]��X����p�
8j�Y��IU���S�����3�*S2�y9���lJ|Oj��
�]G��������L����A��U��$��u;��9�����Y������zf��*��B�4�����4�%}��%����z����C���[������-]�{I��I��;`wt �Ci��3B�����
=�6�;���{|S��W�l�I1�b�������
���!�e����
�OX�����+�G��� 	�I>����7�R	�����C��M��63M`D����q���)������x��9���29jN	zq�3;8�)K�:��������?	�>@�Z�:��.�97vFa��!����zQ�s�3�)5%���o���������u
��X ��@��<jk�S G��]k-�xVbd ��J��Bt���#[m�j}�p�-�.��g����W/_�������	B��{w��3h,���U*���z���zEB��������}3kk8?u�X���$w��P�!����OX�`�JLa#F�p���HL��WN��+
��cy
iE�|�]�s\��rW]���2l\	�������i���zo�]  ��/N����fn.���$���U^����W2�a�����FbC�p-I���L��Y�������?�2�u:�R����w�e�=����F����T�[�2��:y[(�1w�.�qw����d/u��g�I���&"w��������w�(��R��������i'�������k�O�jM}����C.i�j�gn��S�$�f���|��O����w^�3�	�y=_�����/Z(��������&�wT��p����l�)����gJ���#R��=���,V��y��_�w�y��p����`6�F� =��������{"�d�eu�F��)�/<�!���
�n{�������~��|QX�
�s���yS?4{pu��L(?C����e�}3�]?)3�4uHO'�V��b"��b[���}�0���Z��<lH��������E"����Xi9�n�c� �E?������2���@^%M�4Q�-�����[8���;9��u3���`��j_��=��mw��W��afnx���l������W������tB����v<j��cY��K�a*+�����z������}��~� �U�X�
�O��5�9�O0�,�rK2��e�w������� �0�
���S�=FK<�K����H�#�
��Z{��!�o�[a FCX �0��3����=|Ig���83&�3*Nc��(�x"p���������R[��6((��x���|������*���������(oQ��;���'��e�B�����d�R)�q��X�����3������!9D������1���U=�h��F�2:�|p}M�{�Bv'���Q��S�R����p�MW����uW��������
�`q�D�gs/�bej��US�z��"$^�S`�O��{���S�K���E���O*p������r�������"�����C�hi
�~�`"u+P8��iR�B|Jl{�OD�GT@bO�8���0��R�o�1���V��Buj�E�r�T����-�ZX{����.��/��"���=�7�~������������q���E�EPErF/���@@��/��*~@��~?]cYp����ZL�c�g�x9
�?�Y��$����q�,�������Q��x�/2�9����<�ph;(%��C��h���S5B�k-���+���n�V������w\)�h`	�|s�9������+��#�BE������H7���DSi-h�a^�!���@��u3�?/�����D�����0~=�.�������e&Lu3���9�X��NaW)��������{�	�K���6v6{
����6�9r��f|��2
;��(I|��29������S�p�������R��(g�9W�$�8z�I�$�E��\�y{����K�����V����]����Ch����������R�
�g�%#����Pc�Q(�8^M�A����=�������o7-f�T�Ho8Py�f���WK[���W���F�w��b�9x�����0����z�V��Q��Lc���C�w���n������x�)��?����g������F�`�'N1h����@�����B���xq/8:�M�b��]PQ��������|�x���X���Q��kph��GM� ����g",�L�����t����������M�[��=��,����:M��W�����t������i��X���3�����^i�AH���b��LA���C����,-R^�P�L;5TjQ��<D���V����nx����xus�%����P2�������������?�h����*��n�2�&ef��y^]��Gqm��t7EKw���L�����f������GF����U��w{_5&��B-�DQi�gRU�d��B�J���CH�g{t��&��0)�VO2V��P�&�iS�N(0�b�?�%�(!�T��������n����7"	�+����O���LnVb��D,r�����P��O�P.*��*k2$�����ma-|�����������r���BQH<�j!�����j%�������UC��lBf!�8����� '���G�R�i|
}2���"`�D����HK�
��C�����U4�l�`BxN��%��fIf{������?!em{���6�)�}�����(u���2%!����4f���^�
����z�������i�����"�p�P�BZ��r���K����(�d�ZvU��Q����t�Fv#O�"H�n#� �����[��_eG�Pz�t������I.�������`Le�)��^����VXD��#V��	��n,�WT�V#)��/�P�k!$D�q%��B�(R�������}��~��}B@�.��UG��#�y�8O�9k5(��Q�	v�7=��}ub����Gi�<(������
�'���z�c�a�c:/�[�e6��������y��||hu��?���]�����Ie���n��Q]�p`
d�G������_vm��Fr`���������5o�X����������i����rT���]���Z�"[��5�����Q�-@���?�p��J�:�r�"9���B�.O�P )Y�Nm��t�&�*'���{�H�C����~�wf�0��CD���Yn�����n����i{���N�ey��!Qad���0������8,e
e&����_������ljEB��0@	3�#JT\s!:��8�Tg������D|�B���@��0����>0�����������S�C	)2�*/t�u�C�&P�B�9�(]!���F`rZ��D*��Q%���hK���$���5��jb���Pzt��������������������Y��&x�`=� R"A���6�-��Y�X@	\^����Q���g�����l�$~6�f�����B9��`7��w�4�����m����C���X]����H������8��o1P �7�K�s�<�0�e�i�;T���X��	���X��v���g��DO�,w��/����*cC����dk!��S��"X�
S����>=��l��^=]��j����t�}����$�|�6tq/��1�j��BW=��\G�^�$�q�N�o������2�1,���y]�+J��E��",�C�]z�$=����U&e]O���8�������{c>g� ��6@�J:Q��d��x����[C�����_����B�W�-QH�A:aa�FBY�
JuA[x9���K&�[l��l��I\sL���!{pPNA��������4�#?N}����?�.�`��:Z
����v:!vy/�A[YL��F�����I9����}�>�wlxH�������}�	�NG
0x�����#`&w��tu���O���7�G�����bi*�R�{����ee��;.�8�d�mM�#X����cs���vA4~�����`sW�0�e0"f�k�'����L� �N�38t/�m��_�v��>_[&X8���������6�v����/]������L�j�2as�@`�h��D��W�����n�.`
�*���0��`��������o���F^b4un������2aF%{S��r�����;��$�eG����8�HI��t��*(��@9����[Y����~�]W������vHR�����y8���;�V���^����m�s�;���r�`qQ������YS���SD8��.�Z$���.��"����U����H�^��0�s��L�����Y��rF:i/��t���tX3��� �eu&D�?���.���#`�@�zxx�^^�<��\>��a/�	�ns\(7�eaO��Xy�lI�yJ�XoI@&�*��.K�*�����g���'�
,#�&��s@�E��A��,�!�
�5�?������	�^���}��g�<�~D���6Q0?�Bl�ptyb�&?�K6'��X-{��yo3!_����������W��7�wW��Z�9)6[]�,����5��tX����������t��H\!kO\���x�f��BX�p "����6�4y�*
�D�k���Jd��<X���Db{g�p�}x�]�}������Ofp���r�����)�E]�2������������O_����q��
K������ �J�"�������2�d92���������o!���&�#/n�������������hMD�$��
���1�5����)�d���*��s��s�������A�(�����B����)�|
����%��zB��5���5�P�\O<�.�$\�Qx��nR����F~��10�`��P�����C��8��^?�4���la�4���0��T�t\D�D���
��8�����=\��?t�{s	�c�35���/t��q��9N�!����}���x������Q�1{��	��GJ
��B&'����-� og����OO>�o �G�����W�|���PXCpU�t�"�����y
��q
T�Ao.oJ�"f�C��
q��E����=$�{6l�������c�DoI�4�'����|�������4�z����E��C�c�l�H+���Zra�A��
��,��dWx4�Q����v\#Kg�%���.E���1�+`�=��N����������D�(�,��;,��v��i����f�
�WaZjP��_�����Y�|����r]���V��]n|��E~��M�G6���?��2��*��&)h@X&n�t�I����� �-;���
&%��cM�c�=�?/�Ex��C���n!u��Z�o�����>���<DFmcy�`_d��;�$; D����/�M���{Q�4���9'Tu����$((q����O�~�3ia�h8>X\%S�K�����������s�/&a�S9
�T��z{+X�������:�4,X��w��������:��,T���7!�Y.�J�LP�rVN�g{�=T�����7�>m��7j���\��FL��}<�e�7w��������=���#��y���Q��E�g����(<�TLb�:�)s�&#�e.�4B�}�	K���#��f�7_�\����fS����`�8cT���`����e���LJi���nj�hj�������F<�h�F�EqYNS:kuq��o���J��/%��:r
�4�v1^�MW5A���8�g��a?������^�:=}���^s�RP�Z��x��I����j���sNP����|�E|xZ��3�.�����q��ntL�%��./���J���P�z��
��s@�yV���OImf�L�O!(�<zS��/��C�*�����M��N/�5��eJ	�?m�p��n���7
c��OO�>�)���Z�Q�8���E(�W���y(��kq
�z��Q�
�z���/��H���]�=|�3�D$�]���rtAvg�eQ
#l:���g�\Ba9�(	�U�x��l:��=��+�f�����Z��!�~Y���l~�'��*��.mR��B�#>���i���X��1A�vEK�@E���
��B�4Em������G&<��������k����rRg�������
EjT����[
�\0��'�0��_ ��2��g�cK����`��E�D�����I�������8b �c:�N�������E<���m��~U[e����=Hm��J�|��v�����vD��

��O�B�����T�\��1�"�5��%�Z��A��Li�e�ZiA����I�>.x�P8��'�t��S��]7����}"�*���C�T��"t��Jl$o�����?U8�J�`JlG%�x����E������$W�J|m��+9y��%���<�9����G����������EAY�����4����#��\A_�������Y"�������������������	�a��k����|>@1������{��Q �`�
|�	���id�o>�@1��8]�w�/1}�������P��6v��>�����Xb=���Fo���P��KVO���&��1t�|]���n�����f9
�G�O"�Y'F`4r��D�p��F�	��Qi��Y��^jv����s�o�XLC����� �]_d�tF9P)F~z��	������Z\id5�t}]�w{6*E����������+8��.U��T���
��?~���}�z�^>�o���k��;�������~'3��k0r��a"�%	�U����J`T^(S����@��P>��}�e��ya{�"�!GAaZx����X���:����2��4<������gs�A�Wt��I��Uw���@z�W�s7i�1p���#�t��#����RL>�E��u������ �:��#N���*j�#�����x�h1��t#���?o��x9R���\K<e��w�+��H���m���t�����)�2�c���Jv�L�whE�����������wHh�,c�_����H����f�����v����M�
�x����Di@�?q�*�R���� � D/��y_�oC����w�PF�#���>��qs�E�Nr���d���E���)��������[{�����HQx8W�]��|��!+�P��E,x���v�4����U�
�z�����*���z���g.����`��Hvf�1��PFbP�O���#��8D��S�IY����������g��/w�/�f�+�O�/-��<��8y0��M �����������8�����2�m��^d�S�zn� ���sSY�P�
_����2�@���+����Y3A���:4�����5j����1*
��2"���a�V�P���qPi�.1�e�Vm��k�;Pz`v���\V�qt�����{�_����V�B{`�M��R�i���Nf��h�xIi��*�C����.t��������4��Mw�������0�>����JC|���F�����?���~����M'#q��+����e����g���i���W#�������=cq����,O����J&z��R���pQG��G `eay<���8��n��FN7��un�2=�n:�4p���cM�F�����F���P��+���WO�mn�������0%�������8K�6f��/	�r
���w��^�2�^�bq���Q1%����/���*��z	��a�t�D�xY�<*�:�tmM>���u���7���9�8��(���*�zu�P21n��Sm���qu�'''X���G1h�b�����pR�YM���D�'2���	zF������1�&��<E�����&�U�t�e)"�1aF9zy���>A��X�m$���u"���ng&P(�B�L�
���d*��MV��,�����)#�`�I(9��	�����3I����N�%�!��!�EG�t�u�!��c��bI{��6���^������V|0���![zCmIR�N}��������6�w2Ae4�$�p�X)�h-X��Q���N�B��$IUq���i2-�"]���>�G�H(�������r�qP�#����-�Rf8�s��o5 +]��g�f��8�u��X�����������x�����0�s�Y�m!�5��K%�
A��Q�L��B������`���l��~�z����_�A��@��T���o��� M+`��f`1R�	K&x���1J�Z�l$q`�VC����o1@AP!y���b�}�><���3�6y���0�O����G)�o���h���j�J���^u�j
�r�
OE�+yw��<\\�
L3�_8	���X�)i��@S�t�l�����e�lm\�xL�O�:<��w�� ���A�+���p�������!u����W���
�jg�=i��+�i��JIP����]���w�}F!������ox��>�_�m:�0��L��Id��B'�A����-a�	�5
H��>5���+f-��"��t&�k�*\���c]�%��Y�)l��y�m��uf5�p@��xV�3��:
RA�v��.�WC^*$;"
":����Gqk����7/

2��z$,oU!�b\-���(�R�X��~�w/?���r
	Z��������;^�WNA_'=������O�L��iY����QM�Vj�vtA��vi������=z�l�"�t[�j���C��%3�����q�O��Dm��C���D�E_-���Y#����m8�@�d���d�������X���c?��rXB��>e����z	h�Q/C��yNWt������?*�C�b�J�����n�[^=����zAq���&n������F����K��u�A��������UC2�GG	�����������O��U�;y����s����o�������
���'�H�E��T)� d0������,�U��9���w*�!	%c�iT�����t[��a�fx���"��c��3)�������Uqc.S��FyU�[a<D��
��#104��e��[4-�)�������O�P�~�����I�/".�v~����������9}r���-���*�))�G?w<k��	R�H0������r��#����[}��}�<����]m�F�Q���/����8
�=Ed���:kMp�m�C�2����,�up�fKx��s����M�,IK����E�,���.*c"����L��V����X`�����g7P}��y���S���G������n�EG�N�6?����v��pY.

�����wOw�?���>_�o�PUzl�,BeU9?�F�"5=��
LV����Lw�TI��:��t��;����|A����dT���&��P�U�`��k�q	���b��=���%��m��L��"1�Ule� Q!ui������Z&6o�����1X�k��L`��`]f0��A���=�G������-Dc3el������R|;S�&���	���Cvp<I�����~���q{{h��"��)z�b�d?<����Z����A��%�+���l���FJk�u�e���'/�1�6 ��?l�7`������d�d���y��������/�0������#��(����V���C��.#6�?�@�VS`�d�_o;�z�=�\����������fz�/��b�~�����W�YG�'���a���68��o~|�����������K+a�J6���m��,����]Kc~����5% �`������8�������B��=y��0�B���E8��o����*S'��7wwW�\��?v�"`�b�_���Ww�,�r�^�2J���y����;�����\�"J���w�7�\�����V*�RE�H�$1�_fl�,�>c\?_��q\�H
�WY�i�=���1��j��e�C�����Q�8�}�?mw����"_Y�c�5�84���������?��~�r�F�oz��U
��*>s~C��h�����c�b�+��G�/�L��"�j2���`\���*bnh������9d��+�%�$n<-��Mj��*��!x��Q����f���?�v���y���T1C���<_n��S<~5�q�-\��T���#8Bs���1p}�B��bwc!)�O�����s��b�z-�u���abw"�'f���J�BX<G'�I��H�����9���&U�����������6����F�*X%�,�4�$l
�F�]�z��q��i�k�9px�iK6�R���B�D]��b�l�P���J%i�~Dn�P���/�w[M}�C�16^�����<��]5�A'�����R����M��q���8C��CY�/���_�B��o������p��X�1���VW=�Nk*���^�u-/U�[�>��-�.����Xj�H1�����%k\�`��k-�����z�D<�	�<��5X1�k�����a��8�Q�1nI5pQ����	���2�f��:�J��g�f��G���b����L���}<C�U���uFxh
�,BLP%�/WF���	�eKln�\hP��E5a*I�	�+�c8Q���9m�3�*`�]��iDk%�i����3�>�9i�*h����9�������XAZ�����	��Q�������Y���
f��Ds�����"�t��2_�&L�/p���[_��I�S���N�D^�)����.0XBf>��m�[�kb��d�bMC���y�Ry	7�P����iVB����������nk��3��0�g-�I�[���B]+*Wj�^��O����O�\����;(����YiJDT��W���s���8��|��+(�QU��A��<���X����D(�
��r�	}\5V�]�:�*�����6sWF���BN[eyd~l�T�|�&���cI�d?��7���6�zT[(+�U��)@����=C 5N���~Y�E��d3MM:z?(�����0�*K*�a^?A��T���L���MJ���.*�:�2�����q����@��������C��L%�k�.���C�P*��b'����`.���(� R*��WbEIK��9��]��.���1$*my����V_�T�����zGW�
�����WJFA�`���������:����c��-�SX�Z��G'9��'�����(x��tW�k�[���b7u�s*���3������ArI�W�yh��K�Z8"��p}��+�t�������F�/��Jnc%�fq�X*_Q=q���D�]!�������&�/���z��)v����%������=n�������J��SF|q_��<���e���Q�S
��oK��$������������s$I���
'��1��^`�@A��@����Gf[F �����tG�U���"�0��&1E�j��&%��0~P���(|G���$<[!������>K�c(�����	�bqTY�5�S����������@dM`�H�]V��q*
���L��!�g�?�R6����?�s�PpO]��q�I�o�ol]Ox�]04z'u�J#�Y�+X�~���z�����xu=�3=��]�	��7d��9���{S��-V����"w�����pe��
��V%���'�d8���o]C��<�+��Q���=yk4S�u_#�1�i��6�m�����Z-�sl�)��L�����S����*�L��u�4}C�*ea�VXa�W���2���4�4"Cb�REs�cc�������)���f�q�r�����a����>j��hP��|V��]���7�,w ��jvZ���Ad��R,WC~��uEM(B�+����7�
~^���#�y�L#V�n���*�Ux>}e$3��#��|�^)���_���������HM�k%�cNG�*���D���i`G����/���O���vg�b#Wx�B�����svq2�+~C�nC����UT0�����B�^sC�#��G�3�o�����P�Y�vGi#����/�����s'vP9���j���
c���^�_�K��3@07@�Y s�
Pk,v�\��N�]����@/��C��4s���(Z��j�IJH}e��~|���]�+�x8�F�]A�������Id��s������OW���y����5�J�����V��~����qe�K�%��r��:�}+d�Z����z2�^�jei�su
���-��}�7B�9�ut����j:m���d�\�DTM]�����2���bjM�i�,C�GXd.�)Oc�gq@���C��7!�$�;����A3$�~W��W�UJ4�o���7
�G�g���5��OF���pa�|
��_��;���~��:p�F4���N���!��5��DN���������{�.I����&���rh%������%�uc���Ke�2]����KW_�
�H��Z�����\s�c�Q��%�{��G�a��8�\fk{U�����*��o�:�sR�O�&���K
��^�^j��`(oZ��OD���p��z�A�R��n�dd���D��}����RT~8�{e��q,!\�,���h�7OLr����F��Im�~S @��C\�U�K����5]�.h4�:�@)�aX�����7�9�����
�C?�
w
�	j���l�+%�;ZB��'�FeN�?��^+�4��1����xk���;��<N�D��b���#�o�-?=�����}kK��A@�o������'x'�W�;K��/DC>,��SD��e�[c�-����=��[(+��������9�P"2�UNL���O���*;�s�y+$���m����R ����^�-3�z��rmp-d":�B�SY�G~�"�
��cd����ei��A�n���a�����oz��	TD��r\�|�5c���AA/J�����N�l?L+�~��{������IL���ec`(0�dM��5"����J�S�D``-<��IU:�o����Q��6	�������E����;�+;�P���DD���P8�6������JN��x��r.��S��D�}�����%R =����Q��,����^���|Bv�'0����lb[��n���2�����
n�����M��bd�|�AM�+IP3��&�Z���4y��1��H&����I������k��e�������e�"r9IL����Y���������q�����`���5��F�U	��7��@�����o�R%�P1���#P -�x�����6������h�pYF,h��0�
8���Gsq�R|u���i��v�i�{�p���$��6Z���]p�P��*(jD1��c���z��T-9�8a�"�UA��|v��e
��4cG6��M�
��c---[-���6�VD��Hb]��Q�������zJ�M��)�CO^l�~��F,m�.������{�O�Z����TI"�]���*��?����'�~�X7��
U��@m��Z��:�7�*T��T�BC����-k9����f2*��������H���w0Q����d����R�JBi�������������������7��.
���tQ�"�#cH�8��m����}i���2�
���Cs:j�I:�
�N��������E�����7�s� W�Ae"������Gv��zd>�)����:\sH��K������$���5

(g��q����*hFn��Er�|�/-�+�%�!���z�j�>�N]�=���P*��Wf�4���J&����b�?��F,��d�4p��K�BE5�W�9lB��S?X0u�<8F?�XC�%6�sj�<3tV�"���k_Q����_��N�4[�=�����X6ipr�8��wj�qg	������j�k�ZVCb��F�P{��6+��
C�z��+(����j�i���V�{������\������������/!^�����)v���I���	�se!e������m'�dB���}��D2��8���L���J:#M�}ew���@����L�t�@ql�h��XP@�)�,�#�P�-��&�
Z{T����(�����?�i|x��w9��I�HF�p�)}8&�����Rf��k?]��O"$��W[�AZa6[�@\����a�&�
Z7��l�!#FMIe��4D����K�k��de�R��RH�[�%�w�
��~���_�H�z�'�RB���,����a��CO9��A��^�$�;�m1��J����C��WP�=�����_���+��]c�_�`��oD'���gv�,>���^��+�Sz���J�����4�\��Vr��.�@��N��}�<O�-�
���U�{��_�����Fp�R�M��nw�����;������p��^������Q��H,?�k����\'���uIF-�
T+�$HT�\L&�s��I�0g^Ad���&I�
3�L�h�"M�K_��/Z����$rqx�PJ�H�J
�V>$�+pp���Y��bR�@��0��l}x"|�Y��M��az>'$�\8�*)�K��h��������i���#�k`${F����,n�~�E��XH�
�L)/P/����)dd���O�aS�"�� w_2EW�Q�b';�Q��&Jd�������<�d���������������^~����3�IR�/��Z��`N9ZP�����OO�����\�]��tNI0�bB
�bH�g NH�����T��z�E�F-������/ic�����]8F����t�{����� K�u4��A@R�\���)��#������i`S�gd.����qF���<��Z�:��a�g�66Y�N|��p��X�JB=p����A?9`t�vX ��<�;��9��g��[?uy�.�SIKZ���/������������$�A=�_D��
o�EMk���h0�w�w�*��i=���t~Ug������{A
�����noEk�Z�f��[zBu]�6��m��y�P���G���w��^��yn.)�%[x`��w�h �%M��DI����<Ok]�����]���!�"-_�8�&��U�P���Fqk:-(,�b�3�0�dK'��]>o�_�nw�h�D���1�|V�	�v�b�/B?`���K�#06B&�B�TS�!1,R�Hm�#���D	�<qQ��V'���qY����z5�q)7�����h�m�,|�?���#���� z���Z������Ny���w��7`.�
�Mfo�~J�� ���5d�!�4S���:���Z�RUE�@������}F���&F�l4A�  ���������5����$��P{72r`r��tUC���� ��H�K�5�\�&�
�T�H?M�2-1����!��kQ�B���IP!�����; �Em���\����-���!��HI&�_F�
�w�F���QfL�X�r2���i\�!��W���,*A�Wy�c+X���B��$�i!l@x�ty��=\=�.o�������KZX���N����z�V����/�?>>]^=}��
8 ��'J=<&�����\�;���h�86�����*�L���N� 	WY'N�"�(;1�z�g���V�+G������e<�	/�����c�,����O2W��sUD[Rp-	$�@xx�+
���Kc&F����l�f�>���U������7����(|������]�n��m�p���HH���QRb���}x�*��X�_��c;�?#�Z\L����o��A��g�ddgmk��9��T����Y�V>
~��dPP�a������{�d�W�J��1y("{�:�`�]�@S�oZ	't$K�o�����'��~�j�m��_�����eK��2�Js#B+05�5[�{7'b;�K7�4�d��/P���0U+r��R%�#��������7�^��Tt��x�����pf�����������b�-��$!���^69��]�JQA�bd|���#�.�<4wy�L6�P#j�B�,�k!HL���#y<��`.��R$w/����h.��NG/����hf�
���"��Z�OJ�LR�������!�O�����/O?}�pL��ww���7]������"�L�Im�q(+�����@]��k��V���i��]+U��������/sW9������g
���)g�tLw8�
�>�:�����}���`BG�z����k���9��
�����u
��S��+&N��`Q���p���Z���Y=[
���oo"D����OQ�N�E)r\��
)�6Op$9c�<��G���q��*7��*B1��[b�y�: 9����PT����b�����R���l�oo��=��������N�������&���j��$��������n��������������l��UI9�P��rvA14��!����`���%����R�N�O�;(�@�<�����&�J�a��4���iA��1���(�%����O�u����������Q�����=���Y
�@n�B��Pc��H=�f���9��3s*��;����(4-T�A�]a�2EFvB�:{�����MF��
����������6�Fq�h��~��Y����=���Hz��no��|�\�\gWP�d����X��S3�~
P�KK4��v�&���ov!U�=�v4�
�#p(���cd<�v
A�WT���p|����93�����}.(�����_!���(�&Rt��BjMsm}�z[?���0R�G!�J�lH#pn43�:t�.2Z���J&;t^_��yWQ3����_0D�~G�
y��ZI���K��#$��c,|�������'��	�8��j��SU�Qy�O|��F��?��b�����P��,M����>�5'l����/������frR�E�;��),sHX7+����~+��}�.��!�����r0�������#��C���F����K
����P��<Y�7� ���8bC�J]<f[g��5b�Z��mxj��� z�~(\5�$Fo�d����A���-����/�/����C~�����MD���c�.]$4���RjhDQSWV�hF��=Y�7�&L�"�j���������������������o���^n��`������y��u��/������+��9��vh���Kv�@���pRUx�aG^I�m�������$e����~�@	R�!���D�(�����:��\RCGl�}�[zN�4i�*�`���Z�ANh��p���"�6�tEr�^�������_$0*d[� �^D0��������Wr��h�H1T~��b���Z��������X4r��V��"8�I��hp�{��y��0�?����/���
��S�{� 1.�Sa�M���ha�'��B{�rHQ�V��4�b�������!��h(+:���L��0��I�?� �~����$��9v�]��o�y#&� ���:�}G��N�(H���c�5�16������^L�V��u���M�D�U���k:v����4��W#tX���7�|1��	��{�Z]Ox<2�����?�:@��=�|�:7��uW��x��x�g�''�344z]4�Vr�*o��zv/�.bG�h�Y t�k��F�n��M��c1�~ M�����=�.Z3K����Q�g7�D.2G�	��H���h�0�th��L��|#��)'�r"Sob��Y�+ Q�-%q��Q��SO��������������q8'LS�	�/��^�]��0�8%�BL�.�F%�����D5��H�^��/��z�&�f"?�+K����N���Po		������T��}E�00n�|�/M4J��:�����+$����jn��F�5&Dg�%b�,-�7�t��B�����~�S�����F~����F�2C��t8����s#����jh6�^�>�
�X�����0�W5�!{�o}�V� A�����_o{��?�������3���i9
��~��'�b:�����������-��y�������+|������N��	�|6�e���^��J<��	��}����*���Q��-�#��w��|�ega�>6��k�d�������x�P���n0���c��L��cX��j���Q"����l!$������
''K��8��d���W��Y��c��a�y�����d#�!�& .��>���E����.��w�'�F��\�U����`jP^���UK�@���� h�7���:���"�;9Su_a"�7�S�Kh�uX�tuje��JM���o�<~Q]�8b�������`~���l#ph#HY�#'�e��K.���\V�>4y^TP@��3�r�2�.�2�	R9��N����,[4]��c�p�o���"��o@PX;za��K���SJ�T������/����?]~��y��/T�7���j�-�:i���xm(X���!�.��&�$G.�|�����j (/o>A�^��?��le�cL������0��S��;1��Z'?���j`��r��c�9���"V�C_��..���8T�B�]�p#71gA�e
�����������W=�`�����6�GN�I����x�P���3����V��Xs>�\��]%����H�(����Atf|�
B�l�}�>jzO]B�j����8"��&X����\4
H:�T�E������\�.��4}I�@7�t"-��T>�F������9����<e�o�����"��H��JQ�J\����K���pB�6�p&V�C}D�#OU,�(��7W(���)~/I���D����(������p�@�:����u-��������xo�����K��5�����h��F�5�[��-��3���9��u����>!�F&��j�9��#Xm|��O�M����8�((���0�������	����V*�3EK��)�(�a��:�.����H2��F��h�i&�d������2&2����?�`�>�0&���	���CP�Gx\�ZT�*T���B-�>���*F��q�~������bN�IOR�E�TQ���#9H��x��y���{S5�;�>v���"^iEs�jY
_*��\��X������_ow�I��8�r������)Ng�Q�������oi0�GJ���n3��<?7��M�E���><�+�#��K�O�
F�����U*���N���i��^�hm��(�w5���M��Y8��LB�����L���R�����V�y�>e��fE-~�"�*d�0�A��,����������*���.�V�1���e��9~U2]��R�=�9ri�����G��S���$J��)�dB����]{q��%�^XZ��`�S@hL�M)���F��c��`6W�����y����;p��,={�<�s��C�&)=�����=�q9���O�
-�y���`=|�ji�U^�m7U��G:8�~Fp/�<�x�t$�FY�����YA�o39��cq�8(0��1Zvba�}�$�����o����B2�"����E����fA�=<I���g)(�U�*.��,�5�����})Xe�,��&�:�[Lx�nb��o�iC`��R@�=�'2���9v(7����X1��9���b��
�mj�M�a�m{K�I����E���U0���xQJv��;K��Z]��0�[*����[���S�P�i4���r~�k���+Z"�e1�@���V^u�����EK%��1V�H
�<s�r���g���9�
a/h}���G:7���'0�L�X����Q��
��B���x�}�2�d9������7�Xg{���biv�d�����'J��I6O��9��d��w-vT���_�/�nn.����"����Y����N@E4K7�SgDAJ-n��KW#����#h���D�e�G������sZ(�p_d[LR��~��t{����/���9G�5���p�kr�m���SWR�c��c��7�7���'=@Iy=Y��=dg���,�)�3��x=����]u1����g�x���R�>>�H�A�}6��a5����l!��-LJ���T���m�����_���^v��o���M� {�W���E?6���_�dD���`.K;���m����E��^�2p�!� *�1��/�_�������������l>����@�t�A�x2�(}{������<����y�6��r;~��}��
1 K4�*Uo�n�y6�NXE�|�CG���k�f	�� +�>U)�]/UYjT2�6�K6�2&�C�g�����S�9�D��es�[a�����t�bA����
�f��P������Ld�&�	���R�C��F�f���E�Fq��Pe�����0�?>B�3dx�J=4�0s�Iyy����t�<����D6�����Ob'qj�
s1��Z�;J�����J~Vr("�����	�Oz��=�&�]�/�,���o�l�k���:[���U2��g�����w�~N'��CqBc�0m$:�%�W��R�.���Gp���^�������OVp�QE�?��o7!'����� ��#`(C0�Z%E���	���[����0�P����kSB���N+���D�Rq�{��W��Rw�?FbK��B�����Ad<"/�%��S��Z���:����������b��P%	�C�a�z)��W�+?���8q>o���1��Xf:����[�t� o�_��Z�(�bH��2�f����18lIe\.�"�9/C��z�J���HY�%�[��
��R,#�FY�����;w�5��>6/�����+��e1Vj���h"���k(���wOW��<�m��{���I7
��G+����m���qy���y!t��z���W�<��<i�����������O��OhS������Oh���Tz���Y�7}v�������������@�w/O��v�d�����
���� �{�����+����o�7��+c���M	�f������#�����|dG��>�o�(�$������6�=+ ����7^P���<�H���j�o}$��E������)���@��(������C�*13VX�qXoMh���/��3���m�\����=�����w��l���81���C
��M!�X�����P���uD���U^�"��Sd#D0�; C��K���n�������#���W_��W�����������u�D��.��6M���r&�w��l#�h]U��������S
�U�5�����0�u���r@-5��D��}����6�W�U�����@�n�/_!<ia��e�uz�Q[������S�0�5�%x�<����4���(��'���L��UaL����5L�.]�*k��`�.��L�";�d�F�hf�{�B��&�/ZK������������3��2Q�\��������Q�b��$,�C�����uV�$��|D����gQS�u��d2�Z-aY�����bQ��v�^��i_�4�./7���0��=�V�^GBT&G	-����bz�)b�+�$��9��jmD��������)~�q�k1����V����0[���1I�S�,ge*����=��;1�j,�>O%���Sae�7��i���~���}����T��I��s5�Kr��*�K�S�i�����,����������t��u��;�#2�8Q��Z��R�M&Jf�Um��lc=H��o������};��r��0,��rpY���?�����������E��S����Dq��\�����r|Q�;��.�ZC�s��b��69.r�I�YdNCL���C~���YaI~pLo���cNM���X�e9 �7m�ptcG���\ *Yg��!+���P�l;s(�:O�h?��F��Ok����RK5�d>>����D\�!Vh����P��/�aN�2�����qqe�EN�j��������D�SzH(I�����v^���]v��9�X%���z����vq��������z�2a)�)LA�sC��G[D�}��h�8����7(F��i�0f���K�����D�+qQ�!����+��0h�����A#��K��*C���uj���\P��������������
(�jUE���� c���Ov�r��=���4!hV���L��������>�
�L�R�����U�U�������L�XBm$&���4�HM\
���8$*f|�B^��&g���{2�,���?H��w@�@��H�����i�g���-u��.�&8x��M�nFT�\�.�1�1/��E��"2U�4ysyu�����rw�e;
bD.�����M�pa��u�/��e�k�#7���VJ1������N�@]��I_s�	�����8{����y��^^�]=}��l�3�g�K�|���Z�	T|a�� ��<�J�^��M}��na��
�����0k*�
k�De#���`�]q����Lu /��x���C��$
��'!<��,P�Lo�@};�i�m�qu��Ed����m"�i�B����=����.�X)���l�)�T����&�:���<��\\�:� 1wYdN�������x�K��(���9����<�.��L�3��8���|��2����j�:��_�������vw�*���N��W&���"w�W�T�6�b��K���X���"$�FC@\����@�1b�0�j��U_j;�q�:��S��["C$��I!�c|
Obh�T�����q����$:��9J-����7�"x�U@����Fs�2���9�yi�aq:Vo�U+��nb�}��g��p�D��z�L�
x{H�/��VY�A_���W������;�K��+1!�-K~�����	&�&�y��/��u/�CC`u��3�i�����M�!\L��Fbp����0�'�����f�LT	�/��/n	T���I"�,@�����v���$Snx�������Wg����}���*����s2%�@A7�G�l_�����,�����k���2&�+�����2���j%�u�+��r���no���>�����������8�@��
��0�.��O�Ww_d��f����������#���_
�L���a�-�[wp���QLKOY>5,���B{�������n�,�	������Oo�|C��\���Io�EgdHX�f�Dr��\5�C.�]l�c�Jaq�XK<�a�u���u����\�r������{���7-,���HV*F����G���s�'������������%�;��H�9���E�����@MM"�4�}��>|��B��4�h�Z��r��\���e�`_OX���X���4i$hJf5��Z���.Pf`������<�R*�W|qD��}`�(,�/uT<u������^����b���hz���'���������F�~��@���
/���3A�bE%�.r�I$W�Ha1��Mj�	�������w$��bQ��x�[����nV���T����8�W3O��^<@F��GPZ�K�I+�@������]]�.��*I�O��������.�A(|`��.D�r/�OOOP��s�/wO/�Ew
,���\�g#
�Kgu���,=��C�,r�{�QY�R���s� ��:��lc@PT���������G�6�"����@��y��P����x����������5�!�NYO\:]�l�z�J�;�7i�zO~
�P�~Hu�9}���ZP7S�b*����Z��~q��/����������i7^��cH��g�	�Gu`�W�T��;7�`7�����)B@�
-���6E����0e�Ob)�+Vx���gp����{��}~����t����_�O�w� ������r���
���sOo��(+r��||�~��Q�@]_vA��L���qz���Q����SPz��
0�e)�;3�]�0
������u�������q�}gw���W�Z�F�T�(�D=�v��V�u�������1�Y������}��.^v�/c9�D�_�|83P��0q��s(���		e���<��5m�&%��U���(hq
(D��
���s/|WNpD���##���78i��u��e;������3�#l����0�R���	K�t?p���3!,��F/��q�����&75y���.���8��o�I�\�t��%:��tQ��3Ta��8v���E9qc���0[F`+��j��
 B6x��,	f�������U�	�"��G��U�Q�R�����	j�n��$3"0�8���&!W1yk)*<�c�<in�4�$�#���'B,��|W�
���Q���B-\Il�I=�0j�GpTWc&�d@D)jYEs;p5"p��Pmn*�B��r����N�.����s?h��(e*�bf���J?���/s������s�'��J��3�'.�����vjE����Uc��c�<XI�*J_�3��� 
���\��!����[v�~>kb\�D+��T������'���7e��B���e}:��%*n��3�VX`�� �����c|,38����#���
,��j���2�N�
+�Jbf�/���`H�y�������cRI_�8���8���E�"��;�Sx�}�Z�X���a��|�G�Zt��1N`&�KJ%8Wl8ZA��%������e�������8��0j^��6�!��K�����R�."����4�b��$xu(���@x��^o��u��F�E�|bj��������d�����D���no���B�N�����a��e���D%�s�O��6��hYT�N#�
�� �!
��Y(����@�D�����j>:��WR7��#d�pH�2rM ��%�c��>���I�X"�����B�D��)VsY��J��q���
�Oto a��W��k��
i�q�]�������&a�[,�4���@�����-�������K|��������Z/c]i�33��'J��l��cMey���#&X��&%�	2���5&��j+�;���gC>�DsNUCE78v��j��$�:�����c���\���b�py2%�{��;�V�[�"�z�;�w�s�3�.2��I���X����S!$�dD?>�i{��1If[9)�g�$CQ���T�V5m�!/R�E�Q��6�PB���o�ru������v�G���t��EWgS+�IN�Y��1����_�.aX�T��'�J��!g�r�Ae��h�[������S�(��Q]����T�C'%�
�R0�<�=~z��;�\��r	��o���!p��U�E_k�{+��_~o
S+��k�o{��hEN��Y��zE�t0&�ID�#�H'����T�U9������h��#���\+01�pl����'>���@�W����������1�WJ�}�,�l�?�)����4�G���������]�U����.�7�����Lm��g��4�@���D�3 �8��xc��]q�%�������w���-����K���a#;X�{���XA�"2��q<M),���&�:��f"=y/`7��c	c����V�G�,w`��ns?L���3U�{�n~�a��=C��2�Tq��E�Bn*!�P�1esT�T����"��oD�;6����2O����l\� $���B���5��0G3X��@)T���)](_�:�Y�!b�����U�����6���g��_��[9��Y&�d��4m�)	K���*<�]=�.�����Ww��q��+@��hk���K]�d(v�{��guL,�K�?E.0D2�U�!J� y���x���Vo���y�-n�~��\�.���/$�QRz��di������;���e!����n��G��{��|[ah���(QR���T������D�J��O�5�d�L$�TO����H �D��xx�������W;��}���EaV^����I	���� �OO���������R��ab���~����..�-p���Mw����OA���M�p�@e��{�]R<�t%i&�FzE�d���B�����|����-.;��K.JXXu�$W9"L��2H��]�"M`G|L��kY{���#�S[������������� ������x�����wW�w��w/�`��8�C���`
:u��N6������������~g��:�,�%w}�Vk3�J�B'�r���s�����������=�����m�-�k"��� S������Y�����4>w���n�<5�>���������n�w:Au�b�D����i�;�����Y&�3��$Q*L�J�1��4Lp� ����]B�0h��m�#�p���Q_���la�����	,�9���p{o���@[���~���i��'.��y�q�T��v^�U�s����-A
h�b,��A������c`|o����M�{����I7�,x�
��S�,��w�&t	T��{���y+(5��W%��-�^���1I:��K��l_���A���R�@��p��2kZR�%�.���'�����qzA;��8��c�\P��K{<y�x��v���-���e�&��|�-�����BC|)5O��U5�"����{gs��PH�r��k=����>�2�\�vx�K���n����g}���/�$-rc����<>����vu���w���t��]�i����D����7�$��:�=��
����8�����������Z�.Wy�(C������Qnp$4v�7�\Q5O��F����a}�{���� �����ZNS���rYfm+���@X���,�����!&�<��$�q���<��&��������7�������M�*=��
X�P�j��Bm.\��uHt �R�4$2��[n���}.he�!Q��E���D�F �Dd�("BzL�\��&��4#D(]�M�0Gu�!��2l�l���?9SX9A2�!�=�d��(�+'�Y
{���]�@�������Je��`H6P�n� t�N�=��Q�������X�C!
B��TJI�F�qF���^����N+��&Z �#���Z��q�Y�F�k��B1��Z$
f!ym�YQv��UI$�8���C��
	�FGt�q�u�>K�����,)����g������1�=�5�-���n�|0�4��eWF(M�E��_Y��^I(,������h=dz�Y����fzd�[���O�
@9D�*�8���Hh�<�u��~����
�+�B�A �I�8�p�.�����y<�|����o.�K�`W����__�����P�^vWC�z7�EAY��=�fM��~ Q��y���M��+��;�#b�j��	���h�����}�ju�z&k���D!4�p�M�y����I�j�����lx�@����ZL{�uS%��]�>����+%�a�
,4]2%�+���$.���;���g��^#�=��?>8�������w�[��3�b9^���?�U���2�^���R)]�SR�\��L�k	s�����	Sa�p(���
^�
�]��?��P%�S�����}J1��R�V�]^#�������w+�>9�$�@��J�$0����L4z�
��L���7?<?�~aZ��)���$�-�����[�=T�C���j2���k�t����M�5h��WKi��b�����nM�!^�`@��r���q��f��_��Om��$�����6������J�u�PF}
�m���|F�Y����|�p�Hc����6�w(�z�#s������h��!65S�=�>��p����Ey	��(�N����p g� ��V�Dq��2A��J#F�? j�B��A���^��8�=6�9���Y
�l���Dau�ss��1�A
�����Zt���~(�)a	q+W�o>Z����{?T��?|�}���?v������* /QhG+C,9��1|�7�U}�z��'�=�x��N��R�P�����@�C6Fz����Q��P�����,0��*�<j��R���j�0x����/������!t}����(������N���W�9�G�
d�'��G����A=��^�����(Pw���{R����S�u����=5��-"������7�����k"i8As^i�k��DT`R�kDA��Q��R����������yD�@����:u�t�p���=0l�����e�$��\������	cdvy!���V8�&Fg�G�DI6�\zqd���c��!80Y��eM��0dEg�|H���p(���I�
m��M"�B�R�:�����yw5���������>�`��hy�����	X;�Q�F�2��g<�#�����������O�q��W�dWCO�f�����@` ��"Z����E�yOM#4?��0y��N��wcok��r�J�\���CB'.��
����3���m���~�~���[B0q��a���z��q<���<���_��-�@	���r)|�N����m!��87+e��0�2 v]�AgvQf�-8�
�9�y��ePT������������
�#&��kc0��O�	�����?9V��~��`�8�E�a���O>�t�#P���_t�z-���]k�`���IE�������M��mA��:��O9g\q<8;�!�'	�������+�UHkSXbS��=�J!���Sd��	jwdb��u0t�q�](Hv�����i����Y��u}������_�=|��g�T�`�S��bJ���yBD�N�y���a<e��XGq�	��������#����YC�$J��\	iD����w���Bp�� [6�[��$�'4�'����C���C�k��`�]\��l�f���~������I���I�)���YuIy8>��e�j�`��Uzx2����8�on����[s>��a���j@�=����R<��~��9�%L�4{��[��
�f=�<o�"@^��X/�5����j&f%@tG��4�Q�0cm�� 9����j��3��"�kq����
���,�	���ch��/��a�&$��	�����N15�EF�,m��'����^������y����(��@d��beijF!/�"'����n���2���1��x�lz������A<�`d����o&�6W����E
Y�^�?8r�]�/����a�pC�7[������_gA�Opb�O��sS
�p�[D�u���s�j�O��1e ���/����H4b��b�����
@��2�� ���������LGtv����RD�'S�E�`DY�`|��}��F`.��*W
�2���:�@JXm����7��������������@�`����9��+�JC��\IP}<���S���S�/�������E$SB>�/��q���^l_���2��.�uu�f�U�T0s\�zb)�
��T��T���"�2���?Y%�D�B3��D\I���%�L`�I����K�_�f�3p�f�oU�?\?��D�L�����+�z�!�C��B`z�?m7�P��m"'W�
"���IB0��|�����`���Gl��w���f"i���I����p0�U
��	���4�4��"�k�����l`�h+�0NBw��d_[���WJ5�g����ix(AD�"����c���������+y���0�s����|��s,A��_.A�+�=�[�{���~�J��pBU�����n��M'fH5���l3�0gW=�*9X��T��w�'�d66�T���'������I$ �q*�edL_"�T���80^r�W�2pL�xA$�(��H�G#%2��q1����4�}=���P*?��O�@	�2T��.?������!`'��=��J9�\L ����D�}PU�����6��A��%�~�g�/�S�{80��}9�*���
n9G�=$�A��I�NzI2t��9�u�o G
��J��7#����	^8n��'�����!�i����K�� 7�X��������t\���xO�t���M8�Gf�����(�c�D�]��;�e����>�_b����C�|e�z�G��%��z�e
�HM,s����a{�9�T��������#p������#���$�g-��o	�3	,a�>}A �1:����������;r*��o��O����_wO�F�g5�����_�w�Wc3g{uT��l��2�2`�k�=Z�s������N����r�@1%�;��w����P��g�N.g1���1�o���o)e�2L������3�Q��������"r4L��D��Z���F �e��+�
7����V���-4g�P<�)��%�UZ{��1E
�YK:���<y:C�S�_��kN�+%E��`�~���2���?}����x��<(�����!�f�C<����<��&�z+�;��;�T6�r�b������� u*F��<�/-T��� c�z�d��s�!�:P"�����Z���.
���
��+��3��,�'T1�	u������n1�U]z�f#G����������:
���LDVV�s�7J���^i��n%�6^����\�T����++�j�1�^*��0�q�����!�H�39���f�
�NN-������=e������m}��eq��j�����,-�XB\MD�Dw��f[O�Ih-!�/Y6�{���A	)�:p
,�%�z@i	��6:��.����
h~����#XF��7����YDi	p�^�ct�E�Y�nD�u�V?
')J�]�����o�������l��MN	B
8�iY���S6I��A%�S-�m�i� �a�{�=�����������~��_w
�t=eZ��=g'ADQj�������c�,��8�~KqSJ����1+V�s���$�;�)6),*e��/a�{�t������4At������/��LD�]�������R�B��b_L*K�km�%C+�����s�o ���/O����O�4����n�?��~}�������?}��^�����w���������^!������O���t(fv��uqv*����X+x>��������7?�+V@��w�0���KZP��������������>#�g��7�<x}��OA��O?9}��K��c\�6k[�@~��i�7���������A���<N8I��	5�i��}��I;/L�w�K?�G
�o5���Ju=F��[4�F�s���9�;�s�Nc����q8G+S�%rb���G��y#�^Ha��`q�m���>��TO��3�����=�S1���L�#��J�"Z�_3�B~��Da��	����"���f�����z���.��tr0Q��	������R$@dN���
�N���nu��*2�1�U^���T.�/��~�*7,����4�u��r�����'^��\?�������������i�O��.��������2����NL[!�=��;�}��)e�:��{�x�����������v�6����98��E�<�`��o���P�j.#���x��<�K��H��g�h�����X����gRL]y��?���{//T������~7�ps��J��=^�����]��
���K<X
/�������GkI"=H�����"\�8����i�_��:/��Ua��P���^{puSk�B001��V��s�sT���0�^	SG�[��x�E��0��"aEp�����/_t�F�	��o�l>�\��>a�*���pF(�N.L�v����A���P���U�H�0��h���]��J�@��9��l���n���~�����'�pl�W���k�2#������R��V�j�t�mt����TJ�a���C�,���I��Jc���1(��`�:�����o�<��JA^g���ITi���-^5$�UKTMKc�E���hc`����E��i>Y>�Y�������\H|��/���C���^)+����W����
�?�wO�LV���f��f�f�3�~��
��!���)f:q=t�*~�6P�9��e�������4O��K2Ogs�L��	�f	�4)�v����h6_U�-�}�U�5I�����K
�h�@n>�V(xx�Fwe�[�-*�#�����V
��y�K~�=�g=:V�N�?u������=xDcn�W(��L!>Ew�_�I9�\4��i������8��������7��5~��q��Qk��a
�%Lf���/���B�09�UB�8�H�#U�-?��9��t#�������)��f@��X,�\�����s]��W��Aw�r,;v�����\��z���A95q�h����T�6�9�I������]�r��=��y(g��Z���"�_�HK��!�
��
��o0�`]�����\)�������	����MK?K
X(nk��d\w��g��Y@�h$o�^j:�8i��R�����y���~��
qC�#MV�����{�
�W�O��^��YQ���T�~#u���W,���;L�x��p����q���%*���H���[��b�!�8��������MJ��M�����gm<�-����{������@-��C�{�
%3��e#K)��$�JY.��8(�������Ko�,>D��d�M��pN���B�gy?����U�=��C������p
e���~���

6N��A����c�&4&0��8_I&&=.�SmQ�"20R5������,�jI�y�i p(ap�.*��^[� ��� ,�����x&6���[����
�-!�t�J��^�X,����n��!sZu�����OQc�$/9��8�!W��
9�����'����>�	G�Y�����#w�q/��^dp?4�_m�����iw���������q�����W��?�Z��	=FunK0��������%��H��$2G��.��,u?"Nk�I�N*x��H�.�To<L!%6�49��|��7� i7/V)�MH�L���A$�o%��v<��������8�����!�����z|G�hT2:�
�6������
Tl���b��<���hr�t����Z�aE�A�P��ci�p�eX�vb\��$A���c����DA&Q@�/��$�'��B����Pz=&�5L�����O�)�/�W(&�+!4�"g<V��zq���iP��g�'�c�q�}�RLQD�b��KxB_A���8.G�#"���2�ldz��H�'t��c�'A{�L(������A��WY����n/l��'�.�%�6�ws��
�*� ����t%���X�a�Yb�������G���_^m�?�������������G��v�i�p�{��������F�5�tC����������et��x����e�A�t��J�7��*<C�.RF}����>:ok���@I��Q9�
�����d,�`eZ�������A����#�q����s����C}��U,�X��xI��MT����J� +������������Ba&M�6x�����\t�������{�<O=�}������+S+�L�;�Z�JK7J��2ts����NW2\���g^}�2����,��"�|�,�250��������=A�9g�p��n&�������SN��9����RV���K3�!�����y�j�����	z���:p'������M<�
���U��h�T
�Q_f���&�������E��	��
���B�S������8u�����*���(dnc���SOq���Q=��~nh��L���\���������=�@��,<��24�9Rg!59�8��`A=���lW���{@��vWBuQbH��� ^����o��������u�xx��mbM��I���-���v�~%�t��o����|����/�}X�����Wz���+���PNb�V��
hB*�o�{���Cm(�5���~����o�0�����/O.=W+�j����P�!33h�R�o���r<�M�r���xd�_]gO�-�x�~�8������>�J<5�*N����Ejw�i$M]��!1�����������=��K���?Cg�!� �
����a�@ }��Ckzc��Yn��� g�)[OP���H�8�M��������@�]�����n_>���@@b��q��ySQ�T�+����2h7�m67��d�����Xd��>:��?h������'�;p��r}�������])��j�4�4g�E+�?^���^v���W"XP�B<T�=��o6�
e+�]��,t;�u��W�Y���|78�	
Sl�F�?�K#F�A�Q�.�s���X{����%��a������k-����
u_]�����Ee<EL^��7�a��P�p��6�a��<�8���PFY��U��s_R����J`�EQP� >3:��I[s-��^���Ul�k*����6���{�����L7Q�CE&Q[&��_��+EL�����L���G�� <�f�;�FG��m}���
[���@V���~��
�,l��?�4���^Y�S�|k=8l���������>SD$M���
%�M� W�:��E0��L�a���eU���.$��Q�UM�t��K�X]���F�����OO���=~~^�,����!kDK�1�������~�1�'��r����
au%�����7!
���E�D*��S�A��m�&�[O�xI�N	��yw����rF��L�W�1�� Y�0o����N�+�)��K��g�EL9�b�je�x<�E����;Rm�������R��9����GBZ��p{`�u�x@�y�Bn���{�������\��������8]u�����3JE���!�
8���XI��I����/F�m�3�y _��������5PLS��ql�^�i���9o��>��r���:,}$��j��<���r��${:��"7� �c` 6Y��`���e$��D����0�0T����(rf�*E"�Rb]�����9�D��9�}	i
B�� dO����O�&�{��"�#u�����)~���"��c
�+��(qE ������\T:�
oa/�j�S��@/b���:^P!����h�d,�EX����+�{[6��X��Y�����9jb��bp{����)v�A2g�.���_Ce���+�/�?��<�O$�'(�������rVW")�?����W���^��*�g��3����bL(!��2=�l�m{�s�E���s�
������� ��S��!h|P��w*4x@=�W��I�C#7�#�"r1C�h'����4�h���Hf1=�i&m-G���AR%��������]���F�(T���y���(�"��D�H��@�?{53������Pw��"�,�b'~
l�/3��o��\�#����9��������*Z������w��]*B�����It�ovGE�B#w��h$�LM��0b�K�h>�����EcMK�P�P������������
�������b�n��%M=qM����R�t*"�D"3��H>+���~(6�HD���7��A�a�`*x���e������`��]�7p�hpA�.�w�	l�1�prD}�DLS�������(0���E��	e�������`P����m����]OR7<-j��,]����'BTRJ�Z���	c!9S�<�g�N��9l�g���V�I��:����b�1{g*��_m��]��u��~#t=6FlC�EZ�����<,����8�@V�z���iee�)��i������d����4<~���P������������O��=<�.�RSi���Q\A�&��WSm����O)����<d[�(��������yZ 9u��k��Z�������o=��ZG����%�&�\�:�g���� I�>~+���Gg#�V����4�b?���o�%s��$*2X~i��B��5/(�6"".5������E�MZ;�f��%���b����g�8�;3���o���>f4u�����S.�:�B���"1��]�X1��5E�W��M{C��	Q�Ai�w��#aC~a&���8�g
4�~@Wy���y�y"��������^3V��v�@9R5,�fUW�{�`�9��ju=`.HZ�)oqQ���?\�R�,m�f��M�/8!Z
�U�t��G��$��
��Z�����"���&��SXK,�&R�Kvo�k|�e
s����~qd���
�-�w��'�v��-�;e,n[,��ui�q���������9���a^�R��9J�A����)8��~������o~4h!�Il�I<����^��1�>i\�\����SX���F�����dV�1�ud������t_%�������sH�5\}��z�q}�Z����{���y�>�q��v�)���t����a/�(�O��~�{����������vw���'�V���\n-pHlFWV������b���� 	�]���4t�KT��al[���"����O��C�������M.�$���������P�`�|��6��62TJ�����G-��c
�X&��������v�/V��{��^�x
��/gY�����8�d�����n�zE���;�������_�=�PF�nL���O+��+�*'������TH������_Y�m��K���Fx�xW"�0��n�By��������b^�b�{J��(�u��5K2�t�X��g����[a�KSO���r�������$�R�0�p8�pz7��0���cdX�9���q>�������������Gm�m�H�1�w������.�!$�%���x��M_�I��PO�	Z���������C�L-��� ��&N������|1���&���_�-��@�
S�]�[�k�[Z#�Z%�\�����{��S�y}
5�/�)3���|��R�������o����hSK>���>�����}6����&2MGh*`7^<~�I���"�o�M�7�����=%��9TvD)�"�`���!�p�G|;F�� 7i����P��\H�H�6BD1��?�c����5`�RY�nR'[�F���sia8v$z��4��G4�
}kc#HNd���/Uk�@�((fJ/95��^�����%3����=���������!f� ��}��&�M3db��R���bZ����\��u����=������Zv���������`K-������&3l%g7�st:{������D�1�]C�����Q���i^6`=u{�/'�DLZ&�GJ .q�`H�Fm�O�G���X�_�%?w�1��6JLU�������������=>}��x�W`��s�����������3�jbo%����Q)��\���r��B��g� ��Tu��(�����
������D�^����U��4����������<��qTD&��l��Vfs=]p
�7[43_`x���q<�S�l���B�����B�lQ���s�6
;&�\|��n�f�f=gY��v��?����y�2HI�/�9+�M�l�m���8W����H��V��O����8�D _�q��� �iDA�����V�Jw_�s�h�@pD�k1O!T���~`'��v%��O(�/[�o�pK����)=��>d� �i�q.�-�&�[��������`H�/�W�&���F\��g�<i�@�o/	�����'+y�?=�=������Yk49��@�I��l��1e���g�<�/�����W�w��Z��A�����V-�����'��Xz�D��e�$������?��y������K��,�=�!�L���3���	��]�CoWrx�[�-����DE�:W�e�[��7ky�fu��"���w�"��$�/��D����PR������2�
eM,u����(9�#�%���s+�]rX�bw[���
*�q�a��z������7��y8��,J�=�H�����\�R$�
��jf�����d���H7N�����;����7%,
=�����`1�
J��ns�������\'Zo��`������	�9�j*���%�c��!��fa!�x�B\<=���-{,Q<�-����J#]��zJ�a�}I�K��,�����.)����x��\�����X���%�)T��P,
�&u -��y��R]�u�����i��*��K�K~�����.����@Q����.g���K��R���,����X��<,�m��+%�����������,�g�l�����8,���o������>��XzZ�2���r����t����6DL����YB�t`1U	�h�u�-�X����XyJ�����s��+����V7�Hm=~��/����x^��pg�H�!����������@=��A�{z3����"J�~��9)�f��������_�s�����U;������=�F�"���!b���f�q	p(�$���	1�,m%j��@@"���}O�~���9�3��Z�M��=����N���������_+�ZePY�_ �7�|wx>O���Z2�QF�#����������c�]���1c�[��K���J %���L�����>I}�]d��*��FVA$5H�A�$��~�4G?��F���9<q�>3��A��;�`EI���������/�[��<�Qg}�#�����6����
ug.C{q�I���%���I���/G3��uX�@����g��L\�TX��<��_�?M���i@	��{��0���K�<�$r(��yx2p
�.m��}q��<���/-���[&��b� �A�~UNn3��9��x:�w�'��!�v_&����z�����ZV�?�@J��/pG���!F������I��>�y�AR~8qw>>V�[�UGp*�K
���$��V������/����L�/,f�����W�N�m#�}����b�pnB��� ��Q����c#7+����� /��� �K*T�uPKv=��,�l'}f&��Y��t����{�1.b&|�����E����=�z&��+���gU�0�Y�*��5�2r��c�������be�	��u:Q��O�]m<x��{5�]��������2D��m���^�0�`��E�rx]���)�P�
iMc���)���B8��X������<�����wi�L:V���U����%XO���
H	n�
Kb���_�D���-A� ���s�BqR���J��X4�`��_�X'��O��6�?�	Oy:� ����{b���E�i�a�m����I%`����Lv����
@�<��`�u������.���m�ms�A��(Or����"K��q��@0�"�
*�y���L�����N(l�fNw��Q)�
8��3��n�*�U]hUK����\U<��o��Q6��z9%{m@��S Vt�D�A�J�w����V��<��j',b��3r�;Ex�,q�*z���
�`za��z�o�UH -�R&y<��7�%�#����{ xdY�7���)�N� qdw����y�����V`����2�Q�<���7(������
u�Y���"m���%fC[�Bh��lPII����w��c
iS���B(��(��D"C�'ri�|JYNZ�-M�3:G|�W��xc��"j��+��v��{R@Wx{��M��m�o5H{���ng5��m3���9����y����4-m�L��B$9�E��ke�i� �q����_��'���*V]��q���0]B*{$�RNBS��R�G��3%����w/�r�q����f��������G��V!
����Oc�W���r��(�J���/K�F�c���>���!r�����pa�K��4
���j�P�����y-��(�[�dz�/����O��?�=��k���k��O�e�M���x�4U%t���@����G���@8�
�+����D��b�@t0���
`���#ng�z6�h�IS"%9
e��5r�*T � Y�^|BQU��5��0t8L��g�%�.,����:���(��0rfMj�����tp�l�^����A�

��&7���^�����$���ge�������=|��"o$!���������C��g����9	���u8�{>�f������r�G��&H���QX�
��B�_$���`.�&��r�$��`���-�,�mb/l���5F��=�$L#��WaB4D��(m�q&��	c0�R$��r��1�*�Ma$�/	�#��Q��sK�~b��a������W�E=1QO��7�(VG�����u�:������[����:���+��#�`C�y=�m������!Yp�K�~�����Y���}b�������A=��j�6�Q����9�B�@�w��E����!:����z�;I6h����O�����;�����A��F�U�e�2<�ac�O��g��9�W����C�����C>�3�g�����kf���>C��=&�������_>�����:(]��3�2��ri�l1���o�#���Km-cea�K�,c�/�B�EF� ���%uT�2���	���F������%.�-����,�<;��:���L�K��*�gq���e[y��a�G��!�K:oU�?��]i��o0r�kI{bL�<$���5����2��������3Rt#�A����Q�:�X[�/I��0�	y���dwj67aT����waHh]W�l��@+�[g�DG!�yE��/�� .h����9���������.jXc=n�Fb��8yjM�dqp��b������	�W�f��T�N6��C��s=��X��B����^�E"��#Y��[���D��pj"0���nL]X�Z.?�N�����Z����cq�����cc�+�p�>,�Y��P�6�e�(f������7��<@���]6�L�lv����S����&3��(M�d��g�F,���<9X'���fw�VZ���p�
7��?[���w]t6w���L����W���fC��h��a�S����Wv��9����e���T�/\/������7
&��?�rHY5�r@9%B(W9�w�3�(�j����J�Ra�CR�_����T�ND(Q��Wc�+M�]���H�`�a+O����S��K�|�B��d���ia�Mt4�0�9���$m4��������to
��)�VqN�P�~x�R@V^��J��C����C��7����Ti������X��,�n4�����S�j�o�����������>Vzm�'��
��_Zu���3����r��Qo��v���_}���S<�3�9$^���^�u�����Z�z{���,�=�Nt!����
`�W��A�=�Ag��m����3=p:(�)8�>�E'o�)���(#�3���A��CU.O��&!������������g��kW�@���(4#7!�0rv����2��k7�:�����;������eq;�N92��}P0`���~�~�p���������9�Dy�)w�������j��R2���� ��-�P���>Z�^��D��m��w���H/r	��>97��������T?�r�����]���Pq�	�������*�E�X.j�_���Z�R[	fd��g�l���IZFQ��Z�<�=p"n��������(R�'e��"oo��������O,���>~��O�wU���b�:����l�x���N��'�=B���~��y���� ��>�<>m �dK���WyQp���IO�p��[U��{jh�����_Q�lQ��7��e���;��c�3S�4������?~���O7���C�y��r1���;�{����K����E���&]*��O�F�%��������E7�����R/�\����s���b5i�2l���6�0q��

�)5���<_�w�v���U���O��Qi�*�ZO�����+!1�[��z����*�X=�1�e��!5

!���������J}�H4MDC.����y��bo����F�rr)���}`��e�K�i��
lx��A��l�m���g��<tw�������^�a�Yi�C����I~���^��v&	�����&���@�:&�/��P%CU�Q�(hT��=������c�\[WM����i������/=��|��onnv�ocB/8�'H7���:�bo�r�oC}at��d�@�^�>���������7�j������>�J���0��^�3��|~MB�SDn�>19��,�����W�0�������i�"�U���y�L�
w(An��"��-���q9�D')5�S������]�1L��(������������/w����%[Nj�r�|1�]�hA�Q��/k�[��W�:o�,p�\����v�7O��p7��/t=��7�:�}�5L��"P�����EFL5��KCE�p��(�� ����T�I/���C��ZY1�X�
�W�i�|8��b�F�	����]��`M��(�������AB
�r%�q`��a����G��/_���g|D��]�c���{�i5��x\��B���P�zeR���Z���K��c�����g�6@�%�����YTIB�"�V]�����Pk'm2�qG����J��K�:���C<@��p�`.����`�pA�PCjH*�
q���YV��CL��U
������bR��5����Js�c����al#�>�(��}���e3���,����-��]T3(M=AI)G��a�(�)NU�zb��AO���=�K�%oE��`t���_���Lv�2�����n���~�����&�%,�7����[��z]y�h����&o,7
}X�n.�&����%��d�#]��5��+��8(V_\e�Z\iib%�a�}EE0�CA�GC$�qk-���8?�o�.\{���a�b�)�2)�!Bi��]k�:3�J��0$�z�����`K/���[7	��?���2F�]9�A�L�������<K
P�
�9R�(�V~_}��d]u1E��
b��N�'X��������q��k�{�"�[ALU����P88��85$����������Rb0j�J���/)��KAB
6I������w#c�ek7�Cc�O'���c�8pGD��#1����AC��"�P�g��C��E���8�*����,�U�0U� {B�2�K��M�3u����;l�X�Hql�����u���'�eI&��H
��O��^3�����N1�6��x���J�QXD���7s�pihN	s�� )k�(+Mz��Q����(���-B�
�@U�=��������&dmi��T!���������E(*����h��^o?��uc��6�����Ggx��i`#6��.����a���]�����~�3;���)�j�Pd*��Cz�V!����5X��3��O�����*�}�����y-2{-*c��@?��5�������*��'��xY�]�y��t�"X�)?�9H����qq��L�����2�����_���o;w'���,[�0��6����~��������z�g���� #ya*���O�|����'m;�8!���o#�eMm��_!��e���"�C��s{����}�d��J��}
5.C���k�[���v*{2��V�H���RRZ�#)�����Rgb���J��UXt��%GvYRG��m��>�O������M�{q�/NR�
`��Kq��E�>��a��x���_�9o-K�f$��!7
q�j�3����.�>T�����	��VL�
J�&B��A�W�CLs�����/�e���\�78����3m��;��)���^���
!w&�@V�"VN`F�	�vE�e��$�j�f#��2�S�����A�i�&�\�J���<;g�
f����I�{��6��=��Q��1F��	��)M��#%�����NW�d�H�D!O�q(ip$f�N8��J�D�"�# �����FP�CQ��*���;�������D10c�%�Q�<�jY��3w��X�yxPH|�	���X���hP{�F-5�;9Z����C��T���(��c<���� ��� ]M=�O-!��l��x�{�����s�����n����7���m�d�/d��Au'Ih��yp1T�
�G���^V�74t�7dZ����OH��\I���C�)���T��
����/O?}�x�6�ZHh�hK�s����)���%xU�%�����y��l�������?enm����%F�1���!�)�;��$���v�����?�1�����q�l�p����@���9�;V��Q���VO��TL����I�O���.���U��>���V���M(
��MB
TC~�u5���������uR����c?'�6.��b�^�U�}� �5�M��,�Uf���H�Lh��0Q9;��t��mI�Q�+gw����fXMd4Ul��������*��ivI���*P�8l4��B�������zKb����p<����g�=��C;D����V �B�d������x�.��������.)]�K��!��T��� �Uw�:��pR��Te�������
����%5�H�59��b��#G��yG����V����
�\��A�B���h�7[��l�Po5yLR<��:��ljX�Xo{������t�*��m����l�sX���O��8H�j97CeQ�7(�ha��M����� �~��y
|DJ;�nv@clyC�w���YY����u��8������U�%�����������=��1�@3$���6X^
��Vjy�����3���	���%���A���w�2�P�a�
uU�
�t�p������������l�+s�PC�H�Mj�c��.��#s�o/��L4~�"��\s�o�4n8�J����7���5�������I���vd�E
��7z�R��S�������������a�Y��������n_v{}}�0���������z���k��CQ��������&5{��SNr�W���Y�U�<�VcK|���/�����������on�1Z�YB%��7�u�4yS��>,�S������g=d[�{U��*n{�~�q�L�$a���E?X�\<�eAK��fo3H�!���Y&��Jy|���fH��p�B4�T��t�[v�[��������v��(�}�������2r#�.���Q_6R�	�u�VE���b�U�h�:�XyS>xE���\1Z�~Jy�o ��X��		������pt�������Y�m��Os+��l��B�b|�����Q��	uUw��Y�|���Z��=�$)-�� �{;�����S���5�Hv��s��NQ��5�$�cD>N�>,qh��i�-�����^�
����/�>}z��)���}�����������xl89��ueA�'������Hd����&�nZr8���XD�����C�����V����UA�J������d��aq�bQF����3��C���U��M��`X��-�j@�35����4�P�=Uc�S������Sjv�+C�Q�p���U����t����YTF9�1���`2�~����j���J��3�M��!z���r}�h�}�|s��n�����*|���p�e+���b=�������b��B6 n�y�������F�
&[<�l�������|�tw�\�x�	���������Ct��q����+^�u����
�GU��A�)z��hf�N�p���|�q6���o�������p[
{Y�=w��(�v�����$�X��O����`o\���`�[0J��q�����i���bn��|��`#gx<VG8j
C���#S6K��*u�M��S����G�0���M�,l�����$���l��9���Z�Q���ja{��������?�����fD�}Q_��a��Y�/X���Z��c��c~���K6�_I������*84���a�3T�FCtT��f�1��P������{x���~7��Z<���E&�1���"�0�����EMM.�>h�5�`,z���0�D��va��F�IY�u��<d��}��@����<���� ��	�p|����?�n�_viq+��k&�����Ow���a���D����b�OcHQ7���T#�-l q�&�3�B�_ ��WE��D�P�O�H�rL�+���m���PV��=a���x�������kF����O��kL~����i'���O|E�;-2�:�������e�[���x���|�aw�	�7�OP�0��	���������y7.kGd�a�������7���q~4�~�_�����y�C�9���ur,��!�EP��|����w7�$��\�p����Q+�:7'oE�2�qoVP�w���	�e��.��W��.��1�-�9�O3![K8�JD�u]#$;�m����[��-�]io�em�~B���V�L��]��N~G�6��Rb��V���a����0��������@����M����ao��
G).�@���\�h��c���������H�n�F��reN���Z���J��������l�{AS������R�����i�������7P����<P�N���e�M2�UD�&YI45�����ERV��~jc��`�Q��� d_*�OHup�AI-:#�:p}\��Fi���@��~E��Z\~bv�� �
��D|���'��Q�yL�Y��>['���K��zlT'�p�
�;9���%� ������-N��H�3��,�rA��E-?~�.����B����XAONx� �c!}^Z���|�w�y.,n�DJPs&t�FO�.��$q�f�Fhk�0L��+B����7���Ww�hDDqI��������f0���8+�fDB��s4z&j�L��w$#>�kqGc}��o�'mc�E^�x�ZQU��+������R����U'5���<r�N.�uj��_��B�:������|]���	PAI��%�x���,�����t���m�@�eJZ��*�}>`��;�\��U��f�*���
�-U&W�����%����j���!6�7�p#�V�1a��7����$��}j��?{�y�Ia�����i�H��2f������%c	K'x^[�Zo|B�l������@#U!��<E���������T�����=�D�j��U�=o�r ���	�s]��=pY ��}��H:�_/O	qb�����;�{B�B�4���(�~���$���8�@-�zt}��Eu��L����{�!8v����-3�2�v�q�����4O���
e9�|���.�y� t�P�������=�P���%��g���Xv�v��;c�5X��"<T���+Cw�
�*�my'�-0R���jO�	5Q�T��?��}���)���Jr����x�����I���S�fs�`3k���Oj����'P������H���DS� hR-n�_9��?L�Q������K�]#�9����N��sz(�>�.T/m<�T"�1`��?��������q�w7	�
k{���NW&�����Q�"�����sbM����Z�gn�!�WN'���P���1��?a%o�A|���������0/�jSy`"	],�@��A�)�b��z�%�:�[���e������������qC9yI~���|#�VV�6������v���u�:A5�����]���`S�b����@�2�%r���K��~�����������6>��:�
�`[�_T�d��Z2�����^�����k����vNV�uZ�F���AdRC�s��AA���q��/n�P�|��]�=��v�k"?��o�����������`w#�U.���~�S�������;��&����>�O��=Nu�j�W��8�^~	�	�����1�B����8���	���\8��`JF����v�Xj+
������L�\�'�`�Z���\r�����?A���z�a��e�|�����(���4��2�e���a����O�Ww/C9K��x�^��"�6���?]�?�W��0�A��JY������
����+"��_L�ol�^2rN!K(mAl"��!��+'m��9��V��v���_vO��7�9��1��t��v�G���m��Rd��\6:��������9��
��P�������'p|$)�{,����GP�+�D�M���M����~�#���=�,����D�W�^x�|�KVf�����..Q����������5aF��g���H%���_K��������z���>2 �>�C���+%^*fe0��i6K���I��`6@�������3y�����l���K���K���Ck�y��6c$�]��b�r�zg2s�mh�T���8�"�44�MA���=��P�6�R����H�r�@&O�v<�����hBaO��GN�	
���@�/s�jZI:h�����F�l����t �H�e�G$�6���m�-��PC�!zU�Ol40�>)�X.�GGr����E���';<WIz8�^Cy�C�g�Q��RZ�S���/$���_����C�����e�a\��6j��v��������Lb$T4����H�7�NFb���qV&|]��d~����eD���w/W�08GQX���5O��Q~"�]���<e�)��$���c��c�������;�%[�A*�����B��DI���4$�$i������<��8�!;������&�������aR�K���S��9t���w���M�7hTh�+�y_���**���������h�]����g�������c<W��x��x����If��k��d�Gc����� /�U��1���Nz�%d���u����E+rP\��������D����� 3�b�����/��0���F����z��	��p6q2���_���r��K�7���j����Y{V��Fx�`��
\�\�!�"q��8��K�HI��($��8E����-.���r�R��{:��E��El�gY+�p�����*L-������d�V�����SY�U�Z��|��<���B�tgz�q�:Z{�[�
>�)C���\�7��%TP���'�����s��=��S�y1{��@'!_P%��7s6�4%�~�yq�x�����Jb��+�,�dQ��PW	�A��A��������dG�)'������;�e��Y�e�vw�B�D����I\~0��]@�B�&���
X*�lv#5����q)pU����\���|��14%�
&���#@< B��)�`/����zsXz�7	0RS����~fdG��d��jzAS�F���NP��>"D�g�5��lT��a��yp��������<�
����
}7h���������XQQ������%���oqN(�y�8w���h��M��j���e���S��q������8��p��5�-�!M��J1�c��th��b��{�@�,��f�Ccd�����G���Q�ca�u��;����^���a��� �}E��{,������8`��#��y�?�d���UY�]���)�J��9��@����-�1T�XUf���W�����$�C'��d�4\Z-�O l��'M�G2Y�Y���
�\���� �Qa�1%�%����ln�Cu�6��t���P�x<�1O��@�%���:*+��#��U��������0N:+���4��E��^Y�o}N�q��X\�^
���`��O�PkRiQ�L�?�e��
w��Zo0�Bq�zd`�&N�+�+��BF|�cr
���
�a��l��@��~*^��g�y�.K!{���iPpZ"v�KS�i���3�9�*zg�u��n!������v7?�����������������6hf%.�
�a�Y��&�a����z}������?�,gP3j����E0�0�S+�����??�|����H�ii���*���H��=�5��.�����n��.F���+�[�aY����>��n\Z�m ��3�j�r��N��6�D\����"�j~���w�$�F�n,Zmt��]�XY���+�*�"����Cg5/@���i1*��3Y�QNr����XEU�@�b7	!��xP�a,��g�@������^�B5�Y#�)�!�9���/�3�T� �*�1Hz�
��[�W�����`���.G����B��J
L'�tn�O���?���������W�q��z�d�YR`4���W��:Q
{���A�C��3[`�*y�P��gVy���r���:����=W�X[�L��7�j����7H:L"�&�	z�LE�"����>*���SMY��'�4a�\�,G7��E����wPK�j�.<��`�?��=C�%��w	�;j~��ti��C1"�C�h0F���6����w!��hY8>� #�h�"{�E+x�Gf����f���1��:H$��n�T�V#����������LV\.q�Y�q%������6�e��pK$�N�pj��f����A����j,��3��a�dip�r�=:�^��m.#q8a�cQ����	��DX=��!�kZ�
�t-!�c1���s�}@+�|����G�R�2,�@��������PR��sgowyI�'��V>WI��#t�wB��� g^�Q�4�!@;J��"�y#�E�R�O��CA�'b>��$dU	�dg

B�[�����"Y��Q;��(�G	
������SY��8�J�4�8.��q��8Bw����8��\���a��Ud����[�u�2��x7�O�]��A�?H�M��H���e����Y<x)����:�C����*st�[���~N~��0�d��Z��UL%�A�T�,W��<a�5L�%���o�L����������D�-%P�s��w�(,���n�:���j�94Z�L4��I�����L2���A�)
7�:�l�`�P�� b�}�3��
lH
��f)���F9-�r[<�������~5#���7?<>�����w��o����y�	��!��� C�A�C��P�qp�6*�_�^��b�i4=��Q���0��pZ� a4� BB�U+X���[���A ��k�\��,!����D>�
��)6��P
���W"4����sW�6A�w9��2���zK/���+u
O&k�����7$T!aR��S�v�:�RwI@y5���\C����S-�kM�� -�'��@E�u!e��������"`Kn��{��Po-���C���Ix�dU�!�������A����F=W���@;9o���w��(��=����S�X&�y�����Ow�~�	l����:"���`�#}y�)�S��6v>�3�&������M����^���v���(���J���J�������f�72�l�y��jms]�N--�����l��S��u��[X.Krlv��R:<�$��R�J<��KW��U4e���k�8!pCH1������
k�6=����a��i��yX��8����_LL:y��(��bn����������`@?���71�+!Z����`F�����M����*o���}�1����	����T�2
���P?��aG�H�N@Y-�����Q�����c�<qv��H8��ua�%�/���|a����{��`����{�/���>
��#��B�� ��oZ�"�����e��8Qf���J��I�f(���|w$��A����_�!�*��W��@H�������*DA/�c�s���i
~H4���J���i9���oP5_��1D(����os�)q�)��4A�T.b���;���9Z����	��L�*V���z'�D��x�w�����!v%i�WL�}u��U�tB
�3���������kQ��|��~���,��DW��D��k�'/��:&�-
$d���5"1F�QgcaH�8�RbCwh$�wz� ��#�>H��dN,�)5���s�]�9IC��s��Q�w��r"�7�j���������n?���M��6""��Q�>�;{�\�w�o�X����Y�bv�?oS���*�!������������1��Y������m,�z������N�L�������n����\t�Js�_���Q��������>I���C�����8���r��$����(�U��p/�����i��*��*"_�E"j��RXt�'���#"��6�C��+�T����|!����R#y�cm�F~�	�����j��R1-�Z��.�K�;�2S�=}�{'tU����7n���*�����>/�CH�:D�\��NZ8��{�C�eL�T3�H�.��)��n���"&\9�WQV���U������ZZ����EH��{��`�
k��^~c?�������������:�A���`R*M=��%���/��1~.$%YF���xJ�z��r�����%�&0�����.�2&�U+�����_`�����2�����DA�J����y��)���.j�o��#������&�����O�"`�'�rX��!i����`�*��PI*�q!� �����&�PA|#�I{��o4�U�m�'���`��^���������(�a9��M#.5�	�D�7�����E��Y�KG����%"j������-��������U���@�(��kh
���"B�7zbf�k���#<��_���#R�
���p��\�Y����2�=��m��*�$y%g}�Q�����k���*ua�,t	���phr3��b5&L +��P��"���������W�F�/4O�O[
*��&l9^�|g�r.����T�,�����K���ep�v�����l�K���4����d�";�s��)+�)�Y�wC�"�)�j��e~����;�
EeO��e1$�����|oA�2��I� B��[�GR�@raI�u�.O.�5�Y8�Q�����*U���/u���
�,�$AO�i�%��x��4G0h���$:�m���91�6�� ���tL
��p�n������#��Z�:;j@�����
�|d-���[�m��������R^�c�<��1q��T���������]v��Oy��%�������>��@�����Xm�"���W����|���9�ric���c���SD��i��8���}���=��/��=D���x���S�s+.����P��?X�g�dh�K�8�w�L��D��c�����������5���
���3��N�r/XU&������m d�N9 sIna��y��{~ �����km
�S�o����T
+?�!�_|��dd��?H��q�y�-�����M������-I�d�x���o�l���A�����av�;��@%E!������H�(���C�����������^���2J&�X�h�[�u�Q4�]��LsQ������W�j�����y���n��f�F��+wD������t@fDqP��3��c
kF��,�������$�r�S�P�w�MUVM�`S�J��H����F�[k++�S��(	�`
r$-Sy��Z$�V�EJ�p�)#�z�up%;gX�9Ep��'3rFfvj�G@>�8\_=���m����KU
_��
�:{��c�����[�[���R���`����gs2[�[:���HS������k��}s#hR�����,=�_��o��h����??wr��h�xt>G���t>��9�m;R����_��(Z��4�z���dz�yjt*���.�\PC����t������vh�0�I�W�p�A�J6D��Y�j�V�I�_�
,���h�&�d�����7)���:9���5^6;�f~Y%S"�����~l��:,���i��-Sh�����S�L�����^��a��oz��rV��
�N��*(���0MT���4Ve��y��9��c����*��!3�}����)���-�ZF>�x�fv�R�j�I[O~H'W�n&��ey��|��/�Ld��r��VV2s��S�9%n.���4�*�Om�������p1h��'Y=����o~� �G��.>�rc����4s���������SF1��f����1X��p�������RUPsc�Y�2>�>=�{�P��;�3W������� H��>�~#��[���2.�L�a������/$����x�<��#p}|����H��;$���?���F�O�n>8�����h����� ������ma��l�+�������`sUbo�B��������B�,�B�~����8�$��b���X�`&wD���-�:p%]9kx���W8(�����	a����F�Q��@w����8�O�H����{2L�>Wt�'�",�~
�h����rjd��������|����1�|��~����G�_��?�#����NP.���4�Z*�y{>��v�[��g�Y4�	"��&�bh��O������xzh[���������>?m����x�2{�/��Ouv����r����w������>�����o�����8i>Q��������t�h���xn��B��&bz���|���]2n9�u2m��8�
Rt��+P��3T����^f�M��_�.�g7~Y��&m/�.t�TfX*�v?�T���[���D��D����M'�N7N�� 8W�Igb�)^���\�S[�������J�_o�v�gTn����w�vu��s�y%�\�p���/�@�Ki��[��k{�_���e���#�����QA�A�CvS���$7`��O�W"��[���kb]��[���.�s�i����������=_N����T������(��=�w�o�;Nc#?�/�v}U8�omqu�:�B��N���qI8m+�������Ow/�U��[H0Z13�
�D
_�W�����_B�Meo�o�>�_�GB����P��>�o�{{���h*��?>[���e
N�]}���7�i�X��&uA[L�<t�da��j.K7��n�G\���r4�+D����e�����^���q�����r����SR R����+
������CS�pn����d$1Y�6�n���������}�����~�J��O��/���R|�6�z�R�+L@�������9r����|��W�zdBR��Ba��/����(3��"M!�������r�S$u�mw�,�D����VGwA�n����|>o����;��L?����-�,�v���9yY8j�5�E�Uv=���/Md �Z��7�g�$��)���d(�>E9�P5��eN]=���������
��<�CG;wS��t�q��1�E;rO��w���;���<��]��j$,:���@�Ka|f�L%�*)k(�&P�h�~XC��[6���~�xxZ�*Z�qB�A�T�e�t(�;"|B��TB�T�&z��}y:���S�c�rK�l�������A(�����|9�����h�X9�X��s���~������9V����&���t>��<��f�)�)W��W��>�X�
�����v�mk��ZLV�%�
�v�N����V��R��Z��'����##�������~=U�����������_��7��$�?]���HW3�b��������0bH:b}8��[mn<�X@@��|�������L<�Wu��y:����L_����Bf`��4�Pv�
<??�^	�r`��*���I�� ��T�$0�d���JU��9�N����f$�?��L��&&�����"P
�.P�$�E�x��\�A�f2A�jg�<*�c����������&G|�O}�t�������q�d�d����K�T�kH_��q�B��P�F�U�!?���z]1��,��|���s'������cvRAHe+�g���]���HU����sI5*�����G����rm�����@��B�kGVGHu�q�����^�Wys�X��,I���n�v�?��OO��)+l&�qD���+�N���
>�u6����bk���j$>7���D�%I�U�{c��wd���B8��n��!�(����%��F6;�f�b�����_>���P�L��1`F���0o�rX
�jk���9���%�p�}�[�;�9���Fhoq"���m�2�V{�z�5Q%:���R���1��j�$+��p����������

�
i�J���wi��C�YH��}��=P�9&��O�	��~�?�_���P���w�����0����&��_*A(��,�j�������D��
�.�_��nh�l������R,z�u�N0X��2��lV2��HO�����u_&�����O���5�b<��a�{[�0�H�U�p\n����|6�>�/�������;�"�z�����+�{������i���i*��>�����~� x��<�<�zyn%���5bc��/u�q���a�:]��j��m PH�Sk�*dd�.[���]3r��m����&�l};��"���j
�I�Z��''���B�"�
�%���q^:!S�h����&\����(f�}��n�4��*J�C���������K����kEtI��X�����d\�-��M���n C��;���-|���{��pEV�W\V���C����8�,,�H��be�(iD�`�U�M���2��bI�7����6�N���	�x}R�+s}>��L��F�����V�%H�l1�tn�(�l���:T����fY��v4����������R4h>W�\2����v:>mw��Q�J���V������8��9��4���$����&�+��6~^z#��a�#xDH�������-xW/�C��,
�c4-�5������-!��q���'��J0���~�- u0��/|]�]�@��&X��a�M';��\L�I8�Q������S���oQ�r�������7�����:�����{���P�O��L�	�L��	U]��2��&Z�t��$8hBw�d��5 y����)9�t��7O���#���HgT�,s��+�=������u�J?yA�
���	�JP����~�#)��A����5\��<�&.���[+��6�O)cU1O�y��4	c��^%��{�����a�E0.8�����n[�K�0K�( )�9�a�U�������/���X-��,>$����"��4������6=�j7��K��u_��M	�vry�$�F��#�G�bh����[�w�p��b ;4��7l��{����������B�/]0�&p>�{st�X1���7j��1r�P�������b�	�4b��x�x���t:������Y��<o>�����#����:^�FN���q�U��0A���1� �w�����9B]:�HhwB�R+����h��N2E��H��������	��C��d���3�|X������A+�9���HDK6�=�AA��������Ab��o!�B������}�.�;����B������n������Ki9��'�X�	�G���������F�k���2�o�9���d��H^�����Az�R
������MWo�k���+����{��]:�������7kN"ux��W�4��t^|�����&8����l4�kxhr�x�+����������]��,1R
�2�F�����~>�.���hC�6��Ry�bH�v�z�|�^�^~{��.���i���O��9�����q������X#����v_A+Q$%VR(4B�lh�=6v��]���_�i\H�A��`|L�0����}a�<=��^�����#��*D�p�yM� 27��\��^�v��sd��)�f9�����E��~G9�������U����~N�����@��f��U,}�^y�y�F�mM�v�|?6�]�����Y������6��A'����sG~��x��rM9�u���j�6K�a��I��K �������������	��	�a��1�%����|��W�-
�2��"�k�p��"g�~7�4���������nU"-v�^B�P�~��;n�<j�����4>OEP$Q���BU�Z�&��@��![��ih&Q(�']���TZ@='��a��*�`)*3N,8�������7�1\iVG�A"~wN�j�N]�^1��P-=����H(�F�]mrd��D�
D�E�D��^/>�
���
���h	�Pd�Yy�����l�2���x�QLCwE��	��7�~834��,^q���p����i+F�U���>�����4v$�c��f��4�P�*�ur���j�B	�H��g%���x���/c����i�P��^}9<�E�
x�n����h���i%��(��H�����w5#��s�	��d��No���+���
*�nj}���\�5�����d��W�^�����95���E����U�q)tb���S��T��{`�? 2��_�gtC�p�Xi����;���)�;q���
���P��1�vm�+1��S�����V�E�u���wU�
[��m��|.����|M6a,���pn�cdq��;J�����R;��D�E�{�����8V}B�=�I���5px��p>�~s�Z���*H���T�Z@�X/����YR�qnD�W�Sx��8t���������uso}����W��#��t��72�N�0(0Jd�����Q�hG�n����l���s�Ex��zB1�^������+z��	���b�G�I���A�7%eH-<O4�arVw	���O�}Hg)�Y'��4D>6������pZ�y�������(���||R�(��5h8SL����L�?�vKk�Y�!l�k�ABuI�n����*py�%X�,f|��~���`X�F�	�8��&��7��hA��
k'��
���5��Ge�/��\��"bM��A
�]��1���nw�yx~8vJ�h���U�Gb+�|�����uY|M�2q�:DI���g$��@>B������,*�A�����
��f�>u��������
������?0��a_�	��!ev�s4V��P��|���P$������F�>5����4s�1����#��u�k��&@����/�3����;��hBT��[�����7Vw�^W����~�5�C��Z�>�_�|
�H�4q1<3P�vpBC^�1�E^K`/,K�v�����L����Wy�2
���H�dJ5�n���iq�'���|#�1��E)�&��-(��8i0Q$�]m��n4m�A
]��{8g�Op;��/�v��w�G9�Sz��aKz�(�1�^�����e������58��A���R4��ps ��3��5��z�*$�!��J��;lZ��'e����w����������!Vg�]Y����F?���0.�z����El�j~A��#��F5�H��9�3-	��-_��o�����8w�W4l��	����j���+�jW����~'�8��:�$���g9'DkK��4������$������Kq>f��_���jtr*�}'�5������}���V�gN��.��_��k�V�D�Q�Q�����E��������u�9���FVHvAs�/;���I+������)�����T�GG3��]�����_I���K�_�^�������^>�����b	&"��V�Y����G�Z�)t���������Rv��D��"2���J���-U�@@G?�D�G�h�|I�A����I8^��gT�����.��H��`��"lW��b1i�cX�>&�>��j��(�(�N��G��^9��]������,�A���[�<W�z�e����=&$��s{���������`O�������{*������U�cV��������L��v�r||�~�f��V3���b���*�����#o��Jl�RQ5�[���������5Z����d��k����\��Z�F0�5KU*�<�?!M���QCk?�$'�G���N��-��V��I1HO�e��(�p�8��-L�,�r����|��,�B�iI����� ���rH��E�&��L �$�M�� �^�(C>c��H0�+%��������,�I3��0'm��J�?�FAp-A�3.5p���������CYS�������'Z#����Q�2EQt�BOoZ@R���*w�@���1:�S�)��w�f�l���y����y���m��9rxIG���p�[������T�-C8�q�g�$��#<����\�<Y��q�C*���eM�7�[�'Gg��S���Kx��1jR]"�&�����h��J�$��3�R����F�gz����	'N3��n3�^���S#���+�����K�|C�v�l��I[U����Qi�5�/��d�gt�����!�/Ke�b���Jl0�]r��.��d-h�i'I������N���F�������
S�J���5�����\_ld��c-k�����T#c�~ �O����`w��O%�b�F��#a�����,�����zC�������i�$(�Z5��,����_c����c��s��i����Ri���A�q:�HC�&�� l����~y��1�0A
�����e1+S�+�E�f��,������JG$,��
 k�S��h���-��s��_��*�>X�j���e<����������
����"��FQ�i�w�}]�Y����S�wA��+I���~�m&��|=��.���,$��s�
���
��~hqCcr����@�R(Z��u�,��j�H+�J_�]��K�H���"��P���M�d�:a�A�&�N�b��Rs��7���Ae�� �@�V�&����!�b���"G��>Nqh���{�:f���E�gI���u���g�p�	s��-;�BjI�]�P% AY���|%&L*~Q���H�>�Zu�n$�f6P���4QNNEI!�������X8v�4]��N�0
����V��HfR2����PQ�D�;�2�YLk
�b�=@���������w���������f��A��N��9HN�A�������P���)�{j�UQ!� �����������?��E��#�|��R�]B��j_�~��7��E{rZ�2s����������u=^�>c*z|?�A��%�����:8q%U7�=�|�!��S�T�&�u�+{�o�^4���,��D��W�'yUJ�R�Aq��e�&�!�]�:SWNH�T�[M�&Cnd='�?j*Y���D</�L��yl5�m��F �
|��]��4?���E����u��2-M�o'�EQ��v}Ec�����F(�
����Lv���8nd$������Pr�'A�2Q���FGPBL��]v��j$&���J�phH+��%��Q�?x+MN�0nGt9%���(����}Y>D.���J��}7�%���=L������CQGS�}R-Z���C��'��n�*�R�S��?	�Xstf��*DB'���x���.��+a�R���HkL=[vqb��n9TA����2u��UbY�i�f |��R���$D[��Q_M3
�
%�byi%�:���4*��	������e}���pk
H���c����\�>�����-�U�-W.�Z�.H����=�W���W�H���������t���� �����|n��#���0R� :���QU�d�����f�&�[O��X�uf�Yb���[|���&�4T��B9fZ3�Fz����r�K]���r�?�����E���G�fT����*�^���
���1C,X�A��*.����r!J�:B �Y.���(��B���R'VO�n�������y1��*Q���?����������i{��n�?S 
�����0���tH�
�N�z_v����*8���[��?�~�>*3����X����U�?�/����A�f���!c���N�e9^1T�Vb�t���J\4��H~�T�����n���
�Rh{k������bB��&���T �t��b���hg�d���C�g�&�c�7
��]J����J�e_�����^H��p�Ek�'�P�_��!-�R�wn�:{5(&�H*�������xA�}q���{��%�.�?��hQ��D��3��!u���c��4bF�������gfH��T{��xO9�Ru9AI�3W����x������<K`}�|8�e[]j�a�9��+��9�!��Hc��~>b-����o �yZC.?n�_���b�
���k9O��������/�?o��[:���/	�B�U��Ie����X���������k�6BL-�"H���$�]fU�!�����S�3�:,tw!�Aqbp���<�\�s[��}�V��L�&%�(��,�Ub�:����&qK��(��^3~���4|/��g9���'��\���H�u|J���>���� ���?=�X[(�B�Z2g�
��G�Cw�f�F�T�����dm�'Q���������J?Us�V�%��	�3���n��nd�R���D��B����}b��4���&~l�E�������S�R������~��9n���m�����6~���Z�=����Q�I���;��$j�`]��fq��po���6FxX��t��d�v~��]:��i�_��E�z���O�XV���3%�X8�w��)��$��1��$P�6t���R.|;�*^��������J@K��r�F?�/���8K;�5MAT������n�Vi�����  �����p�4����������_rX8N�H�NU
����rY�:��.xS��9t����+r���h���H��0�r����=���i?C�R��.�f�6��|�l��"a���������5o�lp�d��A�&ccjuK�3"C����
�G(���sF����2�0�C����5=���p���\�����&/���-��M^=*a�+�y�T�+!D�������<=��i���eC�������1��5��A�����>���[P��-�>}9��4��l8]oX�OOo�X�eZ.���P��\y��ru#�DX���a����p��*4<`��y�Rme�V6��_����bt�KZ/Q596���g6T��������#�����m�t�Y��y����x���/��_�v/x�������D��T�o|)!���t%��	����6���:��������"�E	��������6R�g��B��:&������#�Du���zc��V��A���19�4-�/�
����5j������%&9tV�PR�y%e����6��Z��A[
���a�lh�UwK����XYP�J���C��@�-���8R�����NpI���z?�(��z��1�Nm������3��
��(�I��1�����
@y�O�O�/���X��?:��/�������I���I��zg�)�7������{Gg���2�\�w�{0��;��~?���f.A�2��_����o��������5j��������Os]�;�W�Y��^�s >i\��4����YF�
Xsi�c�������_jUn�����;���]��x��ie��|������J�����v�nN2k��r���h���e����
=���}>AGJ_����/�#�� (m2��X��K�j��������rR������Z�CN�������]�������Tzr�jm8���*�Y�!�
������L*4�:y��#�v/��~�<{���k\����p�a�b�8P��@����G/�^k|�
���*�!P�
��q�U!Z�%��Wl�d�[1�w`d��|��������� �Zg_2:D���l���U��t.SZJ���(�������t��9m�6�������
�I��\m,�����;���(���O+'��R�.�u��{Q�� �Z��]m���
W�����Q_i���Y�r�����!l���@�!�5�.r�~�~�	H��p�M+[46\��? ^���k}(�O����.}V�"�"�IKi�f��sE����E�~y}����C��PyU4X%�<5��|<�e[��~�9��$0�U�|�?���hd�.����ke+[���>5ja�g+	u�IQzO���V��A1Q�!����1����$������_�k�������ND�+hI��U���e�l#/Z���7BW�)3��A����w�:0�����<��-��X����2��n4���P���IyUy$��/�?���&���VI�	
739�:MCt�%���H�`���O���i���o�%�r�
�'��� g�S8�F�f=�I�����#��N�L�V�z��x��>t�I��U3���\ ��zN���@G���*bGC�`���.KmE
3�z�f9F8��<T����3����M���������0lY-��j�����'T���=Y��L�+\�zY�s�����Z"��xf)uE������vR���u���]^O��op����t|YV����5�r�j�;+&V���.H1'�iD>e@����CO9�y%��
~]�Bz.(����������	19{
�����vX�+�S����%e��/��%fH�
=p��d��6T���v:\���{����=�������r�S3����g6pl�r����]�^���!
A$��L���+������_:�$��b�"����
�q60�0��D���8�>��Q._��v���$<b�B��(}��KY3Z�J��,wP����� �����Z�No����>a$6�l�S`-�]a����Mx]�I=����ZD�>0��]{04������vW�i��PH
l
Z�z���P����)f�P�Z�a�_���%K��F��Vn�K�J��5rLz���tQ���9�[�Fi�I"���A+]�$?`���@���2�}�Z(�54G
�x��uL��W$��_-��9��1�����>L|�������b��#�]��,j��4���n ��exC�U�}�jXLk-T�����s�r�@o�X��
����IRl�:�W����h/�`W��`a�W��Y�ES
1l`R�o&i��N���h6W�tE��[)������j��&{F����b�Z��
����Gyx��� ���DX����[qe
����s.�&���A�� {�����+������#���q6��w���\����S�E�J9�ky��4�w'�"R�~}���b�y�OmB���!�l���e��3f������2��w��=?�-����n-)+3�z��I�^��<���X�"K��������qx������'���n������� f������V���DR��Q����^Mi^�Q�G��X�t�r}<q?	���;!�7P"
Af���(qz�u����S�;(e��k6���M��z/O�F�1�:�53N���Z@>�||���t�|~}������i�b��Y�~>����X�{�t��G��|��3'�An7�>�����9����:��os�����#9���!����V)CCx����a�����+�S�?����^���6��V%�m������6��p��s���.���������]RM���:���"nW�Bo;N5��@��n�e������%�����c�Sv����r|�����k��{�:7�Vn?�
��4R-������|y����U����j���V1R,�r�?{��Xl��)�����������~����~���&o���wj{������]no.�X���C�WK��)1�b��*_�|pL���b�����f7��Y����-�K�a!t��#w���������y3SP�mn�����7�)�^������VpW��t��.B=�0=�'���m���<O���V���`���d�s�_^O->��-�'z9��n8	zQ`9����������w�]bs6tz�z@��Z���Mb�k����R�o]����3�C
(������U�
�x�%������B.NhgmdO�����hS�
bk������R��;�JT������x����63oN���0?�������I�������C�0����b�:����u��i�*O��(+Gl���U6k�cu���D����D:����-us�/m��	|����t��@e�����$/-�s�d �
�u:���-�2�9��0��z9<V������������H$9>_��.���P�����Z#<�������t
yU�:)W��LB�H�:����&�V1�a�{t�O���o�Y�B�.�=o�����\��H�
���5���b/L���D�����q)������,���m����$k��1�,���o�]��$�#<��:4	��e�B���SU"Y���~��������@
]���$�R)M������,b���F2!%���H�G������j����	����GO�W�`�,�EO�b��b�{�^�����z��o/�m����������U����`�����9Gj&�<�AL���U��2H&Z��#����[Qn]O66�c���I��}(i���k���a������x|���W�h5�dH�fMH��������}��>���������@������������i�,��/�NQ���Q���b�[��?H~�2*��F�^�;��tV�Q_�;�=�_H.t=����'��R��`��gHbv��9G���u�%�zV�M%%�d����
�x����x���]vx�B�uq<'�5����.sb����h@��Q�S���]E-.�� q���*���*�v����L�� �S���}}����s&�X����7���q�&O�E�Z"�'	(
w��-;���z|}z���C��H'<{Ru�9�L�P(a�����}�U����"�
���L|�����u���qVR�x���j�;�*��;Vg�f��Y`�D5��s��"C��<c'�(��0�N@��Y#PS��&Z�H|m�7�nD:_v��e�@�vd*$���a�e�P
�v���������>D��'�H�:5j��	4��{?�k'2k�����4?Jx��5)��y�vX�~u����.x�x/*���tt�z�H&�o6�>���l��V�J�C�Z9����o�U!�,�������}��V1����� f����b�V�<awX�?E&����{�:&� �#\i��AD�s��6;N@q"o��e���6<���� �%r�}8�)H�E���$�p�GcI�0qR�s����+}�������-���NS�M��WV����%VhA��L������F���rh ������J4 C�#�	s����}	'�f����:��>r�b��p��q�S����"Fi����#0\I������Q���u����B[V��8�+��9�RZ/p=�M U��l�x���������\ �����P_�������"��s��5Ql���psE������#�V���%���J���Bd�q���5�Co�\	���
(�?���T���-���y��omS������*�P�,����m����������Lg�:��u)L!j9��q��$����H��L�.4��~��%L.�"�hI��a������5Iz�^��k,���2��d���CR�ewx\�O&rd�w
�9������ni�aFS�YK}�5Y�������_A���..��T�'YY�q������vx�4�Q��$��T�t��``s��B�������H�G'.�Y�c.�5��@*K��hv�r��.�j-���f���5g�3�$Cd:���9�p������?�[��"�� {��FE7X!0~�������f�O�|�9B�������RX!tj�>�r�oR2�#���co�W���lh�V�8�]u��e���X�d��C�Qq$��z���k&4�}m�=x�qt������fv?�(�{��w��0���i�
p���^i��j�	.o"=� b�W��4v����v��X���y6����Na!�����R�����654������ �oG����|k���� �����UE�eU6f��O���>�������n�B4�����!����{���4������5��->O�L����j���T��t#��M">{W��l�j���/����wt"�e����En���O�>��qBe�������~�=�@_�s=4DD>��2���E&M�
@~������5]��{�j��j7>�XN���5A�+���~�>"[Ii��[UO?l+Za�nMn�]�a�z�L����^B>�	E�>8���T o[��T���3��B�LA�N��;����s�Xu�T�	��@�,7��OhO{���q���woq����?!T���Gs���0�,)�'LF�R��@h�5���+_�W���'����40���'�������f:h[��� �F`e3\4^�pM�x�)���@a'���L�}�`��0���U���������v�o]M��`����uQ�~�;Q�c�lhfC'`���)�&VeW�u�����B=����o�lp��Y���}���]�'B�t�����Y����?�rXC��k~�#��y�[t����#�I}�n�s�U���M ���B���9�����X���8�I2T��X�8�2df�?N�������s��3�A�Jip�j,�J����\�f��|�a��P_���d&y	�5�y�1#�����D�aT,�����NzP�=d����~�Nl�}J3�R�(u��{�`'z���W)�M��P�������]y�����0��~C�ZP��u	pw��U�=�}���|��f�l���|����f�s��2���=��Jo��l91-yf�+(.U�,s��Q��R�c iT(����hG!Lj� ���
���u�u��^T��!:EJ�ia�o��*�+q���U��I��5Z�Y�3*$�`T��3x����fx��`�R:�Ef��"��m�`FOX�\A� ��*H���^���UO��T
�Iu�R���C�]Yxh%z�1���Te�������J�*��*��{c��l1t�Fz���&���a*q�t}4a_��f:*F�C?���DXo:�'_XL�2��.�YT�d�
�w�8�z�@S����?�j=�&��j�2'��:O�G��?�9R@u^Z~�s/��'�=M����P����I�X��:�Y&^���P�B������k!��R*��Y��1�����������#�}!C��Br�����%"�`b'�xiS����0�)'�a��P�Y��RL����ta��]I����R���$��*���
��K`!�������'.��8�h0���aXqq�Z�)�!��jm�R8�+5�H)�����l��0T/G�{�_�����MUs����`���|���=�^�����)����>�Ztk����3�&<�Y���M��������e><�h��gK��PP_�S�=���k��h�x��AoB�8|`M�w��8@��8%+c�H���~����{��{9y/\*���1H�����tk��
��G�o��
A���-U�r�Q�X(F 3�L!y~������O�d��c�u���2���q���q�N������Boy��uJ��+#��n	!����D�q�9����)����lGjJ�$�~j�L�:�wFRo�(��?�X]�y���)>^;nM
�a��%�3����F=n�(�,�BB�����!��	�P����?���Ls;�w#��vEr�"V	��"F��a�j�����FhV�4IKtA�|�����/)e���.uX� ��)��$C�{b��T"a�������D�������0MQ�����0��t���,�H8Oi�,m$�Y�����<e���W���#2
�O������!�b�pWy�}�����<}��T��r�W���<��7U��hg�GZ��N���O��j6yJ���=o]\����l8�_�/��y���P|����s�7�o���F��(�z���O��M<����Q,����p�,�<�4����K�,N����!����
&�c��gk���F�l�ysIm���k�\Z�L��� ���;o
�I�{
��L�m���E����g�=l�M�ZX��H���_�4���|�WH>Cj<��e?S�r��,P����k���a�f�<����$�v��H�x���>�p��x}f�}��T\;m]��'��<�f}5�������&2i��+���jH�[��M��3���$	y���n�������PHJcL����O�/^�D�>0KQbIIg���t�L�g7]�4PP
yE�sW��A�W	�����.9�>�>0�s���i���{���O�'Wc�Ys��I
}=5�&V���VHj�1����9A��%�����W=�'SQ~���w����/�����B!v!M�n\�����-���i���`[C�3��8{��
!�;�)!�6u�j�
z��9����`/��$��Zq:�G]�M2�bD[���Y�h�*xDPh����P=���w���!����
� 46y���,B�[,����0vhA�s'�OA%RRu��u_���Q�c�of�nn��/���MsZ�"�����y.�l�B���WkM�f����)�q��t���=f����cj*6?V�h�����Z=(�H��S
�5�N���������A�s�w63UN���Dy�dON�0�|v�'t���(�s�X5�|�����IS�l]��F+������pK��uV�l_����~>��Ny6�^������������V�c4R�Q4=9R5e�w��L����i�1��9�I	R�G���^1�'���.���Ufq�y�l�m�&��'��;�P��
]c�{[�+������Q7���y$}z+w�E��b*������-6i���:����m����I��"7�n<,�������hh�$��t����
Yp��r�"1�2�������C�E��}���x��
V�pmBV�BDk�$��O���~wB�����C>u>w}�Y)Q�����N{�iFak8�3�
����[P�,*���u~�>�=�]a�������3vl3�V���O �����9�n��l����,���/�{�Tk'�Y��s��K��=K���Ln��j
Fl�`:Um����
��/;?���;d��%���,W[�pS�5��o��$s��b*�����)��M)��`7���r�e�+>1d�Y]GV�|���B�GA���UN�Sf�t������n~]8"KL���*0���)A�V�7���^�����0�T�lR�s�E��2�a���(�,����w<:����XT��=��
ye���i���������oK�O�!����V�e��F*�b��v����Z����La�a6��r����V���6q�PK��)z*\
(PK��"N!callgrind.out.115655_before_patchUXq�.\��,\���[s#��.��_���0�����ZY����e�Gq�c�<��/(����_r]3�
 A�go��&�����~k��u�\l6��vus�;<.N�O����mscf�C�8��)��o���������	1���1�~�����xz8���������l�8��5���?.s���/Z~�s��n���?���������>��~�8��7w����Mss{�m�<yX?<�y�?v�����?<���S��l��������������oO����������77����}���_��s���xx�Y�E?o��������o������o���M��9����&���������v���a���?,����'�/M��S����U����|�{�����S_����rw,�Igm�.Q?����������~:��/a1�p1V���5~k��wY�r7�����=����3��|��_��O�?��������������h������N��a���t5:�*���|i;;�`�`�&�������;�k�O�v����%4���7�;+�L�.xC��|������`��%<b�����S^�H+;W
�7����j~�������_,��f}�.��M��?}�wz�y��<'���?>��/s�p<�������=�6+|d���O��q��O��|��e+�
;�O ��q�O�i����s�S��x��N_0<g��`����?����8d�K��>�p�8u�}�?4
����C���|w��~y���e��z�>�g2M��� ��1���eN���\������;�-���9�/M��ay=?�mk#����C7\$�x�^���G�,�p9=^�����3u��v���DWD ������B36�����w=b��c�G�L.�X��y:/���]��y��q�.#t�v�����������(�XQyy�>�����������$]��)8]��`��`�Q�f��T���m�\����x���|�����V�8TM��a���w�����47���ts�J�����9��b��{�'�M���fti��y�<��n�tNV%��Da�k���A��/�?<�VN���	,���.�_�/��w_^"/���#fz����IW5v6����ay]���������6�	7y3+w]�6
E�`�3������m����w0$"�,~��y�a���{\�><m�_���C������nq���[ (*���y�����J]���D�I���#���I��"��?I�}�#��lgm��Gt�iA��O�C��e�������*��,�>}�N�>�k�]6���e;���4�N�f3��_	ys�y��9�on&[�\�
�����|�\<j	��4G%c������C��S����-5�x$y���a���������L�E�9/ei`�:�=s�@0���<�>��@?��4[i���3�R�D3��;|�H0�D������-I�"���,�1�n���L,�Ni,F�6
�	'���_�y��;K�9���8���I�2�:�*Ux<\�,��gg`}�S��=���u�3�QL�@+a��a��[lF�����NN�1m���i� �l��a�����������d�m����^&���i:�]M	�h�>o��u�����]�!�@z��?,�p�<y�;YW\lW����'��y���>����2�����:���.n��mOYO��Y�B�h�i"t�R�����&������W���It,��"H��\������P��Oj���������F%H�����*��������tv���YUrs�r�������H�������i�c�d�<�6t��"��B��v��(lQV�E,m�}
�[m/�L����{�d���^
;�_�B�q.��@rul�DT6.�DmS��p���Y2���_N���8��������3��/�����G��%AC#{����Q��W����^$�F^Z19�
��:�v���H
���x���g@(�5b*�����<����-�F^�`�]lCi����b�9��Q3�m�!����_�>|f�o�5V���2����%��X��M����E�����DoRT���1��'���HBwFn�'�^��jIVEg�=1ND��{�QQXE]i�'��Sm�Y	���>3i��L�����R:#>]\+���S�������7"�K{7�����b#T��4�v��������2h&�v���f��rt�/5�c]���+{?R�z���5�<k�w�N�4N]	�.����Nm��mswm��&
|j�\��F����k�I#y�l�qdcqL��4����\l�"���69Tr���G�����,�1��$�8�hY$`ALZgmp���=��MVX����[c�$��;��.�ue`~�=��W8����D���6b�Q�������<��������.�O�������c��|(3m�����ot`c����V�t�$����\e��1
X�����#�_m�i&~-
�2����U�D�}�98����;MV�h�3��4N�������U���������G��Z��hML3�n3^2v	�W�nm�d�"d���@G��X3�F^T1�;��t�ad;�����j�X��|+2�G�o�Y�l&�N����y_|pL,������������x2O�����\�u�v2���i���v�3���$D)�����>f�������|���@��M���*{�����?������[����Q�Bc�P=�'�v����a3{��8v�d����].�}�s�{��4�mQ�_h,fr�$�]��	�kq��K������w#l
)x��Cz�
2lPK�.���wU���$!sA����<J�/�u��r��~������m�1i�k}�����=
D8�L<����F������G�F��-^��bC�Z�����JEE���l�,��Z��r��:������������mb#��v�,�e9m�O�ZCp�S�T������~����/�d�
�;�_d8��Pkb+�7xy(�gg����	�4����C�v��OY��;V���0���H'��w�g�lg�	�,����v�4>�q�
wEC��}�d�
��;���xu+~'��'�� P�8��#+��8cL��	��,a�[���:|��nV�����$��K"�k�9�U��Bao���8�n��X��S�B/�o�lJ��U.2��;v�9\Pp���&�"�;���FE�����c/�
}S��+g�E(�:�mBY����Cn�h
��EPS�.��'rc��
wR&*�]8�`�QGZfc��R}�J �i���	;S(U���m\6';��nd?n*1���:b&��x�������qZ��
�]�t���������,v��8�����4��������x���|�v]�9����._����h�3BG�(��"�M83��;}d�)N�_��Y^�Pq6��U�]�
�m�����jY_���'2���6#�)��LK��3�X������eY	L@�U>;���~�����R'f�~��?�C���<Z�Eb��qDO9������K�Y�M3�����_l���]�d����kf�}���w'x"���D�<&����v����Cc�*p4#X"v�7����o�~=3!piH��/t��$���fVlJ��c�Q)�Y}j�N���1a�'����K�2��06��v���;#c�Xg�x��"CSk�D2K(�0�Ea[]^0���0�.�!�����'���SpF��EW�8�
P��N4�/x��
SIK������8�0���6
l�4!��I
8FAN�la<$�ji�@�~�����BY4�=m
75@�G��boBIB��;��dq<qV'���������	{�Ut%��\f�<��y��FUKK$�xb
�k�FN{��%[��'��<E�X^@?0���" F�H�":��K-c���xwH��h���m[�v2 Y��&���G�n<�h�~A��K�"���$��3�F��|!�����S8�l4Q`%T��4>~����pZd^���r��[�����`b�?!F�0!J$��f4b�vvY%4��l��(Z$�*���s��f�� ��E���jz�Q&�4����k�|�]����=eb"j��c�+&zS�9�Y�s�B�8�>!�E��U&���U��?1�`qZ/����@�'�Q�.���/���%3^�6��nV�����d�����d�: R*R��?�X�����`U�T�*�B��f�=NNd 60E&����������{�����g������������s%&30�
��0��J/�l\5�3%�:����o�Y�P�4�bZg(�Gg�js��Hts ;y#�{���b�AI�P���w�KA@�o����d/�[c���ao��!�#YOj&��t`2=��Y���="���Q��w�7d�-s��^"_�V-Ef|��
n��.�X ��<X������'6�n|��H=�c�wn�56o���BlQu�7�B�X���wf�����0qX����&��Z6^�d_&�W��<!�$Wz�� �T�F%G�2z�M��7H�2��al�R�|Y9��%'��Qny,�i��2���/L�h�"���������b�-Fi9�]r8�����
�^����U���y
���u��.�����kB��?�8��Z�����������g�@}8\�(�6g>?���g����j����O���C���mx��%P��>�4��}������ t.9t�$����g�Y����Y�
�(����r�h��<�����=�����l1�zvt�P=TY�4����AA�?��y������X�)�xDTi���#9��h�������:~=r�$�5������f,����b9��;�c4��)L�E��~���J}8 1
�02�x�R�0@��[�A���'!�����?�v�S�m��6D��"C*��9��#\$Y��N�����Vw�)��?~m�2Q� ��
�T�x�	�����P{�����v��3fN+��P;�����F��tSx��������v�vV,u�
�1���a�4
NA���v"����:_�V�����&��P-��v�e�k ��C�f�T��(�o�$��~3�^��q� d�r���Y�G0������S��xr�X����K�GO%��y����V���-=�8=2z�����b���e����3��G/��X�x��N�C�&��9������f��0�T�b~'KS]$+�N�DH�2�'f~���	�0��LO����"jwh��/O_���n.��s���
�E>��/�^�o������������>���_,-$t����������D<�(6_c1Z(���j_R�������&�w�_�w�������l�A4h	0YL��%���@ U)��{����B�``�F�cJ�<zb���������1����j���P'V�l[}����,EY�Y�mTyB+��'0_���I�:Cf��S�L�y=eJ��~�6i�fg�I��) 	Y>��O����l����1g<�C��4(�y`�I�r���N,�������������Dx'�8.�ww��#���!lr�����#2�w�����b������_���iw�_~�e�����%�.	,���q�+���C?���fS���V��	�AL���������z�{xZJ�	�}�{�iq��U�h��O�`��D�#\�����������i+�4d.�������"QKS�)��a}8+��*B%�������G`�q�$%!3B���UZ�]�������Mw�����w��Y�/l�x���rP���(?'1�q�"5M�2Sg�0	�ay_O��[E������ ��������[ ^��X�#Js�����GI`�%�
�y�m�nga�0�=�Jr#�8�I�9�x��z��C�w�K-\��e��
�Ph�x�F��i���W����@����,�*ws�X���>��g�NP��8`����9���n:��P��O,	H���LK�4��w.�����J�.a��eUoD����&�)�G@,��������	!&,/ ��b��(&�jSY_3��P+{�����L��F���:��P����$��H��������+�<�PT���#96q�����zn�5���cDL��&��\e�����+������H�i*���f�<t,����m ��mf%��^=�|���hsaBC��i��bg;��MV��j�#F
[l��R��[M��0r�q�h��w�
����b+/�PF�����6@N�.!W��8�
����^�3z���[��]	��`4P��	g���J�<�M79)�[��0� �QA�f��6�0���b��d,.Mom{B3���i�@b.�1
6�����HH�{*��������6L�\�V��$JG��"h�!�D�m'tI���H�B����q��Y�hTH5?xdn��w+�waY[n�����������*V���
Z������k�?�o�2�"�������~/��CQ�~��K/�
�_���m�M���0��S��J/�<��n2.=�H�B5���l��',����c�F�u���c�yiq����O�S5b��i�D�`�6F�x��E�M��Y�=H�Q��@��8
��:74��>��e"����������}�;o�(�p5%-"�]�}�?,O�r�<&�B���RY��]�A�o��0����i�PzX����$E��v���o����������g(p�Kj�D�s����;#�v��?�U��=���LX"�.Z+{_�:���bN�H�L��r:}Ma���8�&�q�����\Z�2l.��|��G��m�)�JW������b���T���l��Ut�LM
y�y�0�p���P���Q��Bl�L�%`�vV�-N�k#��JZj%x�S���M��q�9��u��S#��i��rsF�`���|3���*Il],F7�aP�(-����\;�)6��@O��S"���u$�jfJ;���:ow��mP&�Q�y���dO�$�w��oMyE5u��kc����7A$<�v��_��^"E��^����
�C/c�D2p�����?�IY��T���d����!���/N��W��]����#�����t�(�6�|7��tQ,�$aewi��1e��N��)-����U���CN�7|�E�Np��4
�@2����x�B��*�����E���*(&�-}�Em���K��<.>�Yw�)Su�Z�����e��%���X~�H���� �V�rC��U;S��a��
r��`z2Z�7
����k��x@E	J��G����U����N��T�(L����B�f?�)4����EBk�`<Y������}h�owD��J�b,�7W+p�#�(V��hQQ���9#I�l����8E�ya���������
��1�Cd@�=�W����Hp�������>�@`+���_�Ik�e��]�elj������E���\���,a�0Z�=`0�?��v�%&�?��@���F��t&����{�1d�3��������d��WH)���:�Q�J�N�I��5�{%K�W�B�:'C�Dm|s������"���L�T�������������I��"�
��)`���CVTN_�S��;	����5~@�(V��!���,o�N-_�w���r�,�����������
�N�����P�����(�����Y����vc��!j����W#��~,��N�H*�����2e{(}h����J��$)��'Q����l��k��NvrC_��*�9��k4i�EW#n�n��k�u�(��X!�!��#���?����E��S��l�pM������I������)��5��aS����3�����D��F���Iu����m+�S�O��n�	��������$�%�!}��L��(,���Gw[z���Eq��$(��e+V���AT��2��e$_I]����E�*^wc�p��P=�S
[�U�|�X���d$�%������":+^z"��UL��nS��<�T����gqIT�i���#�B>,�����}$��w>cc~�J�a>gy�R��~b��MB��y����\A���V�(�nT��3�H��5�?y�6$G��L{���$Z�
Sn]$�E��)����h�lb��5Y���h�n�\t��:�n�eq|KRWI$I��o.���K�.���<)\Bs����H@��f�75=Y�0�V�	��K�b^S�c3�T%+^�AV&�q�g4F ��u�FsT����L�J�������� ���������l���be�8����Xb{�j�p� \��1\��.��]�
��� &C�������	~�����r�T���e����G��zK���O��zQ�
�U���=��zD���
�#��r�����7���,;��%<�<���2�%�-����L�����Z�v����
��g�.� �gE��d��{���b�����q�<Q^w�^���GrW����06����],+@H�����������q�����G��Xr�6�^��^��������Jng������������S���hqA��E�_o�l�B�B"~���C��	���&p>(�g����c����s!Yu�h�|E�i y������A�,W~��ue���Q���u��<G�4��y��:�|�-��Ci�CX�Y���$�������+c�=���
��� �-��r���c�������5��"�K����U����y����A+99'P\���9iB�T��B���N��KIS�9oE�B�q�t�7Pe=�kx+?UJc(�7�M��$F���`�[�'���=E��jnsds�5������
A�;��#�`{:�����0��6���Y	��`EY��U���U����2�|bE�mI���H����t$�qQ��'M�B��J���d�����FW,�u/�t������u��T���'o�t#�xw�5D���}�or{��rF�|eA6����^�~�	e]��������i������E��s	�j��2%8�W��V��~i�
�KZY�P���H��^L;����(Dr���u����P#���#���*�~�}����:VA��?�)����{kc�.\T1un���*�h��h��v����x����V�H�S��|.��N��zUf�s��:�d[�e?��(H�<������ ����<���8m�H�3v����qL��o�2�#�5y������Q4���e]P���]?[g3iX7+�n�����T�����3��h�����:)����%;y�-
v�t>�9�s���r�"�rL�N�fSE����5���C���;g1`�g���3n8��'6�/U8�LKB�.!�H\]���vs�:jnwt9
2M���a�<a��-6X����9�9��)�?;�������'Cmw��Cc��z
#p������_^~F8�����.?BF=G��r#io���^^�)yb��s��!�1��h�p�%���ay����
g�gDxN�n�P�C*p��&hhR���N3G�+X��+��&3����)d��4Xb��8�i`f�T��Q �kR�<3K1/L�gE�U�#SN8���Xn��m+�[���L���V��a"J���a��H������]�\0�����D�9�5���j��2C������g�����I�P)��;E�4k��Jd��uS���'9�%;���#^j��{:�yf-R�yx�e�_G����k�3�3���H�����M������b�[��D���x�p���,��,xb�e~��k�A��'���(�~�����su�K[%�P#N�##�����Noc��'iS)�����Dv� ��z2�����'Wp)�>#&4���|N�:m~X��'���zn������5����^��u���%�'P���}�k�2���vj;���@�3�KE�����������@ ��@�3$K��VJ�������"�"��/_���3"�3#*�RrY�yVJ� �����V8�u�b�� C\���W3,�>���!��V�9
��h����L�[8	�B]*\2+���-=|F�7��E��
�)����-A5
��<b�6���~�����u��XA�U���m%���V
��U)P�i��F4���$�:��8��S75N�A*�Ap�h�?�uv����]��Q����I�EP������8�p��1X��f5��@=el�D&&`nA	�J������vdY��KWgE%=a�2��:b��N���UV�'-�1����	;���;-�w_���gPwiD|�����w��y��Evd�)����hd�l$AL��:�l��gj$/��4[���C
�az6��������Im5R=f
��U�39�������i���,�t�8/�F��^)��d}�X�yBY�i�����V�b����vUm�(���������+�\E7��Cf��������/��D�Q�3�P ��F���lV�`.�Z��d��?�W�~��!z������1U2�k�o�d�,lf�l�Z
�s����j����5]��Hi������
���������	�jq�$c'��D���D%�U��~-.�D�x���i����G����������UB��^G[�h$��![���cp���l���`G*s��?n�R>l,n���d��C�*o��,��A�I��V3lz���y���h�@�P�K\��6��5�J{���R7!��t�)���d���bA��g��H�/�C��>��l[��Ul<��BBEy�'%I++��/U)�;#������Q�����@@�p}�'���f��(��0�D����&�|������*�LH|����x^A)y�SE?!�	6��@�&} $(��Qy%��!#����J��1�^Wa�H��l��o?u�t�<�S�
��{�6���S�c�Kv�Mv3�]����)��2�G�/��/<�����G����(�e���{+b#Yl�u��"��Ka������(�������/����r:�����x��O~���n�PY1���*%�fz���mM�L����TgrP5VoE3~g�������U���N��M2w6*'=x�DJa�-�Rb���X���������%I�U��P���p��Lr�a�y8�<�����Oy8d�&� �r�Qc��.4�CP�"�,��;[�9S���R0}\o6��i1�.��N�MYt�����r�Q,��"?��<3+�CW�����[����_p_��F��h�(�K&E�
l>�bl�"�-Z3�g%CB�<��o��S8�(R�m$��r����Fl���$7���%Q�,eR*���&�!1��pH����j�
����7�a]U$v���EP�Mk}��N5�����S���E����0�Q��Qu��i�Xi/����x��?mW��!��Q��Z-8u(7!X�.�`�k �#;��a�~��kr�qi!�`��C��S�;	4��+Z������!�J��	���j��lT�S���S4g�n����u���	!k�
P�c��A���JGY=��`L�X��y�I�C?��^���QLq$x�Z�02��X��t�:.&�K_�������Jh��dv���[�L$�By�#�c6�!�$�J8���J������P����������	T�!�i�z�7�nnN��b#2�7����)�����P�7���Ce,����I�
�0���q���$k��yzb�3�TB@�����Y����K<��e����R������yZw��;���(��l������mW��i��$��j}����������&�7���l�����~
�T���./MA���D�����"d�� ��a����>uj$,N��6�O�(���'�T@��X��M��5����3���C
�����w.�������p����z^c{�n���`�>3���&^*r����)t3���)��>c.�+S���q1��>� >��%����3G\�6?�p�=mW��f�w���Yzk�[t�����b��w�f� nc��D���
�������o��|�����1�W�
�No2u�5����{�4�������`,��Q�����6�p����xs���
o��	�����X�M��s?,���T���������~�]n�������5$����.!�!��`y���q;�a$���{(B8^��~��,+%�:>_�����"�X�V��������
���
���%$C�55�7��y���@0��r-��7:����������qq�ihG�T���l]��	��pZ�vn�K��wRk(��g	����mh~�_x�
�5���~8������`����	t�����QG�d
�4�����<P��}��l0�}����Pq!=^�3m@n]�Fm��m�+���������o��������@�i�~�g����.6���r�\c,����M3��<���2�s��J��YEGd��/3�V������c�\�����i��~���2�g�|k������Z}��Tt�N�#B�W�0����_qUy��z���,�����|�CI��/.��81���bd3���zP���x=6XX�ll�:����`������w�O���s�����www���q���'=��C����R���e��7�_�����1��8�;��O�mm��7��[b\D�q���9�V�-c��P�U����7�)�gl����68�;�p�����LV��<w�in���&�@X���|���dO����Yk�<���[^7<�np������a,Yn3!���
��dY���;�6�F�Q^>�R~�����|�~^�m��p�u���0!La���]Kc�
IH��2��!��R�J�r����
_t�}���E�Up�	��������-6X�u�y}�|:�����g��h{['���( g��,nn6�{��'�R!8;�4�/��R�*���E~�p[(��n�0g1�m��M���6�`��j�5W�a�{|\lW�w��~��0�f��=B�p�4t��� [���78�p%S�2���w�_`BM;�{�����}��������L�P`a�^E�q���IE��������c����%'0��+�-�+M6p!L���_
_��q��������m�n?*3fL��A��7�4>\��,<V�P�
$������nz#���1C���)�������Y1�Y���F��i���$q��p)�T��`i�,���������7G�IK�z8r�$��.���0��"N�uz���,��2c�CC�0	-�L\31�8O�����_O��Kh�2�8�
����s��g��u�]x�4��A����� t	�f�:u��q���teA�H�HOA�W1A1L�H���W��F�Tm-��X�4X;�������2+cH;D�n/�v7��������J=G�� ��v�8<�gFn[��#����V�����[+*W��i�2M�������R�tSH��5�����������$&%������7�`-I��ib.��3y/?��~�Y���U��`+��?�6s��9�������Ez��F�z]yr�lw�;�N�-���g&R�X�mlu��#i����'��L�C�$��gu
 �C��:��;�5_�T����!9�'y�D8���Y_6S����U��,z�| ��MgA	��$����:�����Xe\K;U�2��������/�9��-����J���	�!��:�0���Z�8Qc
	��;�B.g	�5�dH��<3�&����<���%m��_�0��'������Xi���
+&��?d�'mvy��Lc*����Z��.���H_X�d<R�����X��|����Z5��Y6x��O�.vL"qm"\������Zz��
#�4������������
��n�n����@�9W�=�{_,�(�t�?�T�T�G�Z���Q�i�b�k�|��u`��3�j@�i����o�2M�E��X���Xt���o��o �T��@W]cc���=��Hk"���o�#���H����<E;j~=�q6�����jw�'=��P�D�!��
��,`lQ�}#����x��j�[RJdE}��N�4�j�c
����x�rH�+����]9�:����&�q���m
,�v���	DW�&\�SZyc�+*���feh�#[m:78}�G����BGU��4k|h�u����@-C��������}�� .t�����^���0�t$�`8yV	��Y�����B������k��N���wu���KY�G��]��R
����e}!	�n;�2��A���}Y�!Q��c�``��vj�E[+00�����"z�j�����8o������b�Z������O������<�nyd�R�\_����j�o�yW�#�������������y�4����p��#� qhO�����j��N�� ���M
�'����v��:V*���^7����Y�Eh�-��1��I���,#�j��N��;�W�j&�-aW ��2�H~D#�!YZ����^>BETu��3E�g�#PH>-6y �m�T���T6��2�|@U��6&���)�����Z_Y4HE=�6,/��L�<��'���85��������F��7���.�71^e0�B$�Fh\�P&����6���������o��,����w�����������Y$�i��?�}O��|F2�c�/T������nf����v�����a�^m�� ��
�1�|G���>�i��4H�T���Rm�z�}^2`�l�$��&_�L���?pM�E��**�q��j�_�g~�E�@���~�tO����D�-z�&~���X�^u���'�d9Y��
����<��%2��i��^(c����T�����h-9Y��!���w\l�5f��C�K������_��/���V���_�/7�H���J�[$������}oT�4�@�Z�����������������[��gy�u��\������K<KK}H��It���+�5����z�"�@�lpUi��~�=�8���8�R�/�������U3�������b�;-]5������)����-���8���A�]]|�������\t�f��7]���"l�fO���6�,�
*��4�E��1��S���f��G�<�:Ax��2Q�EsX:�\��r����!��mbwV���'�0�!�(q�����\�KV��!:-���n}��jP<�u�1F8��	
������v�$������ndAT�`>�Qj��P}��6���w�����p��"�><vxx�c��:<,��w�c�^)���6�F\���5�����5s02���{��?���1��&��Y����(�P�}m:�D�x�x"�L��y%��9�t�@����� ��O�zY�����j����x����O��L�����lG�1����C������P�8��K�W��V�(�����JZrK[To���?�G��BJ��"���D4&���*���������f�t���l�����6������;"��k��Bji�d���R��J��x��>���������ljH�j��S;&N�Z1�w�}7�NP�m�}��[1��c~dNl
����]����XD��I�$����4�'�o���R=

��Lz.t�r|K���� @M	}D]��t��S���-���w1$��*4��t%��C��A�S(@bUOXw������&+`�bs���-�%��������;g��T<z��1�K:��|.;U�_�<�0D��BbC/$���ys�]����������t�O��������q0P��?���W��0v�����-����p-z�F���Q��&5�5K6:��e�r�8L�?�f��tO�g�~���{���?��O���B%�����mP�_����=���0�;����=�b
�f�F�S��&1��5��!B���!����UT�L��W������=��{JC�;��V}�Ly��
W�3/ �8�@'�����=�)�C��DN�|�:�'������6���'�o����4�9������&j<#���;���u���b�m���);p��6����G;�:jMk�i��q>���;hlM����V w����	�
�ax&�e����zU3��z���k3�l����>�}\���U"N`�D~ [������[u�P�*�<���5D�����*�0�f��oYCje���wJ���|�o������_��+�-��H���xX��2�.���yS�Z�6��.����9���m���5�l}��e�1��,�2��`�Zv����7?
��J���1� LH���;=����W4��=�����5$aZ�/X%$�f��}��Dn��0��q���|��>�&�yQi��c �y�!.���|��Yd=��K������2S�(Nx0*\�F���=�����4�LRa���*��2V�s7����E���k�HN����
W��������n�kNC����~�%�����o���uL�o��v�����#R	�t^����#�M�����3����	3���=����2$(�eP�����etQa*
���H��q�2������M"�8A����Wh����zO��w��������Z�JER��IrFV^�u����a����X��?=� �J�����D�#�x�����f��l��;g|])g�!�5��|P�����ZW�d�X��8�^���=m�R�U��'_��-T���d}�W�B+�5Y&�W�Fq���u��*O��������d������f�S� #�[
w|Y��5:��/��U#�y���kG������mis���&���O�J'�n��}��s��X��9�������\����h����R�����
c�����)l�N����PIo}�u�{:!�8,��������em&e��s���@��R�h�q�s�B����s)�{;�]���+�i��|��P��y&t��]y)fBD{����U�1XE��11E�cT�n]G�m$���x���X�U-���K}��e�Q7�R]1aD�hj��U�o_m�G�~|��V&�.V�5|��
����_D�oG�Z��p����u�b����6��W{���oi���ek�ec��U����-��������a�i������>?n����i�Bb�h���d[��;�]�k���n�c����?=�(.�NTS�	�����d�~�����I��Bn�y�T�b���&P���@L� G0Z?G��&�
�&�i�A�N����F3�y������E%3�hU������8U��54F���$t�[�GU���ZB���
!`�c����KB5-9�a����3�@�7�i�5��k��Y�w�jh�����_B�����-E��9O{ip���L��c�G�z�[�K�x|�������S�e�����da-�LO�w��\cLq��^7�&��5�"�Il��t�S����8��>ySB���zt��=>P]����EE�W������T� w������	�=����+�oM��rzL�����?�ke����F=��4��_
��Y��+�������k����7�����F�fj�������gz��z#����=�-l-�'15S���g�����#X��+�W���k.���w��l�z��}����kE��#��&`�sG,��y�6��rZ�����}��KC�%��������2���h}b�>\����L(v�m�,$��'?�g��C�R.���
$�+� �����K1a�+WgH�v�M���Ar��q��������;�A��u����u��f!2�"$&�(#+��#V�7������t���m}����`o���v�{(����	�X0�{Aqr�W�����������G�5*Sd
���]~���>?fe�_Adv��[�)������%m�9m�A�������b�aw������Q0��Jj�����w}��z�#���� %2�%�2J��l��79���F<��
�1j]���`?������bs�bE�9og<~U,b�p?����{��-��4+��:������: lg�5�/v{�H�Q��� O�����#
������A���E��Q�u:��s�����2UY:m���9��|�g7�m�L��9:�I�����3������ 5�	������n�J���q�o��_V47���������q�
��'j���u����Fp-�?>l�w������
:�TS~�
j��W�G�$���[����S��=+�'[��aT�H��,;�����G�j��j�a�Y�\���~�=,X(�_o�1|�]��q�C���s�*�:2`��p���Ct=�-[��tw9:j�i;�p_O1�d��m�>�}eBLd���ZG��^SA�wNs�_���6���$p�n�s���
�d��������	s��z��D�[JZ����E�'�$�'������r��ff�{��������zd�&�������k*5b���(KM$�|��c8����6u��PI�a�3����{������j�(��
��/���f��8W;��;
>�X�g�C*���E&NG��BY���6�L�0�����Ee�[���1M�%W��u�����y������i�i�|z*�Y����w�������������E��)9���o:}I���7�����P:G��t2�X��|��T���\�� G�������e%���Kn�P��{����*7�a��i�G�Hw��o��.�WA�&�=���<���V��w�[���LS�Y���+E���N�3��X���+�b
�����(_��lo�R<M��M�>��Dh�s��LbBT^6�eI��R�~-��f��6�YGi%���\��f��R��{0��q����@�����|6��s���y�R�Y�3�B�M@�B����5�,S�Vg�������oI���w��E���e����s�����������`��"�j��:�w��G��0�.d�v,��JN���$�(�S����e�/�h�[Q'�j���5���RK �7o���`�T��0�*t��R/�[�����b��Pj��L�Y19����$��J���2�#E3������#�^s���^�@31���!I�����
P��LT������b���G7�d�|�k^?����[Q��������C�������@A�V�a��;��b-'�0:�Wl��nP���%�?���#}���_��X��9��Nb �Q�Om�:
I��`��s��d�va'�7����,��e\R"�b�x8"v���S���H< @��D�s�q�5����7�aY��;�������Ie;B�]P�&u<��fYa�y��3��pN�q�5V��P����Z���&�7�����y�P�
����:(��M�_\��0#F=-��a����5��pl����Ts�J�Y�}��~r�E��y=)��6�M�
��?.���E��i4������V����$�h�p�o#�&J���xfxU��y�T�g���a���K����LK�?+�*T����eo|P��y^��YHN��t��tIOX����X}�����.�G�b�{��q�i�$�������
������`
i^��T��`<�56�_�<��Hk�
j�_�hVF���|����W*��y}\�=y�T��6�q�V�g��*��H�*/������|EZ����$3�j���EY%��m	�$f����t���	����J0/��|���P�����#P�c�K[V������i[4�Fu��6_��*���|�Y]�r��!�	lkAa�i���Su�vT���G,�`NlL8�+E��t��`B8=u��b����j}�oE���O�&5-f����U(��XK��d5(�z�pI�y�P�L�:{�y�&�����(�b�����n��5@�J
p��,�W]���&����A]�3�w��BZj]5%�o����f�����J����TY��Xh�O��#!��%^J��	�"%{#�-��������������*J\r��eJ�{7�0�/t���R�(^���j ~��,^��N���jf/��k�XHU�z������N����hH`W����>8�e�}�}��)C+���v�|����'c+��dbg"e���P�x�/�F8_���v������c^�B���}�����DCl[���&SLt��
G�0�����Y�e3cH-��Ze��
�6��������z;m������
��:(����E���$jC�#�6_`��Ya.HA�����?qRJ��c�D,>�kUK&��f��Y�I9�����-#q��~�#oU���I�@��y�������-b:F�s���n~��n4Nw�R��������'/���'/�~���|���UuW?�~R�E����V�����	T_*���0������%��
��:]�z1�h)���,b��r���C�0M�r�Q9���
�$�~�#���hU._���,o��I_H�T}vX\j���58�|�7����&�);�6C_ u���J�ah���>��&,����	6ni���7��M����@��$�f�4�U��+=��8�^�
����:d����1�u���$5w��
��w5�0&���3���K�v��Z{nw}�(s#Z���k#������C�u�n��R�t�� ����E������� �1+�>S��B�����ov��<����
��3�$��P��JCUr����c���P�q���h�e��RL�i����0�z��4�\c��^��JRJ����O����.���<�->�@Q�k�WJ��Q�,c%�J�~�k#r^��|�'}nn��|Y����V����jKS�����s��pr*��#�,��>��"("�gP���(�
�Q�0��R��57o)������*������%��<fo9e��S&�B>�%����vp+��%������R��s;�hk�k�*b���LQ/�L���-Z
H9�1�K����
2p��s����zw$-p��O*��� �J7j9�'�,���Y�$J�����h~_�D�A��i�z������nq�[�A$�15`q��|�����_!-� �@_}�`8�+'���fO t�^b|� �����d������~(L���d���
�C�i1��_Q{��o2�Y�M�`d���&���3�|(,�b@�����a��c����!�M��������������������8����*����\�
VuX����XW�}FCoi�s�9���8�Gm-��0�ta���R�?�-
�3 ���?��]�S����b�4�w�s	�����[���>��PWb��+5^T�{��u�%Z(�9�������&������8�o�Z���]U�4n��]4�U����M@
<�WvUO}Cn���K�\cX�C)9a��6ix;I47"j�7����r���I��f7u-����zQ�}��?\?V�=q�����%0O��������L�rw1��dX�'�Vm�8���[�K��B�F������u�yM�/��(��Y�6z7���K5i,��+��e?�\�����g�"���!��Y`��6��3r��6v�����@0��U\���
� �,Dt%T�-e�J���!-��3P�E+Mk<�B���kNm����y~y�O��!�qS�k��H���%-�L8�)2v��I/���ZV|n�!�F�vV2Eg	���.K�0"����R�bz���&�a�79Ll�@}I�$<.d��T��c@Xg�h�a�H39!�����8�xO<M&)�'�a8��r�p4(6�pj3�7X��"D0��������xQ $RP��R�sN���f�����mW�xe�i��xZ�B��������
�����t�B����u�2��<�~
}�X�V=���o�����l�K��}�U����p�d�Z�+�XUc%�YAl*}�$�s�V������Q����6WG�[/y\0�@2�0�;12���*��2h�
�r��as��5����A�$��h��c����S�^&\]������R��*�VP@��(���V����m�h��-�*+�����at�3�
i��I�����2Y]&��1tr���r�#`�� !���
<�<��Jr��P��P05�������F3����c����^�BH��z�[W�C�\��/��U
�Ga���������M�������Hu~*�;Jy�%���h9���2�%	l�@��q#�9X�D��!��@��������se��C8���[Il�O�Rr-d3B�=#�x��9�� H�������4������+�E������a9�*q:a���d���*��v�����-��;�#:��HT�w��x�H���1rn�J�bd���*�|��z�)�|����������m��3���xuJ����r����)x���XQ,�	]?q�h���En���I��$_K�
�g��,��,�g(� ���U�@�z����bd.�P<��,�Me��\`)%������_�R����)���@��2����Ix����3m�W���7����/�h��[��C<����r�j0����UD��'%�W�D�s~�7
W����`	=,�~Y��t%S�3���\y�g����������m�^����
j���|\JQ{O�A�]���T�m���
X��LJ�a��%�-��x\|YVA,��W�S��VsGi�4���_�>A*'..�9�Sj��@�B �0tBx$%�z{�r�ymC����+�����8��tf^��C������Sv�(�?9�Bs�b��Rf�[s=��G�)J}xW��n��b#z T:6����+B��W��H<�R�'d}�|�v��r'�m�xw���K���
ce���06DYa�9��\��m�T<1�).N�C��1����8�)�?��(^��O[����r.���q�y:���8~���a�,G���.����8�%�~5������� �
��R�M-�(����QF1}d��^�TA��k���~�@��B�
KH����V��0�z�.���,Q�=il=�j����e[\|C��<�	L�c�U��Q������)�*���lj;;���@Z!T���-��C�	]x�V�#��{�v�?t���i.����k�ya�\g�Q��,�����l����]��k�	]��F�8���w~�=�=Xcg-�0&R�Q���?<�1���������3�?si�Z��|�*��a)��E�#��%�^��6v�������g�����R����2���g�G��@8������<$n���kD��#Q�f���+�jA�C���C�a����]���>�����/]s��@�b,}��6?�n2F��HR\8�������y���{��M��a���d�~N�.�v���k	�wO��j�Gj�g�^�e�h�5�(�*���pJ�W��(��rvVt�&����s���������[�HBi���I���x�@��9LIn$^�������tV����2�������>��~�(����s��"b/)>lv8�A4C+�r�^+�6����X�H�D�a�Q��L):�no��z~���-�����6���n�e4I�����"k(����:�qMP���������(6��D����P��g�+���vs����r���x����r4�4�W��T�m��C6��W�����)��s��"t�%xuk����EFk"}����pW��!'�J���!�
���(�m'��?Y��U�%=������h}��2=�.��5��O�Y��}|�������[��%����:�-g@2����b�a���.b���Z���>����{�:D$�wX6���t}�V���}a���%h	�����x�=*-����n(��	��-�����bn��G�b��*BDJl������m	����&2�.qj��X�����G��6qb��UG�?&�l�OS�{��6�F�SA��1r?rN��5��9��9����t��4X@�^1�"���������B�U���>t��lAK����V��
J��_����Y�	L""l����\Y�����v;����E�;|����4C0�k%������s��h��C�q�8o�!\�?6�������D�_�&��/�yh��^��q
�p6�?����1�#�(e�u���K��x%^sC���L�"�����&dyIUb�LGy^n��=���e��J���b��B1����Ph����D	�Z�!�~X.&S�s
V]��Y]�bli��[d�[����J����i
�,�~/`��I�H��C��\���1zN��T��wd����GW^je0%���-ghi_�=`$q�,�(�!�'���6o��J2���b�%�N����G��:�6I���4Cn���L�#���Yr�J�-�d��=���5�O��.�hl
����c�(����&�U�����KeE��Z�l�(���7�o3�(���n�fP�����c4T��N
<��1�������OC�R!�S�R�Ks)�p�
�9�1���X��7�(d9����_����g3���o\Nm����*Nn~�m��CC<����	Uc`�xn�r�O`n��1B�Z`M:�
PC����g�Hz��o.���}����S�$�	{M���J�5=q�H@M��2 Z�'���5�����imQ~fjAi���e�*'\�R~�������'��������;y���m��j]�:�����
!�C�LI��P�Q6���M�8C����nb��H�mM�7��PS��/�j�{F��_���`L�_2��aEa��E��E�8�
L|��_>�����C-O��O{(�[�UB��������
���@TSbI����e��D.�+s��-RJ�>3'���z+�����.;��oMq�0���o��
�*1�R�����N�
�N�l��x;.�y���8M�2D�O����7m��H	��~,6u8e��j(dKS;h:�|
�.��]�m�+(q^*_ ���D
P}��w����8k��E|/?[�cS����6K(�u,H9b����H����,��e�(�.v��`��J��d��N$�a���Y<�>���/b���Z'��1��c�Yg6���<�bJ�����?�T]���P�B�-5�U��r����Sf7����]����fY#��LC�RD6�W%��
@	��6�Vb|E�g9�i��44i�0K~}��������q����fi�ki�Y���I�l�>��T)4v�x��V���\��L{�CS���x�Z�qX���[e���p����	��bb�}ZL6��'�lYH7g��+t������d��GI�O�q>�x���v��ek}��"�#�����P�����6�:�	���2�*�bL���u���X����b@(I*B�E6yM'mu��(�
��G�����������.�kF�\����-�	�$F��!�h���qu�)'�)$B���*����,��'$���9
x�X���)�. ����R�
7�7V�>�L�������������:m��`*���wq�h=���%��=W-���������a���Z�v����F���4�Y�R���^�k�esp��&���o'E������!�;��3�'N�p��[�`����`�������l��eJ:�I	�:n?���#�����6��5t��O=N��+w��7�|n�.Ys����W%���ZYt�p�n|M�LI�za�%���V�>����*@b5��N���e�t�7h ���B-�,$��<����S�����|����O�������@�O�Xj��W����1��P�����qI���8���Z�������g������9
A?g�>�R5��v������td8n\V�4��
�-�*��g���&%�f-��bP<;6�rS�ng��`�:[C.>db�^|����"���������W�t�k��\��\S/�P���`�$��5�Rr�2�]0#�@�(t����6��8$��%�m(av
�%K��L`�b5�m7E��� 9?}Cs�
���?*[)�p�x�\Y���%c�R�W� �6��_W�s�e����p]Q�<������8t��	W4B	��)�T�R)-u@h��B	
�������
v����i>������z�>}�c��6���`[���*m��K��5$��������K����>�;go,]<�H�����2cl�"���UI��P��	dj���������?�>����lr
� uF�,�GI�U/8����r ��g�/-��#��IS��[@��:~�V1�K�����t"�X9��Sh��#�n�tj_���{�7_�`����/��u$����,���~�{�?��v�W�
WHl������H
9��n�>{3�M1�7����b��Br<Q�a-��+�%�W:���k��k�5p7r��V�QoY���c>$Oy������r�	���x���sFd�U�r�2�N]S���4U�Vu��8�������_��q�kV�.p����gP���K��E�,��k:V9��\��0�*k^���V��S�Wg/Rl����Iv�<��@]��T(���%�x�<����4��������z�+K���WH��B�%��F>�N���;D��y�:/J��LS��}��|�/��b2�F��ux~�������������9e���:�f��m;� ��'�T��[��_G!�!4��0�B\t�G��(0�Q�9#R*a%������S_j�q�/4����|ej���������57r$����x����#����l�#�J�cv_`(U�7���_���L$HP}��{��LF�����X<|��s��"0���]�)� Z{����A�b�������lzt$F��`?5�}?�����k��p[������r(����>kW�jk��j�b\~u��������wn&Dw_���[�(����7����4/t�|����NI�_R��Mh?��xeE��C[|g�n&(D����y���[d����Z�,\5}.A���I���=�����t�H��p��<q���~��
DN9On�39w}59/LX=BpGR�dt�`�>{b<|���:�
�
�XQ-�����%y��Z����,�D��o%��SG���,A��=�:�Ncu�^�CU������u��;��u������������&j���%�(�PVj�P�@�Wr��/�G2����:/�K�cO-��+�UF��1��E����TPz������V�:�Hff��97!���{zTk���~�0�h:f�o���]<9	z\����y2�e:��#�L�RlF%�o��M!���r����z�
��z�su��.q����p"��Ea���a�m��q�C���
u�S�h��Br��)�4Z���#
 r`|�q���I6������]mwU��j1��:N}2F-K8�a��m�������?��MK��L�5������������ZFrw�#���6�{��4)b��VG5�j�H����������k&��iq�������Z�fb����������j���!�k	q����z�����M�w������~�i�p������o8����`G���xskB����\�'�����������>�G��x��~�i�j�Ma��i�:��*��L>~g��^f��"j�X���f��{������=��^�vW��h	�v���:U����'��^�����J!L�m�CbG'@��z�pi�e0sQ�I��^4�-6%C�������^��>��/=�#ON��b��8QS��x0H�0�����[ �aL��Er�0��	%����d�g;��w�����ZE�O7]��HUU��'���
Q�,og����%���S�}?�`A���X����Pk[����f
���3��}}$�^�z����gC��,�H��t������'�.�3�f�5�W3j���N@�(��-����Rj��%������tw���nY���gv%�A��g��gO+C��+�����^>T�����l����E-�A�'�������(���3gCc�
!	z�H|s��#�=�sA�>>Z�6k�}t����?��<>Z|��G}�������)�����U�n��u����d������.�	&u����LP��H"���''F��:�M��-��A|r������3�=�>|�>|����3�.j�M~��(,
�*g���ykM�\��d��[�n��~X?���k���bz��kM��u��
}2Q�nA��' �<�.?���#3��@�����4�?E��(�+��������%�2��ke�s�q|�����;����p�@*�2��:�`�4�����IQf����*R�F.�i&��q O�l������1'd�e�X��<������@�H�	N��fO[��'~�����6�d�9���������[��wsG0�}6��1w�.��k��S���q�D�����������J^yE�c���f�?z�o)�m�BG�c�����/�&A8�W���~����o������'?���-T=}U�����m>���;	��� ���m&"�������x�3��yf^�XP|�?���U��BtW��o��
����
:��!�r����U"��v��������q����+
���$,���X.�������s���������2J����Kp	��xm�!T���,�'�"9����k�������A#��W������������2��,8
?/����@>���`|��
Oh�jO�<dPd�6:����2��Pb� ��\{�[���l
���|y5�r�3�_7���W����o���7�8�@���y�rT��t�Sm�����k�����eP+|;��$���<U�-����*��>�j�_��w�q{��7����P����^�T�`<9vs"�7Cx��#�^	_������"�����
i#_����E�z������~�0�j����V��S�����m��K�/��>+M��e}EH?.)rre�;!���;^�VK�D�h-!������t���{M*Np93'a���s�����A�J1Yj
�"��tV�5�r��Pv�\F���u�R[	����6}qp������j*�%�v	O����:�*Wr��y�0OU#(D������XU�N�Z�6$Z���fo��?��h�p�%=;<����,��|�P[R��N[l�1�	i/��X����I�@����f�����M�7+���4��tj#MGy�^�Nq������B��*�y�������R<���4t���������	�����*�q��;����s{� /�2�`��0�������,�de'�AVm�j�88�����Bb��\�g�������������q�bG���4�����Q/�����nAI��������$g��� g��U�o[�F|4���� i�b:�/#�x,d���y�������9T0�</����$o��������(�,�e�Y�DQ��������-�G~}����v��w�P�$DVz�R=�������3K�7\���n�XDz�#��)����S�<u�`������w�2��N�����kO�z'~���,���~w�tz���b�@TaPfV��.^@���*a<��{#b�N����������\�-E:�d?�6��zS�/8�r�������>P�:"|]�������u��������&H�B��0H?��6�_t�d��U��X�2��F��'H+
OsV��:)f�A$%m���rdz(���Q��s����������)�u���?=.��,��1���ju���UC�*n}�0�v�.�u�K��:�n=B�p��m�j���i%�U�DN����V"��r��7tn�|_��W������^?(�)f6��%v���O?n�*�~���;���*g7X=W���:"�M��f�.��}f�?X�	��9�yt�%�i01Z���	
]��r�]����?�`���/���F�
l.i�;� ��]�z&���=��N/��i��G�h�����^��z>�@��C��hCB��I�P7��+�
�'�:�#N4�9d�_�����P�s*S���toa(����2M���-v���R�SQ�{3�������K������'�q�>\o��p���
����P��j�������wNu�������~�M(�|����d+!<`F���Y�9Z�E�9-�.�Ww,���=�����Kt�b���gNF��6@�NB��dDGW�:���P�X��c�"X8s���a�?.<4#)y�o*�+��.������jB�
\��������?4���Y��,p���y����k�F��;�����?��O�o��<���
�wh�k������X
���:�_UG�����[�V��S��_,g�fg%�*����5�\����k�W����1��8"���P�.������R���T���jG���5��Ss�2�.m�~�6�J9A�`���^�Dw!��
)�K��a��pP��=}d�������Z�qE�5��<�s�P�������'�0I�k�a��B	�^c���n����M��B�/)'������ia4����]=<���	W��?�������I
�;��<���4,�%�/��Q��O���m>�����q�-��j��L���Wk�i;��<>���(: ��N	� fx����"�3>�����Z����HEeT�_����~��y����<5{��2V����tgt���H����Ai$��C��=����M7�I�c����f��7���1�r�uF�� �8�t����yr������p�
����&�������
8���}��&B��`�vL�1����3��F'���
����jb4���'��?pb���[
������&NM���_]w=�:y8NU���9��}���0���a<�4�sM��+���D��.���/��3�Z���s����,�Qc1�
��nov�]��>��6�4�B��
��P��3lH+���<�ah|\t
%���H�R��5�a�$��.�Z��L�M����Vi�P���m���+^���	MQ$�hd	���Q��PF��$p�^�F�Q�N��� f.
zm����L���I>i���S(':N[�����>���.�,�q����t��jj���(�[���W��2j#|�X<'y%
&�n5�v�l1Y����!C���,��O��nS3��������;�a\k��*^I����|����FrD�o�?�<!+��A{�)�6)�q�p�+?X�y�|a��C�
[$O�S��>���k�_����=�z%Sl��nn�m�`��m6���H���^2,68�:R������d�)��|Se���/(1�<Q�o�{��@8r.�W����m����&/<���P���P�&�H����aK���D����8�a\��J���{�>F��U���j�������|uS�)�Ii)]!S�P�vAj{)�c4�0��'p��7;�AO&D9'�o'Y��tm%R+������1�9r��Kl������������w���W�}����.�����#��wV��G:���V4R���p�!��	��BS�Y��[���q�=/�V`h�Y����8��g~?)�)�4�
@��U�!���f����p�Y�xS�m���5-�6�:>���������bB!�p����u��iM���R��*��|x��}�b�n��x��Z����rw(a��f�������@������g���J�V���.���
�����4���*}�]��������%�����Y]Y��r4��n(j9R|����a�</�HDCenUqr���X4��h����|{����
[W�i�0�u�S"o����<��w�pg������~��xD��Z��&�N�� (����G`g�C&y� ?�,`�A�z�j�7��$�����^���N����n@�Z����lL\�*?2�i����������"�6��-R������(���v)����8�N��4�!�z(�����V�a$c@e����s�����
��t��3|�tm�}�$B�i�BxIP�����YVs	r/����A�a{_m��^������������9����m���
v�%O�J�����Ga1\*g��Uo��q��.��&?7p��(-)�
�e��i�9&�0A�M��=(!LDvT#G�- Z�Q���9�D�\*��o�d����6� ��e��:��F�ki�����,L�]���'�Hlc�����Q�b
*�Z����1t���E���&�6����������=�3W�#�5��/�����TP6U��nP	�H�loB��������6IQ�,HDt�%-���t���(��������������<2����}�d7��X��p�D����f0�����	*����m���A\�X���@�`I�c	AZ(�����|'R1c#�Q���N��t��L��+W�E�	���!����@Y;�Z�J���S��C3��o�/�����3��EU� ��Ev�����/��_g�(��-p>��z���x��J����@��#��Qw-86����x���7���v|b?<�v�po�w����4`x����I�C�����,�������o�����Y�p���>Z���^�F����f����u����`[����8	��T�c[����*q���`���E��
p�������Go�z�	&�7W����0N���Dg%s��[�{N��6������k��Q55#��~�c�v$u���c4}�d�d����en���96;-�BZ��[��Q��%������0�~����0/D����5#��_U���U��3��@"b8�c�RZa~/�+�w���Z��������C^9}(��^�]�L&��=�$�������F45^D�h8�$�oRJ��!���Dp&g�'��������:VU��%7P�2i"���# ��%��kF���M�}�"y�������N�������N+�Q9+����
:�!Y_Xh,��G�N�B�EQA��'�N�X�%ejD:��<�'�4��|�@��QQ�/1Y|�+	apD{�g����<
��)b&(� U��B���|*�����o�����s��A*D3���uUY6��KG���b�@�lq�A�+�9J|���2T��B�����td�qm����8jE]��k�{Iu<��k��s�@>4[Q�������#f ��s������a2,id ?%���"�hJd1�;��Nt�?�=���_�0��K4���*��<�D�������8?+�f����\�T�f�+�V��B;a��7t��e2�&E�
��En���i������C�.��S��i�T��tJ
�A�J'���w�S����F���2��!
d�W�Ee}I���\Mk�]�9�[��?X��;le5����g:�gz���yEhr(�/�Ix��r1���c�-���>������O��L���.��nO�k1��� ���/F����a����{G�<?����w>o��D(�T�	V-��?��B�L��O�ajb��<^�mm��p��e��c[�*��.�0���r<,���3���.������aA��nA�`^��_�q�v?�b�f�\0q�F~v�T��
0Zh��5��������]��ns:�6!����V�p�t�������aNk��
d�!�{w��'+v��X�Y��!�/.�~m��/��2�Sjg��${�4��qF:��M��������Y�a�q��.�?�k�vK��B�8����t���K�Y����kWj�l7���s���EaZ�K0��a$�*�
]�v ���m[e�����]8p��T��?�|�]i�)$��/����?\����>�[�[�K�J]������s��'S��������=�6s*��Mk22�4~b��}8�R`U9�}�sYw��?������Z��L��X����s^�.$g�����wG`	D+�P���]��^����Z��=���
���T;~`$b���6��i�M�DF��o#���<?����.�*��3���(�a��b�3_&m�������Fo���p
A�J<i�1�n��^�K+�����3��Jb>]Q{�m)�b���0��b�������f�=u�dMX��.�3�eQ��I"�h�������xX���UU���-\ k���Bc!��m�������B�(��e�3��T�N�A��B6��E����O��p���oV�*+�`�����p	pr�N_	����W���.�X������[5������ ������������_?>=�w�T.��V%�L2e�:��mx�r��m�6
W�;��rK0�}{��
N�@%�����wu#@�%L�������j��B1��Y�b�I@v�)�}-�r�����<�?*Q���+��s^y]*����cM���G</�K��{��������X *���&��T�����u��jL$��s��:���y�����G8�����0D�Lv$ZbBdk 9�ObF�E`4 �N��0ld�SW}
�]�5U�!t{���X��!�?D�����4��:�����.�tO8S�S1�����K�����#2��aQTy����X�-�v����5���{T�hd�����Z����-��>F�H�����"9�O0���4���<S0��9=x!�3�Lu#.'��)s���g��!�6�:J��(��5��T
�~��`���~����9��=QSs�����<+�C������>.���RE����j,�x��\Q:�2G��I0�xo=c��h��K��+v�.�zf���2����<>�8�F
����
.K���n���[�l�@��"�A2]f�KJK���}���j��R2d'b$O�����&��3!�s1���R�����a=v�\�wd$CB_�������)��=;��Wwrm�>p��%��������3
��<F�a��.5g.$��r��C���HuI�������Us��!3�Um8V��p,���;h����(�!�G��t������pYu��C6e1�m4�q�/<T�TxdU	~�1���M}�������.��a,#Q��!Y��0�>����4�����%v�U���`����#(��u��1Q^�P4{0�@��O@{2r��U����^X��_F����X���i��e�8�i�A����F�'�ngl�>�����������b<1&Ue�W.[��;���`U�������wZ��RC�i�gz:��8s�V����y^$��:�������������/]�u~�w�����,�S�\����$';�������J�K6O��J���W}���9]�=U�LE���P�N�H��eZ��#`����*��:�Sh=�L��h9h
�;�bo��t���"0,L���Ry�9����p���X�(����:l}��p�&N��";^:
�X���l�-��T!I��K����|iE�l*����C��`�������=�wD��0aE+�u'c�O���)�#F8���R9|D��	��X�u3-5d��>�����t���;�)�C$�u\I����j���������
�[ t���^)�����S8VO��Bp{.Z�����#�Z��z����$��Q"��AV?��D-��gJ�~wD���4"X����� E�*�.�7��C��4
��-����P�R\�K���F�f�#A�`��Z��r�kW���Q��4��DDL`�;l6I��H��������<	.t�s:�x��v������2��z^��8ii�	S��4���5������$��\1��1���:�n�%x�:�����1r����bl|VQa���$�X'8� ����H@h_�c����'�����$���t�31��~c�
�9��7���q��p���U$�@������U�����N��N6��[�>��j��-K�Hd�^WW+�I�sl����Y��>=�����:\��,x�a�# ��7���UY��H������Ic���L�L$��-G�������<(���1+����!$������r��d��BW����V�Y�W�e*�
�M�7��m.M�&'�����Ssq����T
�w��8|�m���7}gJ��@%�����R�R�����`-�)�U,�����?L���DG�0V�6S��t����?HLEN�:B��A�ec�;�W�-��\������t�o�/��T��a��g�*
r���)*��M�RA�>x�;��8P��lC�I��l)�f����
F�6�GV���!�,�L�%�589RF��m-r=t/=�T�?�>@a��s�SLK-O8����(�{��x��L��+F�)��[Oib`#=����ps��i_���LgI<��s7�:��~mO<B��A���J0�����%����HV��K��P[��|4%���00����"��q`J)jd�q�.H0$�U�'�,����]���V�N���W_�w��?�n�B8x��uiL��&���:��X�^���C����� �m�q������������e����C�3��������"k��
#�=����SZ~�^�]T���C*����}0�c�l�8�,���P�����:\m�ov�^�BI����W��\�3�f������>p�@i�
������z���\w����*�o|����-�~b{�(���|O�x
�k4)�kC��L��1e�1<���RG�e����n!����\g�����'����t
X/�<u� 
�ko�<�Qj���_� �N�K��(�T3@�3\�����`�N��K����W�g��;$,,�����������-n�&6Uc�����?@���e�@��;<�����j�A��'9=i����N�r���,:���_ ��9�*��bT*�%,����r]7Td��T��V@|��Q��>M&4yDG�nh�����!	�8��Y^Qi�@lZMJ����G��{��sXh
m�r"2���y%����ot����JD���E�zk!Y�&�c��EpQ������0���FH:���q���!v���U2�j�|�)��u0��3f�#����6��A��D��*��p0z��4;�!D^
+'p���U��yy�����&-�3�)�-3i�NO�Cw�����QN���g��o�V��YO�W��dD�J���Z~iP#���FH�Dk�4���������L�[q�hoy��-�oPb[����#2�d-�<S�H-@����c��y�TY[�K�3���_zrD+H�����L-�b5?F���u��p�xv���x ��[!����m�
�������4�!M����������Q��]��gY�����	��'2�x�&��t>ep8q���j�u���G�0�����0�K��@�LDj�ER+{�"���LITRr�����O��A�h�M1����ko W&y�����q�����$(��IV-��
�y�L���0K~�Q��Z5a���v���:8T������xF���S���u��iM��F},������vf�R^�$��U+�s\��v����)�4h��m�K[t
����]k8/���S�<�����
Ac��K����}�7#Q�#��:�[���"�V�\�6���y��)_+�
�4P0�QD���Qa��������z�9�,�%D.Xzr[��>`��v�#j9)"&�S����T�zdx����&�x�\}$Q��C$����_�<i�@mWN<`�'�mw/�)����t/	�X��/�T
!c���P����
����S�����jA��6���Z��r�)�	$�V��V�����|u��{�m��C*J����Rc���+�w�G1V���b�n
�y�1�����'����-�y9P
��u"Vq}����S��hbd�"]�|"�$w[QP�LD�U�T�u@�\sK@��8�)b�R�������g���YC]�?@	/�D��W:[������C?����M}�C���-��H�>��:QX�6���D���+B�di�PQ��[��"�q�/��Z���,���E��H	q���DU���������M�x��d���^�z�n�.(��(5�%���42H����^Rp�8|h
��}�����C}���/��G�H�o!+f��zwF4��Z}��}M @���^���~���D���v�i�n��$g�_���5Yh��#��z&G��g}jl�V�x�RD��vKR�~�����-���|�����[5���o�Zj���=�{�E%i#�5V��If��oJNY���@,����:�2o�F� ����2x���v7��A	r�0���d��=�6� L�#�4��->NL��M�����-���������[���V����(Tf�U�d��s������b�+;����n�x���IX����z�+X�7m�x@��X�R��N�]�������q/�� TW�5R`�������r ����]2^ K!�����'foVf��:���}:t�f�CA��N���sv��F]iF#�(Q�����rV��k�Q.��q���r!���w�������v�t�
��W8q����g�>�%�+�0��V�z����~������M�0�JB�[Qs	�o��xpT�f0���V2I��1����9�(���/D<Hn�;m�W�����qRH����T����q��Z���-�B35X�����U��u9�[<L.�>����o�O�����xjb�����(��@��
[�QB�U:����=n��9H��M ���{\=����Z�X�SD����J������n
�G�~�)�=���b�^3+��;o��9�����D����|�����v���q{X�o�}���N�'x}����7�R�"��lj���~�	L������%����csX�v4�oi5Z�c9d�`c��T [m�*��h{�t�����������gf�<-p8oX���S�1��/�t&��&�i���0K��s*�������*
D���_�v�UUjZzCQd��q�T����$	�x/D�CN�}o��]��������C�2�k����\l����(�,���JMt]�Cf
�3�6�������=�����PxD����YQB���Zkri��"_�a�r<J��j��*W��1:��'�~�p�E��>l]]0����@�,�!�u���Y�����i�]���lG���<�.��<�5���d�-\�{F U���U�����G �Uxz.�Lt=(���!������lZ��*1^�#.�C���������9�Q�n%U�{������U]���b�v�T�'��|�m&G�!"�L�n4��I2%�?/�F {����f�qv�:����Sw0�kC����'�Q6��W�@��Z@�������`cqyD���p�^�R�����������;�,�(����x��D���K�����A�A�������`q.��Q(J�|f�g<����~|]�B�IY���J�$`&�`*9��F�S�UoT���	2�8KFx�/{�:"��������v���l��:���K��M�T�����P}~�_�<m��W�����m"8�&-[�b�������hV���]}Z��z�wk��C�Y�]Q��B�N��q���p�����fW����lL�9����C���rc�iJ�/�y0�@|�=O^E���9�d�n��i���{��)e�R���>���o��{���1W����_0r� QBW�ty��Ha�����	B���w������c;���R	��Q9ll�����V������������fa ���Fa�l>Q��|.zgSZz�"�b7���+�
3�����o�V�ND �A`&�$����9\j9�z�u6�$&�@8k�E+R�����*�5:M�v"R�@t������c^��C%M��0^0���]FJ^��=�q�,����
j���J3m5=6sl����d��`	��|�x�iyrNjO�C��g,������=�qT���C'OOvP�7Y����}C@�)��q����./ntK���@����}�d1��{�������\��A��lW;��
eQq��0L���&�U���TM��p�����l_W)s��a�At����Gl=��{f�$���@\x��+�Qm>]��m���r�R��XH=�'���,
V&��	�|��j��v�t|���o��":y(��|0�������n2 �)i~�6��,T�r����\��2z	��������\��!'�#���������U�g��t�8��3�v��$�ru��B�������r�Z�����+??j��6��=a-����6���Pk@�	�,����F��Z�d������s���;1�.
�R�@�z�x
4���2<����+y�|����:��6Y=7�Q&�B9�g�"�T���5���v0�d8.hx:����?t�A�()�1`�Urf)$c<=�����*D����fB8�gf���p�m1\!��_��W��u�m������ �J���h�Az�[�!���&�:��j�\�'52�3'�PE��i��@`wf������8����1`��)b����F��slt�B�/�%�y\b�P6�$�*g�5��I�H����z r��p�����zs���5w��v:����'�8u��!OC���u�y������XasL�������O������M�������v z>��]-
a�8�=oO2�pU�)7;V���j�}�R��2p�k�t�+Z�e<T@����S]��2m�� )�l�B�������G���%�Z�cj�e�b���b\|!� �X;�)2���bM�C�����i���0������������.I,O,��s�������`W�V�R�zx-iw�0�|rP)ba!��td{��p1dI�0� w�c�8
�"���P�&�j@��%@����H�����?n���W���
V��j���u+w�������X������h�� �w7:t����+Q�gT���{���|���g��i[�����B5��T������T�d������|��/�g�!k%�cfX.~���@%��~���hM���}���zM�YR;K�g����2�~hQpo���a�N|�B��]=n��1�"z������f��n�����~�>RZ�����Q$�
b���7A���l��T����������=��
c�m#Ms=�3�Z��4b�T�������Qd�-���?�ZH�Q6�������<����*�%'Wj������y�����!0��`���+�)_���qL��C$�yW��m|���u�c��	���.r����];*������6��L&�~�"���B4�(�n�URg�����&��� �Q�x������N����2��L��?o�Q�~��	�e!���c^�~	^��OZ���F�h�
P���C����b{BN��p��q�������W|%�������i%(l���N�i��7�u�XF��t�=l�\��vC�������C�\��g��t��8C�%���Z��()����L0��Tc[5U�2?�RQ�B~b�����mD�
�/g������;�����}���� �F�������o�Z7*��3��4Rh?Z_zo����M��ee[��^(��x�/T�,P����b�t
[5��b ������g�K��b+�pE2{~a"Dmc�c��n����A�K�@O�L����Z�]����w|$t���`�dY@d�O&%^��	��|g�;�}w�i��$�D��5�����Q?���o}�6�4_��^����]�v�k���0�6�\��X&�uI:$���oY��%������I�n��q���X�k��`��!�f���^���v37u
�c9)+Jdg���=�,,��l�?�?k;���L��j@33�.��Z9:��L��|�Ol&��C>���\�6&�l�jM���l�hP����B)@`�T1��G�js���M"!7|���&��C(���"v~7�R9AL��o�r�z7��1��D��p&M�;a�==�"��-�����yd����/�@NQP�s�=��[��/?>X!0�z|��B����#��>x~r��7��H>���SB>C���d��j)����q[�������:�8�������_���@��!6���1C�����Q����S�;E%�=sO�{�����Td!&dt�k�+���&&�&a��aL��Uil0x���0yb_N�@�>����}��
�#-���O�{b��'"���tX�i���g$����������,�E]������B�&���q%!�#��������
e����{��
�.��7�T������>[h;2v������c}�� ����
�����1~��J�o�R�7O��C�3X\��f#$ a69�v ��~p&��o?�m���E��#D����:�'��Gq�;r��T����)��'�k���t�~���x�pc���W��/&�]@��v�����3@nyvJ������<�=���4���n)X	F���Uw)���:�#E�vd�����j��,����X��J�w���[g����j�Z�<���zk�lb�.2d�o�
�Ln����N
�_0���9;��!x�����1&������X0�X ���k�C2d/�\���\G?�?V�&�g�DB������<�~d���%
J�20)�B�a�@��e�'~��km����e�n��)�j�f�(�~�JA��������
�<�Z'Uhw3�Y����Jv�$���a����2�o�T�'X!�!8����;qQOH�}\�+N:�!G���;p$8��o����O����Q|fKe�TA������(t�f�����|��!�N��i�==�~dR�:��'b��=�*ys�NH��.���V���L�$����0������~���[��ny�����o�p��s��{�2�H���g8�,$8��"'$<���8�x�q��cV)I=K��c|:3����0���(�P�����XT=�������
y��P�r�=������._0Y���)DC�*]U�j������	����7���Gw�����n{��z{�b�)e���J{����E������u�]m�����2��?�12��b�s�X�E��*j��Jm�]��3+�`����:oR���'b���vJB����:�����qE���S����8o�='f���~#`j�J�b�	�}��?z�xt�6�����zH�������O�#�����6{^D:x4a�7�=�#7����Rk��zq�t�v���r���
�?���4uq�"��BUu:���������]��_.e��"��pSF�����_�+�KI��_�/����e;��k��8�l�J<������{v�������*��~�45�E�%39�a��q�P������"��
���v��:�2������i����
�)�����4���������ck�k���	�X5|}����w��]o>���jk�Z+�E.���qfX�B�z5�j`;^��=�8�)�-���HAt(�������snv�A��G��D�������(�����g;'�����������
��k���W9�#tQh�p<����t3���,�L2<��p&O+�tv��O3yih%����#y�8
p!��A�f�E8te�������y���g����89.<GnE�=�M�������F�������$R����t������O����k�k��-��OU�T�?��xi����o�� 9pA�{����������_$���0��$��3��E����Kk9pI�Q~�`#�q�I����d�0���,8z��Y��i�%`Ot����.Z��! �����HG���?�@��B��i���x&��m0Q>������"�x8�����H�7���������X��] (dP@�����������v�V�Yr>��p�.,2`���U`hUB_��~w�[?V
Z}o	�w���-h`*}L`�����5A�����:�"=��7����~�7��3�b��s�GK'�`������_.�"����6@a��/���+����������<�4����A��v����p�E
��BN��oA%7��3�Q����I4�>���I���e�bJ�V�������*���W�.�����9�����
7g��-C����j!�V��k�e�r����\�X�U���v}E�)Xi<lG����JYt(&��%Il�)���|0��j��j�����l+�h�����9��
W��Y��4��Nx�(��X?�dO���%i�� ���*8e,3K]#����3�q��` ���N��rz�\��QN<����"��s8<�?y�Ch��4�P�>�&(��_��1�.-�Y�/����E�0!]%�3j�Y�����'_�=@��o���,x�A�'M��V[.t�����TA��wH���0B������0DX}������9��"E���N��V�(.����s���|�xm��>;> �{�{}W���������'�Q����x��Q:oLZH�����������t���l\�x���4tL�������[�m�~����T��:~�yt8������n��m�:�_��+�	-�@h�������1��}V3z��"�2�����R�Z�Q��8�����@R�
%�%
&�&
��&8��i��-r���w�4�=�2�H1��F�5Q��~�n�G�uW�9����)��x���`��v������>|���?<����6pR���Q>b��cC_����pQ!��x������!�������!����E-��ou��]�r�j�_��x&V��O<�{�V��->���[�2(��$��B���za'�D+R[����@������6LM>��R�#�����pW4�3��'.�;��{���������������oY<���h{�p�J�i|t?z���+�[\���?k�y�
��G�]��� �`��Sz��|��_u��WR����m].�QNQy'yY�q@)��`'���"��(owx���y��!2M���$D�����C"���W����EUq�:�G�s%�Z��<h	V�+P���8�G��$�7�i�$�R��27���w
�>�R7�����&����t�~
YUG�qj`����Q���z"fm,)P�r
�q��_���KNW���9����XE}2�TD49���1}��������l��������M��<^��4��^�P��R(�=T _,Y.��l�	�����@�E�2xn����,)}���b����[|'�5�e>�
�����}��u�����-�V`��)g	��d���B�N
u�4dFv[�t���nx�T9
/A����#�D����6�(�#`����\W��J��T��=�{;������ %����f�U��e��P��L��@`&8�e(%��k����qV/�[�5��A-b�Jl ��?w-��
��Ld�F�x��2}f[u�[�U�q��b��n���q�=yj�XK����:�����T��HZ[���\&9��Q���H�ZR�H���>�@����J%��0BA����8��{XN����Xn8����HE�� �5T
�x�vyM59y-0� ��NC�������<-#AI"�1D��7�66�u��iX���{��P_�:�;�R���[�P%h`�
7m0d��Z�=i3���2e������-�I�:�f��C�rEP,�Fz��}V�!������4����;��?�����?r�;����fi�&��������<����������<��T�����D/�4����s����^G~v�����y���+��x��K����*����M�0�������%��a�kG����.�������o�a���U���yM�����|���������W����7��K27��f��?�ma>#�{d��E��9Y�5w�a�|��3��e�	�Q��yy�%~�ge�n�ULKi�'2�)��|�De��G��MZ�(��1��3#�DQ?pT�����,�|��Zp?��[��'���E��,��=���BHM���uX��Q�����g��j��?�����'���6R����.���H+���Wq�w�1y*�_������D��������m�����4�8����4X*4����E�5�H*G�$�L����L�zj.�`#q�H�*���
$z�7�1��[
����z�5�A0L:���A�Wh"Na�!����C	��4�����\������q��:	��*�l��n)TA�����>�9���2�A\�^vEf=e��d������\���X_��i+�f�5R�p4����y���b��iw��L��U/ID��?}�
e�K%�Xe��LD�8�UA�-���	��qe
��E�9X���K#C��<�������9^
���Q�n��i�FZ??�m��n�Q`����n�]���J�y�]\��`�a��~[U��������>�n����Jq�^��\�������������u4]3��?�d�H��b�S��0^8Ezu�>�[bEr��{����������j^��(�(V���^U�����	|�W�'��0�yY@u��@
�'#x�K������T/mXNH��oW�D��R7H!������\r� ���H��, K���F�L���^��!+"�!�i[K�Q�O�8�u}��5��i%���g��A���mr9���g��U�)n98Sw2��U{���g��]p�w�$L�9%�A��,Uy,�P&g�#�f���*�C$���y�s�����:F�J���U�%�����K<��7�-�������D�k���,z��{R��*/�F)
��98���J��!���n����]a��	I�.�'hy�sk�	I���+����1�_@bO�+����������n����n����2V��p�R��������U������?����;�(���-4/�+�(���O�)k9UR�Zy�m�W���s��e�������������0{��H�0��,�))H�_}����V��[hR-T77�?_�5*�vp�K��pC���%>�4����r�j��"�"dB+��� �X�X8[��01��� ����\������na��U���j�����T�A���d�0��[�X�h���]�8	�V�fC��2,��#�����g�^��%7t~f���|V�3&�s����k��y��4�a->�E�t�B=p,%��."�U6�T�W=�c�7.w<$�@���~�jm�����N�t^�/�uv�Yk	��8p����d��������}��h>�f^��c�%�����("��&�L����%8:�4��JV^QZ�&�`~��d�lp�&��D����%������e�|�:W~���g���{?0���D0N�����v?�2�����62-�@.-.,d���|�����/�
.^��tt.�H�����S��
�@�����7��0L����)4U%���7�
J3����U����!����Ssry�&,~(50�$s�h�;���_J���n�C[��h#�V����T�e����r'�%;��v�ka�A�Qmf��"��J�b�����e"�&8���o��9�����My���Z�S�.����T29n�O<�Nb���������.�$������m�"�d$$r=��������k$�=U�d����������-�Bg�BHP� ��u���n��������������;�#��u�#B�_�NV���L{�����N�.���	enst�3���KG�����5������kv���������R
�+��.mv���658���4+0P��%>�.4�N���:������Q�T6Q�JL2CN���n����W`���<������f��K\F'�/t���!43���k�-�HQ�|R������]���z�k��������a��9�;���F�C�XC��G 	G���=e�1p��f����f�Er�O��>�owv���������:�-�G�%�`�s������Q�)�;���$��0Q�/�]OG��J(�`�����q�
@��
R>B���.�K��>��"��j���B��\�������&��q�����F�M����
`���>�y9������o�
�r����k�����d�QAz�y�C�#k
�p$�����HZ`LMz3�w���h����J��&��_IS��QS������/��g��B��P$%B�9.�TFr����W�I�C��R��,L2���Uy���` �w??=~����n�;�����X���*��?c���:"�p���j@/�������3"zK����MH��?=���;�0����:p�E�[��/����N�Y1�
�����5���]���e��k���5;N���g�����m=gW��D��,������zya���{{s�g�1R���
����!V�KP�>��@"���D�=��ZB~���������� ����������������M��<%�+��R�T��N��6yG����{z��06�\<���I�J�at(����0���p�`���]k����z.���*DRx���\q�9#�oX�{��+V����Yt����l��A�iT�M �����=Y%`)Zc����n�"���Z�� �/���f���~�����mU�"$�����Ks��������y�p���I.'t���)�t[�T����t3=���D��\���q�r7aq%���_;.[�<�����I�B(�;32���
�,8kCiE��N�{g��".:aJ���������_�;	�`�\�o��!��G$���v�l�31�$v�U����.\������	G����{����/x������l��.0a,T�P��u������OPf��I��.���h����������C�����`�Qz�<E�,��2���q����V�>V�|�j
9���M�����3�m�����6Mq���������Gw�Jj��K�N^R�W�����'���������������&%�5��]0o�/�b�������},����RQ������N�E���N�u���2��}��o��<�`��t�M���0�Z�V���;�E^l�pf�{�w�6����������0GQLT���z�>�g#���T���|��3DG�����x���r��;� d@#
b�Kd�bNQXI���BISB>����D�_�����^�����&�g%<�"1u6���;�����5�yY�q�>9����*��u�1�1�����^3v��2:�E
��,v�-+C������Y�ReY�(u$����IU?%T�C��s������
�|;���~>,L�@u]
4$oF2>�����<�+�����P����D(�z�za\�^t���;$A���mx5���Ow-���_���C�"5�p�������.1�
�i�����qi�h�_J�d�\�dA�+oIZ:f���E��
K��l�of��F�����$�$^`�D�������X�|��\l���{�����2�W��I�`���	���1���@3��]8QP}���������l���~��������v�F7qd��!d�@��t7-���:7C��k�����J��I�y�JwX&w��_w�����]��:���9���%����V��(ML�A���g�7i��,h�Z�����i�s�Py�����nz_��UX�m����{�[�}J���H$-]qe�����m]�����X:p�~�qw������~C~�}������������3%��M���'0[N�6\�)d ���	�g�AL�K�|�:�IXC$�6������*�������c�����Lp�J�l�����PY�u��Kf4��ZB���"�:i�NZ�qK����Q�D^{��
���}o����_����~��5OX~��
�h��q3z$���b.}����Q�hoT��������@����\������2iu��D���s�{'��b�,��dE4���z�#�9/_������_��I��<�p����n/����#�%�ITH�l��R�4�\gFS-����Qv����&VY�\v�9OoTW�-�������t��w��=,���T[PUQu����+�P�{�`7H����P����������'V�/�>�SG���Q�w���lr�QIe�RB�t L�FKq-�u�U������Y\���
U!�KVo�2��T�T� G�<;��w
�	Qk�y5�9g)��1������[A�Y�������{���Xj��3��������G6���0�P\��{X�d=
a|��t�Bh��l2�v�J�z��i����qH���0=�-��B��)�����Mp�-U�R��3����0d]��s�^|�	JR��qP1JR��*��xD�����>��
S9�W\+�*�%��E������9�O�������zU������%s�������[;!�~}t�H��&(9��L_p:i@h��h���-h��xMWm��{�8��)J��w=��_^,��0a:��1%�7�'����
�]���{��~���*�r�x��k��Z����hbT��I�D#>�E��X���E�"
u$�Zc� ��"�3�/�R�)�1��M��:o�D�$�;�._�>���{ l���T(����D'���V.�-cm�	���w��S8'"�,o��Lw��m_��q����J������
��_U@�
��d����l���n�n�S������� *��&�_���jg��u�J��v.�3p{�gR�������0��M�c����KW"�3V�{�����4>f
F�xU���X���|����?z�|��:��	odnlt��n3��"���*�pp�X�=����-�,��3B��jf2�%����G��>'T6�E��2C!�����^��2{f�A��	��%�;���S����b��A�\OS���:#�\:��j���$���4/%��1G�a�5$��9x��t���7d_�c��5���j���@�2������I�d���b&���b*�<���5��L�%|e�B�`����)Y�+��<"-�*o����0����;��~#���9��U���4g�^E�By��X�����1-�sD^����\�AT'��v/�6�!t�y�z�<���8$�5k�{5�Ae�4����W�*b���g5�bI�7������X��"�3"��d2�.�.�X�\��$�������D��K�IQ���	�=0��H�0(v���I���^�|�����4�%>�2�Z����.�I�������8*5H�����a6ui�z���I��dW�����ja_nO�t�(��1R�LN�������6�������1s$�x�$�#��o�e�����C��e��S�����D�L��02@�s�����#�b��'���(�= �Y�?��[����k)���+��GS���hDd�&���lU_r����"!n���
s�R<��9���sMt�G��G��`�Q��l�Y�n�4�9t��w��"4��"3C5O�M����L>�����aP������
�h��Q0E����i~�j�3�X���'bzN��]$P\p��kLc/�	�p�'�:��S��
�L�+-��P_�<z�N3�Q'�9a����O���l8�{���%����<2�#�
A���G�:G���]��^(����k����e��5^.!Z6z�\���E�,��W!&��(D��iG�))R��!����T�aK*4�D%�J�{�I'-��f!������x-
��H�r�-��2��Kr���i�P�X���!�w�����h&����
�<�)����l�0�
I���h�5#Q!�,�`?f�����l����F5�$�xn����f��3�g.����y���$��(���y{�6	�q���\-���o�=��K��K(f!�$,9����\�x��e�������J����-
}��HL�{R��'E�)���	���,���$�����O,���+��5�r�k�(�o��B�������/k�Bb����l]<��L�!���RD!`��aVl���B��ccP_����Am��j��1��I�#9,��
��*�������a������������z����>^����~���)�)��u���A���vSt5D��p�F�#������>s�1�Hn����R��v��\5K���W�����^$�3����-�"e������M��
��?o?�������<�����g`h���`*��������F�!��3^�l�Fxr��p+��y�h@�CY�tD����qaQ�D���V�
Nf��;�dt�V�#T=��`��8�q,1�`P]Q�A+��j��e��2���9����������a67���5�4�:��*aJ�����(bnRJ��I���o�������Fm�X���Gl&'�Y0��x����?�e���4;/�h��B��v��H2�\V�����r^Qz���}N�!�M=��n��u��0������h1	��a���M~�r�AX�,�`��fu�1Y�	L.���z5}!1R�����u'���<���f�N����+!.$:��7����d�D:�{R�+(%�^�
n�:w�c]�U���������TK���g�v\��R����B��2��:��Y��Q�t�C�?����St������,���r�k!����� A��������w�G�X�U.�<-5?;kzp=�d�z	
S��)/F��0LC�!��`�)�O�-6��U8�,;�\P�7��G���d��S8������]��4"�822c���1�@
���8{xxL]e�.f�:��d,DS�!fl&S�4]#�z�[�X��6tU_:Sl/J~P�`zB+?��2Q����k-z{vh:s^l��:\���!�	>�d�hDx��)>@H��������	`�U�%B/I��L]��s\y��*��N���_e`0��As����@�� 
<��_����_���w�#|���D��L|��A��"�NB;��qD3K�k��T����qA���
r���6�0����R����ZEz�7������������	����A�(����}{�3���"z!3�"z�T�'���[Y���8�:��j�}Z�s�;`YT|��D��.�_ltB�5�����0�,���1��e���J�"��H��?|cN�������?��>����f������W�.�k�s��_
K���{Y���(GN'�mMK��"��T�4G���?wD�U4z�I�uv�W)�'�0����^�Ru�B���DQ�X\l0�<�U�	�i�������Xl�Mxm�x�,4O���F'�#�^Q����k��Q�s����h�;W�Ti��G�BD��#��	�Z���3��V�1DG�/+!��z������A@�,�'�������Y!{?=/��P<�9N�O���}�<��wO��{�!D�����h�'o�;HW4X(�=�s�)�6�������v�����o����1���g�Y��s�����}Ll��Q�w�����S�j�|���O��6L���h�����)��x��������A�uH!�<1�!��ZT��w�J����h���0�����Z,�Zu��~�G��~�'$�9T�6J1���yse�%'����w�x��"W�������f�b51���hs��kl�o�� <g�*��Jp}�	"A�v&M�����o�]w��f�HW� ��T�<8$}
=:�ZqGz����$�.Z�I���`<D����	GG�N��}����e/r �>1
o^�@G{��g8�z	X�n�Gzk�a��qm���l�0�4�j�X
�kG�Ed�k���{�O�1�v*)����Q��_��Ys#G�&��_����4��w�G��j��J�L���FC��Lv�%�~}�Y� �T������$#<<|9~���:�������hhm)�Hx���K�G_���K���Fp�b���@]��G��b*����y�\,4$x���sj2R��T}�����v��z����h
�c�EH~�����v���#�>�������o��{�p�����,�������L��snI�|5�k>��A�l{��|����'H2���18��/�9�j�D��.����_�^s�~��"�����L�i(�;�i$.��3�9ETp �z�<�:��[��2���1�,���Rov�0p)1W6�X�\7S�JL�L��6h��^���}}4����HY��5���	%�0XY�y	3�)���%%$�r��Y�"�b	�?8U�E��a��'�>~!<'=����m�}jR:u�s��T�^c;a�����4`*/t����������e@��2��(�c���t��� �>
\4N>�����s�{XbN�{��Co�W���.�(��l�qH���*��g7���C,���T�o���y�Z(�)�� S����F,�������#"�����'�c�������9g�����@Q�'?���Nd��
��������mn�����	��f/�����C��)�A�3A�9���kRu\�`F�/�>+�c0������v���r4���K���=���;�mU^��?��R���o���g��P�!v�,�������Y0��p�LC�����FF���j�������eI�����;������bg?����#fo�M��Lh��w<���r�	V1`u�o++����	+�k�(��3rR����A��$v��f��$sF*����~:;��.&N�(n!/W�1�����_-���X����X����y�]��<-�H����b����.������i��]��k�F?Y��"Jy�����:����\��kJq$c0b�F�dc�� ��%�.&�13�N�|L�tw������z��j}�y����U�u�l��`�	9I�6)���&*�A�	���Qj��LBT��L���d�8B�t�?=����v���'q���}-!�^�y8�wy�*���g_z1v�����r/����H$'/I��K�K�'s��I���1�I��4��K�1��2�a�,&�:*�"+����BW_�=G�T��7�U�!UnF
E�����yCo����bX8_FF��=�d�)�j8���(mulO�u��E��9ND�9�+*+�nyUy�j��l_�z�6H|�@a2o���i3
�4B*��eF����!��w����n�E�Xh�����0A�����6�Y�C���-_��6y��`�kfdx�C�78���L�7|�������T<�T,��(5s�"���M@�%vE��j�[~\]�7������d?�R�"cR�>&��I,���V���(�0����$|��]o�R�0}�i���*$\��[�W��`����A(���v���;�M{��d�q�2�OFt=���	�^�������Wf��\/
\����z�|�3}e�m '[�`�u����}�i����p�����q9������<����"�8J��
A��N/ c���(6Z�9x��+�+Tyw�:���wys��Cfo�qG]���?=^��~u��������l��G���K�����Ku�#�p�����%d�S�c��r����a�U���5�O|�p�!�����J���G�U����r�a�����Y#8$�����E;�,���V��*u�(m*r���v#�a��Z����A<7k��!�EXQ!��D��d�vu���5��z��<��U���(aF�m�.[RU����;�l�@�B�X�\fA�k�4!���x��_*k��:�'.�I�����9����_�zR��V%r�N����l^�����e�}�X�tO[�pT�����ug�
��kS�
J2���
P�.PxRyd�/Z_	�,���V�#�f��Tj2��T}���x�K�����@��uX7��G$���c=y*_���3������������X�Q�=��S����@DFGn�g��k�%7���.P�s��2_T?�o_u���5�	�}�8W=�+F��*?XWS5=|�Htq��KD�x(���������0������(��B���d:���G�ooQ�}O���\�8���"U
�=U��~).l�������7�\�9���'��������
�RM��Y�E#��$Kkd� ���`��?����v~�f�Xq�!�
����6~��Y�-3���1���T|������ip��������Qj6�D�����q$�
�����@*���iT"zZ*����
��VN�[��xy��^�O%��\��?��j��4&���t�oW��>~�^����E��L�k���$>�.A�!eA��
�4e�A;g�
�H�'u\gq�4������H�k6�g�+D�B3�%������CcQ�
��d�"j�G(��z�~�~��_v �K���r���/:�Y`�����v�w�����6�>�*�����=99��g����	@Nv�i�P���+<���f;SIu�����T�������F/��W��l1��_�$�����-�`�B��m��;��1 �������>�`X������/����n����z�#������!�/o����h`u�*�a2�^�X�J_0��{�#������"n����z�2������s�9�u|�r�Cy&XW�b&�������c_J ����c�b��':x�8;����]���^"T2�����hV�3��%r.��AOwO����(������_������J�4~yG_W�+���y����LG������g��qG���/�i������'��L)z0�O�����#F`�o�k ��>uP��/���G�m��k^��$�?	�^�B��XCl��_��_�<�)q��z�^��P��3�ifs�L�����c�O4��{�h�3/GT�bq���o�?���N��PC���l@�,K��HQ��3����n�t�}�R��`�j�B��9�J��O�y�
!����~����������	l0���t�a���q_��#x2���_��?��|������y\��6��}]��2��<�4U!������UD7t1Y`$��g��)v@~[������������CR�<s�����q s�O�]�������?.[>�m�B��f��Wy3!����a��lP3"`��_���L=C`
��]���8��OHw&G������s[7K�K ��]�-���m� 6�����B1��[B{�j����W3+�R]�r+�+�_C�w;��u��n7���^u������hj��+�	�v����3���W1Sd��R��Uq$��3�+������%�
��sr��S!�X��i���g��o��;�/v��D/,~&�{�v��2�;�>2�����B�Ww���m ;�Hp�T����P+wQ�fH77`����T�s�lPn��H�e,=FL���}H����,�s���,&�����>�;��;����ZL���3K�KS��o�`eL���W��+�u�Mo?2�&��������i �������fm^�|79���ww��T��������}����K�WH���&��Ib�����A����$��q�>Xsr7��Di��u�az�0i��Y�y>ibbsS����G�8��C��d�.)�y�������*�3�d�Xj�Nl;��2�����cqC���g2�b�e'��y����=�[,��L���d�����3y`�(Ub��d<������&8|���u�M�f�����������NNi���2X���yo���e�S�s9����8Q�'K�c�����!�q�2O'�	��`W��;I�f'w���\H���'QxR�|��@������x0?��A��Z�n:'��)��@O��$�Y�V��5���co�j,�KqS�P��$�3e_�=�1�cL�{��������q�|�~�<�����d8l��1y��� d���;6T^����v������Dy�
��)Ar�m��g
������A#'�L~vN�Y{u�,-y�~�������0fmB����8��������8{��
]?2A����s��A�z-���B����e3)3�/�r�B�f2�@\|W�k|�[���5��<A�g���A�`o3C����b������42!�O<W���1'�ZwC���g@����T��t�:5�a����b,���$�[h���4t�oV��D[������L�.o7�nG:�kx�v`@�]Z
�F]�r����P�h���`��~��]���H�7�������7��6*���e*I4�8�c<��CpWaC����4Pf��nb3��>6����3o�+��������@��a`0��F8�x�p����Y��O��0/�l'���S0Pow
~!����{E>��Vc��u����]�x_�7�w7��� `{�s�����x%I�M1�E��������w	zP%����iQ��sA����W�]�v���jne�8p��y;5p����L-�7y/?��7���Q�����������sZC��a�2����s�x%6{�%�z�����Cy����[���\X8b((B�.]E�����p��{/�����U��������jSw�u8!�Y>7����uP��~~���N��
���i#G����Ri�����h����
��g�	�A��.#)x
d���Q$M�8�9u�z�P5�`nDLmm`va@��R	�!t��&4�W��C�	7s��(�$�b�"=�?1(��
���W#P�A��H��*�<����r�8�Q���7g�;��IZo��\��X8�oV�M�K_� U��2��E��t�jBYA��>�������kq�D��x�W�d��F��	4e~�C�IB$9=�:��L(�P����4�8��T��%�����?W�G���i+�3���ZM_��\��T�e����L?e�~��|<�[�2|��uNfE� B"1G"���$����#R�/����A����c�lf4��(�h�����e���Z��v�8���vb�����OT�Rv����V2jr���p�;�~0TL>��Tp�(�HV~~����
]�h���{y"��H��s�P�G
S��b�p��c+�6��|��A:�n�nr|�1��@y�L������{0��Y;�`�"O���{�=*	n�hD8@770
������[3��f�)T�
t�f�?{�:=t�����Kx����R��y79/G�4�(4[v�;Z`Zc����o6O����f������%p30��v]�$�x:��s�?�N�����M�r�����o6�_��v������oW�H	�%�[��Gm��$�Su��aSU�
��nJ�N��bQI��d�IN�%�C���?G.�������{a]a��T��7Ow��5��1�wu��4]X�F�����W�E����w�u3pa�4B1Z��qFW�P��.z��X�����$��a,��8��Y��b��������!�&��h���A7��lhs�Fd����Y��f��5=f���W�)���S��'��"V�K�Wa����dMnv����{�}D�3����I���E�%G|GGT�]g��2;�2G�%e���Y�G����+���'������`Q
����S�>��f�
�c�d�������O{)Cnj�mw�M�5���XK-�l�*��vb��/�����}=���v�����"�-O�K0��D�p���"�%������W[��Mq�G�esOdiU�d{������G.+;`*��lJ���}S�mK�uD���PY�C>��OO���osO�<JyI.�Y��h��x���C�����N'�����~k�L�J������u(�L�6�)��#��3h�1�Vt_/�`���~��H>9��%I�p(:���p��B^��L���2�tNm^����KY|�;1�'�?��#p�F��O}����;u�K������=���s�S~����+FG���*����P2����+D���.{�8�N�9�)��Q�[�8���Q�V{rN���d����q��C.9����
�t�����&r��g+�(�Z���z��r�'�1�]�%�@�iTe���e�~E���f����j�g�2}�hm
��� �>�+ �/��*~`�'u�x���S���^��e��x�g�_�6
�%����SS��F=��W^|�n�+6�����k���]��;(��D����1��I�mDf��C^NM2�Y��L	�<����������$.�C�o	�u?���g�!��0�0Uu.�^L(���	�?����9���>�v���JA��
��T?��_��Z�Y���gA�*l����������6����Ym�VU���X��b�����N�os&6o $V����'����P�@/�`P�����)�^�ot��|(CkVl$�W�?�a���K�k1�-h@�=�
�$
MM��*0���agw�N�9Dcx�����c��"�fpg|�W#	=�v��q�)��~�&�
�E��I;����Pp�#� �U��"��e�<�y�N"�F���(���Vl�f��13�Y�t�0�,�Z�__�a�
����N�\��k$��~z�����ph����[���
2�@�I/�,1O�S����"0�pIr\��t�(���P��-\/�F��s�D�7p�=���!����(�g�=�m�p���:V�������HoA�M�_�:��+��R�e>4���5M�x��p�� !�(�'Y8a)�����v�
C�;�����F��4E���jxw�|�D��/������l���RT��IG ���<����Hy���"���.Y��4i_(����W�b�s�B��e�c��y�I�bE]��]������wm�=|�@���K�Z�c:8��p��������~"�sL��i=�Q��Y��������a(�b�E�x�`[���t�q{W�T�����g��B�d��J�K��)������t����e�I�|yB6>�!�3�Q��Y�����w2*n[���1U��e���O�J�.,n�\$��9|o�b����,�7������p���Y�"d�$@����m�O{�b?N+���P����/
�����bA~2W���E)� �x�� ��
�G�����"�[���b�:�O]��'*b�25�w��e�^<B�j����_�b��*\�'N��%J�3*����"�#;s����ty�|f��T%~|����*9BK���������t�]>O&F'���
���^������~(�QS����EdF�����J�m�D"�n�g�2���0H�`V*��GB8s��������E����|�fw����M��yr3�Q($XUj��$�2������#�n ;�P��0<Z�������Z*������0Y�E�����u�/�����3P��p���N�,8�����E=�]�y	=l���`�����?�,?�����>M��^�=H*��q������s��6��YpefL�!f�������4� �����	�{5R���v��5t8�P�!������U*M�]L�T��F�j�"7�
��+U�S*U�f����	Ce�:}���l�
�N�3��u��Kp�I�x\/��s��m��,��u�����]���|����{�~\�?����<��;U;�g����9i�c�'��$R����>���i9��^C����[N�=�A��C����r~9���*�K�v/[�M9�|��������M��L�	Z�}.���Hu$
��5��
;���a��b�w.���*(��� �s= I�ikoW��������U�%�[R���()�����=4�o>m6�����~�~��6���d�C��D�6��*:�O�.�l��4���&�$�k.�$��cR'��	�m� ���U���(�k�����V���I�%'�Lb0��z���T@`��.�	I���}|�}����n��T���#����1.�������m.�>.Pr�DU��\�k���V�)���$;Z>0�T������X(������V�3�z<>{��0"��vp�"��#gwI5
H�@�`��~�^y��y��-�e��I�B�!*����6��o��V�����"�M�J�SH�,��y
R(#>�dW����M�8������X���g�A��kO���:��tU'g�������jU%�q����E��'�A1�.��b?�?�5Kf��<d����^!��8�������?��������3����������s�;�)i��4��X�����G,w ^�����,�|$p�^�����8��`IUJ��A�Z�����<�
��3�����6��B��V�M
�2�XE`����mcO�
�����
�~�L+5B���o�S	��T�;�N�z�?W��4�����f��~("#J�2�!2r��4�\2E�m��M!���AjYJ�����b%�h�
�KM�wL��eB^�z�����QrT�.��#�����X0/X���D;����i}��]���_oi�lS6[��'��_|t��U�i��W�h��_X��;����_z�s�%�5�H���ea�1���L%Cu���{bi'
�1����2��e�x�a��X���La�mB����C�u�y�v���[T�XC:�%����
W��M�7�m�L��k4���0Wre�m$�pE��T��*)a���q,lL�E~�����������8�N��1�X�4��%`���c��3&�&���p�wS$����f���
�tV7w�^\+�B�To�r����C���������5���&�`���a�B�a���WsU�f�h�a��g��s>e�N*��<�'��h�������T��)�)"�7h�^�<���{.*��i��?mm��v��(Fq����z���r���H�����9[�|������>w��9�����<��o��Y�g�B�YfC���84�^����yg�d*��}U�b��J[��ne���/p�Y�J��������#v|Q����0�ju `�T�E�X���<��/�I:���3-�TU��)�#W�~{���"�w9�pl{�X�U����=�S�#����D�����#�<��N ��"	���V9W.4�uV�������K*����������EsR������.mL�QZ_�PB��cE+��V���?�V�h��7�N���]u�s���x4�k��'�8N�pa(�����Mn��Q,(���-@C��e�o"�t�T���1�R��#}4Q�S�%���r�smwV�+���5� �R��snf���Td�*�$AP��;h��}c���w������K��A�P���yo3��4~�36�u�^�q�}����T���8�P���W<G��z��X��c���W��W���DB,����v��G>}B�]��Dm')\'0C�#��C���.��K����{)���G���-����.hS)���k�`��i�����bq�2�4���Du[�2�]�}�� �u�{m���#'����8���6�N��J]|�Se<��*%������m�:GS�/D�\ je����>�2~����J�p������EF5����l�^�����x{\�#��k�R���Y�n�p�b`��j�UO�5��)�K�kq����E�P�����a��ME�p��]T�x�l�.���Y�|D�,Et;H��X���~��T���R�`A����[F���[�o.�Wu�x�n�A��8u���S&��^���=���{\�H�8�S��q`�5��*��:�������W# �(=����oo������L��@�]-Z���2�N2�����_�g���� BG%&r�4{�fI��|�@7q�q�Z�i�C�J_�c�?��2A�������r�H��b������z���c=���Q:��d�<b��L���q������Wq�X*\V�M����.�4��B��"���+$L����]�7�O����y���jB�@�� �bSv���H���~e��; quk�Vu�"&m�������(��5��!�����r&!�)�Y�?���g�-�)�j?����x�i�^]H�������5�o��{�Jj��n����f_GA��$�*��4�5Yh�Y���::���.qg���]Z�5C�J��r��������f�5YX�p�9%��	�e��K��)��N������A���;�O�3��$�.za��x)�C	PR�v������������"��H���|VHT�`G��-MGau&k1�7���;Ve)��Y������fM����CE���B���>��K)p�M��]��X(	�Q��&� '��� A�
����D}i�$�Y�u�<sxo���O���������R"T��y���/�-0�jx����K����a����}:T+�(�;�<s��"��3�1PH
O��p���@�����<=/.3+p�ei�	^|�������~�$�_�y���������n���B��|
^T�������&�|;���Dp"���C��NF������5�P��@�f'���6`�A^�`�
j�0*�2�m[y�����pa���sHwR�����������#9���3Z���2���~%#T}��o8�����bg�M
�/�9�#0�/FL��W{*�T{*s#��t!��A����)bD0aJ*,)���E����<{�X8�v�<�\�"^���������p����3zHE

b<�0z�����0��nAMs
��������o�@�����
9pX�e
(��%�z
�x*a���\^�Yt	��aL4���M���dX�/Y�'e�Dn����I����i�<n�`O�DBd�:�����
cX�g,�Sy`��	
'�t�!uE(���R�K2��3�9�������kD��D
Q2�f��(��}�P�����+]��Pz�p����$|z��v@f�u�H���xd���.Jp������Nd�����04���"���� �ju��Kg��\��.��Q���?����'������+����m�N�� �IF�<���)������������;�.m{�o��['Z^�9r�-�n��[��������V����7��`�D@���0v"*��hB�o�A)��@4�/�{��?�nAHZ��}w�6���`�r��~���zz�B��-�3�0�Z���0s�^{2S��������o|Z�/�b���xQ�q�N���3>e'>e�C�Ax�1>�WSa��4^M�
����<\H�;v�>O8s���|���54�lz}�����y�<�����3=8����������;���q�4��M� ���sD�P5B|"DB���q�T�!5�;
�R����
�� v�/�X	@S��S����6�4������
�E���m��Wt�A�4��g�1���?��M������,����GERR�yY�����P�?&)�P�G�=(G�s6H��/�@�k9����"��������P�D=�[����o��p/ �d��vs�����:;:����8�9�>��|�fO-;'(4���6e+�"w����9X� ��O���).�J�����S�������!��yLT+4zy��B�������a�G`q6�go�e��8���f������V��a��1����:*����u�������p�.B�;o}	6L��Cui��U,�r�$��9 b�17 ����n����a��N������fRrF��e�5�#)�*�2����x���/CQA��D$"�Q��c���&BI
p�D,%z�I��kC����:��^c�=v����w���j� �)6\��gd�< �p����g�h9��������"#��q��*\�y�k��)��T����B�:,���%*,>I*�������C�z��C
��+�<��C������M{�w�w���]{b�����^\�S���+��w���5��-�TK�F��*��-U�`�HQ�,���G����^�;�9O�����@���N���_P%���!p��
U������u��=��_�pHJ�<x���<��������������fJ���c���r��x�Y�D�%��(|�+@x��M+����z.��PsoB���������K����������(V�J&f\���a�iYi�|�'�r�i�k�%��P���F~��Yo�<�%8�3i���C�&�v��7��n��.�"�]S�h���A�@�����{�}@���i������ RHB�`o%%�/|�V��
����y&�
m��y�����0o&�fIE��K�N;cd#cyO(��;��hv�]���YN&)Us
�0
v;��$�Jl)	�L�A��AZ��
���'��%��i�,Mq�Dt�[m]mOh��y���r.ES#)]�09����bt����7��f�>,j���e��3j�0M�)���sfX��H�0�����T�jF]n��s-!������N�^�HI��u}�z��-�p�+�2o5/�e�%��������;��V��]�O����HF�:XJ��"�~e��)�uMReN��A��`��`gV~��
h=4&��U�J���2y6���4
��,��`���  �y|�PX�2Z�W��y5��C��1>���U�0���3��7	jU�����"�
���H3F����x���^�ryJ{v*����zvG,tD��o��k�#��������ig���?8�����������������@���C��H-e�Qi#��\�oF��$}K*:��hd������"1�4���-G�O�* g��0��\XC	�~x�]�e��A�&�^�Rp6�rP��A��v�:�
`�������t����C?re��8k3���d�Lvv���{����B�8�K�_�,{�>�8I��X�����@`�������W��tz��"��C���+i!�1�(�B�q�"e����~���
w�r&��
i�4},<Z+��v���6���2{���
��v�����d�U��������X��&����U_�du���Hm�W�32.m���k�2b������^4d�������lT~��
��z����{Hp��Jp4clW�a�0lI�?��I�:�:�#'�����7�0���rb�k���P�k�S�M
��c�xp�d�F�a���emn�:l��B��k��O�+<s��d�y�Z|�_���k���D��
�w�\$7��oh���y��J�����tT�\�N������k
��B�E��g�j�2+�.���0���}�ti����w=o`� F`82S'�d�I?O�
�V�ui��4������b�IG3������e��+�E�!+v�K�Er�8]��sh�e�$�#8k�69����������3R��p]*�D�+D��c
�m�������M.�g���Y9�y�M��g�N`�(�<�Ao��rB������m;
��n6�vJs|z��!����=�����z���NT���j�"/�������%�����A8M�UBd�i�]�r,r�N[�(�����jS�q��TB2MD9���8uxQ`dK~��a��at���a{��P$��!�@���N�jY�j��l��T�I�����f��%�1���GA���G�g�T.B$��mP����n����aZ��G�jQ	�m`����g�{=���B���#L��X��,��44�=�i��-T�AqG��8Z^1Vu�����8w�����"�G�l�L�O�%u5����>@_)�(
�!�1�Vj�C�g�@����<g���rL���H�8�����`2�xF������t���m'�g^M�����U���X�{�w�����*����fz"�����!<�\7�J*k�R�EEZz$T��zU�~�6�����l`�h!7�����@�Z� ���)	�z��X��2�����]y��ozC���M���A:�k����]h�����lI��?H�S�.�^��^j���C��c��G�������-���������h&�o������� �N"�����:���H��9n+�L��L��2%�������L�_�k��tTex�f���;��R8�o�W���0�]p\R�i9��o������z�Lsd���$�@��|�����}D �$�	��S;����.;�1�
<n,�7��SQ+1�	_g�������E�^"�Q�:H��>����x�nW+^�!
������b��T�A�(��m�Q�����Qg9�����D�\S��
���FM�����r��������n����������^�x#J,��q�����Yj���OD`�H��Z�j��#w.������z�k:i8
�$@ �P�������C��B����:����a�&n���zg84C�"s�k3%�L�*������Lxk�h��$����+�&>-�Qgf�z�O�v���N����0����+�%t��Y�r���v\�������E��.U�����&$"�����N�_D�q/RL��\L���m��U�H���R���E��n��.?���.��k�����f#}����E�B�u���f(���i�]=������n�����(��`��L�+�Rd��{\��f��o7��B���N�zj�IY��'���$y�����HLJ�cLz���#F�
NjLa{���T��dB������]!����DE���Z�To8�e�����
FGr�k��������8V����~S*���rU>�	��o?<|��������n=��Oy�)!R$p�3YMT�U����Q�:b��H�m�# ��g�u	�F�3���_-T�U".
�}���I����'��p8��;i]Y1�c �h��u����u&��`�3�g�A���L�:�>�������H����������)�7�Y
�I�O5y<,�]r�8o'��&�,i��h:z�����eg��|B'�O����	mz!&���j�����`�j�6��(�_u:k�6��
zdI��!�i;�����^J8��&Y������v�9�.��+���G�4�I��������
xI9?���08�'��W�R��Jc F��#��x(�z�d�%lS�� lDR�s�a*����<
�1���/�J�>soS�U|FG��q�%���w#��j���r��3�'��$�Dxb#v��q���7,"2h4�A�zNn�,����6��>&��F�+i,���i�X��n�S`/\|���97���������TM�83n����x)����w��|X�;R����������NrRtY�b��
��
��!w��D�K6�y��D��OG]�c�P�PA��x�����G>�=9�����?�����?A�d����G���t�@���^��Eji�V"��2�H<�X��+��SG���`$�Clfu�O��0�������L�I[�^�������8vY��X�g�H���%��6���;��BE=�L����P�e���C6<�6�b�5-�?�-�CB������)�)���mOF�y(�e����:N��kf����.����-���R,����X��Kq���0b�,rq�!wjOt��={��b2���8�-sN*X65t��'�i!�M��g4����^$m�L6	����������
��$DA��� ���f����)E��4����6�������9Nk�on��������.�2������d�IM3�����p_dM���;^\q�+h��(A�N���0g`Lx�x|;����� ��� 1�2��� ���v<y�J��6z(pnt������Q���� O�����!f�����8�+0�������nf^�3����+0}p������7D�dC�v�x�������,��mG�n�c��y5�ev1��{��'���e\�1�?��(��	[��{�g_�����K)�{V��Q�]w=C��Y��]��n���
H�v?n>���3�l\g���5U
�k)z�Wk�TmR��$���.5��\������R3�����g�-�����5879+�]��~�[x�7��~Y ���H�T�`��1nB���e�?������fgr��kB�������m�u��M.}G]�4���Qg�_+K�(E�
� ����w��A�M�+o��A�\3k�Q�f���-��D����~u�����9FK����x���%u���"CjP�����4y@�Dc��e�:��Dk�$��'���8����*YPU��,��WT�Z�M^*5�##�����'��P��X�&����G��E$<:Q���E0gR��X?�n���������:[<&HB.6�#�O��q���j�..�-�$�g���vE���O
�dL�C�5]����6��_\;Xm!(����W��|Z>|\��bS�A
T��R$
�Rj�mW3�s���a������[9���n�P=Q�q8��h$:3�:���p�2<S��GfOs������e�Em�]?R�
��h���ir&�������	��M���#H���.2`8��)����A�vn���'�7�F�2����N]��������~:ab���B4g8SY(�������F�p�,*�����o7M���h/��s��F'[�-�/�#�u��O�<e�������h�F��\0�
�}�
���"@,��i$6W3�`�N�����|��#Hb/27�8s�>�I8|y*,����CWf��
!i)|`�RK��ky�&X�K?����)�{�:D������*����K!=�$K�^�^�^�"�����+���`j����/^�bO��m����+�]9gtwU��
P��Q�<�p��^�)S�����wHxv*����Lc���=p��f�:j�x����~G��NN���{�]^�!^�#:��������kyr�I���-!'�����Mr��}O{�5Q7�G���#����G,7��td4�V�XEjqz,��C�O��)d	�r�Q%�����s���f�qiq��c6���"�j��&8-�u5L�t��fQ���r����J5;���$S�3v3Dx
�^������������"pb|����Xj<�����EB5m��;���Z�W�MZ�FW���{
pH�X������z��o���[H�bd�p2K����*0��j��H<�5����N-�������]}����C������UkG\E�f(�oNj�sZ!���&iH�tE��� �C�H�����:zp+i�|�8z
������Av�7c}���;S^P5D!�����6�>���I2���H�e]�8������"&���+7���'P=S���B�8
��WJd�D7E�P�ep�u�89�S75/2{�p6���X+>�����w��y���$u�����)��S�� ���NT�
�>f����V��6�irN
�L��#�/>����M���'$��1���Bc c1�<����D` �|6�*E81>��Fv�C$9��$>��W�p2G�x1<�	(AjN������k�o�{���I"#iB!���QO�&�U���������A�#��E�-�fV���S���Y���9����)_�����8[�un��3��'_��[^wLs��~�������
XB�N�����6[�-2j)��[���W��zPk��zL'<Kb��f��;�@��F!-���
Q�X�H{F~h&�,L9c����c{�(_\Fu������������Gn��azjy!D������R�\�(�����p���/���1�\9rd����R�'|�FH�i��re�d��^&F�hYI�h�uT�92���L���L�5�K�<��������xID��z���$��PJ���_�wk��$q��X8oG'�]��S�
�|���I�4B�N��p�����Z=�<,�W;�����F4�H>@F[h��
����;��O���t�%)�N������2�H��[Q
�*$���������	����7����������[��2�isxf8(�D�J�Y�~��P���f��H@�)�����?%�8�U����(���:����abQ�����Kz��;+�r��Y��b;
S��
x[+���N�?w������������4*99f�#��:$�,J�	�)���,���gb�W������������%��D�Q�z��>f�(it�+�^��;/;�5���UyJ�����B�' ��WO4#Q��GG�J9��=sz��#x�����d%�����TO�8j����}y����iO��cUA����3��A8�K����|���_:E|{XRP�9p]<��1kVb�L8m��RI�r���>�d�$�A��
����u	�)�u��==rB@
��b����X�?�v�����������RT� �L�E��P����Z*��Q(�I���|!��1�@�]L���
T{�~�~����������>u�
2/gF
`sq�7?��W��e
k��]����.1�eg��TNo����(w���_~y�������$�D�1���D^���g�p��u&��e�Z��5�n�)6&���(�|�#�3��#&�Q0��y����{�l|���+>�z��,V�^1o�9tPrm�R067_zD���X��4���|e�|�8^���%O*_���O*��Dy��}R��'}��(_�"�����%+�NV�I������7~�<��y���'l�	�O7�����#�n�h����/8zv�1)6$	x5��o��m�����B�%Dk�`3��h�f?y����	�I8$�\�
-""?�9N�uj� b����G��Y���I����*n<�J���t��;>����	f2n��)���z�li�#�z�XL2-qx����)������dc�J�:����;��v�i�M���S��b��+*���ym|�X�mL����u��w���W�?n������/���I]�l;��
����t����a�|�������:JRi�Xd�^hBh�-z���l�6>t�S�T�)Q0R!�j�QW���{r""����40���w>�~�{�cX�&�r(��� �hLF%�T�
�?]�*�g~��� U�0l[��e��PQ�ra��������F��d�	�l�7��}�0dz� �H��n�Y�A��Xm����������>yE,K��L��q�D�������u��8��- ���0����L��X
q��^a�h��l�0���{��D(�%J�Z�Y��.������*���"+
�n!Xp���mk��6�D*���F�I����z��������~������d�\�dY`v��j<�7
������SC��[t�L����@��pC����F*��)x����%\\�t��A%��q�0��~Z�����	�#�b�Nf!(r���^���yu����8�����p�`w[�
���W�E��{��k'����� A��y����Q������YZ&zS>z�U�_\�d=5z�D�nj�M^z!Js�JQ�Z:�X�":S`�q���^��o���8�V'O�8�Y@�������g��6�����?V[�W���@����^�� ��ow��O�l�hP)��`�(t��	'=?.�8���u4���ue�g��x
�����V��~��������M/M<�������F��\�Hd��t'sB@R��9�_,'��G���ty��1���DO���K7�����!��9�,�V}�]�������o&�p���{$�S�9�F�<�-�|������{qN��s��r4�n�����Y���{��v�k��K:/�A{d��t,!	�A<�<K��8��I�e
z�$�F5�L@�� ���{��o!]�?����v&�O�w��=�U.o�O����~�_m{��4�R�wb�����������%Eo#�g��o���S��	��`��8��E�S���:6_-Y.��(�*��,�������f�t����AW���7�{g���
O���8��t6��Ku���e��t�d]	��3&+�2{;�VF����X����l�Y%L�f��F��1r-�$����Y�������{�����N��4�&5
%�rD�\��p�A�K3�0eA	��P���E��#�M�4.���W���!\�
p|����*�J�U�W���,��?pQ�&'�HZ����x�Iu�B��(�q���)]�g";@�%����~����_���w;������*�F��=�����{�����|�
�h���~:w����g�:�����=������w��T(>�P����?`�������0u0G,���tU�<7�����h����=Y��O\�q{bUw1��z�%u8��3.P�C�{�N.]�y�����+&82L�K&_�W�h���TMF;���>�OFS�>F��!l����p��DpDYgF�l��o�<Bg�$M��'"�
��?�><~@�$Hyu
B�&Lw�(������1����1B%�gl��9���Zu/�I��f��Y�+A� �m�b��}��( #6�!��c}1x�VW<9�&Bn��t�`?�����dv�4����8���e0��#8;�AG�
{�6}d�!��v@���`��!�1�3��E�,�3t@}���D�����y��B�4�gG��1���gF=���������r�1��.J��C�D����cS;5	BR����)@��&��W��"p�]a��8}���#|n0�.>88����
-t�}6��TM���I�{E�D��SI�4)pL�rw��������}���6M���7���n���g�4���e|�����}Q
x���i�����8�pf5��@�$�;�g�I?M��o������7�Q;�m�|q��;S(�g�!yYT0����:��[������
�X����!�$ ��H|����I���*�q���	��i�B(� �����
GF~+��x���X>��@~#IP��7���y
~9eW&h]�f/����X���/5�0�D����A���dA���)%bU)���;SD�����m����[|�c�������F�LX�(��O�-^����?�	�:j]4x��B��vO��K�
�:��������������z���C���"��*��R����Uf�����4�9����F�~&st��q��3��&�i��et����a?��
�`�����N���g��K@h��4����(��K��@����L�E/���������������S�V_��z�"��0�fa���-��Lr�n�4�(�8��!�Q��9�����g�����v����E����K�=)�Ys	,-��B[=I��^Y�
��_���N����[avp�V�B��A����ngx�t����Pha����xd'	�������[$�����`n��{�n}��b�����Zpr��-=DA�-���a������}���z��3��#&��������Lv	�������
/f�7�A���B���'�q���S?j��!�3��^�<0����#7���'����*�F�8'��g$���4�
i]!��eN0��W��"	�`���(���B��3�<��q�^�#l�&F�|"C~��<J�0�j\�^�����N`f�H���^���
8q�	5���m�R~���!9�=&.��!tr��w�������9�d������O��c�e!����������������=����@�g$��P� ��
f��Ex��jx�)�/X��gm�%���������q�������W�&����=��6�KA|uD���qW���no��x���������Q}���Z��K�$L�1E�@a���� { ���b�����Vtm#
�1�f�'�m/�	����l�D���e�)��`H�f�����!O���X2�	(%XDp�0Vq��RxIv�<Yc,�km.�m��j�zu��
�Q#��GLZ��F�%;�zpw$�=��V���.�Yn9!�^�/��xlgx���_���4��a���G��Z��60p\�tw�=;��i����%m	HN3�7$nM2[�w�0.����q��x�
�����V��;+i�lO5:��=���|���_��o�i��z�Y���^y��N)�4.����Hhf��H�'k�����~������#���8��K�������d_+D��c}�M!��V���[W2���g2�(�=8�Y����������\}�m�����0Be������7�>Y�nNWmQ�ze`����i5�K�:�����=������#,a@N)������>�����/j�H�N8�?C��#:�����p��Hg�0zT���F���x����r�fC��O�����^���!G���N�����E<��0��v 2�v�7�d���p��_|=m��~��S�y4��{g �^�-���7�2j�kv�zh������~\L#oCK�
�q��H�k���v����aq���d�����Ah����b��}!��2�r��`j�[�aT$�VN��Z�U\3��T��c��t���&�����ch��1��QnR��V���"���w0�6f�XL�[�A�l��L�KIz�b-�t�����d/��\/��o�F������y6��}i�:�&�$��"GM!W���J�b[�P���(��KV,TW?2<:���"��`�v�\O���\u�*�Q1M�H�rN,�;$�pJ6D���f9���w��F���E��}���������a'8�����5���<U�����3��3����0���@���!�,|�1��pY�kM�	�'����<���f���n��Ai���O* l��������Frs�����StI�$=�`����������,
�D����T�.����,oo�|��.��nd��$���*�T�:6��Q��������5vi����tQ������\����"����e�� �Ra��6�
m���qc<&�e8��`
�@.�f���g�D�����#���0����-���R��2����N������},�����p�����f�F�b�q�y�d�����i�7�+ 5Y���p�?:-��>����}�2.�8�d��O�%L��h�F6_�)���D�jC�#i�tf�^}��Ku�B�5<�>x�gAL>���<}����<��T�%gB�R1�}������@%�1D��|��#�v�`%E����Aah���I���i�������'�hMMy����}��.+��fb@�W;h�����T
��u�#;fM7=t3a7�!O
;�,t�u�R���3m�<	�|1���a�������Ms!*��T��d&B�#�snHQ�3}z�	�C�`=[�P�����j3���h��?j;�����@g;Q2�&'6%9=J]�A�>�����?W�������^��A�]�
�����6�@��8	����B��������q��\F���q�����6}(�"SR��p���m=��i���q�e�&;�@ew�@0z���_��[���@QV� k�
j�o�����qy��~�}K
�\�@+I����(��t\���ud��.M�����E��('�����B����k��/��.Z��3�����0a���|h&%�G&�'$**4��7q�q�hb��f���l�������T�D���I�g���$|&��l��~���og4���}�7������~���n}+o���n�S*���;4��+����To�<����d_L�,�<%�\������\��X��7q������M����\_m��J�F@�;2������	9�I������r�wTj���~����IL�����H|�H^�����&���]6&pR�� �}��)3�����Zs����p��A���-f��r�R�`���/k��E
�
v/P�AB�o��3'����������k6���K�@��N�G@���*B�%�WSxu3l�`��EBh2:��!x�	�<z�A������7J����A�����\+i��4������O.��8O�nV";Mt%�	���	���e<- o�JCJ4�Nt������w+���L	E�S��ap�O�y��Y5��
�F�N1������k�9�,�6��+�9i��%���\�;�&���XeRL��t)��P����)�_��
�*��0F���O�=1t��lxGf�8�S���l|���"�8F�O��?0����G�����Y�W�@9�`�T���/�	�j�ik9�!��O%{u<�U�Q��W
�
X�������*��V��'��C�}��hw�!�~\z�j��|���R�d��B�� y>Am���C��Q|���X�mV.RP.�|9X9\�K�|)�!�a
P��7U�K��o��	��Sz�R����Fb`�y���Z����mk�g&�U��0W�0;�&�sj��j{�[���%a.+����I��e�'Vu2�okN�G?��0<�m��i���!��m� `�{j�j��}���6����1�j$����&c���YioRi�d����yQJ���������G ����!a���9o(�������q����C�i.AS���Z��M������6�\��]�m��"��+��k������k���3��d8p�<��j\��hS��HF����2;��6@Q�j}�P��Wq��o��v������YE�kr��;�������Y�A��a�����a�,!������%���P���S��S���8��e���8������xxsut��3��C���F0e�f�����8�'r�E���!�l���0%{3����`����@�����8��7����<�t��I�,�1�����j��D�:��Wr��1��5`	YB	K�!����������� �D�Uy���������fy�Y�^Cf��a��(?m=o�
_�K�o??,�X���.��������}e��������~>����1J�i�q-�>�������U�7M��v���k,��}m�������L*^Xo�$�����1����,�xD� �Fyd���������5%�v'O���PB���~y��,R�L�^-&��������n��M����^I��!�e.>B�S���[~�J�+��<��-g_=��m�|0Y��%�o��bE3L��k��t9��L
i}<Or�0�&:g�.��"�R����T��i�H\�7/��Q����z������>��	�'2�p~����{���jP��:~�Os����b?�w�-�~�Q���s��r4�������;K6�B��g��I����J�m=m�x=�0��A�S���X��|�%af��D�J�`!��6�^�K�<)c]!���P:[8�L���I�3rp���~b��|_i�������#��_+3��,eO�4���4��N�-�����iw��r{�,b�2��vU6����b�.����3�^w��E������+k����$"Y��s�u�-r�B���B�^(�b�B��y�-��� ��Bt��>a)Q�:�DAD��"�TXT�q8.e~T�9N��B�8��N���vXT~�zqEA��!
u����`T.Z�R��/am��b�u8xh����L�����\��Z���"Jg`Kq�^�N�3k}9�	H)����?&����@7;
�!�
����4�����(����&��������^�N��-._&
6��2���-��Z���O\Z�f���V�E	;<�+���%�	be����A��B�vS$0�����\p�d%�|�������~��{j_������I������z
I3.sC�lG�9q��r\����6��E�!������u��a���2�ppu�����'~_���s0��oXE<��y��N
5(����O��w^��S:��F�������`�d1f����	a���gC��u�1V����a���;��eOZ�TTk"Gzq�$Zv��^{mc�Cb�]<�\������|�]��z$l�t��4��6D�%����|;�+z����!����v�v?�u����'p�z}���
�v�AX}�	+)T��2DV�}12 �����7=�?
}~f�I��AO��L�y��
�i$u�brb����D���p�/����wp��iq��
>���������A&���v1;J�J��� F�fz?�9����2������I&y	�
�F7D���q������5%=����:&�HC�M�D$�XS@��k�~J�
xv�x���Pb,�r�<Q��a4�B��	S�<;^�����2��s�7t&[t4l�=>��R^�w�s����yPUM������z`��~�
�
���_�23��[��g�7t�����WH1� �u�yJ�T�1!
ZZV�m��_=&��f�����<�VU/�\QWD�	U%b�NVd�\����j��������-I^��*5�����i6mq��K�����MB���5Ne1m�U��V�����(%������_��Q$$S����T�9-�<��Uj%P+��E�f(xS�N-&���B�b&�IwQ�3�O����V��/�yAOP��PE�h���g� �f=WO=���zq�	�

�Cc�Q�����������Q#��h|�>nW���A�3��t�
���hT�~�r=����CV���)���������J�G��P2@Y�eZ@��k��*��P>n����g�H�t������������&��Kh�����7�)'&iLLq(����hB������jI��=�B?J0Fa�=v.�
q������Cbp��?<�����<T� ;*��/���zNl���)-l{GN�������%=-T��;��yb���I�m�P<����������N*����Qa���LJw:���s�c�2t~?����8��HE��Y�p/@��z\���{��s�O�%��G��w��������i���	Hf/\5Cw���8V�Y2�{�7���������!�`��g�.��,j$0��C�>��IBsp���x��S�_��*�'v��� �'
d<���7�1�7���y�Z��(�����G+�hq�#'��pyNu�)�E�)r�<��S&#�.������"���n��I��;~���h���G<VWK���i��zz���PV��V�_����L$����];&A�2##�����?�}>L���[
���#����4����0��zR5��[�Zd��m��o��s���nX���#��M��U\8��,�,a��O��>��U����XF.=��&��o]2��������Ssl�O&��v�W�$�_���|���Vs���7�
��4LC���r��(�PF:feu�b�{���,*����'�A_A��lX��@Kr���V��i0��C����o7S�|��)ip��!�R0 � �7�V!��F�lI�S��m���M(�px�]��\��R��s�*���v��]���v����4��![���K*��)��V�+d�QX}�^���axar����~�]�^�����_K��I%��5�N�I9�x���<��.�l�����M�x8��{��`���"6w�*4��<���+��BV9�$�#!)e�Y�!$�M4�
��p�ML��8�Nj�6�d18���w��
d<t�����;uI���X��4����R�w�g����)}2!��9��;�7��>qFU�BF�U@�FDJ}�\er����Y���Q���R��x�F�B`b�W�I��c@�Io�}k�&�D�j���;�������C����W@F��^��_�;��M6���x�3%��$����kB����z�A����O�/����<_~��Ez4l�#P�'U�LY��Jh0=9%��r�t��C$��*�A���N�0���s��t���K��<�	��|������s��z�s&{��������4OpP��m��M����%I�:RlKxX�4,���8��
��
��}}����������qJ��i��Y3�0��c���6vm2�c��3�
�����P\4��E0C�#�N#�O<58�����w���H!����^���SCae������L���$����AHxR
�M�sRXyVA��
���AV-�TD-�kT���x�E�SeN��|�zk�E��9���c9���A�v�M�X�g��yi��m"L�n�V�����2����	k�tSwd���`���rnJD�5�f�>�r�������-���}�_o�J�H�!![��@N�%0��[�l�����mo��(���T������s8!���v5��D=�X�$����c�)��`��(@��n���DN���f�l���H<DP���4���2�H��o��>�I4�<���2{�[DDd��������'���+�J5����bE"Wd2����A��jL>yA�c�l��U�bKx2�'����B�����#jgw�0�Y�@���sT�,(9��i<�������5�i���q�>l?>������KF-��g2�^���JZ;��iH�d�5P��pLX���f���~���y����H���������$�J��Y��xr�$��=�~��p�U���
��8&�	���N�����wA�c���yI_+�]�5�8�ah�W���?�	��F��l[�@�n��D�������k�s��G�2W��F����3�c	�2�!���ds,���h/
m�����w?�M��������w����_���SJ���w���0��us��D{��?-��	p��`��O��ZBRB���n�����K_�`1)����Yj�dC)2�(���U��v�����2?�*2�@�[vm�������
��)%%��B���0��/O��-1�?�?��YbT�������N�d9�9�&&'\0ct��LS��`�0/ Sf������n���O��n�d��B�_BK��R#{�qp�V&_-Ht�_�7]yRZM�����I��P�OM���e.C�I��b++iXT\A����yC��`6*���P�Q/�hB�a�����j��e��\�q�4��x�6�nP�T'z�����AB�<�s��&:�K�1N���+8v�S�<h��������a�p���/�����_9o
�%x~�(�)mgJ�z��|S�z
�u
�Z��<�"<U�Q��D�����!<-���r
�REh;�i1q.63��T��m�N��
���v��9��J�UNAK�g����z���t�i
�VT�S���������y�������v��t��%����D���%��!�&���T(g"�]���G���G����t���f�g�Z�����O��*��G�'�J
Qa7|�������S�������KBv�=(��^��Pp�lpgt�c��+��,hxP�-C|���z���
����������p��m��+e�^�%v���\`>����{��<�5h�OO�t�S�+�7+�b����2�qB��X����B��������-�
FT������)o�c�t���:H�IG�tfxVX�(���Q���%Q.�.-��2��q�a��������O���I�����w�������/.r������2P8�����n������_���j$��;lh]�U�^j��^c��Z�����
k�o��2��3rm�0�g�I� sB�te��8!cb,g�(�,�S��g�����y��e�&�2ZRs����:R"�` �Q�)�����:(�N:^�]%��Q`�[���LJtb�&I
��T�Y1�����]����~�}>�B ���2'9?�o�-���}a�`{��$�2	msecF~�+����r�3�\�����n����
>��@r��^X�]�_,\���\\���
FN����@C��z�]����'����,���r��� DR�O��<�Qh��[����RE4A�gP�T41-���ape��W�s�[�M�@Z$���OqF�,�	&�E�����c�����%`���x��'�(������0����J`��@������P4)Q?�&�U���N�k:[	���%q��njQ�:(�F@�>��P���|��~�|8_��+Q�Vj(���_`�����62h"'�M����SP0�^:�D|D��;(+�%����*��
-p����e��O��`�5����_����/��.g�<��Xf��u��j@EX	m��t%���c��Jc6�LD��em~zq8�S���I]�@*c��F���<��k`�~��f6H��y�E�\B���?����f�]��M\?J�F����z��4(7C�N2f���u�L������>���L�`�mB��.k�����B��	�Rh�n�`b�p�#(�C�h`�f�
	jb2P��$L`���R��F1�?t:2-��@tw����}|����'���2���E��GL��,�oJ,�q�����b�x���&f���=^�(��{k���C���z����F��BbB�8�V*�����y6�P��
&��\!�PD�L�?��Urb'j-Fn��>um�6y��`�z��KB-�:���� 4$��T*GG��:�u�y2�4�@���Z�BJ�B�����V�L������?#�������������bRJ�	K�Alb�'%��gG������]�$�f'6�)�S��;g�S��X$�he�Tq�;�����V(<��{(����i�������S���\�:^E�p���Bc��������)��1S����
����l���:����������Z�	��h��kH)���}�D��6���kw��~8.p���j|ZN�.nU��l�[���d�_Z��<ty{�r�����et������������R�E����]�s��*���j,/\V^J&�aI�cG;���	�'r���_T�/�?��]���=t>P]"��-��C����m�|qIB:�)��e1V������K��~�TD�@�T"�8�/fy�/�dGSE��BL�����X�o�&1��!�L���&�Qt=n�ly�J0�_�"������5P}�i��T�+�z���~Q!T����:h9/W5�|7�+�@���s���ENr	��.������uy��a��l�\��5�ic�P��WJ��<�a���E}W���|`L"��E!��*��H�	9��0C����x���z�;�����JB!)W"��x��@�9�Dp96I����A����IrgG`+E\-��W$*u��>R����A��ht�%wi�8�� ���
��$9zt^���%�����n��b4�e�����	���f�&2��!��� �/���`T��M��v��M��rm�n�F�K�
���,h����>/g�,-��3[����K���-�����V�����hNE0D�KHGg���X�+���s50.�nU�j,o�B�Y~�Y#K�s��B�!��-9��y}�R��U���Wl9qs��f?mv��������"���J�2�����AX�����^�z�"�"��5��3/�.���(��m����q�*P/�m��{UR���Z����% ���(�K�2��H�q�� v����i&C�e�OB�_���|fn��%�&���p�8�^o���^*�en��>C�@�����O��/���k�W�3�j)��$�Ei�����o6ww �$HN����0��\�����a�7�\�����
�i��
p�T(��D�U��
�E����K�HqB79�R��_���2*^)8�'I2z2$�i��K�?�j-a>8c7P+�������72tzDf�&E�uR�2��K_���"=�$���0��$�]BP��<q$3/y��R�r"���AQ<����v�@�R�Ev����7��T3�\���'�������4(�=��F��t�N
��&�r`�5��T8�D��$GQS�8A��V?y�x3�����p$'��2�}���a�� �S\������IC!YKK���8������:_�9C_7y9v^ aMPP��b��Jw2N�j]?��N����L�U������f���s�b\�9�,.d
g�N2}�l3��������6��9�4�[�BA����'h����7�^X�xp�������4I���MsR.m���K��>�����Q�f�F�������E+.R��SKu��~���R���'
����+�nmI����
*��Qi���;�������� #�I�_IN.g��"�M�r��@Q$?�	���;+-���3�W��&��&�^{��h�o�rK�=q�����r��d�)�����w%���R7�������G�U5U���tE��%c��	���N7�7��
*�z�w�����A5=WA���G�h`E_�@'����J����,(�<�0�Pp�T
%���d��d"�+5Q�������w���S�������9�yy)��T�s
Us���~�p}s�������u@.������E�dz`�����c�\A����.�A���L��L�0����[�w�O<�@)6�G��7r�7�^;*"�4)�W�l��X�1�M���SX8���Y��r��T*w\�q>���4��f��e���C����lT;��� ��M%���t`���e������-d:��{��oJJ�c|�+��I�7�
�/�?>}�A�HH���&�d7S_�����w1�)!h�v	����^��8�V
��Z;>�I��-�>����_T���^�0&>4��-P��	;�!���Y�1\\�ws!P6��(*{���s�gw^1��u�2�+M���27��^�_i��A<Su"�6�x�/�\���K���-"���_\Y"t���[��ov��'VW�"�Y]�t*nI�T�$��D�?�/��4+f����|^"@*2w�����L5��0�h7���#�/�����j��JD(ZVi�Or%Y68]'**�pP��*UD�&��������6�??>��y����?�0CPFh��L�E����l�9�z���p:��4������1�Rd�X%!��(a�(8@��S��~���������.&�%���Tpk�Ap%�4�{���sR��4Q
����#BY�]fqJ[��+-Z���P�����������]��������?@Mu���rD��^)v�O�V���DD�t�H1��$�a_�&y��:��X����������lC���Meb���7��8��6�(_P
Wc;�6�S`�2y��C/+x�� �6>���e���F��&�8��<o��~�}0-������Q�3�
KD�8��D�Yv\�9s��T�e���
9���������
J��������<�6�#,�"��^���[����6��/B��:���G8�Z����q��O�s����Q� ��b����z��p�	Q��/�82���np��O����6%���T��F��#N��z���� ��U�e���������c�h��X��T��s|�P�8>��#��o��}��Im��7�S�����f��FG��F7
�N��� ��}|��7zD�[�r�O�':�!�P�X5����=�O,q`�/�o���]���
������z\:,trA��8��{\�{O�X{�Q*.�bd�L��r��6N���D8���5����&��q)811�2$��P�91��G�>��0A8yq`�"xEy�~}�VtA,E��Q4L����eS�M��A�-}�j{�T�e�}1��*���������F�_Z?�SR��h��j��C�gJ��vx
lJ��i
�IJ{6�}��mW<���������~>o��f���Ky�K��E_�\������c=T�/�/)���i$�#�m���E9Y�����W~�JV����j��/U'�!+N����?tx:����%ww�Qn���WA@���2��~��BY��2�x�!D�2��2��|��"Z ��-M/I\C�����]b��������'���(�
�2�B�r[���S�%���.�������M�,x_:L
���C�Lh������BK���-�P	lD���"��[ZI��;��dl�t��
�������<���G�������e�%g���X�HJ��|�Y�$�R��������e�g���<A�b8+���{��li0`$@1��t�D����!��}�������'1[0,B?���zX�
t��>���*a"y�(�]BH;�4�g��Q(������Ow�[���*�� �|M�����o8(7�n����e��*t,@I�����Ms9u�K&H��Z���S�QP��9��t;�v�����T7�>��� `�ex�e�/0��F�u/P����^A\�m=��8� �(�6 �i'�bH'6��3'`�DL>�4���08�4p^�
���W,G�2E��|�-��6Pv��U��A�A���QR����)=PX�J'��u��,����7�n��og�z!~��h��D�D�x���A������(���.,^�sy��%�n��w��`�������y,�`h������/�/`8T�m��m
���g�KE��\A��l�pT����$	7Q���L'�������t�*'��x�Q��	b]a��R��QFZ��4`/@�?
�,2	���}VV����HS�U��U�f&�	*\Q@b�OL"�x{��	:1NE}FQX��q�iu�Hnr�P
F���\f�:�R��J�p�9�F
lL^���ar���I���lzK^0�����7�7�@L�fq7W�����-`�2J1'�o����:�����Y���Q3x��~���HkE�<�r����nn��W��/�|5^B~�4�����!d�%s����9�O_A�u,�)Y���8�m��
���L1C����t2��w������O��<���cx�E����YN+?���uqH
p=?��=>m��;�S����7W��y�4�h�S2�w�
oB��M]�JG�N�H��H�5�<%u��
?�1C��^b���b��E�����!:�8X�E��T�ER{k���`%H`?���@o�

5���e�0�A��Hm�k&��������,�k����B���g�_������h~�d���m��y�v���x��*�����3��
v��awdC\J4 �7�CT�-&���C�'N�%������w��
�V��?���!���m�Ws�z{8�n���|os�8�$-�!������k��������_�:k�c��~���%R6�F�@��4�������`i�M�
���$y�|�	�f���)$�f��%{}�u��%��;��2���]�&�Y��k��f�5�P���q����jiN��<8;u��X����*��MH�GI�h���X��	6��j@C��3���
���;����>�;�,z�7`��Wl�	��ln9�����	=�uj�j����lV"���|��ZJ,e)b�.����/r�]���	}��#n��b-�����{�M/K&o%St*��]���,���'_+�n��]I���^A2�~�����q����f���{%+��:�����g��]dH�c_K���T�Y�/�d�R�zN�[3�[7>��n!qA�\{�1����Lf<����>}@�d@��	���1af^VgM�����>9��\Tq����8c3_-��/�	����av��IK�$lDTp
-dZ$���<�W��	3$����P��h8-����eT��58����(���7�{�~
����W~=���4(��_��qj��q�:��2�z	J�%�� � �`J��%���s��E�W�x��e�iH����)�xi1�������2����%9�]&��R�#�K*��>}�*���',#�����s�k��"~I�n��0���x#QH����\���3�Kf2%:1Ma�Lzd���}3/��2��"p"`
����A�����<�(�/Bq@�n|Vd���xz*W"g�:kQe���(QL`�I�5u�B�9�3���?��������g�C����_p^��0O:������1�m
�T�g����7��c��?j��?n�l������e�g�6�������|��\��n��{�ox�2���R��/ eZ��3&~?5�G�B�5*_�N�Y��,������_NRI�T7Y���Q�F�������p��U����=�E�F��'�����/#�n*%��z���^y��)-X�~`��!, RP)7��:D)>��6���O��
I�&�"R��JR�_�l�Q	���6���Ha�@ �������L9]�S���$�+�Yi����2������L�~O�1���������8v�t##�����c�A�cT������4wF�:��{|1�[���g�m9����\%������;,���"s�������+��R�{�����.�|W�QIJ�Baj�vu����n�����D�eSCP���P�l��@X��
�\�u��L�5i��T@4~������A�iZ&+�6���7b��Rd���d�q�����r$"�����pOw[2�?�=��"
��Kx���Qj�c�Tr�_�4O���6s(��=�1
�)or������C��DP�C��t�_�k��r����������~C���7:Qj�_??m����
���/�?������S��[�%)�'"<�1�����L�C$���5�i��������a��I�7�\�u�������qvi5����4�`�����wD�;��C����OM�k�E���yA���8���+����w�ia*����G����iH��?l���?��c���\ir20�LL�����lc��J�����o��cfBeV�6k����l����4�[0`<�������+r�/�3�Z.�K�4�u�%F�t�Y�Z��������|$��>|���~��0bB@}���]4.����U�mVy�"����������1�PK���9�)*��6H�����?��Y���������I#���'jv%��~q��8���] �<���y��,�(�H'\{	4��w?�~r�������
h|EU�X�xy�V��IR"��a�h�����	)��te��H1����������~��Yv]��E��R��W8dR���x��'53��E�D&���A�[d��X�p���7�����f�A�����w�����������n��_9S=+c�etN��*��/����P�`@[`�d������`j@G�[jo�z#V�sS�fc�>�����wc.����1o�O���1N�B�.8?+�=�0`9(/����d�R'����Z�<��0|t��!&�H���7@'��������B���x
EY/��9������bg�^&9��!�fpcS�H��J��33���-�^uVf�9�iD��AQ�QX�.G���L�Q����
T��m�9A-��O����b��y+��io���K�J��H�tlt_F�|~�����4	��pU���'-�#��b/��{�@����_p��Du���>�X�[���p��7��<��n6]��_����+ �8
Myd�
�n���<���aU��p5���!�
>s��X��4���3A�ht�������*�*v��l��c���$�4�&��*2�����+�?����:�`�����X��Z�D{��$N�6w�����:O��2��J���|m>�{��b
��2\�gA�����:�q���m*k���0���BRE$R����U�����Vr#g�PW�J|`��#Vm����jGE��4!&~F���9-h�pE�jg���v�����[??���O<3�������M�3�Uf7�7����#�-�j�a�@
����pdAjhI�����_�����Qt<e.R���������(���=���M���r|���Xq��	5H_~C�	�k����D+�%�+pfKX��LA�eK�����>ku��~��@��v���@�7�e���ym��D1;���2�DT�O�6�zl�Y����4�y�Ex��D��|�P2 )[b#E"�`:�P�,������
��w�tU�Q�<s�M��SS�RX��
]�I~,0\R#���&�R>;$��
wP<WEim�MS�S�k7Z��n��G&������<�"�K��;�.M��%$AO��K���#��/����!��8�����(�.��XNy.�iQ0G6!���p�S��c��N)����4��V@$s�b�_�����_wUk{�}�x���\i�FQ���7�yc��
)��D(}U.T�h�6��3�sI_bz%�3���ZlrsFjh����^��&�r���[��`�6�����3�=!qu�i�9����H�,7������z�-9�N��Gf���T�L��sq���A�����D�����mId�[n���?�h�Ox�8�����b����8|=W������t������N��<���t38�d|E<E''`�N��Y�0�n;�P�
���9h^��F-�&z�0",$F��t�������B(��C��L���d �[��.���%	�k��D����<�$\�Wi{��C��O��M�t_��J4������%��|!��}���K�C�����;�4���{�=A8��C%���(��1c�����B���i2����
c�	��4$��}�#���c�V22��<��	��'G��5a��=F���s�]����h?��{�4*,����!O%���4CF����'���!S @���8�������L����H�by|2�{��O��L���IdgV����W�h����h���i��"�_���@|���~s���&Y|2HX�vD��4���#�R�bPv�J��(WX%eos�
D�2�����?�x@G��(���Q:�IXm���r�����#��f�~}?���D��zm��-�z�H����gV�4�Q%�y��`�����_ �A��/��V
V<Y��2���t��h��t�������{����{���c�2%����/el�f�����\#������e��P�q�7Jd�<�D���
������w;��� X����j{��:|!��x}���4p�����f��fo:���1fc���)���a����j�;������n�4���~Y�%��������E!KS�P&�F�����YB����B�O���)���@��,aXa�\h�����y���Z�����5��`���(�GYu<����w$o)2�1������4R����}�����0����<��T��'g8��@ud�UDO�~��x��e�����v�s+���������w��)�ME����d��:���v9�����������6���z�;��������~|���j)������$"���Lj��"�����;X���#����r����$���"C@dNHDHm��$�&�z6�D�>;h�x�P4;���Uz�[���ZH�Q���q�����/}^��q&��e�O��v��8�S�����-~d��������!�u���8�|-fy���FSgO���"���O�U)C!u������_4F��
���i�2c��9�������N=�%G
���{</�	pU�����~����������2G�]_+o`O�(��9���YgyX���b�%���`�����j�ny(�L�-Q)3d������g���j�hFx{�����v�� �Qkv�v�z��E���`3Z@�O��*#��s�G�*^�I�q�&Qy��b*L����z`k~�i�%X$,���������:k�	���*���n�`�F������4������o�0�=1F�8�=!���3a��BP���������@3��:QJ��QC%&�����5������rfGq����������
p��K��Ecu�r.�1����7��j&�v6�e���"�=|B��y�T��4���
����rOw�������y��us������v������j�D�]��
��
��l�W�h��j5����TU�W��
��<�K^S��!^n#�g9 �H�tp���"������L�<Q�����#�Xu=��d�<-�����m�#j[��5���(������i�8Ar�5����y����r|�A^��+xz,�vt��OO����zAC�5F���v���\%���z_<�V�(:n&�OL���QG���?.�Z����T~���
�4]R��NhY�q�&���'p�|�
�>�����R�@���[�|����O��S��e����	`�Pu��gO��p8�XA 
�o�M�_����!� 1�(���a���0��j1�����2�ys)QA��A#�U�Ua��{u��#�����g3w�6~�w��^�Td��la�7�*��h�������m++��F?�������W*�V(�F<-�^W�������^o�jz��Z%���tfqB��|�����^+��8�
���c����X�J�NA��x�90�De����x���m����MS�����%X�^la��`%]�����3lL�X��G���"�w{��n�1�~�o�W)LA�.DI4��t���8�-�=a}����0�"G.�A�S40��n���'����~?6��i��w�t�U0U����������������X��u��D"�\l�)32��<��c�#� >`�������b������~����T��)Z��rd*�@��wyCH�2,�����Cn�h���7z�b)���))��6n������1����/��O��>��3��Co|����5d)���@0)�d���*K�b����y�����we�����|N����l�d�bd	��Q�����Y\��9�'������Ve9�������o�����>#g������6~6�s��0������#�@z�������hen��73�%�p���*v�_l#w����n������Y����\���Fs�r&.=u^�s���T���p����������~
��97�pqax�`h�1����1�����@@17!aQ&r�Eb�+�mRl��X��%(<�N\�0����|J���BU���@��>E`�,��>?Lm��&?.�(���d@���W
�0�!����D5�����I��������Xxj$K/���Q�AS�������5)�@�L��? 8��F�1g.M
��� �9���:i�M�$�q<9��������-���A�|b{t��x���.��~LB�����T]���M�CW�{���D��eT�X�M�FfFG�+�E���R+*�N'`�!l����}d@�P��q�0�z���+2D���
�K_��*��?&�;�h�J��?���^�L�6YX����D�E�>J����i��]:S��-U1&:�w��N�N/�b?p� 
�
x
g�$�c����&�s^�+��He������Lu
�$�GH�B�hY�4���?��YiW%��A���Z5����B��qu��I*���\�<�)��r�v�,�7����_���7�s����{^��*w9���\���z��.��J)��J��H~�o������`��'l]�GB5<)�!����[�jp&	�-�����]�#�q�B_�Y�B�Q��g0���n���ya:sh���}�������$�"&~]sn��U�jgp"g�V7Y.whR�*��%Q�.���h-�����4�����P�:��YX��[z]'5jp0`$�%���6��A��c���&_8R0akL����S����Fh@������W�������5��N
�'�%}�J�Z4��%�N1��i-c�
����6����3���Zb���B Q���_�Y�	�?�of�Du��?�;�'WW<��m.*:p�*�H�/��Z��$v�NH8����TG�����z�����m�/��������p��~��S�TGS7����m�G�X�"NM�.C�f�_��P�/CI�@LMTED���������a�P��Gn1d.�K�3�n�\��I`�4N��
����(�����������8����7��"c�UX<I��p�V�����Y)w���=���T)E�Gu�C���bo�������*��������i���^�F����+J���D��y,�������c9)����vM��[���<I���Z�t��l�Y�{!�b�z�J���	^\r@L4��s��Cw�iq�Z�Y��T����^�w�S|��Su�h�h�R�K��c���MC���@G�z������h������U����k��N�Q7��w��w3�ZZ�`�oy�P��=
|=�E�e{�,�w�Y��q8SK��:�<����E�b���X2�?<�S�a��j��eO��N�JU�\�@o�a����Cv�D��9w428�z��}�g�=�P��n�F���?�p� �m�l0�li:K��fyb�sB��d6�3�"����Br���J�:v��?���@����BxOj-����!TXw���_>
��������<��!Z$��H"���&�03%���XG�������zw����Ep%��� i�3LVFR�Ay�#�u2�-~����wO7���g�xS.���,��!�;�������Iu��=L��
�D�i��f%Hu`J�KC�6�l�Jf��H�NK�TQ]�YL�	%��!"O��i�����F�G
�������I�6�F��?����fl(\Q����6��~�@�(�Pbv9��<f��J�n)�a<�	�cq�_#��&��\�J�Sh���j��3������t������.7�Q{���>>���{\���
t�z�{w���nH�������$�����B�z�r��c7b��2����(�H�G]a[���EJ�z�PhS��:aC�x�D��>
���a�s���E����=q=�U���C���2��L�[��(W0
���@_�{������k�dJ����-:v�����%
���+�A�`4?P|����������}����o�tH���+0F����Y��9�i�������!t�~z*O&���4�C�g�^�
 ��i��o������f��&���O]&hK��j�����7J���Pb��6>^���/����RF�d.��U���O�	(g�i���<�.R��9�7�m�&�������<��oV�G�&�yb"��� ~s�����9)^\�O�5i��,�>?������`�'W��11iI����Hw����|�p��������DLRw��o�G+MV�C)]\�<����\�K�(m�"�LL�7iYw�����Ml���
Ha�UH���1����^�8L�1J(���!����g)K�q�0����4�6��&�2���q��6�wP�&�w=���f�F�1RU���n���i�N;/OS-�|�}U�_[.�.;`V\}������1��X�+���j�a����������R�b_����)���i���,�Exi��L��j+3��LK4N������"\�/L���L���J-�n�d�L����:�/���EuK�U��T�@@�&����t��U�l�'�B��.u�v��G�_<\>6�<[DF���TO��l���	�1!���%'|��:���V�+QL:X�W�
[��
���o8n��87ej���k�jO����w��`#<:�^g1�K��)O��Xz�%��<����o�@��Q��)D���q����d%UMo^�K�&K�%�q�fE��3.G#]��<�3k�����/cp�9��X8B���y� v'�y���R8�w��Koh�3�!@0OP����Rd��+��������V�	��=�k#}����7t-�����b(�i^�% ���.�Q/O��u,��
�J�Q_�_��#�����Qr��)�V�|���t��{c�}t����������
��]#��'�������/����@�@��jo���x���x���Y��5���7��)����U��#�LE�����Kq�L�g�o�K��X$�Y]@&����L!�q�0��Q)�3F��P�1������P�6��O$n�q�R9��������7O���t$Js"WAMx��N��z3P����w\�r*��	���UaC[
\�g)�MZ����a$��p��iD*pG���4v������k.�G�� ���(��$�������!]��v�%�����}/�������������<��B��;�m������%6��|�9�
�H%	�;�L�;@��j�K���?��)"��DY���
��?MV����!�Ru.
^�Z�8�N1�XP*2�H
mJ���{����y��{w{�3�;���zy�]
G�[��3���F)��7�m�T�;�OA��<*��pCR=�D�'���� �#`�d;�ml�8�:�����|�h����X�7-�1�6�-����
�(~i���y�}��z�Y��}� XW����H!u�"��30�p�y'��#4c�1��s%`i��!D��Z�.
��l����L���V�k�E60�8Z��n��VD,���\+q��@� ���	��L\�C����`\�����1{|��R��P����8�I�szp��|
c�0<��dP��K"~>i}����y��>�c�\[MG�EN�Phw�2n����2aKS{�ORk��KWr)��[�hy�pG5��l����\\��q��
+b���WL�PW�����'�u�k���
���"r��M��Ivy�
0���K'����J��%�����2��G����a������WAPiB#q]���,����a��^TW(�^����(�@�uL��Q��O	Uy$���j<�,8E^����_?����4r�y.(	��w����\��L?l�7�?nv'e2���j^����X������n��4XAb�|�2f|2�8Y�1��YQ�f��2��{�����I]G?������	w�x�rc�����f�;b������xX�8<���
�������_{��������d<|��`���d����w����{��-������wE����e�"E����dDo��cf�8*�Q6�����h&���G���:3�Br�N�8d:�`�g83r(t)�or
���(J�T��t�Zq������h�\T&�!	jO#u&=���ns�H��
	�n7��w����E)2�����<�wE%�r����2����]��szRn�3@E�~Z?]ep��!v����o&�9r~�����F��&Y����&��4rw�*����F,C�yf��@kTo���Q���?H�z��_�
b�&���3jNd]P 7dAcZq�0Nm����A�M���]@���}�<�A�������0�K�#��!B��Rrr�xY(1UD�q�	o��~�
f��MBS����7Yu���8�#�AHpt��V2z9��A(9�i�%k���"� ��K�L�8�����s��CJj�"��]}&[��I];�S{O 9���oeQ:IB����n�lq6G�A6^A6��S�p�c%��x�����}����y�{|G?�	F*�.��v���a� ���`�����	����������5W��=��(>��>���������u��������&NL#�EB3��,J�����?o��u�|������LQR7/{��Y�Jm�oUQQ��3-|.��=~��T� ��B�L�q����v��d����s�.T�%�b��|2������!t�
]��_�����
��zi������E��������3��P��
\\6��+}�Fb��L�_����k��B$)�-���rc��{���'S�/%&�kj��U���\�]��?m�������jEa�78	R�����������a<�Q�J���&�T���������v���gs������x[�e�C?���=<9���(�H����#����4�w���������c������9�o�?���\8�F7�����7m.����}Ji��a�1�D"���4$����d[��E�f�#��MfE F�|w�}E\K���^�Wu+u
?�[m���������-���Lf�v1��/9Y�#}���^�������]�Us�z��ov���]3@t�II,!*3��t�_�w�7��}*�(�45y�|���/f����8��/��t���F�L���A-�Z2����FG��������Ve��d��as���bgkM+h���Dr	���L�t��6V�F�}�l^w����n�
;~��8�]�d�����Ecf$J��Nf������f�������F��-Mkp8�3i����B��H��.�.8��YF��(�����]���N��=r�B�+.��:�y
���7��Z��2��Ou0H�x%��km���Y�~����*�����r
m>���A��`������
��
���t5�����<����"[g�?:�Xo���	��8o^�.�8���� EW(,I�8a��&��f&��&�&>�����haI����"6�W
����v(���ON�����c��<�.n����R�E�y�JT\��������.6������o����;��p_�����9��K+����X[����u��q}�2��x}�_?�42���=]J<S���G�:�z�����\�������g&�����S3T^�Q����PI��D�<@�/@�d�
ST8���D�����.���a��d����,�;�j�x��
^�y���]L��py	�D�"\u�����~���Lg�����W�����Y�������������]xB�Ku�6���mDy��f[��x��P��U����q��sU�+4��"�]@]�O���W%���s�d�z������tT(��w�I/pNO8��s�S�w�~��������j�M�W���I��$�J��
��D�=~z%��J��'��B�U&H�y/�Z���W�����D�jW�����SU�kEK�|2m<�q���)X�����-�b
*�����;����Fj/�\��x���_�=��4���h��(���#��d��z�h��x���x)7FU��|:����1�b��g6��o�O��������m�Y������c!���j��cDM����C,���@��-~$��0	��#7Fw�QJp��)��0�B	e/��B���	�{�h?���E>��?�|���q��r�G����F>PM�?�`�`���lE:���n����aA��J�;[|Ax���}�y:�"��6J��gf>���r�S`�H����X�,@9���Q����R�����4��|B�,g�@zS�{�T#RZ�����4�}�H[�(��"�I��/��L�B�;�f���"�;Bs�������#)���A�\m>&��H���	�I)���C� ;�i`����A��@��^P=�a�s�f
��u��b�{�N~��W����a��k80*%�����#`t��:wl��A-$�Q��=�&��\�(������"��
q��>�0��� #3�!���s��*0��k�#1N������}t��������
�YCy=�Sy��&V�����7��}n�C������C��s������U_V��A�1I��2	�9�[A���R$�f��'��6�m�������n��W���w��v����v����+�p��qAT�x��!u�:��5��	��9
��1������(�8��I������9���>:���^{��x��lCgI���F��y�����S�'^;�w���f�Cr.p�Q�w+��i��������f��t�����zK��u��o�'� yL����1�L���c�����(���o���Pf��+N3��x����*��y�)*��Z����	��8!����8�A��*�����-VX����*���g
�]zH�]{��������8<(�r��|k��^ ������>��<���cB;�f��?
N0�C�:��i��������'������"����,'�fD����P9-����i�!�	�
��?���f�����n������
N��(�A
�d��m!�uNb6��m���*q��@����`�*�M�yd��.�v�)�B6Qg��
���/�'�22��=(N���0t��vn?�$k$pu��t����4��v���a@7�J���-T[�=�}c)wc"�#V��h�0�������O����?��:���Hi����va�e`����_�����������}���i�V
�����W����H9����;����k9����X^���++I�:oH�����Z'�_a%�8��@����fO��E�V}�-o��&v��M����V�D�r���Y�&�R��k�fy�A���G���e>��b�������]�a6Rf�<�^���-2B���_U ���

�*0���&T��n>�����P#��q�����x���AWG&�91q�p�&�%���2�5*�����V���5n�]��5{�1Dwb�-�����U|�WZ���|��X�YF�:��?���ye�����_I�Z�~�x}��	����y��
nk��rHH�<�?��t�v���������B?2�����vA���Xs3�,^��KT�LTk���XW���D��g�#4���9�u�b�]KA�)��V��������Tp�����a��<�]g=�����e�4wL�������y��������	�:%�8� *Y:�i�R��t�9�:@)��=�p5�+d�`��bY�28�����TQ?z�d�E��*g����+��q�V����
�n�o-r�Ux����0�QR��9��r�����F��|w�������PCb�
8����>�����v"�]�*���U�F����kc�Fd��]<�E$�2��@��`�����'u�(��1����)VcqB�I�J���"1fK��l��d�������������y��
$q��&����+����,���m��e3^�OPm���p ��CeQ���Y����C����PR�T���p��v<
,\Fq%��$"���@&�lX~��m��vX����<���%���:[���`��^=W�A&��A��S�y�QY�+K4� 0��%T�Dbi����f�/[������`�8�Q�7��I�]4r�4��9�M?��Z\���L�����d��-E���suf�hH0�:����w�:�]�5s�R�����Lf��9�)���B����S�;���9�w����Yj�B9�/���K�����yb���t��o��L����{�����c%��_�[g��P�rvf����k�Y�g��fM���f[�',=�z���g*}/
���d+��1������],a��������-��|�!*Fk���Q}����5
�[H,p��U�.i$����]`6����^�4��x��7I[su�����r Ys�q�`
�u��.Z��������:�i�E�n�H�#��6"}YLI2�o�i�`)1���������<\�=~~�>|�~���i����Y"�����Z�l4��Q<�(o2f���+�QIj����&�I8��U�������W)�z��?����E����<?�o6Z�7����}��\fS~���+���h<��5��Q���j��������6�e4D)GI��oh�i
��"�����oj���9-|�,8��=�����}=�7�	h�v�q�S�N�x
�w������������r�<1���/�����bf�w�ey��a�j��f��P� ��J:P��(�Rh�*P])��?��w`�Ff&H�nG���:	�P��~Z�����N����f���\�>�q�����b�LTR���lm12����� ]9�h���`6�i�lE�k]I�
9�Bc���������#L�f���������\�
�3��D8�%|�q��������,��r���e�X-����
\Yp���b;��.��`�H��;5�?�]����2�,��F�]b;_�:s�������@-��������0.�y����?P�f�!�q��5N�
��y�x����HI���y ��cS�%O��a*K�5���%����F�%���HQ�1W.�����H��������D����l���Z�'����)o�T��4lr��Xm��J���L��n7���(�pzG�,[�Y�o���[P
���F��N�*'qI�����,E�!���{D����: ����r��0J����Gl
�nUU�Q�DZ��ie�q����'j�����O�<�Mt8^�����+8���d�i�]m��~�{������:��i��4��L�:{'S8{='����`k	�/
\�(3��#[ �����N����d��IY�r�]�_�����WySg[��������Q��S)E$�]��:��1�0�����u(�V s\T������h��K&��)�x|��E�#W9�sU�_��-�������}�c��Kj������cM"���`4�-���j����M�gj��_s��+��e�d����UA���U!�d�`(!��!��&O�d
��;K�7H=�������T�[�S��s�{�k�[�ja�N�	�������@��q.Yc�0�2�"V��00
�0������������I(��F����6(��>� ��_77_�f����'�.�#�X�	\�P|!t?��������c�4��Q5UV�$Lp>�|��M���f��E��8
������)�>%���]a�M���*�I��a��Z'�)�0�pn���4^�#�La�������+����RX�F��9�$��0H8<>)������Q�2*0"s���d=�oY�6�t���"W@�C$��Q���,���LAj�<��S*4 `K�x�I�/�(�?l�f!!S�W��"��(C��(@&�0Q���'`���J���;�CR�o��6~��}�������:�S=`�7�6��K��
������������	H��7}�^����g��I�e��2���������9?��7����K���R��
��r,��>b��	��9�Ol���J���p���@A�'��#��|4�PY��l������Kf��/���4�Z3i�N���T/�(C�q�����������JT��N�d��H��q���$���)���G������
 ��V����.�����b��X�|`~-X�9g�Z����X_?��<Ml��jV��g�c�`�V#��A������aU�e���������lF�u����Hk7}LH�|R�gn���Y��]<hf�_Q�H�V�Rq�4"R
Yt���+A��g�jX�U	�����3��W(���A_���O�~��M+,tY��I|�qw�}��Q9��e����=��R�����2d��Q#�n���TX����7��+��.z �6z�y�����n"IV]�B��"{���p�.�XC����"s?rPd�$D�DTM��a�^j
�������
$�#����@���k���� ��!���F������������O}����P�����{qU���8�x���fGD���y}�y������������B���v�'?Ic�Q���q�+�3�j��n�Q����?��^�|��N�77�#$��F�����=���?]��6���z���]y�C�����YJ�;��I���:E)�����|�����W�����n�~�y���D <s^�� �,��J�`?����g�#�1��'
C��j������'���nw�#���a�*G������-���Vo1s��f���mn�gM���)P�~�5W�i,�n9�$<�j�)���%pwy8��s8���@0������������>�?on�������Py�q~T�.�Y�T]r}��w��/���s���� 	G��$:]�|N���_	8f5F�*P�9��<
a��n�0�U}���V�J�A�!x,u�
2�Z�VW��U&~�tA��0�Tx�I���h#04��i��@~B~H�l�����_�vZ.$A7�<9n�Qc`�'N�
dT��Bi�Q������$�[D1z��qR�/��	|���j��%L�F@36
|f��7Fr�n��I����N�����S���W���Q&��r.�*d����$Q:,����B�f�t�������0������0�C�s��9-��	1��\e����������k"r��^�V�����W��Qr?�c��d.Q�"6� S���(��O�X������%$V�B��k�`=9a,��Xo&��sir���,I*�@
��^�}�����
�OQ"�]H�GX����������st<�)�H�����e��c�z������$u�^@����m��RHg_|Yj�k1
2V��?�IOro�Y|���`$	��x���s�Z�s(TK8B)B�'�b\�t��hO���?����'$��Du�D���|W���!�{�+��df��}�d���a�6���4���xmLD��
���$�;+Ze�����u$�6���QB��RA���5������SL���x0�8�\e.�Hc�E)��21G��}'��U�0�C��U���+J?#�)�zct\�pBe[�e�(!�T�5:���h\���[�-}h\(����;���l�,_h���n�_$�~1�
��!s<���7���O��eLW�}r0�x.���u��TR3.���>LT�a���*�qd�����W���}��5��'�lZ�@������]�2OG\��(��U �G�������x�C�~?�w�.��H$?�<�\�(Q��ug���`B'��p����1�vpQ;�(��Ep�.�*ayU�W5wpU#7���}�
a'uL��1��S`�l�/:x����������	AY/s�w���(n��{0�nJ���_�;�@��Yr^\�\X<.w�B���o����Ak�Y�{��������7%��M���D&2*���g[���������f`k�L|i8YP�u�\\����u[��qIWB�`.���DV��2p�F�(���2��[���j�+
B�������-������ZsEF4�^'X��6��e~E[���fW�fW�S}~�cvE�Y���2(b4�7��������j����q~E�~�����2���3M{�JlRo������m�7�Me�h���K5��^>E������Z���i�G�BX��[�0L^��#�#��Fk��1Z}���o��m�:�XfvI����8�l�4���D�8�Oo�	VJR1�(���=��yq���/v��J����A��=�Mm�rv���k6����"��7�����!-;
��W�iyE�m���8�������q>�]���l��nT������l7��� �VW�$9����W�2��).^��Ua?>�5y�����!J�4������6� �L��e��@��U<9����|t��W����fGa�$��w_�Q=�G����?a�B�5�������'+�>z�*���������-���Q��T6���D�7����E�\��F�4?d��6W0���C����8�~�:���|6K_�^@	a��Y��e�d�fb�/��if���L<�")M3���B��./	D�e/j���e�s��qY�T"vv���5a������-�T��<�����K�u�������*�	�;-&f�B{3I|Q$���,@�y\�(E��v���&.{��B���!���������]��������T��Y@�u�����y��|��?�s�%@���1��v����8�D<������������N�B�0M������*��r`F��8#:�#������������~�RZ�hH-����B��[ ~��T�������}�������Y�|�\o����W9�:E��ci2��@8�(S8+�r,|���Y���A9�$�3.G��0��nO4�^������O�O���
����9�����A�3��-�[L����wf@�|G�D1�:ij��otF���d�n��.V�yq?n��/����k�A��	����8{�y;��q�����9�:"���2p�N�&x�sItaP|��js����}��cy2^�dl���E�;Q�����'��8dL�E��dSm7G��t�
D���CN[��eb��\0F����)fN�!
�����qQ�c4+8��Rr$��@rBN2��e���4�&g%2�1���b�����@5~�
P��2%��s�"�*�/�4����\���x����=CE?���5��H%C�Q^�c2��lR
������dv&�7��B�,"�&����~g�����f����%I`��?9[~�hJ����z��97�OcK�����n,��&|_OQw
�(+c���e�!@���O�o�Y��mn�&���w�1Vf
,�����hC�U$3##cX���Zq��+���<{�C&��/\��H�DC�h�Z�jM�(��vF��,N�;�&�q"��<�K11�1t �\�w�6@�"U4M�n��7�^�uSc2{���H������:B�`���8��~y��.�������!��_��w/�/?����e�!���o^���I`#�EDq��G^�-K~�Jw��Eb}]��������=l���S���v��W���,��2A��AQ.\j���:�8U�b�4����-5�EV6,��
��B�������~�G����$dQg��l��(h�|����5���W��M��=3z��)v=K�u������ g�
n1o��%�O�����R���fz�l�H6|c�z���n;j�w�-,�y2}j���a7��g��,��^�����L!$�uSN5�f�-�����}�����y���d��<�%(��������4��o7��s����[�3�l"
����~h�+E������������duJ��T�����$�cz���:�����8� �X���o��A�����������SS���]�
b�:N�|��t��~D,��1n�rsv�����T~}x�o�]9L�k�n��2����]��~z���{y��C)�@�lw�y8�������w���8�
����w��q������\��	NH����9�C�N1�?}����aZd��������Q���e	�o��/�, �>`������^��<�=|0�����z;�B�-�F�s�(� xd�2���������~��t�w3�])��O(��r�����!P��2@\�i���K����85�}�~e���*����I_�0�=l����%�X��������8�cn����t�z���k�	�__�Y�%��2��rbr�Hd�:xQ�$������O���O�*���_uzR��"I�q���Z7��{��?>^��vO�>f2�S��H��N�����`����c��KR+���c����>,����~t��*������q��aZ��J��A��1(�8J����e�g��P6�������G�����a����w���#tZR$��I#��B��)L������U���9�[�F����d�}D�^i.&N����O�.�G�: �w1�0�����,D ������O�YgR��I����
�m	SL����"�i�B{>������i������H���-��k�!�����GaMT�w�P������X�z}po��~���;������C�z��O��)�����������?���WYt��q�o���D���2;��|T*a�K�c��h�j����h:
&S�����T�X!�,�VHtL:i
FR(������@�=/�%M�g+q��B6�TJG���_y�����L�����E@��cp
@���J~�D��OK�q�
�A_�L��pca�I�0l���&Q��*��FI@����O������*���T�?��|�T<r�A�>�7N���F8�T����#�<���R�l�XU����z���2���h��3���4^3����@��k�w�r���j
C.�����(����@������������U-e����g�X�9��A�3��/��@��.��e��}�,S�{�i@��#������GO�%r�(lw�=�}wZ���
���|�X.C��MG�C�&#����>�=�mX���g]��@'v�����_7)��c�F����3����T:r��7���b]
�����,WKO<�Q{>2y���}����t�o{o�@z��3����������w3�=�������n�Xi|�w`����1������F{:l�R�
�.��n�~���2C&����jV
��7m��3�[�]3-��y�b�!���B��>�E@���c�E[4������h��������������H�:#�V�#q�(�zJ:�{�877�bN���#a<J��:0���p{��3/�i�&L��j������c 6I��^����yN����a���0O�����tw�4.4�x��|h��p�!��b�6��jR������v���W����Ti��i��?��d%,��@�+J�D�d
���'��w�)FgF�t����U���Hl01�9p�����p�B�{��;� �b0���� ���s2*3\;@1��[<���K� ��`���@	������W��M���������D+1Bz���s.��O��n"Q���N�q�8�B�Y-f�
����DT�h�|3�!��2�74j=.V/�����V�duA����^V���b0j12��y���1�b}�~�uE�w.����r%�3.�Up#�_�qr%�A��i2������������v�����E��1a�j|�����v��P�yLB��J�v��j�
(�wU��:��^�'S0D�.�r��<t��0r�Q1}�j�L�7A&%\@�����FE��@8��S��B����s�������sTu�M}�+�!�����G����Vgt�P�q#1Pl�k��(A���&4P���������h+�7�#m�8+��hD����,�lk]� k�ke�A&�	fs�rW)X�O/H���T�[O��f@�b��!�����������[�J!�o�<�B]a��K���S���Y}�a((������1J�@8VI�1��@�@�*�,������jf��"#����bu�d
:T��*��/?m� ����LSfSB��LX�����?��(�n�0��,D2�z�$:��e5FJ���S�*���j�����t��Jm[
��SZ�������t���M
@�r/�k�{�����9E�&lWw8A���6	�B6���C����V�6&d�*A��v�A:���J���"`��^J�D*]�KC��/%��|�K�8q)�����G7��&�����u�4�����U�l�PP�����H�.����~?W@y�����M�$l���O]�s+&F]0��s����`b����.���q��9��O
.�@�5���������qAG:/���m����8�S+#M������,8�~����B���
���C�$'�������fyf�uq���^��������d�r���t*�\x�fT)}�.&n�g��aX�c�L�����#9������B���	��H�x_"�T���`����
�@����4�{��r�(��Z%���nh9�]�$��\9��+�&bI�0�v:���U-��n�D[���J�!xC9��\�7�xF�`�eVZ�4JW�:`�\���Q�>|������]+:�t���8v�����k�EB�x���Y�������
+F�2��b��Lgv&`#��W��\�-a��|TD���U�����B�0������|�����v�J���X��G���e���0�8�d���l�,�E`�;��Qa�j'Z�}mL�e*'O����J��qI��(���WN�F���l���Q�J�g��U�J�n����Z&�U�����������,�E�<�g���9����:6RN���al�����S2��9}/AE��e_t����x8��0��d�1�Q������o
w��P%@�kbY��r�P�T����UfP���(���+b�������5Ud�js� ��9!Z�N����ONN�>�U�<�m�5�tt�*�r�'HR�u�����y�,"U�`�����B(Op&F�����0�����C�p����P���`�t��f���� ���?�N��b��M4[����|���8�	ot��������Q=������Q�v��b����("����m��|��q��c��,OzIx;�BwAZdEw�
�!�K�B��Ip��H!��A��l6��a@�����?8)!m����v)>���K�T7��`����p�AS9�Q� �Y	�EW��� �c���@P�!�a����K������}F��Ya����+�xd�,���F�(�;�Y�$_
��7����������<!So><.�$?�	�_[l�%]�bG�;�~����GH6X��� 5��)}�\�&�+H��p�q�|��7S����`�x�L��u�&u��?�
�z���e3�>��v�P����0E2j��;r}�g��x�����lJ�&�����P�F�`
��p�m��w�i&YT��c�ZU����Dq#��BM5`L1s
8~�����o�%m��\e!���!7l�r���0x,W�6�L�U�l
t�@��6BN�;��UW�7opS���<���p�o��s��v��~05$�}��/(�����~q#����-bP��c�Ht[7�H������@&����Z�����hN]�@A
���^c9ML
0�/�W���H�d������������\]m��U�S��K��������o��~��w��~����a�S�L
	�
��B�]Rh}u%{��{<��Z�������
�x+fH��^=�����o_x��#�r�f�:�`��
�K�)���:%�HW	b��c���;<]�\�WC���������&Jq&3o�<.���t��j�>]9��q1��d�Fg�#G��/vV������P���^.������r�(�x~�����04�_���
���o��8	�^?�d�^]i�+���	���j}cE��%�����e��d��A��Y=?;���q��~��b\��&B(B�������(	�'�(e����0�Hd�����i>h��J��g�2#�@�4`����"���?��+��+��$��X$��H8��8'�P�z*�w-%G��$�U'����s�����F��"������y����`���(UU:!�tr��~N'K�tl�� o��#<�d��D�%�3��[��g����eNH�:C�P0�W�d����_W�\z|}����������O�O��������
xsY�7���t! ���l���81F�"���7�PA�lr���xN����m���@��Z�!Ob�;C�b������VT���#j�wx_�HS�bx��`�|2�e9�?#�������w���!�B/�!g
i������n��/������\���ZE_>>�w?���9��)MF��T)����=>�
�4�����:z��_��v)A��l)���~��aG��������\e`��kL��,s�tQ��4�&���S����)a{�Tw�^�*�T���	�����>�F�GDf�eI��r�?��"����E��"#d����@9��r�NXH�_�2�+�7�A#|�����Sa���T�m�R�6�PrDf�4�$y�>����R�&S�G)���D�����IWe��0;�F�2N�c��?����Ow]�Uw��}!UCPM�?�EL^�<��^�D���&"���x_~��g
������&x����fO���`��
	/�_9�rF�V�6X��"3~O���E����gU}
\�����(���^��-e�:�����gV4��x4����������D�-s�C&����C��.O�^������I�����tD~%��_]�~��g!=�	1c����	f���U}B�@$�D����b�#gS����d��eV
��YS�{&F�K���!P��R���Kz�s�=���sl�T�a)P�}
�O��n{��/������R�=8�k`k2�������e::��6"."x7z��lzI�]i<�p���2K���3x��t)���
���'�W~�Y@w�<S�������BDT��"z!��Dzk:rC57���0�,V�>�a����\��'�����������tn��#�/*&�S�q���2�T���~�
7�v��:�.�4\���L\8JVxZ�C �
[5�m���
���P��2���)07d�>����+ew���������0W�dy C�rub#���gZ����L5���w�Y�3wn��V� ��3�GsD�D@��G��D���?zC��>�'8�!���rE*�q�6S�bE���h���I3��D��6s1�5;w1qE���b���wR��%j�J��P;
��Y��A���49�%�FpbTu�"��}MJ���&��74�]5�-K�����"���A�P���o����;8�}R������;*�E���)-��O>K��F�A���n$D������K�g[�0����
���,LSRi<Y#M�Y�=����V(�����NA�r�C�X**?�*�����
e�1�O�[Gd����i S;|#W�g�J������\����-���R?���Y1SI�����q�Y�'�GH!��qTtD$�P�:�K�A����F�����
x*�?#��F�$k?�n�0rx��a�sg�f2���#�7����s�W�0���g�����s��@���f+�8.��
�}'��8�@��P����5��?}y������?��|�s��9n�w�����������������n�_ow��<�����#��eH7�F�S��
�8F�<�
Ws������p6y���	8 ,��X��`}�D��p=�2'�C���`�&O�%O5�+��.:2���4���
.�tE5�#��u�m���qh���J1�:hF�17�0#"�7!34�\1�2wZ4jg��@���.�.�(��������z��������FP����h1lAS���_>>���w�/����O/�U�g�i��e�5*���Z��Y�.���<^cd�|�vb���z���T�ho�[��/a�:0sJ-A��B���Pu<<Lc@�lq���b�������d|N��`���F�s����R�1��%�O������]�N�O�+��
�`�����=�r����&��/���	�*������P�SD"��C����<L�������v��t!�p���fVM����f� R����uGI���9��&��_�4�R�J�?�~��x|����w�����1�y���
\�	�%��E���y��r�����Th�.� G`v�e^+7����x\�<|���?�<�o����_���/�����[:pq��[�$��_6
N�"���16�R6���~�������ibk�P���%�����4C��F�:�}l��uv{b�q#��|Y�'����b�ZH��
��X��W�gI�u���&)9��0F�t����x���lg�mr4�l����G���\��OZ��F�?���������h�U~N,���O�'6�56?������������O�@��O�U?O�v%����������g�����[�7�#����/��z��rz'5H��G�i����x���tv������>��w��[W>���;yj�!G�F-rr����d��n������E�ym������|����B2*�����~����_n�4������\a�
�2���Q���Qxb���%�z�� �K�8�yA1M:���F��� ��M����.���~�pI�����������@����tp��e���8��J5�j�y�M6�P�0�L�p�t���i��3o����y��d�^�3Jc1�����`tt5<*E5��w����8����J*2��EX��F�a��������N��%;����yU�R2s���kkJ���"O\@���<F/�b��0��G������rj�W[�����x��pJ�9��sh��F��;���bv�I�5�u�3`H#�dK���[���b�"u��Q��g��Vk�����B003%D\Hq�@�q�'=�+����C��2yFa��I��:��Y9Ylc�`)t)�U��T#�)o�rL4�4������Iy��ndbQK��J�">-������2��0;���u	�����|�.�tsC9['���[�K������M@��'cN���qa*f�R�����@�M��F��8���>��h,�=�M��v6s��6��'�1G__��K��z�osW	����v�8��A=ssj�4�L�z~p�z<�S�����_��-��d���(���N����*lso�@�v��:9�g�p����57uv���1w���I��@PF��nb?�d��js��q��b�m�SaX�,r���M�"��V�b�!��������N��&��y�b���/�t?��Fxh�Z
a���EM���j��g9����0[��&�Q�2s�
��U_8��o�0%��/�9�lf�f�1��"-01���_j�G��K��q���������G���P�%?ht�BpU3Yu�+�7��q�bZ��e����z���c���O>��S�f.����oBk�V�i0����F���������WG����@>�P��R
$.�0�����cM\)��-l���(�&���[��E#�0l�{�-OG�9���c�4�����)0��d`Cm]��G	�S�������_�j)v�!B(��^v���m�7����h6���k�-��������L��g�
{�j"�L����+iZ�C'm��������%n��{�)�������d�M��`Z�0;�%F�<�����=��M���RgH~��H���p���Ks_�#S'�.r���0�������_w?�W���q�(^`w�����G�uy��
�nl�3���CJr��M�ac�A
7������o�?���D.\P��'�y���$�}_���@���`�e����������tq��.���:�U8�H��ui|�p45�{���S��O9��/N��2D���<���
J�8����q���p�t2�,>(�������;�rA]����������
�����~k�?ek�x��RJW��gk�������}qK��G}PF��n1FD6��l��N�����d���(��O�����A�"��H���j�����w��z�$iMp����I�hq��8L��.�\�����\6��vA�w�3�l��|�)�:��f�M�<�J���`O:�Q)7@�7��h6r�J��U?�#�*q!������|^��h��:?�rcM���]a�_�k�W��C��yup4a��'aA=��P��%�D��:�-�~1�+�����K��0�5d��>��������sy�Z���$����f�����G~���taJ�t@���y|�q����H�!R���H��U�o�(�q��AHZ����������K�)���gE���.��e���:��P}YS��#�dG	��H��b���5$���P�g����O�?�S���:��3��P�9b~�A����i
p�������hS�2�$
�i���E�P�<s4e�W��D���s�q���������|6*~��;�R�l���#��	���+*�)�y����h$�]��"���!a��>���C\�����
QtoM`��;"q�1��E5�8D�fW��?�
���7��M����z��K4��4hYk	��g��0����i^_����,0,Mf�X��UkG�U�K�0��|��������"�0_zG�B�5��C���_����p-��_����u\�aUHTYPN��<�;���sX5�"��O�Bn�.�����,1u�����������2��o9�5�����?b4�(�MX�\E{��}����g�iCj�j���q1q
�l�v��a7n%z�p�@�+(������=V��5�68j�]a�V,!NP�"<@O�"�j�S6m0������k�V����0����A��V*"�4�D8~e�p�IT5�MyO�J9�k�Q�������i{���Oo���	�Q�����x�V��&e��/�����L��m�K�c;��waS�3S,q ������O�Z��0�����<��������z���*u�@�-f��]P���_�K/���*�7�G�0��9�.Xd��]�Z�@���#��M�G7�n��3�{�X���_�p���3yse?k�U���%`�C�k8��O=I���o-<L��=|�4�@����y�o'����4R������?{xI�Kc6���+�yEL��%����������+b��m�EM�+$o��K�&�JN��Z����B���bD�T�����x�
���}��������x�a}��������]A�5:d�P/�6/��0
q���W-�Ma6�l����z��vu�v�������%�|q�|��g�:E�1\AX������a��F�������w?�@���y�ye_L+���h�g�q���W��N4��`UY|�nlT���#�S�v3�ha'Yr|��!��Y2��x,����`����o�gz�C|������q���������M�
F���x�<��k������mu~E�����.�����3�g���8�K��7�'�
R3c���U'���n�H)-�MfVW����9�u
{	j�x��:v��A�����X��/�H�n7���M��TIs��b}��3J6.C��]���B�/��B�AGW���U9��"]l�h9���-x��4����wR-kq�;u{� �PK���/�����v��#��f�k�"|9�S��F���9����)v�msQZ>X��� ��>o^�T����������w�y}��a�{~���BD��~l-�
�0��}z��}��
!E�_|�8�^���E@�C���ag�#��$��jT#��������k���I��4Y8L�)�$'��M��C�Ssf�V��
���@��m���=8����ntE�*���;ag��I��Kv.N��
��h�����(OSp��C@�U/�I�&c�$�A�c����9����#hTp����j��r�H������U�lR��e(&|���s�tW�a�K����(��A1<�
�(T�,Z�G%uN��vb�	].����bA�[diW�p\y�c2�3��D������G��q{G#��o�U=�"9P�K���q{w����w?�nF��;�(&���x��<����~�������^L�e�TfQ������L�2�hW��q.��7���+�@"G��3}Z�e��.�,��Co=���1�oK�.�Y%��oQ�����\�M�Z�h(f�],6V� ���)��N��aJu���/�,�p�|����Y#��%&��|�����.��sxq�T��8�4-6�#�\�M���h��2j�u}�<��L<�IH�c�����,����-L�sP��#�<E$:�U<Od��I��w"��#�~B�u)�=��C�]n��o���9<[��!��n,�^k��,�6jQ��r+����av#=S���F��6��G��Mr�)�]�����m��H��j��l)3&��
;mv��)��mxP���>����zvSj���Em$D��,"�F������H�������y������?8pl%W|�S!�sB�����e%������w4��:18�i2�\q������}}������h����.��R-C��K�������1*������R0��%���\3�G�K�h#�$����z��0���@��fl}�L�gE����J5�r�N�g�g����!KGg���w�w�_V��*-YPp+���@T����8W�y�Y��Y�&PA�,�~���P���cF�P9W ���G��#�������T�ga��n����M%���R��5v*����.���������;Tq�a���
?���L,�9V*����r7::fB�z�g�������
��6#��?�A�z��p/+��df��.��:��;��t_3��gr�����P��,f[�q�8[i���G����������b����.����4Yr��F���r���L���M����dE\��������ROt�����RB�>1{m=k:���	��oU�E��)W��X`\t�2�"f��P���8�����H�W�������qH`����D��K�����J���u���f�����+�AJ��G���Y7	Y�@��6"��s���PJ�!#��Di���F�aZ�X���Q:������=�@�CZ�*�E��`t�)�
O�B �}��()���O��B6�Z�&3�,�i��w�������ywK���2fVltl���Y�����l���*�'����{�����s��^���;���uF+6h*��OH=<��d?���a�h�z6��Q�v��������VM��Y�����o��&��u"�y���������\��+���6m��;�	����'�>Z^33	���)�J��g�"!�w#��rf�3�+GK��'$L\�
�M2�Q7u;�f�������^�����Is:Vz�]����"D�5{�[|������Q7(9�F��j��@��_KV��2q�`
����|�P��1������0�27�f~_v�e��,y@8X�&���@>s�B%�e�h&�SNn#�)�P��e���q'��.���N!��'��L�6�����1�I��3��L`���1��N���+q�s�����K���[�H�l��������_�)��t�r��w-�����uX*9,��&1��{���J������y��nmTXb�#�J^������5�S~n�%
�@_V1������7	<?
�(t�������B��i���:R�	���fJ����|�A�.���_l�i���i��c"!=�oTB����h\L��s�Us��z=e}���
2c�=N�U�9����4�
����5yV���
v�<+(_�T�_�}m��C[��=����"s�D(=�MXh����S�t����,�%q��RZ0��['� �����_��@nXJsB[s�8c����gB(��M.8�[
"]#�-��������X��t�����S3R�D������>o?}��aU�uR��������x$�)p���)nI�3I�.��������������fw��q�(-i	�4@!�R���cI(��F���<TS:&��T����<�()�8�%	�������<O(3]����ER\`2����k|����{�����Z
D
O���	[~�_;>~���F��q8����1���{����y������`Qh�����[�4��F�+���P�p�_3_�i�iw���,�������������=���^�����k�u9�0;�P�$Y���+|�iu�o��YO�`	�������
,�2���U��`��"��H
�
]Fa�^��b#P��^G������a��O�''��Di��7\0�����,]QJM�[�.IXv��*���E���Q�0�u���:H���LpO�O^�~���UQ}=_?���0�_���7Q?Z3r��X[6b�x��2h����em���g��p:�����]��\a~� n���Z�����v����p�$-�.,:�H���2�m��F���s�P���;������Q
�����.W��<}��&�d��j�}k������X���#���F��k�%2�����,�3o���g/�n�Atk���*S���b��<EW��*�f�
���%x�������K���kh@+@�%��w������w7����7L�m��1)ox]��I���3f7����[,��$�B�tR��o>��r����3�6,�=�1���]I�$=���<P(�����[��=3:���)��r����"�I���m�,�a�^�s�j5�\��������h�R^��L�F��>�f��X[����v_�sZ������b�%������VHy�MU�o������!:��p �#�D�K�e����v���\��M�f�7�8��F�PV�G:��O�xV7q���@?-z��w�R��`�W�cB�
�%���}���o�"�%���W&�c��/N��wQ��}���i��_9�5\��c���I�J�Mq���l�g�D����4�^\����Z �t�.\���V-����y�y�4`(�o���{���������<�U��R�<����q�����3�Ic��#�RAxy�n@+;i"�� v����������4��6S�zK3j���<b��J,�R�+������iI~a��
���(Tp{�&���S"��������+�L�'V+Z\�R\R+��X9��a����[UA�z�%�]

���tD:;��UY�8�|A<Lw#�o��F]�e��Q�`�'���"��o5�v0�����@���n�"�Wp�g�FE�F9$MG�Q%�7�"y-�n��
����#P��+��9�����&���O�����XV���,L�gr�3_�<E,�u������D]�3��F��� t�	U3�H�m����>\����D��T��X��qt��5O�P��\Ww6���0�<-{)#j��@j��}~�]?>���w���}+�R��~��j}���6����&����&���*�'��:���8�k����$�x;?�7%�����3�xV��'��q���R#oNk�a����aa�s�z����,�U2�l�s�;N P2�=�����w�af\��;���������P&:�M�+��/h������^��VE�jv�fa<5���;e8\Q-����o�n=O,��0�zA����	6���o�hP�qR�#A=Lo7-5H�!c'@���r{�T����G)b]����L��a�P���C;���������v��1\`&�K���@���J<�.����D�IQ�N�9
~Oy�h�f������;y��6�#i��g�r4L����?���i���������_>������������������m�p������������-�u�W���F�����vw�g`��z���k�������J#}2�"��LF������d�8����	8�y����$j�:)�-�9"6�4�W�h�s���;�sk�[Tu�L`��7>�l��)����ce��5��F!Y8���+�n� �i��*;�/������.&f�SB�f�A��"�a�z��7���k+s��Jah�l��pwo�P�$;��8F��t�(m���F�x��Xt��X�U�����d���������6n��B���0����oq����&��,
����&��x<����}%���!I�n����<o��Mh����D�
R�h�)Cs����wSe�t�kTP�.����v��9Np�"*�,"�O��;��!�����q�ndWb��h��}�<1�a������3���2*�{vG��%
���%��)x\c�jt��K?�@�eQ���q�$D�Jj:Ss���h�_��F�����YI`��t���Bc���UG1�Jk��6tsCr��o�� ����y���2f�`���G�4�9Y�:fF�R4PN��_��yT��n-�����$:=�?������ZV���,�?������$9Ir�`|p�<�Z�a
�r��g_��#{�oH��b�����!.L
�m3�j�M$�R�)���
J���gA`����\��Ha�Z��t���Y����@_(�w_��"�z�B-PI���,����%�
?���m*�T�zd��y�O)1��D#�33�H��%U'���������O��o��`�&�pd�i��$�1sNc�).z�	-�~��
�?1A�-����m�D|���,���;�'`,M�����\�{������(9v��.����
������y����'ow�n�yJn�`�n��~��[Wy������y�{x1P|x��1��Z&��N��(�m,Z{�����������3>��;������p�+1D��C�F%����b��JJR2(��2����x�+�8��J\���zCN��:���1'�K�h\k�I��4�'B����	4�@��a��w�/��2��6
Y�.�*?��O��)S��q��~N���������%	�/���E�JDR1��4���l/;�s�^��UB`~��������j9IP�����p�������U�����Y
��������cR�,Ys�S;��F�>���.#��H�����J���.�qAf�f�_U��~�_�����;T����
b��;
���4	Z��d�����Hn�.�������e�SL��A`����*1tJuL0��tZu%�5B�F��p��'���V`M���!$s�>x$���rTi"l�OE�
��YD]On�B!T�3r��&�2�i�?���'@;d����b���O���2��[��FA�,�"��68�)D�v�
�P2���9���������A���W��\QP U���
JeVZX7�:�f�rY!�v:���
��dS�"��O�������h�_����u�u��y>Lr��=.y����t�0�[k|��z*����x
_@D�P���;��}H���;�DAK�w���bJu_�� �:��4�8��_6��)���hC������.]�2�y�Z\"��JV���r�x���m��@=FB�����")�{j)���*[�GM�3&����
�w��k��xa��b�wJ�J���N����p�/\FQ��R�Cfv[����[5`��]5�N/M�dKH��������}�K��r�Q	fF.(���	Vc�EJ��.����b�K���6�|����C!_J����%�:p-9�R��!IW�}+m���eqja�z��[���W�dA���3��Q��(LMu/��n�[!��"��vC�A�U��
t���*�Q���F�#��)�2J1,�?��^ g�������"E<�G�j���r3�R��-8�����o���Pk�����B�o?�E��;!�J]��������I�.{f�<xW	���!�V�j��R0��8���Gm������]y���@J�||����ok!��3����MJl���J������������}G&KMybE�^��K|$-�R#�{�o���<_��G��Y�4���������W-�^j�>�h�S
��\gsv\uP���F��
<��t�!��c�,7��')����3	Q�x�q�f9�����t��S�� u�F�@�8���f)����LnT7����D,�}�N�"�tB�&c
�G�e�8� ��C��m�6b���)S�W����Rf��?nn�w�}]R�������#}�H5������|�g?�|_J�x�����ZX��/<����F�..�J�#���;���u���;���Z��]�u�9����J
��r�O�eahvA�i��B~��/~����t�-y�(^I��;����t�����H���3����4n�/'#c��-�!����/��rY{)g6����8{�������QS��X�W�-���|�7��QNz����z�����3�06���������'$jq,�`�0�e��L(�g�Q"�
G�, ��^�]H��6H~�pw�m��cO�;�Z�\�O�?���{��J�u�B�+9r8�%�r�QYiY����j��c��R��(@������--�P7����0I�a@�7��}���}�=��2�wn���4PF���;����(?�� ��5Pm`/F<;�%��[r�yQ���aM
;�!:��E���4��q7XZ�t��z��"�f�jO��9�����hqR(���Dg6���o�\�]\��s5�t2��K����� �\�D���	���R��$V0�����n��������>\�~��x��~���}���Fr&�o�_<=�����#������:��T�}����3������}V�)*��JWsS1O�����b<�����e��T�Ob�,�������I����n���r�h��@���3�'f����v���]i����9*�LkN�'� EJ�WJ���{1s�Vb�K�~4C�{g�=�6���>s��T�"J/��9:I�^�OV���u��r��+�g�e���?M��F�4�v�����F�,Z��x������I���[�qk��Iy�09�U��mRC{�f&�����������g����O&��u�]�J�[�����/<������f�e�72 ��Y+������.��2���`�����i�����h�u����9��H)2����0�8x��X

]
�T�F������������#��@�tJL��X{��|!�Wj&<��];��&��tE]���2�$��]��(��Q��p#X3��'D��'=�I��6(��u0T���u\�^u��H&�}
mw��$v���������C�:�M����R��xp<9����0��;^84�5�����p�+	�J>�FN��V�G+[=�	9oR�y��������]o,����.�zmj#Mz��&��KD����'����v*�x��W\!>W�	,�t}��q�R{3J%0\���(��f��00���<����8��q��Nd�%C���T��{GM"�Y���F5n�S������e�<��yAH5V^l��;������e?�����
���l�U@��@�dJl
�J��R�J��'v���J-�u`2�����uN*�D��a�rqq����0��u��>�<:D�� �E���FQ���(�-$�,x�G����"����	�:��%=��c��O��agI��N���oc$N���������dX�R�Q�<����%s�8��^�Z@ �<^�U�BN�19<�D*}����0���%���@��I��}b����]�@:������i�4x��.>@L����8U@�ia�i��+]+�@R����Nn�0�$�AI��Uv�4J�)T�\P�9i �x�"����"���G�7,�i]+O�r�A�L�qx�����S�\�m<�9�Y3Y,P�%�������k�e+�y���6,y�R�����$���]2��w�4�'����xZ,4vN����w�[=B&�oQvY���&�V.�d����[X4����HP�"C���Z6$p�M�t>���YO2T��m��`�J=��jNq�f�q��n4�H^�8������I������?��c�	�b�.�b?�%Ls��nW]����Z���?����TK+��)�@? �M���/��<���7���^�;X������2#��?���#ntS���!��
9�����h]�:8m�=t�O��S�F������'x}�sb�3`��x
Ke	��B��<6��e7�Q�nf� �u�/��k���"zk��?���|�s���+b��S+l(�x��7���<
��H^�q�tx�����+g��b3��A"�$���
�Q����bq=�)S�s�*��"u������_}���[�����������xjs0�76������G��s�~Ca�<���u-�#��������@}�����������D����A� �P,�J �����!r+f�qB`"B���K�e���:�t�S7�6���O�'O�"�
3�	�p+���(>B������5���Q�1�C���s�E��]����b�D�b���XM��������������O-���3��g9�����q�����;}����3��exP5 
��01��w�dc���)/V<?�!}��Nv�����z�?���O�7E�J��������GsQ���6���8E�6�����d^y��%�b���S���[�E�28���h��9������������V���o�L�Z�P�J�������(�82�.�*�B�1��09I�c����Ap�a�f����l�%
�������9�

�&��j���D ��/�k���@�������b�G"�F\B	HNq!b�I���d@ j��3�IiS)� �]5�rp����w���;��q��r`���Q
v�����!m��C���)U&Vc����������U.>R������y����q������>�������\-Jv��o����j;%���K���v}�M������aJ��x������_v�����:ft)���oF�M��%���~�:`M���t�E�G
Vv���G��o�������|����C��������#�Ia2�u@�0W���������7��C��i!��{��<'OX��S������+~��q�v�g�m}�&�B��������b��d��6~�����w?��W��(��n�%����n��7�gh�''��h�1��]�������v�$[����7��;���{f��z�(���\lH\\2`�z�Q�������i��}^���x?z��n{��>���L
�����������|P��,)>��i���zC>Zr���'��;7��f-��;<��B��T��rBe(q��,��?��*�"#R�Y�[
JK���,m"��X��4�>+�����(�\�Dn�)K����O��|���i�E��1!�/#Jd�=
b�!��D�'.����q��<�z%��~�����RAVRRfd�`�z����C�s1�G�����74���D%2�g}������< �N��e�2:U�0j^����|��_�H���8�������%���|��}Q��_�7�@3}���[���h�\������dk4������/�z���]���*{���U����!��o �����`�^_��
���s?R�����` ]�����M�������F@��s�s�����n�K���#-��ry���d(��v&�a�A�c���i�24�u�#(\��."�a1y�<��U,J�i�2�P7�VycNn8�>*!����o�>��������m��0�h!���Y�#V�� P��p������V���L"�j�B��%���R�?E�k��j��I��M`h��nh�m��
�81�^�4*�.��T�x��$�����$�g�.)`+X"'*�qR������2f�F���Z�|��"}����sRO[��L��*\\���.J%��dffV�Ii��<������\�I\,�/��D�Y������7�|+��y��Pf�9y��+#�G'��R���N����D0�Q�5U�Q��fj�T��_������������99����8�/���G�a`)M�����&!��.���;��F�w����`���[�(:A��f����@�N�/�0��������,m~���\pw���&Y��:��6�����=���':��.�2�H�<�{;�CY%�]P1�����
��$�Y��^/N��U|�L6[�-�5A��YA���/��]m�>��*�(�������C���(|�F>�I��j�4�i=�+�>�������u��B6i^���n�qA����TT�d�9��f,
,�e�<$W#��M�}�Oe.�`N�jk$�e	�Tg|�[����X]��e�-�������B*������������`�'�T+' C(]"$WR�Q�
����z��:�A�a7�4�v��/�����[��8^�����S����<��9C���s�D���T28Q%
EY4�,efT�y�P/�I�T��'��(P^���$�e�\4�;�mW<sr��8`���(��K��Wt��|�T1��PgNjz��I���7J�y����m@DR��)�2�Z���G�K<}�R�A�7`?���/�������/�e�w$0��������q���4�j��@*�i=�1�O��~����o<
�e
x���/��p�f�2C���}�C�����K
�7>xJ_#'t�4�Y�6b]�VThN��':s���_��]'�P �"$e����
��/��������W���5)�E�@��KA�KK9K�����_�s�A�0..��B71�
��6�9�+U!�K��S��(e�.�������;�m���x��J$z�)�x�8d��y�Bp���{%,�jB-L�k��F���:�FN���=bPu�p8q4t*��#OS�+�	�,'��7��>:�i��,��(r
L�����"��%�����VS��#/�,v^�9*'��F�'�G�9��9���%�}9�?�J�	����xpp����0�x����C�g�z����t���T���i�b�QF*������^3u���=��m"����ti����r�S�0��0!����!P���`��(���\�.QY��V��N:�_��X$W����B���L<�m�6�X���q�����GJ�H���-Rq��	P��U �w;��c��TF�r���)
ve�B�<�:�H�gp��E��yh���,N!�:SNv+sg*{��v�K�8:��'�_~�}�/V���O��%��������-�@9����W8���i����[��H�~%�y���� ��m�@�`�1P)�2��N��e"Ksy�T��Y1��4=\�8�)"���"�p]TjK���f��gN�,��&����_�1�*�4��'���������I��Q0a\����&�����]����w����YD��0��l����<C����i��BZ3F�� �+�h��h������p�vI�����b�g���0���9�����4X�����'OU"�ac�o������_�n,8N����s�3����Q�X����Z��B��\O)�n����7��O�!�1�@������7��9������>�A���m�����c���K��50_��$I&5jmT+rU	��P:��C�����-���|Gw��k���?����.��/�HjH)��m92�6������K����XG@m���>Lcj�~������k�����l����G�x���4����]m�-#��$�S�8�������u�<>��i�����
0��������c�����!<3Q��r<���s��WT��4��~"J�1�����K�� $���,���J�Y�sc��)���.)��o�y&�;���il��s���U�
2���=�����������~)z]e�{�����.Zgb �V�]b��f��T������I���}��`_#7i��}��}_��o_v}}2G/m2X��$Q)m��o�N��$1kjj�>��A����W�s����L0�-��I��!�iE��������{�����q	�kJ��c�L2�G������=n���p(U�.
Ht4��tp�����a�5�t���J�g;#��W|���S�zQ�Ig�#�]{��z]����������YT�5�Je��EZ��p�������f��r�>����9�����D���^o}��C'g������U���k�"�"dg��'���#���V@Wl�NVN~\kf0��J����������8�1)����yM���1��}�!UK��o�oP�t�gVp���\��Yr�4@��g�����9�_\N�,�U�8w�
��-[Q��P���n
%�=��c,fDH?\
�h��G
�������d��0��r�N���x4���~�R�T��P�u�K��Ek��9���bd2��O���I��=UX�3�f�L��B�$z�M������7N1B�9"��=���T���*����]-1�qs��i��fk���dAma���h�Q
p$�L�VM�0����9O����'ty;{�J�[�>;v�,�K&vU���i�=� �3�v�Jf�?\v�UF�/�t��u���qY����
O�����U��YN|eQ�����J�
�N�A��C[�NE�|*��>��s�$y�������j�9y1�)������
3�x����7�9V����|5��t���8i���Si�)h��m�[w��:�{�{�0�T����c�w^Q��T��.�u�A|m>\�eB�1�g��A��]0P^.�S�-C��0�r^'�'������+���vC��c�����kh�#d9�	E4P�ffL��
�V�/h�=�C�*I]�T�&���7��[��I9bI ������h��b���{yi�*q.�
���]i����f���*2��$��B5C~�'M��	�Q3��O���d���r����~�FVU#�f�<)����������n!�=����2o����4)����w��(�R\ *�`����<1��qe^p��5�o�$%�	pv.T���<��W ��#Q�Vu�K�iE�P?'8��:Uc��<T���M��2f��E��5�(*Q���7�!<�a���
�7�wG�V���Yo�4.�^v�D%�a��vM8+WYc�D�����^�b����DT�(&K����������_P�u�D�1��bGj��;���_q�����8<X�����6/�[��o��N�������0�C�������.�{����������8��e8����[�����a0��HH$�+������E�3�\.��g�(I1n;���Np���j/n<d��`�<^�@�+~�����v���iY!c*\���z�qA���N�{��d�����w^,��M���A��	�Tk�������e����o����&1���A��6���(����z�f�����~��O_L��������3)I���b�52%��&�����X�p�w�b.M_�����/D�V
BG���t4��.��%I:��"��c�F���q/�U�����X�����U�MTw�``�R�U���!\x���[�yf�T�6[I�����3��U���:3w�)[T���(�mv��#*����AvHF��vu��w�#���'������|�]C"�+������������>~H��1Ydl�w���~���$c����c���T"����R�r�Y+�+U�����C)��	h&H�x
���u����$��"�k�ho8�;������O�~����8��y��!�����JT �w�0��[���IT����8.������c��{�����0g�dc����	C�L�������cl�w�[�'��2�O�n�����@��h�[��?�'@�e^�Yj�4����39����p����1<���8M�FB��W��W,L��bD�1�e��{_�Au�;�L6`��<!P�O��p�ae<,��(��/(�s���f|(D	��
����)����|_>�{gAh�����x�������h�0�	�\��?c9�KC�j)���9[#�7E��h)2����f��������)|8.#m������BT����	A�H��^��4�:�5�YN4g����P�+�V(��)G,b�k�P�����f����F><;�4���.\�������������<>�~����d3���B?1O��[+�7�L{�b�����������<U�E��~o�N�(�����]z`�R���n��7��[�{�2�!,�����z'N�*���M�4�*�����������~�VGS���Fy������l�)��N��z����.��+�7��u"��xq$]a��Xa�vp��`i���(�z�������WP}�!�����DTp��m'/���c�A���WT/�\]�#q
���?�q���TT����z�����P����`
��	EV�(b��{Th���NV
E���HI�x�'	�3�W!pU�P��^}�y��s��x��m�o>~��%v��u�l�>j�p�&�$�/����{5��Um���*H>]�5Rp_aU���P)2M�����T�����$������#~l`��ut��;�+J�lOSA��gi�����r�����@1+&�g5�d7U����>_9�����[��T������*m��8��B�0�T�mPc���EW  l�S�S_�g)kQ�05�X-��V.�����)Sl�01��j[�#(z��9�eYEd�wHM���;��h�����)6�h�.��l�� ��1f����B��h���B���B@53)��d2�`���T����l$R���@L�3��<n���V��Ge�m$�t&(�$�t��#:���YS������R�Md���3	W�Dmc���w7��������"����G�Z�g^I�����L)m��Vz��'����a���=������o^_>~��=���;�]����ZE�O$p�i����pc|nY��)��G���	T��V���N8������S���g��j�Y(ET�(z^�����������_?m���Z��tg4��@�ETP���{0�a>��
�c�|>��!�y��|��8:F���U�~�d"��U�[���S_p}�Q�I!���R��� R<�����t�g�(���H�B�K�3�
G�k���k��nW�T.G����3Q�'�l�5oQO�E�%���4���K��/�$;w��8�s  ��0b��)H�ay�����G��D�d�����l��.���MbZ|dm.Ss�����@{���7F��*?�8��Enyv$�q�:�L���6Vp�q�8f�~���
������9{�"��ew���8���2>:]S�?�FSZ�,!����z8�U,7* �
��;���.5W�F'a���}�eL$*+�}�m9����������pi��[M1P�)�Y�(���2��������d�����N�9�.�{E��G�)���`F�Zh�n=�O������������H�cb�|"55�?�l��7�����[9>�J��(�V(rTh%+�4�~��������^���������H�����WN��B�H}�D���*�+���[�t���Ra�C?�#5���S����{JR�D��IR:Eb>��@���x_��!MN���1j���@cV8��Y�iRNo�#�����8Bo�"nn��1-\�����_z��^��
��e��+�jh;
Ox4��c������
���U~��G:h��]���P-)���4����?�w2�
'�M�p�����0 H##���?���l(�C������@����*�^�t��f�g����k��auI�	�6S1����#�4��O���Km]!�2;����e��K�:�r�]6H���`+Br-�N��}���
I_���������@�����/����E�
%�w��%���
�����������FM}6 �E
��P
�L�<����E��N�)��u-_��B�:��Gce\�;���0dI�9P�;}{�A:3��%��%��i�7N~���2^��5�D�A�	��F������	�9�e3��C�"P�����:� ��������f������/n�����h��%�h��8�'�U?��E�
���~��A�\����������TtF�?�%&��L�<��K�P�������������-j����r��^N���V���k�R���v�Y�
�?����H�Z��5����	����?c]���d�;\'q�!�\�p����b0��)�����m����;_�@K�d����-z|���qxI�K$g��]rx�� !L|n^���`��0yY?]:&�Hd-�P����)��z#;�s��W���!��}�Oc������{�bWw"�4Y����o��qj!��x<����s���%2�/����\;�����C���Y���)OG���C�9VJ�sc:��u�-���g���o�w7RH*��=����AB�]�1�1��S�|��_O�(epX��[ ��V��+x-�:��Y[�mi�Z���{aRc��Q�DfBc�BB�ta0�&�����S�i�*��j��dAt��0O�JG�n1s���B�d�
�!�QhG07Q�r)�����g�+bt�TWKL�������
��lf:�a��������S����5�J��Ve���������EWW��l�����{/Vg��H`i���\G<y������a]��`�	��Y�|�T
��5B[I����
������K~�$�T�Jr������o^��K���&�&e��G)�15��Pe��1��W�*�c��*g$�C��hT�YO��f�J�x�-D�-lMS3���DB9�a��+�:M����_�y?��Z��L9ZK�/�C+P[����-�5�grqpK��t� 
 ;d���s�}�R�8����Fb�d������*�V��	�d2eNj�yj�bB�i�%���{+���<,B�\&+�f�d7+Ux$?�����O��5I�()C���+�X{B'N}=8\F��-�A�	a�-72�F�)C�)H�0���U�
*�M��L�N��1\��UMB�7UiA�au�Y��8#;�M�(	���H�	)<A/+�j���N���2���*|��_F���%\��v����~��wvb���M�B�����b� OC���u'vY���{;���&���{p,$w��!>�:��Jb\QI'� �f��Rv��f��H�i~A�F#�wa�qx%Jjv��5���#"G�\����y����}f�a%q>���6oZ<�?R����������������D��$�3�#5����G7l���*��T~�JS�W�\�{QZNWh���'�t��<��mh8T��%t���U9��M��������z����}������c�������y�|}��l�Gi��.��Dv�!��|H^h�DS���E��P�����"
���Sj8�`��O�������������}���l�����2}\_��H\���~�: Z�4���6���z���q�U��,�L+��q (��c�<O'y���z��A�4��r|���-�L��h�v�F!wq���FG�v$��li��^��VW�v%R^�u0�<�C��D��F$�����~��{�%*�����:A��i6���� y�a<�O��3�h�:��iIC��a� �=����������n}O�%$�h^�r���>{�@�����g�#���+|�r������Z�J�0QJ�}d9�[@�r(������:�^���Qe	���>V�0���YRy�����Lf��(8R�����K��7W��.��E8���&��P[]���{���Ww.�Eq����H�9L�Jb]�}��������������`���r)j���Hk��b[�y�s���������N����|V;�_��o��������k�R�o-��vR��x���1f?�|�
����y�R�e�7>�`�C��:Z���E��s�X9K�B�'��k��a�e�dz�i�o/��� @��X/o�ny�u?�e�7�%gu��Sm���m2�M(���:�UDEB��5�5P�_��}��,�X��^8W��W^0J��'c�Ma�4�W\c<Jj���t���������J�as���$�b"��MH���j�|@�7�[�\����M��������(��K|Q�XL^�T���a��U�����r�����������`0'��&{�/X�4���b�� �����%+�����"`���-
��g	'�"��B�	e�	(|�>a���4�{��gI"Ohh3�;2�;��b��kV�m��xz5���:#=Ej�Z��${���3�a��O!����K}R��)��q�����o��r��u_"|��P�E�2C���KMt�����=�3
���*�WIrv��
���^��ygX����]L2gA��.U7v��)�z\8<��]�S�&������p}5!x�*�g��xH\B{�w]s����)�����Mo$%��.������1��Q�Gd)��:��$S��l��Y�SS��,�]��<q�����������V�v���`�>����?LI��������r8o��J�����z���m���'�>EN	-�
��?�������<DsZ�K����������7pu�2���/��}}���E����V���n�;ow���$=5���
:�P-m�kc4gb��D'�u��(Y�z���K�&����=�S��"1 N�_���Q0����L�$��ExN:{�>�l�R�^x[j�t�!;���@W��!$g�R��`q��m�?���7�J����}��>mw��U;D[3(���g�7?tU���s�A4�07���LYB��������������O���H���g���C3���7��p=?5z9���A\6y���$9;���}c����O��d��DeMu��xO9#*X��.��*����K�����2b���y�8���9�E_=�B�>e'@{b^c��F�k���B����Q��aM]�H*�����������mt^	:�8�M���B=��HYL��m�.����SitR�?1�/�7���9�Xc��yCO,p�<��>=>���Lk�R��b_6���>T[��#�y
����D8��5	t���"�|m%�;&U�	B���G�d�?�H���x��>�f�c�<��Iu5zP?�������\��29������r�2���E
uj����&�w��_�o>������<��@�K�[�C���R��G�IY�|�
���Ob����4OJ�|���T[+����'W��2��OtG��)=�5���#94��������:U� �q�����l���������Mc���(�VRT�b��t�4�+�5�F��c-~T�P����}��h����u	2�����+�[�fD�����I|c�Wb� �3�c�~�����Tb�\/���0C��n�&d�g�����[�n��ba^I8*�O2;!��9*���Me�������O���cCx[L���Z���&����d'��#�9��!�2I�/�m��s��6*`F�/�1�P�6)�#�S�d�j#��?�m�*1_3a�1������F����FW��YjLb��������:��*8]!����7�V�����P�Z���a(�R�����^�IYV&:�0�^�n���������_�~VMn���5�b�8�+���t
�����������oC5z����A����zkd����f�p��E��s�S��s���Et����1���x��CN�E@<���t�,��M�R�w�,����~�c�!\~���jW
�x�]�pt��S{��g��	��u����J�&��g��,7%n|��y(��p%
�����J�n�rM6���>u�,�B���='�-�Q >m��������jYj�:�+�H)��\�E3�w�ke��D�(��n����G���3I_��������P�E�K�Y���v~��}�����������������"7Ns�l�mb��QL������F��%�Y�P�����v�����4c.��Cu�9B,o>qK����[�(��\.�OD_�r����b�`����"��Q��1����'�Nz��:C>������ZbQc���t8�_�F����	{x��T�E��{A���h�-�������
t��U�i�0gn!������#���Z���7��"��/�3��U�2m^X���B#��y�����D%]�<�P�����N��}�������8�6.���o��]L�$.���@�����O,6m&�%�S`g�K=�LL�$H��:	I���A�����c�;)x�`���ZXTs����#���Dz�l�4r���o%��7��
�4D�������)�B��+J�!�����u��J�� M���m��f�r������^?q�P����fJb��W��~{����}~�lw�6��E?Nc
2�������f{i�K�%g.��/�mT�^3�]�������X�=z���x��5^��T��@*��IR����"}!R(��e��'�����������w-�����>�j�
��Dj=D��H��4�y�"�+�qDM�i�M2����.��7�7]����ov�����X��K�|���Iw/F���)�H�7d�"/��xSRc5��a�W�	��M��F���*���;f�]���{�js.�>q�8f6������o,|T�!��c��`R.�ZV22VmI����2���/����o���c�����|D	c�~#<vING���@=��}����E�s�c:g/&�.W�.u�<�u@�C��x��5�p��(�$�;�:���:7�t�9��#�{���
JR���Vu�+�g�\x�s4gF����D�Yi�����e'nh�*��W��������G1�����K�Q6���\(�j9E;bBA�:�<9~'�[�qr�|�-�(����0�R�L�DQ�L{;&&�^���=����k�v$M�"�����z+�;h
�fkm�	^+C�|����	\���>��,m����G�o���A���U�����7�a����{���S����F��TA{��'!~�����W��x�L�#�\G���c5�(<�XGs>�ZT��#U=@��Hs�&h�8���������:��i��j��\�&��|�e@�\���EL `�^��e�������A����za~��W5���B����y+��g
;RY�bh0F�@	U�M�l���u���0ag|�� L��j�X�%�i�V�W �A�&���U)�'��=�rE<ew���e��HS����#����#��$V�(QL�Y�DU	P�?������������`R`�@��9@p�o�Js/O7��,����[���������%�0RG~����?~����9N��U������k����"~�
{�1�9�	�c�>�G1�0������?�4��������t��[����Q���^�E�A|D4��vd�*��-��|{�oW]t�>�(0�����q�Z���>B�|CA�����k$�f.������o������ o�-ou��-�i��;��`��$I��p��|7�=�o��p�q�-��BC�������s�.p��7?�7�P_�a���4�*�E�;��E�,WA��v(�
+��'�_��3�2W����+*W���������n�lW�@j���S�������{2N��9g�^���p����1�E���/��K����WQ�!��Y	����x7D���������QI���C�S>��(}HPg���p����\����c'��=?�m���+*(���48����_����a��_�1�u����K���w�����W�����h��S���l����!.]WDG��X��k��}6��;SS8�j�@��5�S��[��A��G��33��k�m��T%���b%Q��qWBj���~�����2 �����K���h ��d{��%���G������7zO�J���}������EB���R�A��=}wZ�=�&Ea#����4)�zF�7|��l���q��_x���-��3n�10�erD����0�`��XS��|�>�l�S�$Jb'{����, �����0/���-�J�����q'�v}����2Yn��������2�k���~�$^��e%F��s�������Z�'�������H�X���Ri�(�����F�:�u���|��?�-���B�\
)ab�/^����� c���vT��?h0����������X��}����_�.6�oZ�71�7��"���@�^��&�H��0Nd,����_��1T����u�J.RHK����&���+C�lD���V����"ng��7��d5U�/�7,���GrTE5����,c�f���������f������,��l�����q����>&f8K��J������w��o��/�~y��XhW['5q�2	���E}#��(|YK�� ��5�[���t�������Ss�R�1BKP
Lk�?O�j���Ad�K���E��p�Yd�`��@_���L�����Y������Y��gnw�9
D�:�,z]�<�����
��n3��5���8�C�j����"�eJ({�@��P���K�P
�����g-D��!��������J4�������b�I�Z����Tm2_O�"/�`�?) �>I���� �3�	J�����k�(��;SF�w[�\�8�^���4�����{#3�:�W������9�0��a
Z�
)N�����qN��!�_��a�d����t�d]�����*�w�>q�z�Z�!1�ZU�HG%W�x)�3!�B6 �*��o{�)��I0�Zw<:�eN.F���Nst8c��#(��2��A����plV��3IF�X����R���PP�t��;�A��:�P�q��}�����rs���������O?l����|������LX�8:d�����sCV�s��z��������ln��>>o�2�_�<VG�oF,xm��/R8�gAT�f�����"A�u�hD�Q�G�V%�p������
 �����3�e8��<9{�{"f/�P5�	h������q�%
�e�A*��l��C��"M����=M�
De��*Ni�>E�&��2cz;*V��MZ�2�G$�{��r<z��������W�P%�M���0�l�Ht2#�Hf��j_��_7f����ZGLS���9��
��2���{2yZ3<y�d�ht���}E��#�'�������K�f�&!���F�yd��d��H�u���Xz�X�����t�������y �����������a���2����@
��mD~�"�z|������A���N��
y:�eO1[��8�?��7�2S��_�
���ib����]��Sc�K�q����|<C<{�.��?)j���'����B3��ve��	���"�:���������#7�wxJ^~|�����V5A�X�b�����H�81��R�T�0�NP&9�p?�1<x{T��O�\��p���8"[��>�+)QQvF��FQ�\��D�`B�58���%��=n,����G���)��������9|����+%%"q)��6�A09�#6�L��/�8�<��+g#��L�����Z�P��a�&����V����j������?j��=l9v������3,Fc����y2�jo1_l9�g(x�#j_4@���<QP���p�*�����v�u�E�������*UOE�$�?�zY#���e�c�� h��k�r���h������"p����1��p��4����n��|��}�WF�G�����nu�c;���t�Mp���) 
9���8����$+��B;A��N+�#�z�~Er�G!v��b�^O�yH�B��u�>��
��@���i��� '�Nt�A�����$�"�^��B-X"��`�K�s�s�r�_Am�[���j;O@dG�+Jw�s�!`���@�I��=�4����z���~���DwB��������hZ|0��LG�+y�h�C)XcG��&1������Y�X+������l�r��V���A�%���*)?l�ov_Lc����J]�"�o"?#�,f�E�D��l�VF����LY��<k,��f>�1�D(����|���i��g(�����uxj hH��Ax�=�(iYf���R3.��K����t�R��\L�����~;d}O�������E����q=�65|^wg�7TW{GhG
���x
�Du�io��V^i.�51�IH����kra�U���!�+hM�dn�k�qiZ��~�s�oyNR��u��A;N/{��������|��N��c�J�E�3}�Tit��f:|�Qz����j�+W���D�{a�8�v<���3 %:lR_���
�8�Q�|�`�1�k�dFh}pB��9�L��v�����ID����(b-��(Cs�5�D�n��V8�}�B-�!���D�f���XG�(�h���	�$�������f�DA����Y}�Z����������
�.+��?�2wU�%���(�r�������_o^��������.��S"U�ir@�1j��,H�S��1�fzT;tX���cL�����`R������+a�nx�P�1y��IZ8�\:�h�&��5�
H�M���vM?�~�Is����d�W�Nb9��^��%�"�B�m���i����~?g/W-t�ry#.��]o�������6��gV:o~�
�������o~��(��6�l���BI�F"��fB�c8�x���H
PR����T�&��Q>t��=%y��E�3h2��	��(7	���ry���m2��|
9�����
(����~k����;EG�n��u�yz�%l�U1��$�����o�������:��"Ev���n[�x\r����9��.�>���e�}��l�Y���_��vnb������eH�6��Y���+
7�jmv2�Z	�}K�G����;��!v��w0?����E6����U��E�Y�e1%��*}�_�����C_��2�$���4�.btl���6�->���R���[�����D	�8�:S�u^�
��������/��t������!�f��D{��z����e���^\�pd*HAT�����X�N�
(�������/YZ03IG)�(��T�g��G�T�S��p�D7B����Rb�q���8�
i��_����8��L��3�M�A�a��H�:4�a�L��\��VR���3��w��*ps��� �]'�������R���GN|+/�
���*�l|�!�h����4Iz���8���t�o�����cYa�B���},rT���"GU�����d�������K��IG��L��2���	�y��W�XB�e��V!c_
]���77/���&��A��*�-v�����L>�{�=��$��O�T�����r%Y��2 6�l����-#�T�D��0Y������B?�6L��y��;����xpu�a��r��"�x�>�u���CM�+����K�<�W�#��;��'�Y�P���f�7$=�mF���z�w���9��M��>��P<��OL� �$(��*u���}� I+UA����l�x�� PG��2a�Xk
�|/�b:�����p���ZF�s*9���6���=TBm9�"W��\����A5.A��\���0���yb�/��	��x!E��q+��Du����
P����A�����y�j�xxR���������1,K&7a.:B
h��nv�6D~>�,�a=��;.SD�����l�[(0��P�%T�����@5�L��K ����o`|��]��[���
�(�_�@��db��#��������i�Gl�-[q��x������?M����Q8,x�a	���,��7h"���������dQ�:��[i=���
�Nq�W��<?���P����_-�6f~��2�Rk��kkil�4��Vd��i��B �]����.b�?Y�qY�r�t��!|J::�5��Ek����!IR��	j	d����S���lp�����K�$}����d���E2�}�S~������,	�g��fw,1=$`��
�����B�,�Q	m�M9�w*��1W�'��1c���`0Y���oU~j�������3?Dwtk[���pF}Dq�q���%GpK��;��Bt��W���9-����=-�<Vz�P#@pvj��O6#%������0$���Dv3
��8�x�2Vi���22D�
���}�R
O7���+��N�bM��2���H��'$R���
5����oO�1�,&A������y4[����#�8�+y�b����wl'�B�'�}�����'f�&���
C�Ci2b$N�B�^�j�|��B�*r��T����!*:���YpNcgw�zf�d����D��9�h�<�C4�Q��}���i�7�I�����6-NCh��A�#yb�B~�.-�f�������_=]|��x�H���ys��
5v}���g"�Pr����"���@�D�^X�s�T��{��]��@��=���(d���a�����R~]�WQJ���/�`�&�^n�P�; �r|�����=�lZ��a
������0�K���3�����d1R�}�/@���[dx���&�JS��9[�:gG�~gn�8hb���d^ka�sc�Na�qXR�'vT���&~j���@d#bdV��b,���3[����	�!#�4�t0:�
��/�M���d(d�U�3O��>�T�Q�e�IZJwwqbE�
����i��4>�n��yA
����Tm���\I���`0N�����1��p�4�L$��d+8�5�����A�W��$��v>M�q��u7K�e�P/A�����N	$^��Br�_��ws7����_`o\�_��#�~�
6$n9��t�e0=.ht�tQ ��`z?  zL��!��a��x��?,.fN��^Ww���AP������������__w������a��|y�����T���|y�y��-�����O0+?m�����S_K������bd2�������n�W���U(�h��'��l���i��6�_D�-�h:}__�h%�f,|cT���Y�G�l�����[	2��#��o����j�����7�k�Wm]n=�� 2q|��d'j�cb
nK�4����8\+G�3%N i������~;k�������<�>�n7���{}�L��X����Ljd�.g/	��G�@���P���/�,��W�`��=3�T�Q�����v[f�35@����oW����]<�z�Kg�3:�;����=�D�l�q���5*f�z�I�~����$�TC�����Sv���M�%����;�@S��E/���������/���D��	��\*���d�Yi��y����f�`l���������v�����������0V��W"Ts2��V�_~���~��G�ph����[3�E��8t�d��72�?��)�x� T��fi��r��C�����[���C������wO�}�
j">o�����~��2T��>?>���23y�HJzOqr��v�����
;���U1
:���!���d:$���m��u{�j2�+i��'y.�G ��s��7=8p{f��coq�����������������{�����j�������R8�\�9��2�����wFf]��oqM[^P����j^2��vUg� >iEq���7��&Ga5NOOu�����W��t����1��%#e��^���qH����R�������z�I�mc{^b{q�a,@(�C�������a���v���.l�58Y23gNSa������l��3���xw����lF�O97��-���X�)o'?�5nh6a	��a�}8x�����t�"d�/]���"���e���)A��$���2�rp�R����vqA�q��H�N��:���Y|@0����20 gW S�K�+��m��0�����0E�/_W��"�^
D\�3�� 
�����bs�������n�����)V�L)C{*�)�2���j��V�X���
p���U`Q&Hb��QV"M\�:R�� ���|\����C��E�8�+Fo�<�����n�/%�<A�ey�xu���#wF���;�������Rc:�e�?�><|e�;���Dx���������6x�o���uY��1���������_�`p���$�bH���w�<�y�/���b�5������@��D�E[8S`��� B�7*���3~�?P�@�(z�r���:�"e��R��0����c����>�Bpu����d�K
���l��U����������,��������
������/��:���**&�����dC����W[Y��[L	�M�y!*HT���sn~�np7O7�7�8
�����>R��D������ �BJ��/.&�^0/��$����Pj�/�Vv�q<�N�������"��g=����C��$,������dw��i�b7��B6;�:J�L�v�{pvFV���MY�;��u� �yw����U��g����I%�fvy��8�'Z�����j�A=KQ��erW�7���@+�P���*�4>�U��$�7lj/6�Wy�_^W��'y�4G�J���r�����d3��J'��yU���HX�s
�������D�T��g)����i~�@���p�G�4�G8����'��J�]��a
$�2���A�S�7����6Y����/�!�.���5�Y��s7���E�0���y�	��u��&-X���|�5����������J(����S3�h3�ed
�H���7t��89w�a�T�Xqf6{��dIv-�#�l R�dk������y������+u��t"V8�I�G��!������x <�)I%Y�c#|�"�6��xx�J��?0������	;�Mf6yq���Q��e(^_��U	P�G���������E��h������N���EdN��y������|cr��8��U�e������8�����Y����7��������|����[R����\6\�m��+"Q�8��l@p�n�C�%H����j��u�G�t+�V��o�5���pt���O[�B���e�N�	k���+�x���a��/��p0 S�^��X7�e=�7(|�W&��qK�N��z�L`5���Bz��YaC~^C~�J�Ti�|4�L�
��)� _~�v�|����5����_��3���������#���Y|M&�w�	�+�Z;�A�����H���~
8�i��w7`����f(G�.������\���&�b���?�tYY��5F�p/�n�<P���Zb�?�&`��941}���\
�1������������}y�9�9��S�n�i�t%�|
���,�n�������8:=����S8��$CU/��Sj��y"������`;�;����,�8�B(��U��;e�~�E����b��GN'���v�:t�on+�����N'�>����m�����6�g��*Ce-	�V�l����P#jRZ`KhK��nS�#'X�1�X��%�=��>n��a���A�S�����=���C�����yqa�����b�X7�%�����;�~��ow,e!w�T��j�8����	f�����.V��iy[]��r������(wj~�7�cO
�l�%!c�|[(|gEG��>�j#��w/����2V��%�_{�-��yO����i@2��I5���Lj�I���OW��"5j�6DD$W���'�*���Tz��q���������Jr���o'���:5|�4DV/��rN�$��3�d)B�D����&�:��4�V�o\4.e��<Ba4�6�Ks[�H,l��AD�3@\�Va���>��0��q+"#K�ji����OAB&�1��IF��L��x�Ur��K��w���s��]��`P��E�6�[�=)8��i���/���3�O��,b>��p���y��oY������p�tg{m�+c�k��=��9.b��{�I'g��nN=������
��^��r�G������������-rIq/�6G��[���1����=�L�p)�^��E����92����F��i��pz�E_	G�72_��F~��P������X��2���\G��2��Ko�����������#YeC�\w"��.��<py����m�p8p4��o�"�������W��{���������?r,����1�����M���B���0vpo��]3k��	IW;��D�|�*���W5NW���|����!�8Kzn�Cw1��W�	&A<h�@���ryFE�:PFm��>Y��*--0��s������#���7���+�0�����?����	�@���pj4�,����2�u��$�����k���s�I���	u+$�M3���*g/"�,A���ed���K4�$z<���������Ua������1O����k�H�1,l��5q�����r��6W�T�Ku�X�!��(��
��YZ����O^��!$�.�s��-
��1\���������#�`���3w���������6�9GC(3�4Qz�74)spC�������5J�C��3|��SS����&�a:�y���|29�w����]7�7���i�
��R(�i���_�,|B���d������.sAOa����q�ln��7�����=�� k��a< ������0]���Z��p����@�!x������kh%[�����*6��7�P~D���h�c������ysR�5���J��/\+n���&���Jb�I��$hxF��\f>��(=(,��������70����g�M�@=�����y�Jh��(�.��)<G��x�v�\Kd^��.����2��7�_w��\"�]��d��A\��������u���z&C)]�U@\�o%����e����7cK�����@��^!����`��`lgh=~�lo)����,Q�v��
��&V��Z[>�
��yy������=<�o&�j��K >��0��%�U�������$NeQ��+�uve9��l�z]q��#>v����3$�g�uaU3��[�H����O,C�b��pY������>,%qz���
z��e0��L/=vR�q�����?���c��i��G���,�����^�!\G'&V���)I��B ��h�YA�+�x�� ���`���(�b�;��&�����*Zz���2��.��.� 80[���X�0aL���WT/HI��n��u�mL(H�����-��E�S�\�;J���P�&�������hJ��`�8%8"�#��`�%)R�X:���w�����j0g��,�������y�X��7_�����M`�U
s$j��e�eA*ew*sXI�Q*����nUk��c�+�c4d�<|%�;�����["��&S��0��<
���^����?q�{�_��[���'����m�SJ�`��:,��Y���#Pj��cwn�����$��n{�Se�����1�	GN�J��M���3�����@�����M������=mh���M�*_��V�^�c:gZYn8����vpm�/��3�Ev�b�O���v�������B��e�B����v������;>.8
���DP;�F������_���f�����.;d1��Z�t�F���l
�������n7����������bO�7n����������p����M=oL�����d�,��M�	N8}O;�% �����^���12���*w6�7���.�y}�_RL+�R���������-H���.���*�>7(L�1k����9y��F)����!���D"1F��)���(����7]��e���n��Ij�B#RB�Dl���v�t������w�������X(���pmz��7�#q�Dqs����i�msK�Ka����}7rD��F�W`6bm��r�K����W��1���M������to�L5r1�Fu��������t~������[��L�zz����v��\5j7N,�`�XX8t�WU���d�9���N���R-�g)Z����`
�`�
^A�`����k/mLt�] x�g�'�;]�W��B]�a����ega*�i�3o�#��8Jm��>�
��D��!
��&��zeg�5��Y��K�c�3i��3�R�H�tOQ]�����N%�Q�2�pt\���t9���i!v�*e��$������e�������&B�2��s~�L���^,��_���3���!%������|j��x+��T}���S�%@���XB���p��<��KG��Q�q����~��T��`����$�����)�zqNe�� ����M�<�iv�j�Q5 k:�O�0�1���sz����8N�'������7YtOH�(��W�ku.Q���#?��g�M�q����9�]�h���f����Vr�H��Gfhc��Jf�D������6�,���'���I%g���_���;������X�NP>|z.wL�0�����@��q|��t���\Z�sJ�h��+)���8��tS������/N�~�8�cM��I�M��>P`��%�U�
)�:���yd����x�O�e��Q�<��E>/NT�`j]����G����Nq'�e�f����i=�I�G7�Yby$��d,�**�9<�|��X�-0�8��<f�3/��3K�;W�I�0�
�4����E����3u���@CZTX���m%N.ph4�|����k=A��s�3��,.	I������������S�
��`�<���,����� ���r������K��	<�:��x��qD�q��p��UL�S�|�V�e�������E
��h
~��/�z�X��o�0L5w�8��t����v�rw$�C��/['���z�)<'�����Q�����W:�	���j�
{D�U�[�����L�����sJn���0�]K;��6�(9���';H�y2���=*k��`�9�T������wu��M=�h��%�>*�b)�o��d��:������.��G�6������!)��#�Y%���3�z6�5XB$J�e�h+<�Bb�VV:k�'kz2�u�X�H=(ia��k)['G�<(��N���"2��;��q16��&�<�w�,J�q�Gw���x�B%�2�i^o�2�^��^�C�l�-����z����M=�
�y-x�Ij����%�V��k���H�����A����'����jO=�Ak�Ou��-V
������lp���������D^��r����NZq��(�_� ������l���Im���NB�A��`�-��7{_�L����'ty��dbP�012H��<����0�������?��sK�!����?��L����m�y/� iA��I������H@f�d��DC���,Y�W�X7P����y���[^�@n�z�����1���pz�!Z��F	!�?��\S��������sq��>m<�@��������������M�>|�9b��v��!�'���MX`��	����&Wq���|=�@�i���$dS07<�q��[*��_���b�9�mO��Jg�lT�w?���q�������"��Ic:t���/�G{��^2W��1���u���3q����`�%.^��������^��/�ngz�*��G�����G���1���(��4�Z��U�$}
i���]��5�et�����$�%-����Sr3���������������0�F�u��PKq�&B\$*PK�"N��)z*\
( @��callgrind.out.115483_after_patchUXt�.\��,\PK��"Nq�&B\$*!@���\callgrind.out.115655_before_patchUXq�.\��,\PK�)�
#65Amit Kapila
amit.kapila16@gmail.com
In reply to: Mithun Cy (#63)
Re: WIP: Avoid creation of the free space map for small tables

On Fri, Jan 4, 2019 at 8:23 AM Mithun Cy <mithun.cy@enterprisedb.com> wrote:

Thanks,

On Sun, Dec 30, 2018 at 3:49 AM John Naylor <jcnaylor@gmail.com> wrote:

On 12/29/18, Mithun Cy <mithun.cy@enterprisedb.com> wrote:

Results are execution time(unit ms) taken by copy statement when number of
records equal to exact number which fit HEAP_FSM_CREATION_THRESHOLD = 4
pages. For fill factor 20 it is till tid (3, 43) and for scale factor 70
till tid (3, 157). Result is taken as a median of 10 runs.

So 2-3% consistent regression, And on every run I can see for patch v11
execution time is slightly more than base.

Thanks for testing!

I also tried to insert more
records till 8 pages and same regression is observed! So I guess even
HEAP_FSM_CREATION_THRESHOLD = 4 is not perfect!

That's curious, because once the table exceeds the threshold, it would
be allowed to update the FSM, and in the process write 3 pages that it
didn't have to in the 4 page test. The master branch has the FSM
already, so I would expect the 8 page case to regress more.

I tested with configuration HEAP_FSM_CREATION_THRESHOLD = 4 and just
tried to insert till 8 blocks to see if regression is carried on with
further inserts.

What I can do later is provide a supplementary patch to go on top of
mine that only checks the last block. If that improves performance,
I'll alter my patch to only check every other page.

Running callgrind for same test shows below stats
Before patch
==========
Number of calls function_name
2000 heap_multi_insert
2000 RelationGetBufferForTuple
3500 ReadBufferBI

After Patch
=========
Number of calls function_name
2000 heap_multi_insert
2000 RelationGetBufferForTuple
5000 ReadBufferBI

I guess Increase in ReadBufferBI() calls might be the reason which is
causing regression. Sorry I have not investigated it.

I think the reason is that we are checking each block when blocks are
less than HEAP_FSM_CREATION_THRESHOLD. Even though all the blocks are
in memory, there is some cost to check them all. OTOH, without the
patch, even if it accesses FSM, it won't have to make so many
in-memory reads for blocks.

BTW, have you check for scale_factor 80 or 100 as suggested last time?

I will check
same with your next patch!

Yeah, that makes sense, John, can you provide a patch on top of the
current patch where we check either the last block or every other
block.

--
With Regards,
Amit Kapila.
EnterpriseDB: http://www.enterprisedb.com

#66John Naylor
jcnaylor@gmail.com
In reply to: Amit Kapila (#65)
2 attachment(s)
Re: WIP: Avoid creation of the free space map for small tables

On 1/3/19, Amit Kapila <amit.kapila16@gmail.com> wrote:

Yeah, that makes sense, John, can you provide a patch on top of the
current patch where we check either the last block or every other
block.

I've attached two patches for testing. Each one applies on top of the
current patch.

Mithun, I'll respond to your other review comments later this week.

-John Naylor

Attachments:

fsm-last-page-only.patchtext/x-patch; charset=US-ASCII; name=fsm-last-page-only.patchDownload
diff --git a/src/backend/storage/freespace/freespace.c b/src/backend/storage/freespace/freespace.c
index 2ab1cb58b7..d6352aabd9 100644
--- a/src/backend/storage/freespace/freespace.c
+++ b/src/backend/storage/freespace/freespace.c
@@ -1103,15 +1103,9 @@ fsm_allow_writes(Relation rel, BlockNumber heapblk,
 static void
 fsm_local_set(Relation rel, BlockNumber curr_nblocks)
 {
-	BlockNumber blkno,
-				cached_target_block;
+	BlockNumber cached_target_block;
 
-	/*
-	 * Mark blocks available starting after the last block we have mapped,
-	 * and ending at the current last block in the relation.
-	 */
-	for (blkno = fsm_local_map.nblocks; blkno < curr_nblocks; blkno++)
-		fsm_local_map.map[blkno] = FSM_LOCAL_AVAIL;
+	fsm_local_map.map[curr_nblocks - 1] = FSM_LOCAL_AVAIL;
 
 	/* Cache the number of blocks. */
 	fsm_local_map.nblocks = curr_nblocks;
fsm-every-other-page.patchtext/x-patch; charset=US-ASCII; name=fsm-every-other-page.patchDownload
diff --git a/src/backend/storage/freespace/freespace.c b/src/backend/storage/freespace/freespace.c
index 2ab1cb58b7..820a2579ae 100644
--- a/src/backend/storage/freespace/freespace.c
+++ b/src/backend/storage/freespace/freespace.c
@@ -1110,8 +1110,15 @@ fsm_local_set(Relation rel, BlockNumber curr_nblocks)
 	 * Mark blocks available starting after the last block we have mapped,
 	 * and ending at the current last block in the relation.
 	 */
-	for (blkno = fsm_local_map.nblocks; blkno < curr_nblocks; blkno++)
+	blkno = curr_nblocks - 1;
+	for (;;)
+	{
 		fsm_local_map.map[blkno] = FSM_LOCAL_AVAIL;
+		if (blkno >= fsm_local_map.nblocks + 2)
+			blkno -= 2;
+		else
+			break;
+	}
 
 	/* Cache the number of blocks. */
 	fsm_local_map.nblocks = curr_nblocks;
diff --git a/src/test/regress/expected/fsm.out b/src/test/regress/expected/fsm.out
index 4c44c4bd6e..973b9319e7 100644
--- a/src/test/regress/expected/fsm.out
+++ b/src/test/regress/expected/fsm.out
@@ -2,16 +2,16 @@
 -- Free Space Map test
 --
 CREATE TABLE fsm_check_size (num int, str text);
--- Fill 2 blocks with as many large records as will fit
+-- Fill 3 blocks with as many large records as will fit
 -- No FSM
 INSERT INTO fsm_check_size SELECT g, rpad('', 1024, 'a')
-FROM generate_series(1,7*2) g;
+FROM generate_series(1,7*3) g;
 VACUUM fsm_check_size;
 SELECT pg_relation_size('fsm_check_size', 'main') AS heap_size,
 pg_relation_size('fsm_check_size', 'fsm') AS fsm_size;
  heap_size | fsm_size 
 -----------+----------
-     16384 |        0
+     24576 |        0
 (1 row)
 
 -- Clear some space on block 0
@@ -26,7 +26,7 @@ SELECT pg_relation_size('fsm_check_size', 'main') AS heap_size,
 pg_relation_size('fsm_check_size', 'fsm') AS fsm_size;
  heap_size | fsm_size 
 -----------+----------
-     16384 |        0
+     24576 |        0
 (1 row)
 
 -- Extend table with enough blocks to exceed the FSM threshold
diff --git a/src/test/regress/sql/fsm.sql b/src/test/regress/sql/fsm.sql
index fad99da1c2..a864c7fd88 100644
--- a/src/test/regress/sql/fsm.sql
+++ b/src/test/regress/sql/fsm.sql
@@ -4,10 +4,10 @@
 
 CREATE TABLE fsm_check_size (num int, str text);
 
--- Fill 2 blocks with as many large records as will fit
+-- Fill 3 blocks with as many large records as will fit
 -- No FSM
 INSERT INTO fsm_check_size SELECT g, rpad('', 1024, 'a')
-FROM generate_series(1,7*2) g;
+FROM generate_series(1,7*3) g;
 VACUUM fsm_check_size;
 SELECT pg_relation_size('fsm_check_size', 'main') AS heap_size,
 pg_relation_size('fsm_check_size', 'fsm') AS fsm_size;
@@ -16,7 +16,7 @@ pg_relation_size('fsm_check_size', 'fsm') AS fsm_size;
 DELETE FROM fsm_check_size where num <= 5;
 VACUUM fsm_check_size;
 
--- Insert small record in block 1 to set the cached smgr targetBlock
+-- Insert small record in block 2 to set the cached smgr targetBlock
 INSERT INTO fsm_check_size values(99, 'b');
 
 -- Insert large record and make sure it goes in block 0 rather than
#67John Naylor
jcnaylor@gmail.com
In reply to: John Naylor (#66)
Re: WIP: Avoid creation of the free space map for small tables

On Sun, Dec 30, 2018 at 10:50 PM Amit Kapila <amit.kapila16@gmail.com> wrote:

On Sun, Dec 30, 2018 at 3:49 AM John Naylor <jcnaylor@gmail.com> wrote:

I also tried to insert more
records till 8 pages and same regression is observed! So I guess even
HEAP_FSM_CREATION_THRESHOLD = 4 is not perfect!

That's curious, because once the table exceeds the threshold, it would
be allowed to update the FSM, and in the process write 3 pages that it
didn't have to in the 4 page test. The master branch has the FSM
already, so I would expect the 8 page case to regress more.

It is not clear to me why you think there should be regression at 8
pages when HEAP_FSM_CREATION_THRESHOLD is 4. Basically, once FSM
starts getting updated, we should be same as HEAD as it won't take any
special path?

In this particular test, the FSM is already created ahead of time for
the master branch, so we can compare accessing FSM versus checking
every page. My reasoning is that passing the threshold would take some
time to create 3 FSM pages with the patch, leading to a larger
regression. It seems we don't observe this, however.

On Sun, Dec 30, 2018 at 10:59 PM Mithun Cy <mithun.cy@enterprisedb.com> wrote:

I have some minor comments for pg_upgrade patch
1. Now we call stat main fork file in transfer_relfile()
+ sret = stat(old_file, &statbuf);

+        /* Save the size of the first segment of the main fork. */
+        if (type_suffix[0] == '\0' && segno == 0)
+            first_seg_size = statbuf.st_size;

But we do not handle the case if stat has returned any error!

How about this:

/* Did file open fail? */
if (stat(old_file, &statbuf) != 0)
{
/* Extent, fsm, or vm does not exist? That's OK, just return */
if (errno == ENOENT &&
(type_suffix[0] != '\0' || segno != 0))
return first_seg_size;
else
pg_fatal("error while checking for file existence \"%s.%s\"
(\"%s\" to \"%s\"): %s\n",
map->nspname, map->relname, old_file, new_file,
strerror(errno));
}

/* Save the size of the first segment of the main fork. */
else if (type_suffix[0] == '\0' && segno == 0)
first_seg_size = statbuf.st_size;

/* If extent, fsm, or vm is empty, just return */
else if (statbuf.st_size == 0)
return first_seg_size;

2. src/bin/pg_upgrade/pg_upgrade.h

char       *relname;
+
+    char        relkind;        /* relation relkind -- see pg_class.h */

I think we can remove the added empty line.

In the full context:

-    /* the rest are used only for logging and error reporting */
+
+    /* These are used only for logging and error reporting. */
     char       *nspname;        /* namespaces */
     char       *relname;
+
+    char        relkind;        /* relation relkind -- see pg_class.h */

Relkind is not used for logging or error reporting, so the space sets
it apart from the previous members. I could instead put relkind before
those other two...

-John Naylor

#68Mithun Cy
mithun.cy@enterprisedb.com
In reply to: John Naylor (#66)
Re: WIP: Avoid creation of the free space map for small tables

Hi John Naylor,
On Tue, Jan 8, 2019 at 2:27 AM John Naylor <jcnaylor@gmail.com> wrote:

I've attached two patches for testing. Each one applies on top of the
current patch.

Thanks for the patch, I did a quick test for both of the patches same
tests as in [1]/messages/by-id/CAJVSVGX=2Q52fwijD9cjeq1UdiYGXns2_9WAPFf=E8cwbFCDvQ@mail.gmail.com, now for fillfactors 20, 70, 100 (Note for
HEAP_FSM_CREATION_THRESHOLD = 4 highest tid inserted was 20 fillfactor
is (3,43), for 70 fillfactor is (3, 157) and for 100 fillfactor is
(3, 225), so exactly 4 pages are used)

Machine : cthulhu, same as before [2]/messages/by-id/CAD__Ouj=at4hy2wYidK90v92qSRLjU+Qe4y-PwfjLLeGkhc6ZA@mail.gmail.com and server settings is default.
Test: COPY command as in [1]/messages/by-id/CAJVSVGX=2Q52fwijD9cjeq1UdiYGXns2_9WAPFf=E8cwbFCDvQ@mail.gmail.com, for 500 tables.

Fill factor 20
execution time in ms %increase in
execution time
Base 119.238
v11-all-pages 121.974 2.2945705228
v11-Every-other-page 114.455 -4.0113051209
v11-last-page 113.573 -4.7510021973

Fill factor 70
execution time in ms %increase in execution time
Base 209.991
v11-all-pages 211.076 0.5166888105
v11-Every-other-page 206.476 -1.6738812616
v11-last-page 203.591 -3.0477496655

Fill factor 100
execution time in ms %increase in execution time
Base 269.691
v11-all-pages 270.078 0.1434975583
v11-Every-other-page 262.691 -2.5955630703
v11-last-page 260.293 -3.4847288193

Observations
1. Execution time of both base and v11-all-pages patch has improved
than my earlier results [2]/messages/by-id/CAD__Ouj=at4hy2wYidK90v92qSRLjU+Qe4y-PwfjLLeGkhc6ZA@mail.gmail.com. But still v11-all-pages is slightly
behind base.
2. v11-Every-other-page and v11-last-page patches improve the
performance from base.
3. IMHO v11-Every-other-page would be ideal to consider it improves
the performance and also to an extent avoid expansion if space is
already available.

[1]: /messages/by-id/CAJVSVGX=2Q52fwijD9cjeq1UdiYGXns2_9WAPFf=E8cwbFCDvQ@mail.gmail.com
[2]: /messages/by-id/CAD__Ouj=at4hy2wYidK90v92qSRLjU+Qe4y-PwfjLLeGkhc6ZA@mail.gmail.com

--
Thanks and Regards
Mithun Chicklore Yogendra
EnterpriseDB: http://www.enterprisedb.com

#69John Naylor
john.naylor@2ndquadrant.com
In reply to: Mithun Cy (#68)
Re: WIP: Avoid creation of the free space map for small tables

On Wed, Jan 9, 2019 at 7:33 AM Mithun Cy <mithun.cy@enterprisedb.com> wrote:

2. v11-Every-other-page and v11-last-page patches improve the
performance from base.
3. IMHO v11-Every-other-page would be ideal to consider it improves
the performance and also to an extent avoid expansion if space is
already available.

Good to hear. I'll clean up the every-other-page patch and include it
in my next version.

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

#70Amit Kapila
amit.kapila16@gmail.com
In reply to: John Naylor (#69)
Re: WIP: Avoid creation of the free space map for small tables

On Wed, Jan 9, 2019 at 9:00 PM John Naylor <john.naylor@2ndquadrant.com> wrote:

On Wed, Jan 9, 2019 at 7:33 AM Mithun Cy <mithun.cy@enterprisedb.com> wrote:

2. v11-Every-other-page and v11-last-page patches improve the
performance from base.
3. IMHO v11-Every-other-page would be ideal to consider it improves
the performance and also to an extent avoid expansion if space is
already available.

Thanks, Mithun for performance testing, it really helps us to choose
the right strategy here. Once John provides next version, it would be
good to see the results of regular pgbench (read-write) runs (say at
50 and 300 scale factor) and the results of large copy. I don't think
there will be any problem, but we should just double check that.

Good to hear. I'll clean up the every-other-page patch and include it
in my next version.

+1.

--
With Regards,
Amit Kapila.
EnterpriseDB: http://www.enterprisedb.com

#71John Naylor
john.naylor@2ndquadrant.com
In reply to: Amit Kapila (#70)
2 attachment(s)
Re: WIP: Avoid creation of the free space map for small tables

On Wed, Jan 9, 2019 at 10:50 PM Amit Kapila <amit.kapila16@gmail.com> wrote:

Thanks, Mithun for performance testing, it really helps us to choose
the right strategy here. Once John provides next version, it would be
good to see the results of regular pgbench (read-write) runs (say at
50 and 300 scale factor) and the results of large copy. I don't think
there will be any problem, but we should just double check that.

Attached is v12 using the alternating-page strategy. I've updated the
comments and README as needed. In addition, I've

-handled a possible stat() call failure during pg_upgrade
-added one more assertion
-moved the new README material into a separate paragraph
-added a comment to FSMClearLocalMap() about transaction abort
-corrected an outdated comment that erroneously referred to extension
rather than creation
-fleshed out the draft commit messages

Attachments:

v12-0001-Avoid-creation-of-the-free-space-map-for-small-h.patchtext/x-patch; charset=US-ASCII; name=v12-0001-Avoid-creation-of-the-free-space-map-for-small-h.patchDownload
From 854ba27740ed26e0d3e89f6228186f2b0914b21e Mon Sep 17 00:00:00 2001
From: John Naylor <jcnaylor@gmail.com>
Date: Thu, 10 Jan 2019 16:37:57 -0500
Subject: [PATCH v12 1/2] Avoid creation of the free space map for small heap
 relations.

Previously, all heaps had FSMs. For very small tables, this means that
the FSM took up more space than the heap did. This is wasteful, so now
we refrain from creating the FSM for heaps with 4 pages or fewer. If the
last known target block has insufficient space, we still try to insert
into some other page before before giving up and extending the relation,
since doing otherwise leads to table bloat. Testing showed that trying
every page penalized performance slightly, so we compromise and try
every other page. This way, we visit at most two pages. Any pages with
wasted free space become visible at next relation extension, so we still
control table bloat. As a bonus, directly attempting one or two pages
can even be faster than consulting the FSM would have been.

If a heap with a FSM is truncated back to below the threshold, the FSM
stays around and can be used as usual.
---
 contrib/pageinspect/expected/page.out     |  77 +++----
 contrib/pageinspect/sql/page.sql          |  33 +--
 doc/src/sgml/storage.sgml                 |  13 +-
 src/backend/access/brin/brin.c            |   2 +-
 src/backend/access/brin/brin_pageops.c    |  10 +-
 src/backend/access/heap/hio.c             |  47 ++--
 src/backend/access/transam/xact.c         |  14 ++
 src/backend/commands/vacuumlazy.c         |  17 +-
 src/backend/storage/freespace/README      |  13 +-
 src/backend/storage/freespace/freespace.c | 262 +++++++++++++++++++++-
 src/backend/storage/freespace/indexfsm.c  |   6 +-
 src/include/storage/freespace.h           |   9 +-
 src/test/regress/expected/fsm.out         |  62 +++++
 src/test/regress/parallel_schedule        |   6 +
 src/test/regress/serial_schedule          |   1 +
 src/test/regress/sql/fsm.sql              |  46 ++++
 16 files changed, 516 insertions(+), 102 deletions(-)
 create mode 100644 src/test/regress/expected/fsm.out
 create mode 100644 src/test/regress/sql/fsm.sql

diff --git a/contrib/pageinspect/expected/page.out b/contrib/pageinspect/expected/page.out
index 3fcd9fbe6d..83e5910453 100644
--- a/contrib/pageinspect/expected/page.out
+++ b/contrib/pageinspect/expected/page.out
@@ -1,48 +1,69 @@
 CREATE EXTENSION pageinspect;
-CREATE TABLE test1 (a int, b int);
-INSERT INTO test1 VALUES (16777217, 131584);
-VACUUM test1;  -- set up FSM
+CREATE TABLE test_rel_forks (a int);
+-- Make sure there are enough blocks in the heap for the FSM to be created.
+INSERT INTO test_rel_forks SELECT g from generate_series(1,10000) g;
+-- set up FSM and VM
+VACUUM test_rel_forks;
 -- The page contents can vary, so just test that it can be read
 -- successfully, but don't keep the output.
-SELECT octet_length(get_raw_page('test1', 'main', 0)) AS main_0;
+SELECT octet_length(get_raw_page('test_rel_forks', 'main', 0)) AS main_0;
  main_0 
 --------
    8192
 (1 row)
 
-SELECT octet_length(get_raw_page('test1', 'main', 1)) AS main_1;
-ERROR:  block number 1 is out of range for relation "test1"
-SELECT octet_length(get_raw_page('test1', 'fsm', 0)) AS fsm_0;
+SELECT octet_length(get_raw_page('test_rel_forks', 'main', 100)) AS main_100;
+ERROR:  block number 100 is out of range for relation "test_rel_forks"
+SELECT octet_length(get_raw_page('test_rel_forks', 'fsm', 0)) AS fsm_0;
  fsm_0 
 -------
   8192
 (1 row)
 
-SELECT octet_length(get_raw_page('test1', 'fsm', 1)) AS fsm_1;
- fsm_1 
--------
-  8192
-(1 row)
-
-SELECT octet_length(get_raw_page('test1', 'vm', 0)) AS vm_0;
+SELECT octet_length(get_raw_page('test_rel_forks', 'fsm', 10)) AS fsm_10;
+ERROR:  block number 10 is out of range for relation "test_rel_forks"
+SELECT octet_length(get_raw_page('test_rel_forks', 'vm', 0)) AS vm_0;
  vm_0 
 ------
  8192
 (1 row)
 
-SELECT octet_length(get_raw_page('test1', 'vm', 1)) AS vm_1;
-ERROR:  block number 1 is out of range for relation "test1"
+SELECT octet_length(get_raw_page('test_rel_forks', 'vm', 1)) AS vm_1;
+ERROR:  block number 1 is out of range for relation "test_rel_forks"
 SELECT octet_length(get_raw_page('xxx', 'main', 0));
 ERROR:  relation "xxx" does not exist
-SELECT octet_length(get_raw_page('test1', 'xxx', 0));
+SELECT octet_length(get_raw_page('test_rel_forks', 'xxx', 0));
 ERROR:  invalid fork name
 HINT:  Valid fork names are "main", "fsm", "vm", and "init".
-SELECT get_raw_page('test1', 0) = get_raw_page('test1', 'main', 0);
+SELECT * FROM fsm_page_contents(get_raw_page('test_rel_forks', 'fsm', 0));
+ fsm_page_contents 
+-------------------
+ 0: 192           +
+ 1: 192           +
+ 3: 192           +
+ 7: 192           +
+ 15: 192          +
+ 31: 192          +
+ 63: 192          +
+ 127: 192         +
+ 255: 192         +
+ 511: 192         +
+ 1023: 192        +
+ 2047: 192        +
+ 4095: 192        +
+ fp_next_slot: 0  +
+ 
+(1 row)
+
+SELECT get_raw_page('test_rel_forks', 0) = get_raw_page('test_rel_forks', 'main', 0);
  ?column? 
 ----------
  t
 (1 row)
 
+DROP TABLE test_rel_forks;
+CREATE TABLE test1 (a int, b int);
+INSERT INTO test1 VALUES (16777217, 131584);
 SELECT pagesize, version FROM page_header(get_raw_page('test1', 0));
  pagesize | version 
 ----------+---------
@@ -62,26 +83,6 @@ SELECT tuple_data_split('test1'::regclass, t_data, t_infomask, t_infomask2, t_bi
  {"\\x01000001","\\x00020200"}
 (1 row)
 
-SELECT * FROM fsm_page_contents(get_raw_page('test1', 'fsm', 0));
- fsm_page_contents 
--------------------
- 0: 254           +
- 1: 254           +
- 3: 254           +
- 7: 254           +
- 15: 254          +
- 31: 254          +
- 63: 254          +
- 127: 254         +
- 255: 254         +
- 511: 254         +
- 1023: 254        +
- 2047: 254        +
- 4095: 254        +
- fp_next_slot: 0  +
- 
-(1 row)
-
 DROP TABLE test1;
 -- check that using any of these functions with a partitioned table or index
 -- would fail
diff --git a/contrib/pageinspect/sql/page.sql b/contrib/pageinspect/sql/page.sql
index 8ac9991837..ee811759d5 100644
--- a/contrib/pageinspect/sql/page.sql
+++ b/contrib/pageinspect/sql/page.sql
@@ -1,26 +1,35 @@
 CREATE EXTENSION pageinspect;
 
-CREATE TABLE test1 (a int, b int);
-INSERT INTO test1 VALUES (16777217, 131584);
+CREATE TABLE test_rel_forks (a int);
+-- Make sure there are enough blocks in the heap for the FSM to be created.
+INSERT INTO test_rel_forks SELECT g from generate_series(1,10000) g;
 
-VACUUM test1;  -- set up FSM
+-- set up FSM and VM
+VACUUM test_rel_forks;
 
 -- The page contents can vary, so just test that it can be read
 -- successfully, but don't keep the output.
 
-SELECT octet_length(get_raw_page('test1', 'main', 0)) AS main_0;
-SELECT octet_length(get_raw_page('test1', 'main', 1)) AS main_1;
+SELECT octet_length(get_raw_page('test_rel_forks', 'main', 0)) AS main_0;
+SELECT octet_length(get_raw_page('test_rel_forks', 'main', 100)) AS main_100;
 
-SELECT octet_length(get_raw_page('test1', 'fsm', 0)) AS fsm_0;
-SELECT octet_length(get_raw_page('test1', 'fsm', 1)) AS fsm_1;
+SELECT octet_length(get_raw_page('test_rel_forks', 'fsm', 0)) AS fsm_0;
+SELECT octet_length(get_raw_page('test_rel_forks', 'fsm', 10)) AS fsm_10;
 
-SELECT octet_length(get_raw_page('test1', 'vm', 0)) AS vm_0;
-SELECT octet_length(get_raw_page('test1', 'vm', 1)) AS vm_1;
+SELECT octet_length(get_raw_page('test_rel_forks', 'vm', 0)) AS vm_0;
+SELECT octet_length(get_raw_page('test_rel_forks', 'vm', 1)) AS vm_1;
 
 SELECT octet_length(get_raw_page('xxx', 'main', 0));
-SELECT octet_length(get_raw_page('test1', 'xxx', 0));
+SELECT octet_length(get_raw_page('test_rel_forks', 'xxx', 0));
+
+SELECT * FROM fsm_page_contents(get_raw_page('test_rel_forks', 'fsm', 0));
+
+SELECT get_raw_page('test_rel_forks', 0) = get_raw_page('test_rel_forks', 'main', 0);
 
-SELECT get_raw_page('test1', 0) = get_raw_page('test1', 'main', 0);
+DROP TABLE test_rel_forks;
+
+CREATE TABLE test1 (a int, b int);
+INSERT INTO test1 VALUES (16777217, 131584);
 
 SELECT pagesize, version FROM page_header(get_raw_page('test1', 0));
 
@@ -29,8 +38,6 @@ SELECT page_checksum(get_raw_page('test1', 0), 0) IS NOT NULL AS silly_checksum_
 SELECT tuple_data_split('test1'::regclass, t_data, t_infomask, t_infomask2, t_bits)
     FROM heap_page_items(get_raw_page('test1', 0));
 
-SELECT * FROM fsm_page_contents(get_raw_page('test1', 'fsm', 0));
-
 DROP TABLE test1;
 
 -- check that using any of these functions with a partitioned table or index
diff --git a/doc/src/sgml/storage.sgml b/doc/src/sgml/storage.sgml
index 8ef2ac8010..cbdad0c3fb 100644
--- a/doc/src/sgml/storage.sgml
+++ b/doc/src/sgml/storage.sgml
@@ -590,12 +590,13 @@ tuple would otherwise be too big.
 <indexterm><primary>FSM</primary><see>Free Space Map</see></indexterm>
 
 <para>
-Each heap and index relation, except for hash indexes, has a Free Space Map
-(FSM) to keep track of available space in the relation. It's stored
-alongside the main relation data in a separate relation fork, named after the
-filenode number of the relation, plus a <literal>_fsm</literal> suffix. For example,
-if the filenode of a relation is 12345, the FSM is stored in a file called
-<filename>12345_fsm</filename>, in the same directory as the main relation file.
+Each heap relation, unless it is very small, and each index relation, except
+for hash indexes, has a Free Space Map (FSM) to keep track of available
+space in the relation. It's stored alongside the main relation data in a
+separate relation fork, named after the filenode number of the relation, plus
+a <literal>_fsm</literal> suffix. For example, if the filenode of a relation
+is 12345, the FSM is stored in a file called <filename>12345_fsm</filename>,
+in the same directory as the main relation file.
 </para>
 
 <para>
diff --git a/src/backend/access/brin/brin.c b/src/backend/access/brin/brin.c
index e95fbbcea7..7c5b1af764 100644
--- a/src/backend/access/brin/brin.c
+++ b/src/backend/access/brin/brin.c
@@ -1148,7 +1148,7 @@ terminate_brin_buildstate(BrinBuildState *state)
 		freespace = PageGetFreeSpace(page);
 		blk = BufferGetBlockNumber(state->bs_currentInsertBuf);
 		ReleaseBuffer(state->bs_currentInsertBuf);
-		RecordPageWithFreeSpace(state->bs_irel, blk, freespace);
+		RecordPageWithFreeSpace(state->bs_irel, blk, freespace, InvalidBlockNumber);
 		FreeSpaceMapVacuumRange(state->bs_irel, blk, blk + 1);
 	}
 
diff --git a/src/backend/access/brin/brin_pageops.c b/src/backend/access/brin/brin_pageops.c
index 040cb62e55..cd10458ddc 100644
--- a/src/backend/access/brin/brin_pageops.c
+++ b/src/backend/access/brin/brin_pageops.c
@@ -310,7 +310,7 @@ brin_doupdate(Relation idxrel, BlockNumber pagesPerRange,
 
 		if (extended)
 		{
-			RecordPageWithFreeSpace(idxrel, newblk, freespace);
+			RecordPageWithFreeSpace(idxrel, newblk, freespace, InvalidBlockNumber);
 			FreeSpaceMapVacuumRange(idxrel, newblk, newblk + 1);
 		}
 
@@ -461,7 +461,7 @@ brin_doinsert(Relation idxrel, BlockNumber pagesPerRange,
 
 	if (extended)
 	{
-		RecordPageWithFreeSpace(idxrel, blk, freespace);
+		RecordPageWithFreeSpace(idxrel, blk, freespace, InvalidBlockNumber);
 		FreeSpaceMapVacuumRange(idxrel, blk, blk + 1);
 	}
 
@@ -654,7 +654,7 @@ brin_page_cleanup(Relation idxrel, Buffer buf)
 
 	/* Measure free space and record it */
 	RecordPageWithFreeSpace(idxrel, BufferGetBlockNumber(buf),
-							br_page_get_freespace(page));
+							br_page_get_freespace(page), InvalidBlockNumber);
 }
 
 /*
@@ -703,7 +703,7 @@ brin_getinsertbuffer(Relation irel, Buffer oldbuf, Size itemsz,
 	/* Choose initial target page, re-using existing target if known */
 	newblk = RelationGetTargetBlock(irel);
 	if (newblk == InvalidBlockNumber)
-		newblk = GetPageWithFreeSpace(irel, itemsz);
+		newblk = GetPageWithFreeSpace(irel, itemsz, true);
 
 	/*
 	 * Loop until we find a page with sufficient free space.  By the time we
@@ -895,7 +895,7 @@ brin_initialize_empty_new_buffer(Relation idxrel, Buffer buffer)
 	 * pages whose FSM records were forgotten in a crash.
 	 */
 	RecordPageWithFreeSpace(idxrel, BufferGetBlockNumber(buffer),
-							br_page_get_freespace(page));
+							br_page_get_freespace(page), InvalidBlockNumber);
 }
 
 
diff --git a/src/backend/access/heap/hio.c b/src/backend/access/heap/hio.c
index b8b5871559..e59568e47e 100644
--- a/src/backend/access/heap/hio.c
+++ b/src/backend/access/heap/hio.c
@@ -239,8 +239,14 @@ RelationAddExtraBlocks(Relation relation, BulkInsertState bistate)
 		 * Immediately update the bottom level of the FSM.  This has a good
 		 * chance of making this page visible to other concurrently inserting
 		 * backends, and we want that to happen without delay.
+		 *
+		 * Since we know the table will end up with extraBlocks additional
+		 * pages, we pass the final number to avoid possible unnecessary
+		 * system calls and to make sure the FSM is created when we add
+		 * the first new page.
 		 */
-		RecordPageWithFreeSpace(relation, blockNum, freespace);
+		RecordPageWithFreeSpace(relation, blockNum, freespace,
+								firstBlock + extraBlocks);
 	}
 	while (--extraBlocks > 0);
 
@@ -377,20 +383,9 @@ RelationGetBufferForTuple(Relation relation, Size len,
 		 * We have no cached target page, so ask the FSM for an initial
 		 * target.
 		 */
-		targetBlock = GetPageWithFreeSpace(relation, len + saveFreeSpace);
-
-		/*
-		 * If the FSM knows nothing of the rel, try the last page before we
-		 * give up and extend.  This avoids one-tuple-per-page syndrome during
-		 * bootstrapping or in a recently-started system.
-		 */
-		if (targetBlock == InvalidBlockNumber)
-		{
-			BlockNumber nblocks = RelationGetNumberOfBlocks(relation);
-
-			if (nblocks > 0)
-				targetBlock = nblocks - 1;
-		}
+		targetBlock = GetPageWithFreeSpace(relation,
+										   len + saveFreeSpace,
+										   false);
 	}
 
 loop:
@@ -484,6 +479,14 @@ loop:
 		{
 			/* use this page as future insert target, too */
 			RelationSetTargetBlock(relation, targetBlock);
+
+			/*
+			 * In case we used an in-memory map of available blocks, reset
+			 * it for next use.
+			 */
+			if (targetBlock < HEAP_FSM_CREATION_THRESHOLD)
+				FSMClearLocalMap();
+
 			return buffer;
 		}
 
@@ -543,9 +546,12 @@ loop:
 
 			/*
 			 * Check if some other backend has extended a block for us while
-			 * we were waiting on the lock.
+			 * we were waiting on the lock.  We only check the FSM -- if there
+			 * isn't one we don't recheck the number of blocks.
 			 */
-			targetBlock = GetPageWithFreeSpace(relation, len + saveFreeSpace);
+			targetBlock = GetPageWithFreeSpace(relation,
+											   len + saveFreeSpace,
+											   true);
 
 			/*
 			 * If some other waiter has already extended the relation, we
@@ -625,5 +631,12 @@ loop:
 	 */
 	RelationSetTargetBlock(relation, BufferGetBlockNumber(buffer));
 
+	/*
+	 * In case we used an in-memory map of available blocks, reset
+	 * it for next use.  We do this unconditionally since after relation
+	 * extension we can't skip this based on the targetBlock.
+	 */
+	FSMClearLocalMap();
+
 	return buffer;
 }
diff --git a/src/backend/access/transam/xact.c b/src/backend/access/transam/xact.c
index d967400384..fa0620b301 100644
--- a/src/backend/access/transam/xact.c
+++ b/src/backend/access/transam/xact.c
@@ -48,6 +48,7 @@
 #include "replication/walsender.h"
 #include "storage/condition_variable.h"
 #include "storage/fd.h"
+#include "storage/freespace.h"
 #include "storage/lmgr.h"
 #include "storage/predicate.h"
 #include "storage/proc.h"
@@ -2488,6 +2489,12 @@ AbortTransaction(void)
 	pgstat_report_wait_end();
 	pgstat_progress_end_command();
 
+	/*
+	 * In case we aborted during RelationGetBufferForTuple(),
+	 * clear the local map of heap pages.
+	 */
+	FSMClearLocalMap();
+
 	/* Clean up buffer I/O and buffer context locks, too */
 	AbortBufferIO();
 	UnlockBuffers();
@@ -4709,6 +4716,13 @@ AbortSubTransaction(void)
 
 	pgstat_report_wait_end();
 	pgstat_progress_end_command();
+
+	/*
+	 * In case we aborted during RelationGetBufferForTuple(),
+	 * clear the local map of heap pages.
+	 */
+	FSMClearLocalMap();
+
 	AbortBufferIO();
 	UnlockBuffers();
 
diff --git a/src/backend/commands/vacuumlazy.c b/src/backend/commands/vacuumlazy.c
index 8134c52253..d2818dfad4 100644
--- a/src/backend/commands/vacuumlazy.c
+++ b/src/backend/commands/vacuumlazy.c
@@ -154,7 +154,7 @@ static BufferAccessStrategy vac_strategy;
 static void lazy_scan_heap(Relation onerel, int options,
 			   LVRelStats *vacrelstats, Relation *Irel, int nindexes,
 			   bool aggressive);
-static void lazy_vacuum_heap(Relation onerel, LVRelStats *vacrelstats);
+static void lazy_vacuum_heap(Relation onerel, LVRelStats *vacrelstats, BlockNumber nblocks);
 static bool lazy_check_needs_freeze(Buffer buf, bool *hastup);
 static void lazy_vacuum_index(Relation indrel,
 				  IndexBulkDeleteResult **stats,
@@ -759,7 +759,7 @@ lazy_scan_heap(Relation onerel, int options, LVRelStats *vacrelstats,
 			pgstat_progress_update_multi_param(2, hvp_index, hvp_val);
 
 			/* Remove tuples from heap */
-			lazy_vacuum_heap(onerel, vacrelstats);
+			lazy_vacuum_heap(onerel, vacrelstats, nblocks);
 
 			/*
 			 * Forget the now-vacuumed tuples, and press on, but be careful
@@ -897,7 +897,7 @@ lazy_scan_heap(Relation onerel, int options, LVRelStats *vacrelstats,
 			MarkBufferDirty(buf);
 			UnlockReleaseBuffer(buf);
 
-			RecordPageWithFreeSpace(onerel, blkno, freespace);
+			RecordPageWithFreeSpace(onerel, blkno, freespace, nblocks);
 			continue;
 		}
 
@@ -936,7 +936,7 @@ lazy_scan_heap(Relation onerel, int options, LVRelStats *vacrelstats,
 			}
 
 			UnlockReleaseBuffer(buf);
-			RecordPageWithFreeSpace(onerel, blkno, freespace);
+			RecordPageWithFreeSpace(onerel, blkno, freespace, nblocks);
 			continue;
 		}
 
@@ -1333,7 +1333,7 @@ lazy_scan_heap(Relation onerel, int options, LVRelStats *vacrelstats,
 		 * taken if there are no indexes.)
 		 */
 		if (vacrelstats->num_dead_tuples == prev_dead_count)
-			RecordPageWithFreeSpace(onerel, blkno, freespace);
+			RecordPageWithFreeSpace(onerel, blkno, freespace, nblocks);
 	}
 
 	/* report that everything is scanned and vacuumed */
@@ -1395,7 +1395,7 @@ lazy_scan_heap(Relation onerel, int options, LVRelStats *vacrelstats,
 		/* Remove tuples from heap */
 		pgstat_progress_update_param(PROGRESS_VACUUM_PHASE,
 									 PROGRESS_VACUUM_PHASE_VACUUM_HEAP);
-		lazy_vacuum_heap(onerel, vacrelstats);
+		lazy_vacuum_heap(onerel, vacrelstats, nblocks);
 		vacrelstats->num_index_scans++;
 	}
 
@@ -1466,9 +1466,10 @@ lazy_scan_heap(Relation onerel, int options, LVRelStats *vacrelstats,
  * Note: the reason for doing this as a second pass is we cannot remove
  * the tuples until we've removed their index entries, and we want to
  * process index entry removal in batches as large as possible.
+ * Note: nblocks is passed as an optimization for RecordPageWithFreeSpace().
  */
 static void
-lazy_vacuum_heap(Relation onerel, LVRelStats *vacrelstats)
+lazy_vacuum_heap(Relation onerel, LVRelStats *vacrelstats, BlockNumber nblocks)
 {
 	int			tupindex;
 	int			npages;
@@ -1505,7 +1506,7 @@ lazy_vacuum_heap(Relation onerel, LVRelStats *vacrelstats)
 		freespace = PageGetHeapFreeSpace(page);
 
 		UnlockReleaseBuffer(buf);
-		RecordPageWithFreeSpace(onerel, tblk, freespace);
+		RecordPageWithFreeSpace(onerel, tblk, freespace, nblocks);
 		npages++;
 	}
 
diff --git a/src/backend/storage/freespace/README b/src/backend/storage/freespace/README
index e7ff23b76f..77e4992728 100644
--- a/src/backend/storage/freespace/README
+++ b/src/backend/storage/freespace/README
@@ -8,7 +8,16 @@ free space to hold a tuple to be stored; or to determine that no such page
 exists and the relation must be extended by one page.  As of PostgreSQL 8.4
 each relation has its own, extensible free space map stored in a separate
 "fork" of its relation.  This eliminates the disadvantages of the former
-fixed-size FSM.
+fixed-size FSM.  There are two exceptions:
+
+1. Hash indexes never have a FSM.
+2. For very small heap relations, the FSM would be relatively large and
+wasteful, so as of PostgreSQL 12 we refrain from creating the FSM for
+heaps with HEAP_FSM_CREATION_THRESHOLD pages or fewer, both to save space
+and to improve performance.  To locate free space in this case, we simply
+iterate over the heap, trying alternating pages in turn.  There may be some
+wasted free space in this case, but it becomes visible again upon next
+relation extension.
 
 It is important to keep the map small so that it can be searched rapidly.
 Therefore, we don't attempt to record the exact free space on a page.
@@ -192,5 +201,3 @@ TODO
 ----
 
 - fastroot to avoid traversing upper nodes with just 1 child
-- use a different system for tables that fit into one FSM page, with a
-  mechanism to switch to the real thing as it grows.
diff --git a/src/backend/storage/freespace/freespace.c b/src/backend/storage/freespace/freespace.c
index 7c4ad1c449..8edb2841ae 100644
--- a/src/backend/storage/freespace/freespace.c
+++ b/src/backend/storage/freespace/freespace.c
@@ -76,6 +76,14 @@
 #define FSM_ROOT_LEVEL	(FSM_TREE_DEPTH - 1)
 #define FSM_BOTTOM_LEVEL 0
 
+/* Status codes for the local map. */
+
+/* Either already tried, or beyond the end of the relation */
+#define FSM_LOCAL_NOT_AVAIL 0x00
+
+/* Available to try */
+#define FSM_LOCAL_AVAIL		0x01
+
 /*
  * The internal FSM routines work on a logical addressing scheme. Each
  * level of the tree can be thought of as a separately addressable file.
@@ -89,6 +97,15 @@ typedef struct
 /* Address of the root page. */
 static const FSMAddress FSM_ROOT_ADDRESS = {FSM_ROOT_LEVEL, 0};
 
+/* Local map of block numbers for small heaps with no FSM. */
+typedef struct
+{
+	BlockNumber nblocks;
+	char		map[HEAP_FSM_CREATION_THRESHOLD];
+} FSMLocalMap;
+
+static FSMLocalMap fsm_local_map = {0, {FSM_LOCAL_NOT_AVAIL}};
+
 /* functions to navigate the tree */
 static FSMAddress fsm_get_child(FSMAddress parent, uint16 slot);
 static FSMAddress fsm_get_parent(FSMAddress child, uint16 *slot);
@@ -107,10 +124,14 @@ static Size fsm_space_cat_to_avail(uint8 cat);
 /* workhorse functions for various operations */
 static int fsm_set_and_search(Relation rel, FSMAddress addr, uint16 slot,
 				   uint8 newValue, uint8 minValue);
+static void fsm_local_set(Relation rel, BlockNumber curr_nblocks);
 static BlockNumber fsm_search(Relation rel, uint8 min_cat);
+static BlockNumber fsm_local_search(void);
 static uint8 fsm_vacuum_page(Relation rel, FSMAddress addr,
 				BlockNumber start, BlockNumber end,
 				bool *eof);
+static bool fsm_allow_writes(Relation rel, BlockNumber heapblk,
+				BlockNumber nblocks, BlockNumber *get_nblocks);
 
 
 /******** Public API ********/
@@ -127,13 +148,45 @@ static uint8 fsm_vacuum_page(Relation rel, FSMAddress addr,
  * amount of free space available on that page and then try again (see
  * RecordAndGetPageWithFreeSpace).  If InvalidBlockNumber is returned,
  * extend the relation.
+ *
+ * For very small heap relations that don't have a FSM, we try every other
+ * page before extending the relation.  To keep track of which pages have
+ * been tried, initialize a local in-memory map of pages.
  */
 BlockNumber
-GetPageWithFreeSpace(Relation rel, Size spaceNeeded)
+GetPageWithFreeSpace(Relation rel, Size spaceNeeded, bool check_fsm_only)
 {
 	uint8		min_cat = fsm_space_needed_to_cat(spaceNeeded);
+	BlockNumber target_block,
+				nblocks;
+
+	/* First try the FSM, if it exists. */
+	target_block = fsm_search(rel, min_cat);
+
+	if (target_block == InvalidBlockNumber &&
+		rel->rd_rel->relkind == RELKIND_RELATION &&
+		!check_fsm_only)
+	{
+		nblocks = RelationGetNumberOfBlocks(rel);
+
+		if (nblocks > HEAP_FSM_CREATION_THRESHOLD)
+		{
+			/*
+			 * If the FSM knows nothing of the rel, try the last page before
+			 * we give up and extend.  This avoids one-tuple-per-page syndrome
+			 * during bootstrapping or in a recently-started system.
+			 */
+			target_block = nblocks - 1;
+		}
+		else if (nblocks > 0)
+		{
+			/* Create or update local map and get first candidate block. */
+			fsm_local_set(rel, nblocks);
+			target_block = fsm_local_search();
+		}
+	}
 
-	return fsm_search(rel, min_cat);
+	return target_block;
 }
 
 /*
@@ -144,16 +197,46 @@ GetPageWithFreeSpace(Relation rel, Size spaceNeeded)
  * also some effort to return a page close to the old page; if there's a
  * page with enough free space on the same FSM page where the old one page
  * is located, it is preferred.
+ *
+ * For very small heap relations that don't have a FSM, we update the local
+ * map to indicate we have tried a page, and return the next page to try.
  */
 BlockNumber
 RecordAndGetPageWithFreeSpace(Relation rel, BlockNumber oldPage,
 							  Size oldSpaceAvail, Size spaceNeeded)
 {
-	int			old_cat = fsm_space_avail_to_cat(oldSpaceAvail);
-	int			search_cat = fsm_space_needed_to_cat(spaceNeeded);
+	int			old_cat;
+	int			search_cat;
 	FSMAddress	addr;
 	uint16		slot;
 	int			search_slot;
+	BlockNumber nblocks = InvalidBlockNumber;
+
+	/* First try the local map, if it exists. */
+	if (oldPage < fsm_local_map.nblocks)
+	{
+		Assert(rel->rd_rel->relkind == RELKIND_RELATION &&
+			   fsm_local_map.map[oldPage] == FSM_LOCAL_AVAIL);
+
+		fsm_local_map.map[oldPage] = FSM_LOCAL_NOT_AVAIL;
+		return fsm_local_search();
+	}
+
+	if (!fsm_allow_writes(rel, oldPage, InvalidBlockNumber, &nblocks))
+	{
+		/*
+		 * If we have neither a local map nor a FSM, we probably just
+		 * tried the target block in the smgr relation entry and failed,
+		 * so we'll need to create the local map.
+		 */
+		fsm_local_set(rel, nblocks);
+		return fsm_local_search();
+	}
+
+	/* Normal FSM logic follows */
+
+	old_cat = fsm_space_avail_to_cat(oldSpaceAvail);
+	search_cat = fsm_space_needed_to_cat(spaceNeeded);
 
 	/* Get the location of the FSM byte representing the heap block */
 	addr = fsm_get_location(oldPage, &slot);
@@ -176,20 +259,40 @@ RecordAndGetPageWithFreeSpace(Relation rel, BlockNumber oldPage,
  * Note that if the new spaceAvail value is higher than the old value stored
  * in the FSM, the space might not become visible to searchers until the next
  * FreeSpaceMapVacuum call, which updates the upper level pages.
+ *
+ * Callers have no need for a local map.
  */
 void
-RecordPageWithFreeSpace(Relation rel, BlockNumber heapBlk, Size spaceAvail)
+RecordPageWithFreeSpace(Relation rel, BlockNumber heapBlk,
+						Size spaceAvail, BlockNumber nblocks)
 {
-	int			new_cat = fsm_space_avail_to_cat(spaceAvail);
+	int			new_cat;
 	FSMAddress	addr;
 	uint16		slot;
+	BlockNumber dummy;
+
+	if (!fsm_allow_writes(rel, heapBlk, nblocks, &dummy))
+		/* No FSM to update and no local map either */
+		return;
 
 	/* Get the location of the FSM byte representing the heap block */
 	addr = fsm_get_location(heapBlk, &slot);
 
+	new_cat = fsm_space_avail_to_cat(spaceAvail);
 	fsm_set_and_search(rel, addr, slot, new_cat, 0);
 }
 
+/*
+ * Clear the local map.  We must call this when we have found a block with
+ * enough free space, when we extend the relation, or on transaction abort.
+ */
+void
+FSMClearLocalMap(void)
+{
+	fsm_local_map.nblocks = 0;
+	memset(&fsm_local_map.map, 0, sizeof(fsm_local_map.map));
+}
+
 /*
  * XLogRecordPageWithFreeSpace - like RecordPageWithFreeSpace, for use in
  *		WAL replay
@@ -204,6 +307,30 @@ XLogRecordPageWithFreeSpace(RelFileNode rnode, BlockNumber heapBlk,
 	BlockNumber blkno;
 	Buffer		buf;
 	Page		page;
+	bool		write_to_fsm;
+
+	/* This is meant to mirror the logic in fsm_allow_writes() */
+	if (heapBlk >= HEAP_FSM_CREATION_THRESHOLD)
+		write_to_fsm = true;
+	else
+	{
+		/* Open the relation at smgr level */
+		SMgrRelation smgr = smgropen(rnode, InvalidBackendId);
+
+		if (smgrexists(smgr, FSM_FORKNUM))
+			write_to_fsm = true;
+		else
+		{
+			BlockNumber heap_nblocks = smgrnblocks(smgr, MAIN_FORKNUM);
+			if (heap_nblocks > HEAP_FSM_CREATION_THRESHOLD)
+				write_to_fsm = true;
+			else
+				write_to_fsm = false;
+		}
+	}
+
+	if (!write_to_fsm)
+		return;
 
 	/* Get the location of the FSM byte representing the heap block */
 	addr = fsm_get_location(heapBlk, &slot);
@@ -904,3 +1031,126 @@ fsm_vacuum_page(Relation rel, FSMAddress addr,
 
 	return max_avail;
 }
+
+/*
+ * For heaps we prevent creation of the FSM unless the number of pages
+ * exceeds HEAP_FSM_CREATION_THRESHOLD.  For tables that don't already have
+ * a FSM, this will save an inode and a few kB of space.
+ *
+ * XXX The API is a little awkward -- if the caller passes a valid nblocks
+ * value, it can avoid invoking a system call.  If the caller passes
+ * InvalidBlockNumber and receives a false return value, it can get an
+ * up-to-date relation size from get_nblocks.
+ */
+static bool
+fsm_allow_writes(Relation rel, BlockNumber heapblk,
+				 BlockNumber nblocks, BlockNumber *get_nblocks)
+{
+	bool		skip_get_nblocks;
+
+	if (heapblk >= HEAP_FSM_CREATION_THRESHOLD)
+		return true;
+
+	/* Non-heap rels can always create a FSM. */
+	if (rel->rd_rel->relkind != RELKIND_RELATION)
+		return true;
+
+	/*
+	 * If the caller knows nblocks, we can avoid a system call later.
+	 * If it doesn't, maybe we have relpages from a previous VACUUM.
+	 * Since the table may have extended since then, we still have to
+	 * count the pages later if we can't return now.
+	 */
+	if (nblocks != InvalidBlockNumber)
+	{
+		if (nblocks > HEAP_FSM_CREATION_THRESHOLD)
+			return true;
+		else
+			skip_get_nblocks = true;
+	}
+	else
+	{
+		if (rel->rd_rel->relpages != InvalidBlockNumber &&
+			rel->rd_rel->relpages > HEAP_FSM_CREATION_THRESHOLD)
+			return true;
+		else
+			skip_get_nblocks = false;
+	}
+
+	RelationOpenSmgr(rel);
+	if (smgrexists(rel->rd_smgr, FSM_FORKNUM))
+		return true;
+
+	if (skip_get_nblocks)
+		return false;
+
+	/* last resort */
+	*get_nblocks = RelationGetNumberOfBlocks(rel);
+	if (*get_nblocks > HEAP_FSM_CREATION_THRESHOLD)
+		return true;
+	else
+		return false;
+}
+
+/*
+ * Initialize or update the local map of blocks to try, for when there is
+ * no FSM.
+ *
+ * When we initialize the map, the whole heap is potentially available to
+ * try.  If a caller wanted to reset the map after another backend extends
+ * the relation, this will only flag new blocks as available.  No callers
+ * do this currently, however.
+ */
+static void
+fsm_local_set(Relation rel, BlockNumber curr_nblocks)
+{
+	BlockNumber blkno,
+				cached_target_block;
+
+	/*
+	 * Starting at the current last block in the relation and working
+	 * backwards, mark alternating blocks as available, ending just after
+	 * the last block we have mapped.
+	 */
+	blkno = curr_nblocks - 1;
+	for (;;)
+	{
+		fsm_local_map.map[blkno] = FSM_LOCAL_AVAIL;
+		if (blkno >= fsm_local_map.nblocks + 2)
+			blkno -= 2;
+		else
+			break;
+	}
+
+	/* Cache the number of blocks. */
+	fsm_local_map.nblocks = curr_nblocks;
+
+	/* Set the status of the cached target block to 'unavailable'. */
+	cached_target_block = RelationGetTargetBlock(rel);
+	if (cached_target_block != InvalidBlockNumber &&
+		cached_target_block < curr_nblocks)
+		fsm_local_map.map[cached_target_block] = FSM_LOCAL_NOT_AVAIL;
+}
+
+/*
+ * Search the local map for an available block to try, in descending order.
+ *
+ * For use when there is no FSM.
+ */
+static BlockNumber
+fsm_local_search(void)
+{
+	BlockNumber		target_block = fsm_local_map.nblocks;
+
+	Assert(target_block > 0);
+
+	do
+	{
+		target_block--;
+		if (fsm_local_map.map[target_block] == FSM_LOCAL_AVAIL)
+			return target_block;
+	}
+	while (target_block > 0);
+
+	return InvalidBlockNumber;
+}
diff --git a/src/backend/storage/freespace/indexfsm.c b/src/backend/storage/freespace/indexfsm.c
index e21047b96f..88a71ae548 100644
--- a/src/backend/storage/freespace/indexfsm.c
+++ b/src/backend/storage/freespace/indexfsm.c
@@ -37,7 +37,7 @@
 BlockNumber
 GetFreeIndexPage(Relation rel)
 {
-	BlockNumber blkno = GetPageWithFreeSpace(rel, BLCKSZ / 2);
+	BlockNumber blkno = GetPageWithFreeSpace(rel, BLCKSZ / 2, true);
 
 	if (blkno != InvalidBlockNumber)
 		RecordUsedIndexPage(rel, blkno);
@@ -51,7 +51,7 @@ GetFreeIndexPage(Relation rel)
 void
 RecordFreeIndexPage(Relation rel, BlockNumber freeBlock)
 {
-	RecordPageWithFreeSpace(rel, freeBlock, BLCKSZ - 1);
+	RecordPageWithFreeSpace(rel, freeBlock, BLCKSZ - 1, InvalidBlockNumber);
 }
 
 
@@ -61,7 +61,7 @@ RecordFreeIndexPage(Relation rel, BlockNumber freeBlock)
 void
 RecordUsedIndexPage(Relation rel, BlockNumber usedBlock)
 {
-	RecordPageWithFreeSpace(rel, usedBlock, 0);
+	RecordPageWithFreeSpace(rel, usedBlock, 0, InvalidBlockNumber);
 }
 
 /*
diff --git a/src/include/storage/freespace.h b/src/include/storage/freespace.h
index 726eb30fb8..b6f5b86ee5 100644
--- a/src/include/storage/freespace.h
+++ b/src/include/storage/freespace.h
@@ -18,15 +18,20 @@
 #include "storage/relfilenode.h"
 #include "utils/relcache.h"
 
+/* Only create the FSM if the heap has greater than this many blocks */
+#define HEAP_FSM_CREATION_THRESHOLD 4
+
 /* prototypes for public functions in freespace.c */
 extern Size GetRecordedFreeSpace(Relation rel, BlockNumber heapBlk);
-extern BlockNumber GetPageWithFreeSpace(Relation rel, Size spaceNeeded);
+extern BlockNumber GetPageWithFreeSpace(Relation rel, Size spaceNeeded,
+							bool check_fsm_only);
 extern BlockNumber RecordAndGetPageWithFreeSpace(Relation rel,
 							  BlockNumber oldPage,
 							  Size oldSpaceAvail,
 							  Size spaceNeeded);
 extern void RecordPageWithFreeSpace(Relation rel, BlockNumber heapBlk,
-						Size spaceAvail);
+						Size spaceAvail, BlockNumber nblocks);
+extern void FSMClearLocalMap(void);
 extern void XLogRecordPageWithFreeSpace(RelFileNode rnode, BlockNumber heapBlk,
 							Size spaceAvail);
 
diff --git a/src/test/regress/expected/fsm.out b/src/test/regress/expected/fsm.out
new file mode 100644
index 0000000000..bf590bfa58
--- /dev/null
+++ b/src/test/regress/expected/fsm.out
@@ -0,0 +1,62 @@
+--
+-- Free Space Map test
+--
+CREATE TABLE fsm_check_size (num int, str text);
+-- Fill 3 blocks with as many large records as will fit
+-- No FSM
+INSERT INTO fsm_check_size SELECT g, rpad('', 1024, 'a')
+FROM generate_series(1,7*3) g;
+VACUUM fsm_check_size;
+SELECT pg_relation_size('fsm_check_size', 'main') AS heap_size,
+pg_relation_size('fsm_check_size', 'fsm') AS fsm_size;
+ heap_size | fsm_size 
+-----------+----------
+     24576 |        0
+(1 row)
+
+-- Clear some space on block 0
+DELETE FROM fsm_check_size where num <= 5;
+VACUUM fsm_check_size;
+-- Insert small record in block 2 to set the cached smgr targetBlock
+INSERT INTO fsm_check_size values(99, 'b');
+-- Insert large record and make sure it goes in block 0 rather than
+-- causing the relation to extend
+INSERT INTO fsm_check_size values (101, rpad('', 1024, 'a'));
+SELECT pg_relation_size('fsm_check_size', 'main') AS heap_size,
+pg_relation_size('fsm_check_size', 'fsm') AS fsm_size;
+ heap_size | fsm_size 
+-----------+----------
+     24576 |        0
+(1 row)
+
+-- Extend table with enough blocks to exceed the FSM threshold
+-- FSM is created and extended to 3 blocks
+INSERT INTO fsm_check_size SELECT g, 'c' FROM generate_series(200,3000) g;
+VACUUM fsm_check_size;
+SELECT pg_relation_size('fsm_check_size', 'fsm') AS fsm_size;
+ fsm_size 
+----------
+    24576
+(1 row)
+
+-- Truncate heap to 1 block
+-- No change in FSM
+DELETE FROM fsm_check_size WHERE num > 7;
+VACUUM fsm_check_size;
+SELECT pg_relation_size('fsm_check_size', 'fsm') AS fsm_size;
+ fsm_size 
+----------
+    24576
+(1 row)
+
+-- Truncate heap to 0 blocks
+-- FSM now truncated to 2 blocks
+DELETE FROM fsm_check_size;
+VACUUM fsm_check_size;
+SELECT pg_relation_size('fsm_check_size', 'fsm') AS fsm_size;
+ fsm_size 
+----------
+    16384
+(1 row)
+
+DROP TABLE fsm_check_size;
diff --git a/src/test/regress/parallel_schedule b/src/test/regress/parallel_schedule
index cc0bbf5db9..4051a4ad4e 100644
--- a/src/test/regress/parallel_schedule
+++ b/src/test/regress/parallel_schedule
@@ -68,6 +68,12 @@ test: create_aggregate create_function_3 create_cast constraints triggers inheri
 # ----------
 test: sanity_check
 
+# ----------
+# fsm does a delete followed by vacuum, and running it in parallel can prevent
+# removal of rows.
+# ----------
+test: fsm
+
 # ----------
 # Believe it or not, select creates a table, subsequent
 # tests need.
diff --git a/src/test/regress/serial_schedule b/src/test/regress/serial_schedule
index 0c10c7100c..ac1ea622d6 100644
--- a/src/test/regress/serial_schedule
+++ b/src/test/regress/serial_schedule
@@ -80,6 +80,7 @@ test: roleattributes
 test: create_am
 test: hash_func
 test: sanity_check
+test: fsm
 test: errors
 test: select
 test: select_into
diff --git a/src/test/regress/sql/fsm.sql b/src/test/regress/sql/fsm.sql
new file mode 100644
index 0000000000..a864c7fd88
--- /dev/null
+++ b/src/test/regress/sql/fsm.sql
@@ -0,0 +1,46 @@
+--
+-- Free Space Map test
+--
+
+CREATE TABLE fsm_check_size (num int, str text);
+
+-- Fill 3 blocks with as many large records as will fit
+-- No FSM
+INSERT INTO fsm_check_size SELECT g, rpad('', 1024, 'a')
+FROM generate_series(1,7*3) g;
+VACUUM fsm_check_size;
+SELECT pg_relation_size('fsm_check_size', 'main') AS heap_size,
+pg_relation_size('fsm_check_size', 'fsm') AS fsm_size;
+
+-- Clear some space on block 0
+DELETE FROM fsm_check_size where num <= 5;
+VACUUM fsm_check_size;
+
+-- Insert small record in block 2 to set the cached smgr targetBlock
+INSERT INTO fsm_check_size values(99, 'b');
+
+-- Insert large record and make sure it goes in block 0 rather than
+-- causing the relation to extend
+INSERT INTO fsm_check_size values (101, rpad('', 1024, 'a'));
+SELECT pg_relation_size('fsm_check_size', 'main') AS heap_size,
+pg_relation_size('fsm_check_size', 'fsm') AS fsm_size;
+
+-- Extend table with enough blocks to exceed the FSM threshold
+-- FSM is created and extended to 3 blocks
+INSERT INTO fsm_check_size SELECT g, 'c' FROM generate_series(200,3000) g;
+VACUUM fsm_check_size;
+SELECT pg_relation_size('fsm_check_size', 'fsm') AS fsm_size;
+
+-- Truncate heap to 1 block
+-- No change in FSM
+DELETE FROM fsm_check_size WHERE num > 7;
+VACUUM fsm_check_size;
+SELECT pg_relation_size('fsm_check_size', 'fsm') AS fsm_size;
+
+-- Truncate heap to 0 blocks
+-- FSM now truncated to 2 blocks
+DELETE FROM fsm_check_size;
+VACUUM fsm_check_size;
+SELECT pg_relation_size('fsm_check_size', 'fsm') AS fsm_size;
+
+DROP TABLE fsm_check_size;
-- 
2.17.1

v12-0002-During-pg_upgrade-conditionally-skip-transfer-of.patchtext/x-patch; charset=US-ASCII; name=v12-0002-During-pg_upgrade-conditionally-skip-transfer-of.patchDownload
From 66910dd20b72f13dace6907f7be2a06a86592a89 Mon Sep 17 00:00:00 2001
From: John Naylor <jcnaylor@gmail.com>
Date: Thu, 10 Jan 2019 16:38:17 -0500
Subject: [PATCH v12 2/2] During pg_upgrade, conditionally skip transfer of
 FSMs.

If a heap on the old cluster has 4 pages or fewer, don't copy or
link the FSM. This will reduce space usage for installations with
large numbers of small tables.
---
 src/bin/pg_upgrade/info.c        | 11 +++++--
 src/bin/pg_upgrade/pg_upgrade.h  |  6 +++-
 src/bin/pg_upgrade/relfilenode.c | 56 ++++++++++++++++++--------------
 3 files changed, 46 insertions(+), 27 deletions(-)

diff --git a/src/bin/pg_upgrade/info.c b/src/bin/pg_upgrade/info.c
index fd0b44c3ce..31a24e0bec 100644
--- a/src/bin/pg_upgrade/info.c
+++ b/src/bin/pg_upgrade/info.c
@@ -200,6 +200,7 @@ create_rel_filename_map(const char *old_data, const char *new_data,
 
 	map->old_db_oid = old_db->db_oid;
 	map->new_db_oid = new_db->db_oid;
+	map->relkind = old_rel->relkind;
 
 	/*
 	 * old_relfilenode might differ from pg_class.oid (and hence
@@ -418,6 +419,7 @@ get_rel_infos(ClusterInfo *cluster, DbInfo *dbinfo)
 	char	   *nspname = NULL;
 	char	   *relname = NULL;
 	char	   *tablespace = NULL;
+	char	   *relkind = NULL;
 	int			i_spclocation,
 				i_nspname,
 				i_relname,
@@ -425,7 +427,8 @@ get_rel_infos(ClusterInfo *cluster, DbInfo *dbinfo)
 				i_indtable,
 				i_toastheap,
 				i_relfilenode,
-				i_reltablespace;
+				i_reltablespace,
+				i_relkind;
 	char		query[QUERY_ALLOC];
 	char	   *last_namespace = NULL,
 			   *last_tablespace = NULL;
@@ -497,7 +500,7 @@ get_rel_infos(ClusterInfo *cluster, DbInfo *dbinfo)
 	 */
 	snprintf(query + strlen(query), sizeof(query) - strlen(query),
 			 "SELECT all_rels.*, n.nspname, c.relname, "
-			 "  c.relfilenode, c.reltablespace, %s "
+			 "  c.relfilenode, c.reltablespace, c.relkind, %s "
 			 "FROM (SELECT * FROM regular_heap "
 			 "      UNION ALL "
 			 "      SELECT * FROM toast_heap "
@@ -529,6 +532,7 @@ get_rel_infos(ClusterInfo *cluster, DbInfo *dbinfo)
 	i_relfilenode = PQfnumber(res, "relfilenode");
 	i_reltablespace = PQfnumber(res, "reltablespace");
 	i_spclocation = PQfnumber(res, "spclocation");
+	i_relkind = PQfnumber(res, "relkind");
 
 	for (relnum = 0; relnum < ntups; relnum++)
 	{
@@ -558,6 +562,9 @@ get_rel_infos(ClusterInfo *cluster, DbInfo *dbinfo)
 		relname = PQgetvalue(res, relnum, i_relname);
 		curr->relname = pg_strdup(relname);
 
+		relkind = PQgetvalue(res, relnum, i_relkind);
+		curr->relkind = relkind[0];
+
 		curr->relfilenode = atooid(PQgetvalue(res, relnum, i_relfilenode));
 		curr->tblsp_alloc = false;
 
diff --git a/src/bin/pg_upgrade/pg_upgrade.h b/src/bin/pg_upgrade/pg_upgrade.h
index 51bd211d46..8eda9c1f4a 100644
--- a/src/bin/pg_upgrade/pg_upgrade.h
+++ b/src/bin/pg_upgrade/pg_upgrade.h
@@ -147,6 +147,7 @@ typedef struct
 	char	   *tablespace;		/* tablespace path; "" for cluster default */
 	bool		nsp_alloc;		/* should nspname be freed? */
 	bool		tblsp_alloc;	/* should tablespace be freed? */
+	char		relkind;		/* relation relkind -- see pg_class.h */
 } RelInfo;
 
 typedef struct
@@ -173,9 +174,12 @@ typedef struct
 	 */
 	Oid			old_relfilenode;
 	Oid			new_relfilenode;
-	/* the rest are used only for logging and error reporting */
+
+	/* These are used only for logging and error reporting. */
 	char	   *nspname;		/* namespaces */
 	char	   *relname;
+
+	char		relkind;		/* relation relkind -- see pg_class.h */
 } FileNameMap;
 
 /*
diff --git a/src/bin/pg_upgrade/relfilenode.c b/src/bin/pg_upgrade/relfilenode.c
index 3b16c92a02..cc723ef1e2 100644
--- a/src/bin/pg_upgrade/relfilenode.c
+++ b/src/bin/pg_upgrade/relfilenode.c
@@ -14,10 +14,11 @@
 #include <sys/stat.h>
 #include "catalog/pg_class_d.h"
 #include "access/transam.h"
+#include "storage/freespace.h"
 
 
 static void transfer_single_new_db(FileNameMap *maps, int size, char *old_tablespace);
-static void transfer_relfile(FileNameMap *map, const char *suffix, bool vm_must_add_frozenbit);
+static Size transfer_relfile(FileNameMap *map, const char *suffix, bool vm_must_add_frozenbit);
 
 
 /*
@@ -144,6 +145,7 @@ transfer_single_new_db(FileNameMap *maps, int size, char *old_tablespace)
 	int			mapnum;
 	bool		vm_crashsafe_match = true;
 	bool		vm_must_add_frozenbit = false;
+	Size		first_seg_size = 0;
 
 	/*
 	 * Do the old and new cluster disagree on the crash-safetiness of the vm
@@ -165,18 +167,22 @@ transfer_single_new_db(FileNameMap *maps, int size, char *old_tablespace)
 		if (old_tablespace == NULL ||
 			strcmp(maps[mapnum].old_tablespace, old_tablespace) == 0)
 		{
-			/* transfer primary file */
-			transfer_relfile(&maps[mapnum], "", vm_must_add_frozenbit);
+			/* Transfer main fork and return size of the first segment. */
+			first_seg_size = transfer_relfile(&maps[mapnum], "", vm_must_add_frozenbit);
 
 			/* fsm/vm files added in PG 8.4 */
 			if (GET_MAJOR_VERSION(old_cluster.major_version) >= 804)
 			{
 				/*
-				 * Copy/link any fsm and vm files, if they exist
+				 * Copy/link any fsm and vm files, if they exist and if they would
+				 * be created in the new cluster.
 				 */
-				transfer_relfile(&maps[mapnum], "_fsm", vm_must_add_frozenbit);
+				if (maps[mapnum].relkind != RELKIND_RELATION ||
+					first_seg_size > HEAP_FSM_CREATION_THRESHOLD * BLCKSZ ||
+					GET_MAJOR_VERSION(new_cluster.major_version) <= 1100)
+					(void) transfer_relfile(&maps[mapnum], "_fsm", vm_must_add_frozenbit);
 				if (vm_crashsafe_match)
-					transfer_relfile(&maps[mapnum], "_vm", vm_must_add_frozenbit);
+					(void) transfer_relfile(&maps[mapnum], "_vm", vm_must_add_frozenbit);
 			}
 		}
 	}
@@ -190,7 +196,7 @@ transfer_single_new_db(FileNameMap *maps, int size, char *old_tablespace)
  * is true, visibility map forks are converted and rewritten, even in link
  * mode.
  */
-static void
+static Size
 transfer_relfile(FileNameMap *map, const char *type_suffix, bool vm_must_add_frozenbit)
 {
 	char		old_file[MAXPGPATH];
@@ -198,6 +204,7 @@ transfer_relfile(FileNameMap *map, const char *type_suffix, bool vm_must_add_fro
 	int			segno;
 	char		extent_suffix[65];
 	struct stat statbuf;
+	Size		first_seg_size = 0;
 
 	/*
 	 * Now copy/link any related segments as well. Remember, PG breaks large
@@ -226,26 +233,27 @@ transfer_relfile(FileNameMap *map, const char *type_suffix, bool vm_must_add_fro
 				 type_suffix,
 				 extent_suffix);
 
-		/* Is it an extent, fsm, or vm file? */
-		if (type_suffix[0] != '\0' || segno != 0)
+		/* Did file open fail? */
+		if (stat(old_file, &statbuf) != 0)
 		{
-			/* Did file open fail? */
-			if (stat(old_file, &statbuf) != 0)
-			{
-				/* File does not exist?  That's OK, just return */
-				if (errno == ENOENT)
-					return;
-				else
-					pg_fatal("error while checking for file existence \"%s.%s\" (\"%s\" to \"%s\"): %s\n",
-							 map->nspname, map->relname, old_file, new_file,
-							 strerror(errno));
-			}
-
-			/* If file is empty, just return */
-			if (statbuf.st_size == 0)
-				return;
+			/* Extent, fsm, or vm does not exist?  That's OK, just return */
+			if (errno == ENOENT &&
+				(type_suffix[0] != '\0' || segno != 0))
+				return first_seg_size;
+			else
+				pg_fatal("error while checking for file existence \"%s.%s\" (\"%s\" to \"%s\"): %s\n",
+						 map->nspname, map->relname, old_file, new_file,
+						 strerror(errno));
 		}
 
+		/* Save the size of the first segment of the main fork. */
+		else if (type_suffix[0] == '\0' && segno == 0)
+			first_seg_size = statbuf.st_size;
+
+		/* If extent, fsm, or vm is empty, just return */
+		else if (statbuf.st_size == 0)
+			return first_seg_size;
+
 		unlink(new_file);
 
 		/* Copying files might take some time, so give feedback. */
-- 
2.17.1

#72Mithun Cy
mithun.cy@enterprisedb.com
In reply to: John Naylor (#71)
Re: WIP: Avoid creation of the free space map for small tables

On Fri, Jan 11, 2019 at 3:54 AM John Naylor <john.naylor@2ndquadrant.com>
wrote:

On Wed, Jan 9, 2019 at 10:50 PM Amit Kapila <amit.kapila16@gmail.com>

wrote:

Thanks, Mithun for performance testing, it really helps us to choose
the right strategy here. Once John provides next version, it would be
good to see the results of regular pgbench (read-write) runs (say at
50 and 300 scale factor) and the results of large copy. I don't think
there will be any problem, but we should just double check that.

Attached is v12 using the alternating-page strategy. I've updated the
comments and README as needed. In addition, I've

Below are my performance tests and numbers
Machine : cthulhu

Tests and setups
Server settings:
max_connections = 200
shared_buffers=8GB
checkpoint_timeout =15min
maintenance_work_mem = 1GB
checkpoint_completion_target = 0.9
min_wal_size=15GB and max_wal_size=20GB.

pgbench settings:
-----------------------
read-write settings (TPCB like tests)
./pgbench -c $threads -j $threads -T $time_for_reading -M prepared postgres

scale factor 50 -- median of 3 TPS
clients v12-patch base patch % diff
1 826.081588 834.328238 -0.9884179421
16 10805.807081 10800.662805 0.0476292621
32 19722.277019 19641.546628 0.4110185034
64 30232.681889 30263.616073 -0.1022157561

scale factor 300 -- median of 3 TPS
clients v12-patch base patch % diff
1 813.646062 822.18648 -1.038744641
16 11379.028702 11277.05586 0.9042505709
32 21688.084093 21613.044463 0.3471960192
64 36288.85711 36348.6178 -0.1644098005

Copy command
Test: setup
./psql -d postgres -c "COPY pgbench_accounts TO '/mnt/data-mag/
mithun.cy/fsmbin/bin/dump.out' WITH csv"
./psql -d postgres -c "CREATE UNLOGGED TABLE pgbench_accounts_ulg (LIKE
pgbench_accounts) WITH (fillfactor = 100);"
Test run:
TRUNCATE TABLE pgbench_accounts_ulg;
\timing
COPY pgbench_accounts_ulg FROM '/mnt/data-mag/mithun.cy/fsmbin/bin/dump.out'
WITH csv;
\timing

execution time in ms. (scale factor indicates size of pgbench_accounts)
scale factor v12-patch base patch % diff
300 77166.407 77862.041 -0.8934186557
50 13329.233 13284.583 0.3361038882

So for large table tests do not show any considerable performance variance
from base code!

On Fri, Jan 11, 2019 at 3:54 AM John Naylor <john.naylor@2ndquadrant.com>
wrote:

On Wed, Jan 9, 2019 at 10:50 PM Amit Kapila <amit.kapila16@gmail.com>
wrote:

Thanks, Mithun for performance testing, it really helps us to choose
the right strategy here. Once John provides next version, it would be
good to see the results of regular pgbench (read-write) runs (say at
50 and 300 scale factor) and the results of large copy. I don't think
there will be any problem, but we should just double check that.

Attached is v12 using the alternating-page strategy. I've updated the
comments and README as needed. In addition, I've

-handled a possible stat() call failure during pg_upgrade
-added one more assertion
-moved the new README material into a separate paragraph
-added a comment to FSMClearLocalMap() about transaction abort
-corrected an outdated comment that erroneously referred to extension
rather than creation
-fleshed out the draft commit messages

--
Thanks and Regards
Mithun Chicklore Yogendra
EnterpriseDB: http://www.enterprisedb.com

#73Amit Kapila
amit.kapila16@gmail.com
In reply to: John Naylor (#71)
1 attachment(s)
Re: WIP: Avoid creation of the free space map for small tables

On Fri, Jan 11, 2019 at 3:54 AM John Naylor <john.naylor@2ndquadrant.com> wrote:

On Wed, Jan 9, 2019 at 10:50 PM Amit Kapila <amit.kapila16@gmail.com> wrote:

Thanks, Mithun for performance testing, it really helps us to choose
the right strategy here. Once John provides next version, it would be
good to see the results of regular pgbench (read-write) runs (say at
50 and 300 scale factor) and the results of large copy. I don't think
there will be any problem, but we should just double check that.

Attached is v12 using the alternating-page strategy. I've updated the
comments and README as needed. In addition, I've

Few comments:
---------------------------
1.
Commit message:

Any pages with wasted free space become visible at next relation extension, so we still control table bloat.

I think the free space will be available after the next pass of
vacuum, no? How can relation extension make it available?

2.
+2. For very small heap relations, the FSM would be relatively large and
+wasteful, so as of PostgreSQL 12 we refrain from creating the FSM for
+heaps with HEAP_FSM_CREATION_THRESHOLD pages or fewer, both to save space
+and to improve performance.  To locate free space in this case, we simply
+iterate over the heap, trying alternating pages in turn.  There may be some
+wasted free space in this case, but it becomes visible again upon next
+relation extension.

a. Again, how space becomes available at next relation extension.
b. I think there is no use of mentioning the version number in the
above comment, this code will be present from PG-12, so one can find
out from which version this optimization is added.

3.
BlockNumber
 RecordAndGetPageWithFreeSpace(Relation rel, BlockNumber oldPage,
    Size oldSpaceAvail, Size spaceNeeded)
{
..
+ /* First try the local map, if it exists. */
+ if (oldPage < fsm_local_map.nblocks)
+ {
..
}

The comment doesn't appear to be completely in sync with the code.
Can't we just check whether "fsm_local_map.nblocks > 0", if so, we
can use a macro for the same? I have changed this in the attached
patch, see what you think about it. I have used it at a few other
places as well.

4.
+ * When we initialize the map, the whole heap is potentially available to
+ * try.  If a caller wanted to reset the map after another backend extends
+ * the relation, this will only flag new blocks as available.  No callers
+ * do this currently, however.
+ */
+static void
+fsm_local_set(Relation rel, BlockNumber curr_nblocks)
{
..
+ if (blkno >= fsm_local_map.nblocks + 2)
..
}

The way you have tried to support the case as quoted in the comment
"If a caller wanted to reset the map after another backend extends .."
doesn't appear to be solid and I am not sure if it is correct either.
We don't have any way to test the same, so I suggest let's try to
simplify the case w.r.t current requirement of this API. I think we
should
some simple logic to try every other block like:

+ blkno = cur_nblocks - 1;
+ while (true)
+ {
+ fsm_local_map.map[blkno] = FSM_LOCAL_AVAIL;
+ if (blkno >= 2)
+ blkno -= 2;
+ else
+ break;
+ }

I have changed this in the attached patch.

5.
+/*
+ * Search the local map for an available block to try, in descending order.
+ *
+ * For use when there is no FSM.
+ */
+static BlockNumber
+fsm_local_search(void)

We should give a brief explanation as to why we try in descending
order. I have added some explanation in the attached patch, see what
you think about it?

Apart from the above, I have modified a few comments.

--
With Regards,
Amit Kapila.
EnterpriseDB: http://www.enterprisedb.com

Attachments:

v13-0001-Avoid-creation-of-the-free-space-map-for-small-heap-.patchapplication/octet-stream; name=v13-0001-Avoid-creation-of-the-free-space-map-for-small-heap-.patchDownload
From e7272422fb9bfa4f65ec2ccbab460eb54afac298 Mon Sep 17 00:00:00 2001
From: Amit Kapila <akapila@postgresql.org>
Date: Wed, 16 Jan 2019 18:56:03 +0530
Subject: [PATCH] Avoid creation of the free space map for small heap
 relations.

Previously, all heaps had FSMs. For very small tables, this means that
the FSM took up more space than the heap did. This is wasteful, so now
we refrain from creating the FSM for heaps with 4 pages or fewer. If the
last known target block has insufficient space, we still try to insert
into some other page before before giving up and extending the relation,
since doing otherwise leads to table bloat. Testing showed that trying
every page penalized performance slightly, so we compromise and try
every other page. This way, we visit at most two pages. Any pages with
wasted free space become visible at next relation extension, so we still
control table bloat. As a bonus, directly attempting one or two pages
can even be faster than consulting the FSM would have been.
---
 contrib/pageinspect/expected/page.out     |  77 ++++-----
 contrib/pageinspect/sql/page.sql          |  33 ++--
 doc/src/sgml/storage.sgml                 |  13 +-
 src/backend/access/brin/brin.c            |   2 +-
 src/backend/access/brin/brin_pageops.c    |  10 +-
 src/backend/access/heap/hio.c             |  47 ++++--
 src/backend/access/heap/vacuumlazy.c      |  17 +-
 src/backend/access/transam/xact.c         |  14 ++
 src/backend/storage/freespace/README      |  13 +-
 src/backend/storage/freespace/freespace.c | 271 +++++++++++++++++++++++++++++-
 src/backend/storage/freespace/indexfsm.c  |   6 +-
 src/include/storage/freespace.h           |   9 +-
 src/test/regress/expected/fsm.out         |  62 +++++++
 src/test/regress/parallel_schedule        |   6 +
 src/test/regress/serial_schedule          |   1 +
 src/test/regress/sql/fsm.sql              |  46 +++++
 16 files changed, 525 insertions(+), 102 deletions(-)
 create mode 100644 src/test/regress/expected/fsm.out
 create mode 100644 src/test/regress/sql/fsm.sql

diff --git a/contrib/pageinspect/expected/page.out b/contrib/pageinspect/expected/page.out
index 3fcd9fb..83e5910 100644
--- a/contrib/pageinspect/expected/page.out
+++ b/contrib/pageinspect/expected/page.out
@@ -1,48 +1,69 @@
 CREATE EXTENSION pageinspect;
-CREATE TABLE test1 (a int, b int);
-INSERT INTO test1 VALUES (16777217, 131584);
-VACUUM test1;  -- set up FSM
+CREATE TABLE test_rel_forks (a int);
+-- Make sure there are enough blocks in the heap for the FSM to be created.
+INSERT INTO test_rel_forks SELECT g from generate_series(1,10000) g;
+-- set up FSM and VM
+VACUUM test_rel_forks;
 -- The page contents can vary, so just test that it can be read
 -- successfully, but don't keep the output.
-SELECT octet_length(get_raw_page('test1', 'main', 0)) AS main_0;
+SELECT octet_length(get_raw_page('test_rel_forks', 'main', 0)) AS main_0;
  main_0 
 --------
    8192
 (1 row)
 
-SELECT octet_length(get_raw_page('test1', 'main', 1)) AS main_1;
-ERROR:  block number 1 is out of range for relation "test1"
-SELECT octet_length(get_raw_page('test1', 'fsm', 0)) AS fsm_0;
+SELECT octet_length(get_raw_page('test_rel_forks', 'main', 100)) AS main_100;
+ERROR:  block number 100 is out of range for relation "test_rel_forks"
+SELECT octet_length(get_raw_page('test_rel_forks', 'fsm', 0)) AS fsm_0;
  fsm_0 
 -------
   8192
 (1 row)
 
-SELECT octet_length(get_raw_page('test1', 'fsm', 1)) AS fsm_1;
- fsm_1 
--------
-  8192
-(1 row)
-
-SELECT octet_length(get_raw_page('test1', 'vm', 0)) AS vm_0;
+SELECT octet_length(get_raw_page('test_rel_forks', 'fsm', 10)) AS fsm_10;
+ERROR:  block number 10 is out of range for relation "test_rel_forks"
+SELECT octet_length(get_raw_page('test_rel_forks', 'vm', 0)) AS vm_0;
  vm_0 
 ------
  8192
 (1 row)
 
-SELECT octet_length(get_raw_page('test1', 'vm', 1)) AS vm_1;
-ERROR:  block number 1 is out of range for relation "test1"
+SELECT octet_length(get_raw_page('test_rel_forks', 'vm', 1)) AS vm_1;
+ERROR:  block number 1 is out of range for relation "test_rel_forks"
 SELECT octet_length(get_raw_page('xxx', 'main', 0));
 ERROR:  relation "xxx" does not exist
-SELECT octet_length(get_raw_page('test1', 'xxx', 0));
+SELECT octet_length(get_raw_page('test_rel_forks', 'xxx', 0));
 ERROR:  invalid fork name
 HINT:  Valid fork names are "main", "fsm", "vm", and "init".
-SELECT get_raw_page('test1', 0) = get_raw_page('test1', 'main', 0);
+SELECT * FROM fsm_page_contents(get_raw_page('test_rel_forks', 'fsm', 0));
+ fsm_page_contents 
+-------------------
+ 0: 192           +
+ 1: 192           +
+ 3: 192           +
+ 7: 192           +
+ 15: 192          +
+ 31: 192          +
+ 63: 192          +
+ 127: 192         +
+ 255: 192         +
+ 511: 192         +
+ 1023: 192        +
+ 2047: 192        +
+ 4095: 192        +
+ fp_next_slot: 0  +
+ 
+(1 row)
+
+SELECT get_raw_page('test_rel_forks', 0) = get_raw_page('test_rel_forks', 'main', 0);
  ?column? 
 ----------
  t
 (1 row)
 
+DROP TABLE test_rel_forks;
+CREATE TABLE test1 (a int, b int);
+INSERT INTO test1 VALUES (16777217, 131584);
 SELECT pagesize, version FROM page_header(get_raw_page('test1', 0));
  pagesize | version 
 ----------+---------
@@ -62,26 +83,6 @@ SELECT tuple_data_split('test1'::regclass, t_data, t_infomask, t_infomask2, t_bi
  {"\\x01000001","\\x00020200"}
 (1 row)
 
-SELECT * FROM fsm_page_contents(get_raw_page('test1', 'fsm', 0));
- fsm_page_contents 
--------------------
- 0: 254           +
- 1: 254           +
- 3: 254           +
- 7: 254           +
- 15: 254          +
- 31: 254          +
- 63: 254          +
- 127: 254         +
- 255: 254         +
- 511: 254         +
- 1023: 254        +
- 2047: 254        +
- 4095: 254        +
- fp_next_slot: 0  +
- 
-(1 row)
-
 DROP TABLE test1;
 -- check that using any of these functions with a partitioned table or index
 -- would fail
diff --git a/contrib/pageinspect/sql/page.sql b/contrib/pageinspect/sql/page.sql
index 8ac9991..ee81175 100644
--- a/contrib/pageinspect/sql/page.sql
+++ b/contrib/pageinspect/sql/page.sql
@@ -1,26 +1,35 @@
 CREATE EXTENSION pageinspect;
 
-CREATE TABLE test1 (a int, b int);
-INSERT INTO test1 VALUES (16777217, 131584);
+CREATE TABLE test_rel_forks (a int);
+-- Make sure there are enough blocks in the heap for the FSM to be created.
+INSERT INTO test_rel_forks SELECT g from generate_series(1,10000) g;
 
-VACUUM test1;  -- set up FSM
+-- set up FSM and VM
+VACUUM test_rel_forks;
 
 -- The page contents can vary, so just test that it can be read
 -- successfully, but don't keep the output.
 
-SELECT octet_length(get_raw_page('test1', 'main', 0)) AS main_0;
-SELECT octet_length(get_raw_page('test1', 'main', 1)) AS main_1;
+SELECT octet_length(get_raw_page('test_rel_forks', 'main', 0)) AS main_0;
+SELECT octet_length(get_raw_page('test_rel_forks', 'main', 100)) AS main_100;
 
-SELECT octet_length(get_raw_page('test1', 'fsm', 0)) AS fsm_0;
-SELECT octet_length(get_raw_page('test1', 'fsm', 1)) AS fsm_1;
+SELECT octet_length(get_raw_page('test_rel_forks', 'fsm', 0)) AS fsm_0;
+SELECT octet_length(get_raw_page('test_rel_forks', 'fsm', 10)) AS fsm_10;
 
-SELECT octet_length(get_raw_page('test1', 'vm', 0)) AS vm_0;
-SELECT octet_length(get_raw_page('test1', 'vm', 1)) AS vm_1;
+SELECT octet_length(get_raw_page('test_rel_forks', 'vm', 0)) AS vm_0;
+SELECT octet_length(get_raw_page('test_rel_forks', 'vm', 1)) AS vm_1;
 
 SELECT octet_length(get_raw_page('xxx', 'main', 0));
-SELECT octet_length(get_raw_page('test1', 'xxx', 0));
+SELECT octet_length(get_raw_page('test_rel_forks', 'xxx', 0));
+
+SELECT * FROM fsm_page_contents(get_raw_page('test_rel_forks', 'fsm', 0));
+
+SELECT get_raw_page('test_rel_forks', 0) = get_raw_page('test_rel_forks', 'main', 0);
 
-SELECT get_raw_page('test1', 0) = get_raw_page('test1', 'main', 0);
+DROP TABLE test_rel_forks;
+
+CREATE TABLE test1 (a int, b int);
+INSERT INTO test1 VALUES (16777217, 131584);
 
 SELECT pagesize, version FROM page_header(get_raw_page('test1', 0));
 
@@ -29,8 +38,6 @@ SELECT page_checksum(get_raw_page('test1', 0), 0) IS NOT NULL AS silly_checksum_
 SELECT tuple_data_split('test1'::regclass, t_data, t_infomask, t_infomask2, t_bits)
     FROM heap_page_items(get_raw_page('test1', 0));
 
-SELECT * FROM fsm_page_contents(get_raw_page('test1', 'fsm', 0));
-
 DROP TABLE test1;
 
 -- check that using any of these functions with a partitioned table or index
diff --git a/doc/src/sgml/storage.sgml b/doc/src/sgml/storage.sgml
index 8ef2ac8..cbdad0c 100644
--- a/doc/src/sgml/storage.sgml
+++ b/doc/src/sgml/storage.sgml
@@ -590,12 +590,13 @@ tuple would otherwise be too big.
 <indexterm><primary>FSM</primary><see>Free Space Map</see></indexterm>
 
 <para>
-Each heap and index relation, except for hash indexes, has a Free Space Map
-(FSM) to keep track of available space in the relation. It's stored
-alongside the main relation data in a separate relation fork, named after the
-filenode number of the relation, plus a <literal>_fsm</literal> suffix. For example,
-if the filenode of a relation is 12345, the FSM is stored in a file called
-<filename>12345_fsm</filename>, in the same directory as the main relation file.
+Each heap relation, unless it is very small, and each index relation, except
+for hash indexes, has a Free Space Map (FSM) to keep track of available
+space in the relation. It's stored alongside the main relation data in a
+separate relation fork, named after the filenode number of the relation, plus
+a <literal>_fsm</literal> suffix. For example, if the filenode of a relation
+is 12345, the FSM is stored in a file called <filename>12345_fsm</filename>,
+in the same directory as the main relation file.
 </para>
 
 <para>
diff --git a/src/backend/access/brin/brin.c b/src/backend/access/brin/brin.c
index 5214427..4cad53e 100644
--- a/src/backend/access/brin/brin.c
+++ b/src/backend/access/brin/brin.c
@@ -1149,7 +1149,7 @@ terminate_brin_buildstate(BrinBuildState *state)
 		freespace = PageGetFreeSpace(page);
 		blk = BufferGetBlockNumber(state->bs_currentInsertBuf);
 		ReleaseBuffer(state->bs_currentInsertBuf);
-		RecordPageWithFreeSpace(state->bs_irel, blk, freespace);
+		RecordPageWithFreeSpace(state->bs_irel, blk, freespace, InvalidBlockNumber);
 		FreeSpaceMapVacuumRange(state->bs_irel, blk, blk + 1);
 	}
 
diff --git a/src/backend/access/brin/brin_pageops.c b/src/backend/access/brin/brin_pageops.c
index 164a468..2eb354f 100644
--- a/src/backend/access/brin/brin_pageops.c
+++ b/src/backend/access/brin/brin_pageops.c
@@ -310,7 +310,7 @@ brin_doupdate(Relation idxrel, BlockNumber pagesPerRange,
 
 		if (extended)
 		{
-			RecordPageWithFreeSpace(idxrel, newblk, freespace);
+			RecordPageWithFreeSpace(idxrel, newblk, freespace, InvalidBlockNumber);
 			FreeSpaceMapVacuumRange(idxrel, newblk, newblk + 1);
 		}
 
@@ -461,7 +461,7 @@ brin_doinsert(Relation idxrel, BlockNumber pagesPerRange,
 
 	if (extended)
 	{
-		RecordPageWithFreeSpace(idxrel, blk, freespace);
+		RecordPageWithFreeSpace(idxrel, blk, freespace, InvalidBlockNumber);
 		FreeSpaceMapVacuumRange(idxrel, blk, blk + 1);
 	}
 
@@ -654,7 +654,7 @@ brin_page_cleanup(Relation idxrel, Buffer buf)
 
 	/* Measure free space and record it */
 	RecordPageWithFreeSpace(idxrel, BufferGetBlockNumber(buf),
-							br_page_get_freespace(page));
+							br_page_get_freespace(page), InvalidBlockNumber);
 }
 
 /*
@@ -703,7 +703,7 @@ brin_getinsertbuffer(Relation irel, Buffer oldbuf, Size itemsz,
 	/* Choose initial target page, re-using existing target if known */
 	newblk = RelationGetTargetBlock(irel);
 	if (newblk == InvalidBlockNumber)
-		newblk = GetPageWithFreeSpace(irel, itemsz);
+		newblk = GetPageWithFreeSpace(irel, itemsz, true);
 
 	/*
 	 * Loop until we find a page with sufficient free space.  By the time we
@@ -895,7 +895,7 @@ brin_initialize_empty_new_buffer(Relation idxrel, Buffer buffer)
 	 * pages whose FSM records were forgotten in a crash.
 	 */
 	RecordPageWithFreeSpace(idxrel, BufferGetBlockNumber(buffer),
-							br_page_get_freespace(page));
+							br_page_get_freespace(page), InvalidBlockNumber);
 }
 
 
diff --git a/src/backend/access/heap/hio.c b/src/backend/access/heap/hio.c
index 3da0b49..f370352 100644
--- a/src/backend/access/heap/hio.c
+++ b/src/backend/access/heap/hio.c
@@ -239,8 +239,14 @@ RelationAddExtraBlocks(Relation relation, BulkInsertState bistate)
 		 * Immediately update the bottom level of the FSM.  This has a good
 		 * chance of making this page visible to other concurrently inserting
 		 * backends, and we want that to happen without delay.
+		 *
+		 * Since we know the table will end up with extraBlocks additional
+		 * pages, we pass the final number to avoid possible unnecessary
+		 * system calls and to make sure the FSM is created when we add
+		 * the first new page.
 		 */
-		RecordPageWithFreeSpace(relation, blockNum, freespace);
+		RecordPageWithFreeSpace(relation, blockNum, freespace,
+								firstBlock + extraBlocks);
 	}
 	while (--extraBlocks > 0);
 
@@ -377,20 +383,9 @@ RelationGetBufferForTuple(Relation relation, Size len,
 		 * We have no cached target page, so ask the FSM for an initial
 		 * target.
 		 */
-		targetBlock = GetPageWithFreeSpace(relation, len + saveFreeSpace);
-
-		/*
-		 * If the FSM knows nothing of the rel, try the last page before we
-		 * give up and extend.  This avoids one-tuple-per-page syndrome during
-		 * bootstrapping or in a recently-started system.
-		 */
-		if (targetBlock == InvalidBlockNumber)
-		{
-			BlockNumber nblocks = RelationGetNumberOfBlocks(relation);
-
-			if (nblocks > 0)
-				targetBlock = nblocks - 1;
-		}
+		targetBlock = GetPageWithFreeSpace(relation,
+										   len + saveFreeSpace,
+										   false);
 	}
 
 loop:
@@ -484,6 +479,14 @@ loop:
 		{
 			/* use this page as future insert target, too */
 			RelationSetTargetBlock(relation, targetBlock);
+
+			/*
+			 * In case we used an in-memory map of available blocks, reset
+			 * it for next use.
+			 */
+			if (targetBlock < HEAP_FSM_CREATION_THRESHOLD)
+				FSMClearLocalMap();
+
 			return buffer;
 		}
 
@@ -543,9 +546,12 @@ loop:
 
 			/*
 			 * Check if some other backend has extended a block for us while
-			 * we were waiting on the lock.
+			 * we were waiting on the lock.  We only check the FSM -- if there
+			 * isn't one we don't recheck the number of blocks.
 			 */
-			targetBlock = GetPageWithFreeSpace(relation, len + saveFreeSpace);
+			targetBlock = GetPageWithFreeSpace(relation,
+											   len + saveFreeSpace,
+											   true);
 
 			/*
 			 * If some other waiter has already extended the relation, we
@@ -625,5 +631,12 @@ loop:
 	 */
 	RelationSetTargetBlock(relation, BufferGetBlockNumber(buffer));
 
+	/*
+	 * In case we used an in-memory map of available blocks, reset
+	 * it for next use.  We do this unconditionally since after relation
+	 * extension we can't skip this based on the targetBlock.
+	 */
+	FSMClearLocalMap();
+
 	return buffer;
 }
diff --git a/src/backend/access/heap/vacuumlazy.c b/src/backend/access/heap/vacuumlazy.c
index 2d317a9..26043bf 100644
--- a/src/backend/access/heap/vacuumlazy.c
+++ b/src/backend/access/heap/vacuumlazy.c
@@ -154,7 +154,7 @@ static BufferAccessStrategy vac_strategy;
 static void lazy_scan_heap(Relation onerel, int options,
 			   LVRelStats *vacrelstats, Relation *Irel, int nindexes,
 			   bool aggressive);
-static void lazy_vacuum_heap(Relation onerel, LVRelStats *vacrelstats);
+static void lazy_vacuum_heap(Relation onerel, LVRelStats *vacrelstats, BlockNumber nblocks);
 static bool lazy_check_needs_freeze(Buffer buf, bool *hastup);
 static void lazy_vacuum_index(Relation indrel,
 				  IndexBulkDeleteResult **stats,
@@ -759,7 +759,7 @@ lazy_scan_heap(Relation onerel, int options, LVRelStats *vacrelstats,
 			pgstat_progress_update_multi_param(2, hvp_index, hvp_val);
 
 			/* Remove tuples from heap */
-			lazy_vacuum_heap(onerel, vacrelstats);
+			lazy_vacuum_heap(onerel, vacrelstats, nblocks);
 
 			/*
 			 * Forget the now-vacuumed tuples, and press on, but be careful
@@ -897,7 +897,7 @@ lazy_scan_heap(Relation onerel, int options, LVRelStats *vacrelstats,
 			MarkBufferDirty(buf);
 			UnlockReleaseBuffer(buf);
 
-			RecordPageWithFreeSpace(onerel, blkno, freespace);
+			RecordPageWithFreeSpace(onerel, blkno, freespace, nblocks);
 			continue;
 		}
 
@@ -936,7 +936,7 @@ lazy_scan_heap(Relation onerel, int options, LVRelStats *vacrelstats,
 			}
 
 			UnlockReleaseBuffer(buf);
-			RecordPageWithFreeSpace(onerel, blkno, freespace);
+			RecordPageWithFreeSpace(onerel, blkno, freespace, nblocks);
 			continue;
 		}
 
@@ -1333,7 +1333,7 @@ lazy_scan_heap(Relation onerel, int options, LVRelStats *vacrelstats,
 		 * taken if there are no indexes.)
 		 */
 		if (vacrelstats->num_dead_tuples == prev_dead_count)
-			RecordPageWithFreeSpace(onerel, blkno, freespace);
+			RecordPageWithFreeSpace(onerel, blkno, freespace, nblocks);
 	}
 
 	/* report that everything is scanned and vacuumed */
@@ -1395,7 +1395,7 @@ lazy_scan_heap(Relation onerel, int options, LVRelStats *vacrelstats,
 		/* Remove tuples from heap */
 		pgstat_progress_update_param(PROGRESS_VACUUM_PHASE,
 									 PROGRESS_VACUUM_PHASE_VACUUM_HEAP);
-		lazy_vacuum_heap(onerel, vacrelstats);
+		lazy_vacuum_heap(onerel, vacrelstats, nblocks);
 		vacrelstats->num_index_scans++;
 	}
 
@@ -1466,9 +1466,10 @@ lazy_scan_heap(Relation onerel, int options, LVRelStats *vacrelstats,
  * Note: the reason for doing this as a second pass is we cannot remove
  * the tuples until we've removed their index entries, and we want to
  * process index entry removal in batches as large as possible.
+ * Note: nblocks is passed as an optimization for RecordPageWithFreeSpace().
  */
 static void
-lazy_vacuum_heap(Relation onerel, LVRelStats *vacrelstats)
+lazy_vacuum_heap(Relation onerel, LVRelStats *vacrelstats, BlockNumber nblocks)
 {
 	int			tupindex;
 	int			npages;
@@ -1505,7 +1506,7 @@ lazy_vacuum_heap(Relation onerel, LVRelStats *vacrelstats)
 		freespace = PageGetHeapFreeSpace(page);
 
 		UnlockReleaseBuffer(buf);
-		RecordPageWithFreeSpace(onerel, tblk, freespace);
+		RecordPageWithFreeSpace(onerel, tblk, freespace, nblocks);
 		npages++;
 	}
 
diff --git a/src/backend/access/transam/xact.c b/src/backend/access/transam/xact.c
index f665e38..b38c6d4 100644
--- a/src/backend/access/transam/xact.c
+++ b/src/backend/access/transam/xact.c
@@ -48,6 +48,7 @@
 #include "replication/walsender.h"
 #include "storage/condition_variable.h"
 #include "storage/fd.h"
+#include "storage/freespace.h"
 #include "storage/lmgr.h"
 #include "storage/predicate.h"
 #include "storage/proc.h"
@@ -2488,6 +2489,12 @@ AbortTransaction(void)
 	pgstat_report_wait_end();
 	pgstat_progress_end_command();
 
+	/*
+	 * In case we aborted during RelationGetBufferForTuple(),
+	 * clear the local map of heap pages.
+	 */
+	FSMClearLocalMap();
+
 	/* Clean up buffer I/O and buffer context locks, too */
 	AbortBufferIO();
 	UnlockBuffers();
@@ -4709,6 +4716,13 @@ AbortSubTransaction(void)
 
 	pgstat_report_wait_end();
 	pgstat_progress_end_command();
+
+	/*
+	 * In case we aborted during RelationGetBufferForTuple(),
+	 * clear the local map of heap pages.
+	 */
+	FSMClearLocalMap();
+
 	AbortBufferIO();
 	UnlockBuffers();
 
diff --git a/src/backend/storage/freespace/README b/src/backend/storage/freespace/README
index e7ff23b..77e4992 100644
--- a/src/backend/storage/freespace/README
+++ b/src/backend/storage/freespace/README
@@ -8,7 +8,16 @@ free space to hold a tuple to be stored; or to determine that no such page
 exists and the relation must be extended by one page.  As of PostgreSQL 8.4
 each relation has its own, extensible free space map stored in a separate
 "fork" of its relation.  This eliminates the disadvantages of the former
-fixed-size FSM.
+fixed-size FSM.  There are two exceptions:
+
+1. Hash indexes never have a FSM.
+2. For very small heap relations, the FSM would be relatively large and
+wasteful, so as of PostgreSQL 12 we refrain from creating the FSM for
+heaps with HEAP_FSM_CREATION_THRESHOLD pages or fewer, both to save space
+and to improve performance.  To locate free space in this case, we simply
+iterate over the heap, trying alternating pages in turn.  There may be some
+wasted free space in this case, but it becomes visible again upon next
+relation extension.
 
 It is important to keep the map small so that it can be searched rapidly.
 Therefore, we don't attempt to record the exact free space on a page.
@@ -192,5 +201,3 @@ TODO
 ----
 
 - fastroot to avoid traversing upper nodes with just 1 child
-- use a different system for tables that fit into one FSM page, with a
-  mechanism to switch to the real thing as it grows.
diff --git a/src/backend/storage/freespace/freespace.c b/src/backend/storage/freespace/freespace.c
index eee8286..89cbce7 100644
--- a/src/backend/storage/freespace/freespace.c
+++ b/src/backend/storage/freespace/freespace.c
@@ -76,6 +76,14 @@
 #define FSM_ROOT_LEVEL	(FSM_TREE_DEPTH - 1)
 #define FSM_BOTTOM_LEVEL 0
 
+/* Status codes for the local map. */
+
+/* Either already tried, or beyond the end of the relation */
+#define FSM_LOCAL_NOT_AVAIL 0x00
+
+/* Available to try */
+#define FSM_LOCAL_AVAIL		0x01
+
 /*
  * The internal FSM routines work on a logical addressing scheme. Each
  * level of the tree can be thought of as a separately addressable file.
@@ -89,6 +97,17 @@ typedef struct
 /* Address of the root page. */
 static const FSMAddress FSM_ROOT_ADDRESS = {FSM_ROOT_LEVEL, 0};
 
+/* Local map of block numbers for small heaps with no FSM. */
+typedef struct
+{
+	BlockNumber nblocks;
+	char		map[HEAP_FSM_CREATION_THRESHOLD];
+} FSMLocalMap;
+
+static FSMLocalMap fsm_local_map = {0, {FSM_LOCAL_NOT_AVAIL}};
+
+#define FSM_LOCAL_MAP_EXISTS (fsm_local_map.nblocks > 0)
+
 /* functions to navigate the tree */
 static FSMAddress fsm_get_child(FSMAddress parent, uint16 slot);
 static FSMAddress fsm_get_parent(FSMAddress child, uint16 *slot);
@@ -107,10 +126,14 @@ static Size fsm_space_cat_to_avail(uint8 cat);
 /* workhorse functions for various operations */
 static int fsm_set_and_search(Relation rel, FSMAddress addr, uint16 slot,
 				   uint8 newValue, uint8 minValue);
+static void fsm_local_set(Relation rel, BlockNumber cur_nblocks);
 static BlockNumber fsm_search(Relation rel, uint8 min_cat);
+static BlockNumber fsm_local_search(void);
 static uint8 fsm_vacuum_page(Relation rel, FSMAddress addr,
 				BlockNumber start, BlockNumber end,
 				bool *eof);
+static bool fsm_allow_writes(Relation rel, BlockNumber heapblk,
+				BlockNumber nblocks, BlockNumber *get_nblocks);
 
 
 /******** Public API ********/
@@ -127,13 +150,45 @@ static uint8 fsm_vacuum_page(Relation rel, FSMAddress addr,
  * amount of free space available on that page and then try again (see
  * RecordAndGetPageWithFreeSpace).  If InvalidBlockNumber is returned,
  * extend the relation.
+ *
+ * For very small heap relations that don't have a FSM, we try every other
+ * page before extending the relation.  To keep track of which pages have
+ * been tried, initialize a local in-memory map of pages.
  */
 BlockNumber
-GetPageWithFreeSpace(Relation rel, Size spaceNeeded)
+GetPageWithFreeSpace(Relation rel, Size spaceNeeded, bool check_fsm_only)
 {
 	uint8		min_cat = fsm_space_needed_to_cat(spaceNeeded);
+	BlockNumber target_block,
+				nblocks;
+
+	/* First try the FSM, if it exists. */
+	target_block = fsm_search(rel, min_cat);
+
+	if (target_block == InvalidBlockNumber &&
+		rel->rd_rel->relkind == RELKIND_RELATION &&
+		!check_fsm_only)
+	{
+		nblocks = RelationGetNumberOfBlocks(rel);
+
+		if (nblocks > HEAP_FSM_CREATION_THRESHOLD)
+		{
+			/*
+			 * If the FSM knows nothing of the rel, try the last page before
+			 * we give up and extend.  This avoids one-tuple-per-page syndrome
+			 * during bootstrapping or in a recently-started system.
+			 */
+			target_block = nblocks - 1;
+		}
+		else if (nblocks > 0)
+		{
+			/* Create or update local map and get first candidate block. */
+			fsm_local_set(rel, nblocks);
+			target_block = fsm_local_search();
+		}
+	}
 
-	return fsm_search(rel, min_cat);
+	return target_block;
 }
 
 /*
@@ -144,16 +199,46 @@ GetPageWithFreeSpace(Relation rel, Size spaceNeeded)
  * also some effort to return a page close to the old page; if there's a
  * page with enough free space on the same FSM page where the old one page
  * is located, it is preferred.
+ *
+ * For very small heap relations that don't have a FSM, we update the local
+ * map to indicate we have tried a page, and return the next page to try.
  */
 BlockNumber
 RecordAndGetPageWithFreeSpace(Relation rel, BlockNumber oldPage,
 							  Size oldSpaceAvail, Size spaceNeeded)
 {
-	int			old_cat = fsm_space_avail_to_cat(oldSpaceAvail);
-	int			search_cat = fsm_space_needed_to_cat(spaceNeeded);
+	int			old_cat;
+	int			search_cat;
 	FSMAddress	addr;
 	uint16		slot;
 	int			search_slot;
+	BlockNumber nblocks = InvalidBlockNumber;
+
+	/* First try the local map, if it exists. */
+	if (FSM_LOCAL_MAP_EXISTS)
+	{
+		Assert(rel->rd_rel->relkind == RELKIND_RELATION &&
+			   fsm_local_map.map[oldPage] == FSM_LOCAL_AVAIL);
+
+		fsm_local_map.map[oldPage] = FSM_LOCAL_NOT_AVAIL;
+		return fsm_local_search();
+	}
+
+	if (!fsm_allow_writes(rel, oldPage, InvalidBlockNumber, &nblocks))
+	{
+		/*
+		 * If we have neither a local map nor a FSM, we probably just
+		 * tried the target block in the smgr relation entry and failed,
+		 * so we'll need to create the local map.
+		 */
+		fsm_local_set(rel, nblocks);
+		return fsm_local_search();
+	}
+
+	/* Normal FSM logic follows */
+
+	old_cat = fsm_space_avail_to_cat(oldSpaceAvail);
+	search_cat = fsm_space_needed_to_cat(spaceNeeded);
 
 	/* Get the location of the FSM byte representing the heap block */
 	addr = fsm_get_location(oldPage, &slot);
@@ -176,21 +261,42 @@ RecordAndGetPageWithFreeSpace(Relation rel, BlockNumber oldPage,
  * Note that if the new spaceAvail value is higher than the old value stored
  * in the FSM, the space might not become visible to searchers until the next
  * FreeSpaceMapVacuum call, which updates the upper level pages.
+ *
+ * Callers have no need for a local map.
  */
 void
-RecordPageWithFreeSpace(Relation rel, BlockNumber heapBlk, Size spaceAvail)
+RecordPageWithFreeSpace(Relation rel, BlockNumber heapBlk,
+						Size spaceAvail, BlockNumber nblocks)
 {
-	int			new_cat = fsm_space_avail_to_cat(spaceAvail);
+	int			new_cat;
 	FSMAddress	addr;
 	uint16		slot;
+	BlockNumber dummy;
+
+	if (!fsm_allow_writes(rel, heapBlk, nblocks, &dummy))
+		/* No FSM to update and no local map either */
+		return;
 
 	/* Get the location of the FSM byte representing the heap block */
 	addr = fsm_get_location(heapBlk, &slot);
 
+	new_cat = fsm_space_avail_to_cat(spaceAvail);
 	fsm_set_and_search(rel, addr, slot, new_cat, 0);
 }
 
 /*
+ * Clear the local map.  We must call this when we have found a block with
+ * enough free space, when we extend the relation, or on transaction abort.
+ */
+void
+FSMClearLocalMap(void)
+{
+	fsm_local_map.nblocks = 0;
+	memset(&fsm_local_map.map, FSM_LOCAL_NOT_AVAIL,
+		   sizeof(fsm_local_map.map));
+}
+
+/*
  * XLogRecordPageWithFreeSpace - like RecordPageWithFreeSpace, for use in
  *		WAL replay
  */
@@ -204,6 +310,30 @@ XLogRecordPageWithFreeSpace(RelFileNode rnode, BlockNumber heapBlk,
 	BlockNumber blkno;
 	Buffer		buf;
 	Page		page;
+	bool		write_to_fsm;
+
+	/* This is meant to mirror the logic in fsm_allow_writes() */
+	if (heapBlk >= HEAP_FSM_CREATION_THRESHOLD)
+		write_to_fsm = true;
+	else
+	{
+		/* Open the relation at smgr level */
+		SMgrRelation smgr = smgropen(rnode, InvalidBackendId);
+
+		if (smgrexists(smgr, FSM_FORKNUM))
+			write_to_fsm = true;
+		else
+		{
+			BlockNumber heap_nblocks = smgrnblocks(smgr, MAIN_FORKNUM);
+			if (heap_nblocks > HEAP_FSM_CREATION_THRESHOLD)
+				write_to_fsm = true;
+			else
+				write_to_fsm = false;
+		}
+	}
+
+	if (!write_to_fsm)
+		return;
 
 	/* Get the location of the FSM byte representing the heap block */
 	addr = fsm_get_location(heapBlk, &slot);
@@ -904,3 +1034,132 @@ fsm_vacuum_page(Relation rel, FSMAddress addr,
 
 	return max_avail;
 }
+
+/*
+ * For heap, we prevent creation of the FSM unless the number of pages
+ * exceeds HEAP_FSM_CREATION_THRESHOLD.  For tables that don't already have
+ * a FSM, this will save an inode and a few kB of space.
+ *
+ * XXX The API is a little awkward -- if the caller passes a valid nblocks
+ * value, it can avoid invoking a system call.  If the caller passes
+ * InvalidBlockNumber and receives a false return value, it can get an
+ * up-to-date relation size from get_nblocks.  This saves few cycles of
+ * the caller which otherwise need to get the relation size by themselves.
+ */
+static bool
+fsm_allow_writes(Relation rel, BlockNumber heapblk,
+				 BlockNumber nblocks, BlockNumber *get_nblocks)
+{
+	bool		skip_get_nblocks;
+
+	if (heapblk >= HEAP_FSM_CREATION_THRESHOLD)
+		return true;
+
+	/* Non-heap rels can always create a FSM. */
+	if (rel->rd_rel->relkind != RELKIND_RELATION)
+		return true;
+
+	/*
+	 * If the caller knows nblocks, we can avoid a system call later.
+	 * If it doesn't, maybe we have relpages from a previous VACUUM.
+	 * Since the table may have extended since then, we still have to
+	 * count the pages later if we can't return now.
+	 */
+	if (nblocks != InvalidBlockNumber)
+	{
+		if (nblocks > HEAP_FSM_CREATION_THRESHOLD)
+			return true;
+		else
+			skip_get_nblocks = true;
+	}
+	else
+	{
+		if (rel->rd_rel->relpages != InvalidBlockNumber &&
+			rel->rd_rel->relpages > HEAP_FSM_CREATION_THRESHOLD)
+			return true;
+		else
+			skip_get_nblocks = false;
+	}
+
+	RelationOpenSmgr(rel);
+	if (smgrexists(rel->rd_smgr, FSM_FORKNUM))
+		return true;
+
+	if (skip_get_nblocks)
+		return false;
+
+	/* last resort */
+	*get_nblocks = RelationGetNumberOfBlocks(rel);
+	if (*get_nblocks > HEAP_FSM_CREATION_THRESHOLD)
+		return true;
+	else
+		return false;
+}
+
+/*
+ * Initialize or update the local map of blocks to try, for when there is
+ * no FSM.
+ *
+ * When we initialize the map, the whole heap is potentially available to
+ * try.  Testing revealed that trying every block can cause small performance
+ * dip as compare to when we use FSM, so we try every other block instead.
+ */
+static void
+fsm_local_set(Relation rel, BlockNumber cur_nblocks)
+{
+	BlockNumber blkno,
+				cached_target_block;
+
+	/* The local map must not be set already. */
+	Assert(!FSM_LOCAL_MAP_EXISTS);
+
+	/*
+	 * Starting at the current last block in the relation and working
+	 * backwards, mark alternating blocks as available.
+	 */
+	blkno = cur_nblocks - 1;
+	while (true)
+	{
+		fsm_local_map.map[blkno] = FSM_LOCAL_AVAIL;
+		if (blkno >= 2)
+			blkno -= 2;
+		else
+			break;
+	}
+
+	/* Cache the number of blocks. */
+	fsm_local_map.nblocks = cur_nblocks;
+
+	/* Set the status of the cached target block to 'unavailable'. */
+	cached_target_block = RelationGetTargetBlock(rel);
+	if (cached_target_block != InvalidBlockNumber &&
+		cached_target_block < cur_nblocks)
+		fsm_local_map.map[cached_target_block] = FSM_LOCAL_NOT_AVAIL;
+}
+
+/*
+ * Search the local map for an available block to try, in descending order.
+ * As such, there is no heuristic available to decide which order will be
+ * better to try, but the probability of having space in the last block in the
+ * map is higher because that is the most recent block added to the heap.
+ *
+ * This function is used when there is no FSM.
+ */
+static BlockNumber
+fsm_local_search(void)
+{
+	BlockNumber		target_block;
+
+	/* Local map must be set by now. */
+	Assert(FSM_LOCAL_MAP_EXISTS);
+
+	target_block = fsm_local_map.nblocks;
+	do
+	{
+		target_block--;
+		if (fsm_local_map.map[target_block] == FSM_LOCAL_AVAIL)
+			return target_block;
+	} while (target_block > 0);
+
+	return InvalidBlockNumber;
+}
diff --git a/src/backend/storage/freespace/indexfsm.c b/src/backend/storage/freespace/indexfsm.c
index 58cedea..9d8f43d 100644
--- a/src/backend/storage/freespace/indexfsm.c
+++ b/src/backend/storage/freespace/indexfsm.c
@@ -37,7 +37,7 @@
 BlockNumber
 GetFreeIndexPage(Relation rel)
 {
-	BlockNumber blkno = GetPageWithFreeSpace(rel, BLCKSZ / 2);
+	BlockNumber blkno = GetPageWithFreeSpace(rel, BLCKSZ / 2, true);
 
 	if (blkno != InvalidBlockNumber)
 		RecordUsedIndexPage(rel, blkno);
@@ -51,7 +51,7 @@ GetFreeIndexPage(Relation rel)
 void
 RecordFreeIndexPage(Relation rel, BlockNumber freeBlock)
 {
-	RecordPageWithFreeSpace(rel, freeBlock, BLCKSZ - 1);
+	RecordPageWithFreeSpace(rel, freeBlock, BLCKSZ - 1, InvalidBlockNumber);
 }
 
 
@@ -61,7 +61,7 @@ RecordFreeIndexPage(Relation rel, BlockNumber freeBlock)
 void
 RecordUsedIndexPage(Relation rel, BlockNumber usedBlock)
 {
-	RecordPageWithFreeSpace(rel, usedBlock, 0);
+	RecordPageWithFreeSpace(rel, usedBlock, 0, InvalidBlockNumber);
 }
 
 /*
diff --git a/src/include/storage/freespace.h b/src/include/storage/freespace.h
index 8b00033..b077c2c 100644
--- a/src/include/storage/freespace.h
+++ b/src/include/storage/freespace.h
@@ -18,15 +18,20 @@
 #include "storage/relfilenode.h"
 #include "utils/relcache.h"
 
+/* Only create the FSM if the heap has greater than this many blocks */
+#define HEAP_FSM_CREATION_THRESHOLD 4
+
 /* prototypes for public functions in freespace.c */
 extern Size GetRecordedFreeSpace(Relation rel, BlockNumber heapBlk);
-extern BlockNumber GetPageWithFreeSpace(Relation rel, Size spaceNeeded);
+extern BlockNumber GetPageWithFreeSpace(Relation rel, Size spaceNeeded,
+							bool check_fsm_only);
 extern BlockNumber RecordAndGetPageWithFreeSpace(Relation rel,
 							  BlockNumber oldPage,
 							  Size oldSpaceAvail,
 							  Size spaceNeeded);
 extern void RecordPageWithFreeSpace(Relation rel, BlockNumber heapBlk,
-						Size spaceAvail);
+						Size spaceAvail, BlockNumber nblocks);
+extern void FSMClearLocalMap(void);
 extern void XLogRecordPageWithFreeSpace(RelFileNode rnode, BlockNumber heapBlk,
 							Size spaceAvail);
 
diff --git a/src/test/regress/expected/fsm.out b/src/test/regress/expected/fsm.out
new file mode 100644
index 0000000..bf590bf
--- /dev/null
+++ b/src/test/regress/expected/fsm.out
@@ -0,0 +1,62 @@
+--
+-- Free Space Map test
+--
+CREATE TABLE fsm_check_size (num int, str text);
+-- Fill 3 blocks with as many large records as will fit
+-- No FSM
+INSERT INTO fsm_check_size SELECT g, rpad('', 1024, 'a')
+FROM generate_series(1,7*3) g;
+VACUUM fsm_check_size;
+SELECT pg_relation_size('fsm_check_size', 'main') AS heap_size,
+pg_relation_size('fsm_check_size', 'fsm') AS fsm_size;
+ heap_size | fsm_size 
+-----------+----------
+     24576 |        0
+(1 row)
+
+-- Clear some space on block 0
+DELETE FROM fsm_check_size where num <= 5;
+VACUUM fsm_check_size;
+-- Insert small record in block 2 to set the cached smgr targetBlock
+INSERT INTO fsm_check_size values(99, 'b');
+-- Insert large record and make sure it goes in block 0 rather than
+-- causing the relation to extend
+INSERT INTO fsm_check_size values (101, rpad('', 1024, 'a'));
+SELECT pg_relation_size('fsm_check_size', 'main') AS heap_size,
+pg_relation_size('fsm_check_size', 'fsm') AS fsm_size;
+ heap_size | fsm_size 
+-----------+----------
+     24576 |        0
+(1 row)
+
+-- Extend table with enough blocks to exceed the FSM threshold
+-- FSM is created and extended to 3 blocks
+INSERT INTO fsm_check_size SELECT g, 'c' FROM generate_series(200,3000) g;
+VACUUM fsm_check_size;
+SELECT pg_relation_size('fsm_check_size', 'fsm') AS fsm_size;
+ fsm_size 
+----------
+    24576
+(1 row)
+
+-- Truncate heap to 1 block
+-- No change in FSM
+DELETE FROM fsm_check_size WHERE num > 7;
+VACUUM fsm_check_size;
+SELECT pg_relation_size('fsm_check_size', 'fsm') AS fsm_size;
+ fsm_size 
+----------
+    24576
+(1 row)
+
+-- Truncate heap to 0 blocks
+-- FSM now truncated to 2 blocks
+DELETE FROM fsm_check_size;
+VACUUM fsm_check_size;
+SELECT pg_relation_size('fsm_check_size', 'fsm') AS fsm_size;
+ fsm_size 
+----------
+    16384
+(1 row)
+
+DROP TABLE fsm_check_size;
diff --git a/src/test/regress/parallel_schedule b/src/test/regress/parallel_schedule
index cc0bbf5..4051a4a 100644
--- a/src/test/regress/parallel_schedule
+++ b/src/test/regress/parallel_schedule
@@ -69,6 +69,12 @@ test: create_aggregate create_function_3 create_cast constraints triggers inheri
 test: sanity_check
 
 # ----------
+# fsm does a delete followed by vacuum, and running it in parallel can prevent
+# removal of rows.
+# ----------
+test: fsm
+
+# ----------
 # Believe it or not, select creates a table, subsequent
 # tests need.
 # ----------
diff --git a/src/test/regress/serial_schedule b/src/test/regress/serial_schedule
index 0c10c71..ac1ea62 100644
--- a/src/test/regress/serial_schedule
+++ b/src/test/regress/serial_schedule
@@ -80,6 +80,7 @@ test: roleattributes
 test: create_am
 test: hash_func
 test: sanity_check
+test: fsm
 test: errors
 test: select
 test: select_into
diff --git a/src/test/regress/sql/fsm.sql b/src/test/regress/sql/fsm.sql
new file mode 100644
index 0000000..a864c7f
--- /dev/null
+++ b/src/test/regress/sql/fsm.sql
@@ -0,0 +1,46 @@
+--
+-- Free Space Map test
+--
+
+CREATE TABLE fsm_check_size (num int, str text);
+
+-- Fill 3 blocks with as many large records as will fit
+-- No FSM
+INSERT INTO fsm_check_size SELECT g, rpad('', 1024, 'a')
+FROM generate_series(1,7*3) g;
+VACUUM fsm_check_size;
+SELECT pg_relation_size('fsm_check_size', 'main') AS heap_size,
+pg_relation_size('fsm_check_size', 'fsm') AS fsm_size;
+
+-- Clear some space on block 0
+DELETE FROM fsm_check_size where num <= 5;
+VACUUM fsm_check_size;
+
+-- Insert small record in block 2 to set the cached smgr targetBlock
+INSERT INTO fsm_check_size values(99, 'b');
+
+-- Insert large record and make sure it goes in block 0 rather than
+-- causing the relation to extend
+INSERT INTO fsm_check_size values (101, rpad('', 1024, 'a'));
+SELECT pg_relation_size('fsm_check_size', 'main') AS heap_size,
+pg_relation_size('fsm_check_size', 'fsm') AS fsm_size;
+
+-- Extend table with enough blocks to exceed the FSM threshold
+-- FSM is created and extended to 3 blocks
+INSERT INTO fsm_check_size SELECT g, 'c' FROM generate_series(200,3000) g;
+VACUUM fsm_check_size;
+SELECT pg_relation_size('fsm_check_size', 'fsm') AS fsm_size;
+
+-- Truncate heap to 1 block
+-- No change in FSM
+DELETE FROM fsm_check_size WHERE num > 7;
+VACUUM fsm_check_size;
+SELECT pg_relation_size('fsm_check_size', 'fsm') AS fsm_size;
+
+-- Truncate heap to 0 blocks
+-- FSM now truncated to 2 blocks
+DELETE FROM fsm_check_size;
+VACUUM fsm_check_size;
+SELECT pg_relation_size('fsm_check_size', 'fsm') AS fsm_size;
+
+DROP TABLE fsm_check_size;
-- 
1.8.3.1

#74Amit Kapila
amit.kapila16@gmail.com
In reply to: Mithun Cy (#72)
Re: WIP: Avoid creation of the free space map for small tables

On Wed, Jan 16, 2019 at 9:25 AM Mithun Cy <mithun.cy@enterprisedb.com> wrote:

On Fri, Jan 11, 2019 at 3:54 AM John Naylor <john.naylor@2ndquadrant.com> wrote:

On Wed, Jan 9, 2019 at 10:50 PM Amit Kapila <amit.kapila16@gmail.com> wrote:

Thanks, Mithun for performance testing, it really helps us to choose
the right strategy here. Once John provides next version, it would be
good to see the results of regular pgbench (read-write) runs (say at
50 and 300 scale factor) and the results of large copy. I don't think
there will be any problem, but we should just double check that.

Attached is v12 using the alternating-page strategy. I've updated the
comments and README as needed. In addition, I've

execution time in ms. (scale factor indicates size of pgbench_accounts)
scale factor v12-patch base patch % diff
300 77166.407 77862.041 -0.8934186557
50 13329.233 13284.583 0.3361038882

So for large table tests do not show any considerable performance variance from base code!

I think with these results, we can conclude this patch doesn't seem to
have any noticeable regression for all the tests we have done, right?
Thanks a lot for doing various performance tests.

--
With Regards,
Amit Kapila.
EnterpriseDB: http://www.enterprisedb.com

#75John Naylor
john.naylor@2ndquadrant.com
In reply to: Amit Kapila (#73)
Re: WIP: Avoid creation of the free space map for small tables

On Wed, Jan 16, 2019 at 8:41 AM Amit Kapila <amit.kapila16@gmail.com> wrote:

On Fri, Jan 11, 2019 at 3:54 AM John Naylor <john.naylor@2ndquadrant.com> wrote:
1.
Commit message:

Any pages with wasted free space become visible at next relation extension, so we still control table bloat.

I think the free space will be available after the next pass of
vacuum, no? How can relation extension make it available?

To explain, this diagram shows the map as it looks for different small
table sizes:

0123
A
NA
ANA
NANA

So for a 3-block table, the alternating strategy never checks block 1.
Any free space block 1 has acquired via delete-and-vacuum will become
visible if it extends to 4 blocks. We are accepting a small amount of
bloat for improved performance, as discussed. Would it help to include
this diagram in the README?

2.
+2. For very small heap relations, the FSM would be relatively large and
+wasteful, so as of PostgreSQL 12 we refrain from creating the FSM for
+heaps with HEAP_FSM_CREATION_THRESHOLD pages or fewer, both to save space
+and to improve performance.  To locate free space in this case, we simply
+iterate over the heap, trying alternating pages in turn.  There may be some
+wasted free space in this case, but it becomes visible again upon next
+relation extension.

a. Again, how space becomes available at next relation extension.
b. I think there is no use of mentioning the version number in the
above comment, this code will be present from PG-12, so one can find
out from which version this optimization is added.

It fits with the reference to PG 8.4 earlier in the document. I chose
to be consistent, but to be honest, I'm not much in favor of a lot of
version references in code/READMEs.

3.
BlockNumber
RecordAndGetPageWithFreeSpace(Relation rel, BlockNumber oldPage,
Size oldSpaceAvail, Size spaceNeeded)
{
..
+ /* First try the local map, if it exists. */
+ if (oldPage < fsm_local_map.nblocks)
+ {
..
}

The comment doesn't appear to be completely in sync with the code.
Can't we just check whether "fsm_local_map.nblocks > 0", if so, we
can use a macro for the same? I have changed this in the attached
patch, see what you think about it. I have used it at a few other
places as well.

The macro adds clarity, so I'm in favor of using it.

4.
+ * When we initialize the map, the whole heap is potentially available to
+ * try.  If a caller wanted to reset the map after another backend extends
+ * the relation, this will only flag new blocks as available.  No callers
+ * do this currently, however.
+ */
+static void
+fsm_local_set(Relation rel, BlockNumber curr_nblocks)
{
..
+ if (blkno >= fsm_local_map.nblocks + 2)
..
}

The way you have tried to support the case as quoted in the comment
"If a caller wanted to reset the map after another backend extends .."
doesn't appear to be solid and I am not sure if it is correct either.

I removed this case in v9 and you objected to that as unnecessary, so
I reverted it for v10.

We don't have any way to test the same, so I suggest let's try to
simplify the case w.r.t current requirement of this API. I think we
should
some simple logic to try every other block like:

+ blkno = cur_nblocks - 1;
+ while (true)
+ {
+ fsm_local_map.map[blkno] = FSM_LOCAL_AVAIL;
+ if (blkno >= 2)
+ blkno -= 2;
+ else
+ break;
+ }

I have changed this in the attached patch.

Fine by me.

5.
+/*
+ * Search the local map for an available block to try, in descending order.
+ *
+ * For use when there is no FSM.
+ */
+static BlockNumber
+fsm_local_search(void)

We should give a brief explanation as to why we try in descending
order. I have added some explanation in the attached patch, see what
you think about it?

Apart from the above, I have modified a few comments.

I'll include these with some grammar corrections in the next version.

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

#76John Naylor
john.naylor@2ndquadrant.com
In reply to: John Naylor (#75)
Re: WIP: Avoid creation of the free space map for small tables

On Wed, Jan 16, 2019 at 11:40 AM John Naylor
<john.naylor@2ndquadrant.com> wrote:
&gt; On Wed, Jan 16, 2019 at 8:41 AM Amit Kapila
<amit.kapila16@gmail.com> wrote:
&gt; &gt; can use a macro for the same? I have changed this in the attached
&gt; &gt; patch, see what you think about it. I have used it at a few other
&gt; &gt; places as well.
&gt;
&gt; The macro adds clarity, so I'm in favor of using it.

It just occured to me that the style FSM_LOCAL_MAP_EXISTS seems more
common for macros that refer to constants, and FSMLocalMapExists for
expressions, but I've only seen a small amount of the code base. Do we
have a style preference here, or is it more a matter of matching the
surrounding code?
</amit.kapila16@gmail.com></john.naylor@2ndquadrant.com>

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

#77Tom Lane
tgl@sss.pgh.pa.us
In reply to: John Naylor (#76)
Re: WIP: Avoid creation of the free space map for small tables

John Naylor <john.naylor@2ndquadrant.com> writes:

It just occured to me that the style FSM_LOCAL_MAP_EXISTS seems more
common for macros that refer to constants, and FSMLocalMapExists for
expressions, but I've only seen a small amount of the code base. Do we
have a style preference here, or is it more a matter of matching the
surrounding code?

I believe there's a pretty longstanding tradition in C coding to use
all-caps names for macros representing constants. Some people think
that goes for all macros period, but I'm not on board with that for
function-like macros.

Different parts of the PG code base make different choices between
camel-case and underscore-separation for multiword function names.
For that, I'd say match the style of nearby code.

regards, tom lane

#78Amit Kapila
amit.kapila16@gmail.com
In reply to: Tom Lane (#77)
Re: WIP: Avoid creation of the free space map for small tables

On Wed, Jan 16, 2019 at 11:25 PM Tom Lane <tgl@sss.pgh.pa.us> wrote:

John Naylor <john.naylor@2ndquadrant.com> writes:

It just occured to me that the style FSM_LOCAL_MAP_EXISTS seems more
common for macros that refer to constants, and FSMLocalMapExists for
expressions, but I've only seen a small amount of the code base. Do we
have a style preference here, or is it more a matter of matching the
surrounding code?

I am fine with the style (FSMLocalMapExists) you are suggesting, but
see the similar macros in nearby code like:

#define FSM_TREE_DEPTH ((SlotsPerFSMPage >= 1626) ? 3 : 4)

I think the above is not an exact match. So, I have looked around and
found few other macros which serve a somewhat similar purpose, see
below:

#define ATT_IS_PACKABLE(att) \
((att)->attlen == -1 && (att)->attstorage != 'p')

#define VARLENA_ATT_IS_PACKABLE(att) \
((att)->attstorage != 'p')

#define CHECK_REL_PROCEDURE(pname)

#define SPTEST(f, x, y) \
DatumGetBool(DirectFunctionCall2(f, PointPGetDatum(x), PointPGetDatum(y)))

I believe there's a pretty longstanding tradition in C coding to use
all-caps names for macros representing constants. Some people think
that goes for all macros period, but I'm not on board with that for
function-like macros.

Different parts of the PG code base make different choices between
camel-case and underscore-separation for multiword function names.
For that, I'd say match the style of nearby code.

Yes, that is what we normally do. However, in some cases, we might
need to refer to other places as well which I think is the case here.

--
With Regards,
Amit Kapila.
EnterpriseDB: http://www.enterprisedb.com

#79Amit Kapila
amit.kapila16@gmail.com
In reply to: John Naylor (#75)
Re: WIP: Avoid creation of the free space map for small tables

On Wed, Jan 16, 2019 at 10:10 PM John Naylor
<john.naylor@2ndquadrant.com> wrote:

On Wed, Jan 16, 2019 at 8:41 AM Amit Kapila <amit.kapila16@gmail.com> wrote:

On Fri, Jan 11, 2019 at 3:54 AM John Naylor <john.naylor@2ndquadrant.com> wrote:
1.
Commit message:

Any pages with wasted free space become visible at next relation extension, so we still control table bloat.

I think the free space will be available after the next pass of
vacuum, no? How can relation extension make it available?

To explain, this diagram shows the map as it looks for different small
table sizes:

0123
A
NA
ANA
NANA

So for a 3-block table, the alternating strategy never checks block 1.
Any free space block 1 has acquired via delete-and-vacuum will become
visible if it extends to 4 blocks. We are accepting a small amount of
bloat for improved performance, as discussed. Would it help to include
this diagram in the README?

Yes, I think it would be good if you can explain the concept of
local-map with the help of this example.

2.
+2. For very small heap relations, the FSM would be relatively large and
+wasteful, so as of PostgreSQL 12 we refrain from creating the FSM for
+heaps with HEAP_FSM_CREATION_THRESHOLD pages or fewer, both to save space
+and to improve performance.  To locate free space in this case, we simply
+iterate over the heap, trying alternating pages in turn.  There may be some
+wasted free space in this case, but it becomes visible again upon next
+relation extension.

a. Again, how space becomes available at next relation extension.
b. I think there is no use of mentioning the version number in the
above comment, this code will be present from PG-12, so one can find
out from which version this optimization is added.

It fits with the reference to PG 8.4 earlier in the document. I chose
to be consistent, but to be honest, I'm not much in favor of a lot of
version references in code/READMEs.

Then let's not add a reference to the version number in this case. I
also don't see much advantage of adding version number at least in
this case.

I'll include these with some grammar corrections in the next version.

Okay, thanks!

--
With Regards,
Amit Kapila.
EnterpriseDB: http://www.enterprisedb.com

#80John Naylor
john.naylor@2ndquadrant.com
In reply to: Amit Kapila (#79)
2 attachment(s)
Re: WIP: Avoid creation of the free space map for small tables

On Wed, Jan 16, 2019 at 10:35 PM Amit Kapila <amit.kapila16@gmail.com> wrote:

Yes, I think it would be good if you can explain the concept of
local-map with the help of this example.

Then let's not add a reference to the version number in this case. I

Okay, done in v14. I kept your spelling of the new macro. One minor
detail added: use uint8 rather than char for the local map array. This
seems to be preferred, especially in this file.

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

Attachments:

v14-0001-Avoid-creation-of-the-free-space-map-for-small-h.patchtext/x-patch; charset=US-ASCII; name=v14-0001-Avoid-creation-of-the-free-space-map-for-small-h.patchDownload
From 38bc2d9b4ae3f0d1ab6d21c54ed638c5aee6d637 Mon Sep 17 00:00:00 2001
From: John Naylor <jcnaylor@gmail.com>
Date: Thu, 17 Jan 2019 12:25:30 -0500
Subject: [PATCH v14 1/2] Avoid creation of the free space map for small heap 
 relations.

Previously, all heaps had FSMs. For very small tables, this means that
the FSM took up more space than the heap did. This is wasteful, so now
we refrain from creating the FSM for heaps with 4 pages or fewer. If the
last known target block has insufficient space, we still try to insert
into some other page before before giving up and extending the relation,
since doing otherwise leads to table bloat. Testing showed that trying
every page penalized performance slightly, so we compromise and try
every other page. This way, we visit at most two pages. Any pages with
wasted free space become visible at next relation extension, so we still
control table bloat. As a bonus, directly attempting one or two pages
can even be faster than consulting the FSM would have been.
---
 contrib/pageinspect/expected/page.out     |  77 +++---
 contrib/pageinspect/sql/page.sql          |  33 +--
 doc/src/sgml/storage.sgml                 |  13 +-
 src/backend/access/brin/brin.c            |   2 +-
 src/backend/access/brin/brin_pageops.c    |  10 +-
 src/backend/access/heap/hio.c             |  47 ++--
 src/backend/access/heap/vacuumlazy.c      |  17 +-
 src/backend/access/transam/xact.c         |  14 ++
 src/backend/storage/freespace/README      |  32 ++-
 src/backend/storage/freespace/freespace.c | 272 +++++++++++++++++++++-
 src/backend/storage/freespace/indexfsm.c  |   6 +-
 src/include/storage/freespace.h           |   9 +-
 src/test/regress/expected/fsm.out         |  62 +++++
 src/test/regress/parallel_schedule        |   6 +
 src/test/regress/serial_schedule          |   1 +
 src/test/regress/sql/fsm.sql              |  46 ++++
 16 files changed, 545 insertions(+), 102 deletions(-)
 create mode 100644 src/test/regress/expected/fsm.out
 create mode 100644 src/test/regress/sql/fsm.sql

diff --git a/contrib/pageinspect/expected/page.out b/contrib/pageinspect/expected/page.out
index 3fcd9fbe6d..83e5910453 100644
--- a/contrib/pageinspect/expected/page.out
+++ b/contrib/pageinspect/expected/page.out
@@ -1,48 +1,69 @@
 CREATE EXTENSION pageinspect;
-CREATE TABLE test1 (a int, b int);
-INSERT INTO test1 VALUES (16777217, 131584);
-VACUUM test1;  -- set up FSM
+CREATE TABLE test_rel_forks (a int);
+-- Make sure there are enough blocks in the heap for the FSM to be created.
+INSERT INTO test_rel_forks SELECT g from generate_series(1,10000) g;
+-- set up FSM and VM
+VACUUM test_rel_forks;
 -- The page contents can vary, so just test that it can be read
 -- successfully, but don't keep the output.
-SELECT octet_length(get_raw_page('test1', 'main', 0)) AS main_0;
+SELECT octet_length(get_raw_page('test_rel_forks', 'main', 0)) AS main_0;
  main_0 
 --------
    8192
 (1 row)
 
-SELECT octet_length(get_raw_page('test1', 'main', 1)) AS main_1;
-ERROR:  block number 1 is out of range for relation "test1"
-SELECT octet_length(get_raw_page('test1', 'fsm', 0)) AS fsm_0;
+SELECT octet_length(get_raw_page('test_rel_forks', 'main', 100)) AS main_100;
+ERROR:  block number 100 is out of range for relation "test_rel_forks"
+SELECT octet_length(get_raw_page('test_rel_forks', 'fsm', 0)) AS fsm_0;
  fsm_0 
 -------
   8192
 (1 row)
 
-SELECT octet_length(get_raw_page('test1', 'fsm', 1)) AS fsm_1;
- fsm_1 
--------
-  8192
-(1 row)
-
-SELECT octet_length(get_raw_page('test1', 'vm', 0)) AS vm_0;
+SELECT octet_length(get_raw_page('test_rel_forks', 'fsm', 10)) AS fsm_10;
+ERROR:  block number 10 is out of range for relation "test_rel_forks"
+SELECT octet_length(get_raw_page('test_rel_forks', 'vm', 0)) AS vm_0;
  vm_0 
 ------
  8192
 (1 row)
 
-SELECT octet_length(get_raw_page('test1', 'vm', 1)) AS vm_1;
-ERROR:  block number 1 is out of range for relation "test1"
+SELECT octet_length(get_raw_page('test_rel_forks', 'vm', 1)) AS vm_1;
+ERROR:  block number 1 is out of range for relation "test_rel_forks"
 SELECT octet_length(get_raw_page('xxx', 'main', 0));
 ERROR:  relation "xxx" does not exist
-SELECT octet_length(get_raw_page('test1', 'xxx', 0));
+SELECT octet_length(get_raw_page('test_rel_forks', 'xxx', 0));
 ERROR:  invalid fork name
 HINT:  Valid fork names are "main", "fsm", "vm", and "init".
-SELECT get_raw_page('test1', 0) = get_raw_page('test1', 'main', 0);
+SELECT * FROM fsm_page_contents(get_raw_page('test_rel_forks', 'fsm', 0));
+ fsm_page_contents 
+-------------------
+ 0: 192           +
+ 1: 192           +
+ 3: 192           +
+ 7: 192           +
+ 15: 192          +
+ 31: 192          +
+ 63: 192          +
+ 127: 192         +
+ 255: 192         +
+ 511: 192         +
+ 1023: 192        +
+ 2047: 192        +
+ 4095: 192        +
+ fp_next_slot: 0  +
+ 
+(1 row)
+
+SELECT get_raw_page('test_rel_forks', 0) = get_raw_page('test_rel_forks', 'main', 0);
  ?column? 
 ----------
  t
 (1 row)
 
+DROP TABLE test_rel_forks;
+CREATE TABLE test1 (a int, b int);
+INSERT INTO test1 VALUES (16777217, 131584);
 SELECT pagesize, version FROM page_header(get_raw_page('test1', 0));
  pagesize | version 
 ----------+---------
@@ -62,26 +83,6 @@ SELECT tuple_data_split('test1'::regclass, t_data, t_infomask, t_infomask2, t_bi
  {"\\x01000001","\\x00020200"}
 (1 row)
 
-SELECT * FROM fsm_page_contents(get_raw_page('test1', 'fsm', 0));
- fsm_page_contents 
--------------------
- 0: 254           +
- 1: 254           +
- 3: 254           +
- 7: 254           +
- 15: 254          +
- 31: 254          +
- 63: 254          +
- 127: 254         +
- 255: 254         +
- 511: 254         +
- 1023: 254        +
- 2047: 254        +
- 4095: 254        +
- fp_next_slot: 0  +
- 
-(1 row)
-
 DROP TABLE test1;
 -- check that using any of these functions with a partitioned table or index
 -- would fail
diff --git a/contrib/pageinspect/sql/page.sql b/contrib/pageinspect/sql/page.sql
index 8ac9991837..ee811759d5 100644
--- a/contrib/pageinspect/sql/page.sql
+++ b/contrib/pageinspect/sql/page.sql
@@ -1,26 +1,35 @@
 CREATE EXTENSION pageinspect;
 
-CREATE TABLE test1 (a int, b int);
-INSERT INTO test1 VALUES (16777217, 131584);
+CREATE TABLE test_rel_forks (a int);
+-- Make sure there are enough blocks in the heap for the FSM to be created.
+INSERT INTO test_rel_forks SELECT g from generate_series(1,10000) g;
 
-VACUUM test1;  -- set up FSM
+-- set up FSM and VM
+VACUUM test_rel_forks;
 
 -- The page contents can vary, so just test that it can be read
 -- successfully, but don't keep the output.
 
-SELECT octet_length(get_raw_page('test1', 'main', 0)) AS main_0;
-SELECT octet_length(get_raw_page('test1', 'main', 1)) AS main_1;
+SELECT octet_length(get_raw_page('test_rel_forks', 'main', 0)) AS main_0;
+SELECT octet_length(get_raw_page('test_rel_forks', 'main', 100)) AS main_100;
 
-SELECT octet_length(get_raw_page('test1', 'fsm', 0)) AS fsm_0;
-SELECT octet_length(get_raw_page('test1', 'fsm', 1)) AS fsm_1;
+SELECT octet_length(get_raw_page('test_rel_forks', 'fsm', 0)) AS fsm_0;
+SELECT octet_length(get_raw_page('test_rel_forks', 'fsm', 10)) AS fsm_10;
 
-SELECT octet_length(get_raw_page('test1', 'vm', 0)) AS vm_0;
-SELECT octet_length(get_raw_page('test1', 'vm', 1)) AS vm_1;
+SELECT octet_length(get_raw_page('test_rel_forks', 'vm', 0)) AS vm_0;
+SELECT octet_length(get_raw_page('test_rel_forks', 'vm', 1)) AS vm_1;
 
 SELECT octet_length(get_raw_page('xxx', 'main', 0));
-SELECT octet_length(get_raw_page('test1', 'xxx', 0));
+SELECT octet_length(get_raw_page('test_rel_forks', 'xxx', 0));
+
+SELECT * FROM fsm_page_contents(get_raw_page('test_rel_forks', 'fsm', 0));
+
+SELECT get_raw_page('test_rel_forks', 0) = get_raw_page('test_rel_forks', 'main', 0);
 
-SELECT get_raw_page('test1', 0) = get_raw_page('test1', 'main', 0);
+DROP TABLE test_rel_forks;
+
+CREATE TABLE test1 (a int, b int);
+INSERT INTO test1 VALUES (16777217, 131584);
 
 SELECT pagesize, version FROM page_header(get_raw_page('test1', 0));
 
@@ -29,8 +38,6 @@ SELECT page_checksum(get_raw_page('test1', 0), 0) IS NOT NULL AS silly_checksum_
 SELECT tuple_data_split('test1'::regclass, t_data, t_infomask, t_infomask2, t_bits)
     FROM heap_page_items(get_raw_page('test1', 0));
 
-SELECT * FROM fsm_page_contents(get_raw_page('test1', 'fsm', 0));
-
 DROP TABLE test1;
 
 -- check that using any of these functions with a partitioned table or index
diff --git a/doc/src/sgml/storage.sgml b/doc/src/sgml/storage.sgml
index 8ef2ac8010..cbdad0c3fb 100644
--- a/doc/src/sgml/storage.sgml
+++ b/doc/src/sgml/storage.sgml
@@ -590,12 +590,13 @@ tuple would otherwise be too big.
 <indexterm><primary>FSM</primary><see>Free Space Map</see></indexterm>
 
 <para>
-Each heap and index relation, except for hash indexes, has a Free Space Map
-(FSM) to keep track of available space in the relation. It's stored
-alongside the main relation data in a separate relation fork, named after the
-filenode number of the relation, plus a <literal>_fsm</literal> suffix. For example,
-if the filenode of a relation is 12345, the FSM is stored in a file called
-<filename>12345_fsm</filename>, in the same directory as the main relation file.
+Each heap relation, unless it is very small, and each index relation, except
+for hash indexes, has a Free Space Map (FSM) to keep track of available
+space in the relation. It's stored alongside the main relation data in a
+separate relation fork, named after the filenode number of the relation, plus
+a <literal>_fsm</literal> suffix. For example, if the filenode of a relation
+is 12345, the FSM is stored in a file called <filename>12345_fsm</filename>,
+in the same directory as the main relation file.
 </para>
 
 <para>
diff --git a/src/backend/access/brin/brin.c b/src/backend/access/brin/brin.c
index 52144271c1..4cad53e299 100644
--- a/src/backend/access/brin/brin.c
+++ b/src/backend/access/brin/brin.c
@@ -1149,7 +1149,7 @@ terminate_brin_buildstate(BrinBuildState *state)
 		freespace = PageGetFreeSpace(page);
 		blk = BufferGetBlockNumber(state->bs_currentInsertBuf);
 		ReleaseBuffer(state->bs_currentInsertBuf);
-		RecordPageWithFreeSpace(state->bs_irel, blk, freespace);
+		RecordPageWithFreeSpace(state->bs_irel, blk, freespace, InvalidBlockNumber);
 		FreeSpaceMapVacuumRange(state->bs_irel, blk, blk + 1);
 	}
 
diff --git a/src/backend/access/brin/brin_pageops.c b/src/backend/access/brin/brin_pageops.c
index 164a468155..2eb354f948 100644
--- a/src/backend/access/brin/brin_pageops.c
+++ b/src/backend/access/brin/brin_pageops.c
@@ -310,7 +310,7 @@ brin_doupdate(Relation idxrel, BlockNumber pagesPerRange,
 
 		if (extended)
 		{
-			RecordPageWithFreeSpace(idxrel, newblk, freespace);
+			RecordPageWithFreeSpace(idxrel, newblk, freespace, InvalidBlockNumber);
 			FreeSpaceMapVacuumRange(idxrel, newblk, newblk + 1);
 		}
 
@@ -461,7 +461,7 @@ brin_doinsert(Relation idxrel, BlockNumber pagesPerRange,
 
 	if (extended)
 	{
-		RecordPageWithFreeSpace(idxrel, blk, freespace);
+		RecordPageWithFreeSpace(idxrel, blk, freespace, InvalidBlockNumber);
 		FreeSpaceMapVacuumRange(idxrel, blk, blk + 1);
 	}
 
@@ -654,7 +654,7 @@ brin_page_cleanup(Relation idxrel, Buffer buf)
 
 	/* Measure free space and record it */
 	RecordPageWithFreeSpace(idxrel, BufferGetBlockNumber(buf),
-							br_page_get_freespace(page));
+							br_page_get_freespace(page), InvalidBlockNumber);
 }
 
 /*
@@ -703,7 +703,7 @@ brin_getinsertbuffer(Relation irel, Buffer oldbuf, Size itemsz,
 	/* Choose initial target page, re-using existing target if known */
 	newblk = RelationGetTargetBlock(irel);
 	if (newblk == InvalidBlockNumber)
-		newblk = GetPageWithFreeSpace(irel, itemsz);
+		newblk = GetPageWithFreeSpace(irel, itemsz, true);
 
 	/*
 	 * Loop until we find a page with sufficient free space.  By the time we
@@ -895,7 +895,7 @@ brin_initialize_empty_new_buffer(Relation idxrel, Buffer buffer)
 	 * pages whose FSM records were forgotten in a crash.
 	 */
 	RecordPageWithFreeSpace(idxrel, BufferGetBlockNumber(buffer),
-							br_page_get_freespace(page));
+							br_page_get_freespace(page), InvalidBlockNumber);
 }
 
 
diff --git a/src/backend/access/heap/hio.c b/src/backend/access/heap/hio.c
index 3da0b49ccc..f370352a2b 100644
--- a/src/backend/access/heap/hio.c
+++ b/src/backend/access/heap/hio.c
@@ -239,8 +239,14 @@ RelationAddExtraBlocks(Relation relation, BulkInsertState bistate)
 		 * Immediately update the bottom level of the FSM.  This has a good
 		 * chance of making this page visible to other concurrently inserting
 		 * backends, and we want that to happen without delay.
+		 *
+		 * Since we know the table will end up with extraBlocks additional
+		 * pages, we pass the final number to avoid possible unnecessary
+		 * system calls and to make sure the FSM is created when we add
+		 * the first new page.
 		 */
-		RecordPageWithFreeSpace(relation, blockNum, freespace);
+		RecordPageWithFreeSpace(relation, blockNum, freespace,
+								firstBlock + extraBlocks);
 	}
 	while (--extraBlocks > 0);
 
@@ -377,20 +383,9 @@ RelationGetBufferForTuple(Relation relation, Size len,
 		 * We have no cached target page, so ask the FSM for an initial
 		 * target.
 		 */
-		targetBlock = GetPageWithFreeSpace(relation, len + saveFreeSpace);
-
-		/*
-		 * If the FSM knows nothing of the rel, try the last page before we
-		 * give up and extend.  This avoids one-tuple-per-page syndrome during
-		 * bootstrapping or in a recently-started system.
-		 */
-		if (targetBlock == InvalidBlockNumber)
-		{
-			BlockNumber nblocks = RelationGetNumberOfBlocks(relation);
-
-			if (nblocks > 0)
-				targetBlock = nblocks - 1;
-		}
+		targetBlock = GetPageWithFreeSpace(relation,
+										   len + saveFreeSpace,
+										   false);
 	}
 
 loop:
@@ -484,6 +479,14 @@ loop:
 		{
 			/* use this page as future insert target, too */
 			RelationSetTargetBlock(relation, targetBlock);
+
+			/*
+			 * In case we used an in-memory map of available blocks, reset
+			 * it for next use.
+			 */
+			if (targetBlock < HEAP_FSM_CREATION_THRESHOLD)
+				FSMClearLocalMap();
+
 			return buffer;
 		}
 
@@ -543,9 +546,12 @@ loop:
 
 			/*
 			 * Check if some other backend has extended a block for us while
-			 * we were waiting on the lock.
+			 * we were waiting on the lock.  We only check the FSM -- if there
+			 * isn't one we don't recheck the number of blocks.
 			 */
-			targetBlock = GetPageWithFreeSpace(relation, len + saveFreeSpace);
+			targetBlock = GetPageWithFreeSpace(relation,
+											   len + saveFreeSpace,
+											   true);
 
 			/*
 			 * If some other waiter has already extended the relation, we
@@ -625,5 +631,12 @@ loop:
 	 */
 	RelationSetTargetBlock(relation, BufferGetBlockNumber(buffer));
 
+	/*
+	 * In case we used an in-memory map of available blocks, reset
+	 * it for next use.  We do this unconditionally since after relation
+	 * extension we can't skip this based on the targetBlock.
+	 */
+	FSMClearLocalMap();
+
 	return buffer;
 }
diff --git a/src/backend/access/heap/vacuumlazy.c b/src/backend/access/heap/vacuumlazy.c
index 2d317a9462..26043bf571 100644
--- a/src/backend/access/heap/vacuumlazy.c
+++ b/src/backend/access/heap/vacuumlazy.c
@@ -154,7 +154,7 @@ static BufferAccessStrategy vac_strategy;
 static void lazy_scan_heap(Relation onerel, int options,
 			   LVRelStats *vacrelstats, Relation *Irel, int nindexes,
 			   bool aggressive);
-static void lazy_vacuum_heap(Relation onerel, LVRelStats *vacrelstats);
+static void lazy_vacuum_heap(Relation onerel, LVRelStats *vacrelstats, BlockNumber nblocks);
 static bool lazy_check_needs_freeze(Buffer buf, bool *hastup);
 static void lazy_vacuum_index(Relation indrel,
 				  IndexBulkDeleteResult **stats,
@@ -759,7 +759,7 @@ lazy_scan_heap(Relation onerel, int options, LVRelStats *vacrelstats,
 			pgstat_progress_update_multi_param(2, hvp_index, hvp_val);
 
 			/* Remove tuples from heap */
-			lazy_vacuum_heap(onerel, vacrelstats);
+			lazy_vacuum_heap(onerel, vacrelstats, nblocks);
 
 			/*
 			 * Forget the now-vacuumed tuples, and press on, but be careful
@@ -897,7 +897,7 @@ lazy_scan_heap(Relation onerel, int options, LVRelStats *vacrelstats,
 			MarkBufferDirty(buf);
 			UnlockReleaseBuffer(buf);
 
-			RecordPageWithFreeSpace(onerel, blkno, freespace);
+			RecordPageWithFreeSpace(onerel, blkno, freespace, nblocks);
 			continue;
 		}
 
@@ -936,7 +936,7 @@ lazy_scan_heap(Relation onerel, int options, LVRelStats *vacrelstats,
 			}
 
 			UnlockReleaseBuffer(buf);
-			RecordPageWithFreeSpace(onerel, blkno, freespace);
+			RecordPageWithFreeSpace(onerel, blkno, freespace, nblocks);
 			continue;
 		}
 
@@ -1333,7 +1333,7 @@ lazy_scan_heap(Relation onerel, int options, LVRelStats *vacrelstats,
 		 * taken if there are no indexes.)
 		 */
 		if (vacrelstats->num_dead_tuples == prev_dead_count)
-			RecordPageWithFreeSpace(onerel, blkno, freespace);
+			RecordPageWithFreeSpace(onerel, blkno, freespace, nblocks);
 	}
 
 	/* report that everything is scanned and vacuumed */
@@ -1395,7 +1395,7 @@ lazy_scan_heap(Relation onerel, int options, LVRelStats *vacrelstats,
 		/* Remove tuples from heap */
 		pgstat_progress_update_param(PROGRESS_VACUUM_PHASE,
 									 PROGRESS_VACUUM_PHASE_VACUUM_HEAP);
-		lazy_vacuum_heap(onerel, vacrelstats);
+		lazy_vacuum_heap(onerel, vacrelstats, nblocks);
 		vacrelstats->num_index_scans++;
 	}
 
@@ -1466,9 +1466,10 @@ lazy_scan_heap(Relation onerel, int options, LVRelStats *vacrelstats,
  * Note: the reason for doing this as a second pass is we cannot remove
  * the tuples until we've removed their index entries, and we want to
  * process index entry removal in batches as large as possible.
+ * Note: nblocks is passed as an optimization for RecordPageWithFreeSpace().
  */
 static void
-lazy_vacuum_heap(Relation onerel, LVRelStats *vacrelstats)
+lazy_vacuum_heap(Relation onerel, LVRelStats *vacrelstats, BlockNumber nblocks)
 {
 	int			tupindex;
 	int			npages;
@@ -1505,7 +1506,7 @@ lazy_vacuum_heap(Relation onerel, LVRelStats *vacrelstats)
 		freespace = PageGetHeapFreeSpace(page);
 
 		UnlockReleaseBuffer(buf);
-		RecordPageWithFreeSpace(onerel, tblk, freespace);
+		RecordPageWithFreeSpace(onerel, tblk, freespace, nblocks);
 		npages++;
 	}
 
diff --git a/src/backend/access/transam/xact.c b/src/backend/access/transam/xact.c
index f665e38ecf..b38c6d41e3 100644
--- a/src/backend/access/transam/xact.c
+++ b/src/backend/access/transam/xact.c
@@ -48,6 +48,7 @@
 #include "replication/walsender.h"
 #include "storage/condition_variable.h"
 #include "storage/fd.h"
+#include "storage/freespace.h"
 #include "storage/lmgr.h"
 #include "storage/predicate.h"
 #include "storage/proc.h"
@@ -2488,6 +2489,12 @@ AbortTransaction(void)
 	pgstat_report_wait_end();
 	pgstat_progress_end_command();
 
+	/*
+	 * In case we aborted during RelationGetBufferForTuple(),
+	 * clear the local map of heap pages.
+	 */
+	FSMClearLocalMap();
+
 	/* Clean up buffer I/O and buffer context locks, too */
 	AbortBufferIO();
 	UnlockBuffers();
@@ -4709,6 +4716,13 @@ AbortSubTransaction(void)
 
 	pgstat_report_wait_end();
 	pgstat_progress_end_command();
+
+	/*
+	 * In case we aborted during RelationGetBufferForTuple(),
+	 * clear the local map of heap pages.
+	 */
+	FSMClearLocalMap();
+
 	AbortBufferIO();
 	UnlockBuffers();
 
diff --git a/src/backend/storage/freespace/README b/src/backend/storage/freespace/README
index e7ff23b76f..d811d2c00d 100644
--- a/src/backend/storage/freespace/README
+++ b/src/backend/storage/freespace/README
@@ -8,7 +8,35 @@ free space to hold a tuple to be stored; or to determine that no such page
 exists and the relation must be extended by one page.  As of PostgreSQL 8.4
 each relation has its own, extensible free space map stored in a separate
 "fork" of its relation.  This eliminates the disadvantages of the former
-fixed-size FSM.
+fixed-size FSM.  There are two exceptions:
+
+1. Hash indexes never have a FSM.
+2. For very small tables, a 3-page relation fork would be relatively large
+and wasteful, so to save space we refrain from creating the FSM if the
+heap has HEAP_FSM_CREATION_THRESHOLD pages or fewer.
+
+To locate free space in the latter case, we simply try pages directly without
+knowing ahead of time how much free space they have.  To maintain good
+performance, we create a local in-memory map of pages to try, and only mark
+every other page as available.  For example, in a 3-page heap:
+
+ANAN
+0123
+
+Pages 0 and 2 are marked "available", and page 1 as "not available".
+Page 3 is beyond the end of the relation, so is likewise marked "not
+available".  First we try page 2, and if that doesn't have sufficient free
+space we try page 0 before giving up and extending the relation.  There may
+be some wasted free space on block 1, but if the relation extends to 4 pages:
+
+NANA
+0123
+
+We not only have the new page 3 at our disposal, we can now check page 1
+for free space as well.
+
+FSM data structure
+------------------
 
 It is important to keep the map small so that it can be searched rapidly.
 Therefore, we don't attempt to record the exact free space on a page.
@@ -192,5 +220,3 @@ TODO
 ----
 
 - fastroot to avoid traversing upper nodes with just 1 child
-- use a different system for tables that fit into one FSM page, with a
-  mechanism to switch to the real thing as it grows.
diff --git a/src/backend/storage/freespace/freespace.c b/src/backend/storage/freespace/freespace.c
index eee8286057..0a2b46e444 100644
--- a/src/backend/storage/freespace/freespace.c
+++ b/src/backend/storage/freespace/freespace.c
@@ -76,6 +76,14 @@
 #define FSM_ROOT_LEVEL	(FSM_TREE_DEPTH - 1)
 #define FSM_BOTTOM_LEVEL 0
 
+/* Status codes for the local map. */
+
+/* Either already tried, or beyond the end of the relation */
+#define FSM_LOCAL_NOT_AVAIL 0x00
+
+/* Available to try */
+#define FSM_LOCAL_AVAIL		0x01
+
 /*
  * The internal FSM routines work on a logical addressing scheme. Each
  * level of the tree can be thought of as a separately addressable file.
@@ -89,6 +97,17 @@ typedef struct
 /* Address of the root page. */
 static const FSMAddress FSM_ROOT_ADDRESS = {FSM_ROOT_LEVEL, 0};
 
+/* Local map of block numbers for small heaps with no FSM. */
+typedef struct
+{
+	BlockNumber nblocks;
+	uint8		map[HEAP_FSM_CREATION_THRESHOLD];
+} FSMLocalMap;
+
+static FSMLocalMap fsm_local_map = {0, {FSM_LOCAL_NOT_AVAIL}};
+
+#define FSM_LOCAL_MAP_EXISTS (fsm_local_map.nblocks > 0)
+
 /* functions to navigate the tree */
 static FSMAddress fsm_get_child(FSMAddress parent, uint16 slot);
 static FSMAddress fsm_get_parent(FSMAddress child, uint16 *slot);
@@ -107,10 +126,14 @@ static Size fsm_space_cat_to_avail(uint8 cat);
 /* workhorse functions for various operations */
 static int fsm_set_and_search(Relation rel, FSMAddress addr, uint16 slot,
 				   uint8 newValue, uint8 minValue);
+static void fsm_local_set(Relation rel, BlockNumber cur_nblocks);
 static BlockNumber fsm_search(Relation rel, uint8 min_cat);
+static BlockNumber fsm_local_search(void);
 static uint8 fsm_vacuum_page(Relation rel, FSMAddress addr,
 				BlockNumber start, BlockNumber end,
 				bool *eof);
+static bool fsm_allow_writes(Relation rel, BlockNumber heapblk,
+				BlockNumber nblocks, BlockNumber *get_nblocks);
 
 
 /******** Public API ********/
@@ -127,13 +150,45 @@ static uint8 fsm_vacuum_page(Relation rel, FSMAddress addr,
  * amount of free space available on that page and then try again (see
  * RecordAndGetPageWithFreeSpace).  If InvalidBlockNumber is returned,
  * extend the relation.
+ *
+ * For very small heap relations that don't have a FSM, we try every other
+ * page before extending the relation.  To keep track of which pages have
+ * been tried, initialize a local in-memory map of pages.
  */
 BlockNumber
-GetPageWithFreeSpace(Relation rel, Size spaceNeeded)
+GetPageWithFreeSpace(Relation rel, Size spaceNeeded, bool check_fsm_only)
 {
 	uint8		min_cat = fsm_space_needed_to_cat(spaceNeeded);
+	BlockNumber target_block,
+				nblocks;
+
+	/* First try the FSM, if it exists. */
+	target_block = fsm_search(rel, min_cat);
+
+	if (target_block == InvalidBlockNumber &&
+		rel->rd_rel->relkind == RELKIND_RELATION &&
+		!check_fsm_only)
+	{
+		nblocks = RelationGetNumberOfBlocks(rel);
+
+		if (nblocks > HEAP_FSM_CREATION_THRESHOLD)
+		{
+			/*
+			 * If the FSM knows nothing of the rel, try the last page before
+			 * we give up and extend.  This avoids one-tuple-per-page syndrome
+			 * during bootstrapping or in a recently-started system.
+			 */
+			target_block = nblocks - 1;
+		}
+		else if (nblocks > 0)
+		{
+			/* Create or update local map and get first candidate block. */
+			fsm_local_set(rel, nblocks);
+			target_block = fsm_local_search();
+		}
+	}
 
-	return fsm_search(rel, min_cat);
+	return target_block;
 }
 
 /*
@@ -144,16 +199,46 @@ GetPageWithFreeSpace(Relation rel, Size spaceNeeded)
  * also some effort to return a page close to the old page; if there's a
  * page with enough free space on the same FSM page where the old one page
  * is located, it is preferred.
+ *
+ * For very small heap relations that don't have a FSM, we update the local
+ * map to indicate we have tried a page, and return the next page to try.
  */
 BlockNumber
 RecordAndGetPageWithFreeSpace(Relation rel, BlockNumber oldPage,
 							  Size oldSpaceAvail, Size spaceNeeded)
 {
-	int			old_cat = fsm_space_avail_to_cat(oldSpaceAvail);
-	int			search_cat = fsm_space_needed_to_cat(spaceNeeded);
+	int			old_cat;
+	int			search_cat;
 	FSMAddress	addr;
 	uint16		slot;
 	int			search_slot;
+	BlockNumber nblocks = InvalidBlockNumber;
+
+	/* First try the local map, if it exists. */
+	if (FSM_LOCAL_MAP_EXISTS)
+	{
+		Assert(rel->rd_rel->relkind == RELKIND_RELATION &&
+			   fsm_local_map.map[oldPage] == FSM_LOCAL_AVAIL);
+
+		fsm_local_map.map[oldPage] = FSM_LOCAL_NOT_AVAIL;
+		return fsm_local_search();
+	}
+
+	if (!fsm_allow_writes(rel, oldPage, InvalidBlockNumber, &nblocks))
+	{
+		/*
+		 * If we have neither a local map nor a FSM, we probably just
+		 * tried the target block in the smgr relation entry and failed,
+		 * so we'll need to create the local map.
+		 */
+		fsm_local_set(rel, nblocks);
+		return fsm_local_search();
+	}
+
+	/* Normal FSM logic follows */
+
+	old_cat = fsm_space_avail_to_cat(oldSpaceAvail);
+	search_cat = fsm_space_needed_to_cat(spaceNeeded);
 
 	/* Get the location of the FSM byte representing the heap block */
 	addr = fsm_get_location(oldPage, &slot);
@@ -176,20 +261,41 @@ RecordAndGetPageWithFreeSpace(Relation rel, BlockNumber oldPage,
  * Note that if the new spaceAvail value is higher than the old value stored
  * in the FSM, the space might not become visible to searchers until the next
  * FreeSpaceMapVacuum call, which updates the upper level pages.
+ *
+ * Callers have no need for a local map.
  */
 void
-RecordPageWithFreeSpace(Relation rel, BlockNumber heapBlk, Size spaceAvail)
+RecordPageWithFreeSpace(Relation rel, BlockNumber heapBlk,
+						Size spaceAvail, BlockNumber nblocks)
 {
-	int			new_cat = fsm_space_avail_to_cat(spaceAvail);
+	int			new_cat;
 	FSMAddress	addr;
 	uint16		slot;
+	BlockNumber dummy;
+
+	if (!fsm_allow_writes(rel, heapBlk, nblocks, &dummy))
+		/* No FSM to update and no local map either */
+		return;
 
 	/* Get the location of the FSM byte representing the heap block */
 	addr = fsm_get_location(heapBlk, &slot);
 
+	new_cat = fsm_space_avail_to_cat(spaceAvail);
 	fsm_set_and_search(rel, addr, slot, new_cat, 0);
 }
 
+/*
+ * Clear the local map.  We must call this when we have found a block with
+ * enough free space, when we extend the relation, or on transaction abort.
+ */
+void
+FSMClearLocalMap(void)
+{
+	fsm_local_map.nblocks = 0;
+	memset(&fsm_local_map.map, FSM_LOCAL_NOT_AVAIL,
+		   sizeof(fsm_local_map.map));
+}
+
 /*
  * XLogRecordPageWithFreeSpace - like RecordPageWithFreeSpace, for use in
  *		WAL replay
@@ -204,6 +310,30 @@ XLogRecordPageWithFreeSpace(RelFileNode rnode, BlockNumber heapBlk,
 	BlockNumber blkno;
 	Buffer		buf;
 	Page		page;
+	bool		write_to_fsm;
+
+	/* This is meant to mirror the logic in fsm_allow_writes() */
+	if (heapBlk >= HEAP_FSM_CREATION_THRESHOLD)
+		write_to_fsm = true;
+	else
+	{
+		/* Open the relation at smgr level */
+		SMgrRelation smgr = smgropen(rnode, InvalidBackendId);
+
+		if (smgrexists(smgr, FSM_FORKNUM))
+			write_to_fsm = true;
+		else
+		{
+			BlockNumber heap_nblocks = smgrnblocks(smgr, MAIN_FORKNUM);
+			if (heap_nblocks > HEAP_FSM_CREATION_THRESHOLD)
+				write_to_fsm = true;
+			else
+				write_to_fsm = false;
+		}
+	}
+
+	if (!write_to_fsm)
+		return;
 
 	/* Get the location of the FSM byte representing the heap block */
 	addr = fsm_get_location(heapBlk, &slot);
@@ -904,3 +1034,133 @@ fsm_vacuum_page(Relation rel, FSMAddress addr,
 
 	return max_avail;
 }
+
+/*
+ * For heaps, we prevent creation of the FSM unless the number of pages
+ * exceeds HEAP_FSM_CREATION_THRESHOLD.  For tables that don't already have
+ * a FSM, this will save an inode and a few kB of space.
+ *
+ * XXX The API is a little awkward -- if the caller passes a valid nblocks
+ * value, it can avoid invoking a system call.  If the caller passes
+ * InvalidBlockNumber and receives a false return value, it can get an
+ * up-to-date relation size from get_nblocks.  This saves a few cycles in
+ * the caller, which would otherwise need to get the relation size by itself.
+ */
+static bool
+fsm_allow_writes(Relation rel, BlockNumber heapblk,
+				 BlockNumber nblocks, BlockNumber *get_nblocks)
+{
+	bool		skip_get_nblocks;
+
+	if (heapblk >= HEAP_FSM_CREATION_THRESHOLD)
+		return true;
+
+	/* Non-heap rels can always create a FSM. */
+	if (rel->rd_rel->relkind != RELKIND_RELATION)
+		return true;
+
+	/*
+	 * If the caller knows nblocks, we can avoid a system call later.
+	 * If it doesn't, maybe we have relpages from a previous VACUUM.
+	 * Since the table may have extended since then, we still have to
+	 * count the pages later if we can't return now.
+	 */
+	if (nblocks != InvalidBlockNumber)
+	{
+		if (nblocks > HEAP_FSM_CREATION_THRESHOLD)
+			return true;
+		else
+			skip_get_nblocks = true;
+	}
+	else
+	{
+		if (rel->rd_rel->relpages != InvalidBlockNumber &&
+			rel->rd_rel->relpages > HEAP_FSM_CREATION_THRESHOLD)
+			return true;
+		else
+			skip_get_nblocks = false;
+	}
+
+	RelationOpenSmgr(rel);
+	if (smgrexists(rel->rd_smgr, FSM_FORKNUM))
+		return true;
+
+	if (skip_get_nblocks)
+		return false;
+
+	/* last resort */
+	*get_nblocks = RelationGetNumberOfBlocks(rel);
+	if (*get_nblocks > HEAP_FSM_CREATION_THRESHOLD)
+		return true;
+	else
+		return false;
+}
+
+/*
+ * Initialize or update the local map of blocks to try, for when there is
+ * no FSM.
+ *
+ * When we initialize the map, the whole heap is potentially available to
+ * try.  Testing revealed that trying every block can cause a small
+ * performance dip compared to when we use a FSM, so we try every other
+ * block instead.
+ */
+static void
+fsm_local_set(Relation rel, BlockNumber cur_nblocks)
+{
+	BlockNumber blkno,
+				cached_target_block;
+
+	/* The local map must not be set already. */
+	Assert(!FSM_LOCAL_MAP_EXISTS);
+
+	/*
+	 * Starting at the current last block in the relation and working
+	 * backwards, mark alternating blocks as available.
+	 */
+	blkno = cur_nblocks - 1;
+	while (true)
+	{
+		fsm_local_map.map[blkno] = FSM_LOCAL_AVAIL;
+		if (blkno >= 2)
+			blkno -= 2;
+		else
+			break;
+	}
+
+	/* Cache the number of blocks. */
+	fsm_local_map.nblocks = cur_nblocks;
+
+	/* Set the status of the cached target block to 'unavailable'. */
+	cached_target_block = RelationGetTargetBlock(rel);
+	if (cached_target_block != InvalidBlockNumber &&
+		cached_target_block < cur_nblocks)
+		fsm_local_map.map[cached_target_block] = FSM_LOCAL_NOT_AVAIL;
+}
+
+/*
+ * Search the local map for an available block to try, in descending order.
+ * As such, there is no heuristic available to decide which order will be
+ * better to try, but the probability of having space in the last block in the
+ * map is higher because that is the most recent block added to the heap.
+ *
+ * This function is used when there is no FSM.
+ */
+static BlockNumber
+fsm_local_search(void)
+{
+	BlockNumber		target_block;
+
+	/* Local map must be set by now. */
+	Assert(FSM_LOCAL_MAP_EXISTS);
+
+	target_block = fsm_local_map.nblocks;
+	do
+	{
+		target_block--;
+		if (fsm_local_map.map[target_block] == FSM_LOCAL_AVAIL)
+			return target_block;
+	} while (target_block > 0);
+
+	return InvalidBlockNumber;
+}
diff --git a/src/backend/storage/freespace/indexfsm.c b/src/backend/storage/freespace/indexfsm.c
index 58cedeaa9f..9d8f43d373 100644
--- a/src/backend/storage/freespace/indexfsm.c
+++ b/src/backend/storage/freespace/indexfsm.c
@@ -37,7 +37,7 @@
 BlockNumber
 GetFreeIndexPage(Relation rel)
 {
-	BlockNumber blkno = GetPageWithFreeSpace(rel, BLCKSZ / 2);
+	BlockNumber blkno = GetPageWithFreeSpace(rel, BLCKSZ / 2, true);
 
 	if (blkno != InvalidBlockNumber)
 		RecordUsedIndexPage(rel, blkno);
@@ -51,7 +51,7 @@ GetFreeIndexPage(Relation rel)
 void
 RecordFreeIndexPage(Relation rel, BlockNumber freeBlock)
 {
-	RecordPageWithFreeSpace(rel, freeBlock, BLCKSZ - 1);
+	RecordPageWithFreeSpace(rel, freeBlock, BLCKSZ - 1, InvalidBlockNumber);
 }
 
 
@@ -61,7 +61,7 @@ RecordFreeIndexPage(Relation rel, BlockNumber freeBlock)
 void
 RecordUsedIndexPage(Relation rel, BlockNumber usedBlock)
 {
-	RecordPageWithFreeSpace(rel, usedBlock, 0);
+	RecordPageWithFreeSpace(rel, usedBlock, 0, InvalidBlockNumber);
 }
 
 /*
diff --git a/src/include/storage/freespace.h b/src/include/storage/freespace.h
index 8b00033438..b077c2c94f 100644
--- a/src/include/storage/freespace.h
+++ b/src/include/storage/freespace.h
@@ -18,15 +18,20 @@
 #include "storage/relfilenode.h"
 #include "utils/relcache.h"
 
+/* Only create the FSM if the heap has greater than this many blocks */
+#define HEAP_FSM_CREATION_THRESHOLD 4
+
 /* prototypes for public functions in freespace.c */
 extern Size GetRecordedFreeSpace(Relation rel, BlockNumber heapBlk);
-extern BlockNumber GetPageWithFreeSpace(Relation rel, Size spaceNeeded);
+extern BlockNumber GetPageWithFreeSpace(Relation rel, Size spaceNeeded,
+							bool check_fsm_only);
 extern BlockNumber RecordAndGetPageWithFreeSpace(Relation rel,
 							  BlockNumber oldPage,
 							  Size oldSpaceAvail,
 							  Size spaceNeeded);
 extern void RecordPageWithFreeSpace(Relation rel, BlockNumber heapBlk,
-						Size spaceAvail);
+						Size spaceAvail, BlockNumber nblocks);
+extern void FSMClearLocalMap(void);
 extern void XLogRecordPageWithFreeSpace(RelFileNode rnode, BlockNumber heapBlk,
 							Size spaceAvail);
 
diff --git a/src/test/regress/expected/fsm.out b/src/test/regress/expected/fsm.out
new file mode 100644
index 0000000000..bf590bfa58
--- /dev/null
+++ b/src/test/regress/expected/fsm.out
@@ -0,0 +1,62 @@
+--
+-- Free Space Map test
+--
+CREATE TABLE fsm_check_size (num int, str text);
+-- Fill 3 blocks with as many large records as will fit
+-- No FSM
+INSERT INTO fsm_check_size SELECT g, rpad('', 1024, 'a')
+FROM generate_series(1,7*3) g;
+VACUUM fsm_check_size;
+SELECT pg_relation_size('fsm_check_size', 'main') AS heap_size,
+pg_relation_size('fsm_check_size', 'fsm') AS fsm_size;
+ heap_size | fsm_size 
+-----------+----------
+     24576 |        0
+(1 row)
+
+-- Clear some space on block 0
+DELETE FROM fsm_check_size where num <= 5;
+VACUUM fsm_check_size;
+-- Insert small record in block 2 to set the cached smgr targetBlock
+INSERT INTO fsm_check_size values(99, 'b');
+-- Insert large record and make sure it goes in block 0 rather than
+-- causing the relation to extend
+INSERT INTO fsm_check_size values (101, rpad('', 1024, 'a'));
+SELECT pg_relation_size('fsm_check_size', 'main') AS heap_size,
+pg_relation_size('fsm_check_size', 'fsm') AS fsm_size;
+ heap_size | fsm_size 
+-----------+----------
+     24576 |        0
+(1 row)
+
+-- Extend table with enough blocks to exceed the FSM threshold
+-- FSM is created and extended to 3 blocks
+INSERT INTO fsm_check_size SELECT g, 'c' FROM generate_series(200,3000) g;
+VACUUM fsm_check_size;
+SELECT pg_relation_size('fsm_check_size', 'fsm') AS fsm_size;
+ fsm_size 
+----------
+    24576
+(1 row)
+
+-- Truncate heap to 1 block
+-- No change in FSM
+DELETE FROM fsm_check_size WHERE num > 7;
+VACUUM fsm_check_size;
+SELECT pg_relation_size('fsm_check_size', 'fsm') AS fsm_size;
+ fsm_size 
+----------
+    24576
+(1 row)
+
+-- Truncate heap to 0 blocks
+-- FSM now truncated to 2 blocks
+DELETE FROM fsm_check_size;
+VACUUM fsm_check_size;
+SELECT pg_relation_size('fsm_check_size', 'fsm') AS fsm_size;
+ fsm_size 
+----------
+    16384
+(1 row)
+
+DROP TABLE fsm_check_size;
diff --git a/src/test/regress/parallel_schedule b/src/test/regress/parallel_schedule
index cc0bbf5db9..4051a4ad4e 100644
--- a/src/test/regress/parallel_schedule
+++ b/src/test/regress/parallel_schedule
@@ -68,6 +68,12 @@ test: create_aggregate create_function_3 create_cast constraints triggers inheri
 # ----------
 test: sanity_check
 
+# ----------
+# fsm does a delete followed by vacuum, and running it in parallel can prevent
+# removal of rows.
+# ----------
+test: fsm
+
 # ----------
 # Believe it or not, select creates a table, subsequent
 # tests need.
diff --git a/src/test/regress/serial_schedule b/src/test/regress/serial_schedule
index 0c10c7100c..ac1ea622d6 100644
--- a/src/test/regress/serial_schedule
+++ b/src/test/regress/serial_schedule
@@ -80,6 +80,7 @@ test: roleattributes
 test: create_am
 test: hash_func
 test: sanity_check
+test: fsm
 test: errors
 test: select
 test: select_into
diff --git a/src/test/regress/sql/fsm.sql b/src/test/regress/sql/fsm.sql
new file mode 100644
index 0000000000..a864c7fd88
--- /dev/null
+++ b/src/test/regress/sql/fsm.sql
@@ -0,0 +1,46 @@
+--
+-- Free Space Map test
+--
+
+CREATE TABLE fsm_check_size (num int, str text);
+
+-- Fill 3 blocks with as many large records as will fit
+-- No FSM
+INSERT INTO fsm_check_size SELECT g, rpad('', 1024, 'a')
+FROM generate_series(1,7*3) g;
+VACUUM fsm_check_size;
+SELECT pg_relation_size('fsm_check_size', 'main') AS heap_size,
+pg_relation_size('fsm_check_size', 'fsm') AS fsm_size;
+
+-- Clear some space on block 0
+DELETE FROM fsm_check_size where num <= 5;
+VACUUM fsm_check_size;
+
+-- Insert small record in block 2 to set the cached smgr targetBlock
+INSERT INTO fsm_check_size values(99, 'b');
+
+-- Insert large record and make sure it goes in block 0 rather than
+-- causing the relation to extend
+INSERT INTO fsm_check_size values (101, rpad('', 1024, 'a'));
+SELECT pg_relation_size('fsm_check_size', 'main') AS heap_size,
+pg_relation_size('fsm_check_size', 'fsm') AS fsm_size;
+
+-- Extend table with enough blocks to exceed the FSM threshold
+-- FSM is created and extended to 3 blocks
+INSERT INTO fsm_check_size SELECT g, 'c' FROM generate_series(200,3000) g;
+VACUUM fsm_check_size;
+SELECT pg_relation_size('fsm_check_size', 'fsm') AS fsm_size;
+
+-- Truncate heap to 1 block
+-- No change in FSM
+DELETE FROM fsm_check_size WHERE num > 7;
+VACUUM fsm_check_size;
+SELECT pg_relation_size('fsm_check_size', 'fsm') AS fsm_size;
+
+-- Truncate heap to 0 blocks
+-- FSM now truncated to 2 blocks
+DELETE FROM fsm_check_size;
+VACUUM fsm_check_size;
+SELECT pg_relation_size('fsm_check_size', 'fsm') AS fsm_size;
+
+DROP TABLE fsm_check_size;
-- 
2.17.1

v14-0002-During-pg_upgrade-conditionally-skip-transfer-of.patchtext/x-patch; charset=US-ASCII; name=v14-0002-During-pg_upgrade-conditionally-skip-transfer-of.patchDownload
From 87b563815fd60a64c86883dd3fabbc20f95c8d10 Mon Sep 17 00:00:00 2001
From: John Naylor <jcnaylor@gmail.com>
Date: Thu, 17 Jan 2019 12:27:46 -0500
Subject: [PATCH v14 2/2] During pg_upgrade, conditionally skip transfer of 
 FSMs.

If a heap on the old cluster has 4 pages or fewer, don't copy or
link the FSM. This will reduce space usage for installations with
large numbers of small tables.
---
 src/bin/pg_upgrade/info.c        | 11 +++++--
 src/bin/pg_upgrade/pg_upgrade.h  |  6 +++-
 src/bin/pg_upgrade/relfilenode.c | 56 ++++++++++++++++++--------------
 3 files changed, 46 insertions(+), 27 deletions(-)

diff --git a/src/bin/pg_upgrade/info.c b/src/bin/pg_upgrade/info.c
index 2f925f086c..c7598b3de0 100644
--- a/src/bin/pg_upgrade/info.c
+++ b/src/bin/pg_upgrade/info.c
@@ -200,6 +200,7 @@ create_rel_filename_map(const char *old_data, const char *new_data,
 
 	map->old_db_oid = old_db->db_oid;
 	map->new_db_oid = new_db->db_oid;
+	map->relkind = old_rel->relkind;
 
 	/*
 	 * old_relfilenode might differ from pg_class.oid (and hence
@@ -418,6 +419,7 @@ get_rel_infos(ClusterInfo *cluster, DbInfo *dbinfo)
 	char	   *nspname = NULL;
 	char	   *relname = NULL;
 	char	   *tablespace = NULL;
+	char	   *relkind = NULL;
 	int			i_spclocation,
 				i_nspname,
 				i_relname,
@@ -425,7 +427,8 @@ get_rel_infos(ClusterInfo *cluster, DbInfo *dbinfo)
 				i_indtable,
 				i_toastheap,
 				i_relfilenode,
-				i_reltablespace;
+				i_reltablespace,
+				i_relkind;
 	char		query[QUERY_ALLOC];
 	char	   *last_namespace = NULL,
 			   *last_tablespace = NULL;
@@ -494,7 +497,7 @@ get_rel_infos(ClusterInfo *cluster, DbInfo *dbinfo)
 	 */
 	snprintf(query + strlen(query), sizeof(query) - strlen(query),
 			 "SELECT all_rels.*, n.nspname, c.relname, "
-			 "  c.relfilenode, c.reltablespace, %s "
+			 "  c.relfilenode, c.reltablespace, c.relkind, %s "
 			 "FROM (SELECT * FROM regular_heap "
 			 "      UNION ALL "
 			 "      SELECT * FROM toast_heap "
@@ -526,6 +529,7 @@ get_rel_infos(ClusterInfo *cluster, DbInfo *dbinfo)
 	i_relfilenode = PQfnumber(res, "relfilenode");
 	i_reltablespace = PQfnumber(res, "reltablespace");
 	i_spclocation = PQfnumber(res, "spclocation");
+	i_relkind = PQfnumber(res, "relkind");
 
 	for (relnum = 0; relnum < ntups; relnum++)
 	{
@@ -555,6 +559,9 @@ get_rel_infos(ClusterInfo *cluster, DbInfo *dbinfo)
 		relname = PQgetvalue(res, relnum, i_relname);
 		curr->relname = pg_strdup(relname);
 
+		relkind = PQgetvalue(res, relnum, i_relkind);
+		curr->relkind = relkind[0];
+
 		curr->relfilenode = atooid(PQgetvalue(res, relnum, i_relfilenode));
 		curr->tblsp_alloc = false;
 
diff --git a/src/bin/pg_upgrade/pg_upgrade.h b/src/bin/pg_upgrade/pg_upgrade.h
index 2f67eee22b..6cd0e0967f 100644
--- a/src/bin/pg_upgrade/pg_upgrade.h
+++ b/src/bin/pg_upgrade/pg_upgrade.h
@@ -147,6 +147,7 @@ typedef struct
 	char	   *tablespace;		/* tablespace path; "" for cluster default */
 	bool		nsp_alloc;		/* should nspname be freed? */
 	bool		tblsp_alloc;	/* should tablespace be freed? */
+	char		relkind;		/* relation relkind -- see pg_class.h */
 } RelInfo;
 
 typedef struct
@@ -173,9 +174,12 @@ typedef struct
 	 */
 	Oid			old_relfilenode;
 	Oid			new_relfilenode;
-	/* the rest are used only for logging and error reporting */
+
+	/* These are used only for logging and error reporting. */
 	char	   *nspname;		/* namespaces */
 	char	   *relname;
+
+	char		relkind;		/* relation relkind -- see pg_class.h */
 } FileNameMap;
 
 /*
diff --git a/src/bin/pg_upgrade/relfilenode.c b/src/bin/pg_upgrade/relfilenode.c
index 0c78073f0e..6a0e78db25 100644
--- a/src/bin/pg_upgrade/relfilenode.c
+++ b/src/bin/pg_upgrade/relfilenode.c
@@ -14,10 +14,11 @@
 #include <sys/stat.h>
 #include "catalog/pg_class_d.h"
 #include "access/transam.h"
+#include "storage/freespace.h"
 
 
 static void transfer_single_new_db(FileNameMap *maps, int size, char *old_tablespace);
-static void transfer_relfile(FileNameMap *map, const char *suffix, bool vm_must_add_frozenbit);
+static Size transfer_relfile(FileNameMap *map, const char *suffix, bool vm_must_add_frozenbit);
 
 
 /*
@@ -144,6 +145,7 @@ transfer_single_new_db(FileNameMap *maps, int size, char *old_tablespace)
 	int			mapnum;
 	bool		vm_crashsafe_match = true;
 	bool		vm_must_add_frozenbit = false;
+	Size		first_seg_size = 0;
 
 	/*
 	 * Do the old and new cluster disagree on the crash-safetiness of the vm
@@ -165,18 +167,22 @@ transfer_single_new_db(FileNameMap *maps, int size, char *old_tablespace)
 		if (old_tablespace == NULL ||
 			strcmp(maps[mapnum].old_tablespace, old_tablespace) == 0)
 		{
-			/* transfer primary file */
-			transfer_relfile(&maps[mapnum], "", vm_must_add_frozenbit);
+			/* Transfer main fork and return size of the first segment. */
+			first_seg_size = transfer_relfile(&maps[mapnum], "", vm_must_add_frozenbit);
 
 			/* fsm/vm files added in PG 8.4 */
 			if (GET_MAJOR_VERSION(old_cluster.major_version) >= 804)
 			{
 				/*
-				 * Copy/link any fsm and vm files, if they exist
+				 * Copy/link any fsm and vm files, if they exist and if they would
+				 * be created in the new cluster.
 				 */
-				transfer_relfile(&maps[mapnum], "_fsm", vm_must_add_frozenbit);
+				if (maps[mapnum].relkind != RELKIND_RELATION ||
+					first_seg_size > HEAP_FSM_CREATION_THRESHOLD * BLCKSZ ||
+					GET_MAJOR_VERSION(new_cluster.major_version) <= 1100)
+					(void) transfer_relfile(&maps[mapnum], "_fsm", vm_must_add_frozenbit);
 				if (vm_crashsafe_match)
-					transfer_relfile(&maps[mapnum], "_vm", vm_must_add_frozenbit);
+					(void) transfer_relfile(&maps[mapnum], "_vm", vm_must_add_frozenbit);
 			}
 		}
 	}
@@ -190,7 +196,7 @@ transfer_single_new_db(FileNameMap *maps, int size, char *old_tablespace)
  * is true, visibility map forks are converted and rewritten, even in link
  * mode.
  */
-static void
+static Size
 transfer_relfile(FileNameMap *map, const char *type_suffix, bool vm_must_add_frozenbit)
 {
 	char		old_file[MAXPGPATH];
@@ -198,6 +204,7 @@ transfer_relfile(FileNameMap *map, const char *type_suffix, bool vm_must_add_fro
 	int			segno;
 	char		extent_suffix[65];
 	struct stat statbuf;
+	Size		first_seg_size = 0;
 
 	/*
 	 * Now copy/link any related segments as well. Remember, PG breaks large
@@ -226,26 +233,27 @@ transfer_relfile(FileNameMap *map, const char *type_suffix, bool vm_must_add_fro
 				 type_suffix,
 				 extent_suffix);
 
-		/* Is it an extent, fsm, or vm file? */
-		if (type_suffix[0] != '\0' || segno != 0)
+		/* Did file open fail? */
+		if (stat(old_file, &statbuf) != 0)
 		{
-			/* Did file open fail? */
-			if (stat(old_file, &statbuf) != 0)
-			{
-				/* File does not exist?  That's OK, just return */
-				if (errno == ENOENT)
-					return;
-				else
-					pg_fatal("error while checking for file existence \"%s.%s\" (\"%s\" to \"%s\"): %s\n",
-							 map->nspname, map->relname, old_file, new_file,
-							 strerror(errno));
-			}
-
-			/* If file is empty, just return */
-			if (statbuf.st_size == 0)
-				return;
+			/* Extent, fsm, or vm does not exist?  That's OK, just return */
+			if (errno == ENOENT &&
+				(type_suffix[0] != '\0' || segno != 0))
+				return first_seg_size;
+			else
+				pg_fatal("error while checking for file existence \"%s.%s\" (\"%s\" to \"%s\"): %s\n",
+						 map->nspname, map->relname, old_file, new_file,
+						 strerror(errno));
 		}
 
+		/* Save the size of the first segment of the main fork. */
+		else if (type_suffix[0] == '\0' && segno == 0)
+			first_seg_size = statbuf.st_size;
+
+		/* If extent, fsm, or vm is empty, just return */
+		else if (statbuf.st_size == 0)
+			return first_seg_size;
+
 		unlink(new_file);
 
 		/* Copying files might take some time, so give feedback. */
-- 
2.17.1

#81Amit Kapila
amit.kapila16@gmail.com
In reply to: John Naylor (#80)
1 attachment(s)
Re: WIP: Avoid creation of the free space map for small tables

On Thu, Jan 17, 2019 at 11:13 PM John Naylor
<john.naylor@2ndquadrant.com> wrote:

On Wed, Jan 16, 2019 at 10:35 PM Amit Kapila <amit.kapila16@gmail.com> wrote:

Yes, I think it would be good if you can explain the concept of
local-map with the help of this example.

Then let's not add a reference to the version number in this case. I

Okay, done in v14. I kept your spelling of the new macro. One minor
detail added: use uint8 rather than char for the local map array. This
seems to be preferred, especially in this file.

I am fine with your change.

Few more comments:
1.
I think we should not allow to create FSM for toast tables as well
till there size reaches HEAP_FSM_CREATION_THRESHOLD. If you try below
test, you can see that FSM will be created for the toast table even if
the size of toast relation is 1 page.

CREATE OR REPLACE FUNCTION random_text(length INTEGER)
RETURNS TEXT
LANGUAGE SQL
AS $$ select string_agg(chr
(32+(random()*96)::int), '') from generate_series(1,length); $$;

create table tt(c1 int, c2 text);
insert into tt values(1, random_text(2500));
Vacuum tt;

I have fixed this in the attached patch, kindly verify it once and see
if you can add the test for same as well.

2.
-CREATE TABLE test1 (a int, b int);
-INSERT INTO test1 VALUES (16777217, 131584);
+CREATE TABLE test_rel_forks (a
int);
+-- Make sure there are enough blocks in the heap for the FSM to be created.
+INSERT INTO test_rel_forks SELECT g
from generate_series(1,10000) g;
-VACUUM test1;  -- set up FSM
+-- set up FSM and VM
+VACUUM test_rel_forks;

This test will create 45 pages instead of 1. I know that to create
FSM, we now need more than 4 pages, but 45 seems to be on the higher
side. I think we should not unnecessarily populate more data if there
is no particular need for it, let's restrict the number of pages to 5
if possible.

3.
-SELECT octet_length(get_raw_page('test1', 'fsm', 1)) AS fsm_1;
- fsm_1
--------
-  8192
-(1 row)
-
-SELECT octet_length
(get_raw_page('test1', 'vm', 0)) AS vm_0;
+SELECT octet_length(get_raw_page('test_rel_forks', 'fsm', 10)) AS fsm_10;
+ERROR:  block number 10 is out of range for relation "test_rel_forks"

Why have you changed the test definition here? Previously test checks
the existing FSM page, but now it tries to access out of range page.

Apart from the above, I have changed one sentence in README.

--
With Regards,
Amit Kapila.
EnterpriseDB: http://www.enterprisedb.com

Attachments:

v15-0001-Avoid-creation-of-the-free-space-map-for-small-heap-.patchapplication/octet-stream; name=v15-0001-Avoid-creation-of-the-free-space-map-for-small-heap-.patchDownload
From 11dfb805e03bc7e144fd137ef6dc6601ff728d3a Mon Sep 17 00:00:00 2001
From: Amit Kapila <akapila@postgresql.org>
Date: Sat, 19 Jan 2019 18:20:35 +0530
Subject: [PATCH] Avoid creation of the free space map for small heap
 relations.

Previously, all heaps had FSMs. For very small tables, this means that
the FSM took up more space than the heap did. This is wasteful, so now
we refrain from creating the FSM for heaps with 4 pages or fewer. If the
last known target block has insufficient space, we still try to insert
into some other page before before giving up and extending the relation,
since doing otherwise leads to table bloat. Testing showed that trying
every page penalized performance slightly, so we compromise and try
every other page. This way, we visit at most two pages. Any pages with
wasted free space become visible at next relation extension, so we still
control table bloat. As a bonus, directly attempting one or two pages
can even be faster than consulting the FSM would have been.
---
 contrib/pageinspect/expected/page.out     |  77 ++++-----
 contrib/pageinspect/sql/page.sql          |  33 ++--
 doc/src/sgml/storage.sgml                 |  13 +-
 src/backend/access/brin/brin.c            |   2 +-
 src/backend/access/brin/brin_pageops.c    |  10 +-
 src/backend/access/heap/hio.c             |  47 +++--
 src/backend/access/heap/vacuumlazy.c      |  17 +-
 src/backend/access/transam/xact.c         |  14 ++
 src/backend/storage/freespace/README      |  33 +++-
 src/backend/storage/freespace/freespace.c | 275 +++++++++++++++++++++++++++++-
 src/backend/storage/freespace/indexfsm.c  |   6 +-
 src/include/storage/freespace.h           |   9 +-
 src/test/regress/expected/fsm.out         |  62 +++++++
 src/test/regress/parallel_schedule        |   6 +
 src/test/regress/serial_schedule          |   1 +
 src/test/regress/sql/fsm.sql              |  46 +++++
 16 files changed, 549 insertions(+), 102 deletions(-)
 create mode 100644 src/test/regress/expected/fsm.out
 create mode 100644 src/test/regress/sql/fsm.sql

diff --git a/contrib/pageinspect/expected/page.out b/contrib/pageinspect/expected/page.out
index 3fcd9fb..83e5910 100644
--- a/contrib/pageinspect/expected/page.out
+++ b/contrib/pageinspect/expected/page.out
@@ -1,48 +1,69 @@
 CREATE EXTENSION pageinspect;
-CREATE TABLE test1 (a int, b int);
-INSERT INTO test1 VALUES (16777217, 131584);
-VACUUM test1;  -- set up FSM
+CREATE TABLE test_rel_forks (a int);
+-- Make sure there are enough blocks in the heap for the FSM to be created.
+INSERT INTO test_rel_forks SELECT g from generate_series(1,10000) g;
+-- set up FSM and VM
+VACUUM test_rel_forks;
 -- The page contents can vary, so just test that it can be read
 -- successfully, but don't keep the output.
-SELECT octet_length(get_raw_page('test1', 'main', 0)) AS main_0;
+SELECT octet_length(get_raw_page('test_rel_forks', 'main', 0)) AS main_0;
  main_0 
 --------
    8192
 (1 row)
 
-SELECT octet_length(get_raw_page('test1', 'main', 1)) AS main_1;
-ERROR:  block number 1 is out of range for relation "test1"
-SELECT octet_length(get_raw_page('test1', 'fsm', 0)) AS fsm_0;
+SELECT octet_length(get_raw_page('test_rel_forks', 'main', 100)) AS main_100;
+ERROR:  block number 100 is out of range for relation "test_rel_forks"
+SELECT octet_length(get_raw_page('test_rel_forks', 'fsm', 0)) AS fsm_0;
  fsm_0 
 -------
   8192
 (1 row)
 
-SELECT octet_length(get_raw_page('test1', 'fsm', 1)) AS fsm_1;
- fsm_1 
--------
-  8192
-(1 row)
-
-SELECT octet_length(get_raw_page('test1', 'vm', 0)) AS vm_0;
+SELECT octet_length(get_raw_page('test_rel_forks', 'fsm', 10)) AS fsm_10;
+ERROR:  block number 10 is out of range for relation "test_rel_forks"
+SELECT octet_length(get_raw_page('test_rel_forks', 'vm', 0)) AS vm_0;
  vm_0 
 ------
  8192
 (1 row)
 
-SELECT octet_length(get_raw_page('test1', 'vm', 1)) AS vm_1;
-ERROR:  block number 1 is out of range for relation "test1"
+SELECT octet_length(get_raw_page('test_rel_forks', 'vm', 1)) AS vm_1;
+ERROR:  block number 1 is out of range for relation "test_rel_forks"
 SELECT octet_length(get_raw_page('xxx', 'main', 0));
 ERROR:  relation "xxx" does not exist
-SELECT octet_length(get_raw_page('test1', 'xxx', 0));
+SELECT octet_length(get_raw_page('test_rel_forks', 'xxx', 0));
 ERROR:  invalid fork name
 HINT:  Valid fork names are "main", "fsm", "vm", and "init".
-SELECT get_raw_page('test1', 0) = get_raw_page('test1', 'main', 0);
+SELECT * FROM fsm_page_contents(get_raw_page('test_rel_forks', 'fsm', 0));
+ fsm_page_contents 
+-------------------
+ 0: 192           +
+ 1: 192           +
+ 3: 192           +
+ 7: 192           +
+ 15: 192          +
+ 31: 192          +
+ 63: 192          +
+ 127: 192         +
+ 255: 192         +
+ 511: 192         +
+ 1023: 192        +
+ 2047: 192        +
+ 4095: 192        +
+ fp_next_slot: 0  +
+ 
+(1 row)
+
+SELECT get_raw_page('test_rel_forks', 0) = get_raw_page('test_rel_forks', 'main', 0);
  ?column? 
 ----------
  t
 (1 row)
 
+DROP TABLE test_rel_forks;
+CREATE TABLE test1 (a int, b int);
+INSERT INTO test1 VALUES (16777217, 131584);
 SELECT pagesize, version FROM page_header(get_raw_page('test1', 0));
  pagesize | version 
 ----------+---------
@@ -62,26 +83,6 @@ SELECT tuple_data_split('test1'::regclass, t_data, t_infomask, t_infomask2, t_bi
  {"\\x01000001","\\x00020200"}
 (1 row)
 
-SELECT * FROM fsm_page_contents(get_raw_page('test1', 'fsm', 0));
- fsm_page_contents 
--------------------
- 0: 254           +
- 1: 254           +
- 3: 254           +
- 7: 254           +
- 15: 254          +
- 31: 254          +
- 63: 254          +
- 127: 254         +
- 255: 254         +
- 511: 254         +
- 1023: 254        +
- 2047: 254        +
- 4095: 254        +
- fp_next_slot: 0  +
- 
-(1 row)
-
 DROP TABLE test1;
 -- check that using any of these functions with a partitioned table or index
 -- would fail
diff --git a/contrib/pageinspect/sql/page.sql b/contrib/pageinspect/sql/page.sql
index 8ac9991..ee81175 100644
--- a/contrib/pageinspect/sql/page.sql
+++ b/contrib/pageinspect/sql/page.sql
@@ -1,26 +1,35 @@
 CREATE EXTENSION pageinspect;
 
-CREATE TABLE test1 (a int, b int);
-INSERT INTO test1 VALUES (16777217, 131584);
+CREATE TABLE test_rel_forks (a int);
+-- Make sure there are enough blocks in the heap for the FSM to be created.
+INSERT INTO test_rel_forks SELECT g from generate_series(1,10000) g;
 
-VACUUM test1;  -- set up FSM
+-- set up FSM and VM
+VACUUM test_rel_forks;
 
 -- The page contents can vary, so just test that it can be read
 -- successfully, but don't keep the output.
 
-SELECT octet_length(get_raw_page('test1', 'main', 0)) AS main_0;
-SELECT octet_length(get_raw_page('test1', 'main', 1)) AS main_1;
+SELECT octet_length(get_raw_page('test_rel_forks', 'main', 0)) AS main_0;
+SELECT octet_length(get_raw_page('test_rel_forks', 'main', 100)) AS main_100;
 
-SELECT octet_length(get_raw_page('test1', 'fsm', 0)) AS fsm_0;
-SELECT octet_length(get_raw_page('test1', 'fsm', 1)) AS fsm_1;
+SELECT octet_length(get_raw_page('test_rel_forks', 'fsm', 0)) AS fsm_0;
+SELECT octet_length(get_raw_page('test_rel_forks', 'fsm', 10)) AS fsm_10;
 
-SELECT octet_length(get_raw_page('test1', 'vm', 0)) AS vm_0;
-SELECT octet_length(get_raw_page('test1', 'vm', 1)) AS vm_1;
+SELECT octet_length(get_raw_page('test_rel_forks', 'vm', 0)) AS vm_0;
+SELECT octet_length(get_raw_page('test_rel_forks', 'vm', 1)) AS vm_1;
 
 SELECT octet_length(get_raw_page('xxx', 'main', 0));
-SELECT octet_length(get_raw_page('test1', 'xxx', 0));
+SELECT octet_length(get_raw_page('test_rel_forks', 'xxx', 0));
+
+SELECT * FROM fsm_page_contents(get_raw_page('test_rel_forks', 'fsm', 0));
+
+SELECT get_raw_page('test_rel_forks', 0) = get_raw_page('test_rel_forks', 'main', 0);
 
-SELECT get_raw_page('test1', 0) = get_raw_page('test1', 'main', 0);
+DROP TABLE test_rel_forks;
+
+CREATE TABLE test1 (a int, b int);
+INSERT INTO test1 VALUES (16777217, 131584);
 
 SELECT pagesize, version FROM page_header(get_raw_page('test1', 0));
 
@@ -29,8 +38,6 @@ SELECT page_checksum(get_raw_page('test1', 0), 0) IS NOT NULL AS silly_checksum_
 SELECT tuple_data_split('test1'::regclass, t_data, t_infomask, t_infomask2, t_bits)
     FROM heap_page_items(get_raw_page('test1', 0));
 
-SELECT * FROM fsm_page_contents(get_raw_page('test1', 'fsm', 0));
-
 DROP TABLE test1;
 
 -- check that using any of these functions with a partitioned table or index
diff --git a/doc/src/sgml/storage.sgml b/doc/src/sgml/storage.sgml
index 8ef2ac8..cbdad0c 100644
--- a/doc/src/sgml/storage.sgml
+++ b/doc/src/sgml/storage.sgml
@@ -590,12 +590,13 @@ tuple would otherwise be too big.
 <indexterm><primary>FSM</primary><see>Free Space Map</see></indexterm>
 
 <para>
-Each heap and index relation, except for hash indexes, has a Free Space Map
-(FSM) to keep track of available space in the relation. It's stored
-alongside the main relation data in a separate relation fork, named after the
-filenode number of the relation, plus a <literal>_fsm</literal> suffix. For example,
-if the filenode of a relation is 12345, the FSM is stored in a file called
-<filename>12345_fsm</filename>, in the same directory as the main relation file.
+Each heap relation, unless it is very small, and each index relation, except
+for hash indexes, has a Free Space Map (FSM) to keep track of available
+space in the relation. It's stored alongside the main relation data in a
+separate relation fork, named after the filenode number of the relation, plus
+a <literal>_fsm</literal> suffix. For example, if the filenode of a relation
+is 12345, the FSM is stored in a file called <filename>12345_fsm</filename>,
+in the same directory as the main relation file.
 </para>
 
 <para>
diff --git a/src/backend/access/brin/brin.c b/src/backend/access/brin/brin.c
index 5214427..4cad53e 100644
--- a/src/backend/access/brin/brin.c
+++ b/src/backend/access/brin/brin.c
@@ -1149,7 +1149,7 @@ terminate_brin_buildstate(BrinBuildState *state)
 		freespace = PageGetFreeSpace(page);
 		blk = BufferGetBlockNumber(state->bs_currentInsertBuf);
 		ReleaseBuffer(state->bs_currentInsertBuf);
-		RecordPageWithFreeSpace(state->bs_irel, blk, freespace);
+		RecordPageWithFreeSpace(state->bs_irel, blk, freespace, InvalidBlockNumber);
 		FreeSpaceMapVacuumRange(state->bs_irel, blk, blk + 1);
 	}
 
diff --git a/src/backend/access/brin/brin_pageops.c b/src/backend/access/brin/brin_pageops.c
index 164a468..2eb354f 100644
--- a/src/backend/access/brin/brin_pageops.c
+++ b/src/backend/access/brin/brin_pageops.c
@@ -310,7 +310,7 @@ brin_doupdate(Relation idxrel, BlockNumber pagesPerRange,
 
 		if (extended)
 		{
-			RecordPageWithFreeSpace(idxrel, newblk, freespace);
+			RecordPageWithFreeSpace(idxrel, newblk, freespace, InvalidBlockNumber);
 			FreeSpaceMapVacuumRange(idxrel, newblk, newblk + 1);
 		}
 
@@ -461,7 +461,7 @@ brin_doinsert(Relation idxrel, BlockNumber pagesPerRange,
 
 	if (extended)
 	{
-		RecordPageWithFreeSpace(idxrel, blk, freespace);
+		RecordPageWithFreeSpace(idxrel, blk, freespace, InvalidBlockNumber);
 		FreeSpaceMapVacuumRange(idxrel, blk, blk + 1);
 	}
 
@@ -654,7 +654,7 @@ brin_page_cleanup(Relation idxrel, Buffer buf)
 
 	/* Measure free space and record it */
 	RecordPageWithFreeSpace(idxrel, BufferGetBlockNumber(buf),
-							br_page_get_freespace(page));
+							br_page_get_freespace(page), InvalidBlockNumber);
 }
 
 /*
@@ -703,7 +703,7 @@ brin_getinsertbuffer(Relation irel, Buffer oldbuf, Size itemsz,
 	/* Choose initial target page, re-using existing target if known */
 	newblk = RelationGetTargetBlock(irel);
 	if (newblk == InvalidBlockNumber)
-		newblk = GetPageWithFreeSpace(irel, itemsz);
+		newblk = GetPageWithFreeSpace(irel, itemsz, true);
 
 	/*
 	 * Loop until we find a page with sufficient free space.  By the time we
@@ -895,7 +895,7 @@ brin_initialize_empty_new_buffer(Relation idxrel, Buffer buffer)
 	 * pages whose FSM records were forgotten in a crash.
 	 */
 	RecordPageWithFreeSpace(idxrel, BufferGetBlockNumber(buffer),
-							br_page_get_freespace(page));
+							br_page_get_freespace(page), InvalidBlockNumber);
 }
 
 
diff --git a/src/backend/access/heap/hio.c b/src/backend/access/heap/hio.c
index 3da0b49..f370352 100644
--- a/src/backend/access/heap/hio.c
+++ b/src/backend/access/heap/hio.c
@@ -239,8 +239,14 @@ RelationAddExtraBlocks(Relation relation, BulkInsertState bistate)
 		 * Immediately update the bottom level of the FSM.  This has a good
 		 * chance of making this page visible to other concurrently inserting
 		 * backends, and we want that to happen without delay.
+		 *
+		 * Since we know the table will end up with extraBlocks additional
+		 * pages, we pass the final number to avoid possible unnecessary
+		 * system calls and to make sure the FSM is created when we add
+		 * the first new page.
 		 */
-		RecordPageWithFreeSpace(relation, blockNum, freespace);
+		RecordPageWithFreeSpace(relation, blockNum, freespace,
+								firstBlock + extraBlocks);
 	}
 	while (--extraBlocks > 0);
 
@@ -377,20 +383,9 @@ RelationGetBufferForTuple(Relation relation, Size len,
 		 * We have no cached target page, so ask the FSM for an initial
 		 * target.
 		 */
-		targetBlock = GetPageWithFreeSpace(relation, len + saveFreeSpace);
-
-		/*
-		 * If the FSM knows nothing of the rel, try the last page before we
-		 * give up and extend.  This avoids one-tuple-per-page syndrome during
-		 * bootstrapping or in a recently-started system.
-		 */
-		if (targetBlock == InvalidBlockNumber)
-		{
-			BlockNumber nblocks = RelationGetNumberOfBlocks(relation);
-
-			if (nblocks > 0)
-				targetBlock = nblocks - 1;
-		}
+		targetBlock = GetPageWithFreeSpace(relation,
+										   len + saveFreeSpace,
+										   false);
 	}
 
 loop:
@@ -484,6 +479,14 @@ loop:
 		{
 			/* use this page as future insert target, too */
 			RelationSetTargetBlock(relation, targetBlock);
+
+			/*
+			 * In case we used an in-memory map of available blocks, reset
+			 * it for next use.
+			 */
+			if (targetBlock < HEAP_FSM_CREATION_THRESHOLD)
+				FSMClearLocalMap();
+
 			return buffer;
 		}
 
@@ -543,9 +546,12 @@ loop:
 
 			/*
 			 * Check if some other backend has extended a block for us while
-			 * we were waiting on the lock.
+			 * we were waiting on the lock.  We only check the FSM -- if there
+			 * isn't one we don't recheck the number of blocks.
 			 */
-			targetBlock = GetPageWithFreeSpace(relation, len + saveFreeSpace);
+			targetBlock = GetPageWithFreeSpace(relation,
+											   len + saveFreeSpace,
+											   true);
 
 			/*
 			 * If some other waiter has already extended the relation, we
@@ -625,5 +631,12 @@ loop:
 	 */
 	RelationSetTargetBlock(relation, BufferGetBlockNumber(buffer));
 
+	/*
+	 * In case we used an in-memory map of available blocks, reset
+	 * it for next use.  We do this unconditionally since after relation
+	 * extension we can't skip this based on the targetBlock.
+	 */
+	FSMClearLocalMap();
+
 	return buffer;
 }
diff --git a/src/backend/access/heap/vacuumlazy.c b/src/backend/access/heap/vacuumlazy.c
index c09eb6e..b761003 100644
--- a/src/backend/access/heap/vacuumlazy.c
+++ b/src/backend/access/heap/vacuumlazy.c
@@ -154,7 +154,7 @@ static BufferAccessStrategy vac_strategy;
 static void lazy_scan_heap(Relation onerel, int options,
 			   LVRelStats *vacrelstats, Relation *Irel, int nindexes,
 			   bool aggressive);
-static void lazy_vacuum_heap(Relation onerel, LVRelStats *vacrelstats);
+static void lazy_vacuum_heap(Relation onerel, LVRelStats *vacrelstats, BlockNumber nblocks);
 static bool lazy_check_needs_freeze(Buffer buf, bool *hastup);
 static void lazy_vacuum_index(Relation indrel,
 				  IndexBulkDeleteResult **stats,
@@ -759,7 +759,7 @@ lazy_scan_heap(Relation onerel, int options, LVRelStats *vacrelstats,
 			pgstat_progress_update_multi_param(2, hvp_index, hvp_val);
 
 			/* Remove tuples from heap */
-			lazy_vacuum_heap(onerel, vacrelstats);
+			lazy_vacuum_heap(onerel, vacrelstats, nblocks);
 
 			/*
 			 * Forget the now-vacuumed tuples, and press on, but be careful
@@ -897,7 +897,7 @@ lazy_scan_heap(Relation onerel, int options, LVRelStats *vacrelstats,
 			MarkBufferDirty(buf);
 			UnlockReleaseBuffer(buf);
 
-			RecordPageWithFreeSpace(onerel, blkno, freespace);
+			RecordPageWithFreeSpace(onerel, blkno, freespace, nblocks);
 			continue;
 		}
 
@@ -936,7 +936,7 @@ lazy_scan_heap(Relation onerel, int options, LVRelStats *vacrelstats,
 			}
 
 			UnlockReleaseBuffer(buf);
-			RecordPageWithFreeSpace(onerel, blkno, freespace);
+			RecordPageWithFreeSpace(onerel, blkno, freespace, nblocks);
 			continue;
 		}
 
@@ -1333,7 +1333,7 @@ lazy_scan_heap(Relation onerel, int options, LVRelStats *vacrelstats,
 		 * taken if there are no indexes.)
 		 */
 		if (vacrelstats->num_dead_tuples == prev_dead_count)
-			RecordPageWithFreeSpace(onerel, blkno, freespace);
+			RecordPageWithFreeSpace(onerel, blkno, freespace, nblocks);
 	}
 
 	/* report that everything is scanned and vacuumed */
@@ -1395,7 +1395,7 @@ lazy_scan_heap(Relation onerel, int options, LVRelStats *vacrelstats,
 		/* Remove tuples from heap */
 		pgstat_progress_update_param(PROGRESS_VACUUM_PHASE,
 									 PROGRESS_VACUUM_PHASE_VACUUM_HEAP);
-		lazy_vacuum_heap(onerel, vacrelstats);
+		lazy_vacuum_heap(onerel, vacrelstats, nblocks);
 		vacrelstats->num_index_scans++;
 	}
 
@@ -1466,9 +1466,10 @@ lazy_scan_heap(Relation onerel, int options, LVRelStats *vacrelstats,
  * Note: the reason for doing this as a second pass is we cannot remove
  * the tuples until we've removed their index entries, and we want to
  * process index entry removal in batches as large as possible.
+ * Note: nblocks is passed as an optimization for RecordPageWithFreeSpace().
  */
 static void
-lazy_vacuum_heap(Relation onerel, LVRelStats *vacrelstats)
+lazy_vacuum_heap(Relation onerel, LVRelStats *vacrelstats, BlockNumber nblocks)
 {
 	int			tupindex;
 	int			npages;
@@ -1505,7 +1506,7 @@ lazy_vacuum_heap(Relation onerel, LVRelStats *vacrelstats)
 		freespace = PageGetHeapFreeSpace(page);
 
 		UnlockReleaseBuffer(buf);
-		RecordPageWithFreeSpace(onerel, tblk, freespace);
+		RecordPageWithFreeSpace(onerel, tblk, freespace, nblocks);
 		npages++;
 	}
 
diff --git a/src/backend/access/transam/xact.c b/src/backend/access/transam/xact.c
index 18467d9..91f7077 100644
--- a/src/backend/access/transam/xact.c
+++ b/src/backend/access/transam/xact.c
@@ -48,6 +48,7 @@
 #include "replication/walsender.h"
 #include "storage/condition_variable.h"
 #include "storage/fd.h"
+#include "storage/freespace.h"
 #include "storage/lmgr.h"
 #include "storage/predicate.h"
 #include "storage/proc.h"
@@ -2500,6 +2501,12 @@ AbortTransaction(void)
 	pgstat_report_wait_end();
 	pgstat_progress_end_command();
 
+	/*
+	 * In case we aborted during RelationGetBufferForTuple(),
+	 * clear the local map of heap pages.
+	 */
+	FSMClearLocalMap();
+
 	/* Clean up buffer I/O and buffer context locks, too */
 	AbortBufferIO();
 	UnlockBuffers();
@@ -4721,6 +4728,13 @@ AbortSubTransaction(void)
 
 	pgstat_report_wait_end();
 	pgstat_progress_end_command();
+
+	/*
+	 * In case we aborted during RelationGetBufferForTuple(),
+	 * clear the local map of heap pages.
+	 */
+	FSMClearLocalMap();
+
 	AbortBufferIO();
 	UnlockBuffers();
 
diff --git a/src/backend/storage/freespace/README b/src/backend/storage/freespace/README
index e7ff23b..c6809e7 100644
--- a/src/backend/storage/freespace/README
+++ b/src/backend/storage/freespace/README
@@ -8,7 +8,36 @@ free space to hold a tuple to be stored; or to determine that no such page
 exists and the relation must be extended by one page.  As of PostgreSQL 8.4
 each relation has its own, extensible free space map stored in a separate
 "fork" of its relation.  This eliminates the disadvantages of the former
-fixed-size FSM.
+fixed-size FSM.  There are two exceptions:
+
+1. Hash indexes never have a FSM.
+2. For very small tables, a 3-page relation fork would be relatively large
+and wasteful, so to save space we refrain from creating the FSM if the
+heap has HEAP_FSM_CREATION_THRESHOLD pages or fewer.
+
+To locate free space in the latter case, we simply try pages directly without
+knowing ahead of time how much free space they have.  To maintain good
+performance, we create a local in-memory map of pages to try, and only mark
+every other page as available.  For example, in a 3-page heap, the local map
+would look like:
+
+ANAN
+0123
+
+Pages 0 and 2 are marked "available", and page 1 as "not available".
+Page 3 is beyond the end of the relation, so is likewise marked "not
+available".  First we try page 2, and if that doesn't have sufficient free
+space we try page 0 before giving up and extending the relation.  There may
+be some wasted free space on block 1, but if the relation extends to 4 pages:
+
+NANA
+0123
+
+We not only have the new page 3 at our disposal, we can now check page 1
+for free space as well.
+
+FSM data structure
+------------------
 
 It is important to keep the map small so that it can be searched rapidly.
 Therefore, we don't attempt to record the exact free space on a page.
@@ -192,5 +221,3 @@ TODO
 ----
 
 - fastroot to avoid traversing upper nodes with just 1 child
-- use a different system for tables that fit into one FSM page, with a
-  mechanism to switch to the real thing as it grows.
diff --git a/src/backend/storage/freespace/freespace.c b/src/backend/storage/freespace/freespace.c
index eee8286..5f46391 100644
--- a/src/backend/storage/freespace/freespace.c
+++ b/src/backend/storage/freespace/freespace.c
@@ -76,6 +76,14 @@
 #define FSM_ROOT_LEVEL	(FSM_TREE_DEPTH - 1)
 #define FSM_BOTTOM_LEVEL 0
 
+/* Status codes for the local map. */
+
+/* Either already tried, or beyond the end of the relation */
+#define FSM_LOCAL_NOT_AVAIL 0x00
+
+/* Available to try */
+#define FSM_LOCAL_AVAIL		0x01
+
 /*
  * The internal FSM routines work on a logical addressing scheme. Each
  * level of the tree can be thought of as a separately addressable file.
@@ -89,6 +97,17 @@ typedef struct
 /* Address of the root page. */
 static const FSMAddress FSM_ROOT_ADDRESS = {FSM_ROOT_LEVEL, 0};
 
+/* Local map of block numbers for small heaps with no FSM. */
+typedef struct
+{
+	BlockNumber nblocks;
+	uint8		map[HEAP_FSM_CREATION_THRESHOLD];
+} FSMLocalMap;
+
+static FSMLocalMap fsm_local_map = {0, {FSM_LOCAL_NOT_AVAIL}};
+
+#define FSM_LOCAL_MAP_EXISTS (fsm_local_map.nblocks > 0)
+
 /* functions to navigate the tree */
 static FSMAddress fsm_get_child(FSMAddress parent, uint16 slot);
 static FSMAddress fsm_get_parent(FSMAddress child, uint16 *slot);
@@ -107,10 +126,14 @@ static Size fsm_space_cat_to_avail(uint8 cat);
 /* workhorse functions for various operations */
 static int fsm_set_and_search(Relation rel, FSMAddress addr, uint16 slot,
 				   uint8 newValue, uint8 minValue);
+static void fsm_local_set(Relation rel, BlockNumber cur_nblocks);
 static BlockNumber fsm_search(Relation rel, uint8 min_cat);
+static BlockNumber fsm_local_search(void);
 static uint8 fsm_vacuum_page(Relation rel, FSMAddress addr,
 				BlockNumber start, BlockNumber end,
 				bool *eof);
+static bool fsm_allow_writes(Relation rel, BlockNumber heapblk,
+				BlockNumber nblocks, BlockNumber *get_nblocks);
 
 
 /******** Public API ********/
@@ -127,13 +150,46 @@ static uint8 fsm_vacuum_page(Relation rel, FSMAddress addr,
  * amount of free space available on that page and then try again (see
  * RecordAndGetPageWithFreeSpace).  If InvalidBlockNumber is returned,
  * extend the relation.
+ *
+ * For very small heap relations that don't have a FSM, we try every other
+ * page before extending the relation.  To keep track of which pages have
+ * been tried, initialize a local in-memory map of pages.
  */
 BlockNumber
-GetPageWithFreeSpace(Relation rel, Size spaceNeeded)
+GetPageWithFreeSpace(Relation rel, Size spaceNeeded, bool check_fsm_only)
 {
 	uint8		min_cat = fsm_space_needed_to_cat(spaceNeeded);
+	BlockNumber target_block,
+				nblocks;
+
+	/* First try the FSM, if it exists. */
+	target_block = fsm_search(rel, min_cat);
+
+	if (target_block == InvalidBlockNumber &&
+		(rel->rd_rel->relkind == RELKIND_RELATION ||
+		 rel->rd_rel->relkind == RELKIND_TOASTVALUE) &&
+		!check_fsm_only)
+	{
+		nblocks = RelationGetNumberOfBlocks(rel);
+
+		if (nblocks > HEAP_FSM_CREATION_THRESHOLD)
+		{
+			/*
+			 * If the FSM knows nothing of the rel, try the last page before
+			 * we give up and extend.  This avoids one-tuple-per-page syndrome
+			 * during bootstrapping or in a recently-started system.
+			 */
+			target_block = nblocks - 1;
+		}
+		else if (nblocks > 0)
+		{
+			/* Create or update local map and get first candidate block. */
+			fsm_local_set(rel, nblocks);
+			target_block = fsm_local_search();
+		}
+	}
 
-	return fsm_search(rel, min_cat);
+	return target_block;
 }
 
 /*
@@ -144,16 +200,47 @@ GetPageWithFreeSpace(Relation rel, Size spaceNeeded)
  * also some effort to return a page close to the old page; if there's a
  * page with enough free space on the same FSM page where the old one page
  * is located, it is preferred.
+ *
+ * For very small heap relations that don't have a FSM, we update the local
+ * map to indicate we have tried a page, and return the next page to try.
  */
 BlockNumber
 RecordAndGetPageWithFreeSpace(Relation rel, BlockNumber oldPage,
 							  Size oldSpaceAvail, Size spaceNeeded)
 {
-	int			old_cat = fsm_space_avail_to_cat(oldSpaceAvail);
-	int			search_cat = fsm_space_needed_to_cat(spaceNeeded);
+	int			old_cat;
+	int			search_cat;
 	FSMAddress	addr;
 	uint16		slot;
 	int			search_slot;
+	BlockNumber nblocks = InvalidBlockNumber;
+
+	/* First try the local map, if it exists. */
+	if (FSM_LOCAL_MAP_EXISTS)
+	{
+		Assert((rel->rd_rel->relkind == RELKIND_RELATION ||
+				rel->rd_rel->relkind == RELKIND_TOASTVALUE) &&
+			   fsm_local_map.map[oldPage] == FSM_LOCAL_AVAIL);
+
+		fsm_local_map.map[oldPage] = FSM_LOCAL_NOT_AVAIL;
+		return fsm_local_search();
+	}
+
+	if (!fsm_allow_writes(rel, oldPage, InvalidBlockNumber, &nblocks))
+	{
+		/*
+		 * If we have neither a local map nor a FSM, we probably just
+		 * tried the target block in the smgr relation entry and failed,
+		 * so we'll need to create the local map.
+		 */
+		fsm_local_set(rel, nblocks);
+		return fsm_local_search();
+	}
+
+	/* Normal FSM logic follows */
+
+	old_cat = fsm_space_avail_to_cat(oldSpaceAvail);
+	search_cat = fsm_space_needed_to_cat(spaceNeeded);
 
 	/* Get the location of the FSM byte representing the heap block */
 	addr = fsm_get_location(oldPage, &slot);
@@ -176,21 +263,42 @@ RecordAndGetPageWithFreeSpace(Relation rel, BlockNumber oldPage,
  * Note that if the new spaceAvail value is higher than the old value stored
  * in the FSM, the space might not become visible to searchers until the next
  * FreeSpaceMapVacuum call, which updates the upper level pages.
+ *
+ * Callers have no need for a local map.
  */
 void
-RecordPageWithFreeSpace(Relation rel, BlockNumber heapBlk, Size spaceAvail)
+RecordPageWithFreeSpace(Relation rel, BlockNumber heapBlk,
+						Size spaceAvail, BlockNumber nblocks)
 {
-	int			new_cat = fsm_space_avail_to_cat(spaceAvail);
+	int			new_cat;
 	FSMAddress	addr;
 	uint16		slot;
+	BlockNumber dummy;
+
+	if (!fsm_allow_writes(rel, heapBlk, nblocks, &dummy))
+		/* No FSM to update and no local map either */
+		return;
 
 	/* Get the location of the FSM byte representing the heap block */
 	addr = fsm_get_location(heapBlk, &slot);
 
+	new_cat = fsm_space_avail_to_cat(spaceAvail);
 	fsm_set_and_search(rel, addr, slot, new_cat, 0);
 }
 
 /*
+ * Clear the local map.  We must call this when we have found a block with
+ * enough free space, when we extend the relation, or on transaction abort.
+ */
+void
+FSMClearLocalMap(void)
+{
+	fsm_local_map.nblocks = 0;
+	memset(&fsm_local_map.map, FSM_LOCAL_NOT_AVAIL,
+		   sizeof(fsm_local_map.map));
+}
+
+/*
  * XLogRecordPageWithFreeSpace - like RecordPageWithFreeSpace, for use in
  *		WAL replay
  */
@@ -204,6 +312,30 @@ XLogRecordPageWithFreeSpace(RelFileNode rnode, BlockNumber heapBlk,
 	BlockNumber blkno;
 	Buffer		buf;
 	Page		page;
+	bool		write_to_fsm;
+
+	/* This is meant to mirror the logic in fsm_allow_writes() */
+	if (heapBlk >= HEAP_FSM_CREATION_THRESHOLD)
+		write_to_fsm = true;
+	else
+	{
+		/* Open the relation at smgr level */
+		SMgrRelation smgr = smgropen(rnode, InvalidBackendId);
+
+		if (smgrexists(smgr, FSM_FORKNUM))
+			write_to_fsm = true;
+		else
+		{
+			BlockNumber heap_nblocks = smgrnblocks(smgr, MAIN_FORKNUM);
+			if (heap_nblocks > HEAP_FSM_CREATION_THRESHOLD)
+				write_to_fsm = true;
+			else
+				write_to_fsm = false;
+		}
+	}
+
+	if (!write_to_fsm)
+		return;
 
 	/* Get the location of the FSM byte representing the heap block */
 	addr = fsm_get_location(heapBlk, &slot);
@@ -904,3 +1036,134 @@ fsm_vacuum_page(Relation rel, FSMAddress addr,
 
 	return max_avail;
 }
+
+/*
+ * For heaps, we prevent creation of the FSM unless the number of pages
+ * exceeds HEAP_FSM_CREATION_THRESHOLD.  For tables that don't already have
+ * a FSM, this will save an inode and a few kB of space.
+ *
+ * XXX The API is a little awkward -- if the caller passes a valid nblocks
+ * value, it can avoid invoking a system call.  If the caller passes
+ * InvalidBlockNumber and receives a false return value, it can get an
+ * up-to-date relation size from get_nblocks.  This saves a few cycles in
+ * the caller, which would otherwise need to get the relation size by itself.
+ */
+static bool
+fsm_allow_writes(Relation rel, BlockNumber heapblk,
+				 BlockNumber nblocks, BlockNumber *get_nblocks)
+{
+	bool		skip_get_nblocks;
+
+	if (heapblk >= HEAP_FSM_CREATION_THRESHOLD)
+		return true;
+
+	/* Non-heap rels can always create a FSM. */
+	if (rel->rd_rel->relkind != RELKIND_RELATION &&
+		rel->rd_rel->relkind != RELKIND_TOASTVALUE)
+		return true;
+
+	/*
+	 * If the caller knows nblocks, we can avoid a system call later.
+	 * If it doesn't, maybe we have relpages from a previous VACUUM.
+	 * Since the table may have extended since then, we still have to
+	 * count the pages later if we can't return now.
+	 */
+	if (nblocks != InvalidBlockNumber)
+	{
+		if (nblocks > HEAP_FSM_CREATION_THRESHOLD)
+			return true;
+		else
+			skip_get_nblocks = true;
+	}
+	else
+	{
+		if (rel->rd_rel->relpages != InvalidBlockNumber &&
+			rel->rd_rel->relpages > HEAP_FSM_CREATION_THRESHOLD)
+			return true;
+		else
+			skip_get_nblocks = false;
+	}
+
+	RelationOpenSmgr(rel);
+	if (smgrexists(rel->rd_smgr, FSM_FORKNUM))
+		return true;
+
+	if (skip_get_nblocks)
+		return false;
+
+	/* last resort */
+	*get_nblocks = RelationGetNumberOfBlocks(rel);
+	if (*get_nblocks > HEAP_FSM_CREATION_THRESHOLD)
+		return true;
+	else
+		return false;
+}
+
+/*
+ * Initialize or update the local map of blocks to try, for when there is
+ * no FSM.
+ *
+ * When we initialize the map, the whole heap is potentially available to
+ * try.  Testing revealed that trying every block can cause a small
+ * performance dip compared to when we use a FSM, so we try every other
+ * block instead.
+ */
+static void
+fsm_local_set(Relation rel, BlockNumber cur_nblocks)
+{
+	BlockNumber blkno,
+				cached_target_block;
+
+	/* The local map must not be set already. */
+	Assert(!FSM_LOCAL_MAP_EXISTS);
+
+	/*
+	 * Starting at the current last block in the relation and working
+	 * backwards, mark alternating blocks as available.
+	 */
+	blkno = cur_nblocks - 1;
+	while (true)
+	{
+		fsm_local_map.map[blkno] = FSM_LOCAL_AVAIL;
+		if (blkno >= 2)
+			blkno -= 2;
+		else
+			break;
+	}
+
+	/* Cache the number of blocks. */
+	fsm_local_map.nblocks = cur_nblocks;
+
+	/* Set the status of the cached target block to 'unavailable'. */
+	cached_target_block = RelationGetTargetBlock(rel);
+	if (cached_target_block != InvalidBlockNumber &&
+		cached_target_block < cur_nblocks)
+		fsm_local_map.map[cached_target_block] = FSM_LOCAL_NOT_AVAIL;
+}
+
+/*
+ * Search the local map for an available block to try, in descending order.
+ * As such, there is no heuristic available to decide which order will be
+ * better to try, but the probability of having space in the last block in the
+ * map is higher because that is the most recent block added to the heap.
+ *
+ * This function is used when there is no FSM.
+ */
+static BlockNumber
+fsm_local_search(void)
+{
+	BlockNumber		target_block;
+
+	/* Local map must be set by now. */
+	Assert(FSM_LOCAL_MAP_EXISTS);
+
+	target_block = fsm_local_map.nblocks;
+	do
+	{
+		target_block--;
+		if (fsm_local_map.map[target_block] == FSM_LOCAL_AVAIL)
+			return target_block;
+	} while (target_block > 0);
+
+	return InvalidBlockNumber;
+}
diff --git a/src/backend/storage/freespace/indexfsm.c b/src/backend/storage/freespace/indexfsm.c
index 58cedea..9d8f43d 100644
--- a/src/backend/storage/freespace/indexfsm.c
+++ b/src/backend/storage/freespace/indexfsm.c
@@ -37,7 +37,7 @@
 BlockNumber
 GetFreeIndexPage(Relation rel)
 {
-	BlockNumber blkno = GetPageWithFreeSpace(rel, BLCKSZ / 2);
+	BlockNumber blkno = GetPageWithFreeSpace(rel, BLCKSZ / 2, true);
 
 	if (blkno != InvalidBlockNumber)
 		RecordUsedIndexPage(rel, blkno);
@@ -51,7 +51,7 @@ GetFreeIndexPage(Relation rel)
 void
 RecordFreeIndexPage(Relation rel, BlockNumber freeBlock)
 {
-	RecordPageWithFreeSpace(rel, freeBlock, BLCKSZ - 1);
+	RecordPageWithFreeSpace(rel, freeBlock, BLCKSZ - 1, InvalidBlockNumber);
 }
 
 
@@ -61,7 +61,7 @@ RecordFreeIndexPage(Relation rel, BlockNumber freeBlock)
 void
 RecordUsedIndexPage(Relation rel, BlockNumber usedBlock)
 {
-	RecordPageWithFreeSpace(rel, usedBlock, 0);
+	RecordPageWithFreeSpace(rel, usedBlock, 0, InvalidBlockNumber);
 }
 
 /*
diff --git a/src/include/storage/freespace.h b/src/include/storage/freespace.h
index 8b00033..b077c2c 100644
--- a/src/include/storage/freespace.h
+++ b/src/include/storage/freespace.h
@@ -18,15 +18,20 @@
 #include "storage/relfilenode.h"
 #include "utils/relcache.h"
 
+/* Only create the FSM if the heap has greater than this many blocks */
+#define HEAP_FSM_CREATION_THRESHOLD 4
+
 /* prototypes for public functions in freespace.c */
 extern Size GetRecordedFreeSpace(Relation rel, BlockNumber heapBlk);
-extern BlockNumber GetPageWithFreeSpace(Relation rel, Size spaceNeeded);
+extern BlockNumber GetPageWithFreeSpace(Relation rel, Size spaceNeeded,
+							bool check_fsm_only);
 extern BlockNumber RecordAndGetPageWithFreeSpace(Relation rel,
 							  BlockNumber oldPage,
 							  Size oldSpaceAvail,
 							  Size spaceNeeded);
 extern void RecordPageWithFreeSpace(Relation rel, BlockNumber heapBlk,
-						Size spaceAvail);
+						Size spaceAvail, BlockNumber nblocks);
+extern void FSMClearLocalMap(void);
 extern void XLogRecordPageWithFreeSpace(RelFileNode rnode, BlockNumber heapBlk,
 							Size spaceAvail);
 
diff --git a/src/test/regress/expected/fsm.out b/src/test/regress/expected/fsm.out
new file mode 100644
index 0000000..bf590bf
--- /dev/null
+++ b/src/test/regress/expected/fsm.out
@@ -0,0 +1,62 @@
+--
+-- Free Space Map test
+--
+CREATE TABLE fsm_check_size (num int, str text);
+-- Fill 3 blocks with as many large records as will fit
+-- No FSM
+INSERT INTO fsm_check_size SELECT g, rpad('', 1024, 'a')
+FROM generate_series(1,7*3) g;
+VACUUM fsm_check_size;
+SELECT pg_relation_size('fsm_check_size', 'main') AS heap_size,
+pg_relation_size('fsm_check_size', 'fsm') AS fsm_size;
+ heap_size | fsm_size 
+-----------+----------
+     24576 |        0
+(1 row)
+
+-- Clear some space on block 0
+DELETE FROM fsm_check_size where num <= 5;
+VACUUM fsm_check_size;
+-- Insert small record in block 2 to set the cached smgr targetBlock
+INSERT INTO fsm_check_size values(99, 'b');
+-- Insert large record and make sure it goes in block 0 rather than
+-- causing the relation to extend
+INSERT INTO fsm_check_size values (101, rpad('', 1024, 'a'));
+SELECT pg_relation_size('fsm_check_size', 'main') AS heap_size,
+pg_relation_size('fsm_check_size', 'fsm') AS fsm_size;
+ heap_size | fsm_size 
+-----------+----------
+     24576 |        0
+(1 row)
+
+-- Extend table with enough blocks to exceed the FSM threshold
+-- FSM is created and extended to 3 blocks
+INSERT INTO fsm_check_size SELECT g, 'c' FROM generate_series(200,3000) g;
+VACUUM fsm_check_size;
+SELECT pg_relation_size('fsm_check_size', 'fsm') AS fsm_size;
+ fsm_size 
+----------
+    24576
+(1 row)
+
+-- Truncate heap to 1 block
+-- No change in FSM
+DELETE FROM fsm_check_size WHERE num > 7;
+VACUUM fsm_check_size;
+SELECT pg_relation_size('fsm_check_size', 'fsm') AS fsm_size;
+ fsm_size 
+----------
+    24576
+(1 row)
+
+-- Truncate heap to 0 blocks
+-- FSM now truncated to 2 blocks
+DELETE FROM fsm_check_size;
+VACUUM fsm_check_size;
+SELECT pg_relation_size('fsm_check_size', 'fsm') AS fsm_size;
+ fsm_size 
+----------
+    16384
+(1 row)
+
+DROP TABLE fsm_check_size;
diff --git a/src/test/regress/parallel_schedule b/src/test/regress/parallel_schedule
index cc0bbf5..4051a4a 100644
--- a/src/test/regress/parallel_schedule
+++ b/src/test/regress/parallel_schedule
@@ -69,6 +69,12 @@ test: create_aggregate create_function_3 create_cast constraints triggers inheri
 test: sanity_check
 
 # ----------
+# fsm does a delete followed by vacuum, and running it in parallel can prevent
+# removal of rows.
+# ----------
+test: fsm
+
+# ----------
 # Believe it or not, select creates a table, subsequent
 # tests need.
 # ----------
diff --git a/src/test/regress/serial_schedule b/src/test/regress/serial_schedule
index 0c10c71..ac1ea62 100644
--- a/src/test/regress/serial_schedule
+++ b/src/test/regress/serial_schedule
@@ -80,6 +80,7 @@ test: roleattributes
 test: create_am
 test: hash_func
 test: sanity_check
+test: fsm
 test: errors
 test: select
 test: select_into
diff --git a/src/test/regress/sql/fsm.sql b/src/test/regress/sql/fsm.sql
new file mode 100644
index 0000000..a864c7f
--- /dev/null
+++ b/src/test/regress/sql/fsm.sql
@@ -0,0 +1,46 @@
+--
+-- Free Space Map test
+--
+
+CREATE TABLE fsm_check_size (num int, str text);
+
+-- Fill 3 blocks with as many large records as will fit
+-- No FSM
+INSERT INTO fsm_check_size SELECT g, rpad('', 1024, 'a')
+FROM generate_series(1,7*3) g;
+VACUUM fsm_check_size;
+SELECT pg_relation_size('fsm_check_size', 'main') AS heap_size,
+pg_relation_size('fsm_check_size', 'fsm') AS fsm_size;
+
+-- Clear some space on block 0
+DELETE FROM fsm_check_size where num <= 5;
+VACUUM fsm_check_size;
+
+-- Insert small record in block 2 to set the cached smgr targetBlock
+INSERT INTO fsm_check_size values(99, 'b');
+
+-- Insert large record and make sure it goes in block 0 rather than
+-- causing the relation to extend
+INSERT INTO fsm_check_size values (101, rpad('', 1024, 'a'));
+SELECT pg_relation_size('fsm_check_size', 'main') AS heap_size,
+pg_relation_size('fsm_check_size', 'fsm') AS fsm_size;
+
+-- Extend table with enough blocks to exceed the FSM threshold
+-- FSM is created and extended to 3 blocks
+INSERT INTO fsm_check_size SELECT g, 'c' FROM generate_series(200,3000) g;
+VACUUM fsm_check_size;
+SELECT pg_relation_size('fsm_check_size', 'fsm') AS fsm_size;
+
+-- Truncate heap to 1 block
+-- No change in FSM
+DELETE FROM fsm_check_size WHERE num > 7;
+VACUUM fsm_check_size;
+SELECT pg_relation_size('fsm_check_size', 'fsm') AS fsm_size;
+
+-- Truncate heap to 0 blocks
+-- FSM now truncated to 2 blocks
+DELETE FROM fsm_check_size;
+VACUUM fsm_check_size;
+SELECT pg_relation_size('fsm_check_size', 'fsm') AS fsm_size;
+
+DROP TABLE fsm_check_size;
-- 
1.8.3.1

#82John Naylor
john.naylor@2ndquadrant.com
In reply to: Amit Kapila (#81)
2 attachment(s)
Re: WIP: Avoid creation of the free space map for small tables

On Sat, Jan 19, 2019 at 8:06 AM Amit Kapila <amit.kapila16@gmail.com> wrote:

On Thu, Jan 17, 2019 at 11:13 PM John Naylor
Few more comments:
1.
I think we should not allow to create FSM for toast tables as well
till there size reaches HEAP_FSM_CREATION_THRESHOLD. If you try below
test, you can see that FSM will be created for the toast table even if
the size of toast relation is 1 page.

...

I have fixed this in the attached patch, kindly verify it once and see
if you can add the test for same as well.

Works for me. For v16, I've added and tested similar logic to
pg_upgrade and verified that toast tables work the same as normal
tables in recovery. I used a slightly different method to generate the
long random string to avoid creating a function. Also, some cosmetic
adjustments -- I changed the regression test to use 'i' instead of 'g'
to match the use of generate_series in most other tests, and made
capitalization more consistent.

2.
-CREATE TABLE test1 (a int, b int);
-INSERT INTO test1 VALUES (16777217, 131584);
+CREATE TABLE test_rel_forks (a
int);
+-- Make sure there are enough blocks in the heap for the FSM to be created.
+INSERT INTO test_rel_forks SELECT g
from generate_series(1,10000) g;
-VACUUM test1;  -- set up FSM
+-- set up FSM and VM
+VACUUM test_rel_forks;

This test will create 45 pages instead of 1. I know that to create
FSM, we now need more than 4 pages, but 45 seems to be on the higher
side. I think we should not unnecessarily populate more data if there
is no particular need for it, let's restrict the number of pages to 5
if possible.

Good idea, done here and in the fsm regression test.

3.
-SELECT octet_length(get_raw_page('test1', 'fsm', 1)) AS fsm_1;
- fsm_1
--------
-  8192
-(1 row)
-
-SELECT octet_length
(get_raw_page('test1', 'vm', 0)) AS vm_0;
+SELECT octet_length(get_raw_page('test_rel_forks', 'fsm', 10)) AS fsm_10;
+ERROR:  block number 10 is out of range for relation "test_rel_forks"

Why have you changed the test definition here? Previously test checks
the existing FSM page, but now it tries to access out of range page.

The patch is hard to read here, but I still have a test for the
existing FSM page:

-SELECT octet_length(get_raw_page('test1', 'fsm', 0)) AS fsm_0;
+SELECT octet_length(get_raw_page('test_rel_forks', 'main', 100)) AS main_100;
+ERROR:  block number 100 is out of range for relation "test_rel_forks"
+SELECT octet_length(get_raw_page('test_rel_forks', 'fsm', 0)) AS fsm_0;
  fsm_0
 -------
   8192
 (1 row)

I have a test for in-range and out-of-range for each relation fork.

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

Attachments:

v16-0001-Avoid-creation-of-the-free-space-map-for-small-h.patchtext/x-patch; charset=US-ASCII; name=v16-0001-Avoid-creation-of-the-free-space-map-for-small-h.patchDownload
From ecf0cecee8b0adf8529ddb1fbdabd041172de5e3 Mon Sep 17 00:00:00 2001
From: John Naylor <jcnaylor@gmail.com>
Date: Sat, 19 Jan 2019 18:39:39 -0500
Subject: [PATCH v16 1/2] Avoid creation of the free space map for small heap
 relations.

Previously, all heaps had FSMs. For very small tables, this means that
the FSM took up more space than the heap did. This is wasteful, so now
we refrain from creating the FSM for heaps with 4 pages or fewer. If the
last known target block has insufficient space, we still try to insert
into some other page before before giving up and extending the relation,
since doing otherwise leads to table bloat. Testing showed that trying
every page penalized performance slightly, so we compromise and try
every other page. This way, we visit at most two pages. Any pages with
wasted free space become visible at next relation extension, so we still
control table bloat. As a bonus, directly attempting one or two pages
can even be faster than consulting the FSM would have been.
---
 contrib/pageinspect/expected/page.out     |  77 +++---
 contrib/pageinspect/sql/page.sql          |  33 ++-
 doc/src/sgml/storage.sgml                 |  13 +-
 src/backend/access/brin/brin.c            |   2 +-
 src/backend/access/brin/brin_pageops.c    |  10 +-
 src/backend/access/heap/hio.c             |  47 ++--
 src/backend/access/heap/vacuumlazy.c      |  17 +-
 src/backend/access/transam/xact.c         |  14 ++
 src/backend/storage/freespace/README      |  33 ++-
 src/backend/storage/freespace/freespace.c | 275 +++++++++++++++++++++-
 src/backend/storage/freespace/indexfsm.c  |   6 +-
 src/include/storage/freespace.h           |   9 +-
 src/test/regress/expected/fsm.out         |  75 ++++++
 src/test/regress/parallel_schedule        |   6 +
 src/test/regress/serial_schedule          |   1 +
 src/test/regress/sql/fsm.sql              |  55 +++++
 16 files changed, 571 insertions(+), 102 deletions(-)
 create mode 100644 src/test/regress/expected/fsm.out
 create mode 100644 src/test/regress/sql/fsm.sql

diff --git a/contrib/pageinspect/expected/page.out b/contrib/pageinspect/expected/page.out
index 3fcd9fbe6d..11d56f49a4 100644
--- a/contrib/pageinspect/expected/page.out
+++ b/contrib/pageinspect/expected/page.out
@@ -1,48 +1,69 @@
 CREATE EXTENSION pageinspect;
-CREATE TABLE test1 (a int, b int);
-INSERT INTO test1 VALUES (16777217, 131584);
-VACUUM test1;  -- set up FSM
+CREATE TABLE test_rel_forks (a int);
+-- Make sure there are enough blocks in the heap for the FSM to be created.
+INSERT INTO test_rel_forks SELECT i from generate_series(1,1000) i;
+-- set up FSM and VM
+VACUUM test_rel_forks;
 -- The page contents can vary, so just test that it can be read
 -- successfully, but don't keep the output.
-SELECT octet_length(get_raw_page('test1', 'main', 0)) AS main_0;
+SELECT octet_length(get_raw_page('test_rel_forks', 'main', 0)) AS main_0;
  main_0 
 --------
    8192
 (1 row)
 
-SELECT octet_length(get_raw_page('test1', 'main', 1)) AS main_1;
-ERROR:  block number 1 is out of range for relation "test1"
-SELECT octet_length(get_raw_page('test1', 'fsm', 0)) AS fsm_0;
+SELECT octet_length(get_raw_page('test_rel_forks', 'main', 100)) AS main_100;
+ERROR:  block number 100 is out of range for relation "test_rel_forks"
+SELECT octet_length(get_raw_page('test_rel_forks', 'fsm', 0)) AS fsm_0;
  fsm_0 
 -------
   8192
 (1 row)
 
-SELECT octet_length(get_raw_page('test1', 'fsm', 1)) AS fsm_1;
- fsm_1 
--------
-  8192
-(1 row)
-
-SELECT octet_length(get_raw_page('test1', 'vm', 0)) AS vm_0;
+SELECT octet_length(get_raw_page('test_rel_forks', 'fsm', 10)) AS fsm_10;
+ERROR:  block number 10 is out of range for relation "test_rel_forks"
+SELECT octet_length(get_raw_page('test_rel_forks', 'vm', 0)) AS vm_0;
  vm_0 
 ------
  8192
 (1 row)
 
-SELECT octet_length(get_raw_page('test1', 'vm', 1)) AS vm_1;
-ERROR:  block number 1 is out of range for relation "test1"
+SELECT octet_length(get_raw_page('test_rel_forks', 'vm', 1)) AS vm_1;
+ERROR:  block number 1 is out of range for relation "test_rel_forks"
 SELECT octet_length(get_raw_page('xxx', 'main', 0));
 ERROR:  relation "xxx" does not exist
-SELECT octet_length(get_raw_page('test1', 'xxx', 0));
+SELECT octet_length(get_raw_page('test_rel_forks', 'xxx', 0));
 ERROR:  invalid fork name
 HINT:  Valid fork names are "main", "fsm", "vm", and "init".
-SELECT get_raw_page('test1', 0) = get_raw_page('test1', 'main', 0);
+SELECT * FROM fsm_page_contents(get_raw_page('test_rel_forks', 'fsm', 0));
+ fsm_page_contents 
+-------------------
+ 0: 147           +
+ 1: 147           +
+ 3: 147           +
+ 7: 147           +
+ 15: 147          +
+ 31: 147          +
+ 63: 147          +
+ 127: 147         +
+ 255: 147         +
+ 511: 147         +
+ 1023: 147        +
+ 2047: 147        +
+ 4095: 147        +
+ fp_next_slot: 0  +
+ 
+(1 row)
+
+SELECT get_raw_page('test_rel_forks', 0) = get_raw_page('test_rel_forks', 'main', 0);
  ?column? 
 ----------
  t
 (1 row)
 
+DROP TABLE test_rel_forks;
+CREATE TABLE test1 (a int, b int);
+INSERT INTO test1 VALUES (16777217, 131584);
 SELECT pagesize, version FROM page_header(get_raw_page('test1', 0));
  pagesize | version 
 ----------+---------
@@ -62,26 +83,6 @@ SELECT tuple_data_split('test1'::regclass, t_data, t_infomask, t_infomask2, t_bi
  {"\\x01000001","\\x00020200"}
 (1 row)
 
-SELECT * FROM fsm_page_contents(get_raw_page('test1', 'fsm', 0));
- fsm_page_contents 
--------------------
- 0: 254           +
- 1: 254           +
- 3: 254           +
- 7: 254           +
- 15: 254          +
- 31: 254          +
- 63: 254          +
- 127: 254         +
- 255: 254         +
- 511: 254         +
- 1023: 254        +
- 2047: 254        +
- 4095: 254        +
- fp_next_slot: 0  +
- 
-(1 row)
-
 DROP TABLE test1;
 -- check that using any of these functions with a partitioned table or index
 -- would fail
diff --git a/contrib/pageinspect/sql/page.sql b/contrib/pageinspect/sql/page.sql
index 8ac9991837..0ff1f1a389 100644
--- a/contrib/pageinspect/sql/page.sql
+++ b/contrib/pageinspect/sql/page.sql
@@ -1,26 +1,35 @@
 CREATE EXTENSION pageinspect;
 
-CREATE TABLE test1 (a int, b int);
-INSERT INTO test1 VALUES (16777217, 131584);
+CREATE TABLE test_rel_forks (a int);
+-- Make sure there are enough blocks in the heap for the FSM to be created.
+INSERT INTO test_rel_forks SELECT i from generate_series(1,1000) i;
 
-VACUUM test1;  -- set up FSM
+-- set up FSM and VM
+VACUUM test_rel_forks;
 
 -- The page contents can vary, so just test that it can be read
 -- successfully, but don't keep the output.
 
-SELECT octet_length(get_raw_page('test1', 'main', 0)) AS main_0;
-SELECT octet_length(get_raw_page('test1', 'main', 1)) AS main_1;
+SELECT octet_length(get_raw_page('test_rel_forks', 'main', 0)) AS main_0;
+SELECT octet_length(get_raw_page('test_rel_forks', 'main', 100)) AS main_100;
 
-SELECT octet_length(get_raw_page('test1', 'fsm', 0)) AS fsm_0;
-SELECT octet_length(get_raw_page('test1', 'fsm', 1)) AS fsm_1;
+SELECT octet_length(get_raw_page('test_rel_forks', 'fsm', 0)) AS fsm_0;
+SELECT octet_length(get_raw_page('test_rel_forks', 'fsm', 10)) AS fsm_10;
 
-SELECT octet_length(get_raw_page('test1', 'vm', 0)) AS vm_0;
-SELECT octet_length(get_raw_page('test1', 'vm', 1)) AS vm_1;
+SELECT octet_length(get_raw_page('test_rel_forks', 'vm', 0)) AS vm_0;
+SELECT octet_length(get_raw_page('test_rel_forks', 'vm', 1)) AS vm_1;
 
 SELECT octet_length(get_raw_page('xxx', 'main', 0));
-SELECT octet_length(get_raw_page('test1', 'xxx', 0));
+SELECT octet_length(get_raw_page('test_rel_forks', 'xxx', 0));
+
+SELECT * FROM fsm_page_contents(get_raw_page('test_rel_forks', 'fsm', 0));
+
+SELECT get_raw_page('test_rel_forks', 0) = get_raw_page('test_rel_forks', 'main', 0);
 
-SELECT get_raw_page('test1', 0) = get_raw_page('test1', 'main', 0);
+DROP TABLE test_rel_forks;
+
+CREATE TABLE test1 (a int, b int);
+INSERT INTO test1 VALUES (16777217, 131584);
 
 SELECT pagesize, version FROM page_header(get_raw_page('test1', 0));
 
@@ -29,8 +38,6 @@ SELECT page_checksum(get_raw_page('test1', 0), 0) IS NOT NULL AS silly_checksum_
 SELECT tuple_data_split('test1'::regclass, t_data, t_infomask, t_infomask2, t_bits)
     FROM heap_page_items(get_raw_page('test1', 0));
 
-SELECT * FROM fsm_page_contents(get_raw_page('test1', 'fsm', 0));
-
 DROP TABLE test1;
 
 -- check that using any of these functions with a partitioned table or index
diff --git a/doc/src/sgml/storage.sgml b/doc/src/sgml/storage.sgml
index 8ef2ac8010..cbdad0c3fb 100644
--- a/doc/src/sgml/storage.sgml
+++ b/doc/src/sgml/storage.sgml
@@ -590,12 +590,13 @@ tuple would otherwise be too big.
 <indexterm><primary>FSM</primary><see>Free Space Map</see></indexterm>
 
 <para>
-Each heap and index relation, except for hash indexes, has a Free Space Map
-(FSM) to keep track of available space in the relation. It's stored
-alongside the main relation data in a separate relation fork, named after the
-filenode number of the relation, plus a <literal>_fsm</literal> suffix. For example,
-if the filenode of a relation is 12345, the FSM is stored in a file called
-<filename>12345_fsm</filename>, in the same directory as the main relation file.
+Each heap relation, unless it is very small, and each index relation, except
+for hash indexes, has a Free Space Map (FSM) to keep track of available
+space in the relation. It's stored alongside the main relation data in a
+separate relation fork, named after the filenode number of the relation, plus
+a <literal>_fsm</literal> suffix. For example, if the filenode of a relation
+is 12345, the FSM is stored in a file called <filename>12345_fsm</filename>,
+in the same directory as the main relation file.
 </para>
 
 <para>
diff --git a/src/backend/access/brin/brin.c b/src/backend/access/brin/brin.c
index 52144271c1..4cad53e299 100644
--- a/src/backend/access/brin/brin.c
+++ b/src/backend/access/brin/brin.c
@@ -1149,7 +1149,7 @@ terminate_brin_buildstate(BrinBuildState *state)
 		freespace = PageGetFreeSpace(page);
 		blk = BufferGetBlockNumber(state->bs_currentInsertBuf);
 		ReleaseBuffer(state->bs_currentInsertBuf);
-		RecordPageWithFreeSpace(state->bs_irel, blk, freespace);
+		RecordPageWithFreeSpace(state->bs_irel, blk, freespace, InvalidBlockNumber);
 		FreeSpaceMapVacuumRange(state->bs_irel, blk, blk + 1);
 	}
 
diff --git a/src/backend/access/brin/brin_pageops.c b/src/backend/access/brin/brin_pageops.c
index 164a468155..2eb354f948 100644
--- a/src/backend/access/brin/brin_pageops.c
+++ b/src/backend/access/brin/brin_pageops.c
@@ -310,7 +310,7 @@ brin_doupdate(Relation idxrel, BlockNumber pagesPerRange,
 
 		if (extended)
 		{
-			RecordPageWithFreeSpace(idxrel, newblk, freespace);
+			RecordPageWithFreeSpace(idxrel, newblk, freespace, InvalidBlockNumber);
 			FreeSpaceMapVacuumRange(idxrel, newblk, newblk + 1);
 		}
 
@@ -461,7 +461,7 @@ brin_doinsert(Relation idxrel, BlockNumber pagesPerRange,
 
 	if (extended)
 	{
-		RecordPageWithFreeSpace(idxrel, blk, freespace);
+		RecordPageWithFreeSpace(idxrel, blk, freespace, InvalidBlockNumber);
 		FreeSpaceMapVacuumRange(idxrel, blk, blk + 1);
 	}
 
@@ -654,7 +654,7 @@ brin_page_cleanup(Relation idxrel, Buffer buf)
 
 	/* Measure free space and record it */
 	RecordPageWithFreeSpace(idxrel, BufferGetBlockNumber(buf),
-							br_page_get_freespace(page));
+							br_page_get_freespace(page), InvalidBlockNumber);
 }
 
 /*
@@ -703,7 +703,7 @@ brin_getinsertbuffer(Relation irel, Buffer oldbuf, Size itemsz,
 	/* Choose initial target page, re-using existing target if known */
 	newblk = RelationGetTargetBlock(irel);
 	if (newblk == InvalidBlockNumber)
-		newblk = GetPageWithFreeSpace(irel, itemsz);
+		newblk = GetPageWithFreeSpace(irel, itemsz, true);
 
 	/*
 	 * Loop until we find a page with sufficient free space.  By the time we
@@ -895,7 +895,7 @@ brin_initialize_empty_new_buffer(Relation idxrel, Buffer buffer)
 	 * pages whose FSM records were forgotten in a crash.
 	 */
 	RecordPageWithFreeSpace(idxrel, BufferGetBlockNumber(buffer),
-							br_page_get_freespace(page));
+							br_page_get_freespace(page), InvalidBlockNumber);
 }
 
 
diff --git a/src/backend/access/heap/hio.c b/src/backend/access/heap/hio.c
index 3da0b49ccc..f370352a2b 100644
--- a/src/backend/access/heap/hio.c
+++ b/src/backend/access/heap/hio.c
@@ -239,8 +239,14 @@ RelationAddExtraBlocks(Relation relation, BulkInsertState bistate)
 		 * Immediately update the bottom level of the FSM.  This has a good
 		 * chance of making this page visible to other concurrently inserting
 		 * backends, and we want that to happen without delay.
+		 *
+		 * Since we know the table will end up with extraBlocks additional
+		 * pages, we pass the final number to avoid possible unnecessary
+		 * system calls and to make sure the FSM is created when we add
+		 * the first new page.
 		 */
-		RecordPageWithFreeSpace(relation, blockNum, freespace);
+		RecordPageWithFreeSpace(relation, blockNum, freespace,
+								firstBlock + extraBlocks);
 	}
 	while (--extraBlocks > 0);
 
@@ -377,20 +383,9 @@ RelationGetBufferForTuple(Relation relation, Size len,
 		 * We have no cached target page, so ask the FSM for an initial
 		 * target.
 		 */
-		targetBlock = GetPageWithFreeSpace(relation, len + saveFreeSpace);
-
-		/*
-		 * If the FSM knows nothing of the rel, try the last page before we
-		 * give up and extend.  This avoids one-tuple-per-page syndrome during
-		 * bootstrapping or in a recently-started system.
-		 */
-		if (targetBlock == InvalidBlockNumber)
-		{
-			BlockNumber nblocks = RelationGetNumberOfBlocks(relation);
-
-			if (nblocks > 0)
-				targetBlock = nblocks - 1;
-		}
+		targetBlock = GetPageWithFreeSpace(relation,
+										   len + saveFreeSpace,
+										   false);
 	}
 
 loop:
@@ -484,6 +479,14 @@ loop:
 		{
 			/* use this page as future insert target, too */
 			RelationSetTargetBlock(relation, targetBlock);
+
+			/*
+			 * In case we used an in-memory map of available blocks, reset
+			 * it for next use.
+			 */
+			if (targetBlock < HEAP_FSM_CREATION_THRESHOLD)
+				FSMClearLocalMap();
+
 			return buffer;
 		}
 
@@ -543,9 +546,12 @@ loop:
 
 			/*
 			 * Check if some other backend has extended a block for us while
-			 * we were waiting on the lock.
+			 * we were waiting on the lock.  We only check the FSM -- if there
+			 * isn't one we don't recheck the number of blocks.
 			 */
-			targetBlock = GetPageWithFreeSpace(relation, len + saveFreeSpace);
+			targetBlock = GetPageWithFreeSpace(relation,
+											   len + saveFreeSpace,
+											   true);
 
 			/*
 			 * If some other waiter has already extended the relation, we
@@ -625,5 +631,12 @@ loop:
 	 */
 	RelationSetTargetBlock(relation, BufferGetBlockNumber(buffer));
 
+	/*
+	 * In case we used an in-memory map of available blocks, reset
+	 * it for next use.  We do this unconditionally since after relation
+	 * extension we can't skip this based on the targetBlock.
+	 */
+	FSMClearLocalMap();
+
 	return buffer;
 }
diff --git a/src/backend/access/heap/vacuumlazy.c b/src/backend/access/heap/vacuumlazy.c
index 2d317a9462..26043bf571 100644
--- a/src/backend/access/heap/vacuumlazy.c
+++ b/src/backend/access/heap/vacuumlazy.c
@@ -154,7 +154,7 @@ static BufferAccessStrategy vac_strategy;
 static void lazy_scan_heap(Relation onerel, int options,
 			   LVRelStats *vacrelstats, Relation *Irel, int nindexes,
 			   bool aggressive);
-static void lazy_vacuum_heap(Relation onerel, LVRelStats *vacrelstats);
+static void lazy_vacuum_heap(Relation onerel, LVRelStats *vacrelstats, BlockNumber nblocks);
 static bool lazy_check_needs_freeze(Buffer buf, bool *hastup);
 static void lazy_vacuum_index(Relation indrel,
 				  IndexBulkDeleteResult **stats,
@@ -759,7 +759,7 @@ lazy_scan_heap(Relation onerel, int options, LVRelStats *vacrelstats,
 			pgstat_progress_update_multi_param(2, hvp_index, hvp_val);
 
 			/* Remove tuples from heap */
-			lazy_vacuum_heap(onerel, vacrelstats);
+			lazy_vacuum_heap(onerel, vacrelstats, nblocks);
 
 			/*
 			 * Forget the now-vacuumed tuples, and press on, but be careful
@@ -897,7 +897,7 @@ lazy_scan_heap(Relation onerel, int options, LVRelStats *vacrelstats,
 			MarkBufferDirty(buf);
 			UnlockReleaseBuffer(buf);
 
-			RecordPageWithFreeSpace(onerel, blkno, freespace);
+			RecordPageWithFreeSpace(onerel, blkno, freespace, nblocks);
 			continue;
 		}
 
@@ -936,7 +936,7 @@ lazy_scan_heap(Relation onerel, int options, LVRelStats *vacrelstats,
 			}
 
 			UnlockReleaseBuffer(buf);
-			RecordPageWithFreeSpace(onerel, blkno, freespace);
+			RecordPageWithFreeSpace(onerel, blkno, freespace, nblocks);
 			continue;
 		}
 
@@ -1333,7 +1333,7 @@ lazy_scan_heap(Relation onerel, int options, LVRelStats *vacrelstats,
 		 * taken if there are no indexes.)
 		 */
 		if (vacrelstats->num_dead_tuples == prev_dead_count)
-			RecordPageWithFreeSpace(onerel, blkno, freespace);
+			RecordPageWithFreeSpace(onerel, blkno, freespace, nblocks);
 	}
 
 	/* report that everything is scanned and vacuumed */
@@ -1395,7 +1395,7 @@ lazy_scan_heap(Relation onerel, int options, LVRelStats *vacrelstats,
 		/* Remove tuples from heap */
 		pgstat_progress_update_param(PROGRESS_VACUUM_PHASE,
 									 PROGRESS_VACUUM_PHASE_VACUUM_HEAP);
-		lazy_vacuum_heap(onerel, vacrelstats);
+		lazy_vacuum_heap(onerel, vacrelstats, nblocks);
 		vacrelstats->num_index_scans++;
 	}
 
@@ -1466,9 +1466,10 @@ lazy_scan_heap(Relation onerel, int options, LVRelStats *vacrelstats,
  * Note: the reason for doing this as a second pass is we cannot remove
  * the tuples until we've removed their index entries, and we want to
  * process index entry removal in batches as large as possible.
+ * Note: nblocks is passed as an optimization for RecordPageWithFreeSpace().
  */
 static void
-lazy_vacuum_heap(Relation onerel, LVRelStats *vacrelstats)
+lazy_vacuum_heap(Relation onerel, LVRelStats *vacrelstats, BlockNumber nblocks)
 {
 	int			tupindex;
 	int			npages;
@@ -1505,7 +1506,7 @@ lazy_vacuum_heap(Relation onerel, LVRelStats *vacrelstats)
 		freespace = PageGetHeapFreeSpace(page);
 
 		UnlockReleaseBuffer(buf);
-		RecordPageWithFreeSpace(onerel, tblk, freespace);
+		RecordPageWithFreeSpace(onerel, tblk, freespace, nblocks);
 		npages++;
 	}
 
diff --git a/src/backend/access/transam/xact.c b/src/backend/access/transam/xact.c
index f665e38ecf..b38c6d41e3 100644
--- a/src/backend/access/transam/xact.c
+++ b/src/backend/access/transam/xact.c
@@ -48,6 +48,7 @@
 #include "replication/walsender.h"
 #include "storage/condition_variable.h"
 #include "storage/fd.h"
+#include "storage/freespace.h"
 #include "storage/lmgr.h"
 #include "storage/predicate.h"
 #include "storage/proc.h"
@@ -2488,6 +2489,12 @@ AbortTransaction(void)
 	pgstat_report_wait_end();
 	pgstat_progress_end_command();
 
+	/*
+	 * In case we aborted during RelationGetBufferForTuple(),
+	 * clear the local map of heap pages.
+	 */
+	FSMClearLocalMap();
+
 	/* Clean up buffer I/O and buffer context locks, too */
 	AbortBufferIO();
 	UnlockBuffers();
@@ -4709,6 +4716,13 @@ AbortSubTransaction(void)
 
 	pgstat_report_wait_end();
 	pgstat_progress_end_command();
+
+	/*
+	 * In case we aborted during RelationGetBufferForTuple(),
+	 * clear the local map of heap pages.
+	 */
+	FSMClearLocalMap();
+
 	AbortBufferIO();
 	UnlockBuffers();
 
diff --git a/src/backend/storage/freespace/README b/src/backend/storage/freespace/README
index e7ff23b76f..c6809e7d71 100644
--- a/src/backend/storage/freespace/README
+++ b/src/backend/storage/freespace/README
@@ -8,7 +8,36 @@ free space to hold a tuple to be stored; or to determine that no such page
 exists and the relation must be extended by one page.  As of PostgreSQL 8.4
 each relation has its own, extensible free space map stored in a separate
 "fork" of its relation.  This eliminates the disadvantages of the former
-fixed-size FSM.
+fixed-size FSM.  There are two exceptions:
+
+1. Hash indexes never have a FSM.
+2. For very small tables, a 3-page relation fork would be relatively large
+and wasteful, so to save space we refrain from creating the FSM if the
+heap has HEAP_FSM_CREATION_THRESHOLD pages or fewer.
+
+To locate free space in the latter case, we simply try pages directly without
+knowing ahead of time how much free space they have.  To maintain good
+performance, we create a local in-memory map of pages to try, and only mark
+every other page as available.  For example, in a 3-page heap, the local map
+would look like:
+
+ANAN
+0123
+
+Pages 0 and 2 are marked "available", and page 1 as "not available".
+Page 3 is beyond the end of the relation, so is likewise marked "not
+available".  First we try page 2, and if that doesn't have sufficient free
+space we try page 0 before giving up and extending the relation.  There may
+be some wasted free space on block 1, but if the relation extends to 4 pages:
+
+NANA
+0123
+
+We not only have the new page 3 at our disposal, we can now check page 1
+for free space as well.
+
+FSM data structure
+------------------
 
 It is important to keep the map small so that it can be searched rapidly.
 Therefore, we don't attempt to record the exact free space on a page.
@@ -192,5 +221,3 @@ TODO
 ----
 
 - fastroot to avoid traversing upper nodes with just 1 child
-- use a different system for tables that fit into one FSM page, with a
-  mechanism to switch to the real thing as it grows.
diff --git a/src/backend/storage/freespace/freespace.c b/src/backend/storage/freespace/freespace.c
index eee8286057..5f46391b68 100644
--- a/src/backend/storage/freespace/freespace.c
+++ b/src/backend/storage/freespace/freespace.c
@@ -76,6 +76,14 @@
 #define FSM_ROOT_LEVEL	(FSM_TREE_DEPTH - 1)
 #define FSM_BOTTOM_LEVEL 0
 
+/* Status codes for the local map. */
+
+/* Either already tried, or beyond the end of the relation */
+#define FSM_LOCAL_NOT_AVAIL 0x00
+
+/* Available to try */
+#define FSM_LOCAL_AVAIL		0x01
+
 /*
  * The internal FSM routines work on a logical addressing scheme. Each
  * level of the tree can be thought of as a separately addressable file.
@@ -89,6 +97,17 @@ typedef struct
 /* Address of the root page. */
 static const FSMAddress FSM_ROOT_ADDRESS = {FSM_ROOT_LEVEL, 0};
 
+/* Local map of block numbers for small heaps with no FSM. */
+typedef struct
+{
+	BlockNumber nblocks;
+	uint8		map[HEAP_FSM_CREATION_THRESHOLD];
+} FSMLocalMap;
+
+static FSMLocalMap fsm_local_map = {0, {FSM_LOCAL_NOT_AVAIL}};
+
+#define FSM_LOCAL_MAP_EXISTS (fsm_local_map.nblocks > 0)
+
 /* functions to navigate the tree */
 static FSMAddress fsm_get_child(FSMAddress parent, uint16 slot);
 static FSMAddress fsm_get_parent(FSMAddress child, uint16 *slot);
@@ -107,10 +126,14 @@ static Size fsm_space_cat_to_avail(uint8 cat);
 /* workhorse functions for various operations */
 static int fsm_set_and_search(Relation rel, FSMAddress addr, uint16 slot,
 				   uint8 newValue, uint8 minValue);
+static void fsm_local_set(Relation rel, BlockNumber cur_nblocks);
 static BlockNumber fsm_search(Relation rel, uint8 min_cat);
+static BlockNumber fsm_local_search(void);
 static uint8 fsm_vacuum_page(Relation rel, FSMAddress addr,
 				BlockNumber start, BlockNumber end,
 				bool *eof);
+static bool fsm_allow_writes(Relation rel, BlockNumber heapblk,
+				BlockNumber nblocks, BlockNumber *get_nblocks);
 
 
 /******** Public API ********/
@@ -127,13 +150,46 @@ static uint8 fsm_vacuum_page(Relation rel, FSMAddress addr,
  * amount of free space available on that page and then try again (see
  * RecordAndGetPageWithFreeSpace).  If InvalidBlockNumber is returned,
  * extend the relation.
+ *
+ * For very small heap relations that don't have a FSM, we try every other
+ * page before extending the relation.  To keep track of which pages have
+ * been tried, initialize a local in-memory map of pages.
  */
 BlockNumber
-GetPageWithFreeSpace(Relation rel, Size spaceNeeded)
+GetPageWithFreeSpace(Relation rel, Size spaceNeeded, bool check_fsm_only)
 {
 	uint8		min_cat = fsm_space_needed_to_cat(spaceNeeded);
+	BlockNumber target_block,
+				nblocks;
+
+	/* First try the FSM, if it exists. */
+	target_block = fsm_search(rel, min_cat);
+
+	if (target_block == InvalidBlockNumber &&
+		(rel->rd_rel->relkind == RELKIND_RELATION ||
+		 rel->rd_rel->relkind == RELKIND_TOASTVALUE) &&
+		!check_fsm_only)
+	{
+		nblocks = RelationGetNumberOfBlocks(rel);
+
+		if (nblocks > HEAP_FSM_CREATION_THRESHOLD)
+		{
+			/*
+			 * If the FSM knows nothing of the rel, try the last page before
+			 * we give up and extend.  This avoids one-tuple-per-page syndrome
+			 * during bootstrapping or in a recently-started system.
+			 */
+			target_block = nblocks - 1;
+		}
+		else if (nblocks > 0)
+		{
+			/* Create or update local map and get first candidate block. */
+			fsm_local_set(rel, nblocks);
+			target_block = fsm_local_search();
+		}
+	}
 
-	return fsm_search(rel, min_cat);
+	return target_block;
 }
 
 /*
@@ -144,16 +200,47 @@ GetPageWithFreeSpace(Relation rel, Size spaceNeeded)
  * also some effort to return a page close to the old page; if there's a
  * page with enough free space on the same FSM page where the old one page
  * is located, it is preferred.
+ *
+ * For very small heap relations that don't have a FSM, we update the local
+ * map to indicate we have tried a page, and return the next page to try.
  */
 BlockNumber
 RecordAndGetPageWithFreeSpace(Relation rel, BlockNumber oldPage,
 							  Size oldSpaceAvail, Size spaceNeeded)
 {
-	int			old_cat = fsm_space_avail_to_cat(oldSpaceAvail);
-	int			search_cat = fsm_space_needed_to_cat(spaceNeeded);
+	int			old_cat;
+	int			search_cat;
 	FSMAddress	addr;
 	uint16		slot;
 	int			search_slot;
+	BlockNumber nblocks = InvalidBlockNumber;
+
+	/* First try the local map, if it exists. */
+	if (FSM_LOCAL_MAP_EXISTS)
+	{
+		Assert((rel->rd_rel->relkind == RELKIND_RELATION ||
+				rel->rd_rel->relkind == RELKIND_TOASTVALUE) &&
+			   fsm_local_map.map[oldPage] == FSM_LOCAL_AVAIL);
+
+		fsm_local_map.map[oldPage] = FSM_LOCAL_NOT_AVAIL;
+		return fsm_local_search();
+	}
+
+	if (!fsm_allow_writes(rel, oldPage, InvalidBlockNumber, &nblocks))
+	{
+		/*
+		 * If we have neither a local map nor a FSM, we probably just
+		 * tried the target block in the smgr relation entry and failed,
+		 * so we'll need to create the local map.
+		 */
+		fsm_local_set(rel, nblocks);
+		return fsm_local_search();
+	}
+
+	/* Normal FSM logic follows */
+
+	old_cat = fsm_space_avail_to_cat(oldSpaceAvail);
+	search_cat = fsm_space_needed_to_cat(spaceNeeded);
 
 	/* Get the location of the FSM byte representing the heap block */
 	addr = fsm_get_location(oldPage, &slot);
@@ -176,20 +263,41 @@ RecordAndGetPageWithFreeSpace(Relation rel, BlockNumber oldPage,
  * Note that if the new spaceAvail value is higher than the old value stored
  * in the FSM, the space might not become visible to searchers until the next
  * FreeSpaceMapVacuum call, which updates the upper level pages.
+ *
+ * Callers have no need for a local map.
  */
 void
-RecordPageWithFreeSpace(Relation rel, BlockNumber heapBlk, Size spaceAvail)
+RecordPageWithFreeSpace(Relation rel, BlockNumber heapBlk,
+						Size spaceAvail, BlockNumber nblocks)
 {
-	int			new_cat = fsm_space_avail_to_cat(spaceAvail);
+	int			new_cat;
 	FSMAddress	addr;
 	uint16		slot;
+	BlockNumber dummy;
+
+	if (!fsm_allow_writes(rel, heapBlk, nblocks, &dummy))
+		/* No FSM to update and no local map either */
+		return;
 
 	/* Get the location of the FSM byte representing the heap block */
 	addr = fsm_get_location(heapBlk, &slot);
 
+	new_cat = fsm_space_avail_to_cat(spaceAvail);
 	fsm_set_and_search(rel, addr, slot, new_cat, 0);
 }
 
+/*
+ * Clear the local map.  We must call this when we have found a block with
+ * enough free space, when we extend the relation, or on transaction abort.
+ */
+void
+FSMClearLocalMap(void)
+{
+	fsm_local_map.nblocks = 0;
+	memset(&fsm_local_map.map, FSM_LOCAL_NOT_AVAIL,
+		   sizeof(fsm_local_map.map));
+}
+
 /*
  * XLogRecordPageWithFreeSpace - like RecordPageWithFreeSpace, for use in
  *		WAL replay
@@ -204,6 +312,30 @@ XLogRecordPageWithFreeSpace(RelFileNode rnode, BlockNumber heapBlk,
 	BlockNumber blkno;
 	Buffer		buf;
 	Page		page;
+	bool		write_to_fsm;
+
+	/* This is meant to mirror the logic in fsm_allow_writes() */
+	if (heapBlk >= HEAP_FSM_CREATION_THRESHOLD)
+		write_to_fsm = true;
+	else
+	{
+		/* Open the relation at smgr level */
+		SMgrRelation smgr = smgropen(rnode, InvalidBackendId);
+
+		if (smgrexists(smgr, FSM_FORKNUM))
+			write_to_fsm = true;
+		else
+		{
+			BlockNumber heap_nblocks = smgrnblocks(smgr, MAIN_FORKNUM);
+			if (heap_nblocks > HEAP_FSM_CREATION_THRESHOLD)
+				write_to_fsm = true;
+			else
+				write_to_fsm = false;
+		}
+	}
+
+	if (!write_to_fsm)
+		return;
 
 	/* Get the location of the FSM byte representing the heap block */
 	addr = fsm_get_location(heapBlk, &slot);
@@ -904,3 +1036,134 @@ fsm_vacuum_page(Relation rel, FSMAddress addr,
 
 	return max_avail;
 }
+
+/*
+ * For heaps, we prevent creation of the FSM unless the number of pages
+ * exceeds HEAP_FSM_CREATION_THRESHOLD.  For tables that don't already have
+ * a FSM, this will save an inode and a few kB of space.
+ *
+ * XXX The API is a little awkward -- if the caller passes a valid nblocks
+ * value, it can avoid invoking a system call.  If the caller passes
+ * InvalidBlockNumber and receives a false return value, it can get an
+ * up-to-date relation size from get_nblocks.  This saves a few cycles in
+ * the caller, which would otherwise need to get the relation size by itself.
+ */
+static bool
+fsm_allow_writes(Relation rel, BlockNumber heapblk,
+				 BlockNumber nblocks, BlockNumber *get_nblocks)
+{
+	bool		skip_get_nblocks;
+
+	if (heapblk >= HEAP_FSM_CREATION_THRESHOLD)
+		return true;
+
+	/* Non-heap rels can always create a FSM. */
+	if (rel->rd_rel->relkind != RELKIND_RELATION &&
+		rel->rd_rel->relkind != RELKIND_TOASTVALUE)
+		return true;
+
+	/*
+	 * If the caller knows nblocks, we can avoid a system call later.
+	 * If it doesn't, maybe we have relpages from a previous VACUUM.
+	 * Since the table may have extended since then, we still have to
+	 * count the pages later if we can't return now.
+	 */
+	if (nblocks != InvalidBlockNumber)
+	{
+		if (nblocks > HEAP_FSM_CREATION_THRESHOLD)
+			return true;
+		else
+			skip_get_nblocks = true;
+	}
+	else
+	{
+		if (rel->rd_rel->relpages != InvalidBlockNumber &&
+			rel->rd_rel->relpages > HEAP_FSM_CREATION_THRESHOLD)
+			return true;
+		else
+			skip_get_nblocks = false;
+	}
+
+	RelationOpenSmgr(rel);
+	if (smgrexists(rel->rd_smgr, FSM_FORKNUM))
+		return true;
+
+	if (skip_get_nblocks)
+		return false;
+
+	/* last resort */
+	*get_nblocks = RelationGetNumberOfBlocks(rel);
+	if (*get_nblocks > HEAP_FSM_CREATION_THRESHOLD)
+		return true;
+	else
+		return false;
+}
+
+/*
+ * Initialize or update the local map of blocks to try, for when there is
+ * no FSM.
+ *
+ * When we initialize the map, the whole heap is potentially available to
+ * try.  Testing revealed that trying every block can cause a small
+ * performance dip compared to when we use a FSM, so we try every other
+ * block instead.
+ */
+static void
+fsm_local_set(Relation rel, BlockNumber cur_nblocks)
+{
+	BlockNumber blkno,
+				cached_target_block;
+
+	/* The local map must not be set already. */
+	Assert(!FSM_LOCAL_MAP_EXISTS);
+
+	/*
+	 * Starting at the current last block in the relation and working
+	 * backwards, mark alternating blocks as available.
+	 */
+	blkno = cur_nblocks - 1;
+	while (true)
+	{
+		fsm_local_map.map[blkno] = FSM_LOCAL_AVAIL;
+		if (blkno >= 2)
+			blkno -= 2;
+		else
+			break;
+	}
+
+	/* Cache the number of blocks. */
+	fsm_local_map.nblocks = cur_nblocks;
+
+	/* Set the status of the cached target block to 'unavailable'. */
+	cached_target_block = RelationGetTargetBlock(rel);
+	if (cached_target_block != InvalidBlockNumber &&
+		cached_target_block < cur_nblocks)
+		fsm_local_map.map[cached_target_block] = FSM_LOCAL_NOT_AVAIL;
+}
+
+/*
+ * Search the local map for an available block to try, in descending order.
+ * As such, there is no heuristic available to decide which order will be
+ * better to try, but the probability of having space in the last block in the
+ * map is higher because that is the most recent block added to the heap.
+ *
+ * This function is used when there is no FSM.
+ */
+static BlockNumber
+fsm_local_search(void)
+{
+	BlockNumber		target_block;
+
+	/* Local map must be set by now. */
+	Assert(FSM_LOCAL_MAP_EXISTS);
+
+	target_block = fsm_local_map.nblocks;
+	do
+	{
+		target_block--;
+		if (fsm_local_map.map[target_block] == FSM_LOCAL_AVAIL)
+			return target_block;
+	} while (target_block > 0);
+
+	return InvalidBlockNumber;
+}
diff --git a/src/backend/storage/freespace/indexfsm.c b/src/backend/storage/freespace/indexfsm.c
index 58cedeaa9f..9d8f43d373 100644
--- a/src/backend/storage/freespace/indexfsm.c
+++ b/src/backend/storage/freespace/indexfsm.c
@@ -37,7 +37,7 @@
 BlockNumber
 GetFreeIndexPage(Relation rel)
 {
-	BlockNumber blkno = GetPageWithFreeSpace(rel, BLCKSZ / 2);
+	BlockNumber blkno = GetPageWithFreeSpace(rel, BLCKSZ / 2, true);
 
 	if (blkno != InvalidBlockNumber)
 		RecordUsedIndexPage(rel, blkno);
@@ -51,7 +51,7 @@ GetFreeIndexPage(Relation rel)
 void
 RecordFreeIndexPage(Relation rel, BlockNumber freeBlock)
 {
-	RecordPageWithFreeSpace(rel, freeBlock, BLCKSZ - 1);
+	RecordPageWithFreeSpace(rel, freeBlock, BLCKSZ - 1, InvalidBlockNumber);
 }
 
 
@@ -61,7 +61,7 @@ RecordFreeIndexPage(Relation rel, BlockNumber freeBlock)
 void
 RecordUsedIndexPage(Relation rel, BlockNumber usedBlock)
 {
-	RecordPageWithFreeSpace(rel, usedBlock, 0);
+	RecordPageWithFreeSpace(rel, usedBlock, 0, InvalidBlockNumber);
 }
 
 /*
diff --git a/src/include/storage/freespace.h b/src/include/storage/freespace.h
index 8b00033438..b077c2c94f 100644
--- a/src/include/storage/freespace.h
+++ b/src/include/storage/freespace.h
@@ -18,15 +18,20 @@
 #include "storage/relfilenode.h"
 #include "utils/relcache.h"
 
+/* Only create the FSM if the heap has greater than this many blocks */
+#define HEAP_FSM_CREATION_THRESHOLD 4
+
 /* prototypes for public functions in freespace.c */
 extern Size GetRecordedFreeSpace(Relation rel, BlockNumber heapBlk);
-extern BlockNumber GetPageWithFreeSpace(Relation rel, Size spaceNeeded);
+extern BlockNumber GetPageWithFreeSpace(Relation rel, Size spaceNeeded,
+							bool check_fsm_only);
 extern BlockNumber RecordAndGetPageWithFreeSpace(Relation rel,
 							  BlockNumber oldPage,
 							  Size oldSpaceAvail,
 							  Size spaceNeeded);
 extern void RecordPageWithFreeSpace(Relation rel, BlockNumber heapBlk,
-						Size spaceAvail);
+						Size spaceAvail, BlockNumber nblocks);
+extern void FSMClearLocalMap(void);
 extern void XLogRecordPageWithFreeSpace(RelFileNode rnode, BlockNumber heapBlk,
 							Size spaceAvail);
 
diff --git a/src/test/regress/expected/fsm.out b/src/test/regress/expected/fsm.out
new file mode 100644
index 0000000000..df6b15b9d2
--- /dev/null
+++ b/src/test/regress/expected/fsm.out
@@ -0,0 +1,75 @@
+--
+-- Free Space Map test
+--
+CREATE TABLE fsm_check_size (num int, str text);
+-- Fill 3 blocks with as many large records as will fit
+-- No FSM
+INSERT INTO fsm_check_size SELECT i, rpad('', 1024, 'a')
+FROM generate_series(1,7*3) i;
+VACUUM fsm_check_size;
+SELECT pg_relation_size('fsm_check_size', 'main') AS heap_size,
+pg_relation_size('fsm_check_size', 'fsm') AS fsm_size;
+ heap_size | fsm_size 
+-----------+----------
+     24576 |        0
+(1 row)
+
+-- Clear some space on block 0
+DELETE FROM fsm_check_size WHERE num <= 5;
+VACUUM fsm_check_size;
+-- Insert small record in block 2 to set the cached smgr targetBlock
+INSERT INTO fsm_check_size VALUES(99, 'b');
+-- Insert large record and make sure it goes in block 0 rather than
+-- causing the relation to extend
+INSERT INTO fsm_check_size VALUES (101, rpad('', 1024, 'a'));
+SELECT pg_relation_size('fsm_check_size', 'main') AS heap_size,
+pg_relation_size('fsm_check_size', 'fsm') AS fsm_size;
+ heap_size | fsm_size 
+-----------+----------
+     24576 |        0
+(1 row)
+
+-- Extend table with enough blocks to exceed the FSM threshold
+-- FSM is created and extended to 3 blocks
+INSERT INTO fsm_check_size SELECT i, 'c' FROM generate_series(200,1200) i;
+VACUUM fsm_check_size;
+SELECT pg_relation_size('fsm_check_size', 'fsm') AS fsm_size;
+ fsm_size 
+----------
+    24576
+(1 row)
+
+-- Truncate heap to 1 block
+-- No change in FSM
+DELETE FROM fsm_check_size WHERE num > 7;
+VACUUM fsm_check_size;
+SELECT pg_relation_size('fsm_check_size', 'fsm') AS fsm_size;
+ fsm_size 
+----------
+    24576
+(1 row)
+
+-- Truncate heap to 0 blocks
+-- FSM now truncated to 2 blocks
+DELETE FROM fsm_check_size;
+VACUUM fsm_check_size;
+SELECT pg_relation_size('fsm_check_size', 'fsm') AS fsm_size;
+ fsm_size 
+----------
+    16384
+(1 row)
+
+-- Add long random string to extend TOAST table to 1 block
+INSERT INTO fsm_check_size
+VALUES(0, (SELECT string_agg(md5(chr(i)), '')
+		   FROM generate_series(1,100) i));
+VACUUM fsm_check_size;
+SELECT pg_relation_size(reltoastrelid, 'main') AS toast_size,
+pg_relation_size(reltoastrelid, 'fsm') AS toast_fsm_size
+FROM pg_class WHERE relname = 'fsm_check_size';
+ toast_size | toast_fsm_size 
+------------+----------------
+       8192 |              0
+(1 row)
+
+DROP TABLE fsm_check_size;
diff --git a/src/test/regress/parallel_schedule b/src/test/regress/parallel_schedule
index cc0bbf5db9..4051a4ad4e 100644
--- a/src/test/regress/parallel_schedule
+++ b/src/test/regress/parallel_schedule
@@ -68,6 +68,12 @@ test: create_aggregate create_function_3 create_cast constraints triggers inheri
 # ----------
 test: sanity_check
 
+# ----------
+# fsm does a delete followed by vacuum, and running it in parallel can prevent
+# removal of rows.
+# ----------
+test: fsm
+
 # ----------
 # Believe it or not, select creates a table, subsequent
 # tests need.
diff --git a/src/test/regress/serial_schedule b/src/test/regress/serial_schedule
index 0c10c7100c..ac1ea622d6 100644
--- a/src/test/regress/serial_schedule
+++ b/src/test/regress/serial_schedule
@@ -80,6 +80,7 @@ test: roleattributes
 test: create_am
 test: hash_func
 test: sanity_check
+test: fsm
 test: errors
 test: select
 test: select_into
diff --git a/src/test/regress/sql/fsm.sql b/src/test/regress/sql/fsm.sql
new file mode 100644
index 0000000000..07f505591a
--- /dev/null
+++ b/src/test/regress/sql/fsm.sql
@@ -0,0 +1,55 @@
+--
+-- Free Space Map test
+--
+
+CREATE TABLE fsm_check_size (num int, str text);
+
+-- Fill 3 blocks with as many large records as will fit
+-- No FSM
+INSERT INTO fsm_check_size SELECT i, rpad('', 1024, 'a')
+FROM generate_series(1,7*3) i;
+VACUUM fsm_check_size;
+SELECT pg_relation_size('fsm_check_size', 'main') AS heap_size,
+pg_relation_size('fsm_check_size', 'fsm') AS fsm_size;
+
+-- Clear some space on block 0
+DELETE FROM fsm_check_size WHERE num <= 5;
+VACUUM fsm_check_size;
+
+-- Insert small record in block 2 to set the cached smgr targetBlock
+INSERT INTO fsm_check_size VALUES(99, 'b');
+
+-- Insert large record and make sure it goes in block 0 rather than
+-- causing the relation to extend
+INSERT INTO fsm_check_size VALUES (101, rpad('', 1024, 'a'));
+SELECT pg_relation_size('fsm_check_size', 'main') AS heap_size,
+pg_relation_size('fsm_check_size', 'fsm') AS fsm_size;
+
+-- Extend table with enough blocks to exceed the FSM threshold
+-- FSM is created and extended to 3 blocks
+INSERT INTO fsm_check_size SELECT i, 'c' FROM generate_series(200,1200) i;
+VACUUM fsm_check_size;
+SELECT pg_relation_size('fsm_check_size', 'fsm') AS fsm_size;
+
+-- Truncate heap to 1 block
+-- No change in FSM
+DELETE FROM fsm_check_size WHERE num > 7;
+VACUUM fsm_check_size;
+SELECT pg_relation_size('fsm_check_size', 'fsm') AS fsm_size;
+
+-- Truncate heap to 0 blocks
+-- FSM now truncated to 2 blocks
+DELETE FROM fsm_check_size;
+VACUUM fsm_check_size;
+SELECT pg_relation_size('fsm_check_size', 'fsm') AS fsm_size;
+
+-- Add long random string to extend TOAST table to 1 block
+INSERT INTO fsm_check_size
+VALUES(0, (SELECT string_agg(md5(chr(i)), '')
+		   FROM generate_series(1,100) i));
+VACUUM fsm_check_size;
+SELECT pg_relation_size(reltoastrelid, 'main') AS toast_size,
+pg_relation_size(reltoastrelid, 'fsm') AS toast_fsm_size
+FROM pg_class WHERE relname = 'fsm_check_size';
+
+DROP TABLE fsm_check_size;
-- 
2.17.1

v16-0002-During-pg_upgrade-conditionally-skip-transfer-of.patchtext/x-patch; charset=US-ASCII; name=v16-0002-During-pg_upgrade-conditionally-skip-transfer-of.patchDownload
From 96fc9c3c9220e03d6af5510851053733756f7476 Mon Sep 17 00:00:00 2001
From: John Naylor <jcnaylor@gmail.com>
Date: Sat, 19 Jan 2019 18:41:58 -0500
Subject: [PATCH v16 2/2] During pg_upgrade, conditionally skip transfer of
 FSMs.

If a heap on the old cluster has 4 pages or fewer, don't copy or
link the FSM. This will reduce space usage for installations with
large numbers of small tables.
---
 src/bin/pg_upgrade/info.c        | 11 ++++--
 src/bin/pg_upgrade/pg_upgrade.h  |  6 +++-
 src/bin/pg_upgrade/relfilenode.c | 57 ++++++++++++++++++--------------
 3 files changed, 47 insertions(+), 27 deletions(-)

diff --git a/src/bin/pg_upgrade/info.c b/src/bin/pg_upgrade/info.c
index 2f925f086c..c7598b3de0 100644
--- a/src/bin/pg_upgrade/info.c
+++ b/src/bin/pg_upgrade/info.c
@@ -200,6 +200,7 @@ create_rel_filename_map(const char *old_data, const char *new_data,
 
 	map->old_db_oid = old_db->db_oid;
 	map->new_db_oid = new_db->db_oid;
+	map->relkind = old_rel->relkind;
 
 	/*
 	 * old_relfilenode might differ from pg_class.oid (and hence
@@ -418,6 +419,7 @@ get_rel_infos(ClusterInfo *cluster, DbInfo *dbinfo)
 	char	   *nspname = NULL;
 	char	   *relname = NULL;
 	char	   *tablespace = NULL;
+	char	   *relkind = NULL;
 	int			i_spclocation,
 				i_nspname,
 				i_relname,
@@ -425,7 +427,8 @@ get_rel_infos(ClusterInfo *cluster, DbInfo *dbinfo)
 				i_indtable,
 				i_toastheap,
 				i_relfilenode,
-				i_reltablespace;
+				i_reltablespace,
+				i_relkind;
 	char		query[QUERY_ALLOC];
 	char	   *last_namespace = NULL,
 			   *last_tablespace = NULL;
@@ -494,7 +497,7 @@ get_rel_infos(ClusterInfo *cluster, DbInfo *dbinfo)
 	 */
 	snprintf(query + strlen(query), sizeof(query) - strlen(query),
 			 "SELECT all_rels.*, n.nspname, c.relname, "
-			 "  c.relfilenode, c.reltablespace, %s "
+			 "  c.relfilenode, c.reltablespace, c.relkind, %s "
 			 "FROM (SELECT * FROM regular_heap "
 			 "      UNION ALL "
 			 "      SELECT * FROM toast_heap "
@@ -526,6 +529,7 @@ get_rel_infos(ClusterInfo *cluster, DbInfo *dbinfo)
 	i_relfilenode = PQfnumber(res, "relfilenode");
 	i_reltablespace = PQfnumber(res, "reltablespace");
 	i_spclocation = PQfnumber(res, "spclocation");
+	i_relkind = PQfnumber(res, "relkind");
 
 	for (relnum = 0; relnum < ntups; relnum++)
 	{
@@ -555,6 +559,9 @@ get_rel_infos(ClusterInfo *cluster, DbInfo *dbinfo)
 		relname = PQgetvalue(res, relnum, i_relname);
 		curr->relname = pg_strdup(relname);
 
+		relkind = PQgetvalue(res, relnum, i_relkind);
+		curr->relkind = relkind[0];
+
 		curr->relfilenode = atooid(PQgetvalue(res, relnum, i_relfilenode));
 		curr->tblsp_alloc = false;
 
diff --git a/src/bin/pg_upgrade/pg_upgrade.h b/src/bin/pg_upgrade/pg_upgrade.h
index 2f67eee22b..6cd0e0967f 100644
--- a/src/bin/pg_upgrade/pg_upgrade.h
+++ b/src/bin/pg_upgrade/pg_upgrade.h
@@ -147,6 +147,7 @@ typedef struct
 	char	   *tablespace;		/* tablespace path; "" for cluster default */
 	bool		nsp_alloc;		/* should nspname be freed? */
 	bool		tblsp_alloc;	/* should tablespace be freed? */
+	char		relkind;		/* relation relkind -- see pg_class.h */
 } RelInfo;
 
 typedef struct
@@ -173,9 +174,12 @@ typedef struct
 	 */
 	Oid			old_relfilenode;
 	Oid			new_relfilenode;
-	/* the rest are used only for logging and error reporting */
+
+	/* These are used only for logging and error reporting. */
 	char	   *nspname;		/* namespaces */
 	char	   *relname;
+
+	char		relkind;		/* relation relkind -- see pg_class.h */
 } FileNameMap;
 
 /*
diff --git a/src/bin/pg_upgrade/relfilenode.c b/src/bin/pg_upgrade/relfilenode.c
index 0c78073f0e..1cdda5f5f1 100644
--- a/src/bin/pg_upgrade/relfilenode.c
+++ b/src/bin/pg_upgrade/relfilenode.c
@@ -14,10 +14,11 @@
 #include <sys/stat.h>
 #include "catalog/pg_class_d.h"
 #include "access/transam.h"
+#include "storage/freespace.h"
 
 
 static void transfer_single_new_db(FileNameMap *maps, int size, char *old_tablespace);
-static void transfer_relfile(FileNameMap *map, const char *suffix, bool vm_must_add_frozenbit);
+static Size transfer_relfile(FileNameMap *map, const char *suffix, bool vm_must_add_frozenbit);
 
 
 /*
@@ -144,6 +145,7 @@ transfer_single_new_db(FileNameMap *maps, int size, char *old_tablespace)
 	int			mapnum;
 	bool		vm_crashsafe_match = true;
 	bool		vm_must_add_frozenbit = false;
+	Size		first_seg_size = 0;
 
 	/*
 	 * Do the old and new cluster disagree on the crash-safetiness of the vm
@@ -165,18 +167,23 @@ transfer_single_new_db(FileNameMap *maps, int size, char *old_tablespace)
 		if (old_tablespace == NULL ||
 			strcmp(maps[mapnum].old_tablespace, old_tablespace) == 0)
 		{
-			/* transfer primary file */
-			transfer_relfile(&maps[mapnum], "", vm_must_add_frozenbit);
+			/* Transfer main fork and return size of the first segment. */
+			first_seg_size = transfer_relfile(&maps[mapnum], "", vm_must_add_frozenbit);
 
 			/* fsm/vm files added in PG 8.4 */
 			if (GET_MAJOR_VERSION(old_cluster.major_version) >= 804)
 			{
 				/*
-				 * Copy/link any fsm and vm files, if they exist
+				 * Copy/link any fsm and vm files, if they exist and if they would
+				 * be created in the new cluster.
 				 */
-				transfer_relfile(&maps[mapnum], "_fsm", vm_must_add_frozenbit);
+				if ((maps[mapnum].relkind != RELKIND_RELATION &&
+					 maps[mapnum].relkind != RELKIND_TOASTVALUE) ||
+					first_seg_size > HEAP_FSM_CREATION_THRESHOLD * BLCKSZ ||
+					GET_MAJOR_VERSION(new_cluster.major_version) <= 1100)
+					(void) transfer_relfile(&maps[mapnum], "_fsm", vm_must_add_frozenbit);
 				if (vm_crashsafe_match)
-					transfer_relfile(&maps[mapnum], "_vm", vm_must_add_frozenbit);
+					(void) transfer_relfile(&maps[mapnum], "_vm", vm_must_add_frozenbit);
 			}
 		}
 	}
@@ -190,7 +197,7 @@ transfer_single_new_db(FileNameMap *maps, int size, char *old_tablespace)
  * is true, visibility map forks are converted and rewritten, even in link
  * mode.
  */
-static void
+static Size
 transfer_relfile(FileNameMap *map, const char *type_suffix, bool vm_must_add_frozenbit)
 {
 	char		old_file[MAXPGPATH];
@@ -198,6 +205,7 @@ transfer_relfile(FileNameMap *map, const char *type_suffix, bool vm_must_add_fro
 	int			segno;
 	char		extent_suffix[65];
 	struct stat statbuf;
+	Size		first_seg_size = 0;
 
 	/*
 	 * Now copy/link any related segments as well. Remember, PG breaks large
@@ -226,26 +234,27 @@ transfer_relfile(FileNameMap *map, const char *type_suffix, bool vm_must_add_fro
 				 type_suffix,
 				 extent_suffix);
 
-		/* Is it an extent, fsm, or vm file? */
-		if (type_suffix[0] != '\0' || segno != 0)
+		/* Did file open fail? */
+		if (stat(old_file, &statbuf) != 0)
 		{
-			/* Did file open fail? */
-			if (stat(old_file, &statbuf) != 0)
-			{
-				/* File does not exist?  That's OK, just return */
-				if (errno == ENOENT)
-					return;
-				else
-					pg_fatal("error while checking for file existence \"%s.%s\" (\"%s\" to \"%s\"): %s\n",
-							 map->nspname, map->relname, old_file, new_file,
-							 strerror(errno));
-			}
-
-			/* If file is empty, just return */
-			if (statbuf.st_size == 0)
-				return;
+			/* Extent, fsm, or vm does not exist?  That's OK, just return */
+			if (errno == ENOENT &&
+				(type_suffix[0] != '\0' || segno != 0))
+				return first_seg_size;
+			else
+				pg_fatal("error while checking for file existence \"%s.%s\" (\"%s\" to \"%s\"): %s\n",
+						 map->nspname, map->relname, old_file, new_file,
+						 strerror(errno));
 		}
 
+		/* Save the size of the first segment of the main fork. */
+		else if (type_suffix[0] == '\0' && segno == 0)
+			first_seg_size = statbuf.st_size;
+
+		/* If extent, fsm, or vm is empty, just return */
+		else if (statbuf.st_size == 0)
+			return first_seg_size;
+
 		unlink(new_file);
 
 		/* Copying files might take some time, so give feedback. */
-- 
2.17.1

#83Amit Kapila
amit.kapila16@gmail.com
In reply to: John Naylor (#82)
Re: WIP: Avoid creation of the free space map for small tables

On Sun, Jan 20, 2019 at 5:19 AM John Naylor <john.naylor@2ndquadrant.com> wrote:

Review of v16-0002-During-pg_upgrade-conditionally-skip-transfer-of:

- * Copy/link any fsm and vm files, if they exist
+ *
Copy/link any fsm and vm files, if they exist and if they would
+ * be created in the
new cluster.
  */
- transfer_relfile(&maps[mapnum], "_fsm",
vm_must_add_frozenbit);
+ if ((maps[mapnum].relkind != RELKIND_RELATION &&
+
maps[mapnum].relkind != RELKIND_TOASTVALUE) ||
+
first_seg_size > HEAP_FSM_CREATION_THRESHOLD * BLCKSZ ||
+ GET_MAJOR_VERSION
(new_cluster.major_version) <= 1100)
+ (void) transfer_relfile(&maps[mapnum],
"_fsm", vm_must_add_frozenbit);

So we won't allow transfer of FSM files if their size is below
HEAP_FSM_CREATION_THRESHOLD. What will be its behavior in link mode?
It seems that the old files will remain there. Will it create any
problem when we try to create the files via the new server, can you
once test this case?

Also, another case to think in this regard is the upgrade for standby
servers, if you read below paragraph from the user manual [1]https://www.postgresql.org/docs/devel/pgupgrade.html, you
will see what I am worried about?

"What this does is to record the links created by pg_upgrade's link
mode that connect files in the old and new clusters on the primary
server. It then finds matching files in the standby's old cluster and
creates links for them in the standby's new cluster. Files that were
not linked on the primary are copied from the primary to the standby.
(They are usually small.)"

[1]: https://www.postgresql.org/docs/devel/pgupgrade.html

--
With Regards,
Amit Kapila.
EnterpriseDB: http://www.enterprisedb.com

#84John Naylor
john.naylor@2ndquadrant.com
In reply to: Amit Kapila (#83)
Re: WIP: Avoid creation of the free space map for small tables

On Mon, Jan 21, 2019 at 6:32 AM Amit Kapila <amit.kapila16@gmail.com> wrote:

So we won't allow transfer of FSM files if their size is below
HEAP_FSM_CREATION_THRESHOLD. What will be its behavior in link mode?
It seems that the old files will remain there. Will it create any
problem when we try to create the files via the new server, can you
once test this case?

I tried upgrading in --link mode, and on the new cluster, enlarging
the table past the threshold causes a new FSM to be created as
expected.

Also, another case to think in this regard is the upgrade for standby
servers, if you read below paragraph from the user manual [1], you
will see what I am worried about?

"What this does is to record the links created by pg_upgrade's link
mode that connect files in the old and new clusters on the primary
server. It then finds matching files in the standby's old cluster and
creates links for them in the standby's new cluster. Files that were
not linked on the primary are copied from the primary to the standby.
(They are usually small.)"

[1] - https://www.postgresql.org/docs/devel/pgupgrade.html

Trying this, I ran into a couple problems. I'm probably doing
something wrong, but I can't help but think there's a pg_upgrade
bug/feature I'm unaware of:

I set up my test to have primary directory data1 and for the secondary
standby/data1. I instructed pg_upgrade to upgrade data1 into data1u,
and I tried the rsync recipe in the docs quoted above, and the
upgraded standby wouldn't go into recovery. While debugging that, I
found surprisingly that pg_upgrade also went further and upgraded
standby/data1 into standby/data1u. I tried deleting standby/data1u
before running the rsync command and still nothing. Because the
upgraded secondary is non-functional, I can't really answer your
question.

Not sure if this is normal, but the pg_upgraded new cluster no longer
had the replication slot. Re-adding it didn't allow my upgraded
secondary to go into recovery, either. (I made sure to copy the
recovery settings, so that can't be the problem)

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

#85Amit Kapila
amit.kapila16@gmail.com
In reply to: John Naylor (#82)
2 attachment(s)
Re: WIP: Avoid creation of the free space map for small tables

On Sun, Jan 20, 2019 at 5:19 AM John Naylor <john.naylor@2ndquadrant.com> wrote:

I have a test for in-range and out-of-range for each relation fork.

I think the first two patches (a) removal of dead code in bootstrap
and (b) the core patch to avoid creation of FSM file for the small
table are good now. I have prepared the patches along with commit
message. There is no change except for some changes in README and
commit message of the second patch. Kindly let me know what you think
about them?

I think these two patches can go even without the upgrade patch
(during pg_upgrade, conditionally skip transfer of FSMs.) which is
still under discussion. However, I am not in a hurry if you or other
thinks that upgrade patch must be committed along with the second
patch. I think the upgrade patch is generally going on track but
might need some more review.

--
With Regards,
Amit Kapila.
EnterpriseDB: http://www.enterprisedb.com

Attachments:

v02-0001-In-bootstrap-mode-don-t-allow-the-creation-of-files-.patchapplication/octet-stream; name=v02-0001-In-bootstrap-mode-don-t-allow-the-creation-of-files-.patchDownload
From b2d5519ebdc564281d6d2e8b0ac4d3b6ae4706dd Mon Sep 17 00:00:00 2001
From: Amit Kapila <akapila@postgresql.org>
Date: Wed, 23 Jan 2019 17:10:52 +0530
Subject: [PATCH 1/2] In bootstrap mode, don't allow the creation of files if
 they don't already exist.

In commit's b9d01fe288 and 3908473c80, we have added some code where we
allowed the creation of files during mdopen even if they didn't exist
during the bootstrap mode.  The later commit obviates the need for same.

This was harmless code till now but with an upcoming feature where we don't
allow to create FSM for small tables, this will needlessly create FSM files.

Author: John Naylor
Reviewed-by: Amit Kapila
Discussion: https://www.postgresql.org/message-id/CAJVSVGWvB13PzpbLEecFuGFc5V2fsO736BsdTakPiPAcdMM5tQ@mail.gmail.com
	    https://www.postgresql.org/message-id/CAA4eK1KsET6sotf+rzOTQfb83pzVEzVhbQi1nxGFYVstVWXUGw@mail.gmail.com
---
 src/backend/storage/smgr/md.c | 33 ++++++++-------------------------
 1 file changed, 8 insertions(+), 25 deletions(-)

diff --git a/src/backend/storage/smgr/md.c b/src/backend/storage/smgr/md.c
index c37dd12..2aba2df 100644
--- a/src/backend/storage/smgr/md.c
+++ b/src/backend/storage/smgr/md.c
@@ -310,13 +310,7 @@ mdcreate(SMgrRelation reln, ForkNumber forkNum, bool isRedo)
 	{
 		int			save_errno = errno;
 
-		/*
-		 * During bootstrap, there are cases where a system relation will be
-		 * accessed (by internal backend processes) before the bootstrap
-		 * script nominally creates it.  Therefore, allow the file to exist
-		 * already, even if isRedo is not set.  (See also mdopen)
-		 */
-		if (isRedo || IsBootstrapProcessingMode())
+		if (isRedo)
 			fd = PathNameOpenFile(path, O_RDWR | PG_BINARY);
 		if (fd < 0)
 		{
@@ -572,26 +566,15 @@ mdopen(SMgrRelation reln, ForkNumber forknum, int behavior)
 
 	if (fd < 0)
 	{
-		/*
-		 * During bootstrap, there are cases where a system relation will be
-		 * accessed (by internal backend processes) before the bootstrap
-		 * script nominally creates it.  Therefore, accept mdopen() as a
-		 * substitute for mdcreate() in bootstrap mode only. (See mdcreate)
-		 */
-		if (IsBootstrapProcessingMode())
-			fd = PathNameOpenFile(path, O_RDWR | O_CREAT | O_EXCL | PG_BINARY);
-		if (fd < 0)
+		if ((behavior & EXTENSION_RETURN_NULL) &&
+			FILE_POSSIBLY_DELETED(errno))
 		{
-			if ((behavior & EXTENSION_RETURN_NULL) &&
-				FILE_POSSIBLY_DELETED(errno))
-			{
-				pfree(path);
-				return NULL;
-			}
-			ereport(ERROR,
-					(errcode_for_file_access(),
-					 errmsg("could not open file \"%s\": %m", path)));
+			pfree(path);
+			return NULL;
 		}
+		ereport(ERROR,
+				(errcode_for_file_access(),
+				 errmsg("could not open file \"%s\": %m", path)));
 	}
 
 	pfree(path);
-- 
1.8.3.1

v17-0002-Avoid-creation-of-the-free-space-map-for-small-heap-.patchapplication/octet-stream; name=v17-0002-Avoid-creation-of-the-free-space-map-for-small-heap-.patchDownload
From 7f800d07b8a4042f1db3c29a7ab10b42dce4fd34 Mon Sep 17 00:00:00 2001
From: Amit Kapila <akapila@postgresql.org>
Date: Wed, 23 Jan 2019 17:24:27 +0530
Subject: [PATCH 2/2] Avoid creation of the free space map for small heap
 relations.

Previously, all heaps had FSMs. For very small tables, this means that the
FSM took up more space than the heap did. This is wasteful, so now we
refrain from creating the FSM for heaps with 4 pages or fewer. If the last
known target block has insufficient space, we still try to insert into some
other page before giving up and extending the relation, since doing
otherwise leads to table bloat. Testing showed that trying every page
penalized performance slightly, so we compromise and try every other page.
This way, we visit at most two pages. Any pages with wasted free space
become visible at next relation extension, so we still control table bloat.
As a bonus, directly attempting one or two pages can even be faster than
consulting the FSM would have been.

Once the FSM is created for heap we don't remove it even if somebody
deletes all the rows from the corresponding relation.  We don't think it is a
useful optimization as it is quite likely that relation will again grow to the
same size.

Author: John Naylor with design inputs and some code contribution by Amit Kapila
Reviewed-by: Amit Kapila
Tested-by: Mithun C Y
Discussion: https://www.postgresql.org/message-id/CAJVSVGWvB13PzpbLEecFuGFc5V2fsO736BsdTakPiPAcdMM5tQ@mail.gmail.com
---
 contrib/pageinspect/expected/page.out     |  77 ++++-----
 contrib/pageinspect/sql/page.sql          |  33 ++--
 doc/src/sgml/storage.sgml                 |  13 +-
 src/backend/access/brin/brin.c            |   2 +-
 src/backend/access/brin/brin_pageops.c    |  10 +-
 src/backend/access/heap/hio.c             |  47 +++--
 src/backend/access/heap/vacuumlazy.c      |  17 +-
 src/backend/access/transam/xact.c         |  14 ++
 src/backend/storage/freespace/README      |  38 ++++-
 src/backend/storage/freespace/freespace.c | 275 +++++++++++++++++++++++++++++-
 src/backend/storage/freespace/indexfsm.c  |   6 +-
 src/include/storage/freespace.h           |   9 +-
 src/test/regress/expected/fsm.out         |  75 ++++++++
 src/test/regress/parallel_schedule        |   6 +
 src/test/regress/serial_schedule          |   1 +
 src/test/regress/sql/fsm.sql              |  55 ++++++
 16 files changed, 576 insertions(+), 102 deletions(-)
 create mode 100644 src/test/regress/expected/fsm.out
 create mode 100644 src/test/regress/sql/fsm.sql

diff --git a/contrib/pageinspect/expected/page.out b/contrib/pageinspect/expected/page.out
index 3fcd9fb..11d56f4 100644
--- a/contrib/pageinspect/expected/page.out
+++ b/contrib/pageinspect/expected/page.out
@@ -1,48 +1,69 @@
 CREATE EXTENSION pageinspect;
-CREATE TABLE test1 (a int, b int);
-INSERT INTO test1 VALUES (16777217, 131584);
-VACUUM test1;  -- set up FSM
+CREATE TABLE test_rel_forks (a int);
+-- Make sure there are enough blocks in the heap for the FSM to be created.
+INSERT INTO test_rel_forks SELECT i from generate_series(1,1000) i;
+-- set up FSM and VM
+VACUUM test_rel_forks;
 -- The page contents can vary, so just test that it can be read
 -- successfully, but don't keep the output.
-SELECT octet_length(get_raw_page('test1', 'main', 0)) AS main_0;
+SELECT octet_length(get_raw_page('test_rel_forks', 'main', 0)) AS main_0;
  main_0 
 --------
    8192
 (1 row)
 
-SELECT octet_length(get_raw_page('test1', 'main', 1)) AS main_1;
-ERROR:  block number 1 is out of range for relation "test1"
-SELECT octet_length(get_raw_page('test1', 'fsm', 0)) AS fsm_0;
+SELECT octet_length(get_raw_page('test_rel_forks', 'main', 100)) AS main_100;
+ERROR:  block number 100 is out of range for relation "test_rel_forks"
+SELECT octet_length(get_raw_page('test_rel_forks', 'fsm', 0)) AS fsm_0;
  fsm_0 
 -------
   8192
 (1 row)
 
-SELECT octet_length(get_raw_page('test1', 'fsm', 1)) AS fsm_1;
- fsm_1 
--------
-  8192
-(1 row)
-
-SELECT octet_length(get_raw_page('test1', 'vm', 0)) AS vm_0;
+SELECT octet_length(get_raw_page('test_rel_forks', 'fsm', 10)) AS fsm_10;
+ERROR:  block number 10 is out of range for relation "test_rel_forks"
+SELECT octet_length(get_raw_page('test_rel_forks', 'vm', 0)) AS vm_0;
  vm_0 
 ------
  8192
 (1 row)
 
-SELECT octet_length(get_raw_page('test1', 'vm', 1)) AS vm_1;
-ERROR:  block number 1 is out of range for relation "test1"
+SELECT octet_length(get_raw_page('test_rel_forks', 'vm', 1)) AS vm_1;
+ERROR:  block number 1 is out of range for relation "test_rel_forks"
 SELECT octet_length(get_raw_page('xxx', 'main', 0));
 ERROR:  relation "xxx" does not exist
-SELECT octet_length(get_raw_page('test1', 'xxx', 0));
+SELECT octet_length(get_raw_page('test_rel_forks', 'xxx', 0));
 ERROR:  invalid fork name
 HINT:  Valid fork names are "main", "fsm", "vm", and "init".
-SELECT get_raw_page('test1', 0) = get_raw_page('test1', 'main', 0);
+SELECT * FROM fsm_page_contents(get_raw_page('test_rel_forks', 'fsm', 0));
+ fsm_page_contents 
+-------------------
+ 0: 147           +
+ 1: 147           +
+ 3: 147           +
+ 7: 147           +
+ 15: 147          +
+ 31: 147          +
+ 63: 147          +
+ 127: 147         +
+ 255: 147         +
+ 511: 147         +
+ 1023: 147        +
+ 2047: 147        +
+ 4095: 147        +
+ fp_next_slot: 0  +
+ 
+(1 row)
+
+SELECT get_raw_page('test_rel_forks', 0) = get_raw_page('test_rel_forks', 'main', 0);
  ?column? 
 ----------
  t
 (1 row)
 
+DROP TABLE test_rel_forks;
+CREATE TABLE test1 (a int, b int);
+INSERT INTO test1 VALUES (16777217, 131584);
 SELECT pagesize, version FROM page_header(get_raw_page('test1', 0));
  pagesize | version 
 ----------+---------
@@ -62,26 +83,6 @@ SELECT tuple_data_split('test1'::regclass, t_data, t_infomask, t_infomask2, t_bi
  {"\\x01000001","\\x00020200"}
 (1 row)
 
-SELECT * FROM fsm_page_contents(get_raw_page('test1', 'fsm', 0));
- fsm_page_contents 
--------------------
- 0: 254           +
- 1: 254           +
- 3: 254           +
- 7: 254           +
- 15: 254          +
- 31: 254          +
- 63: 254          +
- 127: 254         +
- 255: 254         +
- 511: 254         +
- 1023: 254        +
- 2047: 254        +
- 4095: 254        +
- fp_next_slot: 0  +
- 
-(1 row)
-
 DROP TABLE test1;
 -- check that using any of these functions with a partitioned table or index
 -- would fail
diff --git a/contrib/pageinspect/sql/page.sql b/contrib/pageinspect/sql/page.sql
index 8ac9991..0ff1f1a 100644
--- a/contrib/pageinspect/sql/page.sql
+++ b/contrib/pageinspect/sql/page.sql
@@ -1,26 +1,35 @@
 CREATE EXTENSION pageinspect;
 
-CREATE TABLE test1 (a int, b int);
-INSERT INTO test1 VALUES (16777217, 131584);
+CREATE TABLE test_rel_forks (a int);
+-- Make sure there are enough blocks in the heap for the FSM to be created.
+INSERT INTO test_rel_forks SELECT i from generate_series(1,1000) i;
 
-VACUUM test1;  -- set up FSM
+-- set up FSM and VM
+VACUUM test_rel_forks;
 
 -- The page contents can vary, so just test that it can be read
 -- successfully, but don't keep the output.
 
-SELECT octet_length(get_raw_page('test1', 'main', 0)) AS main_0;
-SELECT octet_length(get_raw_page('test1', 'main', 1)) AS main_1;
+SELECT octet_length(get_raw_page('test_rel_forks', 'main', 0)) AS main_0;
+SELECT octet_length(get_raw_page('test_rel_forks', 'main', 100)) AS main_100;
 
-SELECT octet_length(get_raw_page('test1', 'fsm', 0)) AS fsm_0;
-SELECT octet_length(get_raw_page('test1', 'fsm', 1)) AS fsm_1;
+SELECT octet_length(get_raw_page('test_rel_forks', 'fsm', 0)) AS fsm_0;
+SELECT octet_length(get_raw_page('test_rel_forks', 'fsm', 10)) AS fsm_10;
 
-SELECT octet_length(get_raw_page('test1', 'vm', 0)) AS vm_0;
-SELECT octet_length(get_raw_page('test1', 'vm', 1)) AS vm_1;
+SELECT octet_length(get_raw_page('test_rel_forks', 'vm', 0)) AS vm_0;
+SELECT octet_length(get_raw_page('test_rel_forks', 'vm', 1)) AS vm_1;
 
 SELECT octet_length(get_raw_page('xxx', 'main', 0));
-SELECT octet_length(get_raw_page('test1', 'xxx', 0));
+SELECT octet_length(get_raw_page('test_rel_forks', 'xxx', 0));
+
+SELECT * FROM fsm_page_contents(get_raw_page('test_rel_forks', 'fsm', 0));
+
+SELECT get_raw_page('test_rel_forks', 0) = get_raw_page('test_rel_forks', 'main', 0);
 
-SELECT get_raw_page('test1', 0) = get_raw_page('test1', 'main', 0);
+DROP TABLE test_rel_forks;
+
+CREATE TABLE test1 (a int, b int);
+INSERT INTO test1 VALUES (16777217, 131584);
 
 SELECT pagesize, version FROM page_header(get_raw_page('test1', 0));
 
@@ -29,8 +38,6 @@ SELECT page_checksum(get_raw_page('test1', 0), 0) IS NOT NULL AS silly_checksum_
 SELECT tuple_data_split('test1'::regclass, t_data, t_infomask, t_infomask2, t_bits)
     FROM heap_page_items(get_raw_page('test1', 0));
 
-SELECT * FROM fsm_page_contents(get_raw_page('test1', 'fsm', 0));
-
 DROP TABLE test1;
 
 -- check that using any of these functions with a partitioned table or index
diff --git a/doc/src/sgml/storage.sgml b/doc/src/sgml/storage.sgml
index 8ef2ac8..cbdad0c 100644
--- a/doc/src/sgml/storage.sgml
+++ b/doc/src/sgml/storage.sgml
@@ -590,12 +590,13 @@ tuple would otherwise be too big.
 <indexterm><primary>FSM</primary><see>Free Space Map</see></indexterm>
 
 <para>
-Each heap and index relation, except for hash indexes, has a Free Space Map
-(FSM) to keep track of available space in the relation. It's stored
-alongside the main relation data in a separate relation fork, named after the
-filenode number of the relation, plus a <literal>_fsm</literal> suffix. For example,
-if the filenode of a relation is 12345, the FSM is stored in a file called
-<filename>12345_fsm</filename>, in the same directory as the main relation file.
+Each heap relation, unless it is very small, and each index relation, except
+for hash indexes, has a Free Space Map (FSM) to keep track of available
+space in the relation. It's stored alongside the main relation data in a
+separate relation fork, named after the filenode number of the relation, plus
+a <literal>_fsm</literal> suffix. For example, if the filenode of a relation
+is 12345, the FSM is stored in a file called <filename>12345_fsm</filename>,
+in the same directory as the main relation file.
 </para>
 
 <para>
diff --git a/src/backend/access/brin/brin.c b/src/backend/access/brin/brin.c
index 467d91e..8f008dd 100644
--- a/src/backend/access/brin/brin.c
+++ b/src/backend/access/brin/brin.c
@@ -1150,7 +1150,7 @@ terminate_brin_buildstate(BrinBuildState *state)
 		freespace = PageGetFreeSpace(page);
 		blk = BufferGetBlockNumber(state->bs_currentInsertBuf);
 		ReleaseBuffer(state->bs_currentInsertBuf);
-		RecordPageWithFreeSpace(state->bs_irel, blk, freespace);
+		RecordPageWithFreeSpace(state->bs_irel, blk, freespace, InvalidBlockNumber);
 		FreeSpaceMapVacuumRange(state->bs_irel, blk, blk + 1);
 	}
 
diff --git a/src/backend/access/brin/brin_pageops.c b/src/backend/access/brin/brin_pageops.c
index 164a468..2eb354f 100644
--- a/src/backend/access/brin/brin_pageops.c
+++ b/src/backend/access/brin/brin_pageops.c
@@ -310,7 +310,7 @@ brin_doupdate(Relation idxrel, BlockNumber pagesPerRange,
 
 		if (extended)
 		{
-			RecordPageWithFreeSpace(idxrel, newblk, freespace);
+			RecordPageWithFreeSpace(idxrel, newblk, freespace, InvalidBlockNumber);
 			FreeSpaceMapVacuumRange(idxrel, newblk, newblk + 1);
 		}
 
@@ -461,7 +461,7 @@ brin_doinsert(Relation idxrel, BlockNumber pagesPerRange,
 
 	if (extended)
 	{
-		RecordPageWithFreeSpace(idxrel, blk, freespace);
+		RecordPageWithFreeSpace(idxrel, blk, freespace, InvalidBlockNumber);
 		FreeSpaceMapVacuumRange(idxrel, blk, blk + 1);
 	}
 
@@ -654,7 +654,7 @@ brin_page_cleanup(Relation idxrel, Buffer buf)
 
 	/* Measure free space and record it */
 	RecordPageWithFreeSpace(idxrel, BufferGetBlockNumber(buf),
-							br_page_get_freespace(page));
+							br_page_get_freespace(page), InvalidBlockNumber);
 }
 
 /*
@@ -703,7 +703,7 @@ brin_getinsertbuffer(Relation irel, Buffer oldbuf, Size itemsz,
 	/* Choose initial target page, re-using existing target if known */
 	newblk = RelationGetTargetBlock(irel);
 	if (newblk == InvalidBlockNumber)
-		newblk = GetPageWithFreeSpace(irel, itemsz);
+		newblk = GetPageWithFreeSpace(irel, itemsz, true);
 
 	/*
 	 * Loop until we find a page with sufficient free space.  By the time we
@@ -895,7 +895,7 @@ brin_initialize_empty_new_buffer(Relation idxrel, Buffer buffer)
 	 * pages whose FSM records were forgotten in a crash.
 	 */
 	RecordPageWithFreeSpace(idxrel, BufferGetBlockNumber(buffer),
-							br_page_get_freespace(page));
+							br_page_get_freespace(page), InvalidBlockNumber);
 }
 
 
diff --git a/src/backend/access/heap/hio.c b/src/backend/access/heap/hio.c
index 3da0b49..f370352 100644
--- a/src/backend/access/heap/hio.c
+++ b/src/backend/access/heap/hio.c
@@ -239,8 +239,14 @@ RelationAddExtraBlocks(Relation relation, BulkInsertState bistate)
 		 * Immediately update the bottom level of the FSM.  This has a good
 		 * chance of making this page visible to other concurrently inserting
 		 * backends, and we want that to happen without delay.
+		 *
+		 * Since we know the table will end up with extraBlocks additional
+		 * pages, we pass the final number to avoid possible unnecessary
+		 * system calls and to make sure the FSM is created when we add
+		 * the first new page.
 		 */
-		RecordPageWithFreeSpace(relation, blockNum, freespace);
+		RecordPageWithFreeSpace(relation, blockNum, freespace,
+								firstBlock + extraBlocks);
 	}
 	while (--extraBlocks > 0);
 
@@ -377,20 +383,9 @@ RelationGetBufferForTuple(Relation relation, Size len,
 		 * We have no cached target page, so ask the FSM for an initial
 		 * target.
 		 */
-		targetBlock = GetPageWithFreeSpace(relation, len + saveFreeSpace);
-
-		/*
-		 * If the FSM knows nothing of the rel, try the last page before we
-		 * give up and extend.  This avoids one-tuple-per-page syndrome during
-		 * bootstrapping or in a recently-started system.
-		 */
-		if (targetBlock == InvalidBlockNumber)
-		{
-			BlockNumber nblocks = RelationGetNumberOfBlocks(relation);
-
-			if (nblocks > 0)
-				targetBlock = nblocks - 1;
-		}
+		targetBlock = GetPageWithFreeSpace(relation,
+										   len + saveFreeSpace,
+										   false);
 	}
 
 loop:
@@ -484,6 +479,14 @@ loop:
 		{
 			/* use this page as future insert target, too */
 			RelationSetTargetBlock(relation, targetBlock);
+
+			/*
+			 * In case we used an in-memory map of available blocks, reset
+			 * it for next use.
+			 */
+			if (targetBlock < HEAP_FSM_CREATION_THRESHOLD)
+				FSMClearLocalMap();
+
 			return buffer;
 		}
 
@@ -543,9 +546,12 @@ loop:
 
 			/*
 			 * Check if some other backend has extended a block for us while
-			 * we were waiting on the lock.
+			 * we were waiting on the lock.  We only check the FSM -- if there
+			 * isn't one we don't recheck the number of blocks.
 			 */
-			targetBlock = GetPageWithFreeSpace(relation, len + saveFreeSpace);
+			targetBlock = GetPageWithFreeSpace(relation,
+											   len + saveFreeSpace,
+											   true);
 
 			/*
 			 * If some other waiter has already extended the relation, we
@@ -625,5 +631,12 @@ loop:
 	 */
 	RelationSetTargetBlock(relation, BufferGetBlockNumber(buffer));
 
+	/*
+	 * In case we used an in-memory map of available blocks, reset
+	 * it for next use.  We do this unconditionally since after relation
+	 * extension we can't skip this based on the targetBlock.
+	 */
+	FSMClearLocalMap();
+
 	return buffer;
 }
diff --git a/src/backend/access/heap/vacuumlazy.c b/src/backend/access/heap/vacuumlazy.c
index 37aa484..9cfa65c 100644
--- a/src/backend/access/heap/vacuumlazy.c
+++ b/src/backend/access/heap/vacuumlazy.c
@@ -153,7 +153,7 @@ static BufferAccessStrategy vac_strategy;
 static void lazy_scan_heap(Relation onerel, int options,
 			   LVRelStats *vacrelstats, Relation *Irel, int nindexes,
 			   bool aggressive);
-static void lazy_vacuum_heap(Relation onerel, LVRelStats *vacrelstats);
+static void lazy_vacuum_heap(Relation onerel, LVRelStats *vacrelstats, BlockNumber nblocks);
 static bool lazy_check_needs_freeze(Buffer buf, bool *hastup);
 static void lazy_vacuum_index(Relation indrel,
 				  IndexBulkDeleteResult **stats,
@@ -758,7 +758,7 @@ lazy_scan_heap(Relation onerel, int options, LVRelStats *vacrelstats,
 			pgstat_progress_update_multi_param(2, hvp_index, hvp_val);
 
 			/* Remove tuples from heap */
-			lazy_vacuum_heap(onerel, vacrelstats);
+			lazy_vacuum_heap(onerel, vacrelstats, nblocks);
 
 			/*
 			 * Forget the now-vacuumed tuples, and press on, but be careful
@@ -896,7 +896,7 @@ lazy_scan_heap(Relation onerel, int options, LVRelStats *vacrelstats,
 			MarkBufferDirty(buf);
 			UnlockReleaseBuffer(buf);
 
-			RecordPageWithFreeSpace(onerel, blkno, freespace);
+			RecordPageWithFreeSpace(onerel, blkno, freespace, nblocks);
 			continue;
 		}
 
@@ -935,7 +935,7 @@ lazy_scan_heap(Relation onerel, int options, LVRelStats *vacrelstats,
 			}
 
 			UnlockReleaseBuffer(buf);
-			RecordPageWithFreeSpace(onerel, blkno, freespace);
+			RecordPageWithFreeSpace(onerel, blkno, freespace, nblocks);
 			continue;
 		}
 
@@ -1332,7 +1332,7 @@ lazy_scan_heap(Relation onerel, int options, LVRelStats *vacrelstats,
 		 * taken if there are no indexes.)
 		 */
 		if (vacrelstats->num_dead_tuples == prev_dead_count)
-			RecordPageWithFreeSpace(onerel, blkno, freespace);
+			RecordPageWithFreeSpace(onerel, blkno, freespace, nblocks);
 	}
 
 	/* report that everything is scanned and vacuumed */
@@ -1394,7 +1394,7 @@ lazy_scan_heap(Relation onerel, int options, LVRelStats *vacrelstats,
 		/* Remove tuples from heap */
 		pgstat_progress_update_param(PROGRESS_VACUUM_PHASE,
 									 PROGRESS_VACUUM_PHASE_VACUUM_HEAP);
-		lazy_vacuum_heap(onerel, vacrelstats);
+		lazy_vacuum_heap(onerel, vacrelstats, nblocks);
 		vacrelstats->num_index_scans++;
 	}
 
@@ -1465,9 +1465,10 @@ lazy_scan_heap(Relation onerel, int options, LVRelStats *vacrelstats,
  * Note: the reason for doing this as a second pass is we cannot remove
  * the tuples until we've removed their index entries, and we want to
  * process index entry removal in batches as large as possible.
+ * Note: nblocks is passed as an optimization for RecordPageWithFreeSpace().
  */
 static void
-lazy_vacuum_heap(Relation onerel, LVRelStats *vacrelstats)
+lazy_vacuum_heap(Relation onerel, LVRelStats *vacrelstats, BlockNumber nblocks)
 {
 	int			tupindex;
 	int			npages;
@@ -1504,7 +1505,7 @@ lazy_vacuum_heap(Relation onerel, LVRelStats *vacrelstats)
 		freespace = PageGetHeapFreeSpace(page);
 
 		UnlockReleaseBuffer(buf);
-		RecordPageWithFreeSpace(onerel, tblk, freespace);
+		RecordPageWithFreeSpace(onerel, tblk, freespace, nblocks);
 		npages++;
 	}
 
diff --git a/src/backend/access/transam/xact.c b/src/backend/access/transam/xact.c
index 7c3a9c1..f453ee9 100644
--- a/src/backend/access/transam/xact.c
+++ b/src/backend/access/transam/xact.c
@@ -48,6 +48,7 @@
 #include "replication/walsender.h"
 #include "storage/condition_variable.h"
 #include "storage/fd.h"
+#include "storage/freespace.h"
 #include "storage/lmgr.h"
 #include "storage/predicate.h"
 #include "storage/proc.h"
@@ -2500,6 +2501,12 @@ AbortTransaction(void)
 	pgstat_report_wait_end();
 	pgstat_progress_end_command();
 
+	/*
+	 * In case we aborted during RelationGetBufferForTuple(),
+	 * clear the local map of heap pages.
+	 */
+	FSMClearLocalMap();
+
 	/* Clean up buffer I/O and buffer context locks, too */
 	AbortBufferIO();
 	UnlockBuffers();
@@ -4721,6 +4728,13 @@ AbortSubTransaction(void)
 
 	pgstat_report_wait_end();
 	pgstat_progress_end_command();
+
+	/*
+	 * In case we aborted during RelationGetBufferForTuple(),
+	 * clear the local map of heap pages.
+	 */
+	FSMClearLocalMap();
+
 	AbortBufferIO();
 	UnlockBuffers();
 
diff --git a/src/backend/storage/freespace/README b/src/backend/storage/freespace/README
index e7ff23b..5b96181 100644
--- a/src/backend/storage/freespace/README
+++ b/src/backend/storage/freespace/README
@@ -8,7 +8,41 @@ free space to hold a tuple to be stored; or to determine that no such page
 exists and the relation must be extended by one page.  As of PostgreSQL 8.4
 each relation has its own, extensible free space map stored in a separate
 "fork" of its relation.  This eliminates the disadvantages of the former
-fixed-size FSM.
+fixed-size FSM.  There are two exceptions:
+
+1. Hash indexes never have a FSM.
+2. For very small tables, a 3-page relation fork would be relatively large
+and wasteful, so to save space we refrain from creating the FSM if the
+heap has HEAP_FSM_CREATION_THRESHOLD pages or fewer.
+
+To locate free space in the latter case, we simply try pages directly without
+knowing ahead of time how much free space they have.  To maintain good
+performance, we create a local in-memory map of pages to try, and only mark
+every other page as available.  For example, in a 3-page heap, the local map
+would look like:
+
+ANAN
+0123
+
+Pages 0 and 2 are marked "available", and page 1 as "not available".
+Page 3 is beyond the end of the relation, so is likewise marked "not
+available".  First we try page 2, and if that doesn't have sufficient free
+space we try page 0 before giving up and extending the relation.  There may
+be some wasted free space on block 1, but if the relation extends to 4 pages:
+
+NANA
+0123
+
+We not only have the new page 3 at our disposal, we can now check page 1
+for free space as well.
+
+Once the FSM is created for heap we don't remove it even if somebody deletes
+all the rows from the corresponding relation.  We don't think it is a useful
+optimization as it is quite likely that relation will again grow to the same
+size.
+
+FSM data structure
+------------------
 
 It is important to keep the map small so that it can be searched rapidly.
 Therefore, we don't attempt to record the exact free space on a page.
@@ -192,5 +226,3 @@ TODO
 ----
 
 - fastroot to avoid traversing upper nodes with just 1 child
-- use a different system for tables that fit into one FSM page, with a
-  mechanism to switch to the real thing as it grows.
diff --git a/src/backend/storage/freespace/freespace.c b/src/backend/storage/freespace/freespace.c
index eee8286..5f46391 100644
--- a/src/backend/storage/freespace/freespace.c
+++ b/src/backend/storage/freespace/freespace.c
@@ -76,6 +76,14 @@
 #define FSM_ROOT_LEVEL	(FSM_TREE_DEPTH - 1)
 #define FSM_BOTTOM_LEVEL 0
 
+/* Status codes for the local map. */
+
+/* Either already tried, or beyond the end of the relation */
+#define FSM_LOCAL_NOT_AVAIL 0x00
+
+/* Available to try */
+#define FSM_LOCAL_AVAIL		0x01
+
 /*
  * The internal FSM routines work on a logical addressing scheme. Each
  * level of the tree can be thought of as a separately addressable file.
@@ -89,6 +97,17 @@ typedef struct
 /* Address of the root page. */
 static const FSMAddress FSM_ROOT_ADDRESS = {FSM_ROOT_LEVEL, 0};
 
+/* Local map of block numbers for small heaps with no FSM. */
+typedef struct
+{
+	BlockNumber nblocks;
+	uint8		map[HEAP_FSM_CREATION_THRESHOLD];
+} FSMLocalMap;
+
+static FSMLocalMap fsm_local_map = {0, {FSM_LOCAL_NOT_AVAIL}};
+
+#define FSM_LOCAL_MAP_EXISTS (fsm_local_map.nblocks > 0)
+
 /* functions to navigate the tree */
 static FSMAddress fsm_get_child(FSMAddress parent, uint16 slot);
 static FSMAddress fsm_get_parent(FSMAddress child, uint16 *slot);
@@ -107,10 +126,14 @@ static Size fsm_space_cat_to_avail(uint8 cat);
 /* workhorse functions for various operations */
 static int fsm_set_and_search(Relation rel, FSMAddress addr, uint16 slot,
 				   uint8 newValue, uint8 minValue);
+static void fsm_local_set(Relation rel, BlockNumber cur_nblocks);
 static BlockNumber fsm_search(Relation rel, uint8 min_cat);
+static BlockNumber fsm_local_search(void);
 static uint8 fsm_vacuum_page(Relation rel, FSMAddress addr,
 				BlockNumber start, BlockNumber end,
 				bool *eof);
+static bool fsm_allow_writes(Relation rel, BlockNumber heapblk,
+				BlockNumber nblocks, BlockNumber *get_nblocks);
 
 
 /******** Public API ********/
@@ -127,13 +150,46 @@ static uint8 fsm_vacuum_page(Relation rel, FSMAddress addr,
  * amount of free space available on that page and then try again (see
  * RecordAndGetPageWithFreeSpace).  If InvalidBlockNumber is returned,
  * extend the relation.
+ *
+ * For very small heap relations that don't have a FSM, we try every other
+ * page before extending the relation.  To keep track of which pages have
+ * been tried, initialize a local in-memory map of pages.
  */
 BlockNumber
-GetPageWithFreeSpace(Relation rel, Size spaceNeeded)
+GetPageWithFreeSpace(Relation rel, Size spaceNeeded, bool check_fsm_only)
 {
 	uint8		min_cat = fsm_space_needed_to_cat(spaceNeeded);
+	BlockNumber target_block,
+				nblocks;
+
+	/* First try the FSM, if it exists. */
+	target_block = fsm_search(rel, min_cat);
+
+	if (target_block == InvalidBlockNumber &&
+		(rel->rd_rel->relkind == RELKIND_RELATION ||
+		 rel->rd_rel->relkind == RELKIND_TOASTVALUE) &&
+		!check_fsm_only)
+	{
+		nblocks = RelationGetNumberOfBlocks(rel);
+
+		if (nblocks > HEAP_FSM_CREATION_THRESHOLD)
+		{
+			/*
+			 * If the FSM knows nothing of the rel, try the last page before
+			 * we give up and extend.  This avoids one-tuple-per-page syndrome
+			 * during bootstrapping or in a recently-started system.
+			 */
+			target_block = nblocks - 1;
+		}
+		else if (nblocks > 0)
+		{
+			/* Create or update local map and get first candidate block. */
+			fsm_local_set(rel, nblocks);
+			target_block = fsm_local_search();
+		}
+	}
 
-	return fsm_search(rel, min_cat);
+	return target_block;
 }
 
 /*
@@ -144,16 +200,47 @@ GetPageWithFreeSpace(Relation rel, Size spaceNeeded)
  * also some effort to return a page close to the old page; if there's a
  * page with enough free space on the same FSM page where the old one page
  * is located, it is preferred.
+ *
+ * For very small heap relations that don't have a FSM, we update the local
+ * map to indicate we have tried a page, and return the next page to try.
  */
 BlockNumber
 RecordAndGetPageWithFreeSpace(Relation rel, BlockNumber oldPage,
 							  Size oldSpaceAvail, Size spaceNeeded)
 {
-	int			old_cat = fsm_space_avail_to_cat(oldSpaceAvail);
-	int			search_cat = fsm_space_needed_to_cat(spaceNeeded);
+	int			old_cat;
+	int			search_cat;
 	FSMAddress	addr;
 	uint16		slot;
 	int			search_slot;
+	BlockNumber nblocks = InvalidBlockNumber;
+
+	/* First try the local map, if it exists. */
+	if (FSM_LOCAL_MAP_EXISTS)
+	{
+		Assert((rel->rd_rel->relkind == RELKIND_RELATION ||
+				rel->rd_rel->relkind == RELKIND_TOASTVALUE) &&
+			   fsm_local_map.map[oldPage] == FSM_LOCAL_AVAIL);
+
+		fsm_local_map.map[oldPage] = FSM_LOCAL_NOT_AVAIL;
+		return fsm_local_search();
+	}
+
+	if (!fsm_allow_writes(rel, oldPage, InvalidBlockNumber, &nblocks))
+	{
+		/*
+		 * If we have neither a local map nor a FSM, we probably just
+		 * tried the target block in the smgr relation entry and failed,
+		 * so we'll need to create the local map.
+		 */
+		fsm_local_set(rel, nblocks);
+		return fsm_local_search();
+	}
+
+	/* Normal FSM logic follows */
+
+	old_cat = fsm_space_avail_to_cat(oldSpaceAvail);
+	search_cat = fsm_space_needed_to_cat(spaceNeeded);
 
 	/* Get the location of the FSM byte representing the heap block */
 	addr = fsm_get_location(oldPage, &slot);
@@ -176,21 +263,42 @@ RecordAndGetPageWithFreeSpace(Relation rel, BlockNumber oldPage,
  * Note that if the new spaceAvail value is higher than the old value stored
  * in the FSM, the space might not become visible to searchers until the next
  * FreeSpaceMapVacuum call, which updates the upper level pages.
+ *
+ * Callers have no need for a local map.
  */
 void
-RecordPageWithFreeSpace(Relation rel, BlockNumber heapBlk, Size spaceAvail)
+RecordPageWithFreeSpace(Relation rel, BlockNumber heapBlk,
+						Size spaceAvail, BlockNumber nblocks)
 {
-	int			new_cat = fsm_space_avail_to_cat(spaceAvail);
+	int			new_cat;
 	FSMAddress	addr;
 	uint16		slot;
+	BlockNumber dummy;
+
+	if (!fsm_allow_writes(rel, heapBlk, nblocks, &dummy))
+		/* No FSM to update and no local map either */
+		return;
 
 	/* Get the location of the FSM byte representing the heap block */
 	addr = fsm_get_location(heapBlk, &slot);
 
+	new_cat = fsm_space_avail_to_cat(spaceAvail);
 	fsm_set_and_search(rel, addr, slot, new_cat, 0);
 }
 
 /*
+ * Clear the local map.  We must call this when we have found a block with
+ * enough free space, when we extend the relation, or on transaction abort.
+ */
+void
+FSMClearLocalMap(void)
+{
+	fsm_local_map.nblocks = 0;
+	memset(&fsm_local_map.map, FSM_LOCAL_NOT_AVAIL,
+		   sizeof(fsm_local_map.map));
+}
+
+/*
  * XLogRecordPageWithFreeSpace - like RecordPageWithFreeSpace, for use in
  *		WAL replay
  */
@@ -204,6 +312,30 @@ XLogRecordPageWithFreeSpace(RelFileNode rnode, BlockNumber heapBlk,
 	BlockNumber blkno;
 	Buffer		buf;
 	Page		page;
+	bool		write_to_fsm;
+
+	/* This is meant to mirror the logic in fsm_allow_writes() */
+	if (heapBlk >= HEAP_FSM_CREATION_THRESHOLD)
+		write_to_fsm = true;
+	else
+	{
+		/* Open the relation at smgr level */
+		SMgrRelation smgr = smgropen(rnode, InvalidBackendId);
+
+		if (smgrexists(smgr, FSM_FORKNUM))
+			write_to_fsm = true;
+		else
+		{
+			BlockNumber heap_nblocks = smgrnblocks(smgr, MAIN_FORKNUM);
+			if (heap_nblocks > HEAP_FSM_CREATION_THRESHOLD)
+				write_to_fsm = true;
+			else
+				write_to_fsm = false;
+		}
+	}
+
+	if (!write_to_fsm)
+		return;
 
 	/* Get the location of the FSM byte representing the heap block */
 	addr = fsm_get_location(heapBlk, &slot);
@@ -904,3 +1036,134 @@ fsm_vacuum_page(Relation rel, FSMAddress addr,
 
 	return max_avail;
 }
+
+/*
+ * For heaps, we prevent creation of the FSM unless the number of pages
+ * exceeds HEAP_FSM_CREATION_THRESHOLD.  For tables that don't already have
+ * a FSM, this will save an inode and a few kB of space.
+ *
+ * XXX The API is a little awkward -- if the caller passes a valid nblocks
+ * value, it can avoid invoking a system call.  If the caller passes
+ * InvalidBlockNumber and receives a false return value, it can get an
+ * up-to-date relation size from get_nblocks.  This saves a few cycles in
+ * the caller, which would otherwise need to get the relation size by itself.
+ */
+static bool
+fsm_allow_writes(Relation rel, BlockNumber heapblk,
+				 BlockNumber nblocks, BlockNumber *get_nblocks)
+{
+	bool		skip_get_nblocks;
+
+	if (heapblk >= HEAP_FSM_CREATION_THRESHOLD)
+		return true;
+
+	/* Non-heap rels can always create a FSM. */
+	if (rel->rd_rel->relkind != RELKIND_RELATION &&
+		rel->rd_rel->relkind != RELKIND_TOASTVALUE)
+		return true;
+
+	/*
+	 * If the caller knows nblocks, we can avoid a system call later.
+	 * If it doesn't, maybe we have relpages from a previous VACUUM.
+	 * Since the table may have extended since then, we still have to
+	 * count the pages later if we can't return now.
+	 */
+	if (nblocks != InvalidBlockNumber)
+	{
+		if (nblocks > HEAP_FSM_CREATION_THRESHOLD)
+			return true;
+		else
+			skip_get_nblocks = true;
+	}
+	else
+	{
+		if (rel->rd_rel->relpages != InvalidBlockNumber &&
+			rel->rd_rel->relpages > HEAP_FSM_CREATION_THRESHOLD)
+			return true;
+		else
+			skip_get_nblocks = false;
+	}
+
+	RelationOpenSmgr(rel);
+	if (smgrexists(rel->rd_smgr, FSM_FORKNUM))
+		return true;
+
+	if (skip_get_nblocks)
+		return false;
+
+	/* last resort */
+	*get_nblocks = RelationGetNumberOfBlocks(rel);
+	if (*get_nblocks > HEAP_FSM_CREATION_THRESHOLD)
+		return true;
+	else
+		return false;
+}
+
+/*
+ * Initialize or update the local map of blocks to try, for when there is
+ * no FSM.
+ *
+ * When we initialize the map, the whole heap is potentially available to
+ * try.  Testing revealed that trying every block can cause a small
+ * performance dip compared to when we use a FSM, so we try every other
+ * block instead.
+ */
+static void
+fsm_local_set(Relation rel, BlockNumber cur_nblocks)
+{
+	BlockNumber blkno,
+				cached_target_block;
+
+	/* The local map must not be set already. */
+	Assert(!FSM_LOCAL_MAP_EXISTS);
+
+	/*
+	 * Starting at the current last block in the relation and working
+	 * backwards, mark alternating blocks as available.
+	 */
+	blkno = cur_nblocks - 1;
+	while (true)
+	{
+		fsm_local_map.map[blkno] = FSM_LOCAL_AVAIL;
+		if (blkno >= 2)
+			blkno -= 2;
+		else
+			break;
+	}
+
+	/* Cache the number of blocks. */
+	fsm_local_map.nblocks = cur_nblocks;
+
+	/* Set the status of the cached target block to 'unavailable'. */
+	cached_target_block = RelationGetTargetBlock(rel);
+	if (cached_target_block != InvalidBlockNumber &&
+		cached_target_block < cur_nblocks)
+		fsm_local_map.map[cached_target_block] = FSM_LOCAL_NOT_AVAIL;
+}
+
+/*
+ * Search the local map for an available block to try, in descending order.
+ * As such, there is no heuristic available to decide which order will be
+ * better to try, but the probability of having space in the last block in the
+ * map is higher because that is the most recent block added to the heap.
+ *
+ * This function is used when there is no FSM.
+ */
+static BlockNumber
+fsm_local_search(void)
+{
+	BlockNumber		target_block;
+
+	/* Local map must be set by now. */
+	Assert(FSM_LOCAL_MAP_EXISTS);
+
+	target_block = fsm_local_map.nblocks;
+	do
+	{
+		target_block--;
+		if (fsm_local_map.map[target_block] == FSM_LOCAL_AVAIL)
+			return target_block;
+	} while (target_block > 0);
+
+	return InvalidBlockNumber;
+}
diff --git a/src/backend/storage/freespace/indexfsm.c b/src/backend/storage/freespace/indexfsm.c
index 58cedea..9d8f43d 100644
--- a/src/backend/storage/freespace/indexfsm.c
+++ b/src/backend/storage/freespace/indexfsm.c
@@ -37,7 +37,7 @@
 BlockNumber
 GetFreeIndexPage(Relation rel)
 {
-	BlockNumber blkno = GetPageWithFreeSpace(rel, BLCKSZ / 2);
+	BlockNumber blkno = GetPageWithFreeSpace(rel, BLCKSZ / 2, true);
 
 	if (blkno != InvalidBlockNumber)
 		RecordUsedIndexPage(rel, blkno);
@@ -51,7 +51,7 @@ GetFreeIndexPage(Relation rel)
 void
 RecordFreeIndexPage(Relation rel, BlockNumber freeBlock)
 {
-	RecordPageWithFreeSpace(rel, freeBlock, BLCKSZ - 1);
+	RecordPageWithFreeSpace(rel, freeBlock, BLCKSZ - 1, InvalidBlockNumber);
 }
 
 
@@ -61,7 +61,7 @@ RecordFreeIndexPage(Relation rel, BlockNumber freeBlock)
 void
 RecordUsedIndexPage(Relation rel, BlockNumber usedBlock)
 {
-	RecordPageWithFreeSpace(rel, usedBlock, 0);
+	RecordPageWithFreeSpace(rel, usedBlock, 0, InvalidBlockNumber);
 }
 
 /*
diff --git a/src/include/storage/freespace.h b/src/include/storage/freespace.h
index 8b00033..b077c2c 100644
--- a/src/include/storage/freespace.h
+++ b/src/include/storage/freespace.h
@@ -18,15 +18,20 @@
 #include "storage/relfilenode.h"
 #include "utils/relcache.h"
 
+/* Only create the FSM if the heap has greater than this many blocks */
+#define HEAP_FSM_CREATION_THRESHOLD 4
+
 /* prototypes for public functions in freespace.c */
 extern Size GetRecordedFreeSpace(Relation rel, BlockNumber heapBlk);
-extern BlockNumber GetPageWithFreeSpace(Relation rel, Size spaceNeeded);
+extern BlockNumber GetPageWithFreeSpace(Relation rel, Size spaceNeeded,
+							bool check_fsm_only);
 extern BlockNumber RecordAndGetPageWithFreeSpace(Relation rel,
 							  BlockNumber oldPage,
 							  Size oldSpaceAvail,
 							  Size spaceNeeded);
 extern void RecordPageWithFreeSpace(Relation rel, BlockNumber heapBlk,
-						Size spaceAvail);
+						Size spaceAvail, BlockNumber nblocks);
+extern void FSMClearLocalMap(void);
 extern void XLogRecordPageWithFreeSpace(RelFileNode rnode, BlockNumber heapBlk,
 							Size spaceAvail);
 
diff --git a/src/test/regress/expected/fsm.out b/src/test/regress/expected/fsm.out
new file mode 100644
index 0000000..df6b15b
--- /dev/null
+++ b/src/test/regress/expected/fsm.out
@@ -0,0 +1,75 @@
+--
+-- Free Space Map test
+--
+CREATE TABLE fsm_check_size (num int, str text);
+-- Fill 3 blocks with as many large records as will fit
+-- No FSM
+INSERT INTO fsm_check_size SELECT i, rpad('', 1024, 'a')
+FROM generate_series(1,7*3) i;
+VACUUM fsm_check_size;
+SELECT pg_relation_size('fsm_check_size', 'main') AS heap_size,
+pg_relation_size('fsm_check_size', 'fsm') AS fsm_size;
+ heap_size | fsm_size 
+-----------+----------
+     24576 |        0
+(1 row)
+
+-- Clear some space on block 0
+DELETE FROM fsm_check_size WHERE num <= 5;
+VACUUM fsm_check_size;
+-- Insert small record in block 2 to set the cached smgr targetBlock
+INSERT INTO fsm_check_size VALUES(99, 'b');
+-- Insert large record and make sure it goes in block 0 rather than
+-- causing the relation to extend
+INSERT INTO fsm_check_size VALUES (101, rpad('', 1024, 'a'));
+SELECT pg_relation_size('fsm_check_size', 'main') AS heap_size,
+pg_relation_size('fsm_check_size', 'fsm') AS fsm_size;
+ heap_size | fsm_size 
+-----------+----------
+     24576 |        0
+(1 row)
+
+-- Extend table with enough blocks to exceed the FSM threshold
+-- FSM is created and extended to 3 blocks
+INSERT INTO fsm_check_size SELECT i, 'c' FROM generate_series(200,1200) i;
+VACUUM fsm_check_size;
+SELECT pg_relation_size('fsm_check_size', 'fsm') AS fsm_size;
+ fsm_size 
+----------
+    24576
+(1 row)
+
+-- Truncate heap to 1 block
+-- No change in FSM
+DELETE FROM fsm_check_size WHERE num > 7;
+VACUUM fsm_check_size;
+SELECT pg_relation_size('fsm_check_size', 'fsm') AS fsm_size;
+ fsm_size 
+----------
+    24576
+(1 row)
+
+-- Truncate heap to 0 blocks
+-- FSM now truncated to 2 blocks
+DELETE FROM fsm_check_size;
+VACUUM fsm_check_size;
+SELECT pg_relation_size('fsm_check_size', 'fsm') AS fsm_size;
+ fsm_size 
+----------
+    16384
+(1 row)
+
+-- Add long random string to extend TOAST table to 1 block
+INSERT INTO fsm_check_size
+VALUES(0, (SELECT string_agg(md5(chr(i)), '')
+		   FROM generate_series(1,100) i));
+VACUUM fsm_check_size;
+SELECT pg_relation_size(reltoastrelid, 'main') AS toast_size,
+pg_relation_size(reltoastrelid, 'fsm') AS toast_fsm_size
+FROM pg_class WHERE relname = 'fsm_check_size';
+ toast_size | toast_fsm_size 
+------------+----------------
+       8192 |              0
+(1 row)
+
+DROP TABLE fsm_check_size;
diff --git a/src/test/regress/parallel_schedule b/src/test/regress/parallel_schedule
index cc0bbf5..4051a4a 100644
--- a/src/test/regress/parallel_schedule
+++ b/src/test/regress/parallel_schedule
@@ -69,6 +69,12 @@ test: create_aggregate create_function_3 create_cast constraints triggers inheri
 test: sanity_check
 
 # ----------
+# fsm does a delete followed by vacuum, and running it in parallel can prevent
+# removal of rows.
+# ----------
+test: fsm
+
+# ----------
 # Believe it or not, select creates a table, subsequent
 # tests need.
 # ----------
diff --git a/src/test/regress/serial_schedule b/src/test/regress/serial_schedule
index 0c10c71..ac1ea62 100644
--- a/src/test/regress/serial_schedule
+++ b/src/test/regress/serial_schedule
@@ -80,6 +80,7 @@ test: roleattributes
 test: create_am
 test: hash_func
 test: sanity_check
+test: fsm
 test: errors
 test: select
 test: select_into
diff --git a/src/test/regress/sql/fsm.sql b/src/test/regress/sql/fsm.sql
new file mode 100644
index 0000000..07f5055
--- /dev/null
+++ b/src/test/regress/sql/fsm.sql
@@ -0,0 +1,55 @@
+--
+-- Free Space Map test
+--
+
+CREATE TABLE fsm_check_size (num int, str text);
+
+-- Fill 3 blocks with as many large records as will fit
+-- No FSM
+INSERT INTO fsm_check_size SELECT i, rpad('', 1024, 'a')
+FROM generate_series(1,7*3) i;
+VACUUM fsm_check_size;
+SELECT pg_relation_size('fsm_check_size', 'main') AS heap_size,
+pg_relation_size('fsm_check_size', 'fsm') AS fsm_size;
+
+-- Clear some space on block 0
+DELETE FROM fsm_check_size WHERE num <= 5;
+VACUUM fsm_check_size;
+
+-- Insert small record in block 2 to set the cached smgr targetBlock
+INSERT INTO fsm_check_size VALUES(99, 'b');
+
+-- Insert large record and make sure it goes in block 0 rather than
+-- causing the relation to extend
+INSERT INTO fsm_check_size VALUES (101, rpad('', 1024, 'a'));
+SELECT pg_relation_size('fsm_check_size', 'main') AS heap_size,
+pg_relation_size('fsm_check_size', 'fsm') AS fsm_size;
+
+-- Extend table with enough blocks to exceed the FSM threshold
+-- FSM is created and extended to 3 blocks
+INSERT INTO fsm_check_size SELECT i, 'c' FROM generate_series(200,1200) i;
+VACUUM fsm_check_size;
+SELECT pg_relation_size('fsm_check_size', 'fsm') AS fsm_size;
+
+-- Truncate heap to 1 block
+-- No change in FSM
+DELETE FROM fsm_check_size WHERE num > 7;
+VACUUM fsm_check_size;
+SELECT pg_relation_size('fsm_check_size', 'fsm') AS fsm_size;
+
+-- Truncate heap to 0 blocks
+-- FSM now truncated to 2 blocks
+DELETE FROM fsm_check_size;
+VACUUM fsm_check_size;
+SELECT pg_relation_size('fsm_check_size', 'fsm') AS fsm_size;
+
+-- Add long random string to extend TOAST table to 1 block
+INSERT INTO fsm_check_size
+VALUES(0, (SELECT string_agg(md5(chr(i)), '')
+		   FROM generate_series(1,100) i));
+VACUUM fsm_check_size;
+SELECT pg_relation_size(reltoastrelid, 'main') AS toast_size,
+pg_relation_size(reltoastrelid, 'fsm') AS toast_fsm_size
+FROM pg_class WHERE relname = 'fsm_check_size';
+
+DROP TABLE fsm_check_size;
-- 
1.8.3.1

#86John Naylor
john.naylor@2ndquadrant.com
In reply to: Amit Kapila (#85)
Re: WIP: Avoid creation of the free space map for small tables

On Wed, Jan 23, 2019 at 7:09 AM Amit Kapila <amit.kapila16@gmail.com> wrote:

I think the first two patches (a) removal of dead code in bootstrap
and (b) the core patch to avoid creation of FSM file for the small
table are good now. I have prepared the patches along with commit
message. There is no change except for some changes in README and
commit message of the second patch. Kindly let me know what you think
about them?

Good to hear! The additional language is fine. In "Once the FSM is
created for heap", I would just change that to "...for a heap".

I think these two patches can go even without the upgrade patch
(during pg_upgrade, conditionally skip transfer of FSMs.) which is
still under discussion. However, I am not in a hurry if you or other
thinks that upgrade patch must be committed along with the second
patch. I think the upgrade patch is generally going on track but
might need some more review.

The pg_upgrade piece is a nice-to-have feature and not essential, so
can go in later. Additional review is also welcome.

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

#87John Naylor
john.naylor@2ndquadrant.com
In reply to: Amit Kapila (#83)
Re: WIP: Avoid creation of the free space map for small tables

On Mon, Jan 21, 2019 at 6:32 AM Amit Kapila <amit.kapila16@gmail.com> wrote:

Also, another case to think in this regard is the upgrade for standby
servers, if you read below paragraph from the user manual [1], you
will see what I am worried about?

"What this does is to record the links created by pg_upgrade's link
mode that connect files in the old and new clusters on the primary
server. It then finds matching files in the standby's old cluster and
creates links for them in the standby's new cluster. Files that were
not linked on the primary are copied from the primary to the standby.
(They are usually small.)"

[1] - https://www.postgresql.org/docs/devel/pgupgrade.html

I am still not able to get the upgraded standby to go into recovery
without resorting to pg_basebackup, but in another attempt to
investigate your question I tried the following (data1 = old cluster,
data2 = new cluster):

mkdir -p data1 data2 standby

echo 'heap' > data1/foo
echo 'fsm' > data1/foo_fsm

# simulate streaming replication
rsync --archive data1 standby

# simulate pg_upgrade, skipping FSM
ln data1/foo -t data2/

rsync --archive --delete --hard-links --size-only --no-inc-recursive
data1 data2 standby

# result
ls standby/data1
ls standby/data2

The result is that foo_fsm is not copied to standby/data2, contrary to
what the docs above imply for other unlinked files. Can anyone shed
light on this?

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

#88Amit Kapila
amit.kapila16@gmail.com
In reply to: John Naylor (#86)
2 attachment(s)
Re: WIP: Avoid creation of the free space map for small tables

On Wed, Jan 23, 2019 at 9:18 PM John Naylor <john.naylor@2ndquadrant.com> wrote:

On Wed, Jan 23, 2019 at 7:09 AM Amit Kapila <amit.kapila16@gmail.com> wrote:

I think the first two patches (a) removal of dead code in bootstrap
and (b) the core patch to avoid creation of FSM file for the small
table are good now. I have prepared the patches along with commit
message. There is no change except for some changes in README and
commit message of the second patch. Kindly let me know what you think
about them?

Good to hear! The additional language is fine. In "Once the FSM is
created for heap", I would just change that to "...for a heap".

Sure, apart from this I have run pgindent on the patches and make some
changes accordingly. Latest patches attached (only second patch has
some changes). I will take one more pass on Monday morning (28th Jan)
and will commit unless you or others see any problem.

--
With Regards,
Amit Kapila.
EnterpriseDB: http://www.enterprisedb.com

Attachments:

v18-0002-Avoid-creation-of-the-free-space-map-for-small-heap-.patchapplication/octet-stream; name=v18-0002-Avoid-creation-of-the-free-space-map-for-small-heap-.patchDownload
From ee75d813dc4395d9715f4ce00280613b47ec8b4f Mon Sep 17 00:00:00 2001
From: Amit Kapila <akapila@postgresql.org>
Date: Thu, 24 Jan 2019 09:00:01 +0530
Subject: [PATCH 2/2] Avoid creation of the free space map for small heap
 relations.

Previously, all heaps had FSMs. For very small tables, this means that the
FSM took up more space than the heap did. This is wasteful, so now we
refrain from creating the FSM for heaps with 4 pages or fewer. If the last
known target block has insufficient space, we still try to insert into some
other page before giving up and extending the relation, since doing
otherwise leads to table bloat. Testing showed that trying every page
penalized performance slightly, so we compromise and try every other page.
This way, we visit at most two pages. Any pages with wasted free space
become visible at next relation extension, so we still control table bloat.
As a bonus, directly attempting one or two pages can even be faster than
consulting the FSM would have been.

Once the FSM is created for a heap we don't remove it even if somebody
deletes all the rows from the corresponding relation.  We don't think it is
a useful optimization as it is quite likely that relation will again grow to
the same size.

Author: John Naylor with design inputs and some code contribution by Amit Kapila
Reviewed-by: Amit Kapila
Tested-by: Mithun C Y
Discussion: https://www.postgresql.org/message-id/CAJVSVGWvB13PzpbLEecFuGFc5V2fsO736BsdTakPiPAcdMM5tQ@mail.gmail.com
---
 contrib/pageinspect/expected/page.out     |  77 ++++-----
 contrib/pageinspect/sql/page.sql          |  33 ++--
 doc/src/sgml/storage.sgml                 |  13 +-
 src/backend/access/brin/brin.c            |   2 +-
 src/backend/access/brin/brin_pageops.c    |  10 +-
 src/backend/access/heap/hio.c             |  47 +++--
 src/backend/access/heap/vacuumlazy.c      |  17 +-
 src/backend/access/transam/xact.c         |  14 ++
 src/backend/storage/freespace/README      |  38 ++++-
 src/backend/storage/freespace/freespace.c | 275 +++++++++++++++++++++++++++++-
 src/backend/storage/freespace/indexfsm.c  |   6 +-
 src/include/storage/freespace.h           |   9 +-
 src/test/regress/expected/fsm.out         |  75 ++++++++
 src/test/regress/parallel_schedule        |   6 +
 src/test/regress/serial_schedule          |   1 +
 src/test/regress/sql/fsm.sql              |  55 ++++++
 16 files changed, 576 insertions(+), 102 deletions(-)
 create mode 100644 src/test/regress/expected/fsm.out
 create mode 100644 src/test/regress/sql/fsm.sql

diff --git a/contrib/pageinspect/expected/page.out b/contrib/pageinspect/expected/page.out
index 3fcd9fb..11d56f4 100644
--- a/contrib/pageinspect/expected/page.out
+++ b/contrib/pageinspect/expected/page.out
@@ -1,48 +1,69 @@
 CREATE EXTENSION pageinspect;
-CREATE TABLE test1 (a int, b int);
-INSERT INTO test1 VALUES (16777217, 131584);
-VACUUM test1;  -- set up FSM
+CREATE TABLE test_rel_forks (a int);
+-- Make sure there are enough blocks in the heap for the FSM to be created.
+INSERT INTO test_rel_forks SELECT i from generate_series(1,1000) i;
+-- set up FSM and VM
+VACUUM test_rel_forks;
 -- The page contents can vary, so just test that it can be read
 -- successfully, but don't keep the output.
-SELECT octet_length(get_raw_page('test1', 'main', 0)) AS main_0;
+SELECT octet_length(get_raw_page('test_rel_forks', 'main', 0)) AS main_0;
  main_0 
 --------
    8192
 (1 row)
 
-SELECT octet_length(get_raw_page('test1', 'main', 1)) AS main_1;
-ERROR:  block number 1 is out of range for relation "test1"
-SELECT octet_length(get_raw_page('test1', 'fsm', 0)) AS fsm_0;
+SELECT octet_length(get_raw_page('test_rel_forks', 'main', 100)) AS main_100;
+ERROR:  block number 100 is out of range for relation "test_rel_forks"
+SELECT octet_length(get_raw_page('test_rel_forks', 'fsm', 0)) AS fsm_0;
  fsm_0 
 -------
   8192
 (1 row)
 
-SELECT octet_length(get_raw_page('test1', 'fsm', 1)) AS fsm_1;
- fsm_1 
--------
-  8192
-(1 row)
-
-SELECT octet_length(get_raw_page('test1', 'vm', 0)) AS vm_0;
+SELECT octet_length(get_raw_page('test_rel_forks', 'fsm', 10)) AS fsm_10;
+ERROR:  block number 10 is out of range for relation "test_rel_forks"
+SELECT octet_length(get_raw_page('test_rel_forks', 'vm', 0)) AS vm_0;
  vm_0 
 ------
  8192
 (1 row)
 
-SELECT octet_length(get_raw_page('test1', 'vm', 1)) AS vm_1;
-ERROR:  block number 1 is out of range for relation "test1"
+SELECT octet_length(get_raw_page('test_rel_forks', 'vm', 1)) AS vm_1;
+ERROR:  block number 1 is out of range for relation "test_rel_forks"
 SELECT octet_length(get_raw_page('xxx', 'main', 0));
 ERROR:  relation "xxx" does not exist
-SELECT octet_length(get_raw_page('test1', 'xxx', 0));
+SELECT octet_length(get_raw_page('test_rel_forks', 'xxx', 0));
 ERROR:  invalid fork name
 HINT:  Valid fork names are "main", "fsm", "vm", and "init".
-SELECT get_raw_page('test1', 0) = get_raw_page('test1', 'main', 0);
+SELECT * FROM fsm_page_contents(get_raw_page('test_rel_forks', 'fsm', 0));
+ fsm_page_contents 
+-------------------
+ 0: 147           +
+ 1: 147           +
+ 3: 147           +
+ 7: 147           +
+ 15: 147          +
+ 31: 147          +
+ 63: 147          +
+ 127: 147         +
+ 255: 147         +
+ 511: 147         +
+ 1023: 147        +
+ 2047: 147        +
+ 4095: 147        +
+ fp_next_slot: 0  +
+ 
+(1 row)
+
+SELECT get_raw_page('test_rel_forks', 0) = get_raw_page('test_rel_forks', 'main', 0);
  ?column? 
 ----------
  t
 (1 row)
 
+DROP TABLE test_rel_forks;
+CREATE TABLE test1 (a int, b int);
+INSERT INTO test1 VALUES (16777217, 131584);
 SELECT pagesize, version FROM page_header(get_raw_page('test1', 0));
  pagesize | version 
 ----------+---------
@@ -62,26 +83,6 @@ SELECT tuple_data_split('test1'::regclass, t_data, t_infomask, t_infomask2, t_bi
  {"\\x01000001","\\x00020200"}
 (1 row)
 
-SELECT * FROM fsm_page_contents(get_raw_page('test1', 'fsm', 0));
- fsm_page_contents 
--------------------
- 0: 254           +
- 1: 254           +
- 3: 254           +
- 7: 254           +
- 15: 254          +
- 31: 254          +
- 63: 254          +
- 127: 254         +
- 255: 254         +
- 511: 254         +
- 1023: 254        +
- 2047: 254        +
- 4095: 254        +
- fp_next_slot: 0  +
- 
-(1 row)
-
 DROP TABLE test1;
 -- check that using any of these functions with a partitioned table or index
 -- would fail
diff --git a/contrib/pageinspect/sql/page.sql b/contrib/pageinspect/sql/page.sql
index 8ac9991..0ff1f1a 100644
--- a/contrib/pageinspect/sql/page.sql
+++ b/contrib/pageinspect/sql/page.sql
@@ -1,26 +1,35 @@
 CREATE EXTENSION pageinspect;
 
-CREATE TABLE test1 (a int, b int);
-INSERT INTO test1 VALUES (16777217, 131584);
+CREATE TABLE test_rel_forks (a int);
+-- Make sure there are enough blocks in the heap for the FSM to be created.
+INSERT INTO test_rel_forks SELECT i from generate_series(1,1000) i;
 
-VACUUM test1;  -- set up FSM
+-- set up FSM and VM
+VACUUM test_rel_forks;
 
 -- The page contents can vary, so just test that it can be read
 -- successfully, but don't keep the output.
 
-SELECT octet_length(get_raw_page('test1', 'main', 0)) AS main_0;
-SELECT octet_length(get_raw_page('test1', 'main', 1)) AS main_1;
+SELECT octet_length(get_raw_page('test_rel_forks', 'main', 0)) AS main_0;
+SELECT octet_length(get_raw_page('test_rel_forks', 'main', 100)) AS main_100;
 
-SELECT octet_length(get_raw_page('test1', 'fsm', 0)) AS fsm_0;
-SELECT octet_length(get_raw_page('test1', 'fsm', 1)) AS fsm_1;
+SELECT octet_length(get_raw_page('test_rel_forks', 'fsm', 0)) AS fsm_0;
+SELECT octet_length(get_raw_page('test_rel_forks', 'fsm', 10)) AS fsm_10;
 
-SELECT octet_length(get_raw_page('test1', 'vm', 0)) AS vm_0;
-SELECT octet_length(get_raw_page('test1', 'vm', 1)) AS vm_1;
+SELECT octet_length(get_raw_page('test_rel_forks', 'vm', 0)) AS vm_0;
+SELECT octet_length(get_raw_page('test_rel_forks', 'vm', 1)) AS vm_1;
 
 SELECT octet_length(get_raw_page('xxx', 'main', 0));
-SELECT octet_length(get_raw_page('test1', 'xxx', 0));
+SELECT octet_length(get_raw_page('test_rel_forks', 'xxx', 0));
+
+SELECT * FROM fsm_page_contents(get_raw_page('test_rel_forks', 'fsm', 0));
+
+SELECT get_raw_page('test_rel_forks', 0) = get_raw_page('test_rel_forks', 'main', 0);
 
-SELECT get_raw_page('test1', 0) = get_raw_page('test1', 'main', 0);
+DROP TABLE test_rel_forks;
+
+CREATE TABLE test1 (a int, b int);
+INSERT INTO test1 VALUES (16777217, 131584);
 
 SELECT pagesize, version FROM page_header(get_raw_page('test1', 0));
 
@@ -29,8 +38,6 @@ SELECT page_checksum(get_raw_page('test1', 0), 0) IS NOT NULL AS silly_checksum_
 SELECT tuple_data_split('test1'::regclass, t_data, t_infomask, t_infomask2, t_bits)
     FROM heap_page_items(get_raw_page('test1', 0));
 
-SELECT * FROM fsm_page_contents(get_raw_page('test1', 'fsm', 0));
-
 DROP TABLE test1;
 
 -- check that using any of these functions with a partitioned table or index
diff --git a/doc/src/sgml/storage.sgml b/doc/src/sgml/storage.sgml
index 8ef2ac8..cbdad0c 100644
--- a/doc/src/sgml/storage.sgml
+++ b/doc/src/sgml/storage.sgml
@@ -590,12 +590,13 @@ tuple would otherwise be too big.
 <indexterm><primary>FSM</primary><see>Free Space Map</see></indexterm>
 
 <para>
-Each heap and index relation, except for hash indexes, has a Free Space Map
-(FSM) to keep track of available space in the relation. It's stored
-alongside the main relation data in a separate relation fork, named after the
-filenode number of the relation, plus a <literal>_fsm</literal> suffix. For example,
-if the filenode of a relation is 12345, the FSM is stored in a file called
-<filename>12345_fsm</filename>, in the same directory as the main relation file.
+Each heap relation, unless it is very small, and each index relation, except
+for hash indexes, has a Free Space Map (FSM) to keep track of available
+space in the relation. It's stored alongside the main relation data in a
+separate relation fork, named after the filenode number of the relation, plus
+a <literal>_fsm</literal> suffix. For example, if the filenode of a relation
+is 12345, the FSM is stored in a file called <filename>12345_fsm</filename>,
+in the same directory as the main relation file.
 </para>
 
 <para>
diff --git a/src/backend/access/brin/brin.c b/src/backend/access/brin/brin.c
index 467d91e..8f008dd 100644
--- a/src/backend/access/brin/brin.c
+++ b/src/backend/access/brin/brin.c
@@ -1150,7 +1150,7 @@ terminate_brin_buildstate(BrinBuildState *state)
 		freespace = PageGetFreeSpace(page);
 		blk = BufferGetBlockNumber(state->bs_currentInsertBuf);
 		ReleaseBuffer(state->bs_currentInsertBuf);
-		RecordPageWithFreeSpace(state->bs_irel, blk, freespace);
+		RecordPageWithFreeSpace(state->bs_irel, blk, freespace, InvalidBlockNumber);
 		FreeSpaceMapVacuumRange(state->bs_irel, blk, blk + 1);
 	}
 
diff --git a/src/backend/access/brin/brin_pageops.c b/src/backend/access/brin/brin_pageops.c
index 164a468..2eb354f 100644
--- a/src/backend/access/brin/brin_pageops.c
+++ b/src/backend/access/brin/brin_pageops.c
@@ -310,7 +310,7 @@ brin_doupdate(Relation idxrel, BlockNumber pagesPerRange,
 
 		if (extended)
 		{
-			RecordPageWithFreeSpace(idxrel, newblk, freespace);
+			RecordPageWithFreeSpace(idxrel, newblk, freespace, InvalidBlockNumber);
 			FreeSpaceMapVacuumRange(idxrel, newblk, newblk + 1);
 		}
 
@@ -461,7 +461,7 @@ brin_doinsert(Relation idxrel, BlockNumber pagesPerRange,
 
 	if (extended)
 	{
-		RecordPageWithFreeSpace(idxrel, blk, freespace);
+		RecordPageWithFreeSpace(idxrel, blk, freespace, InvalidBlockNumber);
 		FreeSpaceMapVacuumRange(idxrel, blk, blk + 1);
 	}
 
@@ -654,7 +654,7 @@ brin_page_cleanup(Relation idxrel, Buffer buf)
 
 	/* Measure free space and record it */
 	RecordPageWithFreeSpace(idxrel, BufferGetBlockNumber(buf),
-							br_page_get_freespace(page));
+							br_page_get_freespace(page), InvalidBlockNumber);
 }
 
 /*
@@ -703,7 +703,7 @@ brin_getinsertbuffer(Relation irel, Buffer oldbuf, Size itemsz,
 	/* Choose initial target page, re-using existing target if known */
 	newblk = RelationGetTargetBlock(irel);
 	if (newblk == InvalidBlockNumber)
-		newblk = GetPageWithFreeSpace(irel, itemsz);
+		newblk = GetPageWithFreeSpace(irel, itemsz, true);
 
 	/*
 	 * Loop until we find a page with sufficient free space.  By the time we
@@ -895,7 +895,7 @@ brin_initialize_empty_new_buffer(Relation idxrel, Buffer buffer)
 	 * pages whose FSM records were forgotten in a crash.
 	 */
 	RecordPageWithFreeSpace(idxrel, BufferGetBlockNumber(buffer),
-							br_page_get_freespace(page));
+							br_page_get_freespace(page), InvalidBlockNumber);
 }
 
 
diff --git a/src/backend/access/heap/hio.c b/src/backend/access/heap/hio.c
index 3da0b49..4c3e774 100644
--- a/src/backend/access/heap/hio.c
+++ b/src/backend/access/heap/hio.c
@@ -239,8 +239,14 @@ RelationAddExtraBlocks(Relation relation, BulkInsertState bistate)
 		 * Immediately update the bottom level of the FSM.  This has a good
 		 * chance of making this page visible to other concurrently inserting
 		 * backends, and we want that to happen without delay.
+		 *
+		 * Since we know the table will end up with extraBlocks additional
+		 * pages, we pass the final number to avoid possible unnecessary
+		 * system calls and to make sure the FSM is created when we add the
+		 * first new page.
 		 */
-		RecordPageWithFreeSpace(relation, blockNum, freespace);
+		RecordPageWithFreeSpace(relation, blockNum, freespace,
+								firstBlock + extraBlocks);
 	}
 	while (--extraBlocks > 0);
 
@@ -377,20 +383,9 @@ RelationGetBufferForTuple(Relation relation, Size len,
 		 * We have no cached target page, so ask the FSM for an initial
 		 * target.
 		 */
-		targetBlock = GetPageWithFreeSpace(relation, len + saveFreeSpace);
-
-		/*
-		 * If the FSM knows nothing of the rel, try the last page before we
-		 * give up and extend.  This avoids one-tuple-per-page syndrome during
-		 * bootstrapping or in a recently-started system.
-		 */
-		if (targetBlock == InvalidBlockNumber)
-		{
-			BlockNumber nblocks = RelationGetNumberOfBlocks(relation);
-
-			if (nblocks > 0)
-				targetBlock = nblocks - 1;
-		}
+		targetBlock = GetPageWithFreeSpace(relation,
+										   len + saveFreeSpace,
+										   false);
 	}
 
 loop:
@@ -484,6 +479,14 @@ loop:
 		{
 			/* use this page as future insert target, too */
 			RelationSetTargetBlock(relation, targetBlock);
+
+			/*
+			 * In case we used an in-memory map of available blocks, reset it
+			 * for next use.
+			 */
+			if (targetBlock < HEAP_FSM_CREATION_THRESHOLD)
+				FSMClearLocalMap();
+
 			return buffer;
 		}
 
@@ -543,9 +546,12 @@ loop:
 
 			/*
 			 * Check if some other backend has extended a block for us while
-			 * we were waiting on the lock.
+			 * we were waiting on the lock.  We only check the FSM -- if there
+			 * isn't one we don't recheck the number of blocks.
 			 */
-			targetBlock = GetPageWithFreeSpace(relation, len + saveFreeSpace);
+			targetBlock = GetPageWithFreeSpace(relation,
+											   len + saveFreeSpace,
+											   true);
 
 			/*
 			 * If some other waiter has already extended the relation, we
@@ -625,5 +631,12 @@ loop:
 	 */
 	RelationSetTargetBlock(relation, BufferGetBlockNumber(buffer));
 
+	/*
+	 * In case we used an in-memory map of available blocks, reset it for next
+	 * use.  We do this unconditionally since after relation extension we
+	 * can't skip this based on the targetBlock.
+	 */
+	FSMClearLocalMap();
+
 	return buffer;
 }
diff --git a/src/backend/access/heap/vacuumlazy.c b/src/backend/access/heap/vacuumlazy.c
index 37aa484..9cfa65c 100644
--- a/src/backend/access/heap/vacuumlazy.c
+++ b/src/backend/access/heap/vacuumlazy.c
@@ -153,7 +153,7 @@ static BufferAccessStrategy vac_strategy;
 static void lazy_scan_heap(Relation onerel, int options,
 			   LVRelStats *vacrelstats, Relation *Irel, int nindexes,
 			   bool aggressive);
-static void lazy_vacuum_heap(Relation onerel, LVRelStats *vacrelstats);
+static void lazy_vacuum_heap(Relation onerel, LVRelStats *vacrelstats, BlockNumber nblocks);
 static bool lazy_check_needs_freeze(Buffer buf, bool *hastup);
 static void lazy_vacuum_index(Relation indrel,
 				  IndexBulkDeleteResult **stats,
@@ -758,7 +758,7 @@ lazy_scan_heap(Relation onerel, int options, LVRelStats *vacrelstats,
 			pgstat_progress_update_multi_param(2, hvp_index, hvp_val);
 
 			/* Remove tuples from heap */
-			lazy_vacuum_heap(onerel, vacrelstats);
+			lazy_vacuum_heap(onerel, vacrelstats, nblocks);
 
 			/*
 			 * Forget the now-vacuumed tuples, and press on, but be careful
@@ -896,7 +896,7 @@ lazy_scan_heap(Relation onerel, int options, LVRelStats *vacrelstats,
 			MarkBufferDirty(buf);
 			UnlockReleaseBuffer(buf);
 
-			RecordPageWithFreeSpace(onerel, blkno, freespace);
+			RecordPageWithFreeSpace(onerel, blkno, freespace, nblocks);
 			continue;
 		}
 
@@ -935,7 +935,7 @@ lazy_scan_heap(Relation onerel, int options, LVRelStats *vacrelstats,
 			}
 
 			UnlockReleaseBuffer(buf);
-			RecordPageWithFreeSpace(onerel, blkno, freespace);
+			RecordPageWithFreeSpace(onerel, blkno, freespace, nblocks);
 			continue;
 		}
 
@@ -1332,7 +1332,7 @@ lazy_scan_heap(Relation onerel, int options, LVRelStats *vacrelstats,
 		 * taken if there are no indexes.)
 		 */
 		if (vacrelstats->num_dead_tuples == prev_dead_count)
-			RecordPageWithFreeSpace(onerel, blkno, freespace);
+			RecordPageWithFreeSpace(onerel, blkno, freespace, nblocks);
 	}
 
 	/* report that everything is scanned and vacuumed */
@@ -1394,7 +1394,7 @@ lazy_scan_heap(Relation onerel, int options, LVRelStats *vacrelstats,
 		/* Remove tuples from heap */
 		pgstat_progress_update_param(PROGRESS_VACUUM_PHASE,
 									 PROGRESS_VACUUM_PHASE_VACUUM_HEAP);
-		lazy_vacuum_heap(onerel, vacrelstats);
+		lazy_vacuum_heap(onerel, vacrelstats, nblocks);
 		vacrelstats->num_index_scans++;
 	}
 
@@ -1465,9 +1465,10 @@ lazy_scan_heap(Relation onerel, int options, LVRelStats *vacrelstats,
  * Note: the reason for doing this as a second pass is we cannot remove
  * the tuples until we've removed their index entries, and we want to
  * process index entry removal in batches as large as possible.
+ * Note: nblocks is passed as an optimization for RecordPageWithFreeSpace().
  */
 static void
-lazy_vacuum_heap(Relation onerel, LVRelStats *vacrelstats)
+lazy_vacuum_heap(Relation onerel, LVRelStats *vacrelstats, BlockNumber nblocks)
 {
 	int			tupindex;
 	int			npages;
@@ -1504,7 +1505,7 @@ lazy_vacuum_heap(Relation onerel, LVRelStats *vacrelstats)
 		freespace = PageGetHeapFreeSpace(page);
 
 		UnlockReleaseBuffer(buf);
-		RecordPageWithFreeSpace(onerel, tblk, freespace);
+		RecordPageWithFreeSpace(onerel, tblk, freespace, nblocks);
 		npages++;
 	}
 
diff --git a/src/backend/access/transam/xact.c b/src/backend/access/transam/xact.c
index 7c3a9c1..25cd6f4 100644
--- a/src/backend/access/transam/xact.c
+++ b/src/backend/access/transam/xact.c
@@ -48,6 +48,7 @@
 #include "replication/walsender.h"
 #include "storage/condition_variable.h"
 #include "storage/fd.h"
+#include "storage/freespace.h"
 #include "storage/lmgr.h"
 #include "storage/predicate.h"
 #include "storage/proc.h"
@@ -2500,6 +2501,12 @@ AbortTransaction(void)
 	pgstat_report_wait_end();
 	pgstat_progress_end_command();
 
+	/*
+	 * In case we aborted during RelationGetBufferForTuple(), clear the local
+	 * map of heap pages.
+	 */
+	FSMClearLocalMap();
+
 	/* Clean up buffer I/O and buffer context locks, too */
 	AbortBufferIO();
 	UnlockBuffers();
@@ -4721,6 +4728,13 @@ AbortSubTransaction(void)
 
 	pgstat_report_wait_end();
 	pgstat_progress_end_command();
+
+	/*
+	 * In case we aborted during RelationGetBufferForTuple(), clear the local
+	 * map of heap pages.
+	 */
+	FSMClearLocalMap();
+
 	AbortBufferIO();
 	UnlockBuffers();
 
diff --git a/src/backend/storage/freespace/README b/src/backend/storage/freespace/README
index e7ff23b..0d3cd29 100644
--- a/src/backend/storage/freespace/README
+++ b/src/backend/storage/freespace/README
@@ -8,7 +8,41 @@ free space to hold a tuple to be stored; or to determine that no such page
 exists and the relation must be extended by one page.  As of PostgreSQL 8.4
 each relation has its own, extensible free space map stored in a separate
 "fork" of its relation.  This eliminates the disadvantages of the former
-fixed-size FSM.
+fixed-size FSM.  There are two exceptions:
+
+1. Hash indexes never have a FSM.
+2. For very small tables, a 3-page relation fork would be relatively large
+and wasteful, so to save space we refrain from creating the FSM if the
+heap has HEAP_FSM_CREATION_THRESHOLD pages or fewer.
+
+To locate free space in the latter case, we simply try pages directly without
+knowing ahead of time how much free space they have.  To maintain good
+performance, we create a local in-memory map of pages to try, and only mark
+every other page as available.  For example, in a 3-page heap, the local map
+would look like:
+
+ANAN
+0123
+
+Pages 0 and 2 are marked "available", and page 1 as "not available".
+Page 3 is beyond the end of the relation, so is likewise marked "not
+available".  First we try page 2, and if that doesn't have sufficient free
+space we try page 0 before giving up and extending the relation.  There may
+be some wasted free space on block 1, but if the relation extends to 4 pages:
+
+NANA
+0123
+
+We not only have the new page 3 at our disposal, we can now check page 1
+for free space as well.
+
+Once the FSM is created for a heap we don't remove it even if somebody deletes
+all the rows from the corresponding relation.  We don't think it is a useful
+optimization as it is quite likely that relation will again grow to the same
+size.
+
+FSM data structure
+------------------
 
 It is important to keep the map small so that it can be searched rapidly.
 Therefore, we don't attempt to record the exact free space on a page.
@@ -192,5 +226,3 @@ TODO
 ----
 
 - fastroot to avoid traversing upper nodes with just 1 child
-- use a different system for tables that fit into one FSM page, with a
-  mechanism to switch to the real thing as it grows.
diff --git a/src/backend/storage/freespace/freespace.c b/src/backend/storage/freespace/freespace.c
index eee8286..5f46391 100644
--- a/src/backend/storage/freespace/freespace.c
+++ b/src/backend/storage/freespace/freespace.c
@@ -76,6 +76,14 @@
 #define FSM_ROOT_LEVEL	(FSM_TREE_DEPTH - 1)
 #define FSM_BOTTOM_LEVEL 0
 
+/* Status codes for the local map. */
+
+/* Either already tried, or beyond the end of the relation */
+#define FSM_LOCAL_NOT_AVAIL 0x00
+
+/* Available to try */
+#define FSM_LOCAL_AVAIL		0x01
+
 /*
  * The internal FSM routines work on a logical addressing scheme. Each
  * level of the tree can be thought of as a separately addressable file.
@@ -89,6 +97,17 @@ typedef struct
 /* Address of the root page. */
 static const FSMAddress FSM_ROOT_ADDRESS = {FSM_ROOT_LEVEL, 0};
 
+/* Local map of block numbers for small heaps with no FSM. */
+typedef struct
+{
+	BlockNumber nblocks;
+	uint8		map[HEAP_FSM_CREATION_THRESHOLD];
+} FSMLocalMap;
+
+static FSMLocalMap fsm_local_map = {0, {FSM_LOCAL_NOT_AVAIL}};
+
+#define FSM_LOCAL_MAP_EXISTS (fsm_local_map.nblocks > 0)
+
 /* functions to navigate the tree */
 static FSMAddress fsm_get_child(FSMAddress parent, uint16 slot);
 static FSMAddress fsm_get_parent(FSMAddress child, uint16 *slot);
@@ -107,10 +126,14 @@ static Size fsm_space_cat_to_avail(uint8 cat);
 /* workhorse functions for various operations */
 static int fsm_set_and_search(Relation rel, FSMAddress addr, uint16 slot,
 				   uint8 newValue, uint8 minValue);
+static void fsm_local_set(Relation rel, BlockNumber cur_nblocks);
 static BlockNumber fsm_search(Relation rel, uint8 min_cat);
+static BlockNumber fsm_local_search(void);
 static uint8 fsm_vacuum_page(Relation rel, FSMAddress addr,
 				BlockNumber start, BlockNumber end,
 				bool *eof);
+static bool fsm_allow_writes(Relation rel, BlockNumber heapblk,
+				BlockNumber nblocks, BlockNumber *get_nblocks);
 
 
 /******** Public API ********/
@@ -127,13 +150,46 @@ static uint8 fsm_vacuum_page(Relation rel, FSMAddress addr,
  * amount of free space available on that page and then try again (see
  * RecordAndGetPageWithFreeSpace).  If InvalidBlockNumber is returned,
  * extend the relation.
+ *
+ * For very small heap relations that don't have a FSM, we try every other
+ * page before extending the relation.  To keep track of which pages have
+ * been tried, initialize a local in-memory map of pages.
  */
 BlockNumber
-GetPageWithFreeSpace(Relation rel, Size spaceNeeded)
+GetPageWithFreeSpace(Relation rel, Size spaceNeeded, bool check_fsm_only)
 {
 	uint8		min_cat = fsm_space_needed_to_cat(spaceNeeded);
+	BlockNumber target_block,
+				nblocks;
+
+	/* First try the FSM, if it exists. */
+	target_block = fsm_search(rel, min_cat);
+
+	if (target_block == InvalidBlockNumber &&
+		(rel->rd_rel->relkind == RELKIND_RELATION ||
+		 rel->rd_rel->relkind == RELKIND_TOASTVALUE) &&
+		!check_fsm_only)
+	{
+		nblocks = RelationGetNumberOfBlocks(rel);
+
+		if (nblocks > HEAP_FSM_CREATION_THRESHOLD)
+		{
+			/*
+			 * If the FSM knows nothing of the rel, try the last page before
+			 * we give up and extend.  This avoids one-tuple-per-page syndrome
+			 * during bootstrapping or in a recently-started system.
+			 */
+			target_block = nblocks - 1;
+		}
+		else if (nblocks > 0)
+		{
+			/* Create or update local map and get first candidate block. */
+			fsm_local_set(rel, nblocks);
+			target_block = fsm_local_search();
+		}
+	}
 
-	return fsm_search(rel, min_cat);
+	return target_block;
 }
 
 /*
@@ -144,16 +200,47 @@ GetPageWithFreeSpace(Relation rel, Size spaceNeeded)
  * also some effort to return a page close to the old page; if there's a
  * page with enough free space on the same FSM page where the old one page
  * is located, it is preferred.
+ *
+ * For very small heap relations that don't have a FSM, we update the local
+ * map to indicate we have tried a page, and return the next page to try.
  */
 BlockNumber
 RecordAndGetPageWithFreeSpace(Relation rel, BlockNumber oldPage,
 							  Size oldSpaceAvail, Size spaceNeeded)
 {
-	int			old_cat = fsm_space_avail_to_cat(oldSpaceAvail);
-	int			search_cat = fsm_space_needed_to_cat(spaceNeeded);
+	int			old_cat;
+	int			search_cat;
 	FSMAddress	addr;
 	uint16		slot;
 	int			search_slot;
+	BlockNumber nblocks = InvalidBlockNumber;
+
+	/* First try the local map, if it exists. */
+	if (FSM_LOCAL_MAP_EXISTS)
+	{
+		Assert((rel->rd_rel->relkind == RELKIND_RELATION ||
+				rel->rd_rel->relkind == RELKIND_TOASTVALUE) &&
+			   fsm_local_map.map[oldPage] == FSM_LOCAL_AVAIL);
+
+		fsm_local_map.map[oldPage] = FSM_LOCAL_NOT_AVAIL;
+		return fsm_local_search();
+	}
+
+	if (!fsm_allow_writes(rel, oldPage, InvalidBlockNumber, &nblocks))
+	{
+		/*
+		 * If we have neither a local map nor a FSM, we probably just
+		 * tried the target block in the smgr relation entry and failed,
+		 * so we'll need to create the local map.
+		 */
+		fsm_local_set(rel, nblocks);
+		return fsm_local_search();
+	}
+
+	/* Normal FSM logic follows */
+
+	old_cat = fsm_space_avail_to_cat(oldSpaceAvail);
+	search_cat = fsm_space_needed_to_cat(spaceNeeded);
 
 	/* Get the location of the FSM byte representing the heap block */
 	addr = fsm_get_location(oldPage, &slot);
@@ -176,21 +263,42 @@ RecordAndGetPageWithFreeSpace(Relation rel, BlockNumber oldPage,
  * Note that if the new spaceAvail value is higher than the old value stored
  * in the FSM, the space might not become visible to searchers until the next
  * FreeSpaceMapVacuum call, which updates the upper level pages.
+ *
+ * Callers have no need for a local map.
  */
 void
-RecordPageWithFreeSpace(Relation rel, BlockNumber heapBlk, Size spaceAvail)
+RecordPageWithFreeSpace(Relation rel, BlockNumber heapBlk,
+						Size spaceAvail, BlockNumber nblocks)
 {
-	int			new_cat = fsm_space_avail_to_cat(spaceAvail);
+	int			new_cat;
 	FSMAddress	addr;
 	uint16		slot;
+	BlockNumber dummy;
+
+	if (!fsm_allow_writes(rel, heapBlk, nblocks, &dummy))
+		/* No FSM to update and no local map either */
+		return;
 
 	/* Get the location of the FSM byte representing the heap block */
 	addr = fsm_get_location(heapBlk, &slot);
 
+	new_cat = fsm_space_avail_to_cat(spaceAvail);
 	fsm_set_and_search(rel, addr, slot, new_cat, 0);
 }
 
 /*
+ * Clear the local map.  We must call this when we have found a block with
+ * enough free space, when we extend the relation, or on transaction abort.
+ */
+void
+FSMClearLocalMap(void)
+{
+	fsm_local_map.nblocks = 0;
+	memset(&fsm_local_map.map, FSM_LOCAL_NOT_AVAIL,
+		   sizeof(fsm_local_map.map));
+}
+
+/*
  * XLogRecordPageWithFreeSpace - like RecordPageWithFreeSpace, for use in
  *		WAL replay
  */
@@ -204,6 +312,30 @@ XLogRecordPageWithFreeSpace(RelFileNode rnode, BlockNumber heapBlk,
 	BlockNumber blkno;
 	Buffer		buf;
 	Page		page;
+	bool		write_to_fsm;
+
+	/* This is meant to mirror the logic in fsm_allow_writes() */
+	if (heapBlk >= HEAP_FSM_CREATION_THRESHOLD)
+		write_to_fsm = true;
+	else
+	{
+		/* Open the relation at smgr level */
+		SMgrRelation smgr = smgropen(rnode, InvalidBackendId);
+
+		if (smgrexists(smgr, FSM_FORKNUM))
+			write_to_fsm = true;
+		else
+		{
+			BlockNumber heap_nblocks = smgrnblocks(smgr, MAIN_FORKNUM);
+			if (heap_nblocks > HEAP_FSM_CREATION_THRESHOLD)
+				write_to_fsm = true;
+			else
+				write_to_fsm = false;
+		}
+	}
+
+	if (!write_to_fsm)
+		return;
 
 	/* Get the location of the FSM byte representing the heap block */
 	addr = fsm_get_location(heapBlk, &slot);
@@ -904,3 +1036,134 @@ fsm_vacuum_page(Relation rel, FSMAddress addr,
 
 	return max_avail;
 }
+
+/*
+ * For heaps, we prevent creation of the FSM unless the number of pages
+ * exceeds HEAP_FSM_CREATION_THRESHOLD.  For tables that don't already have
+ * a FSM, this will save an inode and a few kB of space.
+ *
+ * XXX The API is a little awkward -- if the caller passes a valid nblocks
+ * value, it can avoid invoking a system call.  If the caller passes
+ * InvalidBlockNumber and receives a false return value, it can get an
+ * up-to-date relation size from get_nblocks.  This saves a few cycles in
+ * the caller, which would otherwise need to get the relation size by itself.
+ */
+static bool
+fsm_allow_writes(Relation rel, BlockNumber heapblk,
+				 BlockNumber nblocks, BlockNumber *get_nblocks)
+{
+	bool		skip_get_nblocks;
+
+	if (heapblk >= HEAP_FSM_CREATION_THRESHOLD)
+		return true;
+
+	/* Non-heap rels can always create a FSM. */
+	if (rel->rd_rel->relkind != RELKIND_RELATION &&
+		rel->rd_rel->relkind != RELKIND_TOASTVALUE)
+		return true;
+
+	/*
+	 * If the caller knows nblocks, we can avoid a system call later.
+	 * If it doesn't, maybe we have relpages from a previous VACUUM.
+	 * Since the table may have extended since then, we still have to
+	 * count the pages later if we can't return now.
+	 */
+	if (nblocks != InvalidBlockNumber)
+	{
+		if (nblocks > HEAP_FSM_CREATION_THRESHOLD)
+			return true;
+		else
+			skip_get_nblocks = true;
+	}
+	else
+	{
+		if (rel->rd_rel->relpages != InvalidBlockNumber &&
+			rel->rd_rel->relpages > HEAP_FSM_CREATION_THRESHOLD)
+			return true;
+		else
+			skip_get_nblocks = false;
+	}
+
+	RelationOpenSmgr(rel);
+	if (smgrexists(rel->rd_smgr, FSM_FORKNUM))
+		return true;
+
+	if (skip_get_nblocks)
+		return false;
+
+	/* last resort */
+	*get_nblocks = RelationGetNumberOfBlocks(rel);
+	if (*get_nblocks > HEAP_FSM_CREATION_THRESHOLD)
+		return true;
+	else
+		return false;
+}
+
+/*
+ * Initialize or update the local map of blocks to try, for when there is
+ * no FSM.
+ *
+ * When we initialize the map, the whole heap is potentially available to
+ * try.  Testing revealed that trying every block can cause a small
+ * performance dip compared to when we use a FSM, so we try every other
+ * block instead.
+ */
+static void
+fsm_local_set(Relation rel, BlockNumber cur_nblocks)
+{
+	BlockNumber blkno,
+				cached_target_block;
+
+	/* The local map must not be set already. */
+	Assert(!FSM_LOCAL_MAP_EXISTS);
+
+	/*
+	 * Starting at the current last block in the relation and working
+	 * backwards, mark alternating blocks as available.
+	 */
+	blkno = cur_nblocks - 1;
+	while (true)
+	{
+		fsm_local_map.map[blkno] = FSM_LOCAL_AVAIL;
+		if (blkno >= 2)
+			blkno -= 2;
+		else
+			break;
+	}
+
+	/* Cache the number of blocks. */
+	fsm_local_map.nblocks = cur_nblocks;
+
+	/* Set the status of the cached target block to 'unavailable'. */
+	cached_target_block = RelationGetTargetBlock(rel);
+	if (cached_target_block != InvalidBlockNumber &&
+		cached_target_block < cur_nblocks)
+		fsm_local_map.map[cached_target_block] = FSM_LOCAL_NOT_AVAIL;
+}
+
+/*
+ * Search the local map for an available block to try, in descending order.
+ * As such, there is no heuristic available to decide which order will be
+ * better to try, but the probability of having space in the last block in the
+ * map is higher because that is the most recent block added to the heap.
+ *
+ * This function is used when there is no FSM.
+ */
+static BlockNumber
+fsm_local_search(void)
+{
+	BlockNumber		target_block;
+
+	/* Local map must be set by now. */
+	Assert(FSM_LOCAL_MAP_EXISTS);
+
+	target_block = fsm_local_map.nblocks;
+	do
+	{
+		target_block--;
+		if (fsm_local_map.map[target_block] == FSM_LOCAL_AVAIL)
+			return target_block;
+	} while (target_block > 0);
+
+	return InvalidBlockNumber;
+}
diff --git a/src/backend/storage/freespace/indexfsm.c b/src/backend/storage/freespace/indexfsm.c
index 58cedea..9d8f43d 100644
--- a/src/backend/storage/freespace/indexfsm.c
+++ b/src/backend/storage/freespace/indexfsm.c
@@ -37,7 +37,7 @@
 BlockNumber
 GetFreeIndexPage(Relation rel)
 {
-	BlockNumber blkno = GetPageWithFreeSpace(rel, BLCKSZ / 2);
+	BlockNumber blkno = GetPageWithFreeSpace(rel, BLCKSZ / 2, true);
 
 	if (blkno != InvalidBlockNumber)
 		RecordUsedIndexPage(rel, blkno);
@@ -51,7 +51,7 @@ GetFreeIndexPage(Relation rel)
 void
 RecordFreeIndexPage(Relation rel, BlockNumber freeBlock)
 {
-	RecordPageWithFreeSpace(rel, freeBlock, BLCKSZ - 1);
+	RecordPageWithFreeSpace(rel, freeBlock, BLCKSZ - 1, InvalidBlockNumber);
 }
 
 
@@ -61,7 +61,7 @@ RecordFreeIndexPage(Relation rel, BlockNumber freeBlock)
 void
 RecordUsedIndexPage(Relation rel, BlockNumber usedBlock)
 {
-	RecordPageWithFreeSpace(rel, usedBlock, 0);
+	RecordPageWithFreeSpace(rel, usedBlock, 0, InvalidBlockNumber);
 }
 
 /*
diff --git a/src/include/storage/freespace.h b/src/include/storage/freespace.h
index 8b00033..dbaae65 100644
--- a/src/include/storage/freespace.h
+++ b/src/include/storage/freespace.h
@@ -18,15 +18,20 @@
 #include "storage/relfilenode.h"
 #include "utils/relcache.h"
 
+/* Only create the FSM if the heap has greater than this many blocks */
+#define HEAP_FSM_CREATION_THRESHOLD 4
+
 /* prototypes for public functions in freespace.c */
 extern Size GetRecordedFreeSpace(Relation rel, BlockNumber heapBlk);
-extern BlockNumber GetPageWithFreeSpace(Relation rel, Size spaceNeeded);
+extern BlockNumber GetPageWithFreeSpace(Relation rel, Size spaceNeeded,
+					 bool check_fsm_only);
 extern BlockNumber RecordAndGetPageWithFreeSpace(Relation rel,
 							  BlockNumber oldPage,
 							  Size oldSpaceAvail,
 							  Size spaceNeeded);
 extern void RecordPageWithFreeSpace(Relation rel, BlockNumber heapBlk,
-						Size spaceAvail);
+						Size spaceAvail, BlockNumber nblocks);
+extern void FSMClearLocalMap(void);
 extern void XLogRecordPageWithFreeSpace(RelFileNode rnode, BlockNumber heapBlk,
 							Size spaceAvail);
 
diff --git a/src/test/regress/expected/fsm.out b/src/test/regress/expected/fsm.out
new file mode 100644
index 0000000..df6b15b
--- /dev/null
+++ b/src/test/regress/expected/fsm.out
@@ -0,0 +1,75 @@
+--
+-- Free Space Map test
+--
+CREATE TABLE fsm_check_size (num int, str text);
+-- Fill 3 blocks with as many large records as will fit
+-- No FSM
+INSERT INTO fsm_check_size SELECT i, rpad('', 1024, 'a')
+FROM generate_series(1,7*3) i;
+VACUUM fsm_check_size;
+SELECT pg_relation_size('fsm_check_size', 'main') AS heap_size,
+pg_relation_size('fsm_check_size', 'fsm') AS fsm_size;
+ heap_size | fsm_size 
+-----------+----------
+     24576 |        0
+(1 row)
+
+-- Clear some space on block 0
+DELETE FROM fsm_check_size WHERE num <= 5;
+VACUUM fsm_check_size;
+-- Insert small record in block 2 to set the cached smgr targetBlock
+INSERT INTO fsm_check_size VALUES(99, 'b');
+-- Insert large record and make sure it goes in block 0 rather than
+-- causing the relation to extend
+INSERT INTO fsm_check_size VALUES (101, rpad('', 1024, 'a'));
+SELECT pg_relation_size('fsm_check_size', 'main') AS heap_size,
+pg_relation_size('fsm_check_size', 'fsm') AS fsm_size;
+ heap_size | fsm_size 
+-----------+----------
+     24576 |        0
+(1 row)
+
+-- Extend table with enough blocks to exceed the FSM threshold
+-- FSM is created and extended to 3 blocks
+INSERT INTO fsm_check_size SELECT i, 'c' FROM generate_series(200,1200) i;
+VACUUM fsm_check_size;
+SELECT pg_relation_size('fsm_check_size', 'fsm') AS fsm_size;
+ fsm_size 
+----------
+    24576
+(1 row)
+
+-- Truncate heap to 1 block
+-- No change in FSM
+DELETE FROM fsm_check_size WHERE num > 7;
+VACUUM fsm_check_size;
+SELECT pg_relation_size('fsm_check_size', 'fsm') AS fsm_size;
+ fsm_size 
+----------
+    24576
+(1 row)
+
+-- Truncate heap to 0 blocks
+-- FSM now truncated to 2 blocks
+DELETE FROM fsm_check_size;
+VACUUM fsm_check_size;
+SELECT pg_relation_size('fsm_check_size', 'fsm') AS fsm_size;
+ fsm_size 
+----------
+    16384
+(1 row)
+
+-- Add long random string to extend TOAST table to 1 block
+INSERT INTO fsm_check_size
+VALUES(0, (SELECT string_agg(md5(chr(i)), '')
+		   FROM generate_series(1,100) i));
+VACUUM fsm_check_size;
+SELECT pg_relation_size(reltoastrelid, 'main') AS toast_size,
+pg_relation_size(reltoastrelid, 'fsm') AS toast_fsm_size
+FROM pg_class WHERE relname = 'fsm_check_size';
+ toast_size | toast_fsm_size 
+------------+----------------
+       8192 |              0
+(1 row)
+
+DROP TABLE fsm_check_size;
diff --git a/src/test/regress/parallel_schedule b/src/test/regress/parallel_schedule
index cc0bbf5..4051a4a 100644
--- a/src/test/regress/parallel_schedule
+++ b/src/test/regress/parallel_schedule
@@ -69,6 +69,12 @@ test: create_aggregate create_function_3 create_cast constraints triggers inheri
 test: sanity_check
 
 # ----------
+# fsm does a delete followed by vacuum, and running it in parallel can prevent
+# removal of rows.
+# ----------
+test: fsm
+
+# ----------
 # Believe it or not, select creates a table, subsequent
 # tests need.
 # ----------
diff --git a/src/test/regress/serial_schedule b/src/test/regress/serial_schedule
index 0c10c71..ac1ea62 100644
--- a/src/test/regress/serial_schedule
+++ b/src/test/regress/serial_schedule
@@ -80,6 +80,7 @@ test: roleattributes
 test: create_am
 test: hash_func
 test: sanity_check
+test: fsm
 test: errors
 test: select
 test: select_into
diff --git a/src/test/regress/sql/fsm.sql b/src/test/regress/sql/fsm.sql
new file mode 100644
index 0000000..07f5055
--- /dev/null
+++ b/src/test/regress/sql/fsm.sql
@@ -0,0 +1,55 @@
+--
+-- Free Space Map test
+--
+
+CREATE TABLE fsm_check_size (num int, str text);
+
+-- Fill 3 blocks with as many large records as will fit
+-- No FSM
+INSERT INTO fsm_check_size SELECT i, rpad('', 1024, 'a')
+FROM generate_series(1,7*3) i;
+VACUUM fsm_check_size;
+SELECT pg_relation_size('fsm_check_size', 'main') AS heap_size,
+pg_relation_size('fsm_check_size', 'fsm') AS fsm_size;
+
+-- Clear some space on block 0
+DELETE FROM fsm_check_size WHERE num <= 5;
+VACUUM fsm_check_size;
+
+-- Insert small record in block 2 to set the cached smgr targetBlock
+INSERT INTO fsm_check_size VALUES(99, 'b');
+
+-- Insert large record and make sure it goes in block 0 rather than
+-- causing the relation to extend
+INSERT INTO fsm_check_size VALUES (101, rpad('', 1024, 'a'));
+SELECT pg_relation_size('fsm_check_size', 'main') AS heap_size,
+pg_relation_size('fsm_check_size', 'fsm') AS fsm_size;
+
+-- Extend table with enough blocks to exceed the FSM threshold
+-- FSM is created and extended to 3 blocks
+INSERT INTO fsm_check_size SELECT i, 'c' FROM generate_series(200,1200) i;
+VACUUM fsm_check_size;
+SELECT pg_relation_size('fsm_check_size', 'fsm') AS fsm_size;
+
+-- Truncate heap to 1 block
+-- No change in FSM
+DELETE FROM fsm_check_size WHERE num > 7;
+VACUUM fsm_check_size;
+SELECT pg_relation_size('fsm_check_size', 'fsm') AS fsm_size;
+
+-- Truncate heap to 0 blocks
+-- FSM now truncated to 2 blocks
+DELETE FROM fsm_check_size;
+VACUUM fsm_check_size;
+SELECT pg_relation_size('fsm_check_size', 'fsm') AS fsm_size;
+
+-- Add long random string to extend TOAST table to 1 block
+INSERT INTO fsm_check_size
+VALUES(0, (SELECT string_agg(md5(chr(i)), '')
+		   FROM generate_series(1,100) i));
+VACUUM fsm_check_size;
+SELECT pg_relation_size(reltoastrelid, 'main') AS toast_size,
+pg_relation_size(reltoastrelid, 'fsm') AS toast_fsm_size
+FROM pg_class WHERE relname = 'fsm_check_size';
+
+DROP TABLE fsm_check_size;
-- 
1.8.3.1

v02-0001-In-bootstrap-mode-don-t-allow-the-creation-of-files-.patchapplication/octet-stream; name=v02-0001-In-bootstrap-mode-don-t-allow-the-creation-of-files-.patchDownload
From b2d5519ebdc564281d6d2e8b0ac4d3b6ae4706dd Mon Sep 17 00:00:00 2001
From: Amit Kapila <akapila@postgresql.org>
Date: Wed, 23 Jan 2019 17:10:52 +0530
Subject: [PATCH 1/2] In bootstrap mode, don't allow the creation of files if
 they don't already exist.

In commit's b9d01fe288 and 3908473c80, we have added some code where we
allowed the creation of files during mdopen even if they didn't exist
during the bootstrap mode.  The later commit obviates the need for same.

This was harmless code till now but with an upcoming feature where we don't
allow to create FSM for small tables, this will needlessly create FSM files.

Author: John Naylor
Reviewed-by: Amit Kapila
Discussion: https://www.postgresql.org/message-id/CAJVSVGWvB13PzpbLEecFuGFc5V2fsO736BsdTakPiPAcdMM5tQ@mail.gmail.com
	    https://www.postgresql.org/message-id/CAA4eK1KsET6sotf+rzOTQfb83pzVEzVhbQi1nxGFYVstVWXUGw@mail.gmail.com
---
 src/backend/storage/smgr/md.c | 33 ++++++++-------------------------
 1 file changed, 8 insertions(+), 25 deletions(-)

diff --git a/src/backend/storage/smgr/md.c b/src/backend/storage/smgr/md.c
index c37dd12..2aba2df 100644
--- a/src/backend/storage/smgr/md.c
+++ b/src/backend/storage/smgr/md.c
@@ -310,13 +310,7 @@ mdcreate(SMgrRelation reln, ForkNumber forkNum, bool isRedo)
 	{
 		int			save_errno = errno;
 
-		/*
-		 * During bootstrap, there are cases where a system relation will be
-		 * accessed (by internal backend processes) before the bootstrap
-		 * script nominally creates it.  Therefore, allow the file to exist
-		 * already, even if isRedo is not set.  (See also mdopen)
-		 */
-		if (isRedo || IsBootstrapProcessingMode())
+		if (isRedo)
 			fd = PathNameOpenFile(path, O_RDWR | PG_BINARY);
 		if (fd < 0)
 		{
@@ -572,26 +566,15 @@ mdopen(SMgrRelation reln, ForkNumber forknum, int behavior)
 
 	if (fd < 0)
 	{
-		/*
-		 * During bootstrap, there are cases where a system relation will be
-		 * accessed (by internal backend processes) before the bootstrap
-		 * script nominally creates it.  Therefore, accept mdopen() as a
-		 * substitute for mdcreate() in bootstrap mode only. (See mdcreate)
-		 */
-		if (IsBootstrapProcessingMode())
-			fd = PathNameOpenFile(path, O_RDWR | O_CREAT | O_EXCL | PG_BINARY);
-		if (fd < 0)
+		if ((behavior & EXTENSION_RETURN_NULL) &&
+			FILE_POSSIBLY_DELETED(errno))
 		{
-			if ((behavior & EXTENSION_RETURN_NULL) &&
-				FILE_POSSIBLY_DELETED(errno))
-			{
-				pfree(path);
-				return NULL;
-			}
-			ereport(ERROR,
-					(errcode_for_file_access(),
-					 errmsg("could not open file \"%s\": %m", path)));
+			pfree(path);
+			return NULL;
 		}
+		ereport(ERROR,
+				(errcode_for_file_access(),
+				 errmsg("could not open file \"%s\": %m", path)));
 	}
 
 	pfree(path);
-- 
1.8.3.1

#89Amit Kapila
amit.kapila16@gmail.com
In reply to: John Naylor (#87)
Re: WIP: Avoid creation of the free space map for small tables

On Thu, Jan 24, 2019 at 3:39 AM John Naylor <john.naylor@2ndquadrant.com> wrote:

On Mon, Jan 21, 2019 at 6:32 AM Amit Kapila <amit.kapila16@gmail.com> wrote:

Also, another case to think in this regard is the upgrade for standby
servers, if you read below paragraph from the user manual [1], you
will see what I am worried about?

"What this does is to record the links created by pg_upgrade's link
mode that connect files in the old and new clusters on the primary
server. It then finds matching files in the standby's old cluster and
creates links for them in the standby's new cluster. Files that were
not linked on the primary are copied from the primary to the standby.
(They are usually small.)"

[1] - https://www.postgresql.org/docs/devel/pgupgrade.html

I am still not able to get the upgraded standby to go into recovery
without resorting to pg_basebackup, but in another attempt to
investigate your question I tried the following (data1 = old cluster,
data2 = new cluster):

mkdir -p data1 data2 standby

echo 'heap' > data1/foo
echo 'fsm' > data1/foo_fsm

# simulate streaming replication
rsync --archive data1 standby

# simulate pg_upgrade, skipping FSM
ln data1/foo -t data2/

rsync --archive --delete --hard-links --size-only --no-inc-recursive
data1 data2 standby

# result
ls standby/data1
ls standby/data2

The result is that foo_fsm is not copied to standby/data2, contrary to
what the docs above imply for other unlinked files. Can anyone shed
light on this?

Is foo_fsm present in standby/data1? I think what doc means to say is
that it copies any unlinked files present in primary's new cluster
(which in your case will be data2).

--
With Regards,
Amit Kapila.
EnterpriseDB: http://www.enterprisedb.com

#90Amit Kapila
amit.kapila16@gmail.com
In reply to: Amit Kapila (#89)
Re: WIP: Avoid creation of the free space map for small tables

On Thu, Jan 24, 2019 at 9:46 AM Amit Kapila <amit.kapila16@gmail.com> wrote:

On Thu, Jan 24, 2019 at 3:39 AM John Naylor <john.naylor@2ndquadrant.com> wrote:

Few comments related to pg_upgrade patch:

1.
+ if ((maps[mapnum].relkind != RELKIND_RELATION &&
+ maps[mapnum].relkind != RELKIND_TOASTVALUE) ||
+ first_seg_size > HEAP_FSM_CREATION_THRESHOLD * BLCKSZ ||
+ GET_MAJOR_VERSION(new_cluster.major_version) <= 1100)
+ (void) transfer_relfile(&maps[mapnum], "_fsm", vm_must_add_frozenbit);

I think this check will needlessly be performed for future versions as
well, say when wants to upgrade from PG12 to PG13. That might not
create any problem, but let's try to be more precise. Can you try to
rewrite this check? You might want to encapsulate it inside a
function. I have thought of doing something similar to what we do for
vm, see checks relate to VISIBILITY_MAP_FROZEN_BIT_CAT_VER, but I
guess for this patch it is not important to check catalog version as
even if someone tries to upgrade to the same version.

2.
transfer_relfile()
{
..
- /* Is it an extent, fsm, or vm file? */
- if (type_suffix[0] != '\0' || segno != 0)
+ /* Did file open fail? */
+ if (stat(old_file, &statbuf) != 0)
..
}

So from now onwards, we will call stat for even 0th segment which
means there is one additional system call for each relation, not sure
if that matters, but I think there is no harm in once testing with a
large number of relations say 10K to 50K relations which have FSM.
The other alternative is we can fetch pg_class.relpages and rely on
that to take this decision, but again if that is not updated, we might
take the wrong decision.

Anyone else has any thoughts on this point?

3.
-static void
+static Size
transfer_relfile(FileNameMap *map, const char *type_suffix, bool
vm_must_add_frozenbit)

If we decide to go with the approach proposed by you, we should add
some comments atop this function for return value change?

--
With Regards,
Amit Kapila.
EnterpriseDB: http://www.enterprisedb.com

#91John Naylor
john.naylor@2ndquadrant.com
In reply to: Amit Kapila (#89)
Re: WIP: Avoid creation of the free space map for small tables

On Wed, Jan 23, 2019 at 11:17 PM Amit Kapila <amit.kapila16@gmail.com> wrote:

On Thu, Jan 24, 2019 at 3:39 AM John Naylor <john.naylor@2ndquadrant.com> wrote:

mkdir -p data1 data2 standby

echo 'heap' > data1/foo
echo 'fsm' > data1/foo_fsm

# simulate streaming replication
rsync --archive data1 standby

# simulate pg_upgrade, skipping FSM
ln data1/foo -t data2/

rsync --archive --delete --hard-links --size-only --no-inc-recursive
data1 data2 standby

# result
ls standby/data1
ls standby/data2

The result is that foo_fsm is not copied to standby/data2, contrary to
what the docs above imply for other unlinked files. Can anyone shed
light on this?

Is foo_fsm present in standby/data1?

Yes it is.

I think what doc means to say is
that it copies any unlinked files present in primary's new cluster
(which in your case will be data2).

In that case, I'm still confused why that doc says, "Unfortunately,
rsync needlessly copies files associated with temporary and unlogged
tables because these files don't normally exist on standby servers."
I fail to see why the primary's new cluster would have these if they
weren't linked. And in the case we're discussing here, the skipped
FSMs won't be on data2, so won't end up in standby/data2.

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

#92Amit Kapila
amit.kapila16@gmail.com
In reply to: John Naylor (#91)
Re: WIP: Avoid creation of the free space map for small tables

On Fri, Jan 25, 2019 at 1:03 AM John Naylor <john.naylor@2ndquadrant.com> wrote:

On Wed, Jan 23, 2019 at 11:17 PM Amit Kapila <amit.kapila16@gmail.com> wrote:

I think what doc means to say is
that it copies any unlinked files present in primary's new cluster
(which in your case will be data2).

In that case, I'm still confused why that doc says, "Unfortunately,
rsync needlessly copies files associated with temporary and unlogged
tables because these files don't normally exist on standby servers."
I fail to see why the primary's new cluster would have these if they
weren't linked.

Why unlogged files won't be in primary's new cluster? After the
upgrade, they should be present in a new cluster if they were present
in the old cluster.

And in the case we're discussing here, the skipped
FSMs won't be on data2, so won't end up in standby/data2.

Right. I think we are safe with respect to rsync because I have seen
that we do rewrite the vm files in link mode and rsync will copy them
from primary's new cluster.

I think you can try to address my other comments on your pg_upgrade
patch. Once we agree on the code, we need to test below scenarios:
(a) upgrade from all supported versions to the latest version
(b) upgrade standby with and without using rsync.

--
With Regards,
Amit Kapila.
EnterpriseDB: http://www.enterprisedb.com

#93John Naylor
john.naylor@2ndquadrant.com
In reply to: Amit Kapila (#92)
1 attachment(s)
Re: WIP: Avoid creation of the free space map for small tables

On Thu, Jan 24, 2019 at 5:19 AM Amit Kapila <amit.kapila16@gmail.com> wrote:

1.
+ if ((maps[mapnum].relkind != RELKIND_RELATION &&
+ maps[mapnum].relkind != RELKIND_TOASTVALUE) ||
+ first_seg_size > HEAP_FSM_CREATION_THRESHOLD * BLCKSZ ||
+ GET_MAJOR_VERSION(new_cluster.major_version) <= 1100)
+ (void) transfer_relfile(&maps[mapnum], "_fsm", vm_must_add_frozenbit);

I think this check will needlessly be performed for future versions as
well, say when wants to upgrade from PG12 to PG13. That might not
create any problem, but let's try to be more precise. Can you try to
rewrite this check? You might want to encapsulate it inside a
function. I have thought of doing something similar to what we do for
vm, see checks relate to VISIBILITY_MAP_FROZEN_BIT_CAT_VER, but I
guess for this patch it is not important to check catalog version as
even if someone tries to upgrade to the same version.

Agreed, done for v19 (I've only attached the pg_upgrade patch).

2.
transfer_relfile()
{
..
- /* Is it an extent, fsm, or vm file? */
- if (type_suffix[0] != '\0' || segno != 0)
+ /* Did file open fail? */
+ if (stat(old_file, &statbuf) != 0)
..
}

So from now onwards, we will call stat for even 0th segment which
means there is one additional system call for each relation, not sure
if that matters, but I think there is no harm in once testing with a
large number of relations say 10K to 50K relations which have FSM.

Performance testing is probably a good idea anyway, but I went ahead
and implemented your next idea:

The other alternative is we can fetch pg_class.relpages and rely on
that to take this decision, but again if that is not updated, we might
take the wrong decision.

We can think of it this way: Which is worse,
1. Transferring a FSM we don't need, or
2. Skipping a FSM we need

I'd say #2 is worse. So, in v19 we check pg_class.relpages and if it's
a heap and less than or equal the threshold we call stat on the 0th
segment to verify. In the common case, the cost of the stat call is
offset by not linking the FSM. Despite needing another pg_class field,
I think this code is actually easier to read than my earlier versions.

3.
-static void
+static Size
transfer_relfile(FileNameMap *map, const char *type_suffix, bool
vm_must_add_frozenbit)

If we decide to go with the approach proposed by you, we should add
some comments atop this function for return value change?

Done, as well as other comment edits.

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

Attachments:

v19-0003-During-pg_upgrade-conditionally-skip-transfer-of.patchtext/x-patch; charset=US-ASCII; name=v19-0003-During-pg_upgrade-conditionally-skip-transfer-of.patchDownload
From 277d969c31349b22e2c7726935d681e72aacaece Mon Sep 17 00:00:00 2001
From: John Naylor <jcnaylor@gmail.com>
Date: Fri, 25 Jan 2019 17:18:28 -0500
Subject: [PATCH v19 3/3] During pg_upgrade, conditionally skip transfer of
 FSMs.

If a heap on the old cluster has 4 pages or fewer, don't copy or
link the FSM. This will reduce space usage for installations with
large numbers of small tables.
---
 src/bin/pg_upgrade/info.c        | 18 ++++++-
 src/bin/pg_upgrade/pg_upgrade.h  |  6 +++
 src/bin/pg_upgrade/relfilenode.c | 84 +++++++++++++++++++++++++++-----
 3 files changed, 93 insertions(+), 15 deletions(-)

diff --git a/src/bin/pg_upgrade/info.c b/src/bin/pg_upgrade/info.c
index 2f925f086c..55d4911d10 100644
--- a/src/bin/pg_upgrade/info.c
+++ b/src/bin/pg_upgrade/info.c
@@ -200,6 +200,8 @@ create_rel_filename_map(const char *old_data, const char *new_data,
 
 	map->old_db_oid = old_db->db_oid;
 	map->new_db_oid = new_db->db_oid;
+	map->relpages = old_rel->relpages;
+	map->relkind = old_rel->relkind;
 
 	/*
 	 * old_relfilenode might differ from pg_class.oid (and hence
@@ -415,9 +417,11 @@ get_rel_infos(ClusterInfo *cluster, DbInfo *dbinfo)
 	int			ntups;
 	int			relnum;
 	int			num_rels = 0;
+	int			relpages;
 	char	   *nspname = NULL;
 	char	   *relname = NULL;
 	char	   *tablespace = NULL;
+	char	   *relkind = NULL;
 	int			i_spclocation,
 				i_nspname,
 				i_relname,
@@ -425,7 +429,9 @@ get_rel_infos(ClusterInfo *cluster, DbInfo *dbinfo)
 				i_indtable,
 				i_toastheap,
 				i_relfilenode,
-				i_reltablespace;
+				i_reltablespace,
+				i_relpages,
+				i_relkind;
 	char		query[QUERY_ALLOC];
 	char	   *last_namespace = NULL,
 			   *last_tablespace = NULL;
@@ -494,7 +500,7 @@ get_rel_infos(ClusterInfo *cluster, DbInfo *dbinfo)
 	 */
 	snprintf(query + strlen(query), sizeof(query) - strlen(query),
 			 "SELECT all_rels.*, n.nspname, c.relname, "
-			 "  c.relfilenode, c.reltablespace, %s "
+			 "  c.relfilenode, c.reltablespace, c.relpages, c.relkind, %s "
 			 "FROM (SELECT * FROM regular_heap "
 			 "      UNION ALL "
 			 "      SELECT * FROM toast_heap "
@@ -526,6 +532,8 @@ get_rel_infos(ClusterInfo *cluster, DbInfo *dbinfo)
 	i_relfilenode = PQfnumber(res, "relfilenode");
 	i_reltablespace = PQfnumber(res, "reltablespace");
 	i_spclocation = PQfnumber(res, "spclocation");
+	i_relpages = PQfnumber(res, "relpages");
+	i_relkind = PQfnumber(res, "relkind");
 
 	for (relnum = 0; relnum < ntups; relnum++)
 	{
@@ -555,6 +563,12 @@ get_rel_infos(ClusterInfo *cluster, DbInfo *dbinfo)
 		relname = PQgetvalue(res, relnum, i_relname);
 		curr->relname = pg_strdup(relname);
 
+		relpages = atoi(PQgetvalue(res, relnum, i_relpages));
+		curr->relpages = relpages;
+
+		relkind = PQgetvalue(res, relnum, i_relkind);
+		curr->relkind = relkind[0];
+
 		curr->relfilenode = atooid(PQgetvalue(res, relnum, i_relfilenode));
 		curr->tblsp_alloc = false;
 
diff --git a/src/bin/pg_upgrade/pg_upgrade.h b/src/bin/pg_upgrade/pg_upgrade.h
index 2f67eee22b..baeb8ff0f8 100644
--- a/src/bin/pg_upgrade/pg_upgrade.h
+++ b/src/bin/pg_upgrade/pg_upgrade.h
@@ -147,6 +147,8 @@ typedef struct
 	char	   *tablespace;		/* tablespace path; "" for cluster default */
 	bool		nsp_alloc;		/* should nspname be freed? */
 	bool		tblsp_alloc;	/* should tablespace be freed? */
+	int32		relpages;		/* # of pages -- see pg_class.h */
+	char		relkind;		/* relation kind -- see pg_class.h */
 } RelInfo;
 
 typedef struct
@@ -173,6 +175,10 @@ typedef struct
 	 */
 	Oid			old_relfilenode;
 	Oid			new_relfilenode;
+
+	int32		relpages;		/* # of pages -- see pg_class.h */
+	char		relkind;		/* relation kind -- see pg_class.h */
+
 	/* the rest are used only for logging and error reporting */
 	char	   *nspname;		/* namespaces */
 	char	   *relname;
diff --git a/src/bin/pg_upgrade/relfilenode.c b/src/bin/pg_upgrade/relfilenode.c
index 0c78073f0e..ffcec23d7c 100644
--- a/src/bin/pg_upgrade/relfilenode.c
+++ b/src/bin/pg_upgrade/relfilenode.c
@@ -14,10 +14,12 @@
 #include <sys/stat.h>
 #include "catalog/pg_class_d.h"
 #include "access/transam.h"
+#include "storage/freespace.h"
 
 
 static void transfer_single_new_db(FileNameMap *maps, int size, char *old_tablespace);
-static void transfer_relfile(FileNameMap *map, const char *suffix, bool vm_must_add_frozenbit);
+static Size transfer_relfile(FileNameMap *map, const char *suffix, bool vm_must_add_frozenbit);
+static bool new_cluster_needs_fsm(char relkind, Size first_seg_size);
 
 
 /*
@@ -144,6 +146,7 @@ transfer_single_new_db(FileNameMap *maps, int size, char *old_tablespace)
 	int			mapnum;
 	bool		vm_crashsafe_match = true;
 	bool		vm_must_add_frozenbit = false;
+	Size		first_seg_size = 0;
 
 	/*
 	 * Do the old and new cluster disagree on the crash-safetiness of the vm
@@ -165,18 +168,22 @@ transfer_single_new_db(FileNameMap *maps, int size, char *old_tablespace)
 		if (old_tablespace == NULL ||
 			strcmp(maps[mapnum].old_tablespace, old_tablespace) == 0)
 		{
-			/* transfer primary file */
-			transfer_relfile(&maps[mapnum], "", vm_must_add_frozenbit);
+			/* Transfer main fork and return size of the first segment. */
+			first_seg_size = transfer_relfile(&maps[mapnum], "", vm_must_add_frozenbit);
 
 			/* fsm/vm files added in PG 8.4 */
 			if (GET_MAJOR_VERSION(old_cluster.major_version) >= 804)
 			{
 				/*
-				 * Copy/link any fsm and vm files, if they exist
+				 * Transfer any FSM files if they would be created in the
+				 * new cluster.
 				 */
-				transfer_relfile(&maps[mapnum], "_fsm", vm_must_add_frozenbit);
+				if (new_cluster_needs_fsm(maps[mapnum].relkind, first_seg_size))
+					(void) transfer_relfile(&maps[mapnum], "_fsm", vm_must_add_frozenbit);
+
+				/* Transfer any VM files if we can trust their contents. */
 				if (vm_crashsafe_match)
-					transfer_relfile(&maps[mapnum], "_vm", vm_must_add_frozenbit);
+					(void) transfer_relfile(&maps[mapnum], "_vm", vm_must_add_frozenbit);
 			}
 		}
 	}
@@ -188,9 +195,10 @@ transfer_single_new_db(FileNameMap *maps, int size, char *old_tablespace)
  *
  * Copy or link file from old cluster to new one.  If vm_must_add_frozenbit
  * is true, visibility map forks are converted and rewritten, even in link
- * mode.
+ * mode.  Returns size of the first segment.  We only care about the accuracy
+ * of the size for small heap relations.
  */
-static void
+static Size
 transfer_relfile(FileNameMap *map, const char *type_suffix, bool vm_must_add_frozenbit)
 {
 	char		old_file[MAXPGPATH];
@@ -198,6 +206,7 @@ transfer_relfile(FileNameMap *map, const char *type_suffix, bool vm_must_add_fro
 	int			segno;
 	char		extent_suffix[65];
 	struct stat statbuf;
+	Size		first_seg_size = 0;
 
 	/*
 	 * Now copy/link any related segments as well. Remember, PG breaks large
@@ -234,16 +243,40 @@ transfer_relfile(FileNameMap *map, const char *type_suffix, bool vm_must_add_fro
 			{
 				/* File does not exist?  That's OK, just return */
 				if (errno == ENOENT)
-					return;
+					return first_seg_size;
 				else
-					pg_fatal("error while checking for file existence \"%s.%s\" (\"%s\" to \"%s\"): %s\n",
-							 map->nspname, map->relname, old_file, new_file,
-							 strerror(errno));
+					goto fatal;
 			}
 
 			/* If file is empty, just return */
 			if (statbuf.st_size == 0)
-				return;
+				return first_seg_size;
+		}
+
+		/* Save size of the first segment of the main fork. */
+
+		else if (map->relpages <= HEAP_FSM_CREATION_THRESHOLD &&
+				 (map->relkind == RELKIND_RELATION ||
+				  map->relkind == RELKIND_TOASTVALUE))
+		{
+			/*
+			 * In this case, if pg_class.relpages is wrong, it's possible
+			 * that a FSM will be skipped when we actually need it.  To guard
+			 * against this, we verify the size of the first segment.
+			 */
+			if (stat(old_file, &statbuf) != 0)
+				goto fatal;
+			else
+				first_seg_size = statbuf.st_size;
+		}
+		else
+		{
+			/*
+			 * For indexes etc., we don't care if pg_class.relpages is wrong,
+			 * since we always transfer their FSMs.  For heaps, we might
+			 * transfer a FSM when we don't need to, but this is harmless.
+			 */
+			first_seg_size = Min(map->relpages, RELSEG_SIZE) * BLCKSZ;
 		}
 
 		unlink(new_file);
@@ -277,4 +310,29 @@ transfer_relfile(FileNameMap *map, const char *type_suffix, bool vm_must_add_fro
 					linkFile(old_file, new_file, map->nspname, map->relname);
 			}
 	}
+
+fatal:
+	pg_fatal("error while checking for file existence \"%s.%s\" (\"%s\" to \"%s\"): %s\n",
+			 map->nspname, map->relname, old_file, new_file,
+			 strerror(errno));
+}
+
+/*
+ * Return false for small heaps if we're upgrading across version 12,
+ * the first where small heap relations don't have FSMs by default.
+ */
+static bool
+new_cluster_needs_fsm(char relkind, Size first_seg_size)
+{
+	if (relkind != RELKIND_RELATION && relkind != RELKIND_TOASTVALUE)
+		return true;
+
+	if (first_seg_size > HEAP_FSM_CREATION_THRESHOLD * BLCKSZ)
+		return true;
+
+	if (GET_MAJOR_VERSION(old_cluster.major_version) <= 1100 &&
+		GET_MAJOR_VERSION(new_cluster.major_version) >= 1200)
+		return false;
+	else
+		return true;
 }
-- 
2.17.1

#94John Naylor
john.naylor@2ndquadrant.com
In reply to: Amit Kapila (#92)
Re: WIP: Avoid creation of the free space map for small tables

On Thu, Jan 24, 2019 at 9:50 PM Amit Kapila <amit.kapila16@gmail.com> wrote:

On Fri, Jan 25, 2019 at 1:03 AM John Naylor <john.naylor@2ndquadrant.com> wrote:

On Wed, Jan 23, 2019 at 11:17 PM Amit Kapila <amit.kapila16@gmail.com> wrote:

I think what doc means to say is
that it copies any unlinked files present in primary's new cluster
(which in your case will be data2).

In that case, I'm still confused why that doc says, "Unfortunately,
rsync needlessly copies files associated with temporary and unlogged
tables because these files don't normally exist on standby servers."
I fail to see why the primary's new cluster would have these if they
weren't linked.

Why unlogged files won't be in primary's new cluster? After the
upgrade, they should be present in a new cluster if they were present
in the old cluster.

I assume they would be linked, however (I haven't checked this). I did
think rewritten VM files would fall under this, but I was confused
about unlogged files.

And in the case we're discussing here, the skipped
FSMs won't be on data2, so won't end up in standby/data2.

Right. I think we are safe with respect to rsync because I have seen
that we do rewrite the vm files in link mode and rsync will copy them
from primary's new cluster.

Okay.

I think you can try to address my other comments on your pg_upgrade
patch. Once we agree on the code, we need to test below scenarios:
(a) upgrade from all supported versions to the latest version
(b) upgrade standby with and without using rsync.

Sounds good.

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

#95Amit Kapila
amit.kapila16@gmail.com
In reply to: John Naylor (#93)
1 attachment(s)
Re: WIP: Avoid creation of the free space map for small tables

On Sat, Jan 26, 2019 at 5:05 AM John Naylor <john.naylor@2ndquadrant.com> wrote:

On Thu, Jan 24, 2019 at 5:19 AM Amit Kapila <amit.kapila16@gmail.com> wrote:

Performance testing is probably a good idea anyway, but I went ahead
and implemented your next idea:

The other alternative is we can fetch pg_class.relpages and rely on
that to take this decision, but again if that is not updated, we might
take the wrong decision.

We can think of it this way: Which is worse,
1. Transferring a FSM we don't need, or
2. Skipping a FSM we need

I'd say #2 is worse.

Agreed.

So, in v19 we check pg_class.relpages and if it's
a heap and less than or equal the threshold we call stat on the 0th
segment to verify.

Okay, but the way logic is implemented appears clumsy to me.

@@ -234,16 +243,40 @@ transfer_relfile(FileNameMap *map, const char
*type_suffix, bool vm_must_add_fro
  {
  /* File does not exist?  That's OK, just return */
  if (errno == ENOENT)
- return;
+ return first_seg_size;
  else
- pg_fatal("error while checking for file existence \"%s.%s\" (\"%s\"
to \"%s\"): %s\n",
- map->nspname, map->relname, old_file, new_file,
- strerror(errno));
+ goto fatal;
  }
  /* If file is empty, just return */
  if (statbuf.st_size == 0)
- return;
+ return first_seg_size;
+ }
+
+ /* Save size of the first segment of the main fork. */
+
+ else if (map->relpages <= HEAP_FSM_CREATION_THRESHOLD &&
+ (map->relkind == RELKIND_RELATION ||
+   map->relkind == RELKIND_TOASTVALUE))
+ {
+ /*
+ * In this case, if pg_class.relpages is wrong, it's possible
+ * that a FSM will be skipped when we actually need it.  To guard
+ * against this, we verify the size of the first segment.
+ */
+ if (stat(old_file, &statbuf) != 0)
+ goto fatal;
+ else
+ first_seg_size = statbuf.st_size;
+ }
+ else
+ {
+ /*
+ * For indexes etc., we don't care if pg_class.relpages is wrong,
+ * since we always transfer their FSMs.  For heaps, we might
+ * transfer a FSM when we don't need to, but this is harmless.
+ */
+ first_seg_size = Min(map->relpages, RELSEG_SIZE) * BLCKSZ;
  }

The function transfer_relfile has no clue about skipping of FSM stuff,
but it contains comments about it. The check "if (map->relpages <=
HEAP_FSM_CREATION_THRESHOLD ..." will needlessly be executed for each
segment. I think there is some value in using the information from
this function to skip fsm files, but the code doesn't appear to fit
well, how about moving this check to new function
new_cluster_needs_fsm()?

In the common case, the cost of the stat call is
offset by not linking the FSM.

Agreed.

Despite needing another pg_class field,
I think this code is actually easier to read than my earlier versions.

Yeah, the code appears cleaner from the last version, but I think we
can do more in that regards.

One more minor comment:
snprintf(query + strlen(query), sizeof(query) - strlen(query),
  "SELECT all_rels.*, n.nspname, c.relname, "
- "  c.relfilenode, c.reltablespace, %s "
+ "  c.relfilenode, c.reltablespace, c.relpages, c.relkind, %s "
  "FROM (SELECT * FROM regular_heap "
  "      UNION ALL "
  "      SELECT * FROM toast_heap "
@@ -525,6 +530,8 @@ get_rel_infos(ClusterInfo *cluster, DbInfo *dbinfo)
  i_relname = PQfnumber(res, "relname");
  i_relfilenode = PQfnumber(res, "relfilenode");
  i_reltablespace = PQfnumber(res, "reltablespace");
+ i_relpages = PQfnumber(res, "relpages");
+ i_relkind = PQfnumber(res, "relkind");
  i_spclocation = PQfnumber(res, "spclocation");

The order in which relkind and relpages is used in the above code is
different from the order in which it is mentioned in the query, it
won't matter, but keeping in order will make look code consistent. I
have made this and some more minor code adjustments in the attached
patch. If you like those, you can include them in the next version of
your patch.

--
With Regards,
Amit Kapila.
EnterpriseDB: http://www.enterprisedb.com

Attachments:

v20-0003-During-pg_upgrade-conditionally-skip-transfer-of-FSM.patchapplication/octet-stream; name=v20-0003-During-pg_upgrade-conditionally-skip-transfer-of-FSM.patchDownload
From f0332ca7ce8993401436339cf08e2a383e4b9df0 Mon Sep 17 00:00:00 2001
From: Amit Kapila <akapila@postgresql.org>
Date: Sat, 26 Jan 2019 17:54:53 +0530
Subject: [PATCH] During pg_upgrade, conditionally skip transfer of FSMs.

If a heap on the old cluster has 4 pages or fewer, don't copy or
link the FSM. This will reduce space usage for installations with
large numbers of small tables.
---
 src/bin/pg_upgrade/info.c        | 16 +++++++-
 src/bin/pg_upgrade/pg_upgrade.h  |  6 +++
 src/bin/pg_upgrade/relfilenode.c | 84 +++++++++++++++++++++++++++++++++-------
 3 files changed, 91 insertions(+), 15 deletions(-)

diff --git a/src/bin/pg_upgrade/info.c b/src/bin/pg_upgrade/info.c
index 2f925f0..902bfc6 100644
--- a/src/bin/pg_upgrade/info.c
+++ b/src/bin/pg_upgrade/info.c
@@ -200,6 +200,8 @@ create_rel_filename_map(const char *old_data, const char *new_data,
 
 	map->old_db_oid = old_db->db_oid;
 	map->new_db_oid = new_db->db_oid;
+	map->relpages = old_rel->relpages;
+	map->relkind = old_rel->relkind;
 
 	/*
 	 * old_relfilenode might differ from pg_class.oid (and hence
@@ -418,6 +420,7 @@ get_rel_infos(ClusterInfo *cluster, DbInfo *dbinfo)
 	char	   *nspname = NULL;
 	char	   *relname = NULL;
 	char	   *tablespace = NULL;
+	char	   *relkind = NULL;
 	int			i_spclocation,
 				i_nspname,
 				i_relname,
@@ -425,7 +428,9 @@ get_rel_infos(ClusterInfo *cluster, DbInfo *dbinfo)
 				i_indtable,
 				i_toastheap,
 				i_relfilenode,
-				i_reltablespace;
+				i_reltablespace,
+				i_relpages,
+				i_relkind;
 	char		query[QUERY_ALLOC];
 	char	   *last_namespace = NULL,
 			   *last_tablespace = NULL;
@@ -494,7 +499,7 @@ get_rel_infos(ClusterInfo *cluster, DbInfo *dbinfo)
 	 */
 	snprintf(query + strlen(query), sizeof(query) - strlen(query),
 			 "SELECT all_rels.*, n.nspname, c.relname, "
-			 "  c.relfilenode, c.reltablespace, %s "
+			 "  c.relfilenode, c.reltablespace, c.relpages, c.relkind, %s "
 			 "FROM (SELECT * FROM regular_heap "
 			 "      UNION ALL "
 			 "      SELECT * FROM toast_heap "
@@ -525,6 +530,8 @@ get_rel_infos(ClusterInfo *cluster, DbInfo *dbinfo)
 	i_relname = PQfnumber(res, "relname");
 	i_relfilenode = PQfnumber(res, "relfilenode");
 	i_reltablespace = PQfnumber(res, "reltablespace");
+	i_relpages = PQfnumber(res, "relpages");
+	i_relkind = PQfnumber(res, "relkind");
 	i_spclocation = PQfnumber(res, "spclocation");
 
 	for (relnum = 0; relnum < ntups; relnum++)
@@ -556,6 +563,11 @@ get_rel_infos(ClusterInfo *cluster, DbInfo *dbinfo)
 		curr->relname = pg_strdup(relname);
 
 		curr->relfilenode = atooid(PQgetvalue(res, relnum, i_relfilenode));
+		curr->relpages = atoi(PQgetvalue(res, relnum, i_relpages));
+
+		relkind = PQgetvalue(res, relnum, i_relkind);
+		curr->relkind = relkind[0];
+
 		curr->tblsp_alloc = false;
 
 		/* Is the tablespace oid non-default? */
diff --git a/src/bin/pg_upgrade/pg_upgrade.h b/src/bin/pg_upgrade/pg_upgrade.h
index 2f67eee..baeb8ff 100644
--- a/src/bin/pg_upgrade/pg_upgrade.h
+++ b/src/bin/pg_upgrade/pg_upgrade.h
@@ -147,6 +147,8 @@ typedef struct
 	char	   *tablespace;		/* tablespace path; "" for cluster default */
 	bool		nsp_alloc;		/* should nspname be freed? */
 	bool		tblsp_alloc;	/* should tablespace be freed? */
+	int32		relpages;		/* # of pages -- see pg_class.h */
+	char		relkind;		/* relation kind -- see pg_class.h */
 } RelInfo;
 
 typedef struct
@@ -173,6 +175,10 @@ typedef struct
 	 */
 	Oid			old_relfilenode;
 	Oid			new_relfilenode;
+
+	int32		relpages;		/* # of pages -- see pg_class.h */
+	char		relkind;		/* relation kind -- see pg_class.h */
+
 	/* the rest are used only for logging and error reporting */
 	char	   *nspname;		/* namespaces */
 	char	   *relname;
diff --git a/src/bin/pg_upgrade/relfilenode.c b/src/bin/pg_upgrade/relfilenode.c
index 0c78073..ffcec23 100644
--- a/src/bin/pg_upgrade/relfilenode.c
+++ b/src/bin/pg_upgrade/relfilenode.c
@@ -14,10 +14,12 @@
 #include <sys/stat.h>
 #include "catalog/pg_class_d.h"
 #include "access/transam.h"
+#include "storage/freespace.h"
 
 
 static void transfer_single_new_db(FileNameMap *maps, int size, char *old_tablespace);
-static void transfer_relfile(FileNameMap *map, const char *suffix, bool vm_must_add_frozenbit);
+static Size transfer_relfile(FileNameMap *map, const char *suffix, bool vm_must_add_frozenbit);
+static bool new_cluster_needs_fsm(char relkind, Size first_seg_size);
 
 
 /*
@@ -144,6 +146,7 @@ transfer_single_new_db(FileNameMap *maps, int size, char *old_tablespace)
 	int			mapnum;
 	bool		vm_crashsafe_match = true;
 	bool		vm_must_add_frozenbit = false;
+	Size		first_seg_size = 0;
 
 	/*
 	 * Do the old and new cluster disagree on the crash-safetiness of the vm
@@ -165,18 +168,22 @@ transfer_single_new_db(FileNameMap *maps, int size, char *old_tablespace)
 		if (old_tablespace == NULL ||
 			strcmp(maps[mapnum].old_tablespace, old_tablespace) == 0)
 		{
-			/* transfer primary file */
-			transfer_relfile(&maps[mapnum], "", vm_must_add_frozenbit);
+			/* Transfer main fork and return size of the first segment. */
+			first_seg_size = transfer_relfile(&maps[mapnum], "", vm_must_add_frozenbit);
 
 			/* fsm/vm files added in PG 8.4 */
 			if (GET_MAJOR_VERSION(old_cluster.major_version) >= 804)
 			{
 				/*
-				 * Copy/link any fsm and vm files, if they exist
+				 * Transfer any FSM files if they would be created in the
+				 * new cluster.
 				 */
-				transfer_relfile(&maps[mapnum], "_fsm", vm_must_add_frozenbit);
+				if (new_cluster_needs_fsm(maps[mapnum].relkind, first_seg_size))
+					(void) transfer_relfile(&maps[mapnum], "_fsm", vm_must_add_frozenbit);
+
+				/* Transfer any VM files if we can trust their contents. */
 				if (vm_crashsafe_match)
-					transfer_relfile(&maps[mapnum], "_vm", vm_must_add_frozenbit);
+					(void) transfer_relfile(&maps[mapnum], "_vm", vm_must_add_frozenbit);
 			}
 		}
 	}
@@ -188,9 +195,10 @@ transfer_single_new_db(FileNameMap *maps, int size, char *old_tablespace)
  *
  * Copy or link file from old cluster to new one.  If vm_must_add_frozenbit
  * is true, visibility map forks are converted and rewritten, even in link
- * mode.
+ * mode.  Returns size of the first segment.  We only care about the accuracy
+ * of the size for small heap relations.
  */
-static void
+static Size
 transfer_relfile(FileNameMap *map, const char *type_suffix, bool vm_must_add_frozenbit)
 {
 	char		old_file[MAXPGPATH];
@@ -198,6 +206,7 @@ transfer_relfile(FileNameMap *map, const char *type_suffix, bool vm_must_add_fro
 	int			segno;
 	char		extent_suffix[65];
 	struct stat statbuf;
+	Size		first_seg_size = 0;
 
 	/*
 	 * Now copy/link any related segments as well. Remember, PG breaks large
@@ -234,16 +243,40 @@ transfer_relfile(FileNameMap *map, const char *type_suffix, bool vm_must_add_fro
 			{
 				/* File does not exist?  That's OK, just return */
 				if (errno == ENOENT)
-					return;
+					return first_seg_size;
 				else
-					pg_fatal("error while checking for file existence \"%s.%s\" (\"%s\" to \"%s\"): %s\n",
-							 map->nspname, map->relname, old_file, new_file,
-							 strerror(errno));
+					goto fatal;
 			}
 
 			/* If file is empty, just return */
 			if (statbuf.st_size == 0)
-				return;
+				return first_seg_size;
+		}
+
+		/* Save size of the first segment of the main fork. */
+
+		else if (map->relpages <= HEAP_FSM_CREATION_THRESHOLD &&
+				 (map->relkind == RELKIND_RELATION ||
+				  map->relkind == RELKIND_TOASTVALUE))
+		{
+			/*
+			 * In this case, if pg_class.relpages is wrong, it's possible
+			 * that a FSM will be skipped when we actually need it.  To guard
+			 * against this, we verify the size of the first segment.
+			 */
+			if (stat(old_file, &statbuf) != 0)
+				goto fatal;
+			else
+				first_seg_size = statbuf.st_size;
+		}
+		else
+		{
+			/*
+			 * For indexes etc., we don't care if pg_class.relpages is wrong,
+			 * since we always transfer their FSMs.  For heaps, we might
+			 * transfer a FSM when we don't need to, but this is harmless.
+			 */
+			first_seg_size = Min(map->relpages, RELSEG_SIZE) * BLCKSZ;
 		}
 
 		unlink(new_file);
@@ -277,4 +310,29 @@ transfer_relfile(FileNameMap *map, const char *type_suffix, bool vm_must_add_fro
 					linkFile(old_file, new_file, map->nspname, map->relname);
 			}
 	}
+
+fatal:
+	pg_fatal("error while checking for file existence \"%s.%s\" (\"%s\" to \"%s\"): %s\n",
+			 map->nspname, map->relname, old_file, new_file,
+			 strerror(errno));
+}
+
+/*
+ * Return false for small heaps if we're upgrading across version 12,
+ * the first where small heap relations don't have FSMs by default.
+ */
+static bool
+new_cluster_needs_fsm(char relkind, Size first_seg_size)
+{
+	if (relkind != RELKIND_RELATION && relkind != RELKIND_TOASTVALUE)
+		return true;
+
+	if (first_seg_size > HEAP_FSM_CREATION_THRESHOLD * BLCKSZ)
+		return true;
+
+	if (GET_MAJOR_VERSION(old_cluster.major_version) <= 1100 &&
+		GET_MAJOR_VERSION(new_cluster.major_version) >= 1200)
+		return false;
+	else
+		return true;
 }
-- 
1.8.3.1

#96John Naylor
john.naylor@2ndquadrant.com
In reply to: Amit Kapila (#95)
1 attachment(s)
Re: WIP: Avoid creation of the free space map for small tables

On Sat, Jan 26, 2019 at 2:14 PM Amit Kapila <amit.kapila16@gmail.com> wrote:

On Sat, Jan 26, 2019 at 5:05 AM John Naylor <john.naylor@2ndquadrant.com> wrote:

So, in v19 we check pg_class.relpages and if it's
a heap and less than or equal the threshold we call stat on the 0th
segment to verify.

Okay, but the way logic is implemented appears clumsy to me.

The function transfer_relfile has no clue about skipping of FSM stuff,
but it contains comments about it.

Yeah, I wasn't entirely happy with how that turned out.

I think there is some value in using the information from
this function to skip fsm files, but the code doesn't appear to fit
well, how about moving this check to new function
new_cluster_needs_fsm()?

For v21, new_cluster_needs_fsm() has all responsibility for obtaining
the info it needs. I think this is much cleaner, but there is a small
bit of code duplication since it now has to form the file name. One
thing we could do is form the the base old/new file names in
transfer_single_new_db() and pass those to transfer_relfile(), which
will only add suffixes and segment numbers. We could then pass the
base old file name to new_cluster_needs_fsm() and use it as is. Not
sure if that's worthwhile, though.

The order in which relkind and relpages is used in the above code is
different from the order in which it is mentioned in the query, it
won't matter, but keeping in order will make look code consistent. I
have made this and some more minor code adjustments in the attached
patch. If you like those, you can include them in the next version of
your patch.

Okay, done.

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

Attachments:

v21-0003-During-pg_upgrade-conditionally-skip-transfer-of.patchtext/x-patch; charset=US-ASCII; name=v21-0003-During-pg_upgrade-conditionally-skip-transfer-of.patchDownload
From 2b70b65f43c05234b81e939b0ed49e34b97d5667 Mon Sep 17 00:00:00 2001
From: John Naylor <jcnaylor@gmail.com>
Date: Sun, 27 Jan 2019 21:42:07 +0100
Subject: [PATCH v21 3/3] During pg_upgrade, conditionally skip transfer of
 FSMs.

If a heap on the old cluster has 4 pages or fewer, and the old cluster
was PG v11 or earlier, don't copy or link the FSM. This will shrink
space usage for installations with large numbers of small tables.
---
 src/bin/pg_upgrade/info.c        | 16 +++++++--
 src/bin/pg_upgrade/pg_upgrade.h  |  6 ++++
 src/bin/pg_upgrade/relfilenode.c | 58 ++++++++++++++++++++++++++++++--
 3 files changed, 76 insertions(+), 4 deletions(-)

diff --git a/src/bin/pg_upgrade/info.c b/src/bin/pg_upgrade/info.c
index 2f925f086c..902bfc647e 100644
--- a/src/bin/pg_upgrade/info.c
+++ b/src/bin/pg_upgrade/info.c
@@ -200,6 +200,8 @@ create_rel_filename_map(const char *old_data, const char *new_data,
 
 	map->old_db_oid = old_db->db_oid;
 	map->new_db_oid = new_db->db_oid;
+	map->relpages = old_rel->relpages;
+	map->relkind = old_rel->relkind;
 
 	/*
 	 * old_relfilenode might differ from pg_class.oid (and hence
@@ -418,6 +420,7 @@ get_rel_infos(ClusterInfo *cluster, DbInfo *dbinfo)
 	char	   *nspname = NULL;
 	char	   *relname = NULL;
 	char	   *tablespace = NULL;
+	char	   *relkind = NULL;
 	int			i_spclocation,
 				i_nspname,
 				i_relname,
@@ -425,7 +428,9 @@ get_rel_infos(ClusterInfo *cluster, DbInfo *dbinfo)
 				i_indtable,
 				i_toastheap,
 				i_relfilenode,
-				i_reltablespace;
+				i_reltablespace,
+				i_relpages,
+				i_relkind;
 	char		query[QUERY_ALLOC];
 	char	   *last_namespace = NULL,
 			   *last_tablespace = NULL;
@@ -494,7 +499,7 @@ get_rel_infos(ClusterInfo *cluster, DbInfo *dbinfo)
 	 */
 	snprintf(query + strlen(query), sizeof(query) - strlen(query),
 			 "SELECT all_rels.*, n.nspname, c.relname, "
-			 "  c.relfilenode, c.reltablespace, %s "
+			 "  c.relfilenode, c.reltablespace, c.relpages, c.relkind, %s "
 			 "FROM (SELECT * FROM regular_heap "
 			 "      UNION ALL "
 			 "      SELECT * FROM toast_heap "
@@ -525,6 +530,8 @@ get_rel_infos(ClusterInfo *cluster, DbInfo *dbinfo)
 	i_relname = PQfnumber(res, "relname");
 	i_relfilenode = PQfnumber(res, "relfilenode");
 	i_reltablespace = PQfnumber(res, "reltablespace");
+	i_relpages = PQfnumber(res, "relpages");
+	i_relkind = PQfnumber(res, "relkind");
 	i_spclocation = PQfnumber(res, "spclocation");
 
 	for (relnum = 0; relnum < ntups; relnum++)
@@ -556,6 +563,11 @@ get_rel_infos(ClusterInfo *cluster, DbInfo *dbinfo)
 		curr->relname = pg_strdup(relname);
 
 		curr->relfilenode = atooid(PQgetvalue(res, relnum, i_relfilenode));
+		curr->relpages = atoi(PQgetvalue(res, relnum, i_relpages));
+
+		relkind = PQgetvalue(res, relnum, i_relkind);
+		curr->relkind = relkind[0];
+
 		curr->tblsp_alloc = false;
 
 		/* Is the tablespace oid non-default? */
diff --git a/src/bin/pg_upgrade/pg_upgrade.h b/src/bin/pg_upgrade/pg_upgrade.h
index 2f67eee22b..baeb8ff0f8 100644
--- a/src/bin/pg_upgrade/pg_upgrade.h
+++ b/src/bin/pg_upgrade/pg_upgrade.h
@@ -147,6 +147,8 @@ typedef struct
 	char	   *tablespace;		/* tablespace path; "" for cluster default */
 	bool		nsp_alloc;		/* should nspname be freed? */
 	bool		tblsp_alloc;	/* should tablespace be freed? */
+	int32		relpages;		/* # of pages -- see pg_class.h */
+	char		relkind;		/* relation kind -- see pg_class.h */
 } RelInfo;
 
 typedef struct
@@ -173,6 +175,10 @@ typedef struct
 	 */
 	Oid			old_relfilenode;
 	Oid			new_relfilenode;
+
+	int32		relpages;		/* # of pages -- see pg_class.h */
+	char		relkind;		/* relation kind -- see pg_class.h */
+
 	/* the rest are used only for logging and error reporting */
 	char	   *nspname;		/* namespaces */
 	char	   *relname;
diff --git a/src/bin/pg_upgrade/relfilenode.c b/src/bin/pg_upgrade/relfilenode.c
index 0c78073f0e..ce9f3ecf83 100644
--- a/src/bin/pg_upgrade/relfilenode.c
+++ b/src/bin/pg_upgrade/relfilenode.c
@@ -14,10 +14,12 @@
 #include <sys/stat.h>
 #include "catalog/pg_class_d.h"
 #include "access/transam.h"
+#include "storage/freespace.h"
 
 
 static void transfer_single_new_db(FileNameMap *maps, int size, char *old_tablespace);
 static void transfer_relfile(FileNameMap *map, const char *suffix, bool vm_must_add_frozenbit);
+static bool new_cluster_needs_fsm(FileNameMap *map);
 
 
 /*
@@ -172,9 +174,13 @@ transfer_single_new_db(FileNameMap *maps, int size, char *old_tablespace)
 			if (GET_MAJOR_VERSION(old_cluster.major_version) >= 804)
 			{
 				/*
-				 * Copy/link any fsm and vm files, if they exist
+				 * Transfer any FSM files if they would be created in the
+				 * new cluster.
 				 */
-				transfer_relfile(&maps[mapnum], "_fsm", vm_must_add_frozenbit);
+				if (new_cluster_needs_fsm(&maps[mapnum]))
+					transfer_relfile(&maps[mapnum], "_fsm", vm_must_add_frozenbit);
+
+				/* Transfer any VM files if we can trust their contents. */
 				if (vm_crashsafe_match)
 					transfer_relfile(&maps[mapnum], "_vm", vm_must_add_frozenbit);
 			}
@@ -278,3 +284,51 @@ transfer_relfile(FileNameMap *map, const char *type_suffix, bool vm_must_add_fro
 			}
 	}
 }
+
+/*
+ * Return false for small heaps if we're upgrading across version 12,
+ * the first where small heap relations don't have FSMs by default.
+ */
+static bool
+new_cluster_needs_fsm(FileNameMap *map)
+{
+	char		old_primary_file[MAXPGPATH];
+	struct stat statbuf;
+
+	if (!(GET_MAJOR_VERSION(old_cluster.major_version) <= 1100 &&
+		GET_MAJOR_VERSION(new_cluster.major_version) >= 1200))
+		return true;
+
+	/* Always transfer FSMs of non-heap relations. */
+	if (map->relkind != RELKIND_RELATION &&
+		map->relkind != RELKIND_TOASTVALUE)
+		return true;
+
+	/*
+	 * If pg_class.relpages falsely reports that the heap is above the
+	 * threshold, we will transfer a FSM when we don't need to, but this
+	 * is harmless.
+	 */
+	if (map->relpages > HEAP_FSM_CREATION_THRESHOLD)
+		return true;
+
+	/* Determine file name of the first segment of the main fork. */
+	snprintf(old_primary_file, sizeof(old_primary_file), "%s%s/%u/%u",
+			 map->old_tablespace,
+			 map->old_tablespace_suffix,
+			 map->old_db_oid,
+			 map->old_relfilenode);
+
+	/*
+	 * If pg_class.relpages falsely reports that the heap is below the
+	 * threshold, a FSM would be skipped when we actually need it.  To guard
+	 * against this, we verify the size of the first segment.
+	 */
+	if (stat(old_primary_file, &statbuf) != 0)
+		pg_fatal("error while checking for file existence \"%s.%s\" (\"%s\"): %s\n",
+				 map->nspname, map->relname, old_primary_file, strerror(errno));
+	else if (statbuf.st_size > HEAP_FSM_CREATION_THRESHOLD * BLCKSZ)
+		return true;
+	else
+		return false;
+}
-- 
2.17.1

#97Amit Kapila
amit.kapila16@gmail.com
In reply to: Amit Kapila (#88)
Re: WIP: Avoid creation of the free space map for small tables

On Thu, Jan 24, 2019 at 9:14 AM Amit Kapila <amit.kapila16@gmail.com> wrote:

Sure, apart from this I have run pgindent on the patches and make some
changes accordingly. Latest patches attached (only second patch has
some changes). I will take one more pass on Monday morning (28th Jan)
and will commit unless you or others see any problem.

Pushed these two patches.

--
With Regards,
Amit Kapila.
EnterpriseDB: http://www.enterprisedb.com

#98John Naylor
john.naylor@2ndquadrant.com
In reply to: Amit Kapila (#97)
Re: WIP: Avoid creation of the free space map for small tables

On Mon, Jan 28, 2019 at 3:53 AM Amit Kapila <amit.kapila16@gmail.com> wrote:

On Thu, Jan 24, 2019 at 9:14 AM Amit Kapila <amit.kapila16@gmail.com> wrote:

Sure, apart from this I have run pgindent on the patches and make some
changes accordingly. Latest patches attached (only second patch has
some changes). I will take one more pass on Monday morning (28th Jan)
and will commit unless you or others see any problem.

Pushed these two patches.

Thank you for your input and detailed review! Thank you Mithun for testing!

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

#99Amit Kapila
amit.kapila16@gmail.com
In reply to: John Naylor (#98)
Re: WIP: Avoid creation of the free space map for small tables

On Mon, Jan 28, 2019 at 9:16 AM John Naylor <john.naylor@2ndquadrant.com> wrote:

On Mon, Jan 28, 2019 at 3:53 AM Amit Kapila <amit.kapila16@gmail.com> wrote:

On Thu, Jan 24, 2019 at 9:14 AM Amit Kapila <amit.kapila16@gmail.com> wrote:

Sure, apart from this I have run pgindent on the patches and make some
changes accordingly. Latest patches attached (only second patch has
some changes). I will take one more pass on Monday morning (28th Jan)
and will commit unless you or others see any problem.

Pushed these two patches.

Thank you for your input and detailed review! Thank you Mithun for testing!

There are a few buildfarm failures due to this commit, see my email on
pgsql-committers. If you have time, you can also once look into
those.

--
With Regards,
Amit Kapila.
EnterpriseDB: http://www.enterprisedb.com

#100John Naylor
john.naylor@2ndquadrant.com
In reply to: Amit Kapila (#99)
Re: WIP: Avoid creation of the free space map for small tables

On Mon, Jan 28, 2019 at 4:53 AM Amit Kapila <amit.kapila16@gmail.com> wrote:

There are a few buildfarm failures due to this commit, see my email on
pgsql-committers. If you have time, you can also once look into
those.

I didn't see anything in common with the configs of the failed
members. None have a non-default BLCKSZ that I can see.

Looking at this typical example from woodlouse:

================== pgsql.build/src/test/regress/regression.diffs
==================
--- C:/buildfarm/buildenv/HEAD/pgsql.build/src/test/regress/expected/fsm.out
2019-01-28 04:43:09.031456700 +0100
+++ C:/buildfarm/buildenv/HEAD/pgsql.build/src/test/regress/results/fsm.out
2019-01-28 05:06:20.351100400 +0100
@@ -26,7 +26,7 @@
 pg_relation_size('fsm_check_size', 'fsm') AS fsm_size;
  heap_size | fsm_size
 -----------+----------
-     24576 |        0
+     32768 |        0
 (1 row)

***It seems like the relation extended when the new records should
have gone into block 0.

 -- Extend table with enough blocks to exceed the FSM threshold
@@ -56,7 +56,7 @@
 SELECT pg_relation_size('fsm_check_size', 'fsm') AS fsm_size;
  fsm_size
 ----------
-    16384
+    24576
 (1 row)

***And here it seems vacuum didn't truncate the FSM. I wonder if the
heap didn't get truncated either.

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

#101Amit Kapila
amit.kapila16@gmail.com
In reply to: John Naylor (#100)
Re: WIP: Avoid creation of the free space map for small tables

On Mon, Jan 28, 2019 at 10:03 AM John Naylor
<john.naylor@2ndquadrant.com> wrote:

On Mon, Jan 28, 2019 at 4:53 AM Amit Kapila <amit.kapila16@gmail.com> wrote:

There are a few buildfarm failures due to this commit, see my email on
pgsql-committers. If you have time, you can also once look into
those.

I didn't see anything in common with the configs of the failed
members. None have a non-default BLCKSZ that I can see.

Looking at this typical example from woodlouse:

================== pgsql.build/src/test/regress/regression.diffs
==================
--- C:/buildfarm/buildenv/HEAD/pgsql.build/src/test/regress/expected/fsm.out
2019-01-28 04:43:09.031456700 +0100
+++ C:/buildfarm/buildenv/HEAD/pgsql.build/src/test/regress/results/fsm.out
2019-01-28 05:06:20.351100400 +0100
@@ -26,7 +26,7 @@
pg_relation_size('fsm_check_size', 'fsm') AS fsm_size;
heap_size | fsm_size
-----------+----------
-     24576 |        0
+     32768 |        0
(1 row)

***It seems like the relation extended when the new records should
have gone into block 0.

-- Extend table with enough blocks to exceed the FSM threshold
@@ -56,7 +56,7 @@
SELECT pg_relation_size('fsm_check_size', 'fsm') AS fsm_size;
fsm_size
----------
-    16384
+    24576
(1 row)

***And here it seems vacuum didn't truncate the FSM. I wonder if the
heap didn't get truncated either.

Yeah, it seems to me that vacuum is not able to truncate the relation,
see my latest reply on another thread [1]/messages/by-id/CAA4eK1JntHd7X6dLJVPGYV917HejjhbMKXn9m_RnnCE162LbLA@mail.gmail.com.

[1]: /messages/by-id/CAA4eK1JntHd7X6dLJVPGYV917HejjhbMKXn9m_RnnCE162LbLA@mail.gmail.com

--
With Regards,
Amit Kapila.
EnterpriseDB: http://www.enterprisedb.com

#102Amit Kapila
amit.kapila16@gmail.com
In reply to: John Naylor (#100)
Re: WIP: Avoid creation of the free space map for small tables

On Mon, Jan 28, 2019 at 10:03 AM John Naylor
<john.naylor@2ndquadrant.com> wrote:

On Mon, Jan 28, 2019 at 4:53 AM Amit Kapila <amit.kapila16@gmail.com> wrote:

There are a few buildfarm failures due to this commit, see my email on
pgsql-committers. If you have time, you can also once look into
those.

I didn't see anything in common with the configs of the failed
members. None have a non-default BLCKSZ that I can see.

I have done an analysis of the different failures on buildfarm.

1.
@@ -26,7 +26,7 @@
 pg_relation_size('fsm_check_size', 'fsm') AS fsm_size;
  heap_size | fsm_size
 -----------+----------
-     24576 |        0
+     32768 |        0
 (1 row)
 -- Extend table with enough blocks to exceed the FSM threshold
@@ -56,7 +56,7 @@
 SELECT pg_relation_size('fsm_check_size', 'fsm') AS fsm_size;
  fsm_size
 ----------
-    16384
+    24576
 (1 row)

As discussed on another thread, this seems to be due to the reason
that a parallel auto-analyze doesn't allow vacuum to remove dead-row
versions. To fix this, I think we should avoid having a dependency on
vacuum to remove dead rows.

2.
@@ -15,13 +15,9 @@
 SELECT octet_length(get_raw_page('test_rel_forks', 'main', 100)) AS main_100;
 ERROR:  block number 100 is out of range for relation "test_rel_forks"
 SELECT octet_length(get_raw_page('test_rel_forks', 'fsm', 0)) AS fsm_0;
- fsm_0
--------
-  8192
-(1 row)
-
+ERROR:  could not open file "base/50769/50798_fsm": No such file or directory
 SELECT octet_length(get_raw_page('test_rel_forks', 'fsm', 10)) AS fsm_10;
-ERROR:  block number 10 is out of range for relation "test_rel_forks"
+ERROR:  could not open file "base/50769/50798_fsm": No such file or directory

This indicates that even though the Vacuum is executed, but the FSM
doesn't get created. This could be due to different BLCKSZ, but the
failed machines don't seem to have a non-default value of it. I am
not sure why this could happen, maybe we need to check once in the
failed regression database to see the size of relation?

3. Failure on 'mantid'
2019-01-28 00:13:55.191 EST [123979] 001_pgbench_with_server.pl LOG:
statement: CREATE UNLOGGED TABLE insert_tbl (id
serial primary key);
2019-01-28 00:13:55.218 EST [123982] 001_pgbench_with_server.pl LOG:
execute P0_0: INSERT INTO insert_tbl SELECT
FROM generate_series(1,1000);
2019-01-28 00:13:55.219 EST [123983] 001_pgbench_with_server.pl LOG:
execute P0_0: INSERT INTO insert_tbl SELECT
FROM generate_series(1,1000);
2019-01-28 00:13:55.220 EST [123984] 001_pgbench_with_server.pl LOG:
execute P0_0: INSERT INTO insert_tbl SELECT
FROM generate_series(1,1000);
..
..
TRAP: FailedAssertion("!((rel->rd_rel->relkind == 'r' ||
rel->rd_rel->relkind == 't') && fsm_local_map.map[oldPage] == 0x01)",
File: "freespace.c", Line: 223)

I think this can happen if we forget to clear the local map after we
get the block with space in function RelationGetBufferForTuple(). I
see the race condition in the code where that can happen. Say, we
tried all the blocks in the local map and then tried to extend the
relation and we didn't get ConditionalLockRelationForExtension, in the
meantime, another backend has extended the relation and updated the
FSM (via RelationAddExtraBlocks). Now, when the backend that didn't
get the extension lock will get the target block from FSM which will
be greater than HEAP_FSM_CREATION_THRESHOLD. Next, it will find that
the block can be used to insert a new row and return the buffer, but
won't clear the local map due to below condition in code:

@@ -377,20 +383,9 @@ RelationGetBufferForTuple(Relation relation, Size len,
+
+ /*
+ * In case we used an in-memory map of available blocks, reset it
+ * for next use.
+ */
+ if (targetBlock < HEAP_FSM_CREATION_THRESHOLD)
+ FSMClearLocalMap();
+

I think here you need to clear the map if it exists or clear it
unconditionally, the earlier one would be better.

This test gets executed concurrently by 5 clients, so it can hit the
above race condition.

4.  Failure on jacana:
--- c:/mingw/msys/1.0/home/pgrunner/bf/root/HEAD/pgsql.build/../pgsql/src/test/regress/expected/box.out
2018-09-26
17:53:33 -0400
+++ c:/mingw/msys/1.0/home/pgrunner/bf/root/HEAD/pgsql.build/src/test/regress/results/box.out
2019-01-27 23:14:35
-0500
@@ -252,332 +252,7 @@
     ('(0,100)(0,infinity)'),
     ('(-infinity,0)(0,infinity)'),
     ('(-infinity,-infinity)(infinity,infinity)');
-SET enable_seqscan = false;
-SELECT * FROM box_temp WHERE f1 << '(10,20),(30,40)';
..
..
TRAP: FailedAssertion("!(!(fsm_local_map.nblocks > 0))", File:
"c:/mingw/msys/1.0/home/pgrunner/bf/root/HEAD/pgsql.build/../pgsql/src/backend/storage/freespace/freespace.c",
Line:
1118)
..
2019-01-27 23:14:35.495 EST [5c4e81a0.2e28:4] LOG:  server process
(PID 14388) exited with exit code 3
2019-01-27 23:14:35.495 EST [5c4e81a0.2e28:5] DETAIL:  Failed process
was running: INSERT INTO box_temp
VALUES (NULL),

I think the reason for this failure is same as previous (as mentioned
in point-3), but this can happen in a different way. Say, we have
searched the local map and then try to extend a relation 'X' and in
the meantime, another backend has extended such that it creates FSM.
Now, we will reuse that page and won't clear local map. Now, say we
try to insert in relation 'Y' which doesn't have FSM. It will try to
set the local map and will find that it already exists, so will fail.
Now, the question is how it can happen in this box.sql test. I guess
that is happening for some system table which is being populated by
Create Index statement executed just before the failing Insert.

I think both 3 and 4 are timing issues, so we didn't got in our local
regression runs.

--
With Regards,
Amit Kapila.
EnterpriseDB: http://www.enterprisedb.com

#103Amit Kapila
amit.kapila16@gmail.com
In reply to: Amit Kapila (#102)
Re: WIP: Avoid creation of the free space map for small tables

On Mon, Jan 28, 2019 at 4:40 PM Amit Kapila <amit.kapila16@gmail.com> wrote:

On Mon, Jan 28, 2019 at 10:03 AM John Naylor
<john.naylor@2ndquadrant.com> wrote:

On Mon, Jan 28, 2019 at 4:53 AM Amit Kapila <amit.kapila16@gmail.com>

wrote:

There are a few buildfarm failures due to this commit, see my email on
pgsql-committers. If you have time, you can also once look into
those.

I didn't see anything in common with the configs of the failed
members. None have a non-default BLCKSZ that I can see.

I have done an analysis of the different failures on buildfarm.

2.
@@ -15,13 +15,9 @@
SELECT octet_length(get_raw_page('test_rel_forks', 'main', 100)) AS

main_100;

ERROR:  block number 100 is out of range for relation "test_rel_forks"
SELECT octet_length(get_raw_page('test_rel_forks', 'fsm', 0)) AS fsm_0;
- fsm_0
--------
-  8192
-(1 row)
-
+ERROR:  could not open file "base/50769/50798_fsm": No such file or

directory

SELECT octet_length(get_raw_page('test_rel_forks', 'fsm', 10)) AS fsm_10;
-ERROR:  block number 10 is out of range for relation "test_rel_forks"
+ERROR:  could not open file "base/50769/50798_fsm": No such file or

directory

This indicates that even though the Vacuum is executed, but the FSM
doesn't get created. This could be due to different BLCKSZ, but the
failed machines don't seem to have a non-default value of it. I am
not sure why this could happen, maybe we need to check once in the
failed regression database to see the size of relation?

This symptom is shown in the below buildfarm critters:

https://buildfarm.postgresql.org/cgi-bin/show_log.pl?nm=prairiedog&amp;dt=2019-01-28%2005%3A05%3A22
https://buildfarm.postgresql.org/cgi-bin/show_log.pl?nm=lapwing&amp;dt=2019-01-28%2003%3A20%3A02
https://buildfarm.postgresql.org/cgi-bin/show_log.pl?nm=locust&amp;dt=2019-01-28%2003%3A13%3A47
https://buildfarm.postgresql.org/cgi-bin/show_log.pl?nm=dromedary&amp;dt=2019-01-28%2003%3A07%3A39

All of these seems to run with fsync=off. Is it possible that vacuum has
updated FSM, but the same is not synced to disk and when we try to read it,
we didn't get the required page? This is just a guess.

I have checked all the buildfarm failures and I see only 4 symptoms for
which I have sent some initial analysis. I think you can also once
cross-verify the same.

--
With Regards,
Amit Kapila.
EnterpriseDB: http://www.enterprisedb.com

#104Andrew Gierth
andrew@tao11.riddles.org.uk
In reply to: Amit Kapila (#103)
Re: WIP: Avoid creation of the free space map for small tables

"Amit" == Amit Kapila <amit.kapila16@gmail.com> writes:

Amit> All of these seems to run with fsync=off. Is it possible that
Amit> vacuum has updated FSM, but the same is not synced to disk and
Amit> when we try to read it, we didn't get the required page?

No.

fsync never affects what programs see while the system is running, only
what happens after an OS crash.

--
Andrew (irc:RhodiumToad)

#105John Naylor
john.naylor@2ndquadrant.com
In reply to: Amit Kapila (#102)
Re: WIP: Avoid creation of the free space map for small tables

On Mon, Jan 28, 2019 at 12:10 PM Amit Kapila <amit.kapila16@gmail.com> wrote:

On Mon, Jan 28, 2019 at 10:03 AM John Naylor
<john.naylor@2ndquadrant.com> wrote:

1.
@@ -26,7 +26,7 @@
pg_relation_size('fsm_check_size', 'fsm') AS fsm_size;
heap_size | fsm_size
-----------+----------
-     24576 |        0
+     32768 |        0
(1 row)
-- Extend table with enough blocks to exceed the FSM threshold
@@ -56,7 +56,7 @@
SELECT pg_relation_size('fsm_check_size', 'fsm') AS fsm_size;
fsm_size
----------
-    16384
+    24576
(1 row)

As discussed on another thread, this seems to be due to the reason
that a parallel auto-analyze doesn't allow vacuum to remove dead-row
versions. To fix this, I think we should avoid having a dependency on
vacuum to remove dead rows.

Ok, to make the first test here more reliable I will try Andrew's idea
to use fillfactor to save free space. As I said earlier, I think that
second test isn't helpful and can be dropped.

2.
@@ -15,13 +15,9 @@
SELECT octet_length(get_raw_page('test_rel_forks', 'main', 100)) AS main_100;
ERROR:  block number 100 is out of range for relation "test_rel_forks"
SELECT octet_length(get_raw_page('test_rel_forks', 'fsm', 0)) AS fsm_0;
- fsm_0
--------
-  8192
-(1 row)
-
+ERROR:  could not open file "base/50769/50798_fsm": No such file or directory
SELECT octet_length(get_raw_page('test_rel_forks', 'fsm', 10)) AS fsm_10;
-ERROR:  block number 10 is out of range for relation "test_rel_forks"
+ERROR:  could not open file "base/50769/50798_fsm": No such file or directory

This indicates that even though the Vacuum is executed, but the FSM
doesn't get created. This could be due to different BLCKSZ, but the
failed machines don't seem to have a non-default value of it. I am
not sure why this could happen, maybe we need to check once in the
failed regression database to see the size of relation?

I'm also having a hard time imagining why this failed. Just in case,
we could return ctid in a plpgsql loop and stop as soon as we see the
5th block. I've done that for some tests during development and is a
safer method anyway.

<timing failures in 3 and 4>

@@ -377,20 +383,9 @@ RelationGetBufferForTuple(Relation relation, Size len,
+
+ /*
+ * In case we used an in-memory map of available blocks, reset it
+ * for next use.
+ */
+ if (targetBlock < HEAP_FSM_CREATION_THRESHOLD)
+ FSMClearLocalMap();
+

I think here you need to clear the map if it exists or clear it
unconditionally, the earlier one would be better.

Ok, maybe all callers should call it unconditonally, but within the
function, check "if (FSM_LOCAL_MAP_EXISTS)"?

Thanks for investigating the failures -- I'm a bit pressed for time this week.

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

#106Amit Kapila
amit.kapila16@gmail.com
In reply to: John Naylor (#105)
1 attachment(s)
Re: WIP: Avoid creation of the free space map for small tables

On Tue, Jan 29, 2019 at 12:37 AM John Naylor
<john.naylor@2ndquadrant.com> wrote:

On Mon, Jan 28, 2019 at 12:10 PM Amit Kapila <amit.kapila16@gmail.com> wrote:

2.
@@ -15,13 +15,9 @@
SELECT octet_length(get_raw_page('test_rel_forks', 'main', 100)) AS main_100;
ERROR:  block number 100 is out of range for relation "test_rel_forks"
SELECT octet_length(get_raw_page('test_rel_forks', 'fsm', 0)) AS fsm_0;
- fsm_0
--------
-  8192
-(1 row)
-
+ERROR:  could not open file "base/50769/50798_fsm": No such file or directory
SELECT octet_length(get_raw_page('test_rel_forks', 'fsm', 10)) AS fsm_10;
-ERROR:  block number 10 is out of range for relation "test_rel_forks"
+ERROR:  could not open file "base/50769/50798_fsm": No such file or directory

This indicates that even though the Vacuum is executed, but the FSM
doesn't get created. This could be due to different BLCKSZ, but the
failed machines don't seem to have a non-default value of it. I am
not sure why this could happen, maybe we need to check once in the
failed regression database to see the size of relation?

I'm also having a hard time imagining why this failed. Just in case,
we could return ctid in a plpgsql loop and stop as soon as we see the
5th block. I've done that for some tests during development and is a
safer method anyway.

I think we can devise some concrete way, but it is better first we try
to understand why it failed, otherwise there is always a chance that
we will repeat the mistake in some other case. I think we have no
other choice, but to request the buildfarm owners to either give us
the access to see what happens or help us in investigating the
problem. The four buildfarms where it failed were lapwing, locust,
dromedary, prairiedog. Among these, the owner of last two is Tom
Lane and others I don't recognize. Tom, Andrew, can you help us in
getting the access of one of those four? Yet another alternative is
the owner can apply the patch attached (this is same what got
committed) or reset to commit ac88d2962a and execute below statements
and share the results:

CREATE EXTENSION pageinspect;

CREATE TABLE test_rel_forks (a int);
INSERT INTO test_rel_forks SELECT i from generate_series(1,1000) i;
VACUUM test_rel_forks;
SELECT octet_length(get_raw_page('test_rel_forks', 'main', 0)) AS main_0;
SELECT octet_length(get_raw_page('test_rel_forks', 'main', 100)) AS main_100;

SELECT octet_length(get_raw_page('test_rel_forks', 'fsm', 0)) AS fsm_0;
SELECT octet_length(get_raw_page('test_rel_forks', 'fsm', 10)) AS fsm_10;

SELECT octet_length(get_raw_page('test_rel_forks', 'vm', 0)) AS vm_0;
SELECT octet_length(get_raw_page('test_rel_forks', 'vm', 1)) AS vm_1;

If the above statements give error: "ERROR: could not open file ...", then run:
Analyze test_rel_forks;
Select oid, relname, relpages, reltuples from pg_class where relname
like 'test%';

The result of the above tests will tell us whether there are 5 pages
in the table or not. If the table contains 5 pages and throws an
error, then there is some bug in our code, otherwise, there is
something specific to those systems where the above insert doesn't
result in 5 pages.

I think here you need to clear the map if it exists or clear it
unconditionally, the earlier one would be better.

Ok, maybe all callers should call it unconditonally, but within the
function, check "if (FSM_LOCAL_MAP_EXISTS)"?

Sounds sensible. I think we should try to reproduce these failures,
for ex. for pgbench failure, we can try the same test with more
clients.

--
With Regards,
Amit Kapila.
EnterpriseDB: http://www.enterprisedb.com

Attachments:

v18-0002-Avoid-creation-of-the-free-space-map-for-small-heap-.patchapplication/octet-stream; name=v18-0002-Avoid-creation-of-the-free-space-map-for-small-heap-.patchDownload
From ee75d813dc4395d9715f4ce00280613b47ec8b4f Mon Sep 17 00:00:00 2001
From: Amit Kapila <akapila@postgresql.org>
Date: Thu, 24 Jan 2019 09:00:01 +0530
Subject: [PATCH 2/2] Avoid creation of the free space map for small heap
 relations.

Previously, all heaps had FSMs. For very small tables, this means that the
FSM took up more space than the heap did. This is wasteful, so now we
refrain from creating the FSM for heaps with 4 pages or fewer. If the last
known target block has insufficient space, we still try to insert into some
other page before giving up and extending the relation, since doing
otherwise leads to table bloat. Testing showed that trying every page
penalized performance slightly, so we compromise and try every other page.
This way, we visit at most two pages. Any pages with wasted free space
become visible at next relation extension, so we still control table bloat.
As a bonus, directly attempting one or two pages can even be faster than
consulting the FSM would have been.

Once the FSM is created for a heap we don't remove it even if somebody
deletes all the rows from the corresponding relation.  We don't think it is
a useful optimization as it is quite likely that relation will again grow to
the same size.

Author: John Naylor with design inputs and some code contribution by Amit Kapila
Reviewed-by: Amit Kapila
Tested-by: Mithun C Y
Discussion: https://www.postgresql.org/message-id/CAJVSVGWvB13PzpbLEecFuGFc5V2fsO736BsdTakPiPAcdMM5tQ@mail.gmail.com
---
 contrib/pageinspect/expected/page.out     |  77 ++++-----
 contrib/pageinspect/sql/page.sql          |  33 ++--
 doc/src/sgml/storage.sgml                 |  13 +-
 src/backend/access/brin/brin.c            |   2 +-
 src/backend/access/brin/brin_pageops.c    |  10 +-
 src/backend/access/heap/hio.c             |  47 +++--
 src/backend/access/heap/vacuumlazy.c      |  17 +-
 src/backend/access/transam/xact.c         |  14 ++
 src/backend/storage/freespace/README      |  38 ++++-
 src/backend/storage/freespace/freespace.c | 275 +++++++++++++++++++++++++++++-
 src/backend/storage/freespace/indexfsm.c  |   6 +-
 src/include/storage/freespace.h           |   9 +-
 src/test/regress/expected/fsm.out         |  75 ++++++++
 src/test/regress/parallel_schedule        |   6 +
 src/test/regress/serial_schedule          |   1 +
 src/test/regress/sql/fsm.sql              |  55 ++++++
 16 files changed, 576 insertions(+), 102 deletions(-)
 create mode 100644 src/test/regress/expected/fsm.out
 create mode 100644 src/test/regress/sql/fsm.sql

diff --git a/contrib/pageinspect/expected/page.out b/contrib/pageinspect/expected/page.out
index 3fcd9fb..11d56f4 100644
--- a/contrib/pageinspect/expected/page.out
+++ b/contrib/pageinspect/expected/page.out
@@ -1,48 +1,69 @@
 CREATE EXTENSION pageinspect;
-CREATE TABLE test1 (a int, b int);
-INSERT INTO test1 VALUES (16777217, 131584);
-VACUUM test1;  -- set up FSM
+CREATE TABLE test_rel_forks (a int);
+-- Make sure there are enough blocks in the heap for the FSM to be created.
+INSERT INTO test_rel_forks SELECT i from generate_series(1,1000) i;
+-- set up FSM and VM
+VACUUM test_rel_forks;
 -- The page contents can vary, so just test that it can be read
 -- successfully, but don't keep the output.
-SELECT octet_length(get_raw_page('test1', 'main', 0)) AS main_0;
+SELECT octet_length(get_raw_page('test_rel_forks', 'main', 0)) AS main_0;
  main_0 
 --------
    8192
 (1 row)
 
-SELECT octet_length(get_raw_page('test1', 'main', 1)) AS main_1;
-ERROR:  block number 1 is out of range for relation "test1"
-SELECT octet_length(get_raw_page('test1', 'fsm', 0)) AS fsm_0;
+SELECT octet_length(get_raw_page('test_rel_forks', 'main', 100)) AS main_100;
+ERROR:  block number 100 is out of range for relation "test_rel_forks"
+SELECT octet_length(get_raw_page('test_rel_forks', 'fsm', 0)) AS fsm_0;
  fsm_0 
 -------
   8192
 (1 row)
 
-SELECT octet_length(get_raw_page('test1', 'fsm', 1)) AS fsm_1;
- fsm_1 
--------
-  8192
-(1 row)
-
-SELECT octet_length(get_raw_page('test1', 'vm', 0)) AS vm_0;
+SELECT octet_length(get_raw_page('test_rel_forks', 'fsm', 10)) AS fsm_10;
+ERROR:  block number 10 is out of range for relation "test_rel_forks"
+SELECT octet_length(get_raw_page('test_rel_forks', 'vm', 0)) AS vm_0;
  vm_0 
 ------
  8192
 (1 row)
 
-SELECT octet_length(get_raw_page('test1', 'vm', 1)) AS vm_1;
-ERROR:  block number 1 is out of range for relation "test1"
+SELECT octet_length(get_raw_page('test_rel_forks', 'vm', 1)) AS vm_1;
+ERROR:  block number 1 is out of range for relation "test_rel_forks"
 SELECT octet_length(get_raw_page('xxx', 'main', 0));
 ERROR:  relation "xxx" does not exist
-SELECT octet_length(get_raw_page('test1', 'xxx', 0));
+SELECT octet_length(get_raw_page('test_rel_forks', 'xxx', 0));
 ERROR:  invalid fork name
 HINT:  Valid fork names are "main", "fsm", "vm", and "init".
-SELECT get_raw_page('test1', 0) = get_raw_page('test1', 'main', 0);
+SELECT * FROM fsm_page_contents(get_raw_page('test_rel_forks', 'fsm', 0));
+ fsm_page_contents 
+-------------------
+ 0: 147           +
+ 1: 147           +
+ 3: 147           +
+ 7: 147           +
+ 15: 147          +
+ 31: 147          +
+ 63: 147          +
+ 127: 147         +
+ 255: 147         +
+ 511: 147         +
+ 1023: 147        +
+ 2047: 147        +
+ 4095: 147        +
+ fp_next_slot: 0  +
+ 
+(1 row)
+
+SELECT get_raw_page('test_rel_forks', 0) = get_raw_page('test_rel_forks', 'main', 0);
  ?column? 
 ----------
  t
 (1 row)
 
+DROP TABLE test_rel_forks;
+CREATE TABLE test1 (a int, b int);
+INSERT INTO test1 VALUES (16777217, 131584);
 SELECT pagesize, version FROM page_header(get_raw_page('test1', 0));
  pagesize | version 
 ----------+---------
@@ -62,26 +83,6 @@ SELECT tuple_data_split('test1'::regclass, t_data, t_infomask, t_infomask2, t_bi
  {"\\x01000001","\\x00020200"}
 (1 row)
 
-SELECT * FROM fsm_page_contents(get_raw_page('test1', 'fsm', 0));
- fsm_page_contents 
--------------------
- 0: 254           +
- 1: 254           +
- 3: 254           +
- 7: 254           +
- 15: 254          +
- 31: 254          +
- 63: 254          +
- 127: 254         +
- 255: 254         +
- 511: 254         +
- 1023: 254        +
- 2047: 254        +
- 4095: 254        +
- fp_next_slot: 0  +
- 
-(1 row)
-
 DROP TABLE test1;
 -- check that using any of these functions with a partitioned table or index
 -- would fail
diff --git a/contrib/pageinspect/sql/page.sql b/contrib/pageinspect/sql/page.sql
index 8ac9991..0ff1f1a 100644
--- a/contrib/pageinspect/sql/page.sql
+++ b/contrib/pageinspect/sql/page.sql
@@ -1,26 +1,35 @@
 CREATE EXTENSION pageinspect;
 
-CREATE TABLE test1 (a int, b int);
-INSERT INTO test1 VALUES (16777217, 131584);
+CREATE TABLE test_rel_forks (a int);
+-- Make sure there are enough blocks in the heap for the FSM to be created.
+INSERT INTO test_rel_forks SELECT i from generate_series(1,1000) i;
 
-VACUUM test1;  -- set up FSM
+-- set up FSM and VM
+VACUUM test_rel_forks;
 
 -- The page contents can vary, so just test that it can be read
 -- successfully, but don't keep the output.
 
-SELECT octet_length(get_raw_page('test1', 'main', 0)) AS main_0;
-SELECT octet_length(get_raw_page('test1', 'main', 1)) AS main_1;
+SELECT octet_length(get_raw_page('test_rel_forks', 'main', 0)) AS main_0;
+SELECT octet_length(get_raw_page('test_rel_forks', 'main', 100)) AS main_100;
 
-SELECT octet_length(get_raw_page('test1', 'fsm', 0)) AS fsm_0;
-SELECT octet_length(get_raw_page('test1', 'fsm', 1)) AS fsm_1;
+SELECT octet_length(get_raw_page('test_rel_forks', 'fsm', 0)) AS fsm_0;
+SELECT octet_length(get_raw_page('test_rel_forks', 'fsm', 10)) AS fsm_10;
 
-SELECT octet_length(get_raw_page('test1', 'vm', 0)) AS vm_0;
-SELECT octet_length(get_raw_page('test1', 'vm', 1)) AS vm_1;
+SELECT octet_length(get_raw_page('test_rel_forks', 'vm', 0)) AS vm_0;
+SELECT octet_length(get_raw_page('test_rel_forks', 'vm', 1)) AS vm_1;
 
 SELECT octet_length(get_raw_page('xxx', 'main', 0));
-SELECT octet_length(get_raw_page('test1', 'xxx', 0));
+SELECT octet_length(get_raw_page('test_rel_forks', 'xxx', 0));
+
+SELECT * FROM fsm_page_contents(get_raw_page('test_rel_forks', 'fsm', 0));
+
+SELECT get_raw_page('test_rel_forks', 0) = get_raw_page('test_rel_forks', 'main', 0);
 
-SELECT get_raw_page('test1', 0) = get_raw_page('test1', 'main', 0);
+DROP TABLE test_rel_forks;
+
+CREATE TABLE test1 (a int, b int);
+INSERT INTO test1 VALUES (16777217, 131584);
 
 SELECT pagesize, version FROM page_header(get_raw_page('test1', 0));
 
@@ -29,8 +38,6 @@ SELECT page_checksum(get_raw_page('test1', 0), 0) IS NOT NULL AS silly_checksum_
 SELECT tuple_data_split('test1'::regclass, t_data, t_infomask, t_infomask2, t_bits)
     FROM heap_page_items(get_raw_page('test1', 0));
 
-SELECT * FROM fsm_page_contents(get_raw_page('test1', 'fsm', 0));
-
 DROP TABLE test1;
 
 -- check that using any of these functions with a partitioned table or index
diff --git a/doc/src/sgml/storage.sgml b/doc/src/sgml/storage.sgml
index 8ef2ac8..cbdad0c 100644
--- a/doc/src/sgml/storage.sgml
+++ b/doc/src/sgml/storage.sgml
@@ -590,12 +590,13 @@ tuple would otherwise be too big.
 <indexterm><primary>FSM</primary><see>Free Space Map</see></indexterm>
 
 <para>
-Each heap and index relation, except for hash indexes, has a Free Space Map
-(FSM) to keep track of available space in the relation. It's stored
-alongside the main relation data in a separate relation fork, named after the
-filenode number of the relation, plus a <literal>_fsm</literal> suffix. For example,
-if the filenode of a relation is 12345, the FSM is stored in a file called
-<filename>12345_fsm</filename>, in the same directory as the main relation file.
+Each heap relation, unless it is very small, and each index relation, except
+for hash indexes, has a Free Space Map (FSM) to keep track of available
+space in the relation. It's stored alongside the main relation data in a
+separate relation fork, named after the filenode number of the relation, plus
+a <literal>_fsm</literal> suffix. For example, if the filenode of a relation
+is 12345, the FSM is stored in a file called <filename>12345_fsm</filename>,
+in the same directory as the main relation file.
 </para>
 
 <para>
diff --git a/src/backend/access/brin/brin.c b/src/backend/access/brin/brin.c
index 467d91e..8f008dd 100644
--- a/src/backend/access/brin/brin.c
+++ b/src/backend/access/brin/brin.c
@@ -1150,7 +1150,7 @@ terminate_brin_buildstate(BrinBuildState *state)
 		freespace = PageGetFreeSpace(page);
 		blk = BufferGetBlockNumber(state->bs_currentInsertBuf);
 		ReleaseBuffer(state->bs_currentInsertBuf);
-		RecordPageWithFreeSpace(state->bs_irel, blk, freespace);
+		RecordPageWithFreeSpace(state->bs_irel, blk, freespace, InvalidBlockNumber);
 		FreeSpaceMapVacuumRange(state->bs_irel, blk, blk + 1);
 	}
 
diff --git a/src/backend/access/brin/brin_pageops.c b/src/backend/access/brin/brin_pageops.c
index 164a468..2eb354f 100644
--- a/src/backend/access/brin/brin_pageops.c
+++ b/src/backend/access/brin/brin_pageops.c
@@ -310,7 +310,7 @@ brin_doupdate(Relation idxrel, BlockNumber pagesPerRange,
 
 		if (extended)
 		{
-			RecordPageWithFreeSpace(idxrel, newblk, freespace);
+			RecordPageWithFreeSpace(idxrel, newblk, freespace, InvalidBlockNumber);
 			FreeSpaceMapVacuumRange(idxrel, newblk, newblk + 1);
 		}
 
@@ -461,7 +461,7 @@ brin_doinsert(Relation idxrel, BlockNumber pagesPerRange,
 
 	if (extended)
 	{
-		RecordPageWithFreeSpace(idxrel, blk, freespace);
+		RecordPageWithFreeSpace(idxrel, blk, freespace, InvalidBlockNumber);
 		FreeSpaceMapVacuumRange(idxrel, blk, blk + 1);
 	}
 
@@ -654,7 +654,7 @@ brin_page_cleanup(Relation idxrel, Buffer buf)
 
 	/* Measure free space and record it */
 	RecordPageWithFreeSpace(idxrel, BufferGetBlockNumber(buf),
-							br_page_get_freespace(page));
+							br_page_get_freespace(page), InvalidBlockNumber);
 }
 
 /*
@@ -703,7 +703,7 @@ brin_getinsertbuffer(Relation irel, Buffer oldbuf, Size itemsz,
 	/* Choose initial target page, re-using existing target if known */
 	newblk = RelationGetTargetBlock(irel);
 	if (newblk == InvalidBlockNumber)
-		newblk = GetPageWithFreeSpace(irel, itemsz);
+		newblk = GetPageWithFreeSpace(irel, itemsz, true);
 
 	/*
 	 * Loop until we find a page with sufficient free space.  By the time we
@@ -895,7 +895,7 @@ brin_initialize_empty_new_buffer(Relation idxrel, Buffer buffer)
 	 * pages whose FSM records were forgotten in a crash.
 	 */
 	RecordPageWithFreeSpace(idxrel, BufferGetBlockNumber(buffer),
-							br_page_get_freespace(page));
+							br_page_get_freespace(page), InvalidBlockNumber);
 }
 
 
diff --git a/src/backend/access/heap/hio.c b/src/backend/access/heap/hio.c
index 3da0b49..4c3e774 100644
--- a/src/backend/access/heap/hio.c
+++ b/src/backend/access/heap/hio.c
@@ -239,8 +239,14 @@ RelationAddExtraBlocks(Relation relation, BulkInsertState bistate)
 		 * Immediately update the bottom level of the FSM.  This has a good
 		 * chance of making this page visible to other concurrently inserting
 		 * backends, and we want that to happen without delay.
+		 *
+		 * Since we know the table will end up with extraBlocks additional
+		 * pages, we pass the final number to avoid possible unnecessary
+		 * system calls and to make sure the FSM is created when we add the
+		 * first new page.
 		 */
-		RecordPageWithFreeSpace(relation, blockNum, freespace);
+		RecordPageWithFreeSpace(relation, blockNum, freespace,
+								firstBlock + extraBlocks);
 	}
 	while (--extraBlocks > 0);
 
@@ -377,20 +383,9 @@ RelationGetBufferForTuple(Relation relation, Size len,
 		 * We have no cached target page, so ask the FSM for an initial
 		 * target.
 		 */
-		targetBlock = GetPageWithFreeSpace(relation, len + saveFreeSpace);
-
-		/*
-		 * If the FSM knows nothing of the rel, try the last page before we
-		 * give up and extend.  This avoids one-tuple-per-page syndrome during
-		 * bootstrapping or in a recently-started system.
-		 */
-		if (targetBlock == InvalidBlockNumber)
-		{
-			BlockNumber nblocks = RelationGetNumberOfBlocks(relation);
-
-			if (nblocks > 0)
-				targetBlock = nblocks - 1;
-		}
+		targetBlock = GetPageWithFreeSpace(relation,
+										   len + saveFreeSpace,
+										   false);
 	}
 
 loop:
@@ -484,6 +479,14 @@ loop:
 		{
 			/* use this page as future insert target, too */
 			RelationSetTargetBlock(relation, targetBlock);
+
+			/*
+			 * In case we used an in-memory map of available blocks, reset it
+			 * for next use.
+			 */
+			if (targetBlock < HEAP_FSM_CREATION_THRESHOLD)
+				FSMClearLocalMap();
+
 			return buffer;
 		}
 
@@ -543,9 +546,12 @@ loop:
 
 			/*
 			 * Check if some other backend has extended a block for us while
-			 * we were waiting on the lock.
+			 * we were waiting on the lock.  We only check the FSM -- if there
+			 * isn't one we don't recheck the number of blocks.
 			 */
-			targetBlock = GetPageWithFreeSpace(relation, len + saveFreeSpace);
+			targetBlock = GetPageWithFreeSpace(relation,
+											   len + saveFreeSpace,
+											   true);
 
 			/*
 			 * If some other waiter has already extended the relation, we
@@ -625,5 +631,12 @@ loop:
 	 */
 	RelationSetTargetBlock(relation, BufferGetBlockNumber(buffer));
 
+	/*
+	 * In case we used an in-memory map of available blocks, reset it for next
+	 * use.  We do this unconditionally since after relation extension we
+	 * can't skip this based on the targetBlock.
+	 */
+	FSMClearLocalMap();
+
 	return buffer;
 }
diff --git a/src/backend/access/heap/vacuumlazy.c b/src/backend/access/heap/vacuumlazy.c
index 37aa484..9cfa65c 100644
--- a/src/backend/access/heap/vacuumlazy.c
+++ b/src/backend/access/heap/vacuumlazy.c
@@ -153,7 +153,7 @@ static BufferAccessStrategy vac_strategy;
 static void lazy_scan_heap(Relation onerel, int options,
 			   LVRelStats *vacrelstats, Relation *Irel, int nindexes,
 			   bool aggressive);
-static void lazy_vacuum_heap(Relation onerel, LVRelStats *vacrelstats);
+static void lazy_vacuum_heap(Relation onerel, LVRelStats *vacrelstats, BlockNumber nblocks);
 static bool lazy_check_needs_freeze(Buffer buf, bool *hastup);
 static void lazy_vacuum_index(Relation indrel,
 				  IndexBulkDeleteResult **stats,
@@ -758,7 +758,7 @@ lazy_scan_heap(Relation onerel, int options, LVRelStats *vacrelstats,
 			pgstat_progress_update_multi_param(2, hvp_index, hvp_val);
 
 			/* Remove tuples from heap */
-			lazy_vacuum_heap(onerel, vacrelstats);
+			lazy_vacuum_heap(onerel, vacrelstats, nblocks);
 
 			/*
 			 * Forget the now-vacuumed tuples, and press on, but be careful
@@ -896,7 +896,7 @@ lazy_scan_heap(Relation onerel, int options, LVRelStats *vacrelstats,
 			MarkBufferDirty(buf);
 			UnlockReleaseBuffer(buf);
 
-			RecordPageWithFreeSpace(onerel, blkno, freespace);
+			RecordPageWithFreeSpace(onerel, blkno, freespace, nblocks);
 			continue;
 		}
 
@@ -935,7 +935,7 @@ lazy_scan_heap(Relation onerel, int options, LVRelStats *vacrelstats,
 			}
 
 			UnlockReleaseBuffer(buf);
-			RecordPageWithFreeSpace(onerel, blkno, freespace);
+			RecordPageWithFreeSpace(onerel, blkno, freespace, nblocks);
 			continue;
 		}
 
@@ -1332,7 +1332,7 @@ lazy_scan_heap(Relation onerel, int options, LVRelStats *vacrelstats,
 		 * taken if there are no indexes.)
 		 */
 		if (vacrelstats->num_dead_tuples == prev_dead_count)
-			RecordPageWithFreeSpace(onerel, blkno, freespace);
+			RecordPageWithFreeSpace(onerel, blkno, freespace, nblocks);
 	}
 
 	/* report that everything is scanned and vacuumed */
@@ -1394,7 +1394,7 @@ lazy_scan_heap(Relation onerel, int options, LVRelStats *vacrelstats,
 		/* Remove tuples from heap */
 		pgstat_progress_update_param(PROGRESS_VACUUM_PHASE,
 									 PROGRESS_VACUUM_PHASE_VACUUM_HEAP);
-		lazy_vacuum_heap(onerel, vacrelstats);
+		lazy_vacuum_heap(onerel, vacrelstats, nblocks);
 		vacrelstats->num_index_scans++;
 	}
 
@@ -1465,9 +1465,10 @@ lazy_scan_heap(Relation onerel, int options, LVRelStats *vacrelstats,
  * Note: the reason for doing this as a second pass is we cannot remove
  * the tuples until we've removed their index entries, and we want to
  * process index entry removal in batches as large as possible.
+ * Note: nblocks is passed as an optimization for RecordPageWithFreeSpace().
  */
 static void
-lazy_vacuum_heap(Relation onerel, LVRelStats *vacrelstats)
+lazy_vacuum_heap(Relation onerel, LVRelStats *vacrelstats, BlockNumber nblocks)
 {
 	int			tupindex;
 	int			npages;
@@ -1504,7 +1505,7 @@ lazy_vacuum_heap(Relation onerel, LVRelStats *vacrelstats)
 		freespace = PageGetHeapFreeSpace(page);
 
 		UnlockReleaseBuffer(buf);
-		RecordPageWithFreeSpace(onerel, tblk, freespace);
+		RecordPageWithFreeSpace(onerel, tblk, freespace, nblocks);
 		npages++;
 	}
 
diff --git a/src/backend/access/transam/xact.c b/src/backend/access/transam/xact.c
index 7c3a9c1..25cd6f4 100644
--- a/src/backend/access/transam/xact.c
+++ b/src/backend/access/transam/xact.c
@@ -48,6 +48,7 @@
 #include "replication/walsender.h"
 #include "storage/condition_variable.h"
 #include "storage/fd.h"
+#include "storage/freespace.h"
 #include "storage/lmgr.h"
 #include "storage/predicate.h"
 #include "storage/proc.h"
@@ -2500,6 +2501,12 @@ AbortTransaction(void)
 	pgstat_report_wait_end();
 	pgstat_progress_end_command();
 
+	/*
+	 * In case we aborted during RelationGetBufferForTuple(), clear the local
+	 * map of heap pages.
+	 */
+	FSMClearLocalMap();
+
 	/* Clean up buffer I/O and buffer context locks, too */
 	AbortBufferIO();
 	UnlockBuffers();
@@ -4721,6 +4728,13 @@ AbortSubTransaction(void)
 
 	pgstat_report_wait_end();
 	pgstat_progress_end_command();
+
+	/*
+	 * In case we aborted during RelationGetBufferForTuple(), clear the local
+	 * map of heap pages.
+	 */
+	FSMClearLocalMap();
+
 	AbortBufferIO();
 	UnlockBuffers();
 
diff --git a/src/backend/storage/freespace/README b/src/backend/storage/freespace/README
index e7ff23b..0d3cd29 100644
--- a/src/backend/storage/freespace/README
+++ b/src/backend/storage/freespace/README
@@ -8,7 +8,41 @@ free space to hold a tuple to be stored; or to determine that no such page
 exists and the relation must be extended by one page.  As of PostgreSQL 8.4
 each relation has its own, extensible free space map stored in a separate
 "fork" of its relation.  This eliminates the disadvantages of the former
-fixed-size FSM.
+fixed-size FSM.  There are two exceptions:
+
+1. Hash indexes never have a FSM.
+2. For very small tables, a 3-page relation fork would be relatively large
+and wasteful, so to save space we refrain from creating the FSM if the
+heap has HEAP_FSM_CREATION_THRESHOLD pages or fewer.
+
+To locate free space in the latter case, we simply try pages directly without
+knowing ahead of time how much free space they have.  To maintain good
+performance, we create a local in-memory map of pages to try, and only mark
+every other page as available.  For example, in a 3-page heap, the local map
+would look like:
+
+ANAN
+0123
+
+Pages 0 and 2 are marked "available", and page 1 as "not available".
+Page 3 is beyond the end of the relation, so is likewise marked "not
+available".  First we try page 2, and if that doesn't have sufficient free
+space we try page 0 before giving up and extending the relation.  There may
+be some wasted free space on block 1, but if the relation extends to 4 pages:
+
+NANA
+0123
+
+We not only have the new page 3 at our disposal, we can now check page 1
+for free space as well.
+
+Once the FSM is created for a heap we don't remove it even if somebody deletes
+all the rows from the corresponding relation.  We don't think it is a useful
+optimization as it is quite likely that relation will again grow to the same
+size.
+
+FSM data structure
+------------------
 
 It is important to keep the map small so that it can be searched rapidly.
 Therefore, we don't attempt to record the exact free space on a page.
@@ -192,5 +226,3 @@ TODO
 ----
 
 - fastroot to avoid traversing upper nodes with just 1 child
-- use a different system for tables that fit into one FSM page, with a
-  mechanism to switch to the real thing as it grows.
diff --git a/src/backend/storage/freespace/freespace.c b/src/backend/storage/freespace/freespace.c
index eee8286..5f46391 100644
--- a/src/backend/storage/freespace/freespace.c
+++ b/src/backend/storage/freespace/freespace.c
@@ -76,6 +76,14 @@
 #define FSM_ROOT_LEVEL	(FSM_TREE_DEPTH - 1)
 #define FSM_BOTTOM_LEVEL 0
 
+/* Status codes for the local map. */
+
+/* Either already tried, or beyond the end of the relation */
+#define FSM_LOCAL_NOT_AVAIL 0x00
+
+/* Available to try */
+#define FSM_LOCAL_AVAIL		0x01
+
 /*
  * The internal FSM routines work on a logical addressing scheme. Each
  * level of the tree can be thought of as a separately addressable file.
@@ -89,6 +97,17 @@ typedef struct
 /* Address of the root page. */
 static const FSMAddress FSM_ROOT_ADDRESS = {FSM_ROOT_LEVEL, 0};
 
+/* Local map of block numbers for small heaps with no FSM. */
+typedef struct
+{
+	BlockNumber nblocks;
+	uint8		map[HEAP_FSM_CREATION_THRESHOLD];
+} FSMLocalMap;
+
+static FSMLocalMap fsm_local_map = {0, {FSM_LOCAL_NOT_AVAIL}};
+
+#define FSM_LOCAL_MAP_EXISTS (fsm_local_map.nblocks > 0)
+
 /* functions to navigate the tree */
 static FSMAddress fsm_get_child(FSMAddress parent, uint16 slot);
 static FSMAddress fsm_get_parent(FSMAddress child, uint16 *slot);
@@ -107,10 +126,14 @@ static Size fsm_space_cat_to_avail(uint8 cat);
 /* workhorse functions for various operations */
 static int fsm_set_and_search(Relation rel, FSMAddress addr, uint16 slot,
 				   uint8 newValue, uint8 minValue);
+static void fsm_local_set(Relation rel, BlockNumber cur_nblocks);
 static BlockNumber fsm_search(Relation rel, uint8 min_cat);
+static BlockNumber fsm_local_search(void);
 static uint8 fsm_vacuum_page(Relation rel, FSMAddress addr,
 				BlockNumber start, BlockNumber end,
 				bool *eof);
+static bool fsm_allow_writes(Relation rel, BlockNumber heapblk,
+				BlockNumber nblocks, BlockNumber *get_nblocks);
 
 
 /******** Public API ********/
@@ -127,13 +150,46 @@ static uint8 fsm_vacuum_page(Relation rel, FSMAddress addr,
  * amount of free space available on that page and then try again (see
  * RecordAndGetPageWithFreeSpace).  If InvalidBlockNumber is returned,
  * extend the relation.
+ *
+ * For very small heap relations that don't have a FSM, we try every other
+ * page before extending the relation.  To keep track of which pages have
+ * been tried, initialize a local in-memory map of pages.
  */
 BlockNumber
-GetPageWithFreeSpace(Relation rel, Size spaceNeeded)
+GetPageWithFreeSpace(Relation rel, Size spaceNeeded, bool check_fsm_only)
 {
 	uint8		min_cat = fsm_space_needed_to_cat(spaceNeeded);
+	BlockNumber target_block,
+				nblocks;
+
+	/* First try the FSM, if it exists. */
+	target_block = fsm_search(rel, min_cat);
+
+	if (target_block == InvalidBlockNumber &&
+		(rel->rd_rel->relkind == RELKIND_RELATION ||
+		 rel->rd_rel->relkind == RELKIND_TOASTVALUE) &&
+		!check_fsm_only)
+	{
+		nblocks = RelationGetNumberOfBlocks(rel);
+
+		if (nblocks > HEAP_FSM_CREATION_THRESHOLD)
+		{
+			/*
+			 * If the FSM knows nothing of the rel, try the last page before
+			 * we give up and extend.  This avoids one-tuple-per-page syndrome
+			 * during bootstrapping or in a recently-started system.
+			 */
+			target_block = nblocks - 1;
+		}
+		else if (nblocks > 0)
+		{
+			/* Create or update local map and get first candidate block. */
+			fsm_local_set(rel, nblocks);
+			target_block = fsm_local_search();
+		}
+	}
 
-	return fsm_search(rel, min_cat);
+	return target_block;
 }
 
 /*
@@ -144,16 +200,47 @@ GetPageWithFreeSpace(Relation rel, Size spaceNeeded)
  * also some effort to return a page close to the old page; if there's a
  * page with enough free space on the same FSM page where the old one page
  * is located, it is preferred.
+ *
+ * For very small heap relations that don't have a FSM, we update the local
+ * map to indicate we have tried a page, and return the next page to try.
  */
 BlockNumber
 RecordAndGetPageWithFreeSpace(Relation rel, BlockNumber oldPage,
 							  Size oldSpaceAvail, Size spaceNeeded)
 {
-	int			old_cat = fsm_space_avail_to_cat(oldSpaceAvail);
-	int			search_cat = fsm_space_needed_to_cat(spaceNeeded);
+	int			old_cat;
+	int			search_cat;
 	FSMAddress	addr;
 	uint16		slot;
 	int			search_slot;
+	BlockNumber nblocks = InvalidBlockNumber;
+
+	/* First try the local map, if it exists. */
+	if (FSM_LOCAL_MAP_EXISTS)
+	{
+		Assert((rel->rd_rel->relkind == RELKIND_RELATION ||
+				rel->rd_rel->relkind == RELKIND_TOASTVALUE) &&
+			   fsm_local_map.map[oldPage] == FSM_LOCAL_AVAIL);
+
+		fsm_local_map.map[oldPage] = FSM_LOCAL_NOT_AVAIL;
+		return fsm_local_search();
+	}
+
+	if (!fsm_allow_writes(rel, oldPage, InvalidBlockNumber, &nblocks))
+	{
+		/*
+		 * If we have neither a local map nor a FSM, we probably just
+		 * tried the target block in the smgr relation entry and failed,
+		 * so we'll need to create the local map.
+		 */
+		fsm_local_set(rel, nblocks);
+		return fsm_local_search();
+	}
+
+	/* Normal FSM logic follows */
+
+	old_cat = fsm_space_avail_to_cat(oldSpaceAvail);
+	search_cat = fsm_space_needed_to_cat(spaceNeeded);
 
 	/* Get the location of the FSM byte representing the heap block */
 	addr = fsm_get_location(oldPage, &slot);
@@ -176,21 +263,42 @@ RecordAndGetPageWithFreeSpace(Relation rel, BlockNumber oldPage,
  * Note that if the new spaceAvail value is higher than the old value stored
  * in the FSM, the space might not become visible to searchers until the next
  * FreeSpaceMapVacuum call, which updates the upper level pages.
+ *
+ * Callers have no need for a local map.
  */
 void
-RecordPageWithFreeSpace(Relation rel, BlockNumber heapBlk, Size spaceAvail)
+RecordPageWithFreeSpace(Relation rel, BlockNumber heapBlk,
+						Size spaceAvail, BlockNumber nblocks)
 {
-	int			new_cat = fsm_space_avail_to_cat(spaceAvail);
+	int			new_cat;
 	FSMAddress	addr;
 	uint16		slot;
+	BlockNumber dummy;
+
+	if (!fsm_allow_writes(rel, heapBlk, nblocks, &dummy))
+		/* No FSM to update and no local map either */
+		return;
 
 	/* Get the location of the FSM byte representing the heap block */
 	addr = fsm_get_location(heapBlk, &slot);
 
+	new_cat = fsm_space_avail_to_cat(spaceAvail);
 	fsm_set_and_search(rel, addr, slot, new_cat, 0);
 }
 
 /*
+ * Clear the local map.  We must call this when we have found a block with
+ * enough free space, when we extend the relation, or on transaction abort.
+ */
+void
+FSMClearLocalMap(void)
+{
+	fsm_local_map.nblocks = 0;
+	memset(&fsm_local_map.map, FSM_LOCAL_NOT_AVAIL,
+		   sizeof(fsm_local_map.map));
+}
+
+/*
  * XLogRecordPageWithFreeSpace - like RecordPageWithFreeSpace, for use in
  *		WAL replay
  */
@@ -204,6 +312,30 @@ XLogRecordPageWithFreeSpace(RelFileNode rnode, BlockNumber heapBlk,
 	BlockNumber blkno;
 	Buffer		buf;
 	Page		page;
+	bool		write_to_fsm;
+
+	/* This is meant to mirror the logic in fsm_allow_writes() */
+	if (heapBlk >= HEAP_FSM_CREATION_THRESHOLD)
+		write_to_fsm = true;
+	else
+	{
+		/* Open the relation at smgr level */
+		SMgrRelation smgr = smgropen(rnode, InvalidBackendId);
+
+		if (smgrexists(smgr, FSM_FORKNUM))
+			write_to_fsm = true;
+		else
+		{
+			BlockNumber heap_nblocks = smgrnblocks(smgr, MAIN_FORKNUM);
+			if (heap_nblocks > HEAP_FSM_CREATION_THRESHOLD)
+				write_to_fsm = true;
+			else
+				write_to_fsm = false;
+		}
+	}
+
+	if (!write_to_fsm)
+		return;
 
 	/* Get the location of the FSM byte representing the heap block */
 	addr = fsm_get_location(heapBlk, &slot);
@@ -904,3 +1036,134 @@ fsm_vacuum_page(Relation rel, FSMAddress addr,
 
 	return max_avail;
 }
+
+/*
+ * For heaps, we prevent creation of the FSM unless the number of pages
+ * exceeds HEAP_FSM_CREATION_THRESHOLD.  For tables that don't already have
+ * a FSM, this will save an inode and a few kB of space.
+ *
+ * XXX The API is a little awkward -- if the caller passes a valid nblocks
+ * value, it can avoid invoking a system call.  If the caller passes
+ * InvalidBlockNumber and receives a false return value, it can get an
+ * up-to-date relation size from get_nblocks.  This saves a few cycles in
+ * the caller, which would otherwise need to get the relation size by itself.
+ */
+static bool
+fsm_allow_writes(Relation rel, BlockNumber heapblk,
+				 BlockNumber nblocks, BlockNumber *get_nblocks)
+{
+	bool		skip_get_nblocks;
+
+	if (heapblk >= HEAP_FSM_CREATION_THRESHOLD)
+		return true;
+
+	/* Non-heap rels can always create a FSM. */
+	if (rel->rd_rel->relkind != RELKIND_RELATION &&
+		rel->rd_rel->relkind != RELKIND_TOASTVALUE)
+		return true;
+
+	/*
+	 * If the caller knows nblocks, we can avoid a system call later.
+	 * If it doesn't, maybe we have relpages from a previous VACUUM.
+	 * Since the table may have extended since then, we still have to
+	 * count the pages later if we can't return now.
+	 */
+	if (nblocks != InvalidBlockNumber)
+	{
+		if (nblocks > HEAP_FSM_CREATION_THRESHOLD)
+			return true;
+		else
+			skip_get_nblocks = true;
+	}
+	else
+	{
+		if (rel->rd_rel->relpages != InvalidBlockNumber &&
+			rel->rd_rel->relpages > HEAP_FSM_CREATION_THRESHOLD)
+			return true;
+		else
+			skip_get_nblocks = false;
+	}
+
+	RelationOpenSmgr(rel);
+	if (smgrexists(rel->rd_smgr, FSM_FORKNUM))
+		return true;
+
+	if (skip_get_nblocks)
+		return false;
+
+	/* last resort */
+	*get_nblocks = RelationGetNumberOfBlocks(rel);
+	if (*get_nblocks > HEAP_FSM_CREATION_THRESHOLD)
+		return true;
+	else
+		return false;
+}
+
+/*
+ * Initialize or update the local map of blocks to try, for when there is
+ * no FSM.
+ *
+ * When we initialize the map, the whole heap is potentially available to
+ * try.  Testing revealed that trying every block can cause a small
+ * performance dip compared to when we use a FSM, so we try every other
+ * block instead.
+ */
+static void
+fsm_local_set(Relation rel, BlockNumber cur_nblocks)
+{
+	BlockNumber blkno,
+				cached_target_block;
+
+	/* The local map must not be set already. */
+	Assert(!FSM_LOCAL_MAP_EXISTS);
+
+	/*
+	 * Starting at the current last block in the relation and working
+	 * backwards, mark alternating blocks as available.
+	 */
+	blkno = cur_nblocks - 1;
+	while (true)
+	{
+		fsm_local_map.map[blkno] = FSM_LOCAL_AVAIL;
+		if (blkno >= 2)
+			blkno -= 2;
+		else
+			break;
+	}
+
+	/* Cache the number of blocks. */
+	fsm_local_map.nblocks = cur_nblocks;
+
+	/* Set the status of the cached target block to 'unavailable'. */
+	cached_target_block = RelationGetTargetBlock(rel);
+	if (cached_target_block != InvalidBlockNumber &&
+		cached_target_block < cur_nblocks)
+		fsm_local_map.map[cached_target_block] = FSM_LOCAL_NOT_AVAIL;
+}
+
+/*
+ * Search the local map for an available block to try, in descending order.
+ * As such, there is no heuristic available to decide which order will be
+ * better to try, but the probability of having space in the last block in the
+ * map is higher because that is the most recent block added to the heap.
+ *
+ * This function is used when there is no FSM.
+ */
+static BlockNumber
+fsm_local_search(void)
+{
+	BlockNumber		target_block;
+
+	/* Local map must be set by now. */
+	Assert(FSM_LOCAL_MAP_EXISTS);
+
+	target_block = fsm_local_map.nblocks;
+	do
+	{
+		target_block--;
+		if (fsm_local_map.map[target_block] == FSM_LOCAL_AVAIL)
+			return target_block;
+	} while (target_block > 0);
+
+	return InvalidBlockNumber;
+}
diff --git a/src/backend/storage/freespace/indexfsm.c b/src/backend/storage/freespace/indexfsm.c
index 58cedea..9d8f43d 100644
--- a/src/backend/storage/freespace/indexfsm.c
+++ b/src/backend/storage/freespace/indexfsm.c
@@ -37,7 +37,7 @@
 BlockNumber
 GetFreeIndexPage(Relation rel)
 {
-	BlockNumber blkno = GetPageWithFreeSpace(rel, BLCKSZ / 2);
+	BlockNumber blkno = GetPageWithFreeSpace(rel, BLCKSZ / 2, true);
 
 	if (blkno != InvalidBlockNumber)
 		RecordUsedIndexPage(rel, blkno);
@@ -51,7 +51,7 @@ GetFreeIndexPage(Relation rel)
 void
 RecordFreeIndexPage(Relation rel, BlockNumber freeBlock)
 {
-	RecordPageWithFreeSpace(rel, freeBlock, BLCKSZ - 1);
+	RecordPageWithFreeSpace(rel, freeBlock, BLCKSZ - 1, InvalidBlockNumber);
 }
 
 
@@ -61,7 +61,7 @@ RecordFreeIndexPage(Relation rel, BlockNumber freeBlock)
 void
 RecordUsedIndexPage(Relation rel, BlockNumber usedBlock)
 {
-	RecordPageWithFreeSpace(rel, usedBlock, 0);
+	RecordPageWithFreeSpace(rel, usedBlock, 0, InvalidBlockNumber);
 }
 
 /*
diff --git a/src/include/storage/freespace.h b/src/include/storage/freespace.h
index 8b00033..dbaae65 100644
--- a/src/include/storage/freespace.h
+++ b/src/include/storage/freespace.h
@@ -18,15 +18,20 @@
 #include "storage/relfilenode.h"
 #include "utils/relcache.h"
 
+/* Only create the FSM if the heap has greater than this many blocks */
+#define HEAP_FSM_CREATION_THRESHOLD 4
+
 /* prototypes for public functions in freespace.c */
 extern Size GetRecordedFreeSpace(Relation rel, BlockNumber heapBlk);
-extern BlockNumber GetPageWithFreeSpace(Relation rel, Size spaceNeeded);
+extern BlockNumber GetPageWithFreeSpace(Relation rel, Size spaceNeeded,
+					 bool check_fsm_only);
 extern BlockNumber RecordAndGetPageWithFreeSpace(Relation rel,
 							  BlockNumber oldPage,
 							  Size oldSpaceAvail,
 							  Size spaceNeeded);
 extern void RecordPageWithFreeSpace(Relation rel, BlockNumber heapBlk,
-						Size spaceAvail);
+						Size spaceAvail, BlockNumber nblocks);
+extern void FSMClearLocalMap(void);
 extern void XLogRecordPageWithFreeSpace(RelFileNode rnode, BlockNumber heapBlk,
 							Size spaceAvail);
 
diff --git a/src/test/regress/expected/fsm.out b/src/test/regress/expected/fsm.out
new file mode 100644
index 0000000..df6b15b
--- /dev/null
+++ b/src/test/regress/expected/fsm.out
@@ -0,0 +1,75 @@
+--
+-- Free Space Map test
+--
+CREATE TABLE fsm_check_size (num int, str text);
+-- Fill 3 blocks with as many large records as will fit
+-- No FSM
+INSERT INTO fsm_check_size SELECT i, rpad('', 1024, 'a')
+FROM generate_series(1,7*3) i;
+VACUUM fsm_check_size;
+SELECT pg_relation_size('fsm_check_size', 'main') AS heap_size,
+pg_relation_size('fsm_check_size', 'fsm') AS fsm_size;
+ heap_size | fsm_size 
+-----------+----------
+     24576 |        0
+(1 row)
+
+-- Clear some space on block 0
+DELETE FROM fsm_check_size WHERE num <= 5;
+VACUUM fsm_check_size;
+-- Insert small record in block 2 to set the cached smgr targetBlock
+INSERT INTO fsm_check_size VALUES(99, 'b');
+-- Insert large record and make sure it goes in block 0 rather than
+-- causing the relation to extend
+INSERT INTO fsm_check_size VALUES (101, rpad('', 1024, 'a'));
+SELECT pg_relation_size('fsm_check_size', 'main') AS heap_size,
+pg_relation_size('fsm_check_size', 'fsm') AS fsm_size;
+ heap_size | fsm_size 
+-----------+----------
+     24576 |        0
+(1 row)
+
+-- Extend table with enough blocks to exceed the FSM threshold
+-- FSM is created and extended to 3 blocks
+INSERT INTO fsm_check_size SELECT i, 'c' FROM generate_series(200,1200) i;
+VACUUM fsm_check_size;
+SELECT pg_relation_size('fsm_check_size', 'fsm') AS fsm_size;
+ fsm_size 
+----------
+    24576
+(1 row)
+
+-- Truncate heap to 1 block
+-- No change in FSM
+DELETE FROM fsm_check_size WHERE num > 7;
+VACUUM fsm_check_size;
+SELECT pg_relation_size('fsm_check_size', 'fsm') AS fsm_size;
+ fsm_size 
+----------
+    24576
+(1 row)
+
+-- Truncate heap to 0 blocks
+-- FSM now truncated to 2 blocks
+DELETE FROM fsm_check_size;
+VACUUM fsm_check_size;
+SELECT pg_relation_size('fsm_check_size', 'fsm') AS fsm_size;
+ fsm_size 
+----------
+    16384
+(1 row)
+
+-- Add long random string to extend TOAST table to 1 block
+INSERT INTO fsm_check_size
+VALUES(0, (SELECT string_agg(md5(chr(i)), '')
+		   FROM generate_series(1,100) i));
+VACUUM fsm_check_size;
+SELECT pg_relation_size(reltoastrelid, 'main') AS toast_size,
+pg_relation_size(reltoastrelid, 'fsm') AS toast_fsm_size
+FROM pg_class WHERE relname = 'fsm_check_size';
+ toast_size | toast_fsm_size 
+------------+----------------
+       8192 |              0
+(1 row)
+
+DROP TABLE fsm_check_size;
diff --git a/src/test/regress/parallel_schedule b/src/test/regress/parallel_schedule
index cc0bbf5..4051a4a 100644
--- a/src/test/regress/parallel_schedule
+++ b/src/test/regress/parallel_schedule
@@ -69,6 +69,12 @@ test: create_aggregate create_function_3 create_cast constraints triggers inheri
 test: sanity_check
 
 # ----------
+# fsm does a delete followed by vacuum, and running it in parallel can prevent
+# removal of rows.
+# ----------
+test: fsm
+
+# ----------
 # Believe it or not, select creates a table, subsequent
 # tests need.
 # ----------
diff --git a/src/test/regress/serial_schedule b/src/test/regress/serial_schedule
index 0c10c71..ac1ea62 100644
--- a/src/test/regress/serial_schedule
+++ b/src/test/regress/serial_schedule
@@ -80,6 +80,7 @@ test: roleattributes
 test: create_am
 test: hash_func
 test: sanity_check
+test: fsm
 test: errors
 test: select
 test: select_into
diff --git a/src/test/regress/sql/fsm.sql b/src/test/regress/sql/fsm.sql
new file mode 100644
index 0000000..07f5055
--- /dev/null
+++ b/src/test/regress/sql/fsm.sql
@@ -0,0 +1,55 @@
+--
+-- Free Space Map test
+--
+
+CREATE TABLE fsm_check_size (num int, str text);
+
+-- Fill 3 blocks with as many large records as will fit
+-- No FSM
+INSERT INTO fsm_check_size SELECT i, rpad('', 1024, 'a')
+FROM generate_series(1,7*3) i;
+VACUUM fsm_check_size;
+SELECT pg_relation_size('fsm_check_size', 'main') AS heap_size,
+pg_relation_size('fsm_check_size', 'fsm') AS fsm_size;
+
+-- Clear some space on block 0
+DELETE FROM fsm_check_size WHERE num <= 5;
+VACUUM fsm_check_size;
+
+-- Insert small record in block 2 to set the cached smgr targetBlock
+INSERT INTO fsm_check_size VALUES(99, 'b');
+
+-- Insert large record and make sure it goes in block 0 rather than
+-- causing the relation to extend
+INSERT INTO fsm_check_size VALUES (101, rpad('', 1024, 'a'));
+SELECT pg_relation_size('fsm_check_size', 'main') AS heap_size,
+pg_relation_size('fsm_check_size', 'fsm') AS fsm_size;
+
+-- Extend table with enough blocks to exceed the FSM threshold
+-- FSM is created and extended to 3 blocks
+INSERT INTO fsm_check_size SELECT i, 'c' FROM generate_series(200,1200) i;
+VACUUM fsm_check_size;
+SELECT pg_relation_size('fsm_check_size', 'fsm') AS fsm_size;
+
+-- Truncate heap to 1 block
+-- No change in FSM
+DELETE FROM fsm_check_size WHERE num > 7;
+VACUUM fsm_check_size;
+SELECT pg_relation_size('fsm_check_size', 'fsm') AS fsm_size;
+
+-- Truncate heap to 0 blocks
+-- FSM now truncated to 2 blocks
+DELETE FROM fsm_check_size;
+VACUUM fsm_check_size;
+SELECT pg_relation_size('fsm_check_size', 'fsm') AS fsm_size;
+
+-- Add long random string to extend TOAST table to 1 block
+INSERT INTO fsm_check_size
+VALUES(0, (SELECT string_agg(md5(chr(i)), '')
+		   FROM generate_series(1,100) i));
+VACUUM fsm_check_size;
+SELECT pg_relation_size(reltoastrelid, 'main') AS toast_size,
+pg_relation_size(reltoastrelid, 'fsm') AS toast_fsm_size
+FROM pg_class WHERE relname = 'fsm_check_size';
+
+DROP TABLE fsm_check_size;
-- 
1.8.3.1

#107Amit Kapila
amit.kapila16@gmail.com
In reply to: Amit Kapila (#106)
3 attachment(s)
Re: WIP: Avoid creation of the free space map for small tables

On Tue, Jan 29, 2019 at 5:59 AM Amit Kapila <amit.kapila16@gmail.com> wrote:

On Tue, Jan 29, 2019 at 12:37 AM John Naylor
<john.naylor@2ndquadrant.com> wrote:

I think here you need to clear the map if it exists or clear it
unconditionally, the earlier one would be better.

Ok, maybe all callers should call it unconditonally, but within the
function, check "if (FSM_LOCAL_MAP_EXISTS)"?

Sounds sensible. I think we should try to reproduce these failures,
for ex. for pgbench failure, we can try the same test with more
clients.

I am able to reproduce this by changing pgbench test as below:

--- a/src/bin/pgbench/t/001_pgbench_with_server.pl
+++ b/src/bin/pgbench/t/001_pgbench_with_server.pl
@@ -56,9 +56,9 @@ $node->safe_psql('postgres',
  'CREATE UNLOGGED TABLE insert_tbl (id serial primary key); ');
 pgbench(
- '--no-vacuum --client=5 --protocol=prepared --transactions=25',
+ '--no-vacuum --client=10 --protocol=prepared --transactions=25',
  0,
- [qr{processed: 125/125}],
+ [qr{processed: 250/250}],

You can find this change in attached patch. Then, I ran the make
check in src/bin/pgbench multiple times using test_conc_insert.sh.
You can vary the number of times the test should run, if you are not
able to reproduce it with this.

The attached patch (clear_local_map_if_exists_1.patch) atop the main
patch fixes the issue for me. Kindly verify the same.

--
With Regards,
Amit Kapila.
EnterpriseDB: http://www.enterprisedb.com

Attachments:

change_pgbench_test_1.patchapplication/octet-stream; name=change_pgbench_test_1.patchDownload
diff --git a/src/bin/pgbench/t/001_pgbench_with_server.pl b/src/bin/pgbench/t/001_pgbench_with_server.pl
index ad15ba6..6255eed 100644
--- a/src/bin/pgbench/t/001_pgbench_with_server.pl
+++ b/src/bin/pgbench/t/001_pgbench_with_server.pl
@@ -56,9 +56,9 @@ $node->safe_psql('postgres',
 				 'CREATE UNLOGGED TABLE insert_tbl (id serial primary key); ');
 
 pgbench(
-	'--no-vacuum --client=5 --protocol=prepared --transactions=25',
+	'--no-vacuum --client=10 --protocol=prepared --transactions=25',
 	0,
-	[qr{processed: 125/125}],
+	[qr{processed: 250/250}],
 	[qr{^$}],
 	'concurrent insert workload',
 	{
test_conc_insert.shtext/x-sh; charset=US-ASCII; name=test_conc_insert.shDownload
clear_local_map_if_exists_1.patchapplication/octet-stream; name=clear_local_map_if_exists_1.patchDownload
diff --git a/src/backend/access/heap/hio.c b/src/backend/access/heap/hio.c
index 4c3e774..d076aab 100644
--- a/src/backend/access/heap/hio.c
+++ b/src/backend/access/heap/hio.c
@@ -481,11 +481,10 @@ loop:
 			RelationSetTargetBlock(relation, targetBlock);
 
 			/*
-			 * In case we used an in-memory map of available blocks, reset it
-			 * for next use.
+			 * In case we used an in-memory map of available blocks, reset it for next
+			 * use.
 			 */
-			if (targetBlock < HEAP_FSM_CREATION_THRESHOLD)
-				FSMClearLocalMap();
+			FSMClearLocalMap();
 
 			return buffer;
 		}
@@ -633,8 +632,7 @@ loop:
 
 	/*
 	 * In case we used an in-memory map of available blocks, reset it for next
-	 * use.  We do this unconditionally since after relation extension we
-	 * can't skip this based on the targetBlock.
+	 * use.
 	 */
 	FSMClearLocalMap();
 
diff --git a/src/backend/storage/freespace/freespace.c b/src/backend/storage/freespace/freespace.c
index 5f46391..a595397 100644
--- a/src/backend/storage/freespace/freespace.c
+++ b/src/backend/storage/freespace/freespace.c
@@ -293,9 +293,12 @@ RecordPageWithFreeSpace(Relation rel, BlockNumber heapBlk,
 void
 FSMClearLocalMap(void)
 {
-	fsm_local_map.nblocks = 0;
-	memset(&fsm_local_map.map, FSM_LOCAL_NOT_AVAIL,
-		   sizeof(fsm_local_map.map));
+	if (FSM_LOCAL_MAP_EXISTS)
+	{
+		fsm_local_map.nblocks = 0;
+		memset(&fsm_local_map.map, FSM_LOCAL_NOT_AVAIL,
+			   sizeof(fsm_local_map.map));
+	}
 }
 
 /*
#108Masahiko Sawada
sawada.mshk@gmail.com
In reply to: Amit Kapila (#106)
Re: WIP: Avoid creation of the free space map for small tables

On Tue, Jan 29, 2019 at 9:29 AM Amit Kapila <amit.kapila16@gmail.com> wrote:

On Tue, Jan 29, 2019 at 12:37 AM John Naylor
<john.naylor@2ndquadrant.com> wrote:

On Mon, Jan 28, 2019 at 12:10 PM Amit Kapila <amit.kapila16@gmail.com> wrote:

2.
@@ -15,13 +15,9 @@
SELECT octet_length(get_raw_page('test_rel_forks', 'main', 100)) AS main_100;
ERROR:  block number 100 is out of range for relation "test_rel_forks"
SELECT octet_length(get_raw_page('test_rel_forks', 'fsm', 0)) AS fsm_0;
- fsm_0
--------
-  8192
-(1 row)
-
+ERROR:  could not open file "base/50769/50798_fsm": No such file or directory
SELECT octet_length(get_raw_page('test_rel_forks', 'fsm', 10)) AS fsm_10;
-ERROR:  block number 10 is out of range for relation "test_rel_forks"
+ERROR:  could not open file "base/50769/50798_fsm": No such file or directory

This indicates that even though the Vacuum is executed, but the FSM
doesn't get created. This could be due to different BLCKSZ, but the
failed machines don't seem to have a non-default value of it. I am
not sure why this could happen, maybe we need to check once in the
failed regression database to see the size of relation?

I'm also having a hard time imagining why this failed. Just in case,
we could return ctid in a plpgsql loop and stop as soon as we see the
5th block. I've done that for some tests during development and is a
safer method anyway.

I think we can devise some concrete way, but it is better first we try
to understand why it failed, otherwise there is always a chance that
we will repeat the mistake in some other case. I think we have no
other choice, but to request the buildfarm owners to either give us
the access to see what happens or help us in investigating the
problem. The four buildfarms where it failed were lapwing, locust,
dromedary, prairiedog. Among these, the owner of last two is Tom
Lane and others I don't recognize. Tom, Andrew, can you help us in
getting the access of one of those four? Yet another alternative is
the owner can apply the patch attached (this is same what got
committed) or reset to commit ac88d2962a and execute below statements
and share the results:

CREATE EXTENSION pageinspect;

CREATE TABLE test_rel_forks (a int);
INSERT INTO test_rel_forks SELECT i from generate_series(1,1000) i;
VACUUM test_rel_forks;
SELECT octet_length(get_raw_page('test_rel_forks', 'main', 0)) AS main_0;
SELECT octet_length(get_raw_page('test_rel_forks', 'main', 100)) AS main_100;

SELECT octet_length(get_raw_page('test_rel_forks', 'fsm', 0)) AS fsm_0;
SELECT octet_length(get_raw_page('test_rel_forks', 'fsm', 10)) AS fsm_10;

SELECT octet_length(get_raw_page('test_rel_forks', 'vm', 0)) AS vm_0;
SELECT octet_length(get_raw_page('test_rel_forks', 'vm', 1)) AS vm_1;

If the above statements give error: "ERROR: could not open file ...", then run:
Analyze test_rel_forks;
Select oid, relname, relpages, reltuples from pg_class where relname
like 'test%';

The result of the above tests will tell us whether there are 5 pages
in the table or not. If the table contains 5 pages and throws an
error, then there is some bug in our code, otherwise, there is
something specific to those systems where the above insert doesn't
result in 5 pages.

I'd suspect the alignment of integer. In my environemnt, the tuple
actual size is 28 bytes but the aligned size is 32 bytes (=
MAXALIGN(28)), so we can store 226 tuples to single page. But if
MAXALIGN(28) = 28 then we can store 255 tuples and 1000 tuples fits
within 4 pages. The MAXALIGN of four buildfarms seem 4 accroding to
the configure script so MAXALIGN(28) might be 28 on these buildfarms.

configure:16816: checking alignment of short
configure:16839: result: 2
configure:16851: checking alignment of int
configure:16874: result: 4
configure:16886: checking alignment of long
configure:16909: result: 4
configure:16922: checking alignment of long long int
configure:16945: result: 4

Regards,

--
Masahiko Sawada
NIPPON TELEGRAPH AND TELEPHONE CORPORATION
NTT Open Source Software Center

#109Amit Kapila
amit.kapila16@gmail.com
In reply to: Masahiko Sawada (#108)
Re: WIP: Avoid creation of the free space map for small tables

On Tue, Jan 29, 2019 at 5:20 PM Masahiko Sawada <sawada.mshk@gmail.com> wrote:

On Tue, Jan 29, 2019 at 9:29 AM Amit Kapila <amit.kapila16@gmail.com> wrote:

I'd suspect the alignment of integer. In my environemnt, the tuple
actual size is 28 bytes but the aligned size is 32 bytes (=
MAXALIGN(28)), so we can store 226 tuples to single page. But if
MAXALIGN(28) = 28 then we can store 255 tuples and 1000 tuples fits
within 4 pages. The MAXALIGN of four buildfarms seem 4 accroding to
the configure script so MAXALIGN(28) might be 28 on these buildfarms.

Good finding. I was also wondering along these lines and wanted to
verify. Thanks a lot. So, this clearly states why we have a second
failure in my email above [1]/messages/by-id/CAA4eK1L=qWp_bJ5aTc9+fy4Ewx2LPaLWY-RbR4a60g_rupCKnQ@mail.gmail.com. I think this means for the fsm test
also we have to be careful when relying on the number of pages in the
test. I think now we have found the reasons and solutions for the
first three problems mentioned in my email [1]/messages/by-id/CAA4eK1L=qWp_bJ5aTc9+fy4Ewx2LPaLWY-RbR4a60g_rupCKnQ@mail.gmail.com. For the problem-4
(Failure on jacana:), I have speculated some theory, but not sure how
can we confirm? Can we try the patch on Jacana before considering the
patch for commit? Is there any other way we can replicate that error?

[1]: /messages/by-id/CAA4eK1L=qWp_bJ5aTc9+fy4Ewx2LPaLWY-RbR4a60g_rupCKnQ@mail.gmail.com

--
With Regards,
Amit Kapila.
EnterpriseDB: http://www.enterprisedb.com

#110John Naylor
john.naylor@2ndquadrant.com
In reply to: Amit Kapila (#107)
Re: WIP: Avoid creation of the free space map for small tables

On Tue, Jan 29, 2019 at 11:56 AM Amit Kapila <amit.kapila16@gmail.com> wrote:

You can find this change in attached patch. Then, I ran the make
check in src/bin/pgbench multiple times using test_conc_insert.sh.
You can vary the number of times the test should run, if you are not
able to reproduce it with this.

The attached patch (clear_local_map_if_exists_1.patch) atop the main
patch fixes the issue for me. Kindly verify the same.

I got one failure in 50 runs. With the new patch, I didn't get any
failures in 300 runs.

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

#111Amit Kapila
amit.kapila16@gmail.com
In reply to: John Naylor (#110)
1 attachment(s)
Re: WIP: Avoid creation of the free space map for small tables

On Tue, Jan 29, 2019 at 8:12 PM John Naylor <john.naylor@2ndquadrant.com> wrote:

On Tue, Jan 29, 2019 at 11:56 AM Amit Kapila <amit.kapila16@gmail.com> wrote:

You can find this change in attached patch. Then, I ran the make
check in src/bin/pgbench multiple times using test_conc_insert.sh.
You can vary the number of times the test should run, if you are not
able to reproduce it with this.

The attached patch (clear_local_map_if_exists_1.patch) atop the main
patch fixes the issue for me. Kindly verify the same.

I got one failure in 50 runs. With the new patch, I didn't get any
failures in 300 runs.

Thanks for verification. I have included it in the attached patch and
I have also modified the page.sql test to have enough number of pages
in relation so that FSM will get created irrespective of alignment
boundaries. Masahiko San, can you verify if this now works for you?

There are two more failures which we need to something about.
1. Make fsm.sql independent of vacuum without much losing on coverage
of newly added code. John, I guess you have an idea, see if you can
take care of it, otherwise, I will see what I can do for it.
2. I still could not figure out how to verify if the failure on Jacana
will be fixed. I have posted some theory above and the attached patch
has a solution for it, but I think it would be better if find out some
way to verify the same.

Note - you might see some cosmetic changes in freespace.c due to pgindent.

--
With Regards,
Amit Kapila.
EnterpriseDB: http://www.enterprisedb.com

Attachments:

v19-0001-Avoid-creation-of-the-free-space-map-for-small-heap-.patchapplication/octet-stream; name=v19-0001-Avoid-creation-of-the-free-space-map-for-small-heap-.patchDownload
From e5046542a08a4a6a243f3624bb11c2af5d8299ac Mon Sep 17 00:00:00 2001
From: Amit Kapila <akapila@postgresql.org>
Date: Wed, 30 Jan 2019 08:45:16 +0530
Subject: [PATCH] Avoid creation of the free space map for small heap
 relations.

Previously, all heaps had FSMs. For very small tables, this means that the
FSM took up more space than the heap did. This is wasteful, so now we
refrain from creating the FSM for heaps with 4 pages or fewer. If the last
known target block has insufficient space, we still try to insert into some
other page before giving up and extending the relation, since doing
otherwise leads to table bloat. Testing showed that trying every page
penalized performance slightly, so we compromise and try every other page.
This way, we visit at most two pages. Any pages with wasted free space
become visible at next relation extension, so we still control table bloat.
As a bonus, directly attempting one or two pages can even be faster than
consulting the FSM would have been.

Once the FSM is created for a heap we don't remove it even if somebody
deletes all the rows from the corresponding relation.  We don't think it is
a useful optimization as it is quite likely that relation will again grow
to the same size.

Author: John Naylor with design inputs and some code contribution by Amit Kapila
Reviewed-by: Amit Kapila
Tested-by: Mithun C Y
Discussion: https://www.postgresql.org/message-id/CAJVSVGWvB13PzpbLEecFuGFc5V2fsO736BsdTakPiPAcdMM5tQ@mail.gmail.com
---
 contrib/pageinspect/expected/page.out     |  77 ++++----
 contrib/pageinspect/sql/page.sql          |  33 ++--
 doc/src/sgml/storage.sgml                 |  13 +-
 src/backend/access/brin/brin.c            |   2 +-
 src/backend/access/brin/brin_pageops.c    |  10 +-
 src/backend/access/heap/hio.c             |  45 +++--
 src/backend/access/heap/vacuumlazy.c      |  17 +-
 src/backend/access/transam/xact.c         |  14 ++
 src/backend/storage/freespace/README      |  38 +++-
 src/backend/storage/freespace/freespace.c | 285 +++++++++++++++++++++++++++++-
 src/backend/storage/freespace/indexfsm.c  |   6 +-
 src/include/storage/freespace.h           |   9 +-
 src/test/regress/expected/fsm.out         |  75 ++++++++
 src/test/regress/parallel_schedule        |   6 +
 src/test/regress/serial_schedule          |   1 +
 src/test/regress/sql/fsm.sql              |  55 ++++++
 16 files changed, 584 insertions(+), 102 deletions(-)
 create mode 100644 src/test/regress/expected/fsm.out
 create mode 100644 src/test/regress/sql/fsm.sql

diff --git a/contrib/pageinspect/expected/page.out b/contrib/pageinspect/expected/page.out
index 3fcd9fb..89b73ca 100644
--- a/contrib/pageinspect/expected/page.out
+++ b/contrib/pageinspect/expected/page.out
@@ -1,48 +1,69 @@
 CREATE EXTENSION pageinspect;
-CREATE TABLE test1 (a int, b int);
-INSERT INTO test1 VALUES (16777217, 131584);
-VACUUM test1;  -- set up FSM
+CREATE TABLE test_rel_forks (a int);
+-- Make sure there are enough blocks in the heap for the FSM to be created.
+INSERT INTO test_rel_forks SELECT i from generate_series(1,2000) i;
+-- set up FSM and VM
+VACUUM test_rel_forks;
 -- The page contents can vary, so just test that it can be read
 -- successfully, but don't keep the output.
-SELECT octet_length(get_raw_page('test1', 'main', 0)) AS main_0;
+SELECT octet_length(get_raw_page('test_rel_forks', 'main', 0)) AS main_0;
  main_0 
 --------
    8192
 (1 row)
 
-SELECT octet_length(get_raw_page('test1', 'main', 1)) AS main_1;
-ERROR:  block number 1 is out of range for relation "test1"
-SELECT octet_length(get_raw_page('test1', 'fsm', 0)) AS fsm_0;
+SELECT octet_length(get_raw_page('test_rel_forks', 'main', 100)) AS main_100;
+ERROR:  block number 100 is out of range for relation "test_rel_forks"
+SELECT octet_length(get_raw_page('test_rel_forks', 'fsm', 0)) AS fsm_0;
  fsm_0 
 -------
   8192
 (1 row)
 
-SELECT octet_length(get_raw_page('test1', 'fsm', 1)) AS fsm_1;
- fsm_1 
--------
-  8192
-(1 row)
-
-SELECT octet_length(get_raw_page('test1', 'vm', 0)) AS vm_0;
+SELECT octet_length(get_raw_page('test_rel_forks', 'fsm', 20)) AS fsm_20;
+ERROR:  block number 20 is out of range for relation "test_rel_forks"
+SELECT octet_length(get_raw_page('test_rel_forks', 'vm', 0)) AS vm_0;
  vm_0 
 ------
  8192
 (1 row)
 
-SELECT octet_length(get_raw_page('test1', 'vm', 1)) AS vm_1;
-ERROR:  block number 1 is out of range for relation "test1"
+SELECT octet_length(get_raw_page('test_rel_forks', 'vm', 1)) AS vm_1;
+ERROR:  block number 1 is out of range for relation "test_rel_forks"
 SELECT octet_length(get_raw_page('xxx', 'main', 0));
 ERROR:  relation "xxx" does not exist
-SELECT octet_length(get_raw_page('test1', 'xxx', 0));
+SELECT octet_length(get_raw_page('test_rel_forks', 'xxx', 0));
 ERROR:  invalid fork name
 HINT:  Valid fork names are "main", "fsm", "vm", and "init".
-SELECT get_raw_page('test1', 0) = get_raw_page('test1', 'main', 0);
+SELECT * FROM fsm_page_contents(get_raw_page('test_rel_forks', 'fsm', 0));
+ fsm_page_contents 
+-------------------
+ 0: 39            +
+ 1: 39            +
+ 3: 39            +
+ 7: 39            +
+ 15: 39           +
+ 31: 39           +
+ 63: 39           +
+ 127: 39          +
+ 255: 39          +
+ 511: 39          +
+ 1023: 39         +
+ 2047: 39         +
+ 4095: 39         +
+ fp_next_slot: 0  +
+ 
+(1 row)
+
+SELECT get_raw_page('test_rel_forks', 0) = get_raw_page('test_rel_forks', 'main', 0);
  ?column? 
 ----------
  t
 (1 row)
 
+DROP TABLE test_rel_forks;
+CREATE TABLE test1 (a int, b int);
+INSERT INTO test1 VALUES (16777217, 131584);
 SELECT pagesize, version FROM page_header(get_raw_page('test1', 0));
  pagesize | version 
 ----------+---------
@@ -62,26 +83,6 @@ SELECT tuple_data_split('test1'::regclass, t_data, t_infomask, t_infomask2, t_bi
  {"\\x01000001","\\x00020200"}
 (1 row)
 
-SELECT * FROM fsm_page_contents(get_raw_page('test1', 'fsm', 0));
- fsm_page_contents 
--------------------
- 0: 254           +
- 1: 254           +
- 3: 254           +
- 7: 254           +
- 15: 254          +
- 31: 254          +
- 63: 254          +
- 127: 254         +
- 255: 254         +
- 511: 254         +
- 1023: 254        +
- 2047: 254        +
- 4095: 254        +
- fp_next_slot: 0  +
- 
-(1 row)
-
 DROP TABLE test1;
 -- check that using any of these functions with a partitioned table or index
 -- would fail
diff --git a/contrib/pageinspect/sql/page.sql b/contrib/pageinspect/sql/page.sql
index 8ac9991..67166ef 100644
--- a/contrib/pageinspect/sql/page.sql
+++ b/contrib/pageinspect/sql/page.sql
@@ -1,26 +1,35 @@
 CREATE EXTENSION pageinspect;
 
-CREATE TABLE test1 (a int, b int);
-INSERT INTO test1 VALUES (16777217, 131584);
+CREATE TABLE test_rel_forks (a int);
+-- Make sure there are enough blocks in the heap for the FSM to be created.
+INSERT INTO test_rel_forks SELECT i from generate_series(1,2000) i;
 
-VACUUM test1;  -- set up FSM
+-- set up FSM and VM
+VACUUM test_rel_forks;
 
 -- The page contents can vary, so just test that it can be read
 -- successfully, but don't keep the output.
 
-SELECT octet_length(get_raw_page('test1', 'main', 0)) AS main_0;
-SELECT octet_length(get_raw_page('test1', 'main', 1)) AS main_1;
+SELECT octet_length(get_raw_page('test_rel_forks', 'main', 0)) AS main_0;
+SELECT octet_length(get_raw_page('test_rel_forks', 'main', 100)) AS main_100;
 
-SELECT octet_length(get_raw_page('test1', 'fsm', 0)) AS fsm_0;
-SELECT octet_length(get_raw_page('test1', 'fsm', 1)) AS fsm_1;
+SELECT octet_length(get_raw_page('test_rel_forks', 'fsm', 0)) AS fsm_0;
+SELECT octet_length(get_raw_page('test_rel_forks', 'fsm', 20)) AS fsm_20;
 
-SELECT octet_length(get_raw_page('test1', 'vm', 0)) AS vm_0;
-SELECT octet_length(get_raw_page('test1', 'vm', 1)) AS vm_1;
+SELECT octet_length(get_raw_page('test_rel_forks', 'vm', 0)) AS vm_0;
+SELECT octet_length(get_raw_page('test_rel_forks', 'vm', 1)) AS vm_1;
 
 SELECT octet_length(get_raw_page('xxx', 'main', 0));
-SELECT octet_length(get_raw_page('test1', 'xxx', 0));
+SELECT octet_length(get_raw_page('test_rel_forks', 'xxx', 0));
+
+SELECT * FROM fsm_page_contents(get_raw_page('test_rel_forks', 'fsm', 0));
+
+SELECT get_raw_page('test_rel_forks', 0) = get_raw_page('test_rel_forks', 'main', 0);
 
-SELECT get_raw_page('test1', 0) = get_raw_page('test1', 'main', 0);
+DROP TABLE test_rel_forks;
+
+CREATE TABLE test1 (a int, b int);
+INSERT INTO test1 VALUES (16777217, 131584);
 
 SELECT pagesize, version FROM page_header(get_raw_page('test1', 0));
 
@@ -29,8 +38,6 @@ SELECT page_checksum(get_raw_page('test1', 0), 0) IS NOT NULL AS silly_checksum_
 SELECT tuple_data_split('test1'::regclass, t_data, t_infomask, t_infomask2, t_bits)
     FROM heap_page_items(get_raw_page('test1', 0));
 
-SELECT * FROM fsm_page_contents(get_raw_page('test1', 'fsm', 0));
-
 DROP TABLE test1;
 
 -- check that using any of these functions with a partitioned table or index
diff --git a/doc/src/sgml/storage.sgml b/doc/src/sgml/storage.sgml
index 8ef2ac8..cbdad0c 100644
--- a/doc/src/sgml/storage.sgml
+++ b/doc/src/sgml/storage.sgml
@@ -590,12 +590,13 @@ tuple would otherwise be too big.
 <indexterm><primary>FSM</primary><see>Free Space Map</see></indexterm>
 
 <para>
-Each heap and index relation, except for hash indexes, has a Free Space Map
-(FSM) to keep track of available space in the relation. It's stored
-alongside the main relation data in a separate relation fork, named after the
-filenode number of the relation, plus a <literal>_fsm</literal> suffix. For example,
-if the filenode of a relation is 12345, the FSM is stored in a file called
-<filename>12345_fsm</filename>, in the same directory as the main relation file.
+Each heap relation, unless it is very small, and each index relation, except
+for hash indexes, has a Free Space Map (FSM) to keep track of available
+space in the relation. It's stored alongside the main relation data in a
+separate relation fork, named after the filenode number of the relation, plus
+a <literal>_fsm</literal> suffix. For example, if the filenode of a relation
+is 12345, the FSM is stored in a file called <filename>12345_fsm</filename>,
+in the same directory as the main relation file.
 </para>
 
 <para>
diff --git a/src/backend/access/brin/brin.c b/src/backend/access/brin/brin.c
index 467d91e..8f008dd 100644
--- a/src/backend/access/brin/brin.c
+++ b/src/backend/access/brin/brin.c
@@ -1150,7 +1150,7 @@ terminate_brin_buildstate(BrinBuildState *state)
 		freespace = PageGetFreeSpace(page);
 		blk = BufferGetBlockNumber(state->bs_currentInsertBuf);
 		ReleaseBuffer(state->bs_currentInsertBuf);
-		RecordPageWithFreeSpace(state->bs_irel, blk, freespace);
+		RecordPageWithFreeSpace(state->bs_irel, blk, freespace, InvalidBlockNumber);
 		FreeSpaceMapVacuumRange(state->bs_irel, blk, blk + 1);
 	}
 
diff --git a/src/backend/access/brin/brin_pageops.c b/src/backend/access/brin/brin_pageops.c
index 164a468..2eb354f 100644
--- a/src/backend/access/brin/brin_pageops.c
+++ b/src/backend/access/brin/brin_pageops.c
@@ -310,7 +310,7 @@ brin_doupdate(Relation idxrel, BlockNumber pagesPerRange,
 
 		if (extended)
 		{
-			RecordPageWithFreeSpace(idxrel, newblk, freespace);
+			RecordPageWithFreeSpace(idxrel, newblk, freespace, InvalidBlockNumber);
 			FreeSpaceMapVacuumRange(idxrel, newblk, newblk + 1);
 		}
 
@@ -461,7 +461,7 @@ brin_doinsert(Relation idxrel, BlockNumber pagesPerRange,
 
 	if (extended)
 	{
-		RecordPageWithFreeSpace(idxrel, blk, freespace);
+		RecordPageWithFreeSpace(idxrel, blk, freespace, InvalidBlockNumber);
 		FreeSpaceMapVacuumRange(idxrel, blk, blk + 1);
 	}
 
@@ -654,7 +654,7 @@ brin_page_cleanup(Relation idxrel, Buffer buf)
 
 	/* Measure free space and record it */
 	RecordPageWithFreeSpace(idxrel, BufferGetBlockNumber(buf),
-							br_page_get_freespace(page));
+							br_page_get_freespace(page), InvalidBlockNumber);
 }
 
 /*
@@ -703,7 +703,7 @@ brin_getinsertbuffer(Relation irel, Buffer oldbuf, Size itemsz,
 	/* Choose initial target page, re-using existing target if known */
 	newblk = RelationGetTargetBlock(irel);
 	if (newblk == InvalidBlockNumber)
-		newblk = GetPageWithFreeSpace(irel, itemsz);
+		newblk = GetPageWithFreeSpace(irel, itemsz, true);
 
 	/*
 	 * Loop until we find a page with sufficient free space.  By the time we
@@ -895,7 +895,7 @@ brin_initialize_empty_new_buffer(Relation idxrel, Buffer buffer)
 	 * pages whose FSM records were forgotten in a crash.
 	 */
 	RecordPageWithFreeSpace(idxrel, BufferGetBlockNumber(buffer),
-							br_page_get_freespace(page));
+							br_page_get_freespace(page), InvalidBlockNumber);
 }
 
 
diff --git a/src/backend/access/heap/hio.c b/src/backend/access/heap/hio.c
index 3da0b49..995d78e 100644
--- a/src/backend/access/heap/hio.c
+++ b/src/backend/access/heap/hio.c
@@ -239,8 +239,14 @@ RelationAddExtraBlocks(Relation relation, BulkInsertState bistate)
 		 * Immediately update the bottom level of the FSM.  This has a good
 		 * chance of making this page visible to other concurrently inserting
 		 * backends, and we want that to happen without delay.
+		 *
+		 * Since we know the table will end up with extraBlocks additional
+		 * pages, we pass the final number to avoid possible unnecessary
+		 * system calls and to make sure the FSM is created when we add the
+		 * first new page.
 		 */
-		RecordPageWithFreeSpace(relation, blockNum, freespace);
+		RecordPageWithFreeSpace(relation, blockNum, freespace,
+								firstBlock + extraBlocks);
 	}
 	while (--extraBlocks > 0);
 
@@ -377,20 +383,9 @@ RelationGetBufferForTuple(Relation relation, Size len,
 		 * We have no cached target page, so ask the FSM for an initial
 		 * target.
 		 */
-		targetBlock = GetPageWithFreeSpace(relation, len + saveFreeSpace);
-
-		/*
-		 * If the FSM knows nothing of the rel, try the last page before we
-		 * give up and extend.  This avoids one-tuple-per-page syndrome during
-		 * bootstrapping or in a recently-started system.
-		 */
-		if (targetBlock == InvalidBlockNumber)
-		{
-			BlockNumber nblocks = RelationGetNumberOfBlocks(relation);
-
-			if (nblocks > 0)
-				targetBlock = nblocks - 1;
-		}
+		targetBlock = GetPageWithFreeSpace(relation,
+										   len + saveFreeSpace,
+										   false);
 	}
 
 loop:
@@ -484,6 +479,13 @@ loop:
 		{
 			/* use this page as future insert target, too */
 			RelationSetTargetBlock(relation, targetBlock);
+
+			/*
+			 * In case we used an in-memory map of available blocks, reset it
+			 * for next use.
+			 */
+			FSMClearLocalMap();
+
 			return buffer;
 		}
 
@@ -543,9 +545,12 @@ loop:
 
 			/*
 			 * Check if some other backend has extended a block for us while
-			 * we were waiting on the lock.
+			 * we were waiting on the lock.  We only check the FSM -- if there
+			 * isn't one we don't recheck the number of blocks.
 			 */
-			targetBlock = GetPageWithFreeSpace(relation, len + saveFreeSpace);
+			targetBlock = GetPageWithFreeSpace(relation,
+											   len + saveFreeSpace,
+											   true);
 
 			/*
 			 * If some other waiter has already extended the relation, we
@@ -625,5 +630,11 @@ loop:
 	 */
 	RelationSetTargetBlock(relation, BufferGetBlockNumber(buffer));
 
+	/*
+	 * In case we used an in-memory map of available blocks, reset it for next
+	 * use.
+	 */
+	FSMClearLocalMap();
+
 	return buffer;
 }
diff --git a/src/backend/access/heap/vacuumlazy.c b/src/backend/access/heap/vacuumlazy.c
index 37aa484..9cfa65c 100644
--- a/src/backend/access/heap/vacuumlazy.c
+++ b/src/backend/access/heap/vacuumlazy.c
@@ -153,7 +153,7 @@ static BufferAccessStrategy vac_strategy;
 static void lazy_scan_heap(Relation onerel, int options,
 			   LVRelStats *vacrelstats, Relation *Irel, int nindexes,
 			   bool aggressive);
-static void lazy_vacuum_heap(Relation onerel, LVRelStats *vacrelstats);
+static void lazy_vacuum_heap(Relation onerel, LVRelStats *vacrelstats, BlockNumber nblocks);
 static bool lazy_check_needs_freeze(Buffer buf, bool *hastup);
 static void lazy_vacuum_index(Relation indrel,
 				  IndexBulkDeleteResult **stats,
@@ -758,7 +758,7 @@ lazy_scan_heap(Relation onerel, int options, LVRelStats *vacrelstats,
 			pgstat_progress_update_multi_param(2, hvp_index, hvp_val);
 
 			/* Remove tuples from heap */
-			lazy_vacuum_heap(onerel, vacrelstats);
+			lazy_vacuum_heap(onerel, vacrelstats, nblocks);
 
 			/*
 			 * Forget the now-vacuumed tuples, and press on, but be careful
@@ -896,7 +896,7 @@ lazy_scan_heap(Relation onerel, int options, LVRelStats *vacrelstats,
 			MarkBufferDirty(buf);
 			UnlockReleaseBuffer(buf);
 
-			RecordPageWithFreeSpace(onerel, blkno, freespace);
+			RecordPageWithFreeSpace(onerel, blkno, freespace, nblocks);
 			continue;
 		}
 
@@ -935,7 +935,7 @@ lazy_scan_heap(Relation onerel, int options, LVRelStats *vacrelstats,
 			}
 
 			UnlockReleaseBuffer(buf);
-			RecordPageWithFreeSpace(onerel, blkno, freespace);
+			RecordPageWithFreeSpace(onerel, blkno, freespace, nblocks);
 			continue;
 		}
 
@@ -1332,7 +1332,7 @@ lazy_scan_heap(Relation onerel, int options, LVRelStats *vacrelstats,
 		 * taken if there are no indexes.)
 		 */
 		if (vacrelstats->num_dead_tuples == prev_dead_count)
-			RecordPageWithFreeSpace(onerel, blkno, freespace);
+			RecordPageWithFreeSpace(onerel, blkno, freespace, nblocks);
 	}
 
 	/* report that everything is scanned and vacuumed */
@@ -1394,7 +1394,7 @@ lazy_scan_heap(Relation onerel, int options, LVRelStats *vacrelstats,
 		/* Remove tuples from heap */
 		pgstat_progress_update_param(PROGRESS_VACUUM_PHASE,
 									 PROGRESS_VACUUM_PHASE_VACUUM_HEAP);
-		lazy_vacuum_heap(onerel, vacrelstats);
+		lazy_vacuum_heap(onerel, vacrelstats, nblocks);
 		vacrelstats->num_index_scans++;
 	}
 
@@ -1465,9 +1465,10 @@ lazy_scan_heap(Relation onerel, int options, LVRelStats *vacrelstats,
  * Note: the reason for doing this as a second pass is we cannot remove
  * the tuples until we've removed their index entries, and we want to
  * process index entry removal in batches as large as possible.
+ * Note: nblocks is passed as an optimization for RecordPageWithFreeSpace().
  */
 static void
-lazy_vacuum_heap(Relation onerel, LVRelStats *vacrelstats)
+lazy_vacuum_heap(Relation onerel, LVRelStats *vacrelstats, BlockNumber nblocks)
 {
 	int			tupindex;
 	int			npages;
@@ -1504,7 +1505,7 @@ lazy_vacuum_heap(Relation onerel, LVRelStats *vacrelstats)
 		freespace = PageGetHeapFreeSpace(page);
 
 		UnlockReleaseBuffer(buf);
-		RecordPageWithFreeSpace(onerel, tblk, freespace);
+		RecordPageWithFreeSpace(onerel, tblk, freespace, nblocks);
 		npages++;
 	}
 
diff --git a/src/backend/access/transam/xact.c b/src/backend/access/transam/xact.c
index 0181976..92bda87 100644
--- a/src/backend/access/transam/xact.c
+++ b/src/backend/access/transam/xact.c
@@ -48,6 +48,7 @@
 #include "replication/walsender.h"
 #include "storage/condition_variable.h"
 #include "storage/fd.h"
+#include "storage/freespace.h"
 #include "storage/lmgr.h"
 #include "storage/predicate.h"
 #include "storage/proc.h"
@@ -2493,6 +2494,12 @@ AbortTransaction(void)
 	pgstat_report_wait_end();
 	pgstat_progress_end_command();
 
+	/*
+	 * In case we aborted during RelationGetBufferForTuple(), clear the local
+	 * map of heap pages.
+	 */
+	FSMClearLocalMap();
+
 	/* Clean up buffer I/O and buffer context locks, too */
 	AbortBufferIO();
 	UnlockBuffers();
@@ -4714,6 +4721,13 @@ AbortSubTransaction(void)
 
 	pgstat_report_wait_end();
 	pgstat_progress_end_command();
+
+	/*
+	 * In case we aborted during RelationGetBufferForTuple(), clear the local
+	 * map of heap pages.
+	 */
+	FSMClearLocalMap();
+
 	AbortBufferIO();
 	UnlockBuffers();
 
diff --git a/src/backend/storage/freespace/README b/src/backend/storage/freespace/README
index e7ff23b..0d3cd29 100644
--- a/src/backend/storage/freespace/README
+++ b/src/backend/storage/freespace/README
@@ -8,7 +8,41 @@ free space to hold a tuple to be stored; or to determine that no such page
 exists and the relation must be extended by one page.  As of PostgreSQL 8.4
 each relation has its own, extensible free space map stored in a separate
 "fork" of its relation.  This eliminates the disadvantages of the former
-fixed-size FSM.
+fixed-size FSM.  There are two exceptions:
+
+1. Hash indexes never have a FSM.
+2. For very small tables, a 3-page relation fork would be relatively large
+and wasteful, so to save space we refrain from creating the FSM if the
+heap has HEAP_FSM_CREATION_THRESHOLD pages or fewer.
+
+To locate free space in the latter case, we simply try pages directly without
+knowing ahead of time how much free space they have.  To maintain good
+performance, we create a local in-memory map of pages to try, and only mark
+every other page as available.  For example, in a 3-page heap, the local map
+would look like:
+
+ANAN
+0123
+
+Pages 0 and 2 are marked "available", and page 1 as "not available".
+Page 3 is beyond the end of the relation, so is likewise marked "not
+available".  First we try page 2, and if that doesn't have sufficient free
+space we try page 0 before giving up and extending the relation.  There may
+be some wasted free space on block 1, but if the relation extends to 4 pages:
+
+NANA
+0123
+
+We not only have the new page 3 at our disposal, we can now check page 1
+for free space as well.
+
+Once the FSM is created for a heap we don't remove it even if somebody deletes
+all the rows from the corresponding relation.  We don't think it is a useful
+optimization as it is quite likely that relation will again grow to the same
+size.
+
+FSM data structure
+------------------
 
 It is important to keep the map small so that it can be searched rapidly.
 Therefore, we don't attempt to record the exact free space on a page.
@@ -192,5 +226,3 @@ TODO
 ----
 
 - fastroot to avoid traversing upper nodes with just 1 child
-- use a different system for tables that fit into one FSM page, with a
-  mechanism to switch to the real thing as it grows.
diff --git a/src/backend/storage/freespace/freespace.c b/src/backend/storage/freespace/freespace.c
index eee8286..d3f207b 100644
--- a/src/backend/storage/freespace/freespace.c
+++ b/src/backend/storage/freespace/freespace.c
@@ -76,6 +76,14 @@
 #define FSM_ROOT_LEVEL	(FSM_TREE_DEPTH - 1)
 #define FSM_BOTTOM_LEVEL 0
 
+/* Status codes for the local map. */
+
+/* Either already tried, or beyond the end of the relation */
+#define FSM_LOCAL_NOT_AVAIL 0x00
+
+/* Available to try */
+#define FSM_LOCAL_AVAIL		0x01
+
 /*
  * The internal FSM routines work on a logical addressing scheme. Each
  * level of the tree can be thought of as a separately addressable file.
@@ -89,6 +97,23 @@ typedef struct
 /* Address of the root page. */
 static const FSMAddress FSM_ROOT_ADDRESS = {FSM_ROOT_LEVEL, 0};
 
+/* Local map of block numbers for small heaps with no FSM. */
+typedef struct
+{
+	BlockNumber nblocks;
+	uint8		map[HEAP_FSM_CREATION_THRESHOLD];
+}			FSMLocalMap;
+
+static FSMLocalMap fsm_local_map =
+{
+	0,
+	{
+		FSM_LOCAL_NOT_AVAIL
+	}
+};
+
+#define FSM_LOCAL_MAP_EXISTS (fsm_local_map.nblocks > 0)
+
 /* functions to navigate the tree */
 static FSMAddress fsm_get_child(FSMAddress parent, uint16 slot);
 static FSMAddress fsm_get_parent(FSMAddress child, uint16 *slot);
@@ -107,10 +132,14 @@ static Size fsm_space_cat_to_avail(uint8 cat);
 /* workhorse functions for various operations */
 static int fsm_set_and_search(Relation rel, FSMAddress addr, uint16 slot,
 				   uint8 newValue, uint8 minValue);
+static void fsm_local_set(Relation rel, BlockNumber cur_nblocks);
 static BlockNumber fsm_search(Relation rel, uint8 min_cat);
+static BlockNumber fsm_local_search(void);
 static uint8 fsm_vacuum_page(Relation rel, FSMAddress addr,
 				BlockNumber start, BlockNumber end,
 				bool *eof);
+static bool fsm_allow_writes(Relation rel, BlockNumber heapblk,
+				 BlockNumber nblocks, BlockNumber *get_nblocks);
 
 
 /******** Public API ********/
@@ -127,13 +156,46 @@ static uint8 fsm_vacuum_page(Relation rel, FSMAddress addr,
  * amount of free space available on that page and then try again (see
  * RecordAndGetPageWithFreeSpace).  If InvalidBlockNumber is returned,
  * extend the relation.
+ *
+ * For very small heap relations that don't have a FSM, we try every other
+ * page before extending the relation.  To keep track of which pages have
+ * been tried, initialize a local in-memory map of pages.
  */
 BlockNumber
-GetPageWithFreeSpace(Relation rel, Size spaceNeeded)
+GetPageWithFreeSpace(Relation rel, Size spaceNeeded, bool check_fsm_only)
 {
 	uint8		min_cat = fsm_space_needed_to_cat(spaceNeeded);
+	BlockNumber target_block,
+				nblocks;
+
+	/* First try the FSM, if it exists. */
+	target_block = fsm_search(rel, min_cat);
+
+	if (target_block == InvalidBlockNumber &&
+		(rel->rd_rel->relkind == RELKIND_RELATION ||
+		 rel->rd_rel->relkind == RELKIND_TOASTVALUE) &&
+		!check_fsm_only)
+	{
+		nblocks = RelationGetNumberOfBlocks(rel);
+
+		if (nblocks > HEAP_FSM_CREATION_THRESHOLD)
+		{
+			/*
+			 * If the FSM knows nothing of the rel, try the last page before
+			 * we give up and extend.  This avoids one-tuple-per-page syndrome
+			 * during bootstrapping or in a recently-started system.
+			 */
+			target_block = nblocks - 1;
+		}
+		else if (nblocks > 0)
+		{
+			/* Create or update local map and get first candidate block. */
+			fsm_local_set(rel, nblocks);
+			target_block = fsm_local_search();
+		}
+	}
 
-	return fsm_search(rel, min_cat);
+	return target_block;
 }
 
 /*
@@ -144,16 +206,47 @@ GetPageWithFreeSpace(Relation rel, Size spaceNeeded)
  * also some effort to return a page close to the old page; if there's a
  * page with enough free space on the same FSM page where the old one page
  * is located, it is preferred.
+ *
+ * For very small heap relations that don't have a FSM, we update the local
+ * map to indicate we have tried a page, and return the next page to try.
  */
 BlockNumber
 RecordAndGetPageWithFreeSpace(Relation rel, BlockNumber oldPage,
 							  Size oldSpaceAvail, Size spaceNeeded)
 {
-	int			old_cat = fsm_space_avail_to_cat(oldSpaceAvail);
-	int			search_cat = fsm_space_needed_to_cat(spaceNeeded);
+	int			old_cat;
+	int			search_cat;
 	FSMAddress	addr;
 	uint16		slot;
 	int			search_slot;
+	BlockNumber nblocks = InvalidBlockNumber;
+
+	/* First try the local map, if it exists. */
+	if (FSM_LOCAL_MAP_EXISTS)
+	{
+		Assert((rel->rd_rel->relkind == RELKIND_RELATION ||
+				rel->rd_rel->relkind == RELKIND_TOASTVALUE) &&
+			   fsm_local_map.map[oldPage] == FSM_LOCAL_AVAIL);
+
+		fsm_local_map.map[oldPage] = FSM_LOCAL_NOT_AVAIL;
+		return fsm_local_search();
+	}
+
+	if (!fsm_allow_writes(rel, oldPage, InvalidBlockNumber, &nblocks))
+	{
+		/*
+		 * If we have neither a local map nor a FSM, we probably just tried
+		 * the target block in the smgr relation entry and failed, so we'll
+		 * need to create the local map.
+		 */
+		fsm_local_set(rel, nblocks);
+		return fsm_local_search();
+	}
+
+	/* Normal FSM logic follows */
+
+	old_cat = fsm_space_avail_to_cat(oldSpaceAvail);
+	search_cat = fsm_space_needed_to_cat(spaceNeeded);
 
 	/* Get the location of the FSM byte representing the heap block */
 	addr = fsm_get_location(oldPage, &slot);
@@ -176,21 +269,45 @@ RecordAndGetPageWithFreeSpace(Relation rel, BlockNumber oldPage,
  * Note that if the new spaceAvail value is higher than the old value stored
  * in the FSM, the space might not become visible to searchers until the next
  * FreeSpaceMapVacuum call, which updates the upper level pages.
+ *
+ * Callers have no need for a local map.
  */
 void
-RecordPageWithFreeSpace(Relation rel, BlockNumber heapBlk, Size spaceAvail)
+RecordPageWithFreeSpace(Relation rel, BlockNumber heapBlk,
+						Size spaceAvail, BlockNumber nblocks)
 {
-	int			new_cat = fsm_space_avail_to_cat(spaceAvail);
+	int			new_cat;
 	FSMAddress	addr;
 	uint16		slot;
+	BlockNumber dummy;
+
+	if (!fsm_allow_writes(rel, heapBlk, nblocks, &dummy))
+		/* No FSM to update and no local map either */
+		return;
 
 	/* Get the location of the FSM byte representing the heap block */
 	addr = fsm_get_location(heapBlk, &slot);
 
+	new_cat = fsm_space_avail_to_cat(spaceAvail);
 	fsm_set_and_search(rel, addr, slot, new_cat, 0);
 }
 
 /*
+ * Clear the local map.  We must call this when we have found a block with
+ * enough free space, when we extend the relation, or on transaction abort.
+ */
+void
+FSMClearLocalMap(void)
+{
+	if (FSM_LOCAL_MAP_EXISTS)
+	{
+		fsm_local_map.nblocks = 0;
+		memset(&fsm_local_map.map, FSM_LOCAL_NOT_AVAIL,
+			   sizeof(fsm_local_map.map));
+	}
+}
+
+/*
  * XLogRecordPageWithFreeSpace - like RecordPageWithFreeSpace, for use in
  *		WAL replay
  */
@@ -204,6 +321,31 @@ XLogRecordPageWithFreeSpace(RelFileNode rnode, BlockNumber heapBlk,
 	BlockNumber blkno;
 	Buffer		buf;
 	Page		page;
+	bool		write_to_fsm;
+
+	/* This is meant to mirror the logic in fsm_allow_writes() */
+	if (heapBlk >= HEAP_FSM_CREATION_THRESHOLD)
+		write_to_fsm = true;
+	else
+	{
+		/* Open the relation at smgr level */
+		SMgrRelation smgr = smgropen(rnode, InvalidBackendId);
+
+		if (smgrexists(smgr, FSM_FORKNUM))
+			write_to_fsm = true;
+		else
+		{
+			BlockNumber heap_nblocks = smgrnblocks(smgr, MAIN_FORKNUM);
+
+			if (heap_nblocks > HEAP_FSM_CREATION_THRESHOLD)
+				write_to_fsm = true;
+			else
+				write_to_fsm = false;
+		}
+	}
+
+	if (!write_to_fsm)
+		return;
 
 	/* Get the location of the FSM byte representing the heap block */
 	addr = fsm_get_location(heapBlk, &slot);
@@ -904,3 +1046,134 @@ fsm_vacuum_page(Relation rel, FSMAddress addr,
 
 	return max_avail;
 }
+
+/*
+ * For heaps, we prevent creation of the FSM unless the number of pages
+ * exceeds HEAP_FSM_CREATION_THRESHOLD.  For tables that don't already have
+ * a FSM, this will save an inode and a few kB of space.
+ *
+ * XXX The API is a little awkward -- if the caller passes a valid nblocks
+ * value, it can avoid invoking a system call.  If the caller passes
+ * InvalidBlockNumber and receives a false return value, it can get an
+ * up-to-date relation size from get_nblocks.  This saves a few cycles in
+ * the caller, which would otherwise need to get the relation size by itself.
+ */
+static bool
+fsm_allow_writes(Relation rel, BlockNumber heapblk,
+				 BlockNumber nblocks, BlockNumber *get_nblocks)
+{
+	bool		skip_get_nblocks;
+
+	if (heapblk >= HEAP_FSM_CREATION_THRESHOLD)
+		return true;
+
+	/* Non-heap rels can always create a FSM. */
+	if (rel->rd_rel->relkind != RELKIND_RELATION &&
+		rel->rd_rel->relkind != RELKIND_TOASTVALUE)
+		return true;
+
+	/*
+	 * If the caller knows nblocks, we can avoid a system call later. If it
+	 * doesn't, maybe we have relpages from a previous VACUUM. Since the table
+	 * may have extended since then, we still have to count the pages later if
+	 * we can't return now.
+	 */
+	if (nblocks != InvalidBlockNumber)
+	{
+		if (nblocks > HEAP_FSM_CREATION_THRESHOLD)
+			return true;
+		else
+			skip_get_nblocks = true;
+	}
+	else
+	{
+		if (rel->rd_rel->relpages != InvalidBlockNumber &&
+			rel->rd_rel->relpages > HEAP_FSM_CREATION_THRESHOLD)
+			return true;
+		else
+			skip_get_nblocks = false;
+	}
+
+	RelationOpenSmgr(rel);
+	if (smgrexists(rel->rd_smgr, FSM_FORKNUM))
+		return true;
+
+	if (skip_get_nblocks)
+		return false;
+
+	/* last resort */
+	*get_nblocks = RelationGetNumberOfBlocks(rel);
+	if (*get_nblocks > HEAP_FSM_CREATION_THRESHOLD)
+		return true;
+	else
+		return false;
+}
+
+/*
+ * Initialize or update the local map of blocks to try, for when there is
+ * no FSM.
+ *
+ * When we initialize the map, the whole heap is potentially available to
+ * try.  Testing revealed that trying every block can cause a small
+ * performance dip compared to when we use a FSM, so we try every other
+ * block instead.
+ */
+static void
+fsm_local_set(Relation rel, BlockNumber cur_nblocks)
+{
+	BlockNumber blkno,
+				cached_target_block;
+
+	/* The local map must not be set already. */
+	Assert(!FSM_LOCAL_MAP_EXISTS);
+
+	/*
+	 * Starting at the current last block in the relation and working
+	 * backwards, mark alternating blocks as available.
+	 */
+	blkno = cur_nblocks - 1;
+	while (true)
+	{
+		fsm_local_map.map[blkno] = FSM_LOCAL_AVAIL;
+		if (blkno >= 2)
+			blkno -= 2;
+		else
+			break;
+	}
+
+	/* Cache the number of blocks. */
+	fsm_local_map.nblocks = cur_nblocks;
+
+	/* Set the status of the cached target block to 'unavailable'. */
+	cached_target_block = RelationGetTargetBlock(rel);
+	if (cached_target_block != InvalidBlockNumber &&
+		cached_target_block < cur_nblocks)
+		fsm_local_map.map[cached_target_block] = FSM_LOCAL_NOT_AVAIL;
+}
+
+/*
+ * Search the local map for an available block to try, in descending order.
+ * As such, there is no heuristic available to decide which order will be
+ * better to try, but the probability of having space in the last block in the
+ * map is higher because that is the most recent block added to the heap.
+ *
+ * This function is used when there is no FSM.
+ */
+static BlockNumber
+fsm_local_search(void)
+{
+	BlockNumber target_block;
+
+	/* Local map must be set by now. */
+	Assert(FSM_LOCAL_MAP_EXISTS);
+
+	target_block = fsm_local_map.nblocks;
+	do
+	{
+		target_block--;
+		if (fsm_local_map.map[target_block] == FSM_LOCAL_AVAIL)
+			return target_block;
+	} while (target_block > 0);
+
+	return InvalidBlockNumber;
+}
diff --git a/src/backend/storage/freespace/indexfsm.c b/src/backend/storage/freespace/indexfsm.c
index 58cedea..9d8f43d 100644
--- a/src/backend/storage/freespace/indexfsm.c
+++ b/src/backend/storage/freespace/indexfsm.c
@@ -37,7 +37,7 @@
 BlockNumber
 GetFreeIndexPage(Relation rel)
 {
-	BlockNumber blkno = GetPageWithFreeSpace(rel, BLCKSZ / 2);
+	BlockNumber blkno = GetPageWithFreeSpace(rel, BLCKSZ / 2, true);
 
 	if (blkno != InvalidBlockNumber)
 		RecordUsedIndexPage(rel, blkno);
@@ -51,7 +51,7 @@ GetFreeIndexPage(Relation rel)
 void
 RecordFreeIndexPage(Relation rel, BlockNumber freeBlock)
 {
-	RecordPageWithFreeSpace(rel, freeBlock, BLCKSZ - 1);
+	RecordPageWithFreeSpace(rel, freeBlock, BLCKSZ - 1, InvalidBlockNumber);
 }
 
 
@@ -61,7 +61,7 @@ RecordFreeIndexPage(Relation rel, BlockNumber freeBlock)
 void
 RecordUsedIndexPage(Relation rel, BlockNumber usedBlock)
 {
-	RecordPageWithFreeSpace(rel, usedBlock, 0);
+	RecordPageWithFreeSpace(rel, usedBlock, 0, InvalidBlockNumber);
 }
 
 /*
diff --git a/src/include/storage/freespace.h b/src/include/storage/freespace.h
index 8b00033..dbaae65 100644
--- a/src/include/storage/freespace.h
+++ b/src/include/storage/freespace.h
@@ -18,15 +18,20 @@
 #include "storage/relfilenode.h"
 #include "utils/relcache.h"
 
+/* Only create the FSM if the heap has greater than this many blocks */
+#define HEAP_FSM_CREATION_THRESHOLD 4
+
 /* prototypes for public functions in freespace.c */
 extern Size GetRecordedFreeSpace(Relation rel, BlockNumber heapBlk);
-extern BlockNumber GetPageWithFreeSpace(Relation rel, Size spaceNeeded);
+extern BlockNumber GetPageWithFreeSpace(Relation rel, Size spaceNeeded,
+					 bool check_fsm_only);
 extern BlockNumber RecordAndGetPageWithFreeSpace(Relation rel,
 							  BlockNumber oldPage,
 							  Size oldSpaceAvail,
 							  Size spaceNeeded);
 extern void RecordPageWithFreeSpace(Relation rel, BlockNumber heapBlk,
-						Size spaceAvail);
+						Size spaceAvail, BlockNumber nblocks);
+extern void FSMClearLocalMap(void);
 extern void XLogRecordPageWithFreeSpace(RelFileNode rnode, BlockNumber heapBlk,
 							Size spaceAvail);
 
diff --git a/src/test/regress/expected/fsm.out b/src/test/regress/expected/fsm.out
new file mode 100644
index 0000000..df6b15b
--- /dev/null
+++ b/src/test/regress/expected/fsm.out
@@ -0,0 +1,75 @@
+--
+-- Free Space Map test
+--
+CREATE TABLE fsm_check_size (num int, str text);
+-- Fill 3 blocks with as many large records as will fit
+-- No FSM
+INSERT INTO fsm_check_size SELECT i, rpad('', 1024, 'a')
+FROM generate_series(1,7*3) i;
+VACUUM fsm_check_size;
+SELECT pg_relation_size('fsm_check_size', 'main') AS heap_size,
+pg_relation_size('fsm_check_size', 'fsm') AS fsm_size;
+ heap_size | fsm_size 
+-----------+----------
+     24576 |        0
+(1 row)
+
+-- Clear some space on block 0
+DELETE FROM fsm_check_size WHERE num <= 5;
+VACUUM fsm_check_size;
+-- Insert small record in block 2 to set the cached smgr targetBlock
+INSERT INTO fsm_check_size VALUES(99, 'b');
+-- Insert large record and make sure it goes in block 0 rather than
+-- causing the relation to extend
+INSERT INTO fsm_check_size VALUES (101, rpad('', 1024, 'a'));
+SELECT pg_relation_size('fsm_check_size', 'main') AS heap_size,
+pg_relation_size('fsm_check_size', 'fsm') AS fsm_size;
+ heap_size | fsm_size 
+-----------+----------
+     24576 |        0
+(1 row)
+
+-- Extend table with enough blocks to exceed the FSM threshold
+-- FSM is created and extended to 3 blocks
+INSERT INTO fsm_check_size SELECT i, 'c' FROM generate_series(200,1200) i;
+VACUUM fsm_check_size;
+SELECT pg_relation_size('fsm_check_size', 'fsm') AS fsm_size;
+ fsm_size 
+----------
+    24576
+(1 row)
+
+-- Truncate heap to 1 block
+-- No change in FSM
+DELETE FROM fsm_check_size WHERE num > 7;
+VACUUM fsm_check_size;
+SELECT pg_relation_size('fsm_check_size', 'fsm') AS fsm_size;
+ fsm_size 
+----------
+    24576
+(1 row)
+
+-- Truncate heap to 0 blocks
+-- FSM now truncated to 2 blocks
+DELETE FROM fsm_check_size;
+VACUUM fsm_check_size;
+SELECT pg_relation_size('fsm_check_size', 'fsm') AS fsm_size;
+ fsm_size 
+----------
+    16384
+(1 row)
+
+-- Add long random string to extend TOAST table to 1 block
+INSERT INTO fsm_check_size
+VALUES(0, (SELECT string_agg(md5(chr(i)), '')
+		   FROM generate_series(1,100) i));
+VACUUM fsm_check_size;
+SELECT pg_relation_size(reltoastrelid, 'main') AS toast_size,
+pg_relation_size(reltoastrelid, 'fsm') AS toast_fsm_size
+FROM pg_class WHERE relname = 'fsm_check_size';
+ toast_size | toast_fsm_size 
+------------+----------------
+       8192 |              0
+(1 row)
+
+DROP TABLE fsm_check_size;
diff --git a/src/test/regress/parallel_schedule b/src/test/regress/parallel_schedule
index cc0bbf5..4051a4a 100644
--- a/src/test/regress/parallel_schedule
+++ b/src/test/regress/parallel_schedule
@@ -69,6 +69,12 @@ test: create_aggregate create_function_3 create_cast constraints triggers inheri
 test: sanity_check
 
 # ----------
+# fsm does a delete followed by vacuum, and running it in parallel can prevent
+# removal of rows.
+# ----------
+test: fsm
+
+# ----------
 # Believe it or not, select creates a table, subsequent
 # tests need.
 # ----------
diff --git a/src/test/regress/serial_schedule b/src/test/regress/serial_schedule
index 0c10c71..ac1ea62 100644
--- a/src/test/regress/serial_schedule
+++ b/src/test/regress/serial_schedule
@@ -80,6 +80,7 @@ test: roleattributes
 test: create_am
 test: hash_func
 test: sanity_check
+test: fsm
 test: errors
 test: select
 test: select_into
diff --git a/src/test/regress/sql/fsm.sql b/src/test/regress/sql/fsm.sql
new file mode 100644
index 0000000..07f5055
--- /dev/null
+++ b/src/test/regress/sql/fsm.sql
@@ -0,0 +1,55 @@
+--
+-- Free Space Map test
+--
+
+CREATE TABLE fsm_check_size (num int, str text);
+
+-- Fill 3 blocks with as many large records as will fit
+-- No FSM
+INSERT INTO fsm_check_size SELECT i, rpad('', 1024, 'a')
+FROM generate_series(1,7*3) i;
+VACUUM fsm_check_size;
+SELECT pg_relation_size('fsm_check_size', 'main') AS heap_size,
+pg_relation_size('fsm_check_size', 'fsm') AS fsm_size;
+
+-- Clear some space on block 0
+DELETE FROM fsm_check_size WHERE num <= 5;
+VACUUM fsm_check_size;
+
+-- Insert small record in block 2 to set the cached smgr targetBlock
+INSERT INTO fsm_check_size VALUES(99, 'b');
+
+-- Insert large record and make sure it goes in block 0 rather than
+-- causing the relation to extend
+INSERT INTO fsm_check_size VALUES (101, rpad('', 1024, 'a'));
+SELECT pg_relation_size('fsm_check_size', 'main') AS heap_size,
+pg_relation_size('fsm_check_size', 'fsm') AS fsm_size;
+
+-- Extend table with enough blocks to exceed the FSM threshold
+-- FSM is created and extended to 3 blocks
+INSERT INTO fsm_check_size SELECT i, 'c' FROM generate_series(200,1200) i;
+VACUUM fsm_check_size;
+SELECT pg_relation_size('fsm_check_size', 'fsm') AS fsm_size;
+
+-- Truncate heap to 1 block
+-- No change in FSM
+DELETE FROM fsm_check_size WHERE num > 7;
+VACUUM fsm_check_size;
+SELECT pg_relation_size('fsm_check_size', 'fsm') AS fsm_size;
+
+-- Truncate heap to 0 blocks
+-- FSM now truncated to 2 blocks
+DELETE FROM fsm_check_size;
+VACUUM fsm_check_size;
+SELECT pg_relation_size('fsm_check_size', 'fsm') AS fsm_size;
+
+-- Add long random string to extend TOAST table to 1 block
+INSERT INTO fsm_check_size
+VALUES(0, (SELECT string_agg(md5(chr(i)), '')
+		   FROM generate_series(1,100) i));
+VACUUM fsm_check_size;
+SELECT pg_relation_size(reltoastrelid, 'main') AS toast_size,
+pg_relation_size(reltoastrelid, 'fsm') AS toast_fsm_size
+FROM pg_class WHERE relname = 'fsm_check_size';
+
+DROP TABLE fsm_check_size;
-- 
1.8.3.1

#112John Naylor
john.naylor@2ndquadrant.com
In reply to: Amit Kapila (#111)
1 attachment(s)
Re: WIP: Avoid creation of the free space map for small tables

On Wed, Jan 30, 2019 at 4:33 AM Amit Kapila <amit.kapila16@gmail.com> wrote:

There are two more failures which we need to something about.
1. Make fsm.sql independent of vacuum without much losing on coverage
of newly added code. John, I guess you have an idea, see if you can
take care of it, otherwise, I will see what I can do for it.

I've attached a patch that applies on top of v19 that uses Andrew
Gierth's idea to use fillfactor to control free space. I've also
removed tests that relied on truncation and weren't very useful to
begin with.

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

Attachments:

remove-reliance-on-vacuum-for-fsm-regression-test.patchtext/x-patch; charset=US-ASCII; name=remove-reliance-on-vacuum-for-fsm-regression-test.patchDownload
diff --git a/src/test/regress/expected/fsm.out b/src/test/regress/expected/fsm.out
index df6b15b9d2..f92d454042 100644
--- a/src/test/regress/expected/fsm.out
+++ b/src/test/regress/expected/fsm.out
@@ -2,11 +2,10 @@
 -- Free Space Map test
 --
 CREATE TABLE fsm_check_size (num int, str text);
--- Fill 3 blocks with as many large records as will fit
--- No FSM
+-- Fill 3 blocks with one record each
+ALTER TABLE fsm_check_size SET (fillfactor=15);
 INSERT INTO fsm_check_size SELECT i, rpad('', 1024, 'a')
-FROM generate_series(1,7*3) i;
-VACUUM fsm_check_size;
+FROM generate_series(1,3) i;
 SELECT pg_relation_size('fsm_check_size', 'main') AS heap_size,
 pg_relation_size('fsm_check_size', 'fsm') AS fsm_size;
  heap_size | fsm_size 
@@ -14,11 +13,12 @@ pg_relation_size('fsm_check_size', 'fsm') AS fsm_size;
      24576 |        0
 (1 row)
 
--- Clear some space on block 0
-DELETE FROM fsm_check_size WHERE num <= 5;
-VACUUM fsm_check_size;
--- Insert small record in block 2 to set the cached smgr targetBlock
-INSERT INTO fsm_check_size VALUES(99, 'b');
+-- Fill most of the last block
+ALTER TABLE fsm_check_size SET (fillfactor=100);
+INSERT INTO fsm_check_size SELECT i, rpad('', 1024, 'a')
+FROM generate_series(11,15) i;
+-- Make sure records can go into any block but the last one
+ALTER TABLE fsm_check_size SET (fillfactor=30);
 -- Insert large record and make sure it goes in block 0 rather than
 -- causing the relation to extend
 INSERT INTO fsm_check_size VALUES (101, rpad('', 1024, 'a'));
@@ -32,38 +32,16 @@ pg_relation_size('fsm_check_size', 'fsm') AS fsm_size;
 -- Extend table with enough blocks to exceed the FSM threshold
 -- FSM is created and extended to 3 blocks
 INSERT INTO fsm_check_size SELECT i, 'c' FROM generate_series(200,1200) i;
-VACUUM fsm_check_size;
-SELECT pg_relation_size('fsm_check_size', 'fsm') AS fsm_size;
- fsm_size 
-----------
-    24576
-(1 row)
-
--- Truncate heap to 1 block
--- No change in FSM
-DELETE FROM fsm_check_size WHERE num > 7;
-VACUUM fsm_check_size;
 SELECT pg_relation_size('fsm_check_size', 'fsm') AS fsm_size;
  fsm_size 
 ----------
     24576
 (1 row)
 
--- Truncate heap to 0 blocks
--- FSM now truncated to 2 blocks
-DELETE FROM fsm_check_size;
-VACUUM fsm_check_size;
-SELECT pg_relation_size('fsm_check_size', 'fsm') AS fsm_size;
- fsm_size 
-----------
-    16384
-(1 row)
-
 -- Add long random string to extend TOAST table to 1 block
 INSERT INTO fsm_check_size
 VALUES(0, (SELECT string_agg(md5(chr(i)), '')
 		   FROM generate_series(1,100) i));
-VACUUM fsm_check_size;
 SELECT pg_relation_size(reltoastrelid, 'main') AS toast_size,
 pg_relation_size(reltoastrelid, 'fsm') AS toast_fsm_size
 FROM pg_class WHERE relname = 'fsm_check_size';
diff --git a/src/test/regress/sql/fsm.sql b/src/test/regress/sql/fsm.sql
index 07f505591a..542bd6e203 100644
--- a/src/test/regress/sql/fsm.sql
+++ b/src/test/regress/sql/fsm.sql
@@ -4,20 +4,21 @@
 
 CREATE TABLE fsm_check_size (num int, str text);
 
--- Fill 3 blocks with as many large records as will fit
--- No FSM
+-- Fill 3 blocks with one record each
+ALTER TABLE fsm_check_size SET (fillfactor=15);
 INSERT INTO fsm_check_size SELECT i, rpad('', 1024, 'a')
-FROM generate_series(1,7*3) i;
-VACUUM fsm_check_size;
+FROM generate_series(1,3) i;
+
 SELECT pg_relation_size('fsm_check_size', 'main') AS heap_size,
 pg_relation_size('fsm_check_size', 'fsm') AS fsm_size;
 
--- Clear some space on block 0
-DELETE FROM fsm_check_size WHERE num <= 5;
-VACUUM fsm_check_size;
+-- Fill most of the last block
+ALTER TABLE fsm_check_size SET (fillfactor=100);
+INSERT INTO fsm_check_size SELECT i, rpad('', 1024, 'a')
+FROM generate_series(11,15) i;
 
--- Insert small record in block 2 to set the cached smgr targetBlock
-INSERT INTO fsm_check_size VALUES(99, 'b');
+-- Make sure records can go into any block but the last one
+ALTER TABLE fsm_check_size SET (fillfactor=30);
 
 -- Insert large record and make sure it goes in block 0 rather than
 -- causing the relation to extend
@@ -28,26 +29,12 @@ pg_relation_size('fsm_check_size', 'fsm') AS fsm_size;
 -- Extend table with enough blocks to exceed the FSM threshold
 -- FSM is created and extended to 3 blocks
 INSERT INTO fsm_check_size SELECT i, 'c' FROM generate_series(200,1200) i;
-VACUUM fsm_check_size;
-SELECT pg_relation_size('fsm_check_size', 'fsm') AS fsm_size;
-
--- Truncate heap to 1 block
--- No change in FSM
-DELETE FROM fsm_check_size WHERE num > 7;
-VACUUM fsm_check_size;
-SELECT pg_relation_size('fsm_check_size', 'fsm') AS fsm_size;
-
--- Truncate heap to 0 blocks
--- FSM now truncated to 2 blocks
-DELETE FROM fsm_check_size;
-VACUUM fsm_check_size;
 SELECT pg_relation_size('fsm_check_size', 'fsm') AS fsm_size;
 
 -- Add long random string to extend TOAST table to 1 block
 INSERT INTO fsm_check_size
 VALUES(0, (SELECT string_agg(md5(chr(i)), '')
 		   FROM generate_series(1,100) i));
-VACUUM fsm_check_size;
 SELECT pg_relation_size(reltoastrelid, 'main') AS toast_size,
 pg_relation_size(reltoastrelid, 'fsm') AS toast_fsm_size
 FROM pg_class WHERE relname = 'fsm_check_size';
#113Amit Kapila
amit.kapila16@gmail.com
In reply to: John Naylor (#112)
Re: WIP: Avoid creation of the free space map for small tables

On Wed, Jan 30, 2019 at 3:26 PM John Naylor <john.naylor@2ndquadrant.com> wrote:

On Wed, Jan 30, 2019 at 4:33 AM Amit Kapila <amit.kapila16@gmail.com> wrote:

There are two more failures which we need to something about.
1. Make fsm.sql independent of vacuum without much losing on coverage
of newly added code. John, I guess you have an idea, see if you can
take care of it, otherwise, I will see what I can do for it.

I've attached a patch that applies on top of v19 that uses Andrew
Gierth's idea to use fillfactor to control free space. I've also
removed tests that relied on truncation and weren't very useful to
begin with.

This is much better than the earlier version of test and there is no
dependency on the vacuum. However, I feel still there is some
dependency on how the rows will fit in a page and we have seen some
related failures due to alignment stuff. By looking at the test, I
can't envision any such problem, but how about if we just write some
simple tests where we can check that the FSM won't be created for very
small number of records say one or two and then when we increase the
records FSM gets created, here if we want, we can even use vacuum to
ensure FSM gets created. Once we are sure that the main patch passes
all the buildfarm tests, we can extend the test to something advanced
as you are proposing now. I think that will reduce the chances of
failure, what do you think?

--
With Regards,
Amit Kapila.
EnterpriseDB: http://www.enterprisedb.com

#114John Naylor
john.naylor@2ndquadrant.com
In reply to: Amit Kapila (#113)
1 attachment(s)
Re: WIP: Avoid creation of the free space map for small tables

On Wed, Jan 30, 2019 at 2:11 PM Amit Kapila <amit.kapila16@gmail.com> wrote:

This is much better than the earlier version of test and there is no
dependency on the vacuum. However, I feel still there is some
dependency on how the rows will fit in a page and we have seen some
related failures due to alignment stuff. By looking at the test, I
can't envision any such problem, but how about if we just write some
simple tests where we can check that the FSM won't be created for very
small number of records say one or two and then when we increase the
records FSM gets created, here if we want, we can even use vacuum to
ensure FSM gets created. Once we are sure that the main patch passes
all the buildfarm tests, we can extend the test to something advanced
as you are proposing now. I think that will reduce the chances of
failure, what do you think?

That's probably a good idea to limit risk. I just very basic tests
now, and vacuum before every relation size check to make sure any FSM
extension (whether desired or not) is invoked. Also, in my last patch
I forgot to implement explicit checks of the block number instead of
assuming how many rows will fit on a page. I've used a plpgsql code
block to do this.

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

Attachments:

simple-regression-test-plus-ctid-loop.patchtext/x-patch; charset=US-ASCII; name=simple-regression-test-plus-ctid-loop.patchDownload
diff --git a/src/test/regress/expected/fsm.out b/src/test/regress/expected/fsm.out
index df6b15b9d2..eb2c3842e2 100644
--- a/src/test/regress/expected/fsm.out
+++ b/src/test/regress/expected/fsm.out
@@ -2,46 +2,30 @@
 -- Free Space Map test
 --
 CREATE TABLE fsm_check_size (num int, str text);
--- Fill 3 blocks with as many large records as will fit
--- No FSM
-INSERT INTO fsm_check_size SELECT i, rpad('', 1024, 'a')
-FROM generate_series(1,7*3) i;
+-- With one block, there should be no FSM
+INSERT INTO fsm_check_size VALUES(1, 'a');
 VACUUM fsm_check_size;
 SELECT pg_relation_size('fsm_check_size', 'main') AS heap_size,
 pg_relation_size('fsm_check_size', 'fsm') AS fsm_size;
  heap_size | fsm_size 
 -----------+----------
-     24576 |        0
-(1 row)
-
--- Clear some space on block 0
-DELETE FROM fsm_check_size WHERE num <= 5;
-VACUUM fsm_check_size;
--- Insert small record in block 2 to set the cached smgr targetBlock
-INSERT INTO fsm_check_size VALUES(99, 'b');
--- Insert large record and make sure it goes in block 0 rather than
--- causing the relation to extend
-INSERT INTO fsm_check_size VALUES (101, rpad('', 1024, 'a'));
-SELECT pg_relation_size('fsm_check_size', 'main') AS heap_size,
-pg_relation_size('fsm_check_size', 'fsm') AS fsm_size;
- heap_size | fsm_size 
------------+----------
-     24576 |        0
+      8192 |        0
 (1 row)
 
 -- Extend table with enough blocks to exceed the FSM threshold
 -- FSM is created and extended to 3 blocks
-INSERT INTO fsm_check_size SELECT i, 'c' FROM generate_series(200,1200) i;
-VACUUM fsm_check_size;
-SELECT pg_relation_size('fsm_check_size', 'fsm') AS fsm_size;
- fsm_size 
-----------
-    24576
-(1 row)
-
--- Truncate heap to 1 block
--- No change in FSM
-DELETE FROM fsm_check_size WHERE num > 7;
+DO $$
+DECLARE curtid tid;
+num int;
+BEGIN
+num = 11;
+  LOOP
+    INSERT INTO fsm_check_size VALUES (num, 'b') RETURNING ctid INTO curtid;
+    EXIT WHEN curtid >= tid '(4, 0)';
+    num = num + 1;
+  END LOOP;
+END;
+$$;
 VACUUM fsm_check_size;
 SELECT pg_relation_size('fsm_check_size', 'fsm') AS fsm_size;
  fsm_size 
@@ -49,16 +33,6 @@ SELECT pg_relation_size('fsm_check_size', 'fsm') AS fsm_size;
     24576
 (1 row)
 
--- Truncate heap to 0 blocks
--- FSM now truncated to 2 blocks
-DELETE FROM fsm_check_size;
-VACUUM fsm_check_size;
-SELECT pg_relation_size('fsm_check_size', 'fsm') AS fsm_size;
- fsm_size 
-----------
-    16384
-(1 row)
-
 -- Add long random string to extend TOAST table to 1 block
 INSERT INTO fsm_check_size
 VALUES(0, (SELECT string_agg(md5(chr(i)), '')
diff --git a/src/test/regress/sql/fsm.sql b/src/test/regress/sql/fsm.sql
index 07f505591a..b1debedea1 100644
--- a/src/test/regress/sql/fsm.sql
+++ b/src/test/regress/sql/fsm.sql
@@ -4,42 +4,28 @@
 
 CREATE TABLE fsm_check_size (num int, str text);
 
--- Fill 3 blocks with as many large records as will fit
--- No FSM
-INSERT INTO fsm_check_size SELECT i, rpad('', 1024, 'a')
-FROM generate_series(1,7*3) i;
-VACUUM fsm_check_size;
-SELECT pg_relation_size('fsm_check_size', 'main') AS heap_size,
-pg_relation_size('fsm_check_size', 'fsm') AS fsm_size;
+-- With one block, there should be no FSM
+INSERT INTO fsm_check_size VALUES(1, 'a');
 
--- Clear some space on block 0
-DELETE FROM fsm_check_size WHERE num <= 5;
 VACUUM fsm_check_size;
-
--- Insert small record in block 2 to set the cached smgr targetBlock
-INSERT INTO fsm_check_size VALUES(99, 'b');
-
--- Insert large record and make sure it goes in block 0 rather than
--- causing the relation to extend
-INSERT INTO fsm_check_size VALUES (101, rpad('', 1024, 'a'));
 SELECT pg_relation_size('fsm_check_size', 'main') AS heap_size,
 pg_relation_size('fsm_check_size', 'fsm') AS fsm_size;
 
 -- Extend table with enough blocks to exceed the FSM threshold
 -- FSM is created and extended to 3 blocks
-INSERT INTO fsm_check_size SELECT i, 'c' FROM generate_series(200,1200) i;
-VACUUM fsm_check_size;
-SELECT pg_relation_size('fsm_check_size', 'fsm') AS fsm_size;
+DO $$
+DECLARE curtid tid;
+num int;
+BEGIN
+num = 11;
+  LOOP
+    INSERT INTO fsm_check_size VALUES (num, 'b') RETURNING ctid INTO curtid;
+    EXIT WHEN curtid >= tid '(4, 0)';
+    num = num + 1;
+  END LOOP;
+END;
+$$;
 
--- Truncate heap to 1 block
--- No change in FSM
-DELETE FROM fsm_check_size WHERE num > 7;
-VACUUM fsm_check_size;
-SELECT pg_relation_size('fsm_check_size', 'fsm') AS fsm_size;
-
--- Truncate heap to 0 blocks
--- FSM now truncated to 2 blocks
-DELETE FROM fsm_check_size;
 VACUUM fsm_check_size;
 SELECT pg_relation_size('fsm_check_size', 'fsm') AS fsm_size;
 
@@ -47,6 +33,7 @@ SELECT pg_relation_size('fsm_check_size', 'fsm') AS fsm_size;
 INSERT INTO fsm_check_size
 VALUES(0, (SELECT string_agg(md5(chr(i)), '')
 		   FROM generate_series(1,100) i));
+
 VACUUM fsm_check_size;
 SELECT pg_relation_size(reltoastrelid, 'main') AS toast_size,
 pg_relation_size(reltoastrelid, 'fsm') AS toast_fsm_size
#115Masahiko Sawada
sawada.mshk@gmail.com
In reply to: Amit Kapila (#111)
Re: WIP: Avoid creation of the free space map for small tables

On Wed, Jan 30, 2019 at 4:33 AM Amit Kapila <amit.kapila16@gmail.com> wrote:

On Tue, Jan 29, 2019 at 8:12 PM John Naylor <john.naylor@2ndquadrant.com> wrote:

On Tue, Jan 29, 2019 at 11:56 AM Amit Kapila <amit.kapila16@gmail.com> wrote:

You can find this change in attached patch. Then, I ran the make
check in src/bin/pgbench multiple times using test_conc_insert.sh.
You can vary the number of times the test should run, if you are not
able to reproduce it with this.

The attached patch (clear_local_map_if_exists_1.patch) atop the main
patch fixes the issue for me. Kindly verify the same.

I got one failure in 50 runs. With the new patch, I didn't get any
failures in 300 runs.

Thanks for verification. I have included it in the attached patch and
I have also modified the page.sql test to have enough number of pages
in relation so that FSM will get created irrespective of alignment
boundaries. Masahiko San, can you verify if this now works for you?

Thank you for updating the patch!

The modified page.sql test could fail if the block size is more than
8kB? We can ensure the number of pages are more than 4 by checking it
and adding more data if no enough but I'm really not sure we should
care the bigger-block size cases. However maybe it's good to check the
number of pages after insertion so that we can break down the issue in
case the test failed again.

Regards,

--
Masahiko Sawada
NIPPON TELEGRAPH AND TELEPHONE CORPORATION
NTT Open Source Software Center

#116Amit Kapila
amit.kapila16@gmail.com
In reply to: John Naylor (#114)
1 attachment(s)
Re: WIP: Avoid creation of the free space map for small tables

On Wed, Jan 30, 2019 at 8:11 PM John Naylor <john.naylor@2ndquadrant.com> wrote:

On Wed, Jan 30, 2019 at 2:11 PM Amit Kapila <amit.kapila16@gmail.com> wrote:

This is much better than the earlier version of test and there is no
dependency on the vacuum. However, I feel still there is some
dependency on how the rows will fit in a page and we have seen some
related failures due to alignment stuff. By looking at the test, I
can't envision any such problem, but how about if we just write some
simple tests where we can check that the FSM won't be created for very
small number of records say one or two and then when we increase the
records FSM gets created, here if we want, we can even use vacuum to
ensure FSM gets created. Once we are sure that the main patch passes
all the buildfarm tests, we can extend the test to something advanced
as you are proposing now. I think that will reduce the chances of
failure, what do you think?

That's probably a good idea to limit risk. I just very basic tests
now, and vacuum before every relation size check to make sure any FSM
extension (whether desired or not) is invoked. Also, in my last patch
I forgot to implement explicit checks of the block number instead of
assuming how many rows will fit on a page. I've used a plpgsql code
block to do this.

-- Extend table with enough blocks to exceed the FSM threshold
-- FSM is created and extended to 3 blocks

The second comment line seems redundant to me, so I have removed that
and integrated it in the main patch.

With Regards,
Amit Kapila.
EnterpriseDB: http://www.enterprisedb.com

Attachments:

v20-0001-Avoid-creation-of-the-free-space-map-for-small-heap-.patchapplication/octet-stream; name=v20-0001-Avoid-creation-of-the-free-space-map-for-small-heap-.patchDownload
From 5a87329552ba1c9152a2f6141790505de8fe7f9c Mon Sep 17 00:00:00 2001
From: Amit Kapila <akapila@postgresql.org>
Date: Wed, 30 Jan 2019 08:45:16 +0530
Subject: [PATCH] Avoid creation of the free space map for small heap
 relations.

Previously, all heaps had FSMs. For very small tables, this means that the
FSM took up more space than the heap did. This is wasteful, so now we
refrain from creating the FSM for heaps with 4 pages or fewer. If the last
known target block has insufficient space, we still try to insert into some
other page before giving up and extending the relation, since doing
otherwise leads to table bloat. Testing showed that trying every page
penalized performance slightly, so we compromise and try every other page.
This way, we visit at most two pages. Any pages with wasted free space
become visible at next relation extension, so we still control table bloat.
As a bonus, directly attempting one or two pages can even be faster than
consulting the FSM would have been.

Once the FSM is created for a heap we don't remove it even if somebody
deletes all the rows from the corresponding relation.  We don't think it is
a useful optimization as it is quite likely that relation will again grow
to the same size.

Author: John Naylor with design inputs and some code contribution by Amit Kapila
Reviewed-by: Amit Kapila
Tested-by: Mithun C Y
Discussion: https://www.postgresql.org/message-id/CAJVSVGWvB13PzpbLEecFuGFc5V2fsO736BsdTakPiPAcdMM5tQ@mail.gmail.com
---
 contrib/pageinspect/expected/page.out     |  77 ++++----
 contrib/pageinspect/sql/page.sql          |  33 ++--
 doc/src/sgml/storage.sgml                 |  13 +-
 src/backend/access/brin/brin.c            |   2 +-
 src/backend/access/brin/brin_pageops.c    |  10 +-
 src/backend/access/heap/hio.c             |  45 +++--
 src/backend/access/heap/vacuumlazy.c      |  17 +-
 src/backend/access/transam/xact.c         |  14 ++
 src/backend/storage/freespace/README      |  38 +++-
 src/backend/storage/freespace/freespace.c | 285 +++++++++++++++++++++++++++++-
 src/backend/storage/freespace/indexfsm.c  |   6 +-
 src/include/storage/freespace.h           |   9 +-
 src/test/regress/expected/fsm.out         |  49 +++++
 src/test/regress/parallel_schedule        |   6 +
 src/test/regress/serial_schedule          |   1 +
 src/test/regress/sql/fsm.sql              |  42 +++++
 16 files changed, 545 insertions(+), 102 deletions(-)
 create mode 100644 src/test/regress/expected/fsm.out
 create mode 100644 src/test/regress/sql/fsm.sql

diff --git a/contrib/pageinspect/expected/page.out b/contrib/pageinspect/expected/page.out
index 3fcd9fb..89b73ca 100644
--- a/contrib/pageinspect/expected/page.out
+++ b/contrib/pageinspect/expected/page.out
@@ -1,48 +1,69 @@
 CREATE EXTENSION pageinspect;
-CREATE TABLE test1 (a int, b int);
-INSERT INTO test1 VALUES (16777217, 131584);
-VACUUM test1;  -- set up FSM
+CREATE TABLE test_rel_forks (a int);
+-- Make sure there are enough blocks in the heap for the FSM to be created.
+INSERT INTO test_rel_forks SELECT i from generate_series(1,2000) i;
+-- set up FSM and VM
+VACUUM test_rel_forks;
 -- The page contents can vary, so just test that it can be read
 -- successfully, but don't keep the output.
-SELECT octet_length(get_raw_page('test1', 'main', 0)) AS main_0;
+SELECT octet_length(get_raw_page('test_rel_forks', 'main', 0)) AS main_0;
  main_0 
 --------
    8192
 (1 row)
 
-SELECT octet_length(get_raw_page('test1', 'main', 1)) AS main_1;
-ERROR:  block number 1 is out of range for relation "test1"
-SELECT octet_length(get_raw_page('test1', 'fsm', 0)) AS fsm_0;
+SELECT octet_length(get_raw_page('test_rel_forks', 'main', 100)) AS main_100;
+ERROR:  block number 100 is out of range for relation "test_rel_forks"
+SELECT octet_length(get_raw_page('test_rel_forks', 'fsm', 0)) AS fsm_0;
  fsm_0 
 -------
   8192
 (1 row)
 
-SELECT octet_length(get_raw_page('test1', 'fsm', 1)) AS fsm_1;
- fsm_1 
--------
-  8192
-(1 row)
-
-SELECT octet_length(get_raw_page('test1', 'vm', 0)) AS vm_0;
+SELECT octet_length(get_raw_page('test_rel_forks', 'fsm', 20)) AS fsm_20;
+ERROR:  block number 20 is out of range for relation "test_rel_forks"
+SELECT octet_length(get_raw_page('test_rel_forks', 'vm', 0)) AS vm_0;
  vm_0 
 ------
  8192
 (1 row)
 
-SELECT octet_length(get_raw_page('test1', 'vm', 1)) AS vm_1;
-ERROR:  block number 1 is out of range for relation "test1"
+SELECT octet_length(get_raw_page('test_rel_forks', 'vm', 1)) AS vm_1;
+ERROR:  block number 1 is out of range for relation "test_rel_forks"
 SELECT octet_length(get_raw_page('xxx', 'main', 0));
 ERROR:  relation "xxx" does not exist
-SELECT octet_length(get_raw_page('test1', 'xxx', 0));
+SELECT octet_length(get_raw_page('test_rel_forks', 'xxx', 0));
 ERROR:  invalid fork name
 HINT:  Valid fork names are "main", "fsm", "vm", and "init".
-SELECT get_raw_page('test1', 0) = get_raw_page('test1', 'main', 0);
+SELECT * FROM fsm_page_contents(get_raw_page('test_rel_forks', 'fsm', 0));
+ fsm_page_contents 
+-------------------
+ 0: 39            +
+ 1: 39            +
+ 3: 39            +
+ 7: 39            +
+ 15: 39           +
+ 31: 39           +
+ 63: 39           +
+ 127: 39          +
+ 255: 39          +
+ 511: 39          +
+ 1023: 39         +
+ 2047: 39         +
+ 4095: 39         +
+ fp_next_slot: 0  +
+ 
+(1 row)
+
+SELECT get_raw_page('test_rel_forks', 0) = get_raw_page('test_rel_forks', 'main', 0);
  ?column? 
 ----------
  t
 (1 row)
 
+DROP TABLE test_rel_forks;
+CREATE TABLE test1 (a int, b int);
+INSERT INTO test1 VALUES (16777217, 131584);
 SELECT pagesize, version FROM page_header(get_raw_page('test1', 0));
  pagesize | version 
 ----------+---------
@@ -62,26 +83,6 @@ SELECT tuple_data_split('test1'::regclass, t_data, t_infomask, t_infomask2, t_bi
  {"\\x01000001","\\x00020200"}
 (1 row)
 
-SELECT * FROM fsm_page_contents(get_raw_page('test1', 'fsm', 0));
- fsm_page_contents 
--------------------
- 0: 254           +
- 1: 254           +
- 3: 254           +
- 7: 254           +
- 15: 254          +
- 31: 254          +
- 63: 254          +
- 127: 254         +
- 255: 254         +
- 511: 254         +
- 1023: 254        +
- 2047: 254        +
- 4095: 254        +
- fp_next_slot: 0  +
- 
-(1 row)
-
 DROP TABLE test1;
 -- check that using any of these functions with a partitioned table or index
 -- would fail
diff --git a/contrib/pageinspect/sql/page.sql b/contrib/pageinspect/sql/page.sql
index 8ac9991..67166ef 100644
--- a/contrib/pageinspect/sql/page.sql
+++ b/contrib/pageinspect/sql/page.sql
@@ -1,26 +1,35 @@
 CREATE EXTENSION pageinspect;
 
-CREATE TABLE test1 (a int, b int);
-INSERT INTO test1 VALUES (16777217, 131584);
+CREATE TABLE test_rel_forks (a int);
+-- Make sure there are enough blocks in the heap for the FSM to be created.
+INSERT INTO test_rel_forks SELECT i from generate_series(1,2000) i;
 
-VACUUM test1;  -- set up FSM
+-- set up FSM and VM
+VACUUM test_rel_forks;
 
 -- The page contents can vary, so just test that it can be read
 -- successfully, but don't keep the output.
 
-SELECT octet_length(get_raw_page('test1', 'main', 0)) AS main_0;
-SELECT octet_length(get_raw_page('test1', 'main', 1)) AS main_1;
+SELECT octet_length(get_raw_page('test_rel_forks', 'main', 0)) AS main_0;
+SELECT octet_length(get_raw_page('test_rel_forks', 'main', 100)) AS main_100;
 
-SELECT octet_length(get_raw_page('test1', 'fsm', 0)) AS fsm_0;
-SELECT octet_length(get_raw_page('test1', 'fsm', 1)) AS fsm_1;
+SELECT octet_length(get_raw_page('test_rel_forks', 'fsm', 0)) AS fsm_0;
+SELECT octet_length(get_raw_page('test_rel_forks', 'fsm', 20)) AS fsm_20;
 
-SELECT octet_length(get_raw_page('test1', 'vm', 0)) AS vm_0;
-SELECT octet_length(get_raw_page('test1', 'vm', 1)) AS vm_1;
+SELECT octet_length(get_raw_page('test_rel_forks', 'vm', 0)) AS vm_0;
+SELECT octet_length(get_raw_page('test_rel_forks', 'vm', 1)) AS vm_1;
 
 SELECT octet_length(get_raw_page('xxx', 'main', 0));
-SELECT octet_length(get_raw_page('test1', 'xxx', 0));
+SELECT octet_length(get_raw_page('test_rel_forks', 'xxx', 0));
+
+SELECT * FROM fsm_page_contents(get_raw_page('test_rel_forks', 'fsm', 0));
+
+SELECT get_raw_page('test_rel_forks', 0) = get_raw_page('test_rel_forks', 'main', 0);
 
-SELECT get_raw_page('test1', 0) = get_raw_page('test1', 'main', 0);
+DROP TABLE test_rel_forks;
+
+CREATE TABLE test1 (a int, b int);
+INSERT INTO test1 VALUES (16777217, 131584);
 
 SELECT pagesize, version FROM page_header(get_raw_page('test1', 0));
 
@@ -29,8 +38,6 @@ SELECT page_checksum(get_raw_page('test1', 0), 0) IS NOT NULL AS silly_checksum_
 SELECT tuple_data_split('test1'::regclass, t_data, t_infomask, t_infomask2, t_bits)
     FROM heap_page_items(get_raw_page('test1', 0));
 
-SELECT * FROM fsm_page_contents(get_raw_page('test1', 'fsm', 0));
-
 DROP TABLE test1;
 
 -- check that using any of these functions with a partitioned table or index
diff --git a/doc/src/sgml/storage.sgml b/doc/src/sgml/storage.sgml
index 8ef2ac8..cbdad0c 100644
--- a/doc/src/sgml/storage.sgml
+++ b/doc/src/sgml/storage.sgml
@@ -590,12 +590,13 @@ tuple would otherwise be too big.
 <indexterm><primary>FSM</primary><see>Free Space Map</see></indexterm>
 
 <para>
-Each heap and index relation, except for hash indexes, has a Free Space Map
-(FSM) to keep track of available space in the relation. It's stored
-alongside the main relation data in a separate relation fork, named after the
-filenode number of the relation, plus a <literal>_fsm</literal> suffix. For example,
-if the filenode of a relation is 12345, the FSM is stored in a file called
-<filename>12345_fsm</filename>, in the same directory as the main relation file.
+Each heap relation, unless it is very small, and each index relation, except
+for hash indexes, has a Free Space Map (FSM) to keep track of available
+space in the relation. It's stored alongside the main relation data in a
+separate relation fork, named after the filenode number of the relation, plus
+a <literal>_fsm</literal> suffix. For example, if the filenode of a relation
+is 12345, the FSM is stored in a file called <filename>12345_fsm</filename>,
+in the same directory as the main relation file.
 </para>
 
 <para>
diff --git a/src/backend/access/brin/brin.c b/src/backend/access/brin/brin.c
index 467d91e..8f008dd 100644
--- a/src/backend/access/brin/brin.c
+++ b/src/backend/access/brin/brin.c
@@ -1150,7 +1150,7 @@ terminate_brin_buildstate(BrinBuildState *state)
 		freespace = PageGetFreeSpace(page);
 		blk = BufferGetBlockNumber(state->bs_currentInsertBuf);
 		ReleaseBuffer(state->bs_currentInsertBuf);
-		RecordPageWithFreeSpace(state->bs_irel, blk, freespace);
+		RecordPageWithFreeSpace(state->bs_irel, blk, freespace, InvalidBlockNumber);
 		FreeSpaceMapVacuumRange(state->bs_irel, blk, blk + 1);
 	}
 
diff --git a/src/backend/access/brin/brin_pageops.c b/src/backend/access/brin/brin_pageops.c
index 164a468..2eb354f 100644
--- a/src/backend/access/brin/brin_pageops.c
+++ b/src/backend/access/brin/brin_pageops.c
@@ -310,7 +310,7 @@ brin_doupdate(Relation idxrel, BlockNumber pagesPerRange,
 
 		if (extended)
 		{
-			RecordPageWithFreeSpace(idxrel, newblk, freespace);
+			RecordPageWithFreeSpace(idxrel, newblk, freespace, InvalidBlockNumber);
 			FreeSpaceMapVacuumRange(idxrel, newblk, newblk + 1);
 		}
 
@@ -461,7 +461,7 @@ brin_doinsert(Relation idxrel, BlockNumber pagesPerRange,
 
 	if (extended)
 	{
-		RecordPageWithFreeSpace(idxrel, blk, freespace);
+		RecordPageWithFreeSpace(idxrel, blk, freespace, InvalidBlockNumber);
 		FreeSpaceMapVacuumRange(idxrel, blk, blk + 1);
 	}
 
@@ -654,7 +654,7 @@ brin_page_cleanup(Relation idxrel, Buffer buf)
 
 	/* Measure free space and record it */
 	RecordPageWithFreeSpace(idxrel, BufferGetBlockNumber(buf),
-							br_page_get_freespace(page));
+							br_page_get_freespace(page), InvalidBlockNumber);
 }
 
 /*
@@ -703,7 +703,7 @@ brin_getinsertbuffer(Relation irel, Buffer oldbuf, Size itemsz,
 	/* Choose initial target page, re-using existing target if known */
 	newblk = RelationGetTargetBlock(irel);
 	if (newblk == InvalidBlockNumber)
-		newblk = GetPageWithFreeSpace(irel, itemsz);
+		newblk = GetPageWithFreeSpace(irel, itemsz, true);
 
 	/*
 	 * Loop until we find a page with sufficient free space.  By the time we
@@ -895,7 +895,7 @@ brin_initialize_empty_new_buffer(Relation idxrel, Buffer buffer)
 	 * pages whose FSM records were forgotten in a crash.
 	 */
 	RecordPageWithFreeSpace(idxrel, BufferGetBlockNumber(buffer),
-							br_page_get_freespace(page));
+							br_page_get_freespace(page), InvalidBlockNumber);
 }
 
 
diff --git a/src/backend/access/heap/hio.c b/src/backend/access/heap/hio.c
index 3da0b49..995d78e 100644
--- a/src/backend/access/heap/hio.c
+++ b/src/backend/access/heap/hio.c
@@ -239,8 +239,14 @@ RelationAddExtraBlocks(Relation relation, BulkInsertState bistate)
 		 * Immediately update the bottom level of the FSM.  This has a good
 		 * chance of making this page visible to other concurrently inserting
 		 * backends, and we want that to happen without delay.
+		 *
+		 * Since we know the table will end up with extraBlocks additional
+		 * pages, we pass the final number to avoid possible unnecessary
+		 * system calls and to make sure the FSM is created when we add the
+		 * first new page.
 		 */
-		RecordPageWithFreeSpace(relation, blockNum, freespace);
+		RecordPageWithFreeSpace(relation, blockNum, freespace,
+								firstBlock + extraBlocks);
 	}
 	while (--extraBlocks > 0);
 
@@ -377,20 +383,9 @@ RelationGetBufferForTuple(Relation relation, Size len,
 		 * We have no cached target page, so ask the FSM for an initial
 		 * target.
 		 */
-		targetBlock = GetPageWithFreeSpace(relation, len + saveFreeSpace);
-
-		/*
-		 * If the FSM knows nothing of the rel, try the last page before we
-		 * give up and extend.  This avoids one-tuple-per-page syndrome during
-		 * bootstrapping or in a recently-started system.
-		 */
-		if (targetBlock == InvalidBlockNumber)
-		{
-			BlockNumber nblocks = RelationGetNumberOfBlocks(relation);
-
-			if (nblocks > 0)
-				targetBlock = nblocks - 1;
-		}
+		targetBlock = GetPageWithFreeSpace(relation,
+										   len + saveFreeSpace,
+										   false);
 	}
 
 loop:
@@ -484,6 +479,13 @@ loop:
 		{
 			/* use this page as future insert target, too */
 			RelationSetTargetBlock(relation, targetBlock);
+
+			/*
+			 * In case we used an in-memory map of available blocks, reset it
+			 * for next use.
+			 */
+			FSMClearLocalMap();
+
 			return buffer;
 		}
 
@@ -543,9 +545,12 @@ loop:
 
 			/*
 			 * Check if some other backend has extended a block for us while
-			 * we were waiting on the lock.
+			 * we were waiting on the lock.  We only check the FSM -- if there
+			 * isn't one we don't recheck the number of blocks.
 			 */
-			targetBlock = GetPageWithFreeSpace(relation, len + saveFreeSpace);
+			targetBlock = GetPageWithFreeSpace(relation,
+											   len + saveFreeSpace,
+											   true);
 
 			/*
 			 * If some other waiter has already extended the relation, we
@@ -625,5 +630,11 @@ loop:
 	 */
 	RelationSetTargetBlock(relation, BufferGetBlockNumber(buffer));
 
+	/*
+	 * In case we used an in-memory map of available blocks, reset it for next
+	 * use.
+	 */
+	FSMClearLocalMap();
+
 	return buffer;
 }
diff --git a/src/backend/access/heap/vacuumlazy.c b/src/backend/access/heap/vacuumlazy.c
index 37aa484..9cfa65c 100644
--- a/src/backend/access/heap/vacuumlazy.c
+++ b/src/backend/access/heap/vacuumlazy.c
@@ -153,7 +153,7 @@ static BufferAccessStrategy vac_strategy;
 static void lazy_scan_heap(Relation onerel, int options,
 			   LVRelStats *vacrelstats, Relation *Irel, int nindexes,
 			   bool aggressive);
-static void lazy_vacuum_heap(Relation onerel, LVRelStats *vacrelstats);
+static void lazy_vacuum_heap(Relation onerel, LVRelStats *vacrelstats, BlockNumber nblocks);
 static bool lazy_check_needs_freeze(Buffer buf, bool *hastup);
 static void lazy_vacuum_index(Relation indrel,
 				  IndexBulkDeleteResult **stats,
@@ -758,7 +758,7 @@ lazy_scan_heap(Relation onerel, int options, LVRelStats *vacrelstats,
 			pgstat_progress_update_multi_param(2, hvp_index, hvp_val);
 
 			/* Remove tuples from heap */
-			lazy_vacuum_heap(onerel, vacrelstats);
+			lazy_vacuum_heap(onerel, vacrelstats, nblocks);
 
 			/*
 			 * Forget the now-vacuumed tuples, and press on, but be careful
@@ -896,7 +896,7 @@ lazy_scan_heap(Relation onerel, int options, LVRelStats *vacrelstats,
 			MarkBufferDirty(buf);
 			UnlockReleaseBuffer(buf);
 
-			RecordPageWithFreeSpace(onerel, blkno, freespace);
+			RecordPageWithFreeSpace(onerel, blkno, freespace, nblocks);
 			continue;
 		}
 
@@ -935,7 +935,7 @@ lazy_scan_heap(Relation onerel, int options, LVRelStats *vacrelstats,
 			}
 
 			UnlockReleaseBuffer(buf);
-			RecordPageWithFreeSpace(onerel, blkno, freespace);
+			RecordPageWithFreeSpace(onerel, blkno, freespace, nblocks);
 			continue;
 		}
 
@@ -1332,7 +1332,7 @@ lazy_scan_heap(Relation onerel, int options, LVRelStats *vacrelstats,
 		 * taken if there are no indexes.)
 		 */
 		if (vacrelstats->num_dead_tuples == prev_dead_count)
-			RecordPageWithFreeSpace(onerel, blkno, freespace);
+			RecordPageWithFreeSpace(onerel, blkno, freespace, nblocks);
 	}
 
 	/* report that everything is scanned and vacuumed */
@@ -1394,7 +1394,7 @@ lazy_scan_heap(Relation onerel, int options, LVRelStats *vacrelstats,
 		/* Remove tuples from heap */
 		pgstat_progress_update_param(PROGRESS_VACUUM_PHASE,
 									 PROGRESS_VACUUM_PHASE_VACUUM_HEAP);
-		lazy_vacuum_heap(onerel, vacrelstats);
+		lazy_vacuum_heap(onerel, vacrelstats, nblocks);
 		vacrelstats->num_index_scans++;
 	}
 
@@ -1465,9 +1465,10 @@ lazy_scan_heap(Relation onerel, int options, LVRelStats *vacrelstats,
  * Note: the reason for doing this as a second pass is we cannot remove
  * the tuples until we've removed their index entries, and we want to
  * process index entry removal in batches as large as possible.
+ * Note: nblocks is passed as an optimization for RecordPageWithFreeSpace().
  */
 static void
-lazy_vacuum_heap(Relation onerel, LVRelStats *vacrelstats)
+lazy_vacuum_heap(Relation onerel, LVRelStats *vacrelstats, BlockNumber nblocks)
 {
 	int			tupindex;
 	int			npages;
@@ -1504,7 +1505,7 @@ lazy_vacuum_heap(Relation onerel, LVRelStats *vacrelstats)
 		freespace = PageGetHeapFreeSpace(page);
 
 		UnlockReleaseBuffer(buf);
-		RecordPageWithFreeSpace(onerel, tblk, freespace);
+		RecordPageWithFreeSpace(onerel, tblk, freespace, nblocks);
 		npages++;
 	}
 
diff --git a/src/backend/access/transam/xact.c b/src/backend/access/transam/xact.c
index 0181976..92bda87 100644
--- a/src/backend/access/transam/xact.c
+++ b/src/backend/access/transam/xact.c
@@ -48,6 +48,7 @@
 #include "replication/walsender.h"
 #include "storage/condition_variable.h"
 #include "storage/fd.h"
+#include "storage/freespace.h"
 #include "storage/lmgr.h"
 #include "storage/predicate.h"
 #include "storage/proc.h"
@@ -2493,6 +2494,12 @@ AbortTransaction(void)
 	pgstat_report_wait_end();
 	pgstat_progress_end_command();
 
+	/*
+	 * In case we aborted during RelationGetBufferForTuple(), clear the local
+	 * map of heap pages.
+	 */
+	FSMClearLocalMap();
+
 	/* Clean up buffer I/O and buffer context locks, too */
 	AbortBufferIO();
 	UnlockBuffers();
@@ -4714,6 +4721,13 @@ AbortSubTransaction(void)
 
 	pgstat_report_wait_end();
 	pgstat_progress_end_command();
+
+	/*
+	 * In case we aborted during RelationGetBufferForTuple(), clear the local
+	 * map of heap pages.
+	 */
+	FSMClearLocalMap();
+
 	AbortBufferIO();
 	UnlockBuffers();
 
diff --git a/src/backend/storage/freespace/README b/src/backend/storage/freespace/README
index e7ff23b..0d3cd29 100644
--- a/src/backend/storage/freespace/README
+++ b/src/backend/storage/freespace/README
@@ -8,7 +8,41 @@ free space to hold a tuple to be stored; or to determine that no such page
 exists and the relation must be extended by one page.  As of PostgreSQL 8.4
 each relation has its own, extensible free space map stored in a separate
 "fork" of its relation.  This eliminates the disadvantages of the former
-fixed-size FSM.
+fixed-size FSM.  There are two exceptions:
+
+1. Hash indexes never have a FSM.
+2. For very small tables, a 3-page relation fork would be relatively large
+and wasteful, so to save space we refrain from creating the FSM if the
+heap has HEAP_FSM_CREATION_THRESHOLD pages or fewer.
+
+To locate free space in the latter case, we simply try pages directly without
+knowing ahead of time how much free space they have.  To maintain good
+performance, we create a local in-memory map of pages to try, and only mark
+every other page as available.  For example, in a 3-page heap, the local map
+would look like:
+
+ANAN
+0123
+
+Pages 0 and 2 are marked "available", and page 1 as "not available".
+Page 3 is beyond the end of the relation, so is likewise marked "not
+available".  First we try page 2, and if that doesn't have sufficient free
+space we try page 0 before giving up and extending the relation.  There may
+be some wasted free space on block 1, but if the relation extends to 4 pages:
+
+NANA
+0123
+
+We not only have the new page 3 at our disposal, we can now check page 1
+for free space as well.
+
+Once the FSM is created for a heap we don't remove it even if somebody deletes
+all the rows from the corresponding relation.  We don't think it is a useful
+optimization as it is quite likely that relation will again grow to the same
+size.
+
+FSM data structure
+------------------
 
 It is important to keep the map small so that it can be searched rapidly.
 Therefore, we don't attempt to record the exact free space on a page.
@@ -192,5 +226,3 @@ TODO
 ----
 
 - fastroot to avoid traversing upper nodes with just 1 child
-- use a different system for tables that fit into one FSM page, with a
-  mechanism to switch to the real thing as it grows.
diff --git a/src/backend/storage/freespace/freespace.c b/src/backend/storage/freespace/freespace.c
index eee8286..d3f207b 100644
--- a/src/backend/storage/freespace/freespace.c
+++ b/src/backend/storage/freespace/freespace.c
@@ -76,6 +76,14 @@
 #define FSM_ROOT_LEVEL	(FSM_TREE_DEPTH - 1)
 #define FSM_BOTTOM_LEVEL 0
 
+/* Status codes for the local map. */
+
+/* Either already tried, or beyond the end of the relation */
+#define FSM_LOCAL_NOT_AVAIL 0x00
+
+/* Available to try */
+#define FSM_LOCAL_AVAIL		0x01
+
 /*
  * The internal FSM routines work on a logical addressing scheme. Each
  * level of the tree can be thought of as a separately addressable file.
@@ -89,6 +97,23 @@ typedef struct
 /* Address of the root page. */
 static const FSMAddress FSM_ROOT_ADDRESS = {FSM_ROOT_LEVEL, 0};
 
+/* Local map of block numbers for small heaps with no FSM. */
+typedef struct
+{
+	BlockNumber nblocks;
+	uint8		map[HEAP_FSM_CREATION_THRESHOLD];
+}			FSMLocalMap;
+
+static FSMLocalMap fsm_local_map =
+{
+	0,
+	{
+		FSM_LOCAL_NOT_AVAIL
+	}
+};
+
+#define FSM_LOCAL_MAP_EXISTS (fsm_local_map.nblocks > 0)
+
 /* functions to navigate the tree */
 static FSMAddress fsm_get_child(FSMAddress parent, uint16 slot);
 static FSMAddress fsm_get_parent(FSMAddress child, uint16 *slot);
@@ -107,10 +132,14 @@ static Size fsm_space_cat_to_avail(uint8 cat);
 /* workhorse functions for various operations */
 static int fsm_set_and_search(Relation rel, FSMAddress addr, uint16 slot,
 				   uint8 newValue, uint8 minValue);
+static void fsm_local_set(Relation rel, BlockNumber cur_nblocks);
 static BlockNumber fsm_search(Relation rel, uint8 min_cat);
+static BlockNumber fsm_local_search(void);
 static uint8 fsm_vacuum_page(Relation rel, FSMAddress addr,
 				BlockNumber start, BlockNumber end,
 				bool *eof);
+static bool fsm_allow_writes(Relation rel, BlockNumber heapblk,
+				 BlockNumber nblocks, BlockNumber *get_nblocks);
 
 
 /******** Public API ********/
@@ -127,13 +156,46 @@ static uint8 fsm_vacuum_page(Relation rel, FSMAddress addr,
  * amount of free space available on that page and then try again (see
  * RecordAndGetPageWithFreeSpace).  If InvalidBlockNumber is returned,
  * extend the relation.
+ *
+ * For very small heap relations that don't have a FSM, we try every other
+ * page before extending the relation.  To keep track of which pages have
+ * been tried, initialize a local in-memory map of pages.
  */
 BlockNumber
-GetPageWithFreeSpace(Relation rel, Size spaceNeeded)
+GetPageWithFreeSpace(Relation rel, Size spaceNeeded, bool check_fsm_only)
 {
 	uint8		min_cat = fsm_space_needed_to_cat(spaceNeeded);
+	BlockNumber target_block,
+				nblocks;
+
+	/* First try the FSM, if it exists. */
+	target_block = fsm_search(rel, min_cat);
+
+	if (target_block == InvalidBlockNumber &&
+		(rel->rd_rel->relkind == RELKIND_RELATION ||
+		 rel->rd_rel->relkind == RELKIND_TOASTVALUE) &&
+		!check_fsm_only)
+	{
+		nblocks = RelationGetNumberOfBlocks(rel);
+
+		if (nblocks > HEAP_FSM_CREATION_THRESHOLD)
+		{
+			/*
+			 * If the FSM knows nothing of the rel, try the last page before
+			 * we give up and extend.  This avoids one-tuple-per-page syndrome
+			 * during bootstrapping or in a recently-started system.
+			 */
+			target_block = nblocks - 1;
+		}
+		else if (nblocks > 0)
+		{
+			/* Create or update local map and get first candidate block. */
+			fsm_local_set(rel, nblocks);
+			target_block = fsm_local_search();
+		}
+	}
 
-	return fsm_search(rel, min_cat);
+	return target_block;
 }
 
 /*
@@ -144,16 +206,47 @@ GetPageWithFreeSpace(Relation rel, Size spaceNeeded)
  * also some effort to return a page close to the old page; if there's a
  * page with enough free space on the same FSM page where the old one page
  * is located, it is preferred.
+ *
+ * For very small heap relations that don't have a FSM, we update the local
+ * map to indicate we have tried a page, and return the next page to try.
  */
 BlockNumber
 RecordAndGetPageWithFreeSpace(Relation rel, BlockNumber oldPage,
 							  Size oldSpaceAvail, Size spaceNeeded)
 {
-	int			old_cat = fsm_space_avail_to_cat(oldSpaceAvail);
-	int			search_cat = fsm_space_needed_to_cat(spaceNeeded);
+	int			old_cat;
+	int			search_cat;
 	FSMAddress	addr;
 	uint16		slot;
 	int			search_slot;
+	BlockNumber nblocks = InvalidBlockNumber;
+
+	/* First try the local map, if it exists. */
+	if (FSM_LOCAL_MAP_EXISTS)
+	{
+		Assert((rel->rd_rel->relkind == RELKIND_RELATION ||
+				rel->rd_rel->relkind == RELKIND_TOASTVALUE) &&
+			   fsm_local_map.map[oldPage] == FSM_LOCAL_AVAIL);
+
+		fsm_local_map.map[oldPage] = FSM_LOCAL_NOT_AVAIL;
+		return fsm_local_search();
+	}
+
+	if (!fsm_allow_writes(rel, oldPage, InvalidBlockNumber, &nblocks))
+	{
+		/*
+		 * If we have neither a local map nor a FSM, we probably just tried
+		 * the target block in the smgr relation entry and failed, so we'll
+		 * need to create the local map.
+		 */
+		fsm_local_set(rel, nblocks);
+		return fsm_local_search();
+	}
+
+	/* Normal FSM logic follows */
+
+	old_cat = fsm_space_avail_to_cat(oldSpaceAvail);
+	search_cat = fsm_space_needed_to_cat(spaceNeeded);
 
 	/* Get the location of the FSM byte representing the heap block */
 	addr = fsm_get_location(oldPage, &slot);
@@ -176,21 +269,45 @@ RecordAndGetPageWithFreeSpace(Relation rel, BlockNumber oldPage,
  * Note that if the new spaceAvail value is higher than the old value stored
  * in the FSM, the space might not become visible to searchers until the next
  * FreeSpaceMapVacuum call, which updates the upper level pages.
+ *
+ * Callers have no need for a local map.
  */
 void
-RecordPageWithFreeSpace(Relation rel, BlockNumber heapBlk, Size spaceAvail)
+RecordPageWithFreeSpace(Relation rel, BlockNumber heapBlk,
+						Size spaceAvail, BlockNumber nblocks)
 {
-	int			new_cat = fsm_space_avail_to_cat(spaceAvail);
+	int			new_cat;
 	FSMAddress	addr;
 	uint16		slot;
+	BlockNumber dummy;
+
+	if (!fsm_allow_writes(rel, heapBlk, nblocks, &dummy))
+		/* No FSM to update and no local map either */
+		return;
 
 	/* Get the location of the FSM byte representing the heap block */
 	addr = fsm_get_location(heapBlk, &slot);
 
+	new_cat = fsm_space_avail_to_cat(spaceAvail);
 	fsm_set_and_search(rel, addr, slot, new_cat, 0);
 }
 
 /*
+ * Clear the local map.  We must call this when we have found a block with
+ * enough free space, when we extend the relation, or on transaction abort.
+ */
+void
+FSMClearLocalMap(void)
+{
+	if (FSM_LOCAL_MAP_EXISTS)
+	{
+		fsm_local_map.nblocks = 0;
+		memset(&fsm_local_map.map, FSM_LOCAL_NOT_AVAIL,
+			   sizeof(fsm_local_map.map));
+	}
+}
+
+/*
  * XLogRecordPageWithFreeSpace - like RecordPageWithFreeSpace, for use in
  *		WAL replay
  */
@@ -204,6 +321,31 @@ XLogRecordPageWithFreeSpace(RelFileNode rnode, BlockNumber heapBlk,
 	BlockNumber blkno;
 	Buffer		buf;
 	Page		page;
+	bool		write_to_fsm;
+
+	/* This is meant to mirror the logic in fsm_allow_writes() */
+	if (heapBlk >= HEAP_FSM_CREATION_THRESHOLD)
+		write_to_fsm = true;
+	else
+	{
+		/* Open the relation at smgr level */
+		SMgrRelation smgr = smgropen(rnode, InvalidBackendId);
+
+		if (smgrexists(smgr, FSM_FORKNUM))
+			write_to_fsm = true;
+		else
+		{
+			BlockNumber heap_nblocks = smgrnblocks(smgr, MAIN_FORKNUM);
+
+			if (heap_nblocks > HEAP_FSM_CREATION_THRESHOLD)
+				write_to_fsm = true;
+			else
+				write_to_fsm = false;
+		}
+	}
+
+	if (!write_to_fsm)
+		return;
 
 	/* Get the location of the FSM byte representing the heap block */
 	addr = fsm_get_location(heapBlk, &slot);
@@ -904,3 +1046,134 @@ fsm_vacuum_page(Relation rel, FSMAddress addr,
 
 	return max_avail;
 }
+
+/*
+ * For heaps, we prevent creation of the FSM unless the number of pages
+ * exceeds HEAP_FSM_CREATION_THRESHOLD.  For tables that don't already have
+ * a FSM, this will save an inode and a few kB of space.
+ *
+ * XXX The API is a little awkward -- if the caller passes a valid nblocks
+ * value, it can avoid invoking a system call.  If the caller passes
+ * InvalidBlockNumber and receives a false return value, it can get an
+ * up-to-date relation size from get_nblocks.  This saves a few cycles in
+ * the caller, which would otherwise need to get the relation size by itself.
+ */
+static bool
+fsm_allow_writes(Relation rel, BlockNumber heapblk,
+				 BlockNumber nblocks, BlockNumber *get_nblocks)
+{
+	bool		skip_get_nblocks;
+
+	if (heapblk >= HEAP_FSM_CREATION_THRESHOLD)
+		return true;
+
+	/* Non-heap rels can always create a FSM. */
+	if (rel->rd_rel->relkind != RELKIND_RELATION &&
+		rel->rd_rel->relkind != RELKIND_TOASTVALUE)
+		return true;
+
+	/*
+	 * If the caller knows nblocks, we can avoid a system call later. If it
+	 * doesn't, maybe we have relpages from a previous VACUUM. Since the table
+	 * may have extended since then, we still have to count the pages later if
+	 * we can't return now.
+	 */
+	if (nblocks != InvalidBlockNumber)
+	{
+		if (nblocks > HEAP_FSM_CREATION_THRESHOLD)
+			return true;
+		else
+			skip_get_nblocks = true;
+	}
+	else
+	{
+		if (rel->rd_rel->relpages != InvalidBlockNumber &&
+			rel->rd_rel->relpages > HEAP_FSM_CREATION_THRESHOLD)
+			return true;
+		else
+			skip_get_nblocks = false;
+	}
+
+	RelationOpenSmgr(rel);
+	if (smgrexists(rel->rd_smgr, FSM_FORKNUM))
+		return true;
+
+	if (skip_get_nblocks)
+		return false;
+
+	/* last resort */
+	*get_nblocks = RelationGetNumberOfBlocks(rel);
+	if (*get_nblocks > HEAP_FSM_CREATION_THRESHOLD)
+		return true;
+	else
+		return false;
+}
+
+/*
+ * Initialize or update the local map of blocks to try, for when there is
+ * no FSM.
+ *
+ * When we initialize the map, the whole heap is potentially available to
+ * try.  Testing revealed that trying every block can cause a small
+ * performance dip compared to when we use a FSM, so we try every other
+ * block instead.
+ */
+static void
+fsm_local_set(Relation rel, BlockNumber cur_nblocks)
+{
+	BlockNumber blkno,
+				cached_target_block;
+
+	/* The local map must not be set already. */
+	Assert(!FSM_LOCAL_MAP_EXISTS);
+
+	/*
+	 * Starting at the current last block in the relation and working
+	 * backwards, mark alternating blocks as available.
+	 */
+	blkno = cur_nblocks - 1;
+	while (true)
+	{
+		fsm_local_map.map[blkno] = FSM_LOCAL_AVAIL;
+		if (blkno >= 2)
+			blkno -= 2;
+		else
+			break;
+	}
+
+	/* Cache the number of blocks. */
+	fsm_local_map.nblocks = cur_nblocks;
+
+	/* Set the status of the cached target block to 'unavailable'. */
+	cached_target_block = RelationGetTargetBlock(rel);
+	if (cached_target_block != InvalidBlockNumber &&
+		cached_target_block < cur_nblocks)
+		fsm_local_map.map[cached_target_block] = FSM_LOCAL_NOT_AVAIL;
+}
+
+/*
+ * Search the local map for an available block to try, in descending order.
+ * As such, there is no heuristic available to decide which order will be
+ * better to try, but the probability of having space in the last block in the
+ * map is higher because that is the most recent block added to the heap.
+ *
+ * This function is used when there is no FSM.
+ */
+static BlockNumber
+fsm_local_search(void)
+{
+	BlockNumber target_block;
+
+	/* Local map must be set by now. */
+	Assert(FSM_LOCAL_MAP_EXISTS);
+
+	target_block = fsm_local_map.nblocks;
+	do
+	{
+		target_block--;
+		if (fsm_local_map.map[target_block] == FSM_LOCAL_AVAIL)
+			return target_block;
+	} while (target_block > 0);
+
+	return InvalidBlockNumber;
+}
diff --git a/src/backend/storage/freespace/indexfsm.c b/src/backend/storage/freespace/indexfsm.c
index 58cedea..9d8f43d 100644
--- a/src/backend/storage/freespace/indexfsm.c
+++ b/src/backend/storage/freespace/indexfsm.c
@@ -37,7 +37,7 @@
 BlockNumber
 GetFreeIndexPage(Relation rel)
 {
-	BlockNumber blkno = GetPageWithFreeSpace(rel, BLCKSZ / 2);
+	BlockNumber blkno = GetPageWithFreeSpace(rel, BLCKSZ / 2, true);
 
 	if (blkno != InvalidBlockNumber)
 		RecordUsedIndexPage(rel, blkno);
@@ -51,7 +51,7 @@ GetFreeIndexPage(Relation rel)
 void
 RecordFreeIndexPage(Relation rel, BlockNumber freeBlock)
 {
-	RecordPageWithFreeSpace(rel, freeBlock, BLCKSZ - 1);
+	RecordPageWithFreeSpace(rel, freeBlock, BLCKSZ - 1, InvalidBlockNumber);
 }
 
 
@@ -61,7 +61,7 @@ RecordFreeIndexPage(Relation rel, BlockNumber freeBlock)
 void
 RecordUsedIndexPage(Relation rel, BlockNumber usedBlock)
 {
-	RecordPageWithFreeSpace(rel, usedBlock, 0);
+	RecordPageWithFreeSpace(rel, usedBlock, 0, InvalidBlockNumber);
 }
 
 /*
diff --git a/src/include/storage/freespace.h b/src/include/storage/freespace.h
index 8b00033..dbaae65 100644
--- a/src/include/storage/freespace.h
+++ b/src/include/storage/freespace.h
@@ -18,15 +18,20 @@
 #include "storage/relfilenode.h"
 #include "utils/relcache.h"
 
+/* Only create the FSM if the heap has greater than this many blocks */
+#define HEAP_FSM_CREATION_THRESHOLD 4
+
 /* prototypes for public functions in freespace.c */
 extern Size GetRecordedFreeSpace(Relation rel, BlockNumber heapBlk);
-extern BlockNumber GetPageWithFreeSpace(Relation rel, Size spaceNeeded);
+extern BlockNumber GetPageWithFreeSpace(Relation rel, Size spaceNeeded,
+					 bool check_fsm_only);
 extern BlockNumber RecordAndGetPageWithFreeSpace(Relation rel,
 							  BlockNumber oldPage,
 							  Size oldSpaceAvail,
 							  Size spaceNeeded);
 extern void RecordPageWithFreeSpace(Relation rel, BlockNumber heapBlk,
-						Size spaceAvail);
+						Size spaceAvail, BlockNumber nblocks);
+extern void FSMClearLocalMap(void);
 extern void XLogRecordPageWithFreeSpace(RelFileNode rnode, BlockNumber heapBlk,
 							Size spaceAvail);
 
diff --git a/src/test/regress/expected/fsm.out b/src/test/regress/expected/fsm.out
new file mode 100644
index 0000000..eb2c384
--- /dev/null
+++ b/src/test/regress/expected/fsm.out
@@ -0,0 +1,49 @@
+--
+-- Free Space Map test
+--
+CREATE TABLE fsm_check_size (num int, str text);
+-- With one block, there should be no FSM
+INSERT INTO fsm_check_size VALUES(1, 'a');
+VACUUM fsm_check_size;
+SELECT pg_relation_size('fsm_check_size', 'main') AS heap_size,
+pg_relation_size('fsm_check_size', 'fsm') AS fsm_size;
+ heap_size | fsm_size 
+-----------+----------
+      8192 |        0
+(1 row)
+
+-- Extend table with enough blocks to exceed the FSM threshold
+-- FSM is created and extended to 3 blocks
+DO $$
+DECLARE curtid tid;
+num int;
+BEGIN
+num = 11;
+  LOOP
+    INSERT INTO fsm_check_size VALUES (num, 'b') RETURNING ctid INTO curtid;
+    EXIT WHEN curtid >= tid '(4, 0)';
+    num = num + 1;
+  END LOOP;
+END;
+$$;
+VACUUM fsm_check_size;
+SELECT pg_relation_size('fsm_check_size', 'fsm') AS fsm_size;
+ fsm_size 
+----------
+    24576
+(1 row)
+
+-- Add long random string to extend TOAST table to 1 block
+INSERT INTO fsm_check_size
+VALUES(0, (SELECT string_agg(md5(chr(i)), '')
+		   FROM generate_series(1,100) i));
+VACUUM fsm_check_size;
+SELECT pg_relation_size(reltoastrelid, 'main') AS toast_size,
+pg_relation_size(reltoastrelid, 'fsm') AS toast_fsm_size
+FROM pg_class WHERE relname = 'fsm_check_size';
+ toast_size | toast_fsm_size 
+------------+----------------
+       8192 |              0
+(1 row)
+
+DROP TABLE fsm_check_size;
diff --git a/src/test/regress/parallel_schedule b/src/test/regress/parallel_schedule
index cc0bbf5..4051a4a 100644
--- a/src/test/regress/parallel_schedule
+++ b/src/test/regress/parallel_schedule
@@ -69,6 +69,12 @@ test: create_aggregate create_function_3 create_cast constraints triggers inheri
 test: sanity_check
 
 # ----------
+# fsm does a delete followed by vacuum, and running it in parallel can prevent
+# removal of rows.
+# ----------
+test: fsm
+
+# ----------
 # Believe it or not, select creates a table, subsequent
 # tests need.
 # ----------
diff --git a/src/test/regress/serial_schedule b/src/test/regress/serial_schedule
index 0c10c71..ac1ea62 100644
--- a/src/test/regress/serial_schedule
+++ b/src/test/regress/serial_schedule
@@ -80,6 +80,7 @@ test: roleattributes
 test: create_am
 test: hash_func
 test: sanity_check
+test: fsm
 test: errors
 test: select
 test: select_into
diff --git a/src/test/regress/sql/fsm.sql b/src/test/regress/sql/fsm.sql
new file mode 100644
index 0000000..b1debed
--- /dev/null
+++ b/src/test/regress/sql/fsm.sql
@@ -0,0 +1,42 @@
+--
+-- Free Space Map test
+--
+
+CREATE TABLE fsm_check_size (num int, str text);
+
+-- With one block, there should be no FSM
+INSERT INTO fsm_check_size VALUES(1, 'a');
+
+VACUUM fsm_check_size;
+SELECT pg_relation_size('fsm_check_size', 'main') AS heap_size,
+pg_relation_size('fsm_check_size', 'fsm') AS fsm_size;
+
+-- Extend table with enough blocks to exceed the FSM threshold
+-- FSM is created and extended to 3 blocks
+DO $$
+DECLARE curtid tid;
+num int;
+BEGIN
+num = 11;
+  LOOP
+    INSERT INTO fsm_check_size VALUES (num, 'b') RETURNING ctid INTO curtid;
+    EXIT WHEN curtid >= tid '(4, 0)';
+    num = num + 1;
+  END LOOP;
+END;
+$$;
+
+VACUUM fsm_check_size;
+SELECT pg_relation_size('fsm_check_size', 'fsm') AS fsm_size;
+
+-- Add long random string to extend TOAST table to 1 block
+INSERT INTO fsm_check_size
+VALUES(0, (SELECT string_agg(md5(chr(i)), '')
+		   FROM generate_series(1,100) i));
+
+VACUUM fsm_check_size;
+SELECT pg_relation_size(reltoastrelid, 'main') AS toast_size,
+pg_relation_size(reltoastrelid, 'fsm') AS toast_fsm_size
+FROM pg_class WHERE relname = 'fsm_check_size';
+
+DROP TABLE fsm_check_size;
-- 
1.8.3.1

#117Amit Kapila
amit.kapila16@gmail.com
In reply to: Masahiko Sawada (#115)
Re: WIP: Avoid creation of the free space map for small tables

On Wed, Jan 30, 2019 at 10:41 PM Masahiko Sawada <sawada.mshk@gmail.com> wrote:

On Wed, Jan 30, 2019 at 4:33 AM Amit Kapila <amit.kapila16@gmail.com> wrote:

On Tue, Jan 29, 2019 at 8:12 PM John Naylor <john.naylor@2ndquadrant.com> wrote:

On Tue, Jan 29, 2019 at 11:56 AM Amit Kapila <amit.kapila16@gmail.com> wrote:

You can find this change in attached patch. Then, I ran the make
check in src/bin/pgbench multiple times using test_conc_insert.sh.
You can vary the number of times the test should run, if you are not
able to reproduce it with this.

The attached patch (clear_local_map_if_exists_1.patch) atop the main
patch fixes the issue for me. Kindly verify the same.

I got one failure in 50 runs. With the new patch, I didn't get any
failures in 300 runs.

Thanks for verification. I have included it in the attached patch and
I have also modified the page.sql test to have enough number of pages
in relation so that FSM will get created irrespective of alignment
boundaries. Masahiko San, can you verify if this now works for you?

Thank you for updating the patch!

The modified page.sql test could fail if the block size is more than
8kB?

That's right, but I don't think current regression tests will work for
block size greater than 8KB. I have tried with 16 and 32 as block
size, there were few failures on the head itself.

We can ensure the number of pages are more than 4 by checking it
and adding more data if no enough but I'm really not sure we should
care the bigger-block size cases.

Yeah, I am not sure either. I think as this is an existing test, we
should not try to change it too much. However, if both you and John
feel it is better to change, we can go with that.

--
With Regards,
Amit Kapila.
EnterpriseDB: http://www.enterprisedb.com

#118John Naylor
john.naylor@2ndquadrant.com
In reply to: Amit Kapila (#116)
Re: WIP: Avoid creation of the free space map for small tables

On Thu, Jan 31, 2019 at 6:37 AM Amit Kapila <amit.kapila16@gmail.com> wrote:

On Wed, Jan 30, 2019 at 8:11 PM John Naylor <john.naylor@2ndquadrant.com> wrote:

That's probably a good idea to limit risk. I just very basic tests
now, and vacuum before every relation size check to make sure any FSM
extension (whether desired or not) is invoked. Also, in my last patch
I forgot to implement explicit checks of the block number instead of
assuming how many rows will fit on a page. I've used a plpgsql code
block to do this.

-- Extend table with enough blocks to exceed the FSM threshold
-- FSM is created and extended to 3 blocks

The second comment line seems redundant to me, so I have removed that
and integrated it in the main patch.

FYI, the second comment is still present in v20.

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

#119John Naylor
john.naylor@2ndquadrant.com
In reply to: Amit Kapila (#117)
Re: WIP: Avoid creation of the free space map for small tables

On Thu, Jan 31, 2019 at 6:41 AM Amit Kapila <amit.kapila16@gmail.com> wrote:

On Wed, Jan 30, 2019 at 10:41 PM Masahiko Sawada <sawada.mshk@gmail.com> wrote:

The modified page.sql test could fail if the block size is more than
8kB?

That's right, but I don't think current regression tests will work for
block size greater than 8KB. I have tried with 16 and 32 as block
size, there were few failures on the head itself.

We can ensure the number of pages are more than 4 by checking it
and adding more data if no enough but I'm really not sure we should
care the bigger-block size cases.

Yeah, I am not sure either. I think as this is an existing test, we
should not try to change it too much. However, if both you and John
feel it is better to change, we can go with that.

I have an idea -- instead of adding a bunch of records and hoping that
the relation size and free space is consistent across platforms, how
about we revert to the original test input, and add a BRIN index? That
should have a FSM even with one record.

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

#120Amit Kapila
amit.kapila16@gmail.com
In reply to: John Naylor (#118)
1 attachment(s)
Re: WIP: Avoid creation of the free space map for small tables

On Thu, Jan 31, 2019 at 2:02 PM John Naylor <john.naylor@2ndquadrant.com> wrote:

On Thu, Jan 31, 2019 at 6:37 AM Amit Kapila <amit.kapila16@gmail.com> wrote:

On Wed, Jan 30, 2019 at 8:11 PM John Naylor <john.naylor@2ndquadrant.com> wrote:

That's probably a good idea to limit risk. I just very basic tests
now, and vacuum before every relation size check to make sure any FSM
extension (whether desired or not) is invoked. Also, in my last patch
I forgot to implement explicit checks of the block number instead of
assuming how many rows will fit on a page. I've used a plpgsql code
block to do this.

-- Extend table with enough blocks to exceed the FSM threshold
-- FSM is created and extended to 3 blocks

The second comment line seems redundant to me, so I have removed that
and integrated it in the main patch.

FYI, the second comment is still present in v20.

oops, forgot to include in commit after making a change, done now.

--
With Regards,
Amit Kapila.
EnterpriseDB: http://www.enterprisedb.com

Attachments:

v21-0001-Avoid-creation-of-the-free-space-map-for-small-heap-.patchapplication/octet-stream; name=v21-0001-Avoid-creation-of-the-free-space-map-for-small-heap-.patchDownload
From c24a527e65cbcd462f73f8bbf40a6f0093e03b49 Mon Sep 17 00:00:00 2001
From: Amit Kapila <akapila@postgresql.org>
Date: Wed, 30 Jan 2019 08:45:16 +0530
Subject: [PATCH] Avoid creation of the free space map for small heap
 relations.

Previously, all heaps had FSMs. For very small tables, this means that the
FSM took up more space than the heap did. This is wasteful, so now we
refrain from creating the FSM for heaps with 4 pages or fewer. If the last
known target block has insufficient space, we still try to insert into some
other page before giving up and extending the relation, since doing
otherwise leads to table bloat. Testing showed that trying every page
penalized performance slightly, so we compromise and try every other page.
This way, we visit at most two pages. Any pages with wasted free space
become visible at next relation extension, so we still control table bloat.
As a bonus, directly attempting one or two pages can even be faster than
consulting the FSM would have been.

Once the FSM is created for a heap we don't remove it even if somebody
deletes all the rows from the corresponding relation.  We don't think it is
a useful optimization as it is quite likely that relation will again grow
to the same size.

Author: John Naylor with design inputs and some code contribution by Amit Kapila
Reviewed-by: Amit Kapila
Tested-by: Mithun C Y
Discussion: https://www.postgresql.org/message-id/CAJVSVGWvB13PzpbLEecFuGFc5V2fsO736BsdTakPiPAcdMM5tQ@mail.gmail.com
---
 contrib/pageinspect/expected/page.out     |  77 ++++----
 contrib/pageinspect/sql/page.sql          |  33 ++--
 doc/src/sgml/storage.sgml                 |  13 +-
 src/backend/access/brin/brin.c            |   2 +-
 src/backend/access/brin/brin_pageops.c    |  10 +-
 src/backend/access/heap/hio.c             |  45 +++--
 src/backend/access/heap/vacuumlazy.c      |  17 +-
 src/backend/access/transam/xact.c         |  14 ++
 src/backend/storage/freespace/README      |  38 +++-
 src/backend/storage/freespace/freespace.c | 285 +++++++++++++++++++++++++++++-
 src/backend/storage/freespace/indexfsm.c  |   6 +-
 src/include/storage/freespace.h           |   9 +-
 src/test/regress/expected/fsm.out         |  48 +++++
 src/test/regress/parallel_schedule        |   6 +
 src/test/regress/serial_schedule          |   1 +
 src/test/regress/sql/fsm.sql              |  41 +++++
 16 files changed, 543 insertions(+), 102 deletions(-)
 create mode 100644 src/test/regress/expected/fsm.out
 create mode 100644 src/test/regress/sql/fsm.sql

diff --git a/contrib/pageinspect/expected/page.out b/contrib/pageinspect/expected/page.out
index 3fcd9fb..89b73ca 100644
--- a/contrib/pageinspect/expected/page.out
+++ b/contrib/pageinspect/expected/page.out
@@ -1,48 +1,69 @@
 CREATE EXTENSION pageinspect;
-CREATE TABLE test1 (a int, b int);
-INSERT INTO test1 VALUES (16777217, 131584);
-VACUUM test1;  -- set up FSM
+CREATE TABLE test_rel_forks (a int);
+-- Make sure there are enough blocks in the heap for the FSM to be created.
+INSERT INTO test_rel_forks SELECT i from generate_series(1,2000) i;
+-- set up FSM and VM
+VACUUM test_rel_forks;
 -- The page contents can vary, so just test that it can be read
 -- successfully, but don't keep the output.
-SELECT octet_length(get_raw_page('test1', 'main', 0)) AS main_0;
+SELECT octet_length(get_raw_page('test_rel_forks', 'main', 0)) AS main_0;
  main_0 
 --------
    8192
 (1 row)
 
-SELECT octet_length(get_raw_page('test1', 'main', 1)) AS main_1;
-ERROR:  block number 1 is out of range for relation "test1"
-SELECT octet_length(get_raw_page('test1', 'fsm', 0)) AS fsm_0;
+SELECT octet_length(get_raw_page('test_rel_forks', 'main', 100)) AS main_100;
+ERROR:  block number 100 is out of range for relation "test_rel_forks"
+SELECT octet_length(get_raw_page('test_rel_forks', 'fsm', 0)) AS fsm_0;
  fsm_0 
 -------
   8192
 (1 row)
 
-SELECT octet_length(get_raw_page('test1', 'fsm', 1)) AS fsm_1;
- fsm_1 
--------
-  8192
-(1 row)
-
-SELECT octet_length(get_raw_page('test1', 'vm', 0)) AS vm_0;
+SELECT octet_length(get_raw_page('test_rel_forks', 'fsm', 20)) AS fsm_20;
+ERROR:  block number 20 is out of range for relation "test_rel_forks"
+SELECT octet_length(get_raw_page('test_rel_forks', 'vm', 0)) AS vm_0;
  vm_0 
 ------
  8192
 (1 row)
 
-SELECT octet_length(get_raw_page('test1', 'vm', 1)) AS vm_1;
-ERROR:  block number 1 is out of range for relation "test1"
+SELECT octet_length(get_raw_page('test_rel_forks', 'vm', 1)) AS vm_1;
+ERROR:  block number 1 is out of range for relation "test_rel_forks"
 SELECT octet_length(get_raw_page('xxx', 'main', 0));
 ERROR:  relation "xxx" does not exist
-SELECT octet_length(get_raw_page('test1', 'xxx', 0));
+SELECT octet_length(get_raw_page('test_rel_forks', 'xxx', 0));
 ERROR:  invalid fork name
 HINT:  Valid fork names are "main", "fsm", "vm", and "init".
-SELECT get_raw_page('test1', 0) = get_raw_page('test1', 'main', 0);
+SELECT * FROM fsm_page_contents(get_raw_page('test_rel_forks', 'fsm', 0));
+ fsm_page_contents 
+-------------------
+ 0: 39            +
+ 1: 39            +
+ 3: 39            +
+ 7: 39            +
+ 15: 39           +
+ 31: 39           +
+ 63: 39           +
+ 127: 39          +
+ 255: 39          +
+ 511: 39          +
+ 1023: 39         +
+ 2047: 39         +
+ 4095: 39         +
+ fp_next_slot: 0  +
+ 
+(1 row)
+
+SELECT get_raw_page('test_rel_forks', 0) = get_raw_page('test_rel_forks', 'main', 0);
  ?column? 
 ----------
  t
 (1 row)
 
+DROP TABLE test_rel_forks;
+CREATE TABLE test1 (a int, b int);
+INSERT INTO test1 VALUES (16777217, 131584);
 SELECT pagesize, version FROM page_header(get_raw_page('test1', 0));
  pagesize | version 
 ----------+---------
@@ -62,26 +83,6 @@ SELECT tuple_data_split('test1'::regclass, t_data, t_infomask, t_infomask2, t_bi
  {"\\x01000001","\\x00020200"}
 (1 row)
 
-SELECT * FROM fsm_page_contents(get_raw_page('test1', 'fsm', 0));
- fsm_page_contents 
--------------------
- 0: 254           +
- 1: 254           +
- 3: 254           +
- 7: 254           +
- 15: 254          +
- 31: 254          +
- 63: 254          +
- 127: 254         +
- 255: 254         +
- 511: 254         +
- 1023: 254        +
- 2047: 254        +
- 4095: 254        +
- fp_next_slot: 0  +
- 
-(1 row)
-
 DROP TABLE test1;
 -- check that using any of these functions with a partitioned table or index
 -- would fail
diff --git a/contrib/pageinspect/sql/page.sql b/contrib/pageinspect/sql/page.sql
index 8ac9991..67166ef 100644
--- a/contrib/pageinspect/sql/page.sql
+++ b/contrib/pageinspect/sql/page.sql
@@ -1,26 +1,35 @@
 CREATE EXTENSION pageinspect;
 
-CREATE TABLE test1 (a int, b int);
-INSERT INTO test1 VALUES (16777217, 131584);
+CREATE TABLE test_rel_forks (a int);
+-- Make sure there are enough blocks in the heap for the FSM to be created.
+INSERT INTO test_rel_forks SELECT i from generate_series(1,2000) i;
 
-VACUUM test1;  -- set up FSM
+-- set up FSM and VM
+VACUUM test_rel_forks;
 
 -- The page contents can vary, so just test that it can be read
 -- successfully, but don't keep the output.
 
-SELECT octet_length(get_raw_page('test1', 'main', 0)) AS main_0;
-SELECT octet_length(get_raw_page('test1', 'main', 1)) AS main_1;
+SELECT octet_length(get_raw_page('test_rel_forks', 'main', 0)) AS main_0;
+SELECT octet_length(get_raw_page('test_rel_forks', 'main', 100)) AS main_100;
 
-SELECT octet_length(get_raw_page('test1', 'fsm', 0)) AS fsm_0;
-SELECT octet_length(get_raw_page('test1', 'fsm', 1)) AS fsm_1;
+SELECT octet_length(get_raw_page('test_rel_forks', 'fsm', 0)) AS fsm_0;
+SELECT octet_length(get_raw_page('test_rel_forks', 'fsm', 20)) AS fsm_20;
 
-SELECT octet_length(get_raw_page('test1', 'vm', 0)) AS vm_0;
-SELECT octet_length(get_raw_page('test1', 'vm', 1)) AS vm_1;
+SELECT octet_length(get_raw_page('test_rel_forks', 'vm', 0)) AS vm_0;
+SELECT octet_length(get_raw_page('test_rel_forks', 'vm', 1)) AS vm_1;
 
 SELECT octet_length(get_raw_page('xxx', 'main', 0));
-SELECT octet_length(get_raw_page('test1', 'xxx', 0));
+SELECT octet_length(get_raw_page('test_rel_forks', 'xxx', 0));
+
+SELECT * FROM fsm_page_contents(get_raw_page('test_rel_forks', 'fsm', 0));
+
+SELECT get_raw_page('test_rel_forks', 0) = get_raw_page('test_rel_forks', 'main', 0);
 
-SELECT get_raw_page('test1', 0) = get_raw_page('test1', 'main', 0);
+DROP TABLE test_rel_forks;
+
+CREATE TABLE test1 (a int, b int);
+INSERT INTO test1 VALUES (16777217, 131584);
 
 SELECT pagesize, version FROM page_header(get_raw_page('test1', 0));
 
@@ -29,8 +38,6 @@ SELECT page_checksum(get_raw_page('test1', 0), 0) IS NOT NULL AS silly_checksum_
 SELECT tuple_data_split('test1'::regclass, t_data, t_infomask, t_infomask2, t_bits)
     FROM heap_page_items(get_raw_page('test1', 0));
 
-SELECT * FROM fsm_page_contents(get_raw_page('test1', 'fsm', 0));
-
 DROP TABLE test1;
 
 -- check that using any of these functions with a partitioned table or index
diff --git a/doc/src/sgml/storage.sgml b/doc/src/sgml/storage.sgml
index 8ef2ac8..cbdad0c 100644
--- a/doc/src/sgml/storage.sgml
+++ b/doc/src/sgml/storage.sgml
@@ -590,12 +590,13 @@ tuple would otherwise be too big.
 <indexterm><primary>FSM</primary><see>Free Space Map</see></indexterm>
 
 <para>
-Each heap and index relation, except for hash indexes, has a Free Space Map
-(FSM) to keep track of available space in the relation. It's stored
-alongside the main relation data in a separate relation fork, named after the
-filenode number of the relation, plus a <literal>_fsm</literal> suffix. For example,
-if the filenode of a relation is 12345, the FSM is stored in a file called
-<filename>12345_fsm</filename>, in the same directory as the main relation file.
+Each heap relation, unless it is very small, and each index relation, except
+for hash indexes, has a Free Space Map (FSM) to keep track of available
+space in the relation. It's stored alongside the main relation data in a
+separate relation fork, named after the filenode number of the relation, plus
+a <literal>_fsm</literal> suffix. For example, if the filenode of a relation
+is 12345, the FSM is stored in a file called <filename>12345_fsm</filename>,
+in the same directory as the main relation file.
 </para>
 
 <para>
diff --git a/src/backend/access/brin/brin.c b/src/backend/access/brin/brin.c
index 467d91e..8f008dd 100644
--- a/src/backend/access/brin/brin.c
+++ b/src/backend/access/brin/brin.c
@@ -1150,7 +1150,7 @@ terminate_brin_buildstate(BrinBuildState *state)
 		freespace = PageGetFreeSpace(page);
 		blk = BufferGetBlockNumber(state->bs_currentInsertBuf);
 		ReleaseBuffer(state->bs_currentInsertBuf);
-		RecordPageWithFreeSpace(state->bs_irel, blk, freespace);
+		RecordPageWithFreeSpace(state->bs_irel, blk, freespace, InvalidBlockNumber);
 		FreeSpaceMapVacuumRange(state->bs_irel, blk, blk + 1);
 	}
 
diff --git a/src/backend/access/brin/brin_pageops.c b/src/backend/access/brin/brin_pageops.c
index 164a468..2eb354f 100644
--- a/src/backend/access/brin/brin_pageops.c
+++ b/src/backend/access/brin/brin_pageops.c
@@ -310,7 +310,7 @@ brin_doupdate(Relation idxrel, BlockNumber pagesPerRange,
 
 		if (extended)
 		{
-			RecordPageWithFreeSpace(idxrel, newblk, freespace);
+			RecordPageWithFreeSpace(idxrel, newblk, freespace, InvalidBlockNumber);
 			FreeSpaceMapVacuumRange(idxrel, newblk, newblk + 1);
 		}
 
@@ -461,7 +461,7 @@ brin_doinsert(Relation idxrel, BlockNumber pagesPerRange,
 
 	if (extended)
 	{
-		RecordPageWithFreeSpace(idxrel, blk, freespace);
+		RecordPageWithFreeSpace(idxrel, blk, freespace, InvalidBlockNumber);
 		FreeSpaceMapVacuumRange(idxrel, blk, blk + 1);
 	}
 
@@ -654,7 +654,7 @@ brin_page_cleanup(Relation idxrel, Buffer buf)
 
 	/* Measure free space and record it */
 	RecordPageWithFreeSpace(idxrel, BufferGetBlockNumber(buf),
-							br_page_get_freespace(page));
+							br_page_get_freespace(page), InvalidBlockNumber);
 }
 
 /*
@@ -703,7 +703,7 @@ brin_getinsertbuffer(Relation irel, Buffer oldbuf, Size itemsz,
 	/* Choose initial target page, re-using existing target if known */
 	newblk = RelationGetTargetBlock(irel);
 	if (newblk == InvalidBlockNumber)
-		newblk = GetPageWithFreeSpace(irel, itemsz);
+		newblk = GetPageWithFreeSpace(irel, itemsz, true);
 
 	/*
 	 * Loop until we find a page with sufficient free space.  By the time we
@@ -895,7 +895,7 @@ brin_initialize_empty_new_buffer(Relation idxrel, Buffer buffer)
 	 * pages whose FSM records were forgotten in a crash.
 	 */
 	RecordPageWithFreeSpace(idxrel, BufferGetBlockNumber(buffer),
-							br_page_get_freespace(page));
+							br_page_get_freespace(page), InvalidBlockNumber);
 }
 
 
diff --git a/src/backend/access/heap/hio.c b/src/backend/access/heap/hio.c
index 3da0b49..995d78e 100644
--- a/src/backend/access/heap/hio.c
+++ b/src/backend/access/heap/hio.c
@@ -239,8 +239,14 @@ RelationAddExtraBlocks(Relation relation, BulkInsertState bistate)
 		 * Immediately update the bottom level of the FSM.  This has a good
 		 * chance of making this page visible to other concurrently inserting
 		 * backends, and we want that to happen without delay.
+		 *
+		 * Since we know the table will end up with extraBlocks additional
+		 * pages, we pass the final number to avoid possible unnecessary
+		 * system calls and to make sure the FSM is created when we add the
+		 * first new page.
 		 */
-		RecordPageWithFreeSpace(relation, blockNum, freespace);
+		RecordPageWithFreeSpace(relation, blockNum, freespace,
+								firstBlock + extraBlocks);
 	}
 	while (--extraBlocks > 0);
 
@@ -377,20 +383,9 @@ RelationGetBufferForTuple(Relation relation, Size len,
 		 * We have no cached target page, so ask the FSM for an initial
 		 * target.
 		 */
-		targetBlock = GetPageWithFreeSpace(relation, len + saveFreeSpace);
-
-		/*
-		 * If the FSM knows nothing of the rel, try the last page before we
-		 * give up and extend.  This avoids one-tuple-per-page syndrome during
-		 * bootstrapping or in a recently-started system.
-		 */
-		if (targetBlock == InvalidBlockNumber)
-		{
-			BlockNumber nblocks = RelationGetNumberOfBlocks(relation);
-
-			if (nblocks > 0)
-				targetBlock = nblocks - 1;
-		}
+		targetBlock = GetPageWithFreeSpace(relation,
+										   len + saveFreeSpace,
+										   false);
 	}
 
 loop:
@@ -484,6 +479,13 @@ loop:
 		{
 			/* use this page as future insert target, too */
 			RelationSetTargetBlock(relation, targetBlock);
+
+			/*
+			 * In case we used an in-memory map of available blocks, reset it
+			 * for next use.
+			 */
+			FSMClearLocalMap();
+
 			return buffer;
 		}
 
@@ -543,9 +545,12 @@ loop:
 
 			/*
 			 * Check if some other backend has extended a block for us while
-			 * we were waiting on the lock.
+			 * we were waiting on the lock.  We only check the FSM -- if there
+			 * isn't one we don't recheck the number of blocks.
 			 */
-			targetBlock = GetPageWithFreeSpace(relation, len + saveFreeSpace);
+			targetBlock = GetPageWithFreeSpace(relation,
+											   len + saveFreeSpace,
+											   true);
 
 			/*
 			 * If some other waiter has already extended the relation, we
@@ -625,5 +630,11 @@ loop:
 	 */
 	RelationSetTargetBlock(relation, BufferGetBlockNumber(buffer));
 
+	/*
+	 * In case we used an in-memory map of available blocks, reset it for next
+	 * use.
+	 */
+	FSMClearLocalMap();
+
 	return buffer;
 }
diff --git a/src/backend/access/heap/vacuumlazy.c b/src/backend/access/heap/vacuumlazy.c
index 37aa484..9cfa65c 100644
--- a/src/backend/access/heap/vacuumlazy.c
+++ b/src/backend/access/heap/vacuumlazy.c
@@ -153,7 +153,7 @@ static BufferAccessStrategy vac_strategy;
 static void lazy_scan_heap(Relation onerel, int options,
 			   LVRelStats *vacrelstats, Relation *Irel, int nindexes,
 			   bool aggressive);
-static void lazy_vacuum_heap(Relation onerel, LVRelStats *vacrelstats);
+static void lazy_vacuum_heap(Relation onerel, LVRelStats *vacrelstats, BlockNumber nblocks);
 static bool lazy_check_needs_freeze(Buffer buf, bool *hastup);
 static void lazy_vacuum_index(Relation indrel,
 				  IndexBulkDeleteResult **stats,
@@ -758,7 +758,7 @@ lazy_scan_heap(Relation onerel, int options, LVRelStats *vacrelstats,
 			pgstat_progress_update_multi_param(2, hvp_index, hvp_val);
 
 			/* Remove tuples from heap */
-			lazy_vacuum_heap(onerel, vacrelstats);
+			lazy_vacuum_heap(onerel, vacrelstats, nblocks);
 
 			/*
 			 * Forget the now-vacuumed tuples, and press on, but be careful
@@ -896,7 +896,7 @@ lazy_scan_heap(Relation onerel, int options, LVRelStats *vacrelstats,
 			MarkBufferDirty(buf);
 			UnlockReleaseBuffer(buf);
 
-			RecordPageWithFreeSpace(onerel, blkno, freespace);
+			RecordPageWithFreeSpace(onerel, blkno, freespace, nblocks);
 			continue;
 		}
 
@@ -935,7 +935,7 @@ lazy_scan_heap(Relation onerel, int options, LVRelStats *vacrelstats,
 			}
 
 			UnlockReleaseBuffer(buf);
-			RecordPageWithFreeSpace(onerel, blkno, freespace);
+			RecordPageWithFreeSpace(onerel, blkno, freespace, nblocks);
 			continue;
 		}
 
@@ -1332,7 +1332,7 @@ lazy_scan_heap(Relation onerel, int options, LVRelStats *vacrelstats,
 		 * taken if there are no indexes.)
 		 */
 		if (vacrelstats->num_dead_tuples == prev_dead_count)
-			RecordPageWithFreeSpace(onerel, blkno, freespace);
+			RecordPageWithFreeSpace(onerel, blkno, freespace, nblocks);
 	}
 
 	/* report that everything is scanned and vacuumed */
@@ -1394,7 +1394,7 @@ lazy_scan_heap(Relation onerel, int options, LVRelStats *vacrelstats,
 		/* Remove tuples from heap */
 		pgstat_progress_update_param(PROGRESS_VACUUM_PHASE,
 									 PROGRESS_VACUUM_PHASE_VACUUM_HEAP);
-		lazy_vacuum_heap(onerel, vacrelstats);
+		lazy_vacuum_heap(onerel, vacrelstats, nblocks);
 		vacrelstats->num_index_scans++;
 	}
 
@@ -1465,9 +1465,10 @@ lazy_scan_heap(Relation onerel, int options, LVRelStats *vacrelstats,
  * Note: the reason for doing this as a second pass is we cannot remove
  * the tuples until we've removed their index entries, and we want to
  * process index entry removal in batches as large as possible.
+ * Note: nblocks is passed as an optimization for RecordPageWithFreeSpace().
  */
 static void
-lazy_vacuum_heap(Relation onerel, LVRelStats *vacrelstats)
+lazy_vacuum_heap(Relation onerel, LVRelStats *vacrelstats, BlockNumber nblocks)
 {
 	int			tupindex;
 	int			npages;
@@ -1504,7 +1505,7 @@ lazy_vacuum_heap(Relation onerel, LVRelStats *vacrelstats)
 		freespace = PageGetHeapFreeSpace(page);
 
 		UnlockReleaseBuffer(buf);
-		RecordPageWithFreeSpace(onerel, tblk, freespace);
+		RecordPageWithFreeSpace(onerel, tblk, freespace, nblocks);
 		npages++;
 	}
 
diff --git a/src/backend/access/transam/xact.c b/src/backend/access/transam/xact.c
index 0181976..92bda87 100644
--- a/src/backend/access/transam/xact.c
+++ b/src/backend/access/transam/xact.c
@@ -48,6 +48,7 @@
 #include "replication/walsender.h"
 #include "storage/condition_variable.h"
 #include "storage/fd.h"
+#include "storage/freespace.h"
 #include "storage/lmgr.h"
 #include "storage/predicate.h"
 #include "storage/proc.h"
@@ -2493,6 +2494,12 @@ AbortTransaction(void)
 	pgstat_report_wait_end();
 	pgstat_progress_end_command();
 
+	/*
+	 * In case we aborted during RelationGetBufferForTuple(), clear the local
+	 * map of heap pages.
+	 */
+	FSMClearLocalMap();
+
 	/* Clean up buffer I/O and buffer context locks, too */
 	AbortBufferIO();
 	UnlockBuffers();
@@ -4714,6 +4721,13 @@ AbortSubTransaction(void)
 
 	pgstat_report_wait_end();
 	pgstat_progress_end_command();
+
+	/*
+	 * In case we aborted during RelationGetBufferForTuple(), clear the local
+	 * map of heap pages.
+	 */
+	FSMClearLocalMap();
+
 	AbortBufferIO();
 	UnlockBuffers();
 
diff --git a/src/backend/storage/freespace/README b/src/backend/storage/freespace/README
index e7ff23b..0d3cd29 100644
--- a/src/backend/storage/freespace/README
+++ b/src/backend/storage/freespace/README
@@ -8,7 +8,41 @@ free space to hold a tuple to be stored; or to determine that no such page
 exists and the relation must be extended by one page.  As of PostgreSQL 8.4
 each relation has its own, extensible free space map stored in a separate
 "fork" of its relation.  This eliminates the disadvantages of the former
-fixed-size FSM.
+fixed-size FSM.  There are two exceptions:
+
+1. Hash indexes never have a FSM.
+2. For very small tables, a 3-page relation fork would be relatively large
+and wasteful, so to save space we refrain from creating the FSM if the
+heap has HEAP_FSM_CREATION_THRESHOLD pages or fewer.
+
+To locate free space in the latter case, we simply try pages directly without
+knowing ahead of time how much free space they have.  To maintain good
+performance, we create a local in-memory map of pages to try, and only mark
+every other page as available.  For example, in a 3-page heap, the local map
+would look like:
+
+ANAN
+0123
+
+Pages 0 and 2 are marked "available", and page 1 as "not available".
+Page 3 is beyond the end of the relation, so is likewise marked "not
+available".  First we try page 2, and if that doesn't have sufficient free
+space we try page 0 before giving up and extending the relation.  There may
+be some wasted free space on block 1, but if the relation extends to 4 pages:
+
+NANA
+0123
+
+We not only have the new page 3 at our disposal, we can now check page 1
+for free space as well.
+
+Once the FSM is created for a heap we don't remove it even if somebody deletes
+all the rows from the corresponding relation.  We don't think it is a useful
+optimization as it is quite likely that relation will again grow to the same
+size.
+
+FSM data structure
+------------------
 
 It is important to keep the map small so that it can be searched rapidly.
 Therefore, we don't attempt to record the exact free space on a page.
@@ -192,5 +226,3 @@ TODO
 ----
 
 - fastroot to avoid traversing upper nodes with just 1 child
-- use a different system for tables that fit into one FSM page, with a
-  mechanism to switch to the real thing as it grows.
diff --git a/src/backend/storage/freespace/freespace.c b/src/backend/storage/freespace/freespace.c
index eee8286..d3f207b 100644
--- a/src/backend/storage/freespace/freespace.c
+++ b/src/backend/storage/freespace/freespace.c
@@ -76,6 +76,14 @@
 #define FSM_ROOT_LEVEL	(FSM_TREE_DEPTH - 1)
 #define FSM_BOTTOM_LEVEL 0
 
+/* Status codes for the local map. */
+
+/* Either already tried, or beyond the end of the relation */
+#define FSM_LOCAL_NOT_AVAIL 0x00
+
+/* Available to try */
+#define FSM_LOCAL_AVAIL		0x01
+
 /*
  * The internal FSM routines work on a logical addressing scheme. Each
  * level of the tree can be thought of as a separately addressable file.
@@ -89,6 +97,23 @@ typedef struct
 /* Address of the root page. */
 static const FSMAddress FSM_ROOT_ADDRESS = {FSM_ROOT_LEVEL, 0};
 
+/* Local map of block numbers for small heaps with no FSM. */
+typedef struct
+{
+	BlockNumber nblocks;
+	uint8		map[HEAP_FSM_CREATION_THRESHOLD];
+}			FSMLocalMap;
+
+static FSMLocalMap fsm_local_map =
+{
+	0,
+	{
+		FSM_LOCAL_NOT_AVAIL
+	}
+};
+
+#define FSM_LOCAL_MAP_EXISTS (fsm_local_map.nblocks > 0)
+
 /* functions to navigate the tree */
 static FSMAddress fsm_get_child(FSMAddress parent, uint16 slot);
 static FSMAddress fsm_get_parent(FSMAddress child, uint16 *slot);
@@ -107,10 +132,14 @@ static Size fsm_space_cat_to_avail(uint8 cat);
 /* workhorse functions for various operations */
 static int fsm_set_and_search(Relation rel, FSMAddress addr, uint16 slot,
 				   uint8 newValue, uint8 minValue);
+static void fsm_local_set(Relation rel, BlockNumber cur_nblocks);
 static BlockNumber fsm_search(Relation rel, uint8 min_cat);
+static BlockNumber fsm_local_search(void);
 static uint8 fsm_vacuum_page(Relation rel, FSMAddress addr,
 				BlockNumber start, BlockNumber end,
 				bool *eof);
+static bool fsm_allow_writes(Relation rel, BlockNumber heapblk,
+				 BlockNumber nblocks, BlockNumber *get_nblocks);
 
 
 /******** Public API ********/
@@ -127,13 +156,46 @@ static uint8 fsm_vacuum_page(Relation rel, FSMAddress addr,
  * amount of free space available on that page and then try again (see
  * RecordAndGetPageWithFreeSpace).  If InvalidBlockNumber is returned,
  * extend the relation.
+ *
+ * For very small heap relations that don't have a FSM, we try every other
+ * page before extending the relation.  To keep track of which pages have
+ * been tried, initialize a local in-memory map of pages.
  */
 BlockNumber
-GetPageWithFreeSpace(Relation rel, Size spaceNeeded)
+GetPageWithFreeSpace(Relation rel, Size spaceNeeded, bool check_fsm_only)
 {
 	uint8		min_cat = fsm_space_needed_to_cat(spaceNeeded);
+	BlockNumber target_block,
+				nblocks;
+
+	/* First try the FSM, if it exists. */
+	target_block = fsm_search(rel, min_cat);
+
+	if (target_block == InvalidBlockNumber &&
+		(rel->rd_rel->relkind == RELKIND_RELATION ||
+		 rel->rd_rel->relkind == RELKIND_TOASTVALUE) &&
+		!check_fsm_only)
+	{
+		nblocks = RelationGetNumberOfBlocks(rel);
+
+		if (nblocks > HEAP_FSM_CREATION_THRESHOLD)
+		{
+			/*
+			 * If the FSM knows nothing of the rel, try the last page before
+			 * we give up and extend.  This avoids one-tuple-per-page syndrome
+			 * during bootstrapping or in a recently-started system.
+			 */
+			target_block = nblocks - 1;
+		}
+		else if (nblocks > 0)
+		{
+			/* Create or update local map and get first candidate block. */
+			fsm_local_set(rel, nblocks);
+			target_block = fsm_local_search();
+		}
+	}
 
-	return fsm_search(rel, min_cat);
+	return target_block;
 }
 
 /*
@@ -144,16 +206,47 @@ GetPageWithFreeSpace(Relation rel, Size spaceNeeded)
  * also some effort to return a page close to the old page; if there's a
  * page with enough free space on the same FSM page where the old one page
  * is located, it is preferred.
+ *
+ * For very small heap relations that don't have a FSM, we update the local
+ * map to indicate we have tried a page, and return the next page to try.
  */
 BlockNumber
 RecordAndGetPageWithFreeSpace(Relation rel, BlockNumber oldPage,
 							  Size oldSpaceAvail, Size spaceNeeded)
 {
-	int			old_cat = fsm_space_avail_to_cat(oldSpaceAvail);
-	int			search_cat = fsm_space_needed_to_cat(spaceNeeded);
+	int			old_cat;
+	int			search_cat;
 	FSMAddress	addr;
 	uint16		slot;
 	int			search_slot;
+	BlockNumber nblocks = InvalidBlockNumber;
+
+	/* First try the local map, if it exists. */
+	if (FSM_LOCAL_MAP_EXISTS)
+	{
+		Assert((rel->rd_rel->relkind == RELKIND_RELATION ||
+				rel->rd_rel->relkind == RELKIND_TOASTVALUE) &&
+			   fsm_local_map.map[oldPage] == FSM_LOCAL_AVAIL);
+
+		fsm_local_map.map[oldPage] = FSM_LOCAL_NOT_AVAIL;
+		return fsm_local_search();
+	}
+
+	if (!fsm_allow_writes(rel, oldPage, InvalidBlockNumber, &nblocks))
+	{
+		/*
+		 * If we have neither a local map nor a FSM, we probably just tried
+		 * the target block in the smgr relation entry and failed, so we'll
+		 * need to create the local map.
+		 */
+		fsm_local_set(rel, nblocks);
+		return fsm_local_search();
+	}
+
+	/* Normal FSM logic follows */
+
+	old_cat = fsm_space_avail_to_cat(oldSpaceAvail);
+	search_cat = fsm_space_needed_to_cat(spaceNeeded);
 
 	/* Get the location of the FSM byte representing the heap block */
 	addr = fsm_get_location(oldPage, &slot);
@@ -176,21 +269,45 @@ RecordAndGetPageWithFreeSpace(Relation rel, BlockNumber oldPage,
  * Note that if the new spaceAvail value is higher than the old value stored
  * in the FSM, the space might not become visible to searchers until the next
  * FreeSpaceMapVacuum call, which updates the upper level pages.
+ *
+ * Callers have no need for a local map.
  */
 void
-RecordPageWithFreeSpace(Relation rel, BlockNumber heapBlk, Size spaceAvail)
+RecordPageWithFreeSpace(Relation rel, BlockNumber heapBlk,
+						Size spaceAvail, BlockNumber nblocks)
 {
-	int			new_cat = fsm_space_avail_to_cat(spaceAvail);
+	int			new_cat;
 	FSMAddress	addr;
 	uint16		slot;
+	BlockNumber dummy;
+
+	if (!fsm_allow_writes(rel, heapBlk, nblocks, &dummy))
+		/* No FSM to update and no local map either */
+		return;
 
 	/* Get the location of the FSM byte representing the heap block */
 	addr = fsm_get_location(heapBlk, &slot);
 
+	new_cat = fsm_space_avail_to_cat(spaceAvail);
 	fsm_set_and_search(rel, addr, slot, new_cat, 0);
 }
 
 /*
+ * Clear the local map.  We must call this when we have found a block with
+ * enough free space, when we extend the relation, or on transaction abort.
+ */
+void
+FSMClearLocalMap(void)
+{
+	if (FSM_LOCAL_MAP_EXISTS)
+	{
+		fsm_local_map.nblocks = 0;
+		memset(&fsm_local_map.map, FSM_LOCAL_NOT_AVAIL,
+			   sizeof(fsm_local_map.map));
+	}
+}
+
+/*
  * XLogRecordPageWithFreeSpace - like RecordPageWithFreeSpace, for use in
  *		WAL replay
  */
@@ -204,6 +321,31 @@ XLogRecordPageWithFreeSpace(RelFileNode rnode, BlockNumber heapBlk,
 	BlockNumber blkno;
 	Buffer		buf;
 	Page		page;
+	bool		write_to_fsm;
+
+	/* This is meant to mirror the logic in fsm_allow_writes() */
+	if (heapBlk >= HEAP_FSM_CREATION_THRESHOLD)
+		write_to_fsm = true;
+	else
+	{
+		/* Open the relation at smgr level */
+		SMgrRelation smgr = smgropen(rnode, InvalidBackendId);
+
+		if (smgrexists(smgr, FSM_FORKNUM))
+			write_to_fsm = true;
+		else
+		{
+			BlockNumber heap_nblocks = smgrnblocks(smgr, MAIN_FORKNUM);
+
+			if (heap_nblocks > HEAP_FSM_CREATION_THRESHOLD)
+				write_to_fsm = true;
+			else
+				write_to_fsm = false;
+		}
+	}
+
+	if (!write_to_fsm)
+		return;
 
 	/* Get the location of the FSM byte representing the heap block */
 	addr = fsm_get_location(heapBlk, &slot);
@@ -904,3 +1046,134 @@ fsm_vacuum_page(Relation rel, FSMAddress addr,
 
 	return max_avail;
 }
+
+/*
+ * For heaps, we prevent creation of the FSM unless the number of pages
+ * exceeds HEAP_FSM_CREATION_THRESHOLD.  For tables that don't already have
+ * a FSM, this will save an inode and a few kB of space.
+ *
+ * XXX The API is a little awkward -- if the caller passes a valid nblocks
+ * value, it can avoid invoking a system call.  If the caller passes
+ * InvalidBlockNumber and receives a false return value, it can get an
+ * up-to-date relation size from get_nblocks.  This saves a few cycles in
+ * the caller, which would otherwise need to get the relation size by itself.
+ */
+static bool
+fsm_allow_writes(Relation rel, BlockNumber heapblk,
+				 BlockNumber nblocks, BlockNumber *get_nblocks)
+{
+	bool		skip_get_nblocks;
+
+	if (heapblk >= HEAP_FSM_CREATION_THRESHOLD)
+		return true;
+
+	/* Non-heap rels can always create a FSM. */
+	if (rel->rd_rel->relkind != RELKIND_RELATION &&
+		rel->rd_rel->relkind != RELKIND_TOASTVALUE)
+		return true;
+
+	/*
+	 * If the caller knows nblocks, we can avoid a system call later. If it
+	 * doesn't, maybe we have relpages from a previous VACUUM. Since the table
+	 * may have extended since then, we still have to count the pages later if
+	 * we can't return now.
+	 */
+	if (nblocks != InvalidBlockNumber)
+	{
+		if (nblocks > HEAP_FSM_CREATION_THRESHOLD)
+			return true;
+		else
+			skip_get_nblocks = true;
+	}
+	else
+	{
+		if (rel->rd_rel->relpages != InvalidBlockNumber &&
+			rel->rd_rel->relpages > HEAP_FSM_CREATION_THRESHOLD)
+			return true;
+		else
+			skip_get_nblocks = false;
+	}
+
+	RelationOpenSmgr(rel);
+	if (smgrexists(rel->rd_smgr, FSM_FORKNUM))
+		return true;
+
+	if (skip_get_nblocks)
+		return false;
+
+	/* last resort */
+	*get_nblocks = RelationGetNumberOfBlocks(rel);
+	if (*get_nblocks > HEAP_FSM_CREATION_THRESHOLD)
+		return true;
+	else
+		return false;
+}
+
+/*
+ * Initialize or update the local map of blocks to try, for when there is
+ * no FSM.
+ *
+ * When we initialize the map, the whole heap is potentially available to
+ * try.  Testing revealed that trying every block can cause a small
+ * performance dip compared to when we use a FSM, so we try every other
+ * block instead.
+ */
+static void
+fsm_local_set(Relation rel, BlockNumber cur_nblocks)
+{
+	BlockNumber blkno,
+				cached_target_block;
+
+	/* The local map must not be set already. */
+	Assert(!FSM_LOCAL_MAP_EXISTS);
+
+	/*
+	 * Starting at the current last block in the relation and working
+	 * backwards, mark alternating blocks as available.
+	 */
+	blkno = cur_nblocks - 1;
+	while (true)
+	{
+		fsm_local_map.map[blkno] = FSM_LOCAL_AVAIL;
+		if (blkno >= 2)
+			blkno -= 2;
+		else
+			break;
+	}
+
+	/* Cache the number of blocks. */
+	fsm_local_map.nblocks = cur_nblocks;
+
+	/* Set the status of the cached target block to 'unavailable'. */
+	cached_target_block = RelationGetTargetBlock(rel);
+	if (cached_target_block != InvalidBlockNumber &&
+		cached_target_block < cur_nblocks)
+		fsm_local_map.map[cached_target_block] = FSM_LOCAL_NOT_AVAIL;
+}
+
+/*
+ * Search the local map for an available block to try, in descending order.
+ * As such, there is no heuristic available to decide which order will be
+ * better to try, but the probability of having space in the last block in the
+ * map is higher because that is the most recent block added to the heap.
+ *
+ * This function is used when there is no FSM.
+ */
+static BlockNumber
+fsm_local_search(void)
+{
+	BlockNumber target_block;
+
+	/* Local map must be set by now. */
+	Assert(FSM_LOCAL_MAP_EXISTS);
+
+	target_block = fsm_local_map.nblocks;
+	do
+	{
+		target_block--;
+		if (fsm_local_map.map[target_block] == FSM_LOCAL_AVAIL)
+			return target_block;
+	} while (target_block > 0);
+
+	return InvalidBlockNumber;
+}
diff --git a/src/backend/storage/freespace/indexfsm.c b/src/backend/storage/freespace/indexfsm.c
index 58cedea..9d8f43d 100644
--- a/src/backend/storage/freespace/indexfsm.c
+++ b/src/backend/storage/freespace/indexfsm.c
@@ -37,7 +37,7 @@
 BlockNumber
 GetFreeIndexPage(Relation rel)
 {
-	BlockNumber blkno = GetPageWithFreeSpace(rel, BLCKSZ / 2);
+	BlockNumber blkno = GetPageWithFreeSpace(rel, BLCKSZ / 2, true);
 
 	if (blkno != InvalidBlockNumber)
 		RecordUsedIndexPage(rel, blkno);
@@ -51,7 +51,7 @@ GetFreeIndexPage(Relation rel)
 void
 RecordFreeIndexPage(Relation rel, BlockNumber freeBlock)
 {
-	RecordPageWithFreeSpace(rel, freeBlock, BLCKSZ - 1);
+	RecordPageWithFreeSpace(rel, freeBlock, BLCKSZ - 1, InvalidBlockNumber);
 }
 
 
@@ -61,7 +61,7 @@ RecordFreeIndexPage(Relation rel, BlockNumber freeBlock)
 void
 RecordUsedIndexPage(Relation rel, BlockNumber usedBlock)
 {
-	RecordPageWithFreeSpace(rel, usedBlock, 0);
+	RecordPageWithFreeSpace(rel, usedBlock, 0, InvalidBlockNumber);
 }
 
 /*
diff --git a/src/include/storage/freespace.h b/src/include/storage/freespace.h
index 8b00033..dbaae65 100644
--- a/src/include/storage/freespace.h
+++ b/src/include/storage/freespace.h
@@ -18,15 +18,20 @@
 #include "storage/relfilenode.h"
 #include "utils/relcache.h"
 
+/* Only create the FSM if the heap has greater than this many blocks */
+#define HEAP_FSM_CREATION_THRESHOLD 4
+
 /* prototypes for public functions in freespace.c */
 extern Size GetRecordedFreeSpace(Relation rel, BlockNumber heapBlk);
-extern BlockNumber GetPageWithFreeSpace(Relation rel, Size spaceNeeded);
+extern BlockNumber GetPageWithFreeSpace(Relation rel, Size spaceNeeded,
+					 bool check_fsm_only);
 extern BlockNumber RecordAndGetPageWithFreeSpace(Relation rel,
 							  BlockNumber oldPage,
 							  Size oldSpaceAvail,
 							  Size spaceNeeded);
 extern void RecordPageWithFreeSpace(Relation rel, BlockNumber heapBlk,
-						Size spaceAvail);
+						Size spaceAvail, BlockNumber nblocks);
+extern void FSMClearLocalMap(void);
 extern void XLogRecordPageWithFreeSpace(RelFileNode rnode, BlockNumber heapBlk,
 							Size spaceAvail);
 
diff --git a/src/test/regress/expected/fsm.out b/src/test/regress/expected/fsm.out
new file mode 100644
index 0000000..b029931
--- /dev/null
+++ b/src/test/regress/expected/fsm.out
@@ -0,0 +1,48 @@
+--
+-- Free Space Map test
+--
+CREATE TABLE fsm_check_size (num int, str text);
+-- With one block, there should be no FSM
+INSERT INTO fsm_check_size VALUES(1, 'a');
+VACUUM fsm_check_size;
+SELECT pg_relation_size('fsm_check_size', 'main') AS heap_size,
+pg_relation_size('fsm_check_size', 'fsm') AS fsm_size;
+ heap_size | fsm_size 
+-----------+----------
+      8192 |        0
+(1 row)
+
+-- Extend table with enough blocks to exceed the FSM threshold
+DO $$
+DECLARE curtid tid;
+num int;
+BEGIN
+num = 11;
+  LOOP
+    INSERT INTO fsm_check_size VALUES (num, 'b') RETURNING ctid INTO curtid;
+    EXIT WHEN curtid >= tid '(4, 0)';
+    num = num + 1;
+  END LOOP;
+END;
+$$;
+VACUUM fsm_check_size;
+SELECT pg_relation_size('fsm_check_size', 'fsm') AS fsm_size;
+ fsm_size 
+----------
+    24576
+(1 row)
+
+-- Add long random string to extend TOAST table to 1 block
+INSERT INTO fsm_check_size
+VALUES(0, (SELECT string_agg(md5(chr(i)), '')
+		   FROM generate_series(1,100) i));
+VACUUM fsm_check_size;
+SELECT pg_relation_size(reltoastrelid, 'main') AS toast_size,
+pg_relation_size(reltoastrelid, 'fsm') AS toast_fsm_size
+FROM pg_class WHERE relname = 'fsm_check_size';
+ toast_size | toast_fsm_size 
+------------+----------------
+       8192 |              0
+(1 row)
+
+DROP TABLE fsm_check_size;
diff --git a/src/test/regress/parallel_schedule b/src/test/regress/parallel_schedule
index cc0bbf5..4051a4a 100644
--- a/src/test/regress/parallel_schedule
+++ b/src/test/regress/parallel_schedule
@@ -69,6 +69,12 @@ test: create_aggregate create_function_3 create_cast constraints triggers inheri
 test: sanity_check
 
 # ----------
+# fsm does a delete followed by vacuum, and running it in parallel can prevent
+# removal of rows.
+# ----------
+test: fsm
+
+# ----------
 # Believe it or not, select creates a table, subsequent
 # tests need.
 # ----------
diff --git a/src/test/regress/serial_schedule b/src/test/regress/serial_schedule
index 0c10c71..ac1ea62 100644
--- a/src/test/regress/serial_schedule
+++ b/src/test/regress/serial_schedule
@@ -80,6 +80,7 @@ test: roleattributes
 test: create_am
 test: hash_func
 test: sanity_check
+test: fsm
 test: errors
 test: select
 test: select_into
diff --git a/src/test/regress/sql/fsm.sql b/src/test/regress/sql/fsm.sql
new file mode 100644
index 0000000..332c3e2
--- /dev/null
+++ b/src/test/regress/sql/fsm.sql
@@ -0,0 +1,41 @@
+--
+-- Free Space Map test
+--
+
+CREATE TABLE fsm_check_size (num int, str text);
+
+-- With one block, there should be no FSM
+INSERT INTO fsm_check_size VALUES(1, 'a');
+
+VACUUM fsm_check_size;
+SELECT pg_relation_size('fsm_check_size', 'main') AS heap_size,
+pg_relation_size('fsm_check_size', 'fsm') AS fsm_size;
+
+-- Extend table with enough blocks to exceed the FSM threshold
+DO $$
+DECLARE curtid tid;
+num int;
+BEGIN
+num = 11;
+  LOOP
+    INSERT INTO fsm_check_size VALUES (num, 'b') RETURNING ctid INTO curtid;
+    EXIT WHEN curtid >= tid '(4, 0)';
+    num = num + 1;
+  END LOOP;
+END;
+$$;
+
+VACUUM fsm_check_size;
+SELECT pg_relation_size('fsm_check_size', 'fsm') AS fsm_size;
+
+-- Add long random string to extend TOAST table to 1 block
+INSERT INTO fsm_check_size
+VALUES(0, (SELECT string_agg(md5(chr(i)), '')
+		   FROM generate_series(1,100) i));
+
+VACUUM fsm_check_size;
+SELECT pg_relation_size(reltoastrelid, 'main') AS toast_size,
+pg_relation_size(reltoastrelid, 'fsm') AS toast_fsm_size
+FROM pg_class WHERE relname = 'fsm_check_size';
+
+DROP TABLE fsm_check_size;
-- 
1.8.3.1

#121Amit Kapila
amit.kapila16@gmail.com
In reply to: John Naylor (#119)
Re: WIP: Avoid creation of the free space map for small tables

On Thu, Jan 31, 2019 at 2:12 PM John Naylor <john.naylor@2ndquadrant.com> wrote:

On Thu, Jan 31, 2019 at 6:41 AM Amit Kapila <amit.kapila16@gmail.com> wrote:

On Wed, Jan 30, 2019 at 10:41 PM Masahiko Sawada <sawada.mshk@gmail.com> wrote:

The modified page.sql test could fail if the block size is more than
8kB?

That's right, but I don't think current regression tests will work for
block size greater than 8KB. I have tried with 16 and 32 as block
size, there were few failures on the head itself.

We can ensure the number of pages are more than 4 by checking it
and adding more data if no enough but I'm really not sure we should
care the bigger-block size cases.

Yeah, I am not sure either. I think as this is an existing test, we
should not try to change it too much. However, if both you and John
feel it is better to change, we can go with that.

I have an idea -- instead of adding a bunch of records and hoping that
the relation size and free space is consistent across platforms, how
about we revert to the original test input, and add a BRIN index? That
should have a FSM even with one record.

Why would BRIN index allow having FSM for heap relation?

--
With Regards,
Amit Kapila.
EnterpriseDB: http://www.enterprisedb.com

#122John Naylor
john.naylor@2ndquadrant.com
In reply to: Amit Kapila (#121)
Re: WIP: Avoid creation of the free space map for small tables

On Thu, Jan 31, 2019 at 1:43 PM Amit Kapila <amit.kapila16@gmail.com> wrote:

I have an idea -- instead of adding a bunch of records and hoping that
the relation size and free space is consistent across platforms, how
about we revert to the original test input, and add a BRIN index? That
should have a FSM even with one record.

Why would BRIN index allow having FSM for heap relation?

Oops, I forgot this file is for testing heaps only. That said, we
could possibly put most of the FSM tests such as

SELECT * FROM fsm_page_contents(get_raw_page('test_rel_forks', 'fsm', 0));

into brin.sql since we know a non-empty BRIN index will have a FSM.
And in page.sql we could just have a test that the table has no FSM.

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

#123John Naylor
john.naylor@2ndquadrant.com
In reply to: John Naylor (#122)
2 attachment(s)
Re: WIP: Avoid creation of the free space map for small tables

On Thu, Jan 31, 2019 at 1:52 PM John Naylor <john.naylor@2ndquadrant.com> wrote:

On Thu, Jan 31, 2019 at 1:43 PM Amit Kapila <amit.kapila16@gmail.com> wrote:

I have an idea -- instead of adding a bunch of records and hoping that
the relation size and free space is consistent across platforms, how
about we revert to the original test input, and add a BRIN index? That
should have a FSM even with one record.

Why would BRIN index allow having FSM for heap relation?

Oops, I forgot this file is for testing heaps only. That said, we
could possibly put most of the FSM tests such as

SELECT * FROM fsm_page_contents(get_raw_page('test_rel_forks', 'fsm', 0));

into brin.sql since we know a non-empty BRIN index will have a FSM.

As in the attached. Applies on top of v20. First to revert to HEAD,
second to move FSM tests to brin.sql. This is a much less invasive and
more readable patch, in addition to being hopefully more portable.

And in page.sql we could just have a test that the table has no FSM.

This is not possible, since we don't know the relfilenode for the
error text, and it's not important. Better to have everything in
brin.sql.

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

Attachments:

revert-pageinspect.patchtext/x-patch; charset=US-ASCII; name=revert-pageinspect.patchDownload
commit 18b444cdfc2c50502389b84f4504ec9c7f2ab831
Author: John Naylor <jcnaylor@gmail.com>
Date:   Thu Jan 31 14:20:14 2019 +0100

    revert contrib so I can redo

diff --git a/contrib/pageinspect/expected/page.out b/contrib/pageinspect/expected/page.out
index 89b73ca991..3fcd9fbe6d 100644
--- a/contrib/pageinspect/expected/page.out
+++ b/contrib/pageinspect/expected/page.out
@@ -1,69 +1,48 @@
 CREATE EXTENSION pageinspect;
-CREATE TABLE test_rel_forks (a int);
--- Make sure there are enough blocks in the heap for the FSM to be created.
-INSERT INTO test_rel_forks SELECT i from generate_series(1,2000) i;
--- set up FSM and VM
-VACUUM test_rel_forks;
+CREATE TABLE test1 (a int, b int);
+INSERT INTO test1 VALUES (16777217, 131584);
+VACUUM test1;  -- set up FSM
 -- The page contents can vary, so just test that it can be read
 -- successfully, but don't keep the output.
-SELECT octet_length(get_raw_page('test_rel_forks', 'main', 0)) AS main_0;
+SELECT octet_length(get_raw_page('test1', 'main', 0)) AS main_0;
  main_0 
 --------
    8192
 (1 row)
 
-SELECT octet_length(get_raw_page('test_rel_forks', 'main', 100)) AS main_100;
-ERROR:  block number 100 is out of range for relation "test_rel_forks"
-SELECT octet_length(get_raw_page('test_rel_forks', 'fsm', 0)) AS fsm_0;
+SELECT octet_length(get_raw_page('test1', 'main', 1)) AS main_1;
+ERROR:  block number 1 is out of range for relation "test1"
+SELECT octet_length(get_raw_page('test1', 'fsm', 0)) AS fsm_0;
  fsm_0 
 -------
   8192
 (1 row)
 
-SELECT octet_length(get_raw_page('test_rel_forks', 'fsm', 20)) AS fsm_20;
-ERROR:  block number 20 is out of range for relation "test_rel_forks"
-SELECT octet_length(get_raw_page('test_rel_forks', 'vm', 0)) AS vm_0;
+SELECT octet_length(get_raw_page('test1', 'fsm', 1)) AS fsm_1;
+ fsm_1 
+-------
+  8192
+(1 row)
+
+SELECT octet_length(get_raw_page('test1', 'vm', 0)) AS vm_0;
  vm_0 
 ------
  8192
 (1 row)
 
-SELECT octet_length(get_raw_page('test_rel_forks', 'vm', 1)) AS vm_1;
-ERROR:  block number 1 is out of range for relation "test_rel_forks"
+SELECT octet_length(get_raw_page('test1', 'vm', 1)) AS vm_1;
+ERROR:  block number 1 is out of range for relation "test1"
 SELECT octet_length(get_raw_page('xxx', 'main', 0));
 ERROR:  relation "xxx" does not exist
-SELECT octet_length(get_raw_page('test_rel_forks', 'xxx', 0));
+SELECT octet_length(get_raw_page('test1', 'xxx', 0));
 ERROR:  invalid fork name
 HINT:  Valid fork names are "main", "fsm", "vm", and "init".
-SELECT * FROM fsm_page_contents(get_raw_page('test_rel_forks', 'fsm', 0));
- fsm_page_contents 
--------------------
- 0: 39            +
- 1: 39            +
- 3: 39            +
- 7: 39            +
- 15: 39           +
- 31: 39           +
- 63: 39           +
- 127: 39          +
- 255: 39          +
- 511: 39          +
- 1023: 39         +
- 2047: 39         +
- 4095: 39         +
- fp_next_slot: 0  +
- 
-(1 row)
-
-SELECT get_raw_page('test_rel_forks', 0) = get_raw_page('test_rel_forks', 'main', 0);
+SELECT get_raw_page('test1', 0) = get_raw_page('test1', 'main', 0);
  ?column? 
 ----------
  t
 (1 row)
 
-DROP TABLE test_rel_forks;
-CREATE TABLE test1 (a int, b int);
-INSERT INTO test1 VALUES (16777217, 131584);
 SELECT pagesize, version FROM page_header(get_raw_page('test1', 0));
  pagesize | version 
 ----------+---------
@@ -83,6 +62,26 @@ SELECT tuple_data_split('test1'::regclass, t_data, t_infomask, t_infomask2, t_bi
  {"\\x01000001","\\x00020200"}
 (1 row)
 
+SELECT * FROM fsm_page_contents(get_raw_page('test1', 'fsm', 0));
+ fsm_page_contents 
+-------------------
+ 0: 254           +
+ 1: 254           +
+ 3: 254           +
+ 7: 254           +
+ 15: 254          +
+ 31: 254          +
+ 63: 254          +
+ 127: 254         +
+ 255: 254         +
+ 511: 254         +
+ 1023: 254        +
+ 2047: 254        +
+ 4095: 254        +
+ fp_next_slot: 0  +
+ 
+(1 row)
+
 DROP TABLE test1;
 -- check that using any of these functions with a partitioned table or index
 -- would fail
diff --git a/contrib/pageinspect/sql/page.sql b/contrib/pageinspect/sql/page.sql
index 67166ef54c..8ac9991837 100644
--- a/contrib/pageinspect/sql/page.sql
+++ b/contrib/pageinspect/sql/page.sql
@@ -1,35 +1,26 @@
 CREATE EXTENSION pageinspect;
 
-CREATE TABLE test_rel_forks (a int);
--- Make sure there are enough blocks in the heap for the FSM to be created.
-INSERT INTO test_rel_forks SELECT i from generate_series(1,2000) i;
+CREATE TABLE test1 (a int, b int);
+INSERT INTO test1 VALUES (16777217, 131584);
 
--- set up FSM and VM
-VACUUM test_rel_forks;
+VACUUM test1;  -- set up FSM
 
 -- The page contents can vary, so just test that it can be read
 -- successfully, but don't keep the output.
 
-SELECT octet_length(get_raw_page('test_rel_forks', 'main', 0)) AS main_0;
-SELECT octet_length(get_raw_page('test_rel_forks', 'main', 100)) AS main_100;
+SELECT octet_length(get_raw_page('test1', 'main', 0)) AS main_0;
+SELECT octet_length(get_raw_page('test1', 'main', 1)) AS main_1;
 
-SELECT octet_length(get_raw_page('test_rel_forks', 'fsm', 0)) AS fsm_0;
-SELECT octet_length(get_raw_page('test_rel_forks', 'fsm', 20)) AS fsm_20;
+SELECT octet_length(get_raw_page('test1', 'fsm', 0)) AS fsm_0;
+SELECT octet_length(get_raw_page('test1', 'fsm', 1)) AS fsm_1;
 
-SELECT octet_length(get_raw_page('test_rel_forks', 'vm', 0)) AS vm_0;
-SELECT octet_length(get_raw_page('test_rel_forks', 'vm', 1)) AS vm_1;
+SELECT octet_length(get_raw_page('test1', 'vm', 0)) AS vm_0;
+SELECT octet_length(get_raw_page('test1', 'vm', 1)) AS vm_1;
 
 SELECT octet_length(get_raw_page('xxx', 'main', 0));
-SELECT octet_length(get_raw_page('test_rel_forks', 'xxx', 0));
-
-SELECT * FROM fsm_page_contents(get_raw_page('test_rel_forks', 'fsm', 0));
-
-SELECT get_raw_page('test_rel_forks', 0) = get_raw_page('test_rel_forks', 'main', 0);
+SELECT octet_length(get_raw_page('test1', 'xxx', 0));
 
-DROP TABLE test_rel_forks;
-
-CREATE TABLE test1 (a int, b int);
-INSERT INTO test1 VALUES (16777217, 131584);
+SELECT get_raw_page('test1', 0) = get_raw_page('test1', 'main', 0);
 
 SELECT pagesize, version FROM page_header(get_raw_page('test1', 0));
 
@@ -38,6 +29,8 @@ SELECT page_checksum(get_raw_page('test1', 0), 0) IS NOT NULL AS silly_checksum_
 SELECT tuple_data_split('test1'::regclass, t_data, t_infomask, t_infomask2, t_bits)
     FROM heap_page_items(get_raw_page('test1', 0));
 
+SELECT * FROM fsm_page_contents(get_raw_page('test1', 'fsm', 0));
+
 DROP TABLE test1;
 
 -- check that using any of these functions with a partitioned table or index
move-pageinspect-fsm-tests-to-brin.patchtext/x-patch; charset=US-ASCII; name=move-pageinspect-fsm-tests-to-brin.patchDownload
commit 6c400b26128216953db962cb7698691dd04ee3bf
Author: John Naylor <jcnaylor@gmail.com>
Date:   Thu Jan 31 14:47:02 2019 +0100

    put FSM tests in brin.sql

diff --git a/contrib/pageinspect/expected/brin.out b/contrib/pageinspect/expected/brin.out
index 71eb190380..ef1304bdef 100644
--- a/contrib/pageinspect/expected/brin.out
+++ b/contrib/pageinspect/expected/brin.out
@@ -1,6 +1,7 @@
 CREATE TABLE test1 (a int, b text);
 INSERT INTO test1 VALUES (1, 'one');
 CREATE INDEX test1_a_idx ON test1 USING brin (a);
+VACUUM test1;  -- set up FSM
 SELECT brin_page_type(get_raw_page('test1_a_idx', 0));
  brin_page_type 
 ----------------
@@ -48,4 +49,39 @@ SELECT * FROM brin_page_items(get_raw_page('test1_a_idx', 2), 'test1_a_idx')
           1 |      0 |      1 | f        | f        | f           | {1 .. 1}
 (1 row)
 
+-- FSM tests
+-- These are here rather than in page.sql since BRIN indexes don't have a
+-- minimum threshold size to have a FSM
+SELECT octet_length(get_raw_page('test1_a_idx', 'fsm', 0)) AS fsm_0;
+ fsm_0 
+-------
+  8192
+(1 row)
+
+SELECT octet_length(get_raw_page('test1_a_idx', 'fsm', 1)) AS fsm_1;
+ fsm_1 
+-------
+  8192
+(1 row)
+
+SELECT * FROM fsm_page_contents(get_raw_page('test1_a_idx', 'fsm', 0));
+ fsm_page_contents 
+-------------------
+ 0: 254           +
+ 1: 254           +
+ 3: 254           +
+ 7: 254           +
+ 15: 254          +
+ 31: 254          +
+ 63: 254          +
+ 127: 254         +
+ 255: 254         +
+ 511: 254         +
+ 1023: 254        +
+ 2047: 254        +
+ 4095: 254        +
+ fp_next_slot: 0  +
+ 
+(1 row)
+
 DROP TABLE test1;
diff --git a/contrib/pageinspect/expected/page.out b/contrib/pageinspect/expected/page.out
index 3fcd9fbe6d..afa5f9fce2 100644
--- a/contrib/pageinspect/expected/page.out
+++ b/contrib/pageinspect/expected/page.out
@@ -1,7 +1,9 @@
 CREATE EXTENSION pageinspect;
 CREATE TABLE test1 (a int, b int);
 INSERT INTO test1 VALUES (16777217, 131584);
-VACUUM test1;  -- set up FSM
+-- set up VM
+-- Note: This heap is too small to have a FSM, so FSM tests are in brin.sql
+VACUUM test1;
 -- The page contents can vary, so just test that it can be read
 -- successfully, but don't keep the output.
 SELECT octet_length(get_raw_page('test1', 'main', 0)) AS main_0;
@@ -12,18 +14,6 @@ SELECT octet_length(get_raw_page('test1', 'main', 0)) AS main_0;
 
 SELECT octet_length(get_raw_page('test1', 'main', 1)) AS main_1;
 ERROR:  block number 1 is out of range for relation "test1"
-SELECT octet_length(get_raw_page('test1', 'fsm', 0)) AS fsm_0;
- fsm_0 
--------
-  8192
-(1 row)
-
-SELECT octet_length(get_raw_page('test1', 'fsm', 1)) AS fsm_1;
- fsm_1 
--------
-  8192
-(1 row)
-
 SELECT octet_length(get_raw_page('test1', 'vm', 0)) AS vm_0;
  vm_0 
 ------
@@ -62,26 +52,6 @@ SELECT tuple_data_split('test1'::regclass, t_data, t_infomask, t_infomask2, t_bi
  {"\\x01000001","\\x00020200"}
 (1 row)
 
-SELECT * FROM fsm_page_contents(get_raw_page('test1', 'fsm', 0));
- fsm_page_contents 
--------------------
- 0: 254           +
- 1: 254           +
- 3: 254           +
- 7: 254           +
- 15: 254          +
- 31: 254          +
- 63: 254          +
- 127: 254         +
- 255: 254         +
- 511: 254         +
- 1023: 254        +
- 2047: 254        +
- 4095: 254        +
- fp_next_slot: 0  +
- 
-(1 row)
-
 DROP TABLE test1;
 -- check that using any of these functions with a partitioned table or index
 -- would fail
diff --git a/contrib/pageinspect/sql/brin.sql b/contrib/pageinspect/sql/brin.sql
index 735bc3b673..a3bd93582d 100644
--- a/contrib/pageinspect/sql/brin.sql
+++ b/contrib/pageinspect/sql/brin.sql
@@ -1,6 +1,7 @@
 CREATE TABLE test1 (a int, b text);
 INSERT INTO test1 VALUES (1, 'one');
 CREATE INDEX test1_a_idx ON test1 USING brin (a);
+VACUUM test1;  -- set up FSM
 
 SELECT brin_page_type(get_raw_page('test1_a_idx', 0));
 SELECT brin_page_type(get_raw_page('test1_a_idx', 1));
@@ -15,4 +16,11 @@ SELECT * FROM brin_revmap_data(get_raw_page('test1_a_idx', 1)) LIMIT 5;
 SELECT * FROM brin_page_items(get_raw_page('test1_a_idx', 2), 'test1_a_idx')
     ORDER BY blknum, attnum LIMIT 5;
 
+-- FSM tests
+-- These are here rather than in page.sql since BRIN indexes don't have a
+-- minimum threshold size to have a FSM
+SELECT octet_length(get_raw_page('test1_a_idx', 'fsm', 0)) AS fsm_0;
+SELECT octet_length(get_raw_page('test1_a_idx', 'fsm', 1)) AS fsm_1;
+SELECT * FROM fsm_page_contents(get_raw_page('test1_a_idx', 'fsm', 0));
+
 DROP TABLE test1;
diff --git a/contrib/pageinspect/sql/page.sql b/contrib/pageinspect/sql/page.sql
index 8ac9991837..4b8c1190ab 100644
--- a/contrib/pageinspect/sql/page.sql
+++ b/contrib/pageinspect/sql/page.sql
@@ -3,7 +3,9 @@ CREATE EXTENSION pageinspect;
 CREATE TABLE test1 (a int, b int);
 INSERT INTO test1 VALUES (16777217, 131584);
 
-VACUUM test1;  -- set up FSM
+-- set up VM
+-- Note: This heap is too small to have a FSM, so FSM tests are in brin.sql
+VACUUM test1;
 
 -- The page contents can vary, so just test that it can be read
 -- successfully, but don't keep the output.
@@ -11,9 +13,6 @@ VACUUM test1;  -- set up FSM
 SELECT octet_length(get_raw_page('test1', 'main', 0)) AS main_0;
 SELECT octet_length(get_raw_page('test1', 'main', 1)) AS main_1;
 
-SELECT octet_length(get_raw_page('test1', 'fsm', 0)) AS fsm_0;
-SELECT octet_length(get_raw_page('test1', 'fsm', 1)) AS fsm_1;
-
 SELECT octet_length(get_raw_page('test1', 'vm', 0)) AS vm_0;
 SELECT octet_length(get_raw_page('test1', 'vm', 1)) AS vm_1;
 
@@ -29,8 +28,6 @@ SELECT page_checksum(get_raw_page('test1', 0), 0) IS NOT NULL AS silly_checksum_
 SELECT tuple_data_split('test1'::regclass, t_data, t_infomask, t_infomask2, t_bits)
     FROM heap_page_items(get_raw_page('test1', 0));
 
-SELECT * FROM fsm_page_contents(get_raw_page('test1', 'fsm', 0));
-
 DROP TABLE test1;
 
 -- check that using any of these functions with a partitioned table or index
#124Masahiko Sawada
sawada.mshk@gmail.com
In reply to: Amit Kapila (#117)
Re: WIP: Avoid creation of the free space map for small tables

On Thu, Jan 31, 2019 at 6:41 AM Amit Kapila <amit.kapila16@gmail.com> wrote:

On Wed, Jan 30, 2019 at 10:41 PM Masahiko Sawada <sawada.mshk@gmail.com> wrote:

On Wed, Jan 30, 2019 at 4:33 AM Amit Kapila <amit.kapila16@gmail.com> wrote:

On Tue, Jan 29, 2019 at 8:12 PM John Naylor <john.naylor@2ndquadrant.com> wrote:

On Tue, Jan 29, 2019 at 11:56 AM Amit Kapila <amit.kapila16@gmail.com> wrote:

You can find this change in attached patch. Then, I ran the make
check in src/bin/pgbench multiple times using test_conc_insert.sh.
You can vary the number of times the test should run, if you are not
able to reproduce it with this.

The attached patch (clear_local_map_if_exists_1.patch) atop the main
patch fixes the issue for me. Kindly verify the same.

I got one failure in 50 runs. With the new patch, I didn't get any
failures in 300 runs.

Thanks for verification. I have included it in the attached patch and
I have also modified the page.sql test to have enough number of pages
in relation so that FSM will get created irrespective of alignment
boundaries. Masahiko San, can you verify if this now works for you?

Thank you for updating the patch!

The modified page.sql test could fail if the block size is more than
8kB?

That's right, but I don't think current regression tests will work for
block size greater than 8KB. I have tried with 16 and 32 as block
size, there were few failures on the head itself.

Understood. That means that no build farm configures other block size than 8kB.

We can ensure the number of pages are more than 4 by checking it
and adding more data if no enough but I'm really not sure we should
care the bigger-block size cases.

Yeah, I am not sure either. I think as this is an existing test, we
should not try to change it too much. However, if both you and John
feel it is better to change, we can go with that.

So I think the patch you proposed looks good to me but how about
adding the check whether the table is more than 4 pages? For example,

SELECT (pg_relation_size('test_rel_forks') /
current_setting('block_size')::int) > 4;

Regards,

--
Masahiko Sawada
NIPPON TELEGRAPH AND TELEPHONE CORPORATION
NTT Open Source Software Center

#125Amit Kapila
amit.kapila16@gmail.com
In reply to: John Naylor (#123)
Re: WIP: Avoid creation of the free space map for small tables

On Thu, Jan 31, 2019 at 7:23 PM John Naylor <john.naylor@2ndquadrant.com> wrote:

On Thu, Jan 31, 2019 at 1:52 PM John Naylor <john.naylor@2ndquadrant.com> wrote:

On Thu, Jan 31, 2019 at 1:43 PM Amit Kapila <amit.kapila16@gmail.com> wrote:

I have an idea -- instead of adding a bunch of records and hoping that
the relation size and free space is consistent across platforms, how
about we revert to the original test input, and add a BRIN index? That
should have a FSM even with one record.

Why would BRIN index allow having FSM for heap relation?

Oops, I forgot this file is for testing heaps only. That said, we
could possibly put most of the FSM tests such as

SELECT * FROM fsm_page_contents(get_raw_page('test_rel_forks', 'fsm', 0));

into brin.sql since we know a non-empty BRIN index will have a FSM.

As in the attached. Applies on top of v20. First to revert to HEAD,
second to move FSM tests to brin.sql. This is a much less invasive and
more readable patch, in addition to being hopefully more portable.

I don't think that moving fsm tests to brin would be a good approach.
We want to have a separate test for each access method. I think if we
want to do something to avoid portability issues, maybe we can do what
Masahiko San has just suggested. OTOH, I think we are just good w.r.t
this issue with the last patch I sent. I think unless we see some
problem here, we should put energy into having a reproducible test for
the fourth problem mentioned in my mail up thread [1]/messages/by-id/CAA4eK1L=qWp_bJ5aTc9+fy4Ewx2LPaLWY-RbR4a60g_rupCKnQ@mail.gmail.com. Do you think
it makes sense to run make check in loop for multiple times or do you
have any idea how we can have a reproducible test?

[1]: /messages/by-id/CAA4eK1L=qWp_bJ5aTc9+fy4Ewx2LPaLWY-RbR4a60g_rupCKnQ@mail.gmail.com

--
With Regards,
Amit Kapila.
EnterpriseDB: http://www.enterprisedb.com

#126John Naylor
john.naylor@2ndquadrant.com
In reply to: Amit Kapila (#125)
Re: WIP: Avoid creation of the free space map for small tables

On Thu, Jan 31, 2019 at 4:06 PM Amit Kapila <amit.kapila16@gmail.com> wrote:

I don't think that moving fsm tests to brin would be a good approach.
We want to have a separate test for each access method. I think if we
want to do something to avoid portability issues, maybe we can do what
Masahiko San has just suggested.

We could also use the same plpgsql loop as in fsm.sql to check the ctid, right?

OTOH, I think we are just good w.r.t
this issue with the last patch I sent. I think unless we see some
problem here, we should put energy into having a reproducible test for
the fourth problem mentioned in my mail up thread [1]. Do you think
it makes sense to run make check in loop for multiple times or do you
have any idea how we can have a reproducible test?

Okay. Earlier I tried running make installcheck with
force_parallel_mode='regress', but didn't get a failure. I may not
have run enough times, though. I'll have to think about how to induce
it.

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

#127Amit Kapila
amit.kapila16@gmail.com
In reply to: John Naylor (#126)
Re: WIP: Avoid creation of the free space map for small tables

On Thu, Jan 31, 2019 at 9:18 PM John Naylor <john.naylor@2ndquadrant.com> wrote:

On Thu, Jan 31, 2019 at 4:06 PM Amit Kapila <amit.kapila16@gmail.com> wrote:

I don't think that moving fsm tests to brin would be a good approach.
We want to have a separate test for each access method. I think if we
want to do something to avoid portability issues, maybe we can do what
Masahiko San has just suggested.

We could also use the same plpgsql loop as in fsm.sql to check the ctid, right?

Yes, however, I feel we should leave it as it is for now unless we see
any risk of portability issues. The only reason to do that way is to
avoid any failure for bigger block size (say BLCKSZ is 16KB or 32KB).
Does anyone else have any opinion on whether we should try to write
tests which should care for bigger block size? I see that existing
regression tests fail if we configure with bigger block size, so not
sure if we should try to avoid that here. In an ideal scenario, I
think it would be good if we can write tests which pass on all kind of
block sizes, that will make the life easier if tomorrow one wants to
set up a buildfarm or do the testing for bigger block sizes.

OTOH, I think we are just good w.r.t
this issue with the last patch I sent. I think unless we see some
problem here, we should put energy into having a reproducible test for
the fourth problem mentioned in my mail up thread [1]. Do you think
it makes sense to run make check in loop for multiple times or do you
have any idea how we can have a reproducible test?

Okay. Earlier I tried running make installcheck with
force_parallel_mode='regress', but didn't get a failure.

AFAICS, this failure was not for force_parallel_mode='regress'. See
the config at [1]https://buildfarm.postgresql.org/cgi-bin/show_log.pl?nm=jacana&amp;dt=2019-01-28%2004%3A00%3A23.

I may not
have run enough times, though.

Yeah, probably running make check or make installcheck many times
would help, but not sure.

I'll have to think about how to induce
it.

Thanks!

[1]: https://buildfarm.postgresql.org/cgi-bin/show_log.pl?nm=jacana&amp;dt=2019-01-28%2004%3A00%3A23

--
With Regards,
Amit Kapila.
EnterpriseDB: http://www.enterprisedb.com

#128Amit Kapila
amit.kapila16@gmail.com
In reply to: Amit Kapila (#102)
Re: WIP: Avoid creation of the free space map for small tables

On Mon, Jan 28, 2019 at 4:40 PM Amit Kapila <amit.kapila16@gmail.com> wrote:

On Mon, Jan 28, 2019 at 10:03 AM John Naylor
<john.naylor@2ndquadrant.com> wrote:

On Mon, Jan 28, 2019 at 4:53 AM Amit Kapila <amit.kapila16@gmail.com> wrote:

There are a few buildfarm failures due to this commit, see my email on
pgsql-committers. If you have time, you can also once look into
those.

I didn't see anything in common with the configs of the failed
members. None have a non-default BLCKSZ that I can see.

I have done an analysis of the different failures on buildfarm.

In the past few days, we have done a further analysis of each problem
and tried to reproduce it. We are successful in generating some form
of reproducer for 3 out of 4 problems in the same way as it was failed
in the buildfarm. For the fourth symptom, we have tried a lot (even
Andrew Dunstan has helped us to run the regression tests with the
faulty commit on Jacana for many hours, but it didn't got reproduced)
but not able to regenerate a failure in a similar way. However, I
have a theory as mentioned below why the particular test could fail
and the fix for the same is done in the patch. I am planning to push
the latest version of the patch [1]/messages/by-id/CAA4eK1+3ajhRPC0jvUi6p_aMrTUpB568OBH10LrbHtvOLNTgqQ@mail.gmail.com which has fixes for all the
symptoms. Does anybody have any opinion here?

4.  Failure on jacana:
--- c:/mingw/msys/1.0/home/pgrunner/bf/root/HEAD/pgsql.build/../pgsql/src/test/regress/expected/box.out
2018-09-26
17:53:33 -0400
+++ c:/mingw/msys/1.0/home/pgrunner/bf/root/HEAD/pgsql.build/src/test/regress/results/box.out
2019-01-27 23:14:35
-0500
@@ -252,332 +252,7 @@
('(0,100)(0,infinity)'),
('(-infinity,0)(0,infinity)'),
('(-infinity,-infinity)(infinity,infinity)');
-SET enable_seqscan = false;
-SELECT * FROM box_temp WHERE f1 << '(10,20),(30,40)';
..
..
TRAP: FailedAssertion("!(!(fsm_local_map.nblocks > 0))", File:
"c:/mingw/msys/1.0/home/pgrunner/bf/root/HEAD/pgsql.build/../pgsql/src/backend/storage/freespace/freespace.c",
Line:
1118)
..
2019-01-27 23:14:35.495 EST [5c4e81a0.2e28:4] LOG:  server process
(PID 14388) exited with exit code 3
2019-01-27 23:14:35.495 EST [5c4e81a0.2e28:5] DETAIL:  Failed process
was running: INSERT INTO box_temp
VALUES (NULL),

I think the reason for this failure is same as previous (as mentioned
in point-3), but this can happen in a different way. Say, we have
searched the local map and then try to extend a relation 'X' and in
the meantime, another backend has extended such that it creates FSM.
Now, we will reuse that page and won't clear local map. Now, say we
try to insert in relation 'Y' which doesn't have FSM. It will try to
set the local map and will find that it already exists, so will fail.
Now, the question is how it can happen in this box.sql test. I guess
that is happening for some system table which is being populated by
Create Index statement executed just before the failing Insert.

I think both 3 and 4 are timing issues, so we didn't got in our local
regression runs.

[1]: /messages/by-id/CAA4eK1+3ajhRPC0jvUi6p_aMrTUpB568OBH10LrbHtvOLNTgqQ@mail.gmail.com

--
With Regards,
Amit Kapila.
EnterpriseDB: http://www.enterprisedb.com

#129Amit Kapila
amit.kapila16@gmail.com
In reply to: Amit Kapila (#128)
Re: WIP: Avoid creation of the free space map for small tables

On Sat, Feb 2, 2019 at 7:30 AM Amit Kapila <amit.kapila16@gmail.com> wrote:

On Mon, Jan 28, 2019 at 4:40 PM Amit Kapila <amit.kapila16@gmail.com> wrote:

On Mon, Jan 28, 2019 at 10:03 AM John Naylor
<john.naylor@2ndquadrant.com> wrote:

In the past few days, we have done a further analysis of each problem
and tried to reproduce it. We are successful in generating some form
of reproducer for 3 out of 4 problems in the same way as it was failed
in the buildfarm. For the fourth symptom, we have tried a lot (even
Andrew Dunstan has helped us to run the regression tests with the
faulty commit on Jacana for many hours, but it didn't got reproduced)
but not able to regenerate a failure in a similar way. However, I
have a theory as mentioned below why the particular test could fail
and the fix for the same is done in the patch. I am planning to push
the latest version of the patch [1] which has fixes for all the
symptoms.

Today, I have spent some more time to generate a test which can
reproduce the failure though it is with the help of breakpoints. See
below:

4.  Failure on jacana:
--- c:/mingw/msys/1.0/home/pgrunner/bf/root/HEAD/pgsql.build/../pgsql/src/test/regress/expected/box.out
2018-09-26
17:53:33 -0400
+++ c:/mingw/msys/1.0/home/pgrunner/bf/root/HEAD/pgsql.build/src/test/regress/results/box.out
2019-01-27 23:14:35
-0500
@@ -252,332 +252,7 @@
('(0,100)(0,infinity)'),
('(-infinity,0)(0,infinity)'),
('(-infinity,-infinity)(infinity,infinity)');
-SET enable_seqscan = false;
-SELECT * FROM box_temp WHERE f1 << '(10,20),(30,40)';
..
..
TRAP: FailedAssertion("!(!(fsm_local_map.nblocks > 0))", File:
"c:/mingw/msys/1.0/home/pgrunner/bf/root/HEAD/pgsql.build/../pgsql/src/backend/storage/freespace/freespace.c",
Line:
1118)
..
2019-01-27 23:14:35.495 EST [5c4e81a0.2e28:4] LOG:  server process
(PID 14388) exited with exit code 3
2019-01-27 23:14:35.495 EST [5c4e81a0.2e28:5] DETAIL:  Failed process
was running: INSERT INTO box_temp
VALUES (NULL),

I think the reason for this failure is same as previous (as mentioned
in point-3), but this can happen in a different way. Say, we have
searched the local map and then try to extend a relation 'X' and in
the meantime, another backend has extended such that it creates FSM.
Now, we will reuse that page and won't clear local map. Now, say we
try to insert in relation 'Y' which doesn't have FSM. It will try to
set the local map and will find that it already exists, so will fail.
Now, the question is how it can happen in this box.sql test. I guess
that is happening for some system table which is being populated by
Create Index statement executed just before the failing Insert.

Based on the above theory, the test is as below:

Session-1
---------------
postgres=# create table test_1(c1 int, c2 char(1500));
CREATE TABLE
postgres=# create table test_2(c1 int, c2 char(1500));
CREATE TABLE
postgres=# insert into test_1 values(generate_series(1,20),'aaaa');
INSERT 0 20
postgres=# insert into test_2 values(1,'aaaa');
INSERT 0 1

Session-2
----------------
postgres=# analyze test_1;
ANALYZE
postgres=# analyze test_2;
ANALYZE
postgres=# select oid, relname, relpages from pg_class where relname
like 'test%';
oid | relname | relpages
-------+----------------+----------
41835 | test_1 | 4
41838 | test_2 | 1

Till here we can see that test_1 has 4 pages and test2_1 has 1 page.
At this stage, even one more record insertion in test_1 will create a
new page. So, now we have to hit the scenario with the help of
debugger. For session-1, attach debugger and put breakpoint in
RelationGetBufferForTuple().

Session-1
----------------
postgres=# insert into test_1 values(21,'aaaa');

It will hit the breakpoint in RelationGetBufferForTuple(). Now, add
one more breakpoint on line 542 in hio.c, aka below line:
RelationGetBufferForTuple
{
..
else if (!ConditionalLockRelationForExtension(relation, ExclusiveLock))

Press continue and stop the debugger at line 542. Attach the debugger
for session-2 and add a breakpoint on line 580 in hio.c, aka below
line:
RelationGetBufferForTuple
{
..
buffer = ReadBufferBI(relation, P_NEW, bistate);

Session-2
---------------
postgres=# insert into test_1 values(22,'aaaa');

It will hit the breakpoint in RelationGetBufferForTuple(). Now
proceed with debugging on session-1 by one step. This is to ensure
that session-1 doesn't get a conditional lock. Now, continue the
debugger in session-2 and after that run vacuum test_1 from session-2,
this will ensure that FSM is created for relation test_1. So the
state of session-2 will be as below:

Session-2
----------------
postgres=# insert into test_1 values(22,'aaaa');
INSERT 0 1
postgres=# vacuum test_1;
VACUUM
postgres=# select oid, relname, relpages from pg_class where relname
like 'test%';
oid | relname | relpages
-------+----------------+----------
41835 | test_1 | 5
41838 | test_2 | 1

Continue the debugger in session-1. Now insert one row in test_2 from
session-1 and kaboom:

Session-1
---------------
postgres=# insert into test_2 values(2,'aaaa');
server closed the connection unexpectedly
This probably means the server terminated abnormally
before or while processing the request.
The connection to the server was lost. Attempting reset: Failed.
!>

Server logs is as below:
TRAP: FailedAssertion("!(!(fsm_local_map.nblocks > 0))", File:
"..\postgresql\src\backend\storage\freespace\freespace.c",
Line: 1118)
2019-02-02 16:48:06.216 IST [4044] LOG: server process (PID 3540)
exited with exit code 3
2019-02-02 16:48:06.216 IST [4044] DETAIL: Failed process was
running: insert into test_2 values(2,'aaaa');

This looks exactly the same as the failure in Jacana.

The patch fixes this case.

--
With Regards,
Amit Kapila.
EnterpriseDB: http://www.enterprisedb.com

#130Amit Kapila
amit.kapila16@gmail.com
In reply to: Amit Kapila (#120)
1 attachment(s)
Re: WIP: Avoid creation of the free space map for small tables

On Thu, Jan 31, 2019 at 6:03 PM Amit Kapila <amit.kapila16@gmail.com> wrote:

On Thu, Jan 31, 2019 at 2:02 PM John Naylor <john.naylor@2ndquadrant.com> wrote:

FYI, the second comment is still present in v20.

oops, forgot to include in commit after making a change, done now.

This doesn't get applied cleanly after recent commit 0d1fe9f74e.
Attached is a rebased version. I have checked once that the changes
done by 0d1fe9f74e don't impact this patch. John, see if you can also
once confirm whether the recent commit (0d1fe9f74e) has any impact. I
am planning to push this tomorrow morning (IST) unless you or anyone
see any problem with this.

--
With Regards,
Amit Kapila.
EnterpriseDB: http://www.enterprisedb.com

Attachments:

v22-0001-Avoid-creation-of-the-free-space-map-for-small-heap-.patchapplication/octet-stream; name=v22-0001-Avoid-creation-of-the-free-space-map-for-small-heap-.patchDownload
From ea2cf081575a5ef21dba588916c4bbad0073c351 Mon Sep 17 00:00:00 2001
From: Amit Kapila <akapila@postgresql.org>
Date: Sun, 3 Feb 2019 18:06:37 +0530
Subject: [PATCH] Avoid creation of the free space map for small heap
 relations.

Previously, all heaps had FSMs. For very small tables, this means that the
FSM took up more space than the heap did. This is wasteful, so now we
refrain from creating the FSM for heaps with 4 pages or fewer. If the last
known target block has insufficient space, we still try to insert into some
other page before giving up and extending the relation, since doing
otherwise leads to table bloat. Testing showed that trying every page
penalized performance slightly, so we compromise and try every other page.
This way, we visit at most two pages. Any pages with wasted free space
become visible at next relation extension, so we still control table bloat.
As a bonus, directly attempting one or two pages can even be faster than
consulting the FSM would have been.

Once the FSM is created for a heap we don't remove it even if somebody
deletes all the rows from the corresponding relation.  We don't think it is
a useful optimization as it is quite likely that relation will again grow
to the same size.

Author: John Naylor with design inputs and some code contribution by Amit Kapila
Reviewed-by: Amit Kapila
Tested-by: Mithun C Y
Discussion: https://www.postgresql.org/message-id/CAJVSVGWvB13PzpbLEecFuGFc5V2fsO736BsdTakPiPAcdMM5tQ@mail.gmail.com
---
 contrib/pageinspect/expected/page.out     |  77 ++++----
 contrib/pageinspect/sql/page.sql          |  33 ++--
 doc/src/sgml/storage.sgml                 |  13 +-
 src/backend/access/brin/brin.c            |   2 +-
 src/backend/access/brin/brin_pageops.c    |  10 +-
 src/backend/access/heap/hio.c             |  45 +++--
 src/backend/access/heap/vacuumlazy.c      |  17 +-
 src/backend/access/transam/xact.c         |  14 ++
 src/backend/storage/freespace/README      |  38 +++-
 src/backend/storage/freespace/freespace.c | 285 +++++++++++++++++++++++++++++-
 src/backend/storage/freespace/indexfsm.c  |   6 +-
 src/include/storage/freespace.h           |   9 +-
 src/test/regress/expected/fsm.out         |  48 +++++
 src/test/regress/parallel_schedule        |   6 +
 src/test/regress/serial_schedule          |   1 +
 src/test/regress/sql/fsm.sql              |  41 +++++
 16 files changed, 543 insertions(+), 102 deletions(-)
 create mode 100644 src/test/regress/expected/fsm.out
 create mode 100644 src/test/regress/sql/fsm.sql

diff --git a/contrib/pageinspect/expected/page.out b/contrib/pageinspect/expected/page.out
index 3fcd9fb..89b73ca 100644
--- a/contrib/pageinspect/expected/page.out
+++ b/contrib/pageinspect/expected/page.out
@@ -1,48 +1,69 @@
 CREATE EXTENSION pageinspect;
-CREATE TABLE test1 (a int, b int);
-INSERT INTO test1 VALUES (16777217, 131584);
-VACUUM test1;  -- set up FSM
+CREATE TABLE test_rel_forks (a int);
+-- Make sure there are enough blocks in the heap for the FSM to be created.
+INSERT INTO test_rel_forks SELECT i from generate_series(1,2000) i;
+-- set up FSM and VM
+VACUUM test_rel_forks;
 -- The page contents can vary, so just test that it can be read
 -- successfully, but don't keep the output.
-SELECT octet_length(get_raw_page('test1', 'main', 0)) AS main_0;
+SELECT octet_length(get_raw_page('test_rel_forks', 'main', 0)) AS main_0;
  main_0 
 --------
    8192
 (1 row)
 
-SELECT octet_length(get_raw_page('test1', 'main', 1)) AS main_1;
-ERROR:  block number 1 is out of range for relation "test1"
-SELECT octet_length(get_raw_page('test1', 'fsm', 0)) AS fsm_0;
+SELECT octet_length(get_raw_page('test_rel_forks', 'main', 100)) AS main_100;
+ERROR:  block number 100 is out of range for relation "test_rel_forks"
+SELECT octet_length(get_raw_page('test_rel_forks', 'fsm', 0)) AS fsm_0;
  fsm_0 
 -------
   8192
 (1 row)
 
-SELECT octet_length(get_raw_page('test1', 'fsm', 1)) AS fsm_1;
- fsm_1 
--------
-  8192
-(1 row)
-
-SELECT octet_length(get_raw_page('test1', 'vm', 0)) AS vm_0;
+SELECT octet_length(get_raw_page('test_rel_forks', 'fsm', 20)) AS fsm_20;
+ERROR:  block number 20 is out of range for relation "test_rel_forks"
+SELECT octet_length(get_raw_page('test_rel_forks', 'vm', 0)) AS vm_0;
  vm_0 
 ------
  8192
 (1 row)
 
-SELECT octet_length(get_raw_page('test1', 'vm', 1)) AS vm_1;
-ERROR:  block number 1 is out of range for relation "test1"
+SELECT octet_length(get_raw_page('test_rel_forks', 'vm', 1)) AS vm_1;
+ERROR:  block number 1 is out of range for relation "test_rel_forks"
 SELECT octet_length(get_raw_page('xxx', 'main', 0));
 ERROR:  relation "xxx" does not exist
-SELECT octet_length(get_raw_page('test1', 'xxx', 0));
+SELECT octet_length(get_raw_page('test_rel_forks', 'xxx', 0));
 ERROR:  invalid fork name
 HINT:  Valid fork names are "main", "fsm", "vm", and "init".
-SELECT get_raw_page('test1', 0) = get_raw_page('test1', 'main', 0);
+SELECT * FROM fsm_page_contents(get_raw_page('test_rel_forks', 'fsm', 0));
+ fsm_page_contents 
+-------------------
+ 0: 39            +
+ 1: 39            +
+ 3: 39            +
+ 7: 39            +
+ 15: 39           +
+ 31: 39           +
+ 63: 39           +
+ 127: 39          +
+ 255: 39          +
+ 511: 39          +
+ 1023: 39         +
+ 2047: 39         +
+ 4095: 39         +
+ fp_next_slot: 0  +
+ 
+(1 row)
+
+SELECT get_raw_page('test_rel_forks', 0) = get_raw_page('test_rel_forks', 'main', 0);
  ?column? 
 ----------
  t
 (1 row)
 
+DROP TABLE test_rel_forks;
+CREATE TABLE test1 (a int, b int);
+INSERT INTO test1 VALUES (16777217, 131584);
 SELECT pagesize, version FROM page_header(get_raw_page('test1', 0));
  pagesize | version 
 ----------+---------
@@ -62,26 +83,6 @@ SELECT tuple_data_split('test1'::regclass, t_data, t_infomask, t_infomask2, t_bi
  {"\\x01000001","\\x00020200"}
 (1 row)
 
-SELECT * FROM fsm_page_contents(get_raw_page('test1', 'fsm', 0));
- fsm_page_contents 
--------------------
- 0: 254           +
- 1: 254           +
- 3: 254           +
- 7: 254           +
- 15: 254          +
- 31: 254          +
- 63: 254          +
- 127: 254         +
- 255: 254         +
- 511: 254         +
- 1023: 254        +
- 2047: 254        +
- 4095: 254        +
- fp_next_slot: 0  +
- 
-(1 row)
-
 DROP TABLE test1;
 -- check that using any of these functions with a partitioned table or index
 -- would fail
diff --git a/contrib/pageinspect/sql/page.sql b/contrib/pageinspect/sql/page.sql
index 8ac9991..67166ef 100644
--- a/contrib/pageinspect/sql/page.sql
+++ b/contrib/pageinspect/sql/page.sql
@@ -1,26 +1,35 @@
 CREATE EXTENSION pageinspect;
 
-CREATE TABLE test1 (a int, b int);
-INSERT INTO test1 VALUES (16777217, 131584);
+CREATE TABLE test_rel_forks (a int);
+-- Make sure there are enough blocks in the heap for the FSM to be created.
+INSERT INTO test_rel_forks SELECT i from generate_series(1,2000) i;
 
-VACUUM test1;  -- set up FSM
+-- set up FSM and VM
+VACUUM test_rel_forks;
 
 -- The page contents can vary, so just test that it can be read
 -- successfully, but don't keep the output.
 
-SELECT octet_length(get_raw_page('test1', 'main', 0)) AS main_0;
-SELECT octet_length(get_raw_page('test1', 'main', 1)) AS main_1;
+SELECT octet_length(get_raw_page('test_rel_forks', 'main', 0)) AS main_0;
+SELECT octet_length(get_raw_page('test_rel_forks', 'main', 100)) AS main_100;
 
-SELECT octet_length(get_raw_page('test1', 'fsm', 0)) AS fsm_0;
-SELECT octet_length(get_raw_page('test1', 'fsm', 1)) AS fsm_1;
+SELECT octet_length(get_raw_page('test_rel_forks', 'fsm', 0)) AS fsm_0;
+SELECT octet_length(get_raw_page('test_rel_forks', 'fsm', 20)) AS fsm_20;
 
-SELECT octet_length(get_raw_page('test1', 'vm', 0)) AS vm_0;
-SELECT octet_length(get_raw_page('test1', 'vm', 1)) AS vm_1;
+SELECT octet_length(get_raw_page('test_rel_forks', 'vm', 0)) AS vm_0;
+SELECT octet_length(get_raw_page('test_rel_forks', 'vm', 1)) AS vm_1;
 
 SELECT octet_length(get_raw_page('xxx', 'main', 0));
-SELECT octet_length(get_raw_page('test1', 'xxx', 0));
+SELECT octet_length(get_raw_page('test_rel_forks', 'xxx', 0));
+
+SELECT * FROM fsm_page_contents(get_raw_page('test_rel_forks', 'fsm', 0));
+
+SELECT get_raw_page('test_rel_forks', 0) = get_raw_page('test_rel_forks', 'main', 0);
 
-SELECT get_raw_page('test1', 0) = get_raw_page('test1', 'main', 0);
+DROP TABLE test_rel_forks;
+
+CREATE TABLE test1 (a int, b int);
+INSERT INTO test1 VALUES (16777217, 131584);
 
 SELECT pagesize, version FROM page_header(get_raw_page('test1', 0));
 
@@ -29,8 +38,6 @@ SELECT page_checksum(get_raw_page('test1', 0), 0) IS NOT NULL AS silly_checksum_
 SELECT tuple_data_split('test1'::regclass, t_data, t_infomask, t_infomask2, t_bits)
     FROM heap_page_items(get_raw_page('test1', 0));
 
-SELECT * FROM fsm_page_contents(get_raw_page('test1', 'fsm', 0));
-
 DROP TABLE test1;
 
 -- check that using any of these functions with a partitioned table or index
diff --git a/doc/src/sgml/storage.sgml b/doc/src/sgml/storage.sgml
index 8ef2ac8..cbdad0c 100644
--- a/doc/src/sgml/storage.sgml
+++ b/doc/src/sgml/storage.sgml
@@ -590,12 +590,13 @@ tuple would otherwise be too big.
 <indexterm><primary>FSM</primary><see>Free Space Map</see></indexterm>
 
 <para>
-Each heap and index relation, except for hash indexes, has a Free Space Map
-(FSM) to keep track of available space in the relation. It's stored
-alongside the main relation data in a separate relation fork, named after the
-filenode number of the relation, plus a <literal>_fsm</literal> suffix. For example,
-if the filenode of a relation is 12345, the FSM is stored in a file called
-<filename>12345_fsm</filename>, in the same directory as the main relation file.
+Each heap relation, unless it is very small, and each index relation, except
+for hash indexes, has a Free Space Map (FSM) to keep track of available
+space in the relation. It's stored alongside the main relation data in a
+separate relation fork, named after the filenode number of the relation, plus
+a <literal>_fsm</literal> suffix. For example, if the filenode of a relation
+is 12345, the FSM is stored in a file called <filename>12345_fsm</filename>,
+in the same directory as the main relation file.
 </para>
 
 <para>
diff --git a/src/backend/access/brin/brin.c b/src/backend/access/brin/brin.c
index 467d91e..8f008dd 100644
--- a/src/backend/access/brin/brin.c
+++ b/src/backend/access/brin/brin.c
@@ -1150,7 +1150,7 @@ terminate_brin_buildstate(BrinBuildState *state)
 		freespace = PageGetFreeSpace(page);
 		blk = BufferGetBlockNumber(state->bs_currentInsertBuf);
 		ReleaseBuffer(state->bs_currentInsertBuf);
-		RecordPageWithFreeSpace(state->bs_irel, blk, freespace);
+		RecordPageWithFreeSpace(state->bs_irel, blk, freespace, InvalidBlockNumber);
 		FreeSpaceMapVacuumRange(state->bs_irel, blk, blk + 1);
 	}
 
diff --git a/src/backend/access/brin/brin_pageops.c b/src/backend/access/brin/brin_pageops.c
index 164a468..2eb354f 100644
--- a/src/backend/access/brin/brin_pageops.c
+++ b/src/backend/access/brin/brin_pageops.c
@@ -310,7 +310,7 @@ brin_doupdate(Relation idxrel, BlockNumber pagesPerRange,
 
 		if (extended)
 		{
-			RecordPageWithFreeSpace(idxrel, newblk, freespace);
+			RecordPageWithFreeSpace(idxrel, newblk, freespace, InvalidBlockNumber);
 			FreeSpaceMapVacuumRange(idxrel, newblk, newblk + 1);
 		}
 
@@ -461,7 +461,7 @@ brin_doinsert(Relation idxrel, BlockNumber pagesPerRange,
 
 	if (extended)
 	{
-		RecordPageWithFreeSpace(idxrel, blk, freespace);
+		RecordPageWithFreeSpace(idxrel, blk, freespace, InvalidBlockNumber);
 		FreeSpaceMapVacuumRange(idxrel, blk, blk + 1);
 	}
 
@@ -654,7 +654,7 @@ brin_page_cleanup(Relation idxrel, Buffer buf)
 
 	/* Measure free space and record it */
 	RecordPageWithFreeSpace(idxrel, BufferGetBlockNumber(buf),
-							br_page_get_freespace(page));
+							br_page_get_freespace(page), InvalidBlockNumber);
 }
 
 /*
@@ -703,7 +703,7 @@ brin_getinsertbuffer(Relation irel, Buffer oldbuf, Size itemsz,
 	/* Choose initial target page, re-using existing target if known */
 	newblk = RelationGetTargetBlock(irel);
 	if (newblk == InvalidBlockNumber)
-		newblk = GetPageWithFreeSpace(irel, itemsz);
+		newblk = GetPageWithFreeSpace(irel, itemsz, true);
 
 	/*
 	 * Loop until we find a page with sufficient free space.  By the time we
@@ -895,7 +895,7 @@ brin_initialize_empty_new_buffer(Relation idxrel, Buffer buffer)
 	 * pages whose FSM records were forgotten in a crash.
 	 */
 	RecordPageWithFreeSpace(idxrel, BufferGetBlockNumber(buffer),
-							br_page_get_freespace(page));
+							br_page_get_freespace(page), InvalidBlockNumber);
 }
 
 
diff --git a/src/backend/access/heap/hio.c b/src/backend/access/heap/hio.c
index d41d318..a9c8ec4 100644
--- a/src/backend/access/heap/hio.c
+++ b/src/backend/access/heap/hio.c
@@ -246,8 +246,14 @@ RelationAddExtraBlocks(Relation relation, BulkInsertState bistate)
 		 * Immediately update the bottom level of the FSM.  This has a good
 		 * chance of making this page visible to other concurrently inserting
 		 * backends, and we want that to happen without delay.
+		 *
+		 * Since we know the table will end up with extraBlocks additional
+		 * pages, we pass the final number to avoid possible unnecessary
+		 * system calls and to make sure the FSM is created when we add the
+		 * first new page.
 		 */
-		RecordPageWithFreeSpace(relation, blockNum, freespace);
+		RecordPageWithFreeSpace(relation, blockNum, freespace,
+								firstBlock + extraBlocks);
 	}
 	while (--extraBlocks > 0);
 
@@ -384,20 +390,9 @@ RelationGetBufferForTuple(Relation relation, Size len,
 		 * We have no cached target page, so ask the FSM for an initial
 		 * target.
 		 */
-		targetBlock = GetPageWithFreeSpace(relation, len + saveFreeSpace);
-
-		/*
-		 * If the FSM knows nothing of the rel, try the last page before we
-		 * give up and extend.  This avoids one-tuple-per-page syndrome during
-		 * bootstrapping or in a recently-started system.
-		 */
-		if (targetBlock == InvalidBlockNumber)
-		{
-			BlockNumber nblocks = RelationGetNumberOfBlocks(relation);
-
-			if (nblocks > 0)
-				targetBlock = nblocks - 1;
-		}
+		targetBlock = GetPageWithFreeSpace(relation,
+										   len + saveFreeSpace,
+										   false);
 	}
 
 loop:
@@ -504,6 +499,13 @@ loop:
 		{
 			/* use this page as future insert target, too */
 			RelationSetTargetBlock(relation, targetBlock);
+
+			/*
+			 * In case we used an in-memory map of available blocks, reset it
+			 * for next use.
+			 */
+			FSMClearLocalMap();
+
 			return buffer;
 		}
 
@@ -563,9 +565,12 @@ loop:
 
 			/*
 			 * Check if some other backend has extended a block for us while
-			 * we were waiting on the lock.
+			 * we were waiting on the lock.  We only check the FSM -- if there
+			 * isn't one we don't recheck the number of blocks.
 			 */
-			targetBlock = GetPageWithFreeSpace(relation, len + saveFreeSpace);
+			targetBlock = GetPageWithFreeSpace(relation,
+											   len + saveFreeSpace,
+											   true);
 
 			/*
 			 * If some other waiter has already extended the relation, we
@@ -670,5 +675,11 @@ loop:
 	 */
 	RelationSetTargetBlock(relation, BufferGetBlockNumber(buffer));
 
+	/*
+	 * In case we used an in-memory map of available blocks, reset it for next
+	 * use.
+	 */
+	FSMClearLocalMap();
+
 	return buffer;
 }
diff --git a/src/backend/access/heap/vacuumlazy.c b/src/backend/access/heap/vacuumlazy.c
index 26dfb0c..9416c31 100644
--- a/src/backend/access/heap/vacuumlazy.c
+++ b/src/backend/access/heap/vacuumlazy.c
@@ -153,7 +153,7 @@ static BufferAccessStrategy vac_strategy;
 static void lazy_scan_heap(Relation onerel, int options,
 			   LVRelStats *vacrelstats, Relation *Irel, int nindexes,
 			   bool aggressive);
-static void lazy_vacuum_heap(Relation onerel, LVRelStats *vacrelstats);
+static void lazy_vacuum_heap(Relation onerel, LVRelStats *vacrelstats, BlockNumber nblocks);
 static bool lazy_check_needs_freeze(Buffer buf, bool *hastup);
 static void lazy_vacuum_index(Relation indrel,
 				  IndexBulkDeleteResult **stats,
@@ -758,7 +758,7 @@ lazy_scan_heap(Relation onerel, int options, LVRelStats *vacrelstats,
 			pgstat_progress_update_multi_param(2, hvp_index, hvp_val);
 
 			/* Remove tuples from heap */
-			lazy_vacuum_heap(onerel, vacrelstats);
+			lazy_vacuum_heap(onerel, vacrelstats, nblocks);
 
 			/*
 			 * Forget the now-vacuumed tuples, and press on, but be careful
@@ -897,7 +897,7 @@ lazy_scan_heap(Relation onerel, int options, LVRelStats *vacrelstats,
 					Size		freespace;
 
 					freespace = BufferGetPageSize(buf) - SizeOfPageHeaderData;
-					RecordPageWithFreeSpace(onerel, blkno, freespace);
+					RecordPageWithFreeSpace(onerel, blkno, freespace, nblocks);
 				}
 			}
 			continue;
@@ -941,7 +941,7 @@ lazy_scan_heap(Relation onerel, int options, LVRelStats *vacrelstats,
 			}
 
 			UnlockReleaseBuffer(buf);
-			RecordPageWithFreeSpace(onerel, blkno, freespace);
+			RecordPageWithFreeSpace(onerel, blkno, freespace, nblocks);
 			continue;
 		}
 
@@ -1338,7 +1338,7 @@ lazy_scan_heap(Relation onerel, int options, LVRelStats *vacrelstats,
 		 * taken if there are no indexes.)
 		 */
 		if (vacrelstats->num_dead_tuples == prev_dead_count)
-			RecordPageWithFreeSpace(onerel, blkno, freespace);
+			RecordPageWithFreeSpace(onerel, blkno, freespace, nblocks);
 	}
 
 	/* report that everything is scanned and vacuumed */
@@ -1400,7 +1400,7 @@ lazy_scan_heap(Relation onerel, int options, LVRelStats *vacrelstats,
 		/* Remove tuples from heap */
 		pgstat_progress_update_param(PROGRESS_VACUUM_PHASE,
 									 PROGRESS_VACUUM_PHASE_VACUUM_HEAP);
-		lazy_vacuum_heap(onerel, vacrelstats);
+		lazy_vacuum_heap(onerel, vacrelstats, nblocks);
 		vacrelstats->num_index_scans++;
 	}
 
@@ -1471,9 +1471,10 @@ lazy_scan_heap(Relation onerel, int options, LVRelStats *vacrelstats,
  * Note: the reason for doing this as a second pass is we cannot remove
  * the tuples until we've removed their index entries, and we want to
  * process index entry removal in batches as large as possible.
+ * Note: nblocks is passed as an optimization for RecordPageWithFreeSpace().
  */
 static void
-lazy_vacuum_heap(Relation onerel, LVRelStats *vacrelstats)
+lazy_vacuum_heap(Relation onerel, LVRelStats *vacrelstats, BlockNumber nblocks)
 {
 	int			tupindex;
 	int			npages;
@@ -1510,7 +1511,7 @@ lazy_vacuum_heap(Relation onerel, LVRelStats *vacrelstats)
 		freespace = PageGetHeapFreeSpace(page);
 
 		UnlockReleaseBuffer(buf);
-		RecordPageWithFreeSpace(onerel, tblk, freespace);
+		RecordPageWithFreeSpace(onerel, tblk, freespace, nblocks);
 		npages++;
 	}
 
diff --git a/src/backend/access/transam/xact.c b/src/backend/access/transam/xact.c
index 0181976..92bda87 100644
--- a/src/backend/access/transam/xact.c
+++ b/src/backend/access/transam/xact.c
@@ -48,6 +48,7 @@
 #include "replication/walsender.h"
 #include "storage/condition_variable.h"
 #include "storage/fd.h"
+#include "storage/freespace.h"
 #include "storage/lmgr.h"
 #include "storage/predicate.h"
 #include "storage/proc.h"
@@ -2493,6 +2494,12 @@ AbortTransaction(void)
 	pgstat_report_wait_end();
 	pgstat_progress_end_command();
 
+	/*
+	 * In case we aborted during RelationGetBufferForTuple(), clear the local
+	 * map of heap pages.
+	 */
+	FSMClearLocalMap();
+
 	/* Clean up buffer I/O and buffer context locks, too */
 	AbortBufferIO();
 	UnlockBuffers();
@@ -4714,6 +4721,13 @@ AbortSubTransaction(void)
 
 	pgstat_report_wait_end();
 	pgstat_progress_end_command();
+
+	/*
+	 * In case we aborted during RelationGetBufferForTuple(), clear the local
+	 * map of heap pages.
+	 */
+	FSMClearLocalMap();
+
 	AbortBufferIO();
 	UnlockBuffers();
 
diff --git a/src/backend/storage/freespace/README b/src/backend/storage/freespace/README
index e7ff23b..0d3cd29 100644
--- a/src/backend/storage/freespace/README
+++ b/src/backend/storage/freespace/README
@@ -8,7 +8,41 @@ free space to hold a tuple to be stored; or to determine that no such page
 exists and the relation must be extended by one page.  As of PostgreSQL 8.4
 each relation has its own, extensible free space map stored in a separate
 "fork" of its relation.  This eliminates the disadvantages of the former
-fixed-size FSM.
+fixed-size FSM.  There are two exceptions:
+
+1. Hash indexes never have a FSM.
+2. For very small tables, a 3-page relation fork would be relatively large
+and wasteful, so to save space we refrain from creating the FSM if the
+heap has HEAP_FSM_CREATION_THRESHOLD pages or fewer.
+
+To locate free space in the latter case, we simply try pages directly without
+knowing ahead of time how much free space they have.  To maintain good
+performance, we create a local in-memory map of pages to try, and only mark
+every other page as available.  For example, in a 3-page heap, the local map
+would look like:
+
+ANAN
+0123
+
+Pages 0 and 2 are marked "available", and page 1 as "not available".
+Page 3 is beyond the end of the relation, so is likewise marked "not
+available".  First we try page 2, and if that doesn't have sufficient free
+space we try page 0 before giving up and extending the relation.  There may
+be some wasted free space on block 1, but if the relation extends to 4 pages:
+
+NANA
+0123
+
+We not only have the new page 3 at our disposal, we can now check page 1
+for free space as well.
+
+Once the FSM is created for a heap we don't remove it even if somebody deletes
+all the rows from the corresponding relation.  We don't think it is a useful
+optimization as it is quite likely that relation will again grow to the same
+size.
+
+FSM data structure
+------------------
 
 It is important to keep the map small so that it can be searched rapidly.
 Therefore, we don't attempt to record the exact free space on a page.
@@ -192,5 +226,3 @@ TODO
 ----
 
 - fastroot to avoid traversing upper nodes with just 1 child
-- use a different system for tables that fit into one FSM page, with a
-  mechanism to switch to the real thing as it grows.
diff --git a/src/backend/storage/freespace/freespace.c b/src/backend/storage/freespace/freespace.c
index eee8286..d3f207b 100644
--- a/src/backend/storage/freespace/freespace.c
+++ b/src/backend/storage/freespace/freespace.c
@@ -76,6 +76,14 @@
 #define FSM_ROOT_LEVEL	(FSM_TREE_DEPTH - 1)
 #define FSM_BOTTOM_LEVEL 0
 
+/* Status codes for the local map. */
+
+/* Either already tried, or beyond the end of the relation */
+#define FSM_LOCAL_NOT_AVAIL 0x00
+
+/* Available to try */
+#define FSM_LOCAL_AVAIL		0x01
+
 /*
  * The internal FSM routines work on a logical addressing scheme. Each
  * level of the tree can be thought of as a separately addressable file.
@@ -89,6 +97,23 @@ typedef struct
 /* Address of the root page. */
 static const FSMAddress FSM_ROOT_ADDRESS = {FSM_ROOT_LEVEL, 0};
 
+/* Local map of block numbers for small heaps with no FSM. */
+typedef struct
+{
+	BlockNumber nblocks;
+	uint8		map[HEAP_FSM_CREATION_THRESHOLD];
+}			FSMLocalMap;
+
+static FSMLocalMap fsm_local_map =
+{
+	0,
+	{
+		FSM_LOCAL_NOT_AVAIL
+	}
+};
+
+#define FSM_LOCAL_MAP_EXISTS (fsm_local_map.nblocks > 0)
+
 /* functions to navigate the tree */
 static FSMAddress fsm_get_child(FSMAddress parent, uint16 slot);
 static FSMAddress fsm_get_parent(FSMAddress child, uint16 *slot);
@@ -107,10 +132,14 @@ static Size fsm_space_cat_to_avail(uint8 cat);
 /* workhorse functions for various operations */
 static int fsm_set_and_search(Relation rel, FSMAddress addr, uint16 slot,
 				   uint8 newValue, uint8 minValue);
+static void fsm_local_set(Relation rel, BlockNumber cur_nblocks);
 static BlockNumber fsm_search(Relation rel, uint8 min_cat);
+static BlockNumber fsm_local_search(void);
 static uint8 fsm_vacuum_page(Relation rel, FSMAddress addr,
 				BlockNumber start, BlockNumber end,
 				bool *eof);
+static bool fsm_allow_writes(Relation rel, BlockNumber heapblk,
+				 BlockNumber nblocks, BlockNumber *get_nblocks);
 
 
 /******** Public API ********/
@@ -127,13 +156,46 @@ static uint8 fsm_vacuum_page(Relation rel, FSMAddress addr,
  * amount of free space available on that page and then try again (see
  * RecordAndGetPageWithFreeSpace).  If InvalidBlockNumber is returned,
  * extend the relation.
+ *
+ * For very small heap relations that don't have a FSM, we try every other
+ * page before extending the relation.  To keep track of which pages have
+ * been tried, initialize a local in-memory map of pages.
  */
 BlockNumber
-GetPageWithFreeSpace(Relation rel, Size spaceNeeded)
+GetPageWithFreeSpace(Relation rel, Size spaceNeeded, bool check_fsm_only)
 {
 	uint8		min_cat = fsm_space_needed_to_cat(spaceNeeded);
+	BlockNumber target_block,
+				nblocks;
+
+	/* First try the FSM, if it exists. */
+	target_block = fsm_search(rel, min_cat);
+
+	if (target_block == InvalidBlockNumber &&
+		(rel->rd_rel->relkind == RELKIND_RELATION ||
+		 rel->rd_rel->relkind == RELKIND_TOASTVALUE) &&
+		!check_fsm_only)
+	{
+		nblocks = RelationGetNumberOfBlocks(rel);
+
+		if (nblocks > HEAP_FSM_CREATION_THRESHOLD)
+		{
+			/*
+			 * If the FSM knows nothing of the rel, try the last page before
+			 * we give up and extend.  This avoids one-tuple-per-page syndrome
+			 * during bootstrapping or in a recently-started system.
+			 */
+			target_block = nblocks - 1;
+		}
+		else if (nblocks > 0)
+		{
+			/* Create or update local map and get first candidate block. */
+			fsm_local_set(rel, nblocks);
+			target_block = fsm_local_search();
+		}
+	}
 
-	return fsm_search(rel, min_cat);
+	return target_block;
 }
 
 /*
@@ -144,16 +206,47 @@ GetPageWithFreeSpace(Relation rel, Size spaceNeeded)
  * also some effort to return a page close to the old page; if there's a
  * page with enough free space on the same FSM page where the old one page
  * is located, it is preferred.
+ *
+ * For very small heap relations that don't have a FSM, we update the local
+ * map to indicate we have tried a page, and return the next page to try.
  */
 BlockNumber
 RecordAndGetPageWithFreeSpace(Relation rel, BlockNumber oldPage,
 							  Size oldSpaceAvail, Size spaceNeeded)
 {
-	int			old_cat = fsm_space_avail_to_cat(oldSpaceAvail);
-	int			search_cat = fsm_space_needed_to_cat(spaceNeeded);
+	int			old_cat;
+	int			search_cat;
 	FSMAddress	addr;
 	uint16		slot;
 	int			search_slot;
+	BlockNumber nblocks = InvalidBlockNumber;
+
+	/* First try the local map, if it exists. */
+	if (FSM_LOCAL_MAP_EXISTS)
+	{
+		Assert((rel->rd_rel->relkind == RELKIND_RELATION ||
+				rel->rd_rel->relkind == RELKIND_TOASTVALUE) &&
+			   fsm_local_map.map[oldPage] == FSM_LOCAL_AVAIL);
+
+		fsm_local_map.map[oldPage] = FSM_LOCAL_NOT_AVAIL;
+		return fsm_local_search();
+	}
+
+	if (!fsm_allow_writes(rel, oldPage, InvalidBlockNumber, &nblocks))
+	{
+		/*
+		 * If we have neither a local map nor a FSM, we probably just tried
+		 * the target block in the smgr relation entry and failed, so we'll
+		 * need to create the local map.
+		 */
+		fsm_local_set(rel, nblocks);
+		return fsm_local_search();
+	}
+
+	/* Normal FSM logic follows */
+
+	old_cat = fsm_space_avail_to_cat(oldSpaceAvail);
+	search_cat = fsm_space_needed_to_cat(spaceNeeded);
 
 	/* Get the location of the FSM byte representing the heap block */
 	addr = fsm_get_location(oldPage, &slot);
@@ -176,21 +269,45 @@ RecordAndGetPageWithFreeSpace(Relation rel, BlockNumber oldPage,
  * Note that if the new spaceAvail value is higher than the old value stored
  * in the FSM, the space might not become visible to searchers until the next
  * FreeSpaceMapVacuum call, which updates the upper level pages.
+ *
+ * Callers have no need for a local map.
  */
 void
-RecordPageWithFreeSpace(Relation rel, BlockNumber heapBlk, Size spaceAvail)
+RecordPageWithFreeSpace(Relation rel, BlockNumber heapBlk,
+						Size spaceAvail, BlockNumber nblocks)
 {
-	int			new_cat = fsm_space_avail_to_cat(spaceAvail);
+	int			new_cat;
 	FSMAddress	addr;
 	uint16		slot;
+	BlockNumber dummy;
+
+	if (!fsm_allow_writes(rel, heapBlk, nblocks, &dummy))
+		/* No FSM to update and no local map either */
+		return;
 
 	/* Get the location of the FSM byte representing the heap block */
 	addr = fsm_get_location(heapBlk, &slot);
 
+	new_cat = fsm_space_avail_to_cat(spaceAvail);
 	fsm_set_and_search(rel, addr, slot, new_cat, 0);
 }
 
 /*
+ * Clear the local map.  We must call this when we have found a block with
+ * enough free space, when we extend the relation, or on transaction abort.
+ */
+void
+FSMClearLocalMap(void)
+{
+	if (FSM_LOCAL_MAP_EXISTS)
+	{
+		fsm_local_map.nblocks = 0;
+		memset(&fsm_local_map.map, FSM_LOCAL_NOT_AVAIL,
+			   sizeof(fsm_local_map.map));
+	}
+}
+
+/*
  * XLogRecordPageWithFreeSpace - like RecordPageWithFreeSpace, for use in
  *		WAL replay
  */
@@ -204,6 +321,31 @@ XLogRecordPageWithFreeSpace(RelFileNode rnode, BlockNumber heapBlk,
 	BlockNumber blkno;
 	Buffer		buf;
 	Page		page;
+	bool		write_to_fsm;
+
+	/* This is meant to mirror the logic in fsm_allow_writes() */
+	if (heapBlk >= HEAP_FSM_CREATION_THRESHOLD)
+		write_to_fsm = true;
+	else
+	{
+		/* Open the relation at smgr level */
+		SMgrRelation smgr = smgropen(rnode, InvalidBackendId);
+
+		if (smgrexists(smgr, FSM_FORKNUM))
+			write_to_fsm = true;
+		else
+		{
+			BlockNumber heap_nblocks = smgrnblocks(smgr, MAIN_FORKNUM);
+
+			if (heap_nblocks > HEAP_FSM_CREATION_THRESHOLD)
+				write_to_fsm = true;
+			else
+				write_to_fsm = false;
+		}
+	}
+
+	if (!write_to_fsm)
+		return;
 
 	/* Get the location of the FSM byte representing the heap block */
 	addr = fsm_get_location(heapBlk, &slot);
@@ -904,3 +1046,134 @@ fsm_vacuum_page(Relation rel, FSMAddress addr,
 
 	return max_avail;
 }
+
+/*
+ * For heaps, we prevent creation of the FSM unless the number of pages
+ * exceeds HEAP_FSM_CREATION_THRESHOLD.  For tables that don't already have
+ * a FSM, this will save an inode and a few kB of space.
+ *
+ * XXX The API is a little awkward -- if the caller passes a valid nblocks
+ * value, it can avoid invoking a system call.  If the caller passes
+ * InvalidBlockNumber and receives a false return value, it can get an
+ * up-to-date relation size from get_nblocks.  This saves a few cycles in
+ * the caller, which would otherwise need to get the relation size by itself.
+ */
+static bool
+fsm_allow_writes(Relation rel, BlockNumber heapblk,
+				 BlockNumber nblocks, BlockNumber *get_nblocks)
+{
+	bool		skip_get_nblocks;
+
+	if (heapblk >= HEAP_FSM_CREATION_THRESHOLD)
+		return true;
+
+	/* Non-heap rels can always create a FSM. */
+	if (rel->rd_rel->relkind != RELKIND_RELATION &&
+		rel->rd_rel->relkind != RELKIND_TOASTVALUE)
+		return true;
+
+	/*
+	 * If the caller knows nblocks, we can avoid a system call later. If it
+	 * doesn't, maybe we have relpages from a previous VACUUM. Since the table
+	 * may have extended since then, we still have to count the pages later if
+	 * we can't return now.
+	 */
+	if (nblocks != InvalidBlockNumber)
+	{
+		if (nblocks > HEAP_FSM_CREATION_THRESHOLD)
+			return true;
+		else
+			skip_get_nblocks = true;
+	}
+	else
+	{
+		if (rel->rd_rel->relpages != InvalidBlockNumber &&
+			rel->rd_rel->relpages > HEAP_FSM_CREATION_THRESHOLD)
+			return true;
+		else
+			skip_get_nblocks = false;
+	}
+
+	RelationOpenSmgr(rel);
+	if (smgrexists(rel->rd_smgr, FSM_FORKNUM))
+		return true;
+
+	if (skip_get_nblocks)
+		return false;
+
+	/* last resort */
+	*get_nblocks = RelationGetNumberOfBlocks(rel);
+	if (*get_nblocks > HEAP_FSM_CREATION_THRESHOLD)
+		return true;
+	else
+		return false;
+}
+
+/*
+ * Initialize or update the local map of blocks to try, for when there is
+ * no FSM.
+ *
+ * When we initialize the map, the whole heap is potentially available to
+ * try.  Testing revealed that trying every block can cause a small
+ * performance dip compared to when we use a FSM, so we try every other
+ * block instead.
+ */
+static void
+fsm_local_set(Relation rel, BlockNumber cur_nblocks)
+{
+	BlockNumber blkno,
+				cached_target_block;
+
+	/* The local map must not be set already. */
+	Assert(!FSM_LOCAL_MAP_EXISTS);
+
+	/*
+	 * Starting at the current last block in the relation and working
+	 * backwards, mark alternating blocks as available.
+	 */
+	blkno = cur_nblocks - 1;
+	while (true)
+	{
+		fsm_local_map.map[blkno] = FSM_LOCAL_AVAIL;
+		if (blkno >= 2)
+			blkno -= 2;
+		else
+			break;
+	}
+
+	/* Cache the number of blocks. */
+	fsm_local_map.nblocks = cur_nblocks;
+
+	/* Set the status of the cached target block to 'unavailable'. */
+	cached_target_block = RelationGetTargetBlock(rel);
+	if (cached_target_block != InvalidBlockNumber &&
+		cached_target_block < cur_nblocks)
+		fsm_local_map.map[cached_target_block] = FSM_LOCAL_NOT_AVAIL;
+}
+
+/*
+ * Search the local map for an available block to try, in descending order.
+ * As such, there is no heuristic available to decide which order will be
+ * better to try, but the probability of having space in the last block in the
+ * map is higher because that is the most recent block added to the heap.
+ *
+ * This function is used when there is no FSM.
+ */
+static BlockNumber
+fsm_local_search(void)
+{
+	BlockNumber target_block;
+
+	/* Local map must be set by now. */
+	Assert(FSM_LOCAL_MAP_EXISTS);
+
+	target_block = fsm_local_map.nblocks;
+	do
+	{
+		target_block--;
+		if (fsm_local_map.map[target_block] == FSM_LOCAL_AVAIL)
+			return target_block;
+	} while (target_block > 0);
+
+	return InvalidBlockNumber;
+}
diff --git a/src/backend/storage/freespace/indexfsm.c b/src/backend/storage/freespace/indexfsm.c
index 58cedea..9d8f43d 100644
--- a/src/backend/storage/freespace/indexfsm.c
+++ b/src/backend/storage/freespace/indexfsm.c
@@ -37,7 +37,7 @@
 BlockNumber
 GetFreeIndexPage(Relation rel)
 {
-	BlockNumber blkno = GetPageWithFreeSpace(rel, BLCKSZ / 2);
+	BlockNumber blkno = GetPageWithFreeSpace(rel, BLCKSZ / 2, true);
 
 	if (blkno != InvalidBlockNumber)
 		RecordUsedIndexPage(rel, blkno);
@@ -51,7 +51,7 @@ GetFreeIndexPage(Relation rel)
 void
 RecordFreeIndexPage(Relation rel, BlockNumber freeBlock)
 {
-	RecordPageWithFreeSpace(rel, freeBlock, BLCKSZ - 1);
+	RecordPageWithFreeSpace(rel, freeBlock, BLCKSZ - 1, InvalidBlockNumber);
 }
 
 
@@ -61,7 +61,7 @@ RecordFreeIndexPage(Relation rel, BlockNumber freeBlock)
 void
 RecordUsedIndexPage(Relation rel, BlockNumber usedBlock)
 {
-	RecordPageWithFreeSpace(rel, usedBlock, 0);
+	RecordPageWithFreeSpace(rel, usedBlock, 0, InvalidBlockNumber);
 }
 
 /*
diff --git a/src/include/storage/freespace.h b/src/include/storage/freespace.h
index 8b00033..dbaae65 100644
--- a/src/include/storage/freespace.h
+++ b/src/include/storage/freespace.h
@@ -18,15 +18,20 @@
 #include "storage/relfilenode.h"
 #include "utils/relcache.h"
 
+/* Only create the FSM if the heap has greater than this many blocks */
+#define HEAP_FSM_CREATION_THRESHOLD 4
+
 /* prototypes for public functions in freespace.c */
 extern Size GetRecordedFreeSpace(Relation rel, BlockNumber heapBlk);
-extern BlockNumber GetPageWithFreeSpace(Relation rel, Size spaceNeeded);
+extern BlockNumber GetPageWithFreeSpace(Relation rel, Size spaceNeeded,
+					 bool check_fsm_only);
 extern BlockNumber RecordAndGetPageWithFreeSpace(Relation rel,
 							  BlockNumber oldPage,
 							  Size oldSpaceAvail,
 							  Size spaceNeeded);
 extern void RecordPageWithFreeSpace(Relation rel, BlockNumber heapBlk,
-						Size spaceAvail);
+						Size spaceAvail, BlockNumber nblocks);
+extern void FSMClearLocalMap(void);
 extern void XLogRecordPageWithFreeSpace(RelFileNode rnode, BlockNumber heapBlk,
 							Size spaceAvail);
 
diff --git a/src/test/regress/expected/fsm.out b/src/test/regress/expected/fsm.out
new file mode 100644
index 0000000..b029931
--- /dev/null
+++ b/src/test/regress/expected/fsm.out
@@ -0,0 +1,48 @@
+--
+-- Free Space Map test
+--
+CREATE TABLE fsm_check_size (num int, str text);
+-- With one block, there should be no FSM
+INSERT INTO fsm_check_size VALUES(1, 'a');
+VACUUM fsm_check_size;
+SELECT pg_relation_size('fsm_check_size', 'main') AS heap_size,
+pg_relation_size('fsm_check_size', 'fsm') AS fsm_size;
+ heap_size | fsm_size 
+-----------+----------
+      8192 |        0
+(1 row)
+
+-- Extend table with enough blocks to exceed the FSM threshold
+DO $$
+DECLARE curtid tid;
+num int;
+BEGIN
+num = 11;
+  LOOP
+    INSERT INTO fsm_check_size VALUES (num, 'b') RETURNING ctid INTO curtid;
+    EXIT WHEN curtid >= tid '(4, 0)';
+    num = num + 1;
+  END LOOP;
+END;
+$$;
+VACUUM fsm_check_size;
+SELECT pg_relation_size('fsm_check_size', 'fsm') AS fsm_size;
+ fsm_size 
+----------
+    24576
+(1 row)
+
+-- Add long random string to extend TOAST table to 1 block
+INSERT INTO fsm_check_size
+VALUES(0, (SELECT string_agg(md5(chr(i)), '')
+		   FROM generate_series(1,100) i));
+VACUUM fsm_check_size;
+SELECT pg_relation_size(reltoastrelid, 'main') AS toast_size,
+pg_relation_size(reltoastrelid, 'fsm') AS toast_fsm_size
+FROM pg_class WHERE relname = 'fsm_check_size';
+ toast_size | toast_fsm_size 
+------------+----------------
+       8192 |              0
+(1 row)
+
+DROP TABLE fsm_check_size;
diff --git a/src/test/regress/parallel_schedule b/src/test/regress/parallel_schedule
index cc0bbf5..4051a4a 100644
--- a/src/test/regress/parallel_schedule
+++ b/src/test/regress/parallel_schedule
@@ -69,6 +69,12 @@ test: create_aggregate create_function_3 create_cast constraints triggers inheri
 test: sanity_check
 
 # ----------
+# fsm does a delete followed by vacuum, and running it in parallel can prevent
+# removal of rows.
+# ----------
+test: fsm
+
+# ----------
 # Believe it or not, select creates a table, subsequent
 # tests need.
 # ----------
diff --git a/src/test/regress/serial_schedule b/src/test/regress/serial_schedule
index 0c10c71..ac1ea62 100644
--- a/src/test/regress/serial_schedule
+++ b/src/test/regress/serial_schedule
@@ -80,6 +80,7 @@ test: roleattributes
 test: create_am
 test: hash_func
 test: sanity_check
+test: fsm
 test: errors
 test: select
 test: select_into
diff --git a/src/test/regress/sql/fsm.sql b/src/test/regress/sql/fsm.sql
new file mode 100644
index 0000000..332c3e2
--- /dev/null
+++ b/src/test/regress/sql/fsm.sql
@@ -0,0 +1,41 @@
+--
+-- Free Space Map test
+--
+
+CREATE TABLE fsm_check_size (num int, str text);
+
+-- With one block, there should be no FSM
+INSERT INTO fsm_check_size VALUES(1, 'a');
+
+VACUUM fsm_check_size;
+SELECT pg_relation_size('fsm_check_size', 'main') AS heap_size,
+pg_relation_size('fsm_check_size', 'fsm') AS fsm_size;
+
+-- Extend table with enough blocks to exceed the FSM threshold
+DO $$
+DECLARE curtid tid;
+num int;
+BEGIN
+num = 11;
+  LOOP
+    INSERT INTO fsm_check_size VALUES (num, 'b') RETURNING ctid INTO curtid;
+    EXIT WHEN curtid >= tid '(4, 0)';
+    num = num + 1;
+  END LOOP;
+END;
+$$;
+
+VACUUM fsm_check_size;
+SELECT pg_relation_size('fsm_check_size', 'fsm') AS fsm_size;
+
+-- Add long random string to extend TOAST table to 1 block
+INSERT INTO fsm_check_size
+VALUES(0, (SELECT string_agg(md5(chr(i)), '')
+		   FROM generate_series(1,100) i));
+
+VACUUM fsm_check_size;
+SELECT pg_relation_size(reltoastrelid, 'main') AS toast_size,
+pg_relation_size(reltoastrelid, 'fsm') AS toast_fsm_size
+FROM pg_class WHERE relname = 'fsm_check_size';
+
+DROP TABLE fsm_check_size;
-- 
1.8.3.1

#131John Naylor
john.naylor@2ndquadrant.com
In reply to: Amit Kapila (#130)
Re: WIP: Avoid creation of the free space map for small tables

On Sun, Feb 3, 2019 at 2:06 PM Amit Kapila <amit.kapila16@gmail.com> wrote:

On Thu, Jan 31, 2019 at 6:03 PM Amit Kapila <amit.kapila16@gmail.com> wrote:
This doesn't get applied cleanly after recent commit 0d1fe9f74e.
Attached is a rebased version. I have checked once that the changes
done by 0d1fe9f74e don't impact this patch. John, see if you can also
once confirm whether the recent commit (0d1fe9f74e) has any impact. I
am planning to push this tomorrow morning (IST) unless you or anyone
see any problem with this.

Since that commit changes RelationAddExtraBlocks(), which can be
induces by your pgbench adjustment upthread, I ran make check with
that adjustment in the pgbench dir 300 times without triggering
asserts.

I also tried to follow the logic in 0d1fe9f74e, and I believe it will
be correct without a FSM.

[1]: /messages/by-id/CAA4eK1KRByXY03qR2JvUjUxKBzpBnCSO5H19oAC=_v4r5dzTwQ@mail.gmail.com

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

#132Amit Kapila
amit.kapila16@gmail.com
In reply to: John Naylor (#131)
Re: WIP: Avoid creation of the free space map for small tables

On Mon, Feb 4, 2019 at 12:39 AM John Naylor <john.naylor@2ndquadrant.com> wrote:

On Sun, Feb 3, 2019 at 2:06 PM Amit Kapila <amit.kapila16@gmail.com> wrote:

On Thu, Jan 31, 2019 at 6:03 PM Amit Kapila <amit.kapila16@gmail.com> wrote:
This doesn't get applied cleanly after recent commit 0d1fe9f74e.
Attached is a rebased version. I have checked once that the changes
done by 0d1fe9f74e don't impact this patch. John, see if you can also
once confirm whether the recent commit (0d1fe9f74e) has any impact. I
am planning to push this tomorrow morning (IST) unless you or anyone
see any problem with this.

Since that commit changes RelationAddExtraBlocks(), which can be
induces by your pgbench adjustment upthread, I ran make check with
that adjustment in the pgbench dir 300 times without triggering
asserts.

I also tried to follow the logic in 0d1fe9f74e, and I believe it will
be correct without a FSM.

I have just pushed it and buildfarm has shown two failures:

https://buildfarm.postgresql.org/cgi-bin/show_log.pl?nm=dromedary&amp;dt=2019-02-04%2002%3A27%3A26

--- /Users/buildfarm/bf-data/HEAD/pgsql.build/contrib/pageinspect/expected/page.out
2019-02-03 21:27:29.000000000 -0500
+++ /Users/buildfarm/bf-data/HEAD/pgsql.build/contrib/pageinspect/results/page.out
2019-02-03 21:41:32.000000000 -0500
@@ -38,19 +38,19 @@
 SELECT * FROM fsm_page_contents(get_raw_page('test_rel_forks', 'fsm', 0));
  fsm_page_contents
 -------------------
- 0: 39            +
- 1: 39            +
- 3: 39            +
- 7: 39            +
- 15: 39           +
- 31: 39           +
- 63: 39           +
..

This one seems to be FSM test portability issue (due to different page
contents, maybe). Looking into it, John, see if you are around and
have some thoughts on it.

2.
https://buildfarm.postgresql.org/cgi-bin/show_log.pl?nm=dory&amp;dt=2019-02-04%2002%3A30%3A25

select explain_parallel_append('execute ab_q5 (33, 44, 55)');
-                            explain_parallel_append
--------------------------------------------------------------------------------
- Finalize Aggregate (actual rows=1 loops=1)
-   ->  Gather (actual rows=3 loops=1)
-         Workers Planned: 2
-         Workers Launched: 2
-         ->  Partial Aggregate (actual rows=1 loops=3)
-               ->  Parallel Append (actual rows=0 loops=N)
-                     Subplans Removed: 8
-                     ->  Parallel Seq Scan on ab_a1_b1 (never executed)
-                           Filter: ((b < 4) AND (a = ANY (ARRAY[$1, $2, $3])))
-(9 rows)
-
+ERROR:  lost connection to parallel worker
+CONTEXT:  PL/pgSQL function explain_parallel_append(text) line 5 at
FOR over EXECUTE statement
 -- Test Parallel Append with PARAM_EXEC Params
 select explain_parallel_append('select count(*) from ab where (a =
(select 1) or a = (select 3)) and b = 2');
                          explain_parallel_append

Failure is something like:

2019-02-03 21:44:42.456 EST [2812:327] pg_regress/partition_prune LOG:
statement: select explain_parallel_append('execute ab_q5 (1, 1, 1)');
2019-02-03 21:44:42.493 EST [2812:328] pg_regress/partition_prune LOG:
statement: select explain_parallel_append('execute ab_q5 (2, 3, 3)');
2019-02-03 21:44:42.531 EST [2812:329] pg_regress/partition_prune LOG:
statement: select explain_parallel_append('execute ab_q5 (33, 44,
55)');
2019-02-04 02:44:42.552 GMT [4172] FATAL: could not reattach to
shared memory (key=00000000000001B4, addr=0000000001980000): error
code 487
2019-02-03 21:44:42.555 EST [5116:6] LOG: background worker "parallel
worker" (PID 4172) exited with exit code 1
2019-02-03 21:44:42.560 EST [2812:330] pg_regress/partition_prune
ERROR: lost connection to parallel worker

I don't think this is related to this commit.

--
With Regards,
Amit Kapila.
EnterpriseDB: http://www.enterprisedb.com

#133Amit Kapila
amit.kapila16@gmail.com
In reply to: Amit Kapila (#132)
Re: WIP: Avoid creation of the free space map for small tables

On Mon, Feb 4, 2019 at 8:47 AM Amit Kapila <amit.kapila16@gmail.com> wrote:

On Mon, Feb 4, 2019 at 12:39 AM John Naylor <john.naylor@2ndquadrant.com> wrote:

On Sun, Feb 3, 2019 at 2:06 PM Amit Kapila <amit.kapila16@gmail.com> wrote:

On Thu, Jan 31, 2019 at 6:03 PM Amit Kapila <amit.kapila16@gmail.com> wrote:
This doesn't get applied cleanly after recent commit 0d1fe9f74e.
Attached is a rebased version. I have checked once that the changes
done by 0d1fe9f74e don't impact this patch. John, see if you can also
once confirm whether the recent commit (0d1fe9f74e) has any impact. I
am planning to push this tomorrow morning (IST) unless you or anyone
see any problem with this.

Since that commit changes RelationAddExtraBlocks(), which can be
induces by your pgbench adjustment upthread, I ran make check with
that adjustment in the pgbench dir 300 times without triggering
asserts.

I also tried to follow the logic in 0d1fe9f74e, and I believe it will
be correct without a FSM.

I have just pushed it and buildfarm has shown two failures:

https://buildfarm.postgresql.org/cgi-bin/show_log.pl?nm=dromedary&amp;dt=2019-02-04%2002%3A27%3A26

--- /Users/buildfarm/bf-data/HEAD/pgsql.build/contrib/pageinspect/expected/page.out
2019-02-03 21:27:29.000000000 -0500
+++ /Users/buildfarm/bf-data/HEAD/pgsql.build/contrib/pageinspect/results/page.out
2019-02-03 21:41:32.000000000 -0500
@@ -38,19 +38,19 @@
SELECT * FROM fsm_page_contents(get_raw_page('test_rel_forks', 'fsm', 0));
fsm_page_contents
-------------------
- 0: 39            +
- 1: 39            +
- 3: 39            +
- 7: 39            +
- 15: 39           +
- 31: 39           +
- 63: 39           +
..

This one seems to be FSM test portability issue (due to different page
contents, maybe). Looking into it, John, see if you are around and
have some thoughts on it.

One more similar failure:
https://buildfarm.postgresql.org/cgi-bin/show_log.pl?nm=lapwing&amp;dt=2019-02-04%2003%3A20%3A01

So, basically, this is due to difference in the number of tuples that
can fit on a page. The freespace in FSM for the page is shown
different because of available space on a particular page. This can
vary due to alignment. It seems to me we can't rely on FSM contents
if there are many tuples in a relation. One idea is to get rid of
dependency on FSM contents in this test, can you think of any better
way to have consistent FSM contents across different platforms?

--
With Regards,
Amit Kapila.
EnterpriseDB: http://www.enterprisedb.com

#134Amit Kapila
amit.kapila16@gmail.com
In reply to: Amit Kapila (#133)
Re: WIP: Avoid creation of the free space map for small tables

On Mon, Feb 4, 2019 at 9:24 AM Amit Kapila <amit.kapila16@gmail.com> wrote:

On Mon, Feb 4, 2019 at 8:47 AM Amit Kapila <amit.kapila16@gmail.com> wrote:

One more similar failure:
https://buildfarm.postgresql.org/cgi-bin/show_log.pl?nm=lapwing&amp;dt=2019-02-04%2003%3A20%3A01

So, basically, this is due to difference in the number of tuples that
can fit on a page. The freespace in FSM for the page is shown
different because of available space on a particular page. This can
vary due to alignment. It seems to me we can't rely on FSM contents
if there are many tuples in a relation. One idea is to get rid of
dependency on FSM contents in this test, can you think of any better
way to have consistent FSM contents across different platforms?

One more idea could be that we devise a test (say with a char/varchar)
such that it always consume same space in a page irrespective of its
alignment. Yet another way could be we use explain (costs off,
analyze on, timing off, summary off) ..., this will ensure that we
will have test coverage for function fsm_page_contents, but we don't
rely on its contents. What do you think? I will go with last option
to stablize the buildfarm tests unless anyone thinks otherwise or has
better idea. I willprobably wait for 20 minutes or so to see if
anyone has inputs.

--
With Regards,
Amit Kapila.
EnterpriseDB: http://www.enterprisedb.com

#135John Naylor
john.naylor@2ndquadrant.com
In reply to: Amit Kapila (#132)
Re: WIP: Avoid creation of the free space map for small tables

On Mon, Feb 4, 2019 at 4:17 AM Amit Kapila <amit.kapila16@gmail.com> wrote:

This one seems to be FSM test portability issue (due to different page
contents, maybe). Looking into it, John, see if you are around and
have some thoughts on it.

Maybe we can use the same plpgsql loop as fsm.sql that exits after 1
tuple has inserted into the 5th page.

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

#136Amit Kapila
amit.kapila16@gmail.com
In reply to: John Naylor (#135)
Re: WIP: Avoid creation of the free space map for small tables

On Mon, Feb 4, 2019 at 10:18 AM John Naylor <john.naylor@2ndquadrant.com> wrote:

On Mon, Feb 4, 2019 at 4:17 AM Amit Kapila <amit.kapila16@gmail.com> wrote:

This one seems to be FSM test portability issue (due to different page
contents, maybe). Looking into it, John, see if you are around and
have some thoughts on it.

Maybe we can use the same plpgsql loop as fsm.sql that exits after 1
tuple has inserted into the 5th page.

Yeah that can also work, but we still need to be careful about the
alignment of that one tuple, otherwise, there will could be different
free space on the fifth page. The probably easier way could be to use
an even number of integers in the table say(int, int). Anyway, for
now, I have avoided the dependency on FSM contents without losing on
coverage of test. I have pushed my latest suggestion in the previous
email.

--
With Regards,
Amit Kapila.
EnterpriseDB: http://www.enterprisedb.com

#137Amit Kapila
amit.kapila16@gmail.com
In reply to: Amit Kapila (#136)
Re: WIP: Avoid creation of the free space map for small tables

On Mon, Feb 4, 2019 at 10:29 AM Amit Kapila <amit.kapila16@gmail.com> wrote:

On Mon, Feb 4, 2019 at 10:18 AM John Naylor <john.naylor@2ndquadrant.com> wrote:

On Mon, Feb 4, 2019 at 4:17 AM Amit Kapila <amit.kapila16@gmail.com> wrote:

This one seems to be FSM test portability issue (due to different page
contents, maybe). Looking into it, John, see if you are around and
have some thoughts on it.

Maybe we can use the same plpgsql loop as fsm.sql that exits after 1
tuple has inserted into the 5th page.

Yeah that can also work, but we still need to be careful about the
alignment of that one tuple, otherwise, there will could be different
free space on the fifth page. The probably easier way could be to use
an even number of integers in the table say(int, int). Anyway, for
now, I have avoided the dependency on FSM contents without losing on
coverage of test. I have pushed my latest suggestion in the previous
email.

The change seems to have worked. All the buildfarm machines that were
showing the failure are passed now.

--
With Regards,
Amit Kapila.
EnterpriseDB: http://www.enterprisedb.com

#138John Naylor
john.naylor@2ndquadrant.com
In reply to: Amit Kapila (#137)
Re: WIP: Avoid creation of the free space map for small tables

On Mon, Feb 4, 2019 at 8:41 AM Amit Kapila <amit.kapila16@gmail.com> wrote:

Yeah that can also work, but we still need to be careful about the
alignment of that one tuple, otherwise, there will could be different
free space on the fifth page. The probably easier way could be to use
an even number of integers in the table say(int, int). Anyway, for
now, I have avoided the dependency on FSM contents without losing on
coverage of test. I have pushed my latest suggestion in the previous
email.

The change seems to have worked. All the buildfarm machines that were
showing the failure are passed now.

Excellent!

Now that the buildfarm is green as far as this patch goes, I will
touch on a few details to round out development in this area:

1. Earlier, I had a test to ensure that free space towards the front
of the relation was visible with no FSM. In [1]/messages/by-id/CACPNZCvEXLUx10pFvNcOs88RvqemMEjOv7D9MhL3ac86EzjAOA@mail.gmail.com, I rewrote it without
using vacuum, so we can consider adding it back now if desired. I can
prepare a patch for this.

2. As a follow-on, since we don't rely on vacuum to remove dead rows,
we could try putting the fsm.sql test in some existing group in the
parallel schedule, rather than its own group is it is now.

3. While looking at 0d1fe9f74e, it occurred to me that I ignored this
patch's effects on GetRecordedFreeSpace(), which will return zero for
tables with no FSM. The other callers are in:
contrib/pg_freespacemap/pg_freespacemap.c
contrib/pgstattuple/pgstatapprox.c

For pg_freespacemap, this doesn't matter, since it's just reporting
the facts. For pgstattuple_approx(), it might under-estimate the free
space and over-estimate the number of live tuples. This might be fine,
since it is approximate after all, but maybe a comment would be
helpful. If this is a problem, we could tweak it to be more precise
for tables without FSMs. Thoughts?

4. The latest patch for the pg_upgrade piece was in [2]/messages/by-id/CACPNZCu4cOdm3uGnNEGXivy7Gz8UWyQjynDpdkPGabQ18_zK6g@mail.gmail.com

Anything else?

[1]: /messages/by-id/CACPNZCvEXLUx10pFvNcOs88RvqemMEjOv7D9MhL3ac86EzjAOA@mail.gmail.com

[2]: /messages/by-id/CACPNZCu4cOdm3uGnNEGXivy7Gz8UWyQjynDpdkPGabQ18_zK6g@mail.gmail.com

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

#139Amit Kapila
amit.kapila16@gmail.com
In reply to: John Naylor (#138)
Re: WIP: Avoid creation of the free space map for small tables

On Mon, Feb 4, 2019 at 2:27 PM John Naylor <john.naylor@2ndquadrant.com>
wrote:

On Mon, Feb 4, 2019 at 8:41 AM Amit Kapila <amit.kapila16@gmail.com>

wrote:

The change seems to have worked. All the buildfarm machines that were
showing the failure are passed now.

Excellent!

Now that the buildfarm is green as far as this patch goes,

There is still one recent failure which I don't think is related to commit
of this patch:

https://buildfarm.postgresql.org/cgi-bin/show_log.pl?nm=bowerbird&amp;dt=2019-02-04%2016%3A38%3A48

==================
pgsql.build/src/bin/pg_ctl/tmp_check/log/004_logrotate_primary.log
===================
TRAP: FailedAssertion("!(UsedShmemSegAddr != ((void *)0))", File:
"g:\prog\bf\root\head\pgsql.build\src\backend\port\win32_shmem.c", Line:
513)

I think we need to do something about this random failure, but not as part
of this thread/patch.

I will
touch on a few details to round out development in this area:

1. Earlier, I had a test to ensure that free space towards the front
of the relation was visible with no FSM. In [1], I rewrote it without
using vacuum, so we can consider adding it back now if desired. I can
prepare a patch for this.

Yes, this is required. It is generally a good practise to add test (unless
it takes a lot of time) which covers new code/functionality.

2. As a follow-on, since we don't rely on vacuum to remove dead rows,
we could try putting the fsm.sql test in some existing group in the
parallel schedule, rather than its own group is it is now.

+1.

3. While looking at 0d1fe9f74e, it occurred to me that I ignored this
patch's effects on GetRecordedFreeSpace(), which will return zero for
tables with no FSM.

Right, but what exactly we want to do for it? Do you want to add a comment
atop of this function?

The other callers are in:
contrib/pg_freespacemap/pg_freespacemap.c
contrib/pgstattuple/pgstatapprox.c

For pg_freespacemap, this doesn't matter, since it's just reporting
the facts. For pgstattuple_approx(), it might under-estimate the free
space and over-estimate the number of live tuples.

Sure, but without patch also, it can do so, if the vacuum hasn't updated
freespace map.

This might be fine,
since it is approximate after all, but maybe a comment would be
helpful. If this is a problem, we could tweak it to be more precise
for tables without FSMs.

Sounds reasonable to me.

Thoughts?

4. The latest patch for the pg_upgrade piece was in [2]

It will be good if we get this one as well. I will look into it once we
are done with the other points you have mentioned.

--
With Regards,
Amit Kapila.
EnterpriseDB: http://www.enterprisedb.com

#140John Naylor
john.naylor@2ndquadrant.com
In reply to: Amit Kapila (#139)
2 attachment(s)
Re: WIP: Avoid creation of the free space map for small tables

On Tue, Feb 5, 2019 at 4:04 AM Amit Kapila <amit.kapila16@gmail.com> wrote:

On Mon, Feb 4, 2019 at 2:27 PM John Naylor <john.naylor@2ndquadrant.com> wrote:

1. Earlier, I had a test to ensure that free space towards the front
of the relation was visible with no FSM. In [1], I rewrote it without
using vacuum, so we can consider adding it back now if desired. I can
prepare a patch for this.

Yes, this is required. It is generally a good practise to add test (unless it takes a lot of time) which covers new code/functionality.

2. As a follow-on, since we don't rely on vacuum to remove dead rows,
we could try putting the fsm.sql test in some existing group in the
parallel schedule, rather than its own group is it is now.

+1.

This is done in 0001.

3. While looking at 0d1fe9f74e, it occurred to me that I ignored this
patch's effects on GetRecordedFreeSpace(), which will return zero for
tables with no FSM.

Right, but what exactly we want to do for it? Do you want to add a comment atop of this function?

Hmm, the comment already says "according to the FSM", so maybe it's
already obvious. I was thinking more about maybe commenting the
callsite where it's helpful, as in 0002.

The other callers are in:
contrib/pg_freespacemap/pg_freespacemap.c
contrib/pgstattuple/pgstatapprox.c

For pg_freespacemap, this doesn't matter, since it's just reporting
the facts. For pgstattuple_approx(), it might under-estimate the free
space and over-estimate the number of live tuples.

Sure, but without patch also, it can do so, if the vacuum hasn't updated freespace map.

Okay, then maybe we don't need to do anything else here.

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

Attachments:

v1-0001-Improve-FSM-regression-test.patchtext/x-patch; charset=US-ASCII; name=v1-0001-Improve-FSM-regression-test.patchDownload
From ff821d820630313e4dcea65aa1b35d47a0736c64 Mon Sep 17 00:00:00 2001
From: John Naylor <jcnaylor@gmail.com>
Date: Tue, 5 Feb 2019 10:32:19 +0100
Subject: [PATCH v1 1/2] Improve FSM regression test

In the interest of caution, in commit b0eaa4c51bb we left out a
test that used vacuum to remove dead rows. This test has been
rewritten to use fillfactor instead to control free space. Since
we no longer need to remove dead rows as part of the test, put
the fsm regression test in a parallel group.
---
 src/test/regress/expected/fsm.out  | 25 ++++++++++++++++++++++---
 src/test/regress/parallel_schedule |  8 +-------
 src/test/regress/sql/fsm.sql       | 22 ++++++++++++++++++++--
 3 files changed, 43 insertions(+), 12 deletions(-)

diff --git a/src/test/regress/expected/fsm.out b/src/test/regress/expected/fsm.out
index b02993188c..d747c1a7dd 100644
--- a/src/test/regress/expected/fsm.out
+++ b/src/test/regress/expected/fsm.out
@@ -2,14 +2,33 @@
 -- Free Space Map test
 --
 CREATE TABLE fsm_check_size (num int, str text);
--- With one block, there should be no FSM
-INSERT INTO fsm_check_size VALUES(1, 'a');
+-- Fill 3 blocks with one record each
+ALTER TABLE fsm_check_size SET (fillfactor=15);
+INSERT INTO fsm_check_size SELECT i, rpad('', 1024, 'a')
+FROM generate_series(1,3) i;
+-- There should be no FSM
 VACUUM fsm_check_size;
 SELECT pg_relation_size('fsm_check_size', 'main') AS heap_size,
 pg_relation_size('fsm_check_size', 'fsm') AS fsm_size;
  heap_size | fsm_size 
 -----------+----------
-      8192 |        0
+     24576 |        0
+(1 row)
+
+-- Fill most of the last block
+ALTER TABLE fsm_check_size SET (fillfactor=100);
+INSERT INTO fsm_check_size SELECT i, rpad('', 1024, 'a')
+FROM generate_series(101,105) i;
+-- Make sure records can go into any block but the last one
+ALTER TABLE fsm_check_size SET (fillfactor=30);
+-- Insert large record and make sure it does not cause the relation to extend
+INSERT INTO fsm_check_size VALUES (111, rpad('', 1024, 'a'));
+VACUUM fsm_check_size;
+SELECT pg_relation_size('fsm_check_size', 'main') AS heap_size,
+pg_relation_size('fsm_check_size', 'fsm') AS fsm_size;
+ heap_size | fsm_size 
+-----------+----------
+     24576 |        0
 (1 row)
 
 -- Extend table with enough blocks to exceed the FSM threshold
diff --git a/src/test/regress/parallel_schedule b/src/test/regress/parallel_schedule
index 4051a4ad4e..a956775dd1 100644
--- a/src/test/regress/parallel_schedule
+++ b/src/test/regress/parallel_schedule
@@ -23,7 +23,7 @@ test: numerology
 # ----------
 # The second group of parallel tests
 # ----------
-test: point lseg line box path polygon circle date time timetz timestamp timestamptz interval inet macaddr macaddr8 tstypes
+test: point lseg line box path polygon circle date time timetz timestamp timestamptz interval inet macaddr macaddr8 tstypes fsm
 
 # ----------
 # Another group of parallel tests
@@ -68,12 +68,6 @@ test: create_aggregate create_function_3 create_cast constraints triggers inheri
 # ----------
 test: sanity_check
 
-# ----------
-# fsm does a delete followed by vacuum, and running it in parallel can prevent
-# removal of rows.
-# ----------
-test: fsm
-
 # ----------
 # Believe it or not, select creates a table, subsequent
 # tests need.
diff --git a/src/test/regress/sql/fsm.sql b/src/test/regress/sql/fsm.sql
index 332c3e2b2d..2f169c0508 100644
--- a/src/test/regress/sql/fsm.sql
+++ b/src/test/regress/sql/fsm.sql
@@ -4,8 +4,26 @@
 
 CREATE TABLE fsm_check_size (num int, str text);
 
--- With one block, there should be no FSM
-INSERT INTO fsm_check_size VALUES(1, 'a');
+-- Fill 3 blocks with one record each
+ALTER TABLE fsm_check_size SET (fillfactor=15);
+INSERT INTO fsm_check_size SELECT i, rpad('', 1024, 'a')
+FROM generate_series(1,3) i;
+
+-- There should be no FSM
+VACUUM fsm_check_size;
+SELECT pg_relation_size('fsm_check_size', 'main') AS heap_size,
+pg_relation_size('fsm_check_size', 'fsm') AS fsm_size;
+
+-- Fill most of the last block
+ALTER TABLE fsm_check_size SET (fillfactor=100);
+INSERT INTO fsm_check_size SELECT i, rpad('', 1024, 'a')
+FROM generate_series(101,105) i;
+
+-- Make sure records can go into any block but the last one
+ALTER TABLE fsm_check_size SET (fillfactor=30);
+
+-- Insert large record and make sure it does not cause the relation to extend
+INSERT INTO fsm_check_size VALUES (111, rpad('', 1024, 'a'));
 
 VACUUM fsm_check_size;
 SELECT pg_relation_size('fsm_check_size', 'main') AS heap_size,
-- 
2.17.1

v1-0002-Add-note-that-relations-with-no-FSM-will-report-n.patchtext/x-patch; charset=US-ASCII; name=v1-0002-Add-note-that-relations-with-no-FSM-will-report-n.patchDownload
From f6ddb0cdddfb2bb0c3195edcbb60d3ca5f679a90 Mon Sep 17 00:00:00 2001
From: John Naylor <jcnaylor@gmail.com>
Date: Tue, 5 Feb 2019 10:42:18 +0100
Subject: [PATCH v1 2/2] Add note that relations with no FSM will report no
 free space.

---
 contrib/pgstattuple/pgstatapprox.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/contrib/pgstattuple/pgstatapprox.c b/contrib/pgstattuple/pgstatapprox.c
index ff7c255a2d..23ccaaaca6 100644
--- a/contrib/pgstattuple/pgstatapprox.c
+++ b/contrib/pgstattuple/pgstatapprox.c
@@ -89,6 +89,8 @@ statapprox_heap(Relation rel, output_type *stat)
 		/*
 		 * If the page has only visible tuples, then we can find out the free
 		 * space from the FSM and move on.
+		 * Note: If a relation has no FSM, GetRecordedFreeSpace() will report
+		 * zero free space.  This is fine for the purposes of approximation.
 		 */
 		if (VM_ALL_VISIBLE(rel, blkno, &vmbuffer))
 		{
-- 
2.17.1

#141Amit Kapila
amit.kapila16@gmail.com
In reply to: John Naylor (#140)
Re: WIP: Avoid creation of the free space map for small tables

On Tue, Feb 5, 2019 at 3:25 PM John Naylor <john.naylor@2ndquadrant.com> wrote:

On Tue, Feb 5, 2019 at 4:04 AM Amit Kapila <amit.kapila16@gmail.com> wrote:

On Mon, Feb 4, 2019 at 2:27 PM John Naylor <john.naylor@2ndquadrant.com> wrote:

1. Earlier, I had a test to ensure that free space towards the front
of the relation was visible with no FSM. In [1], I rewrote it without
using vacuum, so we can consider adding it back now if desired. I can
prepare a patch for this.

Yes, this is required. It is generally a good practise to add test (unless it takes a lot of time) which covers new code/functionality.

2. As a follow-on, since we don't rely on vacuum to remove dead rows,
we could try putting the fsm.sql test in some existing group in the
parallel schedule, rather than its own group is it is now.

+1.

This is done in 0001.

This is certainly a good test w.r.t code coverage of new code, but I
have few comments:
1. The size of records in test still depends on alignment (MAXALIGN).
Though it doesn't seem to be a problematic case, I still suggest we
can avoid using records whose size depends on alignment.  If you
change the schema as CREATE TABLE fsm_check_size (num1 int, num2 int,
str text);, then you can avoid alignment related issues for the
records being used in test.
2.
+-- Fill most of the last block
..
+-- Make sure records can go into any block but the last one
..
+-- Insert large record and make sure it does not cause the relation to extend

The comments in some part of the test seems too focussed towards the
algorithm used for in-memory map. I think we can keep these if we
want, but it is required to write a more generic comment stating what
is the actual motive of additional tests (basically we are testing the
functionality of in-memory map (LSM) for the heap, so we should write
about it.).

3. While looking at 0d1fe9f74e, it occurred to me that I ignored this
patch's effects on GetRecordedFreeSpace(), which will return zero for
tables with no FSM.

Right, but what exactly we want to do for it? Do you want to add a comment atop of this function?

Hmm, the comment already says "according to the FSM", so maybe it's
already obvious. I was thinking more about maybe commenting the
callsite where it's helpful, as in 0002.

The other callers are in:
contrib/pg_freespacemap/pg_freespacemap.c
contrib/pgstattuple/pgstatapprox.c

For pg_freespacemap, this doesn't matter, since it's just reporting
the facts. For pgstattuple_approx(), it might under-estimate the free
space and over-estimate the number of live tuples.

Sure, but without patch also, it can do so, if the vacuum hasn't updated freespace map.

Okay, then maybe we don't need to do anything else here.

Shall we add a note to the docs of pg_freespacemap and
pgstattuple_approx indicating that for small relations, FSM won't be
created, so these functions won't give appropriate value? Or other
possibility could be that we return an error if the block number is
less than the threshold value, but not sure if that is a good
alternative as that can happen today also if the vacuum hasn't run on
the table.

--
With Regards,
Amit Kapila.
EnterpriseDB: http://www.enterprisedb.com

#142John Naylor
john.naylor@2ndquadrant.com
In reply to: Amit Kapila (#141)
2 attachment(s)
Re: WIP: Avoid creation of the free space map for small tables

On 2/9/19, Amit Kapila <amit.kapila16@gmail.com> wrote:

On Tue, Feb 5, 2019 at 3:25 PM John Naylor <john.naylor@2ndquadrant.com>
wrote:

On Tue, Feb 5, 2019 at 4:04 AM Amit Kapila <amit.kapila16@gmail.com>
wrote:

This is certainly a good test w.r.t code coverage of new code, but I
have few comments:
1. The size of records in test still depends on alignment (MAXALIGN).
Though it doesn't seem to be a problematic case, I still suggest we
can avoid using records whose size depends on alignment. If you
change the schema as CREATE TABLE fsm_check_size (num1 int, num2 int,
str text);, then you can avoid alignment related issues for the
records being used in test.

Done.

2.
+-- Fill most of the last block
..
+-- Make sure records can go into any block but the last one
..
+-- Insert large record and make sure it does not cause the relation to
extend

The comments in some part of the test seems too focussed towards the
algorithm used for in-memory map. I think we can keep these if we
want, but it is required to write a more generic comment stating what
is the actual motive of additional tests (basically we are testing the
functionality of in-memory map (LSM) for the heap, so we should write
about it.).

Done.

Shall we add a note to the docs of pg_freespacemap and
pgstattuple_approx indicating that for small relations, FSM won't be
created, so these functions won't give appropriate value?

I've given this a try in 0002.

Or other
possibility could be that we return an error if the block number is
less than the threshold value, but not sure if that is a good
alternative as that can happen today also if the vacuum hasn't run on
the table.

Yeah, an error doesn't seem helpful.

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

Attachments:

v2-0001-Improve-FSM-regression-test.patchtext/x-patch; charset=US-ASCII; name=v2-0001-Improve-FSM-regression-test.patchDownload
From 7a7eb0b17aa55dbec2032bf7cc5189e22bb2ca0c Mon Sep 17 00:00:00 2001
From: John Naylor <jcnaylor@gmail.com>
Date: Mon, 11 Feb 2019 18:08:01 +0100
Subject: [PATCH v2 1/2] Improve FSM regression test

In the interest of caution, in commit b0eaa4c51bb we left out a
test that used vacuum to remove dead rows. This test has been
rewritten to use fillfactor instead to control free space. Since
we no longer need to remove dead rows as part of the test, put
the fsm regression test in a parallel group.
---
 src/test/regress/expected/fsm.out  | 36 ++++++++++++++++++++++++------
 src/test/regress/parallel_schedule |  8 +------
 src/test/regress/sql/fsm.sql       | 34 +++++++++++++++++++++++-----
 3 files changed, 58 insertions(+), 20 deletions(-)

diff --git a/src/test/regress/expected/fsm.out b/src/test/regress/expected/fsm.out
index b02993188c..f5f62429ac 100644
--- a/src/test/regress/expected/fsm.out
+++ b/src/test/regress/expected/fsm.out
@@ -1,15 +1,37 @@
 --
 -- Free Space Map test
 --
-CREATE TABLE fsm_check_size (num int, str text);
--- With one block, there should be no FSM
-INSERT INTO fsm_check_size VALUES(1, 'a');
+CREATE TABLE fsm_check_size (num1 int, num2 int, str text);
+-- Fill 3 blocks with one record each
+ALTER TABLE fsm_check_size SET (fillfactor=15);
+INSERT INTO fsm_check_size SELECT i, i, rpad('', 1024, 'a')
+FROM generate_series(1,3) i;
+-- There should be no FSM
 VACUUM fsm_check_size;
 SELECT pg_relation_size('fsm_check_size', 'main') AS heap_size,
 pg_relation_size('fsm_check_size', 'fsm') AS fsm_size;
  heap_size | fsm_size 
 -----------+----------
-      8192 |        0
+     24576 |        0
+(1 row)
+
+-- The following operations are for testing the functionality of the local
+-- in-memory map. In particular, we want to be able to insert into some
+-- other block than the one at the end of the heap, without using a FSM.
+-- Fill most of the last block
+ALTER TABLE fsm_check_size SET (fillfactor=100);
+INSERT INTO fsm_check_size SELECT i, i, rpad('', 1024, 'a')
+FROM generate_series(101,105) i;
+-- Make sure records can go into any block but the last one
+ALTER TABLE fsm_check_size SET (fillfactor=30);
+-- Insert large record and make sure it does not cause the relation to extend
+INSERT INTO fsm_check_size VALUES (111, 111, rpad('', 1024, 'a'));
+VACUUM fsm_check_size;
+SELECT pg_relation_size('fsm_check_size', 'main') AS heap_size,
+pg_relation_size('fsm_check_size', 'fsm') AS fsm_size;
+ heap_size | fsm_size 
+-----------+----------
+     24576 |        0
 (1 row)
 
 -- Extend table with enough blocks to exceed the FSM threshold
@@ -19,7 +41,7 @@ num int;
 BEGIN
 num = 11;
   LOOP
-    INSERT INTO fsm_check_size VALUES (num, 'b') RETURNING ctid INTO curtid;
+    INSERT INTO fsm_check_size VALUES (num, num, 'b') RETURNING ctid INTO curtid;
     EXIT WHEN curtid >= tid '(4, 0)';
     num = num + 1;
   END LOOP;
@@ -34,8 +56,8 @@ SELECT pg_relation_size('fsm_check_size', 'fsm') AS fsm_size;
 
 -- Add long random string to extend TOAST table to 1 block
 INSERT INTO fsm_check_size
-VALUES(0, (SELECT string_agg(md5(chr(i)), '')
-		   FROM generate_series(1,100) i));
+VALUES(0, 0, (SELECT string_agg(md5(chr(i)), '')
+			  FROM generate_series(1,100) i));
 VACUUM fsm_check_size;
 SELECT pg_relation_size(reltoastrelid, 'main') AS toast_size,
 pg_relation_size(reltoastrelid, 'fsm') AS toast_fsm_size
diff --git a/src/test/regress/parallel_schedule b/src/test/regress/parallel_schedule
index 4051a4ad4e..a956775dd1 100644
--- a/src/test/regress/parallel_schedule
+++ b/src/test/regress/parallel_schedule
@@ -23,7 +23,7 @@ test: numerology
 # ----------
 # The second group of parallel tests
 # ----------
-test: point lseg line box path polygon circle date time timetz timestamp timestamptz interval inet macaddr macaddr8 tstypes
+test: point lseg line box path polygon circle date time timetz timestamp timestamptz interval inet macaddr macaddr8 tstypes fsm
 
 # ----------
 # Another group of parallel tests
@@ -68,12 +68,6 @@ test: create_aggregate create_function_3 create_cast constraints triggers inheri
 # ----------
 test: sanity_check
 
-# ----------
-# fsm does a delete followed by vacuum, and running it in parallel can prevent
-# removal of rows.
-# ----------
-test: fsm
-
 # ----------
 # Believe it or not, select creates a table, subsequent
 # tests need.
diff --git a/src/test/regress/sql/fsm.sql b/src/test/regress/sql/fsm.sql
index 332c3e2b2d..7ba22e5bd1 100644
--- a/src/test/regress/sql/fsm.sql
+++ b/src/test/regress/sql/fsm.sql
@@ -2,10 +2,32 @@
 -- Free Space Map test
 --
 
-CREATE TABLE fsm_check_size (num int, str text);
+CREATE TABLE fsm_check_size (num1 int, num2 int, str text);
 
--- With one block, there should be no FSM
-INSERT INTO fsm_check_size VALUES(1, 'a');
+-- Fill 3 blocks with one record each
+ALTER TABLE fsm_check_size SET (fillfactor=15);
+INSERT INTO fsm_check_size SELECT i, i, rpad('', 1024, 'a')
+FROM generate_series(1,3) i;
+
+-- There should be no FSM
+VACUUM fsm_check_size;
+SELECT pg_relation_size('fsm_check_size', 'main') AS heap_size,
+pg_relation_size('fsm_check_size', 'fsm') AS fsm_size;
+
+-- The following operations are for testing the functionality of the local
+-- in-memory map. In particular, we want to be able to insert into some
+-- other block than the one at the end of the heap, without using a FSM.
+
+-- Fill most of the last block
+ALTER TABLE fsm_check_size SET (fillfactor=100);
+INSERT INTO fsm_check_size SELECT i, i, rpad('', 1024, 'a')
+FROM generate_series(101,105) i;
+
+-- Make sure records can go into any block but the last one
+ALTER TABLE fsm_check_size SET (fillfactor=30);
+
+-- Insert large record and make sure it does not cause the relation to extend
+INSERT INTO fsm_check_size VALUES (111, 111, rpad('', 1024, 'a'));
 
 VACUUM fsm_check_size;
 SELECT pg_relation_size('fsm_check_size', 'main') AS heap_size,
@@ -18,7 +40,7 @@ num int;
 BEGIN
 num = 11;
   LOOP
-    INSERT INTO fsm_check_size VALUES (num, 'b') RETURNING ctid INTO curtid;
+    INSERT INTO fsm_check_size VALUES (num, num, 'b') RETURNING ctid INTO curtid;
     EXIT WHEN curtid >= tid '(4, 0)';
     num = num + 1;
   END LOOP;
@@ -30,8 +52,8 @@ SELECT pg_relation_size('fsm_check_size', 'fsm') AS fsm_size;
 
 -- Add long random string to extend TOAST table to 1 block
 INSERT INTO fsm_check_size
-VALUES(0, (SELECT string_agg(md5(chr(i)), '')
-		   FROM generate_series(1,100) i));
+VALUES(0, 0, (SELECT string_agg(md5(chr(i)), '')
+			  FROM generate_series(1,100) i));
 
 VACUUM fsm_check_size;
 SELECT pg_relation_size(reltoastrelid, 'main') AS toast_size,
-- 
2.17.1

v2-0002-Document-that-functions-that-use-the-FSM-for-will.patchtext/x-patch; charset=US-ASCII; name=v2-0002-Document-that-functions-that-use-the-FSM-for-will.patchDownload
From e6e253064324dabedbc06f145c4edce9be5d54b4 Mon Sep 17 00:00:00 2001
From: John Naylor <jcnaylor@gmail.com>
Date: Mon, 11 Feb 2019 18:09:00 +0100
Subject: [PATCH v2 2/2] Document that functions that use the FSM for will
 report no free space for tables without a FSM.

---
 contrib/pgstattuple/pgstatapprox.c | 2 ++
 doc/src/sgml/pgfreespacemap.sgml   | 2 ++
 doc/src/sgml/pgstattuple.sgml      | 4 +++-
 3 files changed, 7 insertions(+), 1 deletion(-)

diff --git a/contrib/pgstattuple/pgstatapprox.c b/contrib/pgstattuple/pgstatapprox.c
index ff7c255a2d..23ccaaaca6 100644
--- a/contrib/pgstattuple/pgstatapprox.c
+++ b/contrib/pgstattuple/pgstatapprox.c
@@ -89,6 +89,8 @@ statapprox_heap(Relation rel, output_type *stat)
 		/*
 		 * If the page has only visible tuples, then we can find out the free
 		 * space from the FSM and move on.
+		 * Note: If a relation has no FSM, GetRecordedFreeSpace() will report
+		 * zero free space.  This is fine for the purposes of approximation.
 		 */
 		if (VM_ALL_VISIBLE(rel, blkno, &vmbuffer))
 		{
diff --git a/doc/src/sgml/pgfreespacemap.sgml b/doc/src/sgml/pgfreespacemap.sgml
index 0122d278e3..be6fcc4986 100644
--- a/doc/src/sgml/pgfreespacemap.sgml
+++ b/doc/src/sgml/pgfreespacemap.sgml
@@ -61,6 +61,8 @@
    The values stored in the free space map are not exact. They're rounded
    to precision of 1/256th of <symbol>BLCKSZ</symbol> (32 bytes with default <symbol>BLCKSZ</symbol>), and
    they're not kept fully up-to-date as tuples are inserted and updated.
+   In addition, small tables don't have a free space map, so this function
+   will return zero even if free space is available.
   </para>
 
   <para>
diff --git a/doc/src/sgml/pgstattuple.sgml b/doc/src/sgml/pgstattuple.sgml
index b17b3c59e0..8c5f53674d 100644
--- a/doc/src/sgml/pgstattuple.sgml
+++ b/doc/src/sgml/pgstattuple.sgml
@@ -527,7 +527,9 @@ approx_free_percent  | 2.09
       bit set, then it is assumed to contain no dead tuples). For such
       pages, it derives the free space value from the free space map, and
       assumes that the rest of the space on the page is taken up by live
-      tuples.
+      tuples. Small tables don't have a free space map, so in that case
+      this function will report zero free space, likewise inflating the
+      estimated number of live tuples.
      </para>
 
      <para>
-- 
2.17.1

#143Amit Kapila
amit.kapila16@gmail.com
In reply to: John Naylor (#142)
1 attachment(s)
Re: WIP: Avoid creation of the free space map for small tables

On Mon, Feb 11, 2019 at 10:48 PM John Naylor
<john.naylor@2ndquadrant.com> wrote:

On 2/9/19, Amit Kapila <amit.kapila16@gmail.com> wrote:

Shall we add a note to the docs of pg_freespacemap and
pgstattuple_approx indicating that for small relations, FSM won't be
created, so these functions won't give appropriate value?

I've given this a try in 0002.

This looks mostly correct, but I have a few observations:
1.
-      tuples.
+      tuples. Small tables don't have a free space map, so in that case
+      this function will report zero free space, likewise inflating the
+      estimated number of live tuples.

The last part of the sentence "likewise inflating the estimated number
of live tuples." seems incorrect to me because live tuples are
computed based on the pages scanned, live tuples in them and total
blocks in the relation. So, I think it should be "likewise inflating
the approximate tuple length".

2.
+   In addition, small tables don't have a free space map, so this function
+   will return zero even if free space is available.

Actually, the paragraph you have modified applies to both the
functions mentioned on that page. So instead of saying "this function
..", we can say "these functions .."

3.
* space from the FSM and move on.
+ * Note: If a relation has no FSM, GetRecordedFreeSpace() will report
+ * zero free space.  This is fine for the purposes of approximation.
  */

It is better to have an empty line before Note: ...

I have modified the patch for the above observations and added a
commit message as well, see if it looks okay to you.

--
With Regards,
Amit Kapila.
EnterpriseDB: http://www.enterprisedb.com

Attachments:

v3-0002-Document-that-functions-that-use-the-FSM-for-will.patchapplication/octet-stream; name=v3-0002-Document-that-functions-that-use-the-FSM-for-will.patchDownload
From 5861f9c303c2ac6707af6c5292ad38a66cfb658d Mon Sep 17 00:00:00 2001
From: Amit Kapila <akapila@postgresql.org>
Date: Wed, 20 Feb 2019 16:10:31 +0530
Subject: [PATCH] Doc: Update the documentation for FSM behavior for small
 tables.

In commit b0eaa4c51b, we have avoided the creation of FSM for small tables.
So the functions that use FSM to compute the free space can return zero for
such tables.  This was previously also possible for the cases where the
vacuum has not been triggered to update FSM.

This commit updates the comments in code and documentation to reflect this
behavior.

Author: John Naylor
Reviewed-by: Amit Kapila
Discussion: https://postgr.es/m/CACPNZCtba-3m1q3A8gxA_vxg=T7gQf7gMbpR4Ciy5LntY-j+0Q@mail.gmail.com
---
 contrib/pgstattuple/pgstatapprox.c | 3 +++
 doc/src/sgml/pgfreespacemap.sgml   | 2 ++
 doc/src/sgml/pgstattuple.sgml      | 4 +++-
 3 files changed, 8 insertions(+), 1 deletion(-)

diff --git a/contrib/pgstattuple/pgstatapprox.c b/contrib/pgstattuple/pgstatapprox.c
index ff7c255..d36758a 100644
--- a/contrib/pgstattuple/pgstatapprox.c
+++ b/contrib/pgstattuple/pgstatapprox.c
@@ -89,6 +89,9 @@ statapprox_heap(Relation rel, output_type *stat)
 		/*
 		 * If the page has only visible tuples, then we can find out the free
 		 * space from the FSM and move on.
+		 *
+		 * Note: If a relation has no FSM, GetRecordedFreeSpace() will report
+		 * zero free space.  This is fine for the purposes of approximation.
 		 */
 		if (VM_ALL_VISIBLE(rel, blkno, &vmbuffer))
 		{
diff --git a/doc/src/sgml/pgfreespacemap.sgml b/doc/src/sgml/pgfreespacemap.sgml
index 0122d27..0bcf79b 100644
--- a/doc/src/sgml/pgfreespacemap.sgml
+++ b/doc/src/sgml/pgfreespacemap.sgml
@@ -61,6 +61,8 @@
    The values stored in the free space map are not exact. They're rounded
    to precision of 1/256th of <symbol>BLCKSZ</symbol> (32 bytes with default <symbol>BLCKSZ</symbol>), and
    they're not kept fully up-to-date as tuples are inserted and updated.
+   In addition, small tables don't have a free space map, so these functions
+   will return zero even if free space is available.
   </para>
 
   <para>
diff --git a/doc/src/sgml/pgstattuple.sgml b/doc/src/sgml/pgstattuple.sgml
index b17b3c5..8797131 100644
--- a/doc/src/sgml/pgstattuple.sgml
+++ b/doc/src/sgml/pgstattuple.sgml
@@ -527,7 +527,9 @@ approx_free_percent  | 2.09
       bit set, then it is assumed to contain no dead tuples). For such
       pages, it derives the free space value from the free space map, and
       assumes that the rest of the space on the page is taken up by live
-      tuples.
+      tuples. Small tables don't have a free space map, so in that case
+      this function will report zero free space, likewise inflating the
+      approximate tuple length.
      </para>
 
      <para>
-- 
1.8.3.1

#144John Naylor
john.naylor@2ndquadrant.com
In reply to: Amit Kapila (#143)
Re: WIP: Avoid creation of the free space map for small tables

On Wed, Feb 20, 2019 at 6:09 PM Amit Kapila <amit.kapila16@gmail.com> wrote:

I have modified the patch for the above observations and added a
commit message as well, see if it looks okay to you.

Looks good to me, thanks.

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

#145Amit Kapila
amit.kapila16@gmail.com
In reply to: John Naylor (#142)
1 attachment(s)
Re: WIP: Avoid creation of the free space map for small tables

On Mon, Feb 11, 2019 at 10:48 PM John Naylor
<john.naylor@2ndquadrant.com> wrote:

On 2/9/19, Amit Kapila <amit.kapila16@gmail.com> wrote:

On Tue, Feb 5, 2019 at 3:25 PM John Naylor <john.naylor@2ndquadrant.com>
wrote:

On Tue, Feb 5, 2019 at 4:04 AM Amit Kapila <amit.kapila16@gmail.com>
wrote:

This is certainly a good test w.r.t code coverage of new code, but I
have few comments:
1. The size of records in test still depends on alignment (MAXALIGN).
Though it doesn't seem to be a problematic case, I still suggest we
can avoid using records whose size depends on alignment. If you
change the schema as CREATE TABLE fsm_check_size (num1 int, num2 int,
str text);, then you can avoid alignment related issues for the
records being used in test.

Done.

2.
+-- Fill most of the last block
..
+-- Make sure records can go into any block but the last one
..
+-- Insert large record and make sure it does not cause the relation to
extend

The comments in some part of the test seems too focussed towards the
algorithm used for in-memory map. I think we can keep these if we
want, but it is required to write a more generic comment stating what
is the actual motive of additional tests (basically we are testing the
functionality of in-memory map (LSM) for the heap, so we should write
about it.).

Done.

Thanks, the modification looks good. I have slightly changed the
commit message in the attached patch. I will spend some more time
tomorrow morning on this and will commit unless I see any new problem.

--
With Regards,
Amit Kapila.
EnterpriseDB: http://www.enterprisedb.com

Attachments:

v3-0001-Add-more-tests-for-FSM.patchapplication/octet-stream; name=v3-0001-Add-more-tests-for-FSM.patchDownload
From 75cd0f1349abb8d83f6afacf4e85bfbb744905ba Mon Sep 17 00:00:00 2001
From: Amit Kapila <akapila@postgresql.org>
Date: Wed, 20 Feb 2019 18:18:03 +0530
Subject: [PATCH] Add more tests for FSM.

In commit b0eaa4c51b, we left out a test that used a vacuum to remove dead
rows as the behavior of test was not predictable.  This test has been
rewritten to use fillfactor instead to control free space.  Since we no
longer need to remove dead rows as part of the test, put the fsm regression
test in a parallel group.

Author: John Naylor
Reviewed-by: Amit Kapila
Discussion: https://postgr.es/m/CAA4eK1L=qWp_bJ5aTc9+fy4Ewx2LPaLWY-RbR4a60g_rupCKnQ@mail.gmail.com
---
 src/test/regress/expected/fsm.out  | 36 +++++++++++++++++++++++++++++-------
 src/test/regress/parallel_schedule |  8 +-------
 src/test/regress/sql/fsm.sql       | 34 ++++++++++++++++++++++++++++------
 3 files changed, 58 insertions(+), 20 deletions(-)

diff --git a/src/test/regress/expected/fsm.out b/src/test/regress/expected/fsm.out
index b029931..f5f6242 100644
--- a/src/test/regress/expected/fsm.out
+++ b/src/test/regress/expected/fsm.out
@@ -1,15 +1,37 @@
 --
 -- Free Space Map test
 --
-CREATE TABLE fsm_check_size (num int, str text);
--- With one block, there should be no FSM
-INSERT INTO fsm_check_size VALUES(1, 'a');
+CREATE TABLE fsm_check_size (num1 int, num2 int, str text);
+-- Fill 3 blocks with one record each
+ALTER TABLE fsm_check_size SET (fillfactor=15);
+INSERT INTO fsm_check_size SELECT i, i, rpad('', 1024, 'a')
+FROM generate_series(1,3) i;
+-- There should be no FSM
 VACUUM fsm_check_size;
 SELECT pg_relation_size('fsm_check_size', 'main') AS heap_size,
 pg_relation_size('fsm_check_size', 'fsm') AS fsm_size;
  heap_size | fsm_size 
 -----------+----------
-      8192 |        0
+     24576 |        0
+(1 row)
+
+-- The following operations are for testing the functionality of the local
+-- in-memory map. In particular, we want to be able to insert into some
+-- other block than the one at the end of the heap, without using a FSM.
+-- Fill most of the last block
+ALTER TABLE fsm_check_size SET (fillfactor=100);
+INSERT INTO fsm_check_size SELECT i, i, rpad('', 1024, 'a')
+FROM generate_series(101,105) i;
+-- Make sure records can go into any block but the last one
+ALTER TABLE fsm_check_size SET (fillfactor=30);
+-- Insert large record and make sure it does not cause the relation to extend
+INSERT INTO fsm_check_size VALUES (111, 111, rpad('', 1024, 'a'));
+VACUUM fsm_check_size;
+SELECT pg_relation_size('fsm_check_size', 'main') AS heap_size,
+pg_relation_size('fsm_check_size', 'fsm') AS fsm_size;
+ heap_size | fsm_size 
+-----------+----------
+     24576 |        0
 (1 row)
 
 -- Extend table with enough blocks to exceed the FSM threshold
@@ -19,7 +41,7 @@ num int;
 BEGIN
 num = 11;
   LOOP
-    INSERT INTO fsm_check_size VALUES (num, 'b') RETURNING ctid INTO curtid;
+    INSERT INTO fsm_check_size VALUES (num, num, 'b') RETURNING ctid INTO curtid;
     EXIT WHEN curtid >= tid '(4, 0)';
     num = num + 1;
   END LOOP;
@@ -34,8 +56,8 @@ SELECT pg_relation_size('fsm_check_size', 'fsm') AS fsm_size;
 
 -- Add long random string to extend TOAST table to 1 block
 INSERT INTO fsm_check_size
-VALUES(0, (SELECT string_agg(md5(chr(i)), '')
-		   FROM generate_series(1,100) i));
+VALUES(0, 0, (SELECT string_agg(md5(chr(i)), '')
+			  FROM generate_series(1,100) i));
 VACUUM fsm_check_size;
 SELECT pg_relation_size(reltoastrelid, 'main') AS toast_size,
 pg_relation_size(reltoastrelid, 'fsm') AS toast_fsm_size
diff --git a/src/test/regress/parallel_schedule b/src/test/regress/parallel_schedule
index 4051a4a..a956775 100644
--- a/src/test/regress/parallel_schedule
+++ b/src/test/regress/parallel_schedule
@@ -23,7 +23,7 @@ test: numerology
 # ----------
 # The second group of parallel tests
 # ----------
-test: point lseg line box path polygon circle date time timetz timestamp timestamptz interval inet macaddr macaddr8 tstypes
+test: point lseg line box path polygon circle date time timetz timestamp timestamptz interval inet macaddr macaddr8 tstypes fsm
 
 # ----------
 # Another group of parallel tests
@@ -69,12 +69,6 @@ test: create_aggregate create_function_3 create_cast constraints triggers inheri
 test: sanity_check
 
 # ----------
-# fsm does a delete followed by vacuum, and running it in parallel can prevent
-# removal of rows.
-# ----------
-test: fsm
-
-# ----------
 # Believe it or not, select creates a table, subsequent
 # tests need.
 # ----------
diff --git a/src/test/regress/sql/fsm.sql b/src/test/regress/sql/fsm.sql
index 332c3e2..7ba22e5 100644
--- a/src/test/regress/sql/fsm.sql
+++ b/src/test/regress/sql/fsm.sql
@@ -2,10 +2,32 @@
 -- Free Space Map test
 --
 
-CREATE TABLE fsm_check_size (num int, str text);
+CREATE TABLE fsm_check_size (num1 int, num2 int, str text);
 
--- With one block, there should be no FSM
-INSERT INTO fsm_check_size VALUES(1, 'a');
+-- Fill 3 blocks with one record each
+ALTER TABLE fsm_check_size SET (fillfactor=15);
+INSERT INTO fsm_check_size SELECT i, i, rpad('', 1024, 'a')
+FROM generate_series(1,3) i;
+
+-- There should be no FSM
+VACUUM fsm_check_size;
+SELECT pg_relation_size('fsm_check_size', 'main') AS heap_size,
+pg_relation_size('fsm_check_size', 'fsm') AS fsm_size;
+
+-- The following operations are for testing the functionality of the local
+-- in-memory map. In particular, we want to be able to insert into some
+-- other block than the one at the end of the heap, without using a FSM.
+
+-- Fill most of the last block
+ALTER TABLE fsm_check_size SET (fillfactor=100);
+INSERT INTO fsm_check_size SELECT i, i, rpad('', 1024, 'a')
+FROM generate_series(101,105) i;
+
+-- Make sure records can go into any block but the last one
+ALTER TABLE fsm_check_size SET (fillfactor=30);
+
+-- Insert large record and make sure it does not cause the relation to extend
+INSERT INTO fsm_check_size VALUES (111, 111, rpad('', 1024, 'a'));
 
 VACUUM fsm_check_size;
 SELECT pg_relation_size('fsm_check_size', 'main') AS heap_size,
@@ -18,7 +40,7 @@ num int;
 BEGIN
 num = 11;
   LOOP
-    INSERT INTO fsm_check_size VALUES (num, 'b') RETURNING ctid INTO curtid;
+    INSERT INTO fsm_check_size VALUES (num, num, 'b') RETURNING ctid INTO curtid;
     EXIT WHEN curtid >= tid '(4, 0)';
     num = num + 1;
   END LOOP;
@@ -30,8 +52,8 @@ SELECT pg_relation_size('fsm_check_size', 'fsm') AS fsm_size;
 
 -- Add long random string to extend TOAST table to 1 block
 INSERT INTO fsm_check_size
-VALUES(0, (SELECT string_agg(md5(chr(i)), '')
-		   FROM generate_series(1,100) i));
+VALUES(0, 0, (SELECT string_agg(md5(chr(i)), '')
+			  FROM generate_series(1,100) i));
 
 VACUUM fsm_check_size;
 SELECT pg_relation_size(reltoastrelid, 'main') AS toast_size,
-- 
1.8.3.1

#146Alvaro Herrera
alvherre@2ndquadrant.com
In reply to: Amit Kapila (#145)
Re: WIP: Avoid creation of the free space map for small tables

Please remember to keep serial_schedule in sync.

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

#147Amit Kapila
amit.kapila16@gmail.com
In reply to: Alvaro Herrera (#146)
Re: WIP: Avoid creation of the free space map for small tables

On Wed, Feb 20, 2019 at 8:08 PM Alvaro Herrera <alvherre@2ndquadrant.com> wrote:

Please remember to keep serial_schedule in sync.

I don't understand what you mean by this? It is already present in
serial_schedule. In parallel_schedule, we are just moving this test
to one of the parallel groups. Do we need to take care of something
else?

--
With Regards,
Amit Kapila.
EnterpriseDB: http://www.enterprisedb.com

#148Alvaro Herrera
alvherre@2ndquadrant.com
In reply to: Amit Kapila (#147)
Re: WIP: Avoid creation of the free space map for small tables

On 2019-Feb-21, Amit Kapila wrote:

On Wed, Feb 20, 2019 at 8:08 PM Alvaro Herrera <alvherre@2ndquadrant.com> wrote:

Please remember to keep serial_schedule in sync.

I don't understand what you mean by this? It is already present in
serial_schedule. In parallel_schedule, we are just moving this test
to one of the parallel groups. Do we need to take care of something
else?

Just to make sure it's in the same relative position.

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

#149Amit Kapila
amit.kapila16@gmail.com
In reply to: John Naylor (#142)
1 attachment(s)
Re: WIP: Avoid creation of the free space map for small tables

On Mon, Feb 11, 2019 at 10:48 PM John Naylor
<john.naylor@2ndquadrant.com> wrote:

On 2/9/19, Amit Kapila <amit.kapila16@gmail.com> wrote:

On Tue, Feb 5, 2019 at 3:25 PM John Naylor <john.naylor@2ndquadrant.com>
wrote:

On Tue, Feb 5, 2019 at 4:04 AM Amit Kapila <amit.kapila16@gmail.com>
wrote:

This is certainly a good test w.r.t code coverage of new code, but I
have few comments:
1. The size of records in test still depends on alignment (MAXALIGN).
Though it doesn't seem to be a problematic case, I still suggest we
can avoid using records whose size depends on alignment. If you
change the schema as CREATE TABLE fsm_check_size (num1 int, num2 int,
str text);, then you can avoid alignment related issues for the
records being used in test.

Done.

Oops, on again carefully studying the test, I realized my above
comment was wrong. Let me explain with a test this time:
CREATE TABLE fsm_check_size (num int, str text);
INSERT INTO fsm_check_size SELECT i, rpad('', 1024, 'a') FROM
generate_series(1,3) i;

So here you are inserting 4-byte integer and 1024-bytes variable
length record. So the tuple length will be tuple_header (24-bytes) +
4-bytes for integer + 4-bytes header for variable length data + 1024
bytes of actual data. So, the length will be 1056 which is already
MAXALIGN. I took the new comments added in your latest version of the
patch and added them to the previous version of the patch. Kindly
see if I have not missed anything while merging the patch-versions?

--
With Regards,
Amit Kapila.
EnterpriseDB: http://www.enterprisedb.com

Attachments:

v4-0001-Add-more-tests-for-FSM.patchapplication/octet-stream; name=v4-0001-Add-more-tests-for-FSM.patchDownload
From 16d570f3d2ea81ca378e3f2d7f6745db8a511195 Mon Sep 17 00:00:00 2001
From: Amit Kapila <akapila@postgresql.org>
Date: Thu, 21 Feb 2019 11:18:15 +0530
Subject: [PATCH] Add more tests for FSM.

In commit b0eaa4c51bb, we left out a test that used a vacuum to remove dead
rows as the behavior of test was not predictable.  This test has been
rewritten to use fillfactor instead to control free space.  Since we no
longer need to remove dead rows as part of the test, put the fsm regression
test in a parallel group.

Author: John Naylor
Reviewed-by: Amit Kapila
Discussion: https://postgr.es/m/CAA4eK1L=qWp_bJ5aTc9+fy4Ewx2LPaLWY-RbR4a60g_rupCKnQ@mail.gmail.com
---
 src/test/regress/expected/fsm.out  | 28 +++++++++++++++++++++++++---
 src/test/regress/parallel_schedule |  8 +-------
 src/test/regress/sql/fsm.sql       | 26 ++++++++++++++++++++++++--
 3 files changed, 50 insertions(+), 12 deletions(-)

diff --git a/src/test/regress/expected/fsm.out b/src/test/regress/expected/fsm.out
index b029931..81acdf6 100644
--- a/src/test/regress/expected/fsm.out
+++ b/src/test/regress/expected/fsm.out
@@ -2,14 +2,36 @@
 -- Free Space Map test
 --
 CREATE TABLE fsm_check_size (num int, str text);
--- With one block, there should be no FSM
-INSERT INTO fsm_check_size VALUES(1, 'a');
+-- Fill 3 blocks with one record each
+ALTER TABLE fsm_check_size SET (fillfactor=15);
+INSERT INTO fsm_check_size SELECT i, rpad('', 1024, 'a')
+FROM generate_series(1,3) i;
+-- There should be no FSM
 VACUUM fsm_check_size;
 SELECT pg_relation_size('fsm_check_size', 'main') AS heap_size,
 pg_relation_size('fsm_check_size', 'fsm') AS fsm_size;
  heap_size | fsm_size 
 -----------+----------
-      8192 |        0
+     24576 |        0
+(1 row)
+
+-- The following operations are for testing the functionality of the local
+-- in-memory map. In particular, we want to be able to insert into some
+-- other block than the one at the end of the heap, without using a FSM.
+-- Fill most of the last block
+ALTER TABLE fsm_check_size SET (fillfactor=100);
+INSERT INTO fsm_check_size SELECT i, rpad('', 1024, 'a')
+FROM generate_series(101,105) i;
+-- Make sure records can go into any block but the last one
+ALTER TABLE fsm_check_size SET (fillfactor=30);
+-- Insert large record and make sure it does not cause the relation to extend
+INSERT INTO fsm_check_size VALUES (111, rpad('', 1024, 'a'));
+VACUUM fsm_check_size;
+SELECT pg_relation_size('fsm_check_size', 'main') AS heap_size,
+pg_relation_size('fsm_check_size', 'fsm') AS fsm_size;
+ heap_size | fsm_size 
+-----------+----------
+     24576 |        0
 (1 row)
 
 -- Extend table with enough blocks to exceed the FSM threshold
diff --git a/src/test/regress/parallel_schedule b/src/test/regress/parallel_schedule
index 4051a4a..a956775 100644
--- a/src/test/regress/parallel_schedule
+++ b/src/test/regress/parallel_schedule
@@ -23,7 +23,7 @@ test: numerology
 # ----------
 # The second group of parallel tests
 # ----------
-test: point lseg line box path polygon circle date time timetz timestamp timestamptz interval inet macaddr macaddr8 tstypes
+test: point lseg line box path polygon circle date time timetz timestamp timestamptz interval inet macaddr macaddr8 tstypes fsm
 
 # ----------
 # Another group of parallel tests
@@ -69,12 +69,6 @@ test: create_aggregate create_function_3 create_cast constraints triggers inheri
 test: sanity_check
 
 # ----------
-# fsm does a delete followed by vacuum, and running it in parallel can prevent
-# removal of rows.
-# ----------
-test: fsm
-
-# ----------
 # Believe it or not, select creates a table, subsequent
 # tests need.
 # ----------
diff --git a/src/test/regress/sql/fsm.sql b/src/test/regress/sql/fsm.sql
index 332c3e2..1aacec9 100644
--- a/src/test/regress/sql/fsm.sql
+++ b/src/test/regress/sql/fsm.sql
@@ -4,8 +4,30 @@
 
 CREATE TABLE fsm_check_size (num int, str text);
 
--- With one block, there should be no FSM
-INSERT INTO fsm_check_size VALUES(1, 'a');
+-- Fill 3 blocks with one record each
+ALTER TABLE fsm_check_size SET (fillfactor=15);
+INSERT INTO fsm_check_size SELECT i, rpad('', 1024, 'a')
+FROM generate_series(1,3) i;
+
+-- There should be no FSM
+VACUUM fsm_check_size;
+SELECT pg_relation_size('fsm_check_size', 'main') AS heap_size,
+pg_relation_size('fsm_check_size', 'fsm') AS fsm_size;
+
+-- The following operations are for testing the functionality of the local
+-- in-memory map. In particular, we want to be able to insert into some
+-- other block than the one at the end of the heap, without using a FSM.
+
+-- Fill most of the last block
+ALTER TABLE fsm_check_size SET (fillfactor=100);
+INSERT INTO fsm_check_size SELECT i, rpad('', 1024, 'a')
+FROM generate_series(101,105) i;
+
+-- Make sure records can go into any block but the last one
+ALTER TABLE fsm_check_size SET (fillfactor=30);
+
+-- Insert large record and make sure it does not cause the relation to extend
+INSERT INTO fsm_check_size VALUES (111, rpad('', 1024, 'a'));
 
 VACUUM fsm_check_size;
 SELECT pg_relation_size('fsm_check_size', 'main') AS heap_size,
-- 
1.8.3.1

#150John Naylor
john.naylor@2ndquadrant.com
In reply to: Amit Kapila (#149)
Re: WIP: Avoid creation of the free space map for small tables

On Thu, Feb 21, 2019 at 7:58 AM Amit Kapila <amit.kapila16@gmail.com> wrote:

So here you are inserting 4-byte integer and 1024-bytes variable
length record. So the tuple length will be tuple_header (24-bytes) +
4-bytes for integer + 4-bytes header for variable length data + 1024
bytes of actual data. So, the length will be 1056 which is already
MAXALIGN. I took the new comments added in your latest version of the
patch and added them to the previous version of the patch. Kindly
see if I have not missed anything while merging the patch-versions?

OK, that makes sense. Looks fine to me.

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

#151Amit Kapila
amit.kapila16@gmail.com
In reply to: Alvaro Herrera (#148)
1 attachment(s)
Re: WIP: Avoid creation of the free space map for small tables

On Thu, Feb 21, 2019 at 6:39 PM Alvaro Herrera <alvherre@2ndquadrant.com> wrote:

On 2019-Feb-21, Amit Kapila wrote:

On Wed, Feb 20, 2019 at 8:08 PM Alvaro Herrera <alvherre@2ndquadrant.com> wrote:

Please remember to keep serial_schedule in sync.

I don't understand what you mean by this? It is already present in
serial_schedule. In parallel_schedule, we are just moving this test
to one of the parallel groups. Do we need to take care of something
else?

Just to make sure it's in the same relative position.

Okay, thanks for the input. Attached, find the updated patch, will
try to commit it tomorrow unless you or someone else has any other
comments.

--
With Regards,
Amit Kapila.
EnterpriseDB: http://www.enterprisedb.com

Attachments:

v5-0001-Add-more-tests-for-FSM.patchapplication/octet-stream; name=v5-0001-Add-more-tests-for-FSM.patchDownload
From 937dca1faa7ae1bcefbd07ba9098cc410d6ec25b Mon Sep 17 00:00:00 2001
From: Amit Kapila <akapila@postgresql.org>
Date: Thu, 21 Feb 2019 11:18:15 +0530
Subject: [PATCH] Add more tests for FSM.

In commit b0eaa4c51bb, we left out a test that used a vacuum to remove dead
rows as the behavior of test was not predictable.  This test has been
rewritten to use fillfactor instead to control free space.  Since we no
longer need to remove dead rows as part of the test, put the fsm regression
test in a parallel group.

Author: John Naylor
Reviewed-by: Amit Kapila
Discussion: https://postgr.es/m/CAA4eK1L=qWp_bJ5aTc9+fy4Ewx2LPaLWY-RbR4a60g_rupCKnQ@mail.gmail.com
---
 src/test/regress/expected/fsm.out  | 28 +++++++++++++++++++++++++---
 src/test/regress/parallel_schedule |  8 +-------
 src/test/regress/serial_schedule   |  2 +-
 src/test/regress/sql/fsm.sql       | 26 ++++++++++++++++++++++++--
 4 files changed, 51 insertions(+), 13 deletions(-)

diff --git a/src/test/regress/expected/fsm.out b/src/test/regress/expected/fsm.out
index b029931..81acdf6 100644
--- a/src/test/regress/expected/fsm.out
+++ b/src/test/regress/expected/fsm.out
@@ -2,14 +2,36 @@
 -- Free Space Map test
 --
 CREATE TABLE fsm_check_size (num int, str text);
--- With one block, there should be no FSM
-INSERT INTO fsm_check_size VALUES(1, 'a');
+-- Fill 3 blocks with one record each
+ALTER TABLE fsm_check_size SET (fillfactor=15);
+INSERT INTO fsm_check_size SELECT i, rpad('', 1024, 'a')
+FROM generate_series(1,3) i;
+-- There should be no FSM
 VACUUM fsm_check_size;
 SELECT pg_relation_size('fsm_check_size', 'main') AS heap_size,
 pg_relation_size('fsm_check_size', 'fsm') AS fsm_size;
  heap_size | fsm_size 
 -----------+----------
-      8192 |        0
+     24576 |        0
+(1 row)
+
+-- The following operations are for testing the functionality of the local
+-- in-memory map. In particular, we want to be able to insert into some
+-- other block than the one at the end of the heap, without using a FSM.
+-- Fill most of the last block
+ALTER TABLE fsm_check_size SET (fillfactor=100);
+INSERT INTO fsm_check_size SELECT i, rpad('', 1024, 'a')
+FROM generate_series(101,105) i;
+-- Make sure records can go into any block but the last one
+ALTER TABLE fsm_check_size SET (fillfactor=30);
+-- Insert large record and make sure it does not cause the relation to extend
+INSERT INTO fsm_check_size VALUES (111, rpad('', 1024, 'a'));
+VACUUM fsm_check_size;
+SELECT pg_relation_size('fsm_check_size', 'main') AS heap_size,
+pg_relation_size('fsm_check_size', 'fsm') AS fsm_size;
+ heap_size | fsm_size 
+-----------+----------
+     24576 |        0
 (1 row)
 
 -- Extend table with enough blocks to exceed the FSM threshold
diff --git a/src/test/regress/parallel_schedule b/src/test/regress/parallel_schedule
index 4051a4a..a956775 100644
--- a/src/test/regress/parallel_schedule
+++ b/src/test/regress/parallel_schedule
@@ -23,7 +23,7 @@ test: numerology
 # ----------
 # The second group of parallel tests
 # ----------
-test: point lseg line box path polygon circle date time timetz timestamp timestamptz interval inet macaddr macaddr8 tstypes
+test: point lseg line box path polygon circle date time timetz timestamp timestamptz interval inet macaddr macaddr8 tstypes fsm
 
 # ----------
 # Another group of parallel tests
@@ -69,12 +69,6 @@ test: create_aggregate create_function_3 create_cast constraints triggers inheri
 test: sanity_check
 
 # ----------
-# fsm does a delete followed by vacuum, and running it in parallel can prevent
-# removal of rows.
-# ----------
-test: fsm
-
-# ----------
 # Believe it or not, select creates a table, subsequent
 # tests need.
 # ----------
diff --git a/src/test/regress/serial_schedule b/src/test/regress/serial_schedule
index ac1ea62..51b40f5 100644
--- a/src/test/regress/serial_schedule
+++ b/src/test/regress/serial_schedule
@@ -40,6 +40,7 @@ test: inet
 test: macaddr
 test: macaddr8
 test: tstypes
+test: fsm
 test: geometry
 test: horology
 test: regex
@@ -80,7 +81,6 @@ test: roleattributes
 test: create_am
 test: hash_func
 test: sanity_check
-test: fsm
 test: errors
 test: select
 test: select_into
diff --git a/src/test/regress/sql/fsm.sql b/src/test/regress/sql/fsm.sql
index 332c3e2..1aacec9 100644
--- a/src/test/regress/sql/fsm.sql
+++ b/src/test/regress/sql/fsm.sql
@@ -4,8 +4,30 @@
 
 CREATE TABLE fsm_check_size (num int, str text);
 
--- With one block, there should be no FSM
-INSERT INTO fsm_check_size VALUES(1, 'a');
+-- Fill 3 blocks with one record each
+ALTER TABLE fsm_check_size SET (fillfactor=15);
+INSERT INTO fsm_check_size SELECT i, rpad('', 1024, 'a')
+FROM generate_series(1,3) i;
+
+-- There should be no FSM
+VACUUM fsm_check_size;
+SELECT pg_relation_size('fsm_check_size', 'main') AS heap_size,
+pg_relation_size('fsm_check_size', 'fsm') AS fsm_size;
+
+-- The following operations are for testing the functionality of the local
+-- in-memory map. In particular, we want to be able to insert into some
+-- other block than the one at the end of the heap, without using a FSM.
+
+-- Fill most of the last block
+ALTER TABLE fsm_check_size SET (fillfactor=100);
+INSERT INTO fsm_check_size SELECT i, rpad('', 1024, 'a')
+FROM generate_series(101,105) i;
+
+-- Make sure records can go into any block but the last one
+ALTER TABLE fsm_check_size SET (fillfactor=30);
+
+-- Insert large record and make sure it does not cause the relation to extend
+INSERT INTO fsm_check_size VALUES (111, rpad('', 1024, 'a'));
 
 VACUUM fsm_check_size;
 SELECT pg_relation_size('fsm_check_size', 'main') AS heap_size,
-- 
1.8.3.1

#152Alvaro Herrera
alvherre@2ndquadrant.com
In reply to: Amit Kapila (#151)
Re: WIP: Avoid creation of the free space map for small tables

I think this test is going to break on nonstandard block sizes. While
we don't promise that all tests work on such installs (particularly
planner ones), it seems fairly easy to cope with this one -- just use a
record size expressed as a fraction of current_setting('block_size').
So instead of "1024" you'd write current_setting('block_size') / 8.
And then display the relation size in terms of pages, not bytes, so
divide pg_relation_size by block size.

(I see that there was already a motion for this, but was dismissed
because of lack of interest.)

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

#153Amit Kapila
amit.kapila16@gmail.com
In reply to: Alvaro Herrera (#152)
2 attachment(s)
Re: WIP: Avoid creation of the free space map for small tables

On Fri, Feb 22, 2019 at 1:57 AM Alvaro Herrera <alvherre@2ndquadrant.com> wrote:

I think this test is going to break on nonstandard block sizes. While
we don't promise that all tests work on such installs (particularly
planner ones),

The reason for not pushing much on making the test pass for
nonstandard block sizes is that when I tried existing tests, there
were already some failures. For example, see the failures in the
attached regression diff files (for block_size as 16K and 32K
respectively). I saw those failures during the previous
investigation, the situation on HEAD might or might not be exactly the
same. Whereas I see the value in trying to make sure that tests pass
for nonstandard block sizes, but that doesn't seem to be followed for
all the tests.

it seems fairly easy to cope with this one -- just use a
record size expressed as a fraction of current_setting('block_size').
So instead of "1024" you'd write current_setting('block_size') / 8.
And then display the relation size in terms of pages, not bytes, so
divide pg_relation_size by block size.

The idea sounds good. John, would you like to give it a try?

--
With Regards,
Amit Kapila.
EnterpriseDB: http://www.enterprisedb.com

Attachments:

regression.16.diffsapplication/octet-stream; name=regression.16.diffsDownload
--- /home/amitkapila/mywork/pgcommit/postgresql/src/test/modules/brin/expected/summarization-and-inprogress-insertion.out	2019-01-26 17:53:24.743704013 +0530
+++ /home/amitkapila/mywork/pgcommit/postgresql/src/test/modules/brin/output_iso/results/summarization-and-inprogress-insertion.out	2019-01-31 09:54:39.313767412 +0530
@@ -1,39 +1,7 @@
 Parsed test spec with 2 sessions
 
 starting permutation: s2check s1b s2b s1i s2summ s1c s2c s2check
-step s2check: SELECT * FROM brin_page_items(get_raw_page('brinidx', 2), 'brinidx'::regclass);
-itemoffset     blknum         attnum         allnulls       hasnulls       placeholder    value          
+PQconsumeInput failed: server closed the connection unexpectedly
+	This probably means the server terminated abnormally
+	before or while processing the request.
 
-1              0              1              f              f              f              {1 .. 1}       
-step s1b: BEGIN ISOLATION LEVEL REPEATABLE READ;
-step s2b: BEGIN ISOLATION LEVEL REPEATABLE READ; SELECT 1;
-?column?       
-
-1              
-step s1i: INSERT INTO brin_iso VALUES (1000);
-step s2summ: SELECT brin_summarize_new_values('brinidx'::regclass);
-brin_summarize_new_values
-
-1              
-step s1c: COMMIT;
-step s2c: COMMIT;
-step s2check: SELECT * FROM brin_page_items(get_raw_page('brinidx', 2), 'brinidx'::regclass);
-itemoffset     blknum         attnum         allnulls       hasnulls       placeholder    value          
-
-1              0              1              f              f              f              {1 .. 1}       
-2              1              1              f              f              f              {1 .. 1000}    
-
-starting permutation: s2check s1b s1i s2vacuum s1c s2check
-step s2check: SELECT * FROM brin_page_items(get_raw_page('brinidx', 2), 'brinidx'::regclass);
-itemoffset     blknum         attnum         allnulls       hasnulls       placeholder    value          
-
-1              0              1              f              f              f              {1 .. 1}       
-step s1b: BEGIN ISOLATION LEVEL REPEATABLE READ;
-step s1i: INSERT INTO brin_iso VALUES (1000);
-step s2vacuum: VACUUM brin_iso;
-step s1c: COMMIT;
-step s2check: SELECT * FROM brin_page_items(get_raw_page('brinidx', 2), 'brinidx'::regclass);
-itemoffset     blknum         attnum         allnulls       hasnulls       placeholder    value          
-
-1              0              1              f              f              f              {1 .. 1}       
-2              1              1              f              f              f              {1 .. 1000}    

======================================================================

regression.32.diffsapplication/octet-stream; name=regression.32.diffsDownload
--- /home/amitkapila/mywork/pgcommit/postgresql/contrib/amcheck/expected/check_btree.out	2019-01-26 17:53:22.461534128 +0530
+++ /home/amitkapila/mywork/pgcommit/postgresql/contrib/amcheck/results/check_btree.out	2019-01-31 10:05:02.774450203 +0530
@@ -31,119 +31,7 @@
 GRANT EXECUTE ON FUNCTION bt_index_parent_check(regclass, boolean) TO bttest_role;
 SET ROLE bttest_role;
 SELECT bt_index_check('bttest_a_idx');
- bt_index_check 
-----------------
- 
-(1 row)
-
-SELECT bt_index_parent_check('bttest_a_idx');
- bt_index_parent_check 
------------------------
- 
-(1 row)
-
-RESET ROLE;
--- verify plain tables are rejected (error)
-SELECT bt_index_check('bttest_a');
-ERROR:  "bttest_a" is not an index
-SELECT bt_index_parent_check('bttest_a');
-ERROR:  "bttest_a" is not an index
--- verify non-existing indexes are rejected (error)
-SELECT bt_index_check(17);
-ERROR:  could not open relation with OID 17
-SELECT bt_index_parent_check(17);
-ERROR:  could not open relation with OID 17
--- verify wrong index types are rejected (error)
-BEGIN;
-CREATE INDEX bttest_a_brin_idx ON bttest_a USING brin(id);
-SELECT bt_index_parent_check('bttest_a_brin_idx');
-ERROR:  only B-Tree indexes are supported as targets for verification
-DETAIL:  Relation "bttest_a_brin_idx" is not a B-Tree index.
-ROLLBACK;
--- normal check outside of xact
-SELECT bt_index_check('bttest_a_idx');
- bt_index_check 
-----------------
- 
-(1 row)
-
--- more expansive tests
-SELECT bt_index_check('bttest_a_idx', true);
- bt_index_check 
-----------------
- 
-(1 row)
-
-SELECT bt_index_parent_check('bttest_b_idx', true);
- bt_index_parent_check 
------------------------
- 
-(1 row)
-
-BEGIN;
-SELECT bt_index_check('bttest_a_idx');
- bt_index_check 
-----------------
- 
-(1 row)
-
-SELECT bt_index_parent_check('bttest_b_idx');
- bt_index_parent_check 
------------------------
- 
-(1 row)
-
--- make sure we don't have any leftover locks
-SELECT * FROM pg_locks
-WHERE relation = ANY(ARRAY['bttest_a', 'bttest_a_idx', 'bttest_b', 'bttest_b_idx']::regclass[])
-    AND pid = pg_backend_pid();
- locktype | database | relation | page | tuple | virtualxid | transactionid | classid | objid | objsubid | virtualtransaction | pid | mode | granted | fastpath 
-----------+----------+----------+------+-------+------------+---------------+---------+-------+----------+--------------------+-----+------+---------+----------
-(0 rows)
-
-COMMIT;
--- normal check outside of xact for index with included columns
-SELECT bt_index_check('bttest_multi_idx');
- bt_index_check 
-----------------
- 
-(1 row)
-
--- more expansive test for index with included columns
-SELECT bt_index_parent_check('bttest_multi_idx', true);
- bt_index_parent_check 
------------------------
- 
-(1 row)
-
--- repeat expansive test for index built using insertions
-TRUNCATE bttest_multi;
-INSERT INTO bttest_multi SELECT i, i%2  FROM generate_series(1, 100000) as i;
-SELECT bt_index_parent_check('bttest_multi_idx', true);
- bt_index_parent_check 
------------------------
- 
-(1 row)
-
---
--- Test for multilevel page deletion/downlink present checks
---
-INSERT INTO delete_test_table SELECT i, 1, 2, 3 FROM generate_series(1,80000) i;
-ALTER TABLE delete_test_table ADD PRIMARY KEY (a,b,c,d);
-DELETE FROM delete_test_table WHERE a > 40000;
-VACUUM delete_test_table;
-DELETE FROM delete_test_table WHERE a > 10;
-VACUUM delete_test_table;
-SELECT bt_index_parent_check('delete_test_table_pkey', true);
- bt_index_parent_check 
------------------------
- 
-(1 row)
-
--- cleanup
-DROP TABLE bttest_a;
-DROP TABLE bttest_b;
-DROP TABLE bttest_multi;
-DROP TABLE delete_test_table;
-DROP OWNED BY bttest_role; -- permissions
-DROP ROLE bttest_role;
+server closed the connection unexpectedly
+	This probably means the server terminated abnormally
+	before or while processing the request.
+connection to server was lost

======================================================================

#154Robert Haas
robertmhaas@gmail.com
In reply to: Amit Kapila (#153)
Re: WIP: Avoid creation of the free space map for small tables

On Thu, Feb 21, 2019 at 9:59 PM Amit Kapila <amit.kapila16@gmail.com> wrote:

The reason for not pushing much on making the test pass for
nonstandard block sizes is that when I tried existing tests, there
were already some failures.

Sure, but let's not make things worse.

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

#155Alvaro Herrera
alvherre@2ndquadrant.com
In reply to: Amit Kapila (#153)
Re: WIP: Avoid creation of the free space map for small tables

On 2019-Feb-22, Amit Kapila wrote:

On Fri, Feb 22, 2019 at 1:57 AM Alvaro Herrera <alvherre@2ndquadrant.com> wrote:

I think this test is going to break on nonstandard block sizes. While
we don't promise that all tests work on such installs (particularly
planner ones),

The reason for not pushing much on making the test pass for
nonstandard block sizes is that when I tried existing tests, there
were already some failures. For example, see the failures in the
attached regression diff files (for block_size as 16K and 32K
respectively). I saw those failures during the previous
investigation, the situation on HEAD might or might not be exactly the
same. Whereas I see the value in trying to make sure that tests pass
for nonstandard block sizes, but that doesn't seem to be followed for
all the tests.

Wow, there's a lot less tests failing there than I thought there would
be. That increases hope that we can someday have them pass. +1 on not
making things worse.

I think the crash in the amcheck test should be studied, one way or
another; CCing Peter.

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

In reply to: Alvaro Herrera (#155)
Re: WIP: Avoid creation of the free space map for small tables

On Fri, Feb 22, 2019 at 8:04 AM Alvaro Herrera <alvherre@2ndquadrant.com> wrote:

Wow, there's a lot less tests failing there than I thought there would
be. That increases hope that we can someday have them pass. +1 on not
making things worse.

I think the crash in the amcheck test should be studied, one way or
another; CCing Peter.

I built Postgres with "--with-blocksize=16" and "--with-blocksize=32",
and tested amcheck with both builds. All tests passed.

I have a hard time imagining what the problem could be here. If there
was a problem with amcheck relying on there being an 8KiB block size
specifically, then it would almost certainly have been there since the
initial commit from March 2017. Not much has changed since then, and
the crash that Amit reported occurs at the earliest possible point.

I find it suspicious that there is another crash in pageinspect's
brin_page_items(), since like amcheck, pageinspect is a contrib module
that relies on BLCKSZ when allocating a local temp buffer.

--
Peter Geoghegan

#157Alvaro Herrera
alvherre@2ndquadrant.com
In reply to: Peter Geoghegan (#156)
Re: WIP: Avoid creation of the free space map for small tables

On 2019-Feb-22, Peter Geoghegan wrote:

I find it suspicious that there is another crash in pageinspect's
brin_page_items(), since like amcheck, pageinspect is a contrib module
that relies on BLCKSZ when allocating a local temp buffer.

Ah. Maybe they just weren't rebuilt.

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

#158John Naylor
john.naylor@2ndquadrant.com
In reply to: Alvaro Herrera (#152)
1 attachment(s)
Re: WIP: Avoid creation of the free space map for small tables

On Thu, Feb 21, 2019 at 9:27 PM Alvaro Herrera <alvherre@2ndquadrant.com> wrote:

I think this test is going to break on nonstandard block sizes. While
we don't promise that all tests work on such installs (particularly
planner ones), it seems fairly easy to cope with this one -- just use a
record size expressed as a fraction of current_setting('block_size').
So instead of "1024" you'd write current_setting('block_size') / 8.
And then display the relation size in terms of pages, not bytes, so
divide pg_relation_size by block size.

I've done this for v6, tested on 16k block size.

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

Attachments:

v6-0001-Add-more-tests-for-FSM.patchtext/x-patch; charset=US-ASCII; name=v6-0001-Add-more-tests-for-FSM.patchDownload
From 157f74155beb53c455b0a85b6eebdd22a60ce5f5 Mon Sep 17 00:00:00 2001
From: John Naylor <jcnaylor@gmail.com>
Date: Sat, 23 Feb 2019 08:48:31 +0100
Subject: [PATCH v6] Add more tests for FSM.

In commit b0eaa4c51bb, we left out a test that used a vacuum to remove dead
rows as the behavior of test was not predictable.  This test has been
rewritten to use fillfactor instead to control free space.  Since we no
longer need to remove dead rows as part of the test, put the fsm regression
test in a parallel group.
---
 src/test/regress/expected/fsm.out  | 59 +++++++++++++++++++++---------
 src/test/regress/parallel_schedule |  8 +---
 src/test/regress/serial_schedule   |  2 +-
 src/test/regress/sql/fsm.sql       | 41 +++++++++++++++++----
 4 files changed, 77 insertions(+), 33 deletions(-)

diff --git a/src/test/regress/expected/fsm.out b/src/test/regress/expected/fsm.out
index b02993188c..698d4b0be5 100644
--- a/src/test/regress/expected/fsm.out
+++ b/src/test/regress/expected/fsm.out
@@ -1,15 +1,40 @@
 --
 -- Free Space Map test
 --
+SELECT current_setting('block_size')::integer AS blocksize,
+current_setting('block_size')::integer / 8 AS strsize
+\gset
 CREATE TABLE fsm_check_size (num int, str text);
--- With one block, there should be no FSM
-INSERT INTO fsm_check_size VALUES(1, 'a');
+-- Fill 3 blocks with one record each
+ALTER TABLE fsm_check_size SET (fillfactor=15);
+INSERT INTO fsm_check_size SELECT i, rpad('', :strsize, 'a')
+FROM generate_series(1,3) i;
+-- There should be no FSM
 VACUUM fsm_check_size;
-SELECT pg_relation_size('fsm_check_size', 'main') AS heap_size,
-pg_relation_size('fsm_check_size', 'fsm') AS fsm_size;
- heap_size | fsm_size 
------------+----------
-      8192 |        0
+SELECT pg_relation_size('fsm_check_size', 'main') / :blocksize AS heap_nblocks,
+pg_relation_size('fsm_check_size', 'fsm') / :blocksize AS fsm_nblocks;
+ heap_nblocks | fsm_nblocks 
+--------------+-------------
+            3 |           0
+(1 row)
+
+-- The following operations are for testing the functionality of the local
+-- in-memory map. In particular, we want to be able to insert into some
+-- other block than the one at the end of the heap, without using a FSM.
+-- Fill most of the last block
+ALTER TABLE fsm_check_size SET (fillfactor=100);
+INSERT INTO fsm_check_size SELECT i, rpad('', :strsize, 'a')
+FROM generate_series(101,105) i;
+-- Make sure records can go into any block but the last one
+ALTER TABLE fsm_check_size SET (fillfactor=30);
+-- Insert large record and make sure it does not cause the relation to extend
+INSERT INTO fsm_check_size VALUES (111, rpad('', :strsize, 'a'));
+VACUUM fsm_check_size;
+SELECT pg_relation_size('fsm_check_size', 'main') / :blocksize AS heap_nblocks,
+pg_relation_size('fsm_check_size', 'fsm') / :blocksize AS fsm_nblocks;
+ heap_nblocks | fsm_nblocks 
+--------------+-------------
+            3 |           0
 (1 row)
 
 -- Extend table with enough blocks to exceed the FSM threshold
@@ -26,23 +51,23 @@ num = 11;
 END;
 $$;
 VACUUM fsm_check_size;
-SELECT pg_relation_size('fsm_check_size', 'fsm') AS fsm_size;
- fsm_size 
-----------
-    24576
+SELECT pg_relation_size('fsm_check_size', 'fsm') / :blocksize AS fsm_nblocks;
+ fsm_nblocks 
+-------------
+           3
 (1 row)
 
 -- Add long random string to extend TOAST table to 1 block
 INSERT INTO fsm_check_size
 VALUES(0, (SELECT string_agg(md5(chr(i)), '')
-		   FROM generate_series(1,100) i));
+		   FROM generate_series(1, :blocksize / 100) i));
 VACUUM fsm_check_size;
-SELECT pg_relation_size(reltoastrelid, 'main') AS toast_size,
-pg_relation_size(reltoastrelid, 'fsm') AS toast_fsm_size
+SELECT pg_relation_size(reltoastrelid, 'main') / :blocksize AS toast_nblocks,
+pg_relation_size(reltoastrelid, 'fsm') / :blocksize AS toast_fsm_nblocks
 FROM pg_class WHERE relname = 'fsm_check_size';
- toast_size | toast_fsm_size 
-------------+----------------
-       8192 |              0
+ toast_nblocks | toast_fsm_nblocks 
+---------------+-------------------
+             1 |                 0
 (1 row)
 
 DROP TABLE fsm_check_size;
diff --git a/src/test/regress/parallel_schedule b/src/test/regress/parallel_schedule
index 4051a4ad4e..a956775dd1 100644
--- a/src/test/regress/parallel_schedule
+++ b/src/test/regress/parallel_schedule
@@ -23,7 +23,7 @@ test: numerology
 # ----------
 # The second group of parallel tests
 # ----------
-test: point lseg line box path polygon circle date time timetz timestamp timestamptz interval inet macaddr macaddr8 tstypes
+test: point lseg line box path polygon circle date time timetz timestamp timestamptz interval inet macaddr macaddr8 tstypes fsm
 
 # ----------
 # Another group of parallel tests
@@ -68,12 +68,6 @@ test: create_aggregate create_function_3 create_cast constraints triggers inheri
 # ----------
 test: sanity_check
 
-# ----------
-# fsm does a delete followed by vacuum, and running it in parallel can prevent
-# removal of rows.
-# ----------
-test: fsm
-
 # ----------
 # Believe it or not, select creates a table, subsequent
 # tests need.
diff --git a/src/test/regress/serial_schedule b/src/test/regress/serial_schedule
index ac1ea622d6..51b40f53db 100644
--- a/src/test/regress/serial_schedule
+++ b/src/test/regress/serial_schedule
@@ -40,6 +40,7 @@ test: inet
 test: macaddr
 test: macaddr8
 test: tstypes
+test: fsm
 test: geometry
 test: horology
 test: regex
@@ -80,7 +81,6 @@ test: roleattributes
 test: create_am
 test: hash_func
 test: sanity_check
-test: fsm
 test: errors
 test: select
 test: select_into
diff --git a/src/test/regress/sql/fsm.sql b/src/test/regress/sql/fsm.sql
index 332c3e2b2d..7295e0439b 100644
--- a/src/test/regress/sql/fsm.sql
+++ b/src/test/regress/sql/fsm.sql
@@ -1,15 +1,40 @@
 --
 -- Free Space Map test
 --
+SELECT current_setting('block_size')::integer AS blocksize,
+current_setting('block_size')::integer / 8 AS strsize
+\gset
 
 CREATE TABLE fsm_check_size (num int, str text);
 
--- With one block, there should be no FSM
-INSERT INTO fsm_check_size VALUES(1, 'a');
+-- Fill 3 blocks with one record each
+ALTER TABLE fsm_check_size SET (fillfactor=15);
+INSERT INTO fsm_check_size SELECT i, rpad('', :strsize, 'a')
+FROM generate_series(1,3) i;
 
+-- There should be no FSM
 VACUUM fsm_check_size;
-SELECT pg_relation_size('fsm_check_size', 'main') AS heap_size,
-pg_relation_size('fsm_check_size', 'fsm') AS fsm_size;
+SELECT pg_relation_size('fsm_check_size', 'main') / :blocksize AS heap_nblocks,
+pg_relation_size('fsm_check_size', 'fsm') / :blocksize AS fsm_nblocks;
+
+-- The following operations are for testing the functionality of the local
+-- in-memory map. In particular, we want to be able to insert into some
+-- other block than the one at the end of the heap, without using a FSM.
+
+-- Fill most of the last block
+ALTER TABLE fsm_check_size SET (fillfactor=100);
+INSERT INTO fsm_check_size SELECT i, rpad('', :strsize, 'a')
+FROM generate_series(101,105) i;
+
+-- Make sure records can go into any block but the last one
+ALTER TABLE fsm_check_size SET (fillfactor=30);
+
+-- Insert large record and make sure it does not cause the relation to extend
+INSERT INTO fsm_check_size VALUES (111, rpad('', :strsize, 'a'));
+
+VACUUM fsm_check_size;
+SELECT pg_relation_size('fsm_check_size', 'main') / :blocksize AS heap_nblocks,
+pg_relation_size('fsm_check_size', 'fsm') / :blocksize AS fsm_nblocks;
 
 -- Extend table with enough blocks to exceed the FSM threshold
 DO $$
@@ -26,16 +51,16 @@ END;
 $$;
 
 VACUUM fsm_check_size;
-SELECT pg_relation_size('fsm_check_size', 'fsm') AS fsm_size;
+SELECT pg_relation_size('fsm_check_size', 'fsm') / :blocksize AS fsm_nblocks;
 
 -- Add long random string to extend TOAST table to 1 block
 INSERT INTO fsm_check_size
 VALUES(0, (SELECT string_agg(md5(chr(i)), '')
-		   FROM generate_series(1,100) i));
+		   FROM generate_series(1, :blocksize / 100) i));
 
 VACUUM fsm_check_size;
-SELECT pg_relation_size(reltoastrelid, 'main') AS toast_size,
-pg_relation_size(reltoastrelid, 'fsm') AS toast_fsm_size
+SELECT pg_relation_size(reltoastrelid, 'main') / :blocksize AS toast_nblocks,
+pg_relation_size(reltoastrelid, 'fsm') / :blocksize AS toast_fsm_nblocks
 FROM pg_class WHERE relname = 'fsm_check_size';
 
 DROP TABLE fsm_check_size;
-- 
2.17.1

#159John Naylor
john.naylor@2ndquadrant.com
In reply to: Amit Kapila (#153)
1 attachment(s)
Re: WIP: Avoid creation of the free space map for small tables

On Fri, Feb 22, 2019 at 3:59 AM Amit Kapila <amit.kapila16@gmail.com> wrote:

The reason for not pushing much on making the test pass for
nonstandard block sizes is that when I tried existing tests, there
were already some failures.

FWIW, I currently see 8 failures (attached).

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

Attachments:

jcn-16blk-regress.diffsapplication/octet-stream; name=jcn-16blk-regress.diffsDownload
diff -U3 /home/john/pgdev/postgresql/src/test/regress/expected/strings.out ./results/strings.out
--- /home/john/pgdev/postgresql/src/test/regress/expected/strings.out	2018-09-13 08:58:51.264376078 +0200
+++ ./results/strings.out	2019-02-23 08:47:03.579869203 +0100
@@ -1193,7 +1193,7 @@
 select 0 = pg_relation_size('pg_toast.pg_toast_'||(select oid from pg_class where relname = 'toasttest'))/current_setting('block_size')::integer as blocks;
  blocks 
 --------
- f
+ t
 (1 row)
 
 TRUNCATE TABLE toasttest;
diff -U3 /home/john/pgdev/postgresql/src/test/regress/expected/join.out ./results/join.out
--- /home/john/pgdev/postgresql/src/test/regress/expected/join.out	2019-02-23 05:36:00.386251656 +0100
+++ ./results/join.out	2019-02-23 08:47:32.828085898 +0100
@@ -6512,18 +6512,17 @@
 set local enable_parallel_hash = on;
 explain (costs off)
   select count(*) from simple r join extremely_skewed s using (id);
-                              QUERY PLAN                               
------------------------------------------------------------------------
- Finalize Aggregate
+                           QUERY PLAN                            
+-----------------------------------------------------------------
+ Aggregate
    ->  Gather
          Workers Planned: 1
-         ->  Partial Aggregate
-               ->  Parallel Hash Join
-                     Hash Cond: (r.id = s.id)
-                     ->  Parallel Seq Scan on simple r
-                     ->  Parallel Hash
-                           ->  Parallel Seq Scan on extremely_skewed s
-(9 rows)
+         ->  Parallel Hash Join
+               Hash Cond: (r.id = s.id)
+               ->  Parallel Seq Scan on simple r
+               ->  Parallel Hash
+                     ->  Parallel Seq Scan on extremely_skewed s
+(8 rows)
 
 select count(*) from simple r join extremely_skewed s using (id);
  count 
diff -U3 /home/john/pgdev/postgresql/src/test/regress/expected/rowsecurity.out ./results/rowsecurity.out
--- /home/john/pgdev/postgresql/src/test/regress/expected/rowsecurity.out	2019-02-23 05:35:46.818049575 +0100
+++ ./results/rowsecurity.out	2019-02-23 08:47:36.128110359 +0100
@@ -275,17 +275,17 @@
 (5 rows)
 
 EXPLAIN (COSTS OFF) SELECT * FROM document NATURAL JOIN category WHERE f_leak(dtitle);
-                        QUERY PLAN                         
------------------------------------------------------------
+                     QUERY PLAN                      
+-----------------------------------------------------
  Hash Join
-   Hash Cond: (category.cid = document.cid)
+   Hash Cond: (document.cid = category.cid)
    InitPlan 1 (returns $0)
      ->  Index Scan using uaccount_pkey on uaccount
            Index Cond: (pguser = CURRENT_USER)
-   ->  Seq Scan on category
+   ->  Seq Scan on document
+         Filter: ((dlevel <= $0) AND f_leak(dtitle))
    ->  Hash
-         ->  Seq Scan on document
-               Filter: ((dlevel <= $0) AND f_leak(dtitle))
+         ->  Seq Scan on category
 (9 rows)
 
 -- viewpoint from regress_rls_dave
@@ -339,18 +339,17 @@
 (5 rows)
 
 EXPLAIN (COSTS OFF) SELECT * FROM document NATURAL JOIN category WHERE f_leak(dtitle);
-                                                QUERY PLAN                                                
-----------------------------------------------------------------------------------------------------------
- Hash Join
-   Hash Cond: (category.cid = document.cid)
+                                             QUERY PLAN                                             
+----------------------------------------------------------------------------------------------------
+ Nested Loop
    InitPlan 1 (returns $0)
      ->  Index Scan using uaccount_pkey on uaccount
            Index Cond: (pguser = CURRENT_USER)
-   ->  Seq Scan on category
-   ->  Hash
-         ->  Seq Scan on document
-               Filter: ((cid <> 44) AND (cid <> 44) AND (cid < 50) AND (dlevel <= $0) AND f_leak(dtitle))
-(9 rows)
+   ->  Seq Scan on document
+         Filter: ((cid <> 44) AND (cid <> 44) AND (cid < 50) AND (dlevel <= $0) AND f_leak(dtitle))
+   ->  Index Scan using category_pkey on category
+         Index Cond: (cid = document.cid)
+(8 rows)
 
 -- 44 would technically fail for both p2r and p1r, but we should get an error
 -- back from p1r for this because it sorts first
diff -U3 /home/john/pgdev/postgresql/src/test/regress/expected/tablesample.out ./results/tablesample.out
--- /home/john/pgdev/postgresql/src/test/regress/expected/tablesample.out	2018-08-31 11:51:27.663052452 +0200
+++ ./results/tablesample.out	2019-02-23 08:47:33.644091947 +0100
@@ -5,13 +5,11 @@
 SELECT t.id FROM test_tablesample AS t TABLESAMPLE SYSTEM (50) REPEATABLE (0);
  id 
 ----
-  3
-  4
-  5
   6
   7
   8
-(6 rows)
+  9
+(4 rows)
 
 SELECT id FROM test_tablesample TABLESAMPLE SYSTEM (100.0/11) REPEATABLE (0);
  id 
@@ -21,29 +19,27 @@
 SELECT id FROM test_tablesample TABLESAMPLE SYSTEM (50) REPEATABLE (0);
  id 
 ----
-  3
-  4
-  5
   6
   7
   8
-(6 rows)
+  9
+(4 rows)
 
 SELECT id FROM test_tablesample TABLESAMPLE BERNOULLI (50) REPEATABLE (0);
  id 
 ----
+  3
   4
   5
-  6
   7
   8
-(5 rows)
+  9
+(6 rows)
 
 SELECT id FROM test_tablesample TABLESAMPLE BERNOULLI (5.5) REPEATABLE (0);
  id 
 ----
-  7
-(1 row)
+(0 rows)
 
 -- 100% should give repeatable count results (ie, all rows) in any case
 SELECT count(*) FROM test_tablesample TABLESAMPLE SYSTEM (100);
@@ -93,85 +89,79 @@
 FETCH FIRST FROM tablesample_cur;
  id 
 ----
-  3
+  6
 (1 row)
 
 FETCH NEXT FROM tablesample_cur;
  id 
 ----
-  4
+  7
 (1 row)
 
 FETCH NEXT FROM tablesample_cur;
  id 
 ----
-  5
+  8
 (1 row)
 
 SELECT id FROM test_tablesample TABLESAMPLE SYSTEM (50) REPEATABLE (0);
  id 
 ----
-  3
-  4
-  5
   6
   7
   8
-(6 rows)
+  9
+(4 rows)
 
 FETCH NEXT FROM tablesample_cur;
  id 
 ----
-  6
+  9
 (1 row)
 
 FETCH NEXT FROM tablesample_cur;
  id 
 ----
-  7
-(1 row)
+(0 rows)
 
 FETCH NEXT FROM tablesample_cur;
  id 
 ----
-  8
-(1 row)
+(0 rows)
 
 FETCH FIRST FROM tablesample_cur;
  id 
 ----
-  3
+  6
 (1 row)
 
 FETCH NEXT FROM tablesample_cur;
  id 
 ----
-  4
+  7
 (1 row)
 
 FETCH NEXT FROM tablesample_cur;
  id 
 ----
-  5
+  8
 (1 row)
 
 FETCH NEXT FROM tablesample_cur;
  id 
 ----
-  6
+  9
 (1 row)
 
 FETCH NEXT FROM tablesample_cur;
  id 
 ----
-  7
-(1 row)
+(0 rows)
 
 FETCH NEXT FROM tablesample_cur;
  id 
 ----
-  8
-(1 row)
+(0 rows)
 
 CLOSE tablesample_cur;
 END;
diff -U3 /home/john/pgdev/postgresql/src/test/regress/expected/select_views.out ./results/select_views.out
--- /home/john/pgdev/postgresql/src/test/regress/expected/select_views.out	2019-01-16 20:30:14.221863624 +0100
+++ ./results/select_views.out	2019-02-23 08:47:43.464164742 +0100
@@ -1492,11 +1492,11 @@
 ------------------------------------------------------------------------------------
  Subquery Scan on my_credit_card_usage_secure
    Filter: f_leak(my_credit_card_usage_secure.cnum)
-   ->  Nested Loop
-         Join Filter: (l.cid = r.cid)
+   ->  Hash Join
+         Hash Cond: (r.cid = l.cid)
          ->  Seq Scan on credit_usage r
                Filter: ((ymd >= '10-01-2011'::date) AND (ymd < '11-01-2011'::date))
-         ->  Materialize
+         ->  Hash
                ->  Hash Join
                      Hash Cond: (r_1.cid = l.cid)
                      ->  Seq Scan on credit_card r_1
diff -U3 /home/john/pgdev/postgresql/src/test/regress/expected/indirect_toast.out ./results/indirect_toast.out
--- /home/john/pgdev/postgresql/src/test/regress/expected/indirect_toast.out	2018-08-31 11:51:27.635053701 +0200
+++ ./results/indirect_toast.out	2019-02-23 08:47:44.208170258 +0100
@@ -48,17 +48,17 @@
 ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
  (two-compressed,4,-1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901
  (two-toasted,4,-1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234
- ("one-compressed,one-null",4,,12345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
  ("one-toasted,one-null",4,,12345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123
+ ("one-compressed,one-null",4,,12345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
 (4 rows)
 
 SELECT substring(indtoasttest::text, 1, 200) FROM indtoasttest;
                                                                                                 substring                                                                                                 
 ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
+ ("one-toasted,one-null",4,,12345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123
  (two-compressed,4,-1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901
  (two-toasted,4,-1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234
  ("one-compressed,one-null",4,,12345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
- ("one-toasted,one-null",4,,12345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123
 (4 rows)
 
 -- check we didn't screw with main/toast tuple visibility
@@ -66,10 +66,10 @@
 SELECT substring(indtoasttest::text, 1, 200) FROM indtoasttest;
                                                                                                 substring                                                                                                 
 ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
+ ("one-toasted,one-null",4,,12345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123
  (two-compressed,4,-1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901
  (two-toasted,4,-1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234
  ("one-compressed,one-null",4,,12345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
- ("one-toasted,one-null",4,,12345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123
 (4 rows)
 
 -- now create a trigger that forces all Datums to be indirect ones
@@ -89,49 +89,49 @@
 UPDATE indtoasttest SET cnt = cnt +1 RETURNING substring(indtoasttest::text, 1, 200);
                                                                                                 substring                                                                                                 
 ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
+ ("one-toasted,one-null",5,,12345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123
  (two-compressed,5,-1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901
  (two-toasted,5,-1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234
  ("one-compressed,one-null",5,,12345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
- ("one-toasted,one-null",5,,12345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123
 (4 rows)
 
 -- modification without modifying assigned value
 UPDATE indtoasttest SET cnt = cnt +1, f1 = f1 RETURNING substring(indtoasttest::text, 1, 200);
                                                                                                 substring                                                                                                 
 ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
+ ("one-toasted,one-null",6,,12345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123
  (two-compressed,6,-1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901
  (two-toasted,6,-1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234
  ("one-compressed,one-null",6,,12345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
- ("one-toasted,one-null",6,,12345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123
 (4 rows)
 
 -- modification modifying, but effectively not changing
 UPDATE indtoasttest SET cnt = cnt +1, f1 = f1||'' RETURNING substring(indtoasttest::text, 1, 200);
                                                                                                 substring                                                                                                 
 ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
+ ("one-toasted,one-null",7,,12345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123
  (two-compressed,7,-1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901
  (two-toasted,7,-1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234
  ("one-compressed,one-null",7,,12345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
- ("one-toasted,one-null",7,,12345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123
 (4 rows)
 
 UPDATE indtoasttest SET cnt = cnt +1, f1 = '-'||f1||'-' RETURNING substring(indtoasttest::text, 1, 200);
                                                                                                 substring                                                                                                 
 ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
+ ("one-toasted,one-null",8,,12345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123
  (two-compressed,8,--123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
- (two-toasted,8,--123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123
  ("one-compressed,one-null",8,,12345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
- ("one-toasted,one-null",8,,12345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123
+ (two-toasted,8,--123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123
 (4 rows)
 
 INSERT INTO indtoasttest(descr, f1, f2) VALUES('one-toasted,one-null, via indirect', repeat('1234567890',30000), NULL);
 SELECT substring(indtoasttest::text, 1, 200) FROM indtoasttest;
                                                                                                 substring                                                                                                 
 ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
+ ("one-toasted,one-null",8,,12345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123
  (two-compressed,8,--123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
- (two-toasted,8,--123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123
  ("one-compressed,one-null",8,,12345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
- ("one-toasted,one-null",8,,12345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123
+ (two-toasted,8,--123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123
  ("one-toasted,one-null, via indirect",0,1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
 (5 rows)
 
@@ -140,10 +140,10 @@
 SELECT substring(indtoasttest::text, 1, 200) FROM indtoasttest;
                                                                                                 substring                                                                                                 
 ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
+ ("one-toasted,one-null",8,,12345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123
  (two-compressed,8,--123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
- (two-toasted,8,--123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123
  ("one-compressed,one-null",8,,12345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
- ("one-toasted,one-null",8,,12345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123
+ (two-toasted,8,--123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123
  ("one-toasted,one-null, via indirect",0,1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
 (5 rows)
 
diff -U3 /home/john/pgdev/postgresql/src/test/regress/expected/partition_join.out ./results/partition_join.out
--- /home/john/pgdev/postgresql/src/test/regress/expected/partition_join.out	2019-02-13 08:22:54.706084265 +0100
+++ ./results/partition_join.out	2019-02-23 08:47:51.160221805 +0100
@@ -1963,17 +1963,17 @@
                         QUERY PLAN                        
 ----------------------------------------------------------
  Hash Join
-   Hash Cond: (t2.c = (t1.c)::text)
+   Hash Cond: (t3.c = (t1.c)::text)
    ->  Append
-         ->  Seq Scan on prt2_n_p1 t2
-         ->  Seq Scan on prt2_n_p2 t2_1
+         ->  Seq Scan on plt1_p1 t3
+         ->  Seq Scan on plt1_p2 t3_1
+         ->  Seq Scan on plt1_p3 t3_2
    ->  Hash
          ->  Hash Join
-               Hash Cond: (t3.c = (t1.c)::text)
+               Hash Cond: (t2.c = (t1.c)::text)
                ->  Append
-                     ->  Seq Scan on plt1_p1 t3
-                     ->  Seq Scan on plt1_p2 t3_1
-                     ->  Seq Scan on plt1_p3 t3_2
+                     ->  Seq Scan on prt2_n_p1 t2
+                     ->  Seq Scan on prt2_n_p2 t2_1
                ->  Hash
                      ->  Append
                            ->  Seq Scan on prt1_n_p1 t1
diff -U3 /home/john/pgdev/postgresql/src/test/regress/expected/partition_aggregate.out ./results/partition_aggregate.out
--- /home/john/pgdev/postgresql/src/test/regress/expected/partition_aggregate.out	2018-09-01 04:40:51.641715296 +0200
+++ ./results/partition_aggregate.out	2019-02-23 08:47:51.696225780 +0100
@@ -963,36 +963,34 @@
 -- is not partial agg safe.
 EXPLAIN (COSTS OFF)
 SELECT a, sum(b), array_agg(distinct c), count(*) FROM pagg_tab_ml GROUP BY a HAVING avg(b) < 3 ORDER BY 1, 2, 3;
-                                               QUERY PLAN                                               
---------------------------------------------------------------------------------------------------------
+                                          QUERY PLAN                                           
+-----------------------------------------------------------------------------------------------
  Sort
-   Sort Key: pagg_tab_ml_p2_s1.a, (sum(pagg_tab_ml_p2_s1.b)), (array_agg(DISTINCT pagg_tab_ml_p2_s1.c))
-   ->  Gather
-         Workers Planned: 2
-         ->  Parallel Append
-               ->  GroupAggregate
-                     Group Key: pagg_tab_ml_p2_s1.a
-                     Filter: (avg(pagg_tab_ml_p2_s1.b) < '3'::numeric)
-                     ->  Sort
-                           Sort Key: pagg_tab_ml_p2_s1.a
-                           ->  Append
-                                 ->  Seq Scan on pagg_tab_ml_p2_s1
-                                 ->  Seq Scan on pagg_tab_ml_p2_s2
-               ->  GroupAggregate
-                     Group Key: pagg_tab_ml_p3_s1.a
-                     Filter: (avg(pagg_tab_ml_p3_s1.b) < '3'::numeric)
-                     ->  Sort
-                           Sort Key: pagg_tab_ml_p3_s1.a
-                           ->  Append
-                                 ->  Seq Scan on pagg_tab_ml_p3_s1
-                                 ->  Seq Scan on pagg_tab_ml_p3_s2
-               ->  GroupAggregate
-                     Group Key: pagg_tab_ml_p1.a
-                     Filter: (avg(pagg_tab_ml_p1.b) < '3'::numeric)
-                     ->  Sort
-                           Sort Key: pagg_tab_ml_p1.a
-                           ->  Seq Scan on pagg_tab_ml_p1
-(27 rows)
+   Sort Key: pagg_tab_ml_p1.a, (sum(pagg_tab_ml_p1.b)), (array_agg(DISTINCT pagg_tab_ml_p1.c))
+   ->  Append
+         ->  GroupAggregate
+               Group Key: pagg_tab_ml_p1.a
+               Filter: (avg(pagg_tab_ml_p1.b) < '3'::numeric)
+               ->  Sort
+                     Sort Key: pagg_tab_ml_p1.a
+                     ->  Seq Scan on pagg_tab_ml_p1
+         ->  GroupAggregate
+               Group Key: pagg_tab_ml_p2_s1.a
+               Filter: (avg(pagg_tab_ml_p2_s1.b) < '3'::numeric)
+               ->  Sort
+                     Sort Key: pagg_tab_ml_p2_s1.a
+                     ->  Append
+                           ->  Seq Scan on pagg_tab_ml_p2_s1
+                           ->  Seq Scan on pagg_tab_ml_p2_s2
+         ->  GroupAggregate
+               Group Key: pagg_tab_ml_p3_s1.a
+               Filter: (avg(pagg_tab_ml_p3_s1.b) < '3'::numeric)
+               ->  Sort
+                     Sort Key: pagg_tab_ml_p3_s1.a
+                     ->  Append
+                           ->  Seq Scan on pagg_tab_ml_p3_s1
+                           ->  Seq Scan on pagg_tab_ml_p3_s2
+(25 rows)
 
 SELECT a, sum(b), array_agg(distinct c), count(*) FROM pagg_tab_ml GROUP BY a HAVING avg(b) < 3 ORDER BY 1, 2, 3;
  a  | sum  |  array_agg  | count 
@@ -1011,34 +1009,32 @@
 -- Without ORDER BY clause, to test Gather at top-most path
 EXPLAIN (COSTS OFF)
 SELECT a, sum(b), array_agg(distinct c), count(*) FROM pagg_tab_ml GROUP BY a HAVING avg(b) < 3;
-                           QUERY PLAN                            
------------------------------------------------------------------
- Gather
-   Workers Planned: 2
-   ->  Parallel Append
-         ->  GroupAggregate
-               Group Key: pagg_tab_ml_p2_s1.a
-               Filter: (avg(pagg_tab_ml_p2_s1.b) < '3'::numeric)
-               ->  Sort
-                     Sort Key: pagg_tab_ml_p2_s1.a
-                     ->  Append
-                           ->  Seq Scan on pagg_tab_ml_p2_s1
-                           ->  Seq Scan on pagg_tab_ml_p2_s2
-         ->  GroupAggregate
-               Group Key: pagg_tab_ml_p3_s1.a
-               Filter: (avg(pagg_tab_ml_p3_s1.b) < '3'::numeric)
-               ->  Sort
-                     Sort Key: pagg_tab_ml_p3_s1.a
-                     ->  Append
-                           ->  Seq Scan on pagg_tab_ml_p3_s1
-                           ->  Seq Scan on pagg_tab_ml_p3_s2
-         ->  GroupAggregate
-               Group Key: pagg_tab_ml_p1.a
-               Filter: (avg(pagg_tab_ml_p1.b) < '3'::numeric)
-               ->  Sort
-                     Sort Key: pagg_tab_ml_p1.a
-                     ->  Seq Scan on pagg_tab_ml_p1
-(25 rows)
+                        QUERY PLAN                         
+-----------------------------------------------------------
+ Append
+   ->  GroupAggregate
+         Group Key: pagg_tab_ml_p1.a
+         Filter: (avg(pagg_tab_ml_p1.b) < '3'::numeric)
+         ->  Sort
+               Sort Key: pagg_tab_ml_p1.a
+               ->  Seq Scan on pagg_tab_ml_p1
+   ->  GroupAggregate
+         Group Key: pagg_tab_ml_p2_s1.a
+         Filter: (avg(pagg_tab_ml_p2_s1.b) < '3'::numeric)
+         ->  Sort
+               Sort Key: pagg_tab_ml_p2_s1.a
+               ->  Append
+                     ->  Seq Scan on pagg_tab_ml_p2_s1
+                     ->  Seq Scan on pagg_tab_ml_p2_s2
+   ->  GroupAggregate
+         Group Key: pagg_tab_ml_p3_s1.a
+         Filter: (avg(pagg_tab_ml_p3_s1.b) < '3'::numeric)
+         ->  Sort
+               Sort Key: pagg_tab_ml_p3_s1.a
+               ->  Append
+                     ->  Seq Scan on pagg_tab_ml_p3_s1
+                     ->  Seq Scan on pagg_tab_ml_p3_s2
+(23 rows)
 
 -- Full aggregation at level 1 as GROUP BY clause matches with PARTITION KEY
 -- for level 1 only. For subpartitions, GROUP BY clause does not match with
@@ -1398,24 +1394,22 @@
 --------------------------------------------------------------------------------------
  Sort
    Sort Key: pagg_tab_para_p1.y, (sum(pagg_tab_para_p1.x)), (avg(pagg_tab_para_p1.x))
-   ->  Finalize GroupAggregate
+   ->  Finalize HashAggregate
          Group Key: pagg_tab_para_p1.y
          Filter: (avg(pagg_tab_para_p1.x) < '12'::numeric)
-         ->  Gather Merge
+         ->  Gather
                Workers Planned: 2
-               ->  Sort
-                     Sort Key: pagg_tab_para_p1.y
-                     ->  Parallel Append
-                           ->  Partial HashAggregate
-                                 Group Key: pagg_tab_para_p1.y
-                                 ->  Parallel Seq Scan on pagg_tab_para_p1
-                           ->  Partial HashAggregate
-                                 Group Key: pagg_tab_para_p2.y
-                                 ->  Parallel Seq Scan on pagg_tab_para_p2
-                           ->  Partial HashAggregate
-                                 Group Key: pagg_tab_para_p3.y
-                                 ->  Parallel Seq Scan on pagg_tab_para_p3
-(19 rows)
+               ->  Parallel Append
+                     ->  Partial HashAggregate
+                           Group Key: pagg_tab_para_p1.y
+                           ->  Parallel Seq Scan on pagg_tab_para_p1
+                     ->  Partial HashAggregate
+                           Group Key: pagg_tab_para_p2.y
+                           ->  Parallel Seq Scan on pagg_tab_para_p2
+                     ->  Partial HashAggregate
+                           Group Key: pagg_tab_para_p3.y
+                           ->  Parallel Seq Scan on pagg_tab_para_p3
+(17 rows)
 
 SELECT y, sum(x), avg(x), count(*) FROM pagg_tab_para GROUP BY y HAVING avg(x) < 12 ORDER BY 1, 2, 3;
  y  |  sum  |         avg         | count 
#160Alvaro Herrera
alvherre@2ndquadrant.com
In reply to: John Naylor (#159)
Re: WIP: Avoid creation of the free space map for small tables

On 2019-Feb-23, John Naylor wrote:

On Fri, Feb 22, 2019 at 3:59 AM Amit Kapila <amit.kapila16@gmail.com> wrote:

The reason for not pushing much on making the test pass for
nonstandard block sizes is that when I tried existing tests, there
were already some failures.

FWIW, I currently see 8 failures (attached).

Hmm, not great -- even the strings test fails, which seems to try to handle
the case explicitly. I did expect the plan shape ones to fail, but I'm
surprised about the tablesample one.

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

#161Petr Jelinek
petr.jelinek@2ndquadrant.com
In reply to: Alvaro Herrera (#160)
Re: WIP: Avoid creation of the free space map for small tables

On 26/02/2019 16:20, Alvaro Herrera wrote:

On 2019-Feb-23, John Naylor wrote:

On Fri, Feb 22, 2019 at 3:59 AM Amit Kapila <amit.kapila16@gmail.com> wrote:

The reason for not pushing much on making the test pass for
nonstandard block sizes is that when I tried existing tests, there
were already some failures.

FWIW, I currently see 8 failures (attached).

Hmm, not great -- even the strings test fails, which seems to try to handle
the case explicitly. I did expect the plan shape ones to fail, but I'm
surprised about the tablesample one.

The SYSTEM table sampling is basically per-page sampling so it depends
heavily on which rows are on which page.

--
Petr Jelinek http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services

#162John Naylor
john.naylor@2ndquadrant.com
In reply to: Amit Kapila (#92)
Re: WIP: Avoid creation of the free space map for small tables

On Fri, Jan 25, 2019 at 9:50 AM Amit Kapila <amit.kapila16@gmail.com> wrote:

Once we agree on the code, we need to test below scenarios:
(a) upgrade from all supported versions to the latest version
(b) upgrade standby with and without using rsync.

Although the code hasn't been reviewed yet, I went ahead and tested
(a) on v21 of the pg_upgrade patch [1]/messages/by-id/CACPNZCu4cOdm3uGnNEGXivy7Gz8UWyQjynDpdkPGabQ18_zK6g@mail.gmail.com. To do this I dumped out a 9.4
instance with the regression database and restored it to all supported
versions. To make it work with pg_upgrade, I first had to drop tables
with oids, drop functions referring to C libraries, and drop the
later-removed '=>' operator. Then I pg_upgrade'd in copy mode from all
versions to HEAD with the patch applied. pg_upgrade worked without
error, and the following query returned 0 bytes on all the new
clusters:

select sum(pg_relation_size(oid, 'fsm')) as total_fsm_size
from pg_class where relkind in ('r', 't')
and pg_relation_size(oid, 'main') <= 4 * 8192;

The complementary query (> 4 * 8192) returned the same number of bytes
as in the original 9.4 instance.

To make it easy to find, the latest regression test patch, which is
intended to be independent of block-size, was in [2]/messages/by-id/CACPNZCsWa=dd0K+FiODwM=LEsepAHVJCoSx2Avew=xBEX3Ywjw@mail.gmail.com.

[1]: /messages/by-id/CACPNZCu4cOdm3uGnNEGXivy7Gz8UWyQjynDpdkPGabQ18_zK6g@mail.gmail.com

[2]: /messages/by-id/CACPNZCsWa=dd0K+FiODwM=LEsepAHVJCoSx2Avew=xBEX3Ywjw@mail.gmail.com

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

#163Amit Kapila
amit.kapila16@gmail.com
In reply to: John Naylor (#158)
Re: WIP: Avoid creation of the free space map for small tables

On Sat, Feb 23, 2019 at 1:24 PM John Naylor <john.naylor@2ndquadrant.com> wrote:

On Thu, Feb 21, 2019 at 9:27 PM Alvaro Herrera <alvherre@2ndquadrant.com> wrote:

I think this test is going to break on nonstandard block sizes. While
we don't promise that all tests work on such installs (particularly
planner ones), it seems fairly easy to cope with this one -- just use a
record size expressed as a fraction of current_setting('block_size').
So instead of "1024" you'd write current_setting('block_size') / 8.
And then display the relation size in terms of pages, not bytes, so
divide pg_relation_size by block size.

I've done this for v6, tested on 16k block size.

Thanks, the patch looks good to me. I have additionally tested it 32K
and 1K sized blocks and the test passes. I will commit this early
next week.

--
With Regards,
Amit Kapila.
EnterpriseDB: http://www.enterprisedb.com

#164Amit Kapila
amit.kapila16@gmail.com
In reply to: John Naylor (#96)
Re: WIP: Avoid creation of the free space map for small tables

On Mon, Jan 28, 2019 at 2:33 AM John Naylor <john.naylor@2ndquadrant.com> wrote:

On Sat, Jan 26, 2019 at 2:14 PM Amit Kapila <amit.kapila16@gmail.com> wrote:

I think there is some value in using the information from
this function to skip fsm files, but the code doesn't appear to fit
well, how about moving this check to new function
new_cluster_needs_fsm()?

For v21, new_cluster_needs_fsm() has all responsibility for obtaining
the info it needs. I think this is much cleaner,

Right, now the code looks much better.

but there is a small
bit of code duplication since it now has to form the file name. One
thing we could do is form the the base old/new file names in
transfer_single_new_db() and pass those to transfer_relfile(), which
will only add suffixes and segment numbers. We could then pass the
base old file name to new_cluster_needs_fsm() and use it as is. Not
sure if that's worthwhile, though.

I don't think it is worth.

Few minor comments:
1.
warning C4715: 'new_cluster_needs_fsm': not all control paths return a value

Getting this new warning in the patch.

2.
+
+ /* Transfer any VM files if we can trust their
contents. */
  if (vm_crashsafe_match)

3. Can we add a note about this in the Notes section of pg_upgrade
documentation [1]https://www.postgresql.org/docs/devel/pgupgrade.html?

This comment line doesn't seem to be related to this patch. If so, I
think we can avoid having any additional change which is not related
to the functionality of this patch. Feel free to submit it
separately, if you think it is an improvement.

Have you done any performance testing of this patch? I mean to say
now that we added a new stat call for each table, we should see if
that has any impact. Ideally, that should be compensated by the fact
that we are now not transferring *fsm files for small relations. How
about constructing a test where all relations are greater than 4 pages
and then try to upgrade them. We can check for a cluster with a
different number of relations say 10K, 20K, 50K, 100K.

In general, the patch looks okay to me. I would like to know if
anybody else has any opinion whether pg_upgrade should skip
transferring fsm files for small relations or not? I think both me
and John thinks that it is good to have feature and now that patch
turns out to be simpler, I feel we can go ahead with this optimization
in pg_upgrade.

[1]: https://www.postgresql.org/docs/devel/pgupgrade.html

--
With Regards,
Amit Kapila.
EnterpriseDB: http://www.enterprisedb.com

#165Amit Kapila
amit.kapila16@gmail.com
In reply to: John Naylor (#162)
Re: WIP: Avoid creation of the free space map for small tables

On Wed, Mar 6, 2019 at 5:19 PM John Naylor <john.naylor@2ndquadrant.com> wrote:

On Fri, Jan 25, 2019 at 9:50 AM Amit Kapila <amit.kapila16@gmail.com> wrote:

Once we agree on the code, we need to test below scenarios:
(a) upgrade from all supported versions to the latest version
(b) upgrade standby with and without using rsync.

Although the code hasn't been reviewed yet, I went ahead and tested
(a) on v21 of the pg_upgrade patch [1]. To do this I dumped out a 9.4
instance with the regression database and restored it to all supported
versions. To make it work with pg_upgrade, I first had to drop tables
with oids, drop functions referring to C libraries, and drop the
later-removed '=>' operator. Then I pg_upgrade'd in copy mode from all
versions to HEAD with the patch applied. pg_upgrade worked without
error, and the following query returned 0 bytes on all the new
clusters:

select sum(pg_relation_size(oid, 'fsm')) as total_fsm_size
from pg_class where relkind in ('r', 't')
and pg_relation_size(oid, 'main') <= 4 * 8192;

The complementary query (> 4 * 8192) returned the same number of bytes
as in the original 9.4 instance.

Thanks, the tests done by you are quite useful. I have given a few
comments as a response to your previous email.

--
With Regards,
Amit Kapila.
EnterpriseDB: http://www.enterprisedb.com

#166Amit Kapila
amit.kapila16@gmail.com
In reply to: Amit Kapila (#164)
Re: WIP: Avoid creation of the free space map for small tables

On Fri, Mar 8, 2019 at 5:13 PM Amit Kapila <amit.kapila16@gmail.com> wrote:

Few minor comments:

..

2.
+
+ /* Transfer any VM files if we can trust their
contents. */
if (vm_crashsafe_match)

3. Can we add a note about this in the Notes section of pg_upgrade
documentation [1]?

This comment line doesn't seem to be related to this patch. If so, I
think we can avoid having any additional change which is not related
to the functionality of this patch. Feel free to submit it
separately, if you think it is an improvement.

oops, I have messed up the above comments. The paragraph starting
with "This comment line doesn't ..." is for comment number-2.

--
With Regards,
Amit Kapila.
EnterpriseDB: http://www.enterprisedb.com

#167John Naylor
john.naylor@2ndquadrant.com
In reply to: Amit Kapila (#164)
1 attachment(s)
Re: WIP: Avoid creation of the free space map for small tables

On Fri, Mar 8, 2019 at 7:43 PM Amit Kapila <amit.kapila16@gmail.com> wrote:

Few minor comments:
1.
warning C4715: 'new_cluster_needs_fsm': not all control paths return a value

Getting this new warning in the patch.

Hmm, I don't get that in a couple versions of gcc. Your compiler must
not know that pg_fatal() cannot return. I blindly added a fix.

2.

This comment line doesn't seem to be related to this patch. If so, I
think we can avoid having any additional change which is not related
to the functionality of this patch. Feel free to submit it
separately, if you think it is an improvement.

+
+ /* Transfer any VM files if we can trust their contents. */
if (vm_crashsafe_match)

Well, I guess the current comment is still ok, so reverted. If I were
to do a separate cleanup patch, I would rather remove the
vm_must_add_frozenbit parameter -- there's no reason I can see for
calls that transfer the heap and FSM to know about this.

I also changed references to the 'first segment of the main fork'
where there will almost always only be one segment. This was a vestige
of the earlier algorithm I had.

3. Can we add a note about this in the Notes section of pg_upgrade
documentation [1]?

Done.

Have you done any performance testing of this patch? I mean to say
now that we added a new stat call for each table, we should see if
that has any impact. Ideally, that should be compensated by the fact
that we are now not transferring *fsm files for small relations. How
about constructing a test where all relations are greater than 4 pages
and then try to upgrade them. We can check for a cluster with a
different number of relations say 10K, 20K, 50K, 100K.

I have not, but I agree it should be done. I will try to do so soon.

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

Attachments:

v23-0001-During-pg_upgrade-conditionally-skip-transfer-of.patchtext/x-patch; charset=US-ASCII; name=v23-0001-During-pg_upgrade-conditionally-skip-transfer-of.patchDownload
From b65084daf15d198c9fdd986992b0147290c8e690 Mon Sep 17 00:00:00 2001
From: John Naylor <jcnaylor@gmail.com>
Date: Sun, 10 Mar 2019 22:01:21 +0800
Subject: [PATCH v23] During pg_upgrade, conditionally skip transfer of FSMs.

If a heap on the old cluster has 4 pages or fewer, and the old cluster
was PG v11 or earlier, don't copy or link the FSM. This will shrink
space usage for installations with large numbers of small tables.
---
 doc/src/sgml/ref/pgupgrade.sgml  |  7 ++++
 src/bin/pg_upgrade/info.c        | 16 +++++++--
 src/bin/pg_upgrade/pg_upgrade.h  |  6 ++++
 src/bin/pg_upgrade/relfilenode.c | 58 +++++++++++++++++++++++++++++++-
 4 files changed, 84 insertions(+), 3 deletions(-)

diff --git a/doc/src/sgml/ref/pgupgrade.sgml b/doc/src/sgml/ref/pgupgrade.sgml
index 7e1afaf0a5..c896882dd1 100644
--- a/doc/src/sgml/ref/pgupgrade.sgml
+++ b/doc/src/sgml/ref/pgupgrade.sgml
@@ -792,6 +792,13 @@ psql --username=postgres --file=script.sql postgres
    is down.
   </para>
 
+  <para>
+   In <productname>PostgreSQL</productname> 12 and later small tables by
+   default don't have a free space map, as a space optimization.  If you are
+   upgrading a pre-12 cluster, the free space maps of small tables will
+   likewise not be transferred to the new cluster.  
+  </para>
+
  </refsect1>
 
  <refsect1>
diff --git a/src/bin/pg_upgrade/info.c b/src/bin/pg_upgrade/info.c
index 2f925f086c..902bfc647e 100644
--- a/src/bin/pg_upgrade/info.c
+++ b/src/bin/pg_upgrade/info.c
@@ -200,6 +200,8 @@ create_rel_filename_map(const char *old_data, const char *new_data,
 
 	map->old_db_oid = old_db->db_oid;
 	map->new_db_oid = new_db->db_oid;
+	map->relpages = old_rel->relpages;
+	map->relkind = old_rel->relkind;
 
 	/*
 	 * old_relfilenode might differ from pg_class.oid (and hence
@@ -418,6 +420,7 @@ get_rel_infos(ClusterInfo *cluster, DbInfo *dbinfo)
 	char	   *nspname = NULL;
 	char	   *relname = NULL;
 	char	   *tablespace = NULL;
+	char	   *relkind = NULL;
 	int			i_spclocation,
 				i_nspname,
 				i_relname,
@@ -425,7 +428,9 @@ get_rel_infos(ClusterInfo *cluster, DbInfo *dbinfo)
 				i_indtable,
 				i_toastheap,
 				i_relfilenode,
-				i_reltablespace;
+				i_reltablespace,
+				i_relpages,
+				i_relkind;
 	char		query[QUERY_ALLOC];
 	char	   *last_namespace = NULL,
 			   *last_tablespace = NULL;
@@ -494,7 +499,7 @@ get_rel_infos(ClusterInfo *cluster, DbInfo *dbinfo)
 	 */
 	snprintf(query + strlen(query), sizeof(query) - strlen(query),
 			 "SELECT all_rels.*, n.nspname, c.relname, "
-			 "  c.relfilenode, c.reltablespace, %s "
+			 "  c.relfilenode, c.reltablespace, c.relpages, c.relkind, %s "
 			 "FROM (SELECT * FROM regular_heap "
 			 "      UNION ALL "
 			 "      SELECT * FROM toast_heap "
@@ -525,6 +530,8 @@ get_rel_infos(ClusterInfo *cluster, DbInfo *dbinfo)
 	i_relname = PQfnumber(res, "relname");
 	i_relfilenode = PQfnumber(res, "relfilenode");
 	i_reltablespace = PQfnumber(res, "reltablespace");
+	i_relpages = PQfnumber(res, "relpages");
+	i_relkind = PQfnumber(res, "relkind");
 	i_spclocation = PQfnumber(res, "spclocation");
 
 	for (relnum = 0; relnum < ntups; relnum++)
@@ -556,6 +563,11 @@ get_rel_infos(ClusterInfo *cluster, DbInfo *dbinfo)
 		curr->relname = pg_strdup(relname);
 
 		curr->relfilenode = atooid(PQgetvalue(res, relnum, i_relfilenode));
+		curr->relpages = atoi(PQgetvalue(res, relnum, i_relpages));
+
+		relkind = PQgetvalue(res, relnum, i_relkind);
+		curr->relkind = relkind[0];
+
 		curr->tblsp_alloc = false;
 
 		/* Is the tablespace oid non-default? */
diff --git a/src/bin/pg_upgrade/pg_upgrade.h b/src/bin/pg_upgrade/pg_upgrade.h
index 2f67eee22b..baeb8ff0f8 100644
--- a/src/bin/pg_upgrade/pg_upgrade.h
+++ b/src/bin/pg_upgrade/pg_upgrade.h
@@ -147,6 +147,8 @@ typedef struct
 	char	   *tablespace;		/* tablespace path; "" for cluster default */
 	bool		nsp_alloc;		/* should nspname be freed? */
 	bool		tblsp_alloc;	/* should tablespace be freed? */
+	int32		relpages;		/* # of pages -- see pg_class.h */
+	char		relkind;		/* relation kind -- see pg_class.h */
 } RelInfo;
 
 typedef struct
@@ -173,6 +175,10 @@ typedef struct
 	 */
 	Oid			old_relfilenode;
 	Oid			new_relfilenode;
+
+	int32		relpages;		/* # of pages -- see pg_class.h */
+	char		relkind;		/* relation kind -- see pg_class.h */
+
 	/* the rest are used only for logging and error reporting */
 	char	   *nspname;		/* namespaces */
 	char	   *relname;
diff --git a/src/bin/pg_upgrade/relfilenode.c b/src/bin/pg_upgrade/relfilenode.c
index 0c78073f0e..dafa661751 100644
--- a/src/bin/pg_upgrade/relfilenode.c
+++ b/src/bin/pg_upgrade/relfilenode.c
@@ -14,10 +14,12 @@
 #include <sys/stat.h>
 #include "catalog/pg_class_d.h"
 #include "access/transam.h"
+#include "storage/freespace.h"
 
 
 static void transfer_single_new_db(FileNameMap *maps, int size, char *old_tablespace);
 static void transfer_relfile(FileNameMap *map, const char *suffix, bool vm_must_add_frozenbit);
+static bool new_cluster_needs_fsm(FileNameMap *map);
 
 
 /*
@@ -174,7 +176,8 @@ transfer_single_new_db(FileNameMap *maps, int size, char *old_tablespace)
 				/*
 				 * Copy/link any fsm and vm files, if they exist
 				 */
-				transfer_relfile(&maps[mapnum], "_fsm", vm_must_add_frozenbit);
+				if (new_cluster_needs_fsm(&maps[mapnum]))
+					transfer_relfile(&maps[mapnum], "_fsm", vm_must_add_frozenbit);
 				if (vm_crashsafe_match)
 					transfer_relfile(&maps[mapnum], "_vm", vm_must_add_frozenbit);
 			}
@@ -278,3 +281,56 @@ transfer_relfile(FileNameMap *map, const char *type_suffix, bool vm_must_add_fro
 			}
 	}
 }
+
+/*
+ * Return false for small heaps if we're upgrading across PG 12, the first
+ * version where small heap relations don't have FSMs by default.
+ */
+static bool
+new_cluster_needs_fsm(FileNameMap *map)
+{
+	char		old_primary_file[MAXPGPATH];
+	struct stat statbuf;
+
+	if (!(GET_MAJOR_VERSION(old_cluster.major_version) < 1200 &&
+		GET_MAJOR_VERSION(new_cluster.major_version) >= 1200))
+		return true;
+
+	/* Always transfer FSMs of non-heap relations. */
+	if (map->relkind != RELKIND_RELATION &&
+		map->relkind != RELKIND_TOASTVALUE)
+		return true;
+
+	/*
+	 * If pg_class.relpages falsely reports that the heap is above the
+	 * threshold, we will transfer a FSM when we don't need to, but this
+	 * is harmless.
+	 */
+	if (map->relpages > HEAP_FSM_CREATION_THRESHOLD)
+		return true;
+
+	/* Determine path of the primary file. */
+	snprintf(old_primary_file, sizeof(old_primary_file), "%s%s/%u/%u",
+			 map->old_tablespace,
+			 map->old_tablespace_suffix,
+			 map->old_db_oid,
+			 map->old_relfilenode);
+
+	/*
+	 * If pg_class.relpages falsely reports that the heap is below the
+	 * threshold, a FSM would be skipped when we actually need it.  To guard
+	 * against this, we verify the size of the primary file.
+	 */
+	if (stat(old_primary_file, &statbuf) != 0)
+	{
+		pg_fatal("error while checking for file existence \"%s.%s\" (\"%s\"): %s\n",
+				 map->nspname, map->relname, old_primary_file, strerror(errno));
+
+		/* Keep compiler quiet. */
+		return false;
+	}
+	else if (statbuf.st_size > HEAP_FSM_CREATION_THRESHOLD * BLCKSZ)
+		return true;
+	else
+		return false;
+}
-- 
2.17.1

#168Amit Kapila
amit.kapila16@gmail.com
In reply to: Amit Kapila (#163)
Re: WIP: Avoid creation of the free space map for small tables

On Thu, Mar 7, 2019 at 7:13 PM Amit Kapila <amit.kapila16@gmail.com> wrote:

On Sat, Feb 23, 2019 at 1:24 PM John Naylor <john.naylor@2ndquadrant.com> wrote:

On Thu, Feb 21, 2019 at 9:27 PM Alvaro Herrera <alvherre@2ndquadrant.com> wrote:

I think this test is going to break on nonstandard block sizes. While
we don't promise that all tests work on such installs (particularly
planner ones), it seems fairly easy to cope with this one -- just use a
record size expressed as a fraction of current_setting('block_size').
So instead of "1024" you'd write current_setting('block_size') / 8.
And then display the relation size in terms of pages, not bytes, so
divide pg_relation_size by block size.

I've done this for v6, tested on 16k block size.

Thanks, the patch looks good to me. I have additionally tested it 32K
and 1K sized blocks and the test passes. I will commit this early
next week.

Pushed this patch. Last time, we have seen a few portability issues
with this test. Both John and me with the help of others tried to
ensure that there are no more such issues, but there is always a
chance that we missed something. Anyway, I will keep an eye on
buildfarm to see if there is any problem related to this patch.

--
With Regards,
Amit Kapila.
EnterpriseDB: http://www.enterprisedb.com

#169Amit Kapila
amit.kapila16@gmail.com
In reply to: John Naylor (#167)
Re: WIP: Avoid creation of the free space map for small tables

On Sun, Mar 10, 2019 at 7:47 PM John Naylor <john.naylor@2ndquadrant.com> wrote:

On Fri, Mar 8, 2019 at 7:43 PM Amit Kapila <amit.kapila16@gmail.com> wrote:

Have you done any performance testing of this patch? I mean to say
now that we added a new stat call for each table, we should see if
that has any impact. Ideally, that should be compensated by the fact
that we are now not transferring *fsm files for small relations. How
about constructing a test where all relations are greater than 4 pages
and then try to upgrade them. We can check for a cluster with a
different number of relations say 10K, 20K, 50K, 100K.

I have not, but I agree it should be done. I will try to do so soon.

Thanks, I will wait for your test results. I believe this is the last
patch in this project and we should try to get it done soon.

--
With Regards,
Amit Kapila.
EnterpriseDB: http://www.enterprisedb.com

#170John Naylor
john.naylor@2ndquadrant.com
In reply to: Amit Kapila (#164)
Re: WIP: Avoid creation of the free space map for small tables

On Fri, Mar 8, 2019 at 7:43 PM Amit Kapila <amit.kapila16@gmail.com> wrote:

Have you done any performance testing of this patch? I mean to say
now that we added a new stat call for each table, we should see if
that has any impact. Ideally, that should be compensated by the fact
that we are now not transferring *fsm files for small relations.

To be precise, it will only call stat if pg_class.relpages is below
the threshold. I suppose I could hack a database where all the
relpages values are wrong, but that seems like a waste of time.

How
about constructing a test where all relations are greater than 4 pages
and then try to upgrade them. We can check for a cluster with a
different number of relations say 10K, 20K, 50K, 100K.

I did both greater and less than 4 pages for 10k relations. Since
pg_upgrade is O(# relations), I don't see a point in going higher.

First, I had a problem: On MacOS with their "gcc" wrapper around
clang, I got a segfault 11 when compiled with no debugging symbols. I
added "CFLAGS=-O0" and it worked fine. Since this doesn't happen in a
debugging build, I'm not sure how to investigate this. IIRC, this
doesn't happen for me on Linux gcc.

Since it was at least running now, I measured by putting
gettimeofday() calls around transfer_all_new_tablespaces(). I did 10
runs each and took the average, except for patch/1-page case since it
was obviously faster after a couple runs.

5 pages:
master patch
5.59s 5.64s

The variation within the builds is up to +/- 0.2s, so there is no
difference, as expected.

1 page:
master patch
5.62s 4.25s

Clearly, linking is much slower than stat.

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

#171Amit Kapila
amit.kapila16@gmail.com
In reply to: John Naylor (#170)
Re: WIP: Avoid creation of the free space map for small tables

On Wed, Mar 13, 2019 at 4:57 PM John Naylor <john.naylor@2ndquadrant.com> wrote:

On Fri, Mar 8, 2019 at 7:43 PM Amit Kapila <amit.kapila16@gmail.com> wrote:

Have you done any performance testing of this patch? I mean to say
now that we added a new stat call for each table, we should see if
that has any impact. Ideally, that should be compensated by the fact
that we are now not transferring *fsm files for small relations.

To be precise, it will only call stat if pg_class.relpages is below
the threshold. I suppose I could hack a database where all the
relpages values are wrong, but that seems like a waste of time.

Right.

How
about constructing a test where all relations are greater than 4 pages
and then try to upgrade them. We can check for a cluster with a
different number of relations say 10K, 20K, 50K, 100K.

I did both greater and less than 4 pages for 10k relations. Since
pg_upgrade is O(# relations), I don't see a point in going higher.

First, I had a problem: On MacOS with their "gcc" wrapper around
clang, I got a segfault 11 when compiled with no debugging symbols.

Did you get this problem with the patch or both with and without the
patch? If it is only with patch, then we definitely need to
investigate.

I
added "CFLAGS=-O0" and it worked fine. Since this doesn't happen in a
debugging build, I'm not sure how to investigate this. IIRC, this
doesn't happen for me on Linux gcc.

Since it was at least running now, I measured by putting
gettimeofday() calls around transfer_all_new_tablespaces(). I did 10
runs each and took the average, except for patch/1-page case since it
was obviously faster after a couple runs.

5 pages:
master patch
5.59s 5.64s

The variation within the builds is up to +/- 0.2s, so there is no
difference, as expected.

1 page:
master patch
5.62s 4.25s

Clearly, linking is much slower than stat.

The results are fine. Thanks for doing the tests.

--
With Regards,
Amit Kapila.
EnterpriseDB: http://www.enterprisedb.com

#172John Naylor
john.naylor@2ndquadrant.com
In reply to: Amit Kapila (#171)
Re: WIP: Avoid creation of the free space map for small tables

On Wed, Mar 13, 2019 at 8:18 PM Amit Kapila <amit.kapila16@gmail.com> wrote:

First, I had a problem: On MacOS with their "gcc" wrapper around
clang, I got a segfault 11 when compiled with no debugging symbols.

Did you get this problem with the patch or both with and without the
patch? If it is only with patch, then we definitely need to
investigate.

Only with the patch.

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

#173Amit Kapila
amit.kapila16@gmail.com
In reply to: John Naylor (#172)
Re: WIP: Avoid creation of the free space map for small tables

On Wed, Mar 13, 2019 at 7:42 PM John Naylor <john.naylor@2ndquadrant.com> wrote:

On Wed, Mar 13, 2019 at 8:18 PM Amit Kapila <amit.kapila16@gmail.com> wrote:

First, I had a problem: On MacOS with their "gcc" wrapper around
clang, I got a segfault 11 when compiled with no debugging symbols.

Did you get this problem with the patch or both with and without the
patch? If it is only with patch, then we definitely need to
investigate.

Only with the patch.

If the problem is reproducible, then I think we can try out a few
things to narrow down or get some clue about the problem:
(a) modify function new_cluster_needs_fsm() such that it always
returns true as its first statement. This will tell us if the code in
that function has some problem.
(b) run with Valgrind

--
With Regards,
Amit Kapila.
EnterpriseDB: http://www.enterprisedb.com

#174John Naylor
john.naylor@2ndquadrant.com
In reply to: Amit Kapila (#173)
Re: WIP: Avoid creation of the free space map for small tables

[segfault problems]

This now seems spurious. I ran make distclean, git pull, reapplied the
patch (leaving out the gettimeofday() calls), and now my upgrade perf
test works with default compiler settings. Not sure what happened, but
hopefully we can move forward.

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

#175Amit Kapila
amit.kapila16@gmail.com
In reply to: John Naylor (#174)
1 attachment(s)
Re: WIP: Avoid creation of the free space map for small tables

On Thu, Mar 14, 2019 at 7:08 AM John Naylor <john.naylor@2ndquadrant.com> wrote:

[segfault problems]

This now seems spurious. I ran make distclean, git pull, reapplied the
patch (leaving out the gettimeofday() calls), and now my upgrade perf
test works with default compiler settings. Not sure what happened, but
hopefully we can move forward.

Yeah, I took another pass through the patch and change minor things as
you can see in the attached patch.

1. Added an Assert in new_cluster_needs_fsm() that old cluster version
should be >= 804 as that is where fsm support has been added.
2. Reverted the old cluster version check to <= 1100. There was
nothing wrong in the way you have written a check, but I find most of
the other places in the code uses that way.
3. At one place changed the function header to be consistent with the
nearby code, run pgindent on the code and changed the commit message.

Let me know what you think?

--
With Regards,
Amit Kapila.
EnterpriseDB: http://www.enterprisedb.com

Attachments:

v24-0001-During-pg_upgrade-conditionally-skip-transfer-of-FSM.patchapplication/octet-stream; name=v24-0001-During-pg_upgrade-conditionally-skip-transfer-of-FSM.patchDownload
From d9aae72831614ffca1228de845f6c04dcc88fb17 Mon Sep 17 00:00:00 2001
From: Amit Kapila <akapila@postgresql.org>
Date: Thu, 14 Mar 2019 11:37:33 +0530
Subject: [PATCH] During pg_upgrade, conditionally skip transfer of FSMs.

If a heap on the old cluster has 4 pages or fewer, and the old cluster
was PG v11 or earlier, don't copy or link the FSM. This will shrink
space usage for installations with large numbers of small tables.

This will allow pg_upgrade to take advantage of commit b0eaa4c51b where
we have avoided creation of the free space map for small heap relations.

Author: John Naylor
Reviewed-by: Amit Kapila
Discussion: https://postgr.es/m/CACPNZCu4cOdm3uGnNEGXivy7Gz8UWyQjynDpdkPGabQ18_zK6g%40mail.gmail.com
---
 doc/src/sgml/ref/pgupgrade.sgml  |  7 +++++
 src/bin/pg_upgrade/info.c        | 16 ++++++++--
 src/bin/pg_upgrade/pg_upgrade.h  |  6 ++++
 src/bin/pg_upgrade/relfilenode.c | 63 +++++++++++++++++++++++++++++++++++++++-
 4 files changed, 89 insertions(+), 3 deletions(-)

diff --git a/doc/src/sgml/ref/pgupgrade.sgml b/doc/src/sgml/ref/pgupgrade.sgml
index 7e1afaf..c896882 100644
--- a/doc/src/sgml/ref/pgupgrade.sgml
+++ b/doc/src/sgml/ref/pgupgrade.sgml
@@ -792,6 +792,13 @@ psql --username=postgres --file=script.sql postgres
    is down.
   </para>
 
+  <para>
+   In <productname>PostgreSQL</productname> 12 and later small tables by
+   default don't have a free space map, as a space optimization.  If you are
+   upgrading a pre-12 cluster, the free space maps of small tables will
+   likewise not be transferred to the new cluster.  
+  </para>
+
  </refsect1>
 
  <refsect1>
diff --git a/src/bin/pg_upgrade/info.c b/src/bin/pg_upgrade/info.c
index 2f925f0..902bfc6 100644
--- a/src/bin/pg_upgrade/info.c
+++ b/src/bin/pg_upgrade/info.c
@@ -200,6 +200,8 @@ create_rel_filename_map(const char *old_data, const char *new_data,
 
 	map->old_db_oid = old_db->db_oid;
 	map->new_db_oid = new_db->db_oid;
+	map->relpages = old_rel->relpages;
+	map->relkind = old_rel->relkind;
 
 	/*
 	 * old_relfilenode might differ from pg_class.oid (and hence
@@ -418,6 +420,7 @@ get_rel_infos(ClusterInfo *cluster, DbInfo *dbinfo)
 	char	   *nspname = NULL;
 	char	   *relname = NULL;
 	char	   *tablespace = NULL;
+	char	   *relkind = NULL;
 	int			i_spclocation,
 				i_nspname,
 				i_relname,
@@ -425,7 +428,9 @@ get_rel_infos(ClusterInfo *cluster, DbInfo *dbinfo)
 				i_indtable,
 				i_toastheap,
 				i_relfilenode,
-				i_reltablespace;
+				i_reltablespace,
+				i_relpages,
+				i_relkind;
 	char		query[QUERY_ALLOC];
 	char	   *last_namespace = NULL,
 			   *last_tablespace = NULL;
@@ -494,7 +499,7 @@ get_rel_infos(ClusterInfo *cluster, DbInfo *dbinfo)
 	 */
 	snprintf(query + strlen(query), sizeof(query) - strlen(query),
 			 "SELECT all_rels.*, n.nspname, c.relname, "
-			 "  c.relfilenode, c.reltablespace, %s "
+			 "  c.relfilenode, c.reltablespace, c.relpages, c.relkind, %s "
 			 "FROM (SELECT * FROM regular_heap "
 			 "      UNION ALL "
 			 "      SELECT * FROM toast_heap "
@@ -525,6 +530,8 @@ get_rel_infos(ClusterInfo *cluster, DbInfo *dbinfo)
 	i_relname = PQfnumber(res, "relname");
 	i_relfilenode = PQfnumber(res, "relfilenode");
 	i_reltablespace = PQfnumber(res, "reltablespace");
+	i_relpages = PQfnumber(res, "relpages");
+	i_relkind = PQfnumber(res, "relkind");
 	i_spclocation = PQfnumber(res, "spclocation");
 
 	for (relnum = 0; relnum < ntups; relnum++)
@@ -556,6 +563,11 @@ get_rel_infos(ClusterInfo *cluster, DbInfo *dbinfo)
 		curr->relname = pg_strdup(relname);
 
 		curr->relfilenode = atooid(PQgetvalue(res, relnum, i_relfilenode));
+		curr->relpages = atoi(PQgetvalue(res, relnum, i_relpages));
+
+		relkind = PQgetvalue(res, relnum, i_relkind);
+		curr->relkind = relkind[0];
+
 		curr->tblsp_alloc = false;
 
 		/* Is the tablespace oid non-default? */
diff --git a/src/bin/pg_upgrade/pg_upgrade.h b/src/bin/pg_upgrade/pg_upgrade.h
index 2f67eee..baeb8ff 100644
--- a/src/bin/pg_upgrade/pg_upgrade.h
+++ b/src/bin/pg_upgrade/pg_upgrade.h
@@ -147,6 +147,8 @@ typedef struct
 	char	   *tablespace;		/* tablespace path; "" for cluster default */
 	bool		nsp_alloc;		/* should nspname be freed? */
 	bool		tblsp_alloc;	/* should tablespace be freed? */
+	int32		relpages;		/* # of pages -- see pg_class.h */
+	char		relkind;		/* relation kind -- see pg_class.h */
 } RelInfo;
 
 typedef struct
@@ -173,6 +175,10 @@ typedef struct
 	 */
 	Oid			old_relfilenode;
 	Oid			new_relfilenode;
+
+	int32		relpages;		/* # of pages -- see pg_class.h */
+	char		relkind;		/* relation kind -- see pg_class.h */
+
 	/* the rest are used only for logging and error reporting */
 	char	   *nspname;		/* namespaces */
 	char	   *relname;
diff --git a/src/bin/pg_upgrade/relfilenode.c b/src/bin/pg_upgrade/relfilenode.c
index 0c78073..dd3c8ce 100644
--- a/src/bin/pg_upgrade/relfilenode.c
+++ b/src/bin/pg_upgrade/relfilenode.c
@@ -14,10 +14,12 @@
 #include <sys/stat.h>
 #include "catalog/pg_class_d.h"
 #include "access/transam.h"
+#include "storage/freespace.h"
 
 
 static void transfer_single_new_db(FileNameMap *maps, int size, char *old_tablespace);
 static void transfer_relfile(FileNameMap *map, const char *suffix, bool vm_must_add_frozenbit);
+static bool new_cluster_needs_fsm(FileNameMap *map);
 
 
 /*
@@ -174,7 +176,8 @@ transfer_single_new_db(FileNameMap *maps, int size, char *old_tablespace)
 				/*
 				 * Copy/link any fsm and vm files, if they exist
 				 */
-				transfer_relfile(&maps[mapnum], "_fsm", vm_must_add_frozenbit);
+				if (new_cluster_needs_fsm(&maps[mapnum]))
+					transfer_relfile(&maps[mapnum], "_fsm", vm_must_add_frozenbit);
 				if (vm_crashsafe_match)
 					transfer_relfile(&maps[mapnum], "_vm", vm_must_add_frozenbit);
 			}
@@ -278,3 +281,61 @@ transfer_relfile(FileNameMap *map, const char *type_suffix, bool vm_must_add_fro
 			}
 	}
 }
+
+/*
+ * new_cluster_needs_fsm()
+ *
+ * Return false for small heaps if we're upgrading across PG 12, the first
+ * version where small heap relations don't have FSMs by default.
+ */
+static bool
+new_cluster_needs_fsm(FileNameMap *map)
+{
+	char		old_primary_file[MAXPGPATH];
+	struct stat statbuf;
+
+	/* fsm/vm files added in PG 8.4 */
+	Assert(GET_MAJOR_VERSION(old_cluster.major_version) >= 804);
+
+	if (!(GET_MAJOR_VERSION(old_cluster.major_version) <= 1100 &&
+		  GET_MAJOR_VERSION(new_cluster.major_version) >= 1200))
+		return true;
+
+	/* Always transfer FSMs of non-heap relations. */
+	if (map->relkind != RELKIND_RELATION &&
+		map->relkind != RELKIND_TOASTVALUE)
+		return true;
+
+	/*
+	 * If pg_class.relpages falsely reports that the heap is above the
+	 * threshold, we will transfer a FSM when we don't need to, but this is
+	 * harmless.
+	 */
+	if (map->relpages > HEAP_FSM_CREATION_THRESHOLD)
+		return true;
+
+	/* Determine path of the primary file. */
+	snprintf(old_primary_file, sizeof(old_primary_file), "%s%s/%u/%u",
+			 map->old_tablespace,
+			 map->old_tablespace_suffix,
+			 map->old_db_oid,
+			 map->old_relfilenode);
+
+	/*
+	 * If pg_class.relpages falsely reports that the heap is below the
+	 * threshold, a FSM would be skipped when we actually need it.  To guard
+	 * against this, we verify the size of the primary file.
+	 */
+	if (stat(old_primary_file, &statbuf) != 0)
+	{
+		pg_fatal("error while checking for file existence \"%s.%s\" (\"%s\"): %s\n",
+				 map->nspname, map->relname, old_primary_file, strerror(errno));
+
+		/* Keep compiler quiet. */
+		return false;
+	}
+	else if (statbuf.st_size > HEAP_FSM_CREATION_THRESHOLD * BLCKSZ)
+		return true;
+	else
+		return false;
+}
-- 
1.8.3.1

#176John Naylor
john.naylor@2ndquadrant.com
In reply to: Amit Kapila (#175)
Re: WIP: Avoid creation of the free space map for small tables

On Thu, Mar 14, 2019 at 2:17 PM Amit Kapila <amit.kapila16@gmail.com> wrote:

1. Added an Assert in new_cluster_needs_fsm() that old cluster version
should be >= 804 as that is where fsm support has been added.

There is already an explicit check for 804 in the caller, and the HEAD
code is already resilient to FSMs not existing, so I think this is
superfluous.

2. Reverted the old cluster version check to <= 1100. There was
nothing wrong in the way you have written a check, but I find most of
the other places in the code uses that way.
3. At one place changed the function header to be consistent with the
nearby code, run pgindent on the code and changed the commit message.

Looks good to me, thanks.

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

#177Amit Kapila
amit.kapila16@gmail.com
In reply to: John Naylor (#176)
Re: WIP: Avoid creation of the free space map for small tables

On Thu, Mar 14, 2019 at 12:37 PM John Naylor
<john.naylor@2ndquadrant.com> wrote:

On Thu, Mar 14, 2019 at 2:17 PM Amit Kapila <amit.kapila16@gmail.com> wrote:

1. Added an Assert in new_cluster_needs_fsm() that old cluster version
should be >= 804 as that is where fsm support has been added.

There is already an explicit check for 804 in the caller,

Yeah, I know that, but I have added it to prevent this function being
used elsewhere. OTOH, maybe you are right that as per current code it
is superfluous, so we shouldn't add this assert.

--
With Regards,
Amit Kapila.
EnterpriseDB: http://www.enterprisedb.com

#178Amit Kapila
amit.kapila16@gmail.com
In reply to: Amit Kapila (#177)
Re: WIP: Avoid creation of the free space map for small tables

On Thu, Mar 14, 2019 at 7:46 PM Amit Kapila <amit.kapila16@gmail.com> wrote:

On Thu, Mar 14, 2019 at 12:37 PM John Naylor
<john.naylor@2ndquadrant.com> wrote:

On Thu, Mar 14, 2019 at 2:17 PM Amit Kapila <amit.kapila16@gmail.com> wrote:

1. Added an Assert in new_cluster_needs_fsm() that old cluster version
should be >= 804 as that is where fsm support has been added.

There is already an explicit check for 804 in the caller,

Yeah, I know that, but I have added it to prevent this function being
used elsewhere. OTOH, maybe you are right that as per current code it
is superfluous, so we shouldn't add this assert.

I have committed the latest version of this patch. I think we can
wait for a day or two see if there is any complain from buildfarm or
in general and then we can close this CF entry. IIRC, this was the
last patch in the series, right?

--
With Regards,
Amit Kapila.
EnterpriseDB: http://www.enterprisedb.com

#179John Naylor
john.naylor@2ndquadrant.com
In reply to: Amit Kapila (#178)
1 attachment(s)
Re: WIP: Avoid creation of the free space map for small tables

On Fri, Mar 15, 2019 at 5:55 PM Amit Kapila <amit.kapila16@gmail.com> wrote:

I have committed the latest version of this patch. I think we can
wait for a day or two see if there is any complain from buildfarm or
in general and then we can close this CF entry. IIRC, this was the
last patch in the series, right?

Great, thanks! I'll keep an eye on the buildfarm as well.

I just spotted two comments in freespace.c that were true during
earlier patch revisions, but are no longer true, so I've attached a
fix for those. There are no other patches in the series.

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

Attachments:

correct-local-map-comments.patchapplication/octet-stream; name=correct-local-map-comments.patchDownload
diff --git a/src/backend/storage/freespace/freespace.c b/src/backend/storage/freespace/freespace.c
index 849685f5a0..c3ed4242e2 100644
--- a/src/backend/storage/freespace/freespace.c
+++ b/src/backend/storage/freespace/freespace.c
@@ -198,7 +198,7 @@ GetPageWithFreeSpace(Relation rel, Size spaceNeeded, bool check_fsm_only)
 		}
 		else if (nblocks > 0)
 		{
-			/* Create or update local map and get first candidate block. */
+			/* Initialize local map and get first candidate block. */
 			fsm_local_set(rel, nblocks);
 			target_block = fsm_local_search();
 		}
@@ -1119,8 +1119,7 @@ fsm_allow_writes(Relation rel, BlockNumber heapblk,
 }
 
 /*
- * Initialize or update the local map of blocks to try, for when there is
- * no FSM.
+ * Initialize the local map of blocks to try, for when there is no FSM.
  *
  * When we initialize the map, the whole heap is potentially available to
  * try.  Testing revealed that trying every block can cause a small
#180Amit Kapila
amit.kapila16@gmail.com
In reply to: John Naylor (#179)
Re: WIP: Avoid creation of the free space map for small tables

On Fri, Mar 15, 2019 at 3:40 PM John Naylor <john.naylor@2ndquadrant.com> wrote:

On Fri, Mar 15, 2019 at 5:55 PM Amit Kapila <amit.kapila16@gmail.com> wrote:

I have committed the latest version of this patch. I think we can
wait for a day or two see if there is any complain from buildfarm or
in general and then we can close this CF entry. IIRC, this was the
last patch in the series, right?

Great, thanks! I'll keep an eye on the buildfarm as well.

I just spotted two comments in freespace.c that were true during
earlier patch revisions, but are no longer true, so I've attached a
fix for those.

LGTM, so committed.

There are no other patches in the series.

Okay.

--
With Regards,
Amit Kapila.
EnterpriseDB: http://www.enterprisedb.com

#181Amit Kapila
amit.kapila16@gmail.com
In reply to: Amit Kapila (#178)
Re: WIP: Avoid creation of the free space map for small tables

On Fri, Mar 15, 2019 at 3:25 PM Amit Kapila <amit.kapila16@gmail.com> wrote:

I have committed the latest version of this patch. I think we can
wait for a day or two see if there is any complain from buildfarm or
in general and then we can close this CF entry.

Closed this CF entry.

--
With Regards,
Amit Kapila.
EnterpriseDB: http://www.enterprisedb.com