BUG #16842: pg_dump uses seek calls on pipe files: suggesting adding a flag to disable seek calls

Поиск
Список
Период
Сортировка
От PG Bug reporting form
Тема BUG #16842: pg_dump uses seek calls on pipe files: suggesting adding a flag to disable seek calls
Дата
Msg-id 16842-381bd64d2f0f68db@postgresql.org
обсуждение исходный текст
Ответы Re: BUG #16842: pg_dump uses seek calls on pipe files: suggesting adding a flag to disable seek calls  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-bugs
The following bug has been logged on the website:

Bug reference:      16842
Logged by:          Tomas Dalebjörk
Email address:      tomas.dalebjork@gmail.com
PostgreSQL version: 13.0
Operating system:   SuSE 15
Description:

pg_dump is trying to identify the type of device used for output.
This is done in a way that it checks that filedescriptor to check if this
supports seek calls etc.
A redirect is a clone of the targeted filedescriptor, which will results in
that the pg_dump utility will enable seek calls.

https://searchcode.com/file/47798353/src/bin/pg_dump/pg_backup_custom.c/

It would be good to add a flag to disable this feature, as some devices does
not support seek calls, for example streaming devices such as a tape
drive.

From Red Hat:
# pg_dump > pgdump.bkp
"That's not a pipe; it's a redirect. The program's stdout (fd=1) will be for
that file, and they can still perform seek operations on it. An fstat(2) on
that file descriptor will show it as a regular file, not a character device
(tty) or a fifo (pipe)."
You could try this instead:
pg_dump | cat > /myfs/testfile.out"

Not sure if this is limited to when --format=custom is used?
It can be worth trying to use pg_dump without the --format=custom option
A restore from pg_dump can't be loaded using pg_restore if --format=custom
is left out (if I recall), but it can be loaded using "psql < dumpfile" 

Suggestions for how to avoid seek calls using pg_dump?
Is the seek calls only applicable when --format=custom is used?
Regards Tomas


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

Предыдущее
От: Ajay Chitale
Дата:
Сообщение: Re: BUG #16841: psql -- \d tablename , displays "Error : column c.relhasoids does not exit"
Следующее
От: PG Bug reporting form
Дата:
Сообщение: BUG #16843: pg_upgrade from 12.5 to 13.1 with extension plperlu failed