Skip to content
This repository was archived by the owner on Oct 2, 2025. It is now read-only.

ADBDEV-8171: Turn off the orca optimizer in gprestore#132

Merged
KnightMurloc merged 1 commit intomasterfrom
ADBDEV-8171
Sep 5, 2025
Merged

ADBDEV-8171: Turn off the orca optimizer in gprestore#132
KnightMurloc merged 1 commit intomasterfrom
ADBDEV-8171

Conversation

@KnightMurloc
Copy link

When planning queries from gprestore, Orca trying to plan a query, but it almost
always fails due to the lack of support for planning queries which containing
system tables. At the same time, the start of Orca planning takes a considerable
amount of time. This is especially noticeable when restoring statistics.

This patch disables orca in gprestore sessions.

When planning queries from gprestore, Orca trying to plan a query, but it almost
always fails due to the lack of support for planning queries which containing
system tables. At the same time, the start of Orca planning takes a considerable
amount of time. This is especially noticeable when restoring statistics.

This patch disables orca in gprestore sessions.
@RekGRpth
Copy link
Member

RekGRpth commented Sep 4, 2025

When planning queries from gprestore, Orca trying to plan a query, but it almost
always fails due to the lack of support for planning queries which containing
system tables. At the same time, the start of Orca planning takes a considerable
amount of time.

Is gpbackup subject to the same problem?

@KnightMurloc
Copy link
Author

Is gpbackup subject to the same problem?

Maybe. But gpbackup performs fewer queries so the problem should be less noticeable.

Copy link

@hilltracer hilltracer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've repeated experiments like I did in the last PR

The results for restoring all data with statistics:

GPDB 6 without patch 9m41.577s
GPDB 6 with patch 2m49.590s
GPDB 7 without patch 6m27.511s
GPDB 7 with patch 2m12.082s

I think it's a very good result.

I faced a problem on GPDB 7, sometimes restore fails with message.
I see error like:

20250905:12:44:30 gprestore:gpadmin:gpdb7u:872488-[CRITICAL]:-ERROR: duplicate key value violates unique constraint "pg_statistic_relid_att_inh_index" (SQLSTATE 23505)

But it looks like the problem isn't related to the current patch, because I see it even without patch.
I will create the issue about it.

@KnightMurloc KnightMurloc merged commit ea5269b into master Sep 5, 2025
2 of 3 checks passed
@KnightMurloc KnightMurloc deleted the ADBDEV-8171 branch September 5, 2025 11:43
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants