Fix overflow of nbatch - Mailing list pgsql-hackers

From Vaibhav Jain
Subject Fix overflow of nbatch
Date
Msg-id CABa-Az174YvfFq7rLS+VNKaQyg7inA2exvPWmPWqnEn6Ditr_Q@mail.gmail.com
Whole thread Raw
Responses Re: Fix overflow of nbatch
Re: Fix overflow of nbatch
List pgsql-hackers
Hi Everyone,

With a1b4f28, to compute current_space, nbatch is being multiplied
by BLCKSZ. nbatch is int and when multiplied with BLCKSZ, it can
easily overflow the int limit.To keep the calculation safe for
current_space, convert nbatch to size_t.

Please find a patch for the same.

Thanks,
Vaibhav
Attachment

pgsql-hackers by date:

Previous
From: "Matheus Alcantara"
Date:
Subject: Re: LISTEN/NOTIFY bug: VACUUM sets frozenxid past a xid in async queue
Next
From: Jim Jones
Date:
Subject: Re: We broke the defense against accessing other sessions' temp tables