1. 30 4月, 2013 5 次提交
  2. 28 4月, 2013 1 次提交
    • T
      Editorialize a bit on new ProcessUtility() API. · f8db76e8
      Tom Lane 提交于
      Choose a saner ordering of parameters (adding a new input param after
      the output params seemed a bit random), update the function's header
      comment to match reality (cmon folks, is this really that hard?),
      get rid of useless and sloppily-defined distinction between
      PROCESS_UTILITY_SUBCOMMAND and PROCESS_UTILITY_GENERATED.
      f8db76e8
  3. 23 4月, 2013 1 次提交
  4. 20 4月, 2013 1 次提交
  5. 19 4月, 2013 1 次提交
  6. 18 4月, 2013 1 次提交
  7. 17 4月, 2013 2 次提交
  8. 16 4月, 2013 1 次提交
    • T
      Improve GiST index search performance for trigram regex queries. · 410bed2a
      Tom Lane 提交于
      The initial coding just descended the index if any of the target trigrams
      were possibly present at the next level down.  But actually we can apply
      trigramsMatchGraph() so as to take advantage of AND requirements when there
      are some.  The input data might contain false positive matches, but that
      can only result in a false positive result, not false negative, so it's
      safe to do it this way.
      
      Alexander Korotkov
      410bed2a
  9. 14 4月, 2013 1 次提交
    • P
      pg_ctl: Add idempotent option · 87306184
      Peter Eisentraut 提交于
      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
  10. 12 4月, 2013 2 次提交
  11. 11 4月, 2013 2 次提交
    • T
      Make contrib/pg_trgm also support regex searches with GiST indexes. · 6f5b8beb
      Tom Lane 提交于
      This wasn't addressed in the original patch, but it doesn't take very
      much additional code to cover the case, so let's get it done.
      
      Since pg_trgm 1.1 hasn't been released yet, I just changed the definition
      of what's in it, rather than inventing a 1.2.
      6f5b8beb
    • A
      Make worker_spi sample code more complete · e543631f
      Alvaro Herrera 提交于
      Make use of some GUC variables, and add SIGHUP handling to reload
      the config file.  Patch submitted by Guillaume Lelarge.
      
      Also, report to pg_stat_activity.  Per report from Marc Cousin, add
      setting of statement start time.
      e543631f
  12. 09 4月, 2013 1 次提交
    • T
      Support indexing of regular-expression searches in contrib/pg_trgm. · 3ccae48f
      Tom Lane 提交于
      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
  13. 08 4月, 2013 1 次提交
    • T
      Get rid of USE_WIDE_UPPER_LOWER dependency in trigram construction. · 7844608e
      Tom Lane 提交于
      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
  14. 05 4月, 2013 1 次提交
  15. 31 3月, 2013 2 次提交
    • B
      pg_upgrade: don't copy/link files for invalid indexes · 203d8ae2
      Bruce Momjian 提交于
      Now that pg_dump no longer dumps invalid indexes, per commit
      683abc73, have pg_upgrade also skip
      them.  Previously pg_upgrade threw an error if invalid indexes existed.
      
      Backpatch to 9.2, 9.1, and 9.0 (where pg_upgrade was added to git)
      203d8ae2
    • A
      Avoid moving data directory in upgrade testing. · 67eb3e50
      Andrew Dunstan 提交于
      Windows sometimes gets upset if we rename a large directory and then try
      to use the old name quickly, as seen in occasional buildfarm failures.
      So we avoid that by building the old version in the intended
      destination in the first place instead of renaming it, similar to the
      change made for the same reason in commit b7f8465c.
      67eb3e50
  16. 29 3月, 2013 1 次提交
    • R
      Allow sepgsql labels to depend on object name. · 0f05840b
      Robert Haas 提交于
      The main change here is to call security_compute_create_name_raw()
      rather than security_compute_create_raw().  This ups the minimum
      requirement for libselinux from 2.0.99 to 2.1.10, but it looks
      like most distributions will have picked that up before 9.3 is out.
      
      KaiGai Kohei
      0f05840b
  17. 27 3月, 2013 1 次提交
  18. 23 3月, 2013 2 次提交
    • T
      Document cross-version compatibility issues for contrib/postgres_fdw. · 5b86fedf
      Tom Lane 提交于
      One of the use-cases for postgres_fdw is extracting data from older PG
      servers, so cross-version compatibility is important.  Document what we
      can do here, and further annotate some of the coding choices that create
      compatibility constraints.  In passing, remove one unnecessary
      incompatibility with old servers, namely assuming that we didn't need to
      quote the timezone name 'UTC'.
      5b86fedf
    • T
      Fix contrib/dblink to handle inconsistent DateStyle/IntervalStyle safely. · 8a3b6772
      Tom Lane 提交于
      If the remote database's settings of these GUCs are different from ours,
      ambiguous datetime values may be read incorrectly.  To fix, temporarily
      adopt the remote server's settings while we ingest a query result.
      
      This is not a complete fix, since it doesn't do anything about ambiguous
      values in commands sent to the remote server; but there seems little we
      can do about that end of it given dblink's entirely textual API for
      transmitted commands.
      
      Back-patch to 9.2.  The hazard exists in all versions, but this patch
      would need more work to apply before 9.2.  Given the lack of field
      complaints about this issue, it doesn't seem worth the effort at present.
      
      Daniel Farina and Tom Lane
      8a3b6772
  19. 22 3月, 2013 4 次提交
    • S
      Allow I/O reliability checks using 16-bit checksums · 96ef3b8f
      Simon Riggs 提交于
      Checksums are set immediately prior to flush out of shared buffers
      and checked when pages are read in again. Hint bit setting will
      require full page write when block is dirtied, which causes various
      infrastructure changes. Extensive comments, docs and README.
      
      WARNING message thrown if checksum fails on non-all zeroes page;
      ERROR thrown but can be disabled with ignore_checksum_failure = on.
      
      Feature enabled by an initdb option, since transition from option off
      to option on is long and complex and has not yet been implemented.
      Default is not to use checksums.
      
      Checksum used is WAL CRC-32 truncated to 16-bits.
      
      Simon Riggs, Jeff Davis, Greg Smith
      Wide input and assistance from many community members. Thank you.
      96ef3b8f
    • A
      Silence compiler warnings about unused values. · e4a05c75
      Andrew Dunstan 提交于
      Per gripe from Kevin Grittner.
      e4a05c75
    • T
      Avoid retrieving dummy NULL columns in postgres_fdw. · e690b951
      Tom Lane 提交于
      This should provide some marginal overall savings, since it surely takes
      many more cycles for the remote server to deal with the NULL columns than
      it takes for postgres_fdw not to emit them.  But really the reason is to
      keep the emitted queries from looking quite so silly ...
      e690b951
    • T
      Redo postgres_fdw's planner code so it can handle parameterized paths. · 9cbc4b80
      Tom Lane 提交于
      I wasn't going to ship this without having at least some example of how
      to do that.  This version isn't terribly bright; in particular it won't
      consider any combinations of multiple join clauses.  Given the cost of
      executing a remote EXPLAIN, I'm not sure we want to be very aggressive
      about doing that, anyway.
      
      In support of this, refactor generate_implied_equalities_for_indexcol
      so that it can be used to extract equivalence clauses that aren't
      necessarily tied to an index.
      9cbc4b80
  20. 18 3月, 2013 6 次提交
    • S
      Add pageinspect--1.0--1.sql for checksum changes · e016b724
      Simon Riggs 提交于
      e016b724
    • S
      Add pageinspect--1.1.sql for checksum changes · ef04cb74
      Simon Riggs 提交于
      ef04cb74
    • S
      Remove PageSetTLI and rename pd_tli to pd_checksum · bb7cc262
      Simon Riggs 提交于
      Remove use of PageSetTLI() from all page manipulation functions
      and adjust README to indicate change in the way we make changes
      to pages. Repurpose those bytes into the pd_checksum field and
      explain how that works in comments about page header.
      
      Refactoring ahead of actual feature patch which would make use
      of the checksum field, arriving later.
      
      Jeff Davis, with comments and doc changes by Simon Riggs
      Direction suggested by Robert Haas; many others providing
      review comments.
      bb7cc262
    • T
      Use pqsignal() in contrib programs rather than calling signal(2) directly. · 3c07fbf4
      Tom Lane 提交于
      The semantics of signal(2) are more variable than one could wish; in
      particular, on strict-POSIX platforms the signal handler will be reset
      to SIG_DFL when the signal is delivered.  This demonstrably breaks
      pg_test_fsync's use of SIGALRM.  The other changes I made are not
      absolutely necessary today, because the called handlers all exit the
      program anyway.  But it seems like a good general practice to use
      pqsignal() exclusively in Postgres code, now that we have it available
      everywhere.
      3c07fbf4
    • T
      Fix inclusions in pgbench.c. · 8c41cb69
      Tom Lane 提交于
      Apparently this was depending on pqsignal.h for <signal.h>.
      Not sure why I didn't see the failure on my other machine.
      8c41cb69
    • T
      Move pqsignal() to libpgport. · da5aeccf
      Tom Lane 提交于
      We had two copies of this function in the backend and libpq, which was
      already pretty bogus, but it turns out that we need it in some other
      programs that don't use libpq (such as pg_test_fsync).  So put it where
      it probably should have been all along.  The signal-mask-initialization
      support in src/backend/libpq/pqsignal.c stays where it is, though, since
      we only need that in the backend.
      da5aeccf
  21. 16 3月, 2013 1 次提交
    • T
      Improve the documentation about commit_delay. · 70ec2f8f
      Tom Lane 提交于
      Clarify the docs explaining what commit_delay does, and add a
      recommendation about a useful value for it, namely half of the single-page
      fsync time reported by pg_test_fsync.  This is informed by testing of
      the new-in-9.3 implementation of commit_delay; in prior versions it
      was far harder to arrive at a useful setting.
      
      In passing, do some wordsmithing and markup-fixing in the same general
      area.
      
      Also, change pg_test_fsync's default time-per-test from 2 seconds to 5.
      The old value was about the minimum at which the results could be taken
      seriously at all, and so seems a tad optimistic as a default.
      
      Peter Geoghegan, reviewed by Noah Misch; some additional editing by me
      70ec2f8f
  22. 15 3月, 2013 1 次提交
  23. 14 3月, 2013 1 次提交
    • T
      Introduce less-bogus handling of collations in contrib/postgres_fdw. · ed3ddf91
      Tom Lane 提交于
      Treat expressions as being remotely executable only if all collations used
      in them are determined by Vars of the foreign table.  This means that, if
      the foreign server gets different answers than we do, it's the user's fault
      for not having marked the foreign table columns with collations equivalent
      to the remote table's.  This rule allows most simple expressions such as
      "var < 'constant'" to be sent to the remote side, because the constant
      isn't determining the collation (the Var's collation would win).  There's
      still room for improvement, but it's hard to see how to do it without a
      lot more knowledge and/or assumptions about what the remote side will do.
      ed3ddf91