Previously, if the subscription used a server, ForeignServerConnectionString() could raise an error (e.g. missing user mapping) during DROP SUBSCRIPTION even if the conninfo wasn't needed at all. Construct conninfo after the early return, so that if slot_name is NONE and rstates is NIL, the DROP SUBSCRIPTION will succeed even if ForeignServerConnectionString() raises an error (e.g. missing user mapping). If slot_name is NONE and rstates is not NIL, DROP SUBSCRIPTION may still encounter an error from ForeignServerConnectionString(). Reported-by: Hayato Kuroda (Fujitsu) <kuroda.hayato@fujitsu.com> Reviewed-by: Chao Li <li.evan.chao@gmail.com> Discussion: https://postgr.es/m/OS9PR01MB12149B54DEA148108C6FA5667F52D2@OS9PR01MB12149.jpnprd01.prod.outlook.com
PostgreSQL Database Management System
This directory contains the source code distribution of the PostgreSQL database management system.
PostgreSQL is an advanced object-relational database management system that supports an extended subset of the SQL standard, including transactions, foreign keys, subqueries, triggers, user-defined types and functions. This distribution also contains C language bindings.
Copyright and license information can be found in the file COPYRIGHT.
General documentation about this version of PostgreSQL can be found at https://www.postgresql.org/docs/devel/. In particular, information about building PostgreSQL from the source code can be found at https://www.postgresql.org/docs/devel/installation.html.
The latest version of this software, and related software, may be obtained at https://www.postgresql.org/download/. For more information look at our web site located at https://www.postgresql.org/.