public inbox for [email protected]  
help / color / mirror / Atom feed
[PATCH v6] Highlight vacuum consideration in create index docs
22+ messages / 2 participants
[nested] [flat]

* [PATCH v6] Highlight vacuum consideration in create index docs
@ 2020-11-30 21:50 Alvaro Herrera <[email protected]>
  0 siblings, 0 replies; 22+ messages in thread

From: Alvaro Herrera @ 2020-11-30 21:50 UTC (permalink / raw)

Per James Coleman
---
 doc/src/sgml/ref/create_index.sgml | 5 +++++
 doc/src/sgml/ref/reindex.sgml      | 5 +++++
 2 files changed, 10 insertions(+)

diff --git a/doc/src/sgml/ref/create_index.sgml b/doc/src/sgml/ref/create_index.sgml
index 2054d5d943..d951f14b09 100644
--- a/doc/src/sgml/ref/create_index.sgml
+++ b/doc/src/sgml/ref/create_index.sgml
@@ -829,6 +829,11 @@ Indexes:
    to remove an index.
   </para>
 
+  <para>
+   Like any long-running transaction, <command>CREATE INDEX</command> can
+   affect which tuples can be removed by concurrent <command>VACUUM</command>.
+  </para>
+
   <para>
    Prior releases of <productname>PostgreSQL</productname> also had an
    R-tree index method.  This method has been removed because
diff --git a/doc/src/sgml/ref/reindex.sgml b/doc/src/sgml/ref/reindex.sgml
index 6e1cf06713..ef553f6481 100644
--- a/doc/src/sgml/ref/reindex.sgml
+++ b/doc/src/sgml/ref/reindex.sgml
@@ -436,6 +436,11 @@ Indexes:
     CONCURRENTLY</command> cannot.
    </para>
 
+   <para>
+    Like any long-running transaction, <command>REINDEX</command> can
+    affect which tuples can be removed by concurrent <command>VACUUM</command>.
+   </para>
+
    <para>
     <command>REINDEX SYSTEM</command> does not support
     <command>CONCURRENTLY</command> since system catalogs cannot be reindexed
-- 
2.20.1


--+QahgC5+KEYLbs62--





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

* [PATCH v6] Highlight vacuum consideration in create index docs
@ 2020-11-30 21:50 Alvaro Herrera <[email protected]>
  0 siblings, 0 replies; 22+ messages in thread

From: Alvaro Herrera @ 2020-11-30 21:50 UTC (permalink / raw)

Per James Coleman
---
 doc/src/sgml/ref/create_index.sgml | 5 +++++
 doc/src/sgml/ref/reindex.sgml      | 5 +++++
 2 files changed, 10 insertions(+)

diff --git a/doc/src/sgml/ref/create_index.sgml b/doc/src/sgml/ref/create_index.sgml
index 2054d5d943..d951f14b09 100644
--- a/doc/src/sgml/ref/create_index.sgml
+++ b/doc/src/sgml/ref/create_index.sgml
@@ -829,6 +829,11 @@ Indexes:
    to remove an index.
   </para>
 
+  <para>
+   Like any long-running transaction, <command>CREATE INDEX</command> can
+   affect which tuples can be removed by concurrent <command>VACUUM</command>.
+  </para>
+
   <para>
    Prior releases of <productname>PostgreSQL</productname> also had an
    R-tree index method.  This method has been removed because
diff --git a/doc/src/sgml/ref/reindex.sgml b/doc/src/sgml/ref/reindex.sgml
index 6e1cf06713..ef553f6481 100644
--- a/doc/src/sgml/ref/reindex.sgml
+++ b/doc/src/sgml/ref/reindex.sgml
@@ -436,6 +436,11 @@ Indexes:
     CONCURRENTLY</command> cannot.
    </para>
 
+   <para>
+    Like any long-running transaction, <command>REINDEX</command> can
+    affect which tuples can be removed by concurrent <command>VACUUM</command>.
+   </para>
+
    <para>
     <command>REINDEX SYSTEM</command> does not support
     <command>CONCURRENTLY</command> since system catalogs cannot be reindexed
-- 
2.20.1


--+QahgC5+KEYLbs62--





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

* [PATCH v6] Highlight vacuum consideration in create index docs
@ 2020-11-30 21:50 Alvaro Herrera <[email protected]>
  0 siblings, 0 replies; 22+ messages in thread

From: Alvaro Herrera @ 2020-11-30 21:50 UTC (permalink / raw)

Per James Coleman
---
 doc/src/sgml/ref/create_index.sgml | 5 +++++
 doc/src/sgml/ref/reindex.sgml      | 5 +++++
 2 files changed, 10 insertions(+)

diff --git a/doc/src/sgml/ref/create_index.sgml b/doc/src/sgml/ref/create_index.sgml
index 2054d5d943..d951f14b09 100644
--- a/doc/src/sgml/ref/create_index.sgml
+++ b/doc/src/sgml/ref/create_index.sgml
@@ -829,6 +829,11 @@ Indexes:
    to remove an index.
   </para>
 
+  <para>
+   Like any long-running transaction, <command>CREATE INDEX</command> can
+   affect which tuples can be removed by concurrent <command>VACUUM</command>.
+  </para>
+
   <para>
    Prior releases of <productname>PostgreSQL</productname> also had an
    R-tree index method.  This method has been removed because
diff --git a/doc/src/sgml/ref/reindex.sgml b/doc/src/sgml/ref/reindex.sgml
index 6e1cf06713..ef553f6481 100644
--- a/doc/src/sgml/ref/reindex.sgml
+++ b/doc/src/sgml/ref/reindex.sgml
@@ -436,6 +436,11 @@ Indexes:
     CONCURRENTLY</command> cannot.
    </para>
 
+   <para>
+    Like any long-running transaction, <command>REINDEX</command> can
+    affect which tuples can be removed by concurrent <command>VACUUM</command>.
+   </para>
+
    <para>
     <command>REINDEX SYSTEM</command> does not support
     <command>CONCURRENTLY</command> since system catalogs cannot be reindexed
-- 
2.20.1


--+QahgC5+KEYLbs62--





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

* [PATCH v6] Highlight vacuum consideration in create index docs
@ 2020-11-30 21:50 Alvaro Herrera <[email protected]>
  0 siblings, 0 replies; 22+ messages in thread

From: Alvaro Herrera @ 2020-11-30 21:50 UTC (permalink / raw)

Per James Coleman
---
 doc/src/sgml/ref/create_index.sgml | 5 +++++
 doc/src/sgml/ref/reindex.sgml      | 5 +++++
 2 files changed, 10 insertions(+)

diff --git a/doc/src/sgml/ref/create_index.sgml b/doc/src/sgml/ref/create_index.sgml
index 2054d5d943..d951f14b09 100644
--- a/doc/src/sgml/ref/create_index.sgml
+++ b/doc/src/sgml/ref/create_index.sgml
@@ -829,6 +829,11 @@ Indexes:
    to remove an index.
   </para>
 
+  <para>
+   Like any long-running transaction, <command>CREATE INDEX</command> can
+   affect which tuples can be removed by concurrent <command>VACUUM</command>.
+  </para>
+
   <para>
    Prior releases of <productname>PostgreSQL</productname> also had an
    R-tree index method.  This method has been removed because
diff --git a/doc/src/sgml/ref/reindex.sgml b/doc/src/sgml/ref/reindex.sgml
index 6e1cf06713..ef553f6481 100644
--- a/doc/src/sgml/ref/reindex.sgml
+++ b/doc/src/sgml/ref/reindex.sgml
@@ -436,6 +436,11 @@ Indexes:
     CONCURRENTLY</command> cannot.
    </para>
 
+   <para>
+    Like any long-running transaction, <command>REINDEX</command> can
+    affect which tuples can be removed by concurrent <command>VACUUM</command>.
+   </para>
+
    <para>
     <command>REINDEX SYSTEM</command> does not support
     <command>CONCURRENTLY</command> since system catalogs cannot be reindexed
-- 
2.20.1


--+QahgC5+KEYLbs62--





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

* [PATCH v6] Highlight vacuum consideration in create index docs
@ 2020-11-30 21:50 Alvaro Herrera <[email protected]>
  0 siblings, 0 replies; 22+ messages in thread

From: Alvaro Herrera @ 2020-11-30 21:50 UTC (permalink / raw)

Per James Coleman
---
 doc/src/sgml/ref/create_index.sgml | 5 +++++
 doc/src/sgml/ref/reindex.sgml      | 5 +++++
 2 files changed, 10 insertions(+)

diff --git a/doc/src/sgml/ref/create_index.sgml b/doc/src/sgml/ref/create_index.sgml
index 2054d5d943..d951f14b09 100644
--- a/doc/src/sgml/ref/create_index.sgml
+++ b/doc/src/sgml/ref/create_index.sgml
@@ -829,6 +829,11 @@ Indexes:
    to remove an index.
   </para>
 
+  <para>
+   Like any long-running transaction, <command>CREATE INDEX</command> can
+   affect which tuples can be removed by concurrent <command>VACUUM</command>.
+  </para>
+
   <para>
    Prior releases of <productname>PostgreSQL</productname> also had an
    R-tree index method.  This method has been removed because
diff --git a/doc/src/sgml/ref/reindex.sgml b/doc/src/sgml/ref/reindex.sgml
index 6e1cf06713..ef553f6481 100644
--- a/doc/src/sgml/ref/reindex.sgml
+++ b/doc/src/sgml/ref/reindex.sgml
@@ -436,6 +436,11 @@ Indexes:
     CONCURRENTLY</command> cannot.
    </para>
 
+   <para>
+    Like any long-running transaction, <command>REINDEX</command> can
+    affect which tuples can be removed by concurrent <command>VACUUM</command>.
+   </para>
+
    <para>
     <command>REINDEX SYSTEM</command> does not support
     <command>CONCURRENTLY</command> since system catalogs cannot be reindexed
-- 
2.20.1


--+QahgC5+KEYLbs62--





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

* [PATCH v6] Highlight vacuum consideration in create index docs
@ 2020-11-30 21:50 Alvaro Herrera <[email protected]>
  0 siblings, 0 replies; 22+ messages in thread

From: Alvaro Herrera @ 2020-11-30 21:50 UTC (permalink / raw)

Per James Coleman
---
 doc/src/sgml/ref/create_index.sgml | 5 +++++
 doc/src/sgml/ref/reindex.sgml      | 5 +++++
 2 files changed, 10 insertions(+)

diff --git a/doc/src/sgml/ref/create_index.sgml b/doc/src/sgml/ref/create_index.sgml
index 2054d5d943..d951f14b09 100644
--- a/doc/src/sgml/ref/create_index.sgml
+++ b/doc/src/sgml/ref/create_index.sgml
@@ -829,6 +829,11 @@ Indexes:
    to remove an index.
   </para>
 
+  <para>
+   Like any long-running transaction, <command>CREATE INDEX</command> can
+   affect which tuples can be removed by concurrent <command>VACUUM</command>.
+  </para>
+
   <para>
    Prior releases of <productname>PostgreSQL</productname> also had an
    R-tree index method.  This method has been removed because
diff --git a/doc/src/sgml/ref/reindex.sgml b/doc/src/sgml/ref/reindex.sgml
index 6e1cf06713..ef553f6481 100644
--- a/doc/src/sgml/ref/reindex.sgml
+++ b/doc/src/sgml/ref/reindex.sgml
@@ -436,6 +436,11 @@ Indexes:
     CONCURRENTLY</command> cannot.
    </para>
 
+   <para>
+    Like any long-running transaction, <command>REINDEX</command> can
+    affect which tuples can be removed by concurrent <command>VACUUM</command>.
+   </para>
+
    <para>
     <command>REINDEX SYSTEM</command> does not support
     <command>CONCURRENTLY</command> since system catalogs cannot be reindexed
-- 
2.20.1


--+QahgC5+KEYLbs62--





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

* [PATCH v6] Highlight vacuum consideration in create index docs
@ 2020-11-30 21:50 Alvaro Herrera <[email protected]>
  0 siblings, 0 replies; 22+ messages in thread

From: Alvaro Herrera @ 2020-11-30 21:50 UTC (permalink / raw)

Per James Coleman
---
 doc/src/sgml/ref/create_index.sgml | 5 +++++
 doc/src/sgml/ref/reindex.sgml      | 5 +++++
 2 files changed, 10 insertions(+)

diff --git a/doc/src/sgml/ref/create_index.sgml b/doc/src/sgml/ref/create_index.sgml
index 2054d5d943..d951f14b09 100644
--- a/doc/src/sgml/ref/create_index.sgml
+++ b/doc/src/sgml/ref/create_index.sgml
@@ -829,6 +829,11 @@ Indexes:
    to remove an index.
   </para>
 
+  <para>
+   Like any long-running transaction, <command>CREATE INDEX</command> can
+   affect which tuples can be removed by concurrent <command>VACUUM</command>.
+  </para>
+
   <para>
    Prior releases of <productname>PostgreSQL</productname> also had an
    R-tree index method.  This method has been removed because
diff --git a/doc/src/sgml/ref/reindex.sgml b/doc/src/sgml/ref/reindex.sgml
index 6e1cf06713..ef553f6481 100644
--- a/doc/src/sgml/ref/reindex.sgml
+++ b/doc/src/sgml/ref/reindex.sgml
@@ -436,6 +436,11 @@ Indexes:
     CONCURRENTLY</command> cannot.
    </para>
 
+   <para>
+    Like any long-running transaction, <command>REINDEX</command> can
+    affect which tuples can be removed by concurrent <command>VACUUM</command>.
+   </para>
+
    <para>
     <command>REINDEX SYSTEM</command> does not support
     <command>CONCURRENTLY</command> since system catalogs cannot be reindexed
-- 
2.20.1


--+QahgC5+KEYLbs62--





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

* [PATCH v6] Highlight vacuum consideration in create index docs
@ 2020-11-30 21:50 Alvaro Herrera <[email protected]>
  0 siblings, 0 replies; 22+ messages in thread

From: Alvaro Herrera @ 2020-11-30 21:50 UTC (permalink / raw)

Per James Coleman
---
 doc/src/sgml/ref/create_index.sgml | 5 +++++
 doc/src/sgml/ref/reindex.sgml      | 5 +++++
 2 files changed, 10 insertions(+)

diff --git a/doc/src/sgml/ref/create_index.sgml b/doc/src/sgml/ref/create_index.sgml
index 2054d5d943..d951f14b09 100644
--- a/doc/src/sgml/ref/create_index.sgml
+++ b/doc/src/sgml/ref/create_index.sgml
@@ -829,6 +829,11 @@ Indexes:
    to remove an index.
   </para>
 
+  <para>
+   Like any long-running transaction, <command>CREATE INDEX</command> can
+   affect which tuples can be removed by concurrent <command>VACUUM</command>.
+  </para>
+
   <para>
    Prior releases of <productname>PostgreSQL</productname> also had an
    R-tree index method.  This method has been removed because
diff --git a/doc/src/sgml/ref/reindex.sgml b/doc/src/sgml/ref/reindex.sgml
index 6e1cf06713..ef553f6481 100644
--- a/doc/src/sgml/ref/reindex.sgml
+++ b/doc/src/sgml/ref/reindex.sgml
@@ -436,6 +436,11 @@ Indexes:
     CONCURRENTLY</command> cannot.
    </para>
 
+   <para>
+    Like any long-running transaction, <command>REINDEX</command> can
+    affect which tuples can be removed by concurrent <command>VACUUM</command>.
+   </para>
+
    <para>
     <command>REINDEX SYSTEM</command> does not support
     <command>CONCURRENTLY</command> since system catalogs cannot be reindexed
-- 
2.20.1


--+QahgC5+KEYLbs62--





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

* [PATCH v6] Highlight vacuum consideration in create index docs
@ 2020-11-30 21:50 Alvaro Herrera <[email protected]>
  0 siblings, 0 replies; 22+ messages in thread

From: Alvaro Herrera @ 2020-11-30 21:50 UTC (permalink / raw)

Per James Coleman
---
 doc/src/sgml/ref/create_index.sgml | 5 +++++
 doc/src/sgml/ref/reindex.sgml      | 5 +++++
 2 files changed, 10 insertions(+)

diff --git a/doc/src/sgml/ref/create_index.sgml b/doc/src/sgml/ref/create_index.sgml
index 2054d5d943..d951f14b09 100644
--- a/doc/src/sgml/ref/create_index.sgml
+++ b/doc/src/sgml/ref/create_index.sgml
@@ -829,6 +829,11 @@ Indexes:
    to remove an index.
   </para>
 
+  <para>
+   Like any long-running transaction, <command>CREATE INDEX</command> can
+   affect which tuples can be removed by concurrent <command>VACUUM</command>.
+  </para>
+
   <para>
    Prior releases of <productname>PostgreSQL</productname> also had an
    R-tree index method.  This method has been removed because
diff --git a/doc/src/sgml/ref/reindex.sgml b/doc/src/sgml/ref/reindex.sgml
index 6e1cf06713..ef553f6481 100644
--- a/doc/src/sgml/ref/reindex.sgml
+++ b/doc/src/sgml/ref/reindex.sgml
@@ -436,6 +436,11 @@ Indexes:
     CONCURRENTLY</command> cannot.
    </para>
 
+   <para>
+    Like any long-running transaction, <command>REINDEX</command> can
+    affect which tuples can be removed by concurrent <command>VACUUM</command>.
+   </para>
+
    <para>
     <command>REINDEX SYSTEM</command> does not support
     <command>CONCURRENTLY</command> since system catalogs cannot be reindexed
-- 
2.20.1


--+QahgC5+KEYLbs62--





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

* [PATCH v6] Highlight vacuum consideration in create index docs
@ 2020-11-30 21:50 Alvaro Herrera <[email protected]>
  0 siblings, 0 replies; 22+ messages in thread

From: Alvaro Herrera @ 2020-11-30 21:50 UTC (permalink / raw)

Per James Coleman
---
 doc/src/sgml/ref/create_index.sgml | 5 +++++
 doc/src/sgml/ref/reindex.sgml      | 5 +++++
 2 files changed, 10 insertions(+)

diff --git a/doc/src/sgml/ref/create_index.sgml b/doc/src/sgml/ref/create_index.sgml
index 2054d5d943..d951f14b09 100644
--- a/doc/src/sgml/ref/create_index.sgml
+++ b/doc/src/sgml/ref/create_index.sgml
@@ -829,6 +829,11 @@ Indexes:
    to remove an index.
   </para>
 
+  <para>
+   Like any long-running transaction, <command>CREATE INDEX</command> can
+   affect which tuples can be removed by concurrent <command>VACUUM</command>.
+  </para>
+
   <para>
    Prior releases of <productname>PostgreSQL</productname> also had an
    R-tree index method.  This method has been removed because
diff --git a/doc/src/sgml/ref/reindex.sgml b/doc/src/sgml/ref/reindex.sgml
index 6e1cf06713..ef553f6481 100644
--- a/doc/src/sgml/ref/reindex.sgml
+++ b/doc/src/sgml/ref/reindex.sgml
@@ -436,6 +436,11 @@ Indexes:
     CONCURRENTLY</command> cannot.
    </para>
 
+   <para>
+    Like any long-running transaction, <command>REINDEX</command> can
+    affect which tuples can be removed by concurrent <command>VACUUM</command>.
+   </para>
+
    <para>
     <command>REINDEX SYSTEM</command> does not support
     <command>CONCURRENTLY</command> since system catalogs cannot be reindexed
-- 
2.20.1


--+QahgC5+KEYLbs62--





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

* [PATCH v6] Highlight vacuum consideration in create index docs
@ 2020-11-30 21:50 Alvaro Herrera <[email protected]>
  0 siblings, 0 replies; 22+ messages in thread

From: Alvaro Herrera @ 2020-11-30 21:50 UTC (permalink / raw)

Per James Coleman
---
 doc/src/sgml/ref/create_index.sgml | 5 +++++
 doc/src/sgml/ref/reindex.sgml      | 5 +++++
 2 files changed, 10 insertions(+)

diff --git a/doc/src/sgml/ref/create_index.sgml b/doc/src/sgml/ref/create_index.sgml
index 2054d5d943..d951f14b09 100644
--- a/doc/src/sgml/ref/create_index.sgml
+++ b/doc/src/sgml/ref/create_index.sgml
@@ -829,6 +829,11 @@ Indexes:
    to remove an index.
   </para>
 
+  <para>
+   Like any long-running transaction, <command>CREATE INDEX</command> can
+   affect which tuples can be removed by concurrent <command>VACUUM</command>.
+  </para>
+
   <para>
    Prior releases of <productname>PostgreSQL</productname> also had an
    R-tree index method.  This method has been removed because
diff --git a/doc/src/sgml/ref/reindex.sgml b/doc/src/sgml/ref/reindex.sgml
index 6e1cf06713..ef553f6481 100644
--- a/doc/src/sgml/ref/reindex.sgml
+++ b/doc/src/sgml/ref/reindex.sgml
@@ -436,6 +436,11 @@ Indexes:
     CONCURRENTLY</command> cannot.
    </para>
 
+   <para>
+    Like any long-running transaction, <command>REINDEX</command> can
+    affect which tuples can be removed by concurrent <command>VACUUM</command>.
+   </para>
+
    <para>
     <command>REINDEX SYSTEM</command> does not support
     <command>CONCURRENTLY</command> since system catalogs cannot be reindexed
-- 
2.20.1


--+QahgC5+KEYLbs62--





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

* [PATCH v6] Highlight vacuum consideration in create index docs
@ 2020-11-30 21:50 Alvaro Herrera <[email protected]>
  0 siblings, 0 replies; 22+ messages in thread

From: Alvaro Herrera @ 2020-11-30 21:50 UTC (permalink / raw)

Per James Coleman
---
 doc/src/sgml/ref/create_index.sgml | 5 +++++
 doc/src/sgml/ref/reindex.sgml      | 5 +++++
 2 files changed, 10 insertions(+)

diff --git a/doc/src/sgml/ref/create_index.sgml b/doc/src/sgml/ref/create_index.sgml
index 2054d5d943..d951f14b09 100644
--- a/doc/src/sgml/ref/create_index.sgml
+++ b/doc/src/sgml/ref/create_index.sgml
@@ -829,6 +829,11 @@ Indexes:
    to remove an index.
   </para>
 
+  <para>
+   Like any long-running transaction, <command>CREATE INDEX</command> can
+   affect which tuples can be removed by concurrent <command>VACUUM</command>.
+  </para>
+
   <para>
    Prior releases of <productname>PostgreSQL</productname> also had an
    R-tree index method.  This method has been removed because
diff --git a/doc/src/sgml/ref/reindex.sgml b/doc/src/sgml/ref/reindex.sgml
index 6e1cf06713..ef553f6481 100644
--- a/doc/src/sgml/ref/reindex.sgml
+++ b/doc/src/sgml/ref/reindex.sgml
@@ -436,6 +436,11 @@ Indexes:
     CONCURRENTLY</command> cannot.
    </para>
 
+   <para>
+    Like any long-running transaction, <command>REINDEX</command> can
+    affect which tuples can be removed by concurrent <command>VACUUM</command>.
+   </para>
+
    <para>
     <command>REINDEX SYSTEM</command> does not support
     <command>CONCURRENTLY</command> since system catalogs cannot be reindexed
-- 
2.20.1


--+QahgC5+KEYLbs62--





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

* [PATCH v6] Highlight vacuum consideration in create index docs
@ 2020-11-30 21:50 Alvaro Herrera <[email protected]>
  0 siblings, 0 replies; 22+ messages in thread

From: Alvaro Herrera @ 2020-11-30 21:50 UTC (permalink / raw)

Per James Coleman
---
 doc/src/sgml/ref/create_index.sgml | 5 +++++
 doc/src/sgml/ref/reindex.sgml      | 5 +++++
 2 files changed, 10 insertions(+)

diff --git a/doc/src/sgml/ref/create_index.sgml b/doc/src/sgml/ref/create_index.sgml
index 2054d5d943..d951f14b09 100644
--- a/doc/src/sgml/ref/create_index.sgml
+++ b/doc/src/sgml/ref/create_index.sgml
@@ -829,6 +829,11 @@ Indexes:
    to remove an index.
   </para>
 
+  <para>
+   Like any long-running transaction, <command>CREATE INDEX</command> can
+   affect which tuples can be removed by concurrent <command>VACUUM</command>.
+  </para>
+
   <para>
    Prior releases of <productname>PostgreSQL</productname> also had an
    R-tree index method.  This method has been removed because
diff --git a/doc/src/sgml/ref/reindex.sgml b/doc/src/sgml/ref/reindex.sgml
index 6e1cf06713..ef553f6481 100644
--- a/doc/src/sgml/ref/reindex.sgml
+++ b/doc/src/sgml/ref/reindex.sgml
@@ -436,6 +436,11 @@ Indexes:
     CONCURRENTLY</command> cannot.
    </para>
 
+   <para>
+    Like any long-running transaction, <command>REINDEX</command> can
+    affect which tuples can be removed by concurrent <command>VACUUM</command>.
+   </para>
+
    <para>
     <command>REINDEX SYSTEM</command> does not support
     <command>CONCURRENTLY</command> since system catalogs cannot be reindexed
-- 
2.20.1


--+QahgC5+KEYLbs62--





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

* [PATCH v6] Highlight vacuum consideration in create index docs
@ 2020-11-30 21:50 Alvaro Herrera <[email protected]>
  0 siblings, 0 replies; 22+ messages in thread

From: Alvaro Herrera @ 2020-11-30 21:50 UTC (permalink / raw)

Per James Coleman
---
 doc/src/sgml/ref/create_index.sgml | 5 +++++
 doc/src/sgml/ref/reindex.sgml      | 5 +++++
 2 files changed, 10 insertions(+)

diff --git a/doc/src/sgml/ref/create_index.sgml b/doc/src/sgml/ref/create_index.sgml
index 2054d5d943..d951f14b09 100644
--- a/doc/src/sgml/ref/create_index.sgml
+++ b/doc/src/sgml/ref/create_index.sgml
@@ -829,6 +829,11 @@ Indexes:
    to remove an index.
   </para>
 
+  <para>
+   Like any long-running transaction, <command>CREATE INDEX</command> can
+   affect which tuples can be removed by concurrent <command>VACUUM</command>.
+  </para>
+
   <para>
    Prior releases of <productname>PostgreSQL</productname> also had an
    R-tree index method.  This method has been removed because
diff --git a/doc/src/sgml/ref/reindex.sgml b/doc/src/sgml/ref/reindex.sgml
index 6e1cf06713..ef553f6481 100644
--- a/doc/src/sgml/ref/reindex.sgml
+++ b/doc/src/sgml/ref/reindex.sgml
@@ -436,6 +436,11 @@ Indexes:
     CONCURRENTLY</command> cannot.
    </para>
 
+   <para>
+    Like any long-running transaction, <command>REINDEX</command> can
+    affect which tuples can be removed by concurrent <command>VACUUM</command>.
+   </para>
+
    <para>
     <command>REINDEX SYSTEM</command> does not support
     <command>CONCURRENTLY</command> since system catalogs cannot be reindexed
-- 
2.20.1


--+QahgC5+KEYLbs62--





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

* [PATCH v6] Highlight vacuum consideration in create index docs
@ 2020-11-30 21:50 Alvaro Herrera <[email protected]>
  0 siblings, 0 replies; 22+ messages in thread

From: Alvaro Herrera @ 2020-11-30 21:50 UTC (permalink / raw)

Per James Coleman
---
 doc/src/sgml/ref/create_index.sgml | 5 +++++
 doc/src/sgml/ref/reindex.sgml      | 5 +++++
 2 files changed, 10 insertions(+)

diff --git a/doc/src/sgml/ref/create_index.sgml b/doc/src/sgml/ref/create_index.sgml
index 2054d5d943..d951f14b09 100644
--- a/doc/src/sgml/ref/create_index.sgml
+++ b/doc/src/sgml/ref/create_index.sgml
@@ -829,6 +829,11 @@ Indexes:
    to remove an index.
   </para>
 
+  <para>
+   Like any long-running transaction, <command>CREATE INDEX</command> can
+   affect which tuples can be removed by concurrent <command>VACUUM</command>.
+  </para>
+
   <para>
    Prior releases of <productname>PostgreSQL</productname> also had an
    R-tree index method.  This method has been removed because
diff --git a/doc/src/sgml/ref/reindex.sgml b/doc/src/sgml/ref/reindex.sgml
index 6e1cf06713..ef553f6481 100644
--- a/doc/src/sgml/ref/reindex.sgml
+++ b/doc/src/sgml/ref/reindex.sgml
@@ -436,6 +436,11 @@ Indexes:
     CONCURRENTLY</command> cannot.
    </para>
 
+   <para>
+    Like any long-running transaction, <command>REINDEX</command> can
+    affect which tuples can be removed by concurrent <command>VACUUM</command>.
+   </para>
+
    <para>
     <command>REINDEX SYSTEM</command> does not support
     <command>CONCURRENTLY</command> since system catalogs cannot be reindexed
-- 
2.20.1


--+QahgC5+KEYLbs62--





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

* [PATCH v6] Highlight vacuum consideration in create index docs
@ 2020-11-30 21:50 Alvaro Herrera <[email protected]>
  0 siblings, 0 replies; 22+ messages in thread

From: Alvaro Herrera @ 2020-11-30 21:50 UTC (permalink / raw)

Per James Coleman
---
 doc/src/sgml/ref/create_index.sgml | 5 +++++
 doc/src/sgml/ref/reindex.sgml      | 5 +++++
 2 files changed, 10 insertions(+)

diff --git a/doc/src/sgml/ref/create_index.sgml b/doc/src/sgml/ref/create_index.sgml
index 2054d5d943..d951f14b09 100644
--- a/doc/src/sgml/ref/create_index.sgml
+++ b/doc/src/sgml/ref/create_index.sgml
@@ -829,6 +829,11 @@ Indexes:
    to remove an index.
   </para>
 
+  <para>
+   Like any long-running transaction, <command>CREATE INDEX</command> can
+   affect which tuples can be removed by concurrent <command>VACUUM</command>.
+  </para>
+
   <para>
    Prior releases of <productname>PostgreSQL</productname> also had an
    R-tree index method.  This method has been removed because
diff --git a/doc/src/sgml/ref/reindex.sgml b/doc/src/sgml/ref/reindex.sgml
index 6e1cf06713..ef553f6481 100644
--- a/doc/src/sgml/ref/reindex.sgml
+++ b/doc/src/sgml/ref/reindex.sgml
@@ -436,6 +436,11 @@ Indexes:
     CONCURRENTLY</command> cannot.
    </para>
 
+   <para>
+    Like any long-running transaction, <command>REINDEX</command> can
+    affect which tuples can be removed by concurrent <command>VACUUM</command>.
+   </para>
+
    <para>
     <command>REINDEX SYSTEM</command> does not support
     <command>CONCURRENTLY</command> since system catalogs cannot be reindexed
-- 
2.20.1


--+QahgC5+KEYLbs62--





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

* [PATCH v6] Highlight vacuum consideration in create index docs
@ 2020-11-30 21:50 Alvaro Herrera <[email protected]>
  0 siblings, 0 replies; 22+ messages in thread

From: Alvaro Herrera @ 2020-11-30 21:50 UTC (permalink / raw)

Per James Coleman
---
 doc/src/sgml/ref/create_index.sgml | 5 +++++
 doc/src/sgml/ref/reindex.sgml      | 5 +++++
 2 files changed, 10 insertions(+)

diff --git a/doc/src/sgml/ref/create_index.sgml b/doc/src/sgml/ref/create_index.sgml
index 2054d5d943..d951f14b09 100644
--- a/doc/src/sgml/ref/create_index.sgml
+++ b/doc/src/sgml/ref/create_index.sgml
@@ -829,6 +829,11 @@ Indexes:
    to remove an index.
   </para>
 
+  <para>
+   Like any long-running transaction, <command>CREATE INDEX</command> can
+   affect which tuples can be removed by concurrent <command>VACUUM</command>.
+  </para>
+
   <para>
    Prior releases of <productname>PostgreSQL</productname> also had an
    R-tree index method.  This method has been removed because
diff --git a/doc/src/sgml/ref/reindex.sgml b/doc/src/sgml/ref/reindex.sgml
index 6e1cf06713..ef553f6481 100644
--- a/doc/src/sgml/ref/reindex.sgml
+++ b/doc/src/sgml/ref/reindex.sgml
@@ -436,6 +436,11 @@ Indexes:
     CONCURRENTLY</command> cannot.
    </para>
 
+   <para>
+    Like any long-running transaction, <command>REINDEX</command> can
+    affect which tuples can be removed by concurrent <command>VACUUM</command>.
+   </para>
+
    <para>
     <command>REINDEX SYSTEM</command> does not support
     <command>CONCURRENTLY</command> since system catalogs cannot be reindexed
-- 
2.20.1


--+QahgC5+KEYLbs62--





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

* [PATCH v6] Highlight vacuum consideration in create index docs
@ 2020-11-30 21:50 Alvaro Herrera <[email protected]>
  0 siblings, 0 replies; 22+ messages in thread

From: Alvaro Herrera @ 2020-11-30 21:50 UTC (permalink / raw)

Per James Coleman
---
 doc/src/sgml/ref/create_index.sgml | 5 +++++
 doc/src/sgml/ref/reindex.sgml      | 5 +++++
 2 files changed, 10 insertions(+)

diff --git a/doc/src/sgml/ref/create_index.sgml b/doc/src/sgml/ref/create_index.sgml
index 2054d5d943..d951f14b09 100644
--- a/doc/src/sgml/ref/create_index.sgml
+++ b/doc/src/sgml/ref/create_index.sgml
@@ -829,6 +829,11 @@ Indexes:
    to remove an index.
   </para>
 
+  <para>
+   Like any long-running transaction, <command>CREATE INDEX</command> can
+   affect which tuples can be removed by concurrent <command>VACUUM</command>.
+  </para>
+
   <para>
    Prior releases of <productname>PostgreSQL</productname> also had an
    R-tree index method.  This method has been removed because
diff --git a/doc/src/sgml/ref/reindex.sgml b/doc/src/sgml/ref/reindex.sgml
index 6e1cf06713..ef553f6481 100644
--- a/doc/src/sgml/ref/reindex.sgml
+++ b/doc/src/sgml/ref/reindex.sgml
@@ -436,6 +436,11 @@ Indexes:
     CONCURRENTLY</command> cannot.
    </para>
 
+   <para>
+    Like any long-running transaction, <command>REINDEX</command> can
+    affect which tuples can be removed by concurrent <command>VACUUM</command>.
+   </para>
+
    <para>
     <command>REINDEX SYSTEM</command> does not support
     <command>CONCURRENTLY</command> since system catalogs cannot be reindexed
-- 
2.20.1


--+QahgC5+KEYLbs62--





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

* [PATCH v6] Highlight vacuum consideration in create index docs
@ 2020-11-30 21:50 Alvaro Herrera <[email protected]>
  0 siblings, 0 replies; 22+ messages in thread

From: Alvaro Herrera @ 2020-11-30 21:50 UTC (permalink / raw)

Per James Coleman
---
 doc/src/sgml/ref/create_index.sgml | 5 +++++
 doc/src/sgml/ref/reindex.sgml      | 5 +++++
 2 files changed, 10 insertions(+)

diff --git a/doc/src/sgml/ref/create_index.sgml b/doc/src/sgml/ref/create_index.sgml
index 2054d5d943..d951f14b09 100644
--- a/doc/src/sgml/ref/create_index.sgml
+++ b/doc/src/sgml/ref/create_index.sgml
@@ -829,6 +829,11 @@ Indexes:
    to remove an index.
   </para>
 
+  <para>
+   Like any long-running transaction, <command>CREATE INDEX</command> can
+   affect which tuples can be removed by concurrent <command>VACUUM</command>.
+  </para>
+
   <para>
    Prior releases of <productname>PostgreSQL</productname> also had an
    R-tree index method.  This method has been removed because
diff --git a/doc/src/sgml/ref/reindex.sgml b/doc/src/sgml/ref/reindex.sgml
index 6e1cf06713..ef553f6481 100644
--- a/doc/src/sgml/ref/reindex.sgml
+++ b/doc/src/sgml/ref/reindex.sgml
@@ -436,6 +436,11 @@ Indexes:
     CONCURRENTLY</command> cannot.
    </para>
 
+   <para>
+    Like any long-running transaction, <command>REINDEX</command> can
+    affect which tuples can be removed by concurrent <command>VACUUM</command>.
+   </para>
+
    <para>
     <command>REINDEX SYSTEM</command> does not support
     <command>CONCURRENTLY</command> since system catalogs cannot be reindexed
-- 
2.20.1


--+QahgC5+KEYLbs62--





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

* [PATCH v6] Highlight vacuum consideration in create index docs
@ 2020-11-30 21:50 Alvaro Herrera <[email protected]>
  0 siblings, 0 replies; 22+ messages in thread

From: Alvaro Herrera @ 2020-11-30 21:50 UTC (permalink / raw)

Per James Coleman
---
 doc/src/sgml/ref/create_index.sgml | 5 +++++
 doc/src/sgml/ref/reindex.sgml      | 5 +++++
 2 files changed, 10 insertions(+)

diff --git a/doc/src/sgml/ref/create_index.sgml b/doc/src/sgml/ref/create_index.sgml
index 2054d5d943..d951f14b09 100644
--- a/doc/src/sgml/ref/create_index.sgml
+++ b/doc/src/sgml/ref/create_index.sgml
@@ -829,6 +829,11 @@ Indexes:
    to remove an index.
   </para>
 
+  <para>
+   Like any long-running transaction, <command>CREATE INDEX</command> can
+   affect which tuples can be removed by concurrent <command>VACUUM</command>.
+  </para>
+
   <para>
    Prior releases of <productname>PostgreSQL</productname> also had an
    R-tree index method.  This method has been removed because
diff --git a/doc/src/sgml/ref/reindex.sgml b/doc/src/sgml/ref/reindex.sgml
index 6e1cf06713..ef553f6481 100644
--- a/doc/src/sgml/ref/reindex.sgml
+++ b/doc/src/sgml/ref/reindex.sgml
@@ -436,6 +436,11 @@ Indexes:
     CONCURRENTLY</command> cannot.
    </para>
 
+   <para>
+    Like any long-running transaction, <command>REINDEX</command> can
+    affect which tuples can be removed by concurrent <command>VACUUM</command>.
+   </para>
+
    <para>
     <command>REINDEX SYSTEM</command> does not support
     <command>CONCURRENTLY</command> since system catalogs cannot be reindexed
-- 
2.20.1


--+QahgC5+KEYLbs62--





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

* [PATCH v6] Highlight vacuum consideration in create index docs
@ 2020-11-30 21:50 Alvaro Herrera <[email protected]>
  0 siblings, 0 replies; 22+ messages in thread

From: Alvaro Herrera @ 2020-11-30 21:50 UTC (permalink / raw)

Per James Coleman
---
 doc/src/sgml/ref/create_index.sgml | 5 +++++
 doc/src/sgml/ref/reindex.sgml      | 5 +++++
 2 files changed, 10 insertions(+)

diff --git a/doc/src/sgml/ref/create_index.sgml b/doc/src/sgml/ref/create_index.sgml
index 2054d5d943..d951f14b09 100644
--- a/doc/src/sgml/ref/create_index.sgml
+++ b/doc/src/sgml/ref/create_index.sgml
@@ -829,6 +829,11 @@ Indexes:
    to remove an index.
   </para>
 
+  <para>
+   Like any long-running transaction, <command>CREATE INDEX</command> can
+   affect which tuples can be removed by concurrent <command>VACUUM</command>.
+  </para>
+
   <para>
    Prior releases of <productname>PostgreSQL</productname> also had an
    R-tree index method.  This method has been removed because
diff --git a/doc/src/sgml/ref/reindex.sgml b/doc/src/sgml/ref/reindex.sgml
index 6e1cf06713..ef553f6481 100644
--- a/doc/src/sgml/ref/reindex.sgml
+++ b/doc/src/sgml/ref/reindex.sgml
@@ -436,6 +436,11 @@ Indexes:
     CONCURRENTLY</command> cannot.
    </para>
 
+   <para>
+    Like any long-running transaction, <command>REINDEX</command> can
+    affect which tuples can be removed by concurrent <command>VACUUM</command>.
+   </para>
+
    <para>
     <command>REINDEX SYSTEM</command> does not support
     <command>CONCURRENTLY</command> since system catalogs cannot be reindexed
-- 
2.20.1


--+QahgC5+KEYLbs62--





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

* Re: adjust_limit_rows_costs algorithm
@ 2024-12-25 16:11 Heikki Linnakangas <[email protected]>
  0 siblings, 0 replies; 22+ messages in thread

From: Heikki Linnakangas @ 2024-12-25 16:11 UTC (permalink / raw)
  To: wenhui qiu <[email protected]>; pgsql-hackers

On 24/12/2024 08:20, wenhui qiu wrote:
> sysbench=# explain analyze  select userid from dba_users where  username 
> like '%aaaaaaaaaaaa%' order by userid limit 1;
>                                                                   QUERY PLAN
> ---------------------------------------------------------------------------------------------------------------------------------------------
>   Limit  (cost=0.43..408.59 rows=1 width=4) (actual 
> time=1433.469..1433.470 rows=0 loops=1)
>     ->  Index Scan using dba_users_pkey on dba_users 
>   (cost=0.43..244892.51 rows=600 width=4) (actual 
> time=1433.468..1433.468 rows=0 loops=1)
>           Filter: ((username)::text ~~ '%aaaaaaaaaaaa%'::text)
>           Rows Removed by Filter: 6000000
>   Planning Time: 0.384 ms
>   Execution Time: 1433.489 ms
> (6 rows)

The problem seems to be that the planner estimates the LIKE qual to 
match 600 rows, but in reality it matches 0.

> I think the total_cost calculation method cannot be linear, because the 
> data distribution is not linear in reality. I try to change it to a 
> logarithmic

Why? I don't see anything wrong with the LIMIT estimation here.

One factor here is that the execution time of the Index Scan + Limit 
plan depends heavily on whether there are 0 matches, or more. With 0 
matches, the Index Scans needs to scan the whole table. With 1 rows, it 
needs to scan just half of the table on average before finding the 
match. With 10 rows, just 10 % of the table, and so forth. So the 
execution time is indeed highly non-linear depending on whether there 
are any matches or not. Is that what you meant?

It'd be nice to somehow take that non-linearity into account in the 
estimation. But I don't know how, and I don't think that change in LIMIT 
estimation is the right way.

> The reality may be more complicated, I mean there is no better way for 
> the community leaders to solve this problem, because the community will 
> never say no to the hint, and there are so many such problems

It's a difficult topic because "hints" mean different things to 
different people. Meanwhile, we have added things like "ALTER FUNCTION 
... ROWS <rows>" and support functions which can do more accurate 
estimation of functions. That's a kind of a hint. If someone comes up 
with more ways to help the planner with selectivity estimation, it's 
worth considering.

Or maybe you could improve the selectivity estimator of the LIKE 
operator to be more accurate to begin with.

-- 
Heikki Linnakangas
Neon (https://neon.tech)







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


end of thread, other threads:[~2024-12-25 16:11 UTC | newest]

Thread overview: 22+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2020-11-30 21:50 [PATCH v6] Highlight vacuum consideration in create index docs Alvaro Herrera <[email protected]>
2020-11-30 21:50 [PATCH v6] Highlight vacuum consideration in create index docs Alvaro Herrera <[email protected]>
2020-11-30 21:50 [PATCH v6] Highlight vacuum consideration in create index docs Alvaro Herrera <[email protected]>
2020-11-30 21:50 [PATCH v6] Highlight vacuum consideration in create index docs Alvaro Herrera <[email protected]>
2020-11-30 21:50 [PATCH v6] Highlight vacuum consideration in create index docs Alvaro Herrera <[email protected]>
2020-11-30 21:50 [PATCH v6] Highlight vacuum consideration in create index docs Alvaro Herrera <[email protected]>
2020-11-30 21:50 [PATCH v6] Highlight vacuum consideration in create index docs Alvaro Herrera <[email protected]>
2020-11-30 21:50 [PATCH v6] Highlight vacuum consideration in create index docs Alvaro Herrera <[email protected]>
2020-11-30 21:50 [PATCH v6] Highlight vacuum consideration in create index docs Alvaro Herrera <[email protected]>
2020-11-30 21:50 [PATCH v6] Highlight vacuum consideration in create index docs Alvaro Herrera <[email protected]>
2020-11-30 21:50 [PATCH v6] Highlight vacuum consideration in create index docs Alvaro Herrera <[email protected]>
2020-11-30 21:50 [PATCH v6] Highlight vacuum consideration in create index docs Alvaro Herrera <[email protected]>
2020-11-30 21:50 [PATCH v6] Highlight vacuum consideration in create index docs Alvaro Herrera <[email protected]>
2020-11-30 21:50 [PATCH v6] Highlight vacuum consideration in create index docs Alvaro Herrera <[email protected]>
2020-11-30 21:50 [PATCH v6] Highlight vacuum consideration in create index docs Alvaro Herrera <[email protected]>
2020-11-30 21:50 [PATCH v6] Highlight vacuum consideration in create index docs Alvaro Herrera <[email protected]>
2020-11-30 21:50 [PATCH v6] Highlight vacuum consideration in create index docs Alvaro Herrera <[email protected]>
2020-11-30 21:50 [PATCH v6] Highlight vacuum consideration in create index docs Alvaro Herrera <[email protected]>
2020-11-30 21:50 [PATCH v6] Highlight vacuum consideration in create index docs Alvaro Herrera <[email protected]>
2020-11-30 21:50 [PATCH v6] Highlight vacuum consideration in create index docs Alvaro Herrera <[email protected]>
2020-11-30 21:50 [PATCH v6] Highlight vacuum consideration in create index docs Alvaro Herrera <[email protected]>
2024-12-25 16:11 Re: adjust_limit_rows_costs algorithm Heikki Linnakangas <[email protected]>

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox