Re: [HACKERS] Bug in pg_dump --table and --exclude-table fordeclarative partition table handling.
От
Jeevan Ladhe
Тема
Re: [HACKERS] Bug in pg_dump --table and --exclude-table fordeclarative partition table handling.
Дата
Msg-id
CAOgcT0MLzVJFPcWGA6B=5y5+PgoS2udvSbztn2LBO8H54s=VqA@mail.gmail.com
Ответ на
Re: [HACKERS] Bug in pg_dump --table and --exclude-table fordeclarative partition table handling. (Ashutosh Bapat)
Список
Дерево обсуждения
[HACKERS] Bug in pg_dump --table and --exclude-table for declarative partitiontable handling. amul sul <sulamul@gmail.com>
Re: [HACKERS] Bug in pg_dump --table and --exclude-table fordeclarative partition table handling. Amit Langote <Langote_Amit_f8@lab.ntt.co.jp>
Re: [HACKERS] Bug in pg_dump --table and --exclude-table fordeclarative partition table handling. Ashutosh Bapat <ashutosh.bapat@enterprisedb.com>
Re: [HACKERS] Bug in pg_dump --table and --exclude-table fordeclarative partition table handling. amul sul <sulamul@gmail.com>
Re: [HACKERS] Bug in pg_dump --table and --exclude-table fordeclarative partition table handling. Ashutosh Bapat <ashutosh.bapat@enterprisedb.com>
Re: [HACKERS] Bug in pg_dump --table and --exclude-table fordeclarative partition table handling. Jeevan Ladhe <jeevan.ladhe@enterprisedb.com>
Re: [HACKERS] Bug in pg_dump --table and --exclude-table fordeclarative partition table handling. Robert Haas <robertmhaas@gmail.com>
Re: [HACKERS] Bug in pg_dump --table and --exclude-table for declarative partition table handling. Tom Lane <tgl@sss.pgh.pa.us>
Re: [HACKERS] Bug in pg_dump --table and --exclude-table fordeclarative partition table handling. Ashutosh Bapat <ashutosh.bapat@enterprisedb.com>
Re: [HACKERS] Bug in pg_dump --table and --exclude-table fordeclarative partition table handling. Jeevan Ladhe <jeevan.ladhe@enterprisedb.com>
Re: [HACKERS] Bug in pg_dump --table and --exclude-table for declarative partition table handling. Tom Lane <tgl@sss.pgh.pa.us>
Re: [HACKERS] Bug in pg_dump --table and --exclude-table fordeclarative partition table handling. Robert Haas <robertmhaas@gmail.com>
Re: [HACKERS] Bug in pg_dump --table and --exclude-table for declarative partition table handling. Tom Lane <tgl@sss.pgh.pa.us>
Re: [HACKERS] Bug in pg_dump --table and --exclude-table fordeclarative partition table handling. Robert Haas <robertmhaas@gmail.com>
Re: [HACKERS] Bug in pg_dump --table and --exclude-table fordeclarative partition table handling. Ashutosh Bapat <ashutosh.bapat@enterprisedb.com>
Re: [HACKERS] Bug in pg_dump --table and --exclude-table fordeclarative partition table handling. Jeevan Ladhe <jeevan.ladhe@enterprisedb.com>
Re: [HACKERS] Bug in pg_dump --table and --exclude-table fordeclarative partition table handling. Amit Langote <Langote_Amit_f8@lab.ntt.co.jp>
Re: [HACKERS] Bug in pg_dump --table and --exclude-table fordeclarative partition table handling. Ashutosh Bapat <ashutosh.bapat@enterprisedb.com>
Re: [HACKERS] Bug in pg_dump --table and --exclude-table fordeclarative partition table handling. Jeevan Ladhe <jeevan.ladhe@enterprisedb.com>
Hi Amit, Ashutosh,
On Tue, May 9, 2017 at 3:29 PM, Ashutosh Bapat <ashutosh.bapat@enterprisedb.com> wrote:
On Tue, May 9, 2017 at 3:13 PM, Amit Langote
<Langote_Amit_f8@lab.ntt.co.jp> wrote:
> On 2017/05/09 17:21, Jeevan Ladhe wrote:
>> On Tue, May 9, 2017 at 12:43 PM, amul sul <sulamul@gmail.com> wrote:
>>> Current pg_dump --exclude-table option excludes partitioned relation
>>> and dumps all its child relations and vice versa for --table option, which
>>> I think is incorrect.
>>>
>>> In this case we might need to explore all partitions and exclude or include
>>> from dump according to given pg_dump option, attaching WIP patch proposing
>>> same fix. Thoughts/Comments?
>>
>> Also, I can see similar issue exists with inheritance.
>> In attached patch, I have extended Amul's original patch to address the
>> inheritance dumping issue.
>
> Perhaps, it will be better not to touch the regular inheritance tables in
> this patch.
Yeah, I think it's fine if parent gets dumped without one or more of
its children, that's user's choice when it used a certain pattern.
Problematic case might be when we dump a child without its parent and
have INHERITS clause there. pg_restore would throw an error. But in
case that problem exists it's very old and should be fixed separately.
I agree that this should be taken as a separate fix, rather than taking it with
partition.
Regards,
Jeevan Ladhe
В списке pgsql-hackers по дате отправления
От: Ashutosh Bapat
Дата:
От: Ashutosh Bapat
Дата: