[GENERAL] advisory locks namespace?

2017-09-17 Thread Rob Nikander
Hi, Am I right if two applications use advisory locks in the same database, they need to know which lock numbers are used to by the other application, to avoid conflicts? Rob -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription:

Re: [GENERAL] Is the row version available in SQL?

2017-06-29 Thread Rob Nikander
> On Jun 28, 2017, at 11:39 AM, Chris Travers wrote: > > For that, you could use xmin. That tracks the transaction where the row > first became visible. > On Jun 28, 2017, at 4:34 PM, Merlin Moncure wrote: > > What you are describing is called

[GENERAL] Is the row version available in SQL?

2017-06-28 Thread Rob Nikander
Hi, I'm reading about MVCC here: https://www.postgresql.org/docs/current/static/mvcc.html . In some cases I can use these transaction isolation modes, but in other cases, I may want to manage the versions and concurrency manually. Is

[GENERAL] performance considerations of jsonb vs separate rows

2017-06-19 Thread Rob Nikander
Hi, I’ve got a web app where I want to store user’s session data. The schema in this data changes a lot so it may be useful here to store the session properties in either a jsonb column, or in multiple rows. Something like: session_id | data 100 { a: 1, bar: 2 ... 101

Re: [GENERAL] Deadlock with single update statement?

2017-06-10 Thread Rob Nikander
> On Jun 10, 2017, at 10:34 AM, Tom Lane wrote: > […] but it'd be better to adjust the query to ensure a deterministic > update order. Thank you for the answer. Since `update` has no `order by` clause, I’m guessing there’s no way to do this with just the `update` statement,

[GENERAL] Deadlock with single update statement?

2017-06-10 Thread Rob Nikander
Hi, I’m trying to track down a deadlock happening in a live app. I’m wondering about statements like this, which select more than one row to update: update t set num = 1 where name = ‘foo’; It appears to be causing a deadlock, but I can’t reproduce it on my test database. Could two

[GENERAL] Fastest simple key-value store, multiple writers, like Redis?

2017-02-02 Thread Rob Nikander
Hi, I'm working on a project with multiple different data storage backends. I'd like to consolidate and use Postgres for more things. In one new situation we're starting to use Redis, thinking it will perform better than Postgres for a table that is updated a lot by concurrent background jobs.