Skip to content

Conversation

@robins
Copy link
Collaborator

@robins robins commented Dec 8, 2024

This patch adds PARALLEL support to VACUUM command in Postgres (launched in v13)

This is working towards the Issue #912 .

  • Sample Postgres ERROR logfile capture given below
lancer@lenovo:~/proj/lancerpg$ grep VACUUM logfile | grep PARALLEL
2024-12-08 17:39:51.042 ACDT [653315] LOG:  execute <unnamed>: VACUUM (PARALLEL 0)
2024-12-08 17:39:51.315 ACDT [653285] LOG:  execute <unnamed>: VACUUM (VERBOSE, PARALLEL 0) t5
2024-12-08 17:39:51.375 ACDT [653283] LOG:  execute <unnamed>: VACUUM (PARALLEL 0, VERBOSE 1)
2024-12-08 17:45:03.234 ACDT [673926] LOG:  execute <unnamed>: VACUUM (SKIP_LOCKED 0, PARALLEL 2)
2024-12-08 17:47:22.036 ACDT [702212] LOG:  execute <unnamed>: VACUUM (FULL 1, PARALLEL 0)
2024-12-08 17:48:07.203 ACDT [712462] LOG:  execute <unnamed>: VACUUM (PARALLEL 6) t5
[INFO] Running sqlancer.TestUsageNamingConvention
No DBMS implementations (i.e., instantiations of the DatabaseProvider class) were found. You likely ran into an issue described in https://github.com/sqlancer/sqlancer/issues/799. As a workaround, I now statically load all supported providers as of June 7, 2023.
[ERROR] Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0.057 s <<< FAILURE! - in sqlancer.TestUsageNamingConvention
[ERROR] testNonEmptyDescription  Time elapsed: 0.043 s  <<< ERROR!
java.lang.reflect.InaccessibleObjectException: Unable to make private static java.lang.annotation.Annotation java.lang.reflect.AnnotatedElement.lambda$getDeclaredAnnotationsByType$0(java.lang.annotation.Annotation,java.lang.annotation.Annotation) accessible: module java.base does not "opens java.lang.reflect" to unnamed module @1376c05c
        at sqlancer.TestUsageNamingConvention.testNonEmptyDescription(TestUsageNamingConvention.java:25)

@mrigger
Copy link
Contributor

mrigger commented Dec 27, 2024

I think we might first want to update the PostgreSQL version and move to a state where the version passes without errors (which already seems to be the case based on our prior analysis). Like this, we can merge new features while keeping the CI green.

@robins
Copy link
Collaborator Author

robins commented Apr 14, 2025

@mrigger - Now that v13 support is baked in (via #1072) , think it's time to push this change through (let me know if there are any code etc. issues to be fixed beforehand)...

Once it goes in, essentially this'd be the first (among more) changes related to Postgres v13 going into SQLancer.

}
sb.append(option);
if (Randomly.getBoolean()) {
if (option.equals("PARALLEL")) {
Copy link
Contributor

Choose a reason for hiding this comment

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

I think it would be better to make it explicit that the "PARALLEL" here and above refer to the same constant. Ideally, I think we would introduce an enum that encodes all the options above.

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