Re: Partitioned tables and relfilenode - Mailing list pgsql-hackers

From Kyotaro HORIGUCHI
Subject Re: Partitioned tables and relfilenode
Date
Msg-id 20170329.174028.170940286.horiguchi.kyotaro@lab.ntt.co.jp
Whole thread Raw
In response to Re: Partitioned tables and relfilenode  (Amit Langote <Langote_Amit_f8@lab.ntt.co.jp>)
List pgsql-hackers
At Wed, 29 Mar 2017 17:21:26 +0900, Amit Langote <Langote_Amit_f8@lab.ntt.co.jp> wrote in
<b1234f04-53e0-011d-9f02-2437b909cce4@lab.ntt.co.jp>
> > Thanks for taking a look.

This patch is small enough to look at in a short time:p

> > The following attracted my eyes.
> > 
> > +      if (def->defnamespace == NULL &&
> > +          pg_strcasecmp(def->defname, "oids") != 0)
> > +        ereport(ERROR,
> > +          (errcode(ERRCODE_INVALID_PARAMETER_VALUE),
> > +           errmsg("unrecognized parameter \"%s\" for a partitioned table",
> > 
> > This works since defnamespace is always NULL here, but if I
> > understand correctly what we should do here is "reject any option
> > other than "(default).OID"". So I think that the condition should
> > be like the following.
> 
> You're right.  The following *wrongly* succeeds:

Ouch! I briefly checked that by "hoge.oids" without confirming
around.

> create table p (a int) partition by list (a) with
> (toast.autovacuum_enabled = true);
> CREATE TABLE
> 
> > +      if (def->defnamespace != NULL ||
> > +          pg_strcasecmp(def->defname, "oids") != 0)
> 
> Looks correct, so incorporated in the attached updated patch.  Thanks.

-- 
Kyotaro Horiguchi
NTT Open Source Software Center




pgsql-hackers by date:

Previous
From: Amit Langote
Date:
Subject: Re: pg_dump emits ALTER TABLE ONLY partitioned_table
Next
From: Craig Ringer
Date:
Subject: Re: Logical decoding on standby