Skip to content

Improve PostgreSQL advisory lock key hashing#64

Merged
mvorisek merged 6 commits intomasterfrom
cross_platform_pgsql
Dec 6, 2024
Merged

Improve PostgreSQL advisory lock key hashing#64
mvorisek merged 6 commits intomasterfrom
cross_platform_pgsql

Conversation

@mvorisek
Copy link
Member

@mvorisek mvorisek commented Dec 6, 2024

related with #59

Use md5 hashing which is considerably faster than sha256 as PostgreSQL does not support more than 8 bytes anyway.

Also make the locks stable across machines with different endianness.

BC break: Locks before upgrade are not honored after upgrade!

If locks before upgrade are needed to be honored, rename them manually.

@mvorisek mvorisek marked this pull request as ready for review December 6, 2024 16:04
@mvorisek mvorisek merged commit da9bd84 into master Dec 6, 2024
@mvorisek mvorisek deleted the cross_platform_pgsql branch December 6, 2024 20:32
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