Skip to content

File log_page_buffer.c

FileList > cubrid > src > transaction > log_page_buffer.c

Go to the source code of this file

  • #include "config.h"
  • #include <stdio.h>
  • #include <stddef.h>
  • #include <stdlib.h>
  • #include <stdarg.h>
  • #include <string.h>
  • #include <time.h>
  • #include <limits.h>
  • #include <sys/stat.h>
  • #include <sys/types.h>
  • #include <unistd.h>
  • #include <sys/param.h>
  • #include <fcntl.h>
  • #include <assert.h>
  • #include "porting.h"
  • #include "porting_inline.hpp"
  • #include "connection_defs.h"
  • #include "language_support.h"
  • #include "log_append.hpp"
  • #include "log_impl.h"
  • #include "log_lsa.hpp"
  • #include "log_manager.h"
  • #include "log_comm.h"
  • #include "log_reader.hpp"
  • #include "log_volids.hpp"
  • #include "log_writer.h"
  • #include "lock_manager.h"
  • #include "log_system_tran.hpp"
  • #include "boot_sr.h"
  • #include "connection_sr.h"
  • #include "critical_section.h"
  • #include "page_buffer.h"
  • #include "double_write_buffer.hpp"
  • #include "file_io.h"
  • #include "disk_manager.h"
  • #include "error_manager.h"
  • #include "xserver_interface.h"
  • #include "perf_monitor.h"
  • #include "storage_common.h"
  • #include "system_parameter.h"
  • #include "memory_alloc.h"
  • #include "memory_hash.h"
  • #include "release_string.h"
  • #include "message_catalog.h"
  • #include "msgcat_set_log.hpp"
  • #include "environment_variable.h"
  • #include "util_func.h"
  • #include "errno.h"
  • #include "tcp.h"
  • #include "db.h"
  • #include "log_compress.h"
  • #include "event_log.h"
  • #include "tsc_timer.h"
  • #include "vacuum.h"
  • #include "thread_entry.hpp"
  • #include "thread_manager.hpp"
  • #include "crypt_opfunc.h"
  • #include "object_representation.h"
  • #include "flashback.h"
  • #include "memory_wrapper.hpp"

Classes

Type Name
struct ARV_LOG_PAGE_INFO_TABLE
struct arv_page_info
struct log_buffer
struct log_pb_global_data
struct logpb_partial_append

Public Types

Type Name
typedef struct arv_page_info ARV_PAGE_INFO
enum LOGPB_APPENDREC_STATUS
typedef struct logpb_partial_append LOGPB_PARTIAL_APPEND
typedef struct log_buffer LOG_BUFFER
typedef struct log_pb_global_data LOG_PB_GLOBAL_DATA

Public Attributes

Type Name
cubthread::worker_pool_type * g_backup_read_worker_pool = [**NULL**](freelistheap_8h.md#define-null)
LOG_PB_GLOBAL_DATA log_Pb
LOG_LOGGING_STAT log_Stat
int log_default_input_for_archive_log_location = 0

Public Static Attributes

Type Name
ARV_LOG_PAGE_INFO_TABLE logpb_Arv_page_info_table
bool logpb_Initialized = [**false**](broker__monitor_8c.md#function-timeout)
bool logpb_Logging = [**false**](broker__monitor_8c.md#function-timeout)

Public Functions

Type Name
REGISTER_WORKERPOOL (backup_read, () { return cubthread::system_core_count();})
VOLID logpb_add_volume (const char * db_fullname, VOLID new_volid, const char * new_volfullname, DISK_VOLPURPOSE new_volpurpose)
int logpb_background_archiving (THREAD_ENTRY * thread_p)
int logpb_backup (THREAD_ENTRY * thread_p, int num_perm_vols, const char * allbackup_path, FILEIO_BACKUP_LEVEL backup_level, bool delete_unneeded_logarchives, const char * backup_verbose_file_path, int num_threads, FILEIO_ZIP_METHOD zip_method, FILEIO_ZIP_LEVEL zip_level, int skip_activelog, int sleep_msecs, bool separate_keys)
char * logpb_backup_level_info_to_string (char * buf, int buf_size, const LOG_HDR_BKUP_LEVEL_INFO * info)
int logpb_check_and_reset_temp_lsa (THREAD_ENTRY * thread_p, VOLID volid)
int logpb_check_exist_any_volumes (THREAD_ENTRY * thread_p, const char * db_fullname, const char * logpath, const char * prefix_logname, char * first_vol, bool * is_exist)
LOG_PAGEID logpb_checkpoint (THREAD_ENTRY * thread_p)
int logpb_checkpoint_topops (THREAD_ENTRY * thread_p, LOG_INFO_CHKPT_SYSOP *& chkpt_topops, LOG_INFO_CHKPT_TRANS * chkpt_trans, LOG_REC_CHKPT & tmp_chkpt, log_tdes * tdes, int & ntops, size_t & length_all_tops)
void logpb_checkpoint_trans (LOG_INFO_CHKPT_TRANS * chkpt_entries, log_tdes * tdes, int & ntrans, int & ntops, LOG_LSA & smallest_lsa)
int logpb_copy_database (THREAD_ENTRY * thread_p, VOLID num_perm_vols, const char * to_db_fullname, const char * to_logpath, const char * to_prefix_logname, const char * toext_path, const char * fileof_vols_and_copypaths)
void logpb_copy_from_log (THREAD_ENTRY * thread_p, char * area, int length, LOG_LSA * log_lsa, LOG_PAGE * log_page_p)
int logpb_copy_page_from_file (THREAD_ENTRY * thread_p, LOG_PAGEID pageid, LOG_PAGE * log_pgptr)
int logpb_copy_page_from_log_buffer (THREAD_ENTRY * thread_p, LOG_PAGEID pageid, LOG_PAGE * log_pgptr)
void logpb_create_backup_read_worker_pool (size_t thread_count)
LOG_PAGE * logpb_create_header_page (THREAD_ENTRY * thread_p)
void logpb_create_log_info (const char * logname_info, const char * db_fullname)
LOG_PAGE * logpb_create_page (THREAD_ENTRY * thread_p, LOG_PAGEID pageid)
int logpb_create_volume_info (const char * db_fullname)
void logpb_debug_check_log_page (THREAD_ENTRY * thread_p, void * log_pgptr_ptr)
void logpb_decache_archive_info (THREAD_ENTRY * thread_p)
int logpb_delete (THREAD_ENTRY * thread_p, VOLID num_perm_vols, const char * db_fullname, const char * logpath, const char * prefix_logname, bool force_delete)
void logpb_destroy_backup_read_worker_pool ()
void logpb_dump (THREAD_ENTRY * thread_p, FILE * out_fp)
void logpb_dump_checkpoint_trans (FILE * out_fp, int length, void * data)
void logpb_dump_log_page_area (THREAD_ENTRY * thread_p, LOG_PAGE * log_pgptr, int offset, int length)
bool logpb_exist_log (THREAD_ENTRY * thread_p, const char * db_fullname, const char * logpath, const char * prefix_logname)
void logpb_fatal_error (THREAD_ENTRY * thread_p, bool log_exit, const char * file_name, const int lineno, const char * fmt, ...)
void logpb_fatal_error_exit_immediately_wo_flush (THREAD_ENTRY * thread_p, const char * file_name, const int lineno, const char * fmt, ...)
LOG_PAGE * logpb_fetch_from_archive (THREAD_ENTRY * thread_p, LOG_PAGEID pageid, LOG_PAGE * log_pgptr, int * ret_arv_num, LOG_ARV_HEADER * ret_arv_hdr, bool is_fatal)
void logpb_fetch_header (THREAD_ENTRY * thread_p, LOG_HEADER * hdr)
int logpb_fetch_header_from_active_log (THREAD_ENTRY * thread_p, const char * db_fullname, const char * logpath, const char * prefix_logname, LOG_HEADER * hdr, LOG_PAGE * log_pgptr)
void logpb_fetch_header_with_buffer (THREAD_ENTRY * thread_p, LOG_HEADER * hdr, LOG_PAGE * log_pgptr)
int logpb_fetch_page (THREAD_ENTRY * thread_p, const LOG_LSA * req_lsa, LOG_CS_ACCESS_MODE access_mode, LOG_PAGE * log_pgptr)
int logpb_fetch_start_append_page (THREAD_ENTRY * thread_p)
LOG_PAGE * logpb_fetch_start_append_page_new (THREAD_ENTRY * thread_p)
void logpb_finalize_pool (THREAD_ENTRY * thread_p)
PGLENGTH logpb_find_header_parameters (THREAD_ENTRY * thread_p, const bool force_read_log_header, const char * db_fullname, const char * logpath, const char * prefix_logname, PGLENGTH * io_page_size, PGLENGTH * log_page_size, INT64 * creation_time, float * db_compatibility, int * db_charset)
int logpb_find_oldest_available_arv_num (THREAD_ENTRY * thread_p)
LOG_PAGEID logpb_find_oldest_available_page_id (THREAD_ENTRY * thread_p)
bool logpb_find_volume_info_exist (void)
void logpb_flush_header (THREAD_ENTRY * thread_p)
void logpb_flush_log_for_wal (THREAD_ENTRY * thread_p, const LOG_LSA * lsa_ptr)
int logpb_flush_page (THREAD_ENTRY * thread_p, LOG_PAGE * log_pgptr)
void logpb_flush_pages (THREAD_ENTRY * thread_p, LOG_LSA * flush_lsa)
void logpb_flush_pages_direct (THREAD_ENTRY * thread_p)
void logpb_force_flush_header_and_pages (THREAD_ENTRY * thread_p)
void logpb_force_flush_pages (THREAD_ENTRY * thread_p)
int logpb_get_archive_number (THREAD_ENTRY * thread_p, LOG_PAGEID pageid)
size_t logpb_get_memsize ()
LOG_PAGEID logpb_get_page_id (LOG_PAGE * log_pgptr)
TDE_ALGORITHM logpb_get_tde_algorithm (const LOG_PAGE * log_pgptr)
void logpb_initialize_arv_page_info_table (void)
int logpb_initialize_header (THREAD_ENTRY * thread_p, LOG_HEADER * loghdr, const char * prefix_logname, DKNPAGES npages, INT64 * db_creation)
int logpb_initialize_log_names (THREAD_ENTRY * thread_p, const char * db_fullname, const char * logpath, const char * prefix_logname)
void logpb_initialize_logging_statistics (void)
int logpb_initialize_pool (THREAD_ENTRY * thread_p)
void logpb_invalid_all_append_pages (THREAD_ENTRY * thread_p)
void logpb_invalidate_pool (THREAD_ENTRY * thread_p)
bool logpb_is_page_in_archive (LOG_PAGEID pageid)
bool logpb_is_pool_initialized (void)
bool logpb_is_smallest_lsa_in_archive (THREAD_ENTRY * thread_p)
VACUUM_LOG_BLOCKID logpb_last_complete_blockid (void)
bool logpb_need_wal (const LOG_LSA * lsa)
int logpb_page_check_corruption (THREAD_ENTRY * thread_p, LOG_PAGE * log_pgptr, bool * is_page_corrupted)
void logpb_page_get_first_null_block_lsa (THREAD_ENTRY * thread_p, LOG_PAGE * log_pgptr, LOG_LSA * first_null_block_lsa)
int logpb_prior_lsa_append_all_list (THREAD_ENTRY * thread_p)
void logpb_push_backup_read_task (cubthread::entry_task * task)
int logpb_read_page_from_active_log (THREAD_ENTRY * thread_p, LOG_PAGEID pageid, int num_pages, bool decrypt_needed, LOG_PAGE * log_pgptr)
int logpb_read_page_from_file (THREAD_ENTRY * thread_p, LOG_PAGEID pageid, LOG_CS_ACCESS_MODE access_mode, LOG_PAGE * log_pgptr)
int logpb_recreate_volume_info (THREAD_ENTRY * thread_p)
int logpb_remove_all_in_log_path (THREAD_ENTRY * thread_p, const char * db_fullname, const char * logpath, const char * prefix_logname)
void logpb_remove_archive_logs (THREAD_ENTRY * thread_p, const char * info_reason)
int logpb_remove_archive_logs_exceed_limit (THREAD_ENTRY * thread_p, int max_count)
int logpb_rename_all_volumes_files (THREAD_ENTRY * thread_p, VOLID num_perm_vols, const char * to_db_fullname, const char * to_logpath, const char * to_prefix_logname, const char * toext_path, const char * fileof_vols_and_renamepaths, bool extern_rename, bool force_delete)
int logpb_restore (THREAD_ENTRY * thread_p, const char * db_fullname, const char * logpath, const char * prefix_logname, bo_restart_arg * r_args)
int logpb_scan_volume_info (THREAD_ENTRY * thread_p, const char * db_fullname, VOLID ignore_volid, VOLID start_volid, int(*)(THREAD_ENTRY *thread_p, VOLID xvolid, const char *vlabel, void *args) fun, void * args)
void logpb_set_dirty (THREAD_ENTRY * thread_p, LOG_PAGE * log_pgptr)
int logpb_set_page_checksum (THREAD_ENTRY * thread_p, LOG_PAGE * log_pgptr)
void logpb_set_tde_algorithm (THREAD_ENTRY * thread_p, LOG_PAGE * log_pgptr, const TDE_ALGORITHM tde_algo)
LOG_PHY_PAGEID logpb_to_physical_pageid (LOG_PAGEID logical_pageid)
void logpb_vacuum_reset_log_header_cache (THREAD_ENTRY * thread_p, LOG_HEADER * loghdr)
int logpb_write_page_to_disk (THREAD_ENTRY * thread_p, LOG_PAGE * log_pgptr, LOG_PAGEID logical_pageid)
void xlogpb_dump_stat (FILE * outfp)

Public Static Functions

Type Name
int logpb_add_archive_page_info (THREAD_ENTRY * thread_p, int arv_num, LOG_PAGEID start_page, LOG_PAGEID end_page)
void logpb_append_archives_removed_to_log_info (int first, int last, const char * info_reason)
void logpb_append_crumbs (THREAD_ENTRY * thread_p, int num_crumbs, const LOG_CRUMB * crumbs)
void logpb_append_data (THREAD_ENTRY * thread_p, int length, const char * data)
int logpb_append_next_record (THREAD_ENTRY * thread_p, LOG_PRIOR_NODE * ndoe)
int logpb_append_prior_lsa_list (THREAD_ENTRY * thread_p, LOG_PRIOR_NODE * list)
void logpb_archive_active_log (THREAD_ENTRY * thread_p)
int logpb_backup_for_volume (THREAD_ENTRY * thread_p, VOLID volid, LOG_LSA * chkpt_lsa, FILEIO_BACKUP_SESSION * session, bool only_updated)
int logpb_backup_needed_archive_logs (THREAD_ENTRY * thread_p, FILEIO_BACKUP_SESSION * session, int first_arv_num, int last_arv_num)
bool logpb_check_if_exists (const char * fname, char * first_vol)
int logpb_check_stop_at_time (FILEIO_BACKUP_SESSION * session, time_t stop_at, time_t backup_time)
int logpb_compute_page_checksum (THREAD_ENTRY * thread_p, LOG_PAGE * log_pgptr, int * checksum_crc32)
int logpb_copy_log_header (THREAD_ENTRY * thread_p, LOG_HEADER * to_hdr, const LOG_HEADER * from_hdr)
int logpb_copy_page (THREAD_ENTRY * thread_p, LOG_PAGEID pageid, LOG_CS_ACCESS_MODE access_mode, LOG_PAGE * log_pgptr)
int logpb_copy_volume (THREAD_ENTRY * thread_p, VOLID from_volid, const char * tonew_volname, INT64 * db_creation, LOG_LSA * vol_chkpt_lsa)
void logpb_dismount_log_archive (THREAD_ENTRY * thread_p)
void logpb_dump_information (FILE * out_fp)
void logpb_dump_log_header (FILE * outfp)
void logpb_dump_pages (FILE * out_fp)
void logpb_dump_parameter (FILE * outfp)
void logpb_dump_runtime (FILE * outfp)
void logpb_dump_to_flush_page (FILE * out_fp)
void logpb_end_append (THREAD_ENTRY * thread_p, LOG_RECORD_HEADER * header)
void logpb_fatal_error_internal (THREAD_ENTRY * thread_p, bool log_exit, bool need_flush, const char * file_name, const int lineno, const char * fmt, va_list ap)
void logpb_finalize_flush_info (void)
void logpb_finalize_writer_info (void)
int logpb_flush_all_append_pages (THREAD_ENTRY * thread_p)
int logpb_get_archive_num_from_info_table (THREAD_ENTRY * thread_p, LOG_PAGEID page_id)
int logpb_get_guess_archive_num (THREAD_ENTRY * thread_p, LOG_PAGEID pageid)
LOG_BUFFER * logpb_get_log_buffer (LOG_PAGE * log_pg)
int logpb_get_log_buffer_index (LOG_PAGEID log_pageid)
void logpb_initialize_backup_info (LOG_HEADER * loghdr)
int logpb_initialize_flush_info (void)
void logpb_initialize_log_buffer (LOG_BUFFER * log_buffer_p, LOG_PAGE * log_pg)
bool logpb_is_any_dirty (THREAD_ENTRY * thread_p)
bool logpb_is_any_fix (THREAD_ENTRY * thread_p)
bool logpb_is_archive_available (THREAD_ENTRY * thread_p, int arv_num)
bool logpb_is_dirty (THREAD_ENTRY * thread_p, LOG_PAGE * log_pgptr)
bool logpb_is_log_active_from_backup_useful (THREAD_ENTRY * thread_p, const char * active_log_path, const char * db_full_name)
LOG_PAGE * logpb_locate_page (THREAD_ENTRY * thread_p, LOG_PAGEID pageid, PAGE_FETCH_MODE fetch_mode)
void logpb_next_append_page (THREAD_ENTRY * thread_p, LOG_SETDIRTY current_setdirty)
int logpb_next_where_path (const char * to_db_fullname, const char * toext_path, const char * ext_name, char * ext_path, const char * fileof_vols_and_wherepaths, FILE * where_paths_fp, int num_perm_vols, VOLID volid, char * from_volname, char * to_volname)
int logpb_page_has_valid_checksum (THREAD_ENTRY * thread_p, LOG_PAGE * log_pgptr, bool * has_valid_checksum)
int logpb_peek_header_of_active_log_from_backup (THREAD_ENTRY * thread_p, const char * active_log_path, LOG_HEADER * hdr)
bool logpb_remote_ask_user_before_delete_volumes (THREAD_ENTRY * thread_p, const char * volpath)
int logpb_remove_archive_logs_internal (THREAD_ENTRY * thread_p, int first, int last, const char * info_reason)
void logpb_set_unavailable_archive (THREAD_ENTRY * thread_p, int arv_num)
void logpb_start_append (THREAD_ENTRY * thread_p, LOG_RECORD_HEADER * header)
int logpb_start_where_path (const char * to_db_fullname, const char * toext_path, const char ** toext_name, char ** ext_path, char ** alloc_extpath, const char * fileof_vols_and_wherepaths, FILE ** where_paths_fp)
int logpb_update_backup_volume_info (const char * bkupinfo_file_name)
int logpb_verify_length (const char * db_fullname, const char * log_path, const char * log_prefix)
void logpb_write_toflush_pages_to_archive (THREAD_ENTRY * thread_p)
LOG_PAGE ** logpb_writev_append_pages (THREAD_ENTRY * thread_p, LOG_PAGE ** to_flush, DKNPAGES npages)
LOG_PRIOR_NODE * prior_lsa_remove_prior_list (THREAD_ENTRY * thread_p)

Macros

Type Name
define ARV_PAGE_INFO_TABLE_SIZE 256
define LOGPB_ACTIVE_NPAGES (log\_Gl.hdr.npages)
define LOGPB_AT_NEXT_ARCHIVE_PAGE_ID (pageid) ([**logpb\_to\_physical\_pageid**](log__impl_8h.md#function-logpb_to_physical_pageid)(pageid) == log\_Gl.hdr.nxarv\_phy\_pageid)
define LOGPB_FIND_BUFPTR (bufid) &log\_Pb.buffers[([**bufid**](broker__monitor_8c.md#function-timeout))]
define LOGPB_FIRST_ACTIVE_PAGE_ID (log\_Gl.hdr.fpageid)
define LOGPB_HEADER_PAGE_ID /* multi line expression */
define LOGPB_IS_ARCHIVE_PAGE (pageid) ((pageid) != [**LOGPB\_HEADER\_PAGE\_ID**](log__page__buffer_8c.md#define-logpb_header_page_id) && (pageid) &lt; [**LOGPB\_NEXT\_ARCHIVE\_PAGE\_ID**](log__page__buffer_8c.md#define-logpb_next_archive_page_id))
define LOGPB_IS_FIRST_PHYSICAL_PAGE (pageid) ([**logpb\_to\_physical\_pageid**](log__impl_8h.md#function-logpb_to_physical_pageid)(pageid) == 1)
define LOGPB_LAST_ACTIVE_PAGE_ID (log\_Gl.hdr.nxarv\_pageid + log\_Gl.hdr.npages - 1)
define LOGPB_NEXT_ARCHIVE_PAGE_ID (log\_Gl.hdr.nxarv\_pageid)
define LOGPB_PHYSICAL_HEADER_PAGE_ID 0
define LOG_APPEND_ADVANCE_WHEN_DOESNOT_FIT (thread_p, length) /* multi line expression */
define LOG_APPEND_ALIGN (thread_p, current_setdirty) /* multi line expression */
define LOG_APPEND_SETDIRTY_ADD_ALIGN (thread_p, add) /* multi line expression */
define LOG_LAST_APPEND_PTR () (([**char**](broker__monitor_8c.md#function-timeout) \*) log\_Gl.append.log\_pgptr-&gt;[**area**](structarea.md) + [**LOGAREA\_SIZE**](log__impl_8h.md#define-logarea_size))
define LOG_MAX_LOGINFO_LINE ([**PATH\_MAX**](broker__monitor_8c.md#function-timeout) \* 4)
define detailed_er_log (...) [**if**](dynamic__load_8c.md#function-if) ([**detailed\_logging**](broker__monitor_8c.md#function-timeout)) [**\_er\_log\_debug**](error__manager_8c.md#function-_er_log_debug) ([**ARG\_FILE\_LINE**](error__manager_8h.md#define-arg_file_line), [**\_\_VA\_ARGS\_\_**](broker__monitor_8c.md#function-timeout))
define log_archive_er_log (...) [**if**](dynamic__load_8c.md#function-if) ([**prm\_get\_bool\_value**](system__parameter_8h.md#function-prm_get_bool_value) (PRM\_ID\_DEBUG\_LOG\_ARCHIVES)) [**\_er\_log\_debug**](error__manager_8c.md#function-_er_log_debug) ([**ARG\_FILE\_LINE**](error__manager_8h.md#define-arg_file_line), [**\_\_VA\_ARGS\_\_**](broker__monitor_8c.md#function-timeout))
define logpb_log (...) [**if**](dynamic__load_8c.md#function-if) ([**logpb\_Logging**](log__page__buffer_8c.md#variable-logpb_logging)) [**\_er\_log\_debug**](error__manager_8c.md#function-_er_log_debug) ([**ARG\_FILE\_LINE**](error__manager_8h.md#define-arg_file_line), "LOGPB: " \_\_VA\_ARGS\_\_)

Public Types Documentation

typedef ARV_PAGE_INFO

typedef struct arv_page_info ARV_PAGE_INFO;

enum LOGPB_APPENDREC_STATUS

enum LOGPB_APPENDREC_STATUS {
    LOGPB_APPENDREC_IN_PROGRESS,
    LOGPB_APPENDREC_PARTIAL_FLUSHED_END_OF_LOG,
    LOGPB_APPENDREC_PARTIAL_ENDED,
    LOGPB_APPENDREC_PARTIAL_FLUSHED_ORIGINAL,
    LOGPB_APPENDREC_SUCCESS
};

typedef LOGPB_PARTIAL_APPEND

typedef struct logpb_partial_append LOGPB_PARTIAL_APPEND;

typedef LOG_BUFFER

typedef struct log_buffer LOG_BUFFER;

typedef LOG_PB_GLOBAL_DATA

typedef struct log_pb_global_data LOG_PB_GLOBAL_DATA;

Public Attributes Documentation

variable g_backup_read_worker_pool

cubthread::worker_pool_type* g_backup_read_worker_pool;

variable log_Pb

LOG_PB_GLOBAL_DATA log_Pb;

variable log_Stat

LOG_LOGGING_STAT log_Stat;

variable log_default_input_for_archive_log_location

int log_default_input_for_archive_log_location;

Public Static Attributes Documentation

variable logpb_Arv_page_info_table

ARV_LOG_PAGE_INFO_TABLE logpb_Arv_page_info_table;

variable logpb_Initialized

bool logpb_Initialized;

variable logpb_Logging

bool logpb_Logging;

Public Functions Documentation

function REGISTER_WORKERPOOL

REGISTER_WORKERPOOL (
    backup_read,
    () { return  cubthread::system_core_count ();}
) 

function logpb_add_volume

VOLID logpb_add_volume (
    const  char * db_fullname,
    VOLID new_volid,
    const  char * new_volfullname,
    DISK_VOLPURPOSE new_volpurpose
) 

function logpb_background_archiving

int logpb_background_archiving (
    THREAD_ENTRY * thread_p
) 

function logpb_backup

int logpb_backup (
    THREAD_ENTRY * thread_p,
    int num_perm_vols,
    const  char * allbackup_path,
    FILEIO_BACKUP_LEVEL backup_level,
    bool delete_unneeded_logarchives,
    const  char * backup_verbose_file_path,
    int num_threads,
    FILEIO_ZIP_METHOD zip_method,
    FILEIO_ZIP_LEVEL zip_level,
    int skip_activelog,
    int sleep_msecs,
    bool separate_keys
) 

function logpb_backup_level_info_to_string

char * logpb_backup_level_info_to_string (
    char * buf,
    int buf_size,
    const  LOG_HDR_BKUP_LEVEL_INFO * info
) 

function logpb_check_and_reset_temp_lsa

int logpb_check_and_reset_temp_lsa (
    THREAD_ENTRY * thread_p,
    VOLID volid
) 

function logpb_check_exist_any_volumes

int logpb_check_exist_any_volumes (
    THREAD_ENTRY * thread_p,
    const  char * db_fullname,
    const  char * logpath,
    const  char * prefix_logname,
    char * first_vol,
    bool * is_exist
) 

function logpb_checkpoint

LOG_PAGEID logpb_checkpoint (
    THREAD_ENTRY * thread_p
) 

function logpb_checkpoint_topops

int logpb_checkpoint_topops (
    THREAD_ENTRY * thread_p,
    LOG_INFO_CHKPT_SYSOP *& chkpt_topops,
    LOG_INFO_CHKPT_TRANS * chkpt_trans,
    LOG_REC_CHKPT & tmp_chkpt,
    log_tdes * tdes,
    int & ntops,
    size_t & length_all_tops
) 

function logpb_checkpoint_trans

void logpb_checkpoint_trans (
    LOG_INFO_CHKPT_TRANS * chkpt_entries,
    log_tdes * tdes,
    int & ntrans,
    int & ntops,
    LOG_LSA & smallest_lsa
) 

function logpb_copy_database

int logpb_copy_database (
    THREAD_ENTRY * thread_p,
    VOLID num_perm_vols,
    const  char * to_db_fullname,
    const  char * to_logpath,
    const  char * to_prefix_logname,
    const  char * toext_path,
    const  char * fileof_vols_and_copypaths
) 

function logpb_copy_from_log

void logpb_copy_from_log (
    THREAD_ENTRY * thread_p,
    char * area,
    int length,
    LOG_LSA * log_lsa,
    LOG_PAGE * log_page_p
) 

function logpb_copy_page_from_file

int logpb_copy_page_from_file (
    THREAD_ENTRY * thread_p,
    LOG_PAGEID pageid,
    LOG_PAGE * log_pgptr
) 

function logpb_copy_page_from_log_buffer

int logpb_copy_page_from_log_buffer (
    THREAD_ENTRY * thread_p,
    LOG_PAGEID pageid,
    LOG_PAGE * log_pgptr
) 

function logpb_create_backup_read_worker_pool

void logpb_create_backup_read_worker_pool (
    size_t thread_count
) 

function logpb_create_header_page

LOG_PAGE * logpb_create_header_page (
    THREAD_ENTRY * thread_p
) 

function logpb_create_log_info

void logpb_create_log_info (
    const  char * logname_info,
    const  char * db_fullname
) 

function logpb_create_page

LOG_PAGE * logpb_create_page (
    THREAD_ENTRY * thread_p,
    LOG_PAGEID pageid
) 

function logpb_create_volume_info

int logpb_create_volume_info (
    const  char * db_fullname
) 

function logpb_debug_check_log_page

void logpb_debug_check_log_page (
    THREAD_ENTRY * thread_p,
    void * log_pgptr_ptr
) 

function logpb_decache_archive_info

void logpb_decache_archive_info (
    THREAD_ENTRY * thread_p
) 

function logpb_delete

int logpb_delete (
    THREAD_ENTRY * thread_p,
    VOLID num_perm_vols,
    const  char * db_fullname,
    const  char * logpath,
    const  char * prefix_logname,
    bool force_delete
) 

function logpb_destroy_backup_read_worker_pool

void logpb_destroy_backup_read_worker_pool () 

function logpb_dump

void logpb_dump (
    THREAD_ENTRY * thread_p,
    FILE * out_fp
) 

function logpb_dump_checkpoint_trans

void logpb_dump_checkpoint_trans (
    FILE * out_fp,
    int length,
    void * data
) 

function logpb_dump_log_page_area

void logpb_dump_log_page_area (
    THREAD_ENTRY * thread_p,
    LOG_PAGE * log_pgptr,
    int offset,
    int length
) 

function logpb_exist_log

bool logpb_exist_log (
    THREAD_ENTRY * thread_p,
    const  char * db_fullname,
    const  char * logpath,
    const  char * prefix_logname
) 

function logpb_fatal_error

void logpb_fatal_error (
    THREAD_ENTRY * thread_p,
    bool log_exit,
    const  char * file_name,
    const  int lineno,
    const  char * fmt,
    ...
) 

function logpb_fatal_error_exit_immediately_wo_flush

void logpb_fatal_error_exit_immediately_wo_flush (
    THREAD_ENTRY * thread_p,
    const  char * file_name,
    const  int lineno,
    const  char * fmt,
    ...
) 

function logpb_fetch_from_archive

LOG_PAGE * logpb_fetch_from_archive (
    THREAD_ENTRY * thread_p,
    LOG_PAGEID pageid,
    LOG_PAGE * log_pgptr,
    int * ret_arv_num,
    LOG_ARV_HEADER * ret_arv_hdr,
    bool is_fatal
) 

function logpb_fetch_header

void logpb_fetch_header (
    THREAD_ENTRY * thread_p,
    LOG_HEADER * hdr
) 

function logpb_fetch_header_from_active_log

int logpb_fetch_header_from_active_log (
    THREAD_ENTRY * thread_p,
    const  char * db_fullname,
    const  char * logpath,
    const  char * prefix_logname,
    LOG_HEADER * hdr,
    LOG_PAGE * log_pgptr
) 

function logpb_fetch_header_with_buffer

void logpb_fetch_header_with_buffer (
    THREAD_ENTRY * thread_p,
    LOG_HEADER * hdr,
    LOG_PAGE * log_pgptr
) 

function logpb_fetch_page

int logpb_fetch_page (
    THREAD_ENTRY * thread_p,
    const  LOG_LSA * req_lsa,
    LOG_CS_ACCESS_MODE access_mode,
    LOG_PAGE * log_pgptr
) 

function logpb_fetch_start_append_page

int logpb_fetch_start_append_page (
    THREAD_ENTRY * thread_p
) 

function logpb_fetch_start_append_page_new

LOG_PAGE * logpb_fetch_start_append_page_new (
    THREAD_ENTRY * thread_p
) 

function logpb_finalize_pool

void logpb_finalize_pool (
    THREAD_ENTRY * thread_p
) 

function logpb_find_header_parameters

PGLENGTH logpb_find_header_parameters (
    THREAD_ENTRY * thread_p,
    const  bool force_read_log_header,
    const  char * db_fullname,
    const  char * logpath,
    const  char * prefix_logname,
    PGLENGTH * io_page_size,
    PGLENGTH * log_page_size,
    INT64 * creation_time,
    float * db_compatibility,
    int * db_charset
) 

function logpb_find_oldest_available_arv_num

int logpb_find_oldest_available_arv_num (
    THREAD_ENTRY * thread_p
) 

function logpb_find_oldest_available_page_id

LOG_PAGEID logpb_find_oldest_available_page_id (
    THREAD_ENTRY * thread_p
) 

function logpb_find_volume_info_exist

bool logpb_find_volume_info_exist (
    void
) 

function logpb_flush_header

void logpb_flush_header (
    THREAD_ENTRY * thread_p
) 

function logpb_flush_log_for_wal

void logpb_flush_log_for_wal (
    THREAD_ENTRY * thread_p,
    const  LOG_LSA * lsa_ptr
) 

function logpb_flush_page

int logpb_flush_page (
    THREAD_ENTRY * thread_p,
    LOG_PAGE * log_pgptr
) 

function logpb_flush_pages

void logpb_flush_pages (
    THREAD_ENTRY * thread_p,
    LOG_LSA * flush_lsa
) 

function logpb_flush_pages_direct

void logpb_flush_pages_direct (
    THREAD_ENTRY * thread_p
) 

function logpb_force_flush_header_and_pages

void logpb_force_flush_header_and_pages (
    THREAD_ENTRY * thread_p
) 

function logpb_force_flush_pages

void logpb_force_flush_pages (
    THREAD_ENTRY * thread_p
) 

function logpb_get_archive_number

int logpb_get_archive_number (
    THREAD_ENTRY * thread_p,
    LOG_PAGEID pageid
) 

function logpb_get_memsize

size_t logpb_get_memsize () 

function logpb_get_page_id

LOG_PAGEID logpb_get_page_id (
    LOG_PAGE * log_pgptr
) 

function logpb_get_tde_algorithm

TDE_ALGORITHM logpb_get_tde_algorithm (
    const  LOG_PAGE * log_pgptr
) 

function logpb_initialize_arv_page_info_table

void logpb_initialize_arv_page_info_table (
    void
) 

function logpb_initialize_header

int logpb_initialize_header (
    THREAD_ENTRY * thread_p,
    LOG_HEADER * loghdr,
    const  char * prefix_logname,
    DKNPAGES npages,
    INT64 * db_creation
) 

function logpb_initialize_log_names

int logpb_initialize_log_names (
    THREAD_ENTRY * thread_p,
    const  char * db_fullname,
    const  char * logpath,
    const  char * prefix_logname
) 

function logpb_initialize_logging_statistics

void logpb_initialize_logging_statistics (
    void
) 

function logpb_initialize_pool

int logpb_initialize_pool (
    THREAD_ENTRY * thread_p
) 

function logpb_invalid_all_append_pages

void logpb_invalid_all_append_pages (
    THREAD_ENTRY * thread_p
) 

function logpb_invalidate_pool

void logpb_invalidate_pool (
    THREAD_ENTRY * thread_p
) 

function logpb_is_page_in_archive

bool logpb_is_page_in_archive (
    LOG_PAGEID pageid
) 

function logpb_is_pool_initialized

bool logpb_is_pool_initialized (
    void
) 

function logpb_is_smallest_lsa_in_archive

bool logpb_is_smallest_lsa_in_archive (
    THREAD_ENTRY * thread_p
) 

function logpb_last_complete_blockid

VACUUM_LOG_BLOCKID logpb_last_complete_blockid (
    void
) 

function logpb_need_wal

bool logpb_need_wal (
    const  LOG_LSA * lsa
) 

function logpb_page_check_corruption

int logpb_page_check_corruption (
    THREAD_ENTRY * thread_p,
    LOG_PAGE * log_pgptr,
    bool * is_page_corrupted
) 

function logpb_page_get_first_null_block_lsa

void logpb_page_get_first_null_block_lsa (
    THREAD_ENTRY * thread_p,
    LOG_PAGE * log_pgptr,
    LOG_LSA * first_null_block_lsa
) 

function logpb_prior_lsa_append_all_list

int logpb_prior_lsa_append_all_list (
    THREAD_ENTRY * thread_p
) 

function logpb_push_backup_read_task

void logpb_push_backup_read_task (
    cubthread::entry_task * task
) 

function logpb_read_page_from_active_log

int logpb_read_page_from_active_log (
    THREAD_ENTRY * thread_p,
    LOG_PAGEID pageid,
    int num_pages,
    bool decrypt_needed,
    LOG_PAGE * log_pgptr
) 

function logpb_read_page_from_file

int logpb_read_page_from_file (
    THREAD_ENTRY * thread_p,
    LOG_PAGEID pageid,
    LOG_CS_ACCESS_MODE access_mode,
    LOG_PAGE * log_pgptr
) 

function logpb_recreate_volume_info

int logpb_recreate_volume_info (
    THREAD_ENTRY * thread_p
) 

function logpb_remove_all_in_log_path

int logpb_remove_all_in_log_path (
    THREAD_ENTRY * thread_p,
    const  char * db_fullname,
    const  char * logpath,
    const  char * prefix_logname
) 

function logpb_remove_archive_logs

void logpb_remove_archive_logs (
    THREAD_ENTRY * thread_p,
    const  char * info_reason
) 

function logpb_remove_archive_logs_exceed_limit

int logpb_remove_archive_logs_exceed_limit (
    THREAD_ENTRY * thread_p,
    int max_count
) 

function logpb_rename_all_volumes_files

int logpb_rename_all_volumes_files (
    THREAD_ENTRY * thread_p,
    VOLID num_perm_vols,
    const  char * to_db_fullname,
    const  char * to_logpath,
    const  char * to_prefix_logname,
    const  char * toext_path,
    const  char * fileof_vols_and_renamepaths,
    bool extern_rename,
    bool force_delete
) 

function logpb_restore

int logpb_restore (
    THREAD_ENTRY * thread_p,
    const  char * db_fullname,
    const  char * logpath,
    const  char * prefix_logname,
    bo_restart_arg * r_args
) 

function logpb_scan_volume_info

int logpb_scan_volume_info (
    THREAD_ENTRY * thread_p,
    const  char * db_fullname,
    VOLID ignore_volid,
    VOLID start_volid,
    int (*)( THREAD_ENTRY *thread_p, VOLID  xvolid , const  char *vlabel, void *args) fun,
    void * args
) 

function logpb_set_dirty

void logpb_set_dirty (
    THREAD_ENTRY * thread_p,
    LOG_PAGE * log_pgptr
) 

function logpb_set_page_checksum

int logpb_set_page_checksum (
    THREAD_ENTRY * thread_p,
    LOG_PAGE * log_pgptr
) 

function logpb_set_tde_algorithm

void logpb_set_tde_algorithm (
    THREAD_ENTRY * thread_p,
    LOG_PAGE * log_pgptr,
    const  TDE_ALGORITHM tde_algo
) 

function logpb_to_physical_pageid

LOG_PHY_PAGEID logpb_to_physical_pageid (
    LOG_PAGEID logical_pageid
) 

function logpb_vacuum_reset_log_header_cache

void logpb_vacuum_reset_log_header_cache (
    THREAD_ENTRY * thread_p,
    LOG_HEADER * loghdr
) 

function logpb_write_page_to_disk

int logpb_write_page_to_disk (
    THREAD_ENTRY * thread_p,
    LOG_PAGE * log_pgptr,
    LOG_PAGEID logical_pageid
) 

function xlogpb_dump_stat

void xlogpb_dump_stat (
    FILE * outfp
) 

Public Static Functions Documentation

function logpb_add_archive_page_info

static int logpb_add_archive_page_info (
    THREAD_ENTRY * thread_p,
    int arv_num,
    LOG_PAGEID start_page,
    LOG_PAGEID end_page
) 

function logpb_append_archives_removed_to_log_info

static void logpb_append_archives_removed_to_log_info (
    int first,
    int last,
    const  char * info_reason
) 

function logpb_append_crumbs

static void logpb_append_crumbs (
    THREAD_ENTRY * thread_p,
    int num_crumbs,
    const  LOG_CRUMB * crumbs
) 

function logpb_append_data

static void logpb_append_data (
    THREAD_ENTRY * thread_p,
    int length,
    const  char * data
) 

function logpb_append_next_record

static int logpb_append_next_record (
    THREAD_ENTRY * thread_p,
    LOG_PRIOR_NODE * ndoe
) 

function logpb_append_prior_lsa_list

static int logpb_append_prior_lsa_list (
    THREAD_ENTRY * thread_p,
    LOG_PRIOR_NODE * list
) 

function logpb_archive_active_log

static void logpb_archive_active_log (
    THREAD_ENTRY * thread_p
) 

function logpb_backup_for_volume

static int logpb_backup_for_volume (
    THREAD_ENTRY * thread_p,
    VOLID volid,
    LOG_LSA * chkpt_lsa,
    FILEIO_BACKUP_SESSION * session,
    bool only_updated
) 

function logpb_backup_needed_archive_logs

static int logpb_backup_needed_archive_logs (
    THREAD_ENTRY * thread_p,
    FILEIO_BACKUP_SESSION * session,
    int first_arv_num,
    int last_arv_num
) 

function logpb_check_if_exists

static bool logpb_check_if_exists (
    const  char * fname,
    char * first_vol
) 

function logpb_check_stop_at_time

static int logpb_check_stop_at_time (
    FILEIO_BACKUP_SESSION * session,
    time_t stop_at,
    time_t backup_time
) 

function logpb_compute_page_checksum

static int logpb_compute_page_checksum (
    THREAD_ENTRY * thread_p,
    LOG_PAGE * log_pgptr,
    int * checksum_crc32
) 

function logpb_copy_log_header

static int logpb_copy_log_header (
    THREAD_ENTRY * thread_p,
    LOG_HEADER * to_hdr,
    const  LOG_HEADER * from_hdr
) 

function logpb_copy_page

static int logpb_copy_page (
    THREAD_ENTRY * thread_p,
    LOG_PAGEID pageid,
    LOG_CS_ACCESS_MODE access_mode,
    LOG_PAGE * log_pgptr
) 

function logpb_copy_volume

static int logpb_copy_volume (
    THREAD_ENTRY * thread_p,
    VOLID from_volid,
    const  char * tonew_volname,
    INT64 * db_creation,
    LOG_LSA * vol_chkpt_lsa
) 

function logpb_dismount_log_archive

static void logpb_dismount_log_archive (
    THREAD_ENTRY * thread_p
) 

function logpb_dump_information

static void logpb_dump_information (
    FILE * out_fp
) 

function logpb_dump_log_header

static void logpb_dump_log_header (
    FILE * outfp
) 

function logpb_dump_pages

static void logpb_dump_pages (
    FILE * out_fp
) 

function logpb_dump_parameter

static void logpb_dump_parameter (
    FILE * outfp
) 

function logpb_dump_runtime

static void logpb_dump_runtime (
    FILE * outfp
) 

function logpb_dump_to_flush_page

static void logpb_dump_to_flush_page (
    FILE * out_fp
) 

function logpb_end_append

static void logpb_end_append (
    THREAD_ENTRY * thread_p,
    LOG_RECORD_HEADER * header
) 

function logpb_fatal_error_internal

static void logpb_fatal_error_internal (
    THREAD_ENTRY * thread_p,
    bool log_exit,
    bool need_flush,
    const  char * file_name,
    const  int lineno,
    const  char * fmt,
    va_list ap
) 

function logpb_finalize_flush_info

static void logpb_finalize_flush_info (
    void
) 

function logpb_finalize_writer_info

static void logpb_finalize_writer_info (
    void
) 

function logpb_flush_all_append_pages

static int logpb_flush_all_append_pages (
    THREAD_ENTRY * thread_p
) 

function logpb_get_archive_num_from_info_table

static int logpb_get_archive_num_from_info_table (
    THREAD_ENTRY * thread_p,
    LOG_PAGEID page_id
) 

function logpb_get_guess_archive_num

static int logpb_get_guess_archive_num (
    THREAD_ENTRY * thread_p,
    LOG_PAGEID pageid
) 

function logpb_get_log_buffer

static LOG_BUFFER * logpb_get_log_buffer (
    LOG_PAGE * log_pg
) 

function logpb_get_log_buffer_index

static int logpb_get_log_buffer_index (
    LOG_PAGEID log_pageid
) 

function logpb_initialize_backup_info

static void logpb_initialize_backup_info (
    LOG_HEADER * loghdr
) 

function logpb_initialize_flush_info

static int logpb_initialize_flush_info (
    void
) 

function logpb_initialize_log_buffer

static void logpb_initialize_log_buffer (
    LOG_BUFFER * log_buffer_p,
    LOG_PAGE * log_pg
) 

function logpb_is_any_dirty

static bool logpb_is_any_dirty (
    THREAD_ENTRY * thread_p
) 

function logpb_is_any_fix

static bool logpb_is_any_fix (
    THREAD_ENTRY * thread_p
) 

function logpb_is_archive_available

static bool logpb_is_archive_available (
    THREAD_ENTRY * thread_p,
    int arv_num
) 

function logpb_is_dirty

static bool logpb_is_dirty (
    THREAD_ENTRY * thread_p,
    LOG_PAGE * log_pgptr
) 

function logpb_is_log_active_from_backup_useful

static bool logpb_is_log_active_from_backup_useful (
    THREAD_ENTRY * thread_p,
    const  char * active_log_path,
    const  char * db_full_name
) 

function logpb_locate_page

static LOG_PAGE * logpb_locate_page (
    THREAD_ENTRY * thread_p,
    LOG_PAGEID pageid,
    PAGE_FETCH_MODE fetch_mode
) 

function logpb_next_append_page

static void logpb_next_append_page (
    THREAD_ENTRY * thread_p,
    LOG_SETDIRTY current_setdirty
) 

function logpb_next_where_path

static int logpb_next_where_path (
    const  char * to_db_fullname,
    const  char * toext_path,
    const  char * ext_name,
    char * ext_path,
    const  char * fileof_vols_and_wherepaths,
    FILE * where_paths_fp,
    int num_perm_vols,
    VOLID volid,
    char * from_volname,
    char * to_volname
) 

function logpb_page_has_valid_checksum

static int logpb_page_has_valid_checksum (
    THREAD_ENTRY * thread_p,
    LOG_PAGE * log_pgptr,
    bool * has_valid_checksum
) 

function logpb_peek_header_of_active_log_from_backup

static int logpb_peek_header_of_active_log_from_backup (
    THREAD_ENTRY * thread_p,
    const  char * active_log_path,
    LOG_HEADER * hdr
) 

function logpb_remote_ask_user_before_delete_volumes

static bool logpb_remote_ask_user_before_delete_volumes (
    THREAD_ENTRY * thread_p,
    const  char * volpath
) 

function logpb_remove_archive_logs_internal

static int logpb_remove_archive_logs_internal (
    THREAD_ENTRY * thread_p,
    int first,
    int last,
    const  char * info_reason
) 

function logpb_set_unavailable_archive

static void logpb_set_unavailable_archive (
    THREAD_ENTRY * thread_p,
    int arv_num
) 

function logpb_start_append

static void logpb_start_append (
    THREAD_ENTRY * thread_p,
    LOG_RECORD_HEADER * header
) 

function logpb_start_where_path

static int logpb_start_where_path (
    const  char * to_db_fullname,
    const  char * toext_path,
    const  char ** toext_name,
    char ** ext_path,
    char ** alloc_extpath,
    const  char * fileof_vols_and_wherepaths,
    FILE ** where_paths_fp
) 

function logpb_update_backup_volume_info

static int logpb_update_backup_volume_info (
    const  char * bkupinfo_file_name
) 

function logpb_verify_length

static int logpb_verify_length (
    const  char * db_fullname,
    const  char * log_path,
    const  char * log_prefix
) 

function logpb_write_toflush_pages_to_archive

static void logpb_write_toflush_pages_to_archive (
    THREAD_ENTRY * thread_p
) 

function logpb_writev_append_pages

static LOG_PAGE ** logpb_writev_append_pages (
    THREAD_ENTRY * thread_p,
    LOG_PAGE ** to_flush,
    DKNPAGES npages
) 

function prior_lsa_remove_prior_list

static LOG_PRIOR_NODE * prior_lsa_remove_prior_list (
    THREAD_ENTRY * thread_p
) 

Macro Definition Documentation

define ARV_PAGE_INFO_TABLE_SIZE

#define ARV_PAGE_INFO_TABLE_SIZE `256`

define LOGPB_ACTIVE_NPAGES

#define LOGPB_ACTIVE_NPAGES `(log_Gl.hdr.npages)`

define LOGPB_AT_NEXT_ARCHIVE_PAGE_ID

#define LOGPB_AT_NEXT_ARCHIVE_PAGE_ID (
    pageid
) `( logpb_to_physical_pageid (pageid) == log_Gl.hdr.nxarv_phy_pageid)`

define LOGPB_FIND_BUFPTR

#define LOGPB_FIND_BUFPTR (
    bufid
) `&log_Pb.buffers[( bufid )]`

define LOGPB_FIRST_ACTIVE_PAGE_ID

#define LOGPB_FIRST_ACTIVE_PAGE_ID `(log_Gl.hdr.fpageid)`

define LOGPB_HEADER_PAGE_ID

#define LOGPB_HEADER_PAGE_ID `(-9)  /* The first log page in the  infinite log sequence. It  is  always  kept * on  the active portion  of  the log. Log  records  are  not  stored  on  this * page. This page is  backed  up in all archive logs */`

define LOGPB_IS_ARCHIVE_PAGE

#define LOGPB_IS_ARCHIVE_PAGE (
    pageid
) `((pageid) != LOGPB_HEADER_PAGE_ID && (pageid) < LOGPB_NEXT_ARCHIVE_PAGE_ID )`

define LOGPB_IS_FIRST_PHYSICAL_PAGE

#define LOGPB_IS_FIRST_PHYSICAL_PAGE (
    pageid
) `( logpb_to_physical_pageid (pageid) == 1)`

define LOGPB_LAST_ACTIVE_PAGE_ID

#define LOGPB_LAST_ACTIVE_PAGE_ID `(log_Gl.hdr.nxarv_pageid + log_Gl.hdr.npages - 1)`

define LOGPB_NEXT_ARCHIVE_PAGE_ID

#define LOGPB_NEXT_ARCHIVE_PAGE_ID `(log_Gl.hdr.nxarv_pageid)`

define LOGPB_PHYSICAL_HEADER_PAGE_ID

#define LOGPB_PHYSICAL_HEADER_PAGE_ID `0`

define LOG_APPEND_ADVANCE_WHEN_DOESNOT_FIT

#define LOG_APPEND_ADVANCE_WHEN_DOESNOT_FIT (
    thread_p,
    length
) `/* multi line expression */`

define LOG_APPEND_ALIGN

#define LOG_APPEND_ALIGN (
    thread_p,
    current_setdirty
) `/* multi line expression */`

define LOG_APPEND_SETDIRTY_ADD_ALIGN

#define LOG_APPEND_SETDIRTY_ADD_ALIGN (
    thread_p,
    add
) `/* multi line expression */`

define LOG_LAST_APPEND_PTR

#define LOG_LAST_APPEND_PTR (

) `(( char *) log_Gl.append.log_pgptr-> area + LOGAREA_SIZE )`

define LOG_MAX_LOGINFO_LINE

#define LOG_MAX_LOGINFO_LINE `( PATH_MAX * 4)`

define detailed_er_log

#define detailed_er_log (
    ...
) `if ( detailed_logging ) _er_log_debug ( ARG_FILE_LINE , __VA_ARGS__ )`

define log_archive_er_log

#define log_archive_er_log (
    ...
) `if ( prm_get_bool_value ( PRM_ID_DEBUG_LOG_ARCHIVES )) _er_log_debug ( ARG_FILE_LINE , __VA_ARGS__ )`

define logpb_log

#define logpb_log (
    ...
) `if ( logpb_Logging ) _er_log_debug ( ARG_FILE_LINE , "LOGPB: " __VA_ARGS__)`


The documentation for this class was generated from the following file cubrid/src/transaction/log_page_buffer.c