1. 16 Apr, 2013 3 commits
  2. 15 Apr, 2013 2 commits
  3. 14 Apr, 2013 2 commits
    • Peter Eisentraut's avatar
      Add serial comma · e08fdf13
      Peter Eisentraut authored
      e08fdf13
    • Peter Eisentraut's avatar
      pg_ctl: Add idempotent option · 87306184
      Peter Eisentraut authored
      This changes the behavior of the start and stop actions to exit
      successfully if the server was already started or stopped.
      
      This changes the default behavior of the start action:  Before, if the
      server was already running, it would print a message and succeed.  Now,
      that situation will result in an error.  When running in idempotent
      mode, no message is printed and pg_ctl exits successfully.
      
      It was considered to just make the idempotent behavior the default and
      only option, but pg_upgrade needs the old behavior.
      87306184
  4. 13 Apr, 2013 1 commit
    • Peter Eisentraut's avatar
      Fix sporadic rebuilds for .pc files · ba66752d
      Peter Eisentraut authored
      The build of .pc (pkg-config) files depends on all makefiles in use, and
      in dependency tracking mode, the previous coding ended up including
      /dev/null as a makefile.  Apparently, on some platforms the modification
      time of /dev/null changes sporadically, and so the .pc files would end
      up being rebuilt every so often.  Fix that by changing the makefile code
      to do without using /dev/null.
      ba66752d
  5. 12 Apr, 2013 6 commits
    • Tom Lane's avatar
      Clean up the mess around EXPLAIN and materialized views. · 0b337904
      Tom Lane authored
      Revert the matview-related changes in explain.c's API, as per recent
      complaint from Robert Haas.  The reason for these appears to have been
      principally some ill-considered choices around having intorel_startup do
      what ought to be parse-time checking, plus a poor arrangement for passing
      it the view parsetree it needs to store into pg_rewrite when creating a
      materialized view.  Do the latter by having parse analysis stick a copy
      into the IntoClause, instead of doing it at runtime.  (On the whole,
      I seriously question the choice to represent CREATE MATERIALIZED VIEW as a
      variant of SELECT INTO/CREATE TABLE AS, because that means injecting even
      more complexity into what was already a horrid legacy kluge.  However,
      I didn't go so far as to rethink that choice ... yet.)
      
      I also moved several error checks into matview parse analysis, and
      made the check for external Params in a matview more accurate.
      
      In passing, clean things up a bit more around interpretOidsOption(),
      and fix things so that we can use that to force no-oids for views,
      sequences, etc, thereby eliminating the need to cons up "oids = false"
      options when creating them.
      
      catversion bump due to change in IntoClause.  (I wonder though if we
      really need readfuncs/outfuncs support for IntoClause anymore.)
      0b337904
    • Bruce Momjian's avatar
      pgindent: improve error messages · 5003f94f
      Bruce Momjian authored
      per suggestion from Gurjeet Singh
      5003f94f
    • Bruce Momjian's avatar
      pgindent: fix downloading of BSD indent binary · 8daa4e96
      Bruce Momjian authored
      Also fix accessing pgentab binary and tar.
      
      Gurjeet Singh
      8daa4e96
    • Robert Haas's avatar
      sepgsql: Enforce db_procedure:{execute} permission. · f8a54e93
      Robert Haas authored
      To do this, we add an additional object access hook type,
      OAT_FUNCTION_EXECUTE.
      
      KaiGai Kohei
      f8a54e93
    • Robert Haas's avatar
      Minor wording corrections for object-access hook stuff. · d017bf41
      Robert Haas authored
      KaiGai Kohei
      d017bf41
    • Robert Haas's avatar
      sepgql: Use getObjectIdentity rather than getObjectDescription. · b620fdab
      Robert Haas authored
      KaiGai Kohei, based on a suggestion from Álvaro Herrera
      b620fdab
  6. 11 Apr, 2013 4 commits
  7. 10 Apr, 2013 7 commits
  8. 09 Apr, 2013 3 commits
    • Kevin Grittner's avatar
      Create a distinction between a populated matview and a scannable one. · 52e6e33a
      Kevin Grittner authored
      The intent was that being populated would, long term, be just one
      of the conditions which could affect whether a matview was
      scannable; being populated should be necessary but not always
      sufficient to scan the relation.  Since only CREATE and REFRESH
      currently determine the scannability, names and comments
      accidentally conflated these concepts, leading to confusion.
      
      Also add missing locking for the SQL function which allows a
      test for scannability, and fix a modularity violatiion.
      
      Per complaints from Tom Lane, although its not clear that these
      will satisfy his concerns.  Hopefully this will at least better
      frame the discussion.
      52e6e33a
    • Robert Haas's avatar
      Adjust ExplainOneQuery_hook_type to take a DestReceiver argument. · 0bf42a5f
      Robert Haas authored
      The materialized views patch adjusted ExplainOneQuery to take an
      additional DestReceiver argument, but failed to add a matching
      argument to the definition of ExplainOneQuery_hook.  This is a
      problem for users of the hook that want to call ExplainOnePlan.
      Fix by adding the missing argument.
      0bf42a5f
    • Tom Lane's avatar
      Support indexing of regular-expression searches in contrib/pg_trgm. · 3ccae48f
      Tom Lane authored
      This works by extracting trigrams from the given regular expression,
      in generally the same spirit as the previously-existing support for
      LIKE searches, though of course the details are far more complicated.
      
      Currently, only GIN indexes are supported.  We might be able to make
      it work with GiST indexes later.
      
      The implementation includes adding API functions to backend/regex/
      to provide a view of the search NFA created from a regular expression.
      These functions are meant to be generic enough to be supportable in
      a standalone version of the regex library, should that ever happen.
      
      Alexander Korotkov, reviewed by Heikki Linnakangas and Tom Lane
      3ccae48f
  9. 08 Apr, 2013 5 commits
    • Simon Riggs's avatar
      Minor rewording of README comments · e60d20a3
      Simon Riggs authored
      e60d20a3
    • Heikki Linnakangas's avatar
      Fix calculation of how many segments to retain for wal_keep_segments. · 59404131
      Heikki Linnakangas authored
      KeepLogSeg function was broken when we switched to use a 64-bit int for the
      segment number.
      
      Per report from Jeff Janes.
      59404131
    • Simon Riggs's avatar
      Skip extraneous locking in XLogCheckBuffer(). · 5787c673
      Simon Riggs authored
      Heikki reported comment was wrong, so fixed
      code to match the comment: we only need to
      take additional locking precautions when we
      have a shared lock on the buffer.
      5787c673
    • Simon Riggs's avatar
      Avoid tricky race condition recording XLOG_HINT · 47c43331
      Simon Riggs authored
      We copy the buffer before inserting an XLOG_HINT to avoid WAL CRC errors
      caused by concurrent hint writes to buffer while share locked. To make this work
      we refactor RestoreBackupBlock() to allow an XLOG_HINT to avoid the normal
      path for backup blocks, which assumes the underlying buffer is exclusive locked.
      Resulting code completely changes layout of XLOG_HINT WAL records, but
      this isn't even beta code, so this is a low impact change.
      In passing, avoid taking WALInsertLock for full page writes on checksummed
      hints, remove related cruft from XLogInsert() and improve xlog_desc record for
      XLOG_HINT.
      
      Andres Freund
      
      Bug report by Fujii Masao, testing by Jeff Janes and Jaime Casanova,
      review by Jeff Davis and Simon Riggs. Applied with changes from review
      and some comment editing.
      47c43331
    • Simon Riggs's avatar
      README comments on checksums on page holes. · a4b94b85
      Simon Riggs authored
      a4b94b85
  10. 07 Apr, 2013 4 commits
    • Simon Riggs's avatar
      Tune BufferGetLSNAtomic() when checksums !enabled · 1be20351
      Simon Riggs authored
      From performance analysis by Heikki Linnakangas
      1be20351
    • Simon Riggs's avatar
      Fix checksums for CLUSTER, VACUUM FULL etc. · cf8dc9e1
      Simon Riggs authored
      In CLUSTER, VACUUM FULL and ALTER TABLE SET TABLESPACE
      I erroneously set checksum before log_newpage, which
      sets the LSN and invalidates the checksum. So set
      checksum immediately *after* log_newpage.
      
      Bug report Fujii Masao, Fix and patch by Jeff Davis
      cf8dc9e1
    • Tom Lane's avatar
      Get rid of USE_WIDE_UPPER_LOWER dependency in trigram construction. · 7844608e
      Tom Lane authored
      contrib/pg_trgm's make_trigrams() was coded to ignore multibyte character
      boundaries and just make trigrams from bytes if USE_WIDE_UPPER_LOWER wasn't
      defined.  This is a bit odd, since there's no obvious reason why trigram
      compaction rules should depend on the presence of towlower() and friends.
      What's more, there was an Assert() that would fail if that code path was
      fed any multibyte characters.
      
      We need to do something about this since the pending regex-indexing patch
      has an assumption that you get just one "trgm" from any three characters.
      The best solution seems to be to remove the USE_WIDE_UPPER_LOWER
      dependency, which shouldn't really have been there in the first place.
      The second loop in make_trigrams() is now just a fast path and not a
      potentially incompatible algorithm.
      
      If there is anybody still using Postgres on machines without wcstombs() or
      towlower(), and they have non-ASCII data indexed by pg_trgm, they'll need
      to REINDEX those indexes after pg_upgrade to 9.3, else searches may fail
      incorrectly. It seems likely that there are no such installations, though.
      
      In passing, rename cnt_trigram to compact_trigram, which seems to better
      describe its functionality, and improve make_trigrams' test for whether it
      has to use the slow path or not (per a suggestion from Alexander Korotkov).
      7844608e
    • Tom Lane's avatar
      In isolationtester, retry after EINTR return from select(2). · faf4726c
      Tom Lane authored
      Per report from Jaime Casanova.  Very curious that no one else has seen
      this failure ... but the code is clearly wrong as-is.
      faf4726c
  11. 05 Apr, 2013 3 commits