Re: Possible dereference null return (src/backend/replication/logical/reorderbuffer.c)

From: Michael Paquier <michael(at)paquier(dot)xyz>
To: Kyotaro Horiguchi <horikyota(dot)ntt(at)gmail(dot)com>
Cc: ranier(dot)vf(at)gmail(dot)com, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Possible dereference null return (src/backend/replication/logical/reorderbuffer.c)
Date: 2021-02-13 02:40:23
Message-ID: YCc8FzswlSvC8WLE@paquier.xyz
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Fri, Feb 12, 2021 at 03:56:02PM +0900, Kyotaro Horiguchi wrote:
> If the return from the first call is a subtransaction, the second call
> always obtain the top transaction. If the top transaction actualy did
> not exist, it's rather the correct behavior to cause SEGV, than
> creating a bogus rbtxn. THus it is wrong to set create=true and
> create_as_top=true. We could change the assertion like Assert (txn &&
> txn->base_snapshot) to make things clearer.

I don't see much the point to change this code. The result would be
the same: a PANIC at this location.
--
Michael

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Michael Paquier 2021-02-13 02:52:51 Re: [DOC] add missing "[ NO ]" to various "DEPENDS ON" synopses
Previous Message Michael Paquier 2021-02-13 02:34:57 Re: Tightening up allowed custom GUC names