1. 22 4月, 2004 2 次提交
    • T
      Tweak indexscan and seqscan code to arrange that steps from one page to · 37fa3b6c
      Tom Lane 提交于
      the next are handled by ReleaseAndReadBuffer rather than separate
      ReleaseBuffer and ReadBuffer calls.  This cuts the number of acquisitions
      of the BufMgrLock by a factor of 2 (possibly more, if an indexscan happens
      to pull successive rows from the same heap page).  Unfortunately this
      doesn't seem enough to get us out of the recently discussed context-switch
      storm problem, but it's surely worth doing anyway.
      37fa3b6c
    • T
      Another round of code cleanup on bufmgr. Use BM_VALID flag to keep track · 95a03e9c
      Tom Lane 提交于
      of whether we have successfully read data into a buffer; this makes the
      error behavior a bit more transparent (IMHO anyway), and also makes it
      work correctly for local buffers which don't use Start/TerminateBufferIO.
      Collapse three separate functions for writing a shared buffer into one.
      This overlaps a bit with cleanups that Neil proposed awhile back, but
      seems not to have committed yet.
      95a03e9c
  2. 21 4月, 2004 4 次提交
  3. 20 4月, 2004 22 次提交
  4. 19 4月, 2004 2 次提交
    • B
      Fix typo: · 7931a8fd
      Bruce Momjian 提交于
      < * -Allow psql \du to show groups, and add \dg for groups
      > * -Allow psql \du to show users, and add \dg for groups
      7931a8fd
    • T
      Tweak findTargetlistEntry so that bare names occurring in GROUP BY clauses · b5e52b08
      Tom Lane 提交于
      are sought first as local FROM columns, then as local SELECT-list aliases,
      and finally as outer FROM columns; the former behavior made outer FROM
      columns take precedence over aliases.  This does not change spec
      conformance because SQL99 allows only the first case anyway, and it seems
      more useful and self-consistent.  Per gripe from Dennis Bjorklund 2004-04-05.
      b5e52b08
  5. 16 4月, 2004 2 次提交
  6. 15 4月, 2004 6 次提交
  7. 13 4月, 2004 1 次提交
    • B
      Here's an attempt at new socket and signal code for win32. · a4c40f14
      Bruce Momjian 提交于
      It works on the principle of turning sockets into non-blocking, and then
      emulate blocking behaviour on top of that, while allowing signals to
      run. Signals are now implemented using an event instead of APCs, thus
      getting rid of the issue of APCs not being compatible with "old style"
      sockets functions.
      
      It also moves the win32 specific code away from pqsignal.h/c into
      port/win32, and also removes the "thread style workaround" of the APC
      issue previously in place.
      
      In order to make things work, a few things are also changed in pgstat.c:
      
      1) There is now a separate pipe to the collector and the bufferer. This
      is required because the pipe will otherwise only be signalled in one of
      the processes when the postmaster goes down. The MS winsock code for
      select() must have some kind of workaround for this behaviour, but I
      have found no stable way of doing that. You really are not supposed to
      use the same socket from more than one process (unless you use
      WSADuplicateSocket(), in which case the docs specifically say that only
      one will be flagged).
      
      2) The check for "postmaster death" is moved into a separate select()
      call after the main loop. The previous behaviour select():ed on the
      postmaster pipe, while later explicitly saying "we do NOT check for
      postmaster exit inside the loop".
      The issue was that the code relies on the same select() call seeing both
      the postmaster pipe *and* the pgstat pipe go away. This does not always
      happen, and it appears that useing WSAEventSelect() makes it even more
      common that it does not.
      Since it's only called when the process exits, I don't think using a
      separate select() call will have any significant impact on how the stats
      collector works.
      
      Magnus Hagander
      a4c40f14
  8. 12 4月, 2004 1 次提交