Обсуждение: Transaction size limit & Data Truncation

Поиск
Список
Период
Сортировка

Transaction size limit & Data Truncation

От
Alexaki Sofia
Дата:
Hello,

I use the PostgreSQL 7.0.2 JDBC Driver.

I can see that very long transaction are not supported. Is there any
limit in the transaction size?

My second querstion is about data truncation. As I can see postgresql
JDBC driver doesn't report a DataTruncation warning when  a data
value is truncated. Is there any other way to detect data truncation?

Thanks in advance for your help.

Best Regards,
Sofia Alexaki


Re: Transaction size limit & Data Truncation

От
Barry Lind
Дата:
Alexaki,

I am unsure what you mean by very long transaction.  A transaction is
defined by issueing a 'begin' statement, followed sometime later by a
'commit' or 'rollback'.  Therefore a long transcation would imply a long
period of time between the begin and the commit or rollback.  There is
no limit that I am aware of on the length in time for a transaction.

My guess is that you mean by 'long transaction' is really 'long
statement'.  In postgres versions prior to 7.0 the server had an 8k
limit on statement/query length.  That was removed in 7.0, however the
7.0 jdbc driver still had the limit.  I believe the 7.0.3 jdbc driver
finally removed the 8K statement length limit and it is certainly
removed in the 7.1 driver.

On your second questions, what sort of data truncation are you talking
about?  Could you provide an example?

thanks,
--Barry



Alexaki Sofia wrote:
> Hello,
>
> I use the PostgreSQL 7.0.2 JDBC Driver.
>
> I can see that very long transaction are not supported. Is there any
> limit in the transaction size?
>
> My second querstion is about data truncation. As I can see postgresql
> JDBC driver doesn't report a DataTruncation warning when  a data
> value is truncated. Is there any other way to detect data truncation?
>
> Thanks in advance for your help.
>
> Best Regards,
> Sofia Alexaki
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 2: you can get off all lists at once with the unregister command
>     (send "unregister YourEmailAddressHere" to majordomo@postgresql.org)
>
>



Re: Transaction size limit & Data Truncation

От
Alexaki Sofia
Дата:
Thanks for your reply.

As far as transaction is concerned, my question was if there is any limit
to the number of statements (select/insert/update) that can be
in one single transaction.
Is is possible postgresql buffer size influence transaction
limit?
I had a transaction with thousands of statements that I neeeded
to split it into a number smaller transaction in order to be able to
store it.

>I am unsure what you mean by very long transaction.  A transaction is
>defined by issueing a 'begin' statement, followed sometime later by a
>'commit' or 'rollback'.  Therefore a long transcation would imply a long
>period of time between the begin and the commit or rollback.  There is
>no limit that I am aware of on the length in time for a transaction.

>n your second questions, what sort of data truncation are you talking
>about?  Could you provide an example?

Let's say that I have a field in a table having tha type VARCHAR(100)
And I store to this field a value having 200 characters. Only the
first 100 characters of the value will be stored.
I think that in this case according to JDBC, a Data Truncation warning
should be  reported.

Alexaki Sofia wrote:
> Hello,
>
> I use the PostgreSQL 7.0.2 JDBC Driver.
>
> I can see that very long transaction are not supported. Is there any
> limit in the transaction size?
>
> My second querstion is about data truncation. As I can see postgresql
> JDBC driver doesn't report a DataTruncation warning when  a data
> value is truncated. Is there any other way to detect data truncation?
>
> Thanks in advance for your help.


Re: Transaction size limit & Data Truncation

От
Rene Pijlman
Дата:
You wrote:
>> I can see that very long transaction are not supported.

Where or how did you see that?

>As far as transaction is concerned, my question was if there is any limit
>to the number of statements (select/insert/update) that can be
>in one single transaction.
>Is is possible postgresql buffer size influence transaction
>limit?
>I had a transaction with thousands of statements that I neeeded
>to split it into a number smaller transaction in order to be able to
>store it.

What does that mean exactly? What went wrong with the original
long transaction?

Was it an executeBatch() with a lot of statements, or a lot of
individual statements? What version of the PostgreSQL driver and
backend are you running?

>Let's say that I have a field in a table having tha type VARCHAR(100)
>And I store to this field a value having 200 characters. Only the
>first 100 characters of the value will be stored.
>I think that in this case according to JDBC, a Data Truncation warning
>should be  reported.

Our driver does not yet support DataTruncation warnings. That's
documented on http://lab.applinet.nl/postgresql-jdbc/

Regards,
René Pijlman <rene@lab.applinet.nl>