Re: [PATCH] Use optimized single-datum tuplesort in ExecSort

2021-07-18 Thread Ronan Dunklau
Le samedi 17 juillet 2021, 10:36:09 CEST David Rowley a écrit : > On Sat, 17 Jul 2021 at 01:14, James Coleman wrote: > > The only remaining question I have is whether or not costing needs to > > change, given the very significant speedup for datum sort. > > I'm looking at cost_tuplesort and the

Re: [HACKERS] logical decoding of two-phase transactions

2021-07-18 Thread Greg Nancarrow
On Wed, Jul 14, 2021 at 6:33 PM Peter Smith wrote: > > Please find attached the latest patch set v97* > I couldn't spot spot any significant issues in the v97-0001 patch, but do have the following trivial feedback comments: (1) doc/src/sgml/protocol.sgml Suggestion: BEFORE: + contains a

Re: logical replication empty transactions

2021-07-18 Thread Peter Smith
Hi Ajin, I have reviewed the v7 patch and given my feedback comments below. Apply OK Build OK make check OK TAP (subscriptions) make check OK Build PG Docs (html) OK Although I made lots of review comments below, the important point is that none of them are functional - they are only minore

Re: speed up verifying UTF-8

2021-07-18 Thread Amit Khandekar
On Sat, 17 Jul 2021 at 04:48, John Naylor wrote: > v17-0001 is the same as v14. 0002 is a stripped-down implementation of Amit's > chunk idea for multibyte, and it's pretty good on x86. On Power8, not so > much. 0003 and 0004 are shot-in-the-dark guesses to improve it on Power8, > with some

Re: Skipping logical replication transactions on subscriber side

2021-07-18 Thread Amit Kapila
On Fri, Jul 16, 2021 at 8:33 PM Masahiko Sawada wrote: > > On Wed, Jul 14, 2021 at 5:14 PM Masahiko Sawada wrote: > > > > Sounds good. I'll incorporate this in the next version patch that I'm > > planning to submit this week. > > Sorry, I could not make it this week. I'll submit them early next

Re: O_DIRECT on macOS

2021-07-18 Thread Thomas Munro
On Mon, Jul 19, 2021 at 4:42 PM Tom Lane wrote: > prairiedog thinks that Assert is too optimistic about whether all > those flags exist. Fixed. (Huh, I received no -committers email for 2dbe8905.)

Re: O_DIRECT on macOS

2021-07-18 Thread Tom Lane
Thomas Munro writes: > Agreed. Pushed! prairiedog thinks that Assert is too optimistic about whether all those flags exist. regards, tom lane

Re: Doc necessity for superuser privileges to execute pg_import_system_collations()

2021-07-18 Thread Fujii Masao
On 2021/07/19 11:45, torikoshia wrote: Hi. It seems that only superusers can execute pg_import_system_collations(), but this is not mentioned in the manual. Since other functions that require superuser privileges describe that in the manual, I think it would be better to do the same for

RE: Added schema level support for publication.

2021-07-18 Thread tanghy.f...@fujitsu.com
On Friday, July 16, 2021 6:10 PM vignesh C > On Wed, Jul 14, 2021 at 6:25 PM houzj.f...@fujitsu.com > wrote: > > > > Wednesday, July 14, 2021 6:17 PM vignesh C wrote: > > > On Tue, Jul 13, 2021 at 12:06 PM tanghy.f...@fujitsu.com > > > wrote: > > > > > > > > On Monday, July 12, 2021 5:36 PM

Re: [HACKERS] logical decoding of two-phase transactions

2021-07-18 Thread Peter Smith
On Mon, Jul 19, 2021 at 12:43 PM Amit Kapila wrote: > > On Mon, Jul 19, 2021 at 1:55 AM Tom Lane wrote: > > > > Amit Kapila writes: > > > Pushed. > > > > I think you'd be way better off making the gid fields be "char *" > > and pstrdup'ing the result of pq_getmsgstring. Another possibility > >

Re: Added documentation for cascade and restrict option of drop statistics

2021-07-18 Thread Michael Paquier
On Sun, Jul 18, 2021 at 12:37:48PM +0900, Michael Paquier wrote: > Indeed, good catch. The other commands document that, so let's fix > it. Applied. -- Michael signature.asc Description: PGP signature

RE: Added schema level support for publication.

2021-07-18 Thread tanghy.f...@fujitsu.com
On Friday, July 16, 2021 6:13 PM vignesh C mailto:vignes...@gmail.com>> wrote: > > On Fri, Jul 16, 2021 at 9:25 AM Greg Nancarrow > wrote: > > > > Also, there seems to be an issue with ALTER PUBLICATION ... SET SCHEMA ... > > (PubType is getting set to 'e'

Doc necessity for superuser privileges to execute pg_import_system_collations()

2021-07-18 Thread torikoshia
Hi. It seems that only superusers can execute pg_import_system_collations(), but this is not mentioned in the manual. Since other functions that require superuser privileges describe that in the manual, I think it would be better to do the same for consistency. Thoughts? -- Regards, --

Re: [HACKERS] logical decoding of two-phase transactions

2021-07-18 Thread Amit Kapila
On Mon, Jul 19, 2021 at 1:55 AM Tom Lane wrote: > > Amit Kapila writes: > > Pushed. > > I think you'd be way better off making the gid fields be "char *" > and pstrdup'ing the result of pq_getmsgstring. Another possibility > perhaps is to use strlcpy, but I'd only go that way if it's important

Re: RFC: Logging plan of the running query

2021-07-18 Thread torikoshia
On Tue, Jul 13, 2021 at 11:11 PM Masahiro Ikeda wrote: When I tried this feature, I realized two things. So, I share them. Thanks for your review! (1) About output contents > The format of the query plan is the same as when FORMAT > TEXT > and VEBOSE are used in the > EXPLAIN command. >

Re: pgbench: using prepared BEGIN statement in a pipeline could cause an error

2021-07-18 Thread Yugo NAGATA
Hello Fabien, On Sat, 17 Jul 2021 07:03:01 +0200 (CEST) Fabien COELHO wrote: > > Hello Yugo-san, > > > [...] One way to avoid these errors is to send Parse messages before > > pipeline mode starts. I attached a patch to fix to prepare commands at > > starting of a script instead of at the

Re: speed up verifying UTF-8

2021-07-18 Thread John Naylor
I wrote: > On Fri, Jul 16, 2021 at 1:44 AM Vladimir Sitnikov < sitnikov.vladi...@gmail.com> wrote: > > > > Have you considered shift-based DFA for a portable implementation https://gist.github.com/pervognsen/218ea17743e1442e59bb60d29b1aa725 ? > > I did consider some kind of DFA a while back and

Re: 回复: Why is XLOG_FPI_FOR_HINT always need backups?

2021-07-18 Thread Kyotaro Horiguchi
At Sat, 17 Jul 2021 00:14:34 +0900, Fujii Masao wrote in > Thanks for updating the patch! It basically looks good to me. > >* Full-page image (FPI) records contain nothing else but a > backup >* block (or multiple backup blocks). Every block reference must >

Re: Remove redundant strlen call in ReplicationSlotValidateName

2021-07-18 Thread Ranier Vilela
Em dom., 18 de jul. de 2021 às 21:23, Peter Smith escreveu: > > > On Sun, Jul 18, 2021 at 11:09 PM Ranier Vilela > wrote: > >> ... >> > I did the patch, but to my surprise, the results weren't so good. >> Despite that claiming a tiny improvement in performance, I didn't expect >> any slowdown.

Re: O_DIRECT on macOS

2021-07-18 Thread Thomas Munro
On Tue, Jul 13, 2021 at 1:56 PM Andres Freund wrote: > On 2021-07-13 13:25:50 +1200, Thomas Munro wrote: > > I'm planning to go with that idea (#1), if there are no objections. > > The only other viable approach I see is to completely separate our > internal flag representation from the OS

Re: Implementing Incremental View Maintenance

2021-07-18 Thread Yugo NAGATA
On Wed, 14 Jul 2021 21:22:37 +0530 vignesh C wrote: > On Mon, May 17, 2021 at 10:08 AM Yugo NAGATA wrote: > > > > On Fri, 7 May 2021 14:14:16 +0900 > > Yugo NAGATA wrote: > > > > > On Mon, 26 Apr 2021 16:03:48 +0900 > > > Yugo NAGATA wrote: > > > > > > > On Mon, 26 Apr 2021 15:46:21 +0900 > >

Re: Remove redundant strlen call in ReplicationSlotValidateName

2021-07-18 Thread Peter Smith
On Sun, Jul 18, 2021 at 11:09 PM Ranier Vilela wrote: > ... > I did the patch, but to my surprise, the results weren't so good. > Despite that claiming a tiny improvement in performance, I didn't expect > any slowdown. > I put a counter in pg_regress.c, summing the results of each test and did >

Re: [PATCH] Allow multiple recursive self-references

2021-07-18 Thread David Fetter
On Thu, Jul 15, 2021 at 09:18:00AM +0200, Denis Hirn wrote: > > The patch does not apply on Head anymore, could you rebase and post a patch. > > Sure thing. Here's the new patch. > > Best wishes, Thanks for updating this. In the next version of the patch, would you be so kind as to include

Re: Failure with 004_logrotate in prairiedog

2021-07-18 Thread Tom Lane
Michael Paquier writes: > On Sun, Jul 18, 2021 at 01:42:18AM -0400, Tom Lane wrote: >> Awhile back we discovered that old macOS versions have non-atomic rename >> [1]. I eventually shut down dromedary because that was causing failures >> often enough to be annoying. I'd not seen such a failure

Re: Failure with 004_logrotate in prairiedog

2021-07-18 Thread Michael Paquier
On Sun, Jul 18, 2021 at 01:42:18AM -0400, Tom Lane wrote: > Awhile back we discovered that old macOS versions have non-atomic rename > [1]. I eventually shut down dromedary because that was causing failures > often enough to be annoying. I'd not seen such a failure before on > prairiedog, but it

Re: [HACKERS] logical decoding of two-phase transactions

2021-07-18 Thread Tom Lane
Amit Kapila writes: > Pushed. Coverity thinks this has security issues, and I agree. /srv/coverity/git/pgsql-git/postgresql/src/backend/replication/logical/proto.c: 144 in logicalrep_read_begin_prepare() 143 /* read gid (copy it into a pre-allocated buffer) */ >>> CID 1487517:

Re: unnesting multirange data types

2021-07-18 Thread Alexander Korotkov
On Thu, Jul 15, 2021 at 10:27 PM Jonathan S. Katz wrote: > On 7/15/21 12:26 PM, Alexander Korotkov wrote: > > On Thu, Jul 15, 2021 at 6:47 PM Tom Lane wrote: > >> Yeah, that seems pretty horrid. I still don't like the way the > >> array casts were done, but I'd be okay with pushing the unnest >

Re: cleaning up PostgresNode.pm

2021-07-18 Thread Andrew Dunstan
On 7/18/21 11:48 AM, Andrew Dunstan wrote: > On 7/16/21 3:32 PM, Andrew Dunstan wrote: >> On 6/28/21 1:02 PM, Andrew Dunstan wrote: >>> On 4/24/21 3:14 PM, Alvaro Herrera wrote: On 2021-Apr-24, Andrew Dunstan wrote: > I would like to undertake some housekeeping on PostgresNode.pm.

Re: slab allocator performance issues

2021-07-18 Thread Tomas Vondra
On 7/18/21 3:06 AM, Andres Freund wrote: Hi, On 2021-07-17 16:10:19 -0700, Andres Freund wrote: Instead of populating a linked list with all chunks upon creation of a block - which requires touching a fair bit of memory - keep a per-block pointer (or an offset) into "unused" area of the block.

Re: cleaning up PostgresNode.pm

2021-07-18 Thread Andrew Dunstan
On 7/16/21 3:32 PM, Andrew Dunstan wrote: > On 6/28/21 1:02 PM, Andrew Dunstan wrote: >> On 4/24/21 3:14 PM, Alvaro Herrera wrote: >>> On 2021-Apr-24, Andrew Dunstan wrote: >>> I would like to undertake some housekeeping on PostgresNode.pm. 1. OO modules in perl typically don't

Re: Toast compression method options

2021-07-18 Thread Dilip Kumar
On Wed, Jul 14, 2021 at 5:35 PM vignesh C wrote: > > On Thu, May 6, 2021 at 7:24 PM Dilip Kumar wrote > > The patch does not apply on Head anymore, could you rebase and post a > patch. I'm changing the status to "Waiting for Author". Okay, I will rebase and send it by next week. -- Regards,

Re: corruption of WAL page header is never reported

2021-07-18 Thread Yugo NAGATA
On Sat, 17 Jul 2021 18:40:02 -0300 Ranier Vilela wrote: > Em sáb., 17 de jul. de 2021 às 16:57, Yugo NAGATA > escreveu: > > > Hello, > > > > I found that any corruption of WAL page header found during recovery is > > never > > reported in log messages. If wal page header is broken, it is

Re: CREATE COLLATION - check for duplicate options and error out if found one

2021-07-18 Thread Dean Rasheed
On Sat, 17 Jul 2021 at 05:24, Bharath Rupireddy wrote: > > I also think that if it is specified as CREATE FUNCTION ... STRICT > STRICT, CREATE FUNCTION ... CALLED ON NULL INPUT RETURNS NULL ON NULL > INPUT etc. isn't the syntaxer catching that error while parsing the > SQL text, similar to CREATE

Re: CREATE COLLATION - check for duplicate options and error out if found one

2021-07-18 Thread Dean Rasheed
On Fri, 16 Jul 2021 at 12:17, Dean Rasheed wrote: > > On Fri, 16 Jul 2021 at 10:26, Bharath Rupireddy > wrote: > > > > Thanks. The v5 patch LGTM. > > OK, I'll push that in a while. > Pushed, with some additional tidying up. In particular, I decided it was neater to follow the style of the code