Re: Partitioned tables and relfilenode
Robert Haas <robertmhaas@gmail.com>
From: Robert Haas <robertmhaas@gmail.com>
To: Amit Langote <Langote_Amit_f8@lab.ntt.co.jp>, "pgsql-hackers@postgresql.org" <pgsql-hackers@postgresql.org>
Date: 2017-03-22T13:39:20Z
Lists: pgsql-hackers
Off-list by accident. Re-adding the list. On Tue, Mar 21, 2017 at 10:37 AM, Robert Haas <robertmhaas@gmail.com> wrote: > On Tue, Mar 21, 2017 at 9:49 AM, Robert Haas <robertmhaas@gmail.com> wrote: >> On Tue, Mar 21, 2017 at 5:05 AM, Amit Langote >> <Langote_Amit_f8@lab.ntt.co.jp> wrote: >>> Attached updated patches. >> >> Committed 0001 after removing a comma. > > Regarding 0002, I notice this surprising behavior: > > rhaas=# create table foo (a int, b text) partition by list (a); > CREATE TABLE > rhaas=# select relfilenode from pg_class where oid = 'foo'::regclass; > relfilenode > ------------- > 16385 > (1 row) > > Why do we end up with a relfilenode if there's no storage? I would > have expected to see 0 there. > > Other than that, there's not much to see here. I'm a little worried > that you might have missed some case that can result in an access to > the file, but I can't find one. Stuff I tried: > > VACUUM > VACUUM FULL > CLUSTER > ANALYZE > CREATE INDEX > ALTER TABLE .. ALTER COLUMN .. TYPE > TRUNCATE > > It would be good to go through and make sure all of those - and any > others you can think of - are represented in the regression tests. > > Also, a documentation update is probably in order to explain that > we're not going to accept heap_reloptions on the parent because the > parent has no storage; such options must be set on the child in order > to have effect. > > -- > Robert Haas > EnterpriseDB: http://www.enterprisedb.com > The Enterprise PostgreSQL Company -- Robert Haas EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company
Commits
-
Code review for c94e6942cefe7d20c5feed856e27f672734b1e2b.
- 1d5fede4a900 10.0 landed
-
Don't allocate storage for partitioned tables.
- c94e6942cefe 10.0 landed
-
Don't scan partitioned tables.
- d3cc37f1d801 10.0 landed
-
Don't uselessly rewrite, truncate, VACUUM, or ANALYZE partitioned tables.
- 3c3bb99330aa 10.0 landed