-
Notifications
You must be signed in to change notification settings - Fork 28
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix a failure in DROP EXTENSION (#96)
When pg_ivm is dropped, the error "could not open relation with OID ..." occurred at the hook function that enables DROP TABLE on an IMMV to remove the entry in pg_ivm_immv. It was because that the primary key was already dropped at the time pg_ivm_immv's toast is been dropped. Also, DROP TABLE command issued concurrently with DROP EXTENSION pg_Ivm also could cause the same error because pg_ivm_immv could be already dropped. This race condition is fixed by using always RangeVarGetRelidExtended to get OID of pg_ivm_immv instead of using a cache of get_relname_relid results. This makes sure that pg_ivm_immv exists when this is scanned.
- Loading branch information
Showing
1 changed file
with
16 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters