On Tue, Aug 20, 2019 at 04:38:18PM +0300, Anastasia Lubennikova wrote: > > Solving this in pg_upgrade does seem like it's probably the better > > approach rather than trying to do it in pg_dump. Unfortunately, that > > likely means that all we can do is have pg_upgrade point out to the user > > when something will fail, with recommendations on how to address it, but > > that's also something users are likely used to and willing to accept, > > and puts the onus on them to consider their ACL decisions when we're > > making catalog changes, and it keeps these issues out of pg_dump. > > > I wrote a prototype to check API and ACL compatibility (see attachment). > In the current implementation it fetches the list of system procedures for > both old and new clusters > and reports deleted functions or ACL changes during pg_upgrade check: > > > Performing Consistency Checks > ----------------------------- > ... > Checking for system functions API compatibility > dbname postgres : check procsig is equal pg_stop_backup(), procacl not equal > {anastasia=X/anastasia,backup=X/anastasia} vs {anastasia=X/anastasia} > dbname postgres : procedure pg_stop_backup(exclusive boolean, OUT lsn > pg_lsn, OUT labelfile text, OUT spcmapfile text) doesn't exist in > new_cluster > dbname postgres : procedure pg_switch_xlog() doesn't exist in new_cluster > dbname postgres : procedure pg_xlog_replay_pause() doesn't exist in > new_cluster > dbname postgres : procedure pg_xlog_replay_resume() doesn't exist in > new_cluster > ... > > I think it's a good first step in the right direction. > Now I have questions about implementation details: > > 1) How exactly should we report this incompatibility to a user? > I think it's fine to leave the warnings and also write some hint for the > user by analogy with other checks. > "Reset ACL on the problem functions to default in the old cluster to > continue"
Yes, I think it is good to at least throw an error during --check so they don't have to find out during a live upgrade. Odds are it will require manual repair. -- Bruce Momjian <br...@momjian.us> http://momjian.us EnterpriseDB http://enterprisedb.com + As you are, so once was I. As I am, so you will be. + + Ancient Roman grave inscription +