diff options
author | David Rowley | 2019-07-22 12:14:11 +0000 |
---|---|---|
committer | David Rowley | 2019-07-22 12:14:11 +0000 |
commit | 1e6a759838f7c104f3cd1fe6981a98780da4131b (patch) | |
tree | 47047d8991d0918b531fe71f38b637dc086c9ffa /src/backend/storage/lmgr/deadlock.c | |
parent | 19781729f789f3c6b2540e02b96f8aa500460322 (diff) |
Use appendBinaryStringInfo in more places where the length is known
When we already know the length that we're going to append, then it
makes sense to use appendBinaryStringInfo instead of
appendStringInfoString so that the append can be performed with a simple
memcpy() using a known length rather than having to first perform a
strlen() call to obtain the length.
Discussion: https://postgr.es/m/CAKJS1f8+FRAM1s5+mAa3isajeEoAaicJ=4e0WzrH3tAusbbiMQ@mail.gmail.com
Diffstat (limited to 'src/backend/storage/lmgr/deadlock.c')
-rw-r--r-- | src/backend/storage/lmgr/deadlock.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/backend/storage/lmgr/deadlock.c b/src/backend/storage/lmgr/deadlock.c index 9abc9d778f6..990d48377d8 100644 --- a/src/backend/storage/lmgr/deadlock.c +++ b/src/backend/storage/lmgr/deadlock.c @@ -1115,7 +1115,7 @@ DeadLockReport(void) } /* Duplicate all the above for the server ... */ - appendStringInfoString(&logbuf, clientbuf.data); + appendBinaryStringInfo(&logbuf, clientbuf.data, clientbuf.len); /* ... and add info about query strings */ for (i = 0; i < nDeadlockDetails; i++) |