Skip to Content.
Sympa Menu

grouper-users - RE: [grouper-users] Clean db from users without memberships

Subject: Grouper Users - Open Discussion List

List archive

RE: [grouper-users] Clean db from users without memberships


Chronological Thread 
  • From: Chris Hyzer <>
  • To: Francesco Malvezzi <>, "" <>
  • Subject: RE: [grouper-users] Clean db from users without memberships
  • Date: Wed, 28 May 2014 14:50:54 +0000
  • Accept-language: en-US

You can delete old unneeded point in time if you like...

https://spaces.internet2.edu/display/Grouper/Point+in+Time+Auditing

Chris


-----Original Message-----
From: Francesco Malvezzi
[mailto:]

Sent: Wednesday, May 28, 2014 10:49 AM
To: Chris Hyzer;

Subject: Re: [grouper-users] Clean db from users without memberships

Il 28/05/2014 15:54, Chris Hyzer ha scritto:
> You want to get rid of entries in grouper_members which arent used anywhere
> else (there are a ton of foreign keys to this table)? I don't think we
> have a utility to do that. I guess you could backup your data, and write a
> script that tries to delete each record in that table in its own
> transaction and if a record fails due to foreign key, then ignore. Or you
> could look at all the foreign keys and write a delete script where the
> record is not used in any foreign key (backup your data for this too
> obviously).
>
> Im not sure I recommend doing either of these though, up to you :)

I tried something like:

delete from grouper_members where subject_source='my-ldap-source' and id
not in (select distinct member_id from grouper_memberships);

but right now I realized the slowness of xmlexport was due to the log
entries (point in time?) so I think I didn't solve anything,

thank you,

Francesco




Archive powered by MHonArc 2.6.16.

Top of Page