You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@openjpa.apache.org by "Ignacio Andreu (JIRA)" <ji...@apache.org> on 2008/05/13 11:30:55 UTC

[jira] Created: (OPENJPA-599) Postgres table cleanup problem

Postgres table cleanup problem
------------------------------

                 Key: OPENJPA-599
                 URL: https://issues.apache.org/jira/browse/OPENJPA-599
             Project: OpenJPA
          Issue Type: Bug
            Reporter: Ignacio Andreu
             Fix For: 1.1.0


In the Stream support OpenJPA uses a system table (pg_largepbject) at the end of the test cases OpenJPA doesn't delete the records generated by the test.

The delete operation isn't trivial, because other programs in other databases can use this table, we've to delete only the records that we've inserted.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (OPENJPA-599) Postgres table cleanup problem

Posted by "Michael Dick (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/OPENJPA-599?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Michael Dick updated OPENJPA-599:
---------------------------------

    Fix Version/s:     (was: 1.2.0)
                   1.3.0
                   1.2.1

Moving to next release

> Postgres table cleanup problem
> ------------------------------
>
>                 Key: OPENJPA-599
>                 URL: https://issues.apache.org/jira/browse/OPENJPA-599
>             Project: OpenJPA
>          Issue Type: Bug
>    Affects Versions: 1.1.0
>            Reporter: Ignacio Andreu
>            Assignee: Ignacio Andreu
>             Fix For: 1.2.1, 1.3.0
>
>
> In the Stream support OpenJPA uses a system table (pg_largepbject) at the end of the test cases OpenJPA doesn't delete the records generated by the test.
> The delete operation isn't trivial, because other programs in other databases can use this table, we've to delete only the records that we've inserted.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (OPENJPA-599) Postgres table cleanup problem

Posted by "Patrick Linskey (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/OPENJPA-599?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Patrick Linskey updated OPENJPA-599:
------------------------------------

        Fix Version/s:     (was: 1.1.0)
                       1.2.0
             Assignee: Ignacio Andreu
    Affects Version/s: 1.1.0

> Postgres table cleanup problem
> ------------------------------
>
>                 Key: OPENJPA-599
>                 URL: https://issues.apache.org/jira/browse/OPENJPA-599
>             Project: OpenJPA
>          Issue Type: Bug
>    Affects Versions: 1.1.0
>            Reporter: Ignacio Andreu
>            Assignee: Ignacio Andreu
>             Fix For: 1.2.0
>
>
> In the Stream support OpenJPA uses a system table (pg_largepbject) at the end of the test cases OpenJPA doesn't delete the records generated by the test.
> The delete operation isn't trivial, because other programs in other databases can use this table, we've to delete only the records that we've inserted.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (OPENJPA-599) Postgres table cleanup problem

Posted by "Ignacio Andreu (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/OPENJPA-599?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Ignacio Andreu updated OPENJPA-599:
-----------------------------------

    Attachment: OPENJPA-599.patch

This patch cleans the table pg_largeobject at the beginning of each test case. I also refactored some methods in PostgresDictionary to avoid duplicated code in the streams support.

Please review and if no issues, commit for 1.2.X



> Postgres table cleanup problem
> ------------------------------
>
>                 Key: OPENJPA-599
>                 URL: https://issues.apache.org/jira/browse/OPENJPA-599
>             Project: OpenJPA
>          Issue Type: Bug
>    Affects Versions: 1.1.0
>            Reporter: Ignacio Andreu
>            Assignee: Ignacio Andreu
>             Fix For: 1.2.1, 1.3.0
>
>         Attachments: OPENJPA-599.patch
>
>
> In the Stream support OpenJPA uses a system table (pg_largepbject) at the end of the test cases OpenJPA doesn't delete the records generated by the test.
> The delete operation isn't trivial, because other programs in other databases can use this table, we've to delete only the records that we've inserted.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (OPENJPA-599) Postgres table cleanup problem

Posted by "Ignacio Andreu (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/OPENJPA-599?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12646724#action_12646724 ] 

Ignacio Andreu commented on OPENJPA-599:
----------------------------------------

Kevin,

Thnaks for your feedback and sorry for the delay in my response, I have been really busy.

I'm agree with your comments, I will refactore the code and send a new patch as soon as possible, probably before the end of the week.

Thanks,

Ignacio

> Postgres table cleanup problem
> ------------------------------
>
>                 Key: OPENJPA-599
>                 URL: https://issues.apache.org/jira/browse/OPENJPA-599
>             Project: OpenJPA
>          Issue Type: Bug
>    Affects Versions: 1.1.0
>            Reporter: Ignacio Andreu
>            Assignee: Ignacio Andreu
>         Attachments: OPENJPA-599.patch
>
>
> In the Stream support OpenJPA uses a system table (pg_largepbject) at the end of the test cases OpenJPA doesn't delete the records generated by the test.
> The delete operation isn't trivial, because other programs in other databases can use this table, we've to delete only the records that we've inserted.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (OPENJPA-599) Postgres table cleanup problem

Posted by "Kevin Sutter (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/OPENJPA-599?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12635528#action_12635528 ] 

Kevin Sutter commented on OPENJPA-599:
--------------------------------------

Ignacio,
Thanks for taking the time to provide a patch for this issue.  I reviewed your proposed patch for this issue.  Although I know very little about the Postgres database, I have a few comments on the patch (no particular order).

o  I hesitate to make updates to the DBDictionary method signatures.  If anybody else has extended our DBDictionary support, then they would immediately be broken when moving to whatever release contains this change (if they have extended the implementation of this particular method).  Instead, I prefer adding a new method with the new parameter(s) and having the old method calling the new method with null'd out parameters.

o  I also hesitate to introduce new code in the Postgres dictionary that is exactly like the code in DBDictionary, except for one minor change.  If the logic in DBDictionary changes for whatever reason, the corresponding methods in the other dictionaries may or may not be noticed.  Could the change be re-factored to allow the majority of the logic in DBDictionary to be used, except for the special case code needed for Postgres?  What about introducing a new protected method in DBDictionary that would have an empty implementation in DBDictionary, but could be overridden in the Postgres Dictionary?  Or, something to that effect.

o  FYI, if we do re-factor the method signatures, I would always add the new parameters to the end of the existing parameter list.  This allows for the mechanism I outlined in the first bullet with nulling out the "missing" parameters.  Not sure, but this additional parameter method mechanism may also help with not rippling a change through out the code base.

o  The issue mentions that this patch should be committed to 1.2.x, but now that trunk is 1.3.0, I would assume that's where you would like the change to go.

o  If you could take a look at doing this re-factoring to limit the potential exposure to other dictionaries and other users, then we can probably go ahead with the contribution.  Or, convince me that this re-factoring is not necessary...  :-)

Thanks,
Kevin


> Postgres table cleanup problem
> ------------------------------
>
>                 Key: OPENJPA-599
>                 URL: https://issues.apache.org/jira/browse/OPENJPA-599
>             Project: OpenJPA
>          Issue Type: Bug
>    Affects Versions: 1.1.0
>            Reporter: Ignacio Andreu
>            Assignee: Ignacio Andreu
>         Attachments: OPENJPA-599.patch
>
>
> In the Stream support OpenJPA uses a system table (pg_largepbject) at the end of the test cases OpenJPA doesn't delete the records generated by the test.
> The delete operation isn't trivial, because other programs in other databases can use this table, we've to delete only the records that we've inserted.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.