Re: vacuumlo patch

Поиск
Список
Период
Сортировка
От Tim
Тема Re: vacuumlo patch
Дата
Msg-id CA+3zgms2v7Kinaw9V7=Kjqyx27UBzkrhG-59U_TZRzkYqRfP2g@mail.gmail.com
обсуждение исходный текст
Ответ на Re: vacuumlo patch  (Josh Kupershmidt <schmiddy@gmail.com>)
Ответы Re: vacuumlo patch  (Josh Kupershmidt <schmiddy@gmail.com>)
Re: vacuumlo patch  (Peter Eisentraut <peter_e@gmx.net>)
Список pgsql-hackers
Hi Josh,

Thanks for help. Attached is a patch including changes suggested in your comments.

Excerpts from Josh's message On Sat, Aug 6, 2011 at 9:57 PM:

 1. It wasn't clear to me whether you're OK with Aron's suggested
tweak, please include it in your patch if so.
 
I decided to and included Aron's tweak.
I'm not sure if the PostgreSQL project prefers simplified code over faster run time (if only under rare conditions).
Who knows maybe the compiler will re-optimize it anyway.

  2. I think it might be better to use INT_MAX instead of hardcoding 2147483647.

Fixed, though I'm not sure if I put the include in the preferred order.
 
  3. ... should have a space before the first '(' and around the '!=' and '>='

Fixed.
 
  4. The rest of the usage strings spell out 'large object(s)' instead
of abbreviating 'LO'...

Fixed, I omitted the brackets around the s to conform with the other usage strings.
 
  5. transaction_limit is an int, yet you're using strtol() which
returns long. Maybe you want to use atoi() or make transaction_limit a
long?

The other INT in the code is using strtol() so I also used strtol instead of changing more code.
I'm not sure if there are any advantages or disadvantages.
maybe it's easier to prevent/detect/report overflow wraparound.

I can't think of a good reason anyone would want to limit transaction to something more than INT_MAX.
Implementing that would best be done in separate and large patch as PQntuples returns an int and is used on 271 lines across PostgreSQL.


Thanks again for the help.
Вложения

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

Предыдущее
От: Josh Kupershmidt
Дата:
Сообщение: Re: vacuumlo patch
Следующее
От: Josh Kupershmidt
Дата:
Сообщение: Re: vacuumlo patch