From: Sven R. <Mai...@ro...> - 2008-08-13 22:14:07
|
Hi, I started using phpwiki some years ago, as it was the first system which I easily integrated into my running software (LDAP-auth; Postgres). Some months ago (in 2007) I upgraded to version 1.3.14, according to the steps in the manual. In case I remember correctly since this upgrade I've some trouble with editing some pages of the wiki. My problem is the following: The not working pages behaves as "https://www.roederer.dhs.org/wiki/index.php/EinkaufsListe" (https://www.roederer.dhs.org/wiki/index.php/Knowledge is a working page). I can only save edits of this page when they are marked as "minor change". When this marking is not done (automatically or manually) I get the following error-msg: ----------------------------------------------------------------------------- Fatal Error: lib/WikiDB/backend/PearDB.php:1059 Error: wikidb_backend_peardb_pgsql: fatal database error DB Error: constraint violation (INSERT INTO recent (id, latestversion, latestmajor, latestminor) SELECT id, MAX(version), MAX(CASE WHEN minor_edit=0 THEN version END), MAX(CASE WHEN minor_edit<>0 THEN version END) FROM version WHERE id=553 GROUP BY id [nativecode=ERROR: new row for relation "recent" violates check constraint "$1"]) Fatal PhpWiki Error lib/WikiDB/backend/PearDB.php:1059 Error: wikidb_backend_peardb_pgsql: fatal database error DB Error: constraint violation (INSERT INTO recent (id, latestversion, latestmajor, latestminor) SELECT id, MAX(version), MAX(CASE WHEN minor_edit=0 THEN version END), MAX(CASE WHEN minor_edit<>0 THEN version END) FROM version WHERE id=553 GROUP BY id [nativecode=ERROR: new row for relation "recent" violates check constraint "$1"]) ----------------------------------------------------------------------------- As written by the databse-engine, there is a constraint violation. Can anyone give me a hint how to fix this? As I'm not familar with the internal database-organization. Kind regards Sven |
From: Reini U. <ru...@x-...> - 2008-08-14 15:58:37
|
Sven Roederer schrieb: > Hi, > > I started using phpwiki some years ago, as it was the first system which I > easily integrated into my running software (LDAP-auth; Postgres). > Some months ago (in 2007) I upgraded to version 1.3.14, according to the > steps in the manual. > In case I remember correctly since this upgrade I've some trouble with > editing some pages of the wiki. > My problem is the following: > The not working pages behaves > as "https://www.roederer.dhs.org/wiki/index.php/EinkaufsListe" > (https://www.roederer.dhs.org/wiki/index.php/Knowledge > is a working page). I can only save edits of this page when they are > marked as "minor change". When this marking is not done (automatically or > manually) I get the following error-msg: > ----------------------------------------------------------------------------- > Fatal Error: > lib/WikiDB/backend/PearDB.php:1059 Error: wikidb_backend_peardb_pgsql: > fatal database error > DB Error: constraint violation > (INSERT INTO recent (id, latestversion, latestmajor, latestminor) SELECT > id, MAX(version), MAX(CASE WHEN minor_edit=0 THEN version END), MAX(CASE > WHEN minor_edit<>0 THEN version END) FROM version WHERE id=553 GROUP BY > id [nativecode=ERROR: new row for relation "recent" violates check > constraint "$1"]) > > Fatal PhpWiki Error > lib/WikiDB/backend/PearDB.php:1059 Error: wikidb_backend_peardb_pgsql: > fatal database error > DB Error: constraint violation > (INSERT INTO recent (id, latestversion, latestmajor, latestminor) SELECT > id, MAX(version), MAX(CASE WHEN minor_edit=0 THEN version END), MAX(CASE > WHEN minor_edit<>0 THEN version END) FROM version WHERE id=553 GROUP BY > id [nativecode=ERROR: new row for relation "recent" violates check > constraint "$1"]) > ----------------------------------------------------------------------------- > > As written by the databse-engine, there is a constraint violation. > > Can anyone give me a hint how to fix this? As I'm not familar with the > internal database-organization. > > Kind regards > Sven Hi Sven, This is clearly an error with the very new postgresql schema. I just looked and it looks like that all the new stricter checks and optimizations features for postgresql are not yet enabled in the release and the page save method (set_versiondata) is using the generic version. Until I can fix that, can you try the other DATABASE_TYPE = ADODB I'm mainly working with ADODB, and backport changes after a while to the more stable SQL with the PearDB backend. The constraint is question is CHECK (latestminor >= latestmajor). Maybe you should disable this constraint, but first I want to reproduce and debug that. Which postgresql version exactly? I use 7.4.19, 8.2.9 and 8.3.3, but only occasionally. -- Reini Urban http://phpwiki.org/ http://murbreak.at/ |
From: Sven R. <Mai...@ro...> - 2008-08-14 21:44:29
|
Am Donnerstag 14 August 2008 schrieb Reini Urban: > > Until I can fix that, can you try the other DATABASE_TYPE = ADODB > I'm mainly working with ADODB, and backport changes after a while to > the more stable SQL with the PearDB backend. > > The constraint is question is CHECK (latestminor >= latestmajor). > Maybe you should disable this constraint, but first I want to reproduce > and debug that. > > Which postgresql version exactly? > I use 7.4.19, 8.2.9 and 8.3.3, but only occasionally. Reini, thanks for the quick answer. I'm using a debian Etch server still running "Postgresql 7.4.17". I want to avoid to install more software-packages on this machine, just to keep the installed software-base low. But if this is the way to go, I have to think of it. But as edits in the wiki are made mostly by myself it's not so urgent to solve this error. Please let me know if I can support you in debugging by by providing informations or anything else. REgards Sven |