Re: pgsql: Fix some issues with step generation in partition pruning.

2020-08-01 Thread Etsuro Fujita
On Sun, Aug 2, 2020 at 3:16 AM Tom Lane wrote: > I've concluded that this is probably a compiler bug. It doesn't fail > at optimization level -O0 or -O2, only -O1; and trying to step through > gen_partprune_steps_internal() suggests that the part_scheme local > variable is changing value, which i

pgsql: Use int64 instead of long in incremental sort code

2020-08-01 Thread David Rowley
Use int64 instead of long in incremental sort code Windows 64bit has 4-byte long values which is not suitable for tracking disk space usage in the incremental sort code. Let's just make all these fields int64s. Author: James Coleman Discussion: https://postgr.es/m/CAApHDvpky%2BUhof8mryPf5i%3D6e6

pgsql: Use int64 instead of long in incremental sort code

2020-08-01 Thread David Rowley
Use int64 instead of long in incremental sort code Windows 64bit has 4-byte long values which is not suitable for tracking disk space usage in the incremental sort code. Let's just make all these fields int64s. Author: James Coleman Discussion: https://postgr.es/m/CAApHDvpky%2BUhof8mryPf5i%3D6e6

pgsql: Change XID and mxact limits to warn at 40M and stop at 3M.

2020-08-01 Thread Noah Misch
Change XID and mxact limits to warn at 40M and stop at 3M. We have edge-case bugs when assigning values in the last few dozen pages before the wrap limit. We may introduce similar bugs in the future. At default BLCKSZ, this makes such bugs unreachable outside of single-user mode. Also, when VAC

pgsql: Invent "amadjustmembers" AM method for validating opclass member

2020-08-01 Thread Tom Lane
Invent "amadjustmembers" AM method for validating opclass members. This allows AM-specific knowledge to be applied during creation of pg_amop and pg_amproc entries. Specifically, the AM knows better than core code which entries to consider as required or optional. Giving the latter entries the a

Re: pgsql: Fix some issues with step generation in partition pruning.

2020-08-01 Thread Tom Lane
Etsuro Fujita writes: > On Sat, Aug 1, 2020 at 11:13 PM Tom Lane wrote: >> Sure looks that way, doesn't it? I'm just now working to reproduce >> on gaur's host and poke into it with a debugger. More news in an >> hour or two (it's slow :-(). > Thanks for that! I've concluded that this is prob

Re: pgsql: Fix some issues with step generation in partition pruning.

2020-08-01 Thread Etsuro Fujita
On Sat, Aug 1, 2020 at 11:13 PM Tom Lane wrote: > Thomas Munro writes: > > Hi Fujita-san > > I wonder if this build farm failure is related? Thanks for letting me know! > Sure looks that way, doesn't it? I'm just now working to reproduce > on gaur's host and poke into it with a debugger. More

Re: pgsql: Fix some issues with step generation in partition pruning.

2020-08-01 Thread Tom Lane
Thomas Munro writes: > Hi Fujita-san > I wonder if this build farm failure is related? Sure looks that way, doesn't it? I'm just now working to reproduce on gaur's host and poke into it with a debugger. More news in an hour or two (it's slow :-(). regards, tom lane

Re: pgsql: Fix some issues with step generation in partition pruning.

2020-08-01 Thread Thomas Munro
On Tue, Jul 28, 2020 at 2:01 PM Etsuro Fujita wrote: > src/backend/partitioning/partprune.c | 187 ++ Hi Fujita-san I wonder if this build farm failure is related? Program terminated with signal 11, Segmentation fault. ... #0 0x59c15c in gen_partprune_steps_inte

pgsql: Use pg_pread() and pg_pwrite() in slru.c.

2020-08-01 Thread Thomas Munro
Use pg_pread() and pg_pwrite() in slru.c. This avoids lseek() system calls at every SLRU I/O, as was done for relation files in commit c24dcd0c. Reviewed-by: Ashwin Agrawal Reviewed-by: Andres Freund Discussion: https://postgr.es/m/CA%2BhUKG%2Biqke4uTRFj8D8uEUUgj%2BRokPSp%2BCWM6YYzaaamG9Wvg%40