Uploaded image for project: 'PuppetDB'
  1. PuppetDB
  2. PDB-1031

ERROR: update or delete on table "fact_paths" violates foreign key constraint "fact_values_path_id_fk" on table "fact_values"

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Normal
    • Resolution: Duplicate
    • Affects Version/s: PDB 2.2.2
    • Fix Version/s: PDB 2.3.1
    • Component/s: None
    • Labels:
      None
    • Template:
    • Story Points:
      5
    • Sprint:
      PuppetDB 2014-12-17, PuppetDB 2014-12-31, PuppetDB 2015-02-11

      Description

      Hi guys, ever since an upgrade to puppet 3.7 (and a corresponding upgrade of puppetdb at the same time) we have been getting postgres errors. We seem to see the following error on the puppetdb server after every invocation:

      Nov 17 11:01:52 postgres[6379]: [1859-1] 2014-11-17 11:01:52 EST ERROR:  update or delete on table "fact_paths" violates foreign key constraint "fact_values_path_id_fk" on table "fact_values"
      Nov 17 11:01:52 postgres[6379]: [1859-2] 2014-11-17 11:01:52 EST DETAIL:  Key (id)=(78) is still referenced from table "fact_values".
      Nov 17 11:01:52 postgres[6379]: [1859-3] 2014-11-17 11:01:52 EST STATEMENT:  COMMIT
      

      It's always the same key ID (78) that it complains about. We are running on postgres 9.1.

      From the fact_paths table, the entry with ID 78 is:

       id | value_type_id | depth |    name    |    path    
      ----+---------------+-------+------------+------------
       78 |             0 |     0 | _timestamp | _timestamp
      

      I didn't think _timestamp was supposed to make it into puppetdb? This could be a relic from the upgrade though.

      In the fact_values table, there are 3 entries which are referencing the _timestamp fact:

        id    | path_id | value_type_id |                value_hash                | value_integer | value_float |          value_string          | value_boolean | value_json 
      ---------+---------+---------------+------------------------------------------+---------------+-------------+--------------------------------+---------------+------------
       2134865 |      78 |             0 | 226b3439f249f4fccfc7637e853c2b4a5e967160 |               |             | Tue Oct 14 13:48:04 -0400 2014 |               | 
       2229630 |      78 |             0 | 14f01c68a6a7621cdcbc1bce80fb7e791b10a7df |               |             | Thu Oct 16 13:59:42 -0400 2014 |               | 
       2172152 |      78 |             0 | a4c93348ed4c2bb4fa6399512221512bf111f04b |               |             | Wed Oct 15 08:38:29 -0400 2014 |               | 
      

        Attachments

          Issue Links

            Activity

              jsd-sla-details-panel

                People

                • Assignee:
                  Unassigned
                  Reporter:
                  elatt Erik Lattimore
                • Votes:
                  1 Vote for this issue
                  Watchers:
                  7 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: