Re: PostgreSQL 15 Beta 4 release announcement draft

2022-09-06 Thread Erik Rijkers
Op 07-09-2022 om 03:40 schreef Jonathan S. Katz: Hi, I've attached a draft of the PostgreSQL 15 Beta 4 release announcement. Please review for correctness and if there are any omissions. Please provide feedback on the draft no later than Sep 8, 2022 0:00 AoE. 'Fixes and changes in

Re: [RFC] building postgres with meson - v12

2022-09-06 Thread Peter Eisentraut
On 02.09.22 18:57, Andres Freund wrote: Is it worth running ninja -t missingdeps as a test? At the time we run tests we'll obviously have built and thus collected "real" dependencies, so we would have the necessary information to determine whether dependencies are missing. I think it'd be fine

Re: [RFC] building postgres with meson - v12

2022-09-06 Thread Peter Eisentraut
On 31.08.22 20:11, Andres Freund wrote: src/port/win32ver.rc.in: This is redundant with src/port/win32ver.rc. (Note that the latter is also used as an input file for text substitution. So having another file named *.in next to it would be super confusing.) Yea, this stuff isn't great. I

Re: Reducing the chunk header sizes on all memory context types

2022-09-06 Thread Tom Lane
David Rowley writes: > It seems a pretty large portion of allocation request sizes are > power-of-2 sized and use AllocSet. No surprise there, we've been programming with aset.c's behavior in mind for ~20 years ... regards, tom lane

RE: pg_publication_tables show dropped columns

2022-09-06 Thread houzj.f...@fujitsu.com
On Wednesday, September 7, 2022 6:01 AM Tom Lane wrote: > Subject: Re: pg_publication_tables show dropped columns > > "houzj.f...@fujitsu.com" writes: > > Here is the new version patch. > > I think the query plan and cost looks better after applying the patch. > > LGTM, pushed. Thanks for

Re: [RFC] building postgres with meson - v11

2022-09-06 Thread Peter Eisentraut
On 02.09.22 19:16, samay sharma wrote: Another thing I'd like input on. A common question I've heard from people who've tried out the docs is How do we do the equivalent of X in make with meson. As meson will be new for a bunch of people who are fluent with make, I won't be surprised if this

Re: [RFC] building postgres with meson - v11

2022-09-06 Thread Peter Eisentraut
On 02.09.22 01:12, samay sharma wrote: So, I was thinking of the following structure: - Supported Platforms - Getting the Source - Building with make and autoconf   -- Short version   -- Requirements   -- Installation Procedure and it's subsections - Building with Meson   -- Short version  

Re: windows resource files, bugs and what do we actually want

2022-09-06 Thread Peter Eisentraut
On 30.08.22 00:13, Andres Freund wrote: 1) For make based builds, all libraries that are built with MODULES rather than MODULES_big have the wrong "FILETYPE", because Makefile.win32 checks $(shlib), which is only set for MODULES_big. This used to be even more widely wrong until

Re: [PATCH] Reuse Workers and Replication Slots during Logical Replication

2022-09-06 Thread Amit Kapila
On Mon, Aug 15, 2022 at 4:56 PM Melih Mutlu wrote: > > Hi Amit, > > Amit Kapila , 6 Ağu 2022 Cmt, 16:01 tarihinde şunu > yazdı: >> >> I think there is some basic flaw in slot reuse design. Currently, we >> copy the table by starting a repeatable read transaction (BEGIN READ >> ONLY ISOLATION

Re: Handle infinite recursion in logical replication setup

2022-09-06 Thread vignesh C
On Tue, 6 Sept 2022 at 15:25, Amit Kapila wrote: > > On Tue, Sep 6, 2022 at 9:31 AM wangw.f...@fujitsu.com > wrote: > > > > On Tues, 6 Sept 2022 at 11:14, vignesh C wrote: > > > Thanks for the comments, the attached patch has the changes for the same. > > > > Thanks for updating the patch. > >

Re: Handle infinite recursion in logical replication setup

2022-09-06 Thread vignesh C
On Tue, 6 Sept 2022 at 09:31, wangw.f...@fujitsu.com wrote: > > On Tues, 6 Sept 2022 at 11:14, vignesh C wrote: > > Thanks for the comments, the attached patch has the changes for the same. > > Thanks for updating the patch. > > Here is one comment for 0001 patch. > 1. The query in function

Re: Handle infinite recursion in logical replication setup

2022-09-06 Thread vignesh C
On Tue, 6 Sept 2022 at 09:31, shiy.f...@fujitsu.com wrote: > > On Tue, Sep 6, 2022 11:14 AM vignesh C wrote: > > > > Thanks for the comments, the attached patch has the changes for the same. > > > > Thanks for updating the patch. Here are some comments. > > 1. > + if (subrel_count) > +

Re: Reducing the chunk header sizes on all memory context types

2022-09-06 Thread David Rowley
On Tue, 6 Sept 2022 at 01:41, David Rowley wrote: > > On Fri, 2 Sept 2022 at 20:11, David Rowley wrote: > > > > On Thu, 1 Sept 2022 at 12:46, Tom Lane wrote: > > > > > > David Rowley writes: > > > > Maybe we should just consider always making room for a sentinel for > > > > chunks that are on

Re: pgsql: Add ALTER SUBSCRIPTION ... SKIP.

2022-09-06 Thread Amit Kapila
On Tue, Sep 6, 2022 at 7:40 PM Masahiko Sawada wrote: > > > > I think they should say something like > > > > > > "logical replication starts skipping transaction with LSN %X/%X" > > > "logical replication completed skipping transaction with LSN %X/%X" > > > > > > > This looks better to me. > > +1

Re: more descriptive message for process termination due to max_slot_wal_keep_size

2022-09-06 Thread Kyotaro Horiguchi
(I noticed I sent a wrong version..) At Tue, 6 Sep 2022 10:54:35 +0200, "Drouvot, Bertrand" wrote in > Thanks for the new patch version!. I did not realized (sorry about > that) that we'd need to expose byte_size_pretty(). Now I wonder if we I didn't think we need the units larger than MB,

RE: test_decoding assertion failure for the loss of top-sub transaction relationship

2022-09-06 Thread kuroda.hay...@fujitsu.com
Dear Amit, Thanks for giving comments! > Did you get this new assertion failure after you applied the patch for > the first failure? Because otherwise, how can you reach it with the > same test case? The first failure is occurred only in the HEAD, so I did not applied the first patch to REL14

Re: PostgreSQL 15 Beta 4 release announcement draft

2022-09-06 Thread David Rowley
On Wed, 7 Sept 2022 at 13:40, Jonathan S. Katz wrote: > Please provide feedback on the draft no later than Sep 8, 2022 0:00 AoE. "* Adjust costing to force parallelism with partition aggregates." If that's about 01474f5698, then it does not need to be mentioned. All that commit does is update

PostgreSQL 15 Beta 4 release announcement draft

2022-09-06 Thread Jonathan S. Katz
Hi, I've attached a draft of the PostgreSQL 15 Beta 4 release announcement. Please review for correctness and if there are any omissions. Please provide feedback on the draft no later than Sep 8, 2022 0:00 AoE. Thanks! Jonathan The PostgreSQL Global Development Group announces that the

Re: pg_auth_members.grantor is bunk

2022-09-06 Thread Jeff Davis
On Tue, 2022-09-06 at 16:26 -0700, Jeff Davis wrote: > In other words, omitting > GRANTED BY is the same as specifying "GRANTED BY current_user". Let me correct this thinko to distinguish between specifying GRANTED BY and not: * Let the granting user be the one specified in the GRANTED BY

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

2022-09-06 Thread Reid Thompson
On Fri, 2022-09-02 at 09:30 +0200, Drouvot, Bertrand wrote: > Hi, > > I'm not sure we are choosing the right victims here (aka the ones > that are doing the request that will push the total over the limit). > > Imagine an extreme case where a single backend consumes say 99% of > the limit,

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

2022-09-06 Thread Reid Thompson
On Thu, 2022-09-01 at 11:48 +0900, Kyotaro Horiguchi wrote: > > > > The patch seems to limit both of memory-context allocations and DSM > > allocations happen on a specific process by the same budget. In the > > fist place I don't think it's sensible to cap the amount of DSM > > allocations by

START_REPLICATION SLOT causing a crash in an assert build

2022-09-06 Thread Jaime Casanova
Hi, I'm not sure what is causing this, but I have seen this twice. The second time without activity after changing the set of tables in a PUBLICATION. gdb says that debug_query_string contains: """ START_REPLICATION SLOT "sub_pgbench" LOGICAL 0/0 (proto_version '3', publication_names

Re: pg_auth_members.grantor is bunk

2022-09-06 Thread Jeff Davis
On Tue, 2022-09-06 at 13:15 -0400, Robert Haas wrote: > Like, the logic to infer the grantor in check_role_grantor() and > select_best_admin() is intended to be, and as far as I know actually > is, an exact clone of the logic in select_best_grantor(). It is > different only in that we regard the

Re: freeing LDAPMessage in CheckLDAPAuth

2022-09-06 Thread Michael Paquier
On Mon, Sep 05, 2022 at 02:50:09AM -0700, Zhihong Yu wrote: > Here is patch v4. FWIW, I am fine with what you are basically doing with v4, so I'd like to apply that on HEAD on the basis of consistency with libpq. As Tom said, this authentication path will fail, but I'd like to think that this is

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.

Re: pg_publication_tables show dropped columns

2022-09-06 Thread Tom Lane
"houzj.f...@fujitsu.com" writes: > Here is the new version patch. > I think the query plan and cost looks better after applying the patch. LGTM, pushed. regards, tom lane

Re: Switching XLog source from archive to streaming when primary available

2022-09-06 Thread Nathan Bossart
+ + wal_source_switch_interval configuration parameter + I don't want to bikeshed on the name too much, but I do think we need something more descriptive. I'm thinking of something like streaming_replication_attempt_interval or streaming_replication_retry_interval. +

Re: HOT chain validation in verify_heapam()

2022-09-06 Thread Robert Haas
On Tue, Sep 6, 2022 at 6:34 AM Himanshu Upadhyaya wrote: >> This isn't safe because the line pointer referenced by rditem may not >> have been sanity-checked yet. Refer to the comment just below where it >> says "Sanity-check the line pointer's offset and length values". >> > handled by creating

Re: Add tracking of backend memory allocated to pg_stat_activity

2022-09-06 Thread Reid Thompson
On Thu, 2022-09-01 at 13:43 +0900, Kyotaro Horiguchi wrote: > > > @@ -916,6 +930,7 @@ AllocSetAlloc(MemoryContext context, Size size) > >    return NULL; > >   > >    context->mem_allocated += blksize; > > + pgstat_report_backend_mem_allocated_increase(blksi >

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

2022-09-06 Thread David Rowley
On Tue, 6 Sept 2022 at 23:25, Ranier Vilela wrote: > But first, I would like to continue with this correction of using strings. > In the following cases: > fprintf -> fputs -> fputc > printf -> puts -> putchar > > There are many occurrences, do you think it would be worth the effort? I'm pretty

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

Re: Adding CI to our tree

2022-09-06 Thread Thomas Munro
On Wed, Oct 6, 2021 at 5:01 PM Thomas Munro wrote: > BTW, on those two OSes there are some messages like this each time a > submake dumps its output to the log: > > [03:36:16.591] fcntl(): Bad file descriptor > > It seems worth putting up with these compared to the alternatives of > either not

Re: Return value of PathNameOpenFile()

2022-09-06 Thread Tom Lane
Daniel Gustafsson writes: > Doh, of course. The attached is a quick (lightly make check tested) take on > allowing 0, but I'm not sure that's what we want? Actually, wait a second. At least some of these are not dealing with kernel FDs but with our "virtual FD" abstraction. For those, zero is

Re: has_privs_of_role vs. is_member_of_role, redux

2022-09-06 Thread Robert Haas
Jeff Davis's comment in http://postgr.es/m/4f8d536a9221bccc5a33bb784dace0ef2310ec4a.ca...@j-davis.com reminds me that I need to update this thread based on the patch posted over there. That patch allows you to grant membership in one role to another while withholding the ability to SET ROLE to the

Re: allowing for control over SET ROLE

2022-09-06 Thread Robert Haas
On Tue, Sep 6, 2022 at 2:45 PM Jeff Davis wrote: > > I'm not sure whether thinking about this in terms of security > > capabilities is the most helpful way to view it. My view was, as you > > say, more mechanical. I think sometimes you grant somebody a role and > > you want them to be able to use

Re: Return value of PathNameOpenFile()

2022-09-06 Thread Daniel Gustafsson
> On 6 Sep 2022, at 16:12, Tom Lane wrote: > > Daniel Gustafsson writes: >> Agreed, zero should be valid as it's a non-negative integer. However, >> callers >> in fd.c are themselves checking for (fd <= 0) in some cases, and some have >> done >> so since the very early days of the codebase,

Re: allowing for control over SET ROLE

2022-09-06 Thread Jeff Davis
On Tue, 2022-09-06 at 10:42 -0400, Robert Haas wrote: > I think there are some other implications, but I don't think they're > anything super-dramatic. For example, you could create a group that's > just for purposes of pg_hba.conf matching and make the grants both > SET > FALSE and INHERIT FALSE,

Re: HOT chain validation in verify_heapam()

2022-09-06 Thread Robert Haas
On Tue, Sep 6, 2022 at 9:38 AM Aleksander Alekseev wrote: > > Please correct me if I'm wrong, but don't we have a race condition here: > > > > ``` > > +if ((TransactionIdDidAbort(pred_xmin) || > > TransactionIdIsInProgress(pred_xmin)) > > +&&

Re: predefined role(s) for VACUUM and ANALYZE

2022-09-06 Thread Nathan Bossart
On Mon, Sep 05, 2022 at 11:56:30AM -0700, Nathan Bossart wrote: > Here is a first attempt at allowing users to grant VACUUM or ANALYZE > per-relation. Overall, this seems pretty straightforward. I needed to > adjust the permissions logic for VACUUM/ANALYZE a bit, which causes some > extra

Re: making relfilenodes 56 bits

2022-09-06 Thread Robert Haas
On Tue, Sep 6, 2022 at 4:40 AM Dilip Kumar wrote: > I have explored this area more and also tried to come up with a > working prototype, so while working on this I realized that we would > have almost to execute all the code which is getting generated as part > of the dumpDatabase() and dumpACL()

Re: New docs chapter on Transaction Management and related changes

2022-09-06 Thread Simon Riggs
On Tue, 6 Sept 2022 at 17:19, Erik Rijkers wrote: > > Op 06-09-2022 om 17:16 schreef Simon Riggs: > > 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. > > >

Re: pg_auth_members.grantor is bunk

2022-09-06 Thread Robert Haas
On Fri, Sep 2, 2022 at 6:01 PM Jeff Davis wrote: > > Yes. I figured that, when GRANTED BY is not specified, it is OK to > > infer a valid grantor > > The spec is clear that the grantor should be either the current user or > the current role. We also have a concept of INHERIT, which allows us to >

Re: New docs chapter on Transaction Management and related changes

2022-09-06 Thread Erik Rijkers
Op 06-09-2022 om 17:16 schreef Simon Riggs: 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. [xact_docs.v2.patch] Very clear explanations, thank you. Two typos:

Re: predefined role(s) for VACUUM and ANALYZE

2022-09-06 Thread Nathan Bossart
On Tue, Sep 06, 2022 at 11:24:18AM -0400, Robert Haas wrote: > On Tue, Sep 6, 2022 at 11:11 AM Stephen Frost wrote: >> If we were to make the specific bits depend on the object type as I'm >> suggesting, then we'd have 8 bits used for relations (10 with the vacuum >> and analyze bits), leaving us

Re: Tracking last scan time

2022-09-06 Thread Andres Freund
Hi, On 2022-09-06 14:15:56 +0100, Dave Page wrote: > Vik and I looked at this a little, and found that we actually don't have > generally have GetCurrentTransactionStopTimestamp() at this point - a > simple 'select * from pg_class' will result in 9 passes of this code, none > of which have

Re: predefined role(s) for VACUUM and ANALYZE

2022-09-06 Thread Robert Haas
On Tue, Sep 6, 2022 at 11:11 AM Stephen Frost wrote: > Considering our burn rate of ACL bits is really rather slow (2 this > year, but prior to that was TRUNCATE in 2008 and CONNECT in 2006), I'd > argue that moving away from the current one-size-fits-all situation > would kick the can down the

New docs chapter on Transaction Management and related changes

2022-09-06 Thread Simon Riggs
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. -- Simon Riggshttp://www.EnterpriseDB.com/ xact_docs.v2.patch Description: Binary data

Re: Modernizing our GUC infrastructure

2022-09-06 Thread Robert Haas
On Tue, Sep 6, 2022 at 10:05 AM Tom Lane wrote: > > I haven't looked at that patch at all, but I would assume that > > variables would have SQL types, and that we would never add GUCs with > > SQL types, which seems like a pretty major semantic difference. > > Yeah, I do not think we'd want to

Re: predefined role(s) for VACUUM and ANALYZE

2022-09-06 Thread Stephen Frost
Greetings, * Nathan Bossart (nathandboss...@gmail.com) wrote: > On Tue, Aug 23, 2022 at 07:46:47PM -0400, Stephen Frost wrote: > > I've long felt that we should redefine the way the ACLs work to have a > > distinct set of bits for each object type. We don't need to support a > > CONNECT bit on a

Re: allowing for control over SET ROLE

2022-09-06 Thread Robert Haas
On Sat, Sep 3, 2022 at 3:46 PM Jeff Davis wrote: > > You are now connected to database "rhaas" as user "rhaas". > > rhaas=# grant pg_read_all_settings to seer with set false; > > GRANT ROLE > > You've defined this in terms of the mechanics -- allow SET ROLE or not > -- but I assume you intend it

Re: (doc patch) psql version compatibility

2022-09-06 Thread Christoph Berg
Re: Tom Lane > Christoph Berg writes: > > I didn't understand the current wording of the NOTES section in > > psql(1) on which major versions psql is compatible with, so here's a > > patch to make that more explicit. > > This seems both very repetitive and incorrect in detail. Meh, I tried to

Re: Modernizing our GUC infrastructure

2022-09-06 Thread Pavel Stehule
Hi > I think a large part of the reason the schema-variables patch > has gone sideways for so many years is that it's an ambitious > overdesign. > Last two weeks this patch is shorter and shorter. I removed a large part related to check of type consistency, because I can do this check more

Re: (doc patch) psql version compatibility

2022-09-06 Thread Tom Lane
Christoph Berg writes: > I didn't understand the current wording of the NOTES section in > psql(1) on which major versions psql is compatible with, so here's a > patch to make that more explicit. This seems both very repetitive and incorrect in detail. Some operations will work fine with older

Re: Return value of PathNameOpenFile()

2022-09-06 Thread Tom Lane
Daniel Gustafsson writes: > Agreed, zero should be valid as it's a non-negative integer. However, callers > in fd.c are themselves checking for (fd <= 0) in some cases, and some have > done > so since the very early days of the codebase, so I wonder if there > historically > used to be a

Re: pgsql: Add ALTER SUBSCRIPTION ... SKIP.

2022-09-06 Thread Masahiko Sawada
On Sun, Sep 4, 2022 at 8:39 PM Amit Kapila wrote: > > On Sun, Sep 4, 2022 at 1:48 PM Alvaro Herrera wrote: > > > > On 2022-Mar-22, Amit Kapila wrote: > > > > > Add ALTER SUBSCRIPTION ... SKIP. > > > > There are two messages here that seem oddly worded. > > > > msgid "start skipping logical

Re: Modernizing our GUC infrastructure

2022-09-06 Thread Tom Lane
Robert Haas writes: > On Tue, Sep 6, 2022 at 1:43 AM Tom Lane wrote: >> I think there's a good analogy here to temporary tables. The SQL >> spec says that temp-table schemas are persistent and database-wide, >> but what we actually have is that they are session-local. > Well, I've thought

Re: pg15b3: recovery fails with wal prefetch enabled

2022-09-06 Thread Jonathan S. Katz
On 9/5/22 10:03 PM, Thomas Munro wrote: On Tue, Sep 6, 2022 at 1:51 PM Tom Lane wrote: "Jonathan S. Katz" writes: On 9/5/22 7:18 PM, Thomas Munro wrote: Well I was about to commit this, but beta4 just got stamped (but not yet tagged). I see now that Jonathan (with RMT hat on, CC'd) meant

Re: HOT chain validation in verify_heapam()

2022-09-06 Thread Aleksander Alekseev
Hi hackers, > Please correct me if I'm wrong, but don't we have a race condition here: > > ``` > +if ((TransactionIdDidAbort(pred_xmin) || > TransactionIdIsInProgress(pred_xmin)) > +&& !TransactionIdEquals(pred_xmin, curr_xmin)) > { > ``` > > The scenario

Re: Tracking last scan time

2022-09-06 Thread Dave Page
Hi On Thu, 1 Sept 2022 at 19:35, Andres Freund wrote: > Hi, > > On 2022-09-01 14:18:42 +0200, Matthias van de Meent wrote: > > On Wed, 31 Aug 2022 at 20:56, Andres Freund wrote: > > > But given this is done when stats are flushed, which only happens > after the > > > transaction ended, we can

Re: HOT chain validation in verify_heapam()

2022-09-06 Thread Aleksander Alekseev
Hi again, > I am looking into the process of adding the TAP test for these changes and > finding a way to corrupt a page in the tap test Please note that currently the patch breaks many existing tests. I suggest fixing these first. For the details please see the cfbot report [1] or execute the

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

2022-09-06 Thread Dave Cramer
On Tue, 6 Sept 2022 at 02:30, Ibrar Ahmed wrote: > > > On Fri, Aug 12, 2022 at 5:48 PM Dave Cramer wrote: > >> >> >> On Fri, 5 Aug 2022 at 17:51, Justin Pryzby wrote: >> >>> On Tue, Jul 26, 2022 at 08:11:04AM -0400, Dave Cramer wrote: >>> > Attached patch to correct these deficiencies. >>> >>>

Re: HOT chain validation in verify_heapam()

2022-09-06 Thread Aleksander Alekseev
Hi Himanshu, Many thanks for working on this! > Please find attached the patch with the above idea of HOT chain's validation Please correct me if I'm wrong, but don't we have a race condition here: ``` +if ((TransactionIdDidAbort(pred_xmin) || TransactionIdIsInProgress(pred_xmin))

Re: predefined role(s) for VACUUM and ANALYZE

2022-09-06 Thread Robert Haas
On Mon, Sep 5, 2022 at 2:56 PM Nathan Bossart wrote: > There are 2 bits remaining at the moment, so I didn't redesign the ACL > system in the attached patch. However, I did some research on a couple > options. Using a distinct set of bits for each catalog table should free > up a handful of

psql -l and locales (Re: pgsql: Add option to use ICU as global locale provider)

2022-09-06 Thread Christoph Berg
Re: Tom Lane > Christoph Berg writes: > > A possible solution might be to rip out all the locale columns except > > "Encoding" from \l, and leave them in place for \l+. > > I'd rather see a single column summarizing the locale situation. > Perhaps it could be COALESCE(daticulocale, datcollate),

Re: Modernizing our GUC infrastructure

2022-09-06 Thread Robert Haas
On Tue, Sep 6, 2022 at 1:43 AM Tom Lane wrote: > I think there's a good analogy here to temporary tables. The SQL > spec says that temp-table schemas are persistent and database-wide, > but what we actually have is that they are session-local. People > occasionally propose that we implement the

Re: SUBTRANS: Minimizing calls to SubTransSetParent()

2022-09-06 Thread Simon Riggs
On Tue, 6 Sept 2022 at 12:37, Dilip Kumar wrote: > > On Tue, Aug 30, 2022 at 10:16 PM Simon Riggs > wrote: > > > PFA two patches, replacing earlier work > > 001_new_isolation_tests_for_subxids.v3.patch > > 002_minimize_calls_to_SubTransSetParent.v8.patch > > > >

Re: [PATCH] Tab completion for SET COMPRESSION

2022-09-06 Thread Aleksander Alekseev
Hi Shinya, > A minor modification has been made so that the composite type is also > completed after "ALTER TABLE OF". LGTM. Here is v3 created with `git format-path`. Unlike v2 it also includes the commit message. -- Best regards, Aleksander Alekseev

pg_upgrade major version compatibility

2022-09-06 Thread Christoph Berg
The pg_upgrade manpage in PG 14 and earlier claims that upgrades from 8.4 are supported, but that doesn't work: /usr/lib/postgresql/14/bin/pg_upgrade -b /usr/lib/postgresql/8.4/bin -B /usr/lib/postgresql/14/bin -p 5432 -P 5433 -d /var/lib/postgresql/8.4/upgr -o -D /etc/postgresql/8.4/upgr -D

Re: SUBTRANS: Minimizing calls to SubTransSetParent()

2022-09-06 Thread Dilip Kumar
On Tue, Aug 30, 2022 at 10:16 PM Simon Riggs wrote: > PFA two patches, replacing earlier work > 001_new_isolation_tests_for_subxids.v3.patch > 002_minimize_calls_to_SubTransSetParent.v8.patch > > 001_new_isolation_tests_for_subxids.v3.patch > Adds new test cases to master without adding any new

(doc patch) psql version compatibility

2022-09-06 Thread Christoph Berg
Hi, I didn't understand the current wording of the NOTES section in psql(1) on which major versions psql is compatible with, so here's a patch to make that more explicit. Christoph >From 89f947c215c679004e1f3fbf88751fe527e16f91 Mon Sep 17 00:00:00 2001 From: Christoph Berg Date: Tue, 6 Sep 2022

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

2022-09-06 Thread Ranier Vilela
Em seg., 5 de set. de 2022 às 23:02, David Rowley escreveu: > On Tue, 6 Sept 2022 at 13:52, Ranier Vilela wrote: > > > > Em seg., 5 de set. de 2022 às 22:29, David Rowley > escreveu: > >> It feels like it would be good if we had a way to detect a few of > >> these issues much earlier than we

Re: [PATCH] Use indexes on the subscriber when REPLICA IDENTITY is full on the publisher

2022-09-06 Thread Amit Kapila
On Sat, Aug 20, 2022 at 4:32 PM Önder Kalacı wrote: > > I'm a little late to catch up with your comments, but here are my replies: > >> > My answer for the above assumes that your question is regarding what >> > happens if you ANALYZE on a partitioned table. If your question is >> > something

May be BUG. Periodic burst growth of the checkpoint_req counter on replica.

2022-09-06 Thread Anton A. Melnikov
Hello! Found a periodic spike growth of the checkpoint_req counter on replica by 20-30 units after large insert (~350Mb) on master. Reproduction on master and replica with default conf: 1) execute the command "insert into test values (generate_series(1,1E7));". This leads to the table's growth

Re: HOT chain validation in verify_heapam()

2022-09-06 Thread Himanshu Upadhyaya
Hi Robert, Thanks for sharing the feedback. On Sat, Aug 27, 2022 at 1:47 AM Robert Haas wrote: > +htup = (HeapTupleHeader) PageGetItem(ctx.page, rditem); > +if (!(HeapTupleHeaderIsHeapOnly(htup) && > htup->t_infomask & HEAP_UPDATED)) > +

Re: [PATCH] Tab completion for SET COMPRESSION

2022-09-06 Thread Shinya Kato
On 2022-09-06 17:28, Aleksander Alekseev wrote: In addition, why not take this opportunity to create a tab completion for "ALTER TABLE OF " and "ALTER TABLE NOT OF"? Thanks for reviewing, Shinya. Let's fix this too. The patch is attached. Thanks for the new patch! A minor modification

Re: test_decoding assertion failure for the loss of top-sub transaction relationship

2022-09-06 Thread Amit Kapila
On Tue, Sep 6, 2022 at 1:17 PM kuroda.hay...@fujitsu.com wrote: > > Dear hackers, > > > I agreed both that DEBUG2 messages are still useful but we should not > > change the condition for output. So I prefer the idea suggested by Amit. > > PSA newer patch, which contains the fix and test. > > > >

Re: [PATCH] Clarify the comments about varlena header encoding

2022-09-06 Thread Aleksander Alekseev
Hi John, Thanks for the feedback. > Maybe "00xx 4-byte length word (aligned)," is more clear about > what is aligned. Also, adding all those xxx's obscures the point that > we only need to examine one byte to figure out what to do next. IMO "00xx 4-byte length word" is still confusing.

Re: Handle infinite recursion in logical replication setup

2022-09-06 Thread Amit Kapila
On Tue, Sep 6, 2022 at 9:31 AM wangw.f...@fujitsu.com wrote: > > On Tues, 6 Sept 2022 at 11:14, vignesh C wrote: > > Thanks for the comments, the attached patch has the changes for the same. > > Thanks for updating the patch. > > Here is one comment for 0001 patch. > 1. The query in function

Re: Asynchronous execution support for Custom Scan

2022-09-06 Thread Etsuro Fujita
On Mon, Sep 5, 2022 at 10:32 PM Kazutaka Onishi wrote: > I'm sorry for my error on your name... No problem. > > IIUC, it uses the proposed > > APIs, but actually executes ctidscans *synchronously*, so it does not > > improve performance. Right? > Exactly. > The actual CustomScan that

RE: test_decoding assertion failure for the loss of top-sub transaction relationship

2022-09-06 Thread kuroda.hay...@fujitsu.com
> I was not sure what's the proper way to fix it. > The solution I've thought at first was transporting all invalidations from > sub to top > like ReorderBufferTransferSnapToParent(), > but I do not know its side effect. Moreover, how do we deal with > ReorderBufferChange? > Should we transfer

Re: Column Filtering in Logical Replication

2022-09-06 Thread Amit Kapila
On Tue, Sep 6, 2022 at 5:08 AM Peter Smith wrote: > > You are right - that REFRESH PUBLICATION was not necessary for this > example. The patch is modified to use your suggested text. > > PSA v8 > LGTM. I'll push this once the tag appears for v15. -- With Regards, Amit Kapila.

Re: making relfilenodes 56 bits

2022-09-06 Thread Dilip Kumar
On Sun, Sep 4, 2022 at 9:27 AM Dilip Kumar wrote: > > On Sat, Sep 3, 2022 at 5:11 PM Amit Kapila wrote: > > Isn't this happening because we are passing "--clean > > --create"/"--create" options to pg_restore in create_new_objects()? If > > so, then I think one idea to decouple would be to not

Re: Smoothing the subtrans performance catastrophe

2022-09-06 Thread Simon Riggs
On Thu, 4 Aug 2022 at 13:11, Simon Riggs wrote: > I will post my patch, when complete, in a different thread. To avoid confusion, I will withdraw this patch from the CF, in favour of my other patch on a similar topic, Minimizing calls to SubTransSetParent()

Re: [PATCH] Tab completion for SET COMPRESSION

2022-09-06 Thread Aleksander Alekseev
Hi hackers, > Right. That looks fine to me, so applied. Thanks, Michael. > In addition, why not take this opportunity to create a tab completion for > "ALTER TABLE OF " and "ALTER TABLE NOT OF"? Thanks for reviewing, Shinya. Let's fix this too. The patch is attached. -- Best regards,

Re: Out-of-date comments about RecentGlobalXmin?

2022-09-06 Thread Japin Li
On Tue, 06 Sep 2022 at 16:17, Daniel Gustafsson wrote: >> On 6 Sep 2022, at 10:10, Zhang Mingli wrote: >> On Sep 6, 2022, 16:03 +0800, Japin Li , wrote: > >> It's out-of-date, doesn't it? I'm not sure s/RecentGlobalXmin/RecentXmin/g >> is right. Any thoughts? >> I’m afraid not,

Re: Out-of-date comments about RecentGlobalXmin?

2022-09-06 Thread Daniel Gustafsson
> On 6 Sep 2022, at 10:10, Zhang Mingli wrote: > On Sep 6, 2022, 16:03 +0800, Japin Li , wrote: > It's out-of-date, doesn't it? I'm not sure s/RecentGlobalXmin/RecentXmin/g > is right. Any thoughts? > I’m afraid not, RecentGlobalXmin is split to several GlobalVis* variables. > Need to check one

Re: Out-of-date comments about RecentGlobalXmin?

2022-09-06 Thread Zhang Mingli
Hi, Regards, Zhang Mingli On Sep 6, 2022, 16:03 +0800, Japin Li , wrote: > > In commit dc7420c2c9, the RecentGlobalXmin variable is removed, however, > there are some places that reference it. > > $ grep 'RecentGlobalXmin' -rn src/ > src/backend/replication/logical/launcher.c:101: * the secondary

Re: build remaining Flex files standalone

2022-09-06 Thread John Naylor
On Mon, Sep 5, 2022 at 1:18 AM Andres Freund wrote: > > Hi, > > On 2022-09-04 12:16:10 +0700, John Naylor wrote: > > Pushed 01 and 02 separately, then squashed and pushed the rest. > > Thanks a lot! It does look a good bit cleaner to me now. > > I think, as a followup improvement, we should move

Out-of-date comments about RecentGlobalXmin?

2022-09-06 Thread Japin Li
In commit dc7420c2c9, the RecentGlobalXmin variable is removed, however, there are some places that reference it. $ grep 'RecentGlobalXmin' -rn src/ src/backend/replication/logical/launcher.c:101: * the secondary effect that it sets RecentGlobalXmin. (This is critical

Re: [RFC] building postgres with meson - v12

2022-09-06 Thread John Naylor
On Mon, Sep 5, 2022 at 4:11 AM Andres Freund wrote: > > Hi, > > On 2022-09-04 13:12:52 +0700, John Naylor wrote: > > On Fri, Sep 2, 2022 at 11:35 PM Andres Freund wrote: > > > > > > Hi, > > > > > > On 2022-09-02 14:17:26 +0700, John Naylor wrote: > > > > On Thu, Sep 1, 2022 at 1:12 AM Andres

RE: pg_publication_tables show dropped columns

2022-09-06 Thread houzj.f...@fujitsu.com
On Tuesday, September 6, 2022 11:13 AM Tom Lane wrote: > > Jaime Casanova writes: > > Just trying the new column/row filter on v15, I found this issue that > > could be replicated very easily. > > Bleah. Post-beta4 catversion bump, here we come. Oh, Sorry for the miss. > > This could be

Re: Return value of PathNameOpenFile()

2022-09-06 Thread Daniel Gustafsson
> On 6 Sep 2022, at 09:26, Antonin Houska wrote: > > I've noticed that some callers of PathNameOpenFile() > (e.g. bbsink_server_begin_archive()) consider the call failed even if the > function returned zero, while other ones do check whether the file descriptor > is strictly negative. Since the

Re: Remove dead macro exec_subplan_get_plan

2022-09-06 Thread Zhang Mingli
Hi,all Regards, Zhang Mingli On Sep 6, 2022, 10:22 +0800, Richard Guo , wrote: > > On Tue, Sep 6, 2022 at 1:18 AM Tom Lane wrote: > > Zhang Mingli writes: > > > Macro exec_subplan_get_plan is not used anymore. > > > Attach a patch to remove it. > > > > Hm, I wonder why it's not used anymore.  

RE: test_decoding assertion failure for the loss of top-sub transaction relationship

2022-09-06 Thread kuroda.hay...@fujitsu.com
Dear hackers, > I agreed both that DEBUG2 messages are still useful but we should not > change the condition for output. So I prefer the idea suggested by Amit. PSA newer patch, which contains the fix and test. > > I have not verified but I think we need to backpatch this till 14 > > because

Return value of PathNameOpenFile()

2022-09-06 Thread Antonin Houska
I've noticed that some callers of PathNameOpenFile() (e.g. bbsink_server_begin_archive()) consider the call failed even if the function returned zero, while other ones do check whether the file descriptor is strictly negative. Since the file descriptor is actually returned by the open() system

Re: Different compression methods for FPI

2022-09-06 Thread Michael Paquier
On Sun, Sep 04, 2022 at 07:23:20PM -0500, Justin Pryzby wrote: > That's also hitting an elog(). > > 2022-09-04 15:56:29.916 CDT startup[2625] FATAL: XX000: failed to restore > block image > 2022-09-04 15:56:29.916 CDT startup[2625] DETAIL: image at 0/1D11CB8 > compressed with zstd not

Re: [PATCH] Tab completion for SET COMPRESSION

2022-09-06 Thread Michael Paquier
On Tue, Sep 06, 2022 at 09:54:53AM +0900, Shinya Kato wrote: > In addition, why not take this opportunity to create a tab completion for > "ALTER TABLE OF " and "ALTER TABLE NOT OF"? Right. That looks fine to me, so applied. -- Michael signature.asc Description: PGP signature

Re: Summary Sort workers Stats in EXPLAIN ANALYZE

2022-09-06 Thread Ibrar Ahmed
On Mon, Mar 28, 2022 at 2:55 PM Jian Guo wrote: > > I have updated the patch addressing the review comments, but I didn't > moved this code block into VERBOSE mode, to keep consistency with ` > show_incremental_sort_info`: > > >

Re: Reduce timing overhead of EXPLAIN ANALYZE using rdtsc?

2022-09-06 Thread Ibrar Ahmed
On Fri, Jul 15, 2022 at 11:22 PM Maciek Sakrejda wrote: > I ran that original test case with and without the patch. Here are the > numbers I'm seeing: > > master (best of three): > > postgres=# SELECT count(*) FROM lotsarows; > Time: 582.423 ms > > postgres=# EXPLAIN (ANALYZE, TIMING OFF) SELECT

Re: Minimum bison and flex versions

2022-09-06 Thread John Naylor
On Sat, Sep 3, 2022 at 4:04 AM Andres Freund wrote: > On 2022-09-02 16:29:22 -0400, Tom Lane wrote: > > Andres Freund writes: > > > On 2022-09-02 15:08:01 -0400, Tom Lane wrote: > > I'd be content for now to set the minimums at 2.3 and 2.5.35. > > +1 Here are autoconf-only patches to that

  1   2   >