Re: indexes on partitioned tables

From: Wasim Devale <wasimd60(at)gmail(dot)com>
To: Kashif Zeeshan <kashi(dot)zeeshan(at)gmail(dot)com>
Cc: Pgsql-admin <pgsql-admin(at)lists(dot)postgresql(dot)org>
Subject: Re: indexes on partitioned tables
Date: 2024-07-16 12:48:51
Message-ID: CAB5fag4GbgU_DoogtPvk_RuxL_1G1rd13Dbu-834Dcin-qfNZQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

Thanks,
Wasim

On Tue, 16 Jul, 2024, 12:31 pm Kashif Zeeshan, <kashi(dot)zeeshan(at)gmail(dot)com>
wrote:

> FYI
>
> On Tue, Jul 16, 2024 at 11:56 AM Kashif Zeeshan <kashi(dot)zeeshan(at)gmail(dot)com>
> wrote:
>
>> Hi Wasim
>>
>>
>>
>> On Fri, Jul 12, 2024 at 10:23 AM Wasim Devale <wasimd60(at)gmail(dot)com> wrote:
>>
>>> Hi Kashif
>>>
>>> Is there a steps to create the the partition tables ?
>>>
>> Yes, you can check the following link
>> https://www.postgresql.org/docs/current/ddl-partitioning.html
>>
>>>
>>> I mean to say first create the tables and then insert the data lastly
>>> create index on them ?
>>>
>> It's up to you which way you follow
>> You can create the table and indexes first and insert data later and vice
>> versa.
>>
>>>
>>> What I did I created the table at once with all partition tables and
>>> indexes and then I inserted data by insert script. Is it ok?
>>>
>> Yes
>>
>>>
>>> And I also created the indexes globally on the parent table the
>>> partition tables automatically took the indexes. Let me know what you think.
>>>
>>> Thanks,
>>> Wasim
>>>
>>> On Thu, 11 Jul, 2024, 1:54 pm Kashif Zeeshan, <kashi(dot)zeeshan(at)gmail(dot)com>
>>> wrote:
>>>
>>>> Hi
>>>>
>>>> When you create an index on Partition table then the index is created
>>>> for all the Partitions so when you re-index then you need to re-index each
>>>> partition separately.
>>>>
>>>> Regards
>>>> Kashif Zeeshan
>>>>
>>>> On Thu, Jul 11, 2024 at 1:16 PM Wasim Devale <wasimd60(at)gmail(dot)com>
>>>> wrote:
>>>>
>>>>> Hi All,
>>>>>
>>>>> I have partitioned a table and levied indexes on it but when I do
>>>>> maintenance activities like reindexing it's not happening and the error is
>>>>> index not present on the partitioned table.
>>>>>
>>>>> Please highlight some points on it, Is I am missing something?
>>>>>
>>>>> Thanks,
>>>>> Wasim
>>>>>
>>>>

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message James Pang 2024-07-17 09:34:58 logical decoding autovacuum changes
Previous Message Laurenz Albe 2024-07-16 09:21:32 Re: AW: [Extern] Re: promote a deferred standby without applying WALs