Skip to content

Do not schedule disabled PostgreSQL tablespaces - #1350

Merged
mrigger merged 1 commit into
sqlancer:mainfrom
splf-jojo:fix/postgres-tablespace-npe
Jul 30, 2026
Merged

Do not schedule disabled PostgreSQL tablespaces#1350
mrigger merged 1 commit into
sqlancer:mainfrom
splf-jojo:fix/postgres-tablespace-npe

Conversation

@splf-jojo

@splf-jojo splf-jojo commented Jul 29, 2026

Copy link
Copy Markdown
Contributor

Summary

When PostgreSQL tablespace testing is disabled, PostgresProvider.mapActions()
now assigns zero executions to CREATE_TABLESPACE. Consequently,
StatementExecutor never selects that action and never calls
PostgresTableSpaceGenerator.generate().

Following the review feedback, this moves the guard up to the scheduling layer,
rather than handling an already-selected action inside the generator.

This removes the previous generator-level IgnoreMeException approach. The
generator is now skipped entirely when tablespace testing is disabled.

Testing

  • mvn -Dtest=sqlancer.postgres.TestPostgresProvider test
    • TestPostgresProvider: 1 test passed, 0 failures, 0 errors.

@mrigger

mrigger commented Jul 29, 2026

Copy link
Copy Markdown
Contributor

Thanks for the PR! I think it might be better to solve this issue at a higher level. If tablespaces are disabled, I think that PostgresTableSpaceGenerator.generate() should never be called by the StatementExecutor. Could you check whether this would be possible?

@splf-jojo
splf-jojo force-pushed the fix/postgres-tablespace-npe branch from c5229c2 to 2a74be3 Compare July 30, 2026 11:51
@splf-jojo splf-jojo changed the title Fix PostgreSQL crash when tablespaces are disabled Do not schedule disabled PostgreSQL tablespaces Jul 30, 2026

@mrigger mrigger left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM, thanks for the PR. Also great that you added the test case to ensure we won't have a regression. Will merge after the checks pass.

@mrigger
mrigger merged commit 6be1073 into sqlancer:main Jul 30, 2026
23 of 25 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants