Besides, drop, and let it recreate I mean.

On Tuesday, April 26, 2016 at 11:50:09 AM UTC-5, Mike Sharpton wrote:
>
> Thanks Wyatt.  I see what you mean, this may take too long. What if I got 
> desperate and decided to just drop the entire PuppetDB.  Is there an easy 
> way to do this?  I really don't care about historical data as we use this 
> basically for monitoring of the environment.
>
> On Tuesday, April 26, 2016 at 10:45:40 AM UTC-5, Wyatt Alt wrote:
>>
>> Hey Mike, give this a shot (in a psql session): 
>>
>> begin; 
>> delete from facts where fact_path_id in (select id from fact_paths where 
>> name=any('{"disks", "partitions", "mountpoints"}')); 
>> delete from fact_paths where id not in (select fact_path_id from facts); 
>> delete from fact_values where id not in (select fact_value_id from 
>> facts); 
>> commit; 
>>
>>
>> If you hit a transaction rollback you may need to run it with PDB 
>> stopped. Those last two deletes may take some time since your 
>> gc-interval is long, so you should probably run it in tmux/screen or 
>> something. 
>>
>> Wyatt 
>>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/e6d088ae-a8b7-4a03-9d70-9d1871e1759d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to