[COMMITTERS] pgsql: Fix wording, per Peter Geoghegan

2012-01-27 Thread Magnus Hagander
Fix wording, per Peter Geoghegan

Branch
--
REL9_0_STABLE

Details
---
http://git.postgresql.org/pg/commitdiff/2f66c1a2ff8918086099cdfb3b9d9759c8658382

Modified Files
--
doc/src/sgml/auto-explain.sgml |2 +-
1 files changed, 1 insertions(+), 1 deletions(-)


-- 
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers


[COMMITTERS] pgsql: Fix wording, per Peter Geoghegan

2012-01-27 Thread Magnus Hagander
Fix wording, per Peter Geoghegan

Branch
--
REL8_4_STABLE

Details
---
http://git.postgresql.org/pg/commitdiff/5b242e5addcb2e337c3d9fcc637d092c2b45625b

Modified Files
--
doc/src/sgml/auto-explain.sgml |2 +-
1 files changed, 1 insertions(+), 1 deletions(-)


-- 
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers


[COMMITTERS] pgsql: Fix wording, per Peter Geoghegan

2012-01-27 Thread Magnus Hagander
Fix wording, per Peter Geoghegan

Branch
--
REL9_1_STABLE

Details
---
http://git.postgresql.org/pg/commitdiff/b7922a6dd0ec2ff949751d77b004576c820de19c

Modified Files
--
doc/src/sgml/auto-explain.sgml |2 +-
1 files changed, 1 insertions(+), 1 deletions(-)


-- 
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers


[COMMITTERS] pgsql: Fix wording, per Peter Geoghegan

2012-01-27 Thread Magnus Hagander
Fix wording, per Peter Geoghegan

Branch
--
master

Details
---
http://git.postgresql.org/pg/commitdiff/c9f14bb4acf3e5caff97ef0a639c3ee911932e1c

Modified Files
--
doc/src/sgml/auto-explain.sgml |2 +-
1 files changed, 1 insertions(+), 1 deletions(-)


-- 
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers


[COMMITTERS] pgsql: Fix copy-paste error in docs.

2012-01-27 Thread Heikki Linnakangas
Fix copy-paste error in docs.

Dean Rasheed

Branch
--
master

Details
---
http://git.postgresql.org/pg/commitdiff/59c67ecdd39725aaee0db6e09f399c8e6c248f22

Modified Files
--
doc/src/sgml/ref/alter_foreign_table.sgml |4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)


-- 
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers


Re: [COMMITTERS] pgsql: Make bgwriter sleep longer when it has no work to do, to save el

2012-01-27 Thread Peter Geoghegan
On 26 January 2012 16:43, Heikki Linnakangas  wrote:
> Make bgwriter sleep longer when it has no work to do, to save electricity.

Perhaps this is pedantic, but shouldn't we be initialising
bgwriterLatch to NULL within InitProcGlobal(), much as we already do
for the other pointers in that structure?

-- 
Peter Geoghegan       http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training and Services

-- 
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers


[COMMITTERS] pgsql: pg_dump: Move connection-setup code to a separate function.

2012-01-27 Thread Robert Haas
pg_dump: Move connection-setup code to a separate function.

Parallel dump will need to repeat these steps for each new connection,
so it's better to have this logic in its own function.

Extracted (with some changes) from a much larger patch
by Joachim Wieland.

Branch
--
master

Details
---
http://git.postgresql.org/pg/commitdiff/e43166a557d5f28aa66fa15be12fdc6a8ebe380a

Modified Files
--
src/bin/pg_dump/pg_dump.c |  139 -
1 files changed, 74 insertions(+), 65 deletions(-)


-- 
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers


[COMMITTERS] pgsql: Initialize the new bgwriterLatch field properly.

2012-01-27 Thread Heikki Linnakangas
Initialize the new bgwriterLatch field properly.

Peter Geoghegan

Branch
--
master

Details
---
http://git.postgresql.org/pg/commitdiff/cf3fff6326299deca77c1387df31d24aea36e2e1

Modified Files
--
src/backend/storage/lmgr/proc.c |1 +
1 files changed, 1 insertions(+), 0 deletions(-)


-- 
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers


Re: [COMMITTERS] pgsql: Make bgwriter sleep longer when it has no work to do, to save el

2012-01-27 Thread Heikki Linnakangas

On 27.01.2012 16:43, Peter Geoghegan wrote:

On 26 January 2012 16:43, Heikki Linnakangas  wrote:

Make bgwriter sleep longer when it has no work to do, to save electricity.


Perhaps this is pedantic, but shouldn't we be initialising
bgwriterLatch to NULL within InitProcGlobal(), much as we already do
for the other pointers in that structure?


Yeah, it should. Fixed.

--
  Heikki Linnakangas
  EnterpriseDB   http://www.enterprisedb.com

--
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers


[COMMITTERS] pgsql: Document that analyzing an empty table doesn't update the statis

2012-01-27 Thread Robert Haas
Document that analyzing an empty table doesn't update the statistics.

Per a suggestion from Sergey Konoplev

Branch
--
master

Details
---
http://git.postgresql.org/pg/commitdiff/db6de5b71ef2d91dde94fc0de8adf45372bc332d

Modified Files
--
doc/src/sgml/ref/analyze.sgml |6 ++
1 files changed, 6 insertions(+), 0 deletions(-)


-- 
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers


[COMMITTERS] pgsql: Document that COUNT(*) might not need a seq scan any more.

2012-01-27 Thread Robert Haas
Document that COUNT(*) might not need a seq scan any more.

Noted by Josh Kupershmidt.

Branch
--
master

Details
---
http://git.postgresql.org/pg/commitdiff/eb6af016fc04392c41106ac866072914bf66ecd0

Modified Files
--
doc/src/sgml/func.sgml |6 --
1 files changed, 4 insertions(+), 2 deletions(-)


-- 
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers


[COMMITTERS] pgsql: Do not access indclass through Form_pg_index

2012-01-27 Thread Peter Eisentraut
Do not access indclass through Form_pg_index

Normally, accessing variable-length members of catalog structures past
the first one doesn't work at all.  Here, it happened to work because
indnatts was checked to be 1, and so the defined FormData_pg_index
layout, using int2vector[1] and oidvector[1] for variable-length
arrays, happened to match the actual memory layout.  But it's a very
fragile assumption, and it's not in a performance-critical path, so
code it properly using heap_getattr() instead.

bug analysis by Tom Lane

Branch
--
master

Details
---
http://git.postgresql.org/pg/commitdiff/8a3f745f160d8334ad978676828d3926ac949f43

Modified Files
--
src/backend/utils/cache/relcache.c |   17 -
1 files changed, 16 insertions(+), 1 deletions(-)


-- 
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers


[COMMITTERS] pgsql: Hide most variable-length fields from Form_pg_* structs

2012-01-27 Thread Peter Eisentraut
Hide most variable-length fields from Form_pg_* structs

Those fields only appear in the structs so that genbki.pl can create
the BKI bootstrap files for the catalogs.  But they are not actually
usable from C.  So hiding them can prevent coding mistakes, saves
stack space, and can help the compiler.

In certain catalogs, the first variable-length field has been kept
visible after manual inspection.  These exceptions are noted in C
comments.

reviewed by Tom Lane

Branch
--
master

Details
---
http://git.postgresql.org/pg/commitdiff/8137f2c32322c624e0431fac1621e8e9315202f9

Modified Files
--
src/backend/catalog/Catalog.pm|2 ++
src/include/catalog/genbki.h  |   10 ++
src/include/catalog/pg_aggregate.h|4 +++-
src/include/catalog/pg_attrdef.h  |2 ++
src/include/catalog/pg_attribute.h|8 +++-
src/include/catalog/pg_class.h|9 +++--
src/include/catalog/pg_constraint.h   |6 ++
src/include/catalog/pg_database.h |4 +++-
src/include/catalog/pg_db_role_setting.h  |2 ++
src/include/catalog/pg_default_acl.h  |7 ++-
src/include/catalog/pg_description.h  |2 ++
src/include/catalog/pg_extension.h|9 +++--
src/include/catalog/pg_foreign_data_wrapper.h |5 ++---
src/include/catalog/pg_foreign_server.h   |6 ++
src/include/catalog/pg_foreign_table.h|2 ++
src/include/catalog/pg_index.h|4 +++-
src/include/catalog/pg_language.h |2 ++
src/include/catalog/pg_largeobject.h  |1 +
src/include/catalog/pg_largeobject_metadata.h |2 ++
src/include/catalog/pg_namespace.h|4 +++-
src/include/catalog/pg_pltemplate.h   |2 ++
src/include/catalog/pg_proc.h |4 +++-
src/include/catalog/pg_rewrite.h  |4 ++--
src/include/catalog/pg_seclabel.h |2 ++
src/include/catalog/pg_shdescription.h|2 ++
src/include/catalog/pg_shseclabel.h   |2 ++
src/include/catalog/pg_statistic.h|2 ++
src/include/catalog/pg_tablespace.h   |4 +++-
src/include/catalog/pg_trigger.h  |5 -
src/include/catalog/pg_ts_dict.h  |2 ++
src/include/catalog/pg_type.h |8 +---
src/include/catalog/pg_user_mapping.h |6 ++
32 files changed, 85 insertions(+), 49 deletions(-)


-- 
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers


[COMMITTERS] pgsql: Disallow ALTER DOMAIN on non-domain type everywhere

2012-01-27 Thread Peter Eisentraut
Disallow ALTER DOMAIN on non-domain type everywhere

This has been the behavior already in most cases, but through
omission, ALTER DOMAIN / OWNER TO and ALTER DOMAIN / SET SCHEMA would
silently work on non-domain types as well.

Branch
--
master

Details
---
http://git.postgresql.org/pg/commitdiff/27874583627e049a049dc1327deb12a02a7013ab

Modified Files
--
src/backend/commands/alter.c|4 ++--
src/backend/commands/typecmds.c |   18 --
src/include/commands/typecmds.h |4 ++--
3 files changed, 20 insertions(+), 6 deletions(-)


-- 
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers


[COMMITTERS] pgsql: Revert unfortunate whitespace change

2012-01-27 Thread Peter Eisentraut
Revert unfortunate whitespace change

In e5e2fc842c418432756d8b5825ff107c6c5fc4c3, blank lines were removed
after a comment block, which now looks as though the comment refers to
the immediately following code, but it actually refers to the
preceding code.  So put the blank lines back.

Branch
--
master

Details
---
http://git.postgresql.org/pg/commitdiff/bf90562aa464e3a9afedde5f0007058f381d00fe

Modified Files
--
src/backend/libpq/hba.c |2 ++
1 files changed, 2 insertions(+), 0 deletions(-)


-- 
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers


[COMMITTERS] pgsql: Show default privileges in information schema

2012-01-27 Thread Peter Eisentraut
Show default privileges in information schema

Hitherto, the information schema only showed explicitly granted
privileges that were visible in the *acl catalog columns.  If no
privileges had been granted, the implicit privileges were not shown.

To fix that, add an SQL-accessible version of the acldefault()
function, and use that inside the aclexplode() calls to substitute the
catalog-specific default privilege set for null values.

reviewed by Abhijit Menon-Sen

Branch
--
master

Details
---
http://git.postgresql.org/pg/commitdiff/b376ec6fa57bc76037014ede29498e2d1611968e

Modified Files
--
src/backend/catalog/information_schema.sql |   18 
src/backend/utils/adt/acl.c|   58 
src/include/catalog/catversion.h   |2 +-
src/include/catalog/pg_proc.h  |2 +
src/include/utils/acl.h|1 +
src/test/regress/expected/foreign_data.out |8 ++--
src/test/regress/sql/foreign_data.sql  |8 ++--
7 files changed, 79 insertions(+), 18 deletions(-)


-- 
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers


[COMMITTERS] pgsql: Use parameterized paths to generate inner indexscans more flexib

2012-01-27 Thread Tom Lane
Use parameterized paths to generate inner indexscans more flexibly.

This patch fixes the planner so that it can generate nestloop-with-
inner-indexscan plans even with one or more levels of joining between
the indexscan and the nestloop join that is supplying the parameter.
The executor was fixed to handle such cases some time ago, but the
planner was not ready.  This should improve our plans in many situations
where join ordering restrictions formerly forced complete table scans.

There is probably a fair amount of tuning work yet to be done, because
of various heuristics that have been added to limit the number of
parameterized paths considered.  However, we are not going to find out
what needs to be adjusted until the code gets some real-world use, so
it's time to get it in there where it can be tested easily.

Note API change for index AM amcostestimate functions.  I'm not aware of
any non-core index AMs, but if there are any, they will need minor
adjustments.

Branch
--
master

Details
---
http://git.postgresql.org/pg/commitdiff/e2fa76d80ba571d4de8992de6386536867250474

Modified Files
--
doc/src/sgml/indexam.sgml |   25 +-
src/backend/nodes/bitmapset.c |   77 ++
src/backend/nodes/outfuncs.c  |   25 +-
src/backend/optimizer/README  |  129 ++-
src/backend/optimizer/path/allpaths.c |  562 ++---
src/backend/optimizer/path/costsize.c | 1052 ++-
src/backend/optimizer/path/equivclass.c   |  149 ++-
src/backend/optimizer/path/indxpath.c | 2010 +++--
src/backend/optimizer/path/joinpath.c |  745 
src/backend/optimizer/path/joinrels.c |7 +-
src/backend/optimizer/path/orindxpath.c   |   10 +-
src/backend/optimizer/path/pathkeys.c |   17 +-
src/backend/optimizer/plan/createplan.c   |   35 +-
src/backend/optimizer/plan/planmain.c |1 +
src/backend/optimizer/plan/planner.c  |3 +-
src/backend/optimizer/util/pathnode.c |  897 ++
src/backend/optimizer/util/relnode.c  |6 +-
src/backend/optimizer/util/restrictinfo.c |   85 +--
src/backend/utils/adt/selfuncs.c  |   37 +-
src/include/nodes/bitmapset.h |   10 +
src/include/nodes/nodes.h |1 -
src/include/nodes/relation.h  |  192 ++--
src/include/optimizer/cost.h  |   48 +-
src/include/optimizer/pathnode.h  |   21 +-
src/include/optimizer/paths.h |   21 +-
src/include/optimizer/restrictinfo.h  |5 +-
26 files changed, 3881 insertions(+), 2289 deletions(-)


-- 
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers


[COMMITTERS] pgsql: Undo 8.4-era lobotomization of subquery pullup rules.

2012-01-27 Thread Tom Lane
Undo 8.4-era lobotomization of subquery pullup rules.

After the planner was fixed to convert some IN/EXISTS subqueries into
semijoins or antijoins, we had to prevent it from doing that in some
cases where the plans risked getting much worse.  The reason the plans
got worse was that in the unoptimized implementation, subqueries could
reference parameters from the outer query at any join level, and so
full table scans could be avoided even if they were one or more levels
of join below where the semi/anti join would be.  Now that we have
sufficient mechanism in the planner to handle such cases properly,
it should no longer be necessary to play dumb here.

This reverts commits 07b9936a0f10d746e5076239813a5e938f2f16be and
cd1f0d04bf06938c0ee5728fc8424d62bcf2eef3.  The latter was a stopgap
fix that wasn't really sufficiently analyzed at the time.  Rather
than just restricting ourselves to cases where the new join can be
stacked on the right-hand input, we should also consider whether it
can be stacked on the left-hand input.

Branch
--
master

Details
---
http://git.postgresql.org/pg/commitdiff/0816fad6eebddb8f1f0e21635e46625815d690b9

Modified Files
--
src/backend/optimizer/prep/prepjointree.c |  218 -
1 files changed, 149 insertions(+), 69 deletions(-)


-- 
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers


[COMMITTERS] pgsql: Fix error detection in contrib/pgcrypto's encrypt_iv() and decry

2012-01-27 Thread Tom Lane
Fix error detection in contrib/pgcrypto's encrypt_iv() and decrypt_iv().

Due to oversights, the encrypt_iv() and decrypt_iv() functions failed to
report certain types of invalid-input errors, and would instead return
random garbage values.

Marko Kreen, per report from Stefan Kaltenbrunner

Branch
--
REL9_1_STABLE

Details
---
http://git.postgresql.org/pg/commitdiff/7c016e3f56e2a7d8e9dd00a6d2d80bdc2239424e

Modified Files
--
contrib/pgcrypto/pgcrypto.c |8 
1 files changed, 4 insertions(+), 4 deletions(-)


-- 
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers


[COMMITTERS] pgsql: Fix error detection in contrib/pgcrypto's encrypt_iv() and decry

2012-01-27 Thread Tom Lane
Fix error detection in contrib/pgcrypto's encrypt_iv() and decrypt_iv().

Due to oversights, the encrypt_iv() and decrypt_iv() functions failed to
report certain types of invalid-input errors, and would instead return
random garbage values.

Marko Kreen, per report from Stefan Kaltenbrunner

Branch
--
REL9_0_STABLE

Details
---
http://git.postgresql.org/pg/commitdiff/a752952d2600c65d06b470f7de43dd068a11f673

Modified Files
--
contrib/pgcrypto/pgcrypto.c |8 
1 files changed, 4 insertions(+), 4 deletions(-)


-- 
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers


[COMMITTERS] pgsql: Fix error detection in contrib/pgcrypto's encrypt_iv() and decry

2012-01-27 Thread Tom Lane
Fix error detection in contrib/pgcrypto's encrypt_iv() and decrypt_iv().

Due to oversights, the encrypt_iv() and decrypt_iv() functions failed to
report certain types of invalid-input errors, and would instead return
random garbage values.

Marko Kreen, per report from Stefan Kaltenbrunner

Branch
--
REL8_4_STABLE

Details
---
http://git.postgresql.org/pg/commitdiff/b4e9fd4df3045ccca73a71b656b0fcbbc3c202f5

Modified Files
--
contrib/pgcrypto/pgcrypto.c |8 
1 files changed, 4 insertions(+), 4 deletions(-)


-- 
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers


[COMMITTERS] pgsql: Fix error detection in contrib/pgcrypto's encrypt_iv() and decry

2012-01-27 Thread Tom Lane
Fix error detection in contrib/pgcrypto's encrypt_iv() and decrypt_iv().

Due to oversights, the encrypt_iv() and decrypt_iv() functions failed to
report certain types of invalid-input errors, and would instead return
random garbage values.

Marko Kreen, per report from Stefan Kaltenbrunner

Branch
--
REL8_3_STABLE

Details
---
http://git.postgresql.org/pg/commitdiff/b882ffc24ed14fb7dcdf7eb8792df8105d79abc8

Modified Files
--
contrib/pgcrypto/pgcrypto.c |8 
1 files changed, 4 insertions(+), 4 deletions(-)


-- 
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers


[COMMITTERS] pgsql: Fix error detection in contrib/pgcrypto's encrypt_iv() and decry

2012-01-27 Thread Tom Lane
Fix error detection in contrib/pgcrypto's encrypt_iv() and decrypt_iv().

Due to oversights, the encrypt_iv() and decrypt_iv() functions failed to
report certain types of invalid-input errors, and would instead return
random garbage values.

Marko Kreen, per report from Stefan Kaltenbrunner

Branch
--
master

Details
---
http://git.postgresql.org/pg/commitdiff/a8b4b84360e5ea145d12d372305b50f6774b0366

Modified Files
--
contrib/pgcrypto/pgcrypto.c |8 
1 files changed, 4 insertions(+), 4 deletions(-)


-- 
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers