Re: Should we warn against using too many partitions?

Поиск
Список
Период
Сортировка
От David Rowley
Тема Re: Should we warn against using too many partitions?
Дата
Msg-id CAKJS1f-+4RD=bvK82GAGS_vjZmxXnHrk5eOF60dzSY-h39B76w@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Should we warn against using too many partitions?  (Alvaro Herrera <alvherre@2ndquadrant.com>)
Список pgsql-hackers
On Fri, 7 Jun 2019 at 03:12, Alvaro Herrera <alvherre@2ndquadrant.com> wrote:
> I think in PG10 something should be mentioned about PK and UNIQUE, so
> that people doing their partitioning on that release can think ahead.

That seems reasonable, but I feel caution would be required as we
don't want to provide any details about what a future version will
support, such information might not age very well. We could say that
future versions of PostgreSQL support PRIMARY KEY and UNIQUE
constraints, but we'll be unable to detail out that these must be a
super-set of the partition columns as if we get global indexes one day
that will no longer be a restriction. I'll have a think about it and
post a PG10 patch later.

> We don't want them to have to redesign and redo the whole setup when
> upgrading to a newer release.  If we had written the pg10 material back
> when pg10 was fresh, it wouldn't make sense, but now that we know the
> future, I don't see why we wouldn't do it.  Maybe something like "The
> current version does not support <this>, but future Postgres versions
> do; consult their manuals for some limitations that may affect the
> choice of partitioning strategy".

> In the PG10 version you'll need to elide the mention of HASH
> partitioning strategy.

Good point. I might need to rethink that example completely as I'm not
sure if swapping HASH for RANGE is such a great fix.

> Generally speaking, your material looks good to me.  Also generally I +1
> Justin's suggestions.  The part that mentions a "relation cache entry"
> seems too low-level as-is, though ... maybe just say it uses some memory
> per partition without being too specific.

Yeah, I wondered about that. I did grep the docs for "relation cache"
and saw two other mentions, that's why I ended up going with it, but I
do agree that it may be a problem since there's nothing in the docs
that explain what that actually means.

> I think it'd be worthwhile to mention sub-partitioning.

I'll try to come up with something for that.

> I wonder if the PG10 manual should just suggest to skip to PG11 if
> they're setting up partitioning for the first time.

I don't think so. I mean, if they just happened to have just installed
PG10 that might be okay, but they may already be heavily invested in
that version already. Suggesting an upgrade may not be a well-received
recommendation for some. Maybe a suggestion that significant
improvements have been made in later versions might be enough, but I'm
a bit on the fence about that.

Thanks for having a look. I'll post PG10 and 11 patches later.

-- 
 David Rowley                   http://www.2ndQuadrant.com/
 PostgreSQL Development, 24x7 Support, Training & Services



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Justin Pryzby
Дата:
Сообщение: Re: Should we warn against using too many partitions?
Следующее
От: Fabrízio de Royes Mello
Дата:
Сообщение: Re: Add CREATE DATABASE LOCALE option