Uploaded image for project: 'phpBB'
  1. phpBB
  2. PHPBB-16525

Database backup generates a general error with PostgreSQL 12+

XMLWordPrintable

      Trying to generate a database backup through the ACP with PostgreSQL 12+ generates a general error.

      SQL ERROR [ postgres ]
       
      ERROR: column "consrc" does not exist LINE 1: SELECT conname as index_name, consrc ^ HINT: Perhaps you meant to reference the column "pg_constraint.conkey" or the column "pg_constraint.conbin". []
       
      SQL
       
      SELECT conname as index_name, consrc FROM pg_constraint, pg_class bc WHERE conrelid = bc.oid AND bc.relname = 'phpbb_topics_watch' AND NOT EXISTS ( SELECT * FROM pg_constraint as c, pg_inherits as i WHERE i.inhrelid = pg_constraint.conrelid AND c.conname = pg_constraint.conname AND c.consrc = pg_constraint.consrc AND c.conrelid = i.inhparent )
       
      BACKTRACE
       
      FILE: (not given by php)
      LINE: (not given by php)
      CALL: msg_handler()
       
      FILE: [ROOT]/phpbb/db/driver/driver.php
      LINE: 1023
      CALL: trigger_error()
       
      FILE: [ROOT]/phpbb/db/driver/postgres.php
      LINE: 193
      CALL: phpbb\db\driver\driver->sql_error()
       
      FILE: [ROOT]/phpbb/db/extractor/postgres_extractor.php
      LINE: 223
      CALL: phpbb\db\driver\postgres->sql_query()
       
      FILE: [ROOT]/includes/acp/acp_database.php
      LINE: 104
      CALL: phpbb\db\extractor\postgres_extractor->write_table()
       
      FILE: [ROOT]/includes/functions_module.php
      LINE: 676
      CALL: acp_database->main()
       
      FILE: [ROOT]/adm/index.php
      LINE: 81
      CALL: p_master->load_active()
      

      As the error message says, this is triggered by the missing pg_constraint.consr which was removed in PostgreSQL 12.0

      References:

            Marc Marc
            AbaddonOrmuz AbaddonOrmuz [X] (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: