> Timeouts are a system-level mechanism that to be useful must refer to 
> system-level events that are far above anything that PG knows about.  
> The only way PG could apply reasonable timeouts would be for the 
> application to dictate them, but the application can better implement 
> them itself.

OK we have the following scenario

  Session A                         Session B

  begin                             begin

  insert                                       -- on unique constraint

                                    insert     -- on same unique constraint

                                               -- Session A becomes idle

                                    :          -- Session B becomes ...


or we have (Informix Online)

  Session A                         Session B

  set lock mode to wait [seconds]   set lock mode to wait [seconds]

  begin                             begin    

  insert                                       -- on unique constraint

                                    insert     -- on same unique constraint

                                    * resource not available error *

                                               -- Session B carries on

Oracle 7 (OCI) has oopt() call to set wait options for requested
resources. Oracle 8 OCI has the same behaviour as PG ie. oopt() 
is no longer available.

I believe that the ability to switch the database to either not wait
for resources, or wait a specified period or wait forever 
(default) is essential especially for interactive applications.

Regards
Theo

---------------------------(end of broadcast)---------------------------
TIP 4: Don't 'kill -9' the postmaster

Reply via email to