summaryrefslogtreecommitdiff
path: root/src/include
diff options
context:
space:
mode:
authorAndres Freund2017-10-11 23:49:31 +0000
committerAndres Freund2017-10-12 00:23:23 +0000
commit4c119fbcd49ba882791c7b99a1e934b985468e9f (patch)
tree3ab2f089ccdeac4a38e94552b6edf9557b3c7793 /src/include
parentcff440d368690f94fbda1a475277e90ea2263843 (diff)
Improve performance of SendRowDescriptionMessage.
There's three categories of changes leading to better performance: - Splitting the per-attribute part of SendRowDescriptionMessage into a v2 and a v3 version allows avoiding branches for every attribute. - Preallocating the size of the buffer to be big enough for all attributes and then using pq_write* avoids unnecessary buffer size checks & resizing. - Reusing a persistently allocated StringInfo for all SendRowDescriptionMessage() invocations avoids repeated allocations & reallocations. Author: Andres Freund Discussion: https://postgr.es/m/20170914063418.sckdzgjfrsbekae4@alap3.anarazel.de
Diffstat (limited to 'src/include')
-rw-r--r--src/include/access/printtup.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/include/access/printtup.h b/src/include/access/printtup.h
index 641715e416..1b5a003a99 100644
--- a/src/include/access/printtup.h
+++ b/src/include/access/printtup.h
@@ -20,8 +20,8 @@ extern DestReceiver *printtup_create_DR(CommandDest dest);
extern void SetRemoteDestReceiverParams(DestReceiver *self, Portal portal);
-extern void SendRowDescriptionMessage(TupleDesc typeinfo, List *targetlist,
- int16 *formats);
+extern void SendRowDescriptionMessage(StringInfo buf,
+ TupleDesc typeinfo, List *targetlist, int16 *formats);
extern void debugStartup(DestReceiver *self, int operation,
TupleDesc typeinfo);