1. 08 Jul, 2011 1 commit
  2. 07 Jul, 2011 10 commits
    • Tom Lane's avatar
      Update examples for string-related functions. · c59b8ba6
      Tom Lane authored
      In the example for decode(), show the bytea result in hex format,
      since that's now the default.  Use an E'' string in the example for
      quote_literal(), so that it works regardless of the
      standard_conforming_strings setting.  On the functions-for-binary-strings
      page, leave the examples as-is for readability, but add a note pointing out
      that they are shown in escape format.  Per comments from Thom Brown.
      
      Also, improve the description for encode() and decode() a tad.
      
      Backpatch to 9.0, where bytea_output was introduced.
      c59b8ba6
    • Tom Lane's avatar
      997d5b48
    • Heikki Linnakangas's avatar
      There's a small window wherein a transaction is committed but not yet · bdaabb9b
      Heikki Linnakangas authored
      on the finished list, and we shouldn't flag it as a potential conflict
      if so. We can also skip adding a doomed transaction to the list of
      possible conflicts because we know it won't commit.
      
      Dan Ports and Kevin Grittner.
      bdaabb9b
    • Heikki Linnakangas's avatar
      SSI has a race condition, where the order of commit sequence numbers of · 406d6183
      Heikki Linnakangas authored
      transactions might not match the order the work done in those transactions
      become visible to others. The logic in SSI, however, assumed that it does.
      Fix that by having two sequence numbers for each serializable transaction,
      one taken before a transaction becomes visible to others, and one after it.
      This is easier than trying to make the the transition totally atomic, which
      would require holding ProcArrayLock and SerializableXactHashLock at the same
      time. By using prepareSeqNo instead of commitSeqNo in a few places where
      commit sequence numbers are compared, we can make those comparisons err on
      the safe side when we don't know for sure which committed first.
      
      Per analysis by Kevin Grittner and Dan Ports, but this approach to fix it
      is different from the original patch.
      406d6183
    • Peter Eisentraut's avatar
      Fix use of unportable %m format · d7fb4931
      Peter Eisentraut authored
      d7fb4931
    • Tom Lane's avatar
      Reclassify replication-related GUC variables as "master" and "standby". · 60a81ad1
      Tom Lane authored
      Per discussion, this structure seems more understandable than what was
      there before.  Make config.sgml and postgresql.conf.sample agree.
      
      In passing do a bit of editorial work on the variable descriptions.
      60a81ad1
    • Robert Haas's avatar
      Adjust OLDSERXID_MAX_PAGE based on BLCKSZ. · 5b2b444f
      Robert Haas authored
      The value when BLCKSZ = 8192 is unchanged, but with larger-than-normal
      block sizes we might need to crank things back a bit, as we'll have
      more entries per page than normal in that case.
      
      Kevin Grittner
      5b2b444f
    • Tom Lane's avatar
      Finish disabling reduced-lock-levels-for-DDL feature. · a195e3c3
      Tom Lane authored
      Previous patch only covered the ALTER TABLE changes, not changes in other
      commands; and it neglected to revert the documentation changes.
      a195e3c3
    • Heikki Linnakangas's avatar
      Fix a bug with SSI and prepared transactions: · 928408d9
      Heikki Linnakangas authored
      If there's a dangerous structure T0 ---> T1 ---> T2, and T2 commits first,
      we need to abort something. If T2 commits before both conflicts appear,
      then it should be caught by OnConflict_CheckForSerializationFailure. If
      both conflicts appear before T2 commits, it should be caught by
      PreCommit_CheckForSerializationFailure. But that is actually run when
      T2 *prepares*. Fix that in OnConflict_CheckForSerializationFailure, by
      treating a prepared T2 as if it committed already.
      
      This is mostly a problem for prepared transactions, which are in prepared
      state for some time, but also for regular transactions because they also go
      through the prepared state in the SSI code for a short moment when they're
      committed.
      
      Kevin Grittner and Dan Ports
      928408d9
    • Andrew Dunstan's avatar
      Fix comments over eagerly c&p'd. · b2e3be41
      Andrew Dunstan authored
      b2e3be41
  3. 06 Jul, 2011 4 commits
    • Andrew Dunstan's avatar
      Reimplement pgbison and pgflex as perl scripts instead of bat files. · c895e775
      Andrew Dunstan authored
      In the process, remove almost all knowledge of individual .y and .l files,
      and instead get invocation settings from the relevant make files.
      The exception is plpgsql's gram.y, which has a target with a different
      name. It is hoped that this will make the scripts more future-proof,
      so that they won't require adjustment every time we add a new .l or .y
      file.
      
      The logic is also notably less tortured than that forced on us
      by the idiosyncrasies of the Windows command processor.
      
      The .bat files are kept as thin wrappers for the perl scripts.
      c895e775
    • Tom Lane's avatar
      Remove assumptions that not-equals operators cannot be in any opclass. · 14f67192
      Tom Lane authored
      get_op_btree_interpretation assumed this in order to save some duplication
      of code, but it's not true in general anymore because we added <> support
      to btree_gist.  (We still assume it for btree opclasses, though.)
      
      Also, essentially the same logic was baked into predtest.c.  Get rid of
      that duplication by generalizing get_op_btree_interpretation so that it
      can be used by predtest.c.
      
      Per bug report from Denis de Bernardy and investigation by Jeff Davis,
      though I didn't use Jeff's patch exactly as-is.
      
      Back-patch to 9.1; we do not support this usage before that.
      14f67192
    • Robert Haas's avatar
      Add \ir command to psql. · c7f23494
      Robert Haas authored
      \ir is short for "include relative"; when used from a script, the
      supplied pathname will be interpreted relative to the input file,
      rather than to the current working directory.
      
      Gurjeet Singh, reviewed by Josh Kupershmidt, with substantial further
      cleanup by me.
      c7f23494
    • Robert Haas's avatar
      Attempt to standardize formatting of psql queries. · 5ac6b767
      Robert Haas authored
      Most queries end with a backslash, but not a newline, so try to
      standardize on that, for the convenience of people using psql -E to
      extract queries.
      
      Josh Kupershmidt, reviewed by Merlin Moncure.
      5ac6b767
  4. 05 Jul, 2011 8 commits
  5. 04 Jul, 2011 12 commits
  6. 03 Jul, 2011 5 commits
    • Tom Lane's avatar
      Put comments on the installable procedural languages. · 99e47ed0
      Tom Lane authored
      Per suggestion from Josh Kupershmidt.
      99e47ed0
    • Robert Haas's avatar
      Fix bugs in relpersistence handling during table creation. · 5da79169
      Robert Haas authored
      Unlike the relistemp field which it replaced, relpersistence must be
      set correctly quite early during the table creation process, as we
      rely on it quite early on for a number of purposes, including security
      checks.  Normally, this is set based on whether the user enters CREATE
      TABLE, CREATE UNLOGGED TABLE, or CREATE TEMPORARY TABLE, but a
      relation may also be made implicitly temporary by creating it in
      pg_temp.  This patch fixes the handling of that case, and also
      disables creation of unlogged tables in temporary tablespace (such
      table indeed skip WAL-logging, but we reject an explicit
      specification) and creation of relations in the temporary schemas of
      other sessions (which is not very sensible, and didn't work right
      anyway).
      
      Report by Amit Khandekar.
      5da79169
    • Tom Lane's avatar
      Make distprep and *clean build targets recurse into all subdirectories. · acb9198b
      Tom Lane authored
      Certain subdirectories do not get built if corresponding options are not
      selected at configure time.  However, "make distprep" should visit such
      directories anyway, so that constructing derived files to be included in
      the tarball happens without requiring all configure options to be given
      in the tarball build script.  Likewise, it's better if cleanup actions
      unconditionally visit all directories (for example, this ensures proper
      cleanup if someone has done a manual make in such a subdirectory).
      
      To handle this, set up a convention that subdirectories that are
      conditionally included in SUBDIRS should be added to ALWAYS_SUBDIRS
      instead when they are excluded.
      
      Back-patch to 9.1, so that plpython's spiexceptions.h will get provided
      in 9.1 tarballs.  There don't appear to be any instances where distprep
      actions got missed in previous releases, and anyway this fix requires
      gmake 3.80 so we don't want to apply it before 9.1.
      acb9198b
    • Andrew Dunstan's avatar
      Fix bat file quoting of %ENV. · 19b7fac8
      Andrew Dunstan authored
      19b7fac8
    • Magnus Hagander's avatar
      Mark pg_stat_reset_shared as strict · 24e2d4b6
      Magnus Hagander authored
      This is the proper fix for bug #6082 about
      pg_stat_reset_shared(NULL) causing a crash, and it reverts
      commit 79aa4453 on head.
      
      The workaround of throwing an error from inside the function is
      left on backbranches (including 9.1) since this change requires
      a new initdb.
      24e2d4b6