Fix server crash bug in 'server' backup target.

Robert Haas <rhaas@postgresql.org>

Commit: 8e2b6d45a033287da7c8f63062129ea02d86d831
Author: Robert Haas <rhaas@postgresql.org>
Date: 2022-02-02T18:50:33Z
Releases: 15.0
Fix server crash bug in 'server' backup target.

When this code executed as superuser it appeared to work because no
system catalog lookups happened, but otherwise it crashes because there
is no transaction environment. Fix that.

Report and code change by me. Test case by Dagfinn Ilmari Mannsåker.

Discussion: http://postgr.es/m/CA+TgmobiKLXne-2AVzYyWRiO8=rChBQ=7ywoxp=2SmcFw=oDDw@mail.gmail.com

Files

Discussion