Problem after upgrading to PostgreSQL 12

119 views
Skip to first unread message

Sky

unread,
Dec 5, 2019, 11:21:08 AM12/5/19
to mogile
We have been using MogileFS with a PostgreSQL backend successfully for some time now. However, after upgrading to PostgreSQL 12 (from 10), we are experiencing the following error any time we try to add a new file:

Error registering tempfile: DBD::Pg::db last_insert_id failed: No suitable column found for last_insert_id of table "tempfile" at /usr/local/share/perl/5.20.2/MogileFS/Store.pm line 1099.

We are running the latest DBD::Pg (DBD-Pg-3.10.0) which is supposed to be PostgreSQL 12 compatible - at least according to the documentation.

Any ideas what might be going on here?


Dave Lambley

unread,
Dec 13, 2019, 5:30:08 AM12/13/19
to mog...@googlegroups.com
Hi Sky,
I'm not a postgres expert, but the driver source code suggests that
that the problem may be with the tempfile table not having exactly one
sequence associated with it.

https://metacpan.org/source/TURNSTEP/DBD-Pg-3.9.1/Pg.pm#L401

The error seems to come either from line 401 or 408, where it seems to
be looking at the catalog to find an appropriate sequence. Perhaps
check that the table is set up with a SERIAL as expected? I don't
remember how tempfile is used, but you may be able to delete and
recreate it if there are no writes happening.

Hope that helps,
Dave

Sky

unread,
Sep 18, 2020, 5:57:18 AM9/18/20
to mogile
Sorry for not getting back to you sooner. The deletion of the tempfile seemed to resolve the issue.

Thank you!

Sky

Reply all
Reply to author
Forward
0 new messages