Re: [GENERAL] dataset lock

2013-04-19 Thread Albe Laurenz
Philipp Kraus wrote: >> Do you want to implement something like a queue? > > Yes >> You get a few rows by >> UPDATE table SET status = processing WHERE id IN >>(SELECT id FROM table WHERE status = waiting >>ORDER BY id LIMIT 5) RETURNING *; >> Then process and update the rows. >> >> T

Re: [GENERAL] dataset lock

2013-04-17 Thread Philipp Kraus
On 2013-04-17 09:18:13 +0200, Albe Laurenz said: Philipp Kraus wrote: My PG database is connected to differend cluster nodes (MPI). Each programm / process on each node are independed and run the SQL select * from table where status = waiting after that I update the row with the update statemen

Re: [GENERAL] dataset lock

2013-04-17 Thread Albe Laurenz
Philipp Kraus wrote: > My PG database is connected to differend cluster nodes (MPI). Each > programm / process on each node are independed and run the SQL > select * from table where status = waiting > after that I update the row with the update statement (set status = working) > > so in this case

Re: [GENERAL] dataset lock

2013-04-16 Thread Philipp Kraus
On 2013-04-16 19:11:20 +0200, Steve Atkins said: On Apr 16, 2013, at 7:50 AM, Philipp Kraus wrote: Hello, I use a PG database on a HPC system (cluster). My processes get a dataset from the database and change the row, each process is independend. My table shows something like: id, status

Re: [GENERAL] dataset lock

2013-04-16 Thread Steve Atkins
On Apr 16, 2013, at 7:50 AM, Philipp Kraus wrote: > Hello, > > I use a PG database on a HPC system (cluster). My processes get a dataset > from the database and change the row, each process is independend. > My table shows something like: id, status, data > > id = PK a unqiue number > status