Re: CLUSTER ALL patch

Lists: pgsql-patches
From: Alvaro Herrera <alvherre(at)atentus(dot)com>
To: PgSQL Patches <pgsql-patches(at)postgresql(dot)org>
Subject: CLUSTER ALL patch
Date: 2002-09-29 00:26:55
Message-ID: 20020928202655.361fd1f8.alvherre@atentus.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-patches

Hi,

I attach the patch implementing CLUSTER ALL. Please review and apply to
HEAD if OK.

Thank you.

--
Alvaro Herrera (<alvherre[a]atentus.com>)
Licensee shall have no right to use the Licensed Software
for productive or commercial use. (Licencia de StarOffice 6.0 beta)

Attachment Content-Type Size
cluster-all-3.patch application/octet-stream 24.2 KB

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Alvaro Herrera <alvherre(at)atentus(dot)com>
Cc: PgSQL Patches <pgsql-patches(at)postgresql(dot)org>
Subject: Re: CLUSTER ALL patch
Date: 2002-09-29 05:45:48
Message-ID: 200209290545.g8T5jmH05142@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-patches


This has been saved for the 7.4 release:

http://candle.pha.pa.us/cgi-bin/pgpatches2

---------------------------------------------------------------------------

Alvaro Herrera wrote:
> Hi,
>
> I attach the patch implementing CLUSTER ALL. Please review and apply to
> HEAD if OK.
>
> Thank you.
>
> --
> Alvaro Herrera (<alvherre[a]atentus.com>)
> Licensee shall have no right to use the Licensed Software
> for productive or commercial use. (Licencia de StarOffice 6.0 beta)

[ Attachment, skipping... ]

>
> ---------------------------(end of broadcast)---------------------------
> TIP 2: you can get off all lists at once with the unregister command
> (send "unregister YourEmailAddressHere" to majordomo(at)postgresql(dot)org)

--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073


From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Alvaro Herrera <alvherre(at)atentus(dot)com>
Cc: PgSQL Patches <pgsql-patches(at)postgresql(dot)org>
Subject: Re: CLUSTER ALL patch
Date: 2002-11-07 19:08:00
Message-ID: 200211071908.gA7J80H14872@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-patches


Patch returned to author for revision.

---------------------------------------------------------------------------

Alvaro Herrera wrote:
> Hi,
>
> I attach the patch implementing CLUSTER ALL. Please review and apply to
> HEAD if OK.
>
> Thank you.
>
> --
> Alvaro Herrera (<alvherre[a]atentus.com>)
> Licensee shall have no right to use the Licensed Software
> for productive or commercial use. (Licencia de StarOffice 6.0 beta)

[ Attachment, skipping... ]

>
> ---------------------------(end of broadcast)---------------------------
> TIP 2: you can get off all lists at once with the unregister command
> (send "unregister YourEmailAddressHere" to majordomo(at)postgresql(dot)org)

--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073


From: Alvaro Herrera <alvherre(at)dcc(dot)uchile(dot)cl>
To: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
Cc: PgSQL Patches <pgsql-patches(at)postgresql(dot)org>
Subject: Re: CLUSTER ALL patch
Date: 2002-11-13 01:08:43
Message-ID: 20021113010843.GA27475@dcc.uchile.cl
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-patches

On Thu, Nov 07, 2002 at 02:08:00PM -0500, Bruce Momjian wrote:
>
> Patch returned to author for revision.

New version attached. The following is implemented:

- CLUSTER ALL clusters all the tables that have some index with
indisclustered set and the calling user owns.
- CLUSTER tablename clusters the named table, using the index with
indisclustered set. If no index has the bit set, throws elog(ERROR).
- The multi-relation version (CLUSTER ALL) uses a multitransaction
approach, similar to what VACUUM does.

Please review.

--
Alvaro Herrera (<alvherre[a]dcc.uchile.cl>)
"Pido que me den el Nobel por razones humanitarias" (Nicanor Parra)

Attachment Content-Type Size
cluster-all-5.patch text/plain 26.2 KB

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Alvaro Herrera <alvherre(at)dcc(dot)uchile(dot)cl>
Cc: PgSQL Patches <pgsql-patches(at)postgresql(dot)org>
Subject: Re: CLUSTER ALL patch
Date: 2002-11-13 03:17:44
Message-ID: 200211130317.gAD3Hie21400@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-patches


Your patch has been added to the PostgreSQL unapplied patches list at:

http://momjian.postgresql.org/cgi-bin/pgpatches

I will try to apply it within the next 48 hours.

---------------------------------------------------------------------------

Alvaro Herrera wrote:
> On Thu, Nov 07, 2002 at 02:08:00PM -0500, Bruce Momjian wrote:
> >
> > Patch returned to author for revision.
>
> New version attached. The following is implemented:
>
> - CLUSTER ALL clusters all the tables that have some index with
> indisclustered set and the calling user owns.
> - CLUSTER tablename clusters the named table, using the index with
> indisclustered set. If no index has the bit set, throws elog(ERROR).
> - The multi-relation version (CLUSTER ALL) uses a multitransaction
> approach, similar to what VACUUM does.
>
> Please review.
>
> --
> Alvaro Herrera (<alvherre[a]dcc.uchile.cl>)
> "Pido que me den el Nobel por razones humanitarias" (Nicanor Parra)

[ Attachment, skipping... ]

>
> ---------------------------(end of broadcast)---------------------------
> TIP 6: Have you searched our list archives?
>
> http://archives.postgresql.org

--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073


From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Alvaro Herrera <alvherre(at)dcc(dot)uchile(dot)cl>
Cc: PgSQL Patches <pgsql-patches(at)postgresql(dot)org>
Subject: Re: CLUSTER ALL patch
Date: 2002-11-15 03:09:44
Message-ID: 200211150309.gAF39iD26204@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-patches


Patch applied. Thanks.

---------------------------------------------------------------------------

Alvaro Herrera wrote:
> On Thu, Nov 07, 2002 at 02:08:00PM -0500, Bruce Momjian wrote:
> >
> > Patch returned to author for revision.
>
> New version attached. The following is implemented:
>
> - CLUSTER ALL clusters all the tables that have some index with
> indisclustered set and the calling user owns.
> - CLUSTER tablename clusters the named table, using the index with
> indisclustered set. If no index has the bit set, throws elog(ERROR).
> - The multi-relation version (CLUSTER ALL) uses a multitransaction
> approach, similar to what VACUUM does.
>
> Please review.
>
> --
> Alvaro Herrera (<alvherre[a]dcc.uchile.cl>)
> "Pido que me den el Nobel por razones humanitarias" (Nicanor Parra)

[ Attachment, skipping... ]

>
> ---------------------------(end of broadcast)---------------------------
> TIP 6: Have you searched our list archives?
>
> http://archives.postgresql.org

--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073


From: Peter Eisentraut <peter_e(at)gmx(dot)net>
To: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
Cc: Alvaro Herrera <alvherre(at)dcc(dot)uchile(dot)cl>, PgSQL Patches <pgsql-patches(at)postgresql(dot)org>
Subject: Re: CLUSTER ALL patch
Date: 2002-11-17 13:17:20
Message-ID: Pine.LNX.4.44.0211151843540.12428-100000@localhost.localdomain
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-patches

Is the clusterdb script now going to be removed?

Bruce Momjian writes:

> Patch applied. Thanks.
>
> ---------------------------------------------------------------------------
>
>
> Alvaro Herrera wrote:
> > On Thu, Nov 07, 2002 at 02:08:00PM -0500, Bruce Momjian wrote:
> > >
> > > Patch returned to author for revision.
> >
> > New version attached. The following is implemented:
> >
> > - CLUSTER ALL clusters all the tables that have some index with
> > indisclustered set and the calling user owns.
> > - CLUSTER tablename clusters the named table, using the index with
> > indisclustered set. If no index has the bit set, throws elog(ERROR).
> > - The multi-relation version (CLUSTER ALL) uses a multitransaction
> > approach, similar to what VACUUM does.
> >
> > Please review.
> >
> > --
> > Alvaro Herrera (<alvherre[a]dcc.uchile.cl>)
> > "Pido que me den el Nobel por razones humanitarias" (Nicanor Parra)
>
> [ Attachment, skipping... ]
>
> >
> > ---------------------------(end of broadcast)---------------------------
> > TIP 6: Have you searched our list archives?
> >
> > http://archives.postgresql.org
>
>

--
Peter Eisentraut peter_e(at)gmx(dot)net


From: Alvaro Herrera <alvherre(at)dcc(dot)uchile(dot)cl>
To: Peter Eisentraut <peter_e(at)gmx(dot)net>
Cc: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>, PgSQL Patches <pgsql-patches(at)postgresql(dot)org>
Subject: Re: CLUSTER ALL patch
Date: 2002-11-17 13:48:25
Message-ID: 20021117134825.GA3179@dcc.uchile.cl
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-patches

On Sun, Nov 17, 2002 at 02:17:20PM +0100, Peter Eisentraut wrote:

> Is the clusterdb script now going to be removed?

I think it should be replaced by a version that uses the backend CLUSTER
ALL functionality, but if people think there's no need it can just be
removed.

--
Alvaro Herrera (<alvherre[a]dcc.uchile.cl>)
"La virtud es el justo medio entre dos defectos" (Aristoteles)


From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Peter Eisentraut <peter_e(at)gmx(dot)net>
Cc: Alvaro Herrera <alvherre(at)dcc(dot)uchile(dot)cl>, PgSQL Patches <pgsql-patches(at)postgresql(dot)org>
Subject: Re: CLUSTER ALL patch
Date: 2002-11-17 14:45:30
Message-ID: 200211171445.gAHEjUd07215@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-patches


Yes, clusterdb will be removed. Thanks for the reminder.

---------------------------------------------------------------------------

Peter Eisentraut wrote:
> Is the clusterdb script now going to be removed?
>
> Bruce Momjian writes:
>
> > Patch applied. Thanks.
> >
> > ---------------------------------------------------------------------------
> >
> >
> > Alvaro Herrera wrote:
> > > On Thu, Nov 07, 2002 at 02:08:00PM -0500, Bruce Momjian wrote:
> > > >
> > > > Patch returned to author for revision.
> > >
> > > New version attached. The following is implemented:
> > >
> > > - CLUSTER ALL clusters all the tables that have some index with
> > > indisclustered set and the calling user owns.
> > > - CLUSTER tablename clusters the named table, using the index with
> > > indisclustered set. If no index has the bit set, throws elog(ERROR).
> > > - The multi-relation version (CLUSTER ALL) uses a multitransaction
> > > approach, similar to what VACUUM does.
> > >
> > > Please review.
> > >
> > > --
> > > Alvaro Herrera (<alvherre[a]dcc.uchile.cl>)
> > > "Pido que me den el Nobel por razones humanitarias" (Nicanor Parra)
> >
> > [ Attachment, skipping... ]
> >
> > >
> > > ---------------------------(end of broadcast)---------------------------
> > > TIP 6: Have you searched our list archives?
> > >
> > > http://archives.postgresql.org
> >
> >
>
> --
> Peter Eisentraut peter_e(at)gmx(dot)net
>
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 1: subscribe and unsubscribe commands go to majordomo(at)postgresql(dot)org
>

--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073


From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Alvaro Herrera <alvherre(at)dcc(dot)uchile(dot)cl>
Cc: Peter Eisentraut <peter_e(at)gmx(dot)net>, PgSQL Patches <pgsql-patches(at)postgresql(dot)org>
Subject: Re: CLUSTER ALL patch
Date: 2002-11-17 14:47:00
Message-ID: 200211171447.gAHEl0407405@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-patches

Alvaro Herrera wrote:
> On Sun, Nov 17, 2002 at 02:17:20PM +0100, Peter Eisentraut wrote:
>
> > Is the clusterdb script now going to be removed?
>
> I think it should be replaced by a version that uses the backend CLUSTER
> ALL functionality, but if people think there's no need it can just be
> removed.

I don't see any need to keep it. We have vacuumdb only so we can vacuum
all databases.

Oh, hold, I now see that clusterdb _can_ do all databases, just like
vacuumdb. Seems we should keep it. Peter?

--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073


From: Peter Eisentraut <peter_e(at)gmx(dot)net>
To: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
Cc: Alvaro Herrera <alvherre(at)dcc(dot)uchile(dot)cl>, PgSQL Patches <pgsql-patches(at)postgresql(dot)org>
Subject: Re: CLUSTER ALL patch
Date: 2002-11-18 18:13:35
Message-ID: Pine.LNX.4.44.0211181912140.12428-100000@localhost.localdomain
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-patches

Bruce Momjian writes:

> Oh, hold, I now see that clusterdb _can_ do all databases, just like
> vacuumdb. Seems we should keep it. Peter?

Interesting. Do we recommend that users routine recluster all their
databases?

Perhaps we need a more general client-side tool to run some command on all
databases, so we could get rid of clusterdb, vacuumdb, reindexdb,
mycommandofthedaydb, etc.

--
Peter Eisentraut peter_e(at)gmx(dot)net


From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Peter Eisentraut <peter_e(at)gmx(dot)net>
Cc: Alvaro Herrera <alvherre(at)dcc(dot)uchile(dot)cl>, PgSQL Patches <pgsql-patches(at)postgresql(dot)org>
Subject: Re: CLUSTER ALL patch
Date: 2002-11-18 19:26:38
Message-ID: 200211181926.gAIJQcE18645@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-patches

Peter Eisentraut wrote:
> Bruce Momjian writes:
>
> > Oh, hold, I now see that clusterdb _can_ do all databases, just like
> > vacuumdb. Seems we should keep it. Peter?
>
> Interesting. Do we recommend that users routine recluster all their
> databases?
>
> Perhaps we need a more general client-side tool to run some command on all
> databases, so we could get rid of clusterdb, vacuumdb, reindexdb,
> mycommandofthedaydb, etc.

Yes, I think that makes sense. I think we need to keep clusterdb
_until_ we get a more general solution.

--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073