Re: Stats collector's idx_blks_hit value is highly misleading in practice

2022-08-10 Thread Sergey Dudoladov
Hi again, Having played with the task for a little while, I am no longer sure it completely justifies the effort involved. The reason being the task requires modifying the buffer pool in one way or the other, which implies (a) significant effort on performance testing and (b) changes in the

Re: use SSE2 for is_valid_ascii

2022-08-10 Thread Nathan Bossart
On Thu, Aug 11, 2022 at 11:10:34AM +0700, John Naylor wrote: >> I wonder if reusing a zero vector (instead of creating a new one every >> time) has any noticeable effect on performance. > > Creating a zeroed register is just FOO PXOR FOO, which should get > hoisted out of the (unrolled in this

Re: SUBTRANS: Minimizing calls to SubTransSetParent()

2022-08-10 Thread Dilip Kumar
On Wed, Aug 10, 2022 at 6:31 PM Simon Riggs wrote: > > On Wed, 10 Aug 2022 at 08:34, Dilip Kumar wrote: > > > > Am I still missing something? > > No, you have found a dependency between the patches that I was unaware > of. So there is no bug if you apply both patches. Right > > > So I still

Re: making relfilenodes 56 bits

2022-08-10 Thread Dilip Kumar
On Tue, Aug 9, 2022 at 8:51 PM Robert Haas wrote: > > On Fri, Aug 5, 2022 at 3:25 AM Dilip Kumar wrote: > > I think even if we start the range from the 4 billion we can not avoid > > keeping two separate ranges for system and user tables otherwise the > > next upgrade where old and new clusters

Re: optimize lookups in snapshot [sub]xip arrays

2022-08-10 Thread Nathan Bossart
On Thu, Aug 11, 2022 at 09:50:54AM +0700, John Naylor wrote: > I was waiting for all the Windows animals to report in, and it looks > like they have, so I've pushed 0002. Thanks for picking this topic up > again! Thanks for reviewing and committing. -- Nathan Bossart Amazon Web Services:

Re: [RFC] building postgres with meson

2022-08-10 Thread Tom Lane
John Naylor writes: > I'll volunteer to work on this unless an easier solution happens to > come along in the next couple days. (aside: guc-file.l doesn't have a > grammar, so not yet sure if that makes the issue easier or harder...) That one's probably mostly about the issue mentioned in the

Re: Refactor backup related code (was: Is it correct to say, "invalid data in file \"%s\"", BACKUP_LABEL_FILE in do_pg_backup_stop?)

2022-08-10 Thread Bharath Rupireddy
On Mon, Aug 8, 2022 at 7:20 PM Bharath Rupireddy wrote: > > > Please review. > > I added this to current CF - https://commitfest.postgresql.org/39/3808/ Here's the v2 patch, no change from v1, just rebased because of commit a8c012869763c711abc9085f54b2a100b60a85fa (Move basebackup code to new

Re: use SSE2 for is_valid_ascii

2022-08-10 Thread John Naylor
On Thu, Aug 11, 2022 at 5:31 AM Nathan Bossart wrote: > > This is a neat patch. I don't know that we need an entirely separate code > block for the USE_SSE2 path, but I do think that a little bit of extra > commentary would improve the readability. IMO the existing comment for the > zero

Re: [RFC] building postgres with meson

2022-08-10 Thread Andres Freund
Hi, On 2022-08-11 10:57:33 +0700, John Naylor wrote: > I'll volunteer to work on this unless an easier solution happens to > come along in the next couple days. Cool! > (aside: guc-file.l doesn't have a grammar, so not yet sure if that makes the > issue easier or harder...) I think we should

tests and meson - test names and file locations

2022-08-10 Thread Andres Freund
Hi, One of the things motivating me to work on the meson conversion is the ability to run tests in an easily understandable way. Meson has a testrunner that both allows to run all tests at once, and run subsets of tests. = Test and testsuite naming = Each test has a unique name, and 0-n labels

Re: [RFC] building postgres with meson

2022-08-10 Thread John Naylor
On Thu, Aug 11, 2022 at 10:37 AM Tom Lane wrote: > > John Naylor writes: > > With a bit of work, we could probably get rid of those includes. See > > 27199058d98ef7f for one example. > > Yeah --- it would mean creating gram.h files for all the bison grammars > not just a few of them, but it's

Re: [RFC] building postgres with meson

2022-08-10 Thread Tom Lane
I wrote: > John Naylor writes: >> With a bit of work, we could probably get rid of those includes. See >> 27199058d98ef7f for one example. > Yeah --- it would mean creating gram.h files for all the bison grammars > not just a few of them, but it's certainly do-able if there's motivation > to

Re: [RFC] building postgres with meson

2022-08-10 Thread Tom Lane
John Naylor writes: > With a bit of work, we could probably get rid of those includes. See > 27199058d98ef7f for one example. Yeah --- it would mean creating gram.h files for all the bison grammars not just a few of them, but it's certainly do-able if there's motivation to make the changes.

Re: [RFC] building postgres with meson

2022-08-10 Thread John Naylor
On Thu, Aug 11, 2022 at 12:19 AM Andres Freund wrote: > I tried to ignore various generated files in the source tree, but I don't > think it's doable for all of them. Consider > e.g. src/backend/utils/misc/guc-file.c which is gets built via #include > "guc-file.c" from gram.c With a bit of work,

Re: Using each rel as both outer and inner for JOIN_ANTI

2022-08-10 Thread Richard Guo
On Wed, Aug 10, 2022 at 4:40 PM Alvaro Herrera wrote: > On 2022-Aug-10, Richard Guo wrote: > > > The right-anti join plan has the same cost estimation with right join > > plan in this case. So would you please help to test what the right join > > plan looks like in your env for the query below?

Re: optimize lookups in snapshot [sub]xip arrays

2022-08-10 Thread John Naylor
On Thu, Aug 11, 2022 at 4:46 AM Nathan Bossart wrote: > > On Wed, Aug 10, 2022 at 10:50:02AM +0700, John Naylor wrote: > > LGTM, let's see what the buildfarm thinks of 0001. > > Thanks! I haven't noticed any related buildfarm failures yet. I was waiting for all the Windows animals to report in,

Re: Allow logical replication to copy tables in binary format

2022-08-10 Thread Euler Taveira
On Wed, Aug 10, 2022, at 12:03 PM, Melih Mutlu wrote: > I see that logical replication subscriptions have an option to enable binary > [1]. > When it's enabled, subscription requests publisher to send data in binary > format. > But this is only the case for apply phase. In tablesync, tables

Re: Get the statistics based on the application name and IP address

2022-08-10 Thread Julien Rouhaud
Hi, On Wed, Aug 10, 2022 at 10:42:31PM +0500, Ibrar Ahmed wrote: > On Mon, Aug 8, 2022 at 10:11 PM Julien Rouhaud wrote: > > > First, for now each entry contains its own > > query text in the query file. There can already be some duplication, which > > isn't great, but adding the

Re: Checking pgwin32_is_junction() errors

2022-08-10 Thread Thomas Munro
On Tue, Aug 9, 2022 at 10:59 PM wrote: > On 2022-08-09 05:44, Thomas Munro wrote: > > On Tue, Aug 9, 2022 at 8:30 AM Thomas Munro > > wrote: > >> On Mon, Aug 8, 2022 at 8:23 PM wrote: > >> > "C:/HOME" is the junction point to the second volume on my hard drive - > >> > "\??\Volume{GUID}\" which

Re: use SSE2 for is_valid_ascii

2022-08-10 Thread Nathan Bossart
On Wed, Aug 10, 2022 at 01:50:14PM +0700, John Naylor wrote: > Here is an updated patch using the new USE_SSE2 symbol. The style is > different from the last one in that each stanza has platform-specific > code. I wanted to try it this way because is_valid_ascii() is already > written in SIMD-ish

Re: shared-memory based stats collector - v70

2022-08-10 Thread Andres Freund
Hi, On 2022-08-10 15:48:15 -0400, Greg Stark wrote: > One thing that's bugging me is that the names we use for these stats > are *all* over the place. Yes. I had a huge issue with this when polishing the patch. And Horiguchi-san did as well. I had to limit the amount of cleanup done to make it

Re: shared-memory based stats collector - v70

2022-08-10 Thread Andres Freund
Hi, On 2022-08-10 14:18:25 -0400, Greg Stark wrote: > > I don't think that's a large enough issue to worry about unless you're > > polling at a very high rate, which'd be a bad idea in itself. If a backend > > can't get the lock for some stats change it'll defer flushing the stats a > > bit, > >

Re: optimize lookups in snapshot [sub]xip arrays

2022-08-10 Thread Nathan Bossart
On Wed, Aug 10, 2022 at 10:50:02AM +0700, John Naylor wrote: > LGTM, let's see what the buildfarm thinks of 0001. Thanks! I haven't noticed any related buildfarm failures yet. -- Nathan Bossart Amazon Web Services: https://aws.amazon.com

Re: shared-memory based stats collector - v70

2022-08-10 Thread Greg Stark
On Wed, 10 Aug 2022 at 04:05, Drouvot, Bertrand wrote: > > Hi, > > On 8/9/22 6:00 PM, Greg Stark wrote: > > On Tue, 9 Aug 2022 at 06:19, Drouvot, Bertrand wrote: > >> > >> What do you think about adding a function in core PG to provide such > >> functionality? (means being able to retrieve all

Re: logical replication restrictions

2022-08-10 Thread Euler Taveira
On Wed, Aug 10, 2022, at 9:39 AM, osumi.takami...@fujitsu.com wrote: > Minor review comments for v6. Thanks for your review. I'm attaching v7. > "If the subscriber sets min_apply_delay parameter, ..." > > I suggest we use subscription rather than subscriber, because > this parameter refers to

Re: pg_auth_members.grantor is bunk

2022-08-10 Thread Robert Haas
On Mon, Aug 1, 2022 at 3:51 PM Robert Haas wrote: > On Mon, Aug 1, 2022 at 1:38 PM Tom Lane wrote: > >> I think the latter --- the cfbot thinks the July CF is no longer relevant, > > but Jacob hasn't yet moved your patches forward. You could wait for > > him to do that, or do it yourself. > >

Re: shared-memory based stats collector - v70

2022-08-10 Thread Greg Stark
One thing that's bugging me is that the names we use for these stats are *all* over the place. The names go through three different stages pgstat structs -> pgstatfunc tupledescs -> pg_stat_* views (Followed by a fourth stage where pg_exporter or whatever names for the monitoring software)

Re: something has gone wrong, but what is it?

2022-08-10 Thread Robert Haas
On Wed, Aug 10, 2022 at 2:06 PM Andrey Borodin wrote: > > On 10 Aug 2022, at 19:49, Robert Haas wrote: > > After a bit of further looking around I noticed that there's another > > check for an invalid auxtype in this function which uses a slightly > > different message text and also PANIC rather

Re: shared-memory based stats collector - v70

2022-08-10 Thread Greg Stark
On Tue, 9 Aug 2022 at 12:48, Andres Freund wrote: > > The reason I want a C function is I'm trying to get as far as I can > > without a connection to a database, without a transaction, without > > accessing the catalog, and as much as possible without taking locks. > > I assume you don't include

Re: something has gone wrong, but what is it?

2022-08-10 Thread Andrey Borodin
> On 10 Aug 2022, at 19:49, Robert Haas wrote: > > After a bit of further looking around I noticed that there's another > check for an invalid auxtype in this function which uses a slightly > different message text and also PANIC rather than ERROR. Is there a reason to do MyBackendType =

Re: moving basebackup code to its own directory

2022-08-10 Thread Robert Haas
On Wed, Aug 10, 2022 at 12:57 PM Alvaro Herrera wrote: > Given that 10 of these 11 files are new in 15, I definitely agree with > backpatching the move. OK, done. -- Robert Haas EDB: http://www.enterprisedb.com

Re: Get the statistics based on the application name and IP address

2022-08-10 Thread Ibrar Ahmed
On Mon, Aug 8, 2022 at 10:11 PM Julien Rouhaud wrote: > Hi, > > On Mon, Aug 08, 2022 at 08:21:06PM +0500, Ibrar Ahmed wrote: > > While working on pg_stat_stements, I got some questions from customers to > > have statistics by application and IP address. > > [...] > > name. I did some POC and had

Re: [RFC] building postgres with meson

2022-08-10 Thread Andres Freund
Hi, On 2022-06-02 10:26:09 -0700, Andres Freund wrote: > > Could we have the meson build check that, say, if gram.c exists it > > is newer than gram.y? Or get it to ignore an in-tree gram.c? > > I suspect the problem with ignoring is gram.h, that's probably a bit harder to > ignore. I tried to

Re: [PATCH] CF app: add "Returned: Needs more interest"

2022-08-10 Thread Bruce Momjian
On Wed, Aug 3, 2022 at 02:53:23PM -0400, Tom Lane wrote: > Andres Freund writes: > > My impression is that a lot of the patches floating from CF to CF have > > gotten > > sceptical feedback and at best a minor amount of work to address that has > > been > > done. > > That I think is a

Re: moving basebackup code to its own directory

2022-08-10 Thread Alvaro Herrera
On 2022-Aug-10, Robert Haas wrote: > David Steele voted for back-patching this on the grounds that it would > make future back-patching easier, which is an argument that seems to > me to have some merit, although on the other hand, we are already into > August so it's quite late in the day.

Re: designated initializers

2022-08-10 Thread Andres Freund
Hi, On 2022-08-10 16:03:00 +0200, Alvaro Herrera wrote: > (Coming from > https://postgr.es/m/20220809193616.5uucf33piwdxn452@alvherre.pgsql ) > > On 2022-Aug-09, Alvaro Herrera wrote: > > > On 2022-Aug-09, Andres Freund wrote: > > > > > Mildly wondering whether we ought to use designated

Re: moving basebackup code to its own directory

2022-08-10 Thread Jonathan S. Katz
On 8/10/22 12:32 PM, Magnus Hagander wrote: On Wed, Aug 10, 2022 at 6:20 PM Tom Lane wrote: Robert Haas writes: David Steele voted for back-patching this on the grounds that it would make future back-patching easier, which is an argument that seems to me to have some merit, although on the

Re: moving basebackup code to its own directory

2022-08-10 Thread Magnus Hagander
On Wed, Aug 10, 2022 at 6:20 PM Tom Lane wrote: > > Robert Haas writes: > > David Steele voted for back-patching this on the grounds that it would > > make future back-patching easier, which is an argument that seems to > > me to have some merit, although on the other hand, we are already into >

Re: moving basebackup code to its own directory

2022-08-10 Thread Tom Lane
Robert Haas writes: > David Steele voted for back-patching this on the grounds that it would > make future back-patching easier, which is an argument that seems to > me to have some merit, although on the other hand, we are already into > August so it's quite late in the day. Anyone else want to

use argument instead of global variable

2022-08-10 Thread Junwang Zhao
The caller of `get_stats_option_name` pass optarg as the argument, it's saner to use the argument instead of the global variable set by getopt, which is more safe since the argument has a *const* specifier. diff --git a/src/backend/tcop/postgres.c b/src/backend/tcop/postgres.c index

Re: SQL/JSON features for v15

2022-08-10 Thread Andrew Dunstan
On 2022-08-09 Tu 16:58, Jonathan S. Katz wrote: > Hi, > > (Personal hat, not RMT hat unless otherwise noted). > > This thread[1] raised some concerns around the implementation of the > SQL/JSON features that are slated for v15, which includes an > outstanding open item[2]. Given the current

fix stale help message

2022-08-10 Thread Junwang Zhao
when parsing command-line options, the -f option support disabling 8 scan and join methods, o, b and t disable index-only scans, bitmap index scans, and TID scans respectively, add them to the help message. diff --git a/src/backend/main/main.c b/src/backend/main/main.c index

Re: [PATCH] Expose port->authn_id to extensions and triggers

2022-08-10 Thread Jacob Champion
On Tue, Aug 9, 2022 at 3:39 AM Drouvot, Bertrand wrote: > Agree that it makes sense to work on those patches in this particular > order then. Sounds good. The ClientConnectionInfo patch (previously 0002) is attached, with the SQL function removed. Thanks, --Jacob From

Allow logical replication to copy tables in binary format

2022-08-10 Thread Melih Mutlu
Hey hackers, I see that logical replication subscriptions have an option to enable binary [1]. When it's enabled, subscription requests publisher to send data in binary format. But this is only the case for apply phase. In tablesync, tables are still copied as text. To copy tables, COPY command

Re: Generalize ereport_startup_progress infrastructure

2022-08-10 Thread Robert Haas
On Tue, Aug 9, 2022 at 11:54 AM Bharath Rupireddy wrote: > I'm attaching 0002 for reporting removal of temp files and temp > relation files by postmaster. > > If this looks okay, I can code 0003 for reporting processing of > snapshot, mapping and old WAL files by checkpointer. I think that

Re: something has gone wrong, but what is it?

2022-08-10 Thread Andres Freund
Hi, On 2022-08-10 10:49:59 -0400, Robert Haas wrote: > On Wed, Aug 10, 2022 at 9:53 AM Tom Lane wrote: > > Robert Haas writes: > > > > - elog(ERROR, "something has gone wrong"); > > + elog(ERROR, "unrecognized AuxProcType: %d", (int) > > auxtype); >

SPI versus read/write expanded datums

2022-08-10 Thread Tom Lane
In the report at [1] we learned that the SQL-language function handler is too cavalier about read/write expanded datums that it receives as input. A function that receives such a datum is entitled to scribble on its value, or even delete it. If the function turns around and passes the datum on to

Re: something has gone wrong, but what is it?

2022-08-10 Thread Robert Haas
On Wed, Aug 10, 2022 at 9:53 AM Tom Lane wrote: > Robert Haas writes: > > - elog(ERROR, "something has gone wrong"); > + elog(ERROR, "unrecognized AuxProcType: %d", (int) > auxtype); > > +1 ... the existing message is clearly not up to project

Re: moving basebackup code to its own directory

2022-08-10 Thread Justin Pryzby
On Wed, Aug 10, 2022 at 10:08:02AM -0400, Robert Haas wrote: > On Tue, Aug 9, 2022 at 3:28 PM Robert Haas wrote: > > On Tue, Aug 9, 2022 at 2:40 PM Justin Pryzby wrote: > > > It looks like this updates the header comments in the .h files but not > > > the .c > > > files. > > > > > > Personally,

Re: moving basebackup code to its own directory

2022-08-10 Thread Robert Haas
On Tue, Aug 9, 2022 at 3:28 PM Robert Haas wrote: > On Tue, Aug 9, 2022 at 2:40 PM Justin Pryzby wrote: > > It looks like this updates the header comments in the .h files but not the > > .c > > files. > > > > Personally, I find these to be silly boilerplate .. > > Here is a version with some

designated initializers

2022-08-10 Thread Alvaro Herrera
(Coming from https://postgr.es/m/20220809193616.5uucf33piwdxn452@alvherre.pgsql ) On 2022-Aug-09, Alvaro Herrera wrote: > On 2022-Aug-09, Andres Freund wrote: > > > Mildly wondering whether we ought to use designated initializers instead, > > given we're whacking it around already. Too easy to

Re: s390x builds on buildfarm

2022-08-10 Thread Andrew Dunstan
On 2022-08-10 We 09:04, Vivian Kong wrote: > > Hi, > >   > > Are builds being paused on s390x as it looks like the s390x builds > were last run 15 days ago.  If so, wondering what is the reason for > the pause and what is required to resume the builds? > The OS the builds were running on seems

Re: something has gone wrong, but what is it?

2022-08-10 Thread Tom Lane
Robert Haas writes: - elog(ERROR, "something has gone wrong"); + elog(ERROR, "unrecognized AuxProcType: %d", (int) auxtype); +1 ... the existing message is clearly not up to project standard. regards, tom lane

Re: something has gone wrong, but what is it?

2022-08-10 Thread Daniel Gustafsson
> On 10 Aug 2022, at 15:41, Robert Haas wrote: > I feel we could do better still, as in the attached. +1, LGTM. -- Daniel Gustafsson https://vmware.com/

Re: pg_get_constraintdef: Schema qualify foreign tables unless pretty printing is enabled

2022-08-10 Thread Tom Lane
Alvaro Herrera writes: > On 2022-Aug-09, Lukas Fittl wrote: >> But I wonder, why do we have an explicit pretty printing flag on these >> functions, and PRETTYFLAG_SCHEMA in the code to represent this behavior. >> If we don't want pretty printing to affect schema qualification, why >> does that

something has gone wrong, but what is it?

2022-08-10 Thread Robert Haas
Hi, Today while hacking I encountered this delight: 2022-08-10 09:30:29.025 EDT [27126] FATAL: something has gone wrong I actually already knew that something had gone wrong, because the code I was writing was incomplete. And if I hadn't known that, the word FATAL would have been a real good

RE: [PATCH] Use indexes on the subscriber when REPLICA IDENTITY is full on the publisher

2022-08-10 Thread osumi.takami...@fujitsu.com
On Tuesday, August 9, 2022 12:59 AM Önder Kalacı wrote: > Attaching v5 of the patch which reflects the review on this email, also few > minor test improvements. Hi, Thank you for the updated patch. FYI, I noticed that v5 causes cfbot failure in [1]. Could you please fix it in the next version ?

Re: PG 15 (and to a smaller degree 14) regression due to ExprEvalStep size

2022-08-10 Thread Amit Langote
On Wed, Aug 10, 2022 at 3:57 AM Andres Freund wrote: > One way this code could be drastically simplified is to force all > type-coercions to go through the "io coercion" path, which could be > implemented as a single execution step (which thus could trivially > start/finish a subtransaction) and

Re: hash_xlog_split_allocate_page: failed to acquire cleanup lock

2022-08-10 Thread Robert Haas
On Wed, Aug 10, 2022 at 12:39 AM Thomas Munro wrote: > Here's an email about that: > > https://www.postgresql.org/message-id/CAE9k0P=OXww6RQCGrmDNa8=L3EeB01SGbYuP23y-qZJ=4td...@mail.gmail.com Hmm. If I'm reading that email correctly, it indicates that I noticed this problem before commit and

s390x builds on buildfarm

2022-08-10 Thread Vivian Kong
Hi, Are builds being paused on s390x as it looks like the s390x builds were last run 15 days ago. If so, wondering what is the reason for the pause and what is required to resume the builds? The OS the builds were running on seems to have reached end of life. Please let me know if we can

Re: SUBTRANS: Minimizing calls to SubTransSetParent()

2022-08-10 Thread Simon Riggs
On Wed, 10 Aug 2022 at 08:34, Dilip Kumar wrote: > > Am I still missing something? No, you have found a dependency between the patches that I was unaware of. So there is no bug if you apply both patches. Thanks for looking. > So I still think some adjustment is required in XidInMVCCSnapdhot()

Re: Generalize ereport_startup_progress infrastructure

2022-08-10 Thread Nitin Jadhav
> > > Here's an attempt to generalize the ereport_startup_progress > > > infrastructure. The attached v1 patch places the code in elog.c/.h, > > > renames associated functions and variables, something like > > > ereport_startup_progress to ereport_progress, > > > log_startup_progress_interval to

RE: logical replication restrictions

2022-08-10 Thread osumi.takami...@fujitsu.com
On Tuesday, August 9, 2022 6:47 AM Euler Taveira wrote: > I attached a v6. Hi, thank you for posting the updated patch. Minor review comments for v6. (1) commit message "If the subscriber sets min_apply_delay parameter, ..." I suggest we use subscription rather than subscriber, because this

Re: Typo in misc_sanity.sql?

2022-08-10 Thread Peter Eisentraut
On 25.07.22 14:04, Japin Li wrote: Yeah, they do not have unique keys, however, here we check primary keys. So, IMO, the description exceptions should say they do not have primary keys, rather than do not have unique keys. The context of that check is that for each system catalog we pick one

Re: NAMEDATALEN increase because of non-latin languages

2022-08-10 Thread John Naylor
I wrote: > The syscache use of GETSTRUCT still uses a simple cast of the tuple (for > pg_cast those calls live in parse_coerce.c, which is unchanged from master in > v3). Next step I think is to see about the syscache piece -- teaching a > syscache miss to deform the entire tuple into a struct

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

2022-08-10 Thread Bharath Rupireddy
On Wed, Aug 10, 2022 at 2:11 PM Thomas Munro wrote: > > On Wed, Aug 10, 2022 at 7:15 PM Bharath Rupireddy > wrote: > > The main idea of using get_dirent_type() instead of lstat or stat is > > to benefit from avoiding system calls on platforms where the directory > > entry type is stored in

Re: Perform streaming logical transactions by background workers and parallel apply

2022-08-10 Thread Peter Smith
Here are some review comments for the patch v20-0001: == 1. doc/src/sgml/catalogs.sgml + p = apply changes directly using a background + worker, if available, otherwise, it behaves the same as 't' The different char values 'f','t','p' are separated by comma (,) in the list,

Re: hash_xlog_split_allocate_page: failed to acquire cleanup lock

2022-08-10 Thread Amit Kapila
On Wed, Aug 10, 2022 at 10:58 AM Andres Freund wrote: > > Hi, > > On 2022-08-09 20:21:19 -0700, Mark Dilger wrote: > > > On Aug 9, 2022, at 7:26 PM, Andres Freund wrote: > > > > > > The relevant code triggering it: > > > > > > newbuf = XLogInitBufferForRedo(record, 1); > > >

Re: pg_get_constraintdef: Schema qualify foreign tables unless pretty printing is enabled

2022-08-10 Thread Alvaro Herrera
On 2022-Aug-09, Lukas Fittl wrote: > But I wonder, why do we have an explicit pretty printing flag on these > functions, and PRETTYFLAG_SCHEMA in the code to represent this behavior. > If we don't want pretty printing to affect schema qualification, why > does that flag exist? Because of

Small typo in OAT README

2022-08-10 Thread Daniel Gustafsson
Reading over the new object access hook test I spotted a small typo in the documentation. Will apply a fix shortly. -A real-world OAT hook should certainly provide more fine-grained conrol than +A real-world OAT hook should certainly provide more fine-grained control than -- Daniel Gustafsson

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

2022-08-10 Thread Thomas Munro
On Wed, Aug 10, 2022 at 7:15 PM Bharath Rupireddy wrote: > The main idea of using get_dirent_type() instead of lstat or stat is > to benefit from avoiding system calls on platforms where the directory > entry type is stored in dirent structure, but not to cause errors for > lstat or stat system

Re: Using each rel as both outer and inner for JOIN_ANTI

2022-08-10 Thread Alvaro Herrera
On 2022-Aug-10, Richard Guo wrote: > The right-anti join plan has the same cost estimation with right join > plan in this case. So would you please help to test what the right join > plan looks like in your env for the query below? > > select * from foo left join bar on foo.a = bar.c; You're

Re: [BUG] Panic due to incorrect missingContrecPtr after promotion

2022-08-10 Thread Kyotaro Horiguchi
Hello. > Yes, that is correct. Mmm. I believed that the log came from a single server run, since the PID (I believe the [359], [357] are PID) did not change through the log lines. > 2022-08-05 18:50:13 UTC::@:[359]:LOG: creating missing WAL directory > "pg_wal/archive_status" This means that

Re: Fix a typo in pgstatfuncs.c

2022-08-10 Thread Bharath Rupireddy
On Wed, Aug 10, 2022 at 1:22 PM Drouvot, Bertrand wrote: > > Hi, > > It seems like there's the following typo in pgstatfuncs.c: > > - /* Values only available to role member or > pg_read_all_stats */ > + /* Values only available to role member of > pg_read_all_stats */

Re: Fast COPY FROM based on batch insert

2022-08-10 Thread Etsuro Fujita
Hi, On Wed, Aug 10, 2022 at 1:06 AM Zhihong Yu wrote: > On Tue, Aug 9, 2022 at 4:45 AM Etsuro Fujita wrote: >> * When running AFTER ROW triggers in CopyMultiInsertBufferFlush(), the >> patch uses the slots passed to ExecForeignBatchInsert(), not the ones >> returned by the callback function,

Re: createuser doesn't tell default settings for some options

2022-08-10 Thread Daniel Gustafsson
> On 10 Aug 2022, at 08:12, Kyotaro Horiguchi wrote: > > (I suppose this is a pg15 issue) > > createuser --help shows the following help text. > >> --bypassrls role can bypass row-level security (RLS) policy >> --no-bypassrlsrole cannot bypass row-level security (RLS)

Re: [RFC] building postgres with meson - v10

2022-08-10 Thread Nazir Bilal Yavuz
Hi, On 8/8/22 18:53, Andres Freund wrote: Bilal's version checked different directories for expected files, but I don't think that's necessary. Bilal, do you remember why you added that? This was for not breaking autoconf build. Autoconf wasn't using expecteddir, so I checked different

Re: Using each rel as both outer and inner for JOIN_ANTI

2022-08-10 Thread Richard Guo
On Tue, Aug 9, 2022 at 6:54 PM Alvaro Herrera wrote: > I suppose this looks good as far as the plan goes, but the cost estimation > might be a little bit too optimistic: it is reporting that the new plan > costs 50% of the original, yet the execution time is only 5% lower. Thanks for trying

Re: SUBTRANS: Minimizing calls to SubTransSetParent()

2022-08-10 Thread Dilip Kumar
On Tue, Aug 9, 2022 at 9:46 PM Simon Riggs wrote: > Those calls are unaffected, i.e. they both still work. > > Right now, we register all subxids in subtrans. But not all xids are > subxids, so in fact, subtrans has many "holes" in it, where if you > look up the parent for an xid it will just

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

2022-08-10 Thread Bharath Rupireddy
On Tue, Aug 9, 2022 at 10:57 AM Thomas Munro wrote: > > OK, so there aren't many places in 0001 that error out where we > previously did not. Well, that's not true I believe. The 0001 patch introduces get_dirent_type() with elevel ERROR which means that lstat failures are now reported as ERRORs

use SSE2 for is_valid_ascii

2022-08-10 Thread John Naylor
new thread [was: WIP Patch: Add a function that returns binary JSONB as a bytea] > I wrote: > > We can also shave a > > few percent by having pg_utf8_verifystr use SSE2 for the ascii path. I > > can look into this. > > Here's a patch for that. If the input is mostly ascii, I'd expect that > part

Re: Reducing the chunk header sizes on all memory context types

2022-08-10 Thread David Rowley
On Wed, 10 Aug 2022 at 06:44, Andres Freund wrote: > I think it's fine, given that we can change this at any time, but it's > probably worth to explicitly agree that this will for now restrict us to 8 > context methods? I know there was some discussion about this elsewhere in this thread about

createuser doesn't tell default settings for some options

2022-08-10 Thread Kyotaro Horiguchi
(I suppose this is a pg15 issue) createuser --help shows the following help text. > --bypassrls role can bypass row-level security (RLS) policy > --no-bypassrlsrole cannot bypass row-level security (RLS) policy > --replication role can initiate