Re: Improve pg_dump dumping publication tables
От
Cary Huang
Тема
Re: Improve pg_dump dumping publication tables
Дата
Msg-id
160261701028.1154.3238486867767993908.pgcf@coridan.postgresql.org
Ответ на
Improve pg_dump dumping publication tables (Hsu, John)
Список
Дерево обсуждения
Improve pg_dump dumping publication tables "Hsu, John" <hsuchen@amazon.com>
Re: Improve pg_dump dumping publication tables Cary Huang <cary.huang@highgo.ca>
Re: Improve pg_dump dumping publication tables John Hsu <chenhao.john.hsu@gmail.com>
Re: Improve pg_dump dumping publication tables Tom Lane <tgl@sss.pgh.pa.us>
The following review has been posted through the commitfest application: make installcheck-world: tested, passed Implements feature: tested, passed Spec compliant: tested, passed Documentation: not tested Hi I applied the patch to PG master branch successfully and the patch seems to do as described. If there are a lot of tables created in the Postgres and only a few of them having publications, the getPublicationTables() function will loop through all the tables and check each one to see if it is the desired relation type and if it contains one or more publications. So potentially a lot of looping and checking may happen. In John's patch, all these looping and checking are replaced with one query that will return all the tables that have publications. One problem though, is that, if there are a million tables created in the server like you say and all of them have publications, the query can return a million rows, which will require a lot of memory on client side and the pg_dump client may need to handle this extreme case with proper pagination, which adds complexity to the function's logic. Existing logic does not have this problem, because it simply queries a table's publication one at a time and do it a million times. thank you Cary Huang HighGo Software
В списке pgsql-hackers по дате отправления