Skip to content

Commit 72164e8

Browse files
committed
Remove memory leak from VACUUM parsing.
1 parent 57eeb0d commit 72164e8

File tree

1 file changed

+1
-19
lines changed

1 file changed

+1
-19
lines changed

src/backend/parser/analyze.c

Lines changed: 1 addition & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
* Portions Copyright (c) 1996-2000, PostgreSQL, Inc
77
* Portions Copyright (c) 1994, Regents of the University of California
88
*
9-
* $Id: analyze.c,v 1.148 2000/06/17 21:48:40 tgl Exp $
9+
* $Id: analyze.c,v 1.149 2000/07/02 04:04:09 tgl Exp $
1010
*
1111
*-------------------------------------------------------------------------
1212
*/
@@ -185,24 +185,6 @@ transformStmt(ParseState *pstate, Node *parseTree)
185185
}
186186
break;
187187

188-
case T_VacuumStmt:
189-
{
190-
MemoryContext oldcontext;
191-
192-
/*
193-
* make sure that this Query is allocated in TopMemory
194-
* context because vacuum spans transactions and we don't
195-
* want to lose the vacuum Query due to end-of-transaction
196-
* free'ing
197-
*/
198-
oldcontext = MemoryContextSwitchTo(TopMemoryContext);
199-
result = makeNode(Query);
200-
result->commandType = CMD_UTILITY;
201-
result->utilityStmt = (Node *) parseTree;
202-
MemoryContextSwitchTo(oldcontext);
203-
}
204-
break;
205-
206188
case T_ExplainStmt:
207189
{
208190
ExplainStmt *n = (ExplainStmt *) parseTree;

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