Fork me on GitHub

@seancorfield looking into next.jdbc I will let you know if I have questions Thanks for the help.


Sure thing. We use it very heavily at work for MySQL. I maintain HoneySQL as well, these days, so I can answer Qs about that if you go that way (and there's a #honeysql channel). You'll run across in a lot of the books/tutorials which I maintained for eight years as the forerunner to next.jdbc.

🙂 4

@seancorfield db migrations are not a thing correct? I'm okay creating and updating a db I just want to try and do the standard thing.


There are several migration libraries... Migratus is one that comes to mind (although I don't use any of them).


We have our own custom migration code at work.


One of those uses date/time stamps which is probably what we'd use at work if we were starting over.


We went with a DB "version" number, which is what the other of those two libs does.


Yeah, Migratus uses the timestamps. That's the one I was thinking of.


sweet thanks


@jdwoodsy1 I use FlywayDB - super easy to use, althought nothing "native" for Clojure, the interop is trival. I use FlywayDB for my Kotlin projects too.


Here is an example


Thanks I will look into this as well.

Ben Hammond17:02:07

hi guys I'm using Postgres advisory locks for a process that is inconveniently situated to squash into a single transaction. I'm also using Hikari Connection Pool, and I'm wondering if this is a bad combination. What are the chances of

happening on a completely different connection to the one that acquired the lock. (5 in 6, I presume)

Ben Hammond17:02:26

Is there a body of wisdom about how to approach this?

Ben Hammond17:02:56

should I just use

for the entire process

Ben Hammond17:02:46

oh sorry, I though pinning was private


@U793EL04V I'm not an expert on this, but I see they use pg_backend_pid() in que (a ruby job system based on advisory locks)

Ben Hammond20:02:58

interesting. thanks


I worked on a project that at one point used advisory locks in a job queue kind of thing, I don't recall if that was just an initial design or it went to production with it. You definitely need to be careful mixing them with a connection pool (which it sounds like what your question was). You'll want to get a connection from the pool and keep it and not return it to the pool until you unlock

👍 4