Don't call fwrite() with len == 0 when writing out relcache init file.
authorAndres Freund <[email protected]>
Wed, 23 Mar 2022 20:05:25 +0000 (13:05 -0700)
committerAndres Freund <[email protected]>
Wed, 23 Mar 2022 20:13:49 +0000 (13:13 -0700)
commit5f4615b9def5c7a4218c7e17f318e4b2eb2b1747
treebff48acc47281527c6a074101b81b663bd2c3ab2
parent2a919372655d64a5ed848b84a09b54d685aec446
Don't call fwrite() with len == 0 when writing out relcache init file.

Noticed via -fsanitize=undefined.

Backpatch to all branches, for the same reasons as 46ab07ffda9.

Discussion: https://postgr.es/m/20220323173537[email protected]
Backpatch: 10-
src/backend/utils/cache/relcache.c