Thread: BUG #11528: Max Index Keys

BUG #11528: Max Index Keys

From
pdasari@mdsol.com
Date:
The following bug has been logged on the website:

Bug reference:      11528
Logged by:          Paul Dasari
Email address:      pdasari@mdsol.com
PostgreSQL version: 9.3.4
Operating system:   Windows 2008 server
Description:

We are using Amazon Redshift postgreSQL. no matter what jar file we use it
gives the following error message.

Upon browsing, found that the source code is reading the max_index_keys
should be greater than 0. However the redshift database does not require
indexing. I really appreciate your assistance if there is any specific jar
to use to avoid using the max_index_keys function while executing the query

Below is the error we encountered:

Unable to determine a value for MaxIndexKeys due to missing system catalog
data

Thanks
Paul

Re: BUG #11528: Max Index Keys

From
John R Pierce
Date:
On 9/30/2014 11:44 AM, pdasari@mdsol.com wrote:
> We are using Amazon Redshift postgreSQL. no matter what jar file we use it
> gives the following error message.

jar file?     what is this jar file?    Do you mean JDBC ?   The
PostgreSQL JDBC driver is its own project, has its own mailling lists.
The bug report form you used is for the core database server, which has
no Java components.

> Upon browsing, found that the source code is reading the max_index_keys
> should be greater than 0. However the redshift database does not require
> indexing. I really appreciate your assistance if there is any specific jar
> to use to avoid using the max_index_keys function while executing the query
>
> Below is the error we encountered:
>
> Unable to determine a value for MaxIndexKeys due to missing system catalog
> data

While PostgreSQL doesn't require indexes, its standard practice in
relational databases to always define a primary key for every table.
I'm not sure why JDBC would be enforcing this.



--
john r pierce                                      37N 122W
somewhere on the middle of the left coast

Re: BUG #11528: Max Index Keys

From
John R Pierce
Date:
On 9/30/2014 12:16 PM, Paul Dasari wrote:
> Thanks much  for your response. Yes I am using the JDBC Jar file from
> supplied from
> http://jdbc.postgresql.org/download/postgresql-8.4-703.jdbc4.jar
>

you actually should be using
http://jdbc.postgresql.org/download/postgresql-9.3-1102.jdbc4.jar which
as the home page says, supports all versions of postgres newer than 7.2,
and JDK 1.6

> Could you please help me provide a link so that i can post my question
> to the required support group.

http://jdbc.postgresql.org/community/mailinglist.html



--
john r pierce                                      37N 122W
somewhere on the middle of the left coast

Re: BUG #11528: Max Index Keys

From
John R Pierce
Date:
On 9/30/2014 12:26 PM, Paul Dasari wrote:
> Thanks for the inputs with the mailing list.
> No matter which version i use the error exists.
> I don't know, it seems like a bug!
>

afaik, JDBC itself doesn't do this test, so what software are you
running in Java thats using JDBC ?     Many Database GUI packages insist
on primary keys, otherwise they can't reliably identify the row to
delete or update in a 'data grid' style edit.



--
john r pierce                                      37N 122W
somewhere on the middle of the left coast

Re: BUG #11528: Max Index Keys

From
John R Pierce
Date:
On 9/30/2014 12:55 PM, Paul Dasari wrote:
> Ok. I am using SAP Business Objects - Information Design Tool.
>
> Not sure if you have already knew about this page, however after
> looking at this page i feel like a bug, because when i use the same
> JAR that came out of this it perfectly worked fine
>
> http://www.garrettpatterson.com/2013/08/13/connect-pentahomondrian-schema-workbench-to-amazon-redshift/
>
> But would be good if it is coming directly from postgresql.
>

if its a Redshift specific bug, which that seems to imply, then you'll
need to take that up with Amazon, as Redshift is a fork of a rather old
and no longer supported version of PostgreSQL

this discussion really does belong over on the JDBC list.


--
john r pierce                                      37N 122W
somewhere on the middle of the left coast

Re: BUG #11528: Max Index Keys

From
Paul Dasari
Date:
Hi John,

Thanks much  for your response. Yes I am using the JDBC Jar file from
supplied from
http://jdbc.postgresql.org/download/postgresql-8.4-703.jdbc4.jar

Could you please help me provide a link so that i can post my question to
the required support group.

Thanks
Paul



On Tue, Sep 30, 2014 at 3:10 PM, John R Pierce <pierce@hogranch.com> wrote:

> On 9/30/2014 11:44 AM, pdasari@mdsol.com wrote:
>
>> We are using Amazon Redshift postgreSQL. no matter what jar file we use it
>> gives the following error message.
>>
>
> jar file?     what is this jar file?    Do you mean JDBC ?   The
> PostgreSQL JDBC driver is its own project, has its own mailling lists.
>  The bug report form you used is for the core database server, which has no
> Java components.
>
>  Upon browsing, found that the source code is reading the max_index_keys
>> should be greater than 0. However the redshift database does not require
>> indexing. I really appreciate your assistance if there is any specific jar
>> to use to avoid using the max_index_keys function while executing the
>> query
>>
>> Below is the error we encountered:
>>
>> Unable to determine a value for MaxIndexKeys due to missing system catalog
>> data
>>
>
> While PostgreSQL doesn't require indexes, its standard practice in
> relational databases to always define a primary key for every table.
>  I'm not sure why JDBC would be enforcing this.
>
>
>
> --
> john r pierce                                      37N 122W
> somewhere on the middle of the left coast
>
>

Re: BUG #11528: Max Index Keys

From
Paul Dasari
Date:
Ok. I am using SAP Business Objects - Information Design Tool.

Not sure if you have already knew about this page, however after looking at
this page i feel like a bug, because when i use the same JAR that came out
of this it perfectly worked fine

http://www.garrettpatterson.com/2013/08/13/connect-pentahomondrian-schema-workbench-to-amazon-redshift/

But would be good if it is coming directly from postgresql.

Thanks
Paul

On Tue, Sep 30, 2014 at 3:34 PM, John R Pierce <pierce@hogranch.com> wrote:

>  On 9/30/2014 12:26 PM, Paul Dasari wrote:
>
> Thanks for the inputs with the mailing list.
> No matter which version i use the error exists.
> I don't know, it seems like a bug!
>
>
> afaik, JDBC itself doesn't do this test, so what software are you running
> in Java thats using JDBC ?     Many Database GUI packages insist on primary
> keys, otherwise they can't reliably identify the row to delete or update in
> a 'data grid' style edit.
>
>
>
> --
> john r pierce                                      37N 122W
> somewhere on the middle of the left coast
>
>

Re: BUG #11528: Max Index Keys

From
Paul Dasari
Date:
Thanks for the inputs with the mailing list.
No matter which version i use the error exists.
I don't know, it seems like a bug!

Thanks
Paul

On Tue, Sep 30, 2014 at 3:20 PM, John R Pierce <pierce@hogranch.com> wrote:

>  On 9/30/2014 12:16 PM, Paul Dasari wrote:
>
> Thanks much  for your response. Yes I am using the JDBC Jar file from
> supplied from
> http://jdbc.postgresql.org/download/postgresql-8.4-703.jdbc4.jar
>
>
> you actually should be using
> http://jdbc.postgresql.org/download/postgresql-9.3-1102.jdbc4.jar
> which as the home page says, supports all versions of postgres newer than
> 7.2, and JDK 1.6
>
>  Could you please help me provide a link so that i can post my question
> to the required support group.
>
>
> http://jdbc.postgresql.org/community/mailinglist.html
>
>
>
> --
> john r pierce                                      37N 122W
> somewhere on the middle of the left coast
>
>

Re: BUG #11528: Max Index Keys

From
Tom Lane
Date:
John R Pierce <pierce@hogranch.com> writes:
> if its a Redshift specific bug, which that seems to imply, then you'll
> need to take that up with Amazon, as Redshift is a fork of a rather old
> and no longer supported version of PostgreSQL

max_index_keys is a GUC variable that reflects a server build
parameter, namely the maximum number of columns allowed in an index.
I am guessing that the JDBC driver is trying to read that variable
and it's not working because Redshift is descended from a PG version
that predates whenever we added that GUC.  (Which was a long time
ago :-(.)  I have no idea *why* the JDBC driver would need to know that.

You really need to ask about this on the pgsql-jdbc mailing list,
not here.  There may not be a good solution other than using an ancient
JDBC driver with Redshift ... but the people who would know read that
list.

            regards, tom lane

Re: BUG #11528: Max Index Keys

From
Paul Dasari
Date:
Sure. Thanks Tom and John!
On Sep 30, 2014 4:44 PM, "Tom Lane" <tgl@sss.pgh.pa.us> wrote:

> John R Pierce <pierce@hogranch.com> writes:
> > if its a Redshift specific bug, which that seems to imply, then you'll
> > need to take that up with Amazon, as Redshift is a fork of a rather old
> > and no longer supported version of PostgreSQL
>
> max_index_keys is a GUC variable that reflects a server build
> parameter, namely the maximum number of columns allowed in an index.
> I am guessing that the JDBC driver is trying to read that variable
> and it's not working because Redshift is descended from a PG version
> that predates whenever we added that GUC.  (Which was a long time
> ago :-(.)  I have no idea *why* the JDBC driver would need to know that.
>
> You really need to ask about this on the pgsql-jdbc mailing list,
> not here.  There may not be a good solution other than using an ancient
> JDBC driver with Redshift ... but the people who would know read that
> list.
>
>                         regards, tom lane
>