Re: xlogfilename

From: DEV_OPS <devops(at)ww-it(dot)cn>
To: pgsql-hackers(at)postgresql(dot)org, computer_wg(at)163(dot)com
Subject: Re: xlogfilename
Date: 2017-07-20 08:58:58
Message-ID: a33333a9-a782-b3ec-b38c-8b54b4e4f2bb@ww-it.cn
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers


I think you may reference to function: pg_xlogfile_name in
src/backend/access/transam/xlogfuncs.c, it use XLogFileName defined in
src/include/access/xlog_internal.h

#define XLogFileName(fname, tli, logSegNo) \
snprintf(fname, MAXFNAMELEN, "%08X%08X%08X", tli, \
(uint32) ((logSegNo) / XLogSegmentsPerXLogId), \
(uint32) ((logSegNo) % XLogSegmentsPerXLogId))

hope it's helpful for you

--Tony

On 20/07/2017 16:42, 王刚 wrote:
> I study source code about wal, and have a question about xlog file name . what does 000000010000000000000001 mean? Someone says that it means tli logid segno. I don't understand.

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Michael Paquier 2017-07-20 09:02:25 Re: xlogfilename
Previous Message 王刚 2017-07-20 08:42:58 xlogfilename