[COMMITTERS] pgsql: Improve code around the recently added rm_identify rmgr callback

2014-09-22 Thread Andres Freund
Improve code around the recently added rm_identify rmgr callback.

There are four weaknesses in728f152e07f998d2cb4fe5f24ec8da2c3bda98f2:

* append_init() in heapdesc.c was ugly and required that rm_identify
  return values are only valid till the next call. Instead just add a
  couple more switch() cases for the INIT_PAGE cases. Now the returned
  value will always be valid.
* a couple rm_identify() callbacks missed masking xl_info with
  ~XLR_INFO_MASK.
* pg_xlogdump didn't map a NULL rm_identify to UNKNOWN or a similar
  string.
* append_init() was called when id=NULL - which should never actually
  happen. But it's better to be careful.

Branch
--
master

Details
---
http://git.postgresql.org/pg/commitdiff/604f7956b946019dd37bd3baea24cb669a47

Modified Files
--
contrib/pg_xlogdump/pg_xlogdump.c |7 +-
src/backend/access/rmgrdesc/clogdesc.c|2 +-
src/backend/access/rmgrdesc/dbasedesc.c   |2 +-
src/backend/access/rmgrdesc/gindesc.c |2 +-
src/backend/access/rmgrdesc/gistdesc.c|2 +-
src/backend/access/rmgrdesc/heapdesc.c|   33 -
src/backend/access/rmgrdesc/mxactdesc.c   |2 +-
src/backend/access/rmgrdesc/nbtdesc.c |2 +-
src/backend/access/rmgrdesc/relmapdesc.c  |2 +-
src/backend/access/rmgrdesc/seqdesc.c |2 +-
src/backend/access/rmgrdesc/smgrdesc.c|2 +-
src/backend/access/rmgrdesc/spgdesc.c |2 +-
src/backend/access/rmgrdesc/standbydesc.c |2 +-
src/backend/access/rmgrdesc/tblspcdesc.c  |2 +-
src/backend/access/rmgrdesc/xactdesc.c|2 +-
src/backend/access/rmgrdesc/xlogdesc.c|2 +-
src/backend/access/transam/xlog.c |3 ++-
src/include/access/xlog_internal.h|3 ---
18 files changed, 36 insertions(+), 38 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: Remove postgres --help blurb about the removed -A option.

2014-09-22 Thread Andres Freund
Remove postgres --help blurb about the removed -A option.

I missed this in 3bdcf6a5a755503.

Noticed by Merlin Moncure
Discussion: cahyxu0yc7upeevzqrowtnrop9dxteupyjb0og4qunbipmev...@mail.gmail.com

Branch
--
master

Details
---
http://git.postgresql.org/pg/commitdiff/0926ef43c160cc8334d3e86f364bf9a7aa2da43f

Modified Files
--
src/backend/main/main.c |3 ---
1 file changed, 3 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 mishandling of CreateEventTrigStmt's eventname field.

2014-09-22 Thread Robert Haas
Fix mishandling of CreateEventTrigStmt's eventname field.

It's a string, not a scalar.

Petr Jelinek

Branch
--
REL9_4_STABLE

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

Modified Files
--
src/backend/nodes/copyfuncs.c  |2 +-
src/backend/nodes/equalfuncs.c |2 +-
2 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


[COMMITTERS] pgsql: Fix mishandling of CreateEventTrigStmt's eventname field.

2014-09-22 Thread Robert Haas
Fix mishandling of CreateEventTrigStmt's eventname field.

It's a string, not a scalar.

Petr Jelinek

Branch
--
REL9_3_STABLE

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

Modified Files
--
src/backend/nodes/copyfuncs.c  |2 +-
src/backend/nodes/equalfuncs.c |2 +-
2 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


[COMMITTERS] pgsql: Fix mishandling of CreateEventTrigStmt's eventname field.

2014-09-22 Thread Robert Haas
Fix mishandling of CreateEventTrigStmt's eventname field.

It's a string, not a scalar.

Petr Jelinek

Branch
--
master

Details
---
http://git.postgresql.org/pg/commitdiff/763ba1b0f2aa8353e3e3b02bc6bd965deb4575e0

Modified Files
--
src/backend/nodes/copyfuncs.c  |2 +-
src/backend/nodes/equalfuncs.c |2 +-
2 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


[COMMITTERS] pgsql: Fix compiler warning.

2014-09-22 Thread Robert Haas
Fix compiler warning.

It is meaningless to declare a pass-by-value return type const.

Branch
--
master

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

Modified Files
--
src/backend/commands/policy.c |4 ++--
1 file 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


[COMMITTERS] pgsql: Remove volatile qualifiers from lwlock.c.

2014-09-22 Thread Robert Haas
Remove volatile qualifiers from lwlock.c.

Now that spinlocks (hopefully!) act as compiler barriers, as of commit
0709b7ee72e4bc71ad07b7120acd117265ab51d0, this should be safe.  This
serves as a demonstration of the new coding style, and may be optimized
better on some machines as well.

Branch
--
master

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

Modified Files
--
src/backend/storage/lmgr/lwlock.c |  103 ++---
1 file changed, 50 insertions(+), 53 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: Remove most volatile qualifiers from xlog.c

2014-09-22 Thread Andres Freund
Remove most volatile qualifiers from xlog.c

For the reason outlined in df4077cda2e also remove volatile qualifiers
from xlog.c. Some of these uses of volatile have been added after
noticing problems back when spinlocks didn't imply compiler
barriers. So they are a good test - in fact removing the volatiles
breaks when done without the barriers in spinlocks present.

Several uses of volatile remain where they are explicitly used to
access shared memory without locks. These locations are ok with
slightly out of date data, but removing the volatile might lead to the
variables never being reread from memory. These uses could also be
replaced by barriers, but that's a separate change of doubtful value.

Branch
--
master

Details
---
http://git.postgresql.org/pg/commitdiff/6ba4ecbf477e0b25dd7bde1b0c4e07fc2da19348

Modified Files
--
src/backend/access/transam/xlog.c |  470 ++---
1 file changed, 173 insertions(+), 297 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: Process withCheckOption exprs in setrefs.c

2014-09-22 Thread Stephen Frost
Process withCheckOption exprs in setrefs.c

While withCheckOption exprs had been handled in many cases by
happenstance, they need to be handled during set_plan_references and
more specifically down in set_plan_refs for ModifyTable plan nodes.
This is to ensure that the opfuncid's are set for operators referenced
in the withCheckOption exprs.

Identified as an issue by Thom Brown

Patch by Dean Rasheed

Back-patch to 9.4, where withCheckOption was introduced.

Branch
--
master

Details
---
http://git.postgresql.org/pg/commitdiff/6ef8c658af2127f4e62cb24feade8b465c9e2fea

Modified Files
--
src/backend/optimizer/plan/setrefs.c  |3 +++
src/test/regress/expected/updatable_views.out |   20 
src/test/regress/sql/updatable_views.sql  |   19 +++
3 files changed, 42 insertions(+)


-- 
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: Process withCheckOption exprs in setrefs.c

2014-09-22 Thread Stephen Frost
Process withCheckOption exprs in setrefs.c

While withCheckOption exprs had been handled in many cases by
happenstance, they need to be handled during set_plan_references and
more specifically down in set_plan_refs for ModifyTable plan nodes.
This is to ensure that the opfuncid's are set for operators referenced
in the withCheckOption exprs.

Identified as an issue by Thom Brown

Patch by Dean Rasheed

Back-patch to 9.4, where withCheckOption was introduced.

Branch
--
REL9_4_STABLE

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

Modified Files
--
src/backend/optimizer/plan/setrefs.c  |3 +++
src/test/regress/expected/updatable_views.out |   20 
src/test/regress/sql/updatable_views.sql  |   19 +++
3 files changed, 42 insertions(+)


-- 
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: Log ALTER SYSTEM statements as DDL

2014-09-22 Thread Stephen Frost
Log ALTER SYSTEM statements as DDL

Per discussion in bug #11350, log ALTER SYSTEM commands at the
log_statement=ddl level, rather than at the log_statement=all level.

Pointed out by Tomonari Katsumata.

Back-patch to 9.4 where ALTER SYSTEM was introduced.

Branch
--
master

Details
---
http://git.postgresql.org/pg/commitdiff/43bed84c320443ee7247f7ca8d609640651aab93

Modified Files
--
src/backend/tcop/utility.c |2 +-
1 file changed, 1 insertion(+), 1 deletion(-)


-- 
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: Log ALTER SYSTEM statements as DDL

2014-09-22 Thread Stephen Frost
Log ALTER SYSTEM statements as DDL

Per discussion in bug #11350, log ALTER SYSTEM commands at the
log_statement=ddl level, rather than at the log_statement=all level.

Pointed out by Tomonari Katsumata.

Back-patch to 9.4 where ALTER SYSTEM was introduced.

Branch
--
REL9_4_STABLE

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

Modified Files
--
src/backend/tcop/utility.c |2 +-
1 file changed, 1 insertion(+), 1 deletion(-)


-- 
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: Add unicode_*_linestyle to \? variables

2014-09-22 Thread Stephen Frost
Add unicode_*_linestyle to \? variables

In a2dabf0 we added the ability to have single or double unicode
linestyle for the border, column, or header.  Unfortunately, the
\? variables output was not updated for these new psql variables.

This corrects that oversight.

Patch by Pavel Stehule.

Branch
--
master

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

Modified Files
--
src/bin/psql/help.c |6 +-
1 file changed, 5 insertions(+), 1 deletion(-)


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