Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-71435

ERROR: relation "mdl_backup_ids_temp" does not exist

    XMLWordPrintable

Details

    • MOODLE_310_STABLE

    Description

      I've recently setup a multi-droplet Moodle installation ( Moodle 3.10.3 (Build: 20210325)  ) on Digital Ocean with the following stack: 

      • DO managed Load balancer with a Let's Encrypt cert
      • PHP 7.4fpm with opcache
      • nginx
      • Postgres (via Digital Ocean managed database) with connection pooling
      • Redis for caching
      • NFS for /moodledata and related 

      While performing a backup, either via CLI ( sudo -u www-data /usr/bin/php admin/cli/backup.php --courseid=5 ) or web interface, I get the following issue (I've enabled debug logging):  

      [...] calculating controller checksum f39d324b957ebf6bfcb3fae8eb84da37loading controller from db
      Default exception handler: Si è verificato un errore durante la scrittura nel database Debug: ERROR:  relation "mdl_backup_ids_temp" does not exist
      LINE 1: INSERT INTO mdl_backup_ids_temp (backupid,itemname,itemid) V...
                          ^
      INSERT INTO mdl_backup_ids_temp (backupid,itemname,itemid) VALUES($1,$2,$3) RETURNING id
      [array (
        'backupid' => 'b813db954f06b4356e3df28b9a5a38c9',
        'itemname' => 'user',
        'itemid' => '64',
      )]
      Error code: dmlwriteexception

      The whole stacktrace: https://pastebin.ubuntu.com/p/9Cz3Jnxdpn/

      What could be the cause? Do temp tables need to have a certain amount of space and in that case could it be that it doesn't get created for some size-related reasons?

      Or is it possible that due to some kind of caching involved in the pooling the table should be created but alas it doesn't for since it thinks it's there but it's not?

      As a matter of further investigation and to try to poinpoint in the issue on my own, I've duplicated the whole environment with the same exact data, snapshotting at time X and restoring it on a plain Postgres database with no connection pooling (an instance which isn't Digital Ocean managed but locally installed on my machine) and the backup goes well, so I'd reckon it's not course/questions related.

      I'd appreciate any insight into the matter

      Thanks 

      Francesco

      Attachments

        Activity

          People

            Unassigned Unassigned
            fnello Francesco Nello
            Adrian Greeve, Jake Dallimore, Mathew May, Mihail Geshoski, Peter Dias, Sujith Haridasan
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated: