Quellcodebibliothek Statistik Leitseite products/Sources/formale Sprachen/C/Postgres/src/include/storage/   (Postgres Database Version 18.4©)  Datei vom 11.4.2026 mit Größe 1 kB image not shown  

Quelle  sync.h

  Sprache: C
 

/*-------------------------------------------------------------------------
 *
 * sync.h
 *   File synchronization management code.
 *
 * Portions Copyright (c) 1996-2025, PostgreSQL Global Development Group
 * Portions Copyright (c) 1994, Regents of the University of California
 *
 * src/include/storage/sync.h
 *
 *-------------------------------------------------------------------------
 */

#ifndef SYNC_H
#define SYNC_H

#include "storage/relfilelocator.h"

/*
 * Type of sync request.  These are used to manage the set of pending
 * requests to call a sync handler's sync or unlink functions at the next
 * checkpoint.
 */

typedef enum SyncRequestType
{
 SYNC_REQUEST,    /* schedule a call of sync function */
 SYNC_UNLINK_REQUEST,  /* schedule a call of unlink function */
 SYNC_FORGET_REQUEST,  /* forget all calls for a tag */
 SYNC_FILTER_REQUEST,  /* forget all calls satisfying match fn */
} SyncRequestType;

/*
 * Which set of functions to use to handle a given request.  The values of
 * the enumerators must match the indexes of the function table in sync.c.
 */

typedef enum SyncRequestHandler
{
 SYNC_HANDLER_MD = 0,
 SYNC_HANDLER_CLOG,
 SYNC_HANDLER_COMMIT_TS,
 SYNC_HANDLER_MULTIXACT_OFFSET,
 SYNC_HANDLER_MULTIXACT_MEMBER,
 SYNC_HANDLER_NONE,
} SyncRequestHandler;

/*
 * A tag identifying a file.  Currently it has the members required for md.c's
 * usage, but sync.c has no knowledge of the internal structure, and it is
 * liable to change as required by future handlers.
 */

typedef struct FileTag
{
 int16  handler;  /* SyncRequestHandler value, saving space */
 int16  forknum;  /* ForkNumber, saving space */
 RelFileLocator rlocator;
 uint64  segno;
} FileTag;

extern void InitSync(void);
extern void SyncPreCheckpoint(void);
extern void SyncPostCheckpoint(void);
extern void ProcessSyncRequests(void);
extern void RememberSyncRequest(const FileTag *ftag, SyncRequestType type);
extern bool RegisterSyncRequest(const FileTag *ftag, SyncRequestType type,
        bool retryOnError);

#endif       /* SYNC_H */

Messung V0.5 in Prozent
C=88 H=99 G=93

¤ Dauer der Verarbeitung: 0.12 Sekunden  (vorverarbeitet am  2026-08-08) ¤

*© Formatika GbR, Deutschland






Wurzel

Suchen

PVS Prover

Isabelle Prover

NIST Cobol Testsuite

Cephes Mathematical Library

Vienna Development Method

Haftungshinweis

Die Informationen auf dieser Webseite wurden nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit, noch Qualität der bereit gestellten Informationen zugesichert.

Bemerkung:

Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.