Re: pg_receivewal starting position

2021-09-01 Thread Bharath Rupireddy
On Thu, Sep 2, 2021 at 11:15 AM Kyotaro Horiguchi wrote: > > 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

Re: Added schema level support for publication.

2021-09-01 Thread vignesh C
On Wed, Sep 1, 2021 at 11:14 AM tanghy.f...@fujitsu.com wrote: > > > On Monday, August 30, 2021 11:28 PM vignesh C wrote: > > > > I have fixed these comments as part of v23 patch attached at [1]. > > [1] - https://www.postgresql.org/message- > > id/CALDaNm0xmqJeQEfV5Wnj2BawM%3DsdFdfOXz5N%2BgGG3WB

Re: Added schema level support for publication.

2021-09-01 Thread vignesh C
On Wed, Sep 1, 2021 at 6:58 AM houzj.f...@fujitsu.com wrote: > > Here are some other comments for v23-000x patches. > > 1) > > @@ -6225,6 +6342,9 @@ describePublications(const char *pattern) > boolhas_pubtruncate; > boolhas_pubviaroot; > > + PQExpBuffe

Re: Added schema level support for publication.

2021-09-01 Thread vignesh C
On Sat, Aug 28, 2021 at 3:19 PM Amit Kapila wrote: > > Don't you think some users might want to know all the schema names for > a publication? I am not completely sure on this point but I think it > is good to have information for users. It might be also useful to have > pg_publication_objects whe

Re: Numeric x^y for negative x

2021-09-01 Thread Dean Rasheed
On Thu, 2 Sept 2021 at 00:39, Jaime Casanova wrote: > > Hi Dean, > > It seems you already committed this. But it's still as "Ready for > committer" in the commitfest app. > > Are we waiting for something else or we can mark it as committed? > It's mostly done, but there is one more corner case wh

Re: [Proposal] Fully WAL logged CREATE DATABASE - No Checkpoints

2021-09-01 Thread Dilip Kumar
On Tue, Jul 6, 2021 at 3:00 PM Dilip Kumar wrote: > > On Fri, Jun 18, 2021 at 12:50 AM Robert Haas wrote: > > > > On Thu, Jun 17, 2021 at 2:48 PM Andres Freund wrote: > > > Or do you mean that looking at the filesystem at all is bypassing shared > > > buffers? > > > > This is what I mean. I thin

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 r

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 tomo

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 m

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 > > > Als

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'. > > https://commitfest.postgr

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 stan

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 chec

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. The

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 u

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 pag

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 pa

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 have

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 0.

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 XLogArchiveCheck

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 > >>> to

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 ide

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 starti

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 bet.

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 read

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 cli

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? -- Danie

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 doc

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 the

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 publicatio

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; som

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 it'

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 the

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 du

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 ex

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 a

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 >> ge

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 r

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 -1200

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 s

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 >> time

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 discussion

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, t

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 XL

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 I

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 ba

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 > > v

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. Data

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.) > > That

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 cod

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). Attac

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 fallback_application

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 discusse

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 it

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 comm

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(), regexp_like(

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 t

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 https://vmware.com/

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 fo

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 is

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 server,

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. v8-0001-Optimize-fileset-usage-in-appl

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 per

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 s

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 > > use

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 submis

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 fo

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 hav

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 kill_bgchild_at

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. 0

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. Barri

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(). A

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 port

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 in

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/

  1   2   >