Backpatch to 8.0. Andres Freund, with cleanup and adjustment for older branches by me.
Attach a file by drag & drop or click to upload