pg.ddx.io pgsql-general@postgresql.org mailing list archive
help / color / mirror / Atom feedCluster and Vacuum Full
2+ messages / 2 participants
[nested] [flat]
* Cluster and Vacuum Full
@ 2020-10-04 23:37 PegoraroF10 <marcos@f10.com.br>
0 siblings, 1 reply; 2+ messages in thread
From: PegoraroF10 @ 2020-10-04 23:37 UTC (permalink / raw)
To: pgsql-general
I have tables which are Master Detail and usually my program loads all detail
records of a master record. So I configured CLUSTER on all those detail
tables to use an index which is the relation with master table. With that I
can load less records to Shared Buffers because all detaild records are on
sequencial pages, that´s fine.
I know that to have this working I have to periodically run CLUSTER, ok too.
But today instead of CLUSTER I just ran VACUUM FULL. How vacuum full
recreates entirelly that table, like cluster does, I thought it would use
that index too, but didn´t. I didn´t see what sequence of records it did but
was not the one I´ve configured with cluster.
Is that expected or Vacuum should obbey cluster configuration ?
--
Sent from: https://www.postgresql-archive.org/PostgreSQL-general-f1843780.html
^ permalink raw reply [nested|flat] 2+ messages in thread
* Re: Cluster and Vacuum Full
@ 2020-10-05 11:14 Guillaume Lelarge <guillaume@lelarge.info>
parent: PegoraroF10 <marcos@f10.com.br>
0 siblings, 0 replies; 2+ messages in thread
From: Guillaume Lelarge @ 2020-10-05 11:14 UTC (permalink / raw)
To: PegoraroF10 <marcos@f10.com.br>; +Cc: pgsql-general
Le lun. 5 oct. 2020 à 12:22, PegoraroF10 <marcos@f10.com.br> a écrit :
> I have tables which are Master Detail and usually my program loads all
> detail
> records of a master record. So I configured CLUSTER on all those detail
> tables to use an index which is the relation with master table. With that I
> can load less records to Shared Buffers because all detaild records are on
> sequencial pages, that´s fine.
>
> I know that to have this working I have to periodically run CLUSTER, ok
> too.
>
> But today instead of CLUSTER I just ran VACUUM FULL. How vacuum full
> recreates entirelly that table, like cluster does, I thought it would use
> that index too, but didn´t. I didn´t see what sequence of records it did
> but
> was not the one I´ve configured with cluster.
>
> Is that expected or Vacuum should obbey cluster configuration ?
>
>
Only CLUSTER obeys cluster configuration. VACUUM FULL in particular doesn't.
--
Guillaume.
^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2020-10-05 11:14 UTC | newest]
Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2020-10-04 23:37 Cluster and Vacuum Full PegoraroF10 <marcos@f10.com.br>
2020-10-05 11:14 ` Guillaume Lelarge <guillaume@lelarge.info>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox