Your message dated Wed, 30 Aug 2006 23:05:30 -0700
with message-id <[EMAIL PROTECTED]>
and subject line Bug#372115: fixed in postgresql 7.4.7-6sarge3
has caused the attached Bug report to be marked as done.
This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.
(NB: If you are a system administrator and have no idea what I am
talking about this indicates a serious mail system misconfiguration
somewhere. Please contact me immediately.)
Debian bug tracking system administrator
(administrator, Debian Bugs database)
--- Begin Message ---
Package: postgresql-contrib
Version: 7.4.7-6sarge2
Severity: critical
Justification: causes serious data loss
Hello,
using version 7.4.7-6sarge2 of postgresql-contrib cause trouble in
database replication using /usr/lib/postgresql/bin/DBMirror.pl
The problem I have found is if there is a ' character (the single quote)
in the data. In this case, the single quote (') is replaced by two
single quotes ('') in the table PendingData. This cause the replication
process to stop with a message "Error in PendingData Sequence Id XXX".
To replicate the non-replicated data, I have run a patched version of
DBMirror.pl. Here is my patch (mainly replacing the two single quotes by
a backslash and one single quote, this mean '' -> \'. Execepted if there
is a equal before, this mean don't replace ='') :
--- /usr/lib/postgresql/bin/DBMirror.pl 2005-05-18 10:33:34.000000000 +0200
+++ ./DBMirror.pl 2006-06-08 11:53:39.000000000 +0200
@@ -827,6 +827,9 @@
$fnumber = 4;
my $dataField = $pendingResult->getvalue($currentTuple,$fnumber);
+ # replace all the '' to \' in the texts
+ $dataField =~ s/([^=])\'\'/\1\\\'/g;
+
while(length($dataField)>0) {
# Extract the field name that is surronded by double quotes
$dataField =~ m/(\".*?\")/s;
I'm sure this patch is not enough, because this don't take in account if
the data has in it something like "=''". I think the part to patch is
not the DBMirror.pl, but the "recordchange" procedure called by the
trigger on each data change.
Reverting postgresql-contrib to version 7.4.7-6sarge1 correct the
problem only if you have nothing in the Pending table.
Thanks for your attention, and have a nice day.
Oliver
-- System Information:
Debian Release: 3.1
Architecture: i386 (i686)
Kernel: Linux 2.4.22
Locale: LANG=C, LC_CTYPE=C (charmap=ANSI_X3.4-1968)
Versions of packages postgresql-contrib depends on:
ii libc6 2.3.2.ds1-22sarge3 GNU C Library: Shared libraries an
ii libdbd-pg-perl 1.41-3 a PostgreSQL interface for Perl 5
ii libkrb53 1.3.6-2sarge2 MIT Kerberos runtime libraries
ii libpam0g 0.76-22 Pluggable Authentication Modules l
ii libpg-perl 1:2.0.2-4 Perl modules for PostgreSQL
ii libpq3 7.4.7-6sarge2 PostgreSQL C client library
ii libreadline4 4.3-11 GNU readline and history libraries
ii libssl0.9.7 0.9.7e-3sarge1 SSL shared libraries
ii libxml2 2.6.16-7 GNOME XML library
ii postgresql 7.4.7-6sarge2 object-relational SQL database man
ii zlib1g 1:1.2.2-4.sarge.2 compression library - runtime
-- no debconf information
--- End Message ---
--- Begin Message ---
Source: postgresql
Source-Version: 7.4.7-6sarge3
We believe that the bug you reported is fixed in the latest version of
postgresql, which is due to be installed in the Debian FTP archive:
libecpg-dev_7.4.7-6sarge3_i386.deb
to pool/main/p/postgresql/libecpg-dev_7.4.7-6sarge3_i386.deb
libecpg4_7.4.7-6sarge3_i386.deb
to pool/main/p/postgresql/libecpg4_7.4.7-6sarge3_i386.deb
libpgtcl-dev_7.4.7-6sarge3_i386.deb
to pool/main/p/postgresql/libpgtcl-dev_7.4.7-6sarge3_i386.deb
libpgtcl_7.4.7-6sarge3_i386.deb
to pool/main/p/postgresql/libpgtcl_7.4.7-6sarge3_i386.deb
libpq3_7.4.7-6sarge3_i386.deb
to pool/main/p/postgresql/libpq3_7.4.7-6sarge3_i386.deb
postgresql-client_7.4.7-6sarge3_i386.deb
to pool/main/p/postgresql/postgresql-client_7.4.7-6sarge3_i386.deb
postgresql-contrib_7.4.7-6sarge3_i386.deb
to pool/main/p/postgresql/postgresql-contrib_7.4.7-6sarge3_i386.deb
postgresql-dev_7.4.7-6sarge3_i386.deb
to pool/main/p/postgresql/postgresql-dev_7.4.7-6sarge3_i386.deb
postgresql-doc_7.4.7-6sarge3_all.deb
to pool/main/p/postgresql/postgresql-doc_7.4.7-6sarge3_all.deb
postgresql_7.4.7-6sarge3.diff.gz
to pool/main/p/postgresql/postgresql_7.4.7-6sarge3.diff.gz
postgresql_7.4.7-6sarge3.dsc
to pool/main/p/postgresql/postgresql_7.4.7-6sarge3.dsc
postgresql_7.4.7-6sarge3_i386.deb
to pool/main/p/postgresql/postgresql_7.4.7-6sarge3_i386.deb
A summary of the changes between this version and the previous one is
attached.
Thank you for reporting the bug, which will now be closed. If you
have further comments please address them to [EMAIL PROTECTED],
and the maintainer will reopen the bug report if appropriate.
Debian distribution maintenance software
pp.
Martin Pitt <[EMAIL PROTECTED]> (supplier of updated postgresql package)
(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing [EMAIL PROTECTED])
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Format: 1.7
Date: Thu, 6 Jul 2006 09:48:40 +0200
Source: postgresql
Binary: postgresql-client libecpg4 libpgtcl-dev libpq3 postgresql-doc
libecpg-dev postgresql-dev postgresql libpgtcl postgresql-contrib
Architecture: source i386 all
Version: 7.4.7-6sarge3
Distribution: stable
Urgency: low
Maintainer: Martin Pitt <[EMAIL PROTECTED]>
Changed-By: Martin Pitt <[EMAIL PROTECTED]>
Description:
libecpg-dev - development files for ECPG (Embedded PostgreSQL for C)
libecpg4 - run-time library for ECPG programs
libpgtcl - Tcl procedural language, library and front-end for PostgreSQL
libpgtcl-dev - Tcl library for PostgreSQL - development files
libpq3 - PostgreSQL C client library
postgresql - object-relational SQL database management system
postgresql-client - front-end programs for PostgreSQL
postgresql-contrib - additional facilities for PostgreSQL
postgresql-dev - development files for libpq (PostgreSQL library)
postgresql-doc - documentation for the PostgreSQL database management system
Closes: 372115
Changes:
postgresql (7.4.7-6sarge3) stable; urgency=low
.
* debian/patches/57quote-escaping.patch:
- contrib/dbmirror/DBMirror.pl: Fix parsing of quotes escaped as '' in the
PendingData table to make the script work with the updated quoting
method introduced in 7.4.7-6sarge2 (using \' escaping is insecure).
- Closes: #372115
Files:
db41bfb0c58cb1d85bd2dbb3159ac109 985 misc optional postgresql_7.4.7-6sarge3.dsc
e3d8da5cedbeff0074347c4e853d9762 186978 misc optional
postgresql_7.4.7-6sarge3.diff.gz
90543c45120e066feae5ff4442d9f2cb 2395488 doc optional
postgresql-doc_7.4.7-6sarge3_all.deb
ced01fe672d4a7d2552f1e61d7029b35 3798896 misc optional
postgresql_7.4.7-6sarge3_i386.deb
4f1dd8e1c50d05ae3e02fff9da4d7bff 540066 misc optional
postgresql-client_7.4.7-6sarge3_i386.deb
cff92e743caad16bc62ef70e152899c0 517228 libdevel optional
postgresql-dev_7.4.7-6sarge3_i386.deb
f4d5ce97f5edd64e77b174d3979f40c5 128434 libs optional
libpq3_7.4.7-6sarge3_i386.deb
65c03fa73853cb66cd2463af5e016f9f 96276 libs optional
libecpg4_7.4.7-6sarge3_i386.deb
da39e720a64ab8b406df68817c388011 207774 libdevel optional
libecpg-dev_7.4.7-6sarge3_i386.deb
efb30835b37adb73e0f01e4d0433a47b 78268 libs optional
libpgtcl_7.4.7-6sarge3_i386.deb
b8a5671805b69b60114b14d98db596d9 56002 libdevel optional
libpgtcl-dev_7.4.7-6sarge3_i386.deb
ac8cbb81080550d6f76677453dbcd8ab 625614 misc optional
postgresql-contrib_7.4.7-6sarge3_i386.deb
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (GNU/Linux)
iD8DBQFEsOcMDecnbV4Fd/IRAr5PAJ9vkjD57qzcPcdhs98XMSd08CUVSQCg6g6t
ViNpqrtP/3nNKibzsuZgKyE=
=O8Zy
-----END PGP SIGNATURE-----
--- End Message ---