Re: [PATCH] Check snapshot argument of index_beginscan and family

2022-12-06 Thread Pavel Borisov
On Tue, 6 Dec 2022 at 04:31, Alexander Korotkov wrote: > > On Fri, Dec 2, 2022 at 6:18 PM Alexander Korotkov > wrote: > > On Mon, Nov 28, 2022 at 1:30 PM Aleksander Alekseev > > wrote: > > > Thanks for the feedback! > > > > > > > I think it's a nice catch and worth fixing. The one thing I

Re: [PATCH] Check snapshot argument of index_beginscan and family

2022-12-05 Thread Alexander Korotkov
On Fri, Dec 2, 2022 at 6:18 PM Alexander Korotkov wrote: > On Mon, Nov 28, 2022 at 1:30 PM Aleksander Alekseev > wrote: > > Thanks for the feedback! > > > > > I think it's a nice catch and worth fixing. The one thing I don't > > > agree with is using asserts for handling the error that can

Re: [PATCH] Check snapshot argument of index_beginscan and family

2022-12-02 Thread Alexander Korotkov
Hi! On Mon, Nov 28, 2022 at 1:30 PM Aleksander Alekseev wrote: > Thanks for the feedback! > > > I think it's a nice catch and worth fixing. The one thing I don't > > agree with is using asserts for handling the error that can appear > > because most probably the server is built with assertions

Re: [PATCH] Check snapshot argument of index_beginscan and family

2022-11-28 Thread Aleksander Alekseev
Hi Pavel, Thanks for the feedback! > I think it's a nice catch and worth fixing. The one thing I don't > agree with is using asserts for handling the error that can appear > because most probably the server is built with assertions off and in > this case, there still will be a crash in this

Re: [PATCH] Check snapshot argument of index_beginscan and family

2022-11-28 Thread Pavel Borisov
Hi, Alexander! > A colleague of mine (cc'ed) reported that he was able to pass a NULL > snapshot to index_beginscan() and it even worked to a certain degree. > > I took my toy extension [1] and replaced the argument with NULL as an > experiment: > > ``` > eax=# CREATE EXTENSION experiment; >

[PATCH] Check snapshot argument of index_beginscan and family

2022-11-28 Thread Aleksander Alekseev
Hi hackers, A colleague of mine (cc'ed) reported that he was able to pass a NULL snapshot to index_beginscan() and it even worked to a certain degree. I took my toy extension [1] and replaced the argument with NULL as an experiment: ``` eax=# CREATE EXTENSION experiment; CREATE EXTENSION eax=#