Skip to content

Commit d2efb90

Browse files
committed
Update comments about progress reporting by index_drop
Michaël Paquier complained that index_drop is requesting progress reporting for non-obvious reasons, so let's add a comment to explain why. Discussion: https://postgr.es/m/20191017010412.GH2602@paquier.xyz
1 parent 3f60f69 commit d2efb90

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/backend/catalog/index.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2142,6 +2142,10 @@ index_drop(Oid indexId, bool concurrent, bool concurrent_lock_mode)
21422142
* possible if one of the transactions in question is blocked trying
21432143
* to acquire an exclusive lock on our table. The lock code will
21442144
* detect deadlock and error out properly.
2145+
*
2146+
* Note: we report progress through WaitForLockers() unconditionally
2147+
* here, even though it will only be used when we're called by REINDEX
2148+
* CONCURRENTLY and not when called by DROP INDEX CONCURRENTLY.
21452149
*/
21462150
WaitForLockers(heaplocktag, AccessExclusiveLock, true);
21472151

@@ -2157,7 +2161,7 @@ index_drop(Oid indexId, bool concurrent, bool concurrent_lock_mode)
21572161

21582162
/*
21592163
* Wait till every transaction that saw the old index state has
2160-
* finished.
2164+
* finished. See above about progress reporting.
21612165
*/
21622166
WaitForLockers(heaplocktag, AccessExclusiveLock, true);
21632167

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy