From: mj Date: Mon, 25 Mar 2002 20:07:08 +0000 (+0000) Subject: Added some lines to explain the different solutions to the dupe problem X-Git-Tag: prexmlproducerconfig~246 X-Git-Url: http://erislabs.org.uk/gitweb/?a=commitdiff_plain;h=5b875d8ccdc6fe83c18078ee02b460ea14eaad13;p=mir.git Added some lines to explain the different solutions to the dupe problem (trigger and unique indices). --- diff --git a/dbscripts/dupetrigger/INSTALL b/dbscripts/dupetrigger/INSTALL index 2e62c385..47e781b1 100755 --- a/dbscripts/dupetrigger/INSTALL +++ b/dbscripts/dupetrigger/INSTALL @@ -1,3 +1,36 @@ +The dupetrigger + +MOTIVATION + +Often, users commit their comments and articles multiple times if they +don't believe the comment has been inserted into the databases. This is +clearly one of the disadvantages of the otherwise clever caching strategy +used by Mir. Without proper handling, this duplicate content will enlarge +the database and make the appearance of the generated web pages be less +satisfactory. + + +SOLUTIONS + +There are two approaches to get rid of these duplicate entries +(hereafter called "dupes"). The first approach is the dupetrigger that +ensures that no entries in a given table are the same. This is the approach +currently pursued in Mir. If this trigger cannot be compiled or doesn't work +for any reason, you may work-around this problem by issuing the following +commands on your psql prompt: + +CREATE UNIQUE INDEX idx_content_dupe ON content (title, subtitle, creator, description, content_data); +CREATE UNIQUE INDEX idx_comment_dupe ON comment (creator, to_media, description, title); + +Please note that this approach will work but the implications on the Mir +software have not been tested, yet. Maybe Mir will respond with an error +or with other unexpected behaviour, but it should do no harm to the +database. The dupetrigger has been tested with Mir and is currently being +operated on de.indymedia.org. + + +HOW TO INSTALL THE DUPE TRIGGER + To install the trigger do the following: # cp Makefile-dist Makefile