Re: Skipping logical replication transactions on subscriber side

2021-09-01 Thread Greg Nancarrow
On Mon, Aug 30, 2021 at 5:07 PM Masahiko Sawada wrote: > > > I've attached rebased patches. 0004 patch is not the scope of this > patch. It's borrowed from another thread[1] to fix the assertion > failure for newly added tests. Please review them. > I have a few comments on the v12-0002 patch:

Re: pg_receivewal starting position

2021-09-01 Thread Kyotaro Horiguchi
At Wed, 1 Sep 2021 10:30:05 +0530, Bharath Rupireddy wrote in > On Mon, Aug 30, 2021 at 3:26 PM Ronan Dunklau wrote: > > > 7) How about we let pg_receivewal use READ_REPLICATION_SLOT as an option? > > > > From my point of view, I already expected it to use something like that when > > using a

Re: corruption of WAL page header is never reported

2021-09-01 Thread Fujii Masao
On 2021/09/02 13:17, Kyotaro Horiguchi wrote: Did you read the comment just above? Yes! xlog.c:12523 * Check the page header immediately, so that we can retry immediately if * it's not valid. This may seem unnecessary, because XLogReadRecord() * validates the

Re: Separate out FileSet from SharedFileSet (was Re: pgsql: pgstat: Bring up pgstat in BaseInit() to fix uninitialized use o)

2021-09-01 Thread Amit Kapila
On Wed, Sep 1, 2021 at 5:33 PM Dilip Kumar wrote: > > On Wed, Sep 1, 2021 at 5:23 PM Amit Kapila wrote: >> >> On Wed, Sep 1, 2021 at 1:53 PM Dilip Kumar wrote: >> > >> >> The latest patch looks good to me. I have made some changes in the >> comments, see attached. I am planning to push this

Re: Added schema level support for publication.

2021-09-01 Thread Amit Kapila
On Wed, Sep 1, 2021 at 12:06 PM Peter Smith wrote: > > Similarly, when you say ALTER PUBLICATION pub1 DROP ALL TABLES IN > SCHEMA sc1; I would expect it means to drop ALL tables in sc1 - not > all of them sometimes but not all of them at other times or even none > of them. > > ~~ > > I thought a

Re: Support reset of Shared objects statistics in "pg_stat_reset" function

2021-09-01 Thread Fujii Masao
On 2021/09/02 13:36, Sadhuprasad Patro wrote: Yes this update is fine.. Please commit this patch... Yeah, pushed. Thanks! Regards, -- Fujii Masao Advanced Computing Technology Center Research and Development Headquarters NTT DATA CORPORATION

Re: corruption of WAL page header is never reported

2021-09-01 Thread Kyotaro Horiguchi
(.. sorry for the chained-mails) At Thu, 02 Sep 2021 13:31:31 +0900 (JST), Kyotaro Horiguchi wrote in > Sorry, please let me add something. > > At Thu, 02 Sep 2021 13:17:16 +0900 (JST), Kyotaro Horiguchi > wrote in > > At Thu, 2 Sep 2021 12:19:25 +0900, Fujii Masao > > wrote in > > >

Re: Support reset of Shared objects statistics in "pg_stat_reset" function

2021-09-01 Thread Sadhuprasad Patro
On Wed, Sep 1, 2021 at 5:31 PM Fujii Masao wrote: > > > > On 2021/08/24 13:07, Mahendra Singh Thalor wrote: > > Thanks Sadhu for the updated patch. > > > > Patch looks good to me and I don't have any more comments. > > > > I marked this patch as 'ready for committer'. > >

Re: corruption of WAL page header is never reported

2021-09-01 Thread Kyotaro Horiguchi
Sorry, please let me add something. At Thu, 02 Sep 2021 13:17:16 +0900 (JST), Kyotaro Horiguchi wrote in > At Thu, 2 Sep 2021 12:19:25 +0900, Fujii Masao > wrote in > > Also I'm tempted to move ereport() and reset of errmsg_buf to > > under next_record_is_invalid as follows. That is, in

Re: row filtering for logical replication

2021-09-01 Thread Peter Smith
On Thu, Sep 2, 2021 at 1:43 PM Amit Kapila wrote: > ... > I think if get Dilip's patch then we can have a rule for filter > columns such that it can contain only replica identity key columns. > This rule is anyway required for Deletes and we can have it for > Updates. At this stage, I haven't

Re: corruption of WAL page header is never reported

2021-09-01 Thread Kyotaro Horiguchi
At Thu, 2 Sep 2021 12:19:25 +0900, Fujii Masao wrote in > > > On 2021/07/19 18:52, Yugo NAGATA wrote: > > Well, I think my first patch was not wrong. The difference with the > > latest > > patch is just whether we perform the additional check when we are not > > in > > standby mode or not.

Re: row filtering for logical replication

2021-09-01 Thread Amit Kapila
On Wed, Sep 1, 2021 at 8:29 PM Euler Taveira wrote: > > On Wed, Sep 1, 2021, at 9:36 AM, Amit Kapila wrote: > > I think this or any other similar solution for row filters (on > updates) won't work till we solve the problem reported by Hou-San [1]. > The main reason is that we don't have data for

Re: corruption of WAL page header is never reported

2021-09-01 Thread Fujii Masao
On 2021/07/19 18:52, Yugo NAGATA wrote: Well, I think my first patch was not wrong. The difference with the latest patch is just whether we perform the additional check when we are not in standby mode or not. The behavior is basically the same although which function detects and prints the

Re: Skipping logical replication transactions on subscriber side

2021-09-01 Thread Greg Nancarrow
On Mon, Aug 30, 2021 at 5:07 PM Masahiko Sawada wrote: > > > I've attached rebased patches. 0004 patch is not the scope of this > patch. It's borrowed from another thread[1] to fix the assertion > failure for newly added tests. Please review them. > I have some initial feedback on the v12-0001

Re: BUG #16583: merge join on tables with different DB collation behind postgres_fdw fails

2021-09-01 Thread Etsuro Fujita
On Thu, Sep 2, 2021 at 5:42 AM Tom Lane wrote: > Etsuro Fujita writes: > > On Thu, Jul 15, 2021 at 4:17 AM Ibrar Ahmed wrote: > >> On Wed, Jul 14, 2021 at 1:41 AM Tom Lane wrote: > >>> Seems to just need an update of the expected-file to account for test > >>> cases added recently. (I take no

RE: Failed transaction statistics to measure the logical replication progress

2021-09-01 Thread osumi.takami...@fujitsu.com
Hi I've made a new patch to extend pg_stat_subscription as suggested in [1] to have columns xact_commit, xact_error and independent xact_abort mentioned in [2]. Also, during discussion, we touched a topic if we should include data sizes for each column above and concluded that it's better to

Re: Postgres Win32 build broken?

2021-09-01 Thread Andrew Dunstan
> On Sep 1, 2021, at 8:01 PM, Ranier Vilela wrote: > >  >> Em qua., 1 de set. de 2021 às 19:49, Andrew Dunstan >> escreveu: >> >> On 9/1/21 4:00 PM, Andrew Dunstan wrote: >> > On 8/31/21 9:52 PM, Michael Paquier wrote: >> >> On Tue, Aug 31, 2021 at 07:49:40PM -0300, Ranier Vilela wrote: >>

Re: Using COPY FREEZE in pgbench

2021-09-01 Thread Tatsuo Ishii
>> I tested this with -s100 and got similar results, but with -s1000 it >> was more like 1.5x faster: >> >> master: >> done in 111.33 s (drop tables 0.00 s, create tables 0.01 s, >> client-side generate 52.45 s, vacuum 32.30 s, primary keys 26.58 s) >> >> patch: >> done in 74.04 s (drop tables

Re: Possible missing segments in archiving on standby

2021-09-01 Thread Kyotaro Horiguchi
At Wed, 1 Sep 2021 14:37:43 +0900, Fujii Masao wrote in > > > On 2021/09/01 12:12, Kyotaro Horiguchi wrote: > > Putting aside the issue C, it would work as far as recovery is not > > paused or delayed. Although simply doing that means we run additional > > and a bit) wasteful

Re: prevent immature WAL streaming

2021-09-01 Thread Kyotaro Horiguchi
At Wed, 1 Sep 2021 15:01:43 +0900, Fujii Masao wrote in > > > On 2021/09/01 12:15, Andres Freund wrote: > > Hi, > > On 2021-09-01 11:34:34 +0900, Fujii Masao wrote: > >> On 2021/09/01 0:53, Andres Freund wrote: > >>> Of course, we need to be careful to not weaken WAL validity checking > >>>

Re: [PATCH] test/ssl: rework the sslfiles Makefile target

2021-09-01 Thread Jacob Champion
On Fri, 2021-08-27 at 15:02 +0900, Michael Paquier wrote: > On Fri, Aug 13, 2021 at 12:08:16AM +, Jacob Champion wrote: > > If _that's_ the case, then our build system is holding all of us > > hostage. Which is frustrating to me. Should I shift focus to help with > > that, first? > > Fresh

Re: prevent immature WAL streaming

2021-09-01 Thread Bossart, Nathan
On 9/1/21, 10:06 AM, "Andres Freund" wrote: > On 2021-09-01 15:01:43 +0900, Fujii Masao wrote: >> Thanks for clarifying that! Unless I misunderstand that, when recovery ends >> at a partially-flushed segment-spanning record, it sets >> XLP_FIRST_IS_ABORTED_PARTIAL in the next segment before

Re: Postgres Win32 build broken?

2021-09-01 Thread Ranier Vilela
Em qua., 1 de set. de 2021 às 19:49, Andrew Dunstan escreveu: > > On 9/1/21 4:00 PM, Andrew Dunstan wrote: > > On 8/31/21 9:52 PM, Michael Paquier wrote: > >> On Tue, Aug 31, 2021 at 07:49:40PM -0300, Ranier Vilela wrote: > >>> I'm not a perl specialist and it seems to me that the Win32 build is

Re: Postgres Win32 build broken?

2021-09-01 Thread Michael Paquier
On Wed, Sep 01, 2021 at 06:49:31PM -0400, Andrew Dunstan wrote: > On 9/1/21 4:00 PM, Andrew Dunstan wrote: >> I am seeing the same result as Ranier using VS2017 and VS 2019. > > But not with VS2013. If you need to build 32 bit client libraries, using > an older VS release is probably your best

Re: Numeric x^y for negative x

2021-09-01 Thread Jaime Casanova
On Fri, Aug 06, 2021 at 09:27:03PM +0100, Dean Rasheed wrote: > On Fri, 6 Aug 2021 at 21:26, Tom Lane wrote: > > > > Dean Rasheed writes: > > > On Fri, 6 Aug 2021 at 17:15, Tom Lane wrote: > > >> Looks plausible by eyeball (I've not tested). > > > > > So, I have back-branch patches for this

Re: psql tab auto-complete for CREATE PUBLICATION

2021-09-01 Thread Peter Smith
On Wed, Sep 1, 2021 at 11:04 PM Fujii Masao wrote: > > > > On 2021/07/17 2:19, vignesh C wrote: > > Thanks for the patch, the changes look good to me. > > The patch looks good to me, too. Pushed. Thanks! > Thanks for pushing! -- Kind Regards, Peter Smith. Fujitsu Australia

Re: Postgres Win32 build broken?

2021-09-01 Thread Andrew Dunstan
On 9/1/21 4:00 PM, Andrew Dunstan wrote: > On 8/31/21 9:52 PM, Michael Paquier wrote: >> On Tue, Aug 31, 2021 at 07:49:40PM -0300, Ranier Vilela wrote: >>> I'm not a perl specialist and it seems to me that the Win32 build is broken. >>> The Win32 build is still important because of the 32-bit

Re: unpack_sql_state not called?

2021-09-01 Thread Peter Smith
Thanks for pushing! -- Kind Regards, Peter Smith. Fujitsu Australia

Re: libpq compression

2021-09-01 Thread Daniel Gustafsson
> On 29 Jul 2021, at 16:57, Daniil Zakhlystov wrote: > > Forgot to attach the updated patch :) This fails to build on Windows due to the use of strcasecmp: + if (strcasecmp(supported_algorithms[zpq->compressors[i].impl], "zstd") == Was that meant to be pg_strcasecmp? --

stat() vs ERROR_DELETE_PENDING, round N + 1

2021-09-01 Thread Thomas Munro
Hi, Back 2017, Michael and Magus apparently fixed a bug report[1] about failing basebackups on Windows due to its concurrent file access semantics: commit 9951741bbeb3ec37ca50e9ce3df1808c931ff6a6 Author: Magnus Hagander Date: Wed Jan 4 10:48:30 2017 +0100 Attempt to handle pending-delete

Re: [PATCH] regexp_positions ( string text, pattern text, flags text ) → setof int4range[]

2021-09-01 Thread Daniel Gustafsson
> On 1 Sep 2021, at 16:02, Tom Lane wrote: > > Daniel Gustafsson writes: >>> On 9 Mar 2021, at 20:30, Joel Jacobson wrote: >>> Attached is a patch implementing it this way. > >> This patch no longer applies, can you please submit a rebased version? On a brief skim, this patch includes the

Re: [PATCH] Support pg_ident mapping for LDAP

2021-09-01 Thread Jacob Champion
On Wed, 2021-09-01 at 14:20 -0700, Zhihong Yu wrote: > I looked at v2-Allow-user-name-mapping-with-LDAP.patch > and src/backend/postmaster/postmaster.c in master branch but didn't > find what you mentioned. This hunk is in src/backend/libpq/hba.c, in the parse_hba_auth_opt() function. The code

Re: Column Filtering in Logical Replication

2021-09-01 Thread Rahila Syed
Hi, >> Another point is what if someone drops the column used in one of the >> publications? Do we want to drop the entire relation from publication >> or just remove the column filter or something else? >> > After thinking about this, I think it is best to remove the entire table from

Re: [PATCH] Support pg_ident mapping for LDAP

2021-09-01 Thread Zhihong Yu
On Wed, Sep 1, 2021 at 1:56 PM Jacob Champion wrote: > On Wed, 2021-09-01 at 12:59 -0700, Zhihong Yu wrote: > > + if (strcmp(val, "1") == 0) > > + hbaline->ldap_map_dn = true; > > + else > > + hbaline->ldap_map_dn = false; > > > > The above can be shortened as: >

Re: [PATCH] Support pg_ident mapping for LDAP

2021-09-01 Thread Jacob Champion
On Wed, 2021-09-01 at 12:59 -0700, Zhihong Yu wrote: > + if (strcmp(val, "1") == 0) > + hbaline->ldap_map_dn = true; > + else > + hbaline->ldap_map_dn = false; > > The above can be shortened as: > > hbaline->ldap_map_dn = strcmp(val, "1") == 0; I usually prefer

Re: BUG #16583: merge join on tables with different DB collation behind postgres_fdw fails

2021-09-01 Thread Tom Lane
Etsuro Fujita writes: > On Thu, Jul 15, 2021 at 4:17 AM Ibrar Ahmed wrote: >> On Wed, Jul 14, 2021 at 1:41 AM Tom Lane wrote: >>> Seems to just need an update of the expected-file to account for test >>> cases added recently. (I take no position on whether the new results >>> are desirable;

Re: Add jsonlog log_destination for JSON server logs

2021-09-01 Thread Sehrope Sarkuni
Updated patch set is attached. This version splits out the existing csvlog code into its own file and centralizes the common helpers into a new elog-internal.h so that they're only included by the actual write_xyz sources. That makes the elog.c changes in the JSON logging patch minimal as all

Re: Postgres Win32 build broken?

2021-09-01 Thread Andrew Dunstan
On 8/31/21 9:52 PM, Michael Paquier wrote: > On Tue, Aug 31, 2021 at 07:49:40PM -0300, Ranier Vilela wrote: >> I'm not a perl specialist and it seems to me that the Win32 build is broken. >> The Win32 build is still important because of the 32-bit clients still in >> use. >> I'm investigating

Re: [PATCH] Support pg_ident mapping for LDAP

2021-09-01 Thread Zhihong Yu
On Wed, Sep 1, 2021 at 11:43 AM Jacob Champion wrote: > On Wed, 2021-09-01 at 15:42 +, Jacob Champion wrote: > > The cfbot found a failure in postgres_fdw, which I completely neglected > > in my design. I think the desired functionality should be to allow the > > ldapuser connection option

Re: PoC/WIP: Extended statistics on expressions

2021-09-01 Thread Tomas Vondra
On 9/1/21 9:38 PM, Justin Pryzby wrote: On Wed, Sep 01, 2021 at 06:45:29PM +0200, Tomas Vondra wrote: Patch 0001 fixes the "double parens" issue discussed elsewhere in this thread, and patch 0002 tweaks CREATE STATISTICS to treat "(a)" as a simple column reference. 0002 refuses to create

Re: PoC/WIP: Extended statistics on expressions

2021-09-01 Thread Justin Pryzby
On Wed, Sep 01, 2021 at 06:45:29PM +0200, Tomas Vondra wrote: > > > Patch 0001 fixes the "double parens" issue discussed elsewhere in this > > > thread, and patch 0002 tweaks CREATE STATISTICS to treat "(a)" as a simple > > > column reference. > > > > 0002 refuses to create expressional stats on

Re: mark the timestamptz variant of date_bin() as stable

2021-09-01 Thread Tom Lane
John Naylor writes: > On Wed, Sep 1, 2021 at 2:44 PM Tom Lane wrote: >> I see that these two answers are both exactly multiples of 24 hours away >> from the given origin. But if I'm binning on the basis of "days" or >> larger units, I would sort of expect to get local midnight, and I'm not >>

Re: mark the timestamptz variant of date_bin() as stable

2021-09-01 Thread John Naylor
On Wed, Sep 1, 2021 at 2:44 PM Tom Lane wrote: > regression=# set timezone to 'America/New_York'; > SET > regression=# select date_bin('1 day', '2021-11-01 00:00 +00'::timestamptz, '2021-09-01 00:00 -04'::timestamptz); > date_bin > > 2021-10-31 00:00:00-04 > (1

Re: mark the timestamptz variant of date_bin() as stable

2021-09-01 Thread Tom Lane
Justin Pryzby writes: > On Wed, Sep 01, 2021 at 01:26:26PM -0400, John Naylor wrote: >> I'm not quite willing to bet the answer couldn't change if the timezone >> changes, but it's possible I'm the one missing something. > ts=# SET timezone='-12'; > ts=# SELECT date_bin('1hour', '2021-07-01

Re: mark the timestamptz variant of date_bin() as stable

2021-09-01 Thread Justin Pryzby
On Wed, Sep 01, 2021 at 01:26:26PM -0400, John Naylor wrote: > On Wed, Sep 1, 2021 at 5:32 AM Aleksander Alekseev > wrote: > > > > By looking at timestamptz_bin() implementation I don't see why it > > should be STABLE. Its return value depends only on the input values. > > It doesn't look at the

Re: mark the timestamptz variant of date_bin() as stable

2021-09-01 Thread Tom Lane
John Naylor writes: > On Wed, Sep 1, 2021 at 5:32 AM Aleksander Alekseev > wrote: >> By looking at timestamptz_bin() implementation I don't see why it >> should be STABLE. Its return value depends only on the input values. >> It doesn't look at the session parameters. timestamptz_in() and >>

Re: [PATCH] Support pg_ident mapping for LDAP

2021-09-01 Thread Jacob Champion
On Wed, 2021-09-01 at 15:42 +, Jacob Champion wrote: > The cfbot found a failure in postgres_fdw, which I completely neglected > in my design. I think the desired functionality should be to allow the > ldapuser connection option during CREATE USER MAPPING but not CREATE > SERVER. Fixed in v2,

Re: Converting contrib SQL functions to new style

2021-09-01 Thread Tom Lane
Peter Eisentraut writes: > On 14.04.21 00:26, Tom Lane wrote: >> Attached are some draft patches to convert almost all of the >> contrib modules' SQL functions to use SQL-standard function bodies. > This first patch is still the patch of record in CF 2021-09, but from > the subsequent

Re: mark the timestamptz variant of date_bin() as stable

2021-09-01 Thread John Naylor
On Wed, Sep 1, 2021 at 5:32 AM Aleksander Alekseev wrote: > > By looking at timestamptz_bin() implementation I don't see why it > should be STABLE. Its return value depends only on the input values. > It doesn't look at the session parameters. timestamptz_in() and > timestamptz_out() are STABLE,

Re: prevent immature WAL streaming

2021-09-01 Thread Andres Freund
Hi, On 2021-09-01 15:01:43 +0900, Fujii Masao wrote: > Thanks for clarifying that! Unless I misunderstand that, when recovery ends > at a partially-flushed segment-spanning record, it sets > XLP_FIRST_IS_ABORTED_PARTIAL in the next segment before starting writing > new WAL data there. Therefore

Re: 2021-09 Commitfest

2021-09-01 Thread Jaime Casanova
On Wed, Sep 01, 2021 at 06:32:38PM +0200, Magnus Hagander wrote: > On Wed, Sep 1, 2021 at 4:26 PM Jaime Casanova > wrote: > > > > On Wed, Sep 01, 2021 at 03:10:32PM +0200, Daniel Gustafsson wrote: > > > It is now 2021-09-01 Anywhere On Earth so I’ve set the September > > > commitfest to > > > In

Re: PoC/WIP: Extended statistics on expressions

2021-09-01 Thread Tomas Vondra
On 8/24/21 3:13 PM, Justin Pryzby wrote: On Mon, Aug 16, 2021 at 05:41:57PM +0200, Tomas Vondra wrote: This still seems odd: postgres=# CREATE STATISTICS asf ON i FROM t; ERROR: extended statistics require at least 2 columns postgres=# CREATE STATISTICS asf ON (i) FROM t; CREATE STATISTICS

Re: Is it safe to use the extended protocol with COPY?

2021-09-01 Thread Tom Lane
Daniele Varrazzo writes: > Someone [1] has pointed out this conversation [2] which suggests that > COPY with extended protocol might break in the future. As was pointed out in that same thread, the odds of us actually breaking that case are nil. I wouldn't recommend changing your code on this

Re: 2021-09 Commitfest

2021-09-01 Thread Magnus Hagander
On Wed, Sep 1, 2021 at 4:26 PM Jaime Casanova wrote: > > On Wed, Sep 01, 2021 at 03:10:32PM +0200, Daniel Gustafsson wrote: > > It is now 2021-09-01 Anywhere On Earth so I’ve set the September commitfest > > to > > In Progress and opened the November one for new entries. Jaime Casanova has > >

Is it safe to use the extended protocol with COPY?

2021-09-01 Thread Daniele Varrazzo
Hello, in psycopg 3 we are currently using PQexecParams - although with no params - to send COPY commands. The reason is mostly to avoid people to send COPY together with other statements. Especially if other operations are chained after COPY: we would only notice them after copy is finished.

Re: [PATCH] test/ssl: rework the sslfiles Makefile target

2021-09-01 Thread Jacob Champion
On Fri, 2021-08-27 at 15:02 +0900, Michael Paquier wrote: > On Fri, Aug 13, 2021 at 12:08:16AM +, Jacob Champion wrote: > > (Things would get hairier if someone included the SSL Makefile > > somewhere else, but I don't see anyone doing that now and I don't know > > why someone would.) > >

Re: WIP: System Versioned Temporal Table

2021-09-01 Thread Jaime Casanova
Hi, This doesn't pass tests because of lack of some file. Can we fix that please and send the patch again? On Tue, Aug 10, 2021 at 7:20 AM Simon Riggs wrote: > On Wed, 14 Jul 2021 at 12:48, vignesh C wrote: > > > The patch does not apply on Head anymore, could you rebase and post a > > patch.

Re: dup(0) fails on Ubuntu 20.04 and macOS 10.15 with 13.0

2021-09-01 Thread Tom Lane
Mario Emmenlauer writes: > The idea to switch to dup(2) sounds very good to me. Also, while at it, > maybe the error message could be improved? The kids nowadays don't learn > so much about system I/O any more, and if someone does not know `dup()`, > then the error message is not very telling. It

Re: dup(0) fails on Ubuntu 20.04 and macOS 10.15 with 13.0

2021-09-01 Thread Mario Emmenlauer
On 01.09.21 15:54, Tom Lane wrote: > Mario Emmenlauer writes: >> On 05.10.20 14:35, Tom Lane wrote: >>> Mario Emmenlauer writes: I get reproducibly the error: 2020-10-05 11:48:19.720 CEST [84731] WARNING: dup(0) failed after 0 successes: Bad file descriptor > >>> Hmph. That

Re: [PATCH] Support pg_ident mapping for LDAP

2021-09-01 Thread Jacob Champion
On Tue, 2021-08-31 at 19:39 +, Jacob Champion wrote: > Hello, > > There was a brief discussion [1] back in February on allowing user > mapping for LDAP, in order to open up some more complex authorization > logic (and slightly reduce the need for LDAP-to-Postgres user > synchronization).

Re: Allow escape in application_name (was: [postgres_fdw] add local pid to fallback_application_name)

2021-09-01 Thread Fujii Masao
On 2021/09/01 19:04, kuroda.hay...@fujitsu.com wrote: OK, I split and attached like that. 0001 adds new GUC, and 0002 allows to accept escapes. Thanks for splitting and updating the patches! Here are the comments for 0001 patch. - /* Use "postgres_fdw" as

Re: row filtering for logical replication

2021-09-01 Thread Euler Taveira
On Wed, Sep 1, 2021, at 9:36 AM, Amit Kapila wrote: > I think this or any other similar solution for row filters (on > updates) won't work till we solve the problem reported by Hou-San [1]. > The main reason is that we don't have data for unchanged toast columns > in WAL. For that, we have

Re: AIX: Symbols are missing in libpq.a

2021-09-01 Thread Tony Reix
A new patch, using exports.txt file instead of building the list of symbols to be exported and merging the 2 files, has been provided. This seems much better.

Re: 2021-09 Commitfest

2021-09-01 Thread Jaime Casanova
On Wed, Sep 01, 2021 at 03:10:32PM +0200, Daniel Gustafsson wrote: > It is now 2021-09-01 Anywhere On Earth so I’ve set the September commitfest to > In Progress and opened the November one for new entries. Jaime Casanova has > volunteered for CFM [0], so let’s help him close the 284 still open

Re: Add statistics refresh materialized view

2021-09-01 Thread Fujii Masao
On 2021/07/09 1:39, Seino Yuki wrote: Hi. This is a proposal for a new feature in statistics collector. I think we need to add statistics about refresh matview to pg_stat_all_tables view. Why do you want to treat only REFRESH MATERIALIZED VIEW command special? What about other utility

Re: Re: [PATCH] regexp_positions ( string text, pattern text, flags text ) → setof int4range[]

2021-09-01 Thread Tom Lane
Daniel Gustafsson writes: >> On 9 Mar 2021, at 20:30, Joel Jacobson wrote: >> Attached is a patch implementing it this way. > This patch no longer applies, can you please submit a rebased version? Also, since 642433707 ("This patch adds new functions regexp_count(), regexp_instr(),

Re: dup(0) fails on Ubuntu 20.04 and macOS 10.15 with 13.0

2021-09-01 Thread Tom Lane
[ redirecting to -hackers ] Mario Emmenlauer writes: > On 05.10.20 14:35, Tom Lane wrote: >> Mario Emmenlauer writes: >>> I get reproducibly the error: >>> 2020-10-05 11:48:19.720 CEST [84731] WARNING: dup(0) failed after 0 >>> successes: Bad file descriptor >> Hmph. That code loop assumes

2021-09 Commitfest

2021-09-01 Thread Daniel Gustafsson
It is now 2021-09-01 Anywhere On Earth so I’ve set the September commitfest to In Progress and opened the November one for new entries. Jaime Casanova has volunteered for CFM [0], so let’s help him close the 284 still open items in the queue. -- Daniel Gustafsson

Re: psql tab auto-complete for CREATE PUBLICATION

2021-09-01 Thread Fujii Masao
On 2021/07/17 2:19, vignesh C wrote: Thanks for the patch, the changes look good to me. The patch looks good to me, too. Pushed. Thanks! Regards, -- Fujii Masao Advanced Computing Technology Center Research and Development Headquarters NTT DATA CORPORATION

Re: support for MERGE

2021-09-01 Thread Daniel Gustafsson
> On 1 Sep 2021, at 14:25, Alvaro Herrera wrote: > > On 2021-Sep-01, Daniel Gustafsson wrote: > >>> On 21 Mar 2021, at 14:57, Alvaro Herrera wrote: >>> On 2021-Mar-21, Magnus Hagander wrote: >> But what is it we *want* it to do? That is, what should be the target? Is it 2021-07 with

Re: row filtering for logical replication

2021-09-01 Thread Amit Kapila
On Wed, Sep 1, 2021 at 4:53 PM Euler Taveira wrote: > > On Sun, Aug 29, 2021, at 11:14 PM, Peter Smith wrote: > > Here are the new v26* patches. This is a refactoring of the row-filter > caches to remove all the logic from the get_rel_sync_entry function > and delay it until if/when needed in the

Re: Add jsonlog log_destination for JSON server logs

2021-09-01 Thread Sehrope Sarkuni
On Tue, Aug 31, 2021 at 8:43 PM Michael Paquier wrote: > On Tue, Aug 31, 2021 at 11:34:56AM -0400, Sehrope Sarkuni wrote: > > The second commit adds a TAP test for log_destination "csvlog". This was > > done to both confirm that the previous change didn't break anything and > as > > a skeleton

Re: support for MERGE

2021-09-01 Thread Alvaro Herrera
On 2021-Sep-01, Daniel Gustafsson wrote: > > On 21 Mar 2021, at 14:57, Alvaro Herrera wrote: > > On 2021-Mar-21, Magnus Hagander wrote: > > >> But what is it we *want* it to do? That is, what should be the target? > >> Is it 2021-07 with status WoA? > > > > Yeah, that sounds like it, thanks. >

Re: Separate out FileSet from SharedFileSet (was Re: pgsql: pgstat: Bring up pgstat in BaseInit() to fix uninitialized use o)

2021-09-01 Thread Dilip Kumar
On Wed, Sep 1, 2021 at 5:23 PM Amit Kapila wrote: > On Wed, Sep 1, 2021 at 1:53 PM Dilip Kumar wrote: > > > > The latest patch looks good to me. I have made some changes in the > comments, see attached. I am planning to push this tomorrow unless you > or others have any comments on it. > These

Re: Support reset of Shared objects statistics in "pg_stat_reset" function

2021-09-01 Thread Fujii Masao
On 2021/08/24 13:07, Mahendra Singh Thalor wrote: Thanks Sadhu for the updated patch. Patch looks good to me and I don't have any more comments. I marked this patch as 'ready for committer'. https://commitfest.postgresql.org/34/3282/ Attached

Re: Update of partition key on foreign server

2021-09-01 Thread Etsuro Fujita
On Thu, Aug 26, 2021 at 11:10 PM Ilya Gladyshev wrote: > I have developed a simple patch to fix this, while I’m not fully satisfied > with it, it gets the job done. Thanks for working on this! > In message [1] there’s also mentioned possibility of existence of triggers on > the foreign

Re: Separate out FileSet from SharedFileSet (was Re: pgsql: pgstat: Bring up pgstat in BaseInit() to fix uninitialized use o)

2021-09-01 Thread Amit Kapila
On Wed, Sep 1, 2021 at 1:53 PM Dilip Kumar wrote: > The latest patch looks good to me. I have made some changes in the comments, see attached. I am planning to push this tomorrow unless you or others have any comments on it. -- With Regards, Amit Kapila.

Re: row filtering for logical replication

2021-09-01 Thread Euler Taveira
On Sun, Aug 29, 2021, at 11:14 PM, Peter Smith wrote: > Here are the new v26* patches. This is a refactoring of the row-filter > caches to remove all the logic from the get_rel_sync_entry function > and delay it until if/when needed in the pgoutput_row_filter function. > This is now implemented

Re: postgres_fdw: Handle boolean comparison predicates

2021-09-01 Thread Daniel Gustafsson
> On 31 May 2021, at 18:51, Emre Hasegeli wrote: > >> Please add this patch to the commitfest so that it's not forgotten. It >> will be considered as a new feature so will be considered for commit >> after the next commitfest. > > I did [1]. The patch no longer applies to HEAD, can you please

Re: Postgres Win32 build broken?

2021-09-01 Thread Ranier Vilela
Em ter., 31 de ago. de 2021 às 22:52, Michael Paquier escreveu: > On Tue, Aug 31, 2021 at 07:49:40PM -0300, Ranier Vilela wrote: > > I'm not a perl specialist and it seems to me that the Win32 build is > broken. > > The Win32 build is still important because of the 32-bit clients still in > >

Re: [PATCH] Partial foreign key updates in referential integrity triggers

2021-09-01 Thread Daniel Gustafsson
> On 4 Aug 2021, at 23:49, Paul Martinez wrote: > I've rebased my original patch and it should work now. This patch no longer applies, can you please submit a rebased version? It currently fails on catversion.h, to keep that from happening repeatedly you can IMO skip that from the patch

Re: Parallelize correlated subqueries that execute within each worker

2021-09-01 Thread Daniel Gustafsson
> On 7 May 2021, at 18:30, James Coleman wrote: > ..here we are now, and I finally have this patch cleaned up > enough to share. This patch no longer applies to HEAD, can you please submit a rebased version? -- Daniel Gustafsson https://vmware.com/

Re: NOT VALID for Unique Indexes

2021-09-01 Thread Daniel Gustafsson
> On 26 Feb 2021, at 10:36, Simon Riggs wrote: > I won't be able to finish this patch in time for this next CF, but > thanks for your interest, I will complete for PG15 later this year. This patch no longer applies to HEAD, will there be an updated version for this CF? -- Daniel Gustafsson

Re: logical replication empty transactions

2021-09-01 Thread Ajin Cherian
On Wed, Aug 25, 2021 at 5:15 PM Peter Smith wrote: > > I reviewed the v14-0001 patch. > > All my previous comments have been addressed. > > Apply / build / test was all OK. > > -- > > More review comments: > > 1. Params names in the function declarations should match the rest of the > code.

Re: support for MERGE

2021-09-01 Thread Daniel Gustafsson
> On 21 Mar 2021, at 14:57, Alvaro Herrera wrote: > On 2021-Mar-21, Magnus Hagander wrote: >> But what is it we *want* it to do? That is, what should be the target? >> Is it 2021-07 with status WoA? > > Yeah, that sounds like it, thanks. This patch fails to apply, will there be a new version

Re: Next Steps with Hash Indexes

2021-09-01 Thread Sadhuprasad Patro
> > That's a significant difference. Have you checked via perf or some > other way what causes this difference? I have seen that sometimes > single client performance with pgbench is not stable, so can you > please once check with 4 clients or so and possibly with a larger > dataset as well. I

Re: Trap errors from streaming child in pg_basebackup to exit early

2021-09-01 Thread Bharath Rupireddy
On Wed, Sep 1, 2021 at 1:56 PM Daniel Gustafsson wrote: > A v2 with the above fixes is attached. Thanks for the updated patch. Here are some comments: 1) Do we need to set bgchild = -1 before the exit(1); in the code below so that we don't kill(bgchild, SIGTERM); unnecessarily in

RE: Allow escape in application_name (was: [postgres_fdw] add local pid to fallback_application_name)

2021-09-01 Thread kuroda.hay...@fujitsu.com
Dear Fujii-san, > Can we split the patch into two as follows? If so, we can review > and commit them one by one. > > #1. Add application_name GUC into postgres_fdw > #2. Allow to specify special escape characters in application_name that > postgres_fdw uses. OK, I split and attached like that.

Re: Fix around conn_duration in pgbench

2021-09-01 Thread Yugo NAGATA
On Wed, 1 Sep 2021 17:07:43 +0900 Fujii Masao wrote: > > > On 2021/09/01 1:10, Fujii Masao wrote: > > +1. So we reached the consensus! > > > > Attached is the updated version of the patch. Based on Nagata-san's latest > > patch, > > I just modified the comment slightly and ran pgindent.

Re: mark the timestamptz variant of date_bin() as stable

2021-09-01 Thread Aleksander Alekseev
Hi John, By looking at timestamptz_bin() implementation I don't see why it should be STABLE. Its return value depends only on the input values. It doesn't look at the session parameters. timestamptz_in() and timestamptz_out() are STABLE, that's true, but this is no concern of timestamptz_bin().

Re: [PATCH] Native spinlock support on RISC-V

2021-09-01 Thread Christoph Berg
Re: Tom Lane > I did not like confusing the RISC-V case with the ARM case: duplicating > the code block seems better, in case there's ever reason to add > arch-specific stuff like SPIN_DELAY. So I split it off to its own > code block and pushed it. Fwiw I can report success on Debian's riscv

Re: Patch: shouldn't timezone(text, timestamp[tz]) be STABLE?

2021-09-01 Thread Aleksander Alekseev
Hi Tom, > No, because date_trunc depends on the current timezone setting, > or at least its stable variants do. Once again, many thanks for your answers! > I wasn't excited enough about it personally to change it, and I'm > still not --- but if you want to, send a patch. Here is the patch. --

Re: Returning to Postgres community work

2021-09-01 Thread Julien Rouhaud
On Wed, Sep 1, 2021 at 1:02 AM Gurjeet Singh wrote: > > On Tue, Aug 31, 2021 at 8:04 AM Alvaro Herrera > wrote: > > > > You know what I've heard? That your index advisor module languishes > > unmaintained and that there's no shortage of people wishing to use it. > > Now there's a masterclass

Re: Autovacuum (analyze) on partitioned tables for ATTACH/DETACH/DROP commands

2021-09-01 Thread Daniel Gustafsson
> On 21 Jun 2021, at 10:21, yuzuko wrote: > Attach the v1 patch. What do you think? This patch no longer applies to HEAD, can you please submit a rebased version for the commitfest? -- Daniel Gustafsson https://vmware.com/

Re: [PATCH] regexp_positions ( string text, pattern text, flags text ) → setof int4range[]

2021-09-01 Thread Daniel Gustafsson
> On 9 Mar 2021, at 20:30, Joel Jacobson wrote: > Attached is a patch implementing it this way. This patch no longer applies, can you please submit a rebased version? -- Daniel Gustafsson https://vmware.com/

Re: Add option --drop-cascade for pg_dump/restore

2021-09-01 Thread Daniel Gustafsson
> On 16 Aug 2021, at 08:35, Wu Haotian wrote: > > There are already documents for "--clean only works with plain text output", > so adding checks for --clean seems like a breaking change to me. > > I've updated the docs to indicate --drop-cascade and --if-exists only > works with plain text

RE: AIX: Symbols are missing in libpq.a

2021-09-01 Thread REIX, Tony
Thanks for your help! That wasn't so difficult, once I've refreshed my memory. Here is a new patch, using the export.txt whenever it does exist. I have tested it with v13.4 : it's OK. Patch for 14beta3 should be the same since there was no change for src/Makefile.shlib between v13 and v14.

Re: pg_receivewal: remove extra conn = NULL; in StreamLog

2021-09-01 Thread Bharath Rupireddy
On Sun, Aug 29, 2021 at 1:27 AM Daniel Gustafsson wrote: > > > On 28 Aug 2021, at 14:10, Bharath Rupireddy > > wrote: > > > It seems there's a redundant assignment statement conn = NULL in > > pg_receivewal's StreamLog function. Attaching a tiny patch herewith. > > Thoughts? > > Agreed, while

Re: Kerberos delegation support in libpq and postgres_fdw

2021-09-01 Thread Peter Eisentraut
On 22.07.21 10:39, Peifeng Qiu wrote: I've slightly modified the patch to support "gssencmode" and added TAP tests. For the TAP tests, please put then under src/test/kerberos/, instead of copying the whole infrastructure to contrib/postgres_fdw/. Just make a new file, for example

Re: pgstat_send_connstats() introduces unnecessary timestamp and UDP overhead

2021-09-01 Thread Laurenz Albe
On Tue, 2021-08-31 at 21:16 -0700, Andres Freund wrote: > On 2021-09-01 05:39:14 +0200, Laurenz Albe wrote: > > On Tue, 2021-08-31 at 18:55 -0700, Andres Freund wrote: > > > > > On Tue, Aug 31, 2021 at 04:55:35AM +0200, Laurenz Albe wrote:In the > > > > > view of that, how about doubling

  1   2   >