------=_Part_4983_14166436.1210650414651
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
If I can't find an answer in the next day or so I'll crack open OpenJPA
and
disable that check. Its a very simple, if ugly, hack.
--Nik
On 5/12/08, Neil Peter Braggio <pbraggio@[EMAIL PROTECTED]
> wrote:
>
> I have the same problem in PG 8.2
>
> To resolve this issue I had to create a new table with the same
> structure than the partitioned table with a trigger for insert and
> update. All the operations the application have to do are directed to
> this new table.
>
> When a new record is inserted in the new table the trigger insert a
> new record with the same values into the partitioned table and then
> delete all records from this new table. In updates operations the
> trigger redirect the operation to the partitioned table too.
>
> With this _not elegant_ solution our Java application is able to do its
> job.
>
> If you find a better solution please let me know.
>
> ----
> Neil Peter Braggio
> pbraggio@[EMAIL PROTECTED]
>
>
> On Tue, May 13, 2008 at 11:48 AM, Nikolas Everett <nik9000@[EMAIL PROTECTED]
>
> wrote:
> > I figure this subject belongs on the performance mailing list because
it
> is
> > about partitioning, which is a performance issue.
> >
> > I'm working on partitioning some of the tables used by an application
> that
> > uses OpenJPA. It turns out that OpenJPA is sensitive to the numbers
> > returned when you do an insert. So I put together a test and attached
> it.
> > My postgres version is 8.3.1 compiled from source.
> >
> > My problem is that this:
> > test=> INSERT INTO ttt (a, b) VALUES ('5-5-08', 'test11212');
> > INSERT 0 0
> > Time: 21.646 ms
> > needs to show:
> > INSERT 0 1
> >
> > or OpenJPA will not accept it. The insert works, but OpenJPA does not
> > believe it and aborts the current transaction.
> >
> > Is it possible to have partitioning and have insert show the right
> number of
> > rows inserted?
> >
> > Thanks,
> >
> > --Nik
> >
> >
> > --
> > Sent via pgsql-performance mailing list (
> pgsql-performance@[EMAIL PROTECTED]
)
> > To make changes to your subscription:
> > http://www.postgresql.org/mailpref/pgsql-performance
> >
> >
>
> --
> Sent via pgsql-performance mailing list
(pgsql-performance@[EMAIL PROTECTED]
)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-performance
>
------=_Part_4983_14166436.1210650414651
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
<div>If I can't find an answer in the next day or so I'll crack
open OpenJPA and disable that check. Its a very simple, if ugly,
hack.</div>
<div> </div>
<div>--Nik<br><br> </div>
<div><span class="gmail_quote">On 5/12/08, <b
class="gmail_sendername">Neil Peter Braggio</b> <<a
href="mailto:pbraggio@[EMAIL PROTECTED]
">pbraggio@[EMAIL PROTECTED]
>> wrote:</span>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px
0px 0.8ex; BORDER-LEFT: #ccc 1px solid">I have the same problem in PG
8.2<br><br>To resolve this issue I had to create a new table with the
same<br>
structure than the partitioned table with a trigger for insert
and<br>update. All the operations the application have to do are directed
to<br>this new table.<br><br>When a new record is inserted in the new
table the trigger insert a<br>
new record with the same values into the partitioned table and
then<br>delete all records from this new table. In updates operations
the<br>trigger redirect the operation to the partitioned table
too.<br><br>With this _not elegant_ solution our Java application is able
to do its job.<br>
<br>If you find a better solution please let me know.<br><br>----<br>Neil
Peter Braggio<br><a
href="mailto:pbraggio@[EMAIL PROTECTED]
">pbraggio@[EMAIL PROTECTED]
><br><br><br>On Tue,
May 13, 2008 at 11:48 AM, Nikolas Everett <<a
href="mailto:nik9000@[EMAIL PROTECTED]
">nik9000@[EMAIL PROTECTED]
>> wrote:<br>
> I figure this subject belongs on the performance mailing list because
it is<br>> about partitioning, which is a performance
issue.<br>><br>> I'm working on partitioning some of the tables
used by an application that<br>
> uses OpenJPA. It turns out that OpenJPA is sensitive to
the numbers<br>> returned when you do an insert. So I put
together a test and attached it.<br>> My postgres version is 8.3.1
compiled from source.<br>><br>
> My problem is that this:<br>> test=> INSERT INTO ttt (a, b)
VALUES ('5-5-08', 'test11212');<br>> INSERT 0 0<br>>
Time: 21.646 ms<br>> needs to show:<br>> INSERT 0 1<br>><br>>
or OpenJPA will not accept it. The insert works, but OpenJPA
does not<br>
> believe it and aborts the current transaction.<br>><br>> Is it
possible to have partitioning and have insert show the right number
of<br>> rows inserted?<br>><br>> Thanks,<br>><br>>
--Nik<br>><br>
><br>> --<br>> Sent via pgsql-performance
mailing list (<a
href="mailto:pgsql-performance@[EMAIL PROTECTED]
">pgsql-performance@[EMAIL PROTECTED]
>)<br>> To
make changes to your subscription:<br>> <a
href="http://www.postgresql.org/mailpref/pgsql-performance">http://www.postgresql.org/mailpref/pgsql-performance</a><br>
><br>><br><br>--<br>Sent via pgsql-performance mailing list (<a
href="mailto:pgsql-performance@[EMAIL PROTECTED]
">pgsql-performance@[EMAIL PROTECTED]
>)<br>To
make changes to your subscription:<br><a
href="http://www.postgresql.org/mailpref/pgsql-performance">http://www.postgresql.org/mailpref/pgsql-performance</a><br>
</blockquote></div><br>
------=_Part_4983_14166436.1210650414651--


|