yuqi1129 opened a new pull request, #14518: URL: https://github.com/apache/gravitino/pull/14518
### What changes were proposed in this pull request? Use PostgreSQL DROP SCHEMA RESTRICT for schema deletion and translate SQLSTATE 2BP01 into a schema-not-empty conflict with the source reason and cleanup guidance. Remove the dependency preflight and relation locks proposed in #14493. Document the conservative behavior in the catalog guide and Java/Python API, SPI and client contracts, and add regressions for external views/FKs, sequence defaults, partitions/statistics, schema-owner permissions and a dependency committed on another connection immediately before DROP. ### Why are the changes needed? Native CASCADE can delete objects outside the requested schema. Preflight checks cannot close the race with concurrent DDL, and relation locking introduces extra privileges. This mitigation delegates the final decision to PostgreSQL's atomic restrictive drop. Related: #14492; supersedes the approach in #14493. Enterprise tracking: https://github.com/datastrato/gravitino-enterprise/issues/3128 ### Does this PR introduce _any_ user-facing change? Yes. All non-empty PostgreSQL schema drops now return HTTP 409, including cascade=true requests. Empty schemas can still be dropped. This is a conservative mitigation and does not implement full schema-local cascade. Users must remove contained objects explicitly before dropping the schema. ### How was this patch tested? ./gradlew :catalogs:catalog-jdbc-postgresql:test -PskipITs -PskipDockerTests=false 79 tests passed, including Docker tests. Spotless passed. Three regressions (sequence default, concurrent view dependency and schema-owner permissions) fail against the previous #14493 implementation. Server/Spark/Trino end-to-end suites were not run. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
