Jira (PDB-1210) PSQLException: Can't infer the SQL type to use for an instance of java.math.BigInteger

2015-08-30 Thread Kylo Ginsberg (JIRA)
Title: Message Title
 
 
 
 
 
 
 
 
 
 
  
 
 Kylo Ginsberg commented on  PDB-1210 
 
 
 
 
 
 
 
 
 
 


 
 
 
 
 
 
  Re: PSQLException: Can't infer the SQL type to use for an instance of java.math.BigInteger  
 
 
 
 
 
 
 
 
 
 
Circling back to this one, here are a couple misc notes: 
Background re facter: the GCE facts are created mechanically by processing the json blob returned by GCE and described at https://cloud.google.com/compute/docs/metadata?hl=en. (Btw, I can't find a json schema for that API, but the sample at https://github.com/puppetlabs/facter/blob/2.x/spec/fixtures/unit/gce/metadata/metadata.json#L14 uses that field as an integer.) 
Re fixing it in facter: We could definitely special case handling of that one fact in facter (and force it to be a string). I'm not opposed to doing that to relieve an immediate pain point, but it feels like it's kicking the can down the road. 
In general I think we should decide what contract we want the puppet ecosystem to support wrt integer types, and then: 
 

update components as needed. This may merit some discussion, e.g. if we decide we want to retain the current PDB limits of signed 64-bit, I wonder if that should be enforced in puppet rather than in facter, since facter knows nothing of pdb and puppet is the actual interface point.
 

enforce that contract as gracefully as possible. Wrt PDB, I definitely don't know what the options are to improve things (and I suppose that's what this ticket is about)
 
 
Thoughts? 
 
 
 
 
 
 
 
 
 
 
 
 

 
 Add Comment 
 
 
 
 
 
 
 
 
 
 


 
 
 
 
 
 
 
 
 

 This message was sent by Atlassian JIRA (v6.4.5#64020-sha1:78acd6c) 
 
 
 
 
  
 
 
 
 
 
 
 
 
   





-- 
You received this message because you are subscribed to the Google Groups Puppet Bugs group.
To unsubscribe from this group 

Jira (PDB-1210) PSQLException: Can't infer the SQL type to use for an instance of java.math.BigInteger

2015-08-27 Thread Kenneth Barber (JIRA)
Title: Message Title
 
 
 
 
 
 
 
 
 
 
  
 
 Kenneth Barber updated an issue 
 
 
 
 
 
 
 
 
 
 


 
 
 
 
 
 
 PuppetDB /  PDB-1210 
 
 
 
  PSQLException: Can't infer the SQL type to use for an instance of java.math.BigInteger  
 
 
 
 
 
 
 
 
 

Change By:
 
 Kenneth Barber 
 
 
 

Sprint:
 
 PuppetDB2015-09-23 
 
 
 
 
 
 
 
 
 
 
 
 

 
 Add Comment 
 
 
 
 
 
 
 
 
 
 


 
 
 
 
 
 
 
 
 

 This message was sent by Atlassian JIRA (v6.4.5#64020-sha1:78acd6c) 
 
 
 
 
  
 
 
 
 
 
 
 
 
   





-- 
You received this message because you are subscribed to the Google Groups Puppet Bugs group.
To unsubscribe from this group and stop receiving emails from it, send an email to puppet-bugs+unsubscr...@googlegroups.com.
To post to this group, send email to puppet-bugs@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-bugs.
For more options, visit https://groups.google.com/d/optout.


Jira (PDB-1210) PSQLException: Can't infer the SQL type to use for an instance of java.math.BigInteger

2015-08-27 Thread Kenneth Barber (JIRA)
Title: Message Title
 
 
 
 
 
 
 
 
 
 
  
 
 Kenneth Barber commented on  PDB-1210 
 
 
 
 
 
 
 
 
 
 


 
 
 
 
 
 
  Re: PSQLException: Can't infer the SQL type to use for an instance of java.math.BigInteger  
 
 
 
 
 
 
 
 
 
 
Out of interest, JSONB can consume large numbers, but since it requires coercement anyway for numeric comparison, the result is 'it works' but you'd always need to cast to numeric in anticipation of any large numbers: 
{{# select cast(bar::json-'foo' as numeric) from foo where cast(bar::json-'foo' as numeric)  1000; numeric -- 17348547622482641976 17348547622482641976}} 
 
 
 
 
 
 
 
 
 
 
 
 

 
 Add Comment 
 
 
 
 
 
 
 
 
 
 


 
 
 
 
 
 
 
 
 

 This message was sent by Atlassian JIRA (v6.4.5#64020-sha1:78acd6c) 
 
 
 
 
  
 
 
 
 
 
 
 
 
   





-- 
You received this message because you are subscribed to the Google Groups Puppet Bugs group.
To unsubscribe from this group and stop receiving emails from it, send an email to puppet-bugs+unsubscr...@googlegroups.com.
To post to this group, send email to puppet-bugs@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-bugs.
For more options, visit https://groups.google.com/d/optout.


Jira (PDB-1210) PSQLException: Can't infer the SQL type to use for an instance of java.math.BigInteger

2015-08-27 Thread Kenneth Barber (JIRA)
Title: Message Title
 
 
 
 
 
 
 
 
 
 
  
 
 Kenneth Barber commented on  PDB-1210 
 
 
 
 
 
 
 
 
 
 


 
 
 
 
 
 
  Re: PSQLException: Can't infer the SQL type to use for an instance of java.math.BigInteger  
 
 
 
 
 
 
 
 
 
 
Looks like we've exceeded the bigint field here. We store numbers in a bigint column, and bigint is a signed 64-bit integer: http://www.postgresql.org/docs/9.4/static/datatype-numeric.html#DATATYPE-INT 
We discussed this earlier today in IRC with Erik Daln  Kylo Ginsberg, and the notes are as follows: 
 

The GCE id only sometimes exceeds the limit, which is something to note. So not all GCE instances will suffer this problem.
 

One tactical solution is to just convert the GCE id to string, as its really just an identifier and no numeric comparison is required here we believe. This doesn't solve the large number problem, just solves this 1 fact for now.
 

Add larger number support using the 'numeric' or 'decimal' type in PostgreSQL. This would require extra work, and will still mean that we have to provide a large cap on number support (even if it is larger than before).
 

Being honest about what we support, and keeping that the same everywhere is obviously a worthwhile thing to do. So throwing errors, or doing whatever default behaviour when we hit these numbers earlier would be helpful to the users suffering this. Perhaps facter should be aware of our max limit (signed 64 bit integer or a larger one using numeric if we go that route) and also lock this down somehow.
 
 
I guess step 1 would be determining if there are more facts that create this problem so we can understand if it's just this GCE one creating all the noise. We should check in core facter and in the original tickets that raised this one. 
 
 
 
 
 
 
 
 
 
 
 
 

 
 Add Comment 
 
 
 
 
 
 
 
 
 
 


 
 
 
 
 
 
 
 
 

 This message was sent by Atlassian JIRA (v6.4.5#64020-sha1:78acd6c) 
 
 
  

Jira (PDB-1210) PSQLException: Can't infer the SQL type to use for an instance of java.math.BigInteger

2015-08-27 Thread JIRA
Title: Message Title
 
 
 
 
 
 
 
 
 
 
  
 
 Erik Daln commented on  PDB-1210 
 
 
 
 
 
 
 
 
 
 


 
 
 
 
 
 
  Re: PSQLException: Can't infer the SQL type to use for an instance of java.math.BigInteger  
 
 
 
 
 
 
 
 
 
 
I've seen this happen on a bunch of hosts as well. 
 
 
 
 
 
 
 
 
 
 
 
 

 
 Add Comment 
 
 
 
 
 
 
 
 
 
 


 
 
 
 
 
 
 
 
 

 This message was sent by Atlassian JIRA (v6.4.5#64020-sha1:78acd6c) 
 
 
 
 
  
 
 
 
 
 
 
 
 
   





-- 
You received this message because you are subscribed to the Google Groups Puppet Bugs group.
To unsubscribe from this group and stop receiving emails from it, send an email to puppet-bugs+unsubscr...@googlegroups.com.
To post to this group, send email to puppet-bugs@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-bugs.
For more options, visit https://groups.google.com/d/optout.


Jira (PDB-1210) PSQLException: Can't infer the SQL type to use for an instance of java.math.BigInteger

2015-08-27 Thread JIRA
Title: Message Title
 
 
 
 
 
 
 
 
 
 
  
 
 Erik Daln commented on  PDB-1210 
 
 
 
 
 
 
 
 
 
 


 
 
 
 
 
 
  Re: PSQLException: Can't infer the SQL type to use for an instance of java.math.BigInteger  
 
 
 
 
 
 
 
 
 
 
Seems to happen if a integer fact has a value larger than the max value for a long (9223372036854775807). 
 
 
 
 
 
 
 
 
 
 
 
 

 
 Add Comment 
 
 
 
 
 
 
 
 
 
 


 
 
 
 
 
 
 
 
 

 This message was sent by Atlassian JIRA (v6.4.5#64020-sha1:78acd6c) 
 
 
 
 
  
 
 
 
 
 
 
 
 
   





-- 
You received this message because you are subscribed to the Google Groups Puppet Bugs group.
To unsubscribe from this group and stop receiving emails from it, send an email to puppet-bugs+unsubscr...@googlegroups.com.
To post to this group, send email to puppet-bugs@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-bugs.
For more options, visit https://groups.google.com/d/optout.


Jira (PDB-1210) PSQLException: Can't infer the SQL type to use for an instance of java.math.BigInteger

2015-03-26 Thread Daniele Sluijters (JIRA)
Title: Message Title
 
 
 
 
 
 
 
 
 
 
  
 
 Daniele Sluijters commented on  PDB-1210 
 
 
 
 
 
 
 
 
 
 


 
 
 
 
 
 
  Re: PSQLException: Can't infer the SQL type to use for an instance of java.math.BigInteger  
 
 
 
 
 
 
 
 
 
 
We've just ran into this issue too. Clean PostgreSQL database, fresh PuppetDB 2.2.2 installation. 
 
 
 
 
 
 
 
 
 
 
 
 

 
 Add Comment 
 
 
 
 
 
 
 
 
 
 


 
 
 
 
 
 
 
 
 

 This message was sent by Atlassian JIRA (v6.3.10#6340-sha1:7ea293a) 
 
 
 
 
  
 
 
 
 
 
 
 
 
   





-- 
You received this message because you are subscribed to the Google Groups Puppet Bugs group.
To unsubscribe from this group and stop receiving emails from it, send an email to puppet-bugs+unsubscr...@googlegroups.com.
To post to this group, send email to puppet-bugs@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-bugs.
For more options, visit https://groups.google.com/d/optout.


Jira (PDB-1210) PSQLException: Can't infer the SQL type to use for an instance of java.math.BigInteger

2015-01-30 Thread Wyatt Alt (JIRA)
Title: Message Title
 
 
 
 
 
 
 
 
 
 
  
 
 Wyatt Alt created an issue 
 
 
 
 
 
 
 
 
 
 


 
 
 
 
 
 
 PuppetDB /  PDB-1210 
 
 
 
  PSQLException: Can't infer the SQL type to use for an instance of java.math.BigInteger  
 
 
 
 
 
 
 
 
 

Issue Type:
 
  Bug 
 
 
 

Assignee:
 

 Unassigned 
 
 
 

Created:
 

 2015/01/30 2:29 PM 
 
 
 

Priority:
 
  Normal 
 
 
 

Reporter:
 
 Wyatt Alt 
 
 
 
 
 
 
 
 
 
 
This is encountered by the PE-7392 folks in a number of places, notably on host 202, though not during the timeperiod that the ticket itself is concerned with. 
 
 
 
 
 
 
2014-11-20 11:09:06,169 ERROR [c.p.p.command] [b8922a1d-46ff-4272-a53d-26737001d968] [replace facts] Retrying after attempt 4, due to: org.postgresql.util.PSQLException: Can't infer the SQL type to use for an instance of java.math.BigInteger. Use setObject() with an explicit Types value to specify the type to use. 
 
 
 
 
org.postgresql.util.PSQLException: Can't infer the SQL type to use for an instance of java.math.BigInteger. Use setObject() with an explicit Types value to specify the type to use.