From: Achilleas Mantzios <a.mantzios@cloud.gatewaynet.com>
To: pgsql-general@lists.postgresql.org
Subject: Re: PostgreSQL inheritance vs https://wiki.postgresql.org/wiki/Don%27t_Do_This
Date: Wed, 8 Nov 2023 08:31:17 +0200
Message-ID: <41913c85-9d05-4ac3-8159-8b4e5968b759@cloud.gatewaynet.com> (raw)
In-Reply-To: <2f106761-daa8-6b26-013e-884da25322c2@cloud.gatewaynet.com>
References: <2f106761-daa8-6b26-013e-884da25322c2@cloud.gatewaynet.com>
Hello All
Here is the presentation, it was done under "Percona University Athens".
It went ok, I think, although people didn't seem to understand much, as
the audience was MySQL/PostgreSQL/Mongo/Oracle mix. However some young
people seemed to be interested as they asked questions afterwards.
https://docs.google.com/presentation/d/15LmNmjSMAXzHDSlm0MgvHuhSPnmVijsytdPJOz3l13g/edit?usp=sharing
It was an interesting event, I had the chance to speak to top MySQL
hackers (including the founders of Percona, TiDB, FerretDB). The event
was relatively friendly to PostgreSQL as well, I have to say. PostgreSQL
was presented as catching up MySQL in terms of usage/growth.
In some future similar events I'd love to prepare a better and more
current presentation for the local Greek community!
Στις 23/10/23 14:45, ο/η Achilleas Mantzios - cloud έγραψε:
>
> Hello All
>
> in the wiki above and specifically in this commit :
>
> https://wiki.postgresql.org/index.php?title=Don%27t_Do_This&type=revision&diff=33210&old...
>
> someone added this section about inheritance :
>
> "
>
>
> Don't use table inheritance
>
> Don't use table inheritance
> <https://www.postgresql.org/docs/current/tutorial-inheritance.html;.
> If you think you want to, use foreign keys instead.
>
>
> Why not?
>
> Table inheritance was a part of a fad wherein the database was closely
> coupled to object-oriented code. It turned out that coupling things
> that closely didn't actually produce the desired results.
>
>
> When should you?
>
> Never …almost. Now that table partitioning is done natively, that
> common use case for table inheritance has been replaced by a native
> feature that handles tuple routing, etc., without bespoke code.
>
> One of the very few exceptions would be temporal_tables
> <https://github.com/arkhipov/temporal_tables; extension if you are in
> a pinch and want to use that for row versioning in place of a lacking
> SQL 2011 support. Table inheritance will provide a small shortcut
> instead of using |UNION ALL| to get both historical as well as current
> rows. Even then you ought to be wary of caveats
> <http://clarkdave.net/2015/02/historical-records-with-postgresql-and-temporal-tables-and-sql-2011/#us...;
> while working with parent table.
>
> "
>
>
> I believe this text is false on too many accounts. So, what's the
> consensus about Inheritance in PostgreSQL, I am going to give a talk
> on it in November and I wouldn't like to advertise/promote/teach
> something that the community has decided to abandon or drop. Actually
> I proposed several topics and they chose this one (Inheritance).
>
--
Achilleas Mantzios
IT DEV - HEAD
IT DEPT
Dynacom Tankers Mgmt
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-general@postgresql.org
Cc: a.mantzios@cloud.gatewaynet.com
Subject: Re: PostgreSQL inheritance vs https://wiki.postgresql.org/wiki/Don%27t_Do_This
In-Reply-To: <41913c85-9d05-4ac3-8159-8b4e5968b759@cloud.gatewaynet.com>
References: <2f106761-daa8-6b26-013e-884da25322c2@cloud.gatewaynet.com> <41913c85-9d05-4ac3-8159-8b4e5968b759@cloud.gatewaynet.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox