Skip to content

Use PostgreSQL instead of sqlite#199

Closed
jqnatividad wants to merge 2 commits intockan:masterfrom
jqnatividad:198-replace-sqlite-with-postgresql
Closed

Use PostgreSQL instead of sqlite#199
jqnatividad wants to merge 2 commits intockan:masterfrom
jqnatividad:198-replace-sqlite-with-postgresql

Conversation

@jqnatividad
Copy link
Copy Markdown
Contributor

@jqnatividad jqnatividad commented Aug 31, 2020

Implements #198 and fixes #129.

Database, not directory
@mbocevski
Copy link
Copy Markdown
Contributor

@jqnatividad I think that for most users of datapusher, sqlite is good enough and should be default. Considering SQLAlchemy is used, different backend are supported. So I would suggest to just update the documentation about using Postgres as a backend for datapusher and not change the default sqlite configuration.

@jqnatividad
Copy link
Copy Markdown
Contributor Author

@mbocevski thanks for your feedback. However, sqlite won't work for a truly asynchronous, concurrent datapusher because you will get a "sqlite Operational Error: Database is Locked error" as it cannot support more than one thread writing to the database.

https://stackoverflow.com/questions/3172929/operationalerror-database-is-locked/3172950

You can make it work by increasing the timeout, but then doing so effectively makes datapusher single-threaded again, even if you configure uwsgi to make it concurrent (#201).

@mbocevski
Copy link
Copy Markdown
Contributor

Yes that is clear, however I'm suggesting that a lot of users might not need datapusher to be concurrent and I'm suggesting to document how to make datapusher concurrent and provide configuration for those that need it to be concurrent. WDYT?

@jqnatividad
Copy link
Copy Markdown
Contributor Author

jqnatividad commented Oct 2, 2020

@mbocevski I'll amend the PR so that the user can be given both options and document the implications of each.

BTW, I still think the sqlite db should not be stored in /tmp as you loose the job history between reboots as documented in #129.

@mbocevski
Copy link
Copy Markdown
Contributor

@jqnatividad Yeah I agree with that. Considering lots of folks would be deploying datapusher on the same box as CKAN. maybe we should store it by default in /var/lib/ckan?

@amercader
Copy link
Copy Markdown
Member

@jqnatividad @mbocevski please check #207, particularly the new section that describes this setup

@amercader amercader closed this Oct 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Don't store job data in /tmp

3 participants