Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Advanced Visibility with SQL] Adding PostgreSQL 12 schema and interface #3844

Conversation

rodrigozhou
Copy link
Contributor

@rodrigozhou rodrigozhou commented Jan 25, 2023

What changed?
Added PostgreSQL 12 schemas:

  • For main Temporal storage, it's just a copy from PostgreSQL v96 schema
  • For visibility:
    • v1.0, v1.1: It's a copy from v96 (to support migration).
    • v1.2: Changes to support advanced visibility:
      • Added search attributes JSON map.
      • Added generated columns to extract the search attributes fields from JSON.
      • Deleted old indices and created new ones.

Why?
Advanced visibility with SQL databases.

How did you test it?
Started temporal using PostgreSQL 12, and copied existing unit tests for PostgreSQL to use the new interface.

Potential risks
No.

Is hotfix candidate?
No.

@rodrigozhou rodrigozhou requested a review from a team as a code owner January 25, 2023 19:29
@rodrigozhou rodrigozhou force-pushed the advanced-visibility-postgresql-schema branch from d4f7e50 to b6f24ae Compare January 25, 2023 23:22
@rodrigozhou rodrigozhou changed the title [Advanced Visibility with SQL] Changing visibility schema for PostgreSQL [Advanced Visibility with SQL] Adding PostgreSQL 12 schema and interface Jan 25, 2023
@rodrigozhou rodrigozhou force-pushed the advanced-visibility-postgresql-schema branch from b6f24ae to 950fa2d Compare January 25, 2023 23:47
@MichaelSnowden
Copy link
Contributor

Could you paste a diff of the SQL files? That would make it easier to review

@rodrigozhou
Copy link
Contributor Author

@MichaelSnowden You can check the difference in the commits. The first commit is just a copy of the v96 schema plus formatting (no actual change). The second commit has the changes in the schema, and the third commit adds the interface and configs.

@rodrigozhou rodrigozhou force-pushed the advanced-visibility-postgresql-schema branch from 950fa2d to c0b1743 Compare January 28, 2023 09:06
@rodrigozhou rodrigozhou force-pushed the advanced-visibility-postgresql-schema branch from c0b1743 to 0cf053b Compare January 30, 2023 20:18
Copy link
Member

@alexshtin alexshtin left a comment

Choose a reason for hiding this comment

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

We should remove 9.6 support long time ago :-(

@rodrigozhou rodrigozhou merged commit cb22aab into temporalio:master Jan 31, 2023
@rodrigozhou rodrigozhou deleted the advanced-visibility-postgresql-schema branch January 31, 2023 22:35
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.

3 participants