Обсуждение: BUG #9749: ERROR: unexpected classid 3600

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

BUG #9749: ERROR: unexpected classid 3600

От
clime7@gmail.com
Дата:
The following bug has been logged on the website:

Bug reference:      9749
Logged by:          clime
Email address:      clime7@gmail.com
PostgreSQL version: 9.2.4
Operating system:   linux
Description:

I am getting this error when trying to execute "reassign owned" command.

cb_test=# reassign owned by clime to cb_test;
ERROR:  unexpected classid 3600
cb_test=# select '3600'::regclass;
  regclass
------------
 pg_ts_dict
(1 row)

Re: BUG #9749: ERROR: unexpected classid 3600

От
Alvaro Herrera
Дата:
clime7@gmail.com wrote:

> I am getting this error when trying to execute "reassign owned" command.
>
> cb_test=# reassign owned by clime to cb_test;
> ERROR:  unexpected classid 3600
> cb_test=# select '3600'::regclass;
>   regclass
> ------------
>  pg_ts_dict

Hmm, The code is clearly missing handling that case, as well as all text
search objects types.  Will fix, thanks for the report!

--
Álvaro Herrera                http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services

Re: BUG #9749: ERROR: unexpected classid 3600

От
Alvaro Herrera
Дата:
Alvaro Herrera wrote:
> clime7@gmail.com wrote:
>
> > I am getting this error when trying to execute "reassign owned" command.
> >
> > cb_test=# reassign owned by clime to cb_test;
> > ERROR:  unexpected classid 3600
> > cb_test=# select '3600'::regclass;
> >   regclass
> > ------------
> >  pg_ts_dict
>
> Hmm, The code is clearly missing handling that case, as well as all text
> search objects types.  Will fix, thanks for the report!

Oops, I just noticed that the fix is very simple in HEAD and 9.3 because
we can just add the appropriate case labels to the already existing
generic object alter-owner case.  But in 9.2, we not only need to add
extra cases to cover each object, but we also need to refactor
the appropriate AlterOwner routine to work on OID input rather than name
only.  In other words we need the equivalent of
0c7b9dc7d037c4465227dc2300ff48019feeba37 for each of the text search
object types :-(

Not sure I have the time to do all that right now.  Contributions
welcome.

--
Álvaro Herrera                http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services

Re: BUG #9749: ERROR: unexpected classid 3600

От
Tom Lane
Дата:
Alvaro Herrera <alvherre@2ndquadrant.com> writes:
> Oops, I just noticed that the fix is very simple in HEAD and 9.3 because
> we can just add the appropriate case labels to the already existing
> generic object alter-owner case.  But in 9.2, we not only need to add
> extra cases to cover each object, but we also need to refactor
> the appropriate AlterOwner routine to work on OID input rather than name
> only.  In other words we need the equivalent of
> 0c7b9dc7d037c4465227dc2300ff48019feeba37 for each of the text search
> object types :-(

> Not sure I have the time to do all that right now.  Contributions
> welcome.

Given the lack of complaints to date, maybe fixing it in 9.3/HEAD is
sufficient.  I'd certainly rather see those branches get fixed now,
and 9.2 later, than nothing happen at all for a long time.  It's also
arguable that back-patching such a large change into 9.2 is more risk
than the problem is worth.

            regards, tom lane

Re: BUG #9749: ERROR: unexpected classid 3600

От
Alvaro Herrera
Дата:
Tom Lane wrote:
> Alvaro Herrera <alvherre@2ndquadrant.com> writes:
> > Oops, I just noticed that the fix is very simple in HEAD and 9.3 because
> > we can just add the appropriate case labels to the already existing
> > generic object alter-owner case.  But in 9.2, we not only need to add
> > extra cases to cover each object, but we also need to refactor
> > the appropriate AlterOwner routine to work on OID input rather than name
> > only.  In other words we need the equivalent of
> > 0c7b9dc7d037c4465227dc2300ff48019feeba37 for each of the text search
> > object types :-(
>
> > Not sure I have the time to do all that right now.  Contributions
> > welcome.
>
> Given the lack of complaints to date, maybe fixing it in 9.3/HEAD is
> sufficient.  I'd certainly rather see those branches get fixed now,
> and 9.2 later, than nothing happen at all for a long time.  It's also
> arguable that back-patching such a large change into 9.2 is more risk
> than the problem is worth.

Patching 9.3 and up only was my first thought, but I then noticed that
the reporter is using 9.2.

I'm not opposed to doing 9.3 right now and older branches later, except
that I'm afraid it'd fall by the wayside and we'd never do it.

--
Álvaro Herrera                http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services

Re: BUG #9749: ERROR: unexpected classid 3600

От
Alvaro Herrera
Дата:
Tom Lane wrote:
> Alvaro Herrera <alvherre@2ndquadrant.com> writes:
> > Oops, I just noticed that the fix is very simple in HEAD and 9.3 because
> > we can just add the appropriate case labels to the already existing
> > generic object alter-owner case.  But in 9.2, we not only need to add
> > extra cases to cover each object, but we also need to refactor
> > the appropriate AlterOwner routine to work on OID input rather than name
> > only.  In other words we need the equivalent of
> > 0c7b9dc7d037c4465227dc2300ff48019feeba37 for each of the text search
> > object types :-(
>
> > Not sure I have the time to do all that right now.  Contributions
> > welcome.
>
> Given the lack of complaints to date, maybe fixing it in 9.3/HEAD is
> sufficient.  I'd certainly rather see those branches get fixed now,
> and 9.2 later, than nothing happen at all for a long time.  It's also
> arguable that back-patching such a large change into 9.2 is more risk
> than the problem is worth.

Just pushed a fix for all branches.

--
Álvaro Herrera                http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services