From: | Fujii Masao <masao(dot)fujii(at)oss(dot)nttdata(dot)com> |
---|---|
To: | ikedamsh <ikedamsh(at)oss(dot)nttdata(dot)com> |
Cc: | "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>, Masahiko Sawada <sawada(dot)mshk(at)gmail(dot)com>, Li Japin <japinli(at)hotmail(dot)com>, kuroda(dot)hayato(at)fujitsu(dot)com |
Subject: | Re: About to add WAL write/fsync statistics to pg_stat_wal view |
Date: | 2021-03-22 07:50:52 |
Message-ID: | 940c12fd-96dc-67d2-afe9-dbb679eda010@oss.nttdata.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On 2021/03/22 9:50, ikedamsh wrote:
> Agreed. I separated the patches.
>
> If only the former is committed, my trivial concern is that there may be
> a disadvantage, but no advantage for the standby server. It may lead to
> performance degradation to the wal receiver by calling
> INSTR_TIME_SET_CURRENT(), but the stats can't visible for users until the
> latter patch is committed.
Your concern is valid, so let's polish and commit also the 0003 patch to v14.
I'm still thinking that it's better to separate wal_xxx columns into
walreceiver's and the others. But if we count even walreceiver activity on
the existing columns, regarding 0003 patch, we need to update the document?
For example, "Number of times WAL buffers were written out to disk via
XLogWrite request." should be "Number of times WAL buffers were written
out to disk via XLogWrite request and by WAL receiver process."? Maybe
we need to append some descriptions about this into "WAL configuration"
section?
> I followed the argument of pg_pwrite().
> But, I think "char *" is better, so fixed it.
Thanks for updating the patch!
+extern int XLogWriteFile(int fd, char *buf,
+ size_t nbyte, off_t offset,
+ TimeLineID timelineid, XLogSegNo segno,
+ bool write_all);
write_all seems not to be necessary. You added this flag for walreceiver,
I guess. But even without the argument, walreceiver seems to work expectedly.
So, what about the attached patch? I applied some cosmetic changes to the patch.
Regards,
--
Fujii Masao
Advanced Computing Technology Center
Research and Development Headquarters
NTT DATA CORPORATION
Attachment | Content-Type | Size |
---|---|---|
v20-0006-merge-wal-write-function.patch | text/plain | 6.4 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Kyotaro Horiguchi | 2021-03-22 07:59:15 | Re: PG13 fails to startup even though the current transaction is equal to the target transaction |
Previous Message | Dilip Kumar | 2021-03-22 07:50:47 | Re: [HACKERS] Custom compression methods (mac+lz4.h) |