Re: [HACKERS] Atomic Operations

2007-01-10 Thread Tom Lane
Markus Schiltknecht <[EMAIL PROTECTED]> writes: > what are the assumptions PostgreSQL normally does about atomic > operations? Rule of thumb: you want to touch shared memory, you use a lock. There are a few places that violate it, but in general you'd better have a pretty darn good reason to not

Re: [HACKERS] Atomic Operations

2007-01-10 Thread Alvaro Herrera
Markus Schiltknecht wrote: Hi Markus, > what are the assumptions PostgreSQL normally does about atomic > operations? I see sig_atomic_t is used in signal handlers. Additionally, > there is a match for a cmpxchg instruction in some solaris ports code, > but that's about what I found in the sour

[HACKERS] Atomic Operations

2007-01-10 Thread Markus Schiltknecht
Hi, what are the assumptions PostgreSQL normally does about atomic operations? I see sig_atomic_t is used in signal handlers. Additionally, there is a match for a cmpxchg instruction in some solaris ports code, but that's about what I found in the source. Am I safe assuming that pointer assi