Fix possible crash in tablesync worker.
authorAmit Kapila <akapila@postgresql.org>
Thu, 15 Jun 2023 03:07:48 +0000 (08:37 +0530)
committerAmit Kapila <akapila@postgresql.org>
Thu, 15 Jun 2023 03:07:48 +0000 (08:37 +0530)
commitb5c517379a40fa1af84c0852aa3730a5875a6482
treeb7544ecef709329c536c552a27dc5735f3c9f0cc
parentf9f31aa91f82df863a35354893978e1937863d7c
Fix possible crash in tablesync worker.

Commit c3afe8cf5a added a new password_required option but forgot that you
need database access to check whether an arbitrary role ID is a superuser.

Commit e7e7da2f8d fixed a similar bug in apply worker, and this patch
fixes a similar bug in tablesync worker.

Author: Hou Zhijie
Reviewed-by: Amit Kapila
Discussion: https://postgr.es/m/OS0PR01MB571607F5A9D723755268D36294759@OS0PR01MB5716.jpnprd01.prod.outlook.com
src/backend/replication/logical/tablesync.c