1. 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
  2. 14 May, 2001 1 commit
  3. 12 May, 2001 1 commit
  4. 22 Mar, 2001 1 commit
  5. 13 Mar, 2001 1 commit
    • Tom Lane's avatar
      XLOG (and related) changes: · 4d14fe00
      Tom Lane authored
      * Store two past checkpoint locations, not just one, in pg_control.
        On startup, we fall back to the older checkpoint if the newer one
        is unreadable.  Also, a physical copy of the newest checkpoint record
        is kept in pg_control for possible use in disaster recovery (ie,
        complete loss of pg_xlog).  Also add a version number for pg_control
        itself.  Remove archdir from pg_control; it ought to be a GUC
        parameter, not a special case (not that it's implemented yet anyway).
      
      * Suppress successive checkpoint records when nothing has been entered
        in the WAL log since the last one.  This is not so much to avoid I/O
        as to make it actually useful to keep track of the last two
        checkpoints.  If the things are right next to each other then there's
        not a lot of redundancy gained...
      
      * Change CRC scheme to a true 64-bit CRC, not a pair of 32-bit CRCs
        on alternate bytes.  Polynomial borrowed from ECMA DLT1 standard.
      
      * Fix XLOG record length handling so that it will work at BLCKSZ = 32k.
      
      * Change XID allocation to work more like OID allocation.  (This is of
        dubious necessity, but I think it's a good idea anyway.)
      
      * Fix a number of minor bugs, such as off-by-one logic for XLOG file
        wraparound at the 4 gig mark.
      
      * Add documentation and clean up some coding infelicities; move file
        format declarations out to include files where planned contrib
        utilities can get at them.
      
      * Checkpoint will now occur every CHECKPOINT_SEGMENTS log segments or
        every CHECKPOINT_TIMEOUT seconds, whichever comes first.  It is also
        possible to force a checkpoint by sending SIGUSR1 to the postmaster
        (undocumented feature...)
      
      * Defend against kill -9 postmaster by storing shmem block's key and ID
        in postmaster.pid lockfile, and checking at startup to ensure that no
        processes are still connected to old shmem block (if it still exists).
      
      * Switch backends to accept SIGQUIT rather than SIGUSR1 for emergency
        stop, for symmetry with postmaster and xlog utilities.  Clean up signal
        handling in bootstrap.c so that xlog utilities launched by postmaster
        will react to signals better.
      
      * Standalone bootstrap now grabs lockfile in target directory, as added
        insurance against running it in parallel with live postmaster.
      4d14fe00
  6. 24 Jan, 2001 1 commit
  7. 23 Jan, 2001 1 commit
  8. 19 Jan, 2001 1 commit
  9. 14 Jan, 2001 1 commit
  10. 07 Jan, 2001 1 commit
  11. 28 Dec, 2000 1 commit
  12. 12 Nov, 2000 1 commit
    • Tom Lane's avatar
      Keep track of the last active slot in the shared ProcState array, so · ebb0a201
      Tom Lane authored
      that search loops only have to scan that far and not through all maxBackends
      entries.  This eliminates a performance penalty for setting maxBackends
      much higher than the average number of active backends.  Also, eliminate
      no-longer-used 'backend tag' concept.  Remove setting of environment
      variables at backend start (except for CYR_RECODE), since none of them
      are being examined by the backend any longer.
      ebb0a201
  13. 06 Sep, 2000 1 commit
    • Peter Eisentraut's avatar
      Code cleanup of user name and user id handling in the backend. The current · 6dc24961
      Peter Eisentraut authored
      user is now defined in terms of the user id, the user name is only computed
      upon request (for display purposes). This is kind of the opposite of the
      previous state, which would maintain the user name and compute the user id
      for permission checks.
      
      Besides perhaps saving a few cycles (integer vs string), this now creates a
      single point of attack for changing the user id during a connection, for
      purposes of "setuid" functions, etc.
      6dc24961
  14. 31 May, 2000 1 commit
    • Peter Eisentraut's avatar
      The heralded `Grand Unified Configuration scheme' (GUC) · 6a68f426
      Peter Eisentraut authored
      That means you can now set your options in either or all of $PGDATA/configuration,
      some postmaster option (--enable-fsync=off), or set a SET command. The list of
      options is in backend/utils/misc/guc.c, documentation will be written post haste.
      
      pg_options is gone, so is that pq_geqo config file. Also removed were backend -K,
      -Q, and -T options (no longer applicable, although -d0 does the same as -Q).
      
      Added to configure an --enable-syslog option.
      
      changed all callers from TPRINTF to elog(DEBUG)
      6a68f426
  15. 30 May, 2000 1 commit
  16. 05 May, 2000 1 commit
  17. 12 Apr, 2000 1 commit
  18. 16 Feb, 2000 1 commit
    • Thomas G. Lockhart's avatar
      Make ISO date style (e.g. "2000-02-16 09:33") the default. · c97672b0
      Thomas G. Lockhart authored
      Implement "date/time grand unification".
       Transform datetime and timespan into timestamp and interval.
       Deprecate datetime and timespan, though translate to new types in gram.y.
       Transform all datetime and timespan catalog entries into new types.
       Make "INTERVAL" reserved word allowed as a column identifier in gram.y.
       Remove dt.h, dt.c files, and retarget datetime.h, datetime.c as utility
        routines for all date/time types.
       date.{h,c} now deals with date, time types.
       timestamp.{h,c} now deals with timestamp, interval types.
       nabstime.{h,c} now deals with abstime, reltime, tinterval types.
      Make NUMERIC a known native type for purposes of type coersion. Not tested.
      c97672b0
  19. 26 Jan, 2000 1 commit
    • Bruce Momjian's avatar
      Add: · 5c25d602
      Bruce Momjian authored
        * Portions Copyright (c) 1996-2000, PostgreSQL, Inc
      
      to all files copyright Regents of Berkeley.  Man, that's a lot of files.
      5c25d602
  20. 10 Dec, 1999 1 commit
  21. 08 Oct, 1999 1 commit
  22. 27 Sep, 1999 1 commit
  23. 17 Jul, 1999 1 commit
  24. 16 Jul, 1999 2 commits
  25. 15 Jul, 1999 3 commits
  26. 25 May, 1999 1 commit
  27. 22 May, 1999 1 commit
  28. 17 Mar, 1999 1 commit
  29. 13 Feb, 1999 1 commit
  30. 16 Oct, 1998 1 commit
    • Bruce Momjian's avatar
      The problem is that read_pg_options needs DataDir to read its file but · 8fa2742d
      Bruce Momjian authored
      DataDir is set after read_pg_options if postgres is called
      interactively.  If postgres is forked by postgres DataDir is read from
      the PGDATA enviromnent variable set by the postmaster and this explains
      while the bug disappears.  I have written this patch but I don't like
      it. Any better idea?
      
      Massimo Dal Zotto
      8fa2742d
  31. 25 Aug, 1998 1 commit
    • Marc G. Fournier's avatar
      From: Massimo Dal Zotto <dz@cs.unitn.it> · 88b17d9c
      Marc G. Fournier authored
      > ps-status.patch
      >
      >       macros for ps status, used by postgres.c and utility.c.
      >       Unfortunately ps status is system dependent and the current
      >       code doesn't work on linux. The use of macros confines system
      >       dependency to into one file (ps-status.h). Users of other
      >       operating systems should check this code and submit new macros.
      88b17d9c
  32. 09 Jul, 1998 1 commit
    • Marc G. Fournier's avatar
      · a0659e3e
      Marc G. Fournier authored
      From: Tom Lane <tgl@sss.pgh.pa.us>
      
      Making PQrequestCancel safe to call in a signal handler turned out to be
      much easier than I feared.  So here are the diffs.
      
      Some notes:
        * I modified the postmaster's packet "iodone" callback interface to allow
          the callback routine to return a continue-or-drop-connection return
          code; this was necessary to allow the connection to be closed after
          receiving a Cancel, rather than proceeding to launch a new backend...
          Being a neatnik, I also made the iodone proc have a typechecked
          parameter list.
        * I deleted all code I could find that had to do with OOB.
        * I made some edits to ensure that all signals mentioned in the code
          are referred to symbolically not by numbers ("SIGUSR2" not "2").
          I think Bruce may have already done at least some of the same edits;
          I hope that merging these patches is not too painful.
      a0659e3e
  33. 29 May, 1998 1 commit
  34. 19 May, 1998 1 commit
  35. 26 Feb, 1998 1 commit
  36. 25 Feb, 1998 1 commit
    • Marc G. Fournier's avatar
      From: Jan Wieck <jwieck@debis.com> · 780068f8
      Marc G. Fournier authored
          seems  that  my last post didn't make it through. That's good
          since  the  diff  itself  didn't  covered  the  renaming   of
          pg_user.h to pg_shadow.h and it's new content.
      
          Here  it's  again.  The  complete regression test passwd with
          only some  float  diffs.  createuser  and  destroyuser  work.
          pg_shadow cannot be read by ordinary user.
      780068f8
  37. 26 Jan, 1998 1 commit
    • Marc G. Fournier's avatar
      From: Phil Thompson <phil@river-bank.demon.co.uk> · d5bbe2ac
      Marc G. Fournier authored
      I've completed the patch to fix the protocol and authentication issues I
      was discussing a couple of weeks ago.  The particular changes are:
      
      - the protocol has a version number
      - network byte order is used throughout
      - the pg_hba.conf file is used to specify what method is used to
        authenticate a frontend (either password, ident, trust, reject, krb4
        or krb5)
      - support for multiplexed backends is removed
      - appropriate changes to man pages
      - the -a switch to many programs to specify an authentication service
        no longer has any effect
      - the libpq.so version number has changed to 1.1
      
      The new backend still supports the old protocol so old interfaces won't
      break.
      d5bbe2ac