On 6th of April 2020, Peter Eisentraut committed patch:
Add logical replication support to replicate into partitioned tables Mainly, this adds support code in logical/worker.c for applying replicated operations whose target is a partitioned table to its relevant partitions. Author: Amit Langote <firstname.lastname@example.org> Reviewed-by: Rafia Sabih <email@example.com> Reviewed-by: Peter Eisentraut <firstname.lastname@example.org> Reviewed-by: Petr Jelinek <email@example.com> Discussion: https://www.postgresql.org/message-id/flat/CA+HiwqH=Y85vRK3mOdjEkqFK+E=ST=eQiHdpj43L=_eJMOOznQ@mail.gmail.com
Lifting a limitation in one of replication schemas is hardly sexy. But this is something that sounds very interesting, if only that it will allow for very fast switching to partitioned schema.
Instead of migrating things table by table, in many steps, using method like the one I described year ago, you will be able to setup copy of database, with partitioned tables, updated automatically via replication, and then just switch to new database. Which should be much simpler to handle downtime-wise.
Setting full example seems trivial, and I already described it, so I guess I'll skip it for now.
In any way – this sounds amazing, thanks to all involved.