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.

 This won't block concurrent processes for the whole
 time it takes to process the rows, so it's probably
 closer to what you want.
 
 The marker solution seems to be the correct idea, I must think about it.
 Would you create the call within a stored procedure (and call the SP
 from the client) or would you use the
 statement from a client direct?

I don't think it matters - use what is most constistent with
your taste and architecture.

Yours,
Laurenz Albe


-- 
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


Fwd: [GENERAL] upgrading from V8.3.4 to V9.2.4

2013-04-19 Thread Ian Harding
Forgot to include the list!  Sorry!
If you have a non-standard socket file location pg_upgrade will not work
for this upgrade.


On Fri, Apr 5, 2013 at 9:37 AM, Leonardo Carneiro chesterma...@gmail.comwrote:

 Beside all notes, i recommend you to use pg_upgrade, to avoid a complete
 backup/restore in your transition.

 http://www.postgresql.org/docs/9.2/static/pgupgrade.html


 On Fri, Apr 5, 2013 at 1:30 PM, Kevin Grittner kgri...@ymail.com wrote:

 Robert Treat r...@xzilla.net wrote:

  Yeah, there were also some subtle breakage around keywords used
  as variable naming when plpgsql was port to use the core lexer.

 One more: from a Java client access to bytea columns will break if
 you don't also use the latest JDBC driver jar.

 --
 Kevin Grittner
 EnterpriseDB: http://www.enterprisedb.com
 The Enterprise PostgreSQL Company


 --
 Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
 To make changes to your subscription:
 http://www.postgresql.org/mailpref/pgsql-general