174 enable postgres timeseries storage#187
Conversation
| -- create roles | ||
| CREATE ROLE :JOBS_RW_USER_NAME LOGIN PASSWORD :'JOBS_RW_USER_PASSWORD'; | ||
| CREATE ROLE :TIMESERIES_RW_USER_NAME LOGIN PASSWORD :'TIMESERIES_RW_USER_PASSWORD'; | ||
| ALTER ROLE :TIMESERIES_RW_USER_NAME CREATEDB; |
There was a problem hiding this comment.
At the moment, each run creates a new DB in Postgres, and omotes_timeseries is not being used at all.

I believe writing optimization runs per schema under the same database (e.g., omotes_timeseries) is a more logical (simpler, more maintainable) design choice in the PostgreSQL case? And within the same schema, there can be different tables per carrier generated from the Mesido optimization run.
Therefore, should it be create schema role instead of create db?
There was a problem hiding this comment.
@ewoudwerkman Mark and I were discussing this. Do you agree with the comment above? Then some mesido code changes are needed.
There was a problem hiding this comment.
I would suggest to use schemas instead of databases, to group things
There was a problem hiding this comment.
@MarkTNO, FYI of TODOs
- Created a MESDIO issue here Generated profiles per run should be written at the schema level when PostgreSQL database is used Multi-Energy-Systems-Optimization/mesido#515
- Update pyESDL example
- Update optimizer-worker needed?
| @@ -0,0 +1,4 @@ | |||
| while true; do | |||
| date +"%Y-%m-%d %H:%M:%S" | |||
| docker stats 79e4e234711e --no-stream --format "{{.Name}} {{.MemUsage}}" | |||
There was a problem hiding this comment.
Replace container id with service name?
Maybe we can limit logs to no more than a certain number of lines (e.g. 1000)?
tail -n 1000 container_mem.log > container_mem.tmp && mv container_mem.tmp container_mem.log
There was a problem hiding this comment.
Who is still using PowerShell scripts (Deltares, TPG)? Do we need to keep maintaining them?
If so, the current role and privilege assignments that are defined in postgres/postgres-init.sql are not fully reflected here yet?
…ta; Adjust postgres role and permission
No description provided.