Re: Summary Sort workers Stats in EXPLAIN ANALYZE

2022-03-21 Thread Jian Guo
There is some problem with the last patch, I have removed the `ExplainOpenWorker` call to fix. And also, I have added a test case in explain.sql​ according to the code change. From: Jian Guo Sent: Monday, March 21, 2022 11:36 To: pgsql-hackers@lists.postgresql.or

Re: Patch proposal - parameter to limit amount of FPW because of hint bits per second

2022-03-21 Thread Michail Nikolaev
Hello, Peter. > * Instead of avoiding the FPI when this happens, proactively call > _bt_simpledel_pass() just before _bt_killitems() returns. Accept the > immediate cost of setting an LP_DEAD bit, just like today, but avoid > repeated FPIs. Hm, not sure here AFAIK current implementation does not

Re: Support logical replication of DDLs

2022-03-21 Thread Dilip Kumar
On Thu, Mar 17, 2022 at 2:47 AM Zheng Li wrote: > > Hi, > > >If you don't mind, would you like to share the POC or the branch for this > >work? > > The POC patch is attached. It currently supports the following > functionalities: Thanks for sharing, I will look into it. > >In such cases why do

Re: WIP: WAL prefetch (another approach)

2022-03-21 Thread Julien Rouhaud
Hi, On Sun, Mar 20, 2022 at 05:36:38PM +1300, Thomas Munro wrote: > On Fri, Mar 18, 2022 at 9:59 AM Thomas Munro wrote: > > I'll push 0001 today to let the build farm chew on it for a few days > > before moving to 0002. > > Clearly 018_wal_optimize.pl is flapping and causing recoveryCheck to > f

[PATCH] Remove workarounds to format [u]int64's

2022-03-21 Thread Aleksander Alekseev
Hi hackers, I learned from Tom [1] that we can simplify the code like: ``` char buff[32]; snprintf(buf, sizeof(buf), INT64_FORMAT, ...) ereport(WARNING, (errmsg("%s ...", buf))); ``` ... and rely on %lld/%llu now as long as we explicitly cast the argument to long long int / unsigned long long. T

Re: [PATCH] Remove workarounds to format [u]int64's

2022-03-21 Thread Pavel Borisov
пн, 21 мар. 2022 г. в 12:52, Aleksander Alekseev : > Hi hackers, > > I learned from Tom [1] that we can simplify the code like: > > ``` > char buff[32]; > snprintf(buf, sizeof(buf), INT64_FORMAT, ...) > ereport(WARNING, (errmsg("%s ...", buf))); > ``` > > ... and rely on %lld/%llu now as long as w

Re: [PATCH] Remove workarounds to format [u]int64's

2022-03-21 Thread Aleksander Alekseev
Hi Pavel, > Probably you can do (long long) instead of (long long int). It is shorter and > this is used elsewhere in the code. Thanks! Here is the updated patch. I also added Reviewed-by: and Discussion: to the commit message. -- Best regards, Aleksander Alekseev v2-0001-Remove-workarounds-

Re: [PATCH] Remove workarounds to format [u]int64's

2022-03-21 Thread Pavel Borisov
> > > Probably you can do (long long) instead of (long long int). It is > shorter and this is used elsewhere in the code. > > Thanks! Here is the updated patch. I also added Reviewed-by: and > Discussion: to the commit message. > Thanks, Alexander! I suggest the patch is in a good shape to be commi

Re: Problem with moderation of messages with patched attached.

2022-03-21 Thread Dave Page
On Sun, 20 Mar 2022 at 13:52, Andrew Dunstan wrote: > > On 3/19/22 14:48, Andres Freund wrote: > > Hi, > > > > On 2022-03-03 13:37:35 +, Dave Page wrote: > >> On Thu, 3 Mar 2022 at 13:28, Pavel Borisov > wrote: > >> > >>> The mail system doesn't have the capability to apply different > moder

Re: [PATCH] Add reloption for views to enable RLS

2022-03-21 Thread Laurenz Albe
On Sat, 2022-03-19 at 01:10 +, Dean Rasheed wrote: > I have been hacking on it a bit, and attached is an updated version. > Aside from some general copy editing, the most notable changes are: > [...] Thanks for your diligent work on this, and the patch looks good to me. It is good that you fou

Re: logical replication empty transactions

2022-03-21 Thread Amit Kapila
On Sat, Mar 19, 2022 at 9:10 AM Ajin Cherian wrote: > > On Thu, Mar 17, 2022 at 10:43 PM Amit Kapila wrote: > > > 3. Can we add a simple test for it in one of the existing test > > files(say in 001_rep_changes.pl)? > > added a simple test. > This doesn't verify if the transaction is skipped. I t

Re: [PATCH] Remove workarounds to format [u]int64's

2022-03-21 Thread Japin Li
On Mon, 21 Mar 2022 at 17:23, Aleksander Alekseev wrote: > Hi Pavel, > >> Probably you can do (long long) instead of (long long int). It is shorter >> and this is used elsewhere in the code. > > Thanks! Here is the updated patch. I also added Reviewed-by: and > Discussion: to the commit message

Re: Detaching a partition with a FK on itself is not possible

2022-03-21 Thread Jehan-Guillaume de Rorthais
Hi, On Thu, 17 Mar 2022 17:58:04 + Arne Roland wrote: > I don't think this a bug, but a feature request. I therefore think hackers > would be more appropriate. +1 I changed the list destination > I don't see how an additional syntax to modify the constraint should help. Me neiher. > If

Re: Column Filtering in Logical Replication

2022-03-21 Thread Amit Kapila
On Sun, Mar 20, 2022 at 4:53 PM Tomas Vondra wrote: > > On 3/20/22 07:23, Amit Kapila wrote: > > On Sun, Mar 20, 2022 at 8:41 AM Amit Kapila wrote: > >> > >> On Fri, Mar 18, 2022 at 10:42 PM Tomas Vondra > >> wrote: > >> > >>> So the question is why those two sync workers never complete - I gues

Re: Detaching a partition with a FK on itself is not possible

2022-03-21 Thread Arne Roland
From: Jehan-Guillaume de Rorthais Sent: Monday, March 21, 2022 11:36 Subject: Re: Detaching a partition with a FK on itself is not possible > I changed the list destination Thanks > Another solution could be to teach the create partition to detect a self > referencing FK and actually create a s

Re: [PATCH] Remove workarounds to format [u]int64's

2022-03-21 Thread Aleksander Alekseev
Hi Japin, > After apply the patch, I found pg_checksums.c also has the similar code. Thanks for noticing it. > In progress_report(), I'm not sure we can do this replace for this code. I added the corresponding change as a separate commit so it can be easily reverted if necessary. Here is a com

Re: [PATCH] Remove workarounds to format [u]int64's

2022-03-21 Thread Aleksander Alekseev
Hi Japin, > As Tom said in [1], we don't need to touch the *.po files, since those files > are managed by the translation team. > > [1] https://www.postgresql.org/message-id/1110708.1647623560%40sss.pgh.pa.us True, but I figured that simplifying the work of the translation team would not harm eit

Re: Column Filtering in Logical Replication

2022-03-21 Thread Amit Kapila
On Fri, Mar 18, 2022 at 8:13 PM Tomas Vondra wrote: > > Ah, thanks for reminding me - it's hard to keep track of all the issues > in threads as long as this one. > > BTW do you have any opinion on the SET COLUMNS syntax? Peter Smith > proposed to get rid of it in [1] but I'm not sure that's a good

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

2022-03-21 Thread Alvaro Herrera
On 2022-Mar-04, Michael Paquier wrote: > d6d317d as solved the issue of tablespace paths across multiple nodes > with the new GUC called allow_in_place_tablespaces, and is getting > successfully used in the recovery tests as of 027_stream_regress.pl. OK, but that means that the test suite is now

Re: Column Filtering in Logical Replication

2022-03-21 Thread Amit Kapila
On Sat, Mar 19, 2022 at 3:56 AM Tomas Vondra wrote: > > On 3/18/22 15:43, Tomas Vondra wrote: > > > > As for the issue reported by Shi-San about replica identity full and > column filters, presumably you're referring to this: > > create table tbl (a int, b int, c int); > create publication pub

Re: Fix unsigned output for signed values in SLRU error reporting

2022-03-21 Thread Pavel Borisov
> > Afaics offset etc can't be negative, so I don't think this really improves > matters. I think there's quite a few other places where we use %u to print > integers that we know aren't negative. > > If anything I think we should change the signed integers to unsigned ones. > It > might be worth d

Re: Add pg_freespacemap extension sql test

2022-03-21 Thread Dong Wook Lee
2022년 3월 20일 (일) 03:13, Fabrízio de Royes Mello 님이 작성: > > > On Sat, Mar 19, 2022 at 1:18 PM Dong Wook Lee wrote: > > > > > Well, my guess is that you basically just care about being able to > > > detect if there is free space in the map or not, which goes down to > > > detecting if pg_freespace(

Re: Column Filtering in Logical Replication

2022-03-21 Thread Alvaro Herrera
Hello, Please add me to the list of authors of this patch. I made a large number of nontrivial changes to it early on. Thanks. I have modified the entry in the CF app (which sorts alphabetically, it was not my intention to put my name first.) -- Álvaro Herrera PostgreSQL Developer —

Re: Skipping logical replication transactions on subscriber side

2022-03-21 Thread Euler Taveira
On Mon, Mar 21, 2022, at 12:25 AM, Amit Kapila wrote: > I have fixed all the above comments as per your suggestion in the > attached. Do let me know if something is missed? Looks good to me. > > src/test/subscription/t/029_disable_on_error.pl | 94 -- > > src/test/subscription/t/029_on_err

Re: [PATCH] Add reloption for views to enable RLS

2022-03-21 Thread Laurenz Albe
On Mon, 2022-03-21 at 18:09 +0800, Japin Li wrote: > After apply the patch, I found pg_checksums.c also has the similar code. > > In progress_report(), I'm not sure we can do this replace for this code. > >     snprintf(total_size_str, sizeof(total_size_str), INT64_FORMAT, > total_si

Re: logical decoding and replication of sequences

2022-03-21 Thread Peter Eisentraut
On 20.03.22 23:55, Tomas Vondra wrote: Attached is a rebased patch, addressing most of the remaining issues. This looks okay to me, if the two FIXMEs are addressed. Remember to also update protocol.sgml if you change LOGICAL_REP_MSG_SEQUENCE.

Re: refactoring basebackup.c (zstd workers)

2022-03-21 Thread Justin Pryzby
On Sun, Mar 20, 2022 at 09:38:44PM -0400, Robert Haas wrote: > > This patch also needs to update the other user-facing docs. > > Which ones exactly? I mean pg_basebackup -Z -Z level -Z [{client|server}-]method[:level] --compress=level --compress=[{client|server}-]method[:level]

Re: [PATCH] Add reloption for views to enable RLS

2022-03-21 Thread Japin Li
On Mon, 21 Mar 2022 at 20:40, Laurenz Albe wrote: > On Mon, 2022-03-21 at 18:09 +0800, Japin Li wrote: >> After apply the patch, I found pg_checksums.c also has the similar code. >> >> In progress_report(), I'm not sure we can do this replace for this code. >> >> snprintf(total_size_str, siz

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

2022-03-21 Thread Robert Haas
On Sun, Mar 20, 2022 at 1:34 AM Dilip Kumar wrote: > I thought that way because IIUC, when we are locking the database > tuple we are ensuring that we are calling > ReceiveSharedInvalidMessages() right? And IIUC > ReceiveSharedInvalidMessages(), is designed such a way that it will > consume all

Re: [PATCH] Remove workarounds to format [u]int64's

2022-03-21 Thread Tom Lane
Aleksander Alekseev writes: >> As Tom said in [1], we don't need to touch the *.po files, since those >> files are managed by the translation team. > True, but I figured that simplifying the work of the translation team would > not harm either. It would not simplify things for them at all, just

Re: Column Filtering in Logical Replication

2022-03-21 Thread Amit Kapila
On Sat, Mar 19, 2022 at 11:11 PM Tomas Vondra wrote: > > On 3/19/22 18:11, Tomas Vondra wrote: > > Fix a compiler warning reported by cfbot. > > Apologies, I failed to actually commit the fix. So here we go again. > Few comments: === 1. +/* + * Gets a list of OIDs of all partial-colum

Re: [PATCH] Remove workarounds to format [u]int64's

2022-03-21 Thread Aleksander Alekseev
Hi Tom, > It would not simplify things for them at all, just mess it up. > The master copies of the .po files are kept in a different repo. > Also, I believe that extraction of new message strings is automated > already. Got it, thanks. Here is the corrected patch. It includes all the changes by

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

2022-03-21 Thread Dilip Kumar
On Mon, Mar 21, 2022 at 7:07 PM Robert Haas wrote: > > On Sun, Mar 20, 2022 at 1:34 AM Dilip Kumar wrote: > > I thought that way because IIUC, when we are locking the database > > tuple we are ensuring that we are calling > > ReceiveSharedInvalidMessages() right? And IIUC > > ReceiveSharedInval

Re: [PATCH] Remove workarounds to format [u]int64's

2022-03-21 Thread Tom Lane
Aleksander Alekseev writes: > Got it, thanks. Here is the corrected patch. It includes all the > changes by me and Japin, and doesn't touch PO files. Pushed. I removed now-unnecessary braces, reflowed some lines as suggested by Pavel, and pgindent'ed (which insisted on adding spaces after the ca

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

2022-03-21 Thread Dilip Kumar
On Mon, Mar 21, 2022 at 8:29 PM Dilip Kumar wrote: > > On Mon, Mar 21, 2022 at 7:07 PM Robert Haas wrote: > > > > On Sun, Mar 20, 2022 at 1:34 AM Dilip Kumar wrote: > > > I thought that way because IIUC, when we are locking the database > > > tuple we are ensuring that we are calling > > > Recei

Re: New Object Access Type hooks

2022-03-21 Thread Andrew Dunstan
On 3/17/22 23:21, Mark Dilger wrote: > Hackers, > > Over in [1], Joshua proposed a new set of Object Access Type hooks based on > strings rather than Oids. > > His patch was written to be applied atop my patch for granting privileges on > gucs. > > On review of his patch, I became uncomfortable

Re: [PATCH] add relation and block-level filtering to pg_waldump

2022-03-21 Thread David Christensen
On Sun, Mar 20, 2022 at 11:56 PM Thomas Munro wrote: > On Mon, Mar 21, 2022 at 4:36 PM Thomas Munro > wrote: > > On Sat, Feb 26, 2022 at 7:58 AM David Christensen > > wrote: > > > Attached is V2 with additional feedback from this email, as well as > the specification of the > > > ForkNumber and

Re: refactoring basebackup.c (zstd workers)

2022-03-21 Thread Robert Haas
On Mon, Mar 21, 2022 at 9:18 AM Justin Pryzby wrote: > On Sun, Mar 20, 2022 at 09:38:44PM -0400, Robert Haas wrote: > > > This patch also needs to update the other user-facing docs. > > > > Which ones exactly? > > I mean pg_basebackup -Z > > -Z level > -Z [{client|server}-]method[:level] > --compr

Re: pgsql: Add option to use ICU as global locale provider

2022-03-21 Thread Christoph Berg
Re: Peter Eisentraut > > Since the intended usage seems to be that databases should either be > > using libc, or the ICU locales, but probably not both at the same > > time, does it make sense to clutter the already very wide `psql -l` > > output with two new extra columns? > > Good point, let me

Re: [PATCH] add relation and block-level filtering to pg_waldump

2022-03-21 Thread David Christensen
Updated to include the V3 fixes as well as the unsigned int/enum fix. > v4-0001-Add-additional-filtering-options-to-pg_waldump.patch Description: Binary data

Re: refactoring basebackup.c (zstd workers)

2022-03-21 Thread Justin Pryzby
On Mon, Mar 21, 2022 at 12:57:36PM -0400, Robert Haas wrote: > > typo: contain a an > I searched for the "contain a an" typo that you mentioned but was not able to > find it. Can you give me a more specific pointer? Here: + * during parsing, and will otherwise contain a an appropriate error messa

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

2022-03-21 Thread Robert Haas
On Mon, Mar 21, 2022 at 11:21 AM Dilip Kumar wrote: > I tried to debug the case but I realized that somehow > CHECK_FOR_INTERRUPTS() is not calling the > AcceptInvalidationMessages() and I could not find the same while > looking into the code as well. While debugging I noticed that > AcceptInval

Re: refactoring basebackup.c (zstd workers)

2022-03-21 Thread Robert Haas
On Mon, Mar 21, 2022 at 2:22 PM Justin Pryzby wrote: > + * during parsing, and will otherwise contain a an appropriate error message. OK, thanks. v4 attached. > I think "algorithm" could be much more nuanced than "lz4", but I also think > we've spent more than enough time on it now :) Oh dear.

Re: pgsql: Add option to use ICU as global locale provider

2022-03-21 Thread Tom Lane
Christoph Berg writes: > A possible solution might be to rip out all the locale columns except > "Encoding" from \l, and leave them in place for \l+. I'd rather see a single column summarizing the locale situation. Perhaps it could be COALESCE(daticulocale, datcollate), or something using a CASE

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

2022-03-21 Thread Peter Eisentraut
On 18.03.22 16:14, Maxim Orlov wrote: Here is v22. It addresses things mentioned by Tom and Kyotaro. Also added Aleksander's changes from v21. The v22-0002-Update-XID-formatting-in-the-.po-files.patch is not necessary. That is done by a separate procedure. I'm wondering about things like th

Re: refactoring basebackup.c (zstd workers)

2022-03-21 Thread Dagfinn Ilmari Mannsåker
Robert Haas writes: > On Mon, Mar 21, 2022 at 2:22 PM Justin Pryzby wrote: >> + * during parsing, and will otherwise contain a an appropriate error >> message. > > OK, thanks. v4 attached. I haven't read the whole patch, but I noticed an omission in the documentation changes: > diff --git a/d

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

2022-03-21 Thread Alvaro Herrera
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: 1. the XLogFlush is only done if consistent state has not been reached. As I understand, it's not needed in normal mode. (In any case, if we do call XLogF

Re: add checkpoint stats of snapshot and mapping files of pg_logical dir

2022-03-21 Thread Andres Freund
Hi, On 2022-03-21 11:27:15 +0530, Bharath Rupireddy wrote: > On Sat, Mar 19, 2022 at 4:39 AM Andres Freund wrote: > > > > before we further change this (as done in this patch) we should deduplicate > > these huge statements in a separate patch / commit. > > Something like attached > v6-0001-Dedup

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

2022-03-21 Thread Alvaro Herrera
On 2022-Mar-14, Robert Haas wrote: > 2. Why not instead change the code so that the operation can succeed, > by creating the prerequisite parent directories? Do we not have enough > information for that? I'm not saying that we definitely should do it > that way rather than this way, but I think we

Re: New Object Access Type hooks

2022-03-21 Thread Mark Dilger
> On Mar 18, 2022, at 3:04 PM, Andrew Dunstan wrote: > > I haven't looked at it in detail, but regarding the test code I'm not > sure why there's a .control file, since this isn't a loadable extension, > not why there's a test_oat_hooks.h file. The .control file exists because the test defines

Re: New Object Access Type hooks

2022-03-21 Thread Mark Dilger
> On Mar 21, 2022, at 8:41 AM, Andrew Dunstan wrote: > > My first inclination is to say it's probably ok. The immediately obvious > alternative would be to create yet another set of functions that don't > have classId parameters. That doesn't seem attractive. > > Modulo that issue I think pat

Re: jsonpath syntax extensions

2022-03-21 Thread Greg Stark
This patch seems to be getting ignored. Like David I'm a bit puzzled because it doesn't seem like an especially obscure or difficult patch to review. Yet it's been multiple years without even a superficial "does it meet the coding requirements" review let alone a design review. Can we get a volunt

Re: jsonpath syntax extensions

2022-03-21 Thread Greg Stark
Hm. Actually... These changes were split off from the JSON_TABLE patches? Are they still separate or have they been merged into those other patches since? I see the JSON_TABLE thread is getting more comments do those reviews include these patches? On Mon, 21 Mar 2022 at 16:09, Greg Stark wrote: >

Re: [PATCH v2] use has_privs_for_role for predefined roles

2022-03-21 Thread Joe Conway
On 3/20/22 12:38, Stephen Frost wrote: Greetings, On Sun, Mar 20, 2022 at 18:31 Joshua Brindle mailto:joshua.brin...@crunchydata.com>> wrote: On Sun, Mar 20, 2022 at 12:27 PM Joe Conway mailto:m...@joeconway.com>> wrote: > > On 3/3/22 11:26, Joshua Brindle wrote: > > On Th

Re: add checkpoint stats of snapshot and mapping files of pg_logical dir

2022-03-21 Thread Nathan Bossart
On Mon, Mar 21, 2022 at 11:27:15AM +0530, Bharath Rupireddy wrote: > On Sat, Mar 19, 2022 at 3:16 AM Nathan Bossart > wrote: >> /* buffer stats */ >> appendStringInfo(&logmsg, "wrote %d buffers (%.1f%%); ", >> >> Checkpoin

Re: jsonpath syntax extensions

2022-03-21 Thread Erik Rijkers
Op 21-03-2022 om 21:13 schreef Greg Stark: Hm. Actually... These changes were split off from the JSON_TABLE patches? Are they still separate or have they been merged into those other patches since? I see the JSON_TABLE thread is getting more comments do those reviews include these patches? T

Re: New Object Access Type hooks

2022-03-21 Thread Andrew Dunstan
On 3/21/22 15:57, Mark Dilger wrote: >> On Mar 18, 2022, at 3:04 PM, Andrew Dunstan wrote: >> >> I haven't looked at it in detail, but regarding the test code I'm not >> sure why there's a .control file, since this isn't a loadable extension, >> not why there's a test_oat_hooks.h file. > The .co

Re: Patch proposal - parameter to limit amount of FPW because of hint bits per second

2022-03-21 Thread Peter Geoghegan
On Mon, Mar 21, 2022 at 12:58 AM Michail Nikolaev wrote: > Hm, not sure here > AFAIK current implementation does not produce repeated FPIs. Page is > marked as dirty on the first bit. So, others LP_DEAD (if not set by > single scan) do not generate FPI until checkpoint is ready. There is one FPI

Re: Support logical replication of DDLs

2022-03-21 Thread Zheng Li
Hi Japin, > You should use a different user that has different length from your current > one. > For example: > > px@localhost$ make check-world This is fixed in the latest commit: https://github.com/zli236/postgres/commits/ddl_replication Thanks, Zheng

RE: WIP: Aggregation push-down

2022-03-21 Thread fujii.y...@df.mitsubishielectric.co.jp
Hi everyone. I develop postgresql's extension such as fdw in my work. I'm interested in using postgresql for OLAP. I think that this patch is realy useful when using OLAP queries. Furthermore, I think it would be more useful if this patch works on a foreign table. Actually, I changed this patc

Re: freeing bms explicitly

2022-03-21 Thread Zhihong Yu
> > Hi, > I was looking at calls to bms_free() in PG code. > > e.g. src/backend/commands/publicationcmds.c line 362 > > bms_free(bms); > > The above is just an example, there're other calls to bms_free(). > Since the bms is allocated from some execution context, I wonder why this > call is

Re: [PATCH] add relation and block-level filtering to pg_waldump

2022-03-21 Thread Thomas Munro
On Tue, Mar 22, 2022 at 6:14 AM David Christensen wrote: > Updated to include the V3 fixes as well as the unsigned int/enum fix. Hi David, I ran this though pg_indent and adjusted some remaining non-project-style whitespace, and took it for a spin. Very minor comments: pg_waldump: error: could

Re: shared-memory based stats collector - v66

2022-03-21 Thread Melanie Plageman
On Sun, Mar 20, 2022 at 4:56 PM Melanie Plageman wrote: > > Addressed all of these points in > v2-0001-add-replica-cleanup-tests.patch > > also added a new test file in > v2-0002-Add-TAP-test-for-discarding-stats-after-crash.patch > testing correct behavior after a crash and when stats file is inv

Re: logical decoding and replication of sequences

2022-03-21 Thread Tomas Vondra
On 3/21/22 14:05, Peter Eisentraut wrote: > On 20.03.22 23:55, Tomas Vondra wrote: >> Attached is a rebased patch, addressing most of the remaining issues. > > This looks okay to me, if the two FIXMEs are addressed.  Remember to > also update protocol.sgml if you change LOGICAL_REP_MSG_SEQUENCE.

Re: freeing bms explicitly

2022-03-21 Thread Tom Lane
Zhihong Yu writes: >> I was looking at calls to bms_free() in PG code. >> e.g. src/backend/commands/publicationcmds.c line 362 >> bms_free(bms); >> The above is just an example, there're other calls to bms_free(). >> Since the bms is allocated from some execution context, I wonder why this >>

Re: freeing bms explicitly

2022-03-21 Thread Zhihong Yu
On Mon, Mar 21, 2022 at 3:05 PM Tom Lane wrote: > Zhihong Yu writes: > >> I was looking at calls to bms_free() in PG code. > >> e.g. src/backend/commands/publicationcmds.c line 362 > >> bms_free(bms); > >> The above is just an example, there're other calls to bms_free(). > >> Since the bms

Re: Estimating HugePages Requirements?

2022-03-21 Thread Nathan Bossart
On Tue, Mar 15, 2022 at 03:44:39PM -0700, Nathan Bossart wrote: > A simple approach could be to just set log_min_messages to PANIC before > exiting. I've attached a patch for this. With this patch, we'll still see > a FATAL if we try to use 'postgres -C' for a runtime-computed GUC on a > running

Re: Concurrent deadlock scenario with DROP INDEX on partitioned index

2022-03-21 Thread Jimmy Yih
Tom Lane wrote: > Hence, I propose the attached. 0001 is pure refactoring: it hopefully > clears up the confusion about which "relkind" is which, and it also > saves a couple of redundant syscache fetches in RemoveRelations. > Then 0002 adds the actual bug fix as well as a test case that does > d

Re: [PATCH] add relation and block-level filtering to pg_waldump

2022-03-21 Thread David Christensen
On Mon, Mar 21, 2022 at 4:39 PM Thomas Munro wrote: [snip] I guess you did this because init fork references aren't really > expected in the WAL, but I think it's more consistent to allow up to > MAX_FORKNUM, not least because your documentation mentions 3 as a > valid value. So I adjust this t

Re: New Object Access Type hooks

2022-03-21 Thread Mark Dilger
> On Mar 21, 2022, at 1:30 PM, Andrew Dunstan wrote: > > To the best of my knowledge .control files are only used by extensions, > not by other modules. They are only referenced in > src/backend/commands/extension.c in the backend code. For example, > auto_explain which is a loadable module but

Re: PoC: using sampling to estimate joins / complex conditions

2022-03-21 Thread Andres Freund
Hi, On 2022-01-21 01:06:37 +0100, Tomas Vondra wrote: > Yeah, I haven't updated some of the test output because some of those > changes are a bit wrong (and I think that's fine for a PoC patch). I > should have mentioned that in the message, though. Sorry about that. Given that the patch hasn't b

Re: Add sub-transaction overflow status in pg_stat_activity

2022-03-21 Thread Andres Freund
On 2022-01-14 11:25:45 -0500, Tom Lane wrote: > Julien Rouhaud writes: > > Like many I previously had to investigate a slowdown due to sub-transaction > > overflow, and even with the information available in a monitoring view (I > > had > > to rely on a quick hackish extension as I couldn't patch

Re: TAP output format in pg_regress

2022-03-21 Thread Andres Freund
Hi, On 2022-02-22 15:10:11 +0100, Daniel Gustafsson wrote: > > On 22 Feb 2022, at 00:08, Daniel Gustafsson wrote: > > > I'll fix that. > > The attached v3 fixes that thinko, and cleans up a lot of the output which > isn't diagnostic per the TAP spec to make it less noisy. It also fixes tag > s

Re: Add parameter jit_warn_above_fraction

2022-03-21 Thread Andres Freund
Hi, On 2022-03-07 13:10:32 +0100, Magnus Hagander wrote: > Meanwhile here is an updated based on your other comments above, as > well as those from Julien. This fails on cfbot, due to compiler warnings: https://cirrus-ci.com/task/5127667648299008?logs=mingw_cross_warning#L390 Greetings, Andres

Re: pgcrypto: Remove internal padding implementation

2022-03-21 Thread Nathan Bossart
On Wed, Mar 16, 2022 at 11:12:06AM +0100, Peter Eisentraut wrote: > Right, the previous behaviors were clearly faulty. I have updated the > commit message to call out the behavior change more clearly. > > This patch is now complete from my perspective. I took a look at this patch and found nothi

Re: Fast COPY FROM based on batch insert

2022-03-21 Thread Andres Freund
On 2021-06-07 16:16:58 +0500, Andrey Lepikhov wrote: > Second version of the patch fixes problems detected by the FDW regression > tests and shows differences of error reports in tuple-by-tuple and batched > COPY approaches. Patch doesn't apply and likely hasn't for a while...

Re: Identify missing publications from publisher while create/alter subscription.

2022-03-21 Thread Andres Freund
On 2022-02-13 19:34:05 +0530, vignesh C wrote: > Thanks for the comments, the attached v14 patch has the changes for the same. The patch needs a rebase, it currently fails to apply: http://cfbot.cputube.org/patch_37_2957.log

Re: Make mesage at end-of-recovery less scary.

2022-03-21 Thread Andres Freund
Hi, On 2022-03-04 09:43:59 +0900, Kyotaro Horiguchi wrote: > On second thought the two seems repeating the same things. Thus I > merged the two comments together. In this verion 16 it looks like > this. Patch currently fails to apply, needs a rebase: http://cfbot.cputube.org/patch_37_2490.log

Re: Parameter for planner estimate of recursive queries

2022-03-21 Thread Andres Freund
Hi, On 2022-03-10 17:42:14 +, Simon Riggs wrote: > Shall I set this as Ready For Committer? Currently this CF entry fails on cfbot: https://cirrus-ci.com/task/4531771134967808?logs=test_world#L1158 [16:27:35.772] # Failed test 'no parameters missing from postgresql.conf.sample' [16:27:35

Re: [PATCH] Full support for index LP_DEAD hint bits on standby

2022-03-21 Thread Andres Freund
Hi, On 2022-01-25 19:21:01 +0800, Julien Rouhaud wrote: > I rebased the pathset in attached v9. Please double check that I didn't miss > anything in the rebase. Fails to apply at the moment: http://cfbot.cputube.org/patch_37_2947.log Marked as waiting for author. - Andres

Re: [PATCH] Add TOAST support for several system tables

2022-03-21 Thread Andres Freund
On 2022-02-28 18:08:48 -0500, Tom Lane wrote: > =?UTF-8?B?U29maWEgS29waWtvdmE=?= writes: > > ACL lists in tables may potentially be large in size. I suggest adding > > TOAST support for system tables, namely pg_class, pg_attribute and > > pg_largeobject_metadata, for they include ACL columns. >

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

2022-03-21 Thread Yugo NAGATA
Hi Ishii-san, On Sun, 20 Mar 2022 09:52:06 +0900 (JST) Tatsuo Ishii wrote: > Hi Yugo, > > I have looked into the patch and I noticed that linkend=... endterm=...> is used in pgbench.sgml. e.g. > > > > AFAIK this is the only place where "endterm" is used. In other places > "link" tag is used

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

2022-03-21 Thread Yugo NAGATA
On Sun, 20 Mar 2022 16:11:43 +0900 (JST) Tatsuo Ishii wrote: > > Hi Yugo, > > > > I tested with serialization error scenario by setting: > > default_transaction_isolation = 'repeatable read' > > The result was: > > > > $ pgbench -t 10 -c 10 --max-tries=10 test > > transaction type: > > scaling

Re: Add connection active, idle time to pg_stat_activity

2022-03-21 Thread Andres Freund
Hi, On 2022-02-04 10:58:24 +0100, Sergey Dudoladov wrote: > Thank you for the contribution. I included both of your diffs with > minor changes. This currently doesn't apply: http://cfbot.cputube.org/patch_37_3405.log Could you rebase? Marking as waiting on author for now. - Andres

Re: pg_stat_bgwriter.buffers_backend is pretty meaningless (and more?)

2022-03-21 Thread Andres Freund
Hi, On 2022-02-19 11:06:18 -0500, Melanie Plageman wrote: > v21 rebased with compile errors fixed is attached. This currently doesn't apply (mea culpa likely): http://cfbot.cputube.org/patch_37_3272.log Could you rebase? Marked as waiting-on-author for now. - Andres

Re: Mingw task for Cirrus CI

2022-03-21 Thread Andres Freund
Hi, On 2022-02-25 19:44:27 +0300, Melih Mutlu wrote: > I've been working on adding Windows+MinGW environment into cirrus-ci tasks > (discussion about ci is here [1]). This doesn't apply anymore: http://cfbot.cputube.org/patch_37_3575.log Could you rebase? Greetings, Andres Freund

Re: PoC: using sampling to estimate joins / complex conditions

2022-03-21 Thread Tomas Vondra
On 3/22/22 00:35, Andres Freund wrote: > Hi, > > On 2022-01-21 01:06:37 +0100, Tomas Vondra wrote: >> Yeah, I haven't updated some of the test output because some of those >> changes are a bit wrong (and I think that's fine for a PoC patch). I >> should have mentioned that in the message, thoug

Re: PATCH: generate fractional cheapest paths in generate_orderedappend_path

2022-03-21 Thread Andres Freund
Hi, On 2022-01-14 01:39:30 +0100, Tomas Vondra wrote: > Are you interested / willing to do some of this work? This patch hasn't moved in the last two months. I think it may be time to mark it as returned with feedback for now? It's also failing tests, and has done so for months: https://cirrus-

Re: Extensible storage manager API - smgr hooks

2022-03-21 Thread Andres Freund
Hi, On 2021-06-30 05:36:11 +0300, Yura Sokolov wrote: > Anastasia Lubennikova писал 2021-06-30 00:49: > > Hi, hackers! > > > > Many recently discussed features can make use of an extensible storage > > manager API. Namely, storage level compression and encryption [1], > > [2], [3], disk quota fea

Re: Allow batched insert during cross-partition updates

2022-03-21 Thread Andres Freund
Hi, On 2021-08-24 12:03:59 +0900, Amit Langote wrote: > Tomas committed the bug-fix, so attaching a rebased version of the > patch for $subject. This patch is in the current CF, but doesn't apply: http://cfbot.cputube.org/patch_37_2992.log marked the entry as waiting-on-author. Greetings, Andr

Re: Fix overflow in DecodeInterval

2022-03-21 Thread Tom Lane
Joseph Koshakow writes: > [ v8-0001-Check-for-overflow-when-decoding-an-interval.patch ] This isn't applying per the cfbot; looks like it got sideswiped by 9e9858389. Here's a quick rebase. I've not reviewed it, but I did notice (because git was in my face about this) that it's got whitespace i

Re: Supply restore_command to pg_rewind via CLI argument

2022-03-21 Thread Andres Freund
Hi, On 2021-11-05 15:10:29 +0500, Andrey Borodin wrote: > > 4 нояб. 2021 г., в 17:55, Daniel Gustafsson написал(а): > > > > The patch no longer applies, can you submit a rebased version please? > > Thanks, Daniel! PFA rebase. Doesn't apply once more: http://cfbot.cputube.org/patch_37_3213.log

Re: PATCH: generate fractional cheapest paths in generate_orderedappend_path

2022-03-21 Thread Tomas Vondra
On 3/22/22 01:18, Andres Freund wrote: > Hi, > > On 2022-01-14 01:39:30 +0100, Tomas Vondra wrote: >> Are you interested / willing to do some of this work? > > This patch hasn't moved in the last two months. I think it may be time to > mark it as returned with feedback for now? > > It's also fai

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

2022-03-21 Thread Andres Freund
Hi, On 2022-02-01 21:57:00 -0500, Jaime Casanova wrote: > This patch adds a new option (-J num, --jobs-per-disk=num) in > pg_upgrade to speed up copy mode. This generates upto ${num} > processes per tablespace to copy segments of the same relfilenode > in parallel. > > This can help when you h

Re: [PATCH] Proof of concept for GUC improvements

2022-03-21 Thread Andres Freund
Hi, On 2022-01-12 12:57:02 -0600, David Christensen wrote: > > Hi, > > > > According to the cfbot, the patch doesn't apply anymore and needs a > > rebase: http://cfbot.cputube.org/patch_36_3290.log > > V4 rebased attached. Doesn't apply anymore, again: http://cfbot.cputube.org/patch_37_3290.lo

Re: Proposal: allow database-specific role memberships

2022-03-21 Thread Andres Freund
Hi, On 2022-01-22 22:56:44 +0800, Julien Rouhaud wrote: > On Sat, Jan 22, 2022 at 05:28:05AM -0800, Kenaniah Cerny wrote: > > Thank you so much for the backtrace! > > > > This latest patch should address by moving the dumpRoleMembership call to > > before the pointer is closed. > > Thanks! The

Re: Logical insert/update/delete WAL records for custom table AMs

2022-03-21 Thread Andres Freund
Hi, On 2022-01-17 01:05:14 -0800, Jeff Davis wrote: > Great, I attached a rebased version. Currently this doesn't apply: http://cfbot.cputube.org/patch_37_3394.log - Andres

Re: Map WAL segment files on PMEM as WAL buffers

2022-03-21 Thread Andres Freund
Hi, On 2022-01-20 14:55:13 +0900, Takashi Menjo wrote: > Here is patchset v8. It will have "make check-world" and Cirrus to > pass. This unfortunately does not apply anymore: http://cfbot.cputube.org/patch_37_3181.log Could you rebase? - Andres

Re: [PATCH] New [relation] option engine

2022-03-21 Thread Andres Freund
Hi, On 2022-02-14 00:43:36 +0300, Nikolay Shaplov wrote: > I'd like to introduce a patch that reworks options processing. This doesn't apply anymore: http://cfbot.cputube.org/patch_37_3536.log Given that this patch has been submitted just to the last CF and that there's been no action on it, I

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

2022-03-21 Thread Tatsuo Ishii
> On Sun, 20 Mar 2022 16:11:43 +0900 (JST) > Tatsuo Ishii wrote: > >> > Hi Yugo, >> > >> > I tested with serialization error scenario by setting: >> > default_transaction_isolation = 'repeatable read' >> > The result was: >> > >> > $ pgbench -t 10 -c 10 --max-tries=10 test >> > transaction type

  1   2   >