Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Commits on May 24, 2015
  1. @bmomjian

    pgindent run for 9.5

    bmomjian authored
Commits on May 13, 2015
  1. @anarazel

    Add pgstattuple_approx() to the pgstattuple extension.

    anarazel authored
    The new function allows to estimate bloat and other table level statics
    in a faster, but approximate, way. It does so by using information from
    the free space map for pages marked as all visible in the visibility
    map. The rest of the table is actually read and free space/bloat is
    measured accurately.  In many cases that allows to get bloat information
    much quicker, causing less IO.
    Author: Abhijit Menon-Sen
    Reviewed-By: Andres Freund, Amit Kapila and Tomas Vondra
Commits on Aug 25, 2014
  1. @anarazel

    Fix typos in some error messages thrown by extension scripts when fed…

    anarazel authored
    … to psql.
    Some of the many error messages introduced in 458857c missed 'FROM
    unpackaged'. Also e016b72 and 45ffeb7 forgot to quote extension
    version numbers.
    Backpatch to 9.1, just like 458857c which introduced the messages. Do
    so because the error messages thrown when the wrong command is copy &
    pasted aren't easy to understand.
Commits on Jul 14, 2014
  1. @nmisch

    Add file version information to most installed Windows binaries.

    nmisch authored
    Prominent binaries already had this metadata.  A handful of minor
    binaries, such as pg_regress.exe, still lack it; efforts to eliminate
    such exceptions are welcome.
    Michael Paquier, reviewed by MauMau.
Commits on Jul 10, 2014
  1. @bmomjian
Commits on Jun 30, 2014
  1. @nmisch

    Don't prematurely free the BufferAccessStrategy in pgstat_heap().

    nmisch authored
    This function continued to use it after heap_endscan() freed it.  In
    passing, don't explicit create a strategy here.  Instead, use the one
    created by heap_beginscan_strat(), if any.  Back-patch to 9.2, where use
    of a BufferAccessStrategy here was introduced.
Commits on May 6, 2014
  1. @bmomjian

    pgindent run for 9.4

    bmomjian authored
    This includes removing tabs after periods in C comments, which was
    applied to back branches, so this change should not effect backpatching.
Commits on Apr 18, 2014
  1. @petere

    Create function prototype as part of PG_FUNCTION_INFO_V1 macro

    petere authored
    Because of gcc -Wmissing-prototypes, all functions in dynamically
    loadable modules must have a separate prototype declaration.  This is
    meant to detect global functions that are not declared in header files,
    but in cases where the function is called via dfmgr, this is redundant.
    Besides filling up space with boilerplate, this is a frequent source of
    compiler warnings in extension modules.
    We can fix that by creating the function prototype as part of the
    PG_FUNCTION_INFO_V1 macro, which such modules have to use anyway.  That
    makes the code of modules cleaner, because there is one less place where
    the entry points have to be listed, and creates an additional check that
    functions have the right prototype.
    Remove now redundant prototypes from contrib and other modules.
Commits on Jan 22, 2014
  1. @hlinnaka

    Compress GIN posting lists, for smaller index size.

    hlinnaka authored
    GIN posting lists are now encoded using varbyte-encoding, which allows them
    to fit in much smaller space than the straight ItemPointer array format used
    before. The new encoding is used for both the lists stored in-line in entry
    tree items, and in posting tree leaf pages.
    To maintain backwards-compatibility and keep pg_upgrade working, the code
    can still read old-style pages and tuples. Posting tree leaf pages in the
    new format are flagged with GIN_COMPRESSED flag, to distinguish old and new
    format pages. Likewise, entry tree tuples in the new format have a
    GIN_ITUP_COMPRESSED flag set in a bit that was previously unused.
    This patch bumps GIN_CURRENT_VERSION from 1 to 2. New indexes created with
    version 9.4 will therefore have version number 2 in the metapage, while old
    pg_upgraded indexes will have version 1. The code treats them the same, but
    it might be come handy in the future, if we want to drop support for the
    uncompressed format.
    Alexander Korotkov and me. Reviewed by Tomas Vondra and Amit Langote.
Commits on Jan 7, 2014
  1. @petere

    Add more use of psprintf()

    petere authored
Commits on Jul 25, 2013
  1. pgstattuple: Use SnapshotDirty, not SnapshotNow.

    Robert Haas authored
    Tuples belonging to uncommitted transactions should not be
    counted as dead.
    This is arguably a bug fix that should be back-patched, but
    as no one ever noticed until it came time to try to get rid
    of SnapshotNow, I'm only doing this in master for now.
Commits on Jul 18, 2013
  1. Fix pgstattuple functions to use regclass-type as the argument.

    Fujii Masao authored
    This allows us to specify the target relation with several expressions,
    'relname', 'schemaname.relname' and OID in all pgstattuple functions.
    pgstatindex() and pg_relpages() could not accept OID as the argument
    so far.
    Per discussion on -hackers, we decided to keep two types of interfaces,
    with regclass-type and TEXT-type argument, for each pgstattuple
    function because of the backward-compatibility issue. The functions
    which have TEXT-type argument will be deprecated in the future release.
    Patch by Satoshi Nagayasu, reviewed by Rushabh Lathia and Fujii Masao.
Commits on May 29, 2013
  1. @bmomjian

    pgindent run for release 9.3

    bmomjian authored
    This is the first run of the Perl-based pgindent script.  Also update
    pgindent instructions.
Commits on Mar 4, 2013
  1. @kgrittn

    Add a materialized view relations.

    kgrittn authored
    A materialized view has a rule just like a view and a heap and
    other physical properties like a table.  The rule is only used to
    populate the table, references in queries refer to the
    materialized data.
    This is a minimal implementation, but should still be useful in
    many cases.  Currently data is only populated "on demand" by the
    It is expected that future releases will add incremental updates
    with various timings, and that a more refined concept of defining
    what is "fresh" data will be developed.  At some point it may even
    be possible to have queries use a materialized in place of
    references to underlying tables, but that requires the other
    above-mentioned features to be working first.
    Much of the documentation work by Robert Haas.
    Review by Noah Misch, Thom Brown, Robert Haas, Marko Tiikkaja
    Security review by KaiGai Kohei, with a decision on how best to
    implement sepgsql still pending.
Commits on Dec 5, 2012
  1. @hlinnaka

    Add pgstatginindex() function to get the size of the GIN pending list.

    hlinnaka authored
    Fujii Masao, reviewed by Kyotaro Horiguchi.
Commits on Jul 5, 2012
  1. Reduce messages about implicit indexes and sequences to DEBUG1.

    Robert Haas authored
    Per recent discussion on pgsql-hackers, these messages are too
    chatty for most users.
Commits on Jun 14, 2012

    Robert Haas authored
    This may have been important at some point in the past, but it no
    longer does anything useful.
    Review by Tom Lane.
Commits on Jun 10, 2012
  1. @bmomjian
Commits on Mar 13, 2012
  1. pgstattuple: Use a BufferAccessStrategy object to avoid cache-trashing.

    Robert Haas authored
    Jaime Casanova, reviewed by Noah Misch, slightly modified by me.
  2. pgstattuple: Add new error case for spgist indexes.

    Robert Haas authored
    Extracted from a larger patch by Jaime Casanova, reviewed by Noah Misch.
    I think this error message could use some more extensive revision, but
    this at least makes the handling of spgist consistent with what we do for
    other types of indexes that this code doesn't know how to handle.
Commits on Oct 12, 2011
  1. Throw a useful error message if an extension script file is fed to psql.

    Tom Lane authored
    We have seen one too many reports of people trying to use 9.1 extension
    files in the old-fashioned way of sourcing them in psql.  Not only does
    that usually not work (due to failure to substitute for MODULE_PATHNAME
    and/or @extschema@), but if it did work they'd get a collection of loose
    objects not an extension.  To prevent this, insert an \echo ... \quit
    line that prints a suitable error message into each extension script file,
    and teach commands/extension.c to ignore lines starting with \echo.
    That should not only prevent any adverse consequences of loading a script
    file the wrong way, but make it crystal clear to users that they need to
    do it differently now.
    Tom Lane, following an idea of Andrew Dunstan's.  Back-patch into 9.1
    ... there is not going to be much value in this if we wait till 9.2.
Commits on Oct 6, 2011
  1. Make pgstatindex respond to cancel interrupts.

    Robert Haas authored
    A similar problem for pgstattuple() was fixed in April of 2010 by commit
    33065ef, but pgstatindex() seems to have
    been overlooked.
    Back-patch all the way, as with that commit, though not to 7.4 through
    8.1, since those are now EOL.
Commits on Aug 25, 2011
  1. Add a regression test for pgstattuple.

    Tom Lane authored
    This is mainly to prove that the NaN fix actually works cross-platform.
  2. Fix pgstatindex() to give consistent results for empty indexes.

    Tom Lane authored
    For an empty index, the pgstatindex() function would compute 0.0/0.0 for
    its avg_leaf_density and leaf_fragmentation outputs.  On machines that
    follow the IEEE float arithmetic standard with any care, that results in
    a NaN.  However, per report from Rushabh Lathia, Microsoft couldn't
    manage to get this right, so you'd get a bizarre error on Windows.
    Fix by forcing the results to be NaN explicitly, rather than relying on
    the division operator to give that or the snprintf function to print it
    correctly.  I have some doubts that this is really the most useful
    definition, but it seems better to remain backward-compatible with
    those platforms for which the behavior wasn't completely broken.
    Back-patch to 8.2, since the code is like that in all current releases.
Commits on Jul 4, 2011
  1. @alvherre

    Move Trigger and TriggerDesc structs out of rel.h into a new reltrigg…

    alvherre authored
    This lets us stop including rel.h into execnodes.h, which is a widely
    used header.
Commits on Feb 14, 2011
  1. Avoid use of CREATE OR REPLACE FUNCTION in extension installation files.

    Tom Lane authored
    It was never terribly consistent to use OR REPLACE (because of the lack of
    comparable functionality for data types, operators, etc), and
    experimentation shows that it's now positively pernicious in the extension
    world.  We really want a failure to occur if there are any conflicts, else
    it's unclear what the extension-ownership state of the conflicted object
    ought to be.  Most of the time, CREATE EXTENSION will fail anyway because
    of conflicts on other object types, but an extension defining only
    functions can succeed, with bad results.
  2. Convert contrib modules to use the extension facility.

    Tom Lane authored
    This isn't fully tested as yet, in particular I'm not sure that the
    "foo--unpackaged--1.0.sql" scripts are OK.  But it's time to get some
    buildfarm cycles on it.
    sepgsql is not converted to an extension, mainly because it seems to
    require a very nonstandard installation process.
    Dimitri Fontaine and Tom Lane
Commits on Jan 2, 2011
  1. Basic foreign table support.

    Robert Haas authored
    Foreign tables are a core component of SQL/MED.  This commit does
    not provide a working SQL/MED infrastructure, because foreign tables
    cannot yet be queried.  Support for foreign table scans will need to
    be added in a future patch.  However, this patch creates the necessary
    system catalog structure, syntax support, and support for ancillary
    operations such as COMMENT and SECURITY LABEL.
    Shigeru Hanada, heavily revised by Robert Haas
Commits on Sep 22, 2010
  1. @mhagander
Commits on Sep 20, 2010
  1. @mhagander
Commits on Apr 2, 2010
  1. Ensure that contrib/pgstattuple functions respond to cancel interrupts

    Tom Lane authored
    reasonably promptly, by adding CHECK_FOR_INTERRUPTS in the per-page loops.
    Tatsuhito Kasahara
Commits on Jun 11, 2009
  1. @bmomjian
Commits on Apr 28, 2009
  1. @bmomjian

    Blank line Makefile cleanups.

    bmomjian authored
Commits on Mar 31, 2009
  1. Fix contrib/pgstattuple and contrib/pageinspect to prevent attempts t…

    Tom Lane authored
    …o read
    temporary tables of other sessions; that is unsafe because of the way our
    buffer management works.  Per report from Stuart Bishop.
    This is redundant with the bufmgr.c checks in HEAD, but not at all redundant
    in the back branches.
Commits on Jan 6, 2009
  1. Remove outdated Japanese README files per discussion.

    Tatsuo Ishii authored
Something went wrong with that request. Please try again.