Incorrect overflow check condition for WAL segment size - Mailing list pgsql-hackers

From Kuntal Ghosh
Subject Incorrect overflow check condition for WAL segment size
Date
Msg-id CAGz5QC+Z3z=6u+M_ex0FH4+r_u6qg89WefJRv_S5VCqw+uS+4A@mail.gmail.com
Whole thread Raw
Responses Re: Incorrect overflow check condition for WAL segment size
List pgsql-hackers
Hi all,

Although we restrict the WAL segment size to 64 MB as upper limit, the
following piece of code in guc.c (line 715) seems confusing to me.

#if XLOG_SEG_SIZE < (1024*1024) || XLOG_BLCKSZ > (1024*1024*1024)
#error XLOG_SEG_SIZE must be between 1MB and 1GB
#endif

Either the comment is wrongly written or the check for overflow
condition has to be fixed. Assuming the overflow check condition to be
erroneous, I've attached a patch to fix this.

--
Thanks & Regards,
Kuntal Ghosh
EnterpriseDB: http://www.enterprisedb.com

Attachment

pgsql-hackers by date:

Previous
From: "Tsunakawa, Takayuki"
Date:
Subject: Re: Re: BUG #13755: pgwin32_is_service not checking if SECURITY_SERVICE_SID is disabled
Next
From: Michael Paquier
Date:
Subject: Re: Fix checkpoint skip logic on idle systems by tracking LSN progress