Thanks Wyatt, that worked! The alter table command returned immediately. I 
only have about 170k reports in my DB since I migrated to 2017.1.1 friday 
night. I run puppet hourly on about 8000 nodes.

A side effect of this change is that my PuppetDB command queue depth went 
from just over 100 to 0, and has stayed there for a couple hours now, maybe 
occasionally poking up to 2-3 briefly. At least I think it was related to 
this change. :)

Thanks

Bill


On Saturday, April 22, 2017 at 4:46:57 PM UTC-4, Wyatt Alt wrote:
>
>
>
> On 04/22/2017 10:35 AM, Bill Sirinek wrote: 
> > 
> > 2017-04-22 13:30:25.912 EDT 
> > [db:pe-puppetdb,sess:58fb8caf.8cbb,pid:36027,vtid:29/23277,tid:396758] 
> > STATEMENT:  INSERT INTO resource_events ( new_value, 
> > corrective_change, property, file, report_id, old_value, 
> > containing_class, certname_id, line, resource_type, status, 
> > resource_title, timestamp, containment_path, message ) VALUES ( $1, 
> > $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, $13, $14, $15 ) RETURNING 
> * 
> > 2017-04-22 13:30:25.978 EDT 
> > [db:pe-puppetdb,sess:58fb8caf.8cbb,pid:36027,vtid:29/23281,tid:396760] 
> > ERROR:  value too long for type character varying(40) 
>
> This is probably being caused by the property names rather than resource 
> titles. The only varchar(40) columns in that table are the property name 
> and the event status, and I'm assuming you're not doing anything custom 
> with the statuses (which typically come from Puppet). 
>
> There is no supported workaround for this, but I put up a PR here 
> https://github.com/puppetlabs/puppetdb/pull/2268 to resolve it. 
>
> An unsupported workaround would be to shut down PuppetDB, connect to 
> postgres via psql and do this: 
>
> \c pe-puppetdb 
> alter table resource_events alter column property type text; 
>
> This could take anywhere from seconds to 30+ minutes depending on how 
> much data you have, so if that's a concern you can get in touch with 
> support and coordinate with them. Doing this kind of thing is usually a 
> really bad idea, but in this case it won't hurt because a future 
> migration to change the old varchar column to text will simply be a noop. 
>
> 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/6df30dbb-f615-4a53-9362-7a17cc6dc552%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to