RE: [BUG]Update Toast data failure in logical replication

2022-02-10 Thread tanghy.f...@fujitsu.com
On Thu, Feb 10, 2022 9:34 PM Amit Kapila wrote: > > On Mon, Feb 7, 2022 at 1:27 PM Dilip Kumar wrote: > > > > On Mon, Feb 7, 2022 at 12:25 PM Amit Kapila > wrote: > > > > > > Attached please find the modified patches. > > > > I have looked into the latest modification and back branch patches an

Re: Race condition in TransactionIdIsInProgress

2022-02-10 Thread Andres Freund
Hi, On 2022-02-10 21:56:09 -0800, Andres Freund wrote: > I think this may actually mean that the hot corruption problem fixed in > > commit 18b87b201f7 > Author: Andres Freund > Date: 2021-12-10 20:12:26 -0800 > > Fix possible HOT corruption when RECENTLY_DEAD changes to DEAD while > pru

Re: Race condition in TransactionIdIsInProgress

2022-02-10 Thread Andres Freund
Hi, On 2022-02-10 15:21:27 -0500, Robert Haas wrote: > On Thu, Feb 10, 2022 at 11:46 AM Konstantin Knizhnik > wrote: > > Postgres first records state transaction in CLOG, then removes > > transaction from procarray and finally releases locks. > > But it can happen that transaction is marked as c

Re: Is there any documentation on how to correctly create extensions in HA(primary-standby) setup?

2022-02-10 Thread Julien Rouhaud
On Fri, Feb 11, 2022 at 10:16:27AM +0530, Bharath Rupireddy wrote: > On Tue, Jan 18, 2022 at 1:26 PM Julien Rouhaud wrote: > > > > I think that the common terminology is "module", not "extension". That's > > especially important here as this information is also relevant for modules > > that > >

Re: Is there any documentation on how to correctly create extensions in HA(primary-standby) setup?

2022-02-10 Thread Bharath Rupireddy
On Tue, Jan 18, 2022 at 1:26 PM Julien Rouhaud wrote: > > Hi, > > On Thu, Dec 09, 2021 at 08:19:06AM +0530, Bharath Rupireddy wrote: > > > > Thanks. Attaching v1 patch specifying the notes there. Please review. > > I think that the common terminology is "module", not "extension". That's > especia

Re: Merging statistics from children instead of re-sampling everything

2022-02-10 Thread Andrey V. Lepikhov
On 2/11/22 03:37, Tomas Vondra wrote: That being said, this thread was not really about foreign partitions, but about re-analyzing inheritance trees in general. And sampling foreign partitions doesn't really solve that - we'll still do the sampling over and over. IMO, to solve the problem we sho

Re: List of all* PostgreSQL EXTENSIONs in the world

2022-02-10 Thread Noah Misch
On Thu, Feb 10, 2022 at 04:04:17PM -0500, Joe Conway wrote: > On 2/10/22 15:35, Robert Haas wrote: > >On Thu, Feb 10, 2022 at 3:19 PM Joel Jacobson wrote: > >>I've compiled a list of all* PostgreSQL EXTENSIONs in the world: > >> > >>https://gist.github.com/joelonsql/e5aa27f8cc9bd22b8999b7de8aee9d4

Re: can we add subscription TAP test option "vcregress subscriptioncheck" for MSVC builds?

2022-02-10 Thread Bharath Rupireddy
On Fri, Feb 11, 2022 at 12:29 AM Justin Pryzby wrote: > > On Thu, Feb 10, 2022 at 10:21:08PM +0530, Bharath Rupireddy wrote: > > Thanks for the comments. Above looks good to me, changed that way, PSA v2. > > I spy a typo: subcription Thanks. Corrected in v3 attached. The CF entry https://commitf

Re: List of all* PostgreSQL EXTENSIONs in the world

2022-02-10 Thread Julien Rouhaud
Hi, On Fri, Feb 11, 2022 at 09:22:01AM +0900, Ian Lawrence Barwick wrote: > 2022年2月11日(金) 5:19 Joel Jacobson : > > > > Hi hackers, > > > > I've compiled a list of all* PostgreSQL EXTENSIONs in the world: > > > > https://gist.github.com/joelonsql/e5aa27f8cc9bd22b8999b7de8aee9d47 > > > > *) It's not

Re: Why is src/test/modules/committs/t/002_standby.pl flaky?

2022-02-10 Thread Andres Freund
Hi, Over in another thread I made some wild unsubstantiated guesses that the windows issues could have been made much more likely by a somewhat odd bit of code in PQisBusy(): https://postgr.es/m/1959196.1644544971%40sss.pgh.pa.us Alexander, any chance you'd try if that changes the likelihood of

Re: Skipping logical replication transactions on subscriber side

2022-02-10 Thread Masahiko Sawada
On Thu, Jan 27, 2022 at 10:42 PM Peter Eisentraut wrote: > > On 26.01.22 05:05, Masahiko Sawada wrote: > >> I think it is okay to clear after the first successful application of > >> any transaction. What I was not sure was about the idea of giving > >> WARNING/ERROR if the first xact to be applie

Re: generic plans and "initial" pruning

2022-02-10 Thread Andres Freund
Hi, On 2022-02-10 17:13:52 +0900, Amit Langote wrote: > The attached patch implements this idea. Sorry for the delay in > getting this out and thanks to Robert for the off-list discussions on > this. I did not follow this thread at all. And I only skimmed the patch. So I'm probably wrong. I'm a

Re: Add jsonlog log_destination for JSON server logs

2022-02-10 Thread Michael Paquier
On Thu, Feb 10, 2022 at 07:45:17PM -0300, Alvaro Herrera wrote: > From what I hear in the container world, what they would *prefer* (but > they don't often get) is to receive the JSON-format logs directly in > stderr from the daemons they run; they capture stderr and they have the > logs just in th

Re: Add jsonlog log_destination for JSON server logs

2022-02-10 Thread Tom Lane
Alvaro Herrera writes: > So, thinking about this, there is one important piece that is missing > here, which is the ability to change the default format for what we > write to stderr. Right now, if you have stderr output, it is always in > the "plain multiline" format, with no option to change it

Re: List of all* PostgreSQL EXTENSIONs in the world

2022-02-10 Thread Ian Lawrence Barwick
2022年2月11日(金) 5:19 Joel Jacobson : > > Hi hackers, > > I've compiled a list of all* PostgreSQL EXTENSIONs in the world: > > https://gist.github.com/joelonsql/e5aa27f8cc9bd22b8999b7de8aee9d47 > > *) It's not all, but 1041, compared to the 338 found on PGXN. More precisely it's a list of all? the re

Re: Allow parallel plan for referential integrity checks?

2022-02-10 Thread Andreas Karlsson
On 2/7/22 11:26, Frédéric Yhuel wrote: Attached is a (naive) patch that aims to fix the case of a FK addition, but the handling of the flag CURSOR_OPT_PARALLEL_OK, generally speaking, looks rather hackish. Thanks, for the patch. You can add it to the current open commitfest (https://commitfes

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

2022-02-10 Thread Andres Freund
Hi, On 2022-02-10 10:32:42 -0500, Robert Haas wrote: > I won't really be surprised if we hear that someone has a 10GB > template database and likes to make a ton of copies and only change > 500 rows in each one while replicating the whole thing over a slow > WAN. That can definitely happen, and I'

Re: Add jsonlog log_destination for JSON server logs

2022-02-10 Thread Alvaro Herrera
So, thinking about this, there is one important piece that is missing here, which is the ability to change the default format for what we write to stderr. Right now, if you have stderr output, it is always in the "plain multiline" format, with no option to change it. If you want a JSON log, you h

Re: Merging statistics from children instead of re-sampling everything

2022-02-10 Thread Tomas Vondra
On 2/10/22 12:50, Andrey Lepikhov wrote: > On 21/1/2022 01:25, Tomas Vondra wrote: >> But I don't have a very good idea what to do about statistics that we >> can't really merge. For some types of statistics it's rather tricky to >> reasonably merge the results - ndistinct is a simple example, a

Re: wrong fds used for refilenodes after pg_upgrade relfilenode changes Reply-To:

2022-02-10 Thread Andres Freund
Hi, On 2022-02-11 09:10:38 +1300, Thomas Munro wrote: > I was about to commit that, because the original Windows problem it > solved is showing up occasionally in CI failures (that is, it already > solves a live problem, albeit a different and non-data-corrupting > one): +1 > It seems like I sho

Re: wrong fds used for refilenodes after pg_upgrade relfilenode changes Reply-To:

2022-02-10 Thread Andres Freund
Hi, On 2022-02-10 13:49:50 -0500, Robert Haas wrote: > I agree. While I feel sort of bad about missing this issue in review, > I also feel like it's pretty surprising that there isn't something > plugging this hole already. It feels unexpected that our FD management > layer might hand you an FD th

Re: Windows now has fdatasync()

2022-02-10 Thread Thomas Munro
On Sun, Feb 6, 2022 at 7:20 PM Michael Paquier wrote: > On Sun, Dec 12, 2021 at 03:48:10PM +1300, Thomas Munro wrote: > > I tried out a quick POC patch and it runs a bit faster than fsync(), as > > expected. > > Good news, as a too high difference would be suspect :) > > How much difference does i

Re: generic plans and "initial" pruning

2022-02-10 Thread Robert Haas
On Thu, Feb 10, 2022 at 3:14 AM Amit Langote wrote: > Maybe this should be more than one patch? Say: > > 0001 to add ExecutorPrep and the boilerplate, > 0002 to teach plancache.c to use the new facility Could be, not sure. I agree that if it's possible to split this in a meaningful way, it would

Re: WaitLatchOrSocket seems to not count to 4 right...

2022-02-10 Thread Thomas Munro
On Tue, Feb 8, 2022 at 1:51 PM Thomas Munro wrote: > (and one day we should make it dynamic and change udata to hold > an index instead of a pointer...) Here's a patch like that. I'd originally sketched this out for another project, but I don't think I need it for that anymore. After this excha

Re: Synchronizing slots from primary to standby

2022-02-10 Thread Bruce Momjian
On Tue, Feb 8, 2022 at 08:27:32PM +0530, Ashutosh Sharma wrote: > > Which means that if e.g. the standby_slot_names GUC differs from > > synchronize_slot_names on the physical replica, the slots synchronized on > > the > > physical replica are not going to be valid. Or if the primary drops its >

Re: support for CREATE MODULE

2022-02-10 Thread Alvaro Herrera
On 2022-Feb-04, Tom Lane wrote: > If we invent modules I think they need to work more like extensions > naming-wise, ie they group objects but have no effect for naming. I think modules are an orthogonal concept to extensions, and trying to mix both is messy. The way I see modules working is as

Re: support for CREATE MODULE

2022-02-10 Thread Bruce Momjian
On Thu, Feb 10, 2022 at 08:53:15AM -0800, Swaha Miller wrote: > On Fri, Feb 4, 2022 at 3:51 PM Tom Lane wrote: > > Hm. If the functional requirement is "group objects without needing > any out-in-the-filesystem infrastructure", then I could see defining > a module as being exactly lik

Re: List of all* PostgreSQL EXTENSIONs in the world

2022-02-10 Thread Joe Conway
On 2/10/22 15:35, Robert Haas wrote: On Thu, Feb 10, 2022 at 3:19 PM Joel Jacobson wrote: I've compiled a list of all* PostgreSQL EXTENSIONs in the world: https://gist.github.com/joelonsql/e5aa27f8cc9bd22b8999b7de8aee9d47 *) It's not all, but 1041, compared to the 338 found on PGXN. Maybe it

Re: List of all* PostgreSQL EXTENSIONs in the world

2022-02-10 Thread Robert Haas
On Thu, Feb 10, 2022 at 3:19 PM Joel Jacobson wrote: > I've compiled a list of all* PostgreSQL EXTENSIONs in the world: > > https://gist.github.com/joelonsql/e5aa27f8cc9bd22b8999b7de8aee9d47 > > *) It's not all, but 1041, compared to the 338 found on PGXN. > > Maybe it would be an idea to provide

Re: is the base backup protocol used by out-of-core tools?

2022-02-10 Thread Robert Haas
On Wed, Feb 9, 2022 at 3:05 PM Magnus Hagander wrote: > Late to the game, but here's another +1. Not that late, thanks for chiming in. Looks pretty unanimous, so I have committed the patches. -- Robert Haas EDB: http://www.enterprisedb.com

Re: wrong fds used for refilenodes after pg_upgrade relfilenode changes Reply-To:

2022-02-10 Thread Robert Haas
On Thu, Feb 10, 2022 at 3:11 PM Thomas Munro wrote: > On Fri, Feb 11, 2022 at 7:50 AM Robert Haas wrote: > > The main question in my mind is who is going to actually make that > > happen. It was your idea (I think), Thomas coded it, and my commit > > made it a live problem. So who's going to get

Re: Race condition in TransactionIdIsInProgress

2022-02-10 Thread Robert Haas
On Thu, Feb 10, 2022 at 11:46 AM Konstantin Knizhnik wrote: > Postgres first records state transaction in CLOG, then removes > transaction from procarray and finally releases locks. > But it can happen that transaction is marked as committed in CLOG, > XMAX_COMMITTED bit is set in modified tuple b

List of all* PostgreSQL EXTENSIONs in the world

2022-02-10 Thread Joel Jacobson
Hi hackers, I've compiled a list of all* PostgreSQL EXTENSIONs in the world: https://gist.github.com/joelonsql/e5aa27f8cc9bd22b8999b7de8aee9d47 *) It's not all, but 1041, compared to the 338 found on PGXN. Maybe it would be an idea to provide a lightweight solution, e.g. maintaining a simple cu

Re: wrong fds used for refilenodes after pg_upgrade relfilenode changes Reply-To:

2022-02-10 Thread Thomas Munro
On Fri, Feb 11, 2022 at 7:50 AM Robert Haas wrote: > The main question in my mind is who is going to actually make that > happen. It was your idea (I think), Thomas coded it, and my commit > made it a live problem. So who's going to get something committed > here? I was about to commit that, beca

Re: Avoid erroring out when unable to remove or parse logical rewrite files to save checkpoint work

2022-02-10 Thread Nathan Bossart
On Thu, Feb 10, 2022 at 09:30:45PM +0530, Bharath Rupireddy wrote: > In any case, let's remove the editor's lock/state file from those > comments and have just only "We just log a message if a file doesn't > fit the pattern". Attached v8 patch with that change. I've moved this one to ready-for-com

Re: [PATCH v2] use has_privs_for_role for predefined roles

2022-02-10 Thread Joe Conway
On 2/10/22 14:28, Nathan Bossart wrote: On Wed, Feb 09, 2022 at 04:39:11PM -0500, Joe Conway wrote: On 2/9/22 13:13, Nathan Bossart wrote: I do wonder if users find the differences between predefined roles and role attributes confusing. INHERIT doesn't govern role attributes, but it will gover

Re: decoupling table and index vacuum

2022-02-10 Thread Peter Geoghegan
On Thu, Feb 10, 2022 at 11:14 AM Robert Haas wrote: > Hmm. I think you're vastly overestimating the extent to which it's > possible to spread out and reschedule the work. I don't know which of > us is wrong. From my point of view, if VACUUM is going to do a full > phase 1 heap pass and a full phas

Re: Race condition in TransactionIdIsInProgress

2022-02-10 Thread Alvaro Herrera
On 2022-Feb-10, Andrey Borodin wrote: > > On 10 Feb 2022, at 21:46, Konstantin Knizhnik wrote: > > As a result "t_xmin %u is uncommitted in tuple (%u,%u) to be updated in > > table" > > error is reported. > > Wow, cool, that seem to be a solution to one more mysterious > corruption thread - “re

Re: [PATCH v2] use has_privs_for_role for predefined roles

2022-02-10 Thread Nathan Bossart
On Wed, Feb 09, 2022 at 04:39:11PM -0500, Joe Conway wrote: > On 2/9/22 13:13, Nathan Bossart wrote: >> I do wonder if users find the differences between predefined roles and role >> attributes confusing. INHERIT doesn't govern role attributes, but it will >> govern predefined roles when this patc

Re: make MaxBackends available in _PG_init

2022-02-10 Thread Nathan Bossart
On Thu, Feb 10, 2022 at 10:47:39AM +0900, Michael Paquier wrote: > On Wed, Feb 09, 2022 at 09:53:38AM -0800, Nathan Bossart wrote: >> This is fine with me as well. I only left these out because the extra >> variable felt unnecessary to me for these functions. > > Okay, done, then. > >> While you

Re: decoupling table and index vacuum

2022-02-10 Thread Peter Geoghegan
On Thu, Feb 10, 2022 at 11:16 AM Robert Haas wrote: > On Thu, Feb 10, 2022 at 3:10 AM Dilip Kumar wrote: > > Actually I was not worried about the scan getting slow. What I was > > worried about is if we keep ignoring the dead tuples for long time > > then in the worst case if we have huge number

Re: decoupling table and index vacuum

2022-02-10 Thread Robert Haas
On Thu, Feb 10, 2022 at 3:10 AM Dilip Kumar wrote: > Actually I was not worried about the scan getting slow. What I was > worried about is if we keep ignoring the dead tuples for long time > then in the worst case if we have huge number of dead tuples in the > index maybe 80% to 90% and then sudd

Re: decoupling table and index vacuum

2022-02-10 Thread Robert Haas
On Wed, Feb 9, 2022 at 6:18 PM Peter Geoghegan wrote: > You seem to be vastly underestimating the value in being able to > spread out and reschedule the work, and manage costs more generally. Hmm. I think you're vastly overestimating the extent to which it's possible to spread out and reschedule

Re: [RFC] building postgres with meson

2022-02-10 Thread Andrew Dunstan
On 2/10/22 12:52, Andres Freund wrote: > Hi, > > On 2022-02-10 12:00:16 -0500, Andrew Dunstan wrote: >> Any objection to my moving ahead with this? > No. I don't yet understand what the transforms issue is and whether it can be > avoidded, but clearly it's an improvement to be able to build with

Re: can we add subscription TAP test option "vcregress subscriptioncheck" for MSVC builds?

2022-02-10 Thread Justin Pryzby
On Thu, Feb 10, 2022 at 10:21:08PM +0530, Bharath Rupireddy wrote: > Thanks for the comments. Above looks good to me, changed that way, PSA v2. I spy a typo: subcription -- Justin

Re: wrong fds used for refilenodes after pg_upgrade relfilenode changes Reply-To:

2022-02-10 Thread Robert Haas
On Wed, Feb 9, 2022 at 5:00 PM Andres Freund wrote: > The problem starts with > > commit aa01051418f10afbdfa781b8dc109615ca785ff9 > Author: Robert Haas > Date: 2022-01-24 14:23:15 -0500 > > pg_upgrade: Preserve database OIDs. Well, that's sad. > I think the most realistic way to address t

Re: Per-table storage parameters for TableAM/IndexAM extensions

2022-02-10 Thread Jeff Davis
On Tue, 2022-01-18 at 22:44 +0530, Sadhuprasad Patro wrote: > As of now, I have fixed the comments from Dilip & Rushabh and have > done some more changes after internal testing and review. Please find > the latest patch attached. Hi, Thank you for working on this! Some questions/comments: At a h

Re: [RFC] building postgres with meson

2022-02-10 Thread Andres Freund
Hi, On 2022-02-10 12:00:16 -0500, Andrew Dunstan wrote: > Any objection to my moving ahead with this? No. I don't yet understand what the transforms issue is and whether it can be avoidded, but clearly it's an improvement to be able to build with builtin msys tools vs not... Greetings, Andres F

Re: Race condition in TransactionIdIsInProgress

2022-02-10 Thread Andrey Borodin
> On 10 Feb 2022, at 21:46, Konstantin Knizhnik wrote: > As a result "t_xmin %u is uncommitted in tuple (%u,%u) to be updated in table" > error is reported. Wow, cool, that seem to be a solution to one more mysterious corruption thread - “reporting TID/table with corruption error" [0]. Thank

Re: [RFC] building postgres with meson

2022-02-10 Thread Andrew Dunstan
On 2/6/22 15:57, Andrew Dunstan wrote: > On 2/6/22 13:39, Andres Freund wrote: >> Hi, >> >> On 2022-02-06 12:06:41 -0500, Andrew Dunstan wrote: >>> Here's a patch. I've tested the perl piece on master and it works fine. >>> It applies cleanly down to 9.4, which is before we got transform modules

Re: support for CREATE MODULE

2022-02-10 Thread Swaha Miller
On Fri, Feb 4, 2022 at 3:51 PM Tom Lane wrote: > Hm. If the functional requirement is "group objects without needing > any out-in-the-filesystem infrastructure", then I could see defining > a module as being exactly like an extension except there's no such > infrastructure --- and hence no concep

Re: can we add subscription TAP test option "vcregress subscriptioncheck" for MSVC builds?

2022-02-10 Thread Bharath Rupireddy
On Mon, Dec 13, 2021 at 5:09 AM Juan José Santamaría Flecha wrote: > > > On Thu, Oct 21, 2021 at 7:21 AM Bharath Rupireddy > wrote: >> >> >> Here's the documentation v1 patch that I've come up with. Please review it. >> > There's a typo: > + To run an arbitrary TAP test set, run vcregress tapt

Race condition in TransactionIdIsInProgress

2022-02-10 Thread Konstantin Knizhnik
Hi hackers, Postgres first records state transaction in CLOG, then removes transaction from procarray and finally releases locks. But it can happen that transaction is marked as committed in CLOG, XMAX_COMMITTED bit is set in modified tuple but TransactionIdIsInProgress still returns true. As a

Re: pg_walinspect - a new extension to get raw WAL data and WAL stats

2022-02-10 Thread Peter Geoghegan
On Sun, Feb 6, 2022 at 7:45 AM Robert Haas wrote: > For what it's worth, I am generally in favor of having something like > this in PostgreSQL. I think it's wrong of us to continue assuming that > everyone has command-line access. Even when that's true, it's not > necessarily convenient. If you ch

Re: faulty link

2022-02-10 Thread Dave Page
On Thu, 10 Feb 2022 at 15:53, Dagfinn Ilmari Mannsåker wrote: > Tom Lane writes: > > > =?UTF-8?B?Sm9zZWYgxaBpbcOhbmVr?= writes: > >> čt 10. 2. 2022 v 15:35 odesílatel Erik Rijkers napsal: > >>> The provided link > >>> https://www.postgresql.org/docs/release/ > >>> leads to > >>> https://www.po

Re: Avoid erroring out when unable to remove or parse logical rewrite files to save checkpoint work

2022-02-10 Thread Bharath Rupireddy
On Fri, Feb 4, 2022 at 5:33 AM Nathan Bossart wrote: > > Thanks. I get it. For syncing map files, we don't want to tolerate any > > errors, whereas removal of the old map files (lesser than cutoff LSN) > > can be tolerated in CheckPointLogicalRewriteHeap. > > LGTM. Andres noted upthread [0] that

Re: Add checkpoint and redo LSN to LogCheckpointEnd log message

2022-02-10 Thread Fujii Masao
On 2022/02/09 11:52, Kyotaro Horiguchi wrote: 0001: The fix of CreateRestartPoint This patch might be ok for the master branch. But since concurrent checkpoint and restartpoint can happen in v14 or before, we would need another patch based on that assumption, for the backport. How about fi

Re: faulty link

2022-02-10 Thread Dagfinn Ilmari Mannsåker
Tom Lane writes: > =?UTF-8?B?Sm9zZWYgxaBpbcOhbmVr?= writes: >> čt 10. 2. 2022 v 15:35 odesílatel Erik Rijkers napsal: >>> The provided link >>> https://www.postgresql.org/docs/release/ >>> leads to >>> https://www.postgresql.org/docs/release/14.2/ >>> which gives 'Not Found' for me (Netherlands

Re: Logging in LockBufferForCleanup()

2022-02-10 Thread Fujii Masao
On 2022/02/10 20:28, Masahiko Sawada wrote: While I understand that these are theoretically valid concerns, it’s unclear to me how much the current code leads to bad effects in practice. There are other low-level codes/paths that call palloc() while holding LWLocks, and I’m not sure that the o

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

2022-02-10 Thread Robert Haas
On Thu, Feb 10, 2022 at 2:52 AM Julien Rouhaud wrote: > Those extra WALs will also impact backups and replication. You could have > fancy hardware, a read-mostly workload and the need to replicate over a slow > WAN, and in that case the 10GB could be much more problematic. True, I guess, but how

Re: faulty link

2022-02-10 Thread Tom Lane
=?UTF-8?B?Sm9zZWYgxaBpbcOhbmVr?= writes: > čt 10. 2. 2022 v 15:35 odesílatel Erik Rijkers napsal: >> The provided link >> https://www.postgresql.org/docs/release/ >> leads to >> https://www.postgresql.org/docs/release/14.2/ >> which gives 'Not Found' for me (Netherlands) > Thinking about that ag

Re: CREATE INDEX CONCURRENTLY on partitioned index

2022-02-10 Thread Alexander Pyhalov
Justin Pryzby писал 2021-02-26 21:20: On Mon, Feb 15, 2021 at 10:07:05PM +0300, Anastasia Lubennikova wrote: 5) Speaking of documentation, I think we need to add a paragraph about CIC on partitioned indexes which will explain that invalid indexes may appear and what user should do to fix them.

Re: faulty link

2022-02-10 Thread Josef Šimánek
čt 10. 2. 2022 v 15:35 odesílatel Erik Rijkers napsal: > > The provided link >https://www.postgresql.org/docs/release/ > > leads to >https://www.postgresql.org/docs/release/14.2/ > > which gives 'Not Found' for me (Netherlands) Thinking about that again, the 14.2 release just happened. Co

Re: faulty link

2022-02-10 Thread Daniel Westermann (DWE)
>The provided link >   https://www.postgresql.org/docs/release/ >leads to >   https://www.postgresql.org/docs/release/14.2/ >which gives 'Not Found' for me (Netherlands) Works fine for me in Germany Regards Daniel

Re: faulty link

2022-02-10 Thread walther
leads to https://www.postgresql.org/docs/release/14.2/ which gives 'Not Found' for me (Netherlands) Same here: Not Found. (Germany)

Re: faulty link

2022-02-10 Thread Josef Šimánek
It works well here (Czech republic). čt 10. 2. 2022 v 15:35 odesílatel Erik Rijkers napsal: > > The provided link >https://www.postgresql.org/docs/release/ > > leads to >https://www.postgresql.org/docs/release/14.2/ > > which gives 'Not Found' for me (Netherlands) > > > At least one perso

Re: Support escape sequence for cluster_name in postgres_fdw.application_name

2022-02-10 Thread Fujii Masao
On 2022/02/09 9:19, r.takahash...@fujitsu.com wrote: Hi, Thank you for updating the patch. I agree with the documentation and program. How about adding the test for %c (Session ID)? (Adding the test for %C (cluster_name) seems difficult.) Ok, I added the tests for %c and %C escape sequence

Re: Plug minor memleak in pg_dump

2022-02-10 Thread Ranier Vilela
Em qui., 10 de fev. de 2022 às 10:57, Daniel Gustafsson escreveu: > > On 10 Feb 2022, at 12:14, Ranier Vilela wrote: > > Em qua., 9 de fev. de 2022 às 23:16, Michael Paquier < > mich...@paquier.xyz > escreveu: > > > This patch makes things worse, doesn't it? > > No. >

faulty link

2022-02-10 Thread Erik Rijkers
The provided link https://www.postgresql.org/docs/release/ leads to https://www.postgresql.org/docs/release/14.2/ which gives 'Not Found' for me (Netherlands) At least one person on IRC reports it 'works' for them but it seems there still something wrong.. Erik Rijkers

Re: refactoring basebackup.c

2022-02-10 Thread Jeevan Ladhe
Thanks for the patch, Dipesh. With a quick look at the patch I have following observations: -- In bbstreamer_lz4_compressor_new(), I think this alignment is not needed on client side: /* Align the output buffer length. */ compressed_

Re: Plug minor memleak in pg_dump

2022-02-10 Thread Daniel Gustafsson
> On 10 Feb 2022, at 12:14, Ranier Vilela wrote: > Em qua., 9 de fev. de 2022 às 23:16, Michael Paquier > escreveu: > This patch makes things worse, doesn't it? > No. > > Doesn't this localized > change mean that we expose ourselves more into *ignoring* TOC entries

Re: Plug minor memleak in pg_dump

2022-02-10 Thread Ranier Vilela
Em qui., 10 de fev. de 2022 às 08:14, Ranier Vilela escreveu: > Em qua., 9 de fev. de 2022 às 23:16, Michael Paquier > escreveu: > >> On Wed, Feb 09, 2022 at 02:48:35PM -0300, Ranier Vilela wrote: >> > IMO I think that still have troubles here. >> > >> > ReadStr can return NULL, so the fix can c

Re: [BUG]Update Toast data failure in logical replication

2022-02-10 Thread Amit Kapila
On Mon, Feb 7, 2022 at 1:27 PM Dilip Kumar wrote: > > On Mon, Feb 7, 2022 at 12:25 PM Amit Kapila wrote: > > > > Attached please find the modified patches. > > I have looked into the latest modification and back branch patches and > they look fine to me. > Today, while looking at this patch agai

Re: refactoring basebackup.c

2022-02-10 Thread Dipesh Pandit
Hi, > On Mon, Jan 31, 2022 at 4:41 PM Jeevan Ladhe < jeevan.la...@enterprisedb.com> wrote: > Hi Robert, > > I had an offline discussion with Dipesh, and he will be working on the > lz4 client side decompression part. > Please find the attached patch to support client side compression and decompr

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

2022-02-10 Thread Dilip Kumar
On Wed, Feb 9, 2022 at 9:31 PM Robert Haas wrote: > > On Wed, Feb 9, 2022 at 10:59 AM Dilip Kumar wrote: > > On Wed, Feb 9, 2022 at 9:25 PM Andrew Dunstan wrote: > > > On 6/16/21 03:52, Dilip Kumar wrote: > > > > On Tue, Jun 15, 2021 at 7:01 PM Andrew Dunstan > > > > wrote: > > > >> Rather tha

Refactor CheckpointWriteDelay()

2022-02-10 Thread Bharath Rupireddy
Hi, Given that CheckpointWriteDelay() is really a hot code path i.e. gets called for every dirty buffer written to disk, here's an opportunity for us to improve it by avoiding some function calls. Firstly, the AmCheckpointerProcess() macro check can be placed outside of the CheckpointWriteDelay()

Re: Unnecessary call to resetPQExpBuffer in getIndexes

2022-02-10 Thread Julien Rouhaud
On Thu, Feb 10, 2022 at 12:25:36PM +0100, Peter Eisentraut wrote: > On 09.02.22 19:21, Nathan Bossart wrote: > > On Wed, Feb 09, 2022 at 10:50:07AM +0800, Julien Rouhaud wrote: > > > I just noticed that e2c52beecd (adding PeterE in Cc) added a > > > resetPQExpBuffer() > > > which seems unnecessary

Re: Merging statistics from children instead of re-sampling everything

2022-02-10 Thread Andrey Lepikhov
On 21/1/2022 01:25, Tomas Vondra wrote: But I don't have a very good idea what to do about statistics that we can't really merge. For some types of statistics it's rather tricky to reasonably merge the results - ndistinct is a simple example, although we could work around that by building and mer

Re: Logging in LockBufferForCleanup()

2022-02-10 Thread Masahiko Sawada
On Thu, Feb 10, 2022 at 11:22 AM Andres Freund wrote: > > Hi, > > I just noticed somewhat new code in LockBufferForCleanup(), added in > > commit 39b03690b529935a3c33024ee68f08e2d347cf4f > Author: Fujii Masao > Date: 2021-01-13 22:59:17 +0900 > > Log long wait time on recovery conflict when

Remove 'IN' from pg_freespace docs for consistency

2022-02-10 Thread Bharath Rupireddy
Hi, It seems like 'IN' isn't used for description of a function input parameter in the docs unlike 'OUT'. AFAICS this is consistent across the docs except the function pg_freespace. Attaching a tiny patch to remove 'IN' there. Thoughts? Regards, Bharath Rupireddy. v1-0001-Remove-IN-from-pg_fre

Re: Unnecessary call to resetPQExpBuffer in getIndexes

2022-02-10 Thread Peter Eisentraut
On 09.02.22 19:21, Nathan Bossart wrote: On Wed, Feb 09, 2022 at 10:50:07AM +0800, Julien Rouhaud wrote: I just noticed that e2c52beecd (adding PeterE in Cc) added a resetPQExpBuffer() which seems unnecessary since the variable is untouched since the initial createPQExpBuffer(). Simple patch at

Re: Plug minor memleak in pg_dump

2022-02-10 Thread Ranier Vilela
Em qua., 9 de fev. de 2022 às 23:16, Michael Paquier escreveu: > On Wed, Feb 09, 2022 at 02:48:35PM -0300, Ranier Vilela wrote: > > IMO I think that still have troubles here. > > > > ReadStr can return NULL, so the fix can crash. > > - sscanf(tmp, "%u", &te->catalogId.tableoid); > -

Re: Database-level collation version tracking

2022-02-10 Thread Julien Rouhaud
On Thu, Feb 10, 2022 at 09:57:59AM +0100, Peter Eisentraut wrote: > New patch that fixes all reported issues, I think: > > - Added test for ALTER DATABASE / REFRESH COLLATION VERSION > > - Rewrote AlterDatabaseRefreshCollVersion() with better locking > > - Added version checking in createdb() T

Re: row filtering for logical replication

2022-02-10 Thread Amit Kapila
On Thu, Feb 10, 2022 at 9:29 AM houzj.f...@fujitsu.com wrote: > > > Attach the V80 patch which addressed the above comments and > comments from Amit[1]. > Thanks for the new version. Few minor/cosmetic comments: 1. Can we slightly change the below comment: Before: + * To avoid fetching the publi

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

2022-02-10 Thread Ashutosh Sharma
On Wed, Feb 9, 2022 at 11:53 PM Euler Taveira wrote: > > On Wed, Feb 9, 2022, at 12:06 PM, Ashutosh Sharma wrote: > > Just wondering if we should also be detecting the incorrect conninfo > set with ALTER SUBSCRIPTION command as well. See below: > > -- try creating a subscription with incorrect con

Re: POC: GROUP BY optimization

2022-02-10 Thread Andrey V. Lepikhov
On 1/22/22 01:34, Tomas Vondra wrote: I rebased (with minor fixes) this patch onto current master. Also, second patch dedicated to a problem of "varno 0" (fake_var). I think, this case should make the same estimations as in the case of varno != 0, but no any stats found. So I suppose to rest

Re: Database-level collation version tracking

2022-02-10 Thread Peter Eisentraut
New patch that fixes all reported issues, I think: - Added test for ALTER DATABASE / REFRESH COLLATION VERSION - Rewrote AlterDatabaseRefreshCollVersion() with better locking - Added version checking in createdb()From 290ebb9ca743a2272181f435d5ea76d8a7280a0a Mon Sep 17 00:00:00 2001 From: Peter

Re: decoupling table and index vacuum

2022-02-10 Thread Dilip Kumar
On Wed, Feb 9, 2022 at 7:43 PM Robert Haas wrote: > > On Wed, Feb 9, 2022 at 1:18 AM Dilip Kumar wrote: > I think that dead index tuples really don't matter if they're going to > get removed anyway before a page split happens. In particular, if > we're going to do a bottom-up index deletion pass