[COMMITTERS] pgsql: Avoid integer overflow when LIMIT + OFFSET >= 2^63.

2011-08-02 Thread Heikki Linnakangas
Avoid integer overflow when LIMIT + OFFSET >= 2^63.

This fixes bug #6139 reported by Hitoshi Harada.

Branch
--
REL8_3_STABLE

Details
---
http://git.postgresql.org/pg/commitdiff/d5276887cb408b11589a2c07d5b2d06f892d

Modified Files
--
src/backend/executor/nodeLimit.c |2 +-
1 files changed, 1 insertions(+), 1 deletions(-)


-- 
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers


[COMMITTERS] pgsql: Avoid integer overflow when LIMIT + OFFSET >= 2^63.

2011-08-02 Thread Heikki Linnakangas
Avoid integer overflow when LIMIT + OFFSET >= 2^63.

This fixes bug #6139 reported by Hitoshi Harada.

Branch
--
REL9_0_STABLE

Details
---
http://git.postgresql.org/pg/commitdiff/f00fbad6bd43141faae05cd13a518fd28ae94673

Modified Files
--
src/backend/executor/nodeLimit.c |2 +-
1 files changed, 1 insertions(+), 1 deletions(-)


-- 
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers


[COMMITTERS] pgsql: Avoid integer overflow when LIMIT + OFFSET >= 2^63.

2011-08-02 Thread Heikki Linnakangas
Avoid integer overflow when LIMIT + OFFSET >= 2^63.

This fixes bug #6139 reported by Hitoshi Harada.

Branch
--
REL9_1_STABLE

Details
---
http://git.postgresql.org/pg/commitdiff/bc6616aaedbe4bcd2441334a3bf8f43fe9635bf1

Modified Files
--
src/backend/executor/nodeLimit.c |2 +-
1 files changed, 1 insertions(+), 1 deletions(-)


-- 
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers


[COMMITTERS] pgsql: Avoid integer overflow when LIMIT + OFFSET >= 2^63.

2011-08-02 Thread Heikki Linnakangas
Avoid integer overflow when LIMIT + OFFSET >= 2^63.

This fixes bug #6139 reported by Hitoshi Harada.

Branch
--
REL8_4_STABLE

Details
---
http://git.postgresql.org/pg/commitdiff/0a6167f76bc4e3a433d097ba0c39f843e66c669f

Modified Files
--
src/backend/executor/nodeLimit.c |2 +-
1 files changed, 1 insertions(+), 1 deletions(-)


-- 
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers


[COMMITTERS] pgsql: Avoid integer overflow when LIMIT + OFFSET >= 2^63.

2011-08-02 Thread Heikki Linnakangas
Avoid integer overflow when LIMIT + OFFSET >= 2^63.

This fixes bug #6139 reported by Hitoshi Harada.

Branch
--
master

Details
---
http://git.postgresql.org/pg/commitdiff/89df948ec26679e09f71baf6bbb9b06f9d329712

Modified Files
--
src/backend/executor/nodeLimit.c |2 +-
1 files changed, 1 insertions(+), 1 deletions(-)


-- 
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers


[COMMITTERS] pgsql: Avoid integer overflow when LIMIT + OFFSET >= 2^63.

2011-08-02 Thread Heikki Linnakangas
Avoid integer overflow when LIMIT + OFFSET >= 2^63.

This fixes bug #6139 reported by Hitoshi Harada.

Branch
--
REL8_2_STABLE

Details
---
http://git.postgresql.org/pg/commitdiff/443a44ba62c3b3089456ddcf72df695d3c77bee3

Modified Files
--
src/backend/executor/nodeLimit.c |2 +-
1 files changed, 1 insertions(+), 1 deletions(-)


-- 
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers


[COMMITTERS] pgsql: Fix incorrect initialization of ProcGlobal->startupBufferPinWait

2011-08-02 Thread Tom Lane
Fix incorrect initialization of ProcGlobal->startupBufferPinWaitBufId.

It was initialized in the wrong place and to the wrong value.  With bad
luck this could result in incorrect query-cancellation failures in hot
standby sessions, should a HS backend be holding pin on buffer number 1
while trying to acquire a lock.

Branch
--
REL9_1_STABLE

Details
---
http://git.postgresql.org/pg/commitdiff/0dd6a09e3d127e728b9f43cfaf19e5351f60a096

Modified Files
--
src/backend/storage/buffer/bufmgr.c |3 ++-
src/backend/storage/lmgr/proc.c |   10 --
src/include/storage/proc.h  |2 +-
3 files changed, 7 insertions(+), 8 deletions(-)


-- 
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers


[COMMITTERS] pgsql: Fix incorrect initialization of ProcGlobal->startupBufferPinWait

2011-08-02 Thread Tom Lane
Fix incorrect initialization of ProcGlobal->startupBufferPinWaitBufId.

It was initialized in the wrong place and to the wrong value.  With bad
luck this could result in incorrect query-cancellation failures in hot
standby sessions, should a HS backend be holding pin on buffer number 1
while trying to acquire a lock.

Branch
--
master

Details
---
http://git.postgresql.org/pg/commitdiff/2e53bd5517431637e495c7614761e5aae46b4eba

Modified Files
--
src/backend/storage/buffer/bufmgr.c |3 ++-
src/backend/storage/lmgr/proc.c |   10 --
src/include/storage/proc.h  |2 +-
3 files changed, 7 insertions(+), 8 deletions(-)


-- 
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers


[COMMITTERS] pgsql: Fix incorrect initialization of ProcGlobal->startupBufferPinWait

2011-08-02 Thread Tom Lane
Fix incorrect initialization of ProcGlobal->startupBufferPinWaitBufId.

It was initialized in the wrong place and to the wrong value.  With bad
luck this could result in incorrect query-cancellation failures in hot
standby sessions, should a HS backend be holding pin on buffer number 1
while trying to acquire a lock.

Branch
--
REL9_0_STABLE

Details
---
http://git.postgresql.org/pg/commitdiff/0f904c95a4000caa717868d9bfaf5a423eefdb0b

Modified Files
--
src/backend/storage/buffer/bufmgr.c |3 ++-
src/backend/storage/lmgr/proc.c |   10 --
src/include/storage/proc.h  |2 +-
3 files changed, 7 insertions(+), 8 deletions(-)


-- 
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers


Re: [COMMITTERS] pgsql: Fix incorrect initialization of ProcGlobal->startupBufferPinWait

2011-08-02 Thread Simon Riggs
On Tue, Aug 2, 2011 at 6:24 PM, Tom Lane  wrote:
> Fix incorrect initialization of ProcGlobal->startupBufferPinWaitBufId.
>
> It was initialized in the wrong place and to the wrong value.  With bad
> luck this could result in incorrect query-cancellation failures in hot
> standby sessions, should a HS backend be holding pin on buffer number 1
> while trying to acquire a lock.

Did I miss a bug report?

-- 
 Simon Riggs   http://www.2ndQuadrant.com/
 PostgreSQL Development, 24x7 Support, Training & Services

-- 
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers


[COMMITTERS] pgsql: Move CheckRecoveryConflictDeadlock() call to a safer place.

2011-08-02 Thread Tom Lane
Move CheckRecoveryConflictDeadlock() call to a safer place.

This kluge was inserted in a spot apparently chosen at random: the lock
manager's state is not yet fully set up for the wait, and in particular
LockWaitCancel hasn't been armed by setting lockAwaited, so the ProcLock
will not get cleaned up if the ereport is thrown.  This seems to not cause
any observable problem in trivial test cases, because LockReleaseAll will
silently clean up the debris; but I was able to cause failures with tests
involving subtransactions.

Fixes breakage induced by commit c85c941470efc44494fd7a5f426ee85fc65c268c.
Back-patch to all affected branches.

Branch
--
master

Details
---
http://git.postgresql.org/pg/commitdiff/ac36e6f71f197540b8ee83c97f338ae5e5163f30

Modified Files
--
src/backend/storage/ipc/standby.c |   23 ---
src/backend/storage/lmgr/lock.c   |7 ---
src/backend/storage/lmgr/proc.c   |9 +
src/include/storage/standby.h |2 +-
4 files changed, 22 insertions(+), 19 deletions(-)


-- 
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers


[COMMITTERS] pgsql: Move CheckRecoveryConflictDeadlock() call to a safer place.

2011-08-02 Thread Tom Lane
Move CheckRecoveryConflictDeadlock() call to a safer place.

This kluge was inserted in a spot apparently chosen at random: the lock
manager's state is not yet fully set up for the wait, and in particular
LockWaitCancel hasn't been armed by setting lockAwaited, so the ProcLock
will not get cleaned up if the ereport is thrown.  This seems to not cause
any observable problem in trivial test cases, because LockReleaseAll will
silently clean up the debris; but I was able to cause failures with tests
involving subtransactions.

Fixes breakage induced by commit c85c941470efc44494fd7a5f426ee85fc65c268c.
Back-patch to all affected branches.

Branch
--
REL9_0_STABLE

Details
---
http://git.postgresql.org/pg/commitdiff/d3061f036df68d4c495f6db79994b48725936241

Modified Files
--
src/backend/storage/ipc/standby.c |   23 ---
src/backend/storage/lmgr/lock.c   |7 ---
src/backend/storage/lmgr/proc.c   |9 +
src/include/storage/standby.h |2 +-
4 files changed, 22 insertions(+), 19 deletions(-)


-- 
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers


[COMMITTERS] pgsql: Move CheckRecoveryConflictDeadlock() call to a safer place.

2011-08-02 Thread Tom Lane
Move CheckRecoveryConflictDeadlock() call to a safer place.

This kluge was inserted in a spot apparently chosen at random: the lock
manager's state is not yet fully set up for the wait, and in particular
LockWaitCancel hasn't been armed by setting lockAwaited, so the ProcLock
will not get cleaned up if the ereport is thrown.  This seems to not cause
any observable problem in trivial test cases, because LockReleaseAll will
silently clean up the debris; but I was able to cause failures with tests
involving subtransactions.

Fixes breakage induced by commit c85c941470efc44494fd7a5f426ee85fc65c268c.
Back-patch to all affected branches.

Branch
--
REL9_1_STABLE

Details
---
http://git.postgresql.org/pg/commitdiff/1318f1ad775d310fc7ce045603432c0f810dcdbf

Modified Files
--
src/backend/storage/ipc/standby.c |   23 ---
src/backend/storage/lmgr/lock.c   |7 ---
src/backend/storage/lmgr/proc.c   |9 +
src/include/storage/standby.h |2 +-
4 files changed, 22 insertions(+), 19 deletions(-)


-- 
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers


Re: [COMMITTERS] pgsql: Fix incorrect initialization of ProcGlobal->startupBufferPinWait

2011-08-02 Thread Tom Lane
Simon Riggs  writes:
> On Tue, Aug 2, 2011 at 6:24 PM, Tom Lane  wrote:
>> Fix incorrect initialization of ProcGlobal->startupBufferPinWaitBufId.
>> 
>> It was initialized in the wrong place and to the wrong value.  With bad
>> luck this could result in incorrect query-cancellation failures in hot
>> standby sessions, should a HS backend be holding pin on buffer number 1
>> while trying to acquire a lock.

> Did I miss a bug report?

No, this was something I happened across in code-reading a few weeks ago
and had a note to myself to fix.  While looking at it today I found more
problems ... see second commit.

regards, tom lane

-- 
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers


Re: [COMMITTERS] pgsql: Fix incorrect initialization of ProcGlobal->startupBufferPinWait

2011-08-02 Thread Simon Riggs
On Tue, Aug 2, 2011 at 8:23 PM, Tom Lane  wrote:
> Simon Riggs  writes:
>> On Tue, Aug 2, 2011 at 6:24 PM, Tom Lane  wrote:
>>> Fix incorrect initialization of ProcGlobal->startupBufferPinWaitBufId.
>>>
>>> It was initialized in the wrong place and to the wrong value.  With bad
>>> luck this could result in incorrect query-cancellation failures in hot
>>> standby sessions, should a HS backend be holding pin on buffer number 1
>>> while trying to acquire a lock.
>
>> Did I miss a bug report?
>
> No, this was something I happened across in code-reading a few weeks ago
> and had a note to myself to fix.  While looking at it today I found more
> problems ... see second commit.

I'm happy to fix problems I've caused that are reported to me.

-- 
 Simon Riggs   http://www.2ndQuadrant.com/
 PostgreSQL Development, 24x7 Support, Training & Services

-- 
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers