aboutsummaryrefslogtreecommitdiff
path: root/src/backend/utils/adt/pgstatfuncs.c
diff options
context:
space:
mode:
authorRobert Haas <rhaas@postgresql.org>2021-11-11 15:02:53 -0500
committerRobert Haas <rhaas@postgresql.org>2021-11-11 15:20:26 -0500
commitbeb4e9ba1652a04f66ff20261444d06f678c0b2d (patch)
tree0db20b4583003355e650e8a440e60e5b2c585395 /src/backend/utils/adt/pgstatfuncs.c
parent01ec41a5fe4aa590dde18a2c551432aa1925caea (diff)
downloadpostgresql-beb4e9ba1652a04f66ff20261444d06f678c0b2d.tar.gz
postgresql-beb4e9ba1652a04f66ff20261444d06f678c0b2d.zip
Improve performance of pgarch_readyXlog() with many status files.
Presently, the archive_status directory was scanned for each file to archive. When there are many status files, say because archive_command has been failing for a long time, these directory scans can get very slow. With this change, the archiver remembers several files to archive during each directory scan, speeding things up. To ensure timeline history files are archived as quickly as possible, XLogArchiveNotify() forces the archiver to do a new directory scan as soon as the .ready file for one is created. Nathan Bossart, per a long discussion involving many people. It is not clear to me exactly who out of all those people reviewed this particular patch. Discussion: http://postgr.es/m/CA+TgmobhAbs2yabTuTRkJTq_kkC80-+jw=pfpypdOJ7+gAbQbw@mail.gmail.com Discussion: http://postgr.es/m/620F3CE1-0255-4D66-9D87-0EADE866985A@amazon.com
Diffstat (limited to 'src/backend/utils/adt/pgstatfuncs.c')
0 files changed, 0 insertions, 0 deletions