]> granicus.if.org Git - postgresql/commit
Try to defend against the possibility that libpq is still in COPY_IN state
authorTom Lane <tgl@sss.pgh.pa.us>
Fri, 7 Aug 2009 20:16:22 +0000 (20:16 +0000)
committerTom Lane <tgl@sss.pgh.pa.us>
Fri, 7 Aug 2009 20:16:22 +0000 (20:16 +0000)
commitd9a00ebbbac84b417b616b5a8eaaa9331736f2c8
tree4596b4120953b0e5cdf930d2b16e9745050f52ae
parentb1fc543b5d864858f0c21f95e814c9964c9322d4
Try to defend against the possibility that libpq is still in COPY_IN state
when we reach the post-COPY "pump it dry" error recovery code that was added
2006-11-24.  Per a report from Neil Best, there is at least one code path
in which this occurs, leading to an infinite loop in code that's supposed
to be making it more robust not less so.  A reasonable response seems to be
to call PQputCopyEnd() again, so let's try that.

Back-patch to all versions that contain the cleanup loop.
src/bin/psql/copy.c