Skip to content
Snippets Groups Projects
  1. Nov 29, 2012
    • Tom Lane's avatar
      Fix assorted bugs in CREATE/DROP INDEX CONCURRENTLY. · 94c014b5
      Tom Lane authored
      Commit 8cb53654, which introduced DROP
      INDEX CONCURRENTLY, managed to break CREATE INDEX CONCURRENTLY via a poor
      choice of catalog state representation.  The pg_index state for an index
      that's reached the final pre-drop stage was the same as the state for an
      index just created by CREATE INDEX CONCURRENTLY.  This meant that the
      (necessary) change to make RelationGetIndexList ignore about-to-die indexes
      also made it ignore freshly-created indexes; which is catastrophic because
      the latter do need to be considered in HOT-safety decisions.  Failure to
      do so leads to incorrect index entries and subsequently wrong results from
      queries depending on the concurrently-created index.
      
      To fix, make the final state be indisvalid = true and indisready = false,
      which is otherwise nonsensical.  This is pretty ugly but we can't add
      another column without forcing initdb, and it's too late for that in 9.2.
      (There's a cleaner fix in HEAD.)
      
      In addition, change CREATE/DROP INDEX CONCURRENTLY so that the pg_index
      flag changes they make without exclusive lock on the index are made via
      heap_inplace_update() rather than a normal transactional update.  The
      latter is not very safe because moving the pg_index tuple could result in
      concurrent SnapshotNow scans finding it twice or not at all, thus possibly
      resulting in index corruption.  This is a pre-existing bug in CREATE INDEX
      CONCURRENTLY, which was copied into the DROP code.
      
      In addition, fix various places in the code that ought to check to make
      sure that the indexes they are manipulating are valid and/or ready as
      appropriate.  These represent bugs that have existed since 8.2, since
      a failed CREATE INDEX CONCURRENTLY could leave a corrupt or invalid
      index behind, and we ought not try to do anything that might fail with
      such an index.
      
      Also fix RelationReloadIndexInfo to ensure it copies all the pg_index
      columns that are allowed to change after initial creation.  Previously we
      could have been left with stale values of some fields in an index relcache
      entry.  It's not clear whether this actually had any user-visible
      consequences, but it's at least a bug waiting to happen.
      
      In addition, do some code and docs review for DROP INDEX CONCURRENTLY;
      some cosmetic code cleanup but mostly addition and revision of comments.
      
      Portions of this need to be back-patched even further, but I'll work
      on that separately.
      
      Problem reported by Amit Kapila, diagnosis by Pavan Deolasee,
      fix by Tom Lane and Andres Freund.
      94c014b5
  2. Apr 06, 2012
  3. Aug 07, 2011
    • Peter Eisentraut's avatar
      Fix a whitespace issue with the man pages · 6ef24487
      Peter Eisentraut authored
      There is what may actually be a mistake in our markup.  The problem is
      in a situation like
      
      <para>
       <command>FOO</command> is ...
      
      there is strictly speaking a line break before "FOO".  In the HTML
      output, this does not appear to be a problem, but in the man page
      output, this shows up, so you get double blank lines at odd places.
      
      So far, we have attempted to work around this with an XSL hack, but
      that causes other problems, such as creating run-ins in places like
      
      <acronym>SQL</acronym> <command>COPY</command>
      
      So fix the problem properly by removing the extra whitespace.  I only
      fixed the problems that affect the man page output, not all the
      places.
      6ef24487
  4. Nov 23, 2010
  5. Sep 20, 2010
  6. Apr 03, 2010
    • Peter Eisentraut's avatar
      Remove unnecessary xref endterm attributes and title ids · 6dcce398
      Peter Eisentraut authored
      The endterm attribute is mainly useful when the toolchain does not support
      automatic link target text generation for a particular situation.  In  the
      past, this was required by the man page tools for all reference page links,
      but that is no longer the case, and it now actually gets in the way of
      proper automatic link text generation.  The only remaining use cases are
      currently xrefs to refsects.
      6dcce398
  7. Nov 14, 2008
  8. Sep 16, 2006
  9. Nov 19, 2005
    • Andrew Dunstan's avatar
      · daea4d8e
      Andrew Dunstan authored
      DROP objecttype IF EXISTS for the following objects:
        table view index sequence schema type domain conversion
      daea4d8e
  10. Nov 29, 2003
    • PostgreSQL Daemon's avatar
      · 969685ad
      PostgreSQL Daemon authored
      $Header: -> $PostgreSQL Changes ...
      969685ad
  11. Sep 09, 2003
  12. Aug 31, 2003
  13. Jun 25, 2003
    • Bruce Momjian's avatar
      Most of the synopsis areas for DROP commands use "name" as the · fce529e1
      Bruce Momjian authored
      identifier, while some areas do not.
      
      The attached converts be below to "name":
      conversion_name
      index_name
      
      
      The below have an existing, initdb supplied, entity named "name".  As
      such, it could be confusing for the reader to see that identifier used
      in the example.
      
      domainname
      typename
      
      Rod Taylor
      fce529e1
  14. May 04, 2003
  15. Jul 12, 2002
    • Tom Lane's avatar
      Second phase of committing Rod Taylor's pg_depend/pg_constraint patch. · 7c6df91d
      Tom Lane authored
      pg_relcheck is gone; CHECK, UNIQUE, PRIMARY KEY, and FOREIGN KEY
      constraints all have real live entries in pg_constraint.  pg_depend
      exists, and RESTRICT/CASCADE options work on most kinds of DROP;
      however, pg_depend is not yet very well populated with dependencies.
      (Most of the ones that are present at this point just replace formerly
      hardwired associations, such as the implicit drop of a relation's pg_type
      entry when the relation is dropped.)  Need to add more logic to create
      dependency entries, improve pg_dump to dump constraints in place of
      indexes and triggers, and add some regression tests.
      7c6df91d
  16. May 18, 2002
  17. Apr 23, 2002
  18. Apr 21, 2002
    • Thomas G. Lockhart's avatar
      Augment the date/time examples in the User's Guide to reflect the newer · c05f29e8
      Thomas G. Lockhart authored
       capabilities of specifying time zones as intervals per SQL9x.
      Put refentrytitle contents on the same line as the tag.
       Otherwise, leading whitespace is propagated into the product, which
       (at least) messes up the ToC layout.
      Remove (some) docinfo tags containing dates. Best to omit if the dates
       are not accurate; maybe use CVS dates instead or leave them out.
      c05f29e8
  19. Dec 08, 2001
  20. Sep 03, 2001
  21. May 08, 2001
    • Bruce Momjian's avatar
      drop_function.sgml: · 04e14fa3
      Bruce Momjian authored
      ===================
      In Notes:
       Refer to CREATE FUNCTION for information on creating aggregate functions.
                                                            ^^^^^^^^^^^^^^^^^^^
      I assume it must read C function instead.
      
      In Compatibility SQL/PSM:
       SQL/PSM is a proposed standard.
      
       We had that before: remove proposed.
      
      
      drop_index.sgml:
      ================
      <REFNAME>: Removes existing indexes from a database
      
      as far as I can see index should be singular. The command description is
      written as if only one index can be removed at a time. Interestingly
      enough, in v7.0.2 it was in fact singular. Am I mistaken here?
      
      drop_operator.sgml:
      ===================
      In Outputs the arguments are referred to as type and type2, but the synopsis
      and Inputs section these are left_type and right_type, respectively. Also,
      oper is used in Outputs versus id in Inputs/Synopsis. In the translation I
      follow the replaceables used in the Inputs/Synopsis part.
      
      Frank Wegmann
      04e14fa3
  22. Dec 26, 2000
  23. Oct 23, 2000
    • Tom Lane's avatar
      Some small polishing of Mark Hollomon's cleanup of DROP command: might · 9ace0318
      Tom Lane authored
      as well allow DROP multiple INDEX, RULE, TYPE as well.  Add missing
      CommandCounterIncrement to DROP loop, which could cause trouble otherwise
      with multiple DROP of items affecting same catalog entries.  Try to
      bring a little consistency to various error messages using 'does not exist',
      'nonexistent', etc --- I standardized on 'does not exist' since that's
      what the vast majority of the existing uses seem to be.
      9ace0318
  24. Jul 22, 1999
  25. Jul 06, 1999
  26. Dec 29, 1998
  27. Oct 30, 1998
  28. Sep 22, 1998
  29. Sep 16, 1998
  30. Sep 07, 1998
  31. May 13, 1998
Loading