Database sqlite to pgsql

I’m trying to export the local sqlite database to a pgsql stored database on a new machine… Have tried mysql (which I know a lot better), but had issues with UTF-8 and other encodings throwing errors when importing actual data. So I’m now trying the ‘supported’ way…

I followed the guide, albeit with PGSQL v16 now, used the pqsql dll zip package as instructed, but…
I get an error like this every time I import my database to the pgsql server. It starts, but halts on error:


[FireDAC][Phys][PG] -345. Data too large for variable [P3]. Max len = [12000], actual len = [138098] Hint: set the TFDParam.Size to a greater value.

I did not find anything TFDParam related in the postgres config files…
Is there a way, without messing up my current setup, to change that parameter somewhere in mAirlist of in its exporter module ???

Which guide did you follow?

Normally you just create a new pg database, leave it empty and duplicate the content via the dialogue in the database app…

1 Like

Hey Stefan,

I followed this guide: tutorials:mairlistdb:setup-postgresql [mAirList Wiki]

I did create an empty database and a user, checked connectivity, and then followed the export procedure, and ended up with the error message described above…

Any clues where to start looking?

That’s completely outdated :wink:

(There’s no need to change something in the config file anymore and I think this completely messed up your setup process.)

You may have missed this tutorial in the FAQ/How To-Section of this forum :slight_smile:

After you’ve installed pg16 and created a database just start the cloning process within the database app!

Please report back if it worked for you!

In the meantime, I think I found the issue… There was a single (yes, a single!!! what are the odds) Traktor-originated file, with some attributes filled in that did something weird (looking at it, it seemed empty, selecting the attribute contents, a looooot of AAAAA’s appeared…
I found which item it was by watching the export process and noticing it was at a ‘file_attributes’ block, and then looking into the exported pgsql database at the last imported item in that file_attributes table showed me the item id number where to look. checking the difference between the exported lines and the ones in the original database made me see which line it ‘could have been’…

Deleting the database, recreating the database and deleting the attribute field; and then doing the export again, made it work!

So: my export is working.

Sorry for the inconvenience, but a big thanks for taking the time to reply to my message!

1 Like

What a mess of time :wink:

But I’m glad it worked for you now!