Re: Windows now has fdatasync()

2022-07-19 Thread David Rowley
On Wed, 20 Jul 2022 at 15:22, Thomas Munro wrote: > Ok, I've pushed the Windows patch. I'll watch the build farm to see > if I've broken any of the frankentoolchain Windows animals. Just to get in there before the farm does... I just got a boatload of redefinition of HAVE_FDATASYNC warnings. I

Re: Windows now has fdatasync()

2022-07-19 Thread Thomas Munro
On Wed, Jul 20, 2022 at 4:08 PM David Rowley wrote: > On Wed, 20 Jul 2022 at 15:22, Thomas Munro wrote: > > Ok, I've pushed the Windows patch. I'll watch the build farm to see > > if I've broken any of the frankentoolchain Windows animals. > > Just to get in there before the farm does... I just

Remove fls(), use pg_bitutils.h facilities instead?

2022-07-19 Thread Thomas Munro
Hi, Back in commit 4f658dc8 we gained src/port/fls.c. As anticipated by its commit message, we later finished up with something better in src/include/port/pg_bitutils.h. fls() ("find last set") is an off-by-one cousin of pg_leftmost_one_pos32(). I don't know why ffs() ("find first set", the rig

Re: Use "WAL segment" instead of "log segment" consistently in user-facing messages

2022-07-19 Thread Bharath Rupireddy
On Wed, Jul 20, 2022 at 6:55 AM Kyotaro Horiguchi wrote: > > At Tue, 19 Jul 2022 09:58:28 -0700, Nathan Bossart > wrote in > > On Tue, Jul 19, 2022 at 02:43:59PM +0530, Bharath Rupireddy wrote: > > > Done. PSA v5 patch set. > > > > LGTM. I've marked this as ready-for-committer. > > I find the f

Re: Remove fls(), use pg_bitutils.h facilities instead?

2022-07-19 Thread David Rowley
On Wed, 20 Jul 2022 at 16:21, Thomas Munro wrote: > Back in commit 4f658dc8 we gained src/port/fls.c. As anticipated by > its commit message, we later finished up with something better in > src/include/port/pg_bitutils.h. fls() ("find last set") is an > off-by-one cousin of pg_leftmost_one_pos32

Re: Windows now has fdatasync()

2022-07-19 Thread Thomas Munro
On Wed, Jul 20, 2022 at 4:14 PM Thomas Munro wrote: > On Wed, Jul 20, 2022 at 4:08 PM David Rowley wrote: > > On Wed, 20 Jul 2022 at 15:22, Thomas Munro wrote: > > > Ok, I've pushed the Windows patch. I'll watch the build farm to see > > > if I've broken any of the frankentoolchain Windows anim

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

2022-07-19 Thread Amit Kapila
On Tue, Jul 19, 2022 at 1:46 PM Önder Kalacı wrote: > > Hi, thanks for your reply. > > Amit Kapila , 18 Tem 2022 Pzt, 08:29 tarihinde şunu > yazdı: >> >> > >> >> IIUC, this proposal is to optimize cases where users can't have a >> unique/primary key for a relation on the subscriber and those >> r

Re: Memory leak fix in psql

2022-07-19 Thread Junwang Zhao
-1 Though the patch looks good, I myself think the patch should be edited and submitted by Tang It's easy to attach a fixed patch based on the comments of the thread, but coins should be given to Tang since he is the first one to find the mem leak. No offense, but that's what I think how open sou

Re: Remove fls(), use pg_bitutils.h facilities instead?

2022-07-19 Thread Tom Lane
Thomas Munro writes: > Back in commit 4f658dc8 we gained src/port/fls.c. As anticipated by > its commit message, we later finished up with something better in > src/include/port/pg_bitutils.h. fls() ("find last set") is an > off-by-one cousin of pg_leftmost_one_pos32(). I don't know why ffs() >

Re: Backup command and functions can cause assertion failure and segmentation fault

2022-07-19 Thread Fujii Masao
On 2022/07/16 11:36, Michael Paquier wrote: I was thinking about doing that only on HEAD. One thing interesting about this patch is that it can also be used as a point of reference for other future things. Ok, here are review comments: +my $connstr = + $node->connstr('postgres') . " repli

Re: Handle infinite recursion in logical replication setup

2022-07-19 Thread Peter Smith
On Tue, Jul 19, 2022 at 11:34 PM Amit Kapila wrote: > > On Mon, Jul 18, 2022 at 9:46 PM vignesh C wrote: > > > > I have updated the patch to handle the origin value case > > insensitively. The attached patch has the changes for the same. > > > > Thanks, the patch looks mostly good to me. I have m

Re: fix stats_fetch_consistency value in postgresql.conf.sample

2022-07-19 Thread Justin Pryzby
On Tue, Jul 19, 2022 at 03:04:27PM +0900, Kyotaro Horiguchi wrote: > At Wed, 13 Jul 2022 18:54:45 -0500, Justin Pryzby > wrote in > > On Thu, Jul 14, 2022 at 08:46:02AM +0900, Michael Paquier wrote: > > > On Wed, Jul 13, 2022 at 12:30:00PM -0500, Justin Pryzby wrote: > > > > How did you make thi

Re: Memory leak fix in psql

2022-07-19 Thread Michael Paquier
On Wed, Jul 20, 2022 at 12:51:24PM +0800, Junwang Zhao wrote: > Though the patch looks good, I myself think the patch should be edited > and submitted by Tang > It's easy to attach a fixed patch based on the comments of the thread, > but coins should be > given to Tang since he is the first one to

Re: [BUG] Logical replication failure "ERROR: could not map filenode "base/13237/442428" to relation OID" with catalog modifying txns

2022-07-19 Thread Amit Kapila
On Wed, Jul 20, 2022 at 9:01 AM Masahiko Sawada wrote: > > On Wed, Jul 20, 2022 at 12:11 PM Amit Kapila wrote: > > > > On Tue, Jul 19, 2022 at 7:28 PM Masahiko Sawada > > wrote: > > > > Why do you think we can't remove > > ReorderBufferInitialXactsSetCatalogChanges() from the back branch > > pa

Re: Remove fls(), use pg_bitutils.h facilities instead?

2022-07-19 Thread Thomas Munro
On Wed, Jul 20, 2022 at 4:52 PM Tom Lane wrote: > I think we could probably just drop fls() entirely. It doesn't look > to me like any of the existing callers expect a zero argument, so they > could be converted to use pg_leftmost_one_pos32() pretty trivially. > I don't see that fls() is buying u

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

2022-07-19 Thread David Rowley
On Thu, 4 Nov 2021 at 20:59, Ronan Dunklau wrote: > I took some time to toy with this again. > > At first I thought that charging a discount in foreign grouping paths for > Aggref targets (since they are computed remotely) would be a good idea, > similar to what is done for the grouping keys. I'v

Re: Expose last replayed timeline ID along with last replayed LSN

2022-07-19 Thread Bharath Rupireddy
On Wed, Jul 20, 2022 at 7:06 AM Kyotaro Horiguchi wrote: > > At Tue, 19 Jul 2022 14:28:40 +0530, Bharath Rupireddy > wrote in > > Hi, > > > > At times it's useful to know the last replayed WAL record's timeline > > ID (especially on the standbys that are lagging in applying WAL while > > failing

Re: Remove fls(), use pg_bitutils.h facilities instead?

2022-07-19 Thread Thomas Munro
On Wed, Jul 20, 2022 at 5:26 PM Thomas Munro wrote: > On Wed, Jul 20, 2022 at 4:52 PM Tom Lane wrote: > > I think we could probably just drop fls() entirely. It doesn't look > > to me like any of the existing callers expect a zero argument, so they > > could be converted to use pg_leftmost_one_p

Re: Memory leak fix in psql

2022-07-19 Thread Junwang Zhao
Got it, thanks! On Wed, Jul 20, 2022 at 1:14 PM Michael Paquier wrote: > > On Wed, Jul 20, 2022 at 12:51:24PM +0800, Junwang Zhao wrote: > > Though the patch looks good, I myself think the patch should be edited > > and submitted by Tang > > It's easy to attach a fixed patch based on the comments

Re: Transparent column encryption

2022-07-19 Thread Masahiko Sawada
On Tue, Jul 19, 2022 at 10:52 PM Peter Eisentraut wrote: > > On 12.07.22 20:29, Peter Eisentraut wrote: > > Updated patch, to resolve some merge conflicts. > > Rebased patch, no new functionality Thank you for working on this and updating the patch! I've mainly looked at the documentation and te

RE: Memory leak fix in psql

2022-07-19 Thread tanghy.f...@fujitsu.com
On Wednesday, July 20, 2022 12:52 PM, Michael Paquier wrote: > What about the argument of upthread where we could use a goto in > functions where there are multiple pattern validation checks? Per se > v4 attached. Thanks for your kindly remind and modification. I checked v4 patch, it looks good

Re: Allow placeholders in ALTER ROLE w/o superuser

2022-07-19 Thread Kyotaro Horiguchi
At Tue, 19 Jul 2022 09:53:39 -0700, Nathan Bossart wrote in > On Tue, Jul 19, 2022 at 12:55:14AM -0500, Steve Chavez wrote: > > Taking your options into consideration, for me the correct behaviour should > > be: > > > > - The ALTER ROLE placeholder should always be stored with a PGC_USERSET > >

Re: Backup command and functions can cause assertion failure and segmentation fault

2022-07-19 Thread Michael Paquier
On Wed, Jul 20, 2022 at 02:00:00PM +0900, Fujii Masao wrote: > I reported two trouble cases; they are the cases where BASE_BACKUP > is canceled and terminated, respectively. But you added the test > only for one of them. Is this intentional? Nope. The one I have implemented was the fanciest case

<    1   2