Re: Making psql error out on output failures

Поиск
Список
Период
Сортировка
От Daniel Verite
Тема Re: Making psql error out on output failures
Дата
Msg-id 07ae9540-0bcd-4405-9800-70bb4b045d74@manitou-mail.org
обсуждение исходный текст
Ответ на Re: Making psql error out on output failures  (David Zhang <david.zhang@highgo.ca>)
Ответы Re: Making psql error out on output failures
Список pgsql-hackers
    David Zhang wrote:

> > Are you sure? I don't find that redefinition. Besides
> > print_aligned_text() also calls putc and puts.
> Yes, below is the gdb debug message when psql first time detects the
> error "No space left on device". Test case, "postgres=# select
> repeat('111', 1000000) \g /mnt/ramdisk/file"
> bt
> #0  flushbuffer (target=0x7ffd6a709ad0) at snprintf.c:313

Indeed. For some reason gdb won't let me step into these fprintf()
calls, but you're right they're redefined (through include/port.h):

#define vsnprintf        pg_vsnprintf
#define snprintf        pg_snprintf
#define vsprintf        pg_vsprintf
#define sprintf         pg_sprintf
#define vfprintf        pg_vfprintf
#define fprintf         pg_fprintf
#define vprintf         pg_vprintf
#define printf(...)        pg_printf(__VA_ARGS__)

Anyway, I don't see it leading to an actionable way to reliably keep
errno, as discussed upthread.

Best regards,
--
Daniel Vérité
PostgreSQL-powered mailer: http://www.manitou-mail.org
Twitter: @DanielVerite



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

Предыдущее
От: Mark Charsley
Дата:
Сообщение: Data race in interfaces/libpq/fe-exec.c
Следующее
От: "movead.li@highgo.ca"
Дата:
Сообщение: Re: Append with naive multiplexing of FDWs