[COMMITTERS] pgsql: Remove extra copies of LogwrtResult.

2012-03-06 Thread Heikki Linnakangas
Remove extra copies of LogwrtResult.

This simplifies the code a little bit. The new rule is that to update
XLogCtl->LogwrtResult, you must hold both WALWriteLock and info_lck, whereas
before we had two copies, one that was protected by WALWriteLock and another
protected by info_lck. The code that updates them was already holding both
locks, so merging the two is trivial.

The third copy, XLogCtl->Insert.LogwrtResult, was not totally redundant, it
was used in AdvanceXLInsertBuffer to update the backend-local copy, before
acquiring the info_lck to read the up-to-date value. But the value of that
seems dubious; at best it's saving one spinlock acquisition per completed
WAL page, which is not significant compared to all the other work involved.
And in practice, it's probably not saving even that much.

Branch
--
master

Details
---
http://git.postgresql.org/pg/commitdiff/7714c6382941383514c0f1954ca831686ac4fcd2

Modified Files
--
src/backend/access/transam/xlog.c |   74 +++--
1 files changed, 22 insertions(+), 52 deletions(-)


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


[COMMITTERS] pgsql: Simplify the way changes to full_page_writes are logged.

2012-03-06 Thread Heikki Linnakangas
Simplify the way changes to full_page_writes are logged.

It's harmless to do full page writes even when not strictly necessary, so
when turning full_page_writes on, we can set the global flag first, and then
call XLogInsert. Likewise, when turning it off, we can write the WAL record
first, and then clear the flag. This way XLogInsert doesn't need any special
handling of the XLOG_FPW_CHANGE record type. XLogInsert is complicated
enough already, so anything we can keep away from there is a good thing.

Actually I don't think the atomicity of the shared memory flag matters,
anyway, because we only write the XLOG_FPW_CHANGE at the end of recovery,
when there are no concurrent WAL insertions going on. But might as well make
it safe, in case we allow changing full_page_writes on the fly in the
future.

Branch
--
master

Details
---
http://git.postgresql.org/pg/commitdiff/3b682df3260aa8e020201e4b6c5cbc31fe8ecb8e

Modified Files
--
src/backend/access/transam/xlog.c |   60 +++-
1 files changed, 25 insertions(+), 35 deletions(-)


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


[COMMITTERS] pgsql: Make the comments more clear on the fact that UpdateFullPageWrit

2012-03-06 Thread Heikki Linnakangas
Make the comments more clear on the fact that UpdateFullPageWrites() is not
safe to call concurrently from multiple processes.

Branch
--
master

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

Modified Files
--
src/backend/access/transam/xlog.c |8 +---
1 files changed, 5 insertions(+), 3 deletions(-)


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


[COMMITTERS] pgsql: Typo fix.

2012-03-06 Thread Robert Haas
Typo fix.

Fujii Masao

Branch
--
master

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

Modified Files
--
src/backend/access/transam/xlog.c |2 +-
1 files changed, 1 insertions(+), 1 deletions(-)


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


[COMMITTERS] pgsql: Add a hook for processing messages due to be sent to the server

2012-03-06 Thread Tom Lane
Add a hook for processing messages due to be sent to the server log.

Use-cases for this include custom log filtering rules and custom log
message transmission mechanisms (for instance, lossy log message
collection, which has been discussed several times recently).

As is our common practice for hooks, there's no regression test nor
user-facing documentation for this, though the author did exhibit a
sample module using the hook.

Martin Pihlak, reviewed by Marti Raudsepp

Branch
--
master

Details
---
http://git.postgresql.org/pg/commitdiff/19dbc3463161a142537ba5c569c8e6a073a318de

Modified Files
--
src/backend/utils/error/elog.c |   26 ++
src/include/utils/elog.h   |4 
2 files changed, 30 insertions(+), 0 deletions(-)


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


[COMMITTERS] pgsql: libpq: Small code clarification, and avoid casting away const

2012-03-06 Thread Peter Eisentraut
libpq: Small code clarification, and avoid casting away const

Branch
--
master

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

Modified Files
--
src/interfaces/libpq/fe-auth.c |   14 --
1 files changed, 8 insertions(+), 6 deletions(-)


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