Re: Missing word

From: Paweł Szymczyk <pawel(dot)szymczyk90(at)gmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Álvaro Herrera <alvherre(at)kurilemu(dot)de>, pgsql-docs(at)lists(dot)postgresql(dot)org
Subject: Re: Missing word
Date: 2025-05-15 21:12:05
Message-ID: CAJo0PvsSzwo2Qp_EsqvT=9n-RoEf_CMZpUNoTh4mynjeguidGw@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-docs

What about sth like that:

Normally the set of partitions established when initially defining the
> table is not intended to remain static. It is common to want to remove
> partitions holding old data and periodically add new partitions for new
> data. One of the most important advantages of partitioning is precisely
> that it allows this otherwise painful task to be executed nearly
> instantaneously by manipulating the partition structure, rather than
> physically moving large amounts of data around.

There are two ways for removing old data:

1) Drop the partition that is no longer necessary
>
DROP TABLE measurement_y2006m02;
>
This is he simplest option for removing old data. This can very quickly
> delete millions of records because it doesn't have to individually delete
> every record. Note however that the above command requires taking an ACCESS
> EXCLUSIVE lock on the parent table.
>
2) Disconnect the partition from the partitioned table
>
This option that is often preferable. We are retaining access to data as a
> table in its own right. This has two forms:

czw., 15 maj 2025 o 20:28 Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> napisał(a):

> =?utf-8?Q?=C3=81lvaro?= Herrera <alvherre(at)kurilemu(dot)de> writes:
> > On 2025-May-13, Tom Lane wrote:
> >>> "Another option that is often preferable is to remove the partition
> >>> from the partitioned table but retain access to it as a table in its
> own
> >>> right."
>
> >> AFAICS, it's correct as written.
>
> > Yeah, but maybe it would be clearer if the word "remove" were "detach".
> > I don't find the phrase "remove the partition from the partitioned
> > table" particulary suggestive of what's being described.
>
> Hm, maybe, but would that be putting too much emphasis on "detach" because
> it's the command keyword?
>
> regards, tom lane
>

--
Pozdrawiam
Paweł Szymczyk

In response to

Browse pgsql-docs by date

  From Date Subject
Next Message Michael Paquier 2025-05-17 12:44:09 Re: reindex documentation
Previous Message Tom Lane 2025-05-15 18:28:08 Re: Missing word