Comments (4)
Sure, go ahead!
from ichiran.
I found a workaround! I simply asked pg_restore to ignore the roles (via --no-owner --no-privileges
), deleted the docker/pgdata
, rebuilt the container and reran compose, and everything works!
So step 1, apply this patch:
diff --git a/docker/postgres-initdb/ichiran-db.sh b/docker/postgres-initdb/ichiran-db.sh
index dbe2c55..8aa9800 100644
--- a/docker/postgres-initdb/ichiran-db.sh
+++ b/docker/postgres-initdb/ichiran-db.sh
@@ -4,7 +4,7 @@ echo "========================="
createdb -E 'UTF8' -l 'ja_JP.utf8' -T template0 dummy
set +e
-pg_restore -C -d dummy /ichiran.pgdump
+pg_restore -C -d dummy /ichiran.pgdump --no-owner --no-privileges
echo "========================="
echo "Finished ichiran DB init!"
Then,
$ rm docker/pgdata && docker-compose build pg && docker compose up
I waited about ~half hour, watched du -h -d0 docker/pgdata
tick up to 4.4 GB, before everything was ready.
I'm not a Postgres expert, any tips on what impact --no-owner --no-privileges
has? Can I possibly create the ichiran
role now, that the database has initialized, and then future restores will work unmodified? Or is the best thing to do is for the release process to somehow include roles in the dump file?
from ichiran.
I believe "role doesn't exist" error is normal and shouldn't affect anything. It's expected when restoring a database dump on a different machine. I don't use docker myself so not sure about the other issues
from ichiran.
Thanks for confirming @tshatrov! Do you want a one-line PR with the fix I mentioned above to make the Docker instructions work?
from ichiran.
Related Issues (20)
- Paper/Explanation of algorithm used HOT 9
- Support for がい/かい suffix HOT 1
- JSON returned by ichiran/cli HOT 4
- 一箇年 and 堪へる are missing kana_text, causing internal server error HOT 2
- Used postgres version HOT 4
- Minor note about database_name HOT 2
- Include root word information for conjugated words in JSON
- ichiran-cli doesn't work HOT 8
- Support for んだ and んです suffix HOT 1
- ichiran gets 「1週間後 」wrong HOT 1
- Logging for Postgres queries HOT 4
- Docker entrypoint missing on Windows HOT 1
- `Database error 42P01: relation "kana_text" does not exist` from CLI due to `switch-conn-vars` HOT 2
- Improving expression detection HOT 1
- てもいい / でもいい dropping も out of data HOT 2
- Spliting words functionality HOT 6
- Newest Ichiran with newest data seems to be failing 31 tests HOT 11
- Curious treatment of kanji-break list HOT 2
- Docker setup with 2024 January dump complains HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ichiran.