Re: [BUG]Update Toast data failure in logical replication

2022-02-06 Thread Dilip Kumar
On Mon, Feb 7, 2022 at 12:25 PM Amit Kapila wrote: > > On Sat, Feb 5, 2022 at 6:10 AM Amit Kapila wrote: > > > > On Fri, Feb 4, 2022 at 9:06 PM Alvaro Herrera > > wrote: > > > > > > > > > I have some suggestions > > > on the comments and docs though. > > > > > > > Thanks, your suggestions

Re: row filtering for logical replication

2022-02-06 Thread Peter Smith
Hi - I did a review of the v77 patches merged with Amit's v77 diff patch [1]. (Maybe this is equivalent to reviewing v78) Below are my review comments: == 1. doc/src/sgml/ref/create_publication.sgml - CREATE PUBLICATION + The WHERE clause allows simple expressions that don't have +

Remove IS_AF_UNIX macro?

2022-02-06 Thread Peter Eisentraut
I noticed that in pgstatfuncs.c, the AF_UNIX macro is being used unprotected by HAVE_UNIX_SOCKETS, apparently since 2008. So I think the redirection through IS_AF_UNIX() is no longer necessary. (More generally, all supported platforms are now HAVE_UNIX_SOCKETS, but even if there were a new

Re: decoupling table and index vacuum

2022-02-06 Thread Dilip Kumar
On Fri, Feb 4, 2022 at 11:45 PM Robert Haas wrote: > > On Wed, Jan 26, 2022 at 8:58 AM Dilip Kumar wrote: > > TODO: > > - This is just a POC patch to discuss the design idea and needs a lot > > of improvement and testing. > > - We are using a slightly different format for storing the dead tids >

Re: [BUG]Update Toast data failure in logical replication

2022-02-06 Thread Amit Kapila
On Sat, Feb 5, 2022 at 6:10 AM Amit Kapila wrote: > > On Fri, Feb 4, 2022 at 9:06 PM Alvaro Herrera wrote: > > > > > > I have some suggestions > > on the comments and docs though. > > > > Thanks, your suggestions look good to me. I'll take care of these in > the next version. > Attached please

Re: pg_receivewal - couple of improvements

2022-02-06 Thread Julien Rouhaud
Hi, On Mon, Feb 07, 2022 at 12:03:03PM +0530, Bharath Rupireddy wrote: > > What if someone doesn't use pg_receivewal as an archive location? The > pg_receivewal can also be used for synchronous replication quorum > right? In this situation, I don't mind if some of the WAL files are > missing in

Re: pg_receivewal - couple of improvements

2022-02-06 Thread Bharath Rupireddy
On Mon, Feb 7, 2022 at 8:23 AM Michael Paquier wrote: > > On Sun, Feb 06, 2022 at 01:01:41PM +0530, Bharath Rupireddy wrote: > > With the start position as an option, users can just provide the LSN > > from which they want to stream the WAL, in the above case, it can be > > from primary's latest

Re: Query choosing Bad Index Path

2022-02-06 Thread Julien Rouhaud
Hi, On Mon, Feb 07, 2022 at 11:36:17AM +0530, Valli Annamalai wrote: > *Postgres version:* 11.4 > > *Problem:* > Query choosing Bad Index Path. Details are provided below: > > > *Table :* > > > > > > > *Doubt* >1. Why is this Query choosing *Index Scan Backward using table1_pkey >

Re: 2022-01 Commitfest

2022-02-06 Thread Julien Rouhaud
On Sun, Feb 06, 2022 at 02:57:45PM +0800, Julien Rouhaud wrote: > > On Sun, Feb 06, 2022 at 03:49:50PM +0900, Michael Paquier wrote: > > > > FWIW, I just apply a two-week rule here, as of half the commit fest > > period to let people the time to react: > > - If a patch has been waiting on author

Re: postgres_fdw: commit remote (sub)transactions in parallel during pre-commit

2022-02-06 Thread Etsuro Fujita
Hi Julien, On Sun, Jan 16, 2022 at 1:07 PM Julien Rouhaud wrote: > On Thu, Jan 06, 2022 at 05:29:23PM +0900, Etsuro Fujita wrote: > > Done. Attached is a new version. > I also see that Fuji-san raised some questions, so for now I will simply > change > the patch status to Waiting on Author.

Re: postgres_fdw: commit remote (sub)transactions in parallel during pre-commit

2022-02-06 Thread Etsuro Fujita
On Thu, Jan 13, 2022 at 11:54 AM Fujii Masao wrote: > At first I'm reading the 0001 patch. Here are the comments for the patch. Thanks for reviewing! > 0001 patch failed to be applied. Could you rebase the patch? Done. Attached is an updated version of the patch set. > +

Move replication slot structures/enums/macros to a new header file for better usability by external tools/modules

2022-02-06 Thread Bharath Rupireddy
Hi, While working on pg_replslotdata tool [1], it was observed that some of the replication slot structures/enums/macros such as ReplicationSlotPersistentData, ReplicationSlotPersistency, ReplicationSlotOnDisk, ReplicationSlotOnDisk etc. are currently in replication/slot.h and

Re: Add checkpoint and redo LSN to LogCheckpointEnd log message

2022-02-06 Thread Fujii Masao
On 2022/02/07 12:02, Kyotaro Horiguchi wrote: - If any later checkpoint/restartpoint has been established, just skip remaining task then return false. (!chkpt_was_latest) (I'm not sure this can happen, though.) - we update control file only when archive recovery is still ongoing.

Re: pg_walfile_name uses XLByteToPrevSeg

2022-02-06 Thread Kyotaro Horiguchi
At Mon, 07 Feb 2022 13:21:53 +0900 (JST), Kyotaro Horiguchi wrote in > At Fri, 4 Feb 2022 14:50:57 -0800, Nathan Bossart > wrote in > > On Fri, Feb 04, 2022 at 09:17:54AM -0500, Robert Haas wrote: > > > On Fri, Feb 4, 2022 at 9:05 AM Ashutosh Bapat > > > wrote: > > >> And it gives some

Re: pg_walfile_name uses XLByteToPrevSeg

2022-02-06 Thread Kyotaro Horiguchi
At Fri, 4 Feb 2022 14:50:57 -0800, Nathan Bossart wrote in > On Fri, Feb 04, 2022 at 09:17:54AM -0500, Robert Haas wrote: > > On Fri, Feb 4, 2022 at 9:05 AM Ashutosh Bapat > > wrote: > >> And it gives some surprising results as well > >> --- > >> #select pg_walfile_name('0/0'::pg_lsn); > >>

Re: 2022-02-10 release announcement draft

2022-02-06 Thread Justin Pryzby
On Sun, Feb 06, 2022 at 08:01:02PM -0500, Jonathan S. Katz wrote: > Hi, > > Attached is a draft for the release announcement for the 2022-02-10 > cumulative update release. > > Please review for technical accuracy or if you believe any items should be > added/removed. Please provide feedback no

Re: [BUG]Update Toast data failure in logical replication

2022-02-06 Thread Amit Kapila
On Sun, Feb 6, 2022 at 5:04 AM Andres Freund wrote: > > On 2022-02-04 17:45:36 +0530, Amit Kapila wrote: > > diff --git a/contrib/test_decoding/expected/toast.out > > b/contrib/test_decoding/expected/toast.out > > index cd03e9d..a757e7d 100644 > > --- a/contrib/test_decoding/expected/toast.out >

Re: GUC flags

2022-02-06 Thread Justin Pryzby
Thanks for working on it. Your test is checking that stuff in sample.conf is actually a GUC and not marked NOT_IN_SAMPLE. But those are both unlikely mistakes to make. The important/interesting test is the opposite: that all GUCs are present in the sample file. It's a lot easier for someone to

Re: Add checkpoint and redo LSN to LogCheckpointEnd log message

2022-02-06 Thread Kyotaro Horiguchi
At Mon, 07 Feb 2022 10:16:34 +0900 (JST), Kyotaro Horiguchi wrote in > At Fri, 4 Feb 2022 10:59:04 +0900, Fujii Masao > wrote in > > On 2022/02/03 15:50, Kyotaro Horiguchi wrote: > > > By the way, restart point should start only while recoverying, and at > > > the timeof the start both

Re: pg_receivewal - couple of improvements

2022-02-06 Thread Michael Paquier
On Sun, Feb 06, 2022 at 01:01:41PM +0530, Bharath Rupireddy wrote: > With the start position as an option, users can just provide the LSN > from which they want to stream the WAL, in the above case, it can be > from primary's latest checkpoint LSN. This still strikes me as a dangerous thing to

Re: GUC flags

2022-02-06 Thread Michael Paquier
On Sun, Feb 06, 2022 at 02:09:45PM +0900, Michael Paquier wrote: > Actually, I am thinking that we should implement it before retiring > completely check_guc, but not in the fashion you are suggesting. I > would be tempted to add something in the TAP tests as of > src/test/misc/, where we

Re: [PATCH] Add min() and max() aggregate functions for xid8

2022-02-06 Thread Fujii Masao
On 2022/02/05 10:46, Ken Kato wrote: Thank you for the comments. I sent my old version of patch by mistake. This is the updated one. Thanks! + PG_RETURN_FULLTRANSACTIONID((FullTransactionIdFollowsOrEquals(fxid1, fxid2)) ? fxid1 : fxid2); Basically it's better to use less 80 line

Re: Add checkpoint and redo LSN to LogCheckpointEnd log message

2022-02-06 Thread Kyotaro Horiguchi
At Fri, 4 Feb 2022 10:59:04 +0900, Fujii Masao wrote in > > > On 2022/02/03 15:50, Kyotaro Horiguchi wrote: > > On way to take. In that case should we log something like > > "Restartpoint canceled" or something? > > +1 > > > > By the way, restart point should start only while recoverying,

2022-02-10 release announcement draft

2022-02-06 Thread Jonathan S. Katz
Hi, Attached is a draft for the release announcement for the 2022-02-10 cumulative update release. Please review for technical accuracy or if you believe any items should be added/removed. Please provide feedback no later than 2020-02-10 0:00 AoE[1]. Thanks, Jonathan [1]

Re: pg_upgrade should truncate/remove its logs before running

2022-02-06 Thread Andrew Dunstan
> On Feb 6, 2022, at 7:39 PM, Tom Lane wrote: > > Michael Paquier writes: >>> On Sun, Feb 06, 2022 at 08:32:59AM -0500, Andrew Dunstan wrote: >>> But the commit really shouldn't have happened until we know that most >>> buildfarm owners have installed it. It should have waited wait not just

Re: pg_upgrade should truncate/remove its logs before running

2022-02-06 Thread Tom Lane
Michael Paquier writes: > On Sun, Feb 06, 2022 at 08:32:59AM -0500, Andrew Dunstan wrote: >> But the commit really shouldn't have happened until we know that most >> buildfarm owners have installed it. It should have waited wait not just >> for the release but for widespread deployment. Otherwise

Re: pg_upgrade should truncate/remove its logs before running

2022-02-06 Thread Michael Paquier
On Sun, Feb 06, 2022 at 08:32:59AM -0500, Andrew Dunstan wrote: > *sigh* Sometimes I have a mind like a sieve. I prepped the release a few > days ago and meant to come back the next morning and send out emails > announcing it, as well as rolling it out to my animals, and got diverted > so that

Re: GSoC 2022

2022-02-06 Thread Chapman Flack
Hi, On 01/20/22 14:33, Ilaria Battiston wrote: > Unsurprisingly, we'll need to have an Ideas page again, so I've gone ahead > and created one (copying last year's): > > https://wiki.postgresql.org/wiki/GSoC_2022 I've added a project idea about the ongoing PL/Java refactoring. Regards, -Chap

Re: Release notes for February minor releases

2022-02-06 Thread Jonathan S. Katz
On 2/6/22 3:42 PM, Andres Freund wrote: Hi, On 2022-02-06 14:22:25 -0500, Jonathan S. Katz wrote: On 2/6/22 1:44 PM, Andres Freund wrote: I'm working on the release announcement and have been following this thread. Are there steps we can provide to help a user detect that this occurred, even

Re: Use generation context to speed up tuplesorts

2022-02-06 Thread Andy Fan
Hi: On Thu, Jan 20, 2022 at 9:31 AM David Rowley wrote: > > As of now, I still believe we'll need Tomas' patches to allow the > block size to grow up to a maximum size. I think those patches are > likely needed before we think about making tuplesort use generation > contexts. The reason I

Re: [RFC] building postgres with meson

2022-02-06 Thread Andrew Dunstan
On 2/6/22 13:39, Andres Freund wrote: > Hi, > > On 2022-02-06 12:06:41 -0500, Andrew Dunstan wrote: >> Here's a patch. I've tested the perl piece on master and it works fine. >> It applies cleanly down to 9.4, which is before we got transform modules >> (9.5) which fail if we just omit doing

Re: Release notes for February minor releases

2022-02-06 Thread Andres Freund
Hi, On 2022-02-06 14:22:25 -0500, Jonathan S. Katz wrote: > On 2/6/22 1:44 PM, Andres Freund wrote: > I'm working on the release announcement and have been following this thread. > > Are there steps we can provide to help a user detect that this occurred, > even though it's a low-probability?

Re: Release notes for February minor releases

2022-02-06 Thread Justin Pryzby
On Sun, Feb 06, 2022 at 02:22:25PM -0500, Jonathan S. Katz wrote: > I'm working on the release announcement and have been following this thread. > > Are there steps we can provide to help a user detect that this occurred, > even though it's a low-probability? It's the same question as raised

Re: Release notes for February minor releases

2022-02-06 Thread Jonathan S. Katz
On 2/6/22 1:44 PM, Andres Freund wrote: Hi, On 2022-02-06 13:09:41 -0500, Tom Lane wrote: Andres Freund writes: That's obviously to complicated for the release notes. Trying to make it more understandable I came up with the following, which still does not seem great: ... How do you like

Re: Release notes for February minor releases

2022-02-06 Thread Andres Freund
Hi, On 2022-02-06 13:09:41 -0500, Tom Lane wrote: > Andres Freund writes: > > That's obviously to complicated for the release notes. Trying to make it > > more > > understandable I came up with the following, which still does not seem > > great: > > ... > > How do you like this wording? >

Re: [RFC] building postgres with meson

2022-02-06 Thread Andres Freund
Hi, On 2022-02-06 12:06:41 -0500, Andrew Dunstan wrote: > Here's a patch. I've tested the perl piece on master and it works fine. > It applies cleanly down to 9.4, which is before we got transform modules > (9.5) which fail if we just omit doing this platform-specific piece. Given

Re: Release notes for February minor releases

2022-02-06 Thread Tom Lane
Andres Freund writes: > That's obviously to complicated for the release notes. Trying to make it more > understandable I came up with the following, which still does not seem great: > ... How do you like this wording? Fix corruption of HOT chains when a RECENTLY_DEAD tuple changes

Re: [PATCH v2] use has_privs_for_role for predefined roles

2022-02-06 Thread Tom Lane
Joe Conway writes: > I'd like to pick this patch up and see it through to commit/push. > Presumably that will include back-patching to all supported pg versions. > Before I go through the effort to back-patch, does anyone want to argue > that this should *not* be back-patched? Hm, I'm -0.5 or

Re: [RFC] building postgres with meson

2022-02-06 Thread Andrew Dunstan
On 10/13/21 16:06, Andrew Dunstan wrote: > On 10/13/21 1:26 PM, Andres Freund wrote: >>> pexports will be in the resulting path, and the build will use the >>> native compiler. >> I don't see pexports anywhere in the msys installation. I can see it >> available >> on sourceforge, and I see a few

Re: [PATCH v2] use has_privs_for_role for predefined roles

2022-02-06 Thread Joe Conway
On 1/4/22 16:51, Joshua Brindle wrote: On Tue, Jan 4, 2022 at 3:56 PM Tom Lane wrote: "Bossart, Nathan" writes: > On 11/12/21, 12:34 PM, "Joshua Brindle" wrote: >> All of these and also adminpack.sgml updated. I think that is all of >> them but docs broken across lines and irregular

Re: BufferAlloc: don't take two simultaneous locks

2022-02-06 Thread Michail Nikolaev
Hello, Yura. A one additional moment: > 1332: Assert((oldFlags & (BM_PIN_COUNT_WAITER | BM_IO_IN_PROGRESS)) == 0); > 1333: CLEAR_BUFFERTAG(buf->tag); > 1334: buf_state &= ~(BUF_FLAG_MASK | BUF_USAGECOUNT_MASK); > 1335: UnlockBufHdr(buf, buf_state); I think there is no sense to unlock buffer

Re: pg_walinspect - a new extension to get raw WAL data and WAL stats

2022-02-06 Thread Robert Haas
On Mon, Jan 31, 2022 at 4:40 PM Greg Stark wrote: > So I looked at this patch and I have the same basic question as Bruce. > Do we really want to expose every binary tool associated with Postgres > as an extension? Obviously this is tempting for cloud provider users > which is not an unreasonable

Re: pg_upgrade should truncate/remove its logs before running

2022-02-06 Thread Andrew Dunstan
On 2/6/22 02:17, Tom Lane wrote: > Michael Paquier writes: >> On Sun, Feb 06, 2022 at 01:58:21AM -0500, Tom Lane wrote: >>> As already mentioned, there's been no notice to buildfarm owners ... >>> so has Andrew actually made a release? >> There has been one as of 8 days ago: >>

Re: Unclear problem reports

2022-02-06 Thread Magnus Hagander
On Sun, Feb 6, 2022 at 12:58 AM Noah Misch wrote: > > On Sun, Feb 06, 2022 at 12:41:52AM +0100, Magnus Hagander wrote: > > On Sun, Feb 6, 2022 at 12:02 AM Noah Misch wrote: > > > On Fri, Feb 04, 2022 at 01:36:46PM -0500, Bruce Momjian wrote: > > > > On Wed, Feb 2, 2022 at 07:21:19PM -0700,