Re: [SQL] Are long term never commited SELECT statements are a problem?

2005-07-21 Thread Michael Fuhr
On Thu, Jul 21, 2005 at 05:40:57PM +0200, Erik Wasser wrote: > Why do I see in the first transaction data from the commited second > transaction? Doesn't prove that the documentation on the above URL > wrong? No, it doesn't. The quote you posted refers to the SERIALIZABLE isolation level, but t

Re: [SQL] Are long term never commited SELECT statements are a problem?

2005-07-21 Thread Alvaro Herrera
On Thu, Jul 21, 2005 at 05:40:57PM +0200, Erik Wasser wrote: > > When a transaction is on the serializable level, a SELECT query sees > > only data committed before the transaction began; it never sees either > > uncommitted data or changes committed during transaction execution by > > concurrent

Re: [SQL] Are long term never commited SELECT statements are a problem?

2005-07-21 Thread Erik Wasser
On Thursday 21 July 2005 17:18, Michael Fuhr wrote: > If you set AutoCommit to 0 then all statements are inside a > transaction. As you've discovered, SELECT acquires certain locks > that persist for the duration of the transaction, so you must commit > or roll back the transaction to release tho

Re: [SQL] Are long term never commited SELECT statements are a problem?

2005-07-21 Thread Michael Fuhr
On Thu, Jul 21, 2005 at 03:57:56PM +0200, Erik Wasser wrote: > Now I've got here a blocking problem. Severel SQL statements (like > renaming a field or UPDATE of a field) are blocked until I kill a > certain task. This task DOES only the INSERTS and UPDATES with a > transaction and the SELECT st

Re: [SQL] Can SELECT statements throw an error

2005-07-21 Thread Tom Lane
Erik Wasser <[EMAIL PROTECTED]> writes: > can SELECT statements throw errors except the followings: > - SQL syntax errors > - connection based errors (database is down/etc...) > - deadlocks > Did I miss an option? Many. Consider select 1 / 0 In general I'd think that most errors in the

Re: [SQL] Are long term never commited SELECT statements are a

2005-07-21 Thread Achilleus Mantzios
O Erik Wasser έγραψε στις Jul 21, 2005 : > Hello List, > > I've written an application in perl using DBI with MySQL (no transaction > support). Then we decide to migrate it to postgresql > (postgresql-8.0.1-r4). > > At first we were using 'AutoCommit => 1' with the application. That > means t

[SQL] Can SELECT statements throw an error

2005-07-21 Thread Erik Wasser
Hello list, can SELECT statements throw errors except the followings: - SQL syntax errors - connection based errors (database is down/etc...) - deadlocks Did I miss an option? -- So long... Fuzz ---(end of broadcast)--- TIP 5: don't forget to in

[SQL] Are long term never commited SELECT statements are a problem?

2005-07-21 Thread Erik Wasser
Hello List, I've written an application in perl using DBI with MySQL (no transaction support). Then we decide to migrate it to postgresql (postgresql-8.0.1-r4). At first we were using 'AutoCommit => 1' with the application. That means that every statement will be commited right away. Then I d