ERROR: volatile EquivalenceClass has no sortref

Started by Ranjeet Dhumalabout 13 years ago9 messages
#1Ranjeet Dhumal
jeetu.dhumal@gmail.com

Hi All ,

When am trying to query a table temp_table1(sms_type varchar(20),sms_info
varchar(100),sms_id integer)
Query :: select sms_type,count(*) from temp_table1 group by 1 order by 2
desc;
Then i got following errors , i dont know whats wrong in this .
*ERROR: volatile EquivalenceClass has no sortref*

This is my first post to forum , Please suggest me if i miss something .

--
--Regards
Ranjeet R. Dhumal

#2Ranjeet Dhumal
jeetu.dhumal@gmail.com
In reply to: Ranjeet Dhumal (#1)
Fwd: ERROR: volatile EquivalenceClass has no sortref

Hi All ,

When am trying to query a table temp_table1(sms_type varchar(20),sms_info
varchar(100),sms_id integer)
Query :: select sms_type,count(*) from temp_table1 group by 1 order by 2
desc;
Then i got following errors , i dont know whats wrong in this .
*ERROR: volatile EquivalenceClass has no sortref*

--
--Regards
Ranjeet R. Dhumal

#3Albe Laurenz
laurenz.albe@wien.gv.at
In reply to: Ranjeet Dhumal (#1)
Re: ERROR: volatile EquivalenceClass has no sortref

Ranjeet Dhumal wrote:

When am trying to query a table temp_table1(sms_type

varchar(20),sms_info varchar(100),sms_id integer)

Query :: select sms_type,count(*) from temp_table1 group by 1 order

by 2 desc;

Then i got following errors , i dont know whats wrong in this .
ERROR: volatile EquivalenceClass has no sortref

This is my first post to forum , Please suggest me if i miss something

.

Do you get this error regardless of what is
in the table? I tried on 9.2 with an empty table
and with one with a few random values and got no
error.

It would be helpful to know which PostgreSQL version
you have.
Can you construct a reproducible test case?

Yours,
Laurenz Albe

#4Ranjeet Dhumal
jeetu.dhumal@gmail.com
In reply to: Albe Laurenz (#3)
Re: ERROR: volatile EquivalenceClass has no sortref

Hi Laurenz ,

I got this error on two different tables , first one is empty and second
one has near about 60k records , am using 9.0.1 version of postgres.
And when i dropped that both table and recreated with same data and
structure query ran successfully , am not able to understand how this is
happening suddenly because for same table and everything is working fine
without error .

On 21 November 2012 18:14, Albe Laurenz <laurenz.albe@wien.gv.at> wrote:

Ranjeet Dhumal wrote:

When am trying to query a table temp_table1(sms_type

varchar(20),sms_info varchar(100),sms_id integer)

Query :: select sms_type,count(*) from temp_table1 group by 1 order

by 2 desc;

Then i got following errors , i dont know whats wrong in this .
ERROR: volatile EquivalenceClass has no sortref

This is my first post to forum , Please suggest me if i miss something

.

Do you get this error regardless of what is
in the table? I tried on 9.2 with an empty table
and with one with a few random values and got no
error.

It would be helpful to know which PostgreSQL version
you have.
Can you construct a reproducible test case?

Yours,
Laurenz Albe

--
--Regards
Ranjeet R. Dhumal

#5Albe Laurenz
laurenz.albe@wien.gv.at
In reply to: Ranjeet Dhumal (#4)
Re: ERROR: volatile EquivalenceClass has no sortref

Ranjeet Dhumal wrote:

I got this error on two different tables , first one is empty and

second one has near about 60k

records , am using 9.0.1 version of postgres.
And when i dropped that both table and recreated with same data and

structure query ran successfully

, am not able to understand how this is happening suddenly because for

same table and everything is

working fine without error .

Try to find out under what condition the problem occurs.
A reproducible test case would be most helpful.

Yours,
Laurenz Albe

#6Alban Hertroys
haramrae@gmail.com
In reply to: Albe Laurenz (#5)
Re: ERROR: volatile EquivalenceClass has no sortref

Ranjeet Dhumal wrote:

records , am using 9.0.1 version of postgres.

This is quite possibly your problem: You're 9 bugfix releases behind
on a .0 release. You should be at 9.0.10 at least.

--
If you can't see the forest for the trees,
Cut the trees and you'll see there is no forest.

#7Tom Lane
tgl@sss.pgh.pa.us
In reply to: Alban Hertroys (#6)
Re: ERROR: volatile EquivalenceClass has no sortref

Alban Hertroys <haramrae@gmail.com> writes:

Ranjeet Dhumal wrote:

records , am using 9.0.1 version of postgres.

This is quite possibly your problem: You're 9 bugfix releases behind
on a .0 release. You should be at 9.0.10 at least.

Yes. I seem to recall fixing a bug with exactly this symptom.
Please update first, then if the problem is still there you can work
on producing a self-contained test case.

regards, tom lane

#8Ranjeet Dhumal
jeetu.dhumal@gmail.com
In reply to: Tom Lane (#7)
Re: ERROR: volatile EquivalenceClass has no sortref

Hi Tom ,

Sorry but i didn't understand that If this is a bug from postgres version
then how the same query will be worked if i recreated the tables and with
same version of postgres.

On 21 November 2012 19:53, Tom Lane <tgl@sss.pgh.pa.us> wrote:

Alban Hertroys <haramrae@gmail.com> writes:

Ranjeet Dhumal wrote:

records , am using 9.0.1 version of postgres.

This is quite possibly your problem: You're 9 bugfix releases behind
on a .0 release. You should be at 9.0.10 at least.

Yes. I seem to recall fixing a bug with exactly this symptom.
Please update first, then if the problem is still there you can work
on producing a self-contained test case.

regards, tom lane

--
--Regards
Ranjeet R. Dhumal

#9Pavan Deolasee
pavan.deolasee@gmail.com
In reply to: Ranjeet Dhumal (#8)
Re: ERROR: volatile EquivalenceClass has no sortref

On Thu, Nov 22, 2012 at 11:08 AM, Ranjeet Dhumal <jeetu.dhumal@gmail.com>wrote:

Hi Tom ,

Sorry but i didn't understand that If this is a bug from postgres version
then how the same query will be worked if i recreated the tables and with
same version of postgres.

This could be related to the plans that are chosen by the optimizer and
this specific error might be coming only when a certain plan is chosen.
When you recreated the table, the planner may have chosen a different plan
because the stats were different, and hence you did not see the issue
again. If you can reproduce the problem, it will be a good idea to run
EXPLAIN to see the query plan.

Thanks,
Pavan