1. 25 Mar, 2018 11 commits
  2. 24 Mar, 2018 3 commits
    • Peter Eisentraut's avatar
      initdb: Improve --wal-segsize handling · 496d5667
      Peter Eisentraut authored
      Give separate error messages for when the argument is not a number and
      when it is not the right kind of number.
      
      Fix wording in the help message.
      496d5667
    • Peter Eisentraut's avatar
      Improve pg_resetwal documentation · 4644a117
      Peter Eisentraut authored
      Clarify that the -l option takes a file name, not an "address", and that
      that might be different from the LSN if nondefault WAL segment sizes are
      used.
      4644a117
    • Noah Misch's avatar
      Don't qualify type pg_catalog.text in extend-extensions-example. · c92f7c62
      Noah Misch authored
      Extension scripts begin execution with pg_catalog at the front of the
      search path, so type names reliably refer to pg_catalog.  Remove these
      superfluous qualifications.  Earlier <programlisting> of this <sect1>
      already omitted them.  Back-patch to 9.3 (all supported versions).
      c92f7c62
  3. 23 Mar, 2018 12 commits
    • Peter Eisentraut's avatar
      Small refactoring · 52f3a9d6
      Peter Eisentraut authored
      Put the "atomic" argument of ExecuteDoStmt() and ExecuteCallStmt() into
      a variable instead of repeating the formula.
      52f3a9d6
    • Peter Eisentraut's avatar
      Further fix interaction of Perl and stdbool.h · 66ee8513
      Peter Eisentraut authored
      In the case that PostgreSQL uses stdbool.h but Perl doesn't, we need to
      prevent Perl from defining bool, to prevent compiler warnings about
      redefinition.
      66ee8513
    • Tom Lane's avatar
      Fix make rules that generate multiple output files. · 4b538727
      Tom Lane authored
      For years, our makefiles have correctly observed that "there is no correct
      way to write a rule that generates two files".  However, what we did is to
      provide empty rules that "generate" the secondary output files from the
      primary one, and that's not right either.  Depending on the details of
      the creating process, the primary file might end up timestamped later than
      one or more secondary files, causing subsequent make runs to consider the
      secondary file(s) out of date.  That's harmless in a plain build, since
      make will just re-execute the empty rule and nothing happens.  But it's
      fatal in a VPATH build, since make will expect the secondary file to be
      rebuilt in the build directory.  This would manifest as "file not found"
      failures during VPATH builds from tarballs, if we were ever unlucky enough
      to ship a tarball with apparently out-of-date secondary files.  (It's not
      clear whether that has ever actually happened, but it definitely could.)
      
      To ensure that secondary output files have timestamps >= their primary's,
      change our makefile convention to be that we provide a "touch $@" action
      not an empty rule.  Also, make sure that this rule actually gets invoked
      during a distprep run, else the hazard remains.
      
      It's been like this a long time, so back-patch to all supported branches.
      
      In HEAD, I skipped the changes in src/backend/catalog/Makefile, because
      those rules are due to get replaced soon in the bootstrap data format
      patch, and there seems no need to create a merge issue for that patch.
      If for some reason we fail to land that patch in v11, we'll need to
      back-fill the changes in that one makefile from v10.
      
      Discussion: https://postgr.es/m/18556.1521668179@sss.pgh.pa.us
      4b538727
    • Teodor Sigaev's avatar
      Exclude unlogged tables from base backups · 8694cc96
      Teodor Sigaev authored
      Exclude unlogged tables from base backup entirely except init fork which marks
      created unlogged table. The next question is do not backup temp table but
      it's a story for separate patch.
      
      Author: David Steele
      Review by: Adam Brightwell, Masahiko Sawada
      Discussion: https://www.postgresql.org/message-id/flat/04791bab-cb04-ba43-e9c0-664a4c1ffb2c@pgmasters.net
      8694cc96
    • Peter Eisentraut's avatar
      Fix interaction of Perl and stdbool.h · 7ba7986f
      Peter Eisentraut authored
      Revert the PL/Perl-specific change in
      9a95a77d.  We must not prevent Perl from
      using stdbool.h when it has been built to do so, even if it uses an
      incompatible size.  Otherwise, we would be imposing our bool on Perl,
      which will lead to crashes because of the size mismatch.
      
      Instead, we undef bool after including the Perl headers, as we did
      previously, but now only if we are not using stdbool.h ourselves.
      Record that choice in c.h as USE_STDBOOL.  This will also make it easier
      to apply that coding pattern elsewhere if necessary.
      7ba7986f
    • Peter Eisentraut's avatar
      pg_resetwal: Prevent division-by-zero errors · f1a074b1
      Peter Eisentraut authored
      Handle the case where the pg_control file specifies a WAL segment size
      of 0 bytes.  This would previously have led to a division by zero error.
      Change this to assume the whole file is corrupt and go to guess
      everything.
      
      Discussion: https://www.postgresql.org/message-id/a6163ad7-cc99-fdd1-dfad-25df73032ab8%402ndquadrant.com
      f1a074b1
    • Alvaro Herrera's avatar
      Allow FOR EACH ROW triggers on partitioned tables · 86f57594
      Alvaro Herrera authored
      Previously, FOR EACH ROW triggers were not allowed in partitioned
      tables.  Now we allow AFTER triggers on them, and on trigger creation we
      cascade to create an identical trigger in each partition.  We also clone
      the triggers to each partition that is created or attached later.
      
      This means that deferred unique keys are allowed on partitioned tables,
      too.
      
      Author: Álvaro Herrera
      Reviewed-by: Peter Eisentraut, Simon Riggs, Amit Langote, Robert Haas,
      	Thomas Munro
      Discussion: https://postgr.es/m/20171229225319.ajltgss2ojkfd3kp@alvherre.pgsql
      86f57594
    • Peter Eisentraut's avatar
      pg_resetwal: Add simple test suite · 5700aa13
      Peter Eisentraut authored
      Some subsequent patches will add to this, but to avoid conflicts, set up
      the basics separately.
      5700aa13
    • Andres Freund's avatar
      Adapt expression JIT to stdbool.h introduction. · 2111a48a
      Andres Freund authored
      The LLVM JIT provider uses clang to synchronize types between normal C
      code and runtime generated code. Clang represents stdbool.h style
      booleans in return values & parameters differently from booleans
      stored in variables.
      
      Thus the expression compilation code from 2a0faed9 needs to be
      adapted to 9a95a77d. Instead of hardcoding i8 as the type for
      booleans (which already was wrong on some edge case platforms!), use
      postgres' notion of a boolean as used for storage and for parameters.
      
      Per buildfarm animal xenodermus.
      
      Author: Andres Freund
      2111a48a
    • Peter Eisentraut's avatar
      Fix whitespace · fdb78948
      Peter Eisentraut authored
      fdb78948
    • Peter Eisentraut's avatar
      Remove stdbool workaround in sepgsql · 5c4920be
      Peter Eisentraut authored
      Since we now use stdbool.h in c.h, this workaround breaks the build and
      is no longer necessary, so remove it.  (Technically, there could be
      platforms with a 4-byte bool in stdbool.h, in which case we would not
      include stdbool.h in c.h, and so the old problem that caused this
      workaround would reappear.  But this combination is not known to happen
      on the range of platforms where sepgsql can be built.)
      5c4920be
    • Peter Eisentraut's avatar
      Use stdbool.h if suitable · 9a95a77d
      Peter Eisentraut authored
      Using the standard bool type provided by C allows some recent compilers
      and debuggers to give better diagnostics.  Also, some extension code and
      third-party headers are increasingly pulling in stdbool.h, so it's
      probably saner if everyone uses the same definition.
      
      But PostgreSQL code is not prepared to handle bool of a size other than
      1, so we keep our own old definition if we encounter a stdbool.h with a
      bool of a different size.  (Among current build farm members, this only
      applies to old macOS versions on PowerPC.)
      
      To check that the used bool is of the right size, add a static
      assertions about size of GinTernaryValue vs bool.  This is currently the
      only place that assumes that bool and char are of the same size.
      
      Discussion: https://www.postgresql.org/message-id/flat/3a0fe7e1-5ed1-414b-9230-53bbc0ed1f49@2ndquadrant.com
      9a95a77d
  4. 22 Mar, 2018 14 commits