PostgreSQL major upgrade with pgvector
If we installed pgvector, upgrading PostgreSQL major version will not success with pg_upgrade. We need to manually dump and restore all databases.
In order to do that,
-
Start the existing version service, eg 16.
-
Run
pg_dumpall -U postgres -f /path/to/all_dumps.sql -
Stop service.
-
Upgrade
postgresql postgresql-libs postgresql-old-upgrade -
Re-compile and re-install
pgvector. -
Initialize database, such as
initdb -D /var/lib/postgres/data --locale=C.UTF-8 --encoding=UTF8 -
Start the newer version service, eg 17.
-
Login as
postgres(sudo -u postgres /bin/bash), and run
psql -f /path/to/all_dumps.sql postgres
MySQL and PostgreSQL GUI tools
I am using Arch Linux, and recently there are some issues on MySQL Workbench and pgAdmin 4.
MySQL Workbench with the latest version 8.0.12 has issue to make connection through the SSH tunnelling. As a result, I have to downgrade to version 6.3.10. However, with the recent upgrade of icu package to 62.1, it breaks the MySQL Workbench 6.3.10. In order to solve this, I duplicate the following files,
[code lang=text] cp libicudata.so.62 libicudata.so.61 cp libicui18n.so.62 libicui18n.so.61 cp libicuuc.so.62 libicuuc.so.61 [/code]
Database or spreadsheet?
Sometimes we use spreadsheet to store data as table just like database. Especially the features provided like sorting and filtering. This allows us to look at the data easily without the knowledge of SQL (structured query language). Furthermore, we can add in the rows easily, do calculation using formulae, and also copy-paste the data to any cell. Comparing to database, the data needs to be filled row by row, this is the main drawback. This is why spreadsheet is easier to use.