postgresql/src/backend
Heikki Linnakangas 445e31bdc7 Fix some sloppiness in the new BufFileSize() and BufFileAppend() functions.
There were three related issues:

* BufFileAppend() incorrectly reset the seek position on the 'source' file.
  As a result, if you had called BufFileRead() on the file before calling
  BufFileAppend(), it got confused, and subsequent calls would read/write
  at wrong position.

* BufFileSize() did not work with files opened with BufFileOpenShared().

* FileGetSize() only worked on temporary files.

To fix, change the way BufFileSize() works so that it works on shared
files. Remove FileGetSize() altogether, as it's no longer needed. Remove
buffilesize from TapeShare struct, as the leader process can simply call
BufFileSize() to get the tape's size, there's no need to pass it through
shared memory anymore.

Discussion: https://www.postgresql.org/message-id/CAH2-WznEDYe_NZXxmnOfsoV54oFkTdMy7YLE2NPBLuttO96vTQ@mail.gmail.com
2018-05-02 17:23:13 +03:00
..
access Clean up warnings from -Wimplicit-fallthrough. 2018-05-01 19:35:08 -04:00
bootstrap Rationalize handling of array type names in bootstrap data. 2018-04-17 18:29:11 -04:00
catalog Clean up warnings from -Wimplicit-fallthrough. 2018-05-01 19:35:08 -04:00
commands Clean up warnings from -Wimplicit-fallthrough. 2018-05-01 19:35:08 -04:00
executor Clean up warnings from -Wimplicit-fallthrough. 2018-05-01 19:35:08 -04:00
foreign Remove bogus "extern" annotations on function definitions. 2018-02-19 12:07:44 -05:00
jit Further -Wimplicit-fallthrough cleanup. 2018-05-01 19:53:48 -07:00
lib Post-feature-freeze pgindent run. 2018-04-26 14:47:16 -04:00
libpq Post-feature-freeze pgindent run. 2018-04-26 14:47:16 -04:00
main Update copyright for 2018 2018-01-02 23:30:12 -05:00
nodes Fix incorrect field type for PlannedStmt.jitFlags in outfuncs/readfuncs. 2018-04-28 16:46:24 -04:00
optimizer Post-feature-freeze pgindent run. 2018-04-26 14:47:16 -04:00
parser Clean up warnings from -Wimplicit-fallthrough. 2018-05-01 19:35:08 -04:00
partitioning Post-feature-freeze pgindent run. 2018-04-26 14:47:16 -04:00
po Translation updates 2017-08-07 13:55:34 -04:00
port Remove investigative code for can't-reattach-to-shared-memory errors. 2018-05-01 13:06:31 -04:00
postmaster In AtEOXact_Files, complain if any files remain unclosed at commit. 2018-04-28 17:45:02 -04:00
regex Clean up warnings from -Wimplicit-fallthrough. 2018-05-01 19:35:08 -04:00
replication Fix some assorted compiler warnings on Windows. 2018-05-01 19:38:26 -04:00
rewrite Simplify view-expansion code in rewriteHandler.c. 2018-04-14 21:01:03 -04:00
snowball Avoid unnecessary use of pg_strcasecmp for already-downcased identifiers. 2018-01-26 18:25:14 -05:00
statistics Fast ALTER TABLE ADD COLUMN with a non-NULL default 2018-03-28 10:43:52 +10:30
storage Fix some sloppiness in the new BufFileSize() and BufFileAppend() functions. 2018-05-02 17:23:13 +03:00
tcop Clean up warnings from -Wimplicit-fallthrough. 2018-05-01 19:35:08 -04:00
tsearch Post-feature-freeze pgindent run. 2018-04-26 14:47:16 -04:00
utils Fix some sloppiness in the new BufFileSize() and BufFileAppend() functions. 2018-05-02 17:23:13 +03:00
.gitignore Add .gitignore entries for AIX-specific intermediate build artifacts. 2015-07-08 20:44:22 -04:00
common.mk Remove PARTIAL_LINKING build mode. 2018-03-30 17:33:04 -07:00
Makefile Remove Windows module-list-dumping code. 2018-04-30 13:20:13 -04:00
nls.mk Translation updates 2017-05-15 12:19:54 -04:00