mirror of
https://git.postgresql.org/git/postgresql.git
synced 2024-08-21 17:43:23 +02:00
truncations in FSM code, call FreeSpaceMapTruncateRel from smgr_redo. To make that cleaner from modularity point of view, move the WAL-logging one level up to RelationTruncate, and move RelationTruncate and all the related WAL-logging to new src/backend/catalog/storage.c file. Introduce new RelationCreateStorage and RelationDropStorage functions that are used instead of calling smgrcreate/smgrscheduleunlink directly. Move the pending rel deletion stuff from smgrcreate/smgrscheduleunlink to the new functions. This leaves smgr.c as a thin wrapper around md.c; all the transactional stuff is now in storage.c. This will make it easier to add new forks with similar truncation logic, like the visibility map.
70 lines
2.8 KiB
Makefile
70 lines
2.8 KiB
Makefile
#-------------------------------------------------------------------------
|
|
#
|
|
# Makefile for backend/catalog
|
|
#
|
|
# $PostgreSQL: pgsql/src/backend/catalog/Makefile,v 1.67 2008/11/19 10:34:51 heikki Exp $
|
|
#
|
|
#-------------------------------------------------------------------------
|
|
|
|
subdir = src/backend/catalog
|
|
top_builddir = ../../..
|
|
include $(top_builddir)/src/Makefile.global
|
|
|
|
OBJS = catalog.o dependency.o heap.o index.o indexing.o namespace.o aclchk.o \
|
|
pg_aggregate.o pg_constraint.o pg_conversion.o pg_depend.o pg_enum.o \
|
|
pg_largeobject.o pg_namespace.o pg_operator.o pg_proc.o pg_shdepend.o \
|
|
pg_type.o storage.o toasting.o
|
|
|
|
BKIFILES = postgres.bki postgres.description postgres.shdescription
|
|
|
|
include $(top_srcdir)/src/backend/common.mk
|
|
|
|
all: $(BKIFILES)
|
|
|
|
# Note: there are some undocumented dependencies on the ordering in which
|
|
# the catalog header files are assembled into postgres.bki. In particular,
|
|
# indexing.h had better be last, and toasting.h just before it.
|
|
|
|
POSTGRES_BKI_SRCS = $(addprefix $(top_srcdir)/src/include/catalog/,\
|
|
pg_proc.h pg_type.h pg_attribute.h pg_class.h pg_autovacuum.h \
|
|
pg_attrdef.h pg_constraint.h pg_inherits.h pg_index.h pg_operator.h \
|
|
pg_opfamily.h pg_opclass.h pg_am.h pg_amop.h pg_amproc.h \
|
|
pg_language.h pg_largeobject.h pg_aggregate.h pg_statistic.h \
|
|
pg_rewrite.h pg_trigger.h pg_listener.h pg_description.h pg_cast.h \
|
|
pg_enum.h pg_namespace.h pg_conversion.h pg_depend.h \
|
|
pg_database.h pg_tablespace.h pg_pltemplate.h \
|
|
pg_authid.h pg_auth_members.h pg_shdepend.h pg_shdescription.h \
|
|
pg_ts_config.h pg_ts_config_map.h pg_ts_dict.h \
|
|
pg_ts_parser.h pg_ts_template.h \
|
|
toasting.h indexing.h \
|
|
)
|
|
|
|
pg_includes = $(sort -I$(top_srcdir)/src/include -I$(top_builddir)/src/include)
|
|
|
|
# see explanation in ../parser/Makefile
|
|
postgres.description: postgres.bki ;
|
|
|
|
postgres.shdescription: postgres.bki ;
|
|
|
|
postgres.bki: genbki.sh $(POSTGRES_BKI_SRCS) $(top_builddir)/src/include/pg_config_manual.h
|
|
AWK='$(AWK)' $(SHELL) $< $(pg_includes) --set-version=$(VERSION) -o postgres $(POSTGRES_BKI_SRCS)
|
|
|
|
.PHONY: install-data
|
|
install-data: $(BKIFILES) installdirs
|
|
$(INSTALL_DATA) postgres.bki '$(DESTDIR)$(datadir)/postgres.bki'
|
|
$(INSTALL_DATA) postgres.description '$(DESTDIR)$(datadir)/postgres.description'
|
|
$(INSTALL_DATA) postgres.shdescription '$(DESTDIR)$(datadir)/postgres.shdescription'
|
|
$(INSTALL_DATA) $(srcdir)/system_views.sql '$(DESTDIR)$(datadir)/system_views.sql'
|
|
$(INSTALL_DATA) $(srcdir)/information_schema.sql '$(DESTDIR)$(datadir)/information_schema.sql'
|
|
$(INSTALL_DATA) $(srcdir)/sql_features.txt '$(DESTDIR)$(datadir)/sql_features.txt'
|
|
|
|
installdirs:
|
|
$(mkinstalldirs) '$(DESTDIR)$(datadir)'
|
|
|
|
.PHONY: uninstall-data
|
|
uninstall-data:
|
|
rm -f $(addprefix '$(DESTDIR)$(datadir)'/, $(BKIFILES) system_views.sql information_schema.sql sql_features.txt)
|
|
|
|
clean:
|
|
rm -f $(BKIFILES)
|