Fork me on GitHub
#datomic
<
2021-10-15
>
Kris C08:10:03

Hi, new to Datomic, trying to set it up with postgres storage. Transactor starts OK, but I have a problem starting the peer server, the error I am getting is "Could not find datomic in catalog". Any hints?

thumbnail08:10:21

I'm not sure if this is the problem; But the database should be created before booting the peer-server.

Kris C08:10:34

it is created

Kris C08:10:44

transactor starts ok

Kris C08:10:07

ah, found the problem: you first need to create the (datomic) database by hand as explained here: https://docs.datomic.com/on-prem/peer/peer-getting-started.html

Kris C08:10:52

Peer Server does not create or delete databases and must be connected to an already-existing logical database within the Datomic system.

sebastian15:10:11

Hey. How are you running your Postgres? Locally or inside a Docker container? Ia was trying to create a connection from my Clojure app on the host to Postgres in Docker which fails. So I am hoping for a basic config that works -.-

Ivar Refsdal08:10:50

sebastian: Have you tried setting ALT-HOST in the transactor properties file? https://docs.datomic.com/on-prem/operation/deployment.html#peers-fail-connect-txor

Kris C10:10:30

@U4LN72X44 I am running it locally, had no problems but the one I described..

sebastian18:10:01

thanks for the pointer. I'll try that.

kirill.salykin09:10:07

hi is there a way to attach a tx function to every tx when the some attribute is being updated (w/o specifying it explicitly as part of tx)? for example to enforce the constraint

order/state can be one of #{:pending :rejected ...}
similar to what sql does on constraint check

Ivar Refsdal11:10:25

(I haven't used it myself though)

kirill.salykin13:10:40

thats it! thank you so much!

🧡 1