| From: | Bruce Momjian <maillist(at)candle(dot)pha(dot)pa(dot)us> | 
|---|---|
| To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> | 
| Cc: | Pablo Funes <pablo(at)cs(dot)brandeis(dot)edu>, pgsql-hackers(at)postgreSQL(dot)org | 
| Subject: | Re: [HACKERS] please? | 
| Date: | 1999-05-31 17:43:56 | 
| Message-ID: | 199905311743.NAA23066@candle.pha.pa.us | 
| Views: | Whole Thread | Raw Message | Download mbox | Resend email | 
| Thread: | |
| Lists: | pgsql-hackers | 
> A possible approach is for your clients to maintain more than one
> backend connection, and use one of the backends to do the stuff 
> that might block while using another one to do the stuff that won't.
> This would take a little more bookkeeping in the client but it seems
> like a logically cleaner way to think about it.
Or you could do it outside of the database using a Unix filesystem lock
file.  There are symantics for no-blocking lock stuff in flock():
           #define LOCK_SH 0x01    /* shared file lock */
           #define LOCK_EX 0x02    /* exclusive file lock */
           #define LOCK_NB 0x04    /* don't block when locking */
           #define LOCK_UN 0x08    /* unlock file */
I don't know of any SQL databases that allow non-blocking lock requests.
-- 
  Bruce Momjian                        |  http://www.op.net/~candle
  maillist(at)candle(dot)pha(dot)pa(dot)us            |  (610) 853-3000
  +  If your life is a hard drive,     |  830 Blythe Avenue
  +  Christ can be your backup.        |  Drexel Hill, Pennsylvania 19026
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Tom Lane | 1999-05-31 18:03:48 | Re: [HACKERS] Open 6.5 items | 
| Previous Message | Tom Lane | 1999-05-31 17:35:53 | Re: [HACKERS] please? |