RE: [POC] Fast COPY FROM command for the table with foreign partitions

2021-02-08 Thread tsunakawa.ta...@fujitsu.com
From: Andrey V. Lepikhov > On 2/9/21 9:35 AM, tsunakawa.ta...@fujitsu.com wrote: > > * Why is a separate FDW connection established for each COPY? To avoid > using the same FDW connection for multiple foreign table partitions in a > single > COPY run? > With separate connection you can init a

RE: parse mistake in ecpg connect string

2021-02-08 Thread kuroda.hay...@fujitsu.com
Dear Wang, Horiguchi-san, > > How about the attached? > > I think, this patch is good. I agree. The backward compatibility is violated in the doc, but maybe no one take care. > Maybe we can create a new thread to talk about how ecpg support ipv6 +1 Best Regards, Hayato Kuroda FUJITSU

Re: Single transaction in the tablesync worker?

2021-02-08 Thread Peter Smith
More V29 Feedback FILE: alter_subscription.sgml 8. + + Commands ALTER SUBSCRIPTION ... REFRESH .. and + ALTER SUBSCRIPTION ... SET PUBLICATION .. with refresh + option as true cannot be executed inside a transaction block. + My guess is those two lots of double dots ("..") were

Fallback table AM for relkinds without storage

2021-02-08 Thread Michael Paquier
Hi all, In recent history, we have had two bugs causing a crash of the backend because of the default behavior of rd_tableam to be NULL for a relcache entry for relkinds that have no storage: 1) Sequential attempt for a view:

Re: Improvements and additions to COPY progress reporting

2021-02-08 Thread Bharath Rupireddy
On Tue, Feb 9, 2021 at 12:06 AM Matthias van de Meent wrote: > With [0] we got COPY progress reporting. Before the column names of > this newly added view are effectively set in stone with the release of > pg14, I propose the following set of relatively small patches. These > are v2, because it

Re: Improvements and additions to COPY progress reporting

2021-02-08 Thread Josef Šimánek
po 8. 2. 2021 v 19:35 odesílatel Matthias van de Meent napsal: > > Hi, > > With [0] we got COPY progress reporting. Before the column names of > this newly added view are effectively set in stone with the release of > pg14, I propose the following set of relatively small patches. These > are v2,

Re: Is Recovery actually paused?

2021-02-08 Thread Bharath Rupireddy
On Tue, Feb 9, 2021 at 11:30 AM Kyotaro Horiguchi wrote: > > At Tue, 9 Feb 2021 09:58:30 +0530, Bharath Rupireddy > wrote in > > On Tue, Feb 9, 2021 at 9:48 AM Dilip Kumar wrote: > > > > > > On Tue, Feb 9, 2021 at 8:54 AM Yugo NAGATA wrote: > > > > > > > > On Tue, 09 Feb 2021 10:58:04 +0900

RE: parse mistake in ecpg connect string

2021-02-08 Thread Wang, Shenhao
Hi, Horiguchi-san Kyotaro Horiguchi wrote: > How about the attached? I think, this patch is good. > > > Should we allow "::1" here as well? On the other hand, colons are > > > already overloaded in this syntax, so maybe allowing them in the > > > host part is a bad idea. > Yeah, that made

Re: libpq debug log

2021-02-08 Thread Kyotaro Horiguchi
At Tue, 9 Feb 2021 02:26:25 +, "tsunakawa.ta...@fujitsu.com" wrote in > From: Iwata, Aya/岩田 彩 > > I update the patch. > > I modified code according to review comments of Tsunakawa san and > > Horiguchi san. > > > I confirmed that all the previous feedback was reflected. Here are some >

Re: Support for NSS as a libpq TLS backend

2021-02-08 Thread Michael Paquier
On Tue, Feb 09, 2021 at 12:08:37AM +0100, Daniel Gustafsson wrote: > Attached is a new patchset where I've tried to split the patches even further > to try and separate out changes for easier review. While not a perfect split > I'm sure, and clearly only for review purposes, I do hope it helps a

Re: Single transaction in the tablesync worker?

2021-02-08 Thread Peter Smith
Here are my feedback comments for the V29 patch. FILE: logical-replication.sgml +slots have generated names: pg_%u_sync_%u_%llu +(parameters: Subscription oid, +Table relid, system identifiersysid) + 1. There is a missing space before the sysid parameter. = FILE:

Re: repeated decoding of prepared transactions

2021-02-08 Thread Ajin Cherian
On Tue, Feb 9, 2021 at 4:59 PM Ashutosh Bapat wrote: > Can you please provide steps which can lead to this situation? If > there is an earlier discussion which has example scenarios, please > point us to the relevant thread. > > If we are not sending PREPARED transactions that's fine, but

Re: Is Recovery actually paused?

2021-02-08 Thread Kyotaro Horiguchi
Sorry, I made a mistake here. At Tue, 09 Feb 2021 14:55:23 +0900 (JST), Kyotaro Horiguchi wrote in > At Tue, 9 Feb 2021 09:47:58 +0530, Dilip Kumar wrote > in > > APIs the wait logic can be implemented in the application code which > > is actually using these APIs and IMHO that will give

Re: Is Recovery actually paused?

2021-02-08 Thread Kyotaro Horiguchi
At Tue, 9 Feb 2021 09:58:30 +0530, Bharath Rupireddy wrote in > On Tue, Feb 9, 2021 at 9:48 AM Dilip Kumar wrote: > > > > On Tue, Feb 9, 2021 at 8:54 AM Yugo NAGATA wrote: > > > > > > On Tue, 09 Feb 2021 10:58:04 +0900 (JST) > > > Kyotaro Horiguchi wrote: > > > > If we are going to introduce

Re: repeated decoding of prepared transactions

2021-02-08 Thread Ashutosh Bapat
On Tue, Feb 9, 2021 at 8:32 AM Amit Kapila wrote: > > On Mon, Feb 8, 2021 at 8:36 PM Markus Wanner > wrote: > > > > Hello Amit, > > > > thanks for your very quick response. > > > > On 08.02.21 11:13, Amit Kapila wrote: > > > /* > > > * It is possible that this transaction is not decoded at

Re: [POC] Fast COPY FROM command for the table with foreign partitions

2021-02-08 Thread Andrey V. Lepikhov
On 2/9/21 9:35 AM, tsunakawa.ta...@fujitsu.com wrote: From: tsunakawa.ta...@fujitsu.com From: Andrey Lepikhov Also, I might defer working on the extended part (v9 0003 and 0004) and further separate them in a different thread, if it seems to take longer. I reviewed them but haven't

Re: Is Recovery actually paused?

2021-02-08 Thread Kyotaro Horiguchi
At Tue, 9 Feb 2021 09:47:58 +0530, Dilip Kumar wrote in > On Tue, Feb 9, 2021 at 8:54 AM Yugo NAGATA wrote: > > > > On Tue, 09 Feb 2021 10:58:04 +0900 (JST) > > Kyotaro Horiguchi wrote: > > > > > At Mon, 8 Feb 2021 17:05:52 +0530, Dilip Kumar > > > wrote in > > > > On Mon, Feb 8, 2021 at

Re: pg_replication_origin_drop API potential race condition

2021-02-08 Thread Amit Kapila
On Tue, Feb 9, 2021 at 9:27 AM Amit Kapila wrote: > > On Mon, Feb 8, 2021 at 11:30 PM Alvaro Herrera > wrote: > > > > > +void > > > +replorigin_drop_by_name(char *name, bool missing_ok, bool nowait) > > > +{ > > > + RepOriginId roident; > > > + Relationrel; > > > + > > > +

Re: Add MAIN_RELATION_CLEANUP and SECONDARY_RELATION_CLEANUP options to VACUUM

2021-02-08 Thread Michael Paquier
On Mon, Feb 08, 2021 at 06:59:45PM +, Bossart, Nathan wrote: > These suggestions seem reasonable to me. I've applied them in v9. Sounds good to me, so applied. -- Michael signature.asc Description: PGP signature

Re: Is Recovery actually paused?

2021-02-08 Thread Kyotaro Horiguchi
At Tue, 9 Feb 2021 12:23:23 +0900, Yugo NAGATA wrote in > On Tue, 09 Feb 2021 10:58:04 +0900 (JST) > Kyotaro Horiguchi wrote: > > I didn't asked about the internal logical correctness, but asked about > > *actual harm* revealed to users. I don't see any actual harm in the > > "wrong" transition

Re: parse mistake in ecpg connect string

2021-02-08 Thread Kyotaro Horiguchi
At Tue, 09 Feb 2021 13:58:14 +0900 (JST), Kyotaro Horiguchi wrote in > > I didn't care about the windows environment. > > Somewhat WIN32 directive can be used for switching code, but I agree your > > claims. > > This thread looks like discussing about unix-domain socket on > Windows. (I'll

Re: parse mistake in ecpg connect string

2021-02-08 Thread Kyotaro Horiguchi
At Tue, 9 Feb 2021 02:12:37 +, "kuroda.hay...@fujitsu.com" wrote in > Dear Wang, Tom > > > I think add the bison rule is a little difficult because in PG13 windows > > can also support unix-socket, > > In your patch: > > > dir_name: '/' dir_name{ $$ = make2_str(mm_strdup("/"), $2); } > >

RE: [POC] Fast COPY FROM command for the table with foreign partitions

2021-02-08 Thread tsunakawa.ta...@fujitsu.com
From: tsunakawa.ta...@fujitsu.com > From: Andrey Lepikhov > > Of course, you can rebase it. > > Thank you. I might modify the basic part to incorporate my past proposal > about improving the layering or modularity related to ri_useMultiInsert. > (But I > may end up giving up due to

Re: 2021-02-11 release announcement draft

2021-02-08 Thread er
> On 02/08/2021 11:40 PM Jonathan S. Katz wrote: > > > Hi, > > Attached is a draft of the release announcement for the upcoming > 2021-02-11 cumulative update release. Please review for technical 'closes fixes' maybe better is: 'includes fixes' or 'closes bugs' 'also fixes over 80 bugs'

Re: Is Recovery actually paused?

2021-02-08 Thread Bharath Rupireddy
On Tue, Feb 9, 2021 at 9:48 AM Dilip Kumar wrote: > > On Tue, Feb 9, 2021 at 8:54 AM Yugo NAGATA wrote: > > > > On Tue, 09 Feb 2021 10:58:04 +0900 (JST) > > Kyotaro Horiguchi wrote: > > > > > At Mon, 8 Feb 2021 17:05:52 +0530, Dilip Kumar > > > wrote in > > > > On Mon, Feb 8, 2021 at 2:19 PM

Re: Is Recovery actually paused?

2021-02-08 Thread Dilip Kumar
On Tue, Feb 9, 2021 at 8:54 AM Yugo NAGATA wrote: > > On Tue, 09 Feb 2021 10:58:04 +0900 (JST) > Kyotaro Horiguchi wrote: > > > At Mon, 8 Feb 2021 17:05:52 +0530, Dilip Kumar > > wrote in > > > On Mon, Feb 8, 2021 at 2:19 PM Yugo NAGATA wrote: > > > > > > > > On Mon, 08 Feb 2021 17:32:46

Re: Is Recovery actually paused?

2021-02-08 Thread Dilip Kumar
On Tue, Feb 9, 2021 at 7:28 AM Kyotaro Horiguchi wrote: > > At Mon, 8 Feb 2021 17:05:52 +0530, Dilip Kumar wrote > in > > On Mon, Feb 8, 2021 at 2:19 PM Yugo NAGATA wrote: > > > > > > On Mon, 08 Feb 2021 17:32:46 +0900 (JST) > > > Kyotaro Horiguchi wrote: > > > > > > > At Mon, 8 Feb 2021

Re: Parallel INSERT (INTO ... SELECT ...)

2021-02-08 Thread Greg Nancarrow
On Mon, Feb 8, 2021 at 8:13 PM Hou, Zhijie wrote: > > > > Did it actually use a parallel plan in your testing? > > > When I ran these tests with the Parallel INSERT patch applied, it did > > > not naturally choose a parallel plan for any of these cases. > > > > Yes, these cases pick parallel plan

Re: pg_replication_origin_drop API potential race condition

2021-02-08 Thread Amit Kapila
On Mon, Feb 8, 2021 at 11:30 PM Alvaro Herrera wrote: > > > +void > > +replorigin_drop_by_name(char *name, bool missing_ok, bool nowait) > > +{ > > + RepOriginId roident; > > + Relationrel; > > + > > + Assert(IsTransactionState()); > > + > > + /* > > + * To interlock

Re: Is Recovery actually paused?

2021-02-08 Thread Yugo NAGATA
On Tue, 09 Feb 2021 10:58:04 +0900 (JST) Kyotaro Horiguchi wrote: > At Mon, 8 Feb 2021 17:05:52 +0530, Dilip Kumar wrote > in > > On Mon, Feb 8, 2021 at 2:19 PM Yugo NAGATA wrote: > > > > > > On Mon, 08 Feb 2021 17:32:46 +0900 (JST) > > > Kyotaro Horiguchi wrote: > > > > > > > At Mon, 8 Feb

Re: repeated decoding of prepared transactions

2021-02-08 Thread Amit Kapila
On Mon, Feb 8, 2021 at 8:36 PM Markus Wanner wrote: > > Hello Amit, > > thanks for your very quick response. > > On 08.02.21 11:13, Amit Kapila wrote: > > /* > > * It is possible that this transaction is not decoded at prepare time > > * either because by that time we didn't have a consistent

RE: libpq debug log

2021-02-08 Thread tsunakawa.ta...@fujitsu.com
From: Iwata, Aya/岩田 彩 > I update the patch. > I modified code according to review comments of Tsunakawa san and > Horiguchi san. I confirmed that all the previous feedback was reflected. Here are some minor comments: (45) void PQtrace(PGconn *conn, FILE *stream); + +

RE: parse mistake in ecpg connect string

2021-02-08 Thread kuroda.hay...@fujitsu.com
Dear Wang, Tom > I think add the bison rule is a little difficult because in PG13 windows can > also support unix-socket, > In your patch: > > dir_name: '/' dir_name{ $$ = make2_str(mm_strdup("/"), $2); } > > | ecpg_ident{ $$ = $1; } > >; > Windows will remains wrong(I'm not sure ecpg on

Re: Is Recovery actually paused?

2021-02-08 Thread Kyotaro Horiguchi
At Mon, 8 Feb 2021 17:05:52 +0530, Dilip Kumar wrote in > On Mon, Feb 8, 2021 at 2:19 PM Yugo NAGATA wrote: > > > > On Mon, 08 Feb 2021 17:32:46 +0900 (JST) > > Kyotaro Horiguchi wrote: > > > > > At Mon, 8 Feb 2021 14:12:35 +0900, Yugo NAGATA > > > wrote in > > > > > > > I think the right

RE: Single transaction in the tablesync worker?

2021-02-08 Thread osumi.takami...@fujitsu.com
On Mon, Feb 8, 2021 8:04 PM Amit Kapila wrote: > On Mon, Feb 8, 2021 at 12:22 PM osumi.takami...@fujitsu.com > wrote: > > On Monday, February 8, 2021 1:44 PM osumi.takami...@fujitsu.com > > > > > On Mon, Feb 8, 2021 11:36 AM Peter Smith > > > wrote: > > > > 2. For the 004 test case I know the

Re: Parallel INSERT (INTO ... SELECT ...)

2021-02-08 Thread Greg Nancarrow
On Tue, Feb 9, 2021 at 1:04 AM Amit Langote wrote: > > Greg, all > > Thanks a lot for your work on this. > > On Mon, Feb 8, 2021 at 3:53 PM Greg Nancarrow wrote: > > Posting an updated set of patches. > > I've been looking at these patches, initially with an intention to > review mainly any

RE: Made ecpg compatibility mode and run-time behaviour options case insensitive

2021-02-08 Thread Tang, Haiying
From: Tom Lane Sent: Tuesday, February 9, 2021 1:14 AM >> When reading code related ECPG I found 75220fb was committed in PG13 and >> master. >> I don't know why it shouldn't be backpatched in PG12 or before. >> Can anyone take a look at this and kindly tell me why. > >We don't usually

Re: Detecting pointer misalignment (was Re: pgsql: Implementation of subscripting for jsonb)

2021-02-08 Thread Alexander Korotkov
On Mon, Feb 8, 2021 at 7:49 PM Tom Lane wrote: > I wrote: > > After digging in gcc's release history, it seems they invented > > "-fsanitize=alignment" in GCC 5, so we can make this work for gcc > > by writing > > #if __GNUC__ >= 5 > > (the likely() macro already uses a similar approach). Can't

Re: Detecting pointer misalignment (was Re: pgsql: Implementation of subscripting for jsonb)

2021-02-08 Thread Alexander Korotkov
Hi, Tom! Thank you for taking care of this. On Mon, Feb 8, 2021 at 3:47 AM Tom Lane wrote: > > [ redirecting to -hackers ] > > Alexander Korotkov writes: > >> BTW, I managed to reproduce the issue by compiling with CFLAGS="-O0 > >> -fsanitize=alignment -fsanitize-trap=alignment" and the patch

Re: Libpq support to connect to standby server as priority

2021-02-08 Thread Greg Nancarrow
On Mon, Feb 8, 2021 at 8:17 PM vignesh C wrote: > > > > > I think what we want to do is mark default_transaction_read_only as > > GUC_REPORT, instead. That will give a reliable report of what the > > state of its GUC is, and you can combine it with is_hot_standby > > to decide whether the

Re: Single transaction in the tablesync worker?

2021-02-08 Thread Peter Smith
On Mon, Feb 8, 2021 at 11:42 AM Peter Smith wrote: > > On Sun, Feb 7, 2021 at 2:38 PM Peter Smith wrote: > > > > On Sat, Feb 6, 2021 at 2:10 AM Petr Jelinek > > wrote: > > > > > > Hi, > > > > > > Some minor comments about code: > > > > > > > + else if (res->status == WALRCV_ERROR &&

Re: Proposal: Save user's original authenticated identity for logging

2021-02-08 Thread Jacob Champion
On Tue, 2021-02-02 at 22:22 +, Jacob Champion wrote: > Given the feedback above, I'll continue to flesh out the PoC patch, > focusing on 1) storing the identity in a single place for all auth > methods and 2) exposing it consistently in the logs as part of > log_connections. Attached is a v1

Re: 2021-02-11 release announcement draft

2021-02-08 Thread Noah Misch
On Mon, Feb 08, 2021 at 05:40:41PM -0500, Jonathan S. Katz wrote: > This update also fixes over 80 bugs that were reported in the last several > months. Some of these issues only affect version 13, but may also apply to > other > supported versions. Did you want s/may/many/? > * Fix an issue

Re: Support for NSS as a libpq TLS backend

2021-02-08 Thread Daniel Gustafsson
> On 4 Feb 2021, at 19:35, Jacob Champion wrote: > > On Thu, 2021-02-04 at 16:30 +0900, Michael Paquier wrote: >> On Tue, Feb 02, 2021 at 08:33:35PM +, Jacob Champion wrote: >>> Note that this changes the error message printed during the invalid- >>> root tests, because NSS is now sending

2021-02-11 release announcement draft

2021-02-08 Thread Jonathan S. Katz
Hi, Attached is a draft of the release announcement for the upcoming 2021-02-11 cumulative update release. Please review for technical accuracy (I did screen for typos, but would not be surprised if any slipped in). Please provide feedback on this thread no later than 2020-02-10 AoE[1]. Thanks!

Clean up code

2021-02-08 Thread CK Tan
Hi, can someone point me to the code that cleans up temp files should a query crashed unexpectedly? Thanks!

Is txid_status() actually safe? / What is 011_crash_recovery.pl testing?

2021-02-08 Thread Andres Freund
Hi Craig, Robert, The 011_crash_recovery.pl test test starts a transaction, creates a table, fetches the transaction's xid. Then shuts down the server in immediate mode. It then asserts that after crash recovery the previously assigned xid is shown as aborted, and that new xids are assigned

Re: [PATCH] Improve amcheck to also check UNIQUE constraint in btree index.

2021-02-08 Thread Mark Dilger
> On Feb 8, 2021, at 2:46 AM, Pavel Borisov wrote: > > 0002 - is a temporary hack for testing. It will allow inserting duplicates in > a table even if an index with the exact name "idx" has a unique constraint > (generally it is prohibited to insert). Then a new amcheck will tell us about

Re: [PATCH] Improve amcheck to also check UNIQUE constraint in btree index.

2021-02-08 Thread Pavel Borisov
On Mon, 8 Feb 2021, 14:46 Pavel Borisov Hi, hackers! > > It seems that if btree index with a unique constraint is corrupted by > duplicates, amcheck now can not catch this. Reindex becomes impossible as > it throws an error but otherwise the index will let the user know that it > is corrupted,

Re: small test case for abbrev(cidr)

2021-02-08 Thread Tom Lane
Peter Eisentraut writes: > I noticed that the file src/backend/utils/adt/inet_cidr_ntop.c has no > test coverage at all. The only way to reach this appears to be by > calling abbrev(cidr). It was easy to add a test case for this into the > existing, otherwise pretty complete, cidr tests.

Re: parse mistake in ecpg connect string

2021-02-08 Thread Tom Lane
"Wang, Shenhao" writes: > Kyotaro Horiguchi wrote: >> FWIW, directly embedding /unixsocket/path syntax in a URL is broken in >> the view of URI. It is the reason why the current connection URI takes >> the way shown above. So I think we want to remove that code rather >> than to fix it. > It

Re: libpq compression

2021-02-08 Thread Daniil Zakhlystov
Hi everyone, I’ve been making some experiments with an on-the-fly compression switch lately and have some updates. > On Dec 22, 2020, at 10:42 PM, Robert Haas wrote: > > > Hmm, I assumed that if the compression buffers were flushed on the > sending side, and if all the data produced on the

Allowing create database within transaction block

2021-02-08 Thread Hari Sankar
Hi everyone, I wanted to see why we do not allow the following statements to be allowed within a transaction block: 1. Create database 2. Drop Database Is there a detailed reasoning behind disallowing the above statements as part of the design. Will appreciate it if someone can share on why

small test case for abbrev(cidr)

2021-02-08 Thread Peter Eisentraut
I noticed that the file src/backend/utils/adt/inet_cidr_ntop.c has no test coverage at all. The only way to reach this appears to be by calling abbrev(cidr). It was easy to add a test case for this into the existing, otherwise pretty complete, cidr tests. From

Improvements and additions to COPY progress reporting

2021-02-08 Thread Matthias van de Meent
Hi, With [0] we got COPY progress reporting. Before the column names of this newly added view are effectively set in stone with the release of pg14, I propose the following set of relatively small patches. These are v2, because it is a patchset that is based on a set of patches that I previously

Re: Allow matching whole DN from a client certificate

2021-02-08 Thread Jacob Champion
On Sat, 2021-01-30 at 16:18 -0500, Andrew Dunstan wrote: > Here's a version of the patch that does it that way. For fun I have > modified the certificate so it has two OU fields in the DN. > diff --git a/doc/src/sgml/client-auth.sgml b/doc/src/sgml/client-auth.sgml > [...] > + Common Name

Re: pg_replication_origin_drop API potential race condition

2021-02-08 Thread Alvaro Herrera
> +void > +replorigin_drop_by_name(char *name, bool missing_ok, bool nowait) > +{ > + RepOriginId roident; > + Relationrel; > + > + Assert(IsTransactionState()); > + > + /* > + * To interlock against concurrent drops, we hold ExclusiveLock on > + *

Re: Prevent printing "next step instructions" in initdb and pg_upgrade

2021-02-08 Thread Tom Lane
I wrote: > Bruce Momjian writes: >> On Sun, Feb 7, 2021 at 11:21:05AM +0100, Magnus Hagander wrote: >>> Isn't the whole "Success." at the end redundant here, and we should >>> just end the message after the pg_ctl command? So not just the extra >>> newline, but the whole thing? >> Agreed. > +1

Re: pg_replication_origin_drop API potential race condition

2021-02-08 Thread Euler Taveira
On Mon, Feb 8, 2021, at 3:23 AM, Amit Kapila wrote: > Fixed the problem as mentioned above in the attached. This new version looks good to me. -- Euler Taveira EDB https://www.enterprisedb.com/

Re: Detecting pointer misalignment (was Re: pgsql: Implementation of subscripting for jsonb)

2021-02-08 Thread Tom Lane
I wrote: > After digging in gcc's release history, it seems they invented > "-fsanitize=alignment" in GCC 5, so we can make this work for gcc > by writing > #if __GNUC__ >= 5 > (the likely() macro already uses a similar approach). Can't say > if that's close enough for clang too. Ugh, no it

Re: Made ecpg compatibility mode and run-time behaviour options case insensitive

2021-02-08 Thread Tom Lane
"Tang, Haiying" writes: > When reading code related ECPG I found 75220fb was committed in PG13 and > master. > I don't know why it shouldn't be backpatched in PG12 or before. > Can anyone take a look at this and kindly tell me why. We don't usually back-patch things that aren't clear bug fixes.

Re: repeated decoding of prepared transactions

2021-02-08 Thread Markus Wanner
Hello Amit, thanks for your very quick response. On 08.02.21 11:13, Amit Kapila wrote: /* * It is possible that this transaction is not decoded at prepare time * either because by that time we didn't have a consistent snapshot or it * was decoded earlier but we have restarted. We can't

RE: libpq debug log

2021-02-08 Thread iwata....@fujitsu.com
HI all, I update the patch. I modified code according to review comments of Tsunakawa san and Horiguchi san. And I fixed some bugs. > This patch should address the following: > 1. fix 3 bugs > 1.1 -1 output in "Query" message The cause of this bug is that it call in pqFlush() function before

Re: Parallel INSERT (INTO ... SELECT ...)

2021-02-08 Thread Amit Langote
Greg, all Thanks a lot for your work on this. On Mon, Feb 8, 2021 at 3:53 PM Greg Nancarrow wrote: > Posting an updated set of patches. I've been looking at these patches, initially with an intention to review mainly any partitioning-related concerns, but have some general thoughts as well

Re: [POC] verifying UTF-8 using SIMD instructions

2021-02-08 Thread John Naylor
On Mon, Feb 8, 2021 at 6:17 AM Heikki Linnakangas wrote: > As a quick test, I hacked up pg_utf8_verifystr() to use Lemire's > algorithm from the simdjson library [1], see attached patch. I > microbenchmarked it using the the same test I used before [2]. I've been looking at various iterations of

RE: Support tab completion for upper character inputs in psql

2021-02-08 Thread Tang, Haiying
At Sun, 07 Feb 2021 13:55:00 -0500, Tom Lane wrote in > > This looks like you're trying to force case-insensitive behavior > whether that is appropriate or not. Does not sound like a good idea. Thanks for your reply. I raise this issue because I thought all SQL command should be

Re: Is Recovery actually paused?

2021-02-08 Thread Dilip Kumar
On Mon, Feb 8, 2021 at 2:19 PM Yugo NAGATA wrote: > > On Mon, 08 Feb 2021 17:32:46 +0900 (JST) > Kyotaro Horiguchi wrote: > > > At Mon, 8 Feb 2021 14:12:35 +0900, Yugo NAGATA wrote > > in > > > > > > I think the right fix should be that the state should never go from > > > > > > ‘paused’ to

Re: automatic analyze: readahead - add "IO read time" log message

2021-02-08 Thread Heikki Linnakangas
On 05/02/2021 23:22, Stephen Frost wrote: Unless there's anything else on this, I'll commit these sometime next week. One more thing: Instead of using 'effective_io_concurrency' GUC directly, should call get_tablespace_maintenance_io_concurrency(). - Heikki

Re: Single transaction in the tablesync worker?

2021-02-08 Thread Amit Kapila
On Mon, Feb 8, 2021 at 12:22 PM osumi.takami...@fujitsu.com wrote: > > On Monday, February 8, 2021 1:44 PM osumi.takami...@fujitsu.com > > > On Mon, Feb 8, 2021 11:36 AM Peter Smith > > wrote: > > > 2. For the 004 test case I know the test is needing some PK constraint > > > violation # Check

Re: Single transaction in the tablesync worker?

2021-02-08 Thread Amit Kapila
On Fri, Feb 5, 2021 at 8:40 PM Petr Jelinek wrote: > > Hi, > > We had a bit high-level discussion about this patches with Amit > off-list, so I decided to also take a look at the actual code. > Thanks for the discussion and a follow-up review. > My main concern originally was the potential for

[PATCH] Improve amcheck to also check UNIQUE constraint in btree index.

2021-02-08 Thread Pavel Borisov
Hi, hackers! It seems that if btree index with a unique constraint is corrupted by duplicates, amcheck now can not catch this. Reindex becomes impossible as it throws an error but otherwise the index will let the user know that it is corrupted, and amcheck will tell that the index is clean. So

Re: [POC] verifying UTF-8 using SIMD instructions

2021-02-08 Thread Heikki Linnakangas
On 07/02/2021 22:24, John Naylor wrote: Here is a more polished version of the function pointer approach, now adapted to all multibyte encodings. Using the not-yet-committed tests from [1], I found a thinko bug that resulted in the test for nul bytes to not only be wrong, but probably also

Re: repeated decoding of prepared transactions

2021-02-08 Thread Amit Kapila
On Mon, Feb 8, 2021 at 2:01 PM Markus Wanner wrote: > > Amit, Ajin, hackers, > > testing logical decoding for two-phase transactions, I stumbled over > what I first thought is a bug. But comments seems to indicate this is > intended behavior. Could you please clarify or elaborate on the design

Made ecpg compatibility mode and run-time behaviour options case insensitive

2021-02-08 Thread Tang, Haiying
Hi Hackers When reading code related ECPG I found 75220fb was committed in PG13 and master. I don't know why it shouldn't be backpatched in PG12 or before. Can anyone take a look at this and kindly tell me why. Regards, Tang

repeated decoding of prepared transactions

2021-02-08 Thread Markus Wanner
Amit, Ajin, hackers, testing logical decoding for two-phase transactions, I stumbled over what I first thought is a bug. But comments seems to indicate this is intended behavior. Could you please clarify or elaborate on the design decision? Or indicate this indeed is a bug? What puzzled

Re: Libpq support to connect to standby server as priority

2021-02-08 Thread vignesh C
On Wed, Jan 6, 2021 at 3:05 AM Tom Lane wrote: > > Greg Nancarrow writes: > > Posting an updated set of patches. > > I've reviewed and pushed most of v20-0001, with the following changes: > > * I realized that we had more moving parts than necessary for > in_hot_standby. We don't really need

RE: Parallel INSERT (INTO ... SELECT ...)

2021-02-08 Thread Hou, Zhijie
> > Did it actually use a parallel plan in your testing? > > When I ran these tests with the Parallel INSERT patch applied, it did > > not naturally choose a parallel plan for any of these cases. > > Yes, these cases pick parallel plan naturally on my test environment. > > postgres=# explain

Re: Is Recovery actually paused?

2021-02-08 Thread Yugo NAGATA
On Mon, 08 Feb 2021 17:32:46 +0900 (JST) Kyotaro Horiguchi wrote: > At Mon, 8 Feb 2021 14:12:35 +0900, Yugo NAGATA wrote in > > > > > I think the right fix should be that the state should never go from > > > > > ‘paused’ to ‘pause requested’ so I think pg_wal_replay_pause should > > > > >

Re: Add MAIN_RELATION_CLEANUP and SECONDARY_RELATION_CLEANUP options to VACUUM

2021-02-08 Thread Justin Pryzby
On Mon, Feb 08, 2021 at 04:35:19PM +0900, Michael Paquier wrote: > On Fri, Jan 29, 2021 at 06:43:44PM +, Bossart, Nathan wrote: > > I changed it to PROCESS_TOAST. > > Thanks. PROCESS_TOAST sounds good to me at the end for the option > name, so let's just go with that. > > > Done. > > While

RE: parse mistake in ecpg connect string

2021-02-08 Thread Wang, Shenhao
Hi, Horiguchi-san, Kuroda-san: Thank you for reviewing. Kyotaro Horiguchi wrote: >FWIW, directly embedding /unixsocket/path syntax in a URL is broken in >the view of URI. It is the reason why the current connection URI takes >the way shown above. So I think we want to remove that code rather

Re: Is Recovery actually paused?

2021-02-08 Thread Kyotaro Horiguchi
At Mon, 8 Feb 2021 14:12:35 +0900, Yugo NAGATA wrote in > > > > I think the right fix should be that the state should never go from > > > > ‘paused’ to ‘pause requested’ so I think pg_wal_replay_pause should > > > > take > > > > care of that. > > > > > > It makes sense to take care of this in

RE: Parallel INSERT (INTO ... SELECT ...)

2021-02-08 Thread Tang, Haiying
> Did it actually use a parallel plan in your testing? > When I ran these tests with the Parallel INSERT patch applied, it did > not naturally choose a parallel plan for any of these cases. Yes, these cases pick parallel plan naturally on my test environment. postgres=# explain verbose insert

Re: cost_sort vs cost_agg

2021-02-08 Thread Andy Fan
Thank you Ashutosh. On Fri, Jan 15, 2021 at 7:18 PM Ashutosh Bapat wrote: > On Thu, Jan 14, 2021 at 7:12 PM Andy Fan wrote: > > > > Currently the cost_sort doesn't consider the number of columns to sort, > which > > means the cost of SELECT * FROM t ORDER BY a; equals with the SELECT * > >

Re: Parallel INSERT (INTO ... SELECT ...)

2021-02-08 Thread Greg Nancarrow
On Mon, Feb 8, 2021 at 6:00 PM Hou, Zhijie wrote: > > > Posting an updated set of patches. > > A minor comment about doc. > > + > +Where the above target table features are determined to be, at worst, > +parallel-restricted, rather than parallel-unsafe, at least a parallel > table > +

Re: Support tab completion for upper character inputs in psql

2021-02-08 Thread Kyotaro Horiguchi
At Sun, 07 Feb 2021 13:55:00 -0500, Tom Lane wrote in > "Tang, Haiying" writes: > > When using psql I found there's no tab completion for upper character > > inputs. It's really inconvenient sometimes so I try to fix this problem in > > the attached patch. > > This looks like you're trying