Commit 3bf4f5c
committed
PG-1488: Only create keys for main/init forks
smgr_create is called for all forks. It is possible that additional
forks for existing tables are created during a tde creation event.
In practice this happens quite often with CREATE INDEX CONCURRENTLY.
Without this fix, pg_tde created encryption keys for these existing
tables, and later writes and reads tried to use these keys with
all these issues. In practice some of the file got encrypted, some
didn't, and earlier records that weren't encrypted became unreadable.1 parent 01a8ee3 commit 3bf4f5c
1 file changed
+23
-13
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
242 | 242 | | |
243 | 243 | | |
244 | 244 | | |
245 | | - | |
246 | | - | |
247 | | - | |
248 | | - | |
249 | | - | |
250 | | - | |
251 | | - | |
252 | | - | |
253 | | - | |
254 | | - | |
255 | | - | |
256 | | - | |
| 245 | + | |
257 | 246 | | |
258 | | - | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
259 | 269 | | |
260 | 270 | | |
261 | 271 | | |
| |||
0 commit comments