postgresql/src/include/common
Michael Paquier 2576dcfb76 Revert refactoring of hex code to src/common/
This is a combined revert of the following commits:
- c3826f8, a refactoring piece that moved the hex decoding code to
src/common/.  This code was cleaned up by aef8948, as it originally
included no overflow checks in the same way as the base64 routines in
src/common/ used by SCRAM, making it unsafe for its purpose.
- aef8948, a more advanced refactoring of the hex encoding/decoding code
to src/common/ that added sanity checks on the result buffer for hex
decoding and encoding.  As reported by Hans Buschmann, those overflow
checks are expensive, and it is possible to see a performance drop in
the decoding/encoding of bytea or LOs the longer they are.  Simple SQLs
working on large bytea values show a clear difference in perf profile.
- ccf4e27, a cleanup made possible by aef8948.

The reverts of all those commits bring back the performance of hex
decoding and encoding back to what it was in ~13.  Fow now and
post-beta3, this is the simplest option.

Reported-by: Hans Buschmann
Discussion: https://postgr.es/m/1629039545467.80333@nidsa.net
Backpatch-through: 14
2021-08-19 09:20:13 +09:00
..
archive.h Update copyright for 2021 2021-01-02 13:06:25 -05:00
base64.h Update copyright for 2021 2021-01-02 13:06:25 -05:00
checksum_helper.h Fix and simplify some code related to cryptohashes 2021-01-08 10:37:03 +09:00
config_info.h Update copyright for 2021 2021-01-02 13:06:25 -05:00
connect.h Update copyright for 2021 2021-01-02 13:06:25 -05:00
controldata_utils.h Update copyright for 2021 2021-01-02 13:06:25 -05:00
cryptohash.h Add result size as argument of pg_cryptohash_final() for overflow checks 2021-02-15 10:18:34 +09:00
fe_memutils.h Update copyright for 2021 2021-01-02 13:06:25 -05:00
file_perm.h Update copyright for 2021 2021-01-02 13:06:25 -05:00
file_utils.h Update copyright for 2021 2021-01-02 13:06:25 -05:00
hashfn.h Update copyright for 2021 2021-01-02 13:06:25 -05:00
hmac.h Adjust locations which have an incorrect copyright year 2021-06-04 12:19:50 +12:00
int.h Update copyright for 2021 2021-01-02 13:06:25 -05:00
int128.h Update copyright for 2021 2021-01-02 13:06:25 -05:00
ip.h Update copyright for 2021 2021-01-02 13:06:25 -05:00
jsonapi.h Improve reporting for syntax errors in multi-line JSON data. 2021-03-01 16:44:17 -05:00
keywords.h Update copyright for 2021 2021-01-02 13:06:25 -05:00
kwlookup.h Update copyright for 2021 2021-01-02 13:06:25 -05:00
link-canary.h Update copyright for 2021 2021-01-02 13:06:25 -05:00
logging.h Update copyright for 2021 2021-01-02 13:06:25 -05:00
md5.h Refactor HMAC implementations 2021-04-03 17:30:49 +09:00
openssl.h Update copyright for 2021 2021-01-02 13:06:25 -05:00
pg_lzcompress.h Optimize partial TOAST decompression 2019-10-01 14:28:28 +02:00
relpath.h Update copyright for 2021 2021-01-02 13:06:25 -05:00
restricted_token.h Update copyright for 2021 2021-01-02 13:06:25 -05:00
saslprep.h Update copyright for 2021 2021-01-02 13:06:25 -05:00
scram-common.h Refactor HMAC implementations 2021-04-03 17:30:49 +09:00
sha1.h Adjust locations which have an incorrect copyright year 2021-06-04 12:19:50 +12:00
sha2.h Revert refactoring of hex code to src/common/ 2021-08-19 09:20:13 +09:00
shortest_dec.h Update copyright for 2021 2021-01-02 13:06:25 -05:00
string.h Update copyright for 2021 2021-01-02 13:06:25 -05:00
unicode_combining_table.h Update Unicode data to Unicode 13.0.0 and CLDR 37 2020-04-24 09:52:59 +02:00
unicode_norm.h Update copyright for 2021 2021-01-02 13:06:25 -05:00
unicode_norm_hashfunc.h Update copyright for 2021 2021-01-02 13:06:25 -05:00
unicode_norm_table.h Update copyright for 2021 2021-01-02 13:06:25 -05:00
unicode_normprops_table.h Review format of code generated by PerfectHash.pm 2020-10-21 09:22:27 +09:00
username.h Update copyright for 2021 2021-01-02 13:06:25 -05:00