Search code examples
google-cloud-platformgoogle-cloud-sql

How to upload dictionary files to google cloud postgresql?


I want to upload dictionary files.

CREATE TEXT SEARCH DICTIONARY ispell (
    TEMPLATE = ispell,
    DictFile = bulpo,
    AffFile = bulpo
);

ERROR: could not open dictionary file "/share/tsearch_data/bulpo.dict": No such file or directory

I try to upload it via cloud shell but result is same.


Solution

  • hey @asapokL you cannot upload files Cloud SQL (rather than database file for migration purposes) as you don't have access to the underlying compute engine instance because Cloud SQL is fully managed solution by Google Cloud. in your case you will need to upload your file (.dict) to the directory tsearch_data directory is in SHAREDIR. I would suggest if you want to accomplish this use case is to create a compute engine then install posgresql on it. but remember you will have to handle all operations on this instance (backups, rollouts, performence, OS ...etc)