Re: Partitioned tables and relfilenode

From: Kyotaro HORIGUCHI <horiguchi(dot)kyotaro(at)lab(dot)ntt(dot)co(dot)jp>
To: Langote_Amit_f8(at)lab(dot)ntt(dot)co(dot)jp
Cc: robertmhaas(at)gmail(dot)com, amitlangote09(at)gmail(dot)com, m(dot)milyutin(at)postgrespro(dot)ru, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Partitioned tables and relfilenode
Date: 2017-03-29 08:40:28
Message-ID: 20170329.174028.170940286.horiguchi.kyotaro@lab.ntt.co.jp
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

At Wed, 29 Mar 2017 17:21:26 +0900, Amit Langote <Langote_Amit_f8(at)lab(dot)ntt(dot)co(dot)jp> wrote in <b1234f04-53e0-011d-9f02-2437b909cce4(at)lab(dot)ntt(dot)co(dot)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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Craig Ringer 2017-03-29 08:44:19 Re: Logical decoding on standby
Previous Message Amit Langote 2017-03-29 08:38:41 Re: pg_dump emits ALTER TABLE ONLY partitioned_table