pg.ddx.io  pgsql-docs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
the doc should mention one particular aspect of partial indexes
3+ messages / 3 participants
[nested] [flat]

* the doc should mention one particular aspect of partial indexes
@ 2021-01-18 17:07 PG Doc comments form <noreply@postgresql.org>
  2021-01-18 20:39 ` Re: the doc should mention one particular aspect of partial indexes Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 1 reply; 3+ messages in thread

From: PG Doc comments form @ 2021-01-18 17:07 UTC (permalink / raw)
  To: pgsql-docs@lists.postgresql.org; +Cc: chaodhib@gmail.com

The following documentation comment has been logged on the website:

Page: https://www.postgresql.org/docs/10/sql-vacuum.html
Description:

Hi,

I think the documentation should mention one particular aspect of b-tree
partial indexes: 
Say we have a row that satisfy a partial index's predicate. That row will be
referenced by the partial index. Say now that this row gets updated in such
a way that the updated row no longer satisfies the predicate. The entry of
that row in the index (more precisely, the row previous version) is still
kept in a leaf node of the b-tree until a VACUUM is issued on the index's
table. 

So in short, an update on the index's predicate column results in no direct
change on the index whereas a change on an index column is reflected as soon
as the change has been committed. I think the documentation should mention
this specificity in some way since it can have impact in terms of index
design. I couldn't find a mention of this behavior anywhere in the doc. 

Kind regards,
Chaouki Dhib


^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: the doc should mention one particular aspect of partial indexes
  2021-01-18 17:07 the doc should mention one particular aspect of partial indexes PG Doc comments form <noreply@postgresql.org>
@ 2021-01-18 20:39 ` Tom Lane <tgl@sss.pgh.pa.us>
  2021-01-19 21:23   ` Re: the doc should mention one particular aspect of partial indexes Chaouki Dhib <chaodhib@gmail.com>
  0 siblings, 1 reply; 3+ messages in thread

From: Tom Lane @ 2021-01-18 20:39 UTC (permalink / raw)
  To: chaodhib@gmail.com; +Cc: pgsql-docs@lists.postgresql.org

PG Doc comments form <noreply@postgresql.org> writes:
> I think the documentation should mention one particular aspect of b-tree
> partial indexes: 
> Say we have a row that satisfy a partial index's predicate. That row will be
> referenced by the partial index. Say now that this row gets updated in such
> a way that the updated row no longer satisfies the predicate. The entry of
> that row in the index (more precisely, the row previous version) is still
> kept in a leaf node of the b-tree until a VACUUM is issued on the index's
> table. 

How is this different from the behavior for any other dead row version?

			regards, tom lane





^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: the doc should mention one particular aspect of partial indexes
  2021-01-18 17:07 the doc should mention one particular aspect of partial indexes PG Doc comments form <noreply@postgresql.org>
  2021-01-18 20:39 ` Re: the doc should mention one particular aspect of partial indexes Tom Lane <tgl@sss.pgh.pa.us>
@ 2021-01-19 21:23   ` Chaouki Dhib <chaodhib@gmail.com>
  0 siblings, 0 replies; 3+ messages in thread

From: Chaouki Dhib @ 2021-01-19 21:23 UTC (permalink / raw)
  To: Tom Lane <tgl@sss.pgh.pa.us>; +Cc: pgsql-docs@lists.postgresql.org

I guess it isn't. My apologies. This is something I ignored about PG
until now. Thank you for your reply.


Le lun. 18 janv. 2021 à 21:39, Tom Lane <tgl@sss.pgh.pa.us> a écrit :
>
> PG Doc comments form <noreply@postgresql.org> writes:
> > I think the documentation should mention one particular aspect of b-tree
> > partial indexes:
> > Say we have a row that satisfy a partial index's predicate. That row will be
> > referenced by the partial index. Say now that this row gets updated in such
> > a way that the updated row no longer satisfies the predicate. The entry of
> > that row in the index (more precisely, the row previous version) is still
> > kept in a leaf node of the b-tree until a VACUUM is issued on the index's
> > table.
>
> How is this different from the behavior for any other dead row version?
>
>                         regards, tom lane





^ permalink  raw  reply  [nested|flat] 3+ messages in thread


end of thread, other threads:[~2021-01-19 21:23 UTC | newest]

Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2021-01-18 17:07 the doc should mention one particular aspect of partial indexes PG Doc comments form <noreply@postgresql.org>
2021-01-18 20:39 ` Tom Lane <tgl@sss.pgh.pa.us>
2021-01-19 21:23   ` Chaouki Dhib <chaodhib@gmail.com>

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