- Notifications
You must be signed in to change notification settings - Fork5.2k
Commit1fd981f
Drop unnamed portal immediately after execution to completion
Previously, unnamed portals were kept until the next Bind message or theend of the transaction. This could cause temporary files to persistlonger than expected and make logging not reflect the actual SQLresponsible for the temporary file.This patch changes exec_execute_message() to drop unnamed portalsimmediately after execution to completion at the end of an Executemessage, making their removal more aggressive. This forces temporaryfile cleanups to happen at the same time as the completion of the portalexecution, with statement logging correctly reflecting to whichstatements these temporary files were attached to (see the diffs in theTAP test updated by this commit for an idea).The documentation is updated to describe the lifetime of unnamedportals, and test cases are updated to verify temporary file removal andproper statement logging after unnamed portal execution. This changeshow unnamed portals are handled in the protocol, hence no backpatch isdone.Author: Frédéric Yhuel <frederic.yhuel@dalibo.com>Co-Authored-by: Sami Imseih <samimseih@gmail.com>Co-Authored-by: Mircea Cadariu <cadariu.mircea@gmail.com>Discussion:https://postgr.es/m/CAA5RZ0tTrTUoEr3kDXCuKsvqYGq8OOHiBwoD-dyJocq95uEOTQ%40mail.gmail.com1 parent59dec6c commit1fd981f
File tree
3 files changed
+29
-18
lines changed- doc/src/sgml
- src
- backend/tcop
- test/modules/test_misc/t
3 files changed
+29
-18
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1006 | 1006 | | |
1007 | 1007 | | |
1008 | 1008 | | |
1009 | | - | |
1010 | | - | |
| 1009 | + | |
| 1010 | + | |
1011 | 1011 | | |
1012 | 1012 | | |
1013 | 1013 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2327 | 2327 | | |
2328 | 2328 | | |
2329 | 2329 | | |
| 2330 | + | |
| 2331 | + | |
| 2332 | + | |
| 2333 | + | |
| 2334 | + | |
| 2335 | + | |
| 2336 | + | |
| 2337 | + | |
| 2338 | + | |
| 2339 | + | |
2330 | 2340 | | |
2331 | 2341 | | |
2332 | 2342 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
32 | | - | |
| 32 | + | |
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
| |||
39 | 39 | | |
40 | 40 | | |
41 | 41 | | |
42 | | - | |
| 42 | + | |
43 | 43 | | |
44 | 44 | | |
45 | 45 | | |
46 | | - | |
| 46 | + | |
| 47 | + | |
47 | 48 | | |
48 | 49 | | |
49 | 50 | | |
50 | 51 | | |
51 | 52 | | |
52 | | - | |
53 | | - | |
54 | | - | |
55 | | - | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
56 | 57 | | |
57 | | - | |
| 58 | + | |
58 | 59 | | |
59 | 60 | | |
60 | 61 | | |
| |||
64 | 65 | | |
65 | 66 | | |
66 | 67 | | |
67 | | - | |
| 68 | + | |
68 | 69 | | |
69 | 70 | | |
70 | 71 | | |
71 | | - | |
| 72 | + | |
72 | 73 | | |
73 | 74 | | |
74 | 75 | | |
| |||
78 | 79 | | |
79 | 80 | | |
80 | 81 | | |
81 | | - | |
| 82 | + | |
82 | 83 | | |
83 | 84 | | |
84 | 85 | | |
85 | | - | |
| 86 | + | |
86 | 87 | | |
87 | 88 | | |
88 | 89 | | |
89 | 90 | | |
90 | 91 | | |
91 | 92 | | |
92 | | - | |
93 | | - | |
94 | | - | |
95 | | - | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
96 | 97 | | |
97 | 98 | | |
98 | 99 | | |
| |||
0 commit comments
Comments
(0)