Last modified: 2012-04-16 09:24:34 UTC

Wikimedia Bugzilla is closed!

Wikimedia has migrated from Bugzilla to Phabricator. Bug reports should be created and updated in Wikimedia Phabricator instead. Please create an account in Phabricator and add your Bugzilla email address to it.
Wikimedia Bugzilla is read-only. If you try to edit or create any bug report in Bugzilla you will be shown an intentional error message.
In order to access the Phabricator task corresponding to a Bugzilla report, just remove "static-" from its URL.
You could still run searches in Bugzilla or access your list of votes but bug reports will obviously not be up-to-date in Bugzilla.
Bug 21548 - Disabling triggers in PostgreSQL can only be done by super user
Disabling triggers in PostgreSQL can only be done by super user
Status: RESOLVED DUPLICATE of bug 19883
Product: Utilities
Classification: Unclassified
mwdumper (Other open bugs)
unspecified
All All
: Normal normal (vote)
: ---
Assigned To: Brion Vibber
:
Depends on: 21549
Blocks:
  Show dependency treegraph
 
Reported: 2009-11-17 09:33 UTC by grdscarabe
Modified: 2012-04-16 09:24 UTC (History)
1 user (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description grdscarabe 2009-11-17 09:33:22 UTC
When restoring a dump of wikipedia into PostgreSQL with mwdump, the first lines are :

ALTER TABLE revision DISABLE TRIGGER ALL;ALTER TABLE page DISABLE TRIGGER ALL;;

this will result in :

ERROR:  permission denied: "RI_ConstraintTrigger_XXXXX" is a system trigger
ERROR:  permission denied: "RI_ConstraintTrigger_XXXXX" is a system trigger

because some triggers are managed by the database server itself and cannot be disabled by any one, except the super user. However there is a way [1] to delay the constraints applications in order to load a whole bunch of data in the database and do not need to be super-user :

At the beggining : SET CONSTRAINTS ALL DEFERRED
At the end : SET CONSTRAINTS ALL IMMEDIATE

[1] http://kopongo.com/2008/7/25/postgres-ri_constrainttrigger-error
Comment 1 grdscarabe 2009-11-17 10:28:03 UTC
For this previous comment to work, all constraints must be deferrable which is not the case right now in the SQL schema -> I proposed a patch in Bug 21549
Comment 2 grdscarabe 2009-11-18 13:59:16 UTC

*** This bug has been marked as a duplicate of bug 19883 ***

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links