Re: 11.7. Indexes on Expressions

2021-12-22 Thread David G. Johnston
On Fri, Dec 17, 2021 at 2:43 PM Bruce Momjian  wrote:

> I am attaching an updated patch which mentions non-HOT updates for
> expression indexes.
>

Thanks.  I'm a bit concerned that before this patch the only place we
mentioned HOTin the docs is in the appendix acronym listing which points to
the readme file in the source code.

David J.


Re: include_dir - 'if_exists' logic yes or no?

2021-12-22 Thread Euler Taveira
On Tue, Dec 21, 2021, at 6:46 AM, PG Doc comments form wrote:
> include_dir 'directory'
> 
> it it not 100% clear whether the include_dir option also allows 'if_exists'
> funtionality.
> 
> I think a include_dir_if_exists should be possible. 
> If it is it should be expressed specifically in the docs. 
> If the functionality does not exist this should be mentioned very clear
> in the docs also
> 
There is no such directive include_dir_if_exists. Why should the documentation
mention something that isn't implemented? You could suggest a new feature. IMO
no documentation change is required.


--
Euler Taveira
EDB   https://www.enterprisedb.com/


Re: 11.7. Indexes on Expressions

2021-12-22 Thread Bruce Momjian
On Wed, Dec 22, 2021 at 02:40:12PM -0700, David G. Johnston wrote:
> On Fri, Dec 17, 2021 at 2:43 PM Bruce Momjian  wrote:
> 
> I am attaching an updated patch which mentions non-HOT updates for
> expression indexes.
> 
> 
> Thanks.  I'm a bit concerned that before this patch the only place we 
> mentioned
> HOTin the docs is in the appendix acronym listing which points to the readme
> file in the source code.

Uh, I had a similar concern and found these cases:

monitoring.sgml:   Number of rows updated (includes HOT updated 
rows)
monitoring.sgml:   Number of rows HOT updated (i.e., with no 
separate index

Not sure what else we can do --- it would be odd to explain it in the
expression index docs.

-- 
  Bruce Momjian  https://momjian.us
  EDB  https://enterprisedb.com

  If only the physical world exists, free will is an illusion.





Re: 11.7. Indexes on Expressions

2021-12-22 Thread David G. Johnston
On Wed, Dec 22, 2021 at 2:45 PM Bruce Momjian  wrote:

> On Wed, Dec 22, 2021 at 02:40:12PM -0700, David G. Johnston wrote:
> > On Fri, Dec 17, 2021 at 2:43 PM Bruce Momjian  wrote:
> >
> > I am attaching an updated patch which mentions non-HOT updates for
> > expression indexes.
> >
> >
> > Thanks.  I'm a bit concerned that before this patch the only place we
> mentioned
> > HOTin the docs is in the appendix acronym listing which points to the
> readme
> > file in the source code.
>
> Uh, I had a similar concern and found these cases:
>
> monitoring.sgml:   Number of rows updated (includes HOT
> updated rows)
> monitoring.sgml:   Number of rows HOT updated (i.e., with no
> separate index
>
> Not sure what else we can do --- it would be odd to explain it in the
> expression index docs.
>
>
Found another one:

https://www.postgresql.org/docs/current/btree-implementation.html
"...(where most individual updates cannot apply the HOT optimization."

Make the acronym HOT in all these places take the reader to the acronym
page, and add a brief description there so they don't need to consume the
readme file?

David J.


Re: 11.7. Indexes on Expressions

2021-12-22 Thread Bruce Momjian
On Wed, Dec 22, 2021 at 03:06:12PM -0700, David G. Johnston wrote:
> On Wed, Dec 22, 2021 at 2:45 PM Bruce Momjian  wrote:
> Not sure what else we can do --- it would be odd to explain it in the
> expression index docs.
> 
> 
> 
> Found another one:
> 
> https://www.postgresql.org/docs/current/btree-implementation.html
> "...(where most individual updates cannot apply the HOT optimization."
> 
> Make the acronym HOT in all these places take the reader to the acronym page,
> and add a brief description there so they don't need to consume the readme
> file?

Wow, I don't think the acronym page is the right place for this --- I
think we need a new section for this somewhere.

-- 
  Bruce Momjian  https://momjian.us
  EDB  https://enterprisedb.com

  If only the physical world exists, free will is an illusion.





Re: 11.7. Indexes on Expressions

2021-12-22 Thread Bruce Momjian
On Wed, Dec 22, 2021 at 05:09:53PM -0500, Bruce Momjian wrote:
> On Wed, Dec 22, 2021 at 03:06:12PM -0700, David G. Johnston wrote:
> > On Wed, Dec 22, 2021 at 2:45 PM Bruce Momjian  wrote:
> > Not sure what else we can do --- it would be odd to explain it in the
> > expression index docs.
> > 
> > 
> > 
> > Found another one:
> > 
> > https://www.postgresql.org/docs/current/btree-implementation.html
> > "...(where most individual updates cannot apply the HOT optimization."
> > 
> > Make the acronym HOT in all these places take the reader to the acronym 
> > page,
> > and add a brief description there so they don't need to consume the readme
> > file?
> 
> Wow, I don't think the acronym page is the right place for this --- I
> think we need a new section for this somewhere.

I think our _big_ missing information is a definition of HOT updates and
that updating a column involved in an index disables HOT updates.

-- 
  Bruce Momjian  https://momjian.us
  EDB  https://enterprisedb.com

  If only the physical world exists, free will is an illusion.





Re: 11.7. Indexes on Expressions

2021-12-22 Thread David G. Johnston
On Wed, Dec 22, 2021 at 3:09 PM Bruce Momjian  wrote:

> On Wed, Dec 22, 2021 at 03:06:12PM -0700, David G. Johnston wrote:
> > On Wed, Dec 22, 2021 at 2:45 PM Bruce Momjian  wrote:
> > Not sure what else we can do --- it would be odd to explain it in the
> > expression index docs.
> >
> >
> >
> > Found another one:
> >
> > https://www.postgresql.org/docs/current/btree-implementation.html
> > "...(where most individual updates cannot apply the HOT optimization."
> >
> > Make the acronym HOT in all these places take the reader to the acronym
> page,
> > and add a brief description there so they don't need to consume the
> readme
> > file?
>
> Wow, I don't think the acronym page is the right place for this --- I
> think we need a new section for this somewhere.
>
>
I don't disagree, but it also doesn't seem so wrong that it is
unacceptable; and it is minimally invasive.  I don't really see a great
existing place to slot it in.

Now, it seems like it would best fit as a sibling to the other index
internals that we cover - which are all listed on the main table of
contents.  i.e., In the current docs my best choice we be to add a new
Chapter 64 for this.  I would have wished for all of those index chapters
to be in grouped together under "64. Index Internals" and this would just
go in there.  The Database Physical Storage would be Chapter 65.

David J.


Re: 11.7. Indexes on Expressions

2021-12-22 Thread David G. Johnston
On Wed, Dec 22, 2021 at 3:13 PM Bruce Momjian  wrote:

> I think our _big_ missing information is a definition of HOT updates and
> that updating a column involved in an index disables HOT updates.
>

Along those lines adding "51.7 Special Considerations for Updates" would be
minimally invasive.  Having this under "Overview of PostgreSQL Internals"
feels ok.

David J.


Re: 11.7. Indexes on Expressions

2021-12-22 Thread Peter Geoghegan
On Wed, Dec 22, 2021 at 2:13 PM Bruce Momjian  wrote:
> I think our _big_ missing information is a definition of HOT updates and
> that updating a column involved in an index disables HOT updates.

I *strongly* agree that that's the single most important piece of
information, by far. Though we could and should have several
paragraphs about it.

We never get around to explaining HOT at all, which is just bizarre,
considering its importance. Many very popular user-level talks have
mostly just talked about this subject (e.g., a talk from Grant
McAlister from a couple of years back comes to mind).

-- 
Peter Geoghegan