Re: Reducing header interdependencies around heapam.h et al.

2019-01-14 Thread Andres Freund
Hi, On 2019-01-14 17:55:44 -0300, Alvaro Herrera wrote: > On 2019-Jan-14, Andres Freund wrote: > > > I think the whole pointer hiding game that we play is a really really > > bad idea. We should just about *never* have typedefs that hide the fact > > that something is a pointer. But it's hard to g

Re: Reducing header interdependencies around heapam.h et al.

2019-01-14 Thread Alvaro Herrera
On 2019-Jan-14, Andres Freund wrote: > I think the whole pointer hiding game that we play is a really really > bad idea. We should just about *never* have typedefs that hide the fact > that something is a pointer. But it's hard to go away from that for > legacy reasons. > > The problem with your

Re: Reducing header interdependencies around heapam.h et al.

2019-01-14 Thread Andres Freund
Hi, On 2019-01-14 15:36:14 -0300, Alvaro Herrera wrote: > 0001 -- looks reasonable. One hunk in executor.h changes LockTupleMode > to "enum LockTupleMode", but there's no need for that. Oh, that escaped from an earlier version where I briefly forgot that one cannot portably forward-declare enums

Re: Reducing header interdependencies around heapam.h et al.

2019-01-14 Thread Alvaro Herrera
0001 -- looks reasonable. One hunk in executor.h changes LockTupleMode to "enum LockTupleMode", but there's no need for that. AFAIK the only reason to have the struct FooBarData vs. FooBar (ptr) split is so that it's possible to refer to structs without having the full struct definition. I think

Re: Reducing header interdependencies around heapam.h et al.

2019-01-14 Thread Alvaro Herrera
On 2019-Jan-13, Andres Freund wrote: > One split I am wondering about however is splitting out the sysstable_ > stuff out of genam.h. It's imo a different component and shouldn't > really be in there. Would be quite a bit of rote work to add all the > necessary includes over the backend... Yeah -

Re: Reducing header interdependencies around heapam.h et al.

2019-01-14 Thread Alvaro Herrera
On 2019-Jan-13, Andres Freund wrote: > On 2019-01-13 23:54:58 -0300, Alvaro Herrera wrote: > > On 2019-Jan-13, Andres Freund wrote: > > > > > Alvaro, you'd introduced the split of HeapScanDesc and HeapScanDescData > > > being in different files (in a3540b0f657c6352) - what do you think about > >

Re: Reducing header interdependencies around heapam.h et al.

2019-01-13 Thread Andres Freund
On 2019-01-13 19:05:03 -0800, Andres Freund wrote: > Hi, > > On 2019-01-13 23:54:58 -0300, Alvaro Herrera wrote: > > On 2019-Jan-13, Andres Freund wrote: > > > > > Alvaro, you'd introduced the split of HeapScanDesc and HeapScanDescData > > > being in different files (in a3540b0f657c6352) - what d

Re: Reducing header interdependencies around heapam.h et al.

2019-01-13 Thread Andres Freund
On 2019-01-13 19:05:03 -0800, Andres Freund wrote: > Hi, > > On 2019-01-13 23:54:58 -0300, Alvaro Herrera wrote: > > On 2019-Jan-13, Andres Freund wrote: > > > > > Alvaro, you'd introduced the split of HeapScanDesc and HeapScanDescData > > > being in different files (in a3540b0f657c6352) - what d

Re: Reducing header interdependencies around heapam.h et al.

2019-01-13 Thread Andres Freund
Hi, On 2019-01-13 23:54:58 -0300, Alvaro Herrera wrote: > On 2019-Jan-13, Andres Freund wrote: > > > Alvaro, you'd introduced the split of HeapScanDesc and HeapScanDescData > > being in different files (in a3540b0f657c6352) - what do you think about > > this change? I didn't revert that split, b

Re: Reducing header interdependencies around heapam.h et al.

2019-01-13 Thread Alvaro Herrera
On 2019-Jan-13, Andres Freund wrote: > Alvaro, you'd introduced the split of HeapScanDesc and HeapScanDescData > being in different files (in a3540b0f657c6352) - what do you think about > this change? I didn't revert that split, but I think we ought to > consider just relying on a forward declare