public inbox for [email protected]
help / color / mirror / Atom feed[PATCH v8 05/17] Update BitmapAdjustPrefetchIterator parameter type to BlockNumber
6+ messages / 4 participants
[nested] [flat]
* [PATCH v8 05/17] Update BitmapAdjustPrefetchIterator parameter type to BlockNumber
@ 2024-02-13 00:04 Melanie Plageman <[email protected]>
0 siblings, 0 replies; 6+ messages in thread
From: Melanie Plageman @ 2024-02-13 00:04 UTC (permalink / raw)
BitmapAdjustPrefetchIterator() only used the blockno member of the
passed in TBMIterateResult to ensure that the prefetch iterator and
regular iterator stay in sync. Pass it the BlockNumber only. This will
allow us to move away from using the TBMIterateResult outside of table
AM specific code.
---
src/backend/executor/nodeBitmapHeapscan.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/src/backend/executor/nodeBitmapHeapscan.c b/src/backend/executor/nodeBitmapHeapscan.c
index 5df3b5ca46..404de0595e 100644
--- a/src/backend/executor/nodeBitmapHeapscan.c
+++ b/src/backend/executor/nodeBitmapHeapscan.c
@@ -52,7 +52,7 @@
static TupleTableSlot *BitmapHeapNext(BitmapHeapScanState *node);
static inline void BitmapDoneInitializingSharedState(ParallelBitmapHeapState *pstate);
static inline void BitmapAdjustPrefetchIterator(BitmapHeapScanState *node,
- TBMIterateResult *tbmres);
+ BlockNumber blockno);
static inline void BitmapAdjustPrefetchTarget(BitmapHeapScanState *node);
static inline void BitmapPrefetch(BitmapHeapScanState *node,
TableScanDesc scan);
@@ -230,7 +230,7 @@ BitmapHeapNext(BitmapHeapScanState *node)
break;
}
- BitmapAdjustPrefetchIterator(node, tbmres);
+ BitmapAdjustPrefetchIterator(node, tbmres->blockno);
valid = table_scan_bitmap_next_block(scan, tbmres);
@@ -341,7 +341,7 @@ BitmapDoneInitializingSharedState(ParallelBitmapHeapState *pstate)
*/
static inline void
BitmapAdjustPrefetchIterator(BitmapHeapScanState *node,
- TBMIterateResult *tbmres)
+ BlockNumber blockno)
{
#ifdef USE_PREFETCH
ParallelBitmapHeapState *pstate = node->pstate;
@@ -360,7 +360,7 @@ BitmapAdjustPrefetchIterator(BitmapHeapScanState *node,
/* Do not let the prefetch iterator get behind the main one */
TBMIterateResult *tbmpre = tbm_iterate(prefetch_iterator);
- if (tbmpre == NULL || tbmpre->blockno != tbmres->blockno)
+ if (tbmpre == NULL || tbmpre->blockno != blockno)
elog(ERROR, "prefetch and main iterators are out of sync");
}
return;
--
2.40.1
--xqq4defy3uncu6k6
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
filename="v8-0006-table_scan_bitmap_next_block-returns-lossy-or-exa.patch"
^ permalink raw reply [nested|flat] 6+ messages in thread
* Re: Cannot find a working 64-bit integer type on Illumos
@ 2024-03-22 18:38 Andres Freund <[email protected]>
2024-03-22 19:02 ` Re: Cannot find a working 64-bit integer type on Illumos Robert Haas <[email protected]>
0 siblings, 1 reply; 6+ messages in thread
From: Andres Freund @ 2024-03-22 18:38 UTC (permalink / raw)
To: Tom Lane <[email protected]>; +Cc: Japin Li <[email protected]>; PostgreSQL Hackers <[email protected]>
Hi,
On 2024-03-22 13:25:56 -0400, Tom Lane wrote:
> The short answer is that Autoconf is not designed to support -Werror
> and it's not worth it to try to make it do so.
I wonder if we ought to make configure warn if it sees -Werror in CFLAGS -
this is far from the first time somebody stumbling with -Werror. Including a
few quite senior hackers, if I recall correctly. We could also just filter it
temporarily and put it back at the end of configure.
I don't think there's great way of making the autoconf buildsystem use -Werror
continually, today. IIRC the best way is to use Makefile.custom.
Greetings,
Andres Freund
^ permalink raw reply [nested|flat] 6+ messages in thread
* Re: Cannot find a working 64-bit integer type on Illumos
2024-03-22 18:38 Re: Cannot find a working 64-bit integer type on Illumos Andres Freund <[email protected]>
@ 2024-03-22 19:02 ` Robert Haas <[email protected]>
2024-03-22 19:31 ` Re: Cannot find a working 64-bit integer type on Illumos Andres Freund <[email protected]>
0 siblings, 1 reply; 6+ messages in thread
From: Robert Haas @ 2024-03-22 19:02 UTC (permalink / raw)
To: Andres Freund <[email protected]>; +Cc: Tom Lane <[email protected]>; Japin Li <[email protected]>; PostgreSQL Hackers <[email protected]>
On Fri, Mar 22, 2024 at 2:38 PM Andres Freund <[email protected]> wrote:
> I wonder if we ought to make configure warn if it sees -Werror in CFLAGS -
> this is far from the first time somebody stumbling with -Werror. Including a
> few quite senior hackers, if I recall correctly. We could also just filter it
> temporarily and put it back at the end of configure.
I think I made this mistake at some point, but I just looked at
config.log and corrected my mistake. I'm not strongly against having
an explicit check for -Werror, but I think the main problem here is
that the original poster didn't have a look at config.log to see what
the actual problem was, and at least IME that's necessary in pretty
much 100% of cases where configure fails for whatever reason. Perhaps
autotools could be better-designed in that regard, but we don't
necessarily want to work around every problem that can stem from that
design choice in our code, either.
--
Robert Haas
EDB: http://www.enterprisedb.com
^ permalink raw reply [nested|flat] 6+ messages in thread
* Re: Cannot find a working 64-bit integer type on Illumos
2024-03-22 18:38 Re: Cannot find a working 64-bit integer type on Illumos Andres Freund <[email protected]>
2024-03-22 19:02 ` Re: Cannot find a working 64-bit integer type on Illumos Robert Haas <[email protected]>
@ 2024-03-22 19:31 ` Andres Freund <[email protected]>
2024-03-22 19:34 ` Re: Cannot find a working 64-bit integer type on Illumos Robert Haas <[email protected]>
0 siblings, 1 reply; 6+ messages in thread
From: Andres Freund @ 2024-03-22 19:31 UTC (permalink / raw)
To: Robert Haas <[email protected]>; +Cc: Tom Lane <[email protected]>; Japin Li <[email protected]>; PostgreSQL Hackers <[email protected]>
Hi,
On 2024-03-22 15:02:45 -0400, Robert Haas wrote:
> On Fri, Mar 22, 2024 at 2:38 PM Andres Freund <[email protected]> wrote:
> > I wonder if we ought to make configure warn if it sees -Werror in CFLAGS -
> > this is far from the first time somebody stumbling with -Werror. Including a
> > few quite senior hackers, if I recall correctly. We could also just filter it
> > temporarily and put it back at the end of configure.
>
> I think I made this mistake at some point, but I just looked at
> config.log and corrected my mistake.
IME the bigger issue is that sometimes it doesn't lead to outright failures,
just to lots of stuff not being detected as supported / present.
Greetings,
Andres Freund
^ permalink raw reply [nested|flat] 6+ messages in thread
* Re: Cannot find a working 64-bit integer type on Illumos
2024-03-22 18:38 Re: Cannot find a working 64-bit integer type on Illumos Andres Freund <[email protected]>
2024-03-22 19:02 ` Re: Cannot find a working 64-bit integer type on Illumos Robert Haas <[email protected]>
2024-03-22 19:31 ` Re: Cannot find a working 64-bit integer type on Illumos Andres Freund <[email protected]>
@ 2024-03-22 19:34 ` Robert Haas <[email protected]>
2024-03-22 20:43 ` Re: Cannot find a working 64-bit integer type on Illumos Tom Lane <[email protected]>
0 siblings, 1 reply; 6+ messages in thread
From: Robert Haas @ 2024-03-22 19:34 UTC (permalink / raw)
To: Andres Freund <[email protected]>; +Cc: Tom Lane <[email protected]>; Japin Li <[email protected]>; PostgreSQL Hackers <[email protected]>
On Fri, Mar 22, 2024 at 3:31 PM Andres Freund <[email protected]> wrote:
> IME the bigger issue is that sometimes it doesn't lead to outright failures,
> just to lots of stuff not being detected as supported / present.
Ugh. That does, indeed, sound not very nice.
--
Robert Haas
EDB: http://www.enterprisedb.com
^ permalink raw reply [nested|flat] 6+ messages in thread
* Re: Cannot find a working 64-bit integer type on Illumos
2024-03-22 18:38 Re: Cannot find a working 64-bit integer type on Illumos Andres Freund <[email protected]>
2024-03-22 19:02 ` Re: Cannot find a working 64-bit integer type on Illumos Robert Haas <[email protected]>
2024-03-22 19:31 ` Re: Cannot find a working 64-bit integer type on Illumos Andres Freund <[email protected]>
2024-03-22 19:34 ` Re: Cannot find a working 64-bit integer type on Illumos Robert Haas <[email protected]>
@ 2024-03-22 20:43 ` Tom Lane <[email protected]>
0 siblings, 0 replies; 6+ messages in thread
From: Tom Lane @ 2024-03-22 20:43 UTC (permalink / raw)
To: Robert Haas <[email protected]>; +Cc: Andres Freund <[email protected]>; Japin Li <[email protected]>; PostgreSQL Hackers <[email protected]>
Robert Haas <[email protected]> writes:
> On Fri, Mar 22, 2024 at 3:31 PM Andres Freund <[email protected]> wrote:
>> IME the bigger issue is that sometimes it doesn't lead to outright failures,
>> just to lots of stuff not being detected as supported / present.
> Ugh. That does, indeed, sound not very nice.
I could get behind throwing an error if -Werror is spotted. I think
trying to pull it out and put it back is too much work and a bit
too much magic.
regards, tom lane
^ permalink raw reply [nested|flat] 6+ messages in thread
end of thread, other threads:[~2024-03-22 20:43 UTC | newest]
Thread overview: 6+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2024-02-13 00:04 [PATCH v8 05/17] Update BitmapAdjustPrefetchIterator parameter type to BlockNumber Melanie Plageman <[email protected]>
2024-03-22 18:38 Re: Cannot find a working 64-bit integer type on Illumos Andres Freund <[email protected]>
2024-03-22 19:02 ` Re: Cannot find a working 64-bit integer type on Illumos Robert Haas <[email protected]>
2024-03-22 19:31 ` Re: Cannot find a working 64-bit integer type on Illumos Andres Freund <[email protected]>
2024-03-22 19:34 ` Re: Cannot find a working 64-bit integer type on Illumos Robert Haas <[email protected]>
2024-03-22 20:43 ` Re: Cannot find a working 64-bit integer type on Illumos Tom Lane <[email protected]>
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox