postgresql/src/backend/utils/adt
Robert Haas 05d4cbf9b6 Increase width of RelFileNumbers from 32 bits to 56 bits.
RelFileNumbers are now assigned using a separate counter, instead of
being assigned from the OID counter. This counter never wraps around:
if all 2^56 possible RelFileNumbers are used, an internal error
occurs. As the cluster is limited to 2^64 total bytes of WAL, this
limitation should not cause a problem in practice.

If the counter were 64 bits wide rather than 56 bits wide, we would
need to increase the width of the BufferTag, which might adversely
impact buffer lookup performance. Also, this lets us use bigint for
pg_class.relfilenode and other places where these values are exposed
at the SQL level without worrying about overflow.

This should remove the need to keep "tombstone" files around until
the next checkpoint when relations are removed. We do that to keep
RelFileNumbers from being recycled, but now that won't happen
anyway. However, this patch doesn't actually change anything in
this area; it just makes it possible for a future patch to do so.

Dilip Kumar, based on an idea from Andres Freund, who also reviewed
some earlier versions of the patch. Further review and some
wordsmithing by me. Also reviewed at various points by Ashutosh
Sharma, Vignesh C, Amul Sul, Álvaro Herrera, and Tom Lane.

Discussion: http://postgr.es/m/CA+Tgmobp7+7kmi4gkq7Y+4AM9fTvL+O1oQ4-5gFTT+6Ng-dQ=g@mail.gmail.com
2022-09-27 13:25:21 -04:00
..
.gitignore Build all Flex files standalone 2022-09-04 12:09:01 +07:00
acl.c Fix a bug in roles_is_member_of. 2022-08-31 08:22:24 -04:00
amutils.c Fix incorrect uses of Datum conversion macros 2022-09-05 13:30:44 +02:00
array_expanded.c Update copyright for 2022 2022-01-07 19:04:57 -05:00
array_selfuncs.c Update copyright for 2022 2022-01-07 19:04:57 -05:00
array_typanalyze.c Suppress variable-set-but-not-used warnings from clang 15. 2022-09-20 12:04:37 -04:00
array_userfuncs.c Update copyright for 2022 2022-01-07 19:04:57 -05:00
arrayfuncs.c Fix trim_array() for zero-dimensional array argument. 2022-07-31 13:43:17 -04:00
arraysubs.c Update copyright for 2022 2022-01-07 19:04:57 -05:00
arrayutils.c Add construct_array_builtin, deconstruct_array_builtin 2022-07-01 11:23:15 +02:00
ascii.c Update copyright for 2022 2022-01-07 19:04:57 -05:00
bool.c Update copyright for 2022 2022-01-07 19:04:57 -05:00
cash.c Remove unused includes 2021-12-01 16:10:56 +01:00
char.c Change type "char"'s I/O format for non-ASCII characters. 2022-08-02 10:29:35 -04:00
cryptohashfuncs.c Improve error handling of cryptohash computations 2022-01-11 09:55:16 +09:00
date.c Fix an assortment of improper usages of string functions 2022-09-06 13:19:44 +12:00
datetime.c Harmonize more parameter names in bulk. 2022-09-20 13:09:30 -07:00
datum.c Update copyright for 2022 2022-01-07 19:04:57 -05:00
dbsize.c Increase width of RelFileNumbers from 32 bits to 56 bits. 2022-09-27 13:25:21 -04:00
domains.c Update copyright for 2022 2022-01-07 19:04:57 -05:00
encode.c Update copyright for 2022 2022-01-07 19:04:57 -05:00
enum.c Update copyright for 2022 2022-01-07 19:04:57 -05:00
expandeddatum.c Update copyright for 2022 2022-01-07 19:04:57 -05:00
expandedrecord.c Update copyright for 2022 2022-01-07 19:04:57 -05:00
float.c Remove support for Visual Studio 2013 2022-07-14 11:22:49 +09:00
format_type.c Revert SQL/JSON features 2022-09-01 17:07:14 -04:00
formatting.c Revert SQL/JSON features 2022-09-01 17:07:14 -04:00
genfile.c Support pg_read_[binary_]file (filename, missing_ok). 2022-07-29 15:38:49 -04:00
geo_ops.c Harmonize more parameter names in bulk. 2022-09-20 13:09:30 -07:00
geo_selfuncs.c Update copyright for 2022 2022-01-07 19:04:57 -05:00
geo_spgist.c Update copyright for 2022 2022-01-07 19:04:57 -05:00
hbafuncs.c Fix path reference when parsing pg_ident.conf for pg_ident_file_mappings 2022-07-26 15:57:31 +09:00
inet_cidr_ntop.c Avoid conflicts with library versions of inet_net_ntop() and friends. 2019-08-18 19:27:23 -04:00
inet_net_pton.c Avoid conflicts with library versions of inet_net_ntop() and friends. 2019-08-18 19:27:23 -04:00
int8.c Teach planner and executor about monotonic window funcs 2022-04-08 10:34:36 +12:00
int.c Remove pg_atoi() 2022-02-15 07:44:26 +01:00
json.c Revert SQL/JSON features 2022-09-01 17:07:14 -04:00
jsonb_gin.c Avoid using list_length() to test for empty list. 2022-08-17 11:12:35 -04:00
jsonb_op.c Add construct_array_builtin, deconstruct_array_builtin 2022-07-01 11:23:15 +02:00
jsonb_util.c Harmonize more parameter names in bulk. 2022-09-20 13:09:30 -07:00
jsonb.c Harmonize more parameter names in bulk. 2022-09-20 13:09:30 -07:00
jsonbsubs.c Update copyright for 2022 2022-01-07 19:04:57 -05:00
jsonfuncs.c Revert SQL/JSON features 2022-09-01 17:07:14 -04:00
jsonpath_exec.c Harmonize more parameter names in bulk. 2022-09-20 13:09:30 -07:00
jsonpath_gram.y Suppress variable-set-but-not-used warnings from clang 15. 2022-09-20 12:04:37 -04:00
jsonpath_internal.h Build all Flex files standalone 2022-09-04 12:09:01 +07:00
jsonpath_scan.l Harmonize more lexer function parameter names. 2022-09-22 13:27:16 -07:00
jsonpath.c Revert SQL/JSON features 2022-09-01 17:07:14 -04:00
levenshtein.c Further -Wshadow=compatible-local warning fixes 2022-08-24 22:04:28 +12:00
like_match.c Update copyright for 2022 2022-01-07 19:04:57 -05:00
like_support.c Defend against stack overrun in a few more places. 2022-08-24 13:02:19 -04:00
like.c Harmonize more parameter names in bulk. 2022-09-20 13:09:30 -07:00
lockfuncs.c Replace many MemSet calls with struct initialization 2022-07-16 08:50:49 +02:00
mac8.c Update copyright for 2022 2022-01-07 19:04:57 -05:00
mac.c Specialize tuplesort routines for different kinds of abbreviated keys 2022-04-02 15:22:25 +07:00
Makefile Build all Flex files standalone 2022-09-04 12:09:01 +07:00
mcxtfuncs.c Create routine able to set single-call SRFs for Materialize mode 2022-03-07 10:26:29 +09:00
meson.build meson: Add initial version of meson based build system 2022-09-21 22:37:17 -07:00
misc.c Fix an assortment of improper usages of string functions 2022-09-06 13:19:44 +12:00
multirangetypes_selfuncs.c Update copyright for 2022 2022-01-07 19:04:57 -05:00
multirangetypes.c Fix incorrect uses of Datum conversion macros 2022-09-05 13:30:44 +02:00
name.c Add construct_array_builtin, deconstruct_array_builtin 2022-07-01 11:23:15 +02:00
network_gist.c Update copyright for 2022 2022-01-07 19:04:57 -05:00
network_selfuncs.c Update copyright for 2022 2022-01-07 19:04:57 -05:00
network_spgist.c Update copyright for 2022 2022-01-07 19:04:57 -05:00
network.c Remove configure probe for sockaddr_in6 and require AF_INET6. 2022-08-26 10:18:30 +12:00
numeric.c Harmonize more parameter names in bulk. 2022-09-20 13:09:30 -07:00
numutils.c Remove pg_atoi() 2022-02-15 07:44:26 +01:00
oid.c Rename value node fields 2022-01-14 11:26:08 +01:00
oracle_compat.c Avoid ERRCODE_INTERNAL_ERROR in oracle_compat.c functions. 2022-05-26 12:25:10 -04:00
orderedsetaggs.c Add construct_array_builtin, deconstruct_array_builtin 2022-07-01 11:23:15 +02:00
partitionfuncs.c Replace many MemSet calls with struct initialization 2022-07-16 08:50:49 +02:00
pg_locale.c Split up guc.c for better build speed and ease of maintenance. 2022-09-13 11:11:45 -04:00
pg_lsn.c Fix incorrect uses of Datum conversion macros 2022-09-05 13:30:44 +02:00
pg_upgrade_support.c Increase width of RelFileNumbers from 32 bits to 56 bits. 2022-09-27 13:25:21 -04:00
pgstatfuncs.c Fix incorrect uses of Datum conversion macros 2022-09-05 13:30:44 +02:00
pseudotypes.c Update copyright for 2022 2022-01-07 19:04:57 -05:00
quote.c Update copyright for 2022 2022-01-07 19:04:57 -05:00
rangetypes_gist.c Further -Wshadow=compatible-local warning fixes 2022-08-24 22:04:28 +12:00
rangetypes_selfuncs.c Update copyright for 2022 2022-01-07 19:04:57 -05:00
rangetypes_spgist.c Fix incorrect uses of Datum conversion macros 2022-09-05 13:30:44 +02:00
rangetypes_typanalyze.c Invent qsort_interruptible(). 2022-07-12 16:30:36 -04:00
rangetypes.c Harmonize more parameter names in bulk. 2022-09-20 13:09:30 -07:00
regexp.c Consistently use named parameters in regex code. 2022-09-19 15:10:24 -07:00
regproc.c Update copyright for 2022 2022-01-07 19:04:57 -05:00
ri_triggers.c Harmonize more parameter names in bulk. 2022-09-20 13:09:30 -07:00
rowtypes.c Update copyright for 2022 2022-01-07 19:04:57 -05:00
ruleutils.c Fix an assortment of improper usages of string functions 2022-09-06 13:19:44 +12:00
selfuncs.c Fix recent cpluspluscheck issue in selfuncs.h. 2022-09-20 14:08:57 -07:00
tid.c Tighten overflow checks in tidin(). 2022-03-03 20:04:35 -05:00
timestamp.c Harmonize more parameter names in bulk. 2022-09-20 13:09:30 -07:00
trigfuncs.c Update copyright for 2022 2022-01-07 19:04:57 -05:00
tsginidx.c Update copyright for 2022 2022-01-07 19:04:57 -05:00
tsgistidx.c Fix incorrect uses of Datum conversion macros 2022-09-05 13:30:44 +02:00
tsquery_cleanup.c Update copyright for 2022 2022-01-07 19:04:57 -05:00
tsquery_gist.c Update copyright for 2022 2022-01-07 19:04:57 -05:00
tsquery_op.c Fix incorrect uses of Datum conversion macros 2022-09-05 13:30:44 +02:00
tsquery_rewrite.c Update copyright for 2022 2022-01-07 19:04:57 -05:00
tsquery_util.c Update copyright for 2022 2022-01-07 19:04:57 -05:00
tsquery.c Avoid using list_length() to test for empty list. 2022-08-17 11:12:35 -04:00
tsrank.c Fix collection of typos in the code and the documentation 2022-03-15 11:29:35 +09:00
tsvector_op.c Add construct_array_builtin, deconstruct_array_builtin 2022-07-01 11:23:15 +02:00
tsvector_parser.c Update copyright for 2022 2022-01-07 19:04:57 -05:00
tsvector.c Update copyright for 2022 2022-01-07 19:04:57 -05:00
uuid.c Pre-beta mechanical code beautification. 2022-05-12 15:17:30 -04:00
varbit.c Update copyright for 2022 2022-01-07 19:04:57 -05:00
varchar.c Split up guc.c for better build speed and ease of maintenance. 2022-09-13 11:11:45 -04:00
varlena.c Adjust assorted hint messages that list all valid options. 2022-09-16 14:53:12 +02:00
version.c Update copyright for 2022 2022-01-07 19:04:57 -05:00
windowfuncs.c Teach planner and executor about monotonic window funcs 2022-04-08 10:34:36 +12:00
xid8funcs.c Fix visibility check when XID is committed in CLOG but not in procarray. 2022-06-27 08:21:08 +03:00
xid.c Add min() and max() aggregates for xid8. 2022-02-10 12:33:41 +09:00
xml.c Harmonize more parameter names in bulk. 2022-09-20 13:09:30 -07:00