Re: Race condition in HEAD, possibly due to PGPROC splitup - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Race condition in HEAD, possibly due to PGPROC splitup
Date
Msg-id 6923.1323875819@sss.pgh.pa.us
Whole thread Raw
In response to Re: Race condition in HEAD, possibly due to PGPROC splitup  (Pavan Deolasee <pavan.deolasee@gmail.com>)
List pgsql-hackers
Pavan Deolasee <pavan.deolasee@gmail.com> writes:
> BTW, on an unrelated note, I was looking at the way ShmemInitStruct()
> is used. It internally uses ShmemAlloc to allocate from shared memory.
> ShmemAlloc always MAXALIGN the requested size. But while calculating
> the total shared memory requirement, we don't always MAXALIGN
> individual structure sizes. One example is KnownAssignedXidsValid, but
> I am sure there are other places where the originally computed and the
> requested sizes could be different because of alignment.

> I wonder if we are just lucky not to hit shared memory size mismatch,
> may be because we round up to the block size at the end.

That sort of thing is down in the noise.  One reason we throw in the
100KB slop is so we don't have to sweat details like that.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Patch to allow users to kill their own queries
Next
From: Tom Lane
Date:
Subject: Re: Race condition in HEAD, possibly due to PGPROC splitup