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

Commit789ba50

Browse files
committed
Remove dead code from pop_next_work_item().
The pref_non_data heuristic has been dead code for nearly ten years,and as far as I can tell was dead code even when it was first committed.I'm tired of silencing Coverity complaints about it, so get rid of it.If anyone is ever interested in pursuing the concept, they can get thecode out of our git history.
1 parentdb37ab2 commit789ba50

File tree

1 file changed

+0
-41
lines changed

1 file changed

+0
-41
lines changed

‎src/bin/pg_dump/pg_backup_archiver.c

Lines changed: 0 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -4434,37 +4434,11 @@ move_to_ready_list(TocEntry *pending_list,
44344434
* and no requirements for locks that are incompatible with
44354435
* items currently running. Items in the ready_list are known to have
44364436
* no remaining dependencies, but we have to check for lock conflicts.
4437-
*
4438-
* pref_non_data is for an alternative selection algorithm that gives
4439-
* preference to non-data items if there is already a data load running.
4440-
* It is currently disabled.
44414437
*/
44424438
staticTocEntry*
44434439
pop_next_work_item(ArchiveHandle*AH,ParallelReadyList*ready_list,
44444440
ParallelState*pstate)
44454441
{
4446-
boolpref_non_data= false;/* or get from AH->ropt */
4447-
intdata_te_index=-1;
4448-
4449-
/*
4450-
* Bogus heuristics for pref_non_data
4451-
*/
4452-
if (pref_non_data)
4453-
{
4454-
intcount=0;
4455-
4456-
for (intk=0;k<pstate->numWorkers;k++)
4457-
{
4458-
TocEntry*running_te=pstate->te[k];
4459-
4460-
if (running_te!=NULL&&
4461-
running_te->section==SECTION_DATA)
4462-
count++;
4463-
}
4464-
if (pstate->numWorkers==0||count*4<pstate->numWorkers)
4465-
pref_non_data= false;
4466-
}
4467-
44684442
/*
44694443
* Sort the ready_list so that we'll tackle larger jobs first.
44704444
*/
@@ -4500,26 +4474,11 @@ pop_next_work_item(ArchiveHandle *AH, ParallelReadyList *ready_list,
45004474
if (conflicts)
45014475
continue;
45024476

4503-
if (pref_non_data&&te->section==SECTION_DATA)
4504-
{
4505-
if (data_te_index<0)
4506-
data_te_index=i;
4507-
continue;
4508-
}
4509-
45104477
/* passed all tests, so this item can run */
45114478
ready_list_remove(ready_list,i);
45124479
returnte;
45134480
}
45144481

4515-
if (data_te_index >=0)
4516-
{
4517-
TocEntry*data_te=ready_list->tes[data_te_index];
4518-
4519-
ready_list_remove(ready_list,data_te_index);
4520-
returndata_te;
4521-
}
4522-
45234482
ahlog(AH,2,"no item ready\n");
45244483
returnNULL;
45254484
}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp