Re: Add a pg_get_query_def function (was Re: Deparsing rewritten query)

2022-03-28 Thread Julien Rouhaud
On Mon, Mar 28, 2022 at 11:20:42AM -0400, Tom Lane wrote: > Julien Rouhaud writes: > > I'm attaching a v5 with hopefully a better comment for the function, and > > only > > the "pretty" parameter. > > Pushed with some minor cosmetic adjustments. Thanks a lot! I just published an extension

Re: Document atthasmissing default optimization avoids verification table scan

2022-03-28 Thread Robert Haas
On Mon, Mar 28, 2022 at 9:54 AM James Coleman wrote: > No, I've appreciated constructive feedback from both Tom and David on > this thread. Your original email was so incredibly strongly worded > (and contained no constructive recommendations about a better path > forward, unlike Tom's and

Re: SQL/JSON: functions

2022-03-28 Thread Andres Freund
Hi, On 2022-03-28 18:05:19 +0300, Nikola Ivanov wrote: > Let me know check what can I do with the access. I will get back to you in > an hour. Perhaps you can temporarily enable keep_error_builds, and send in src/interfaces/ecpg/preproc/c_kwlist_d.h src/interfaces/ecpg/preproc/pgc.c

Re: SQL/JSON: functions

2022-03-28 Thread Andrew Dunstan
On 3/28/22 11:05, Nikola Ivanov wrote: > Hi Andrew, > > Let me know check what can I do with the access. I will get back to > you in an hour. Thanks for you help and prompt response. In the first instance we'd like to know what might be different about jabiru from the openbsd7/clang11

Re: Add a pg_get_query_def function (was Re: Deparsing rewritten query)

2022-03-28 Thread Tom Lane
Julien Rouhaud writes: > I'm attaching a v5 with hopefully a better comment for the function, and only > the "pretty" parameter. Pushed with some minor cosmetic adjustments. regards, tom lane

Re: Preventing indirection for IndexPageGetOpaque for known-size page special areas

2022-03-28 Thread Matthias van de Meent
On Mon, 28 Mar 2022 at 06:33, Michael Paquier wrote: > > On Wed, Feb 16, 2022 at 10:24:58PM +0100, Matthias van de Meent wrote: > > A first good reason to do this is preventing further damage when a > > page is corrupted: if I can somehow overwrite pd_special, > > non-assert-enabled builds would

Re: support for MERGE

2022-03-28 Thread Alvaro Herrera
On 2022-Mar-28, Alvaro Herrera wrote: > I intend to get this pushed after lunch. Pushed, with one more change: fetching the tuple ID junk attribute in ExecMerge was not necessary, since we already had done that in ExecModifyTable. We just needed to pass that down to ExecMerge, and make sure to

Re: role self-revocation

2022-03-28 Thread Stephen Frost
Greetings, * Robert Haas (robertmh...@gmail.com) wrote: > On Thu, Mar 24, 2022 at 1:10 PM Tom Lane wrote: > > > However, it might. And if it does, I think it would be best if > > > removing that exception were the *only* change in this area made by > > > that release. > > > > Good idea,

Re: standby recovery fails (tablespace related) (tentative patch and discussion)

2022-03-28 Thread Robert Haas
On Fri, Mar 25, 2022 at 8:26 AM Alvaro Herrera wrote: > On 2022-Mar-21, Alvaro Herrera wrote: > > I had a look at this latest version of the patch, and found some things > > to tweak. Attached is v21 with three main changes from Kyotaro's v20: > > Pushed this, backpatching to 14 and 13. It

Re: [WIP] Allow pg_upgrade to copy segments of the same relfilenode in parallel

2022-03-28 Thread Justin Pryzby
On Sun, Mar 27, 2022 at 11:07:27AM -0500, Jaime Casanova wrote: > > > It lacks documentation and I need help with WIN32 part of it, I created > > > this new mail to put the patch on the next commitfest. > > > > The patch currently fails on cfbot due to warnings, likely related due to > > the > >

Re: SQL/JSON: functions

2022-03-28 Thread Andrew Dunstan
On 3/28/22 09:35, Tom Lane wrote: > Andrew Dunstan writes: >> On 3/27/22 19:14, Tom Lane wrote: >>> What's worse, I'm unable to replicate the failure on an OpenBSD 7.0 >>> system here. So there's something odd about jabiru's build >>> environment; but what? >> It's hard to see how this could

Re: identifying unrecognized node type errors

2022-03-28 Thread Ashutosh Bapat
On Fri, Mar 25, 2022 at 7:23 PM Tom Lane wrote: > > Ashutosh Bapat writes: > > All these functions are too low level to be helpful to know. Knowing > > the caller might actually give a hint as to where the unknown node > > originated from. We may get that from the stack trace if that's > >

Re: Document atthasmissing default optimization avoids verification table scan

2022-03-28 Thread James Coleman
On Mon, Mar 28, 2022 at 9:30 AM Robert Haas wrote: > > On Sun, Mar 27, 2022 at 1:00 PM James Coleman wrote: > > So "undocumented concept" is just not accurate, and so I don't see it > > as a valid reason to reject the patch. > > I mean, I think it's pretty accurate. The fact that you can point

Re: XID formatting and SLRU refactorings (was: Add 64-bit XIDs into PostgreSQL 15)

2022-03-28 Thread Peter Eisentraut
On 28.03.22 12:46, Aleksander Alekseev wrote: Personally I don't have a strong opinion here. Merging the patch sooner will allow us to move toward 64-bit XIDs faster (e.g. to gather the feedback from the early adopters, allow the translators to do their thing earlier, etc). Merging it later will

Re: SQL/JSON: functions

2022-03-28 Thread Tom Lane
Andrew Dunstan writes: > On 3/27/22 19:14, Tom Lane wrote: >> What's worse, I'm unable to replicate the failure on an OpenBSD 7.0 >> system here. So there's something odd about jabiru's build >> environment; but what? > It's hard to see how this could be caused by the OS environment. Maybe a >

Re: [HACKERS] WIP aPatch: Pgbench Serialization and deadlock errors

2022-03-28 Thread Tom Lane
Alvaro Herrera writes: >> After: >> interval_start num_transactions sum_latency sum_latency_2 min_latency >> max_latency >> { failures | serialization_failures deadlock_failures } [ sum_lag sum_lag_2 >> min_lag max_lag [ skipped ] ] [ retried retries ] > I think that the explanatory paragraph

Re: Document atthasmissing default optimization avoids verification table scan

2022-03-28 Thread Robert Haas
On Sun, Mar 27, 2022 at 1:00 PM James Coleman wrote: > So "undocumented concept" is just not accurate, and so I don't see it > as a valid reason to reject the patch. I mean, I think it's pretty accurate. The fact that you can point to a few uses of the terms "table rewrite" and "table scan" in

Re: document the need to analyze partitioned tables

2022-03-28 Thread Tomas Vondra
On 3/16/22 00:00, Justin Pryzby wrote: > On Mon, Mar 14, 2022 at 05:23:54PM -0400, Robert Haas wrote: >> On Fri, Jan 21, 2022 at 1:31 PM Tomas Vondra >> wrote: >>> [ new patch ] >> >> This patch is originally by Justin. The latest version is by Tomas. I >> think the next step is for Justin to

Re: On login trigger: take three

2022-03-28 Thread a . sokolov
Daniel Gustafsson писал 2022-03-22 11:43: On 22 Mar 2022, at 04:48, Andres Freund wrote: docs fail to build: https://cirrus-ci.com/task/5556234047717376?logs=docs_build#L349 Ugh, that one was on me and not the original author. Fixed. +data initialization. It is vital that any event

Re: Add LZ4 compression in pg_dump

2022-03-28 Thread Robert Haas
On Sun, Mar 27, 2022 at 12:06 PM Justin Pryzby wrote: > Maybe it should take an argument which specifies the default algorithm to use > for input of a numeric "level". And reject such input if not specified, since > wal_compression has never taken a "level", so it's not useful or desirable to >

RE: logical replication empty transactions

2022-03-28 Thread houzj.f...@fujitsu.com
On Monday, March 28, 2022 3:08 PM Amit Kapila wrote: > > On Fri, Mar 25, 2022 at 12:50 PM houzj.f...@fujitsu.com > wrote: > > > > Attach the new version patch with this change. > > > > Few comments: Thanks for the comments. > = > 1. I think we can move the keep_alive check

Re: SQL/JSON: functions

2022-03-28 Thread Andrew Dunstan
On 3/27/22 19:14, Tom Lane wrote: > I wrote: >>> Andres Freund writes: There's also https://buildfarm.postgresql.org/cgi-bin/show_log.pl?nm=jabiru=2022-03-22%2022%3A25%3A26 that started failing with ../../preproc/ecpg --regression -I./../../include -I. -o test1.c test1.pgc

Re: XID formatting and SLRU refactorings (was: Add 64-bit XIDs into PostgreSQL 15)

2022-03-28 Thread Aleksander Alekseev
Hi hackers, > Here is v30. I took another look at the patchset. Personally I don't think it will get much better than it is now. I'm inclined to change the status of the CF entry to "Ready for Committer" unless anyone disagrees. cfbot reports a problem with t/013_partition.pl but the test seems

Re: Summary Sort workers Stats in EXPLAIN ANALYZE

2022-03-28 Thread Jian Guo
I have updated the patch addressing the review comments, but I didn't moved this code block into VERBOSE mode, to keep consistency with `show_incremental_sort_info`: https://github.com/postgres/postgres/blob/d4ba8b51c76300f06cc23f4d8a41d9f7210c4866/src/backend/commands/explain.c#L2890 Please

Re: TRAP: FailedAssertion("HaveRegisteredOrActiveSnapshot()", File: "toast_internals.c", Line: 670, PID: 19403)

2022-03-28 Thread Kyotaro Horiguchi
At Sun, 27 Mar 2022 20:32:45 +0200, Erik Rijkers wrote in > On master I got a FailedAssertion("HaveRegisteredOrActiveSnapshot()" > on an assert-enabled instance and with (I think) data over a certain > length. > > I whittled it down to the attached bash (careful - it drops stuff). > It has 5

Re: [EXTERNAL] Re: Add non-blocking version of PQcancel

2022-03-28 Thread Jelte Fennema
Thanks for all the feedback everyone. I'll try to send a new patch later this week that includes user facing docs and a simplified API. For now a few responses: > Yeah. We need to choose a name for these new function(s) that is > sufficiently different from "PQcancel" that people won't expect

Re: [PATCH] Accept IP addresses in server certificate SANs

2022-03-28 Thread Daniel Gustafsson
> On 28 Mar 2022, at 00:44, Daniel Gustafsson wrote: > I'll take a look at fixing up the test in this patch tomorrow. Fixing up the switch_server_cert() calls and using default_ssl_connstr makes the test pass for me. The required fixes are in the supplied 0004 diff, I kept them separate to

Re: Allow file inclusion in pg_hba and pg_ident files

2022-03-28 Thread Julien Rouhaud
On Mon, Mar 28, 2022 at 05:02:14PM +0900, Michael Paquier wrote: > On Mon, Mar 28, 2022 at 03:43:41PM +0800, Julien Rouhaud wrote: > > > > Ok. We could still keep the tests for the valid lines part though? > > With the SQLs modified as below, this part is less interesting. Ok. > > Do you mean

Re: standby recovery fails (tablespace related) (tentative patch and discussion)

2022-03-28 Thread Kyotaro Horiguchi
At Mon, 28 Mar 2022 10:01:05 +0900 (JST), Kyotaro Horiguchi wrote in > At Fri, 25 Mar 2022 13:26:05 +0100, Alvaro Herrera > wrote in > > Pushed this, backpatching to 14 and 13. It would have been good to > > backpatch further, but there's an (textually trivial) merge conflict > > related to

Re: Allow file inclusion in pg_hba and pg_ident files

2022-03-28 Thread Michael Paquier
On Mon, Mar 28, 2022 at 03:43:41PM +0800, Julien Rouhaud wrote: > On Mon, Mar 28, 2022 at 04:20:07PM +0900, Michael Paquier wrote: >> We could use a failure path for each psql command rather than a SKIP >> block, as you told me, if the psql fails and check that we get some >> error strings related

Re: [HACKERS] WIP aPatch: Pgbench Serialization and deadlock errors

2022-03-28 Thread Alvaro Herrera
Hello, On 2022-Mar-27, Tatsuo Ishii wrote: > After: > interval_start num_transactions sum_latency sum_latency_2 min_latency > max_latency > { failures | serialization_failures deadlock_failures } [ sum_lag sum_lag_2 > min_lag max_lag [ skipped ] ] [ retried retries ] You're showing an

Re: DSA failed to allocate memory

2022-03-28 Thread Thomas Munro
On Mon, Mar 28, 2022 at 8:14 PM Dongming Liu wrote: > On Fri, Mar 18, 2022 at 3:30 PM Dongming Liu wrote: >> I'm trying to move segments into appropriate bins in dsa_free(). >> In 0001-Re-bin-segment-when-dsa-memory-is-freed.patch, I extract >> the re-bin segment logic into a separate function

Re: Allow file inclusion in pg_hba and pg_ident files

2022-03-28 Thread Julien Rouhaud
Hi, On Mon, Mar 28, 2022 at 04:20:07PM +0900, Michael Paquier wrote: > > > Note that those tests fail on Windows (and I'm assuming on EXEC_BACKEND > > builds), as they're testing invalid files which by definition prevent any > > further connection attempt. I'm not sure what would be best to do

Re: Allow file inclusion in pg_hba and pg_ident files

2022-03-28 Thread Michael Paquier
On Mon, Mar 28, 2022 at 04:20:07PM +0900, Michael Paquier wrote: > See the attached, for reference, but it would fail with EXEC_BACKEND > on WIN32. Ditto. -- Michael From 69e02734fd0199ba02cc34bc468b04584bdf0efd Mon Sep 17 00:00:00 2001 From: Michael Paquier Date: Mon, 28 Mar 2022 16:20:40 +0900

Re: Allow file inclusion in pg_hba and pg_ident files

2022-03-28 Thread Michael Paquier
On Sun, Mar 27, 2022 at 05:52:22PM +0800, Julien Rouhaud wrote: > I didn't like the various suggestions, as it would mean to scatter the tests > all over the place. The whole point of those views is indeed to check the > current content of a file without applying the configuration change (not on

Re: DSA failed to allocate memory

2022-03-28 Thread Dongming Liu
On Fri, Mar 18, 2022 at 3:30 PM Dongming Liu wrote: > So it's OK for a segment to be in a bin that suggests that it has more >> consecutive free pages than it really does. But it's NOT ok for a >> segment to be in a bin that suggests it has fewer consecutive pages >> than it really does. If

Re: logical replication empty transactions

2022-03-28 Thread Amit Kapila
On Fri, Mar 25, 2022 at 12:50 PM houzj.f...@fujitsu.com wrote: > > Attach the new version patch with this change. > Few comments: = 1. I think we can move the keep_alive check after the tracklag record check to keep it consistent with another patch [1]. 2. Add the comment about

Re: [HACKERS] WIP aPatch: Pgbench Serialization and deadlock errors

2022-03-28 Thread Tatsuo Ishii
>>> > Even applying this patch, "make postgres-A4.pdf" arises the warning on my >>> > machine. After some investigations, I found that previous document had a >>> > break >>> > after 'num_transactions', but it has been removed due to this commit. >>> >>> Yes, your patch removed "". >>> >>> >

Re: [HACKERS] WIP aPatch: Pgbench Serialization and deadlock errors

2022-03-28 Thread Tatsuo Ishii
>> > Even applying this patch, "make postgres-A4.pdf" arises the warning on my >> > machine. After some investigations, I found that previous document had a >> > break >> > after 'num_transactions', but it has been removed due to this commit. >> >> Yes, your patch removed "". >> >> > So, >> > I

Re: pg_stat_get_replication_slot() marked not strict, crashes

2022-03-28 Thread Amit Kapila
On Mon, Mar 28, 2022 at 10:24 AM Andres Freund wrote: > > On 2022-03-27 21:09:29 -0700, Andres Freund wrote: > > FWIW, I have a test for both, I was a bit "stuck" on where to put the > > pg_stat_get_subscription_stats(NULL) test. I had put the > > pg_stat_get_replication_slot(NULL) in

Re: Logical replication timeout problem

2022-03-28 Thread Amit Kapila
On Mon, Mar 28, 2022 at 11:41 AM wangw.f...@fujitsu.com wrote: > > On Mon, Mar 28, 2022 at 9:56 AM Kuroda, Hayato/黒田 隼人 > wrote: > > > Do we have to consider something special case for that? > > I thought timeout may occur if users have huge table and publish few > > columns, > > but it is

Re: standby recovery fails (tablespace related) (tentative patch and discussion)

2022-03-28 Thread Kyotaro Horiguchi
At Mon, 28 Mar 2022 14:34:44 +1300, Thomas Munro wrote in > On Mon, Mar 28, 2022 at 2:01 PM Kyotaro Horiguchi > wrote: > > At Fri, 25 Mar 2022 13:26:05 +0100, Alvaro Herrera > > wrote in > > > Pushed this, backpatching to 14 and 13. It would have been good to > > > backpatch further, but

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

2022-03-28 Thread Dilip Kumar
On Sat, Mar 26, 2022 at 5:55 PM Dilip Kumar wrote: > > On Fri, Mar 25, 2022 at 8:16 PM Dilip Kumar wrote: > > > > > On a quick look, I'm guessing that XLOG_DBASE_CREATE_WAL_LOG will need > > > to mirror some of the logic that was added to the replay code for the > > > existing strategy, but I

RE: Logical replication timeout problem

2022-03-28 Thread wangw.f...@fujitsu.com
On Mon, Mar 28, 2022 at 9:56 AM Kuroda, Hayato/黒田 隼人 wrote: > Dear Wang-san, Thanks for your comments. > Thank you for updating! > ...but it also cannot be applied to current HEAD > because of the commit 923def9a533. > > Your patch seems to conflict the adding an argument of >

RE: Failed transaction statistics to measure the logical replication progress

2022-03-28 Thread osumi.takami...@fujitsu.com
Hi On Friday, March 25, 2022 2:36 PM Masahiko Sawada wrote: > On Thu, Mar 24, 2022 at 12:30 PM Amit Kapila > wrote: > > > > On Thu, Mar 3, 2022 at 8:58 AM osumi.takami...@fujitsu.com > > wrote: > > > > > > > This patch introduces two new subscription statistics columns > > (apply_commit_count

<    1   2