Issue Summary

      This ticket is used to track a bug on RDS - after Postgres 10 upgrade, Jira may fail to start.

      https://dba.stackexchange.com/questions/237359/aws-rds-postgresql-master-user-lost-all-privileges-after-upgrading-from-v9-6

      When ugprading to Postgres 10 on AWS RDS, Jira can't start.
      It's because after upgrade, public schema lost access privileges.

      Steps to Reproduce

      1. Connect to postgres sever (psql)
      2. connect to jira database by \c <jiradb>
      3. list out schemas \dn+

      Expected Results

      1. rdsadmin user has access privileges
                                List of schemas
        Name  |  Owner   |  Access privileges   |      Description
      --------+----------+----------------------+------------------------
       public | rdsadmin | rdsadmin=UC/rdsadmin+| standard public schema
              |          | =UC/rdsadmin         |
      (1 row)
      

      Actual Results

      1. access privileges are lost.
            List of schemas
          Name  |  Owner   | Access privileges |      Description
        --------+----------+-------------------+------------------------
         public | rdsadmin |                   | standard public schema
        (1 row)
        

      Workaround

      Grant schema access to confluence user.

      confluence=> ALTER SCHEMA public OWNER to <jira_db_user>;
      ALTER SCHEMA
      confluence=> GRANT ALL ON SCHEMA public TO <jira_db_user>;
      GRANT
      

          Form Name

            [JRASERVER-72246] Postgres upgrade on AWS RDS Jira can't find tables

            Vishwas N M added a comment - - edited

            This issue still exists in PostgreSQL 12.2 , AWS RDS. With public schema has lost privileges and workaround fixed the issue. 

            Vishwas N M added a comment - - edited This issue still exists in PostgreSQL 12.2 , AWS RDS. With public schema has lost privileges and workaround fixed the issue. 

            I tried to reproduce this issue:

            • run RDS on 9.6.20, use psql console to check the permissions on schema:
              psql (13.3 (Debian 13.3-1.pgdg100+1), server 9.6.20)
              SSL connection (protocol: TLSv1.2, cipher: ECDHE-RSA-AES256-GCM-SHA384, bits: 256, compression: off)
              Type "help" for help.
              
              atldb=> \dn+
                                        List of schemas
                Name  |  Owner   |  Access privileges   |      Description       
              --------+----------+----------------------+------------------------
               public | rdsadmin | rdsadmin=UC/rdsadmin+| standard public schema
                      |          | =UC/rdsadmin         | 
              (1 row)
              
            • upgrade RDS to 10.17, use the console to check the permissions:
              psql (13.3 (Debian 13.3-1.pgdg100+1), server 10.17)
              SSL connection (protocol: TLSv1.2, cipher: ECDHE-RSA-AES256-GCM-SHA384, bits: 256, compression: off)
              Type "help" for help.
              
              atldb=> \dn+
                                        List of schemas
                Name  |  Owner   |  Access privileges   |      Description       
              --------+----------+----------------------+------------------------
               public | rdsadmin | rdsadmin=UC/rdsadmin+| standard public schema
                      |          | =UC/rdsadmin         | 
              (1 row)
              

            Which is an expected result and proves that the issue on AWS side was fixed. I'm closing the ticket.

            Artur Gniadzik added a comment - I tried to reproduce this issue: run RDS on 9.6.20, use psql console to check the permissions on schema: psql (13.3 (Debian 13.3-1.pgdg100+1), server 9.6.20) SSL connection (protocol: TLSv1.2, cipher: ECDHE-RSA-AES256-GCM-SHA384, bits: 256, compression: off) Type "help" for help. atldb=> \dn+ List of schemas Name | Owner | Access privileges | Description --------+----------+----------------------+------------------------ public | rdsadmin | rdsadmin=UC/rdsadmin+| standard public schema | | =UC/rdsadmin | (1 row) upgrade RDS to 10.17, use the console to check the permissions: psql (13.3 (Debian 13.3-1.pgdg100+1), server 10.17) SSL connection (protocol: TLSv1.2, cipher: ECDHE-RSA-AES256-GCM-SHA384, bits: 256, compression: off) Type "help" for help. atldb=> \dn+ List of schemas Name | Owner | Access privileges | Description --------+----------+----------------------+------------------------ public | rdsadmin | rdsadmin=UC/rdsadmin+| standard public schema | | =UC/rdsadmin | (1 row) Which is an expected result and proves that the issue on AWS side was fixed. I'm closing the ticket.

              Unassigned Unassigned
              emarghidan Eduard M
              Affected customers:
              0 This affects my team
              Watchers:
              4 Start watching this issue

                Created:
                Updated:
                Resolved: