Re: increasing the default WAL segment size
David Rowley <david.rowley@2ndquadrant.com>
On 10 January 2017 at 07:40, Robert Haas <robertmhaas@gmail.com> wrote: > On Sat, Jan 7, 2017 at 7:45 PM, Jim Nasby <Jim.Nasby@bluetreble.com> wrote: >> Well, now that there's 3 places that need to do almost the same thing, I >> think it'd be best to just centralize this somewhere. I realize that's not >> going to save any significant amount of code, but it would make it crystal >> clear what's going on (assuming the excellent comment above RIGHTMOST_ONE >> was kept). > > Hmm. This sounds a lot like what fls() and my_log2() also do. I've > been quietly advocating for fls() because we only provide an > implementation in src/port if the operating system doesn't have it, > and the operating system may have an implementation that optimizes to > a single machine-language instruction (bsrl on x86, I think, see > 4f658dc851a73fc309a61be2503c29ed78a1592e). But the fact that our > src/port implementation uses a loop instead of the RIGHTMOST_ONE() > trick seems non-optimal. It does really sound like we need a bitutils.c as mentioned in [1]. It would be good to make use of GCC's __builtin_popcount [2] instead of the number_of_ones[] array in bitmapset.c. It should be a bit faster and less cache polluting. [1] https://www.postgresql.org/message-id/14578.1462595165@sss.pgh.pa.us [2] https://gcc.gnu.org/onlinedocs/gcc/Other-Builtins.html -- David Rowley http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training & Services
Commits
GET /api/v1/messages/:b64id/commits
the thread's linked commits as JSON, with link sources.
API reference →
-
Make WAL segment size configurable at initdb time.
- fc49e24fa69a 11.0 landed
-
Perform only one ReadControlFile() during startup.
- 8356753c212a 11.0 landed
-
Introduce BYTES unit for GUCs.
- 6e7baa322773 11.0 landed
-
Remove useless duplicate inclusions of system header files.
- 9e3755ecb2d0 10.0 cited
-
Refactor other replication commands to use DestRemoteSimple.
- bbd8550bce14 10.0 landed
-
Add a SHOW command to the replication command language.
- d1ecd539477f 10.0 landed
-
Add a new DestReceiver for printing tuples without catalog access.
- a84069d93504 10.0 landed
-
Support fls().
- 4f658dc851a7 9.2.0 cited
-
Extend yesterday's patch making BLCKSZ and RELSEG_SIZE configurable to also
- cf9f6c8d8e9d 8.4.0 cited
-
Commit the reasonably uncontroversial parts of J.R. Nield's PITR patch, to
- c3c09be34b6b 8.0.0 cited
-
XLOG (also known as WAL -:)) Bootstrap/Startup/Shutdown.
- 47937403676d 7.1.1 cited
-
Transaction log manager core code.
- 30659d43eb73 7.1.1 cited