Re: Two small patches for the isolationtester lexer

Поиск
Список
Период
Сортировка
От Daniel Gustafsson
Тема Re: Two small patches for the isolationtester lexer
Дата
Msg-id 70FF0777-BD41-4A15-AA6E-162E25EBC8C8@yesql.se
обсуждение исходный текст
Ответ на Re: Two small patches for the isolationtester lexer  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: Two small patches for the isolationtester lexer
Список pgsql-hackers
> On 22 Feb 2018, at 05:12, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>
> Daniel Gustafsson <daniel@yesql.se> writes:
>> On 21 Feb 2018, at 21:41, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>>> I can't think of one; but I wonder if it's worth working a bit harder and
>>> removing the fixed limit altogether, probably by using a PQExpBuffer.
>>> If you've hit 1024 today, somebody will bump up against 2048 tomorrow.
>
>> The thought did cross my mind, but I opted for the simple hack first.  I can
>> take a stab at using a PQExpBuffer to see where that leads.
>
> Another idea is just to teach addlitchar to realloc the buffer bigger
> when necessary.

I think this is the best approach for the task, the attached patch changes the
static allocation to instead realloc when required.  Having an upper limit on
the allocation seemed like a good idea to me, but perhaps it’s overthinking and
complicating things for no good reason.

cheers ./daniel


Вложения

В списке pgsql-hackers по дате отправления:

Предыдущее
От: "Kato, Sho"
Дата:
Сообщение: Scenario using pg_rewind
Следующее
От: Daniel Gustafsson
Дата:
Сообщение: Re: Two small patches for the isolationtester lexer