Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commite7e7da2

Browse files
committed
Fix possible logical replication crash.
Commitc3afe8c added a newpassword_required option but forgot that you need database accessto check whether an arbitrary role ID is a superuser.Report and patch by Hou Zhijie. I added a comment. Thanks toAlexander Lakhin for devising a way to reproduce the crash.Discussion:http://postgr.es/m/OS0PR01MB5716BFD7EC44284C89F40808948F9@OS0PR01MB5716.jpnprd01.prod.outlook.com
1 parenta8a0012 commite7e7da2

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
replorigin_session_setup(originid,0);
45464546
replorigin_session_origin=originid;
45474547
origin_startpos=replorigin_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)

[8]ページ先頭

©2009-2025 Movatter.jp