aboutsummaryrefslogtreecommitdiff
path: root/src/include/access/commit_ts.h
diff options
context:
space:
mode:
authorJohn Naylor <john.naylor@postgresql.org>2022-07-01 17:28:20 +0700
committerJohn Naylor <john.naylor@postgresql.org>2022-07-11 11:11:36 +0700
commit3838fa269c15706df2b85ce2d6af8aacd5611655 (patch)
tree7c9c473754716f3a4fa661db6a133b9dac6dc309 /src/include/access/commit_ts.h
parenta6434b951558baad8372dc4b83bf87606dac9cda (diff)
downloadpostgresql-3838fa269c15706df2b85ce2d6af8aacd5611655.tar.gz
postgresql-3838fa269c15706df2b85ce2d6af8aacd5611655.zip
Build de-escaped JSON strings in larger chunks during lexing
During COPY BINARY with large JSONB blobs, it was found that half the time was spent parsing JSON, with much of that spent in separate appendStringInfoChar() calls for each input byte. Add lookahead loop to json_lex_string() to allow batching multiple bytes via appendBinaryStringInfo(). Also use this same logic when de-escaping is not done, to avoid code duplication. Report and proof of concept patch by Jelte Fennema, reworked by Andres Freund and John Naylor Discussion: https://www.postgresql.org/message-id/CAGECzQQuXbies_nKgSiYifZUjBk6nOf2%3DTSXqRjj2BhUh8CTeA%40mail.gmail.com Discussion: https://www.postgresql.org/message-id/flat/PR3PR83MB0476F098CBCF68AF7A1CA89FF7B49@PR3PR83MB0476.EURPRD83.prod.outlook.com
Diffstat (limited to 'src/include/access/commit_ts.h')
0 files changed, 0 insertions, 0 deletions