forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit1ef61dd
committed
Fix StoreCatalogInheritance1 to use 32bit inhseqno
For no apparent reason, this function was using a 16bit-wide inhseqnovalue, rather than the correct 32 bit width which is what is stored inthe pg_inherits catalog. This becomes evident if you try to create atable with more than 65535 parents, because this error appears:ERROR: duplicate key value violates unique constraint «pg_inherits_relid_seqno_index»DETAIL: Key (inhrelid, inhseqno)=(329371, 0) already exists.Needless to say, having so many parents is an uncommon situations, whichexplains why this error has never been reported despite being havingbeen introduced with the Postgres95 1.01 sources in commitd31084e:https://git.postgresql.org/gitweb/?p=postgresql.git;a=blob;f=src/backend/commands/creatinh.c;hb=d31084e9d111#l349Backpatch all the way back.David Rowley noticed this while reviewing a patch of mine.Discussion:https://postgr.es/m/CAKJS1f8Dn7swSEhOWwzZzssW7747YB=2Hi+T7uGud40dur69-g@mail.gmail.com1 parent29d58fd commit1ef61dd
1 file changed
+4
-4
lines changedLines changed: 4 additions & 4 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
303 | 303 |
| |
304 | 304 |
| |
305 | 305 |
| |
306 |
| - | |
| 306 | + | |
307 | 307 |
| |
308 | 308 |
| |
309 | 309 |
| |
| |||
2352 | 2352 |
| |
2353 | 2353 |
| |
2354 | 2354 |
| |
2355 |
| - | |
| 2355 | + | |
2356 | 2356 |
| |
2357 | 2357 |
| |
2358 | 2358 |
| |
| |||
2393 | 2393 |
| |
2394 | 2394 |
| |
2395 | 2395 |
| |
2396 |
| - | |
| 2396 | + | |
2397 | 2397 |
| |
2398 | 2398 |
| |
2399 | 2399 |
| |
| |||
2408 | 2408 |
| |
2409 | 2409 |
| |
2410 | 2410 |
| |
2411 |
| - | |
| 2411 | + | |
2412 | 2412 |
| |
2413 | 2413 |
| |
2414 | 2414 |
| |
|
0 commit comments
Comments
(0)