Re: initdb failure (was Re: [GENERAL] sequence's plpgsql)

Поиск
Список
Период
Сортировка
От Oliver Elphick
Тема Re: initdb failure (was Re: [GENERAL] sequence's plpgsql)
Дата
Msg-id 1064642149.16483.42.camel@linda.lfix.co.uk
обсуждение исходный текст
Ответ на Re: initdb failure (was Re: [GENERAL] sequence's plpgsql)  (Bruce Momjian <pgman@candle.pha.pa.us>)
Ответы Re: initdb failure (was Re: [GENERAL] sequence's plpgsql)  (Peter Eisentraut <peter_e@gmx.net>)
Список pgsql-hackers
On Fri, 2003-09-26 at 23:18, Bruce Momjian wrote:
> If you are loading from pg_dump, you have lots of copy commands, so how
> do you know which COPY command caused the failure.  You just have the
> line number of _a_ copy.

I would recommend using psql -e
so that the sql commands are output too.

Here is a documentation patch:

Index: backup.sgml
===================================================================
RCS file: /projects/cvsroot/pgsql-server/doc/src/sgml/backup.sgml,v
retrieving revision 2.30
diff -c -r2.30 backup.sgml
*** backup.sgml    31 Aug 2003 17:32:18 -0000    2.30
--- backup.sgml    27 Sep 2003 05:45:04 -0000
***************
*** 100,106 ****     be read in by the <application>psql</application> program. The     general command form to restore
adump is <synopsis>
 
! psql <replaceable class="parameter">dbname</replaceable> < <replaceable class="parameter">infile</replaceable>
</synopsis>    where <replaceable class="parameter">infile</replaceable> is what     you used as <replaceable
class="parameter">outfile</replaceable>
--- 100,106 ----     be read in by the <application>psql</application> program. The     general command form to restore
adump is <synopsis>
 
! psql -f <replaceable class="parameter">infile</replaceable> -d <replaceable class="parameter">dbname</replaceable>
</synopsis>    where <replaceable class="parameter">infile</replaceable> is what     you used as <replaceable
class="parameter">outfile</replaceable>
***************
*** 112,117 ****
--- 112,124 ----     <application>psql</> supports similar options to <application>pg_dump</>      for controlling the
databaseserver location and the user name. See     its reference page for more information.
 
+    </para>
+ 
+    <para>
+     With a large dump, it may be difficult to identify where any errors are
+     occurring.  You may use the -e option to psql to print the SQL commands
+     as they are run, so that it is easy to see precisely which commands are
+     causing errors.    </para>     <para>

-- 
Oliver Elphick                                Oliver.Elphick@lfix.co.uk
Isle of Wight, UK                             http://www.lfix.co.uk/oliver
GPG: 1024D/3E1D0C1C: CA12 09E0 E8D5 8870 5839  932A 614D 4C34 3E1D 0C1C
========================================   "My brethren, count it all joy when ye fall into     various trials, Knowing
thatthe testing of your faith     produces endurance."          James 1:2,3 
 



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

Предыдущее
От: Christopher Kings-Lynne
Дата:
Сообщение: Re: 2-phase commit
Следующее
От: Tom Lane
Дата:
Сообщение: Re: 2-phase commit