Thread: CLUSTER ALL patch

CLUSTER ALL patch

From
Alvaro Herrera
Date:
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

Re: CLUSTER ALL patch

From
Bruce Momjian
Date:
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@postgresql.org)

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

Re: CLUSTER ALL patch

From
Bruce Momjian
Date:
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@postgresql.org)

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

Re: CLUSTER ALL patch

From
Alvaro Herrera
Date:
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

Re: CLUSTER ALL patch

From
Bruce Momjian
Date:
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@candle.pha.pa.us               |  (610) 359-1001
  +  If your life is a hard drive,     |  13 Roberts Road
  +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073

Re: CLUSTER ALL patch

From
Bruce Momjian
Date:
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@candle.pha.pa.us               |  (610) 359-1001
  +  If your life is a hard drive,     |  13 Roberts Road
  +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073

Re: CLUSTER ALL patch

From
Peter Eisentraut
Date:
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@gmx.net



Re: CLUSTER ALL patch

From
Alvaro Herrera
Date:
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)

Re: CLUSTER ALL patch

From
Bruce Momjian
Date:
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@gmx.net
>
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 1: subscribe and unsubscribe commands go to majordomo@postgresql.org
>

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

Re: CLUSTER ALL patch

From
Bruce Momjian
Date:
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@candle.pha.pa.us               |  (610) 359-1001
  +  If your life is a hard drive,     |  13 Roberts Road
  +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073

Re: CLUSTER ALL patch

From
Peter Eisentraut
Date:
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@gmx.net


Re: CLUSTER ALL patch

From
Bruce Momjian
Date:
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@candle.pha.pa.us               |  (610) 359-1001
  +  If your life is a hard drive,     |  13 Roberts Road
  +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073