mirror of
https://github.com/postgres/postgres.git
synced 2025-12-21 05:21:08 +03:00
Change the timestamps recorded in transaction commit/abort xlog records
from time_t to TimestampTz representation. This provides full gettimeofday() resolution of the timestamps, which might be useful when attempting to do point-in-time recovery --- previously it was not possible to specify the stop point with sub-second resolution. But mostly this is to get rid of TimestampTz-to-time_t conversion overhead during commit. Per my proposal of a day or two back.
This commit is contained in:
@@ -6,7 +6,7 @@
|
||||
* Portions Copyright (c) 1996-2007, PostgreSQL Global Development Group
|
||||
* Portions Copyright (c) 1994, Regents of the University of California
|
||||
*
|
||||
* $PostgreSQL: pgsql/src/include/utils/timestamp.h,v 1.68 2007/04/30 03:23:49 tgl Exp $
|
||||
* $PostgreSQL: pgsql/src/include/utils/timestamp.h,v 1.69 2007/04/30 21:01:53 tgl Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -318,6 +318,8 @@ extern bool TimestampDifferenceExceeds(TimestampTz start_time,
|
||||
extern TimestampTz time_t_to_timestamptz(time_t tm);
|
||||
extern time_t timestamptz_to_time_t(TimestampTz t);
|
||||
|
||||
extern const char *timestamptz_to_str(TimestampTz t);
|
||||
|
||||
extern int tm2timestamp(struct pg_tm * tm, fsec_t fsec, int *tzp, Timestamp *dt);
|
||||
extern int timestamp2tm(Timestamp dt, int *tzp, struct pg_tm * tm,
|
||||
fsec_t *fsec, char **tzn, pg_tz *attimezone);
|
||||
|
||||
Reference in New Issue
Block a user