postgresql/src/include
Tom Lane 71b9549d05 Overdue code review for transaction-level advisory locks patch.
Commit 62c7bd31c8 had assorted problems, most
visibly that it broke PREPARE TRANSACTION in the presence of session-level
advisory locks (which should be ignored by PREPARE), as per a recent
complaint from Stephen Rees.  More abstractly, the patch made the
LockMethodData.transactional flag not merely useless but outright
dangerous, because in point of fact that flag no longer tells you anything
at all about whether a lock is held transactionally.  This fix therefore
removes that flag altogether.  We now rely entirely on the convention
already in use in lock.c that transactional lock holds must be owned by
some ResourceOwner, while session holds are never so owned.  Setting the
locallock struct's owner link to NULL thus denotes a session hold, and
there is no redundant marker for that.

PREPARE TRANSACTION now works again when there are session-level advisory
locks, and it is also able to transfer transactional advisory locks to the
prepared transaction, but for implementation reasons it throws an error if
we hold both types of lock on a single lockable object.  Perhaps it will be
worth improving that someday.

Assorted other minor cleanup and documentation editing, as well.

Back-patch to 9.1, except that in the 9.1 branch I did not remove the
LockMethodData.transactional flag for fear of causing an ABI break for
any external code that might be examining those structs.
2012-05-04 17:44:31 -04:00
..
access Prevent index-only scans from returning wrong answers under Hot Standby. 2012-04-26 20:00:21 -04:00
bootstrap Update copyright notices for year 2012. 2012-01-01 18:01:58 -05:00
catalog More duplicate word removal. 2012-05-02 09:28:16 -04:00
commands Allow statistics to be collected for foreign tables. 2012-04-06 15:02:35 -04:00
datatype Update copyright notices for year 2012. 2012-01-01 18:01:58 -05:00
executor Rename I/O timing statistics columns to blk_read_time and blk_write_time. 2012-04-29 18:13:33 -04:00
foreign Dept of second thoughts: improve the API for AnalyzeForeignTable. 2012-04-06 16:04:10 -04:00
lib Update copyright notices for year 2012. 2012-01-01 18:01:58 -05:00
libpq Remove arbitrary limitation on length of common name in SSL certificates. 2012-02-23 15:48:04 -05:00
mb Update copyright notices for year 2012. 2012-01-01 18:01:58 -05:00
nodes Recast "ONLY" column CHECK constraints as NO INHERIT 2012-04-20 23:56:57 -03:00
optimizer Fix planner's handling of RETURNING lists in writable CTEs. 2012-04-25 20:20:33 -04:00
parser Add PGDLLIMPORT to ScanKeywords and NumScanKeywords. 2012-03-31 10:56:21 -04:00
port Remove BSD/OS (BSDi) port. There are no known users upgrading to 2012-05-03 10:58:44 -04:00
portability Update copyright notices for year 2012. 2012-01-01 18:01:58 -05:00
postmaster Update copyright notices for year 2012. 2012-01-01 18:01:58 -05:00
regex Avoid repeated creation/freeing of per-subre DFAs during regex search. 2012-02-24 18:40:30 -05:00
replication Various minor comments changes from bgwriter to checkpointer. 2012-01-30 14:34:25 +00:00
rewrite Update copyright notices for year 2012. 2012-01-01 18:01:58 -05:00
snowball Update copyright notices for year 2012. 2012-01-01 18:01:58 -05:00
storage Overdue code review for transaction-level advisory locks patch. 2012-05-04 17:44:31 -04:00
tcop Restructure SELECT INTO's parsetree representation into CreateTableAsStmt. 2012-03-19 21:38:12 -04:00
tsearch Remove duplicate words in comments. 2012-05-02 10:20:27 +03:00
utils Avoid repeated CLOG access from heap_hot_search_buffer. 2012-05-02 12:40:07 -04:00
.gitignore Convert cvsignore to gitignore, and add .gitignore for build targets. 2010-09-22 12:57:04 +02:00
c.h Clean up compiler warnings from unused variables with asserts disabled 2012-03-21 23:33:10 +02:00
fmgr.h Update copyright notices for year 2012. 2012-01-01 18:01:58 -05:00
funcapi.h Update copyright notices for year 2012. 2012-01-01 18:01:58 -05:00
getaddrinfo.h Update copyright notices for year 2012. 2012-01-01 18:01:58 -05:00
getopt_long.h Update copyright notices for year 2012. 2012-01-01 18:01:58 -05:00
Makefile Fix server header file installation with vpath builds 2011-11-10 20:52:54 +02:00
miscadmin.h Do stack-depth checking in all postmaster children. 2012-04-08 19:07:55 +03:00
pg_config_manual.h Use LWSYNC in place of SYNC/ISYNC in PPC spinlocks, where possible. 2012-01-02 00:02:02 -05:00
pg_config.h.in Allow MinGW builds to use standardly-named OpenSSL libraries. 2012-02-23 15:05:08 -05:00
pg_config.h.win32 Allow MinGW builds to use standardly-named OpenSSL libraries. 2012-02-23 15:05:08 -05:00
pg_trace.h Update copyright notices for year 2012. 2012-01-01 18:01:58 -05:00
pgstat.h Converge all SQL-level statistics timing values to float8 milliseconds. 2012-04-30 14:03:33 -04:00
pgtime.h Update copyright notices for year 2012. 2012-01-01 18:01:58 -05:00
port.h Remove BSD/OS (BSDi) port. There are no known users upgrading to 2012-05-03 10:58:44 -04:00
postgres_ext.h Remove cvs keywords from all files. 2010-09-20 22:08:53 +02:00
postgres_fe.h Update copyright notices for year 2012. 2012-01-01 18:01:58 -05:00
postgres.h Change return type of ExceptionalCondition to void and mark it noreturn 2012-04-29 21:20:14 +03:00
rusagestub.h Update copyright notices for year 2012. 2012-01-01 18:01:58 -05:00
windowapi.h Update copyright notices for year 2012. 2012-01-01 18:01:58 -05:00