Обсуждение: bug in vacuumlo?

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

bug in vacuumlo?

От
Irina Sourikova
Дата:
Hi,

I tried to use vacuumlo of posgres-7.3.4/contrib/vacuumlo  and it didn't
work
for me until I added one line:

    strcat(buf, "      AND c.relname <> 'vacuum_l'");

after     strcat(buf, "SELECT c.relname, a.attname ");
   strcat(buf, "FROM pg_class c, pg_attribute a, pg_type t ");
   strcat(buf, "WHERE a.attnum > 0 ");
   strcat(buf, "      AND a.attrelid = c.oid ");
   strcat(buf, "      AND a.atttypid = t.oid ");
   strcat(buf, "      AND t.typname in ('oid', 'lo') ");
   strcat(buf, "      AND c.relkind = 'r'");

Is it a bug or I'm missing something?

Thank you,
Irina
irina@bnl.gov



Re: bug in vacuumlo?

От
Tom Lane
Дата:
Irina Sourikova <irina@bnl.gov> writes:
> I tried to use vacuumlo of posgres-7.3.4/contrib/vacuumlo  and it didn't
> work
> for me until I added one line:
>     strcat(buf, "      AND c.relname <> 'vacuum_l'");

Hmm.  This bug was patched last year in CVS tip, but apparently not in
the 7.3 branch.  Sigh.

            regards, tom lane

Re: bug in vacuumlo?

От
Christopher Kings-Lynne
Дата:
Do we need a 'AND NOT a.attisdropped' in there anywhere as well?

Chris

On Tue, 23 Sep 2003, Irina Sourikova wrote:

>
> Hi,
>
> I tried to use vacuumlo of posgres-7.3.4/contrib/vacuumlo  and it didn't
> work
> for me until I added one line:
>
>     strcat(buf, "      AND c.relname <> 'vacuum_l'");
>
> after     strcat(buf, "SELECT c.relname, a.attname ");
>    strcat(buf, "FROM pg_class c, pg_attribute a, pg_type t ");
>    strcat(buf, "WHERE a.attnum > 0 ");
>    strcat(buf, "      AND a.attrelid = c.oid ");
>    strcat(buf, "      AND a.atttypid = t.oid ");
>    strcat(buf, "      AND t.typname in ('oid', 'lo') ");
>    strcat(buf, "      AND c.relkind = 'r'");
>
> Is it a bug or I'm missing something?
>
> Thank you,
> Irina
> irina@bnl.gov
>
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 3: if posting/reading through Usenet, please send an appropriate
>       subscribe-nomail command to majordomo@postgresql.org so that your
>       message can get through to the mailing list cleanly
>


Re: bug in vacuumlo?

От
Tom Lane
Дата:
Christopher Kings-Lynne <chriskl@familyhealth.com.au> writes:
> Do we need a 'AND NOT a.attisdropped' in there anywhere as well?

Hm, probably a good idea, although in the current state of the code
it theoretically shouldn't matter.  (DROP COLUMN zeroes atttypid,
so that part of the join won't succeed.  But vacuumlo shouldn't depend
on it.)  I've applied a patch.

            regards, tom lane