What does "inversion" mean in postgresql?

Viewed 54

According to code segments below, PostgreSQL (the version is REL_13_STABLE) seems to use inversion to describe large object, but I don't understand the meaning of "inversion", or why they are using "inversion" to describe large object.

/*
 *  Read/write mode flags for inversion (large object) calls
 */

#define INV_WRITE       0x00020000
#define INV_READ        0x00040000
1 Answers

Inversion stems from the inversion file system, an academic idea from the PostgreSQL ecosystem at the University of Berkeley. Read the original paper fir illustration:

Conventional file systems handle naming and layout of chunks of user data. Users may move around in the file system’s namespace, and may typically examine a small set of attributes of any given chunk of data. Most file systems guarantee some degree of consistency of user data. These observations make it possible to categorize conventional file systems as rudimentary database systems.

Conventional database systems, on the other hand, allow users to define objects with new attributes, and to query these attributes easily. Consistency guarantees are typically much stronger than in file systems. Database systems frequently use an underlying file system to store user data. Virtually no commercially-available database system exports a file system interface.

This paper describes the design and implementation of a file system built on top of a database system. This file system, called “Inversion” because the conventional roles of the file system and database system are inverted, runs on top of POSTGRES [MOSH92] version 4.0.1. It supports file storage on any device managed by POSTGRES, and provides useful services not found in many conventional file systems.

(The emphasis is mine.)

It seems that (inversion) large objects were originally intended as the basis for a file system implementation.

Related