Commit Graph

34100 Commits

Author SHA1 Message Date
Alvaro Herrera fda0594fc2 remove catcache.h from syscache.h
Instead, place a forward struct declaration for struct catclist in
syscache.h.  This reduces header proliferation somewhat.
2012-08-28 18:36:39 -04:00
Alvaro Herrera 45326c5a11 Split resowner.h
This lets files that are mere users of ResourceOwner not automatically
include the headers for stuff that is managed by the resowner mechanism.
2012-08-28 18:02:07 -04:00
Alvaro Herrera 0a664ec27f add #includes to plpy_subxactobject.h to make it compile standalone 2012-08-28 16:13:41 -04:00
Tom Lane 0a83f2492f Remove pg_stat_statements--1.0.sql, too.
Per Peter Geoghegan.
2012-08-28 14:33:56 -04:00
Tom Lane 9db098dfa9 Remove hstore--1.0.sql.
Since we're not installing this file anymore, it has no reason to exist,
other than as historical reference; but we have an SCM for that.
2012-08-28 14:29:55 -04:00
Bruce Momjian 0f3351aacf Adjust pg_test_timing to show shortest test durations first, place
percentage column before count column.  Docs updated.
2012-08-28 12:57:13 -04:00
Bruce Momjian 65b2ee27ad Prevent psql tab completion in SET from adding TO when the equals sign
has no space before it.

Report by Erik Rijkers
2012-08-28 12:53:31 -04:00
Bruce Momjian 5ea6c9d798 Update doc mention of how to compute bigint advisory lock value, per Tom
Lane's correction.
2012-08-28 12:17:22 -04:00
Alvaro Herrera 095e6c5a7d syncrep.h must include xlogdefs.h 2012-08-28 09:46:08 -04:00
Peter Eisentraut a5727888d7 Small punctuation fixes 2012-08-28 03:10:04 -04:00
Bruce Momjian bf849af7f3 Document how to create advisory lock "bigint" values in SQL.
David E. Wheeler
2012-08-27 22:36:48 -04:00
Tom Lane 7417a8e3dd Improve a couple of 9.2 release note entries.
Clarify the compatibility notes about EXTRACT() and about statistics
timing columns.
2012-08-27 20:53:57 -04:00
Tom Lane 8770328784 Add section IDs to subsections of syntax.sgml that lacked them.
This is so that these sections will have stable HTML tags that one can
link to, rather than things like "AEN1902".  Perhaps we should mount a
campaign to do this everywhere, but I've found myself pointing at
syntax.sgml subsections often enough to be sure it's useful here.
2012-08-27 20:17:12 -04:00
Bruce Momjian 483c2c1071 Document the lack of reading the PGDATABASE environment variable in
pg_restore.
2012-08-27 15:27:09 -04:00
Alvaro Herrera 088c065ce8 pg_upgrade: Fix exec_prog API to be less flaky
The previous signature made it very easy to pass something other than
the printf-format specifier in the corresponding position, without any
warning from the compiler.

While at it, move some of the escaping, redirecting and quoting
responsibilities from the callers into exec_prog() itself.  This makes
the callsites cleaner.
2012-08-27 14:29:14 -04:00
Alvaro Herrera 34c02044ed Fix thinko in comment
It was confusing symlinks with hard links.
2012-08-27 14:29:14 -04:00
Alvaro Herrera ab577e63fa Remove analyze_new_cluster.sh on make clean, too 2012-08-27 14:29:14 -04:00
Tom Lane e323c55301 Fix DROP INDEX CONCURRENTLY IF EXISTS.
This threw ERROR, not the expected NOTICE, if the index didn't exist.
The bug was actually visible in not-as-expected regression test output,
so somebody wasn't paying too close attention in commit
8cb53654db.
Per report from Brendan Byrd.
2012-08-27 12:45:43 -04:00
Bruce Momjian e40bddb0f3 Have pgindent requre pg_bsd_indent version 1.2 now that a new version
has been created by adding #include <stdlib.h> to parse.c.

per request from Kevin Grittner.
2012-08-27 09:31:56 -04:00
Heikki Linnakangas 918eee0c49 Collect and use histograms of lower and upper bounds for range types.
This enables selectivity estimation of the <<, >>, &<, &> and && operators,
as well as the normal inequality operators: <, <=, >=, >. "range @> element"
is also supported, but the range-variant @> and <@ operators are not,
because they cannot be sensibly estimated with lower and upper bound
histograms alone. We would need to make some assumption about the lengths of
the ranges for that. Alexander's patch included a separate histogram of
lengths for that, but I left that out of the patch for simplicity. Hopefully
that will be added as a followup patch.

The fraction of empty ranges is also calculated and used in estimation.

Alexander Korotkov, heavily modified by me.
2012-08-27 15:58:46 +03:00
Peter Eisentraut 6bb0b08fe6 pg_basebackup: Correct error message
It still thought that the --xlog-method option argument could be
empty, as in a previous version of this feature.
2012-08-27 00:51:59 -04:00
Bruce Momjian 7a42dff47e Update FreeBSD kernel configuration documentation.
Brad Davis
2012-08-26 23:21:57 -04:00
Tom Lane 9ff79b9d4e Fix up planner infrastructure to support LATERAL properly.
This patch takes care of a number of problems having to do with failure
to choose valid join orders and incorrect handling of lateral references
pulled up from subqueries.  Notable changes:

* Add a LateralJoinInfo data structure similar to SpecialJoinInfo, to
represent join ordering constraints created by lateral references.
(I first considered extending the SpecialJoinInfo structure, but the
semantics are different enough that a separate data structure seems
better.)  Extend join_is_legal() and related functions to prevent trying
to form unworkable joins, and to ensure that we will consider joins that
satisfy lateral references even if the joins would be clauseless.

* Fill in the infrastructure needed for the last few types of relation scan
paths to support parameterization.  We'd have wanted this eventually
anyway, but it is necessary now because a relation that gets pulled up out
of a UNION ALL subquery may acquire a reltargetlist containing lateral
references, meaning that its paths *have* to be parameterized whether or
not we have any code that can push join quals down into the scan.

* Compute data about lateral references early in query_planner(), and save
in RelOptInfo nodes, to avoid repetitive calculations later.

* Assorted corner-case bug fixes.

There's probably still some bugs left, but this is a lot closer to being
real than it was before.
2012-08-26 22:50:23 -04:00
Bruce Momjian de87d47044 Clarify documentation that primary key and unique constraints are copied
for CREATE TABLE LIKE ... INCLUDING INDEXES.

Per report from david.sahagian@emc.com
2012-08-26 16:33:11 -04:00
Bruce Momjian 9e9a5b71d5 Use psql_error() for most psql error calls, per request from Magnus. 2012-08-25 22:58:42 -04:00
Bruce Momjian f6752ee59a Document clearly that psql \! parameter interpretation limitations are
the same as \copy.
2012-08-25 19:11:21 -04:00
Bruce Momjian 3e1a373e2b Allow text timezone designations, e.g. "America/Chicago", when using the
ISO "T" timestamptz format.
2012-08-25 17:44:53 -04:00
Peter Eisentraut 7514208fbb Some spelling adjustments in release notes 2012-08-24 22:50:43 -04:00
Peter Eisentraut 8606e47e11 Normalize some British spellings 2012-08-24 22:50:43 -04:00
Tom Lane 7abaa6b9d3 Fix issues with checks for unsupported transaction states in Hot Standby.
The GUC check hooks for transaction_read_only and transaction_isolation
tried to check RecoveryInProgress(), so as to disallow setting read/write
mode or serializable isolation level (respectively) in hot standby
sessions.  However, GUC check hooks can be called in many situations where
we're not connected to shared memory at all, resulting in a crash in
RecoveryInProgress().  Among other cases, this results in EXEC_BACKEND
builds crashing during child process start if default_transaction_isolation
is serializable, as reported by Heikki Linnakangas.  Protect those calls
by silently allowing any setting when not inside a transaction; which is
okay anyway since these GUCs are always reset at start of transaction.

Also, add a check to GetSerializableTransactionSnapshot() to complain
if we are in hot standby.  We need that check despite the one in
check_XactIsoLevel() because default_transaction_isolation could be
serializable.  We don't want to complain any sooner than this in such
cases, since that would prevent running transactions at all in such a
state; but a transaction can be run, if SET TRANSACTION ISOLATION is done
before setting a snapshot.  Per report some months ago from Robert Haas.

Back-patch to 9.1, since these problems were introduced by the SSI patch.

Kevin Grittner and Tom Lane, with ideas from Heikki Linnakangas
2012-08-24 13:09:04 -04:00
Peter Eisentraut 406473b152 Put options on man page and in help output in slightly better order 2012-08-24 00:06:59 -04:00
Peter Eisentraut 4faf074a53 libpq: Fix memory leak in URI parser
When an invalid query parameter is reported, some memory leaks.

found by Coverity
2012-08-23 22:33:04 -04:00
Tom Lane ec8a0135c3 Fix cascading privilege revoke to notice when privileges are still held.
If we revoke a grant option from some role X, but X still holds the option
via another grant, we should not recursively revoke the privilege from
role(s) Y that X had granted it to.  This was supposedly fixed as one
aspect of commit 4b2dafcc0b, but I must not
have tested it, because in fact that code never worked: it forgot to shift
the grant-option bits back over when masking the bits being revoked.

Per bug #6728 from Daniel German.  Back-patch to all active branches,
since this has been wrong since 8.0.
2012-08-23 17:25:10 -04:00
Heikki Linnakangas 8b6b50a34d Fix typo in example. 2012-08-23 11:58:11 +03:00
Peter Eisentraut 26a6267226 Add instructions for setting up documentation tool chain on Mac OS X 2012-08-23 02:29:21 -04:00
Peter Eisentraut 7afa8bed65 pg_upgrade: Run the created scripts in the test suite
Just to check that they actually work.
2012-08-23 02:29:21 -04:00
Tom Lane 6e2e12c947 Remove overly-pessimistic statement about constraint exclusion.
As of 9.2, constraint exclusion should work okay with prepared statements:
the planner will try custom plans with actual values of the parameters,
and observe that they are a lot cheaper than the generic plan, and thus
never fall back to using the generic plan.  Noted by Tatsuhito Kasahara.
2012-08-22 23:55:34 -04:00
Tom Lane b33f611682 Make a cut at a major-features list for 9.2.
This is open to debate of course, but it's past time we had *something*
here.
2012-08-22 17:58:06 -04:00
Tom Lane 979f8f0431 Make an editorial pass over the 9.2 release notes.
A very large number of small improvements ...
2012-08-22 17:37:02 -04:00
Tom Lane 932a271956 Fix erroneous documentation of synchronous_commit = remote_write.
The docs claimed that this mode only waits for the standby to receive WAL
data, but actually it waits for the data to be written out to the standby's
OS; which is a pretty significant difference because it removes the risk of
crash of the walreceiver process.
2012-08-22 14:04:36 -04:00
Bruce Momjian 03af60c010 Fix typo. 2012-08-22 12:05:25 -04:00
Bruce Momjian 7dff5b8edd Document that pg_reload_conf() is also an easy way to reload the
configuration file.
2012-08-22 12:01:27 -04:00
Peter Eisentraut b748d8f280 Fix install-strip on Mac OS X
There was a hack put into install-sh to call strip with the correct
options on Mac OS X.  But that never worked, because configure
disabled stripping on that platform altogether.  So remove that dead
code, and while we're at it, update install-sh to the latest upstream
source (from Automake).

Instead, set up the right strip options in programs.m4, so this now
actually works the way it was originally intended.
2012-08-21 23:42:43 -04:00
Peter Eisentraut 5c45d2f878 Mark DateTimeParseError() noreturn
This avoids a warning from clang 3.2 about an uninitialized variable
'dtype' in date_in().
2012-08-21 23:32:58 -04:00
Tom Lane 0830cc9fe0 Update 9.2 release notes to reflect commits to date.
I was unable to entirely resist the temptation to copy-edit related
entries, but will save most of that for a separate pass.
2012-08-21 22:56:45 -04:00
Tom Lane 10685ec082 Avoid somewhat-theoretical overflow risks in RecordIsValid().
This improves on commit 51fed14d73 by
eliminating the assumption that we can form <some pointer value> +
<some offset> without overflow.  The entire point of those tests is that
we don't trust the offset value, so coding them in a way that could wrap
around if the buffer happens to be near the top of memory doesn't seem
sound.  Instead, track the remaining space as a size_t variable and
compare offsets against that.

Also, improve comment about why we need the extra early check on
xl_tot_len.
2012-08-21 18:41:52 -04:00
Tom Lane 0f524ea0cf Fix dumping of security_barrier views with circular dependencies.
If a view has circular dependencies, pg_dump splits it into a CREATE TABLE
and a CREATE RULE command to break the dependency loop.  However, if the
view has reloptions, those options cannot be applied in the CREATE TABLE
command, because views and tables have different allowed reloptions so
CREATE TABLE would reject them.  Instead apply the reloptions after the
CREATE RULE, using ALTER VIEW SET.
2012-08-21 15:18:36 -04:00
Robert Haas 4b373e42d1 Improve C comments in GetSnapshotData.
Move discussion of why our algorithm for taking snapshots in recovery
to a more appropriate location in the function, and delete incorrect
mention of taking a lock.
2012-08-21 11:47:10 -04:00
Robert Haas 82ef3d3008 Add a note to the MVCC chapter that some things aren't transactional.
Craig Ringer, slightly edited by me.
2012-08-21 11:10:17 -04:00
Peter Eisentraut 71450d7fd6 Teach compiler that ereport(>=ERROR) does not return
When elevel >= ERROR, we add an abort() call to the ereport() macro to
give the compiler a hint that the ereport() expansion will not return,
but the abort() isn't actually reached because the longjmp happens in
errfinish().

Because the effect of ereport() varies with the elevel, we cannot use
standard compiler attributes such as noreturn for this.
2012-08-21 00:03:32 -04:00