This is a discussion on pg_restore COPY error handling within the Pgsql Patches forums, part of the PostgreSQL category; --> * Stephen Frost (sfrost@snowman.net) wrote: > Needs to be changed to handle whitespace in front of the actual 'COPY', ...
| |||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| * Stephen Frost (sfrost@snowman.net) wrote: > Needs to be changed to handle whitespace in front of the actual 'COPY', > unless someone else has a better idea. This should be reasonably > trivial to do though... If you'd like me to make that change and send > in a new patch, just let me know. Fixed, using isspace(). Also added an output message to make it a bit clearer when a failed COPY has been detected, etc. Updated patch attached. Thanks, Stephen ---------------------------(end of broadcast)--------------------------- TIP 4: Have you searched our list archives? http://archives.postgresql.org |
| |||
| This needs a little style cleanup but I can do that. Your patch has been added to the PostgreSQL unapplied patches list at: http://momjian.postgresql.org/cgi-bin/pgpatches It will be applied as soon as one of the PostgreSQL committers reviews and approves it. --------------------------------------------------------------------------- Stephen Frost wrote: > * Stephen Frost (sfrost@snowman.net) wrote: > > Needs to be changed to handle whitespace in front of the actual 'COPY', > > unless someone else has a better idea. This should be reasonably > > trivial to do though... If you'd like me to make that change and send > > in a new patch, just let me know. > > Fixed, using isspace(). Also added an output message to make it a bit > clearer when a failed COPY has been detected, etc. > > Updated patch attached. > > Thanks, > > Stephen [ Attachment, skipping... ] > > ---------------------------(end of broadcast)--------------------------- > TIP 4: Have you searched our list archives? > > http://archives.postgresql.org -- 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, Pennsylvania 19073 ---------------------------(end of broadcast)--------------------------- TIP 2: Don't 'kill -9' the postmaster |
| |||
| Bruce, et al, * Bruce Momjian (pgman@candle.pha.pa.us) wrote: > This needs a little style cleanup but I can do that. Thanks! > Your patch has been added to the PostgreSQL unapplied patches list at: > > http://momjian.postgresql.org/cgi-bin/pgpatches > > It will be applied as soon as one of the PostgreSQL committers reviews > and approves it. Great! It'd be really nice to have this fix in 8.1.3... Thanks again, Stephen > --------------------------------------------------------------------------- > Stephen Frost wrote: > > * Stephen Frost (sfrost@snowman.net) wrote: > > > Needs to be changed to handle whitespace in front of the actual 'COPY', > > > unless someone else has a better idea. This should be reasonably > > > trivial to do though... If you'd like me to make that change and send > > > in a new patch, just let me know. > > > > Fixed, using isspace(). Also added an output message to make it a bit > > clearer when a failed COPY has been detected, etc. > > > > Updated patch attached. > > > > Thanks, > > > > Stephen > > [ Attachment, skipping... ] > > > > > ---------------------------(end of broadcast)--------------------------- > > TIP 4: Have you searched our list archives? > > > > http://archives.postgresql.org > > -- > 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, Pennsylvania 19073 -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.2 (GNU/Linux) iD8DBQFD25uDrzgMPqB3kigRAnMHAKCcP9HRluuN8LBdy3eEUq ViYS3YowCeNah+ bDxfou4Ec3tK2yB+QixA1B8= =P140 -----END PGP SIGNATURE----- |
| |||
| Stephen Frost wrote: -- Start of PGP signed section. > Bruce, et al, > > * Bruce Momjian (pgman@candle.pha.pa.us) wrote: > > This needs a little style cleanup but I can do that. > > Thanks! > > > Your patch has been added to the PostgreSQL unapplied patches list at: > > > > http://momjian.postgresql.org/cgi-bin/pgpatches > > > > It will be applied as soon as one of the PostgreSQL committers reviews > > and approves it. > > Great! It'd be really nice to have this fix in 8.1.3... No, it will not be in 8.1.3. It is a new feature. --------------------------------------------------------------------------- > > Thanks again, > > Stephen > > > --------------------------------------------------------------------------- > > Stephen Frost wrote: > > > * Stephen Frost (sfrost@snowman.net) wrote: > > > > Needs to be changed to handle whitespace in front of the actual 'COPY', > > > > unless someone else has a better idea. This should be reasonably > > > > trivial to do though... If you'd like me to make that change and send > > > > in a new patch, just let me know. > > > > > > Fixed, using isspace(). Also added an output message to make it a bit > > > clearer when a failed COPY has been detected, etc. > > > > > > Updated patch attached. > > > > > > Thanks, > > > > > > Stephen > > > > [ Attachment, skipping... ] > > > > > > > > ---------------------------(end of broadcast)--------------------------- > > > TIP 4: Have you searched our list archives? > > > > > > http://archives.postgresql.org > > > > -- > > 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, Pennsylvania 19073 -- End of PGP section, PGP failed! -- 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, Pennsylvania 19073 ---------------------------(end of broadcast)--------------------------- TIP 1: if posting/reading through Usenet, please send an appropriate subscribe-nomail command to majordomo@postgresql.org so that your message can get through to the mailing list cleanly |
| |||
| * Bruce Momjian (pgman@candle.pha.pa.us) wrote: > Stephen Frost wrote: > > Great! It'd be really nice to have this fix in 8.1.3... > > No, it will not be in 8.1.3. It is a new feature. I'd really appriciate it if you could review my post to pgsql-bugs, Message-ID: <20060120144957.GG6026@ns.snowman.net>. If this patch is considered a new feature then I'd like to either revisit that decision or be given some direction on what a bug-fix patch for the grows-to-3G bug would look like. Thanks, Stephen -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.2 (GNU/Linux) iD8DBQFD4TRBrzgMPqB3kigRAufTAJ0ebuh0d3DZzrRx8I6v83 rNx/YTEACfV5uI ph7E+jZ0IEs5izU+5Zrpnno= =rfgg -----END PGP SIGNATURE----- |
| |||
| Stephen Frost wrote: -- Start of PGP signed section. > * Bruce Momjian (pgman@candle.pha.pa.us) wrote: > > Stephen Frost wrote: > > > Great! It'd be really nice to have this fix in 8.1.3... > > > > No, it will not be in 8.1.3. It is a new feature. > > I'd really appriciate it if you could review my post to pgsql-bugs, > Message-ID: <20060120144957.GG6026@ns.snowman.net>. If this patch is > considered a new feature then I'd like to either revisit that decision > or be given some direction on what a bug-fix patch for the grows-to-3G > bug would look like. Oh, so when it skips the \., it reads the rest of the file and bombs out? I thought it just continued fine. How is that failure happening? -- 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, Pennsylvania 19073 ---------------------------(end of broadcast)--------------------------- TIP 3: Have you checked our extensive FAQ? http://www.postgresql.org/docs/faq |
| |||
| On Wed, 2006-02-01 at 17:20 -0500, Stephen Frost wrote: > * Bruce Momjian (pgman@candle.pha.pa.us) wrote: > > Stephen Frost wrote: > > > Great! It'd be really nice to have this fix in 8.1.3... > > > > No, it will not be in 8.1.3. It is a new feature. > > I'd really appriciate it if you could review my post to pgsql-bugs, > Message-ID: <20060120144957.GG6026@ns.snowman.net>. If this patch is > considered a new feature then I'd like to either revisit that decision > or be given some direction on what a bug-fix patch for the grows-to-3G > bug would look like. > Stephen, this is a hopeless way of giving a reference. Many users don't keep list emails. If you want to refer to a previous post you should give a reference to the web archives. I assume you are referring to this post: http://archives.postgresql.org/pgsql...1/msg00188.php cheers andrew ---------------------------(end of broadcast)--------------------------- TIP 9: In versions below 8.0, the planner will ignore your desire to choose an index scan if your joining column's datatypes do not match |
| |||
| Andrew Dunstan wrote: > On Wed, 2006-02-01 at 17:20 -0500, Stephen Frost wrote: > > * Bruce Momjian (pgman@candle.pha.pa.us) wrote: > > > Stephen Frost wrote: > > > > Great! It'd be really nice to have this fix in 8.1.3... > > > > > > No, it will not be in 8.1.3. It is a new feature. > > > > I'd really appriciate it if you could review my post to pgsql-bugs, > > Message-ID: <20060120144957.GG6026@ns.snowman.net>. If this patch is > > considered a new feature then I'd like to either revisit that decision > > or be given some direction on what a bug-fix patch for the grows-to-3G > > bug would look like. > > > > > Stephen, > > this is a hopeless way of giving a reference. Many users don't keep list > emails. If you want to refer to a previous post you should give a > reference to the web archives. > > I assume you are referring to this post: > http://archives.postgresql.org/pgsql...1/msg00188.php OK, that helps. The solution is to "not do that", meaning install postgis before the restore or something. Anyway, adding the patch seems like too large a risk for a minor release, especially since you are the first person to complain about it that I remember. -- 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, Pennsylvania 19073 ---------------------------(end of broadcast)--------------------------- TIP 6: explain analyze is your friend |
| |||
| Bruce Momjian <pgman@candle.pha.pa.us> writes: > Andrew Dunstan wrote: >> I assume you are referring to this post: >> http://archives.postgresql.org/pgsql...1/msg00188.php > OK, that helps. The solution is to "not do that", meaning install > postgis before the restore or something. Anyway, adding the patch seems > like too large a risk for a minor release, especially since you are the > first person to complain about it that I remember. I don't think you should see this as something specific to PostGIS. If I interpret Stephen's report properly, any sort of failure during COPY IN would lead to undesirable behavior in pg_restore. This is not super surprising because the original design approach for pg_restore was "bomb out on any sort of difficulty whatsoever". That was justly complained about, and now it will try to keep going after SQL-command errors ... but it sounds like the COPY-data processing part didn't get fixed properly. I take no position on whether Stephen's patch is any good --- I haven't looked at it --- but if he's correct about the problem then I agree it's a bug fix. Before deciding whether it deserves to be back-patched, we at least ought to look closely enough to characterize the situations in which pg_restore will fail. regards, tom lane ---------------------------(end of broadcast)--------------------------- TIP 5: don't forget to increase your free space map settings |
| ||||
| * Bruce Momjian (pgman@candle.pha.pa.us) wrote: > Stephen Frost wrote: > -- Start of PGP signed section. > > * Bruce Momjian (pgman@candle.pha.pa.us) wrote: > > > Stephen Frost wrote: > > > > Great! It'd be really nice to have this fix in 8.1.3... > > > > > > No, it will not be in 8.1.3. It is a new feature. > > > > I'd really appriciate it if you could review my post to pgsql-bugs, > > Message-ID: <20060120144957.GG6026@ns.snowman.net>. If this patch is > > considered a new feature then I'd like to either revisit that decision > > or be given some direction on what a bug-fix patch for the grows-to-3G > > bug would look like. > > Oh, so when it skips the \., it reads the rest of the file and bombs > out? I thought it just continued fine. How is that failure happening? It doesn't actually bomb out either. On the system I was working with what happened was that it hung after reading in the COPY data. It looked like it got stuck somehow while trying to parse the data as an SQL command. Thanks, Stephen -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.2 (GNU/Linux) iD8DBQFD4VkerzgMPqB3kigRAvQIAJ9B5t3bVS6hsCyheuxhXz OBO2BwKQCcDxt1 wN+woFcorfOu245FN3XlCN0= =oTrf -----END PGP SIGNATURE----- |
| Thread Tools | |
| Display Modes | |
|
|