postgresql/src/backend/utils
Andres Freund 4eda0a6470 Don't include low level locking code from frontend code.
Some frontend code like e.g. pg_xlogdump or pg_resetxlog, has to use
backend headers. Unfortunately until now that code includes most of the
locking code. It's generally not nice to expose such low level details,
but de6fd1c898 made that a hard problem. We fall back to defining
'inline' away if the compiler doesn't support it - that can cause linker
errors like on buildfarm animal pademelon if a inline function
references backend only code.

To fix that problem separate definitions from lock.h that are required
from frontend code into lockdefs.h and use it in the relevant
places. I've only removed the minimal amount of necessary definitions
for now - it might turn out that we want more for other reasons.

To avoid such details being exposed again put some checks against being
included from frontend code into atomics.h, lock.h, lwlock.h and
s_lock.h. It's otherwise fairly easy to indirectly include these
headers.

Discussion: 20150806070902.GE12214@awork2.anarazel.de
2015-08-07 15:10:56 +02:00
..
adt Rely on inline functions even if that causes warnings in older compilers. 2015-08-05 18:19:52 +02:00
cache Plug RLS related information leak in pg_stats view. 2015-07-28 13:21:22 -07:00
error pgindent run for 9.5 2015-05-23 21:35:49 -04:00
fmgr pgindent run for 9.5 2015-05-23 21:35:49 -04:00
hash Don't include low level locking code from frontend code. 2015-08-07 15:10:56 +02:00
init Fix incorrect order of lock file removal and failure to close() sockets. 2015-08-02 14:55:03 -04:00
mb Remove no-longer-required function declarations. 2015-05-24 12:20:23 -04:00
misc Cap wal_buffers to avoid a server crash when it's set very large. 2015-08-04 12:58:54 -04:00
mmgr Rely on inline functions even if that causes warnings in older compilers. 2015-08-05 18:19:52 +02:00
resowner Update copyright for 2015 2015-01-06 11:43:47 -05:00
sort Rely on inline functions even if that causes warnings in older compilers. 2015-08-05 18:19:52 +02:00
time pgindent run for 9.5 2015-05-23 21:35:49 -04:00
.gitignore Avoid maintaining three separate copies of the error codes list. 2011-02-03 22:32:49 -05:00
errcodes.txt Redesign tablesample method API, and do extensive code review. 2015-07-25 14:39:00 -04:00
Gen_dummy_probes.sed Update copyright for 2015 2015-01-06 11:43:47 -05:00
Gen_fmgrtab.pl Allow forcing nullness of columns during bootstrap. 2015-02-21 22:31:54 +01:00
generate-errcodes.pl Update copyright for 2015 2015-01-06 11:43:47 -05:00
Makefile Make handling of errcodes.h more consistent with other generated headers. 2011-02-04 09:29:10 -05:00
probes.d Update copyright for 2015 2015-01-06 11:43:47 -05:00