Re: [GENERAL] Upgrading from 6.3->6.4.2/6.5b1 possible
От | Michael A. Koerber SR |
---|---|
Тема | Re: [GENERAL] Upgrading from 6.3->6.4.2/6.5b1 possible |
Дата | |
Msg-id | 199905310008.UAA29212@ll.mit.edu обсуждение исходный текст |
Ответ на | Re: [GENERAL] Upgrading from 6.3->6.4.2/6.5b1 possible (Gregory Maxwell <greg@z.ml.org>) |
Ответы |
Re: [GENERAL] Upgrading from 6.3->6.4.2/6.5b1 possible
|
Список | pgsql-general |
I have had trouble on numerous occasions "undumping" a pg_dump. Below is a perl script that I use as a pipe for undumping...hope it helps .....pg_undump..... #!/usr/bin/perl -p # This script is a pipe that is used to break up PSQL dumps into pieces # that are more manageable by the postmaster. If there are too many # input lines, the memory used by the transaction block can easily # choke the machine. BEGIN { $MAXLINES = 1000; } # Does the current input line define the beginning of an input block? if (m/^COPY/) { # When a copy line is encountered grab the line for later use # and turn on the line counter; $copyline = $_; $cnt = 0; } # Does the current input line define the end of an input block? if (m{^\\\.}) { # We have just macthed the end of STDIN line. Set counter off undef $cnt; } # If we are in an input block and the count is at the max, "flush" the buffer # and setup for the next block. if (defined($cnt) and ($cnt > $MAXLINES) ) { $cnt = 0; print '\.', "\n"; print $copyline; } $cnt++ if defined $cnt;
В списке pgsql-general по дате отправления: