Re: Fix possible dereference null pointer (src/backend/replication/logical/reorderbuffer.c)

2024-04-15 Thread Ranier Vilela
Em dom., 14 de abr. de 2024 às 21:29, Michael Paquier escreveu: > On Sat, Apr 13, 2024 at 10:40:35AM -0300, Ranier Vilela wrote: > > This sounds a little confusing to me. > > Is the project policy to *tolerate* dereferencing NULL pointers? > > If this is the case, no problem, using Assert would

Re: Fix possible dereference null pointer (src/backend/replication/logical/reorderbuffer.c)

2024-04-15 Thread Amit Kapila
On Sat, Apr 13, 2024 at 12:46 PM Heikki Linnakangas wrote: > > I don't much like adding extra runtime checks for "can't happen" > scenarios either. Assertions would be more clear, but in this case the > code would just segfault trying to dereference the NULL pointer, which > is fine for a "can't

Re: Fix possible dereference null pointer (src/backend/replication/logical/reorderbuffer.c)

2024-04-14 Thread Michael Paquier
On Sat, Apr 13, 2024 at 10:40:35AM -0300, Ranier Vilela wrote: > This sounds a little confusing to me. > Is the project policy to *tolerate* dereferencing NULL pointers? > If this is the case, no problem, using Assert would serve the purpose of > protecting against these errors well. In most

Re: Fix possible dereference null pointer (src/backend/replication/logical/reorderbuffer.c)

2024-04-13 Thread Ranier Vilela
Em sáb., 13 de abr. de 2024 às 04:16, Heikki Linnakangas escreveu: > On 11/04/2024 16:37, Ranier Vilela wrote: > > Em qui., 11 de abr. de 2024 às 09:54, Heikki Linnakangas > > mailto:hlinn...@iki.fi>> escreveu: > > > > On 11/04/2024 15:03, Ranier Vilela wrote: > > > Em qua., 10 de abr.

Re: Fix possible dereference null pointer (src/backend/replication/logical/reorderbuffer.c)

2024-04-13 Thread Heikki Linnakangas
On 11/04/2024 16:37, Ranier Vilela wrote: Em qui., 11 de abr. de 2024 às 09:54, Heikki Linnakangas mailto:hlinn...@iki.fi>> escreveu: On 11/04/2024 15:03, Ranier Vilela wrote: > Em qua., 10 de abr. de 2024 às 18:28, Heikki Linnakangas > mailto:hlinn...@iki.fi>

Re: Fix possible dereference null pointer (src/backend/replication/logical/reorderbuffer.c)

2024-04-11 Thread Ranier Vilela
Em qui., 11 de abr. de 2024 às 09:54, Heikki Linnakangas escreveu: > On 11/04/2024 15:03, Ranier Vilela wrote: > > Em qua., 10 de abr. de 2024 às 18:28, Heikki Linnakangas > > mailto:hlinn...@iki.fi>> escreveu: > > > > On 10/04/2024 21:07, Ranier Vilela wrote: > > > Hi, > > > > >

Re: Fix possible dereference null pointer (src/backend/replication/logical/reorderbuffer.c)

2024-04-11 Thread Heikki Linnakangas
On 11/04/2024 15:03, Ranier Vilela wrote: Em qua., 10 de abr. de 2024 às 18:28, Heikki Linnakangas mailto:hlinn...@iki.fi>> escreveu: On 10/04/2024 21:07, Ranier Vilela wrote: > Hi, > > Per Coverity. > > The function ReorderBufferTXNByXid, > can return NULL

Re: Fix possible dereference null pointer (src/backend/replication/logical/reorderbuffer.c)

2024-04-11 Thread Ranier Vilela
Em qua., 10 de abr. de 2024 às 18:28, Heikki Linnakangas escreveu: > On 10/04/2024 21:07, Ranier Vilela wrote: > > Hi, > > > > Per Coverity. > > > > The function ReorderBufferTXNByXid, > > can return NULL when the parameter *create* is false. > > > > In the functions ReorderBufferSetBaseSnapshot

Re: Fix possible dereference null pointer (src/backend/replication/logical/reorderbuffer.c)

2024-04-10 Thread Heikki Linnakangas
On 10/04/2024 21:07, Ranier Vilela wrote: Hi, Per Coverity. The function ReorderBufferTXNByXid, can return NULL when the parameter *create* is false. In the functions ReorderBufferSetBaseSnapshot and ReorderBufferXidHasBaseSnapshot, the second call to ReorderBufferTXNByXid, pass false to

Fix possible dereference null pointer (src/backend/replication/logical/reorderbuffer.c)

2024-04-10 Thread Ranier Vilela
Hi, Per Coverity. The function ReorderBufferTXNByXid, can return NULL when the parameter *create* is false. In the functions ReorderBufferSetBaseSnapshot and ReorderBufferXidHasBaseSnapshot, the second call to ReorderBufferTXNByXid, pass false to *create* argument. In the function