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

storage: Mark postgresql helpers functions as STABLE #832

Merged
merged 1 commit into from
Dec 19, 2024

Conversation

ptrus
Copy link
Member

@ptrus ptrus commented Dec 18, 2024

Marking these functions as STABLE allows them to be used in index expressions and enables PostgreSQL to optimize queries by avoiding unnecessary recomputations of the function during query execution.

Without the STABLE attribute, PostgreSQL treats the functions as VOLATILE, forcing it to recompute the function every time it is called within a query, even if the input is static.

More details: https://www.postgresql.org/docs/current/xfunc-volatility.html#XFUNC-VOLATILITY

Changes already applied to nexus.prd and testnet.nexus.prd.

@ptrus ptrus force-pushed the ptrus/feature/postgresql-stable-helpers branch from 9386191 to a8fe4c6 Compare December 18, 2024 09:33
@ptrus ptrus self-assigned this Dec 18, 2024
@ptrus ptrus force-pushed the ptrus/feature/postgresql-stable-helpers branch from a8fe4c6 to 93a93f4 Compare December 19, 2024 07:00
@ptrus
Copy link
Member Author

ptrus commented Dec 19, 2024

Merging since this has already been applied.

@ptrus ptrus merged commit acbc57f into main Dec 19, 2024
16 checks passed
@ptrus ptrus deleted the ptrus/feature/postgresql-stable-helpers branch December 19, 2024 07:06
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.

1 participant