Re: Testing autovacuum wraparound (including failsafe)

2023-09-02 Thread Noah Misch
On Wed, Jul 12, 2023 at 01:47:51PM +0200, Daniel Gustafsson wrote: > > On 12 Jul 2023, at 09:52, Masahiko Sawada wrote: > > Agreed. The timeout can be set by manually setting > > PG_TEST_TIMEOUT_DEFAULT, but I bump it to 10 min by default. And it > > now require setting PG_TET_EXTRA to run it. >

add (void) cast inside advance_aggregates for function ExecEvalExprSwitchContext

2023-09-02 Thread jian he
Hi. In src/backend/executor/nodeAgg.c 817: advance_aggregates(AggState *aggstate) Do we need to add "(void)" before ExecEvalExprSwitchContext?

Re: Query execution in Perl TAP tests needs work

2023-09-02 Thread Thomas Munro
On Sun, Sep 3, 2023 at 6:42 AM Andrew Dunstan wrote: > I guess the next thing would be to test it on a few more platforms and also > to see if we need to expand the coverage of libpq for the intended uses. Nice. It works fine on my FreeBSD battlestation after "sudo pkg install p5-FFI-Platypus"

Re: Row pattern recognition

2023-09-02 Thread Tatsuo Ishii
> Hi, > > The patches compile & tests run fine but this statement from the > documentation crashes an assert-enabled server: > > SELECT company, tdate, price, max(price) OVER w FROM stock > WINDOW w AS ( > PARTITION BY company > ROWS BETWEEN CURRENT ROW AND UNBOUNDED FOLLOWING > AFTER MATCH SKIP

Re: lockup in parallel hash join on dikkop (freebsd 14.0-current)

2023-09-02 Thread Thomas Munro
I agree that the code lacks barriers. I haven't been able to figure out how any reordering could cause this hang, though, because in these old branches procsignal_sigusr1_handler is used for latch wakeups, and it also calls SetLatch(MyLatch) itself, right at the end. That is, SetLatch() gets

Re: lockup in parallel hash join on dikkop (freebsd 14.0-current)

2023-09-02 Thread Alexander Lakhin
Hello Robert, 01.09.2023 23:21, Robert Haas wrote: On Fri, Sep 1, 2023 at 6:13 AM Alexander Lakhin wrote: (Placing "pg_compiler_barrier();" just after "waiting = true;" fixed the issue for us.) Maybe it'd be worth trying something stronger, like pg_memory_barrier(). A compiler barrier

Re: Initdb-time block size specification

2023-09-02 Thread Tomas Vondra
On 9/1/23 16:57, Robert Haas wrote: > On Thu, Aug 31, 2023 at 2:32 PM David Christensen > wrote: >> Here's a patch atop the series which converts to 16-bit uints and >> passes regressions, but I don't consider well-vetted at this point. > > For what it's worth, my gut reaction to this patch

Re: Inefficiency in parallel pg_restore with many tables

2023-09-02 Thread Nathan Bossart
On Fri, Sep 01, 2023 at 01:52:48PM -0700, Nathan Bossart wrote: > On Fri, Sep 01, 2023 at 04:00:44PM -0400, Robert Haas wrote: >> In hindsight, I think that making binaryheap depend on Datum was a bad >> idea. I think that was my idea, and I think it wasn't very smart. >> Considering that people

Re: Query execution in Perl TAP tests needs work

2023-09-02 Thread Andrew Dunstan
On 2023-08-30 We 21:29, Thomas Munro wrote: On Thu, Aug 31, 2023 at 10:32 AM Andrew Dunstan wrote: #!/usr/bin/perl use strict; use warnings; use FFI::Platypus; my $ffi = FFI::Platypus->new(api=>1); $ffi->lib("inst/lib/libpq.so"); $ffi->type('opaque' => 'PGconn'); $ffi->attach(PQconnectdb

Re: Row pattern recognition

2023-09-02 Thread Erik Rijkers
Op 9/2/23 om 08:52 schreef Tatsuo Ishii: Attached is the v5 patch. Differences from previous patch include: Hi, The patches compile & tests run fine but this statement from the documentation crashes an assert-enabled server: SELECT company, tdate, price, max(price) OVER w FROM stock

Re: Add tracking of backend memory allocated to pg_stat_activity

2023-09-02 Thread Ted Yu
On Thu, Aug 31, 2023 at 9:19 AM John Morris wrote: > Here is an updated version of the earlier work. > > This version: >1) Tracks memory as requested by the backend. >2) Includes allocations made during program startup. >3) Optimizes the "fast path" to only update two local

Re: Impact of checkpointer during pg_upgrade

2023-09-02 Thread Dilip Kumar
On Sat, Sep 2, 2023 at 10:09 AM Amit Kapila wrote: > > During pg_upgrade, we start the server for the old cluster which can > allow the checkpointer to remove the WAL files. It has been noticed > that we do generate certain types of WAL records (e.g > XLOG_RUNNING_XACTS, XLOG_CHECKPOINT_ONLINE,

Re: Avoid a possible null pointer (src/backend/utils/adt/pg_locale.c)

2023-09-02 Thread Ranier Vilela
Em sex., 1 de set. de 2023 às 17:17, Robert Haas escreveu: > On Fri, Sep 1, 2023 at 11:47 AM Ranier Vilela wrote: > > If a null locale is reached in these paths. > > elog will dereference a null pointer. > > True. That's sloppy coding. > > I don't know enough about this code to be sure whether

Re: Incremental View Maintenance, take 2

2023-09-02 Thread Tatsuo Ishii
> attached is my refactor. there is some whitespace errors in the > patches, you need use > git apply --reject --whitespace=fix > basedon_v29_matview_c_refactor_update_set_clause.patch > > Also you patch cannot use git apply, i finally found out bulk apply I have no problem with applying Yugo's

Re: generate syscache info automatically

2023-09-02 Thread John Naylor
I wrote: > + # XXX This one neither, but if I add it to @skip, PerfectHash will fail. (???) > + #FIXME: AttributeRelationId > > I took a quick look at this, and attached is the least invasive way to get it working for now, which is to bump the table size slightly. The comment says doing this

Re: Row pattern recognition

2023-09-02 Thread Tatsuo Ishii
Attached is the v5 patch. Differences from previous patch include: * Resolve complaint from "PostgreSQL Patch Tester" https://commitfest.postgresql.org/44/4460/ - Change gram.y to use PATTERN_P instead of PATTERN. Using PATTERN seems to make trouble with Visual Studio build. : :