Uploaded image for project: 'Apache Jena'
  1. Apache Jena
  2. JENA-28

Drop Temporary Tables in Postgres (PATCH)

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Minor
    • Resolution: Won't Fix
    • None
    • None
    • SDB
    • None
    • Effects SDB PostgreSQL

    Description

      Current behaviour to truncate the temporary tables leaves the table objects, and thanks to MVCC in Postgres the data in those tables around for far longer then expected. This causes HUGE write loads on the database when loading a large number of quads or triples transactionally.

      Fix is VERY simple:

      Index: src/com/hp/hpl/jena/sdb/layout2/hash/TupleLoaderHashPGSQL.java
      ===================================================================
      — src/com/hp/hpl/jena/sdb/layout2/hash/TupleLoaderHashPGSQL.java (revision 8420)
      +++ src/com/hp/hpl/jena/sdb/layout2/hash/TupleLoaderHashPGSQL.java (working copy)
      @@ -26,7 +26,7 @@
      }

      public String[] getCreateTempTable() {

      • return new String[] { "CREATE TEMPORARY TABLE" , "ON COMMIT DELETE ROWS" }

        ;
        + return new String[]

        { "CREATE TEMPORARY TABLE" , "ON COMMIT DROP" }

        ;
        }

      Attachments

        Activity

          People

            shellac Damian Steer
            gavin.carothers Gavin Carothers
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: