Re: Problem with multiple comments

From: Magnus Hagander <magnus(at)hagander(dot)net>
To: Per Wigren <per(dot)wigren(at)gmail(dot)com>
Cc: Dave Page <dpage(at)pgadmin(dot)org>, pgAdmin Support <pgadmin-support(at)postgresql(dot)org>
Subject: Re: Problem with multiple comments
Date: 2012-12-06 11:48:56
Message-ID: CABUevEyjvwUAPVmxmcKFVDH0u97OhsNaiw21Mm8FY4G7QzOguA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgadmin-support

Certainly sounds like a very similar problem. If so, the query is
simply buggy - it's just that a pg_upgrade'd environment is *much*
more likely to run into the problem than before.

I only checked the usages of pg_shdescription. The same bug might well
exist with almost all uses of pg_description.

//Magnus

On Thu, Dec 6, 2012 at 12:13 PM, Per Wigren <per(dot)wigren(at)gmail(dot)com> wrote:
> ok, then the same issue occurs with functions as well because there are the
> same kind of duplicates in the list of functions.
>
>
> 2012/12/6 Dave Page <dpage(at)pgadmin(dot)org>
>>
>> On Thu, Dec 6, 2012 at 11:03 AM, Per Wigren <per(dot)wigren(at)gmail(dot)com> wrote:
>> > Yes, I have actually run pg_upgrade on it... Where can I find details
>> > about
>> > this bug?
>>
>> The CHANGELOG just says:
>>
>> 2012-11-26 MH 1.16.1 Fix query for database descriptions
>>
>> So I guess the same issue occurs with schemas. I believe it occurs
>> because pg_upgrade can cause OIDs to be reused in ways not previously
>> seen.
>>
>> > The same thing happens with 1.16.1.
>>
>> I'll look into it.
>>
>> >
>> > 2012/12/6 Dave Page <dpage(at)pgadmin(dot)org>
>> >>
>> >> On Thu, Dec 6, 2012 at 10:47 AM, Per Wigren <per(dot)wigren(at)gmail(dot)com>
>> >> wrote:
>> >> > I mailed you the screenshots.
>> >> >
>> >> > I snatched the SQL from pg_log that pgAdmin runs when refreshing the
>> >> > list of
>> >> > schemas and that query also returns these duplicate schemas. So do
>> >> > the
>> >> > Object List Report html output.
>> >>
>> >> Hmm, odd. I don't suppose you've run pg_upgrade on this database have
>> >> you?
>> >>
>> >> Magnus fixed a bug similar to this the other day (possibly this very
>> >> one). Can you test 1.16.1 please? I just released it an hour ago.
>> >>
>> >> > 2012/12/6 Dave Page <dpage(at)pgadmin(dot)org>
>> >> >>
>> >> >> On Thu, Dec 6, 2012 at 10:31 AM, Per Wigren <per(dot)wigren(at)gmail(dot)com>
>> >> >> wrote:
>> >> >> > When querying pg_description for the oid of one schema that has
>> >> >> > duplicates
>> >> >> > in pgAdmin I get this:
>> >> >> >
>> >> >> > bix_live=# select * from pg_description where objoid = 16458;
>> >> >> > objoid | classoid | objsubid |
>> >> >> > description
>> >> >> >
>> >> >> >
>> >> >> >
>> >> >> > --------+----------+----------+--------------------------------------------------------------------------------------------------------
>> >> >> > 16458 | 2615 | 0 | The main comment
>> >> >> > 16458 | 1259 | 1 | some other comment
>> >> >> > 16458 | 1259 | 2 | yet another comment
>> >> >> > 16458 | 1259 | 3 | a different comment
>> >> >> > 16458 | 1259 | 4 | another different comment
>> >> >> > (5 rows)
>> >> >> >
>> >> >> > These are the comments that are displayed for the various
>> >> >> > duplicates
>> >> >> > in
>> >> >> > pgAdmin. Only the main comment is suppsed to be there, I don't
>> >> >> > know
>> >> >> > where
>> >> >> > the others come from. The extra comments are the same for all
>> >> >> > schemas
>> >> >> > that
>> >> >> > have duplicates.
>> >> >>
>> >> >> The rows with objsubid set to something other than 0 are almost
>> >> >> certainly comments on table columns (the sub ID being the column
>> >> >> number). That's perfectly normal. I'm still not clear where you're
>> >> >> seeing a problem though - can you show me a screenshot of the affect
>> >> >> schema in pgAdmin, including both the properties pane showing the
>> >> >> schema OID, and the SQL pane?
>> >> >>
>> >> >> Thanks.
>> >> >>
>> >> >>
>> >> >> --
>> >> >> Dave Page
>> >> >> Blog: http://pgsnake.blogspot.com
>> >> >> Twitter: @pgsnake
>> >> >>
>> >> >> EnterpriseDB UK: http://www.enterprisedb.com
>> >> >> The Enterprise PostgreSQL Company
>> >> >
>> >> >
>> >>
>> >>
>> >>
>> >> --
>> >> Dave Page
>> >> Blog: http://pgsnake.blogspot.com
>> >> Twitter: @pgsnake
>> >>
>> >> EnterpriseDB UK: http://www.enterprisedb.com
>> >> The Enterprise PostgreSQL Company
>> >
>> >
>>
>>
>>
>> --
>> Dave Page
>> Blog: http://pgsnake.blogspot.com
>> Twitter: @pgsnake
>>
>> EnterpriseDB UK: http://www.enterprisedb.com
>> The Enterprise PostgreSQL Company
>
>

--
Magnus Hagander
Me: http://www.hagander.net/
Work: http://www.redpill-linpro.com/

In response to

Responses

Browse pgadmin-support by date

  From Date Subject
Next Message Dave Page 2012-12-06 17:39:18 Re: Problem with multiple comments
Previous Message Per Wigren 2012-12-06 11:13:20 Re: Problem with multiple comments