Re: pg_dump fundenental question

Поиск
Список
Период
Сортировка
От Christofer C. Bell
Тема Re: pg_dump fundenental question
Дата
Msg-id CAOEVnYvzwn57XDHcbjft059XT297YdkOs1YfV1v9excVyqviaQ@mail.gmail.com
обсуждение исходный текст
Ответ на Re: pg_dump fundenental question  (Paul Linehan <linehanp@tcd.ie>)
Ответы Re: pg_dump fundenental question  (trafdev <trafdev@mail.ru>)
Список pgsql-general
On Tue, Jul 5, 2016 at 3:17 PM, Paul Linehan <linehanp@tcd.ie> wrote:
> a good point, but I would prefer NOT to open a 324GB backup file in a text
> editor. I can however cat/less/head/tail the file in Linux.

Use vi (or flavour thereof) - it doesn't load the entire file in order to
read the contents of lines 1 - 100 (say).

What Paul says is very true, but if you are doing this, do be cognizant of where your fingers are.  If you press any key that will put vi into edit mode, it will then make a copy of the file for backup purposes.  Your 324GB file will become 648GB of disk usage and you'll have to wait while the backup copy is written out to disk.  It will not load the whole file into memory (ever) nor will it make a copy of the file as long as you stay in command mode.

If you want to use vi or equivalent for viewing the file without any danger of accidentally putting the editor into edit mode (and thus triggering the backup copy), you may want to invoke vi as "view(1)".  This opens vi read-only and you'll be able to use vi style hotkeys for navigation.
 
Paul...
 
Chris

"If you wish to make an apple pie from scratch, you must first invent the Universe." -- Carl Sagan


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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Possible to create canonicalized range type without being superuser?
Следующее
От: trafdev
Дата:
Сообщение: Re: pg_dump fundenental question