Re: Handle infinite recursion in logical replication setup

2022-03-15 Thread vignesh C
On Tue, Mar 15, 2022 at 9:55 AM kuroda.hay...@fujitsu.com wrote: > > Dear Vignesh, > > > Thanks for kind explanation. > > I read above and your doc in 0002, and I put some comments. > > I forgot a comment about 0002 doc. > > 5. create_subscription.sgml - about your example > > Three possibilities

Re: Handle infinite recursion in logical replication setup

2022-03-15 Thread vignesh C
On Tue, Mar 15, 2022 at 7:09 AM kuroda.hay...@fujitsu.com wrote: > > Dear Vignesh, > > Thank you for updating your patch! > > > Let's consider an existing Multi master logical replication setup > > between Node1 and Node2 that is created using the following steps: > > a) Node1 - Publication

Re: USE_BARRIER_SMGRRELEASE on Linux?

2022-03-15 Thread Thomas Munro
On Sat, Feb 19, 2022 at 7:01 AM Nathan Bossart wrote: > Here is a new patch. This is essentially the same as v1, but I've spruced > up the comments and the commit message. Hi Nathan, Pushed and back-patched (it's slightly different before 12). Thanks!

Re: Corruption during WAL replay

2022-03-15 Thread Kyotaro Horiguchi
At Tue, 15 Mar 2022 12:44:49 -0400, Robert Haas wrote in > On Wed, Jan 26, 2022 at 3:25 AM Kyotaro Horiguchi > wrote: > > The attached is the fixed version and it surely works with the repro. > > Hi, > > I spent the morning working on this patch and came up with the > attached version. I

Re: Tablesync early exit

2022-03-15 Thread Amit Kapila
On Wed, Mar 16, 2022 at 1:16 AM Greg Stark wrote: > > This patch has been through five CFs without any review. It's a very > short patch and I'm assuming the only issue is that it's not clear > whether it's a good idea or not and there are few developers familiar > with this area of code? > >

Re: Tablesync early exit

2022-03-15 Thread Amit Kapila
On Mon, Aug 30, 2021 at 8:50 AM Peter Smith wrote: > > Patch v2 is the same; it only needed re-basing to the latest HEAD. > Why do you think it is correct to exit before trying to receive any message? How will we ensure whether the apply worker has processed any message? At the beginning of

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

2022-03-15 Thread Dilip Kumar
On Tue, Mar 15, 2022 at 11:09 PM Robert Haas wrote: > > On Tue, Mar 15, 2022 at 1:26 PM Ashutosh Sharma wrote: > > > On Tue, Mar 15, 2022 at 12:30 PM Ashutosh Sharma > > > wrote: > > > > Few comments on the latest patch: > > > > > > > > - /* We need to construct the pathname for

Tab completion for ALTER MATERIALIZED VIEW ... SET ACCESS METHOD

2022-03-15 Thread Yugo NAGATA
Hello hackers, SET ACCESS METHOD is supported in ALTER TABLE since the commit b0483263dd. Since that time, this also has be allowed SET ACCESS METHOD in ALTER MATERIALIZED VIEW. Although it is not documented, this works. I cannot found any reasons to prohibit SET ACCESS METHOD in ALTER

Re: Skipping logical replication transactions on subscriber side

2022-03-15 Thread Amit Kapila
On Wed, Mar 16, 2022 at 7:58 AM Amit Kapila wrote: > > On Wed, Mar 16, 2022 at 6:03 AM Masahiko Sawada wrote: > > > > On Tue, Mar 15, 2022 at 7:18 PM Amit Kapila wrote: > > > > > > On Tue, Mar 15, 2022 at 11:43 AM Masahiko Sawada > > > wrote: > > > > > > > > > > 6. > > > @@ -1583,7 +1649,8 @@

Re: Allow file inclusion in pg_hba and pg_ident files

2022-03-15 Thread Julien Rouhaud
Hi, The cfbot says that the patch doesn't apply anymore, so here's a v3 with the changes mentioned below. On Tue, Mar 01, 2022 at 05:19:50PM +0800, Julien Rouhaud wrote: > > If you prefer to interleave static and non static function I can change it. Change the split to not reorder functions. >

Re: Assert in pageinspect with NULL pages

2022-03-15 Thread Michael Paquier
On Tue, Mar 15, 2022 at 06:56:46AM -0500, Justin Pryzby wrote: > On Tue, Mar 15, 2022 at 06:32:44PM +0900, Michael Paquier wrote: >> +-- Suppress the DETAIL message, to allow the tests to work across various >> +-- default page sizes. > > I think you mean "various non-default page sizes" or

Re: Move the "DR_intorel" struct to a more suitable position

2022-03-15 Thread Julien Rouhaud
Hi, On Wed, Mar 16, 2022 at 11:16:58AM +0800, zk.wang wrote: > Generally, we should define struct in the header file(.h). But I found struct > "DR_intorel" in createas.c and it doesn't seem to be properly defined. May be > it should define in createas.h. We put struct declarations in header

Re: Move the "DR_intorel" struct to a more suitable position

2022-03-15 Thread Andres Freund
Hi, On March 15, 2022 8:16:58 PM PDT, "zk.wang" wrote: >Generally, we should define struct in the header file(.h). Why? It's perfectly sensible to define types in .c files when they're not used elsewhere. Greetings, Andres -- Sent from my Android device with K-9 Mail. Please excuse my

Move the "DR_intorel" struct to a more suitable position

2022-03-15 Thread zk.wang
Generally, we should define struct in the header file(.h). But I found struct "DR_intorel" in createas.c and it doesn't seem to be properly defined. May be it should define in createas.h. Besides, this is my first contribution.If there are any submitted questions, please let me know. Thank you~

Re: Add 64-bit XIDs into PostgreSQL 15

2022-03-15 Thread Kyotaro Horiguchi
At Tue, 15 Mar 2022 18:48:34 +0300, Maxim Orlov wrote in > Hi Kyotaro! > > 0001: > > > > The XID_FMT has quite bad impact on the translatability of error > > messages. 3286065651 has removed INT64_FORMAT from translatable > > texts for the reason. This re-introduces that in several places.

Re: BufferAlloc: don't take two simultaneous locks

2022-03-15 Thread Kyotaro Horiguchi
At Tue, 15 Mar 2022 13:47:17 +0300, Yura Sokolov wrote in > В Вт, 15/03/2022 в 16:25 +0900, Kyotaro Horiguchi пишет: > > Hmm. v8 returns stashed element with original patition index when the > > element is *not* reused. But what I saw in the previous test runs is > > the

Re: Checkpointer sync queue fills up / loops around pg_usleep() are bad

2022-03-15 Thread Thomas Munro
On Wed, Mar 2, 2022 at 10:58 AM Andres Freund wrote: > On 2022-03-02 06:46:23 +1300, Thomas Munro wrote: > > From a9344bb2fb2a363bec4be526f87560cb212ca10b Mon Sep 17 00:00:00 2001 > > From: Thomas Munro > > Date: Mon, 28 Feb 2022 11:27:05 +1300 > > Subject: [PATCH v2 1/3] Wake up for latches in

RE: Logical replication timeout problem

2022-03-15 Thread wangw.f...@fujitsu.com
On Wed, Mar 9, 2022 at 2:45 PM Masahiko Sawada wrote: > Thanks for your comments. > On Wed, Mar 9, 2022 at 10:26 AM I wrote: > > On Tue, Mar 8, 2022 at 3:52 PM Masahiko Sawada > wrote: > > > I've looked at the patch and have a question: > > Thanks for your review and comments. > > > > > +void >

Re: Skipping logical replication transactions on subscriber side

2022-03-15 Thread Amit Kapila
On Wed, Mar 16, 2022 at 7:58 AM Amit Kapila wrote: > > On Wed, Mar 16, 2022 at 6:03 AM Masahiko Sawada wrote: > > > > On Tue, Mar 15, 2022 at 7:18 PM Amit Kapila wrote: > > > > > > On Tue, Mar 15, 2022 at 11:43 AM Masahiko Sawada > > > wrote: > > > > > > > > > > 6. > > > @@ -1583,7 +1649,8 @@

Re: Skipping logical replication transactions on subscriber side

2022-03-15 Thread Amit Kapila
On Tue, Mar 15, 2022 at 7:30 PM osumi.takami...@fujitsu.com wrote: > > On Tuesday, March 15, 2022 3:13 PM Masahiko Sawada > wrote: > > I've attached an updated version patch. > > A couple of minor comments on v14. > > (1) apply_handle_commit_internal > > > + if (is_skipping_changes()) > +

Re: Skipping logical replication transactions on subscriber side

2022-03-15 Thread Amit Kapila
On Wed, Mar 16, 2022 at 6:03 AM Masahiko Sawada wrote: > > On Tue, Mar 15, 2022 at 7:18 PM Amit Kapila wrote: > > > > On Tue, Mar 15, 2022 at 11:43 AM Masahiko Sawada > > wrote: > > > > > > > 6. > > @@ -1583,7 +1649,8 @@ apply_handle_insert(StringInfo s) > > TupleTableSlot *remoteslot; > >

Re: Unhyphenation of crash-recovery

2022-03-15 Thread Andres Freund
Hi On March 15, 2022 6:25:09 PM PDT, Kyotaro Horiguchi wrote: >Hello, this is a derived topic from [1], summarized as $SUBJECT. > >This just removes useless hyphens from the words >"(crash|emergency)-recovery". We don't have such wordings for "archive >recovery" This patch fixes non-user-facing

Re: pg_tablespace_location() failure with allow_in_place_tablespaces

2022-03-15 Thread Kyotaro Horiguchi
At Tue, 15 Mar 2022 23:16:52 +1300, Thomas Munro wrote in > On Tue, Mar 15, 2022 at 10:30 PM Michael Paquier wrote: > > So, which one of a relative path or an absolute path do you think > > would be better for the user? My preference tends toward the relative > > path, as we know that all

Re: Add checkpoint and redo LSN to LogCheckpointEnd log message

2022-03-15 Thread Kyotaro Horiguchi
At Wed, 16 Mar 2022 09:19:13 +0900 (JST), Kyotaro Horiguchi wrote in > In short, I split out the two topics other than checkpoint log to > other threads. So, this is about the main topic of this thread, adding LSNs to checkpint log. Other topics have moved to other treads [1], [2] , [3]. I

Reword "WAL location" as "WAL LSN"

2022-03-15 Thread Kyotaro Horiguchi
Uh.. Sorry, I forgot to change the subject. Resent with the correct subject. = Hello, this is a follow-up topic of [1] (add LSNs to checkpint logs). Many user-facing texts contains wording like "WAL location" or such like. The attached is WIP patches that fixes such wordings to "WAL LSN" or

Unhyphenation of crash-recovery

2022-03-15 Thread Kyotaro Horiguchi
Hello, this is a derived topic from [1], summarized as $SUBJECT. This just removes useless hyphens from the words "(crash|emergency)-recovery". We don't have such wordings for "archive recovery" This patch fixes non-user-facing texts as well as user-facing ones. regards. [1]

Re: Add checkpoint and redo LSN to LogCheckpointEnd log message

2022-03-15 Thread Kyotaro Horiguchi
Hello, this is a follow-up topic of [1] (add LSNs to checkpint logs). Many user-facing texts contains wording like "WAL location" or such like. The attached is WIP patches that fixes such wordings to "WAL LSN" or alikes. The attached patches is v13 but it is not changed at all from v12. My

Possible corruption by CreateRestartPoint at promotion

2022-03-15 Thread Kyotaro Horiguchi
Hello, (Cc:ed Fujii-san) This is a diverged topic from [1], which is summarized as $SUBJECT. To recap: While discussing on additional LSNs in checkpoint log message, Fujii-san pointed out [2] that there is a case where CreateRestartPoint leaves unrecoverable database when concurrent promotion

Re: Skipping logical replication transactions on subscriber side

2022-03-15 Thread Masahiko Sawada
On Tue, Mar 15, 2022 at 7:18 PM Amit Kapila wrote: > > On Tue, Mar 15, 2022 at 11:43 AM Masahiko Sawada > wrote: > > > > 6. > @@ -1583,7 +1649,8 @@ apply_handle_insert(StringInfo s) > TupleTableSlot *remoteslot; > MemoryContext oldctx; > > - if

Re: Add checkpoint and redo LSN to LogCheckpointEnd log message

2022-03-15 Thread Kyotaro Horiguchi
At Tue, 15 Mar 2022 18:26:26 +0900, Michael Paquier wrote in > On Tue, Mar 15, 2022 at 05:23:40PM +0900, Kyotaro Horiguchi wrote: > > At Tue, 15 Mar 2022 12:19:47 +0530, Bharath Rupireddy > > wrote in > >> On Fri, Mar 4, 2022 at 10:40 AM Kyotaro Horiguchi > >> wrote: > >> 0001 - I don't

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

2022-03-15 Thread Jacob Champion
On Tue, 2022-03-15 at 21:41 +, Jacob Champion wrote: > Sounds good. I'll work on adding tests for the current behavior, and if > the committers don't like it, we can change it. Done in v7, attached. --Jacob commit 51052e322f4d4e4f75d3cf3d000a363244696013 Author: Jacob Champion Date: Tue

Re: document the need to analyze partitioned tables

2022-03-15 Thread Justin Pryzby
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 say whether he's OK with the > latest version

Re: Non-replayable WAL records through overflows and >MaxAllocSize lengths

2022-03-15 Thread Matthias van de Meent
Apart from registering this in CF 2022-07 last Friday, I've also just added this issue to the Open Items list for PG15 under "Older bugs affecting stable branches"; as a precaution to not lose track of this issue in the buzz of the upcoming feature freeze. -Matthias

Re: Estimating HugePages Requirements?

2022-03-15 Thread Nathan Bossart
On Tue, Mar 15, 2022 at 11:02:37PM +0100, Magnus Hagander wrote: > I think we're talking about two different things here. > > I think the "avoid extra logging" would be worth seeing if we can > address for 15. A simple approach could be to just set log_min_messages to PANIC before exiting. I've

Re: BufferAlloc: don't take two simultaneous locks

2022-03-15 Thread Yura Sokolov
В Вт, 15/03/2022 в 13:47 +0300, Yura Sokolov пишет: > В Вт, 15/03/2022 в 16:25 +0900, Kyotaro Horiguchi пишет: > > Thanks for the new version. > > > > At Tue, 15 Mar 2022 08:07:39 +0300, Yura Sokolov > > wrote in > > > В Пн, 14/03/2022 в 14:57 +0300, Yura Sokolov пишет: > > > > В Пн,

Re: Estimating HugePages Requirements?

2022-03-15 Thread Magnus Hagander
On Tue, Mar 15, 2022 at 3:41 AM Michael Paquier wrote: > > On Mon, Mar 14, 2022 at 10:34:17AM -0700, Nathan Bossart wrote: > > On Mon, Mar 14, 2022 at 04:26:43PM +0100, Magnus Hagander wrote: > >> And in fact, the command documented on > >>

Re: Skip partition tuple routing with constant partition key

2022-03-15 Thread Greg Stark
There are a whole lot of different patches in this thread. However this last one https://commitfest.postgresql.org/37/3270/ created by Amit seems like a fairly straightforward optimization that can be evaluated on its own separately from the others and seems quite mature. I'm actually inclined to

Re: do only critical work during single-user vacuum?

2022-03-15 Thread Peter Geoghegan
On Wed, Feb 16, 2022 at 12:43 AM John Naylor wrote: > I'll put some effort in finding any way that it might not be robust. > After that, changing the message and docs is trivial. It would be great to be able to totally drop the idea of using single-user mode before Postgres 15 feature freeze.

Re: Optimize external TOAST storage

2022-03-15 Thread Nathan Bossart
On Wed, Mar 16, 2022 at 01:03:38AM +0530, davinder singh wrote: > Regarding the 2nd part of configuring the threshold, Based on our > experiments, we have fixed it for the attributes with size > 2 * chunk_size. > The default chunk_size is 2KB and the page size is 8KB. While toasting each >

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

2022-03-15 Thread Jacob Champion
On Mon, 2022-03-14 at 15:30 +0900, Kyotaro Horiguchi wrote: > t/003_sslinfo.pl ... 1/? # Tests were run but no plan was declared and > done_testing() was not seen. > # Looks like your test exited with 29 just after 6. > t/003_sslinfo.pl ... Dubious, test returned 29 (wstat 7424, 0x1d00) > All 6

Re: Window Function "Run Conditions"

2022-03-15 Thread Greg Stark
This looks like an awesome addition. I have one technical questions... Is it possible to actually transform the row_number case into a LIMIT clause or make the planner support for this case equivalent to it (in which case we can replace the LIMIT clause planning to transform into a window

Re: On login trigger: take three

2022-03-15 Thread Daniel Gustafsson
> On 14 Mar 2022, at 17:10, Andres Freund wrote: > > Hi, > > On 2022-03-14 14:47:09 +0100, Daniel Gustafsson wrote: >>> On 14 Mar 2022, at 01:08, Andres Freund wrote: >> >>> I was thinking that the way to use it would be to specify it as a client >>> option. Like PGOPTIONS='-c

Re: [PATCH] pgbench: add multiconnect option

2022-03-15 Thread Greg Stark
Hi guys, It looks like David sent a patch and Fabien sent a followup patch. But there hasn't been a whole lot of discussion or further patches. It sounds like there are some basic questions about what the right interface should be. Are there specific questions that would be helpful for moving

Re: ExecTypeSetColNames is fundamentally broken

2022-03-15 Thread Robert Haas
On Tue, Dec 7, 2021 at 1:19 PM Tom Lane wrote: > So the alternatives I see are to revert what bf7ca1587 tried to do > here, or to try to make it work that way across-the-board, which > implies (a) a very much larger amount of work, and (b) breaking > important behaviors that are decades older

Re: ICU for global collation

2022-03-15 Thread Daniel Verite
Finnerty, Jim wrote: > In ICU, the "locale" is just the first part of what we can pass to the > "locale" parameter in CREATE COLLATION - the part before the optional '@' > delimiter. The ICU locale does not include the secondary or tertiary > properties, Why not? Please see

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

2022-03-15 Thread Nathan Bossart
On Tue, Mar 15, 2022 at 11:04:26AM +0900, Michael Paquier wrote: > On Mon, Mar 14, 2022 at 03:54:19PM +0530, Bharath Rupireddy wrote: >> At times, the snapshot or mapping files can be large in number and one >> some platforms it takes time for checkpoint to process all of them. >> Having the stats

Re: pg14 psql broke \d datname.nspname.relname

2022-03-15 Thread David G. Johnston
On Tue, Mar 15, 2022 at 12:31 PM Mark Dilger wrote: > > > On Mar 15, 2022, at 12:27 PM, Robert Haas wrote: > > > > - Justin Pryzby, who originally discovered the problem, prefers the > > same behavior that I prefer long-term, but thinks Tom's behavior is > > better than doing nothing. > > -

Re: pg14 psql broke \d datname.nspname.relname

2022-03-15 Thread Justin Pryzby
On Wed, Oct 13, 2021 at 11:54:26AM -0500, Justin Pryzby wrote: > It seems unfortunate if names from log messages qualified with datname were > now > rejected. Like this one: > > | automatic analyze of table "ts.child.cdrs_2021_10_12"... Mark mentioned this "log message" use case in his

Re: Non-replayable WAL records through overflows and >MaxAllocSize lengths

2022-03-15 Thread Matthias van de Meent
On Mon, 14 Mar 2022 at 18:14, Andres Freund wrote: > > Hi > > A random thought I had while thinking about the size limits: We could use the > low bits of the length and xl_prev to store XLR_SPECIAL_REL_UPDATE | > XLR_CHECK_CONSISTENCY and give rmgrs the full 8 bit of xl_info. Which would > allow

Re: ICU for global collation

2022-03-15 Thread Daniel Verite
Julien Rouhaud wrote: > > > While on that topic, the doc should probably mention that default ICU > > > collations can only be deterministic. > > > > Well, there is no option to do otherwise, so I'm not sure where/how to > > mention that. We usually don't document options that don't

Re: ICU for global collation

2022-03-15 Thread Finnerty, Jim
Can we get some more consistent terminology around the term "locale"? In ICU, the "locale" is just the first part of what we can pass to the "locale" parameter in CREATE COLLATION - the part before the optional '@' delimiter. The ICU locale does not include the secondary or tertiary

Re: Tablesync early exit

2022-03-15 Thread Greg Stark
This patch has been through five CFs without any review. It's a very short patch and I'm assuming the only issue is that it's not clear whether it's a good idea or not and there are few developers familiar with this area of code? Amit, it looks like you were the one who asked for it to be split

Re: Optimize external TOAST storage

2022-03-15 Thread davinder singh
Thanks, Nathan, for the review comments. Please find the updated patch. On Sun, Mar 13, 2022 at 3:43 AM Nathan Bossart wrote: > Do you think it is worth making this configurable? I don't think it is > outside the realm of possibility for some users to care more about disk > space than read

Re: pg14 psql broke \d datname.nspname.relname

2022-03-15 Thread Mark Dilger
> On Mar 15, 2022, at 12:27 PM, Robert Haas wrote: > > - Justin Pryzby, who originally discovered the problem, prefers the > same behavior that I prefer long-term, but thinks Tom's behavior is > better than doing nothing. > - Mark Dilger, Isaac Moreland, Garick Hamlin, Alvaro Herrera, and >

Re: Proposal: Support custom authentication methods using hooks

2022-03-15 Thread samay sharma
Hi, On Fri, Mar 4, 2022 at 11:15 AM Jacob Champion wrote: > On Thu, 2022-03-03 at 11:12 +0100, Peter Eisentraut wrote: > > At the moment, it is not possible to judge whether the hook interface > > you have chosen is appropriate. > > > > I suggest you actually implement the Azure provider, then

Re: pg14 psql broke \d datname.nspname.relname

2022-03-15 Thread Robert Haas
Continuing my pass through the "bug fixes" section of the CommitFest, I came upon this patch, which is contested. Here is my attempt to summarize where things stand. As I understand it: - Tom wants to revert to the previous behavior of accepting arbitrary garbage, so that \d

Re: Kerberos delegation support in libpq and postgres_fdw

2022-03-15 Thread Jacob Champion
On Fri, 2022-03-11 at 19:39 -0500, Stephen Frost wrote: > > On Fri, Mar 11, 2022 at 18:55 Jacob Champion wrote: > > > > [5] says we have to free the proxy credential with GSS_Release_cred(); > > I don't see that happening anywhere, but I may have missed it. > > I’m not sure that it’s really

Re: refactoring basebackup.c

2022-03-15 Thread Robert Haas
On Tue, Mar 15, 2022 at 6:33 AM Jeevan Ladhe wrote: > I get following error at my end: > > $ pg_basebackup -D /tmp/zstd_bk -Ft -Xfetch --compress=server-zstd:7@4 > pg_basebackup: error: could not initiate base backup: ERROR: could not > compress data: Unsupported parameter > pg_basebackup:

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

2022-03-15 Thread Robert Haas
On Tue, Mar 15, 2022 at 1:26 PM Ashutosh Sharma wrote: > > On Tue, Mar 15, 2022 at 12:30 PM Ashutosh Sharma > > wrote: > > > Few comments on the latest patch: > > > > > > - /* We need to construct the pathname for this database */ > > > - dbpath =

Re: ICU for global collation

2022-03-15 Thread Robert Haas
On Tue, Mar 15, 2022 at 12:58 PM Peter Eisentraut wrote: > On 14.03.22 19:57, Robert Haas wrote: > > 1. What will happen if I set the ICU collation to something that > > doesn't match the libc collation? How bad are the consequences? > > These are unrelated, so there are no consequences. Can you

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

2022-03-15 Thread Ashutosh Sharma
On Tue, Mar 15, 2022 at 10:17 PM Robert Haas wrote: > > On Tue, Mar 15, 2022 at 12:30 PM Ashutosh Sharma > wrote: > > > > Few comments on the latest patch: > > > > - /* We need to construct the pathname for this database */ > > - dbpath = GetDatabasePath(xlrec->dbid,

Re: ICU for global collation

2022-03-15 Thread Peter Eisentraut
On 14.03.22 19:57, Robert Haas wrote: 1. What will happen if I set the ICU collation to something that doesn't match the libc collation? How bad are the consequences? These are unrelated, so there are no consequences. 2. If I want to avoid a mismatch between the two, then I will need a way

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

2022-03-15 Thread Robert Haas
On Tue, Mar 15, 2022 at 12:30 PM Ashutosh Sharma wrote: > > Few comments on the latest patch: > > - /* We need to construct the pathname for this database */ > - dbpath = GetDatabasePath(xlrec->dbid, xlrec->tsid); > + if (xlrec->dbid != InvalidOid) > +

Re: [PATCH] Fix various spelling errors

2022-03-15 Thread Tom Lane
"Kekalainen, Otto" writes: > Please next time use `git am` to import the patch so that author and other > commit metadata is kept, or if you apply patches manually then commit with > `git > --author` so that original author will be correct in the commit and your name > will be only in the

Re: Corruption during WAL replay

2022-03-15 Thread Robert Haas
On Wed, Jan 26, 2022 at 3:25 AM Kyotaro Horiguchi wrote: > The attached is the fixed version and it surely works with the repro. Hi, I spent the morning working on this patch and came up with the attached version. I wrote substantial comments in RelationTruncate(), where I tried to make it more

Re: [PATCH] Fix various spelling errors

2022-03-15 Thread Kekalainen, Otto
On 2022-03-14, 19:47, "Michael Paquier" wrote: >It is useful to group that together. I have gathered everything that > looked like a typo or a grammar mistake, and applied the fixes. That was quick, thanks! Please next time use `git am` to import the patch so that author and other

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

2022-03-15 Thread Ashutosh Sharma
Few comments on the latest patch: - /* We need to construct the pathname for this database */ - dbpath = GetDatabasePath(xlrec->dbid, xlrec->tsid); + if (xlrec->dbid != InvalidOid) + dbpath = GetDatabasePath(xlrec->dbid,

Re: Add 64-bit XIDs into PostgreSQL 15

2022-03-15 Thread Michael Banck
Hi, On Mon, Mar 14, 2022 at 01:32:04PM +0300, Aleksander Alekseev wrote: > IMO v16-0001 and v16-0002 are in pretty good shape and are as much as > we are going to deliver in PG15. I'm going to change the status of the > CF entry to "Ready for Committer" somewhere this week unless someone >

Re: BufferAlloc: don't take two simultaneous locks

2022-03-15 Thread Yura Sokolov
В Вт, 15/03/2022 в 13:47 +0300, Yura Sokolov пишет: > В Вт, 15/03/2022 в 16:25 +0900, Kyotaro Horiguchi пишет: > > > I lost access to Xeon 8354H, so returned to old Xeon X5675. > > ... > > > Strange thing: both master and patched version has higher > > > peak tps at X5676 at medium connections (17

Re: Change the csv log to 'key:value' to facilitate the user to understanding and processing of logs

2022-03-15 Thread Jan Wieck
On 3/15/22 10:12, Andrew Dunstan wrote: On 3/15/22 09:30, hubert depesz lubaczewski wrote: On Tue, Mar 15, 2022 at 09:31:19AM +0800, lupeng wrote: Dear Hackers When I audit the Postgresql database recently, I found that after configuring the log type as csv, the output log content is as

Re: Change the csv log to 'key:value' to facilitate the user to understanding and processing of logs

2022-03-15 Thread Andrew Dunstan
On 3/15/22 09:30, hubert depesz lubaczewski wrote: > On Tue, Mar 15, 2022 at 09:31:19AM +0800, lupeng wrote: >> Dear Hackers >> When I audit the Postgresql database recently, I found that after >> configuring the log type as csv, the output log content is as follows: >> "database ""lp_db1"" does

RE: Skipping logical replication transactions on subscriber side

2022-03-15 Thread osumi.takami...@fujitsu.com
On Tuesday, March 15, 2022 3:13 PM Masahiko Sawada wrote: > I've attached an updated version patch. A couple of minor comments on v14. (1) apply_handle_commit_internal + if (is_skipping_changes()) + { + stop_skipping_changes(); + + /* +

Re: speed up a logical replica setup

2022-03-15 Thread Peter Eisentraut
On 21.02.22 13:09, Euler Taveira wrote: A new tool called pg_subscriber does this conversion and is tightly integrated with Postgres. Are we comfortable with the name pg_subscriber? It seems too general. Are we planning other subscriber-related operations in the future? If so, we should at

Re: Add pg_freespacemap extension sql test

2022-03-15 Thread Dong Wook Lee
2022년 3월 11일 (금) 오후 2:51, Michael Paquier 님이 작성: > > On Wed, Mar 09, 2022 at 08:13:15PM +0900, Dong Wook Lee wrote: > > I agree with you, but I have no good idea how to deal with it. > > Well, my guess is that you basically just care about being able to > detect if there is free space in the map

Re: Change the csv log to 'key:value' to facilitate the user to understanding and processing of logs

2022-03-15 Thread hubert depesz lubaczewski
On Tue, Mar 15, 2022 at 09:31:19AM +0800, lupeng wrote: > Dear Hackers > When I audit the Postgresql database recently, I found that after > configuring the log type as csv, the output log content is as follows: > "database ""lp_db1"" does not exist","DROP DATABASE > lp_db1;",,"dropdb,

Re: Change the csv log to 'key:value' to facilitate the user to understanding and processing of logs

2022-03-15 Thread Julien Rouhaud
Hi, On Tue, Mar 15, 2022 at 09:31:19AM +0800, lupeng wrote: > > When I audit the Postgresql database recently, I found that after configuring > the log type as csv, the output log content is as follows: "database > ""lp_db1"" does not exist","DROP DATABASE lp_db1;",,"dropdb, >

Change the csv log to 'key:value' to facilitate the user to understanding and processing of logs

2022-03-15 Thread lupeng
Dear Hackers When I audit the Postgresql database recently, I found that after configuring the log type as csv, the output log content is as follows: "database ""lp_db1"" does not exist","DROP DATABASE lp_db1;",,"dropdb, dbcommands.c:841","","client backend",,0 It is

Re: Can we consider "24 Hours" for "next day" in INTERVAL datatype ?

2022-03-15 Thread Joseph Koshakow
On Tue, Mar 15, 2022 at 3:46 AM Julien Rouhaud wrote: > On Tue, Mar 15, 2022 at 12:54:58PM +0530, Prabhat Sahu wrote: > > > > Is there any specific purpose we are holding the hours as an increasing > > number beyond 24 hours also? > > Yes, you can't blindly assume that adding 24 hours will always

Re: Assert in pageinspect with NULL pages

2022-03-15 Thread Justin Pryzby
On Tue, Mar 15, 2022 at 06:32:44PM +0900, Michael Paquier wrote: > + if (!IS_BRIN(indexRel)) > + ereport(ERROR, > + (errcode(ERRCODE_WRONG_OBJECT_TYPE), > + errmsg("\"%s\" is not a %s index", > +

Re: BufferAlloc: don't take two simultaneous locks

2022-03-15 Thread Yura Sokolov
В Вт, 15/03/2022 в 16:25 +0900, Kyotaro Horiguchi пишет: > Thanks for the new version. > > At Tue, 15 Mar 2022 08:07:39 +0300, Yura Sokolov > wrote in > > В Пн, 14/03/2022 в 14:57 +0300, Yura Sokolov пишет: > > > В Пн, 14/03/2022 в 17:12 +0900, Kyotaro Horiguchi пишет: > > > > At Mon, 14 Mar

Re: refactoring basebackup.c

2022-03-15 Thread Jeevan Ladhe
Thanks for the patch, Dipesh. I had a look at the patch and also tried to take the backup. I have following suggestions and observations: I get following error at my end: $ pg_basebackup -D /tmp/zstd_bk -Ft -Xfetch --compress=server-zstd:7@4 pg_basebackup: error: could not initiate base backup:

Re: Skipping logical replication transactions on subscriber side

2022-03-15 Thread Amit Kapila
On Tue, Mar 15, 2022 at 11:43 AM Masahiko Sawada wrote: > > I've attached an updated version patch. > Review: === 1. +++ b/doc/src/sgml/logical-replication.sgml @@ -366,15 +366,19 @@ CONTEXT: processing remote data for replication origin "pg_16395" during "INSER transaction, the

Re: pg_tablespace_location() failure with allow_in_place_tablespaces

2022-03-15 Thread Thomas Munro
On Tue, Mar 15, 2022 at 10:30 PM Michael Paquier wrote: > So, which one of a relative path or an absolute path do you think > would be better for the user? My preference tends toward the relative > path, as we know that all those tablespaces stay in pg_tblspc/ so one > can make the difference

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

2022-03-15 Thread Dilip Kumar
On Mon, Mar 14, 2022 at 10:04 PM Robert Haas wrote: > I think it would make sense to have two different WAL records e.g. > XLOG_DBASE_CREATE_WAL_LOG and XLOG_DBASE_CREATE_FILE_COPY. Then it's > easy to see how this could be generalized to other strategies in the > future. Done that way. In

Re: support for MERGE

2022-03-15 Thread Amit Langote
On Mon, Mar 14, 2022 at 11:36 PM Amit Langote wrote: > On Sun, Mar 13, 2022 at 12:36 AM Alvaro Herrera > wrote: > > FYI I intend to get the ModifyTable split patch (0001+0003) pushed > > hopefully on Tuesday or Wednesday next week, unless something really > > ugly is found on it. > > I looked

Re: Query about time zone patterns in to_char

2022-03-15 Thread Nitin Jadhav
> This patch is still in the current CommitFest, so I decided to review > it. I see that DCH_keywords[] includes upper and lower-case entries > for everything except the three cases corrected by this patch, where > it includes upper-case entries but not the corresponding lower-case > entries. It

Re: Assert in pageinspect with NULL pages

2022-03-15 Thread Michael Paquier
On Thu, Feb 17, 2022 at 09:00:20PM -0600, Justin Pryzby wrote: > BRIN can also crash if passed a non-brin index. > > I've been sitting on this one for awhile. Feel free to include it in your > patchset. So, I have begun a close lookup of this thread, and the problem you are reporting here is

Re: pg_tablespace_location() failure with allow_in_place_tablespaces

2022-03-15 Thread Michael Paquier
On Tue, Mar 15, 2022 at 03:55:56PM +1300, Thomas Munro wrote: > On Tue, Mar 15, 2022 at 2:50 PM Michael Paquier wrote: >> On Tue, Mar 15, 2022 at 02:33:17PM +1300, Thomas Munro wrote: >> > As for the complaint about pg_tablespace_location() failing, would it >> > be better to return an empty

Re: Add checkpoint and redo LSN to LogCheckpointEnd log message

2022-03-15 Thread Michael Paquier
On Tue, Mar 15, 2022 at 05:23:40PM +0900, Kyotaro Horiguchi wrote: > At Tue, 15 Mar 2022 12:19:47 +0530, Bharath Rupireddy > wrote in >> On Fri, Mar 4, 2022 at 10:40 AM Kyotaro Horiguchi >> wrote: >> 0001 - I don't think you need to do this as UpdateControlFile >> (update_controlfile) will

Re: Column Filtering in Logical Replication

2022-03-15 Thread Tomas Vondra
On 3/15/22 05:43, Amit Kapila wrote: > On Mon, Mar 14, 2022 at 4:42 PM houzj.f...@fujitsu.com > wrote: >> >> On Monday, March 14, 2022 5:08 AM Tomas Vondra >> wrote: >>> >>> On 3/12/22 05:30, Amit Kapila wrote: > ... Okay, please find attached. I have done basic testing of

Re: Add checkpoint and redo LSN to LogCheckpointEnd log message

2022-03-15 Thread Kyotaro Horiguchi
At Tue, 15 Mar 2022 12:19:47 +0530, Bharath Rupireddy wrote in > On Fri, Mar 4, 2022 at 10:40 AM Kyotaro Horiguchi > wrote: > 0001 - I don't think you need to do this as UpdateControlFile > (update_controlfile) will anyway update it, no? > + /* Update control file using current time */ > +

Re: Can we consider "24 Hours" for "next day" in INTERVAL datatype ?

2022-03-15 Thread Julien Rouhaud
Hi, On Tue, Mar 15, 2022 at 12:54:58PM +0530, Prabhat Sahu wrote: > > Kindly check the below scenario with INTERVAL datatype. > > postgres=# select interval '01 20:59:59' + interval '00 05:00:01' as > interval; > interval > > 1 day 26:00:00 > (1 row) > > Any operation with

Re: ICU for global collation

2022-03-15 Thread Julien Rouhaud
On Mon, Mar 14, 2022 at 01:50:50PM +0100, Peter Eisentraut wrote: > On 05.03.22 09:38, Julien Rouhaud wrote: > > I say it works because I did manually check, as far as I can see there isn't > > any test that ensures it. > > > > I'm using this naive scenario: > > > > DROP DATABASE IF EXISTS dbicu;

Re: Can we consider "24 Hours" for "next day" in INTERVAL datatype ?

2022-03-15 Thread Laurenz Albe
On Tue, 2022-03-15 at 12:54 +0530, Prabhat Sahu wrote: > Kindly check the below scenario with INTERVAL datatype. > > postgres=# select interval '01 20:59:59' + interval '00 05:00:01' as interval; >     interval     > >  1 day 26:00:00 > (1 row) > > Any operation with INTERVAL

Re: Allow async standbys wait for sync replication

2022-03-15 Thread Bharath Rupireddy
On Wed, Mar 9, 2022 at 7:31 AM Andres Freund wrote: > > Hi, > > On 2022-03-06 12:27:52 +0530, Bharath Rupireddy wrote: > > On Sun, Mar 6, 2022 at 1:57 AM Andres Freund wrote: > > > > > > Hi, > > > > > > On 2022-03-05 14:14:54 +0530, Bharath Rupireddy wrote: > > > > I understand. Even if we use

Re: BufferAlloc: don't take two simultaneous locks

2022-03-15 Thread Kyotaro Horiguchi
Thanks for the new version. At Tue, 15 Mar 2022 08:07:39 +0300, Yura Sokolov wrote in > В Пн, 14/03/2022 в 14:57 +0300, Yura Sokolov пишет: > > В Пн, 14/03/2022 в 17:12 +0900, Kyotaro Horiguchi пишет: > > > At Mon, 14 Mar 2022 09:15:11 +0300, Yura Sokolov > > > wrote in > > > > В Пн,

Can we consider "24 Hours" for "next day" in INTERVAL datatype ?

2022-03-15 Thread Prabhat Sahu
Hi All, Kindly check the below scenario with INTERVAL datatype. postgres=# select interval '01 20:59:59' + interval '00 05:00:01' as interval; interval 1 day 26:00:00 (1 row) Any operation with INTERVAL data, We are changing the interval values as "60 sec" as "next minute"

Re: Add checkpoint and redo LSN to LogCheckpointEnd log message

2022-03-15 Thread Bharath Rupireddy
On Fri, Mar 4, 2022 at 10:40 AM Kyotaro Horiguchi wrote: > > At Mon, 14 Feb 2022 14:52:15 +0900 (JST), Kyotaro Horiguchi > wrote in > > In this version , 0001 gets one fix and two comment updates. > > While the disucssion on back-patching of 0001 proceeding on another > branch, the main patch

Re: Support logical replication of DDLs

2022-03-15 Thread rajesh singarapu
+ On Sun, Mar 13, 2022 at 5:05 PM Dilip Kumar wrote: > > On Mon, Feb 21, 2022 at 9:43 PM Zheng Li wrote: > > > > Hello, > > > > One of the most frequently requested improvements from our customers > > is to reduce downtime associated with software updates (both major and > > minor versions). To

Re: generic plans and "initial" pruning

2022-03-15 Thread Amit Langote
On Tue, Mar 15, 2022 at 5:06 AM Robert Haas wrote: > On Mon, Mar 14, 2022 at 3:38 PM Tom Lane wrote: > > What I am skeptical about is that this work actually accomplishes > > anything under real-world conditions. That's because if pruning would > > save enough to make skipping the

  1   2   >