Skip to content
Snippets Groups Projects
Select Git revision
  • benchmark-tools
  • postgres-lambda
  • master default
  • REL9_4_25
  • REL9_5_20
  • REL9_6_16
  • REL_10_11
  • REL_11_6
  • REL_12_1
  • REL_12_0
  • REL_12_RC1
  • REL_12_BETA4
  • REL9_4_24
  • REL9_5_19
  • REL9_6_15
  • REL_10_10
  • REL_11_5
  • REL_12_BETA3
  • REL9_4_23
  • REL9_5_18
  • REL9_6_14
  • REL_10_9
  • REL_11_4
23 results

postgres-lambda-diff

  • Clone with SSH
  • Clone with HTTPS
  • user avatar
    Tom Lane authored
    Our initial work with int128 neglected alignment considerations, an
    oversight that came back to bite us in bug #14897 from Vincent Lachenal.
    It is unsurprising that int128 might have a 16-byte alignment requirement;
    what's slightly more surprising is that even notoriously lax Intel chips
    sometimes enforce that.
    
    Raising MAXALIGN seems out of the question: the costs in wasted disk and
    memory space would be significant, and there would also be an on-disk
    compatibility break.  Nor does it seem very practical to try to allow some
    data structures to have more-than-MAXALIGN alignment requirement, as we'd
    have to push knowledge of that throughout various code that copies data
    structures around.
    
    The only way out of the box is to make type int128 conform to the system's
    alignment assumptions.  Fortunately, gcc supports that via its
    __attribute__(aligned()) pragma; and since we don't currently support
    int128 on non-gcc-workalike compilers, we shouldn't be losing any platform
    support this way.
    
    Although we could have just done pg_attribute_aligned(MAXIMUM_ALIGNOF) and
    called it a day, I did a little bit of extra work to make the code more
    portable than that: it will also support int128 on compilers without
    __attribute__(aligned()), if the native alignment of their 128-bit-int
    type is no more than that of int64.
    
    Add a regression test case that exercises the one known instance of the
    problem, in parallel aggregation over a bigint column.
    
    Back-patch of commit 75180499.  The code known to be affected only exists
    in 9.6 and later, but we do have some stuff using int128 in 9.5, so patch
    back to 9.5.
    
    Discussion: https://postgr.es/m/20171110185747.31519.28038@wrigleys.postgresql.org
    4a15f87d
    History
    PostgreSQL Database Management System
    =====================================
    
    This directory contains the source code distribution of the PostgreSQL
    database management system.
    
    PostgreSQL is an advanced object-relational database management system
    that supports an extended subset of the SQL standard, including
    transactions, foreign keys, subqueries, triggers, user-defined types
    and functions.  This distribution also contains C language bindings.
    
    PostgreSQL has many language interfaces, many of which are listed here:
    
    	https://www.postgresql.org/download
    
    See the file INSTALL for instructions on how to build and install
    PostgreSQL.  That file also lists supported operating systems and
    hardware platforms and contains information regarding any other
    software packages that are required to build or run the PostgreSQL
    system.  Copyright and license information can be found in the
    file COPYRIGHT.  A comprehensive documentation set is included in this
    distribution; it can be read as described in the installation
    instructions.
    
    The latest version of this software may be obtained at
    https://www.postgresql.org/download/.  For more information look at our
    web site located at https://www.postgresql.org/.