pgsql: Fix race in dsm_attach() when handles are reused.

2019-02-14 Thread Thomas Munro
Fix race in dsm_attach() when handles are reused. DSM handle values can be reused as soon as the underlying shared memory object has been destroyed. That means that for a brief moment we might have two DSM slots with the same handle. While trying to attach, if we encounter a slot with refcnt ==

pgsql: Fix race in dsm_attach() when handles are reused.

2019-02-14 Thread Thomas Munro
Fix race in dsm_attach() when handles are reused. DSM handle values can be reused as soon as the underlying shared memory object has been destroyed. That means that for a brief moment we might have two DSM slots with the same handle. While trying to attach, if we encounter a slot with refcnt ==

pgsql: Fix race in dsm_attach() when handles are reused.

2019-02-14 Thread Thomas Munro
Fix race in dsm_attach() when handles are reused. DSM handle values can be reused as soon as the underlying shared memory object has been destroyed. That means that for a brief moment we might have two DSM slots with the same handle. While trying to attach, if we encounter a slot with refcnt ==

pgsql: Fix race in dsm_attach() when handles are reused.

2019-02-14 Thread Thomas Munro
Fix race in dsm_attach() when handles are reused. DSM handle values can be reused as soon as the underlying shared memory object has been destroyed. That means that for a brief moment we might have two DSM slots with the same handle. While trying to attach, if we encounter a slot with refcnt ==

pgsql: Fix race in dsm_attach() when handles are reused.

2019-02-14 Thread Thomas Munro
Fix race in dsm_attach() when handles are reused. DSM handle values can be reused as soon as the underlying shared memory object has been destroyed. That means that for a brief moment we might have two DSM slots with the same handle. While trying to attach, if we encounter a slot with refcnt ==

pgsql: Fix race in dsm_attach() when handles are reused.

2019-02-14 Thread Thomas Munro
Fix race in dsm_attach() when handles are reused. DSM handle values can be reused as soon as the underlying shared memory object has been destroyed. That means that for a brief moment we might have two DSM slots with the same handle. While trying to attach, if we encounter a slot with refcnt ==