Re: [PATCH] Missing Assert in the code

2024-11-27 Thread Dmitry Nikitin
Hello Alvaro, Tuesday, November 26, 2024, 2:40:39 PM, you wrote: AH> By the way, how did you find out about this problem? Is this AH> hypothetical or was there an actual crash? AFAICS (some of?) the AH> callers get to this code immediately after executing GinInitPage, so AH> it's not clear to m

Re: [PATCH] Missing Assert in the code

2024-11-27 Thread Dmitry Nikitin
Hello Alvaro, Monday, November 25, 2024, 10:51:31 PM, you wrote: AH> Hmm, I think if we believe this to be really possible, we should have an AH> 'if/elog' test (or maybe a full ereport with ERRCODE_DATA_CORRUPTED AH> errcode) rather than an assertion. I think the assertion adds nothing AH> of v

Re: [PATCH] Missing Assert in the code

2024-11-26 Thread Alvaro Herrera
Hello On 2024-Nov-26, Dmitry Nikitin wrote: > Monday, November 25, 2024, 10:51:31 PM, you wrote: > > AH> Hmm, I think if we believe this to be really possible, we should have an > AH> 'if/elog' test (or maybe a full ereport with ERRCODE_DATA_CORRUPTED > AH> errcode) rather than an assertion. I

Re: [PATCH] Missing Assert in the code

2024-11-25 Thread Alvaro Herrera
On 2024-Nov-25, Dmitry Nikitin wrote: > Subject: [PATCH 2/2] Add Assert to stop invalid values to pass on > > PageGetMaxOffsetNumber() can legitimately return zero > (InvalidOffsetNumber) as an indication of error. However there are no > any checks against that. As a result, for exampe, subsequen

[PATCH] Missing Assert in the code

2024-11-25 Thread Dmitry Nikitin
Hello , The patch is pretty trivial. -- Best regards, Dmitry mailto:pgsql-hack...@dima.nikitin.nameFrom 0ff6a234740d7a7d2bb9572271a1dbdfd4f45f39 Mon Sep 17 00:00:00 2001 From: Dmitry Nikitin Date: Mon, 25 Nov 2024 10:31:53 +0300 Subject: [PATCH 1/2] Get rid off the