1. 03 Feb, 2010 6 commits
    • Heikki Linnakangas's avatar
      Move the responsibility of writing a "unlogged WAL operation" record from · 9de778b2
      Heikki Linnakangas authored
      heap_sync() to the callers, because heap_sync() is sometimes called even
      if the operation itself is WAL-logged. This eliminates the bogus unlogged
      records from CLUSTER that Simon Riggs reported, patch by Fujii Masao.
      9de778b2
    • Heikki Linnakangas's avatar
      Add a message type header to the CopyData messages sent from primary · 808969d0
      Heikki Linnakangas authored
      to standby in streaming replication. While we only have one message type
      at the moment, adding a message type header makes this easier to extend.
      808969d0
    • Tom Lane's avatar
      Fix unwarranted assumption that a cached rowtype would stick around · 47c5b8f5
      Tom Lane authored
      for the lifespan of the CreateStmt.  Per buildfarm member jaguar.
      47c5b8f5
    • Tom Lane's avatar
      Add #include <float.h> --- guessing the lack of this is why Windows · 45c88a55
      Tom Lane authored
      machines are all rejecting isinf() calls in this file.
      45c88a55
    • Tom Lane's avatar
      Fix timing-sensitive regression test result I just created :-( --- the · 98e31455
      Tom Lane authored
      DROP USER at the end of the cluster.sql test could fail, if the temp
      table created in the previous session hadn't finished getting dropped.
      Unluckily, I didn't see this in several repetitions of the parallel
      regression tests, but it's popping up on quite a few buildfarm machines.
      98e31455
    • Tom Lane's avatar
      Assorted cleanups in preparation for using a map file to support altering · 70a2b05a
      Tom Lane authored
      the relfilenode of currently-not-relocatable system catalogs.
      
      1. Get rid of inval.c's dependency on relfilenode, by not having it emit
      smgr invalidations as a result of relcache flushes.  Instead, smgr sinval
      messages are sent directly from smgr.c when an actual relation delete or
      truncate is done.  This makes considerably more structural sense and allows
      elimination of a large number of useless smgr inval messages that were
      formerly sent even in cases where nothing was changing at the
      physical-relation level.  Note that this reintroduces the concept of
      nontransactional inval messages, but that's okay --- because the messages
      are sent by smgr.c, they will be sent in Hot Standby slaves, just from a
      lower logical level than before.
      
      2. Move setNewRelfilenode out of catalog/index.c, where it never logically
      belonged, into relcache.c; which is a somewhat debatable choice as well but
      better than before.  (I considered catalog/storage.c, but that seemed too
      low level.)  Rename to RelationSetNewRelfilenode.
      
      3. Cosmetic cleanups of some other relfilenode manipulations.
      70a2b05a
  2. 02 Feb, 2010 7 commits
  3. 01 Feb, 2010 7 commits
    • Robert Haas's avatar
      Tighten integrity checks on ALTER TABLE ... ALTER COLUMN ... RENAME. · 63f9282f
      Robert Haas authored
      When a column is renamed, we recursively rename the same column in
      all descendent tables.  But if one of those tables also inherits that
      column from a table outside the inheritance hierarchy rooted at the
      named table, we must throw an error.  The previous coding correctly
      prohibited the rename when the parent had inherited the column from
      elsewhere, but overlooked the case where the parent was OK but a child
      table also inherited the same column from a second, unrelated parent.
      
      For now, not backpatched due to lack of complaints from the field.
      
      KaiGai Kohei, with further changes by me.
      Reviewed by Bernd Helme and Tom Lane.
      63f9282f
    • Bruce Momjian's avatar
      Remove tabs in sgml. · 1526d4e3
      Bruce Momjian authored
      1526d4e3
    • Robert Haas's avatar
      Augment EXPLAIN output with more details on Hash nodes. · 42a8ab0a
      Robert Haas authored
      We show the number of buckets, the number of batches (and also the original
      number if it has changed), and the peak space used by the hash table.  Minor
      executor changes to track peak space used.
      42a8ab0a
    • Robert Haas's avatar
    • Simon Riggs's avatar
    • Itagaki Takahiro's avatar
      Add string_agg aggregate functions. The one argument version concatenates · 9ea9918e
      Itagaki Takahiro authored
      the input values into a string. The two argument version also does the same
      thing, but inserts delimiters between elements.
      
      Original patch by Pavel Stehule, reviewed by David E. Wheeler and me.
      9ea9918e
    • Tom Lane's avatar
      Change regexp engine's ccondissect/crevdissect routines to perform DFA · ee3a81f0
      Tom Lane authored
      matching before recursing instead of after.  The DFA match eliminates
      unworkable midpoint choices a lot faster than the recursive check, in most
      cases, so doing it first can speed things up; particularly in pathological
      cases such as recently exhibited by Michael Glaesemann.
      
      In addition, apply some cosmetic changes that were applied upstream (in the
      Tcl project) at the same time, in order to sync with upstream version 1.15
      of regexec.c.
      
      Upstream apparently intends to backpatch this, so I will too.  The
      pathological behavior could be unpleasant if encountered in the field,
      which seems to justify any risk of introducing new bugs.
      
      Tom Lane, reviewed by Donal K. Fellows of Tcl project
      ee3a81f0
  4. 31 Jan, 2010 7 commits
  5. 30 Jan, 2010 4 commits
    • Tom Lane's avatar
      Avoid performing encoding conversion on command tag strings during EndCommand. · eb889266
      Tom Lane authored
      Since all current and foreseeable future command tags will be pure ASCII,
      there is no need to do conversion on them.  This saves a few cycles and also
      avoids polluting otherwise-pristine subtransaction memory contexts, which
      is the cause of the backend memory leak exhibited in bug #5302.  (Someday
      we'll probably want to have a better method of determining whether
      subtransaction contexts need to be kept around, but today is not that day.)
      
      Backpatch to 8.0.  The cycle-shaving aspect of this would work in 7.4
      too, but without subtransactions the memory-leak aspect doesn't apply,
      so it doesn't seem worth touching 7.4.
      eb889266
    • Tom Lane's avatar
      Fix memory leakage introduced into print_aligned_text by 8.4 changes · 07be293a
      Tom Lane authored
      (failure to free col_lineptrs[] array elements) and exacerbated in the
      current devel cycle (failure to free "wrap").  This resulted in moderate
      bloat of psql over long script runs.  Noted while testing bug #5302,
      although what the reporter was complaining of was backend-side leakage.
      07be293a
    • Tom Lane's avatar
      Fix some comments that got mangled by pgindent. · 3e51ae49
      Tom Lane authored
      3e51ae49
    • Andrew Dunstan's avatar
      Add plperl.on_perl_init setting to provide for initializing the perl library... · 85d67ccd
      Andrew Dunstan authored
      Add plperl.on_perl_init setting to provide for initializing the perl library on load. Also, handle END blocks in plperl.
      Database access is disallowed during both these operations, although it might be allowed in END blocks in future.
      
      Patch from Tim Bunce.
      85d67ccd
  6. 29 Jan, 2010 8 commits
  7. 28 Jan, 2010 1 commit