Re: pgsql: Allow for plugin control over path generation strategies. - Mailing list pgsql-committers

From Aleksander Alekseev
Subject Re: pgsql: Allow for plugin control over path generation strategies.
Date
Msg-id CAJ7c6TPtYQc6wFwhSDU5u5Fs5nE676VUX6MGrT3Db-oZ+0gUiQ@mail.gmail.com
Whole thread Raw
In response to Re: pgsql: Allow for plugin control over path generation strategies.  (Robert Haas <robertmhaas@gmail.com>)
Responses Re: pgsql: Allow for plugin control over path generation strategies.
List pgsql-committers
Hi Robert,

> Thanks for the report. 4020b370f214315b8c10430301898ac21658143f
> includes an attempt at a fix.

Not sure if keeping unitized structure is a good solution in the long
run. However if you are aiming for performance instead of:

```
+   /* Clear fields that cost_material() will consult */
+   matpath.parallel_workers = 0;
    matpath.parent = NULL;
```

... you could just rewrite the `if` condition in cost_material():

```
    if (path->parent != NULL && /* <--- is false */
        path->parallel_workers == 0 &&
```

-- 
Best regards,
Aleksander Alekseev



pgsql-committers by date:

Previous
From: Aleksander Alekseev
Date:
Subject: Re: pgsql: Allow for plugin control over path generation strategies.
Next
From: Robert Haas
Date:
Subject: Re: pgsql: Allow for plugin control over path generation strategies.