Skip to content
Snippets Groups Projects
  • Andres Freund's avatar
    d47a1136
    Fix test_decoding's handling of nonexistant columns in old tuple versions. · d47a1136
    Andres Freund authored
    test_decoding used fastgetattr() to extract column values. That's wrong
    when decoding updates and deletes if a table's replica identity is set
    to FULL and new columns have been added since the old version of the
    tuple was created. Due to the lack of a crosscheck with the datum's
    natts values an invalid value will be output, leading to errors or
    worse.
    
    Bug: #13470
    Reported-By: Krzysztof Kotlarski
    Discussion: 20150626100333.3874.90852@wrigleys.postgresql.org
    
    Backpatch to 9.4, where the feature, including the bug, was added.
    d47a1136
    History
    Fix test_decoding's handling of nonexistant columns in old tuple versions.
    Andres Freund authored
    test_decoding used fastgetattr() to extract column values. That's wrong
    when decoding updates and deletes if a table's replica identity is set
    to FULL and new columns have been added since the old version of the
    tuple was created. Due to the lack of a crosscheck with the datum's
    natts values an invalid value will be output, leading to errors or
    worse.
    
    Bug: #13470
    Reported-By: Krzysztof Kotlarski
    Discussion: 20150626100333.3874.90852@wrigleys.postgresql.org
    
    Backpatch to 9.4, where the feature, including the bug, was added.