1. 16 Oct, 2003 1 commit
    • Tom Lane's avatar
      Fix bad interaction between NOTIFY processing and V3 extended query · 90b22029
      Tom Lane authored
      protocol, per report from Igor Shevchenko.  NOTIFY thought it could
      do its thing if transaction blockState is TBLOCK_DEFAULT, but in
      reality it had better check the low-level transaction state is
      TRANS_DEFAULT as well.  Formerly it was not possible to wait for the
      client in a state where the first is true and the second is not ...
      but now we can have such a state.  Minor cleanup in StartTransaction()
      as well.
      90b22029
  2. 01 Oct, 2003 1 commit
    • Tom Lane's avatar
      Repair RI trigger visibility problems (this time for sure ;-)) per recent · 55d85f42
      Tom Lane authored
      discussion on pgsql-hackers: in READ COMMITTED mode we just have to force
      a QuerySnapshot update in the trigger, but in SERIALIZABLE mode we have
      to run the scan under a current snapshot and then complain if any rows
      would be updated/deleted that are not visible in the transaction snapshot.
      55d85f42
  3. 15 Sep, 2003 2 commits
    • Tom Lane's avatar
      Fix LISTEN/NOTIFY race condition reported by Gavin Sherry. While a · db18703b
      Tom Lane authored
      really general fix might be difficult, I believe the only case where
      AtCommit_Notify could see an uncommitted tuple is where the other guy
      has just unlistened and not yet committed.  The best solution seems to
      be to just skip updating that tuple, on the assumption that the other
      guy does not want to hear about the notification anyway.  This is not
      perfect --- if the other guy rolls back his unlisten instead of committing,
      then he really should have gotten this notify.  But to do that, we'd have
      to wait to see if he commits or not, or make UNLISTEN hold exclusive lock
      on pg_listener until commit.  Either of these answers is deadlock-prone,
      not to mention horrible for interactive performance.  Do it this way
      for now.  (What happened to that project to do LISTEN/NOTIFY in memory
      with no table, anyway?)
      db18703b
    • Peter Eisentraut's avatar
  4. 04 Aug, 2003 2 commits
  5. 20 Jul, 2003 1 commit
  6. 27 May, 2003 1 commit
  7. 14 May, 2003 1 commit
  8. 22 Apr, 2003 1 commit
    • Tom Lane's avatar
      Another round of protocol changes. Backend-to-frontend messages now all · 5ed27e35
      Tom Lane authored
      have length words.  COPY OUT reimplemented per new protocol: it doesn't
      need \. anymore, thank goodness.  COPY BINARY to/from frontend works,
      at least as far as the backend is concerned --- libpq's PQgetline API
      is not up to snuff, and will have to be replaced with something that is
      null-safe.  libpq uses message length words for performance improvement
      (no cycles wasted rescanning long messages), but not yet for error
      recovery.
      5ed27e35
  9. 18 Feb, 2003 1 commit
  10. 16 Sep, 2002 1 commit
    • Tom Lane's avatar
      Fix for rare race-condition-like failure: if a backend receives SIGUSR2 · 53e95eee
      Tom Lane authored
      (notify/SI-overrun interrupt) while it is in process of doing proc_exit,
      it is possible for Async_NotifyHandler() to try to start a transaction
      when one is already running.  This leads to Asserts() or worse.  I think
      it may only be possible to occur when frontend synchronization is lost
      (ie, the elog(FATAL) in SocketBackend() fires), but that is a standard
      occurrence after error during COPY.  In any case, I have seen this
      failure occur during regression tests, so it is definitely possible.
      53e95eee
  11. 02 Sep, 2002 1 commit
  12. 30 Aug, 2002 1 commit
    • Tom Lane's avatar
      AUTOCOMMIT mode is now an available backend GUC variable; setting it · 26993b29
      Tom Lane authored
      to false provides more SQL-spec-compliant behavior than we had before.
      I am not sure that setting it false is actually a good idea yet; there
      is a lot of client-side code that will probably be broken by turning
      autocommit off.  But it's a start.
      
      Loosely based on a patch by David Van Wie.
      26993b29
  13. 05 Aug, 2002 1 commit
    • Tom Lane's avatar
      Restructure system-catalog index updating logic. Instead of having · 15fe086f
      Tom Lane authored
      hardwired lists of index names for each catalog, use the relcache's
      mechanism for caching lists of OIDs of indexes of any table.  This
      reduces the common case of updating system catalog indexes to a single
      line, makes it much easier to add a new system index (in fact, you
      can now do so on-the-fly if you want to), and as a nice side benefit
      improves performance a little.  Per recent pghackers discussion.
      15fe086f
  14. 20 Jun, 2002 1 commit
  15. 21 May, 2002 1 commit
    • Tom Lane's avatar
      Remove global variable scanCommandId in favor of storing a command ID · 959e61e9
      Tom Lane authored
      in snapshots, per my proposal of a few days ago.  Also, tweak heapam.c
      routines (heap_insert, heap_update, heap_delete, heap_mark4update) to
      be passed the command ID to use, instead of doing GetCurrentCommandID.
      For catalog updates they'll still get passed current command ID, but
      for updates generated from the main executor they'll get passed the
      command ID saved in the snapshot the query is using.  This should fix
      some corner cases associated with functions and triggers that advance
      current command ID while an outer query is still in progress.
      959e61e9
  16. 20 May, 2002 1 commit
    • Tom Lane's avatar
      Restructure indexscan API (index_beginscan, index_getnext) per · 44fbe20d
      Tom Lane authored
      yesterday's proposal to pghackers.  Also remove unnecessary parameters
      to heap_beginscan, heap_rescan.  I modified pg_proc.h to reflect the
      new numbers of parameters for the AM interface routines, but did not
      force an initdb because nothing actually looks at those fields.
      44fbe20d
  17. 05 May, 2002 1 commit
  18. 06 Mar, 2002 1 commit
    • Bruce Momjian's avatar
      Change made to elog: · 92288a1c
      Bruce Momjian authored
      o  Change all current CVS messages of NOTICE to WARNING.  We were going
      to do this just before 7.3 beta but it has to be done now, as you will
      see below.
      
      o Change current INFO messages that should be controlled by
      client_min_messages to NOTICE.
      
      o Force remaining INFO messages, like from EXPLAIN, VACUUM VERBOSE, etc.
      to always go to the client.
      
      o Remove INFO from the client_min_messages options and add NOTICE.
      
      Seems we do need three non-ERROR elog levels to handle the various
      behaviors we need for these messages.
      
      Regression passed.
      92288a1c
  19. 02 Mar, 2002 1 commit
    • Bruce Momjian's avatar
      Commit to match discussed elog() changes. Only update is that LOG is · a033daf5
      Bruce Momjian authored
      now just below FATAL in server_min_messages.  Added more text to
      highlight ordering difference between it and client_min_messages.
      
      ---------------------------------------------------------------------------
      
      REALLYFATAL => PANIC
      STOP => PANIC
      New INFO level the prints to client by default
      New LOG level the prints to server log by default
      Cause VACUUM information to print only to the client
      NOTICE => INFO where purely information messages are sent
      DEBUG => LOG for purely server status messages
      DEBUG removed, kept as backward compatible
      DEBUG5, DEBUG4, DEBUG3, DEBUG2, DEBUG1 added
      DebugLvl removed in favor of new DEBUG[1-5] symbols
      New server_min_messages GUC parameter with values:
              DEBUG[5-1], INFO, NOTICE, ERROR, LOG, FATAL, PANIC
      New client_min_messages GUC parameter with values:
              DEBUG[5-1], LOG, INFO, NOTICE, ERROR, FATAL, PANIC
      Server startup now logged with LOG instead of DEBUG
      Remove debug_level GUC parameter
      elog() numbers now start at 10
      Add test to print error message if older elog() values are passed to elog()
      Bootstrap mode now has a -d that requires an argument, like postmaster
      a033daf5
  20. 25 Oct, 2001 1 commit
  21. 08 Sep, 2001 1 commit
    • Tom Lane's avatar
      Clean up some confusion about where and how to set whereToSendOutput. · 02b1a7fd
      Tom Lane authored
      We will no longer try to send elog messages to the client before we have
      initialized backend libpq (oops); however, reporting bogus commandline
      switches via elog does work now (not irrelevant, because of PGOPTIONS).
      Fix problem with inappropriate sending of checkpoint-process messages
      to stderr.
      02b1a7fd
  22. 17 Jun, 2001 1 commit
    • Tom Lane's avatar
      Keep the list of to-be-NOTIFYed names in a plain List palloc'd in · 6054b332
      Tom Lane authored
      TopTransactionContext, rather than using Dllist.  This simplifies and
      speeds up the code, and eliminates a former risk of coredump when
      out of memory (since the old code didn't bother to check for malloc
      failure).  It also moves us one step closer to retiring Dllist...
      6054b332
  23. 12 Jun, 2001 1 commit
    • Tom Lane's avatar
      Clean up various to-do items associated with system indexes: · 1d584f97
      Tom Lane authored
      pg_database now has unique indexes on oid and on datname.
      pg_shadow now has unique indexes on usename and on usesysid.
      pg_am now has unique index on oid.
      pg_opclass now has unique index on oid.
      pg_amproc now has unique index on amid+amopclaid+amprocnum.
      Remove pg_rewrite's unnecessary index on oid, delete unused RULEOID syscache.
      Remove index on pg_listener and associated syscache for performance reasons
      (caching rows that are certain to change before you need 'em again is
      rather pointless).
      Change pg_attrdef's nonunique index on adrelid into a unique index on
      adrelid+adnum.
      
      Fix various incorrect settings of pg_class.relisshared, make that the
      primary reference point for whether a relation is shared or not.
      IsSharedSystemRelationName() is now only consulted to initialize relisshared
      during initial creation of tables and indexes.  In theory we might now
      support shared user relations, though it's not clear how one would get
      entries for them into pg_class &etc of multiple databases.
      
      Fix recently reported bug that pg_attribute rows created for an index all have
      the same OID.  (Proof that non-unique OID doesn't matter unless it's
      actually used to do lookups ;-))
      
      There's no need to treat pg_trigger, pg_attrdef, pg_relcheck as bootstrap
      relations.  Convert them into plain system catalogs without hardwired
      entries in pg_class and friends.
      
      Unify global.bki and template1.bki into a single init script postgres.bki,
      since the alleged distinction between them was misleading and pointless.
      Not to mention that it didn't work for setting up indexes on shared
      system relations.
      
      Rationalize locking of pg_shadow, pg_group, pg_attrdef (no need to use
      AccessExclusiveLock where ExclusiveLock or even RowExclusiveLock will do).
      Also, hold locks until transaction commit where necessary.
      1d584f97
  24. 22 Mar, 2001 1 commit
  25. 24 Jan, 2001 1 commit
  26. 23 Jan, 2001 1 commit
    • Tom Lane's avatar
      Fix all the places that called heap_update() and heap_delete() without · 786f1a59
      Tom Lane authored
      bothering to check the return value --- which meant that in case the
      update or delete failed because of a concurrent update, you'd not find
      out about it, except by observing later that the transaction produced
      the wrong outcome.  There are now subroutines simple_heap_update and
      simple_heap_delete that should be used anyplace that you're not prepared
      to do the full nine yards of coping with concurrent updates.  In
      practice, that seems to mean absolutely everywhere but the executor,
      because *noplace* else was checking.
      786f1a59
  27. 18 Dec, 2000 1 commit
  28. 28 Nov, 2000 1 commit
    • Tom Lane's avatar
      Significant cleanups in SysV IPC handling (shared mem and semaphores). · c715fdea
      Tom Lane authored
      IPC key assignment will now work correctly even when multiple postmasters
      are using same logical port number (which is possible given -k switch).
      There is only one shared-mem segment per postmaster now, not 3.
      Rip out broken code for non-TAS case in bufmgr and xlog, substitute a
      complete S_LOCK emulation using semaphores in spin.c.  TAS and non-TAS
      logic is now exactly the same.
      When deadlock is detected, "Deadlock detected" is now the elog(ERROR)
      message, rather than a NOTICE that comes out before an unhelpful ERROR.
      c715fdea
  29. 21 Nov, 2000 1 commit
  30. 16 Nov, 2000 1 commit
  31. 03 Oct, 2000 1 commit
    • Bruce Momjian's avatar
      New diff that now covers the entire tree. Applying this gets postgresql · 87c0e623
      Bruce Momjian authored
      working on the VERY latest version of BeOS.  I'm sure there will be
      alot of comments, but then if there weren't I'd be disappointed!
      
      Thanks for your continuing efforts to get this into your tree.
      
      Haven't bothered with the new files as they haven't changed.
      
      BTW Peter, the compiler is "broken" about the bool define and so on.
      I'm filing a bug report to try and get it addressed.  Hopefully then we
      can tidy up the code a bit.
      
      I await the replies with interest :)
      
      David Reid
      87c0e623
  32. 02 Oct, 2000 1 commit
  33. 29 Aug, 2000 1 commit
  34. 27 Aug, 2000 1 commit
  35. 08 Jul, 2000 1 commit
  36. 08 Jun, 2000 1 commit
  37. 07 Jun, 2000 1 commit
  38. 04 Jun, 2000 1 commit