Thread: Exception table ...
I have just seen a nice feature provided by DB2 which seems very useful to me. When importing huge amounts of data (dozens of gigs) with the help of COPY errors might occur from time to time (especially when migrating). The problem with COPY is that it stops after the first error. So if the first problem occurs after 200.000.000 records it is somehow annoying to do the entire stuff again. If we had an option telling COPY to log all problems into a logtable or into a separate logfile we could finish the import and rollback the transaction after trying to import everything. This would help a lot when migrating or importing a lot of data because all problems with an import could be fixed at once based on the exception table. Did anybody think about a feature like that in the past? Does it make sense to the group? Best regards, Hans -- Cybertec Geschwinde u Schoenig Ludo-Hartmannplatz 1/14, A-1160 Vienna, Austria Tel: +43/2952/30706; +43/664/233 90 75 www.cybertec.at, www.postgresql.at, kernel.cybertec.at
My boss is asking for something like Oracle's "SELECT FOR UPDATE NOWAIT". Is there any such feature? If no, should I look forward into implementing this? Any advice? Thank you, -- Paulo Scardine --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.490 / Virus Database: 289 - Release Date: 16/6/2003
On Fri, 2003-07-18 at 19:46, Paulo Scardine wrote: > My boss is asking for something like Oracle's "SELECT FOR UPDATE NOWAIT". > > Is there any such feature? If no, should I look forward into implementing > this? Any advice? Lookup STATEMENT_TIMEOUT and set it to a very short time.
Rod Taylor wrote: -- Start of PGP signed section. > On Fri, 2003-07-18 at 19:46, Paulo Scardine wrote: > > My boss is asking for something like Oracle's "SELECT FOR UPDATE NOWAIT". > > > > Is there any such feature? If no, should I look forward into implementing > > this? Any advice? > > Lookup STATEMENT_TIMEOUT and set it to a very short time. Some people have said they want to distinguish between a slow query (busy system) and waiting on a lock. I can particulary see wanting to do a NOWAIT only on exclusive locks --- not sure how many really want that, though. -- Bruce Momjian | http://candle.pha.pa.us pgman@candle.pha.pa.us | (610) 359-1001+ If your life is a hard drive, | 13 Roberts Road + Christ can be your backup. | Newtown Square, Pennsylvania19073
> > I have just seen a nice feature provided by DB2 which seems very useful > to me. > When importing huge amounts of data (dozens of gigs) with the help of > COPY errors might occur from time to time (especially when migrating). > The problem with COPY is that it stops after the first error. So if the > first problem occurs after 200.000.000 records it is somehow annoying to > do the entire stuff again. If we had an option telling COPY to log all > problems into a logtable or into a separate logfile we could finish the > import and rollback the transaction after trying to import everything. > This would help a lot when migrating or importing a lot of data because > all problems with an import could be fixed at once based on the > exception table. > Did anybody think about a feature like that in the past? Does it make > sense to the group? > The same goes for me, sounds very useful. And if I didn't dream it, I'm pretty sure there have been requests for a feature like that before. Regards, Christoph