1. 10 7月, 2007 2 次提交
  2. 09 7月, 2007 8 次提交
    • T
      Fix single-user mode so that interrupts (particularly SIGTERM and · 9e09e3b1
      Tom Lane 提交于
      SIGQUIT) will be recognized and processed while waiting for input,
      rather than only after something has been typed.  Also make SIGQUIT
      do the same thing as SIGTERM in single-user mode, ie, do a normal
      shutdown and exit.  Since it's relatively easy to provoke SIGQUIT
      from the keyboard, people may try that instead of control-D, and we'd
      rather this leads to orderly shutdown.  Per report from Leon Mergen
      and subsequent discussion.
      9e09e3b1
    • T
      Minor copy-editing. · 9b619679
      Tom Lane 提交于
      9b619679
    • T
      Remove the pgstat_drop_relation() call from smgr_internal_unlink(), because · b09cb0cf
      Tom Lane 提交于
      we don't know at that point which relation OID to tell pgstat to forget.
      The code was passing the relfilenode, which is incorrect, and could possibly
      cause some other relation's stats to be zeroed out.  While we could try to
      clean this up, it seems much simpler and more reliable to let the next
      invocation of pgstat_vacuum_tabstat() fix things; which indeed is how it
      worked before I introduced the buggy code into 8.1.3 and later :-(.
      Problem noticed by Itagaki Takahiro, fix is per subsequent discussion.
      b09cb0cf
    • T
      Get rid of client-code dependencies on the exact text of the no-password · 8331c11f
      Tom Lane 提交于
      error message, by using PQconnectionUsedPassword() instead.  Someday
      we might be able to localize that error message, but not until this
      coding technique has disappeared everywhere.
      8331c11f
    • T
      Closer code review for PQconnectionUsedPassword() patch: in particular, · 5f7b1f8d
      Tom Lane 提交于
      not OK to include postgres_fe.h into libpq-fe.h, hence declare it as
      returning int not bool.
      5f7b1f8d
    • T
      Fix broken markup. · 3f33d7bc
      Tom Lane 提交于
      3f33d7bc
    • J
      Restrict non-superusers to password authenticated connections · d92583f8
      Joe Conway 提交于
      to prevent possible escalation of privilege. Provide new SECURITY
      DEFINER functions with old behavior, but initially REVOKE ALL
      from public for these functions. Per list discussion and design
      proposed by Tom Lane. A different approach will be used for
      back-branches, committed separately.
      d92583f8
    • J
      Arrange for the authentication request type to be preserved in · 51bc3dfe
      Joe Conway 提交于
      PGconn. Invent a new libpq connection-status function,
      PQconnectionUsedPassword() that returns true if the server
      demanded a password during authentication, false otherwise.
      This may be useful to clients in general, but is immediately
      useful to help plug a privilege escalation path in dblink.
      Per list discussion and design proposed by Tom Lane.
      51bc3dfe
  3. 08 7月, 2007 3 次提交
  4. 07 7月, 2007 2 次提交
  5. 06 7月, 2007 3 次提交
  6. 03 7月, 2007 4 次提交
    • T
      Fix incorrect comment about the timing of AbsorbFsyncRequests() during · 83aaebba
      Tom Lane 提交于
      checkpoint.  The comment claimed that we could do this anytime after
      setting the checkpoint REDO point, but actually BufferSync is relying
      on the assumption that buffers dumped by other backends will be fsync'd
      too.  So we really could not do it any sooner than we are doing it.
      83aaebba
    • N
      Add ALTER VIEW ... RENAME TO, and a RENAME TO clause to ALTER SEQUENCE. · a5589813
      Neil Conway 提交于
      Sequences and views could previously be renamed using ALTER TABLE, but
      this was a repeated source of confusion for users. Update the docs,
      and psql tab completion. Patch from David Fetter; various minor fixes
      by myself.
      a5589813
    • M
      - Fix the -w (wait) option to work in Windows service mode, per bug #3382. · a1587e41
      Magnus Hagander 提交于
      - Prevent the -w option being passed to the postmaster.
      - Read the postmaster options file when starting as a Windows service.
      
      Dave Page
      a1587e41
    • T
      Fix failure to restart Postgres when Linux kernel returns EIDRM for shmctl(). · 1c7fe33f
      Tom Lane 提交于
      This is a Linux kernel bug that apparently exists in every extant kernel
      version: sometimes shmctl() will fail with EIDRM when EINVAL is correct.
      We were assuming that EIDRM indicates a possible conflict with pre-existing
      backends, and refusing to start the postmaster when this happens.  Fortunately,
      there does not seem to be any case where Linux can legitimately return EIDRM
      (it doesn't track shmem segments in a way that would allow that), so we can
      get away with just assuming that EIDRM means EINVAL on this platform.
      
      Per reports from Michael Fuhr and Jon Lapham --- it's a bit surprising
      we have not seen more reports, actually.
      1c7fe33f
  7. 02 7月, 2007 4 次提交
    • M
      Add notes about configuring Visual Studio Express for use with the · 454333a6
      Magnus Hagander 提交于
      Platform SDK.
      454333a6
    • T
      Reduce the maximum sleep interval in the autovac launcher to 1 second, · bce7bacd
      Tom Lane 提交于
      so that it responds to SIGQUIT reasonably promptly even on machines where
      SA_RESTART signals restart a sleep from scratch.  (This whole area could
      stand some rethinking, but for now make it work like the other processes
      do.)  Also some marginal stylistic cleanups.
      bce7bacd
    • T
      Treat the autovac launcher more like a regular backend, in that we wait · 421d5027
      Tom Lane 提交于
      for it to die before telling the bgwriter to initiate shutdown checkpoint.
      Since it's connected to shared memory, this seems more prudent than the
      alternative of letting it quit asynchronously.  Resolves my complaint
      of yesterday about repeated shutdown checkpoints in CVS HEAD.
      421d5027
    • T
      Avoid memory leakage when a series of subtransactions invoke AFTER triggers · 8f55b9a8
      Tom Lane 提交于
      that are fired at end-of-statement (as is the normal case for foreign keys,
      for example).  In this situation the per-subxact deferred trigger context
      is always empty when subtransaction exit is reached; so we could free it,
      but were not doing so, leading to an intratransaction leak of 8K or more
      per subtransaction.  Per off-list example from Viatcheslav Kalinin
      subsequent to bug #3418 (his original bug report omitted a foreign key
      constraint needed to cause this leak).
      
      Back-patch to 8.2; prior versions were not using per-subxact contexts
      for deferred triggers, so did not have this leak.
      8f55b9a8
  8. 01 7月, 2007 3 次提交
  9. 30 6月, 2007 3 次提交
  10. 29 6月, 2007 4 次提交
    • T
      Add a note that pg_start_backup will take awhile because of new · 4303c0fd
      Tom Lane 提交于
      distributed checkpoint behavior.  Explain how to work around this
      by issuing a manual CHECKPOINT command.  Per discussion with Heikki.
      4303c0fd
    • T
      Fix a passel of ancient bugs in to_char(), including two distinct buffer · 6faf7956
      Tom Lane 提交于
      overruns (neither of which seem likely to be exploitable as security holes,
      fortunately, since the provoker can't control the data written).  One of
      these is due to choosing to stomp on the output of a called function, which
      is bad news in any case; make it treat the called functions' results as
      read-only.  Avoid some unnecessary palloc/pfree traffic too; it's not
      really helpful to free small temporary objects, and again this is presuming
      more than it ought to about the nature of the results of called functions.
      Per report from Patrick Welche and additional code-reading by Imad.
      6faf7956
    • B
      Done: · 700eabbe
      Bruce Momjian 提交于
      > * -Reduce checkpoint performance degredation by forcing data to disk
      700eabbe
    • T
      Fix incorrect tests for undef Perl values in some places in plperl.c. · 3cabc675
      Tom Lane 提交于
      The correct test for defined-ness is SvOK(sv), not anything involving
      SvTYPE.  Per bug #3415 from Matt Taylor.
      Back-patch as far as 8.0; no apparent problem in 7.x.
      3cabc675
  11. 28 6月, 2007 2 次提交
    • N
      Add the function's volatility to the output of psql's \df+ command. · 7c07b136
      Neil Conway 提交于
      Update the psql reference page accordingly.
      7c07b136
    • T
      Implement "distributed" checkpoints in which the checkpoint I/O is spread · 867e2c91
      Tom Lane 提交于
      over a fairly long period of time, rather than being spat out in a burst.
      This happens only for background checkpoints carried out by the bgwriter;
      other cases, such as a shutdown checkpoint, are still done at full speed.
      
      Remove the "all buffers" scan in the bgwriter, and associated stats
      infrastructure, since this seems no longer very useful when the checkpoint
      itself is properly throttled.
      
      Original patch by Itagaki Takahiro, reworked by Heikki Linnakangas,
      and some minor API editorialization by me.
      867e2c91
  12. 27 6月, 2007 2 次提交