#include "postgres_fe.h"
#include <sys/stat.h>
#include <sys/time.h>
#include <unistd.h>
#include <signal.h>
#include "getopt_long.h"
#include "access/xlogdefs.h"
Go to the source code of this file.
Defines | |
#define | FSYNC_FILENAME "./pg_test_fsync.out" |
#define | XLOG_BLCKSZ_K (XLOG_BLCKSZ / 1024) |
#define | LABEL_FORMAT " %-32s" |
#define | NA_FORMAT "%18s" |
#define | OPS_FORMAT "%9.3f ops/sec %6.0f usecs/op" |
#define | USECS_SEC 1000000 |
#define | START_TIMER |
#define | STOP_TIMER |
Functions | |
static void | handle_args (int argc, char *argv[]) |
static void | prepare_buf (void) |
static void | test_open (void) |
static void | test_non_sync (void) |
static void | test_sync (int writes_per_op) |
static void | test_open_syncs (void) |
static void | test_open_sync (const char *msg, int writes_size) |
static void | test_file_descriptor_sync (void) |
static void | process_alarm (int sig) |
static void | signal_cleanup (int sig) |
static void | print_elapse (struct timeval start_t, struct timeval stop_t, int ops) |
static void | die (const char *str) |
int | main (int argc, char *argv[]) |
Variables | |
static const char * | progname |
static int | secs_per_test = 5 |
static int | needs_unlink = 0 |
static char | full_buf [XLOG_SEG_SIZE] |
static char * | buf |
static char * | filename = FSYNC_FILENAME |
static struct timeval start_t | stop_t |
static bool | alarm_triggered = false |
#define FSYNC_FILENAME "./pg_test_fsync.out" |
Definition at line 22 of file pg_test_fsync.c.
#define LABEL_FORMAT " %-32s" |
Definition at line 26 of file pg_test_fsync.c.
Referenced by test_file_descriptor_sync(), test_non_sync(), test_open_sync(), and test_sync().
#define NA_FORMAT "%18s" |
Definition at line 27 of file pg_test_fsync.c.
Referenced by test_open_sync(), and test_sync().
#define OPS_FORMAT "%9.3f ops/sec %6.0f usecs/op" |
Definition at line 28 of file pg_test_fsync.c.
Referenced by print_elapse().
#define START_TIMER |
do { \ alarm_triggered = false; \ alarm(secs_per_test); \ gettimeofday(&start_t, NULL); \ } while (0)
Definition at line 33 of file pg_test_fsync.c.
#define STOP_TIMER |
do { \ gettimeofday(&stop_t, NULL); \ print_elapse(start_t, stop_t, ops); \ } while (0)
Definition at line 54 of file pg_test_fsync.c.
#define USECS_SEC 1000000 |
Definition at line 29 of file pg_test_fsync.c.
Referenced by print_elapse().
#define XLOG_BLCKSZ_K (XLOG_BLCKSZ / 1024) |
Definition at line 24 of file pg_test_fsync.c.
Referenced by test_non_sync(), and test_sync().
static void die | ( | const char * | str | ) | [static] |
Definition at line 596 of file pg_test_fsync.c.
References strerror().
Referenced by AutoVacWorkerMain(), bootstrap_signals(), PostgresMain(), test_file_descriptor_sync(), test_non_sync(), test_open(), test_open_sync(), test_sync(), and WalSndSignals().
{ fprintf(stderr, "%s: %s\n", str, strerror(errno)); exit(1); }
static void handle_args | ( | int | argc, | |
char * | argv[] | |||
) | [static] |
Definition at line 136 of file pg_test_fsync.c.
References filename, getopt_long(), optarg, optind, progname, and secs_per_test.
Referenced by main().
{ static struct option long_options[] = { {"filename", required_argument, NULL, 'f'}, {"secs-per-test", required_argument, NULL, 's'}, {NULL, 0, NULL, 0} }; int option; /* Command line option */ int optindex = 0; /* used by getopt_long */ if (argc > 1) { if (strcmp(argv[1], "--help") == 0 || strcmp(argv[1], "-h") == 0 || strcmp(argv[1], "-?") == 0) { printf("Usage: %s [-f FILENAME] [-s SECS-PER-TEST]\n", progname); exit(0); } if (strcmp(argv[1], "--version") == 0 || strcmp(argv[1], "-V") == 0) { puts("pg_test_fsync (PostgreSQL) " PG_VERSION); exit(0); } } while ((option = getopt_long(argc, argv, "f:s:", long_options, &optindex)) != -1) { switch (option) { case 'f': filename = strdup(optarg); break; case 's': secs_per_test = atoi(optarg); break; default: fprintf(stderr, "Try \"%s --help\" for more information.\n", progname); exit(1); break; } } if (argc > optind) { fprintf(stderr, "%s: too many command-line arguments (first is \"%s\")\n", progname, argv[optind]); fprintf(stderr, "Try \"%s --help\" for more information.\n", progname); exit(1); } printf("%d seconds per test\n", secs_per_test); #if PG_O_DIRECT != 0 printf("O_DIRECT supported on this platform for open_datasync and open_sync.\n"); #else printf("Direct I/O is not supported on this platform.\n"); #endif }
int main | ( | int | argc, | |
char * | argv[] | |||
) |
Definition at line 97 of file pg_test_fsync.c.
References filename, get_progname(), handle_args(), pqsignal(), prepare_buf(), process_alarm(), progname, SIGALRM, SIGHUP, signal_cleanup(), test_file_descriptor_sync(), test_non_sync(), test_open(), test_open_syncs(), test_sync(), and unlink().
{ progname = get_progname(argv[0]); handle_args(argc, argv); /* Prevent leaving behind the test file */ pqsignal(SIGINT, signal_cleanup); pqsignal(SIGTERM, signal_cleanup); #ifndef WIN32 pqsignal(SIGALRM, process_alarm); #endif #ifdef SIGHUP /* Not defined on win32 */ pqsignal(SIGHUP, signal_cleanup); #endif prepare_buf(); test_open(); /* Test using 1 XLOG_BLCKSZ write */ test_sync(1); /* Test using 2 XLOG_BLCKSZ writes */ test_sync(2); test_open_syncs(); test_file_descriptor_sync(); test_non_sync(); unlink(filename); return 0; }
static void prepare_buf | ( | void | ) | [static] |
Definition at line 202 of file pg_test_fsync.c.
References ALIGNOF_XLOG_BUFFER, buf, full_buf, random(), and TYPEALIGN.
Referenced by main().
static void print_elapse | ( | struct timeval | start_t, | |
struct timeval | stop_t, | |||
int | ops | |||
) | [static] |
Definition at line 568 of file pg_test_fsync.c.
References OPS_FORMAT, and USECS_SEC.
{ double total_time = (stop_t.tv_sec - start_t.tv_sec) + (stop_t.tv_usec - start_t.tv_usec) * 0.000001; double per_second = ops / total_time; double avg_op_time_us = (total_time / ops) * USECS_SEC; printf(OPS_FORMAT "\n", per_second, avg_op_time_us); }
static void process_alarm | ( | int | sig | ) | [static] |
Definition at line 580 of file pg_test_fsync.c.
References alarm_triggered.
Referenced by main().
{ alarm_triggered = true; }
static void signal_cleanup | ( | int | sig | ) | [static] |
Definition at line 538 of file pg_test_fsync.c.
References filename, needs_unlink, and unlink().
Referenced by main().
{ /* Delete the file if it exists. Ignore errors */ if (needs_unlink) unlink(filename); /* Finish incomplete line on stdout */ puts(""); exit(signum); }
static void test_file_descriptor_sync | ( | void | ) | [static] |
Definition at line 444 of file pg_test_fsync.c.
References alarm_triggered, buf, close, die(), filename, fsync, LABEL_FORMAT, and write.
Referenced by main().
{ int tmpfile, ops; /* * Test whether fsync can sync data written on a different descriptor for * the same file. This checks the efficiency of multi-process fsyncs * against the same file. Possibly this should be done with writethrough * on platforms which support it. */ printf("\nTest if fsync on non-write file descriptor is honored:\n"); printf("(If the times are similar, fsync() can sync data written\n"); printf("on a different descriptor.)\n"); /* * first write, fsync and close, which is the normal behavior without * multiple descriptors */ printf(LABEL_FORMAT, "write, fsync, close"); fflush(stdout); START_TIMER; for (ops = 0; alarm_triggered == false; ops++) { if ((tmpfile = open(filename, O_RDWR, 0)) == -1) die("could not open output file"); if (write(tmpfile, buf, XLOG_BLCKSZ) != XLOG_BLCKSZ) die("write failed"); if (fsync(tmpfile) != 0) die("fsync failed"); close(tmpfile); /* * open and close the file again to be consistent with the following * test */ if ((tmpfile = open(filename, O_RDWR, 0)) == -1) die("could not open output file"); close(tmpfile); } STOP_TIMER; /* * Now open, write, close, open again and fsync This simulates processes * fsyncing each other's writes. */ printf(LABEL_FORMAT, "write, close, fsync"); fflush(stdout); START_TIMER; for (ops = 0; alarm_triggered == false; ops++) { if ((tmpfile = open(filename, O_RDWR, 0)) == -1) die("could not open output file"); if (write(tmpfile, buf, XLOG_BLCKSZ) != XLOG_BLCKSZ) die("write failed"); close(tmpfile); /* reopen file */ if ((tmpfile = open(filename, O_RDWR, 0)) == -1) die("could not open output file"); if (fsync(tmpfile) != 0) die("fsync failed"); close(tmpfile); } STOP_TIMER; }
static void test_non_sync | ( | void | ) | [static] |
Definition at line 513 of file pg_test_fsync.c.
References alarm_triggered, buf, close, die(), filename, LABEL_FORMAT, write, and XLOG_BLCKSZ_K.
Referenced by main().
{ int tmpfile, ops; /* * Test a simple write without fsync */ printf("\nNon-Sync'ed %dkB writes:\n", XLOG_BLCKSZ_K); printf(LABEL_FORMAT, "write"); fflush(stdout); START_TIMER; for (ops = 0; alarm_triggered == false; ops++) { if ((tmpfile = open(filename, O_RDWR, 0)) == -1) die("could not open output file"); if (write(tmpfile, buf, XLOG_BLCKSZ) != XLOG_BLCKSZ) die("write failed"); close(tmpfile); } STOP_TIMER; }
static void test_open | ( | void | ) | [static] |
Definition at line 214 of file pg_test_fsync.c.
References close, die(), filename, fsync, full_buf, needs_unlink, and write.
Referenced by main().
{ int tmpfile; /* * test if we can open the target file */ if ((tmpfile = open(filename, O_RDWR | O_CREAT, S_IRUSR | S_IWUSR)) == -1) die("could not open output file"); needs_unlink = 1; if (write(tmpfile, full_buf, XLOG_SEG_SIZE) != XLOG_SEG_SIZE) die("write failed"); /* fsync now so that dirty buffers don't skew later tests */ if (fsync(tmpfile) != 0) die("fsync failed"); close(tmpfile); }
static void test_open_sync | ( | const char * | msg, | |
int | writes_size | |||
) | [static] |
Definition at line 409 of file pg_test_fsync.c.
References alarm_triggered, buf, close, die(), filename, LABEL_FORMAT, NA_FORMAT, PG_O_DIRECT, and write.
Referenced by test_open_syncs().
{ #ifdef OPEN_SYNC_FLAG int tmpfile, ops, writes; #endif printf(LABEL_FORMAT, msg); fflush(stdout); #ifdef OPEN_SYNC_FLAG if ((tmpfile = open(filename, O_RDWR | OPEN_SYNC_FLAG | PG_O_DIRECT, 0)) == -1) printf(NA_FORMAT, "n/a*\n"); else { START_TIMER; for (ops = 0; alarm_triggered == false; ops++) { for (writes = 0; writes < 16 / writes_size; writes++) if (write(tmpfile, buf, writes_size * 1024) != writes_size * 1024) die("write failed"); if (lseek(tmpfile, 0, SEEK_SET) == -1) die("seek failed"); } STOP_TIMER; close(tmpfile); } #else printf(NA_FORMAT, "n/a\n"); #endif }
static void test_open_syncs | ( | void | ) | [static] |
Definition at line 392 of file pg_test_fsync.c.
References test_open_sync().
Referenced by main().
{ printf("\nCompare open_sync with different write sizes:\n"); printf("(This is designed to compare the cost of writing 16kB\n"); printf("in different write open_sync sizes.)\n"); test_open_sync(" 1 * 16kB open_sync write", 16); test_open_sync(" 2 * 8kB open_sync writes", 8); test_open_sync(" 4 * 4kB open_sync writes", 4); test_open_sync(" 8 * 2kB open_sync writes", 2); test_open_sync("16 * 1kB open_sync writes", 1); }
static void test_sync | ( | int | writes_per_op | ) | [static] |
Definition at line 235 of file pg_test_fsync.c.
References alarm_triggered, buf, close, die(), filename, fsync, LABEL_FORMAT, NA_FORMAT, O_DSYNC, pg_fsync_writethrough(), PG_O_DIRECT, write, and XLOG_BLCKSZ_K.
Referenced by main().
{ int tmpfile, ops, writes; bool fs_warning = false; if (writes_per_op == 1) printf("\nCompare file sync methods using one %dkB write:\n", XLOG_BLCKSZ_K); else printf("\nCompare file sync methods using two %dkB writes:\n", XLOG_BLCKSZ_K); printf("(in wal_sync_method preference order, except fdatasync\n"); printf("is Linux's default)\n"); /* * Test open_datasync if available */ printf(LABEL_FORMAT, "open_datasync"); fflush(stdout); #ifdef OPEN_DATASYNC_FLAG if ((tmpfile = open(filename, O_RDWR | O_DSYNC | PG_O_DIRECT, 0)) == -1) { printf(NA_FORMAT, "n/a*\n"); fs_warning = true; } else { if ((tmpfile = open(filename, O_RDWR | O_DSYNC | PG_O_DIRECT, 0)) == -1) die("could not open output file"); START_TIMER; for (ops = 0; alarm_triggered == false; ops++) { for (writes = 0; writes < writes_per_op; writes++) if (write(tmpfile, buf, XLOG_BLCKSZ) != XLOG_BLCKSZ) die("write failed"); if (lseek(tmpfile, 0, SEEK_SET) == -1) die("seek failed"); } STOP_TIMER; close(tmpfile); } #else printf(NA_FORMAT, "n/a\n"); #endif /* * Test fdatasync if available */ printf(LABEL_FORMAT, "fdatasync"); fflush(stdout); #ifdef HAVE_FDATASYNC if ((tmpfile = open(filename, O_RDWR, 0)) == -1) die("could not open output file"); START_TIMER; for (ops = 0; alarm_triggered == false; ops++) { for (writes = 0; writes < writes_per_op; writes++) if (write(tmpfile, buf, XLOG_BLCKSZ) != XLOG_BLCKSZ) die("write failed"); fdatasync(tmpfile); if (lseek(tmpfile, 0, SEEK_SET) == -1) die("seek failed"); } STOP_TIMER; close(tmpfile); #else printf(NA_FORMAT, "n/a\n"); #endif /* * Test fsync */ printf(LABEL_FORMAT, "fsync"); fflush(stdout); if ((tmpfile = open(filename, O_RDWR, 0)) == -1) die("could not open output file"); START_TIMER; for (ops = 0; alarm_triggered == false; ops++) { for (writes = 0; writes < writes_per_op; writes++) if (write(tmpfile, buf, XLOG_BLCKSZ) != XLOG_BLCKSZ) die("write failed"); if (fsync(tmpfile) != 0) die("fsync failed"); if (lseek(tmpfile, 0, SEEK_SET) == -1) die("seek failed"); } STOP_TIMER; close(tmpfile); /* * If fsync_writethrough is available, test as well */ printf(LABEL_FORMAT, "fsync_writethrough"); fflush(stdout); #ifdef HAVE_FSYNC_WRITETHROUGH if ((tmpfile = open(filename, O_RDWR, 0)) == -1) die("could not open output file"); START_TIMER; for (ops = 0; alarm_triggered == false; ops++) { for (writes = 0; writes < writes_per_op; writes++) if (write(tmpfile, buf, XLOG_BLCKSZ) != XLOG_BLCKSZ) die("write failed"); if (pg_fsync_writethrough(tmpfile) != 0) die("fsync failed"); if (lseek(tmpfile, 0, SEEK_SET) == -1) die("seek failed"); } STOP_TIMER; close(tmpfile); #else printf(NA_FORMAT, "n/a\n"); #endif /* * Test open_sync if available */ printf(LABEL_FORMAT, "open_sync"); fflush(stdout); #ifdef OPEN_SYNC_FLAG if ((tmpfile = open(filename, O_RDWR | OPEN_SYNC_FLAG | PG_O_DIRECT, 0)) == -1) { printf(NA_FORMAT, "n/a*\n"); fs_warning = true; } else { START_TIMER; for (ops = 0; alarm_triggered == false; ops++) { for (writes = 0; writes < writes_per_op; writes++) if (write(tmpfile, buf, XLOG_BLCKSZ) != XLOG_BLCKSZ) die("write failed"); if (lseek(tmpfile, 0, SEEK_SET) == -1) die("seek failed"); } STOP_TIMER; close(tmpfile); } #else printf(NA_FORMAT, "n/a\n"); #endif if (fs_warning) { printf("* This file system and its mount options do not support direct\n"); printf("I/O, e.g. ext4 in journaled mode.\n"); } }
bool alarm_triggered = false [static] |
Definition at line 70 of file pg_test_fsync.c.
Referenced by process_alarm(), test_file_descriptor_sync(), test_non_sync(), test_open_sync(), and test_sync().
char * buf [static] |
Definition at line 65 of file pg_test_fsync.c.
Referenced by _bt_doinsert(), _bt_endpoint(), _bt_findinsertloc(), _bt_first(), _bt_get_endpoint(), _bt_getbuf(), _bt_getstackbuf(), _bt_relandgetbuf(), _conv(), _discoverArchiveFormat(), _EndBlob(), _hash_doinsert(), _hash_first(), _hash_getbuf(), _hash_getbuf_with_strategy(), _hash_getinitbuf(), _hash_getnewbuf(), _hash_initbitmap(), _hash_metapinit(), _hash_next(), _hash_step(), _MasterStartParallelItem(), _PrintFileData(), _skipData(), _WorkerJobDumpDirectory(), _WorkerJobRestoreCustom(), _WorkerJobRestoreDirectory(), _WriteBlobData(), abstimeout(), abstimerecv(), abstimesend(), add_tablespace_footer(), aes_cbc_decrypt(), AlterSequence(), array_dims(), array_recv(), array_send(), array_to_text_internal(), asyncQueueReadAllNotifications(), AtEOXact_Snapshot(), b64_decode(), b64_encode(), big5_to_euc_tw(), bit_recv(), boolrecv(), boolsend(), bootstrap_template1(), box_recv(), box_send(), bpcharrecv(), bqarr_in(), BSD44_derived_dlsym(), btree_xlog_cleanup(), btvacuumpage(), btvacuumscan(), buf_init(), BufferAlloc(), BuildIndexValueDescription(), bytearecv(), cache_locale_time(), calc_s2k_iter_salted(), calc_s2k_salted(), calc_s2k_simple(), cash_out(), cash_recv(), cash_send(), cash_words(), charrecv(), charsend(), check_key_cksum(), check_TSCurrentConfig(), CheckForExternalTrigger(), ChooseIndexColumnNames(), ChooseIndexNameAddition(), cidr_recv(), cidrecv(), cidsend(), circle_recv(), circle_send(), compile_pltcl_function(), complex_recv(), complex_send(), conninfo_parse(), conninfo_uri_decode(), conninfo_uri_parse_options(), constructConnStr(), ConvertTriggerToFK(), copy_heap_data(), copy_relation_data(), copyAndUpdateFile(), CopyGetInt16(), CopyGetInt32(), CopySendInt16(), CopySendInt32(), count_nondeletable_pages(), create_cursor(), cstring_recv(), cstring_send(), cube_out(), date_out(), date_recv(), date_send(), date_test_fmt(), dblink_close(), dblink_fdw_validator(), dblink_fetch(), dblink_open(), DeleteAllExportedSnapshotFiles(), deparse_expression_pretty(), deparseArrayExpr(), deparseArrayRef(), deparseBoolExpr(), deparseConst(), deparseDistinctExpr(), deparseFuncExpr(), deparseNullTest(), deparseOpExpr(), deparseParam(), deparseScalarArrayOpExpr(), deparseVar(), describeAggregates(), describeFunctions(), describeOneTableDetails(), describeOneTSConfig(), describeOneTSParser(), describeOperators(), describeRoles(), describeTableDetails(), describeTablespaces(), describeTypes(), do_compile(), do_lo_list(), do_setval(), do_start_bgworker(), domain_recv(), drainSelfPipe(), dump_lo_buf(), dumpBlobs(), dumpCreateDB(), dumpDatabaseConfig(), dumpDbRoleConfig(), dumpGroups(), dumpRoles(), dumpTablespaces(), dumpTimestamp(), dumpUserConfig(), ean13_out(), ean2isn(), enum_recv(), enum_send(), escape_param_str(), euc_tw_to_big5(), exec_command(), exec_describe_statement_message(), ExecBuildSlotValueDescription(), ExecEvalXml(), ExecQueryUsingCursor(), ExplainPropertyFloat(), ExplainPropertyInteger(), ExplainPropertyLong(), exportFile(), ExportSnapshot(), file_fdw_validator(), fill_seq_with_data(), find_provider(), FinishPreparedTransaction(), flatten_set_variable_args(), float4_numeric(), float4recv(), float4send(), float8_numeric(), float8recv(), float8send(), flush_pipe_input(), fmtlong(), fork_process(), format_aggregate_signature(), format_operator_internal(), format_procedure_internal(), format_type_internal(), FreeSpaceMapTruncateRel(), fsm_readbuf(), fsm_search(), fsm_set_and_search(), fsm_vacuum_page(), generate_operator_name(), generate_trgm(), generate_wildcard_trgm(), get_agg_expr(), get_basic_select_query(), get_coercion_expr(), get_column_alias_list(), get_connect_string(), get_const_collation(), get_const_expr(), get_delete_query_def(), get_from_clause(), get_from_clause_coldeflist(), get_from_clause_item(), get_func_expr(), get_insert_query_def(), get_oper_expr(), get_prompt(), get_raw_page_internal(), get_rule_expr(), get_rule_orderby(), get_rule_sortgroupclause(), get_rule_windowclause(), get_rule_windowspec(), get_select_query_def(), get_setop_query(), get_sql_delete(), get_sql_insert(), get_sql_update(), get_sublink_expr(), get_target_list(), get_tuple_of_interest(), get_update_query_def(), get_utility_query_def(), get_values_def(), get_variable(), get_windowfunc_expr(), get_with_clause(), getaddrinfo(), GetBufferFromRing(), GetConfigOptionByNum(), GetRecordedFreeSpace(), gistfixsplit(), handleCopyIn(), handleCopyOut(), hashbulkdelete(), hashgettuple(), heap_lock_updated_tuple_rec(), hmac_finish(), hstore_recv(), hstore_send(), hstorePairs(), IdentifySystem(), importFile(), inet_recv(), infile(), init_params(), InitBufferPool(), initialize_worker_spi(), InitLocalBuffers(), int2recv(), int2send(), int2vectorrecv(), int4recv(), int4send(), int8out(), int8recv(), int8send(), interval_out(), interval_recv(), interval_send(), inzone(), isn_out(), iso_to_koi8r(), iso_to_win1251(), iso_to_win866(), json_recv(), json_send(), KnownAssignedXidsDisplay(), koi8r_to_iso(), koi8r_to_win1251(), koi8r_to_win866(), latin2_to_win1250(), lazy_scan_heap(), lazy_vacuum_heap(), listAllDbs(), listCasts(), listCollations(), listConversions(), listDbRoleSettings(), listDefaultACLs(), listDomains(), listEventTriggers(), listExtensionContents(), listExtensions(), listForeignDataWrappers(), listForeignServers(), listForeignTables(), listLanguages(), listOneExtensionContents(), listSchemas(), listTables(), listTSConfigs(), listTSConfigsVerbose(), listTSDictionaries(), listTSParsers(), listTSParsersVerbose(), listTSTemplates(), listUserMappings(), lo_export(), lo_import_internal(), load_resultmap(), locale_date_order(), lquery_in(), lquery_out(), lseg_recv(), lseg_send(), ltree_in(), ltree_out(), macaddr_recv(), macaddr_send(), main(), make_absolute_path(), makeAlterConfigCommand(), mp_px_rand(), mxid_to_string(), myFormatType(), namerecv(), namesend(), network_send(), next_field_expand(), nextval_internal(), NotifyMyFrontEnd(), num_word(), numeric_recv(), numeric_send(), objectDescription(), oidrecv(), oidsend(), oidvectorrecv(), output(), overwrite(), pad_eme_pkcs1_v15(), parallel_msg_master(), parse_literal_data(), parse_snapshot(), parseAclItem(), parseServiceFile(), parseTypeString(), PasswordFromFile(), path_recv(), path_send(), perform_base_backup(), permissionsList(), pg_gen_salt(), pg_gen_salt_rounds(), pg_get_constraintdef_worker(), pg_get_function_arguments(), pg_get_function_identity_arguments(), pg_get_function_result(), pg_get_functiondef(), pg_get_indexdef_worker(), pg_get_ruledef_worker(), pg_get_triggerdef_worker(), pg_get_viewdef_worker(), pg_local_sendauth(), pg_sequence_parameters(), pg_size_pretty(), pg_size_pretty_numeric(), pgp_armor_decode(), pgp_encrypt(), pgp_key_id_w(), pgp_mpi_hash(), pgp_mpi_write(), pgrowlocks(), pgstat_btree_page(), pgstat_gist_page(), pgstat_hash_page(), PGTYPESdate_to_asc(), PGTYPESinterval_to_asc(), PGTYPESnumeric_div(), PGTYPEStimestamp_to_asc(), pgwin32_select(), pgwin32_waitforsinglesocket(), pgxmlNodeSetToText(), pickout(), pltcl_init_load_unknown(), pltcl_process_SPI_result(), pltcl_set_tuple_values(), pltcl_SPI_lastoid(), PLy_exception_set(), PLy_exception_set_plural(), point_recv(), point_send(), poly2path(), poly_recv(), poly_send(), postgres_fdw_validator(), PostgresMain(), postgresql_fdw_validator(), PQoidStatus(), prefix_init(), prepare_buf(), PrescanPreparedTransactions(), PrintBufferLeakWarning(), PrintQueryStatus(), printSubscripts(), printtup(), printtup_20(), printtup_internal_20(), process_builtin(), process_file(), process_pipe_input(), processIndirection(), ProcessStartupPacket(), ProcSleep(), psnprintf(), puttzcode(), puttzcode64(), px_debug(), px_find_combo(), quote_qualified_identifier(), range_bound_escape(), range_deparse(), range_parse_bound(), range_recv(), range_send(), read_binary_file(), read_text_file(), ReadBufferExtended(), ReadStr(), ReadTwoPhaseFile(), ReadyForQuery(), ReceiveCopyBegin(), record_in(), record_out(), record_recv(), record_send(), RecoverPreparedTransactions(), recv_password_packet(), regression_main(), reltimeout(), reltimerecv(), reltimesend(), repairDependencyLoop(), replace_text_regexp(), report_invalid_encoding(), report_untranslatable_char(), reseed(), ResetSequence(), restore(), run_permutation(), sendAuthRequest(), SendBackupHeader(), SendCopyBegin(), sendFile(), sendFileWithContent(), SendFunctionResult(), SendQuery(), SendRowDescriptionMessage(), SendTimeLineHistory(), SendXlogRecPtrResult(), sepgsql_audit_log(), serialize_deflist(), show_log_file_mode(), show_unix_socket_permissions(), ShowTransactionStateRec(), simple_prompt(), SortTocFromFile(), SPI_result_code_string(), SplitToVariants(), StandbyRecoverPreparedTransactions(), StandbyTransactionIdIsPrepared(), StartReplication(), startup_tricks(), StartupXLOG(), stop_postmaster(), str_time(), StrategyGetBuffer(), strerror(), string2ean(), system_reseed(), t_readline(), test_file_descriptor_sync(), test_non_sync(), test_open_sync(), test_sync(), textrecv(), textsend(), tidout(), tidrecv(), tidsend(), time_out(), time_recv(), time_send(), timeofday(), timestamp_out(), timestamp_recv(), timestamp_send(), timestamptz_out(), timestamptz_recv(), timestamptz_send(), timestamptz_to_str(), timetz_out(), timetz_recv(), timetz_send(), tintervalrecv(), tintervalsend(), to_hex32(), to_hex64(), truncate_identifier(), ts_stat_sql(), tsquery_rewrite_query(), tsqueryrecv(), tsquerysend(), tsvectorin(), tsvectorrecv(), tsvectorsend(), txid_snapshot_recv(), txid_snapshot_send(), tzload(), unknownrecv(), unknownsend(), usage(), uuid_out(), uuid_to_string(), vacuumlo(), varbit_recv(), varbit_send(), varcharrecv(), vm_readbuf(), void_send(), WalReceiverMain(), win1250_to_latin2(), win1251_to_iso(), win1251_to_koi8r(), win1251_to_win866(), win866_to_iso(), win866_to_koi8r(), win866_to_win1251(), worker_spi_main(), xidrecv(), xidsend(), XLogInsert(), XLogReadBuffer(), XLogRecordPageWithFreeSpace(), XLOGShmemSize(), xml_out_internal(), xml_recv(), xml_send(), and yearistype().
char * filename = FSYNC_FILENAME [static] |
Definition at line 67 of file pg_test_fsync.c.
Referenced by _copyCopyStmt(), _copyLoadStmt(), _equalCopyStmt(), _equalLoadStmt(), adjust_data_dir(), CheckXLogRemoved(), cleanup(), convert_and_check_filename(), db_dir_size(), dsynonym_init(), dxsyn_init(), execute_extension_script(), file_acquire_sample_rows(), file_fdw_validator(), fileAnalyzeForeignTable(), fileBeginForeignScan(), fileExplainForeignScan(), get_sock_dir(), handle_args(), lo_export(), lo_import(), lo_import_with_oid(), load_libraries(), logfile_getname(), logfile_rotate(), main(), open_csvlogfile(), parse_extension_control_file(), parseCommandLine(), pg_file_unlink(), pg_file_write(), pg_read_binary_file(), pg_read_binary_file_all(), pg_read_file(), pg_read_file_all(), pg_stat_file(), PLy_traceback(), readstoplist(), ReceiveAndUnpackTarFile(), ReceiveTarFile(), rmtree(), signal_cleanup(), SysLogger_Start(), test_file_descriptor_sync(), test_non_sync(), test_open(), test_open_sync(), test_sync(), and WriteRecoveryConf().
char full_buf[XLOG_SEG_SIZE] [static] |
Definition at line 65 of file pg_test_fsync.c.
Referenced by prepare_buf(), and test_open().
int needs_unlink = 0 [static] |
Definition at line 64 of file pg_test_fsync.c.
Referenced by signal_cleanup(), and test_open().
const char* progname [static] |
Definition at line 61 of file pg_test_fsync.c.
int secs_per_test = 5 [static] |
Definition at line 63 of file pg_test_fsync.c.
Referenced by handle_args().
struct timeval start_t stop_t [static] |
Definition at line 68 of file pg_test_fsync.c.