Re: Assert while autovacuum was executing

2023-07-05 Thread Amit Kapila
On Fri, Jun 30, 2023 at 8:26 AM Amit Kapila wrote: > > On Wed, Jun 28, 2023 at 7:26 AM Zhijie Hou (Fujitsu) > wrote: > > > > Thanks for the verification. Unless someone has any further comments > or suggestions, I'll push this next week sometime. > Pushed but forgot to do indent which leads to

Re: test_extensions: fix inconsistency between meson.build and Makefile

2023-07-05 Thread Jeff Davis
On Thu, 2023-07-06 at 11:41 +0900, Michael Paquier wrote: > Why is the addition of --encoding necessary for test_extensions?  Its > Makefile has a NO_LOCALE, but it has no ENCODING set. I think that was an oversight -- as you point out, the Makefile doesn't set ENCODING, so the meson.build does

Re: Add index scan progress to pg_stat_progress_vacuum

2023-07-05 Thread Masahiko Sawada
On Thu, Jul 6, 2023 at 11:15 AM Michael Paquier wrote: > > On Thu, Jul 06, 2023 at 11:07:14AM +0900, Masahiko Sawada wrote: > > Thank you for updating the patch. It looks good to me too. I've > > updated the commit message. > > Thanks. I was planning to review this patch today and/or tomorrow

Re: MERGE ... RETURNING

2023-07-05 Thread Gurjeet Singh
On Sat, Jul 1, 2023 at 4:08 AM Dean Rasheed wrote: > > On Mon, 13 Mar 2023 at 13:36, Dean Rasheed wrote: > > > > And another rebase. > > > > I ran out of cycles to pursue the MERGE patches in v16, but hopefully > I can make more progress in v17. > > Looking at this one with fresh eyes, it looks

Re: [PATCH] Reuse Workers and Replication Slots during Logical Replication

2023-07-05 Thread Amit Kapila
On Wed, Jul 5, 2023 at 1:48 AM Melih Mutlu wrote: > > Hayato Kuroda (Fujitsu) , 4 Tem 2023 Sal, > 08:42 tarihinde şunu yazdı: > > > > But in the later patch the tablesync worker tries to reuse the slot > > > > during the > > > > synchronization, so in this case the application_name should be

Re: Should we remove db_user_namespace?

2023-07-05 Thread Nathan Bossart
On Thu, Jul 06, 2023 at 08:21:18AM +0900, Michael Paquier wrote: > Removing the GUC from this table is kind of annoying. Cannot this be > handled like default_with_oids or ssl_renegotiation_limit to avoid any > kind of issues with the reload of dump files and the kind? Ah, good catch. --

Re: contrib/pg_freespacemap first check input argument, then relation_open.

2023-07-05 Thread Julien Rouhaud
Hi, On Thu, Jul 06, 2023 at 10:14:46AM +0800, jian he wrote: > > In: > https://git.postgresql.org/cgit/postgresql.git/tree/contrib/pg_freespacemap/pg_freespacemap.c > > rel = relation_open(relid, AccessShareLock); > > if (blkno < 0 || blkno > MaxBlockNumber) > ereport(ERROR, >

Re: test_extensions: fix inconsistency between meson.build and Makefile

2023-07-05 Thread Michael Paquier
On Sat, Jun 17, 2023 at 07:40:18AM -0700, Gurjeet Singh wrote: > So attached is updated patch that makes the order consistent across > all 3 occurrences. There is no need to update unaccent since 44e73a4. --- a/src/test/modules/test_extensions/meson.build +++

Re: Add index scan progress to pg_stat_progress_vacuum

2023-07-05 Thread Michael Paquier
On Thu, Jul 06, 2023 at 11:07:14AM +0900, Masahiko Sawada wrote: > Thank you for updating the patch. It looks good to me too. I've > updated the commit message. Thanks. I was planning to review this patch today and/or tomorrow now that my stack of things to do is getting slightly lower

contrib/pg_freespacemap first check input argument, then relation_open.

2023-07-05 Thread jian he
Hi. In: https://git.postgresql.org/cgit/postgresql.git/tree/contrib/pg_freespacemap/pg_freespacemap.c rel = relation_open(relid, AccessShareLock); if (blkno < 0 || blkno > MaxBlockNumber) ereport(ERROR, (errcode(ERRCODE_INVALID_PARAMETER_VALUE), errmsg("invalid block number")));

Re: Add index scan progress to pg_stat_progress_vacuum

2023-07-05 Thread Masahiko Sawada
On Wed, Apr 12, 2023 at 9:22 PM Imseih (AWS), Sami wrote: > > > This should be OK (also checked the code paths where the reports are > > added). Note that the patch needed a few adjustments for its > > indentation. > > Thanks for the formatting corrections! This looks good to me. Thank you for

Re: doc: improve the restriction description of using indexes on REPLICA IDENTITY FULL table.

2023-07-05 Thread Masahiko Sawada
On Thu, Jul 6, 2023 at 7:58 AM Peter Smith wrote: > > On Wed, Jul 5, 2023 at 4:32 PM Masahiko Sawada wrote: > > > > On Wed, Jul 5, 2023 at 2:46 PM Amit Kapila wrote: > > > > > > On Wed, Jul 5, 2023 at 9:01 AM Peter Smith wrote: > > > > > > > > Hi. Here are some review comments for this patch.

Re: Add PQsendSyncMessage() to libpq

2023-07-05 Thread Anton Kirilov
Hello, On 05/07/2023 21:45, Daniel Gustafsson wrote: Please rebase and send an updated version. Here it is (including the warning fix). Thanks, Anton KirilovFrom 3c2e064a151568830e4d9e4bf238739b458350b4 Mon Sep 17 00:00:00 2001 From: Anton Kirilov Date: Wed, 22 Mar 2023 20:39:57 +

Re: Autogenerate some wait events code and documentation

2023-07-05 Thread Michael Paquier
On Wed, Jul 05, 2023 at 02:59:39PM -0700, Andres Freund wrote: > Rebasing a patch over this I was a bit confused because I got a bunch of > ""unable to parse wait_event_names.txt" errors. Took me a while to figure out > that that was just because I didn't include a trailing . in the description. >

Re: pg_upgrade and cross-library upgrades

2023-07-05 Thread Michael Paquier
On Wed, Jul 05, 2023 at 07:03:56AM -0400, Tom Lane wrote: > Alvaro Herrera writes: > > 002_pg_upgrade.pl can test for presence or absence of pgcrypto by > > grepping pg_config --configure for --with-ssl or --with-openssl. If the > > old cluster has it but the new doesn't, we must drop the > >

Re: Consider \v to the list of whitespace characters in the parser

2023-07-05 Thread Michael Paquier
On Tue, Jul 04, 2023 at 09:28:21AM +0900, Michael Paquier wrote: > Yeah, thanks. I have looked again at that this morning, and did not notice any missing spots, so applied.. Let's see how it goes. -- Michael signature.asc Description: PGP signature

Re: Should we remove db_user_namespace?

2023-07-05 Thread Michael Paquier
On Wed, Jul 05, 2023 at 02:29:27PM -0700, Nathan Bossart wrote: > }, > - { > - {"db_user_namespace", PGC_SIGHUP, CONN_AUTH_AUTH, > - gettext_noop("Enables per-database user names."), > - NULL > - }, > -

Re: Wrong syntax in feature description

2023-07-05 Thread Peter Smith
On Wed, Jul 5, 2023 at 5:37 PM Daniel Gustafsson wrote: > > > On 4 Jun 2023, at 18:48, Amit Kapila wrote: > > > > On Fri, Jun 2, 2023 at 7:01 PM Peter Smith wrote: > >> > >> Hi, I noticed a feature description [1] referring to a command example: > >> > >> CREATE PUBLICATION ... FOR ALL TABLES

Re: doc: improve the restriction description of using indexes on REPLICA IDENTITY FULL table.

2023-07-05 Thread Peter Smith
On Wed, Jul 5, 2023 at 4:32 PM Masahiko Sawada wrote: > > On Wed, Jul 5, 2023 at 2:46 PM Amit Kapila wrote: > > > > On Wed, Jul 5, 2023 at 9:01 AM Peter Smith wrote: > > > > > > Hi. Here are some review comments for this patch. > > > > > > +1 for the patch idea. > > > > > > -- > > > > > > I

Re: [PoC] Federated Authn/z with OAUTHBEARER

2023-07-05 Thread Thomas Munro
On Thu, Jul 6, 2023 at 9:00 AM Jacob Champion wrote: > My goal is to maintain compatibility with existing PQconnectPoll() > applications, where the only way we get to communicate with the client > is through the PQsocket() for the connection. Ideally, you shouldn't > have to completely rewrite

Re: pgsql: Clean up role created in new subscription test.

2023-07-05 Thread Daniel Gustafsson
> On 16 May 2023, at 11:17, Daniel Gustafsson wrote: > Parked in the July CF for now. Rebased to fix a trivial conflict highlighted by the CFBot. -- Daniel Gustafsson v3-0001-pg_regress-Add-database-verification-test.patch Description: Binary data

Re: Autogenerate some wait events code and documentation

2023-07-05 Thread Andres Freund
Hi, On 2023-07-05 10:57:19 +0900, Michael Paquier wrote: > With all that in place, VPATH builds, the CI, meson, configure/make > and the various cleanup targets were working fine, so I have applied > it. Now let's see what the buildfarm tells. > > The final --stat number is like that: > 22

[BUG] Fix DETACH with FK pointing to a partitioned table fails

2023-07-05 Thread Jehan-Guillaume de Rorthais
Hi, (patch proposal below). Consider a table with a FK pointing to a partitioned table. CREATE TABLE p ( id bigint PRIMARY KEY ) PARTITION BY list (id); CREATE TABLE p_1 PARTITION OF p FOR VALUES IN (1); CREATE TABLE r_1 ( id bigint PRIMARY KEY, p_id bigint NOT NULL,

Re: Should we remove db_user_namespace?

2023-07-05 Thread Nathan Bossart
On Mon, Jul 03, 2023 at 04:20:39PM +0900, Michael Paquier wrote: > I am on the side of +1'ing for the removal. Here is a rebased version of the patch. So far no one has responded to the pgsql-general thread [0], and no one here has argued for keeping this parameter. I'm planning to bump the

Re: Fix last unitialized memory warning

2023-07-05 Thread Tristan Partin
On Mon Jul 3, 2023 at 1:19 AM CDT, Peter Eisentraut wrote: > On 07.06.23 16:31, Tristan Partin wrote: > > This patch is really not necessary from a functional point of view. It > > is only necessary if we want to silence a compiler warning. > > > > Tested on `gcc (GCC) 13.1.1 20230511 (Red Hat

Re: [PoC] Federated Authn/z with OAUTHBEARER

2023-07-05 Thread Jacob Champion
On Fri, Jun 30, 2023 at 9:29 PM Thomas Munro wrote: > > On Sat, May 20, 2023 at 10:01 AM Jacob Champion > wrote: > > - The client implementation is currently epoll-/Linux-specific. I think > > kqueue shouldn't be too much trouble for the BSDs, but it's even more > > code to maintain. > > I

Re: BUG #17946: LC_MONETARY & DO LANGUAGE plperl - BUG

2023-07-05 Thread Tristan Partin
Someday I will learn... Attached is the v2. -- Tristan Partin Neon (https://neon.tech) From 5688bc2b2c6331f437a72b6a429199c5416ccd76 Mon Sep 17 00:00:00 2001 From: Tristan Partin Date: Fri, 30 Jun 2023 09:31:04 -0500 Subject: [PATCH v2 1/3] Skip checking for uselocale on Windows Windows

Re: BUG #17946: LC_MONETARY & DO LANGUAGE plperl - BUG

2023-07-05 Thread Tristan Partin
On Mon Jul 3, 2023 at 9:42 AM CDT, Tristan Partin wrote: > Thanks for your patience. Attached is a patch that should cover all the > problematic use cases of setlocale(). There are some setlocale() calls in > tests, initdb, and ecpg left. I plan to get to ecpglib before the final > version of this

Re: Add PQsendSyncMessage() to libpq

2023-07-05 Thread Daniel Gustafsson
> On 21 May 2023, at 19:17, Anton Kirilov wrote: > .. here is an updated version of the patch This hunk here: - if (PQflush(conn) < 0) + const int ret = flags & PG_PIPELINEPUTSYNC_FLUSH ? PQflush(conn) : 0; + + if (ret < 0) ..is causing this compiler warning: fe-exec.c: In

Re: Including a sample Table Access Method with core code

2023-07-05 Thread Fabrízio de Royes Mello
> > > Included Mark Dilger directly to this mail as he mentioned he has a > > Perl script that makes a functional copy of heap AM that can be > > compiled as installed as custom AM. > > Similar discussion has happened in 640c198 related to the creation of > dummy_index_am, where the argument is

Re: [PATCH] Honor PG_TEST_NOCLEAN for tempdirs

2023-07-05 Thread Jacob Champion
On Sun, Jul 2, 2023 at 6:17 PM Michael Paquier wrote: > Adjusted that as well, on top of an extra comment. Thanks all! --Jacob

Re: Disabling Heap-Only Tuples

2023-07-05 Thread Laurenz Albe
On Wed, 2023-07-05 at 12:02 +0100, Thom Brown wrote: > On Wed, 5 Jul 2023 at 11:57, Matthias van de Meent > wrote: > > On Wed, 5 Jul 2023 at 12:45, Thom Brown wrote: > > > Heap-Only Tuple (HOT) updates are a significant performance > > > enhancement, as they prevent unnecessary page writes.

Re: Allow specifying a dbname in pg_basebackup connection string

2023-07-05 Thread Jelte Fennema
On Wed, 5 Jul 2023 at 20:09, Thom Brown wrote: > Okay, understood. In that case, please remember to write changes to > the pg_basebackup docs page explaining how the dbname value is ignored I updated the wording in the docs for pg_basebackup and pg_receivewal. They now clarify that Postgres

Re: brininsert optimization opportunity

2023-07-05 Thread Soumyadeep Chakraborty
On Wed, Jul 5, 2023 at 3:16 AM Tomas Vondra wrote: > > I'll try this out and introduce a couple of new index AM callbacks. I > > think it's best to do it before releasing the locks - otherwise it > > might be weird > > to manipulate buffers of an index relation, without having some sort of > >

Re: Allow specifying a dbname in pg_basebackup connection string

2023-07-05 Thread Thom Brown
On Wed, 5 Jul 2023 at 16:50, Jelte Fennema wrote: > > On Wed, 5 Jul 2023 at 16:01, Euler Taveira wrote: > > One of the PgBouncer's missions is to be a transparent proxy. > > > > Sometimes you cannot reach out the database directly due to a security > > policy. > > Indeed the transparent proxy

Re: Disabling Heap-Only Tuples

2023-07-05 Thread Thom Brown
On Wed, 5 Jul 2023 at 18:05, Matthias van de Meent wrote: > > On Wed, 5 Jul 2023 at 14:39, Thom Brown wrote: > > > > On Wed, 5 Jul 2023 at 13:12, Matthias van de Meent > > wrote: > > > > > > On Wed, 5 Jul 2023 at 13:03, Thom Brown wrote: > > > > > > > > On Wed, 5 Jul 2023 at 11:57, Matthias

Re: logicalrep_message_type throws an error

2023-07-05 Thread Alvaro Herrera
On 2023-Jul-05, Alvaro Herrera wrote: > On 2023-Jul-05, Euler Taveira wrote: > > > Isn't this numerical value already exposed in the error message (X = 88)? > > In this example, it is: > > > > ERROR: invalid logical replication message type "X" > > CONTEXT: processing remote data for

Re: Disabling Heap-Only Tuples

2023-07-05 Thread Matthias van de Meent
On Wed, 5 Jul 2023 at 14:39, Thom Brown wrote: > > On Wed, 5 Jul 2023 at 13:12, Matthias van de Meent > wrote: > > > > On Wed, 5 Jul 2023 at 13:03, Thom Brown wrote: > > > > > > On Wed, 5 Jul 2023 at 11:57, Matthias van de Meent > > > wrote: > > > > > > > > On Wed, 5 Jul 2023 at 12:45, Thom

Re: logicalrep_message_type throws an error

2023-07-05 Thread Alvaro Herrera
On 2023-Jul-05, Euler Taveira wrote: > Isn't this numerical value already exposed in the error message (X = 88)? > In this example, it is: > > ERROR: invalid logical replication message type "X" > CONTEXT: processing remote data for replication origin "pg_16638" during > message type "???

Re: [PATCH] Add GitLab CI to PostgreSQL

2023-07-05 Thread Matthias van de Meent
On Wed, 5 Jul 2023 at 15:22, Andrew Dunstan wrote: > > > On 2023-07-04 Tu 19:44, Newhouse, Robin wrote: > > > Hello! > > > > I propose the attached patch to be applied on the 'master' branch > > of PostgreSQL to add GitLab CI automation alongside Cirrus CI in the > > PostgreSQL repository. Can

Re: Allow specifying a dbname in pg_basebackup connection string

2023-07-05 Thread Jelte Fennema
On Wed, 5 Jul 2023 at 16:01, Euler Taveira wrote: > One of the PgBouncer's missions is to be a transparent proxy. > > Sometimes you cannot reach out the database directly due to a security policy. Indeed the transparent proxy use case is where replication through pgbouncer makes sense. There's

Re: logical decoding and replication of sequences, take 2

2023-07-05 Thread Ashutosh Bapat
And the last patch 0008. @@ -1180,6 +1194,13 @@ AlterSubscription(ParseState *pstate, AlterSubscriptionStmt *stmt, ... snip ... +if (IsSet(opts.specified_opts, SUBOPT_SEQUENCES)) +{ +values[Anum_pg_subscription_subsequences - 1] = +

Re: logical decoding and replication of sequences, take 2

2023-07-05 Thread Ashutosh Bapat
0005, 0006 and 0007 are all related to the initial sequence sync. [3] resulted in 0007 and I think we need it. That leaves 0005 and 0006 to be reviewed in this response. I followed the discussion starting [1] till [2]. The second one mentions the interlock mechanism which has been implemented in

Re: pg_column_toast_chunk_id: a function to get a chunk ID of a TOASTed value

2023-07-05 Thread Nikita Malakhov
Hi! I like the idea of having a standard function which shows a TOAST value ID for a row. I've used my own to handle TOAST errors. Just, maybe, more correct name would be "...value_id", because you actually retrieve valueid field from the TOAST pointer, and chunk ID consists of valueid +

Re: Doc limitation update proposal: include out-of-line OID usage per TOAST-ed columns

2023-07-05 Thread Jakub Wartak
On Tue, Jun 13, 2023 at 10:20 AM John Naylor wrote: Hi John, v3 is attached for review. > > > >- > >+ see note below on TOAST > > Maybe: > "further limited by the number of TOAST-ed values; see note below" Fixed. > > I've wrongly put it, I've meant that pg_largeobject also

Re: Parallel CREATE INDEX for BRIN indexes

2023-07-05 Thread Matthias van de Meent
On Wed, 5 Jul 2023 at 00:08, Tomas Vondra wrote: > > > > On 7/4/23 23:53, Matthias van de Meent wrote: > > On Thu, 8 Jun 2023 at 14:55, Tomas Vondra > > wrote: > >> > >> Hi, > >> > >> Here's a WIP patch allowing parallel CREATE INDEX for BRIN indexes. The > >> infrastructure (starting workers

Re: Removing unneeded self joins

2023-07-05 Thread Andrey Lepikhov
Hi, During the significant code revision in v.41 I lost some replacement operations. Here is the fix and extra tests to check this in the future. Also, Tom added the JoinDomain structure five months ago, and I added code to replace relids for that place too. One more thing, I found out that we

Re: logicalrep_message_type throws an error

2023-07-05 Thread Ashutosh Bapat
On Wed, Jul 5, 2023 at 7:07 PM Euler Taveira wrote: > > On Wed, Jul 5, 2023, at 7:56 AM, Alvaro Herrera wrote: > > On 2023-Jul-05, Amit Kapila wrote: > > > I think after returning "???" from logicalrep_message_type(), the > > above is possible when we get the error: "invalid logical replication >

Re: Prevent psql \watch from running queries that return no rows

2023-07-05 Thread Greg Sabino Mullane
Thanks for the feedback! On Wed, Jul 5, 2023 at 5:51 AM Daniel Gustafsson wrote: > > The comment on ExecQueryAndProcessResults() needs to be updated with an > explanation of what this parameter is. > I added a comment in the place where min_rows is used, but not sure what you mean by adding it

Re: Allow specifying a dbname in pg_basebackup connection string

2023-07-05 Thread Euler Taveira
On Wed, Jul 5, 2023, at 9:43 AM, Thom Brown wrote: > I guess my immediate question is, should backups be taken through > PgBouncer? It seems beyond PgBouncer's remit. One of the PgBouncer's missions is to be a transparent proxy. Sometimes you cannot reach out the database directly due to a

Re: pg_decode_message vs skip_empty_xacts and xact_wrote_changes

2023-07-05 Thread Ashutosh Bapat
On Wed, Jul 5, 2023 at 2:29 PM Amit Kapila wrote: > > On Wed, Jul 5, 2023 at 2:28 PM Amit Kapila wrote: > > > > On Mon, Jul 3, 2023 at 4:49 PM vignesh C wrote: > > > > > > +1 for the first version patch, I also felt the first version is > > > easily understandable. > > > > > > > Okay, please

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

2023-07-05 Thread Aleksander Alekseev
Hi, > Reviewing this now. I think it's almost ready to be committed. > > There's another big effort going on to move SLRUs to the regular buffer > cache (https://commitfest.postgresql.org/43/3514/). I wonder how moving > to 64 bit page numbers will affect that. BlockNumber is still 32 bits, >

Re: logicalrep_message_type throws an error

2023-07-05 Thread Euler Taveira
On Wed, Jul 5, 2023, at 7:56 AM, Alvaro Herrera wrote: > On 2023-Jul-05, Amit Kapila wrote: > > > I think after returning "???" from logicalrep_message_type(), the > > above is possible when we get the error: "invalid logical replication > > message type "X"" from apply_dispatch(), right? If so,

Re: [PATCH] Add GitLab CI to PostgreSQL

2023-07-05 Thread Andrew Dunstan
On 2023-07-04 Tu 19:44, Newhouse, Robin wrote: Hello! I propose the attached patch to be applied on the 'master' branch of PostgreSQL to add GitLab CI automation alongside Cirrus CI in the PostgreSQL repository. It is not intended to be a replacement for Cirrus CI, but simply suggestion

Re: pg_basebackup check vs Windows file path limits

2023-07-05 Thread Andrew Dunstan
On 2023-07-04 Tu 16:54, Daniel Gustafsson wrote: On 4 Jul 2023, at 20:19, Andrew Dunstan wrote: But sadly we're kinda back where we started. fairywren is failing on REL_16_STABLE. Before the changes the failure occurred because the test script was unable to create the file with a path > 255.

Re: logicalrep_message_type throws an error

2023-07-05 Thread Amit Kapila
On Wed, Jul 5, 2023 at 4:26 PM Alvaro Herrera wrote: > > On 2023-Jul-05, Amit Kapila wrote: > > > I think after returning "???" from logicalrep_message_type(), the > > above is possible when we get the error: "invalid logical replication > > message type "X"" from apply_dispatch(), right? If so,

Re: Allow specifying a dbname in pg_basebackup connection string

2023-07-05 Thread Thom Brown
On Mon, 3 Jul 2023 at 13:23, Jelte Fennema wrote: > > Normally it doesn't really matter which dbname is used in the connection > string that pg_basebackup and other physical replication CLI tools use. > The reason being, that physical replication does not work at the > database level, but instead

Re: Disabling Heap-Only Tuples

2023-07-05 Thread Thom Brown
On Wed, 5 Jul 2023 at 13:12, Matthias van de Meent wrote: > > On Wed, 5 Jul 2023 at 13:03, Thom Brown wrote: > > > > On Wed, 5 Jul 2023 at 11:57, Matthias van de Meent > > wrote: > > > > > > On Wed, 5 Jul 2023 at 12:45, Thom Brown wrote: > > > > Heap-Only Tuple (HOT) updates are a significant

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

2023-07-05 Thread Heikki Linnakangas
On 09/03/2023 17:21, Aleksander Alekseev wrote: v57-0001-Index-SLRUs-by-64-bit-integers-rather-than-by-32.patch Reviewing this now. I think it's almost ready to be committed. There's another big effort going on to move SLRUs to the regular buffer cache

Re: Extension Enhancement: Buffer Invalidation in pg_buffercache

2023-07-05 Thread Nitin Jadhav
+1 for the idea. It's going to be more useful to test and understand the buffer management of PostgreSQL and it can be used to explicitly free up the buffers if there are any such requirements. I had a quick look over the patch. Following are the comments. First, The TryInvalidateBuffer() tries

Re: Disabling Heap-Only Tuples

2023-07-05 Thread Matthias van de Meent
On Wed, 5 Jul 2023 at 13:03, Thom Brown wrote: > > On Wed, 5 Jul 2023 at 11:57, Matthias van de Meent > wrote: > > > > On Wed, 5 Jul 2023 at 12:45, Thom Brown wrote: > > > Heap-Only Tuple (HOT) updates are a significant performance > > > enhancement, as they prevent unnecessary page writes.

Re: [PoC] Improve dead tuple storage for lazy vacuum

2023-07-05 Thread John Naylor
On Tue, Jul 4, 2023 at 12:49 PM Masahiko Sawada wrote: > > As you mentioned, the 1-byte value is embedded into 8 byte so 7 bytes > are unused, but we use less memory since we use less slab contexts and > save fragmentations. Thanks for testing. This tree is sparse enough that most of the space

Re: Parallel CREATE INDEX for BRIN indexes

2023-07-05 Thread Tomas Vondra
On 7/5/23 10:44, Matthias van de Meent wrote: > On Wed, 5 Jul 2023 at 00:08, Tomas Vondra > wrote: >> >> >> >> On 7/4/23 23:53, Matthias van de Meent wrote: >>> On Thu, 8 Jun 2023 at 14:55, Tomas Vondra >>> wrote: Hi, Here's a WIP patch allowing parallel CREATE INDEX for

Re: pg_upgrade and cross-library upgrades

2023-07-05 Thread Tom Lane
Alvaro Herrera writes: > 002_pg_upgrade.pl can test for presence or absence of pgcrypto by > grepping pg_config --configure for --with-ssl or --with-openssl. If the > old cluster has it but the new doesn't, we must drop the > contrib_regression_pgcrypto database. Hmm, but you'd also need code

Re: Disabling Heap-Only Tuples

2023-07-05 Thread Thom Brown
On Wed, 5 Jul 2023 at 11:57, Matthias van de Meent wrote: > > On Wed, 5 Jul 2023 at 12:45, Thom Brown wrote: > > Heap-Only Tuple (HOT) updates are a significant performance > > enhancement, as they prevent unnecessary page writes. However, HOT > > comes with a caveat: it means that if we have

Re: Disabling Heap-Only Tuples

2023-07-05 Thread Matthias van de Meent
On Wed, 5 Jul 2023 at 12:45, Thom Brown wrote: > Heap-Only Tuple (HOT) updates are a significant performance > enhancement, as they prevent unnecessary page writes. However, HOT > comes with a caveat: it means that if we have lots of available space > earlier on in the relation, it can only be

Re: logicalrep_message_type throws an error

2023-07-05 Thread Alvaro Herrera
On 2023-Jul-05, Amit Kapila wrote: > I think after returning "???" from logicalrep_message_type(), the > above is possible when we get the error: "invalid logical replication > message type "X"" from apply_dispatch(), right? If so, then what about > the case when we forgot to handle some message

Disabling Heap-Only Tuples

2023-07-05 Thread Thom Brown
Hi, Heap-Only Tuple (HOT) updates are a significant performance enhancement, as they prevent unnecessary page writes. However, HOT comes with a caveat: it means that if we have lots of available space earlier on in the relation, it can only be used for new tuples or in cases where there's

Re: doc: improve the restriction description of using indexes on REPLICA IDENTITY FULL table.

2023-07-05 Thread Amit Kapila
On Wed, Jul 5, 2023 at 12:02 PM Masahiko Sawada wrote: > > On Wed, Jul 5, 2023 at 2:46 PM Amit Kapila wrote: > > > > On Wed, Jul 5, 2023 at 9:01 AM Peter Smith wrote: > > > > > > Hi. Here are some review comments for this patch. > > > > > > +1 for the patch idea. > > > > > > -- > > > > > >

Re: Missing llvm_leave_fatal_on_oom() call

2023-07-05 Thread Heikki Linnakangas
On 04/07/2023 19:33, Daniel Gustafsson wrote: On 21 Feb 2023, at 15:50, Heikki Linnakangas wrote: llvm_release_context() calls llvm_enter_fatal_on_oom(), but it never calls llvm_leave_fatal_on_oom(). Isn't that a clear leak? Not sure how much of a leak it is since IIUC LLVM just stores a

Re: brininsert optimization opportunity

2023-07-05 Thread Tomas Vondra
On 7/5/23 02:35, Soumyadeep Chakraborty wrote: > On Tue, Jul 4, 2023 at 2:54 PM Tomas Vondra > wrote: > >> I'm not sure if memory context callbacks are the right way to rely on >> for this purpose. The primary purpose of memory contexts is to track >> memory, so using them for this seems a

Re: Prevent psql \watch from running queries that return no rows

2023-07-05 Thread Daniel Gustafsson
> On 4 Jun 2023, at 20:55, Greg Sabino Mullane wrote: > > On Sat, Jun 3, 2023 at 5:58 PM Michael Paquier wrote: > > Wouldn't something like a target_rows be more flexible? You could use > this parameter with a target number of rows to expect, zero being one > choice in that. > > Thank you!

Re: Speed up transaction completion faster after many relations are accessed in a transaction

2023-07-05 Thread Heikki Linnakangas
On 10/02/2023 04:51, David Rowley wrote: I've attached another set of patches. I do need to spend longer looking at this. I'm mainly attaching these as CI seems to be highlighting a problem that I'm unable to recreate locally and I wanted to see if the attached fixes it. I like this patch's

CHECK Constraint Deferrable

2023-07-05 Thread Himanshu Upadhyaya
Hi, Currently, there is no support for CHECK constraint DEFERRABLE in a create table statement. SQL standard specifies that CHECK constraint can be defined as DEFERRABLE. The attached patch is having implementation for CHECK constraint Deferrable as below: ‘postgres[579453]=#’CREATE TABLE t1 (i

Re: pg_waldump: add test for coverage

2023-07-05 Thread Peter Eisentraut
On 29.06.23 21:16, Tristen Raab wrote: I've reviewed your latest v3 patches on Ubuntu 23.04. Both patches apply correctly and all the tests run and pass as they should. Execution time was normal for me, I didn't notice any significant latency when compared to other tests. The only other

Re: pg_decode_message vs skip_empty_xacts and xact_wrote_changes

2023-07-05 Thread Amit Kapila
On Wed, Jul 5, 2023 at 2:28 PM Amit Kapila wrote: > > On Mon, Jul 3, 2023 at 4:49 PM vignesh C wrote: > > > > +1 for the first version patch, I also felt the first version is > > easily understandable. > > > > Okay, please find the slightly updated version (changed a comment and > commit

Re: pg_decode_message vs skip_empty_xacts and xact_wrote_changes

2023-07-05 Thread Amit Kapila
On Mon, Jul 3, 2023 at 4:49 PM vignesh C wrote: > > +1 for the first version patch, I also felt the first version is > easily understandable. > Okay, please find the slightly updated version (changed a comment and commit message). Unless there are more comments, I'll push this in a day or two.

Re: pg_upgrade and cross-library upgrades

2023-07-05 Thread Alvaro Herrera
On 2023-Jul-05, Michael Paquier wrote: > The same thing as HEAD could be done on its back-branches by removing > --with-openssl and bring more consistency, but pg_upgrade has never > been good at handling upgrades with different library requirements. > Something I am wondering is if

Re: Parallel CREATE INDEX for BRIN indexes

2023-07-05 Thread Matthias van de Meent
On Wed, 5 Jul 2023 at 00:08, Tomas Vondra wrote: > > > > On 7/4/23 23:53, Matthias van de Meent wrote: > > On Thu, 8 Jun 2023 at 14:55, Tomas Vondra > > wrote: > >> > >> Hi, > >> > >> Here's a WIP patch allowing parallel CREATE INDEX for BRIN indexes. The > >> infrastructure (starting workers

Re: Wrong syntax in feature description

2023-07-05 Thread Daniel Gustafsson
> On 4 Jun 2023, at 18:48, Amit Kapila wrote: > > On Fri, Jun 2, 2023 at 7:01 PM Peter Smith wrote: >> >> Hi, I noticed a feature description [1] referring to a command example: >> >> CREATE PUBLICATION ... FOR ALL TABLES IN SCHEMA >> >> ~~ >> >> AFAIK that should say "FOR TABLES IN

Re: evtcache: EventTriggerCache vs Event Trigger Cache

2023-07-05 Thread Daniel Gustafsson
> On 8 May 2023, at 10:39, Daniel Gustafsson wrote: >> On 4 May 2023, at 14:18, Daniel Gustafsson wrote: >>> On 4 May 2023, at 14:09, Tom Lane wrote: >>> How about naming >>> the hash "EventTriggerCacheHash" or so? >> >> I think the level is the indicator here, but I have no strong opinions,

Re: [PATCH] Add loongarch native checksum implementation.

2023-07-05 Thread John Naylor
On Wed, Jul 5, 2023 at 9:16 AM YANG Xudong wrote: > > Is there any other comment? It's only been a few weeks since the last patch, and this is not an urgent bugfix, so there is no reason to ping the thread. Feature freeze will likely be in April of next year. Also, please don't top-post (which

Re: On /*----- comments

2023-07-05 Thread Heikki Linnakangas
On 04/07/2023 21:36, Tom Lane wrote: Heikki Linnakangas writes: Pushed a patch to remove the end-guard from the example in the pgindent README. And fixed the bogus end-guard in walsender.c. I don't see any actual push? Forgot it after all. Pushed now, thanks. -- Heikki Linnakangas Neon

Re: Subscription statistics are not dropped at DROP SUBSCRIPTION in some cases

2023-07-05 Thread Masahiko Sawada
On Mon, Jun 19, 2023 at 12:37 PM Amit Kapila wrote: > > On Mon, Jun 19, 2023 at 6:50 AM Masahiko Sawada wrote: > > > > On Sat, Jun 17, 2023 at 6:45 PM Amit Kapila wrote: > > > > > > On Tue, May 16, 2023 at 8:00 PM Masahiko Sawada > > > wrote: > > > > > > > > On Thu, May 11, 2023 at 5:12 PM

Re: pg_upgrade and cross-library upgrades

2023-07-05 Thread Michael Paquier
On Wed, Jul 05, 2023 at 06:00:25PM +1200, Thomas Munro wrote: > If this were my animal and if the hardware couldn't be > upgraded to a modern distro for technical reasons like a de-supported > architecture, I would now disable HEAD, or more likely give the whole > machine a respectful send-off

Re: Add more sanity checks around callers of changeDependencyFor()

2023-07-05 Thread Michael Paquier
On Thu, Jun 29, 2023 at 10:06:35AM +0300, Heikki Linnakangas wrote: > The error messages like "failed to change schema dependency for extension" > don't conform to the usual error message style. "could not change schema > dependency for extension" would be more conformant. I see that you >

Re: doc: improve the restriction description of using indexes on REPLICA IDENTITY FULL table.

2023-07-05 Thread Masahiko Sawada
On Wed, Jul 5, 2023 at 2:46 PM Amit Kapila wrote: > > On Wed, Jul 5, 2023 at 9:01 AM Peter Smith wrote: > > > > Hi. Here are some review comments for this patch. > > > > +1 for the patch idea. > > > > -- > > > > I wasn't sure about the code comment adjustments suggested by Amit [1]: > >

Re: Incremental sort for access method with ordered scan support (amcanorderbyop)

2023-07-05 Thread Richard Guo
On Tue, Jul 4, 2023 at 7:15 PM David Rowley wrote: > On Tue, 4 Jul 2023 at 20:12, Richard Guo wrote: > > The v4 patch looks good to me (maybe some cosmetic tweaks are still > > needed for the comments). I think it's now 'Ready for Committer'. > > I agree. I went and hit the comments with a

Dumping policy on a table belonging to an extension is expected?

2023-07-05 Thread Amul Sul
Hi, I have a ROW LEVEL SECURITY policy on the table part of an extension, and while dumping the database where that extension is installed, dumps the policy of that table too even though not dumpling that table . Here is quick tests, where I have added following SQL to adminpack--1.0.sql

Re: pg_upgrade and cross-library upgrades

2023-07-05 Thread Thomas Munro
On Wed, Jul 5, 2023 at 4:29 PM Michael Paquier wrote: > Thoughts? I am grateful for all the bug discoveries that these Debian 7 animals provided in their time, but at this point we're unlikely to learn things that are useful to our mission from them. It costs our community time to talk about