Re: Trying out read streams in pgvector (an extension)
| От | Nazir Bilal Yavuz |
|---|---|
| Тема | Re: Trying out read streams in pgvector (an extension) |
| Дата | |
| Msg-id | CAN55FZ16TEhgYbK=qSEbkO8utz+u232NksCEmJMC1G4iZvnbvA@mail.gmail.com обсуждение исходный текст |
| Ответ на | Re: Trying out read streams in pgvector (an extension) (Thomas Munro <thomas.munro@gmail.com>) |
| Ответы |
Re: Trying out read streams in pgvector (an extension)
|
| Список | pgsql-hackers |
Hi, Thank you for working on this! On Wed, 12 Nov 2025 at 07:12, Thomas Munro <thomas.munro@gmail.com> wrote: > > On Wed, Nov 12, 2025 at 12:19 PM Thomas Munro <thomas.munro@gmail.com> wrote: > > On Wed, Nov 12, 2025 at 11:52 AM Melanie Plageman > > <melanieplageman@gmail.com> wrote: > > > If we are worried about regressing other extensions using > > > read_stream_reset(), we could make the read stream reset which > > > preserves the distance a different function in backbranches. > > Here is a draft patch like that, that tries to be as small as > possible. Trying out the name read_stream_resume(). I liked the idea of having a different function named read_stream_resume for this purpose. 0001 looks good to me. 0002: + /* End-of-stream. */ + buf = read_stream_next_buffer(stream, NULL); + Assert(buf == InvalidBuffer); + buf = read_stream_next_buffer(stream, NULL); + Assert(buf == InvalidBuffer); I noticed there are two 'read_stream_next_buffer()' and 'InvalidBuffer' checks. Does having both provide any additional validation? I tried removing one of them, and the test still passed. Also, there is one thing I wanted to clarify about the 'read_stream_resume()'. If 'read_stream_next_buffer()' returns an 'InvalidBuffer', then we can use 'read_stream_resume()' alone because we know that we already consumed all buffers in the stream. For the rest, we need to use 'read_stream_resume()' together with the 'read_stream_reset()', right? -- Regards, Nazir Bilal Yavuz Microsoft
В списке pgsql-hackers по дате отправления: