Re: AIX support - alignment issues

2022-07-04 Thread Andres Freund
Hi, On 2022-07-05 08:13:21 +0200, Peter Eisentraut wrote: > On 05.07.22 07:31, Andres Freund wrote: > > On 2022-07-02 11:33:54 -0700, Andres Freund wrote: > > > If we decide we want to continue supporting AIX we should bite the bullet > > > and > > > add a 64bit-int TYPALIGN_*. It might be worth

Re: AIX support - alignment issues

2022-07-04 Thread Andres Freund
Hi, On 2022-07-05 01:36:24 -0400, Tom Lane wrote: > Andres Freund writes: > > I just thought an easier way - why don't we introduce a 'catalog_double' > > that's defined to be pg_attribute_aligned(whatever-we-need) on AIX? Then we > > can get rid of the manually enforced alignedness and we don't

Re: AIX support - alignment issues

2022-07-04 Thread Peter Eisentraut
On 05.07.22 07:31, Andres Freund wrote: On 2022-07-02 11:33:54 -0700, Andres Freund wrote: If we decide we want to continue supporting AIX we should bite the bullet and add a 64bit-int TYPALIGN_*. It might be worth to translate that to bytes when building tupledescs, so we don't need more branch

Re: [PATCH] Fix pg_upgrade test from v10

2022-07-04 Thread Anton A. Melnikov
Hello! On 01.07.2022 20:07, Justin Pryzby wrote: Would you add this to to the (next) CF ? Yes, i've put it on september CF. It's silly to say that v9.2 will be supported potentially for a handful more years, but that the upgrade-testing script itself doesn't support that, so developers each

Re: AIX support - alignment issues

2022-07-04 Thread Tom Lane
Andres Freund writes: > I just thought an easier way - why don't we introduce a 'catalog_double' > that's defined to be pg_attribute_aligned(whatever-we-need) on AIX? Then we > can get rid of the manually enforced alignedness and we don't need to contort > catalog order. Hm, do all the AIX compil

Re: [PATCH] Add result_types column to pg_prepared_statements view

2022-07-04 Thread Peter Eisentraut
On 01.07.22 14:27, Dagfinn Ilmari Mannsåker wrote: Peter Eisentraut writes: On 19.05.22 17:34, Dagfinn Ilmari Mannsåker wrote: Prompted by a question on IRC, here's a patch to add a result_types column to the pg_prepared_statements view, so that one can see the types of the columns returned

Re: AIX support - alignment issues

2022-07-04 Thread Andres Freund
Hi, On 2022-07-02 11:33:54 -0700, Andres Freund wrote: > If we decide we want to continue supporting AIX we should bite the bullet and > add a 64bit-int TYPALIGN_*. It might be worth to translate that to bytes when > building tupledescs, so we don't need more branches (reducing them compared to >

Re: AIX support - alignment issues

2022-07-04 Thread Tom Lane
Thomas Munro writes: > On Mon, Jul 4, 2022 at 12:08 PM Tom Lane wrote: >> I would not stand in the way of dropping HP-UX and IA64 support as of >> v16. (I do still feel that HPPA is of interest, to keep us honest >> about spinlock support --- but that dual-stack arrangement that IA64 >> uses is

Re: AIX support - alignment issues

2022-07-04 Thread Thomas Munro
On Mon, Jul 4, 2022 at 12:08 PM Tom Lane wrote: > I would not stand in the way of dropping HP-UX and IA64 support as of > v16. (I do still feel that HPPA is of interest, to keep us honest > about spinlock support --- but that dual-stack arrangement that IA64 > uses is surely not part of anyone's

Re: Re-order "disable_on_error" in tab-complete COMPLETE_WITH

2022-07-04 Thread Amit Kapila
On Tue, Jul 5, 2022 at 4:03 AM Peter Smith wrote: > > On Mon, Jul 4, 2022 at 10:29 PM Euler Taveira wrote: > > > > On Mon, Jul 4, 2022, at 5:37 AM, Amit Kapila wrote: > > > > Yeah, it seems we have overlooked this point. I think we can do this > > just for HEAD but as the feature is introduced in

Re: CFM Manager

2022-07-04 Thread Michael Paquier
On Tue, Jul 05, 2022 at 08:17:26AM +0500, Ibrar Ahmed wrote: > If nobody has already volunteered for the next upcoming commitfest. > I'd like to volunteer. I think early to say is better as always. Jacob and Daniel have already volunteered. Based on the number of patches at hand (305 in total), g

Linking issue with libldap on morepork (OpenBSD 6.9)

2022-07-04 Thread Michael Paquier
Hi all, While looking at the buildfarm logs, I have noticed the following thing: https://buildfarm.postgresql.org/cgi-bin/show_stage_log.pl?nm=morepork&dt=2022-07-05%2002%3A45%3A32&stg=recovery-check postgres:/usr/local/lib/libldap_r.so.13.2: /usr/local/lib/libldap.so.13.2 : WARNING: symbol(ldap_

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

2022-07-04 Thread Masahiko Sawada
On Mon, Jul 4, 2022 at 2:07 PM Masahiko Sawada wrote: > > On Tue, Jun 28, 2022 at 10:10 PM John Naylor > wrote: > > > > On Tue, Jun 28, 2022 at 1:24 PM Masahiko Sawada > > wrote: > > > > > > > I > > > > suspect other optimizations would be worth a lot more than using AVX2: > > > > - collapsing

Re: pgsql: dshash: Add sequential scan support.

2022-07-04 Thread Thomas Munro
On Tue, Jul 5, 2022 at 11:25 AM Andres Freund wrote: > On 2022-07-05 11:20:54 +1200, Thomas Munro wrote: > > Since there were 6 places with I-hold-no-lock assertions, I shoved the > > loop into a function so I could do: > > > > - Assert(!status->hash_table->find_locked); > > +

CFM Manager

2022-07-04 Thread Ibrar Ahmed
If nobody has already volunteered for the next upcoming commitfest. I'd like to volunteer. I think early to say is better as always. -- Ibrar Ahmed

Re: Bugs in copyfuncs/equalfuncs support for JSON node types

2022-07-04 Thread Tom Lane
Justin Pryzby writes: > Do the missing fields indicate a deficiency in test coverage ? > _copyJsonTablePlan.pathname and _equalJsonTable.plan. Yeah, I'd say so, but I think constructing a test case to prove it's broken might be more trouble than it's worth --- particularly seeing that we're about

Re: TAP output format in pg_regress

2022-07-04 Thread Andres Freund
Hi, On 2022-07-04 21:56:24 -0400, Tom Lane wrote: > > For non-parallel tests I think we currently print the test name before > > running > > the test, which obviously doesn't work well when needing to print the 'ok' > > 'not ok' first. > > Is this still a consideration? We got rid of serial_sch

Re: Bugs in copyfuncs/equalfuncs support for JSON node types

2022-07-04 Thread Justin Pryzby
On Mon, Jul 04, 2022 at 09:23:08PM -0400, Tom Lane wrote: > In reviewing Peter's patch to auto-generate the backend/nodes > support files, I compared what the patch's script produces to > what is in the code now. I found several discrepancies in the > recently-added parse node types for JSON funct

Re: TAP output format in pg_regress

2022-07-04 Thread Tom Lane
Andres Freund writes: > I think with a bit of care the tap output could be nearly the same > "quality". It might not be the absolute "purest" tap output, but who cares. +1 > For non-parallel tests I think we currently print the test name before running > the test, which obviously doesn't work we

Re: Bugs in copyfuncs/equalfuncs support for JSON node types

2022-07-04 Thread Zhihong Yu
On Mon, Jul 4, 2022 at 6:23 PM Tom Lane wrote: > In reviewing Peter's patch to auto-generate the backend/nodes > support files, I compared what the patch's script produces to > what is in the code now. I found several discrepancies in the > recently-added parse node types for JSON functions, and

Bugs in copyfuncs/equalfuncs support for JSON node types

2022-07-04 Thread Tom Lane
In reviewing Peter's patch to auto-generate the backend/nodes support files, I compared what the patch's script produces to what is in the code now. I found several discrepancies in the recently-added parse node types for JSON functions, and as far as I can see every one of those discrepancies is

Re: avoid multiple hard links to same WAL file after a crash

2022-07-04 Thread Michael Paquier
On Thu, May 05, 2022 at 08:10:02PM +0900, Michael Paquier wrote: > I'd agree with removing all the callers at the end. pgrename() is > quite robust on Windows, but I'd keep the two checks in > writeTimeLineHistory(), as the logic around findNewestTimeLine() would > consider a past TLI history file

Re: Handle infinite recursion in logical replication setup

2022-07-04 Thread Peter Smith
I checked again the v26* patch set. I had no more comments for v26-0001, v26-0002, or v26-0004, but below are some comments for v26-0003. v26-0003 3.1 src/backend/catalog/pg_subscription.c 3.1.a +/* + * Get all relations for subscription that are in a ready state. + * + * Retu

Re: pgsql: dshash: Add sequential scan support.

2022-07-04 Thread Andres Freund
Hi, On 2022-07-05 11:20:54 +1200, Thomas Munro wrote: > On Tue, Jul 5, 2022 at 8:54 AM Andres Freund wrote: > > > Yeah, it's all for assertions... let's just remove it. Those > > > assertions were useful to me at some stage in development but won't > > > hold as well as I thought, at least witho

Re: pgsql: dshash: Add sequential scan support.

2022-07-04 Thread Thomas Munro
On Tue, Jul 5, 2022 at 8:54 AM Andres Freund wrote: > On 2022-07-04 14:55:43 +1200, Thomas Munro wrote: > > > It's per-backend state at least and just used for assertions. We could > > > remove > > > it. Or stop checking it in places where it could be set wrongly: > > > dshash_find() > > > and d

Re: TAP output format in pg_regress

2022-07-04 Thread Andres Freund
Hi, On 2022-07-05 00:06:04 +0200, Daniel Gustafsson wrote: > > On 4 Jul 2022, at 16:27, Peter Eisentraut > > wrote: > > > > On 29.06.22 21:50, Daniel Gustafsson wrote: > >> Attached is a new version of this patch, which completes the TAP output > >> format > >> option such that all codepaths em

Re: Re-order "disable_on_error" in tab-complete COMPLETE_WITH

2022-07-04 Thread Peter Smith
On Mon, Jul 4, 2022 at 10:29 PM Euler Taveira wrote: > > On Mon, Jul 4, 2022, at 5:37 AM, Amit Kapila wrote: > > Yeah, it seems we have overlooked this point. I think we can do this > just for HEAD but as the feature is introduced in PG-15 so there is no > harm in pushing it to PG-15 as well espec

Re: TAP output format in pg_regress

2022-07-04 Thread Daniel Gustafsson
> On 4 Jul 2022, at 16:39, Tom Lane wrote: > > Peter Eisentraut writes: >> I'm not sure what to make of all these options. I think providing a TAP >> output for pg_regress is a good idea. But then do we still need the old >> output? Is it worth maintaining two output formats that display ex

Re: Request for assistance to backport CVE-2022-1552 fixes to 9.6 and 9.4

2022-07-04 Thread Roberto C . Sánchez
On Wed, Jun 08, 2022 at 05:31:22PM -0400, Roberto C. Sánchez wrote: > On Wed, Jun 08, 2022 at 04:15:47PM -0400, Tom Lane wrote: > > Roberto =?iso-8859-1?Q?C=2E_S=E1nchez?= writes: > > > I am investigating backporting the fixes for CVE-2022-1552 to 9.6 and > > > 9.4 as part of Debian LTS and Extend

Re: TAP output format in pg_regress

2022-07-04 Thread Tom Lane
Andres Freund writes: >> Both of those things are fairly critical for test development. You >> need to know what else might be running in parallel with a test case, >> and you need to know whether you just bloated the runtime unreasonably. > That should be doable with tap as well - afaics the ou

Re: TAP output format in pg_regress

2022-07-04 Thread Daniel Gustafsson
> On 4 Jul 2022, at 16:27, Peter Eisentraut > wrote: > > On 29.06.22 21:50, Daniel Gustafsson wrote: >> Attached is a new version of this patch, which completes the TAP output >> format >> option such that all codepaths emitting output are TAP compliant. The >> verbose >> option is fixed to t

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

2022-07-04 Thread Andres Freund
Hi, On 2022-06-28 15:24:11 +0900, Masahiko Sawada wrote: > In both test cases, There is not much difference between using AVX2 > and SSE2. The more mode types, the more time it takes for loading the > data (see sse2_4_16_32_128_256). Yea, at some point the compiler starts using a jump table inste

Re: TAP output format in pg_regress

2022-07-04 Thread Daniel Gustafsson
> On 4 Jul 2022, at 22:13, Andres Freund wrote: > > Hi, > > On 2022-06-29 21:50:45 +0200, Daniel Gustafsson wrote: >> @@ -279,8 +648,7 @@ stop_postmaster(void) >> r = system(buf); >> if (r != 0) >> { >> -fprintf(stderr, _("\n%s: could no

Re: doc: BRIN indexes and autosummarize

2022-07-04 Thread Justin Pryzby
On Mon, Jul 04, 2022 at 09:38:42PM +0200, Alvaro Herrera wrote: > + There are several triggers for initial summarization of a page range > + to occur. If the table is vacuumed, either because > +has been manually invoked or because > + autovacuum causes it, > + all existing unsummarize

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

2022-07-04 Thread Andres Freund
Hi, On 2022-06-16 13:56:55 +0900, Masahiko Sawada wrote: > diff --git a/src/backend/lib/radixtree.c b/src/backend/lib/radixtree.c > new file mode 100644 > index 00..bf87f932fd > --- /dev/null > +++ b/src/backend/lib/radixtree.c > @@ -0,0 +1,1763 @@ > +/*

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

2022-07-04 Thread Andres Freund
Hi, I just noticed that I had a reply forgotten in drafts... On 2022-05-10 10:51:46 +0900, Masahiko Sawada wrote: > To move this project forward, I've implemented radix tree > implementation from scratch while studying Andres's implementation. It > supports insertion, search, and iteration but no

Re: pgsql: dshash: Add sequential scan support.

2022-07-04 Thread Andres Freund
Hi, On 2022-07-04 14:55:43 +1200, Thomas Munro wrote: > Right, as seen in the build farm at [1]. Also reproducible with something > like: > > @@ -269,6 +269,14 @@ dsm_impl_posix(dsm_op op, dsm_handle handle, Size > request_size, > return false; > } > > + /* XXX rand

Re: doc: BRIN indexes and autosummarize

2022-07-04 Thread Jaime Casanova
On Mon, Jul 04, 2022 at 09:38:42PM +0200, Alvaro Herrera wrote: > What about this? > > -- > Álvaro Herrera PostgreSQL Developer — https://www.EnterpriseDB.com/ > "Java is clearly an example of money oriented programming" (A. Stepanov) > diff --git a/doc/src/sgml/brin.sgml b/doc/src/sg

Re: Lazy JIT IR code generation to increase JIT speed with partitions

2022-07-04 Thread Andres Freund
Hi, On 2022-06-27 16:55:55 +0200, David Geier wrote: > Indeed, the total JIT time increases the more modules are used. The reason > for this to happen is that the inlining pass loads and deserializes all to > be inlined modules (.bc files) from disk prior to inlining them via > llvm::IRMover. Ther

Re: Export log_line_prefix(); useful for emit_log_hook.

2022-07-04 Thread Jeff Davis
On Mon, 2022-07-04 at 15:54 +0900, Michael Paquier wrote: > On Wed, Jun 29, 2022 at 03:09:42PM +0200, Alvaro Herrera wrote: > > Hmm, maybe your hypothetical book would prefer to use a different > > setting for log line prefix than Log_line_prefix, so it would make > > sense > > to pass the format s

Re: Lazy JIT IR code generation to increase JIT speed with partitions

2022-07-04 Thread Andres Freund
Hi, On 2022-07-04 06:43:00 +, Luc Vlaming Hummel wrote: > Thanks for reviewing this and the interesting examples! > > Wanted to give a bit of extra insight as to why I'd love to have a system > that can lazily emit JIT code and hence creates roughly a module per function: > In the end I'm ho

Re: Proposal: allow database-specific role memberships

2022-07-04 Thread Kenaniah Cerny
Hi Antonin, First of all, thank you so much for taking the time to review my patch. I'll answer your questions in reverse order: The "unsafe_tests" directory is where the pre-existing role tests were located. According to the readme of the "unsafe_tests" directory, the tests contained within are

Re: TAP output format in pg_regress

2022-07-04 Thread Andres Freund
Hi, On 2022-06-29 21:50:45 +0200, Daniel Gustafsson wrote: > @@ -279,8 +648,7 @@ stop_postmaster(void) > r = system(buf); > if (r != 0) > { > - fprintf(stderr, _("\n%s: could not stop postmaster: > exit code was %d\n"), > -

Re: TAP output format in pg_regress

2022-07-04 Thread Andres Freund
Hi, > Peter Eisentraut writes: > > I'm not sure what to make of all these options. I think providing a TAP > > output for pg_regress is a good idea. But then do we still need the old > > output? Is it worth maintaining two output formats that display exactly > > the same thing in slightly diff

Re: pgsql: Change timeline field of IDENTIFY_SYSTEM to int8

2022-07-04 Thread Peter Eisentraut
On 04.07.22 19:32, Tom Lane wrote: If the result of IDENTIFY_SYSTEM is always sent in text format, then I agree that this isn't very problematic. If there are any clients that fetch it in binary mode, though, this is absolutely a wire protocol break for them The result rows of the replication

Re: doc: BRIN indexes and autosummarize

2022-07-04 Thread Alvaro Herrera
What about this? -- Álvaro Herrera PostgreSQL Developer — https://www.EnterpriseDB.com/ "Java is clearly an example of money oriented programming" (A. Stepanov) diff --git a/doc/src/sgml/brin.sgml b/doc/src/sgml/brin.sgml index caf1ea4cef..0a715d41c7 100644 --- a/doc/src/sgml/brin.sgml

Re: TAP output format in pg_regress

2022-07-04 Thread Peter Eisentraut
On 04.07.22 16:39, Tom Lane wrote: Probably is, because this is bad: ... The proposed default format now hides the fact that some tests are started in parallel. I remember the last time I wanted to tweak the output of the parallel tests, people were very attached to the particular timing and s

Re: Temporary file access API

2022-07-04 Thread Peter Eisentraut
On 04.07.22 18:35, Antonin Houska wrote: Attached is a new version of the patch, to evaluate what the API use in the backend could look like. I haven't touched places where the file is accessed in a non-trivial way, e.g. lseek() / fseek() or pg_pwrite() / pg_pread() is called. Rebased patch set

Re: Handle infinite recursion in logical replication setup

2022-07-04 Thread vignesh C
On Mon, Jul 4, 2022 at 7:44 PM Alvaro Herrera wrote: > > > From d8f8844f877806527b6f3f45320b6ba55a8e3154 Mon Sep 17 00:00:00 2001 > > From: Vigneshwaran C > > Date: Thu, 26 May 2022 19:29:33 +0530 > > Subject: [PATCH v27 1/4] Add a missing test to verify only-local parameter > > in > > test_dec

Re: Handle infinite recursion in logical replication setup

2022-07-04 Thread vignesh C
On Mon, Jul 4, 2022 at 9:23 AM Amit Kapila wrote: > > On Mon, Jul 4, 2022 at 3:59 AM Peter Smith wrote: > > > > On Mon, Jul 4, 2022 at 12:59 AM vignesh C wrote: > > ... > > > > 2. > > > > /* ALTER SUBSCRIPTION SET ( */ > > > > else if (HeadMatches("ALTER", "SUBSCRIPTION", MatchAny) && > > > >

Re: Handle infinite recursion in logical replication setup

2022-07-04 Thread vignesh C
On Mon, Jul 4, 2022 at 1:46 PM shiy.f...@fujitsu.com wrote: > > On Sun, Jul 3, 2022 11:00 PM vignesh C wrote: > > > > Thanks for the comments, the attached v27 patch has the changes for the > > same. > > > > Thanks for updating the patch. > > A comment on 0003 patch: > + /* > +

Re: make install-world fails sometimes in Mac M1

2022-07-04 Thread Tom Lane
Gaddam Sai Ram writes: >       We are using a script to install Postgres from source, the script works > fine in ubuntu and Mac(intel) but mostly fails(works sometimes) in Mac M1.  We have developers (including me) and buildfarm machines using M1 Macs, and nobody else is reporting any big proble

Re: logical replication restrictions

2022-07-04 Thread Euler Taveira
On Wed, Mar 23, 2022, at 6:19 PM, Euler Taveira wrote: > On Mon, Mar 21, 2022, at 10:09 PM, Euler Taveira wrote: >> On Mon, Mar 21, 2022, at 10:04 PM, Andres Freund wrote: >>> On 2022-03-20 21:40:40 -0300, Euler Taveira wrote: >>> > On Mon, Feb 28, 2022, at 9:18 PM, Euler Taveira wrote: >>> > > Lon

Re: pgsql: Change timeline field of IDENTIFY_SYSTEM to int8

2022-07-04 Thread Tom Lane
Peter Eisentraut writes: > On 04.07.22 07:55, Tom Lane wrote: >> But what about whatever code is reading the output? And what if >> that code isn't v16? I can't believe that we can make a wire >> protocol change as summarily as this. > I think a client will either just read the string value and

make install-world fails sometimes in Mac M1

2022-07-04 Thread Gaddam Sai Ram
Hi team,        We are using a script to install Postgres from source, the script works fine in ubuntu and Mac(intel) but mostly fails(works sometimes) in Mac M1.  Configure and make world works fine. But fails during make install-world. /Applications/Xcode.app/Contents/Developer/usr/bin/mak

Re: automatically generating node support functions

2022-07-04 Thread Tom Lane
Peter Eisentraut writes: > [ v6-0001-Automatically-generate-node-support-functions.patch ] I've now spent some time looking at this fairly carefully, and I think this is a direction we can pursue, but I'm not yet happy about the amount of magic knowledge that's embedded in the gen_node_support.pl

Re: Temporary file access API

2022-07-04 Thread Antonin Houska
Antonin Houska wrote: > Robert Haas wrote: > > > On Tue, Apr 12, 2022 at 5:30 AM Antonin Houska wrote: > > > Robert Haas wrote: > > > > On Mon, Apr 11, 2022 at 4:05 AM Antonin Houska wrote: > > > > > There are't really that many kinds of files to encrypt: > > > > > > > > > > https://wiki.pos

Re: doc: BRIN indexes and autosummarize

2022-07-04 Thread Alvaro Herrera
On 2022-Jun-28, Roberto Mello wrote: > Here's a patch to clarify the BRIN indexes documentation, particularly with > regards to autosummarize, vacuum and autovacuum. It basically breaks > down a big blob of a paragraph into multiple paragraphs for clarity, > plus explicitly tells how summarization

Re: TAP output format in pg_regress

2022-07-04 Thread Tom Lane
Peter Eisentraut writes: > I'm not sure what to make of all these options. I think providing a TAP > output for pg_regress is a good idea. But then do we still need the old > output? Is it worth maintaining two output formats that display exactly > the same thing in slightly different ways?

Re: TAP output format in pg_regress

2022-07-04 Thread Peter Eisentraut
On 29.06.22 21:50, Daniel Gustafsson wrote: Attached is a new version of this patch, which completes the TAP output format option such that all codepaths emitting output are TAP compliant. The verbose option is fixed to to not output extraneous newlines which the previous PoC did. The output it

Re: Handle infinite recursion in logical replication setup

2022-07-04 Thread Alvaro Herrera
> From d8f8844f877806527b6f3f45320b6ba55a8e3154 Mon Sep 17 00:00:00 2001 > From: Vigneshwaran C > Date: Thu, 26 May 2022 19:29:33 +0530 > Subject: [PATCH v27 1/4] Add a missing test to verify only-local parameter in > test_decoding plugin. > > Add a missing test to verify only-local parameter in

Re: Removing unneeded self joins

2022-07-04 Thread Zhihong Yu
On Mon, Jul 4, 2022 at 6:52 AM Ronan Dunklau wrote: > Le jeudi 30 juin 2022, 16:11:51 CEST Andrey Lepikhov a écrit : > > On 19/5/2022 16:47, Ronan Dunklau wrote: > > > I'll take a look at that one. > > > > New version of the patch, rebased on current master: > > 1. pgindent over the patch have pa

Re: [PATCH] Compression dictionaries for JSONB

2022-07-04 Thread Aleksander Alekseev
Hi Matthias, > > Although there is also a high-level idea (according to the > > presentations) to share common data between different TOASTed values, > > similarly to what compression dictionaries do, by looking at the > > current feedback and considering the overall complexity and the amount > >

Re: pgsql: Change timeline field of IDENTIFY_SYSTEM to int8

2022-07-04 Thread Peter Eisentraut
On 04.07.22 07:55, Tom Lane wrote: Peter Eisentraut writes: Change timeline field of IDENTIFY_SYSTEM to int8 Surely this patch is far from complete? To start with, just a few lines down in IdentifySystem() the column is filled using Int32GetDatum not Int64GetDatum. I will get some popcorn

Re: Removing unneeded self joins

2022-07-04 Thread Ronan Dunklau
Le jeudi 30 juin 2022, 16:11:51 CEST Andrey Lepikhov a écrit : > On 19/5/2022 16:47, Ronan Dunklau wrote: > > I'll take a look at that one. > > New version of the patch, rebased on current master: > 1. pgindent over the patch have passed. > 2. number of changed files is reduced. > 3. Some document

Re: list of TransactionIds

2022-07-04 Thread Alvaro Herrera
On 2022-May-16, Amit Kapila wrote: > On Sun, May 15, 2022 at 5:05 PM Alvaro Herrera > wrote: > > I hesitate to add this the day just before beta. This is already in > > pg14, so maybe it's not a big deal if pg15 remains the same for the time > > being. Or we can change it for beta2. Or we co

Re: Minimal logical decoding on standbys

2022-07-04 Thread Ibrar Ahmed
On Mon, Jul 4, 2022 at 6:12 PM Drouvot, Bertrand wrote: > Hi, > On 7/1/22 10:03 PM, Ibrar Ahmed wrote: > > > On Thu, Jun 30, 2022 at 1:49 PM Drouvot, Bertrand > wrote: > >> I'm going to re-create a CF entry for it, as: >> >> - It seems there is a clear interest for the feature (given the time >>

Re: Patch proposal: New hooks in the connection path

2022-07-04 Thread Zhihong Yu
On Mon, Jul 4, 2022 at 5:54 AM Drouvot, Bertrand wrote: > Hi, > > On 7/2/22 1:00 AM, Nathan Bossart wrote: > > Could we model this after fmgr_hook? The first argument in that hook > > indicates where it is being called from. This doesn't alleviate the need > > for several calls to the hook in t

Re: [PATCH] Compression dictionaries for JSONB

2022-07-04 Thread Matthias van de Meent
Hi Alexander, On Fri, 17 Jun 2022 at 17:04, Aleksander Alekseev wrote: >> These are just my initial thoughts I would like to share though. I may >> change my mind after diving deeper into a "pluggable TOASTer" patch. > > I familiarized myself with the "pluggable TOASTer" thread and joined > the d

Re: [BUG] Logical replication failure "ERROR: could not map filenode "base/13237/442428" to relation OID" with catalog modifying txns

2022-07-04 Thread Amit Kapila
On Mon, May 30, 2022 at 11:13 AM Masahiko Sawada wrote: > > I've attached three POC patches: > I think it will be a good idea if you can add a short commit message at least to say which patch is proposed for HEAD and which one is for back branches. Also, it would be good if you can add some descr

Re: Re-order "disable_on_error" in tab-complete COMPLETE_WITH

2022-07-04 Thread Euler Taveira
On Mon, Jul 4, 2022, at 5:37 AM, Amit Kapila wrote: > Yeah, it seems we have overlooked this point. I think we can do this > just for HEAD but as the feature is introduced in PG-15 so there is no > harm in pushing it to PG-15 as well especially because it is a > straightforward change. What do you

Re: automatically generating node support functions

2022-07-04 Thread Peter Eisentraut
On 03.07.22 21:14, Tom Lane wrote: Peter Eisentraut writes: Here is a patch that reformats the relevant (and a few more) comments that way. This has been run through pgindent, so the formatting should be stable. Now that that's been pushed, the main patch is of course quite broken. Are you w

Re: generate_series for timestamptz and time zone problem

2022-07-04 Thread Przemysław Sztoch
Przemysław Sztoch wrote on 01.07.2022 15:43: Gurjeet Singh wrote on 01.07.2022 06:35: On Tue, Jun 21, 2022 at 7:56 AM Przemysław Sztoch wrote: Please give me feedback on how to properly store the timezone name in the function context structure. I can't finish my work without it. The way I se

Re: EINTR in ftruncate()

2022-07-04 Thread Alvaro Herrera
On 2022-Jul-01, Andres Freund wrote: > On 2022-07-01 19:55:16 +0200, Alvaro Herrera wrote: > > On 2022-Jul-01, Andres Freund wrote: > > > What is the reason for the || ProcDiePending || QueryCancelPending bit? > > > What > > > if there's dsm operations intentionally done while QueryCancelPending

Re: generate_series for timestamptz and time zone problem

2022-07-04 Thread Przemysław Sztoch
Tom Lane wrote on 04.07.2022 00:31: =?UTF-8?Q?Przemys=c5=82aw_Sztoch?= writes: I have problem with this: -- Considering only built-in procs (prolang = 12), look for multiple uses -- of the same internal function (ie, matching prosrc fields).  It's OK to -- have several entries with different pr

Re: Error from the foreign RDBMS on a foreign table I have no privilege on

2022-07-04 Thread Etsuro Fujita
On Fri, Jun 10, 2022 at 6:17 PM Laurenz Albe wrote: > On Fri, 2022-06-10 at 17:17 +0900, Etsuro Fujita wrote: > > > I am not sure if it worth adding to the documentation. I would never > > > have thought > > > of the problem if Phil hadn't brought it up. On the other hand, I was > > > surprise

Re: pgsql: dshash: Add sequential scan support.

2022-07-04 Thread Zhihong Yu
On Sun, Jul 3, 2022 at 7:56 PM Thomas Munro wrote: > [Re-directing to -hackers] > > On Fri, Mar 11, 2022 at 2:27 PM Andres Freund wrote: > > On 2022-03-10 20:09:56 -0500, Tom Lane wrote: > > > Andres Freund writes: > > > > dshash: Add sequential scan support. > > > > Add ability to scan all ent

Re: Handle infinite recursion in logical replication setup

2022-07-04 Thread Amit Kapila
On Sun, Jul 3, 2022 at 8:29 PM vignesh C wrote: > Review comments === 1. @@ -530,7 +557,7 @@ CreateSubscription(ParseState *pstate, CreateSubscriptionStmt *stmt, SUBOPT_SLOT_NAME | SUBOPT_COPY_DATA | SUBOPT_SYNCHRONOUS_COMMIT | SUBOPT_BINARY | SUBOPT_STREAMING | SUBOPT_TWO

Re: Using PQexecQuery in pipeline mode produces unexpected Close messages

2022-07-04 Thread Alvaro Herrera
On 2022-Jul-04, Alvaro Herrera wrote: > BTW I patch for the problem with uniqviol also (not fixed by v7). I'll > send an updated patch in a little while. Here it is. I ran "libpq_pipeline uniqviol" in a tight loop a few thousand times and didn't get any error. Before these fixes, it would fail

Add last_vacuum_index_scans in pg_stat_all_tables

2022-07-04 Thread Ken Kato
Hi hackers, I think having number of index scans of the last vacuum in pg_stat_all_tables can be helpful. This value shows how efficiently vacuums have performed and can be an indicator to increase maintenance_work_mem. It was proposed previously[1], but it was not accepted due to the limi

Re: Emit extra debug message when executing extension script.

2022-07-04 Thread Alvaro Herrera
On 2022-Jun-29, Robert Haas wrote: > On Wed, Jun 29, 2022 at 9:26 AM Peter Eisentraut > wrote: > > On 28.06.22 21:10, Jeff Davis wrote: > > > + ereport(DEBUG1, errmsg("executing extension script: %s", filename)); > > > > This should either be elog or use errmsg_internal. > > Why? The reason

Re: Using PQexecQuery in pipeline mode produces unexpected Close messages

2022-07-04 Thread Alvaro Herrera
On 2022-Jul-04, Kyotaro Horiguchi wrote: > At Wed, 29 Jun 2022 14:09:17 +0200, Alvaro Herrera > wrote in > > However, another problem case, not fixed by PIPELINE_IDLE, occurs if you > > exit pipeline mode after PQsendQuery() and then immediately use > > PQexec(). The CloseComplete will be rec

RE: Handle infinite recursion in logical replication setup

2022-07-04 Thread shiy.f...@fujitsu.com
On Mon, Jul 4, 2022 4:17 PM shiy.f...@fujitsu.com wrote: > > On Sun, Jul 3, 2022 11:00 PM vignesh C wrote: > > > > Thanks for the comments, the attached v27 patch has the changes for the > > same. > > > > Thanks for updating the patch. > > A comment on 0003 patch: > > I think we should call E

Re: Re-order "disable_on_error" in tab-complete COMPLETE_WITH

2022-07-04 Thread Amit Kapila
On Mon, Jul 4, 2022 at 1:07 PM Peter Smith wrote: > > By convention, the tab-complete logical replication subscription > parameters are listed in the COMPLETE_WITH lists in alphabetical > order, but when the "disable_on_error" parameter was added this was > not done. > Yeah, it seems we have over

Re: pgsql: dshash: Add sequential scan support.

2022-07-04 Thread Kyotaro Horiguchi
At Mon, 4 Jul 2022 14:55:43 +1200, Thomas Munro wrote in > [Re-directing to -hackers] > > On Fri, Mar 11, 2022 at 2:27 PM Andres Freund wrote: > > It's per-backend state at least and just used for assertions. We could > > remove > > it. Or stop checking it in places where it could be set wron

Re: Using PQexecQuery in pipeline mode produces unexpected Close messages

2022-07-04 Thread Kyotaro Horiguchi
Thanks for the further testing scenario. At Wed, 29 Jun 2022 14:09:17 +0200, Alvaro Herrera wrote in > So I wrote some more test scenarios for this, and as I wrote in some > other thread, I realized that there are more problems than just some > NOTICE trouble. For instance, if you send a query

Re: Allowing REINDEX to have an optional name

2022-07-04 Thread Alvaro Herrera
On 2022-Jun-29, Simon Riggs wrote: > > -if (strcmp(objectName, get_database_name(objectOid)) != 0) > > +if (objectName && strcmp(objectName, get_database_name(objectOid)) > > != 0) > > ereport(ERROR, > > (errcode(ERRCODE_FEATURE_NOT_SUPPORTED), >

RE: Handle infinite recursion in logical replication setup

2022-07-04 Thread shiy.f...@fujitsu.com
On Sun, Jul 3, 2022 11:00 PM vignesh C wrote: > > Thanks for the comments, the attached v27 patch has the changes for the > same. > Thanks for updating the patch. A comment on 0003 patch: + /* +* No need to throw an error for the tables that are in ready state, +

Re-order "disable_on_error" in tab-complete COMPLETE_WITH

2022-07-04 Thread Peter Smith
Hi. By convention, the tab-complete logical replication subscription parameters are listed in the COMPLETE_WITH lists in alphabetical order, but when the "disable_on_error" parameter was added this was not done. This patch just tidies that up; there is no functional change. PSA -- Kind Rega

Re: Prevent writes on large objects in read-only transactions

2022-07-04 Thread Yugo NAGATA
On Mon, 4 Jul 2022 15:51:32 +0900 Michael Paquier wrote: > On Wed, Jun 29, 2022 at 05:29:50PM +0900, Yugo NAGATA wrote: > > Thank you for reviewing the patch. I attached the updated patch. > > Thanks for the new version. I have looked at that again, and the set > of changes seem fine (including

Re: Allowing REINDEX to have an optional name

2022-07-04 Thread Michael Paquier
On Sun, Jul 03, 2022 at 05:41:31PM -0400, Tom Lane wrote: > This is marked as Ready for Committer, but that seems unduly > optimistic. Please note that patch authors should not switch a patch as RfC by themselves. This is something that a reviewer should do. > The cfbot shows that it's failing o