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

Commit0dd094c

Browse files
committed
Remove unused ParallelWorkerInfo.pid field
The pid was originally used in error context of messages propagatedfrom parallel workers, but commit292794f removed that. If the needarises in the future, you can also get the pid with"shm_mq_get_sender(pcxt->worker[i].error_mqh)->pid".
1 parent8545b28 commit0dd094c

File tree

2 files changed

+0
-24
lines changed

2 files changed

+0
-24
lines changed

‎src/backend/access/transam/parallel.c

Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1131,16 +1131,6 @@ HandleParallelMessage(ParallelContext *pcxt, int i, StringInfo msg)
11311131

11321132
switch (msgtype)
11331133
{
1134-
casePqMsg_BackendKeyData:
1135-
{
1136-
int32pid=pq_getmsgint(msg,4);
1137-
1138-
(void)pq_getmsgint(msg,4);/* discard cancel key */
1139-
(void)pq_getmsgend(msg);
1140-
pcxt->worker[i].pid=pid;
1141-
break;
1142-
}
1143-
11441134
casePqMsg_ErrorResponse:
11451135
casePqMsg_NoticeResponse:
11461136
{
@@ -1304,7 +1294,6 @@ ParallelWorkerMain(Datum main_arg)
13041294
char*relmapperspace;
13051295
char*uncommittedenumsspace;
13061296
char*clientconninfospace;
1307-
StringInfoDatamsgbuf;
13081297
char*session_dsm_handle_space;
13091298
Snapshottsnapshot;
13101299
Snapshotasnapshot;
@@ -1369,18 +1358,6 @@ ParallelWorkerMain(Datum main_arg)
13691358
pq_set_parallel_leader(fps->parallel_leader_pid,
13701359
fps->parallel_leader_proc_number);
13711360

1372-
/*
1373-
* Send a BackendKeyData message to the process that initiated parallelism
1374-
* so that it has access to our PID before it receives any other messages
1375-
* from us. Our cancel key is sent, too, since that's the way the
1376-
* protocol message is defined, but it won't actually be used for anything
1377-
* in this case.
1378-
*/
1379-
pq_beginmessage(&msgbuf,PqMsg_BackendKeyData);
1380-
pq_sendint32(&msgbuf, (int32)MyProcPid);
1381-
pq_sendint32(&msgbuf, (int32)MyCancelKey);
1382-
pq_endmessage(&msgbuf);
1383-
13841361
/*
13851362
* Hooray! Primary initialization is complete. Now, we need to set up our
13861363
* backend-local state to match the original backend.

‎src/include/access/parallel.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@ typedef struct ParallelWorkerInfo
2626
{
2727
BackgroundWorkerHandle*bgwhandle;
2828
shm_mq_handle*error_mqh;
29-
int32pid;
3029
}ParallelWorkerInfo;
3130

3231
typedefstructParallelContext

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp