Re: commit problems
Federico Di Gregorio <fog-NGVKUo/i/[email protected]> Mon, 23 Aug 2010 18:11:07 +0200
| Newsgroups | gmane.comp.python.db.psycopg.devel |
|---|---|
| Message-ID | <[email protected]> |
This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --===============4899666762666875320== Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enig092C8ACC4917AFCF7C845A20" This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enig092C8ACC4917AFCF7C845A20 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On 08/23/10 16:55, Richard Harley wrote: > We have had a problem with postgresql 8.3 on a Windows server 2008. I > wonder whether there has been any other experiences like this. We have > connected to Potsgres from Zope via a Psycopg adapter and noticed that > sometimes when data is inserted via a form in Zope, the data is > available in Zope but doesn't get committed to the database. This has > come to a head over the weekend where at least one month's worth of dat= a > has disappeared and this includes changes to the actual database > structure - luckily only on a testing machine, but concerning neverthel= ess. > The data seemed to disappear after we upgraded to the most recent > version of Zpsycopg2 database adapter, previously we were using version= > 1 (I know it's old, we are only testing after all) and have never had > these sorts of problem before. It's almost as if all the data and > changes to the db were held in memory, and Postgres continued to work > fine from there, but when the db adapter was changed and Zope restarted= > everything was cleared from memory. > Has anyone had similar experinces or can anyone cast any light on where= > the problem may lie. To us it seems the db adapter is the most likely > candidate but we can't understand how this could happen, explanations > also welcome. What you describe, PostgreSQL keeping 1 month worth of changes to the database schema "in memory" and then loosing everything can happen only if you have a single transaction 1 month long and sincerely I don't see how this is possible. Also, from what I know Zope doesn't cache the results of an ALTER, INSERT or any other non-SELECT query so, again, I can't see how what you describe can happen. If you insert some data and in a successive request the data is there then an explicit delete (or DROP/CREATE TABLE) is required to remove it. This seems like a bug in your application to me. federico --=20 Federico Di Gregorio fog-NGVKUo/i/[email protected] In some countries (e.g., Germany) even many brands of toilet paper have format A6. [http://www.cl.cam.ac.uk/~mgk25/iso-paper.html] --------------enig092C8ACC4917AFCF7C845A20 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAkxynaIACgkQvcCgrgZGjevm3ACeM+VNZjrB/fE09JAbQHDrgRFB r/YAoMHoB78h/2W+Qk3YyUbiUtHMbjlb =fzTj -----END PGP SIGNATURE----- --------------enig092C8ACC4917AFCF7C845A20-- --===============4899666762666875320== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Psycopg mailing list Psycopg-IAPFreCvJWPBWskQ1e/[email protected] http://lists.initd.org/mailman/listinfo/psycopg --===============4899666762666875320==--