Re: PostgreSQL 15 release announcement draft

2022-09-12 Thread Justin Pryzby
On Mon, Sep 12, 2022 at 12:52:49PM -0400, Jonathan S. Katz wrote: > sorted. Using `row_number()`, `rank()`, and `count()` as > [window functions](https://www.postgresql.org/docs/15/functions-window.html) > also have performance benefits in PostgreSQL 15, and queries using Remove "using" ? > certa

Re: pg15b4: FailedAssertion("TransactionIdIsValid(xmax)

2022-09-11 Thread Justin Pryzby
On Mon, Sep 12, 2022 at 02:25:48PM +1200, Thomas Munro wrote: > On Mon, Sep 12, 2022 at 1:42 PM Justin Pryzby wrote: > > On Mon, Sep 12, 2022 at 10:44:38AM +1200, Thomas Munro wrote: > > > On Sat, Sep 10, 2022 at 5:44 PM Justin Pryzby > > > wrote: > > > >

Re: pg15b4: FailedAssertion("TransactionIdIsValid(xmax)

2022-09-11 Thread Justin Pryzby
On Mon, Sep 12, 2022 at 10:44:38AM +1200, Thomas Munro wrote: > On Sat, Sep 10, 2022 at 5:44 PM Justin Pryzby wrote: > > < 2022-09-09 19:37:25.835 CDT telsasoft >ERROR: MultiXactId 133553154 has > > not been created yet -- apparent wraparound > > I guess what happene

Re: Background writer and checkpointer in crash recovery

2022-09-11 Thread Justin Pryzby
On Tue, Aug 03, 2021 at 02:19:22PM +1200, Thomas Munro wrote: > On Tue, Aug 3, 2021 at 9:52 AM Thomas Munro wrote: > > On Tue, Aug 3, 2021 at 1:17 AM Robert Haas wrote: > > > That's great. I just realized that this leaves us with identical > > > RequestCheckpoint() calls in two nearby places. Is

Re: Bump MIN_WINNT to 0x0600 (Vista) as minimal runtime in 16~

2022-09-10 Thread Justin Pryzby
On Sun, Sep 11, 2022 at 09:28:54AM +0900, Michael Paquier wrote: > On Fri, Sep 09, 2022 at 08:11:09PM +0900, Michael Paquier wrote: > > Based on what I can see, the Windows animals seem to have digested > > 47bd0b3 (cygwin, MinGW and MSVC), so I think that we are good. > > The last part that's wor

Re: Mingw task for Cirrus CI

2022-09-10 Thread Justin Pryzby
On Mon, Sep 05, 2022 at 04:52:17PM -0700, Andres Freund wrote: > I don't think you should need to use --host, that indicates cross compiling, This made me consider the idea of cross-compiling for windows under a new linux task, and then running tests under Windows with a dependent task. I suppose

Re: CI and test improvements

2022-09-10 Thread Justin Pryzby
On Sun, Aug 28, 2022 at 02:28:02PM -0700, Andres Freund wrote: > On 2022-08-28 12:10:29 -0500, Justin Pryzby wrote: > > On Sun, Aug 28, 2022 at 09:07:52AM -0700, Andres Freund wrote: > > > > --- /dev/null > > > > +++ b/src/tools/ci/windows-compiler-warnings >

Re: preserve timestamps when installing headers

2022-09-10 Thread Justin Pryzby
On Fri, Sep 09, 2022 at 10:23:57PM +0300, Heikki Linnakangas wrote: > On 11/01/2022 00:03, Tom Lane wrote: > > Peter Eisentraut writes: > > > I don't think preserving timestamps should be the default behavior, but > > > I would support organizing things so that additional options can be > > > pass

Re: pg15b4: FailedAssertion("TransactionIdIsValid(xmax)

2022-09-09 Thread Justin Pryzby
The OOM was at: < 2022-09-09 19:34:24.043 CDT >LOG: server process (PID 14841) was terminated by signal 9: Killed The first SIGABRT was at: < 2022-09-09 19:37:31.650 CDT >LOG: server process (PID 7363) was terminated by signal 6: Aborted And I've just found a bunch of "interesting" logs bet

Re: pg15b4: FailedAssertion("TransactionIdIsValid(xmax)

2022-09-09 Thread Justin Pryzby
On Sat, Sep 10, 2022 at 12:07:30PM +0800, Zhang Mingli wrote: > That’s interesting, dig into it for a while but not too much progress. > > Maybe we could add some logs to print MultiXactMembers’ xid and status if xid > is 0. > > Inside MultiXactIdGetUpdateXid() > > ``` > nmembers = GetMul

Re: pg15b4: FailedAssertion("TransactionIdIsValid(xmax)

2022-09-09 Thread Justin Pryzby
On Fri, Sep 09, 2022 at 09:06:37PM -0500, Justin Pryzby wrote: > #0 0x7fb8a22f31f7 in raise () from /lib64/libc.so.6 > #1 0x7fb8a22f48e8 in abort () from /lib64/libc.so.6 > #2 0x0098f9be in ExceptionalCondition > (conditionName=conditionName@entry=0x9fada4 "Tra

pg15b4: FailedAssertion("TransactionIdIsValid(xmax)

2022-09-09 Thread Justin Pryzby
The sequence of events leading up to this: 0) Yesterday I upgraded an internal VM to pg15b4 using PGDG RPMs; It's the same VM that hit the prefetch_recovery bug which was fixed by adb466150. I don't think that should've left it in a weird state (since recovery was sucessful when prefetch

Re: Making autovacuum logs indicate if insert-based threshold was the triggering condition

2022-09-09 Thread Justin Pryzby
On Sat, Aug 06, 2022 at 04:09:28PM -0700, Peter Geoghegan wrote: > What are the chances that both thresholds will be crossed at *exactly* > (not approximately) the same time in a real world case, where the > table isn't tiny (tiny relative to the "autovacuum_naptime quantum")? > This is a very narr

Re: Add the ability to limit the amount of memory that can be allocated to backends.

2022-09-09 Thread Justin Pryzby
On Sat, Sep 03, 2022 at 11:40:03PM -0400, Reid Thompson wrote: > > > +   0, 0, INT_MAX, > > > +   NULL, NULL, NULL > > I think this needs a maximum like INT_MAX/1024/1024 > > Is this noting that we'd set a ceiling of 2048MB? The reason is that you're later multiplying it b

Re: Add tracking of backend memory allocated to pg_stat_activity

2022-09-09 Thread Justin Pryzby
On Fri, Sep 09, 2022 at 12:34:15PM -0400, Stephen Frost wrote: > > While we are at it, what do you think about also recording the max memory > > allocated by a backend? (could be useful and would avoid sampling for which > > there is no guarantee to sample the max anyway). FYI, that's already kind

Re: ICU for global collation

2022-09-09 Thread Justin Pryzby
In pg14: |postgres=# create database a LC_COLLATE C LC_CTYPE C LOCALE C; |ERROR: conflicting or redundant options |DETAIL: LOCALE cannot be specified together with LC_COLLATE or LC_CTYPE. In pg15: |postgres=# create database a LC_COLLATE "en_US.UTF-8" LC_CTYPE "en_US.UTF-8" LOCALE "en_US.UTF-8"

Re: pg_upgrade generated files in subdir follow-up

2022-09-09 Thread Justin Pryzby
;Checking for invalid \"sql_identifier\" user columns"); - snprintf(output_path, sizeof(output_path), "tables_using_sql_identifier.txt"); + snprintf(output_path, sizeof(output_path), "%s/%s", + log_opts.basedir, + "tables_using_sql_identifier.txt"

Re: list of acknowledgments for PG15

2022-09-08 Thread Justin Pryzby
On Thu, Sep 08, 2022 at 11:39:43PM +0800, Japin Li wrote: > > On Thu, 08 Sep 2022 at 20:13, Peter Eisentraut > wrote: > > Attached is the plain-text list of acknowledgments for the PG15 release > > notes, current through REL_15_BETA4. Please check for problems such as > > wrong sorting, dupli

Re: Bump MIN_WINNT to 0x0600 (Vista) as minimal runtime in 16~

2022-09-08 Thread Justin Pryzby
On Thu, Sep 08, 2022 at 05:55:40PM +0900, Michael Paquier wrote: > On Tue, Aug 30, 2022 at 01:29:24PM +1200, Thomas Munro wrote: > > This reminds me of 24c3ce8f1, which replaced a dlopen()-ish thing with > > a direct function call. Can you just call all these functions > > directly these days? >

Re: Add SPLIT PARTITION/MERGE PARTITIONS commands

2022-09-08 Thread Justin Pryzby
On Thu, Sep 08, 2022 at 02:35:24PM +0300, Dmitry Koval wrote: > Thanks a lot Justin! > > After compilation PostgreSQL+patch with macros > RELCACHE_FORCE_RELEASE, > RANDOMIZE_ALLOCATED_MEMORY, > I saw a problem on Windows 10, MSVC2019. Yes, it passes tests on my CI improvements branch. https://git

Re: Add SPLIT PARTITION/MERGE PARTITIONS commands

2022-09-07 Thread Justin Pryzby
On Wed, Sep 07, 2022 at 08:03:09PM +0300, Dmitry Koval wrote: > Hi! > > Patch stop applying due to changes in upstream. > Here is a rebased version. This crashes on freebsd with -DRELCACHE_FORCE_RELEASE https://cirrus-ci.com/task/6565371623768064 https://cirrus-ci.com/task/6145355992530944 Note

Re: [postgis-devel] PostGIS and json_categorize_type (Re: pgsql: Revert SQL/JSON features)

2022-09-07 Thread Justin Pryzby
On Wed, Sep 07, 2022 at 11:07:35AM +0200, Christoph Berg wrote: > I guess either PostgreSQL or PostGIS need to make a new release to fix that. Postgis is already planning on it. https://lists.osgeo.org/pipermail/postgis-devel/2022-September/thread.html -- Justin

Re: Different compression methods for FPI

2022-09-07 Thread Justin Pryzby
On Wed, Sep 07, 2022 at 03:29:08PM +0900, Michael Paquier wrote: > At the end, I have not taken the approach to use errdetail() for this > problem as errormsg_buf is designed to include an error string. So, I > have finished by refining the error messages generated in > RestoreBlockImage(), consum

Re: pg_upgrade major version compatibility

2022-09-06 Thread Justin Pryzby
On Tue, Sep 06, 2022 at 01:50:10PM +0200, Christoph Berg wrote: > The pg_upgrade manpage in PG 14 and earlier claims that upgrades from > 8.4 are supported, but that doesn't work: Tom discovered 2 months ago that this was broken since a year prior. https://www.postgresql.org/message-id/1973418.16

Re: New docs chapter on Transaction Management and related changes

2022-09-06 Thread Justin Pryzby
On Tue, Sep 06, 2022 at 04:16:02PM +0100, Simon Riggs wrote: > New chapter on transaction management, plus a few related changes. > > Markup and links are not polished yet, so please comment initially on > the topics, descriptions and wording. This is useful. Nitpicks follow. +If execu

Re: doc: mentioned CREATE+ATTACH PARTITION as an alternative to CREATE TABLE..PARTITION OF

2022-09-05 Thread Justin Pryzby
fail tests", but I still wonder if I'm missing something.. commit 723fa7df82f39aed5d58e5e52ba80caa8cb13515 Author: Justin Pryzby Date: Mon Jul 18 09:24:55 2022 -0500 doc: mention CREATE+ATTACH PARTITION as an alternative to CREATE TABLE..PARTITION OF In v12, 898e5e329 (Allow ATTACH PAR

Re: pg_upgrade allows itself to be run twice

2022-09-05 Thread Justin Pryzby
de, I propose to prohibit all changes. I'd consider allowing an "inclusive" list of allowable changes, if someone were to propose such a thing - but since DBs are dropped, I'm not sure what it could include. >From 7958ec4b13e9dc581f69df65933789274de499b4 Mon Sep 17 00:00:00 2001 Fr

Re: Table AM modifications to accept column projection lists

2022-09-05 Thread Justin Pryzby
On Mon, Sep 05, 2022 at 05:38:51PM +0300, Nikita Malakhov wrote: > Due to experiments with columnar data storage I've decided to revive this > thread - Table AM modifications to accept column projection lists >

Re: Different compression methods for FPI

2022-09-05 Thread Justin Pryzby
On Mon, Sep 05, 2022 at 02:45:57PM +0200, Matthias van de Meent wrote: > Hi, > > I have a small question for those involved: I suggest to "reply all" > Context: I'm trying to get the smallest BKPIMAGE size possible > regardless of CPU cost, which means I'm trying multiple compressions > to get t

Re: Mingw task for Cirrus CI

2022-09-05 Thread Justin Pryzby
On Sat, Sep 03, 2022 at 12:52:54AM +0300, Melih Mutlu wrote: > Justin Pryzby , 19 Ağu 2022 Cum, 05:34 tarihinde şunu > yazdı: > > > Inline notes about changes since the last version. > > > > On Thu, Jul 28, 2022 at 05:44:28PM -0500, Justin Pryzby wrote: > > >

Re: explain_regress, explain(MACHINE), and default to explain(BUFFERS) (was: BUFFERS enabled by default in EXPLAIN (ANALYZE))

2022-09-05 Thread Justin Pryzby
On Tue, Jul 26, 2022 at 03:38:53PM -0700, David G. Johnston wrote: > On Mon, Jan 24, 2022 at 9:54 AM Justin Pryzby wrote: > > > Unfortunately, "COSTS OFF" breaks postgres_fdw remote_estimate. If > > > specifying > > > "COSTS ON" in post

Re: Different compression methods for FPI

2022-09-04 Thread Justin Pryzby
On Fri, Sep 02, 2022 at 06:55:11AM -0500, Justin Pryzby wrote: > On Sun, Jun 13, 2021 at 08:24:12PM -0500, Justin Pryzby wrote: > > In this patch series, I added compression information to the errcontext from > > xlog_block_info(), and allow specifying compression levels like zli

Re: warn if GUC set to an invalid shared library

2022-09-02 Thread Justin Pryzby
On Fri, Jul 22, 2022 at 03:26:47PM -0400, Tom Lane wrote: > Justin Pryzby writes: > > On Fri, Jul 22, 2022 at 03:00:23PM -0400, Tom Lane wrote: > >> Shouldn't you be doing this when the source is PGC_S_TEST, instead? > > > That makes sense, but it doesn

Re: Fix possible bogus array out of bonds (src/backend/access/brin/brin_minmax_multi.c)

2022-09-02 Thread Justin Pryzby
On Mon, Aug 29, 2022 at 10:06:55AM +0900, Kyotaro Horiguchi wrote: > At Fri, 26 Aug 2022 10:28:50 -0300, Ranier Vilela wrote > in > > At function has_matching_range, if variable ranges->nranges == 0, > > we exit quickly with a result equal to false. > > > > This means that nranges can be zero.

Re: SQL/JSON features for v15

2022-09-02 Thread Justin Pryzby
On Wed, Aug 31, 2022 at 03:51:18PM +0900, Amit Langote wrote: > Finally, I get this warning: > > execExprInterp.c: In function ‘ExecJsonCoerceCStringToText’: > execExprInterp.c:4765:3: warning: missing braces around initializer > [-Wmissing-braces] >NameData encoding = {0}; >^ > execExprIn

Re: [Proposal] Fully WAL logged CREATE DATABASE - No Checkpoints

2022-09-02 Thread Justin Pryzby
On Tue, Aug 02, 2022 at 12:50:43PM -0500, Justin Pryzby wrote: > Also, if I understand correctly, this patch seems to assume that nobody is > connected to the source database. But what's actually enforced is just that > nobody *else* is connected. Is it any issue that the current

Re: Different compression methods for FPI

2022-09-02 Thread Justin Pryzby
On Sun, Jun 13, 2021 at 08:24:12PM -0500, Justin Pryzby wrote: > In this patch series, I added compression information to the errcontext from > xlog_block_info(), and allow specifying compression levels like zlib-2. I'll > rearrange that commit earlier if we decide that's d

Re: pg15b3: recovery fails with wal prefetch enabled

2022-08-31 Thread Justin Pryzby
On Thu, Sep 01, 2022 at 05:35:23PM +1200, Thomas Munro wrote: > So it *looks* like it finished early (and without the expected > error?). But it also looks like it replayed that record, according to > the page LSN. So which is it? Could you recompile with WAL_DEBUG > defined in pg_config_manual.

Re: FOR EACH ROW triggers, on partitioend tables, with indexes?

2022-08-31 Thread Justin Pryzby
On Thu, Sep 01, 2022 at 04:19:37PM +1200, David Rowley wrote: > On Sat, 20 Aug 2022 at 09:18, Justin Pryzby wrote: > > Is it somwhow possible to call CreateTrigger() to create a FOR EACH ROW > > trigger, with an index, and not internally ? > > I've been looking over

Re: pg15b3: recovery fails with wal prefetch enabled

2022-08-31 Thread Justin Pryzby
On Thu, Sep 01, 2022 at 04:22:20PM +1200, Thomas Munro wrote: > On Thu, Sep 1, 2022 at 3:08 PM Kyotaro Horiguchi > wrote: > > At Thu, 1 Sep 2022 12:05:36 +1200, Thomas Munro > > wrote in > > > On Thu, Sep 1, 2022 at 2:01 AM Justin Pryzby wrote: > > > &

Re: pg15b3: recovery fails with wal prefetch enabled

2022-08-31 Thread Justin Pryzby
Some more details, in case they're important: First: the server has wal_compression=zstd (I wonder if something doesn't allow/accomodate compressed FPI?) I thought to mention that after compiling pg15 locally and forgetting to use --with-zstd. I compiled it to enable your debug logging, which wr

Re: pg15b3: recovery fails with wal prefetch enabled

2022-08-31 Thread Justin Pryzby
On Thu, Sep 01, 2022 at 12:05:36PM +1200, Thomas Munro wrote: > On Thu, Sep 1, 2022 at 2:01 AM Justin Pryzby wrote: > > < 2022-08-31 08:44:10.495 CDT >LOG: checkpoint starting: end-of-recovery > > immediate wait > > < 2022-08-31 08:44:10.609 CDT >L

Re: PostgreSQL 15 release announcement draft

2022-08-31 Thread Justin Pryzby
On Tue, Aug 30, 2022 at 03:58:48PM -0400, Jonathan S. Katz wrote: > In this latest release, PostgreSQL improves on its in-memory and on-disk > sorting > algorithms, with benchmarks showing speedups of 25% - 400% based on sort > types. rather than "based on": "depending on the data types being s

Re: Add the ability to limit the amount of memory that can be allocated to backends.

2022-08-31 Thread Justin Pryzby
On Wed, Aug 31, 2022 at 12:50:19PM -0400, Reid Thompson wrote: > Hi Hackers, > > Add the ability to limit the amount of memory that can be allocated to > backends. > > This builds on the work that adds backend memory allocated to > pg_stat_activity > https://www.postgresql.org/message-id/67bb5c15

Re: Add tracking of backend memory allocated to pg_stat_activity

2022-08-31 Thread Justin Pryzby
On Wed, Aug 31, 2022 at 12:03:06PM -0400, Reid Thompson wrote: > Hi Hackers, > > Attached is a patch to > Add tracking of backend memory allocated to pg_stat_activity > + proargmodes => > '{i,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o}', In the past, there was concern about

pg15b3: recovery fails with wal prefetch enabled

2022-08-31 Thread Justin Pryzby
An internal VM crashed last night due to OOM. When I tried to start postgres, it failed like: < 2022-08-31 08:44:10.495 CDT >LOG: checkpoint starting: end-of-recovery immediate wait < 2022-08-31 08:44:10.609 CDT >LOG: request to flush past end of generated WAL; request 1201/1CAF84F0, curren

Re: shadow variables - pg15 edition

2022-08-29 Thread Justin Pryzby
On Wed, Aug 24, 2022 at 10:47:31PM +1200, David Rowley wrote: > I really think #2s should be done last. I'm not as comfortable with > the renaming and we might want to discuss tactics on that. We could > either opt to rename the shadowed or shadowing variable, or both. If > we rename the shadowing

Re: CI and test improvements

2022-08-28 Thread Justin Pryzby
27;s zstd-1. > This does too much at once. Show stats, change cache sizes, disable > compression. The cache size change is related to the compression level change; ccache prunes based on the local size, which was compressed with zstd-1 and, with this patch, not compressed (so ~2x larger).

Re: [RFC] building postgres with meson - v12

2022-08-28 Thread Justin Pryzby
with_temp_install is repeated twice in prove_check: > Subject: [PATCH v12 02/15] Split TESTDIR into TESTLOGDIR and TESTDATADIR > > > - TESTDIR='$(CURDIR)/tmp_check' $(with_temp_install) > PGPORT='6$(DEF_PGPORT)' \ > + TESTLOGDIR='$(CURDIR)/tmp_check/log' $(with_temp_install) \ >

Re: CI and test improvements

2022-08-28 Thread Justin Pryzby
Resending with a problematic address removed... On Sat, May 28, 2022 at 10:37:41AM -0500, Justin Pryzby wrote: > I'm anticipating the need to further re-arrange the patch set - it's not clear > which patches should go first. Maybe some patches should be dropped in favour > o

Re: Add 64-bit XIDs into PostgreSQL 15

2022-08-26 Thread Justin Pryzby
On Wed, Jan 05, 2022 at 06:12:26PM -0600, Justin Pryzby wrote: > On Wed, Jan 05, 2022 at 06:51:37PM -0500, Bruce Momjian wrote: > > On Tue, Jan 4, 2022 at 10:22:50PM +, Finnerty, Jim wrote: > > > I'm concerned about the maintainability impact of having 2 new > >

windows cfbot failing: my_perl

2022-08-26 Thread Justin Pryzby
The last 20 some consecutive builds failed: https://cirrus-ci.com/github/postgresql-cfbot/postgresql like this: [09:29:27.711] C:\Program Files (x86)\Windows Kits\10\Include\10.0.20348.0\ucrt\malloc.h(159,17): error C2065: 'my_perl': undeclared identifier (compiling source file src/pl/plperl/SPI

Re: Bump MIN_WINNT to 0x0600 (Vista) as minimal runtime in 16~

2022-08-26 Thread Justin Pryzby
On Thu, Jul 07, 2022 at 01:56:39PM +0900, Michael Paquier wrote: > On Thu, Jul 07, 2022 at 09:11:57AM +0900, Michael Paquier wrote: > > Okay, thanks for confirming. I think that I'll give it a try today > > then, my schedule would fit nicely with the buildfarm monitoring. > > And I have applied t

Re: shadow variables - pg15 edition

2022-08-24 Thread Justin Pryzby
On Wed, Aug 24, 2022 at 10:47:31PM +1200, David Rowley wrote: > On Wed, 24 Aug 2022 at 14:39, Justin Pryzby wrote: > > Attached are half of the remainder of what I've written, ready for review. > > Thanks for the patches. > 4. "Repurpose" (variables have the

Re: shadow variables - pg15 edition

2022-08-24 Thread Justin Pryzby
On Wed, Aug 24, 2022 at 10:47:31PM +1200, David Rowley wrote: > I was hoping we'd already caught all of the #1s in 421892a19, but I > caught a few of those in some of your other patches. One you'd done > another way and some you'd done the rescope but just put it in the > wrong patch. The others h

Re: shadow variables - pg15 edition

2022-08-23 Thread Justin Pryzby
On Wed, Aug 24, 2022 at 12:37:29PM +1200, David Rowley wrote: > On Tue, 23 Aug 2022 at 14:14, Justin Pryzby wrote: > > Actually, they didn't sneak in - what I sent are the patches which are > > ready to > > be reviewed, excluding the set of "this" and &q

Re: shadow variables - pg15 edition

2022-08-22 Thread Justin Pryzby
On Tue, Aug 23, 2022 at 01:38:40PM +1200, David Rowley wrote: > On Tue, 23 Aug 2022 at 13:17, Justin Pryzby wrote: > > Attached is a squished version. > > I see there's some renaming ones snuck in there. e.g: > ... in fact, there's lots of renaming, so I'll j

Re: shadow variables - pg15 edition

2022-08-22 Thread Justin Pryzby
On Sat, Aug 20, 2022 at 09:17:41PM +1200, David Rowley wrote: > On Fri, 19 Aug 2022 at 16:28, Justin Pryzby wrote: > > Let me know what I can do when it's time for round two. > > I pushed the modified 0001-0008 patches earlier today and also the one > I wrote to fixu

Re: Schema variables - new implementation for Postgres 15

2022-08-22 Thread Justin Pryzby
> +-- test on query with workers > +CREATE TABLE svar_test(a int); > +INSERT INTO svar_test SELECT * FROM generate_series(1,100); When I looked at this, I noticed this huge table. I don't think you should create such a large table just for this. To exercise parallel workers with a smaller ta

FOR EACH ROW triggers, on partitioend tables, with indexes?

2022-08-19 Thread Justin Pryzby
On Wed, Aug 17, 2022 at 09:54:34AM -0500, Justin Pryzby wrote: > But an unfortunate consequence of not fixing the historic issues is that it > precludes the possibility that anyone could be expected to notice if they > introduce more instances of the same problem (as in the first half

Re: Use array as object (src/fe_utils/parallel_slot.c)

2022-08-19 Thread Justin Pryzby
On Fri, Aug 19, 2022 at 03:52:36PM -0300, Ranier Vilela wrote: > Em qui., 11 de ago. de 2022 às 09:52, Ranier Vilela > escreveu: > > > Hi, > > > > One other case suspicious, which I think deserves a conference. > > At function wait_on_slots (src/fe_utils/parallel_slot.c) > > The variable "slots"

Re: MERGE and parsing with prepared statements

2022-08-19 Thread Justin Pryzby
On Fri, Aug 12, 2022 at 01:53:25PM +0200, Alvaro Herrera wrote: > On 2022-Aug-12, Simon Riggs wrote: > > > Sorry, but I disagree with this chunk in the latest commit, > > specifically, changing the MATCHED from after to before the NOT > > MATCHED clause. 3d895bc84 also moved a semicolon into the

Re: shadow variables - pg15 edition

2022-08-18 Thread Justin Pryzby
On Fri, Aug 19, 2022 at 03:37:52PM +1200, David Rowley wrote: > I'm happy for you to take that. I'd just rather not be batting such trivial > patches over the fence at each other for days or weeks. Yes, thanks for that. I read through your patch, which looks fine. Let me know what I can do when it

Re: Mingw task for Cirrus CI

2022-08-18 Thread Justin Pryzby
Inline notes about changes since the last version. On Thu, Jul 28, 2022 at 05:44:28PM -0500, Justin Pryzby wrote: > I think the "only_if" should allow separately running one but not both of the > windows instances, like: > > + only_if: $CIRRUS_CHANGE_MESSA

Re: Cirrus CI (Windows help wanted)

2022-08-18 Thread Justin Pryzby
On Thu, Aug 18, 2022 at 06:09:39PM -0700, Andres Freund wrote: > > But look: https://cirrus-ci.com/task/4953593575899136 > > Why is the build phase so slow in that image? 12min? That's way slower than > the windows builds normally. Because I'd just rebased it, and it's using ccache, which I menti

Re: Cirrus CI (Windows help wanted)

2022-08-18 Thread Justin Pryzby
> > Not sure what the problem here is - it worked for me in the past. I reported the problem to Fedor at cirrusci who had to fix something. It works now. On Wed, Aug 03, 2022 at 09:06:05PM -0700, Andres Freund wrote: > On 2022-07-28 17:23:19 -0500, Justin Pryzby wrote: > > I think

Re: shadow variables - pg15 edition

2022-08-18 Thread Justin Pryzby
On Thu, Aug 18, 2022 at 07:27:09PM +1200, David Rowley wrote: > 0001. I'd also rather see these 4 renamed: .. > 0002. I don't really like the "my" name. I also see you've added the .. > How about just "tinfo"? .. > 0005. How about just "tslot". I'm not a fan of "this". .. > Since I'm not a fan of "

Re: pg15b3: crash in parallel vacuum

2022-08-18 Thread Justin Pryzby
On Thu, Aug 18, 2022 at 09:52:36AM -0500, Justin Pryzby wrote: > On Thu, Aug 18, 2022 at 11:24:22PM +0900, Masahiko Sawada wrote: > > The status = 11 is invalid value. Probably because indstats was not > > initialized to 0 as I mentioned. > > > > Justin, if it's

Re: pg15b3: crash in paralell vacuum

2022-08-18 Thread Justin Pryzby
On Thu, Aug 18, 2022 at 11:24:22PM +0900, Masahiko Sawada wrote: > The status = 11 is invalid value. Probably because indstats was not > initialized to 0 as I mentioned. > > Justin, if it's reproducible in your environment, could you please try > it again with the attached patch? Yes, this seems

Re: pg15b3: crash in paralell vacuum

2022-08-18 Thread Justin Pryzby
On Thu, Aug 18, 2022 at 08:34:06AM -0500, Justin Pryzby wrote: > Unfortunately, it looks like the RPM packages are compiled with -O2, so this > is > of limited use. So I'll be back shortly with more... #3 0x006874f1 in parallel_vacuum_process_all_indexes

pg15b3: crash in paralell vacuum

2022-08-18 Thread Justin Pryzby
Immediately after upgrading an internal instance, a loop around "vacuum" did this: TRAP: FailedAssertion("indstats->status == PARALLEL_INDVAC_STATUS_INITIAL", File: "vacuumparallel.c", Line: 611, PID: 27635) postgres: postgres pryzbyj [local] VACUUM(ExceptionalCondition+0x8d)[0x99d9fd] postgres:

Re: shadow variables - pg15 edition

2022-08-17 Thread Justin Pryzby
On Thu, Aug 18, 2022 at 03:17:33PM +1200, David Rowley wrote: > I'm probably not the only committer to want to run a mile when they > see someone posting 17 or 26 patches in an email. So maybe "bang for > buck" is a better method for getting the ball rolling here. As you > know, I was recently bit

Re: shadow variables - pg15 edition

2022-08-17 Thread Justin Pryzby
bikeshedded to death and derail without having fixed the lowest hanging fruits. I'm attaching them those now to see what happens. >From 97768e5a439bef016e6ebd5221ed148f076c6e3f Mon Sep 17 00:00:00 2001 From: Justin Pryzby Date: Tue, 16 Aug 2022 19:38:57 -0500 Subject: [PATCH 01/26] avoi

shadow variables - pg15 edition

2022-08-17 Thread Justin Pryzby
l as cleanliness and readability (rather than allowing it to get harder to use -Wshadow). -- Justin >From 0b05b375a87d89f5d88e87d11956cf2ac15ea00f Mon Sep 17 00:00:00 2001 From: Justin Pryzby Date: Tue, 16 Aug 2022 19:38:57 -0500 Subject: [PATCH 01/17] avoid shadow vars: pg_dump.c: i_oid b

Re: Add proper planner support for ORDER BY / DISTINCT aggregates

2022-08-16 Thread Justin Pryzby
On Tue, Aug 02, 2022 at 11:21:04PM +1200, David Rowley wrote: > I've now pushed the patch. I've not studied the patch at all. But in a few places, it removes the locally-computed group_pathkeys: - List *group_pathkeys = root->group_pathkeys; However it doesn't do tha

Re: [patch]HashJoin crash

2022-08-13 Thread Justin Pryzby
+ Tom Lane On Fri, Aug 12, 2022 at 11:05:06PM +0800, Zhang Mingli wrote: > I got a coredump when using hash join on a Postgres derived > Database(Greenplum DB). > And I find a way to reproduce it on Postgres. > > Root cause: > > In ExecChooseHashTableSize(), commit b154ee63bb uses func pg_nextp

Re: test failure with gcc-12 -O3 -march=native

2022-08-11 Thread Justin Pryzby
On Thu, Aug 11, 2022 at 01:03:43PM -0700, Andres Freund wrote: > Hi, > > For my optimized builds I've long used -O3 -march=native. After one of the On what kind of arch ? > Given that I did not encounter this problem with gcc-12 before, and that > gcc-12 has been released, it seems less likely t

Re: moving basebackup code to its own directory

2022-08-10 Thread Justin Pryzby
On Wed, Aug 10, 2022 at 10:08:02AM -0400, Robert Haas wrote: > On Tue, Aug 9, 2022 at 3:28 PM Robert Haas wrote: > > On Tue, Aug 9, 2022 at 2:40 PM Justin Pryzby wrote: > > > It looks like this updates the header comments in the .h files but not > > > the .c > >

Re: moving basebackup code to its own directory

2022-08-09 Thread Justin Pryzby
On Tue, Aug 09, 2022 at 01:32:49PM -0400, Robert Haas wrote: > On Tue, Aug 9, 2022 at 12:43 PM Magnus Hagander wrote: > >> > So maybe src/backend/backup? Or is that too grandiose for the amount > >> > of stuff we have here? > >> > >> +1 for src/backend/backup. I'd also be happy to see the start/st

Re: support for MERGE

2022-08-09 Thread Justin Pryzby
On Tue, Aug 09, 2022 at 11:48:23AM +0200, Álvaro Herrera wrote: > On 2022-Aug-01, Álvaro Herrera wrote: > > > > > If MERGE attempts an INSERT > > > > and a unique index is present and a duplicate row is concurrently > > > > +inserted, then a uniqueness violation error is raised; > >

Re: 2022-08-11 release announcement draft

2022-08-08 Thread Justin Pryzby
On Mon, Aug 08, 2022 at 11:50:16AM -0400, Jonathan S. Katz wrote: > * Fix [`pg_upgrade`](https://www.postgresql.org/docs/current/pgupgrade.html) > to > detect non-upgradable usages of functions accepting `anyarray` parameters. use or usage > and regressions before the general availability of Pos

Re: Making autovacuum logs indicate if insert-based threshold was the triggering condition

2022-08-06 Thread Justin Pryzby
On Sat, Aug 06, 2022 at 03:41:57PM -0700, Peter Geoghegan wrote: > > > Note that a VACUUM that is an "automatic vacuum for inserted tuples" > > > cannot > > > [...] also be a "regular" autovacuum/VACUUM > > > > Why not ? I think maybe you missed my intent in trimming the "anti-wraparound" part of

Re: Making autovacuum logs indicate if insert-based threshold was the triggering condition

2022-08-06 Thread Justin Pryzby
On Sat, Aug 06, 2022 at 01:03:57PM -0700, Peter Geoghegan wrote: > thresholds. It may be far from obvious which triggering condition > autovacuum.c must have applied to trigger any given autovacuum, since > that information isn't currently passed down to lazyvacuum.c. This > seems like a problem to

Re: Proposal to provide the facility to set binary format output for specific OID's per session

2022-08-05 Thread Justin Pryzby
On Tue, Jul 26, 2022 at 08:11:04AM -0400, Dave Cramer wrote: > Attached patch to correct these deficiencies. You sent a patch to be applied on top of the first patch, but cfbot doesn't know that, so it says the patch doesn't apply. http://cfbot.cputube.org/dave-cramer.html BTW, a previous discuss

Re: Expr. extended stats are skipped with equality operator

2022-08-05 Thread Justin Pryzby
On Fri, Aug 05, 2022 at 04:43:36PM +0300, Danny Shemesh wrote: > 2. Less important, just a minor note - feel free to ignore - although the > eq. operator above seems to be skipped when matching the ext. stats, I can > work around this by using a CASE expression (fiddle >

Re: [Proposal] Fully WAL logged CREATE DATABASE - No Checkpoints

2022-08-04 Thread Justin Pryzby
On Thu, Aug 04, 2022 at 06:02:50PM -0400, Tom Lane wrote: > The "invalidation" comment bothered me for awhile, but I think it's > fine: we know that no other backend can connect to the source DB > because we have it locked, About that - is it any problem that the currently-connected db can be used

Re: [Proposal] Fully WAL logged CREATE DATABASE - No Checkpoints

2022-08-04 Thread Justin Pryzby
On Thu, Aug 04, 2022 at 04:07:01PM -0400, Robert Haas wrote: > I'm inclined to hold off on committing this until next week, not only +1 I don't see any reason to hurry to fix problems that occur when DROP DATABASE is interrupted. Sorry to beat up your patches so much and for such crappy test cas

Re: ERREUR: cache lookup failed for function 0 with PostgreSQL 15 beta 2, no error with PostgreSQL 14.4

2022-08-04 Thread Justin Pryzby
On Thu, Aug 04, 2022 at 01:19:59PM +, Phil Florent wrote: > A DSS developer from my company, Julien Roze, reported me an error I cannot > explained. Is it a new behavior or a bug ? > > Original query is much more complicated but here is a simplified test case > with postgresql 14 and 15 beta

Re: Cygwin cleanup

2022-08-03 Thread Justin Pryzby
On Fri, Jul 29, 2022 at 10:04:04AM +1200, Thomas Munro wrote: > > > XXX We would never want this to run by default in CI, but it'd be nice > > > to be able to ask for it with ci-os-only! (See commented out line) > > > only_if: $CIRRUS_CHANGE_MESSAGE =~ '.*\nci-os-only:[^\n]*cygwin.*' > > > > Does

Re: A test for replay of regression tests

2022-08-03 Thread Justin Pryzby
On Thu, Aug 04, 2022 at 09:24:24AM +1200, Thomas Munro wrote: > On Thu, Aug 4, 2022 at 3:30 AM Justin Pryzby wrote: > > On Thu, Dec 09, 2021 at 12:10:23PM +1300, Thomas Munro wrote: > > > This adds 2 whole minutes to the recovery check, when running with the > > > Win

Re: [Proposal] Fully WAL logged CREATE DATABASE - No Checkpoints

2022-08-03 Thread Justin Pryzby
On Wed, Aug 03, 2022 at 11:26:43AM -0700, Andres Freund wrote: > Hm. This looks more like an issue of DROP DATABASE not being interruptible. I > suspect this isn't actually related to STRATEGY wal_log and could likely be > reproduced in older versions too. I couldn't reproduce it with file_copy, b

Re: [Proposal] Fully WAL logged CREATE DATABASE - No Checkpoints

2022-08-03 Thread Justin Pryzby
On Wed, Aug 03, 2022 at 11:02:00AM -0500, Justin Pryzby wrote: > But I reproduced the first problem with a handful of tries interrupting the > while loop: > > 2022-08-03 10:39:50.129 CDT client backend[5530] [unknown] PANIC: could not > open critical system index 2662 ... >

Re: [Proposal] Fully WAL logged CREATE DATABASE - No Checkpoints

2022-08-03 Thread Justin Pryzby
On Wed, Aug 03, 2022 at 04:45:23PM +0530, Dilip Kumar wrote: > Another version of the patch which closes the smgr at the end using > smgrcloserellocator() and I have also added a commit message. Thanks for providing a patch. This seems to fix the second problem with accessing freed memory. But I

Re: A test for replay of regression tests

2022-08-03 Thread Justin Pryzby
On Thu, Dec 09, 2021 at 12:10:23PM +1300, Thomas Munro wrote: > This adds 2 whole minutes to the recovery check, when running with the > Windows serial-only scripts on Cirrus CI (using Andres's CI patches). > For Linux it adds ~20 seconds to the total of -j8 check-world. > Hopefully that's time wel

Re: [Commitfest 2022-07] is Done!

2022-08-02 Thread Justin Pryzby
On Tue, Aug 02, 2022 at 03:31:14PM -0700, Jacob Champion wrote: > Apologies for dropping entries from cfbot temporarily; that should all be > fixed now (and I've made a note in the wiki for the next CFM). Actually, I think that might happen every CF, no matter what you do. cfbot indexes on (commi

Re: [Proposal] Fully WAL logged CREATE DATABASE - No Checkpoints

2022-08-02 Thread Justin Pryzby
On Tue, Aug 02, 2022 at 05:46:34PM -0400, Tom Lane wrote: > Robert Haas writes: > > WARNING: problem in alloc set PortalContext: req size > alloc size for > > chunk 0x7f99508911f0 in block 0x7f9950890800 > > This looks like nothing so much as the fallout from something scribbling > past the end

Re: [Proposal] Fully WAL logged CREATE DATABASE - No Checkpoints

2022-08-02 Thread Justin Pryzby
On Tue, Mar 29, 2022 at 11:55:05AM -0400, Robert Haas wrote: > On Mon, Mar 28, 2022 at 3:08 PM Robert Haas wrote: > > smgrcreate() as we would for most WAL records or whether it should be > > adopting the new system introduced by > > 49d9cfc68bf4e0d32a948fe72d5a0ef7f464944e. I wrote about this con

Re: using file cloning in create database / initdb

2022-08-01 Thread Justin Pryzby
On Sat, Feb 12, 2022 at 07:37:30PM -0800, Andres Freund wrote: > On 2022-02-12 20:17:46 -0600, Justin Pryzby wrote: > > On Sat, Feb 12, 2022 at 06:00:44PM -0800, Andres Freund wrote: > > > I bet using COW file copies would speed up our own regression tests > > > n

Re: fix typos

2022-08-01 Thread Justin Pryzby
On Mon, Aug 01, 2022 at 08:04:54PM +0200, Erik Rijkers wrote: > Recent typos... LGTM, thanks. Here are some others I've been sitting on, mostly in .c files. -- Justin >From 19f320438476aff2773440447f167d06051a0a47 Mon Sep 17 00:00:00 2001 From: Justin Pryzby Date: Tue, 5 Jul 20

Re: [Commitfest 2022-07] Patch Triage: Waiting on Author

2022-08-01 Thread Justin Pryzby
On Thu, Jul 28, 2022 at 08:58:31AM -0700, Jacob Champion wrote: > On Thu, Jul 28, 2022 at 4:46 AM Andrey Borodin wrote: > > Daniil is working on this, but currently he's on vacation. > > I think we should not mark patch as RwF and move it to next CF instead. > > Is there a downside to marking it

<    1   2   3   4   5   6   7   8   9   10   >