Skip to content

Commit db10f01

Browse files
committed
Improve comment about handling of temp tables in shared-inval code.
1 parent e6d8009 commit db10f01

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

src/backend/utils/cache/inval.c

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,15 @@
7575
* transaction but must be kept till top-level commit otherwise. For
7676
* simplicity we keep the controlling list-of-lists in TopTransactionContext.
7777
*
78+
* Currently, inval messages are sent without regard for the possibility
79+
* that the object described by the catalog tuple might be a session-local
80+
* object such as a temporary table. This is because (1) this code has
81+
* no practical way to tell the difference, and (2) it is not certain that
82+
* other backends don't have catalog cache or even relcache entries for
83+
* such tables, anyway; there is nothing that prevents that. It might be
84+
* worth trying to avoid sending such inval traffic in the future, if those
85+
* problems can be overcome cheaply.
86+
*
7887
*
7988
* Portions Copyright (c) 1996-2011, PostgreSQL Global Development Group
8089
* Portions Copyright (c) 1994, Regents of the University of California
@@ -811,10 +820,6 @@ ProcessCommittedInvalidationMessages(SharedInvalidationMessage *msgs,
811820
* since they'll not have seen our changed tuples anyway. We can forget
812821
* about CurrentCmdInvalidMsgs too, since those changes haven't touched
813822
* the caches yet.
814-
*
815-
* We still send invalidation messages for session-local objects to other
816-
* backends because, while other backends cannot see any tuples, they can
817-
* drop tables that are session-local to another session.
818823
*
819824
* In any case, reset the various lists to empty. We need not physically
820825
* free memory here, since TopTransactionContext is about to be emptied

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