* Flush a previously, shared or exclusively, locked and pinned buffer to the * OS. */
| 3958 | * OS. |
| 3959 | */ |
| 3960 | void |
| 3961 | FlushOneBuffer(Buffer buffer) |
| 3962 | { |
| 3963 | BufferDesc *bufHdr; |
| 3964 | |
| 3965 | /* currently not needed, but no fundamental reason not to support */ |
| 3966 | Assert(!BufferIsLocal(buffer)); |
| 3967 | |
| 3968 | Assert(BufferIsPinned(buffer)); |
| 3969 | |
| 3970 | bufHdr = GetBufferDescriptor(buffer - 1); |
| 3971 | |
| 3972 | Assert(LWLockHeldByMe(BufferDescriptorGetContentLock(bufHdr))); |
| 3973 | |
| 3974 | FlushBuffer(bufHdr, NULL); |
| 3975 | } |
| 3976 | |
| 3977 | /* |
| 3978 | * ReleaseBuffer -- release the pin on a buffer |
no test coverage detected