1. 26 1月, 2011 3 次提交
    • R
      Fix thinko in ALTER FOREIGN TABLE documentation. · 558d1c95
      Robert Haas 提交于
      Noah Misch
      558d1c95
    • T
      Replace pg_class.relhasexclusion with pg_index.indisexclusion. · bd1ad1b0
      Tom Lane 提交于
      There isn't any need to track this state on a table-wide basis, and trying
      to do so introduces undesirable semantic fuzziness.  Move the flag to
      pg_index, where it clearly describes just a single index and can be
      immutable after index creation.
      bd1ad1b0
    • T
      Implement ALTER TABLE ADD UNIQUE/PRIMARY KEY USING INDEX. · 88452d5b
      Tom Lane 提交于
      This feature allows a unique or pkey constraint to be created using an
      already-existing unique index.  While the constraint isn't very
      functionally different from the bare index, it's nice to be able to do that
      for documentation purposes.  The main advantage over just issuing a plain
      ALTER TABLE ADD UNIQUE/PRIMARY KEY is that the index can be created with
      CREATE INDEX CONCURRENTLY, so that there is not a long interval where the
      table is locked against updates.
      
      On the way, refactor some of the code in DefineIndex() and index_create()
      so that we don't have to pass through those functions in order to create
      the index constraint's catalog entries.  Also, in parse_utilcmd.c, pass
      around the ParseState pointer in struct CreateStmtContext to save on
      notation, and add error location pointers to some error reports that didn't
      have one before.
      
      Gurjeet Singh, reviewed by Steve Singer and Tom Lane
      88452d5b
  2. 25 1月, 2011 7 次提交
  3. 24 1月, 2011 19 次提交
  4. 23 1月, 2011 11 次提交
    • M
      filemode is parsed on win32 even if never used · fe12263c
      Magnus Hagander 提交于
      Per buildfarm failure.
      fe12263c
    • M
      Add pg_basebackup tool for streaming base backups · 048d148f
      Magnus Hagander 提交于
      This tool makes it possible to do the pg_start_backup/
      copy files/pg_stop_backup step in a single command.
      
      There are still some steps to be done before this is a
      complete backup solution, such as the ability to stream
      the required WAL logs, but it's still usable, and
      could do with some buildfarm coverage.
      
      In passing, make the checkpoint request optionally
      fast instead of hardcoding it.
      
      Magnus Hagander, reviewed by Fujii Masao and Dimitri Fontaine
      048d148f
    • R
      Code cleanup for assign_transaction_read_only. · 6f59777c
      Robert Haas 提交于
      As in commit fb4c5d27 on 2011-01-21,
      this avoids spurious debug messages and allows idempotent changes at
      any time.  Along the way, make assign_XactIsoLevel allow idempotent
      changes even when not within a subtransaction, to be consistent with
      the new coding of assign_transaction_read_only and because there's
      no compelling reason to do otherwise.
      
      Kevin Grittner, with some adjustments.
      6f59777c
    • T
      Quick hack to un-break plpython regression tests. · cc73c160
      Tom Lane 提交于
      It's not clear to me what should happen to the other plpython_unicode
      variant expected files, but this patch gets things passing on my own
      machines and at least some of the buildfarm.
      cc73c160
    • T
      Allow the wal_buffers setting to be auto-tuned to a reasonable value. · 0f73aae1
      Tom Lane 提交于
      If wal_buffers is initially set to -1 (which is now the default), it's
      replaced by 1/32nd of shared_buffers, with a minimum of 8 (the old default)
      and a maximum of the XLOG segment size.  The allowed range for manual
      settings is still from 4 up to whatever will fit in shared memory.
      
      Greg Smith, with implementation correction by me.
      0f73aae1
    • T
      Suppress "control reaches end of non-void function" warning from gcc 4.5. · 518b1e96
      Tom Lane 提交于
      Not sure why I'm seeing this on Fedora 14 and not earlier versions.
      Seems like a regression that gcc no longer knows that DIE() doesn't return.
      Still, adding a dummy return is harmless enough.
      518b1e96
    • T
      Suppress possibly-uninitialized-variable warnings from gcc 4.5. · e2627258
      Tom Lane 提交于
      It appears that gcc 4.5 can issue such warnings for whole structs, not
      just scalar variables as in the past.  Refactor some pg_dump code slightly
      so that the OutputContext local variables are always initialized, even
      if they won't be used.  It's cheap enough to not be worth worrying about.
      e2627258
    • P
      Get rid of the global variable holding the error state · 116ce2f4
      Peter Eisentraut 提交于
      Global error handling led to confusion and was hard to manage.  With
      this change, errors from PostgreSQL are immediately reported to Python
      as exceptions.  This requires setting a Python exception after
      reporting the caught PostgreSQL error as a warning, because PLy_elog
      destroys the Python exception state.
      
      Ideally, all places where PostgreSQL errors need to be reported back
      to Python should be wrapped in subtransactions, to make going back to
      Python from a longjmp safe.  This will be handled in a separate patch.
      
      Jan Urbański
      116ce2f4
    • T
      More pg_test_fsync fixups. · 37eb2cd4
      Tom Lane 提交于
      Reduce #includes to minimum actually needed; in particular include
      postgres_fe.h not postgres.h, so as to stop build failures on some
      platforms.
      
      Use get_progname() instead of hardwired program name; improve error
      checking for command line syntax; bring error messages into line with
      style guidelines; include strerror result in die() cases.
      37eb2cd4
    • T
      Suppress unused-variables warning when OPEN_SYNC_FLAG isn't defined. · 3ae28ce8
      Tom Lane 提交于
      Per buildfarm.
      3ae28ce8
    • M
      Link libpgport into pg_test_fsync on msvc · f5a0fd2f
      Magnus Hagander 提交于
      f5a0fd2f