Re: Schema variables - new implementation for Postgres 15 (typo)

2023-01-09 Thread Julien Rouhaud
Hi, On Sat, Jan 07, 2023 at 08:09:27AM +0100, Pavel Stehule wrote: > > > > Hmm, how safe is it for third-party code to access the stored data directly > > rather than a copy? If it makes extension fragile if they're not careful > > enough with cache invalidation, or even give them a way to mess u

RE: Time delayed LR (WAS Re: logical replication restrictions)

2023-01-09 Thread Takamichi Osumi (Fujitsu)
On Tuesday, December 27, 2022 6:29 PM Tuesday, December 27, 2022 6:29 PM wrote: > Thanks for reviewing our patch! PSA new version patch set. Now, the patches fails to apply to the HEAD, because of recent commits (c6e1f62e2c and 216a784829c) as reported in [1]. I'll rebase the patch with other chan

Re: ATTACH PARTITION seems to ignore column generation status

2023-01-09 Thread Amit Langote
On Tue, Jan 10, 2023 at 6:41 AM Tom Lane wrote: > I wrote: > > After thinking about this awhile, I feel that we ought to disallow > > it in the traditional-inheritance case as well. The reason is that > > there are semantic prohibitions on inserting or updating a generated > > column, eg > > > re

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

2023-01-09 Thread Andres Freund
Hi, On 2023-01-05 13:44:20 -0500, Reid Thompson wrote: > From 0a6b152e0559a25033bd7d43eb0959432e0d Mon Sep 17 00:00:00 2001 > From: Reid Thompson > Date: Thu, 11 Aug 2022 12:01:25 -0400 > Subject: [PATCH 1/2] Add tracking of backend memory allocated to > pg_stat_activity > > This new field

Re: ATTACH PARTITION seems to ignore column generation status

2023-01-09 Thread Tom Lane
Amit Langote writes: > Thanks for the patch. It looks good, though I guess you said that we > should also change the error message that CREATE TABLE ... PARTITION > OF emits to match the other cases while we're here. I've attached a > delta patch. Thanks. I hadn't touched that issue because I

Re: Handle infinite recursion in logical replication setup

2023-01-09 Thread Jonathan S. Katz
On 9/12/22 1:23 AM, vignesh C wrote: On Fri, 9 Sept 2022 at 11:12, Amit Kapila wrote: On Thu, Sep 8, 2022 at 9:32 AM vignesh C wrote: The attached patch has the changes to handle the same. Pushed. I am not completely sure whether we want the remaining documentation patch in this thread

RE: [PATCH] Support % wildcard in extension upgrade filenames

2023-01-09 Thread Regina Obe
> I continue to think that this is a fundamentally bad idea. It creates all sorts of > uncertainties about what is a valid update path and what is not. Restrictions > like > > + Such wildcard update > + scripts will only be used when no explicit path is found from > + old to target ve

Re: Allow DISTINCT to use Incremental Sort

2023-01-09 Thread Richard Guo
On Tue, Jan 10, 2023 at 10:14 AM David Rowley wrote: > > /* For explicit-sort case, always use the more rigorous clause */ > > if (list_length(root->distinct_pathkeys) < > > list_length(root->sort_pathkeys)) > > { > > needed_pathkeys = root->sort_pa

RE: Fix pg_publication_tables to exclude generated columns

2023-01-09 Thread shiy.f...@fujitsu.com
On Mon, Jan 9, 2023 11:06 PM Tom Lane wrote: > > Amit Kapila writes: > > On Mon, Jan 9, 2023 at 5:29 PM shiy.f...@fujitsu.com > > wrote: > >> I think one way to fix it is to modify pg_publication_tables query to > >> exclude > >> generated columns. But in this way, we need to bump catalog vers

Re: BUG: Postgres 14 + vacuum_defer_cleanup_age + FOR UPDATE + UPDATE

2023-01-09 Thread Mark Dilger
> On Jan 9, 2023, at 2:07 PM, Andres Freund wrote: > > The tests encounter the issue today. If you add > Assert(TransactionIdIsValid(ctx->next_xid)); > Assert(FullTransactionIdIsValid(ctx->next_fxid)); > early in FullTransactionIdFromXidAndCtx() it'll be hit in the > amcheck/pg_amcheck tests.

Re: FYI: 2022-10 thorntail failures from coreutils FICLONE

2023-01-09 Thread Tom Lane
Noah Misch writes: > thorntail failed some recovery tests in 2022-10: Speaking of which ... thorntail hasn't reported in for nearly three weeks. Is it stuck? regards, tom lane

Re: Show various offset arrays for heap WAL records

2023-01-09 Thread Peter Geoghegan
On Mon, Jan 9, 2023 at 1:58 PM Andres Freund wrote: > A couple times when investigating data corruption issues, the last time just > yesterday in [1], I needed to see the offsets affected by PRUNE and VACUUM > records. As that's probably not just me, I think we should make that change > in-tree.

Re: Strengthen pg_waldump's --save-fullpage tests

2023-01-09 Thread Bharath Rupireddy
On Tue, Jan 10, 2023 at 6:52 AM Michael Paquier wrote: > > On Mon, Jan 09, 2023 at 08:30:00AM +0530, Bharath Rupireddy wrote: > > A recent commit [1] added --save-fullpage option to pg_waldump to > > extract full page images (FPI) from WAL records and save them into > > files (one file per FPI) un

Re: [Proposal] Add foreign-server health checks infrastructure

2023-01-09 Thread Tom Lane
"Hayato Kuroda (Fujitsu)" writes: > Thanks for reporting. PSA rebased version. > These can be applied work well on my HEAD(bd8d45). I think that it's a really bad idea to require postgres_fdw.sql to have two expected-files: that will be a maintenance nightmare. Please put whatever it is that need

RE: Perform streaming logical transactions by background workers and parallel apply

2023-01-09 Thread houzj.f...@fujitsu.com
On Monday, January 9, 2023 4:51 PM Amit Kapila wrote: > > On Sun, Jan 8, 2023 at 11:32 AM houzj.f...@fujitsu.com > wrote: > > > > On Sunday, January 8, 2023 11:59 AM houzj.f...@fujitsu.com > wrote: > > > Attach the updated patch set. > > > > Sorry, the commit message of 0001 was accidentally de

Re: typos

2023-01-09 Thread Justin Pryzby
On Tue, Jan 03, 2023 at 03:39:22PM -0600, Justin Pryzby wrote: > On Tue, Jan 03, 2023 at 04:28:29PM +0900, Michael Paquier wrote: > > On Fri, Dec 30, 2022 at 05:12:57PM -0600, Justin Pryzby wrote: > > > > # Use larger ccache cache, as this task compiles with multiple > > compilers / > >

Re: split TOAST support out of postgres.h

2023-01-09 Thread Peter Eisentraut
On 30.12.22 17:50, Tom Lane wrote: Peter Eisentraut writes: On 28.12.22 16:07, Tom Lane wrote: I dunno, #3 seems kind of unprincipled. Also, since fmgr.h is included so widely, I doubt it is buying very much in terms of reducing header footprint. How bad is it to do #2? See this increment

Re: doc: add missing "id" attributes to extension packaging page

2023-01-09 Thread Brar Piening
On 09.01.2023 at 21:18, Tom Lane wrote: It's not great to have multiple CF entries pointing at the same email thread --- it confuses both people and bots. Next time please split off a thread for each distinct patch. I agree. I had overestimated the cfbot's ability to handle branched threads. I

Re: doc: add missing "id" attributes to extension packaging page

2023-01-09 Thread Tom Lane
Brar Piening writes: > On 09.01.2023 at 21:18, Tom Lane wrote: >> * I got rid of a couple of "-et-al" additions, because it did not >> seem like a good precedent. That would tempt people to modify >> existing ID tags when adding variables to an entry, which'd defeat >> the purpose I think. > I t

Re: Todo: Teach planner to evaluate multiple windows in the optimal order

2023-01-09 Thread David Rowley
On Tue, 10 Jan 2023 at 06:15, Ankit Kumar Pandey wrote: > Do we have any pending items for this patch now? I'm just wondering if not trying this when the query has a DISTINCT clause is a copout. What I wanted to avoid was doing additional sorting work for WindowAgg just to have it destroyed by H

Re: doc: add missing "id" attributes to extension packaging page

2023-01-09 Thread Brar Piening
On 09.01.2023 at 23:28, Karl O. Pinc wrote: On Mon, 09 Jan 2023 15:18:18 -0500 Tom Lane wrote: It's probably going to be necessary to have follow-on patches, because I'm sure there is stuff in the pipeline that adds more ID-less tags. Or do we have a way to create warnings about that? I am un

Re: wake up logical workers after ALTER SUBSCRIPTION

2023-01-09 Thread Amit Kapila
On Sat, Jan 7, 2023 at 6:15 AM Nathan Bossart wrote: > > On Fri, Jan 06, 2023 at 05:31:26PM -0500, Tom Lane wrote: > > > Attached is a rebased 0003, just to keep the cfbot happy. > > I'm kind of wondering whether 0003 is worth the complexity TBH, > > but in any case I ran out of time to look at it

Re: Todo: Teach planner to evaluate multiple windows in the optimal order

2023-01-09 Thread Tom Lane
David Rowley writes: > Ideally, our sort costing would just be better, but I think that > raises the bar a little too high to start thinking of making > improvements to that for this patch. It's trickier than it looks, cf f4c7c410e. But if you just want to add a small correction based on number

Re: Perform streaming logical transactions by background workers and parallel apply

2023-01-09 Thread Kyotaro Horiguchi
Hello. At Mon, 9 Jan 2023 14:21:03 +0530, Amit Kapila wrote in > Pushed the first (0001) patch. It added the following error message. + seg = dsm_attach(handle); + if (!seg) + ereport(ERROR, + (errcode(ERRCODE_OBJECT_NOT_IN_PREREQUISITE

Re: doc: add missing "id" attributes to extension packaging page

2023-01-09 Thread Brar Piening
On 10.01.2023 at 06:28, Brar Piening wrote: I'll repost a rebased version of the styling patch in a minute. After checking that there's no need for rebasing I'm reposting the original patch here, to make cfbot pick it up as the latest one in a somewhat screwed up thread mixing two patches (sor

Re: Add BufFileRead variants with short read and EOF detection

2023-01-09 Thread Amit Kapila
On Fri, Jan 6, 2023 at 6:18 PM Peter Eisentraut wrote: > > On 02.01.23 13:13, Amit Kapila wrote: > > On Wed, Dec 28, 2022 at 4:17 PM Peter Eisentraut > > wrote: > >> > >> Most callers of BufFileRead() want to check whether they read the full > >> specified length. Checking this at every call sit

Re: Fixing a couple of buglets in how VACUUM sets visibility map bits

2023-01-09 Thread Peter Geoghegan
On Mon, Jan 9, 2023 at 12:58 PM Peter Geoghegan wrote: > I didn't realize that affected visibilitymap_set() calls could > generate useless set-VM WAL records until you pointed it out. That's > far more likely to happen than the race condition that I described -- > it has nothing at all to do with

Re: Perform streaming logical transactions by background workers and parallel apply

2023-01-09 Thread Amit Kapila
On Tue, Jan 10, 2023 at 11:16 AM Kyotaro Horiguchi wrote: > > At Mon, 9 Jan 2023 14:21:03 +0530, Amit Kapila > wrote in > > Pushed the first (0001) patch. > > It added the following error message. > > + seg = dsm_attach(handle); > + if (!seg) > + ereport(ERROR, > +

Re: typos

2023-01-09 Thread Amit Kapila
On Tue, Jan 10, 2023 at 10:27 AM Justin Pryzby wrote: > > On Tue, Jan 03, 2023 at 03:39:22PM -0600, Justin Pryzby wrote: > > On Tue, Jan 03, 2023 at 04:28:29PM +0900, Michael Paquier wrote: > > > On Fri, Dec 30, 2022 at 05:12:57PM -0600, Justin Pryzby wrote: > > > > > > # Use larger ccache ca

Re: FYI: 2022-10 thorntail failures from coreutils FICLONE

2023-01-09 Thread Noah Misch
On Mon, Jan 09, 2023 at 10:49:26PM -0500, Tom Lane wrote: > Noah Misch writes: > > thorntail failed some recovery tests in 2022-10: > > Speaking of which ... thorntail hasn't reported in for nearly > three weeks. Is it stuck? Its machine has been unresponsive to ssh for those weeks.

Re: allowing for control over SET ROLE

2023-01-09 Thread Jeff Davis
On Fri, 2022-12-30 at 22:16 -0800, Noah Misch wrote: > create user unpriv; > grant pg_maintain to unpriv with set false; > create schema maint authorization pg_maintain >   create table t (c int); > create or replace function maint.f() returns int language sql as > 'select 1'; > alter function main

Re: split TOAST support out of postgres.h

2023-01-09 Thread Noah Misch
On Tue, Jan 10, 2023 at 06:07:49AM +0100, Peter Eisentraut wrote: > On 30.12.22 17:50, Tom Lane wrote: > >Peter Eisentraut writes: > >>On 28.12.22 16:07, Tom Lane wrote: > >>>I dunno, #3 seems kind of unprincipled. Also, since fmgr.h is included > >>>so widely, I doubt it is buying very much in t

Avoiding "wrong tuple length" errors at the end of VACUUM on pg_database update (Backpatch of 947789f to v12 and v13)

2023-01-09 Thread Michael Paquier
Hi all, The problem mentioned in $subject has been discussed here: https://www.postgresql.org/message-id/dm5pr0501mb38800d9e4605bca72dd35557cc...@dm5pr0501mb3880.namprd05.prod.outlook.com Ths issue has been fixed by 947789f, without a backpatch to v12 (as per 96cdeae) as the risk seemed rather li

Re: typos

2023-01-09 Thread Michael Paquier
On Tue, Jan 10, 2023 at 12:24:40PM +0530, Amit Kapila wrote: > Thanks for noticing this. I'll take care of this and some other typo > patches together. Does this include 0010? I was just looking at the whole set and this one looked like a cleanup worth on its own so I was going to handle it, unti

Re: Avoiding "wrong tuple length" errors at the end of VACUUM on pg_database update (Backpatch of 947789f to v12 and v13)

2023-01-09 Thread Tom Lane
Michael Paquier writes: > Any objections about getting 947789f applied to REL_13_STABLE and > REL_12_STABLE and see this issue completely gone from all the versions > supported? No objections to back-patching the fix, but I wonder if we can find some mechanical way to prevent this sort of error i

<    1   2