Content-Length: 271747 | pFad | http://github.com/postgrespro/postgres/commit/e7e7da2f8d57bbe6c8fb463a9eec51486000ba2e

4B Fix possible logical replication crash. · postgrespro/postgres@e7e7da2 · GitHub
Skip to content

Commit e7e7da2

Browse files
committed
Fix possible logical replication crash.
Commit c3afe8c added a new password_required option but forgot that you need database access to check whether an arbitrary role ID is a superuser. Report and patch by Hou Zhijie. I added a comment. Thanks to Alexander Lakhin for devising a way to reproduce the crash. Discussion: http://postgr.es/m/OS0PR01MB5716BFD7EC44284C89F40808948F9@OS0PR01MB5716.jpnprd01.prod.outlook.com
1 parent a8a0012 commit e7e7da2

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/backend/replication/logical/worker.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4545,12 +4545,14 @@ ApplyWorkerMain(Datum main_arg)
45454545
replorigen_session_setup(origenid, 0);
45464546
replorigen_session_origen = origenid;
45474547
origen_startpos = replorigen_session_get_progress(false);
4548-
CommitTransactionCommand();
45494548

45504549
/* Is the use of a password mandatory? */
45514550
must_use_password = MySubscription->passwordrequired &&
45524551
!superuser_arg(MySubscription->owner);
45534552

4553+
/* Note that the superuser_arg call can access the DB */
4554+
CommitTransactionCommand();
4555+
45544556
LogRepWorkerWalRcvConn = walrcv_connect(MySubscription->conninfo, true,
45554557
must_use_password,
45564558
MySubscription->name, &err);

0 commit comments

Comments
 (0)








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://github.com/postgrespro/postgres/commit/e7e7da2f8d57bbe6c8fb463a9eec51486000ba2e

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy