postgres/src
Álvaro Herrera cc811f92ba
Adjust signature of cluster_rel() and its subroutines
cluster_rel() receives the OID of the relation to process, which it
opens and locks; but then its subroutine copy_table_data() also receives
the relation OID and opens it by itself.  This is a bit wasteful.  It's
better to have cluster_rel() receive the relation already open, and pass
it down to its subroutines as necessary; then cluster_rel closes the rel
before returning.  This simplifies things.

But a better motivation to make this change is that a future command to
do logical-decoding-based "concurrent VACUUM FULL" will need to release
all locks on the relation (and possibly on the clustering index) at some
point.  Since it makes little sense to keep the relation reference
without the lock, the cluster_rel() function will also close it (and
the index).  With this arrangement, neither the function nor its
subroutines need open extra references, which, again, makes things simpler.

Author: Antonin Houska <ah@cybertec.at>
Discussion: https://postgr.es/m/82651.1720540558@antos
2025-01-10 13:09:38 +01:00
..
backend Adjust signature of cluster_rel() and its subroutines 2025-01-10 13:09:38 +01:00
bin Fix off_t overflow in pg_basebackup on Windows. 2025-01-09 16:04:23 +13:00
common Update copyright for 2025 2025-01-01 11:21:55 -05:00
fe_utils flex code modernization: Replace YY_EXTRA_TYPE define with flex option 2025-01-06 09:47:58 +01:00
include Adjust signature of cluster_rel() and its subroutines 2025-01-10 13:09:38 +01:00
interfaces Fix error message wording 2025-01-07 20:07:32 +01:00
makefiles Update copyright for 2025 2025-01-01 11:21:55 -05:00
pl Provide 64-bit ftruncate() and lseek() on Windows. 2025-01-09 15:00:58 +13:00
port Update copyright for 2025 2025-01-01 11:21:55 -05:00
template thread-safety: gmtime_r(), localtime_r() 2024-08-23 07:43:04 +02:00
test Fix an ALTER GROUP ... DROP USER error message. 2025-01-09 17:10:13 -06:00
timezone Update copyright for 2025 2025-01-01 11:21:55 -05:00
tools Refactor some code related to backend statistics 2025-01-10 09:00:48 +09:00
tutorial Update copyright for 2025 2025-01-01 11:21:55 -05:00
.gitignore
DEVELOPERS
Makefile Remove distprep 2023-11-06 15:18:04 +01:00
Makefile.global.in Use <stdint.h> and <inttypes.h> for c.h integers. 2024-12-04 15:05:38 +13:00
Makefile.shlib Remove AIX support 2024-02-28 15:17:23 +04:00
meson.build Update copyright for 2025 2025-01-01 11:21:55 -05:00
nls-global.mk Remove distprep 2023-11-06 15:18:04 +01:00