|
PostgreSQL Source Code git master
|
#include "postgres.h"#include <unistd.h>#include <signal.h>#include "access/genam.h"#include "access/heapam.h"#include "access/htup_details.h"#include "access/tableam.h"#include "access/toast_compression.h"#include "access/xact.h"#include "bootstrap/bootstrap.h"#include "catalog/index.h"#include "catalog/pg_authid.h"#include "catalog/pg_collation.h"#include "catalog/pg_proc.h"#include "catalog/pg_type.h"#include "common/link-canary.h"#include "miscadmin.h"#include "nodes/makefuncs.h"#include "pg_getopt.h"#include "postmaster/postmaster.h"#include "storage/bufpage.h"#include "storage/fd.h"#include "storage/ipc.h"#include "storage/proc.h"#include "utils/builtins.h"#include "utils/fmgroids.h"#include "utils/guc.h"#include "utils/memutils.h"#include "utils/rel.h"#include "utils/relmapper.h"
Go to the source code of this file.
Data Structures | |
| struct | typinfo |
| struct | typmap |
| struct | rolinfo |
| struct | _IndexList |
Typedefs | |
| typedef struct _IndexList | IndexList |
Functions | |
| static void | CheckerModeMain (void) |
| static void | bootstrap_signals (void) |
| static Form_pg_attribute | AllocateAttribute (void) |
| static void | InsertOneProargdefaultsValue (char *value) |
| static void | populate_typ_list (void) |
| static Oid | gettype (char *type) |
| static void | cleanup (void) |
| void | BootstrapModeMain (int argc, char *argv[], bool check_only) |
| void | boot_openrel (char *relname) |
| void | closerel (char *relname) |
| void | DefineAttr (char *name, char *type, int attnum, int nullness) |
| void | InsertOneTuple (void) |
| void | InsertOneValue (char *value, int i) |
| void | InsertOneNull (int i) |
| void | boot_get_type_io_data (Oid typid, int16 *typlen, bool *typbyval, char *typalign, char *typdelim, Oid *typioparam, Oid *typinput, Oid *typoutput, Oid *typcollation) |
| Oid | boot_get_role_oid (const char *rolname) |
| void | index_register (Oid heap, Oid ind, const IndexInfo *indexInfo) |
| void | build_indices (void) |
Variables | |
| Relation | boot_reldesc |
| Form_pg_attribute | attrtypes [MAXATTR] |
| int | numattr |
| static const struct typinfo | TypInfo [] |
| static const int | n_types = sizeof(TypInfo) / sizeof(struct typinfo) |
| static List * | Typ = NIL |
| static struct typmap * | Ap = NULL |
| static const struct rolinfo | RolInfo [] |
| static Datum | values [MAXATTR] |
| static bool | Nulls [MAXATTR] |
| static MemoryContext | nogc = NULL |
| static IndexList * | ILHead = NULL |
| typedef struct _IndexList IndexList |
|
static |
Definition at line 1105 of file bootstrap.c.
References ATTRIBUTE_FIXED_PART_SIZE, MemoryContextAllocZero(), and TopMemoryContext.
Referenced by boot_openrel(), and DefineAttr().
Definition at line 1087 of file bootstrap.c.
References fb(), i, InvalidOid, lengthof, RolInfo, and rolname.
Referenced by aclparse().
| void boot_get_type_io_data | ( | Oid | typid, |
| int16 * | typlen, | ||
| bool * | typbyval, | ||
| char * | typalign, | ||
| char * | typdelim, | ||
| Oid * | typioparam, | ||
| Oid * | typinput, | ||
| Oid * | typoutput, | ||
| Oid * | typcollation | ||
| ) |
Definition at line 1004 of file bootstrap.c.
References typinfo::align, typinfo::byval, typinfo::collation, typinfo::elem, elog, ERROR, fb(), typinfo::inproc, typinfo::len, lfirst, n_types, NIL, OidIsValid, typinfo::outproc, Typ, typalign, and TypInfo.
Referenced by get_type_io_data(), InsertOneProargdefaultsValue(), and InsertOneValue().
Definition at line 477 of file bootstrap.c.
References AllocateAttribute(), ATTRIBUTE_FIXED_PART_SIZE, attrtypes, boot_reldesc, closerel(), DEBUG4, elog, fb(), i, makeRangeVar(), NAMEDATALEN, NameStr, NIL, NoLock, numattr, populate_typ_list(), RelationData::rd_att, RelationGetNumberOfAttributes, relname, table_openrv(), TupleDescAttr(), and Typ.
Definition at line 450 of file bootstrap.c.
References Assert, fb(), IsUnderPostmaster, pqsignal, SIGHUP, and SIGQUIT.
Referenced by BootstrapModeMain().
Definition at line 235 of file bootstrap.c.
References Assert, attrtypes, BaseInit(), boot_yylex_init(), boot_yyparse(), bootstrap_signals(), BootstrapProcessing, BootStrapXLOG(), ChangeToDataDir(), checkDataDir(), CheckerModeMain(), cleanup(), CommitTransactionCommand(), CreateDataDirLockFile(), CreateSharedMemoryAndSemaphores(), DISPATCH_POSTMASTER, elog, ereport, errcode(), errmsg, ERROR, fb(), flag(), getopt(), i, IgnoreSystemIndexes, InitializeFastPathLocks(), InitializeGUCOptions(), InitializeMaxBackends(), InitPostgres(), InitPostmasterChildSlots(), InitProcess(), InitStandaloneProcess(), InvalidOid, IsUnderPostmaster, MAXATTR, MAXPGPATH, name, NormalProcessing, Nulls, optarg, optind, OutputFileName, parse_dispatch_option(), ParseLongOption(), pfree(), PG_DATA_CHECKSUM_VERSION, pg_fallthrough, pg_link_canary_is_frontend(), PGC_INTERNAL, PGC_POSTMASTER, PGC_S_ARGV, PGC_S_DYNAMIC_DEFAULT, proc_exit(), progname, psprintf(), pstrdup(), RelationMapFinishBootstrap(), SelectConfigFiles(), set_max_safe_fds(), SetConfigOption(), SetProcessingMode, StartTransactionCommand(), strlcpy(), userDoption, value, and write_stderr.
Referenced by main().
Definition at line 1173 of file bootstrap.c.
References fb(), _IndexList::il_heap, _IndexList::il_ind, _IndexList::il_info, _IndexList::il_next, ILHead, index_build(), index_close(), index_open(), NoLock, table_close(), and table_open().
Definition at line 217 of file bootstrap.c.
References proc_exit().
Referenced by BootstrapModeMain().
Definition at line 879 of file bootstrap.c.
References boot_reldesc, closerel(), and fb().
Referenced by add_client_identification(), BootstrapModeMain(), conninfo_uri_parse_options(), extended_statistics_update(), GetConfFilesInDir(), getExtensions(), getPublications(), getSubscriptionRelations(), handle_oauth_sasl_error(), main(), merge_list_bounds(), merge_range_bounds(), optimize(), parse_oauth_json(), ParseConfigFile(), ParseConfigFp(), pg_GSS_read(), pg_GSS_write(), pg_regexec(), pgoutput_change(), print_aligned_text(), RecordTransactionCommit(), ReorderBufferRestoreChanges(), ResolveRecoveryConflictWithLock(), and validate().
Definition at line 522 of file bootstrap.c.
References boot_reldesc, DEBUG4, elog, ERROR, fb(), NoLock, RelationGetRelationName, relname, and table_close().
Referenced by boot_openrel(), cleanup(), and DefineAttr().
Definition at line 559 of file bootstrap.c.
References typinfo::align, AllocateAttribute(), typmap::am_oid, typmap::am_typ, Ap, Assert, attlen, attname, attnotnull, attnum, ATTRIBUTE_FIXED_PART_SIZE, attrtypes, boot_reldesc, BOOTCOL_NULL_AUTO, BOOTCOL_NULL_FORCE_NOT_NULL, BOOTCOL_NULL_FORCE_NULL, typinfo::byval, closerel(), typinfo::collation, DEBUG4, elog, fb(), gettype(), i, InvalidCompressionMethod, InvalidOid, typinfo::len, MemSet, name, NameStr, namestrcpy(), NIL, typinfo::oid, OidIsValid, typinfo::storage, Typ, type, TypInfo, and WARNING.
Definition at line 932 of file bootstrap.c.
References typmap::am_oid, Ap, DEBUG4, elog, ERROR, fb(), gettype(), i, lfirst, list_free_deep(), n_types, name, NAMEDATALEN, NameStr, NIL, populate_typ_list(), Typ, type, and TypInfo.
Referenced by DefineAttr(), and gettype().
Definition at line 1123 of file bootstrap.c.
References ALLOCSET_DEFAULT_SIZES, AllocSetContextCreate, Assert, copyObject, fb(), IndexInfo::ii_ExclusionOps, IndexInfo::ii_ExclusionProcs, IndexInfo::ii_ExclusionStrats, IndexInfo::ii_Expressions, IndexInfo::ii_Predicate, ILHead, MemoryContextSwitchTo(), NIL, nogc, and palloc_object.
Referenced by index_create().
Definition at line 861 of file bootstrap.c.
References Assert, boot_reldesc, DEBUG4, elog, ERROR, fb(), i, MAXATTR, NameStr, Nulls, PointerGetDatum(), RelationData::rd_att, RelationGetRelationName, TupleDescAttr(), and values.
Definition at line 761 of file bootstrap.c.
References Assert, boot_get_type_io_data(), CStringGetDatum(), CStringGetTextDatum, DatumGetArrayTypeP, DatumGetCString(), DatumGetInt16(), DatumGetPointer(), deconstruct_array_builtin(), elog, ERROR, fb(), i, Int16GetDatum(), Int32GetDatum(), lappend(), makeConst(), NIL, nodeToString(), Nulls, ObjectIdGetDatum(), OidFunctionCall3, OidInputFunctionCall(), pronargs, StaticAssertDecl, typalign, value, and values.
Referenced by InsertOneValue().
Definition at line 666 of file bootstrap.c.
References attrtypes, boot_reldesc, CreateTupleDesc(), DEBUG4, elog, heap_form_tuple(), heap_freetuple(), i, Nulls, numattr, pfree(), simple_heap_insert(), and values.
Definition at line 694 of file bootstrap.c.
References Assert, boot_get_type_io_data(), boot_reldesc, DEBUG4, elog, ereport, errmsg_internal(), ERROR, fb(), i, InsertOneProargdefaultsValue(), MAXATTR, NameStr, OidInputFunctionCall(), OidOutputFunctionCall(), RelationGetDescr, RelationGetRelationName, RelationGetRelid, TupleDescAttr(), typalign, value, and values.
Definition at line 892 of file bootstrap.c.
References Assert, fb(), Form_pg_type, ForwardScanDirection, GETSTRUCT(), heap_getnext(), lappend(), MemoryContextSwitchTo(), NIL, NoLock, palloc_object, table_beginscan_catalog(), table_close(), table_endscan(), table_open(), TopMemoryContext, and Typ.
Referenced by boot_openrel(), and gettype().
Definition at line 149 of file bootstrap.c.
Referenced by DefineAttr(), and gettype().
| Form_pg_attribute attrtypes[MAXATTR] |
Definition at line 64 of file bootstrap.c.
Referenced by boot_openrel(), BootstrapModeMain(), DefineAttr(), and InsertOneTuple().
| Relation boot_reldesc |
Definition at line 62 of file bootstrap.c.
Referenced by boot_openrel(), cleanup(), closerel(), DefineAttr(), InsertOneNull(), InsertOneTuple(), and InsertOneValue().
Definition at line 207 of file bootstrap.c.
Referenced by build_indices(), and index_register().
Definition at line 140 of file bootstrap.c.
Referenced by boot_get_type_io_data(), and gettype().
|
static |
Definition at line 191 of file bootstrap.c.
Referenced by index_register().
Definition at line 189 of file bootstrap.c.
Referenced by _SPI_convert_params(), BootstrapModeMain(), InsertOneNull(), InsertOneProargdefaultsValue(), InsertOneTuple(), SPI_cursor_open(), SPI_cursor_open_with_args(), SPI_execp(), SPI_execute_plan(), SPI_execute_snapshot(), SPI_execute_with_args(), and SPI_modifytuple().
| int numattr |
Definition at line 65 of file bootstrap.c.
Referenced by boot_openrel(), InsertOneTuple(), and tsvector_update_trigger().
Definition at line 167 of file bootstrap.c.
Referenced by boot_get_role_oid().
Definition at line 148 of file bootstrap.c.
Referenced by boot_get_type_io_data(), boot_openrel(), DefineAttr(), gettype(), and populate_typ_list().
Definition at line 91 of file bootstrap.c.
Referenced by boot_get_type_io_data(), DefineAttr(), and gettype().
Definition at line 188 of file bootstrap.c.
Referenced by _bt_build_callback(), _bt_check_unique(), _bt_spool(), _h_spool(), aclexplode(), add_values_to_range(), AddEnumLabel(), AddSubscriptionRelState(), AggregateCreate(), AlterCollation(), AlterDatabaseRefreshColl(), AlterObjectNamespace_internal(), AlterObjectOwner_internal(), AlterObjectRename_internal(), AlterOperator(), AlterPolicy(), AlterPublicationAllFlags(), AlterPublicationOptions(), AlterSetting(), AlterSubscription(), AlterTypeRecurse(), apply_returning_filter(), ApplyExtensionUpdates(), array_in(), array_iterate(), array_map(), array_out(), array_replace_internal(), attribute_statistics_update(), blinsert(), bloomBuildCallback(), BloomFormTuple(), brin_deconstruct_tuple(), brin_deform_tuple(), brin_form_tuple(), brin_metapage_info(), brin_page_items(), brinbuildCallback(), brinbuildCallbackParallel(), brininsert(), bt_metap(), bt_multi_page_stats(), bt_page_print_tuples(), bt_page_stats_internal(), bt_tuple_present_callback(), btinsert(), build_index_value_desc(), build_pgstattuple_type(), build_sorted_items(), build_tuplestore_recursively(), BuildIndexValueDescription(), BuildTupleFromCStrings(), CastCreate(), CatalogIndexInsert(), check_conn_params(), check_exclusion_constraint(), check_exclusion_or_unique_constraint(), clear_subscription_skip_lsn(), CollationCreate(), collectTSQueryValues(), comparetup_index_btree_tiebreak(), compute_index_stats(), compute_partition_hash_value(), compute_scalar_stats(), connect_pg_server(), ConnectDatabase(), connectDatabase(), conninfo_array_parse(), construct_connection_params(), constructConnStr(), ConversionCreate(), convert_VALUES_to_ANY(), copy_replication_slot(), CopyArrayEls(), CopyFromBinaryOneRow(), CopyFromCSVOneRow(), CopyFromTextLikeOneRow(), CopyFromTextOneRow(), create_cursor(), CreateAccessMethod(), CreateComments(), CreateConstraintEntry(), CreateForeignDataWrapper(), CreateForeignServer(), CreateForeignTable(), CreateOpFamily(), CreatePolicy(), CreateProceduralLanguage(), CreatePublication(), CreateReplicationSlot(), CreateSharedComments(), CreateStatistics(), CreateSubscription(), CreateTableSpace(), CreateTransform(), CreateTriggerFiringOn(), CreateUserMapping(), crosstab(), dblink_get_notify(), dblink_get_pkey(), DefineOpClass(), DefineTSConfiguration(), DefineTSDictionary(), DefineTSParser(), DefineTSTemplate(), DisableSubscription(), DiscreteKnapsack(), do_connect(), do_text_output_multiline(), do_tup_output(), doConnect(), each_object_field_end(), each_worker_jsonb(), elements_array_element_end(), elements_worker_jsonb(), exec_move_row(), exec_move_row_from_fields(), ExecBuildAggTrans(), ExecBuildSlotPartitionKeyDescription(), ExecCheckIndexConstraints(), ExecComputeStoredGenerated(), ExecEvalMinMax(), ExecEvalXmlExpr(), ExecFilterJunk(), ExecFindPartition(), ExecGrant_Attribute(), ExecGrant_common(), ExecGrant_Largeobject(), ExecGrant_Parameter(), ExecGrant_Relation(), ExecInitExprRec(), ExecInsertIndexTuples(), execute_dml_stmt(), extended_statistics_update(), ExtractConnectionOptions(), ExtractReplicaIdentity(), file_acquire_sample_rows(), fill_hba_line(), fill_ident_line(), FillXLogStatsRow(), FormIndexDatum(), FormPartitionKeyDatum(), get_actual_variable_endpoint(), get_altertable_subcmdinfo(), get_available_versions_for_extension(), get_crosstab_tuplestore(), get_matching_hash_bounds(), get_matching_range_bounds(), get_partition_for_tuple(), get_text_array_contents(), GetConfigOptionValues(), GetConnection(), GetWALBlockInfo(), GetWALRecordInfo(), GetWALRecordsInfo(), GetWalStats(), GetXLogSummaryStats(), gin_leafpage_items(), gin_metapage_info(), gin_page_opaque_info(), ginBuildCallback(), ginBuildCallbackParallel(), gininsert(), gist_page_items(), gist_page_items_bytea(), gist_page_opaque_info(), gistBuildCallback(), gistinsert(), gistSortedBuildCallback(), hash_bitmap_info(), hash_metapage_info(), hash_page_items(), hash_page_stats(), hash_record(), hash_record_extended(), hashbuildCallback(), hashinsert(), heap_compute_data_size(), heap_deform_tuple(), heap_fill_tuple(), heap_form_minimal_tuple(), heap_form_tuple(), heap_modify_tuple(), heap_modify_tuple_by_cols(), heap_page_items(), heap_tuple_infomask_flags(), heapam_index_build_range_scan(), heapam_index_validate_scan(), heapam_relation_copy_for_cluster(), hstore_from_record(), hstore_populate_record(), IdentifySystem(), import_pg_statistic(), index_concurrently_swap(), index_deform_tuple(), index_deform_tuple_internal(), index_form_tuple(), index_form_tuple_context(), index_insert(), index_truncate_tuple(), IndexCheckExclusion(), inet_hist_value_sel(), injection_points_list(), insert_element_record(), insert_event_trigger_tuple(), insert_label_record(), insert_property_record(), InsertExtensionTuple(), InsertOneNull(), InsertOneProargdefaultsValue(), InsertOneTuple(), InsertOneValue(), InsertPgClassTuple(), InsertRule(), intset_flush_buffered_values(), inv_truncate(), inv_write(), LargeObjectCreate(), libpqsrv_connect_params(), LogicalOutputWrite(), logicalrep_write_tuple(), main(), main(), make_tuple_from_result_row(), make_tuple_indirect(), materializeQueryResult(), materializeResult(), minmax_multi_init(), NamespaceCreate(), ndistinct_for_combination(), NextCopyFrom(), oid_array_to_list(), OperatorCreate(), OperatorShellMake(), page_header(), ParameterAclCreate(), parse_key_value_arrays(), parseLocalRelOptions(), partition_range_datum_bsearch(), perform_pruning_base_step(), pg_armor(), pg_available_extensions(), pg_available_wal_summaries(), pg_backup_stop(), pg_buffercache_evict(), pg_buffercache_evict_all(), pg_buffercache_evict_relation(), pg_buffercache_mark_dirty(), pg_buffercache_mark_dirty_all(), pg_buffercache_mark_dirty_relation(), pg_buffercache_os_pages_internal(), pg_buffercache_pages(), pg_buffercache_summary(), pg_buffercache_usage_counts(), pg_config(), pg_control_checkpoint(), pg_control_init(), pg_control_recovery(), pg_control_system(), pg_create_logical_replication_slot(), pg_create_physical_replication_slot(), pg_cursor(), pg_event_trigger_ddl_commands(), pg_event_trigger_dropped_objects(), pg_extension_update_paths(), pg_get_aios(), pg_get_catalog_foreign_keys(), pg_get_keywords(), pg_get_loaded_modules(), pg_get_logical_snapshot_info(), pg_get_logical_snapshot_meta(), pg_get_multixact_members(), pg_get_multixact_stats(), pg_get_object_address(), pg_get_publication_tables(), pg_get_replication_slots(), pg_get_sequence_data(), pg_get_shmem_allocations(), pg_get_shmem_allocations_numa(), pg_get_wait_events(), pg_get_wal_record_info(), pg_get_wal_resource_managers(), pg_get_wal_summarizer_state(), pg_identify_object(), pg_identify_object_as_address(), pg_input_error_info(), pg_last_committed_xact(), pg_lock_status(), pg_ls_dir(), pg_ls_dir_files(), pg_options_to_table(), pg_partition_tree(), pg_prepared_statement(), pg_prepared_xact(), pg_replication_slot_advance(), pg_sequence_parameters(), pg_show_replication_origin_status(), pg_split_walfile_name(), pg_stat_file(), pg_stat_get_activity(), pg_stat_get_archiver(), pg_stat_get_backend_subxact(), pg_stat_get_progress_info(), pg_stat_get_recovery(), pg_stat_get_recovery_prefetch(), pg_stat_get_replication_slot(), pg_stat_get_slru(), pg_stat_get_subscription(), pg_stat_get_subscription_stats(), pg_stat_get_wal_receiver(), pg_stat_get_wal_senders(), pg_stat_io_build_tuples(), pg_stat_statements_info(), pg_stat_statements_internal(), pg_stat_wal_build_tuple(), pg_stats_ext_mcvlist_items(), pg_tablespace_databases(), pg_timezone_abbrevs_abbrevs(), pg_timezone_abbrevs_zone(), pg_timezone_names(), pg_visibility(), pg_visibility_map(), pg_visibility_map_rel(), pg_visibility_map_summary(), pg_visibility_rel(), pg_wal_summary_contents(), pg_walfile_name_offset(), pg_xact_commit_timestamp_origin(), pgfdw_has_required_scram_options(), pgfdw_security_check(), pgp_armor_encode(), pgp_armor_headers(), pgp_extract_armor_headers(), pgrowlocks(), pgstatginindex_internal(), pgstathashindex(), pgstatindex_impl(), pgstattuple_approx_internal(), plperl_build_tuple_result(), pltcl_build_tuple_result(), PLy_cursor_plan(), PLy_spi_execute_plan(), PLyGenericObject_ToComposite(), PLyMapping_ToComposite(), PLySequence_ToComposite(), populate_record(), postgres_fdw_connection(), postgres_fdw_get_connections_internal(), PQconnectdbParams(), PQconnectStartParams(), PQpingParams(), ProcedureCreate(), prs_process_call(), publication_add_relation(), publication_add_schema(), PutMemoryContextsStatsTupleStore(), RangeCreate(), ReadArrayBinary(), ReadArrayStr(), ReadReplicationSlot(), record_in(), record_out(), record_recv(), record_send(), recordExtensionInitPrivWorker(), reduce_expanded_ranges(), reform_and_rewrite_tuple(), regression_main(), relation_statistics_update(), RemoveRoleFromInitPriv(), RemoveRoleFromObjectPolicy(), ReplaceRoleInInitPriv(), replorigin_create(), report_corruption_internal(), SendTablespaceList(), SendXlogRecPtrResult(), serialize_expr_stats(), SetDefaultACL(), SetSecurityLabel(), SetSharedSecurityLabel(), shdepAddDependency(), shdepChangeDep(), show_all_file_settings(), show_all_settings(), ShowAllGUCConfig(), slot_deform_heap_tuple(), spginsert(), spgistBuildCallback(), split_text_accum_result(), sql_conn(), ssl_extension_info(), StartReplication(), statatt_init_empty_tuple(), statatt_set_slot(), statext_mcv_serialize(), statext_store(), StoreAttrDefault(), storeOperators(), StorePartitionKey(), storeProcedures(), StoreSingleInheritance(), test_custom_stats_fixed_report(), test_custom_stats_var_report(), test_enc_conversion(), test_huge_distances(), test_predtest(), test_saslprep(), test_saslprep_ranges(), tfuncLoadRows(), toast_build_flattened_tuple(), toast_delete_external(), TransformGUCArray(), ts_process_call(), tsvector_unnest(), tt_process_call(), tuplesort_putindextuplevalues(), tuplestore_putvalues(), TypeCreate(), TypeShellMake(), unique_key_recheck(), update_attstats(), UpdateDeadTupleRetentionStatus(), UpdateIndexRelation(), UpdateSubscriptionRelState(), UpdateTwoPhaseState(), upsert_pg_statistic(), upsert_pg_statistic_ext_data(), vacuumlo(), ValuesNext(), WaitForLockersMultiple(), and xpath_table().