Uploaded image for project: 'OpenSAML - Java'
  1. OpenSAML - Java
  2. OSJ-135

Hibernate creates orphaned large objects

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 3.1.1
    • Fix Version/s: 3.4.0
    • Component/s: Storage
    • Labels:
      None
    • Environment:
      • IdP 3.1.2
      • Postgresql 9.2 or 9.4, with corresponding JDBC connector

      Description

      From class org.opensaml.storage.impl.JPAStorageRecord:

      @Lob
      @Column(name="value", nullable = false)
      @Nonnull
      @Override
      public String getValue()

      The @Lob apparently causes Hibernate, when used together with Postgresql, to use the "value" column to store a large object's OID as a string, but this value is not seen as an object reference by Postgresql so the large object is immediately orphaned (vacuumlo would delete it).
      Overriding the @Lob annotation with a custom orm.xml mapping makes Hibernate store the actual value (JSON) in the column, as it probably should. Would it be possible to remove @Lob in order to get correct behaviour with Postgresql? I don't know how this would affect other database engines...

        Attachments

          Activity

            People

            • Assignee:
              dfisher@vt.edu Daniel W Fisher
              Reporter:
              cp+akh4hcy23wzvoqzqp+bp6+ao=@https://aai-logon.switch.ch/idp/shibboleth Etienne Dysli-Metref
            • Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: