Closed ylluminate closed 5 days ago
Hey @ylluminate would you be able to use our docker image? You can get it from https://hub.docker.com/r/mattermost/mattermost-pgloader/ and it's the static version that should work out of the box.
Hmm, I don't know. I sure do hate me some Docker in the morning, afternoon, evening or any time... I'll have to see. We really need a statically compiled version handy to save the sanities.
This is the Dockerfile: https://github.com/mattermost/mattermost-pgloader-docker/blob/main/Dockerfile that we use to compile. But if you are facing difficulties while compiling, we suggest to use the docker image for convenience. Feel free to choose any approach that works for you.
Thanks, yes, this is effectively the same approach I took, but the compilation was failing ad infinitum for Ubuntu 22.04 and 24.04. I did, however, see you're using the golang Docker image at golang:1.22.3
so this appears to be Debian 12 and thus there does likely appear to be a problem with building it on Ubuntu vs Debian.
I did manage to build it though after installing a Debian 12 system and emulating the environment as per the Dockerfiles for both golang and this.
For posterity, here's a download for the most recent two versions (note, both of these execute on Ubuntu 22.04 and likely newer):
3.6.3e06d1b
commit hash as minor identifier, as per the one in this Dockerfile): https://share.zight.com/d5ujXK1N3.6.70f3557
): https://share.zight.com/OAuvZAPgI did get further via the tool, but still ran into problems - tried both the 3.6.9 version from here + the newer version and both failed with some potentially different nuances. Will report in a new ticket.
When using
pgloader
to migrate a Mattermost MySQL database to PostgreSQL, the following error occurs during the metadata fetching phase:This error suggests that
pgloader
encountered a MySQL column type or condition it wasn't programmed to handle, resulting in a fallback to an unhandled case.MySQL Server version:
8.0.36-0ubuntu0.22.04.1
PostgreSQL version:psql (17.0 (Ubuntu 17.0-1.pgdg22.04+1), server 16.4 (Ubuntu 16.4-1.pgdg22.04+2))
pgloader version:pgloader version 3.6.7~devel
The only thing I've found semi-close to this issue appears to be with
pgloader
itself needing to be built from source to get the newest version.There's a problem though, apparently, where Ubuntu 22.04 and 24.04 both ship with a lie. Their repo and installation info say they are shipping version
3.6.10-3
as you can verify here if you like: http://apt.postgresql.org/pub/repos/apt/pool/main/p/pgloader/But when you extract them and run them to verify that they are newer versions, they are both OLD:
And unfortunately compilation via standard methods are now failing - at least on x86_64 Ubuntu 22.04...
We really need a static version of
pgloader
if that will indeed fix this issue:Here's the full output: