Improve failure detection with array parsing in pg_dump
authorMichael Paquier <michael@paquier.xyz>
Thu, 19 Nov 2020 01:36:08 +0000 (10:36 +0900)
committerMichael Paquier <michael@paquier.xyz>
Thu, 19 Nov 2020 01:36:08 +0000 (10:36 +0900)
commit13b58f8934e6252868231c3493d49b8c2b363e5d
tree96b3bc53cc0b222e251f370997c74a9124ca0b82
parent27838981be9de35d54ffcdc6cc06b5d5ea9e0cee
Improve failure detection with array parsing in pg_dump

Similarly to 3636efa, the checks done in pg_dump when parsing array
values from catalogs have been too lax.  Under memory pressure, it could
be possible, though very unlikely, to finish with dumps that miss some
data like:
- Statistics for indexes
- Run-time configuration of functions
- Configuration of extensions
- Publication list for a subscription

No backpatch is done as this is not going to be a problem in practice.
For example, if an OOM causes an array parsing to fail, a follow-up code
path of pg_dump would most likely complain with an allocation failure
due to the memory pressure.

Author: Michael Paquier
Reviewed-by: Daniel Gustafsson
Discussion: https://postgr.es/m/20201111061319.GE2276@paquier.xyz
src/bin/pg_dump/pg_dump.c