gpdb
gpdb copied to clipboard
pg_upgrade: check for views using deprecated operators
Views that use deprecated operators will cause upgrade to fail. This happens during metadata restore on the target cluster because pg_restore will error trying to create a view using types or operators that do not exist anymore. This is not ideal as we could be many hours into upgrade before a view using a deprecated operator causes pg_upgrade to fail. This check calls a support function on the source cluster to check if views using deprecated operators exist.
Due to the limitations of the query walker being a function that only returns a bool, we can only tell if a deprecated operator exists in a view. We do not have an easy way to tell users how many or which deprecated operators are present in the view.