forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit1ff4161
committed
Use multi-inserts for pg_enum
This allows to insert at once all the enum values defined with a giventype into pg_enum, reducing the WAL produced by roughly 10%~. pg_enum'sindexes are opened and closed now once rather than N times. The numberof items to insert is known in advance, making this changestraight-forward, and would happen on a CREATE TYPE .. AS ENUM.The amount of data inserted is capped at 64kB for each insert batch.This is similar to commits63110c6 ande3931d0, that worked ondifferent catalogs.Reported-by: Ranier VilelaAuthor: Michael PaquierReviewed-by: Kyotaro Horiguchi, Ranier VilelaDiscussion:https://postgr.es/m/Y3M5bovrkTQbAO4W@paquier.xyz1 parent09a7218 commit1ff4161
1 file changed
+42
-13
lines changedLines changed: 42 additions & 13 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
61 | 61 |
| |
62 | 62 |
| |
63 | 63 |
| |
64 |
| - | |
65 | 64 |
| |
66 | 65 |
| |
67 | 66 |
| |
68 |
| - | |
69 |
| - | |
70 | 67 |
| |
71 |
| - | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
72 | 72 |
| |
73 | 73 |
| |
74 | 74 |
| |
| |||
111 | 111 |
| |
112 | 112 |
| |
113 | 113 |
| |
114 |
| - | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
115 | 123 |
| |
116 | 124 |
| |
117 | 125 |
| |
118 | 126 |
| |
119 | 127 |
| |
| 128 | + | |
120 | 129 |
| |
121 | 130 |
| |
122 | 131 |
| |
| |||
129 | 138 |
| |
130 | 139 |
| |
131 | 140 |
| |
132 |
| - | |
133 |
| - | |
134 |
| - | |
135 |
| - | |
136 |
| - | |
| 141 | + | |
137 | 142 |
| |
138 |
| - | |
| 143 | + | |
| 144 | + | |
139 | 145 |
| |
140 |
| - | |
141 |
| - | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
142 | 163 |
| |
143 | 164 |
| |
144 | 165 |
| |
145 | 166 |
| |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
146 | 172 |
| |
147 | 173 |
| |
| 174 | + | |
| 175 | + | |
| 176 | + | |
148 | 177 |
| |
149 | 178 |
| |
150 | 179 |
| |
|
0 commit comments
Comments
(0)