Re: fix stats_fetch_consistency value in postgresql.conf.sample

2022-05-24 Thread Kyotaro Horiguchi
At Wed, 25 May 2022 14:00:23 +0900, Michael Paquier wrote in > On Tue, May 24, 2022 at 09:28:49PM -0700, Andres Freund wrote: > > And done. Thanks Nathan! > > Shouldn't you also refresh pgstat_fetch_consistency in pgstat.c for > consistency? > > > I wonder if we should make src/test/modules/te

Re: "ERROR: latch already owned" on gharial

2022-05-24 Thread Noah Misch
On Tue, May 24, 2022 at 06:24:39PM -0700, Andres Freund wrote: > On 2022-05-25 12:45:21 +1200, Thomas Munro wrote: > > Just BTW, that animal has shown signs of a flaky toolchain before[1]. > > I know we have quite a lot of museum exhibits in the 'farm, in terms > > of hardare, OS, and tool chain.

Re: Multi-Master Logical Replication

2022-05-24 Thread Amit Kapila
On Tue, May 24, 2022 at 5:57 PM Bruce Momjian wrote: > > On Sat, May 14, 2022 at 12:20:05PM +0530, Amit Kapila wrote: > > On Sat, May 14, 2022 at 12:33 AM Bruce Momjian wrote: > > > > > > Uh, without these features, what workload would this help with? > > > > > > > To allow replication among mult

pg_upgrade test writes to source directory

2022-05-24 Thread Peter Eisentraut
The 002_pg_upgrade.pl test leaves a file delete_old_cluster.sh in the source directory. In vpath builds, there shouldn't be any files written to the source directory. Note that the TAP tests run with the source directory as the current directory, so this is the result of pg_upgrade leaving it

Re: Assert name/short_desc to prevent SHOW ALL segfault

2022-05-24 Thread Andres Freund
Hi, On 2022-05-24 11:41:49 -0700, Nathan Bossart wrote: > On Mon, May 23, 2022 at 11:39:16PM -0500, Steve Chavez wrote: > > The DefineCustomStringVariable function(or any > > other DefineCustomXXXVariable) has a short_desc parameter that can be > > NULL and it's not apparent that this will lead to

Re: Assert name/short_desc to prevent SHOW ALL segfault

2022-05-24 Thread Michael Paquier
On Wed, May 25, 2022 at 12:05:55AM -0500, Steve Chavez wrote: > Thank you for the reviews Nathan, Michael. > > I agree with handling NULL in ShowAllGUCConfig() instead. > > I've attached the updated patch. Shouldn't the same check as extra_desc be done in GetConfigOptionByNum() for short_desc (p

Re: fix stats_fetch_consistency value in postgresql.conf.sample

2022-05-24 Thread Michael Paquier
On Tue, May 24, 2022 at 09:28:49PM -0700, Andres Freund wrote: > And done. Thanks Nathan! Shouldn't you also refresh pgstat_fetch_consistency in pgstat.c for consistency? > I wonder if we should make src/test/modules/test_misc/t/003_check_guc.pl > detect this kind of thing? That sounds like a go

Re: ccache, MSVC, and meson

2022-05-24 Thread Andres Freund
Hi, On 2022-05-24 17:17:47 -0500, Justin Pryzby wrote: > Also, /O2 cuts ~3 minutes off the test time on cirrus, which seems worth it, > except that it omits frame pointers, which probably breaks debuggability. It likely also causes us to use the non-debug C runtime? Which IMO would be bad, it doe

Re: doc phrase: "inheritance child"

2022-05-24 Thread Ashutosh Bapat
Hi Justin, @@ -7306,7 +7306,7 @@ SCRAM-SHA-256$:&l Normally there is one entry, with stainherit = false, for each table column that has been analyzed. - If the table has inheritance children, a second entry with + If the table has inheritance children or partitions

Re: fix stats_fetch_consistency value in postgresql.conf.sample

2022-05-24 Thread Andres Freund
On 2022-05-24 21:23:32 -0700, Andres Freund wrote: > Will apply. And done. Thanks Nathan!

Re: fix stats_fetch_consistency value in postgresql.conf.sample

2022-05-24 Thread Andres Freund
Hi, On 2022-05-25 13:11:40 +0900, Kyotaro Horiguchi wrote: > At Tue, 24 May 2022 15:01:47 -0700, Nathan Bossart > wrote in > > In postgresql.conf.sample, stats_fetch_consistency is set to "none," but > > the default appears to be "cache." Should these be consistent? I've > > attached a patch

Re: fix stats_fetch_consistency value in postgresql.conf.sample

2022-05-24 Thread Kyotaro Horiguchi
At Tue, 24 May 2022 15:01:47 -0700, Nathan Bossart wrote in > In postgresql.conf.sample, stats_fetch_consistency is set to "none," but > the default appears to be "cache." Should these be consistent? I've > attached a patch to change the entry in the sample. Good catch:) The base C variable

Re: fix stats_fetch_consistency value in postgresql.conf.sample

2022-05-24 Thread Michael Paquier
On Tue, May 24, 2022 at 03:01:47PM -0700, Nathan Bossart wrote: > In postgresql.conf.sample, stats_fetch_consistency is set to "none," but > the default appears to be "cache." Should these be consistent? I've > attached a patch to change the entry in the sample. Yes, postgresql.conf.sample shoul

Re: First draft of the PG 15 release notes

2022-05-24 Thread Amit Langote
On Wed, May 25, 2022 at 12:44 PM David Rowley wrote: > On Wed, 25 May 2022 at 15:01, Amit Langote wrote: > > +Previously, a partitioned table with DEFAULT partition or a LIST > > partition containing multiple values could not be used for ordered > > partition scans. Now it can be used at least in

Re: docs: mention "pg_read_all_stats" in "track_activities" description

2022-05-24 Thread Michael Paquier
On Mon, May 23, 2022 at 09:41:42AM -0700, Nathan Bossart wrote: > I think we need to be careful about saying "member of" when we really mean > "roles with privileges of." Unless I am mistaken, role membership alone is > not sufficient for viewing this information. You also need to inherit the > r

Re: Tab-complete for CREATE EVENT TRIGGER ON TABLE_REWRITE

2022-05-24 Thread Michael Paquier
On Wed, May 25, 2022 at 03:40:51AM +, houzj.f...@fujitsu.com wrote: > When working on some table_rewrite related projects, I noticed that we don’t > have tab-complete for "ON table_rewrite" when creating the event trigger. I > think it > might be better to add this. Here is the patch. Thoughts

Re: Improving connection scalability (src/backend/storage/ipc/procarray.c)

2022-05-24 Thread Andres Freund
Hi, On 2022-05-24 13:23:43 -0300, Ranier Vilela wrote: > It certainly helps, but I trust that's not the only reason, in all the > tests I did, there was an improvement in performance, even before using > this feature. > If you look closely at GetSnapShotData() you will see that > GetSnapshotDataRe

Re: Add --{no-,}bypassrls flags to createuser

2022-05-24 Thread Michael Paquier
On Wed, May 25, 2022 at 11:07:52AM +0900, Kyotaro Horiguchi wrote: > I reproduced the same failure at my hand and identified the > cause. Windows' version of getopt_long seems to dislike that > non-optional parameters precedes options. Tweaking the list of arguments in some commands kicked by the

Re: HOLD_INTERRUPTS() vs ProcSignalBarrier

2022-05-24 Thread Thomas Munro
On Wed, May 25, 2022 at 3:08 PM Andres Freund wrote: > On 2022-05-25 14:47:41 +1200, Thomas Munro wrote: > > My question is: do we really need to suppress these non-ereporting > > interrupts in all the places we currently do HOLD_INTERRUPTS()? > > Most of those should be fairly short / only block

Re: Improving connection scalability (src/backend/storage/ipc/procarray.c)

2022-05-24 Thread Andres Freund
Hi, On 2022-05-24 12:28:20 -0300, Ranier Vilela wrote: > Linux Ubuntu 64 bits (gcc 9.4) > ./pgbench -M prepared -c $conns -j $conns -S -n -U postgres > > conns tps head tps patched > 1 2918.004085 3190.810466 > 10 12262.41569617199.8

Re: First draft of the PG 15 release notes

2022-05-24 Thread David Rowley
On Wed, 25 May 2022 at 15:01, Amit Langote wrote: > +Previously, a partitioned table with DEFAULT partition or a LIST > partition containing multiple values could not be used for ordered > partition scans. Now it can be used at least in the cases where such > partitions are pruned. I think this o

Tab-complete for CREATE EVENT TRIGGER ON TABLE_REWRITE

2022-05-24 Thread houzj.f...@fujitsu.com
Hi hackers, When working on some table_rewrite related projects, I noticed that we don’t have tab-complete for "ON table_rewrite" when creating the event trigger. I think it might be better to add this. Here is the patch. Thoughts ? Best regards, Hou zhijie 0001-Add-tab-complete-for-table_rew

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

2022-05-24 Thread Masahiko Sawada
On Tue, May 24, 2022 at 2:18 PM Amit Kapila wrote: > > On Tue, May 24, 2022 at 7:58 AM Masahiko Sawada wrote: > > > > On Mon, May 23, 2022 at 2:39 PM Amit Kapila wrote: > > > > > > On Mon, May 23, 2022 at 10:03 AM Kyotaro Horiguchi > > > wrote: > > > > > > > > At Sat, 21 May 2022 15:35:58 +0530

Re: PG15 beta1 sort performance regression due to Generation context change

2022-05-24 Thread David Rowley
On Wed, 25 May 2022 at 04:02, Tom Lane wrote: > Here's a draft patch for the other way of doing it. I'd first tried > to make the side-effects completely local to generation.c, but that > fails in view of code like > > MemoryContextAlloc(GetMemoryChunkContext(x), ...) > > Thus we pretty m

Re: HOLD_INTERRUPTS() vs ProcSignalBarrier

2022-05-24 Thread Andres Freund
Hi, On 2022-05-25 14:47:41 +1200, Thomas Munro wrote: > My question is: do we really need to suppress these non-ereporting > interrupts in all the places we currently do HOLD_INTERRUPTS()? Most of those should be fairly short / only block on lwlocks, small amounts of IO. I'm not sure how much of

Re: First draft of the PG 15 release notes

2022-05-24 Thread Amit Langote
On Wed, May 25, 2022 at 8:36 AM Bruce Momjian wrote: > On Thu, May 19, 2022 at 06:13:28PM +0900, Amit Langote wrote: > > Or maybe we could mention that but use a wording that doesn't make it > > sound like an implementation detail, like: > > > > +Previously, an ordered partition scan could not be

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

2022-05-24 Thread Masahiko Sawada
On Tue, May 10, 2022 at 6:58 PM John Naylor wrote: > > On Tue, May 10, 2022 at 8:52 AM Masahiko Sawada wrote: > > > > Overall, radix tree implementations have good numbers. Once we got an > > agreement on moving in this direction, I'll start a new thread for > > that and move the implementation f

HOLD_INTERRUPTS() vs ProcSignalBarrier

2022-05-24 Thread Thomas Munro
Hi, Whenever you call CHECK_FOR_INTERRUPTS(), there are three flow-control possibilities: 1. It doesn't return, because we ereport(FATAL) AKA "die". 2. It doesn't return, because we ereport(ERROR) AKA "cancel". 3. It returns, possibly having serviced various kinds of requests. If we're in a c

Re: Build-farm - intermittent error in 031_column_list.pl

2022-05-24 Thread Kyotaro Horiguchi
At Tue, 24 May 2022 18:19:45 +0530, Amit Kapila wrote in > On Sat, May 21, 2022 at 9:03 AM Amit Kapila wrote: > > > > On Fri, May 20, 2022 at 4:01 PM Tomas Vondra > > wrote: > > > > > Also, we'd probably have to ignore RelationSyncEntry for a while, which > > > seems quite expensive. > > > > >

RE: Build-farm - intermittent error in 031_column_list.pl

2022-05-24 Thread osumi.takami...@fujitsu.com
On Tuesday, May 24, 2022 9:50 PM Amit Kapila wrote: > On Sat, May 21, 2022 at 9:03 AM Amit Kapila > wrote: > > > > On Fri, May 20, 2022 at 4:01 PM Tomas Vondra > > wrote: > > > > > Also, we'd probably have to ignore RelationSyncEntry for a while, > > > which seems quite expensive. > > > > > > >

Re: Add --{no-,}bypassrls flags to createuser

2022-05-24 Thread Kyotaro Horiguchi
At Tue, 24 May 2022 10:09:10 -0700, Nathan Bossart wrote in > We're still missing some "fancier" string patterns in the tests, but we > might just be nitpicking at this point. Such "fancier" strings should be properly handled by FmtId() and appendStringLiteralConn. If this is a privilege escal

Re: Limiting memory allocation

2022-05-24 Thread Bruce Momjian
On Tue, May 24, 2022 at 09:55:16PM -0400, Tom Lane wrote: > Bruce Momjian writes: > > On Tue, May 24, 2022 at 09:20:43PM -0400, Tom Lane wrote: > >> Then you just rendered all the planner's estimates fantasies. > > > That's what I was asking --- if the planner's estimates are based on the > > siz

Re: Limiting memory allocation

2022-05-24 Thread Tom Lane
Bruce Momjian writes: > On Tue, May 24, 2022 at 09:20:43PM -0400, Tom Lane wrote: >> Then you just rendered all the planner's estimates fantasies. > That's what I was asking --- if the planner's estimates are based on the > size of work_mem --- I thought you said it is not. The planner's estimat

Re: "ERROR: latch already owned" on gharial

2022-05-24 Thread Tom Lane
Andres Freund writes: > On 2022-05-25 12:45:21 +1200, Thomas Munro wrote: >> I know we have quite a lot of museum exhibits in the 'farm, in terms >> of hardare, OS, and tool chain. In some cases, they're probably just >> forgotten/not on anyone's upgrade radar. If they've shown signs of >> misbe

Re: Improve TAP tests of pg_upgrade for cross-version tests

2022-05-24 Thread Michael Paquier
On Tue, May 24, 2022 at 03:03:28PM +0900, Michael Paquier wrote: > (Adding Andrew Dunstan in CC.) > > I have been toying with $subject, trying to improve the ways to test > pg_upgrade across different major versions as perl makes that easier. > The buildfarm does three things to allow such tests t

Re: Limiting memory allocation

2022-05-24 Thread Bruce Momjian
On Tue, May 24, 2022 at 09:20:43PM -0400, Tom Lane wrote: > Bruce Momjian writes: > > On Tue, May 24, 2022 at 07:40:45PM -0400, Tom Lane wrote: > >> (1) There are not a predetermined number of allocations. For example, > >> if we do a given join as nestloop+inner index scan, that doesn't require

Re: allow building trusted languages without the untrusted versions

2022-05-24 Thread Bruce Momjian
On Tue, May 24, 2022 at 09:19:40PM -0400, Tom Lane wrote: > Bruce Momjian writes: > > I always thought if pg_proc is able to call an arbitrary function in an > > arbitrary library, it could access to the file system, and if that is > > true, locking the super-user from file system access seems imp

doc phrase: "inheritance child"

2022-05-24 Thread Justin Pryzby
In this old sub-thread, we removed the use of word "partition" when it didn't mean "declarative partitioning". https://www.postgresql.org/message-id/flat/20180601213300.GT5164%40telsasoft.com#32efea8c1aa0e875d201873dac56e09c Now, I'm proposing to get rid of the phrase "inheritance child" when it

Re: Shmem queue is not flushed if receiver is not yet attached

2022-05-24 Thread Japin Li
On Tue, 24 May 2022 at 23:05, Robert Haas wrote: > On Thu, Mar 17, 2022 at 3:13 AM Pavan Deolasee > wrote: >> While testing on the current PG master, I noticed a problem between backends >> communicating over a shared memory queue. I think `shm_mq_sendv()` fails to >> flush the queue, even i

Re: "ERROR: latch already owned" on gharial

2022-05-24 Thread Andres Freund
Hi, On 2022-05-25 12:45:21 +1200, Thomas Munro wrote: > A couple of recent isolation test failures reported $SUBJECT. Was that just on gharial? > It could be a bug in recent-ish latch refactoring work, though I don't > know why it would show up twice just recently. Yea, that's weird. > Just

Re: PG15 beta1 sort performance regression due to Generation context change

2022-05-24 Thread Tom Lane
Andres Freund writes: > On 2022-05-24 12:01:58 -0400, Tom Lane wrote: >> For back-patching into v14, we could put the new NodeTag type at the >> end of that enum list. The change in the inline GetMemoryChunkContext >> is probably an acceptable hazard. > Why would we backpatch this to 14? I don't

Re: Assert name/short_desc to prevent SHOW ALL segfault

2022-05-24 Thread Michael Paquier
On Tue, May 24, 2022 at 11:41:49AM -0700, Nathan Bossart wrote: > I would actually ERROR on this so that we aren't relying on > --enable-cassert builds to catch it. That being said, if there's no strong > reason to enforce that a short description be provided, then why not adjust > ShowAllGUCConfi

Re: Limiting memory allocation

2022-05-24 Thread Tom Lane
Bruce Momjian writes: > On Tue, May 24, 2022 at 07:40:45PM -0400, Tom Lane wrote: >> (1) There are not a predetermined number of allocations. For example, >> if we do a given join as nestloop+inner index scan, that doesn't require >> any large amount of memory; but if we do it as merge or hash jo

Re: allow building trusted languages without the untrusted versions

2022-05-24 Thread Tom Lane
Bruce Momjian writes: > I always thought if pg_proc is able to call an arbitrary function in an > arbitrary library, it could access to the file system, and if that is > true, locking the super-user from file system access seems impossible > and unwise to try because it would give a false sense of

Re: PG15 beta1 fix pg_stats_ext/pg_stats_ext_exprs view manual

2022-05-24 Thread Justin Pryzby
On Wed, May 25, 2022 at 01:08:12AM +, Shinoda, Noriyoshi (PN Japan FSIP) wrote: > Hi hackers, > Thanks to all the developers. The attached patch updates the manual for the > pg_stats_ext and pg_stats_ext_exprs view. > The current pg_stats_ext/pg_stats_ext_exprs view manual are missing the >

PG15 beta1 fix pg_stats_ext/pg_stats_ext_exprs view manual

2022-05-24 Thread Shinoda, Noriyoshi (PN Japan FSIP)
Hi hackers, Thanks to all the developers. The attached patch updates the manual for the pg_stats_ext and pg_stats_ext_exprs view. The current pg_stats_ext/pg_stats_ext_exprs view manual are missing the inherited column. This column was added at the same time as the stxdinherit column in the pg_s

"ERROR: latch already owned" on gharial

2022-05-24 Thread Thomas Munro
Hi, A couple of recent isolation test failures reported $SUBJECT. It could be a bug in recent-ish latch refactoring work, though I don't know why it would show up twice just recently. Just BTW, that animal has shown signs of a flaky toolchain before[1]. I know we have quite a lot of museum exhib

Re: PG15 beta1 sort performance regression due to Generation context change

2022-05-24 Thread Andres Freund
Hi, On 2022-05-24 12:01:58 -0400, Tom Lane wrote: > David Rowley writes: > > On Tue, 24 May 2022 at 09:36, Tom Lane wrote: > >> I think probably that could be made to work, since a Generation > >> context should not contain all that many live blocks at any one time. > > > I've done a rough cut

Re: Limiting memory allocation

2022-05-24 Thread Bruce Momjian
On Tue, May 24, 2022 at 07:40:45PM -0400, Tom Lane wrote: > Bruce Momjian writes: > > If the plan output is independent of work_mem, > > ... it isn't ... Good. > > I always wondered why we > > didn't just determine the number of simultaneous memory requests in the > > plan and just allocate acc

Re: allow building trusted languages without the untrusted versions

2022-05-24 Thread Bruce Momjian
On Tue, May 24, 2022 at 02:10:19PM -0400, Robert Haas wrote: > I guess one question is at what level we want to disable these various > things. Your original proposal seemed reasonable to me because I feel > like users who are compiling PostgreSQL ought to have control over > which things they comp

Re: suboverflowed subtransactions concurrency performance optimize

2022-05-24 Thread Andres Freund
Hi, On 2022-04-07 14:36:35 +0900, Michael Paquier wrote: > On Mon, Mar 07, 2022 at 10:17:41PM +0800, Julien Rouhaud wrote: > > On Mon, Mar 07, 2022 at 01:27:40PM +, Simon Riggs wrote: > >> The patch was posted because TransactionLogFetch() has a cache, yet > >> SubTransGetTopmostTransaction()

Re: Limiting memory allocation

2022-05-24 Thread Tom Lane
Bruce Momjian writes: > If the plan output is independent of work_mem, ... it isn't ... > I always wondered why we > didn't just determine the number of simultaneous memory requests in the > plan and just allocate accordingly, e.g. if there are four simultaneous > memory requests in the plan, ea

Re: First draft of the PG 15 release notes

2022-05-24 Thread Bruce Momjian
On Thu, May 19, 2022 at 06:13:28PM +0900, Amit Langote wrote: > Or maybe we could mention that but use a wording that doesn't make it > sound like an implementation detail, like: > > +Previously, an ordered partition scan could not be used for a > LIST-partitioned table with any partition containi

Re: First draft of the PG 15 release notes

2022-05-24 Thread Bruce Momjian
On Tue, May 24, 2022 at 12:16:10PM +0700, John Naylor wrote: > On Mon, May 16, 2022 at 9:18 PM Bruce Momjian wrote: > > > > Newer wording: > > > > Improve validation of UTF-8 text (even if only ASCII) by processing > > 16 bytes at a time (John Naylor) > > Thanks! I also think Heik

Re: Limiting memory allocation

2022-05-24 Thread Bruce Momjian
On Tue, May 24, 2022 at 11:49:27AM -0400, Robert Haas wrote: > It's always seemed to me that the principled thing to do would be to > make work_mem a per-query budget rather than a per-node budget, and > have add_path() treat memory usage as an independent figure of merit > -- and also discard any

Re: ccache, MSVC, and meson

2022-05-24 Thread Justin Pryzby
On Tue, May 24, 2022 at 01:30:39PM -0700, Andres Freund wrote: > > As I recall, CC='ccache cl.exe' didn't work because it didn't attempt to do > > any > > argument splitting. > > I tried it, and it works for me when building with ninja (compiling with > cl.exe). I assume you are using msbuild? A

Re: postgres_fdw has insufficient support for large object

2022-05-24 Thread Robert Haas
On Mon, May 23, 2022 at 2:21 AM Tom Lane wrote: > The big picture here is that Postgres is a hodgepodge of features > that were developed at different times and with different quality > standards, over a period that's now approaching forty years. > Some of these features interoperate better than o

Re: [RFC] Improving multi-column filter cardinality estimation using MCVs and HyperLogLog

2022-05-24 Thread Bruce Momjian
On Mon, May 16, 2022 at 12:09:41AM +0200, Tomas Vondra wrote: > I think it's an interesting idea. In principle it allows deducing the > multi-column MCV for arbitrary combination of columns, not determined in > advance. We'd have the MCV with HLL instead of frequencies for columns > A, B and C: >

fix stats_fetch_consistency value in postgresql.conf.sample

2022-05-24 Thread Nathan Bossart
In postgresql.conf.sample, stats_fetch_consistency is set to "none," but the default appears to be "cache." Should these be consistent? I've attached a patch to change the entry in the sample. -- Nathan Bossart Amazon Web Services: https://aws.amazon.com diff --git a/src/backend/utils/misc/post

Re: adding status for COPY progress report

2022-05-24 Thread Zhihong Yu
On Tue, May 24, 2022 at 2:12 PM Matthias van de Meent < boekewurm+postg...@gmail.com> wrote: > On Tue, 24 May 2022 at 22:12, Zhihong Yu wrote: > > > > On Tue, May 24, 2022 at 12:37 PM Matthias van de Meent < > boekewurm+postg...@gmail.com> wrote: > >> > >> On Tue, 24 May 2022 at 19:13, Zhihong Yu

Re: enable/disable broken for statement triggers on partitioned tables

2022-05-24 Thread Zhihong Yu
Hi, AT_EnableTrig, /* ENABLE TRIGGER name */ + AT_EnableTrigRecurse, /* internal to commands/tablecmds.c */ AT_EnableAlwaysTrig,/* ENABLE ALWAYS TRIGGER name */ + AT_EnableAlwaysTrigRecurse, /* internal to commands/tablecmds.c */ Is it better to put the new

Re: adding status for COPY progress report

2022-05-24 Thread Matthias van de Meent
On Tue, 24 May 2022 at 22:12, Zhihong Yu wrote: > > On Tue, May 24, 2022 at 12:37 PM Matthias van de Meent > wrote: >> >> On Tue, 24 May 2022 at 19:13, Zhihong Yu wrote: >> > >> > Hi, >> > Please see attached for enhancement to COPY command progress. >> > >> > The added status column would allo

Re: allow building trusted languages without the untrusted versions

2022-05-24 Thread Nathan Bossart
On Tue, May 24, 2022 at 02:10:19PM -0400, Robert Haas wrote: > I guess one question is at what level we want to disable these various > things. Your original proposal seemed reasonable to me because I feel > like users who are compiling PostgreSQL ought to have control over > which things they comp

Re: ccache, MSVC, and meson

2022-05-24 Thread Andres Freund
Hi, On 2022-05-24 14:52:02 -0500, Justin Pryzby wrote: > > The spurious message should be fixed, of course. I suspect you dont need a > > wrapper, you can just set CC='ccache cl.exe' or similar? Afaics it's not > > meaningful to do 'CC=ccache.exe' alone, because then it'll interpret > > arguments

Re: adding status for COPY progress report

2022-05-24 Thread Zhihong Yu
On Tue, May 24, 2022 at 12:37 PM Matthias van de Meent < boekewurm+postg...@gmail.com> wrote: > On Tue, 24 May 2022 at 19:13, Zhihong Yu wrote: > > > > Hi, > > Please see attached for enhancement to COPY command progress. > > > > The added status column would allow users to get the status of the

Re: ccache, MSVC, and meson

2022-05-24 Thread Justin Pryzby
On Tue, May 24, 2022 at 12:30:59PM -0700, Andres Freund wrote: > Hi, > > On 2022-05-22 18:26:06 -0500, Justin Pryzby wrote: > > forking: <20220307191054.n5enrlf6kdn7z...@alap3.anarazel.de> > > > > An update. > > > > ccache 4.6.1 was released which allows compiling postgres > > I submitted a requ

Re: adding status for COPY progress report

2022-05-24 Thread Matthias van de Meent
On Tue, 24 May 2022 at 19:13, Zhihong Yu wrote: > > Hi, > Please see attached for enhancement to COPY command progress. > > The added status column would allow users to get the status of the most > recent COPY command. I fail to see the merit of retaining completed progress reporting commands in

Re: ccache, MSVC, and meson

2022-05-24 Thread Andres Freund
Hi, On 2022-05-22 18:26:06 -0500, Justin Pryzby wrote: > forking: <20220307191054.n5enrlf6kdn7z...@alap3.anarazel.de> > > An update. > > ccache 4.6.1 was released which allows compiling postgres > I submitted a request to update the package in chocolatey. > > But with the existing build system,

Re: 15beta1 test failure on mips in isolation/expected/stats

2022-05-24 Thread Christoph Berg
Re: Andres Freund > > I'd be good with tweaking this test case as you suggest, and maybe > > revisiting the topic later. > > Pushed the change of the test. Christoph, just to make sure, can you confirm > that this fixes the test instability for you? Unfortunately I could not reproduce the problem

Re: Assert name/short_desc to prevent SHOW ALL segfault

2022-05-24 Thread Nathan Bossart
On Mon, May 23, 2022 at 11:39:16PM -0500, Steve Chavez wrote: > The DefineCustomStringVariable function(or any > other DefineCustomXXXVariable) has a short_desc parameter that can be > NULL and it's not apparent that this will lead to a segfault when SHOW ALL > is used. > This happens because the S

Re: adding status for COPY progress report

2022-05-24 Thread Zhihong Yu
Hi, Here is the updated patch. Cheers On Tue, May 24, 2022 at 10:18 AM Zhihong Yu wrote: > Hi, > Please see attached for enhancement to COPY command progress. > > The added status column would allow users to get the status of the most > recent COPY command. > > Below is sample output. > > Thank

Re: allow building trusted languages without the untrusted versions

2022-05-24 Thread Robert Haas
On Tue, May 24, 2022 at 1:28 PM Nathan Bossart wrote: > Can we do both? That is, can we add retail options for untrusted > languages, generic file access functions, etc., and then also introduce a > --disable-disk-access configuration option? The latter might even just be > a combination of reta

Re: [RFC] building postgres with meson -v8

2022-05-24 Thread Peter Eisentraut
On 18.05.22 21:48, Andres Freund wrote: - CONFIGURE_ARGS - empty in meson, not clear what to fill it with Ok to leave empty for now. - GETTIMEOFDAY_1ARG - test doesn't exist - I suspect it might not be necessary Might be obsolete, consider removing. - PACKAGE_STRING, PACKAGE_TARNAME - unc

Re: allow building trusted languages without the untrusted versions

2022-05-24 Thread Tom Lane
Nathan Bossart writes: > On Tue, May 24, 2022 at 12:39:16PM -0400, Robert Haas wrote: >> No, my point is that one size doesn't fit all. Bundling everything >> together that could result in a disk access is going to suck too many >> marginally-related into the same bucket. It's much better to have

Re: allow building trusted languages without the untrusted versions

2022-05-24 Thread Nathan Bossart
On Tue, May 24, 2022 at 12:39:16PM -0400, Robert Haas wrote: > On Mon, May 23, 2022 at 6:42 PM Tom Lane wrote: >> [ shrug... ] So is your point that we shouldn't bother to do anything? >> I don't personally have a problem with leaving things where they stand >> in this area. However, if we're go

adding status for COPY progress report

2022-05-24 Thread Zhihong Yu
Hi, Please see attached for enhancement to COPY command progress. The added status column would allow users to get the status of the most recent COPY command. Below is sample output. Thanks yugabyte=# SELECT relid::regclass, command, status, yugabyte-# type, bytes_processed, bytes_tot

Re: Add --{no-,}bypassrls flags to createuser

2022-05-24 Thread Nathan Bossart
On Tue, May 24, 2022 at 08:07:31PM +0900, Shinya Kato wrote: > On 2022-05-24 11:09, Michael Paquier wrote: >> On Mon, May 23, 2022 at 09:37:35AM -0700, Nathan Bossart wrote: >> > Michael also requested a test for multiple -a switches and for fancier >> > string patterns. Once that is taken care of

Re: allow building trusted languages without the untrusted versions

2022-05-24 Thread Robert Haas
On Mon, May 23, 2022 at 6:42 PM Tom Lane wrote: > [ shrug... ] So is your point that we shouldn't bother to do anything? > I don't personally have a problem with leaving things where they stand > in this area. However, if we're going to do something, I think at > minimum it should involve blocki

Re: Improving connection scalability (src/backend/storage/ipc/procarray.c)

2022-05-24 Thread Ranier Vilela
Em ter., 24 de mai. de 2022 às 13:06, Robert Haas escreveu: > On Tue, May 24, 2022 at 11:28 AM Ranier Vilela > wrote: > > I think that I got something. > > You might have something, but it's pretty hard to tell based on > looking at this patch. Whatever relevant changes it has are mixed with > a

Re: Switching XLog source from archive to streaming when primary available

2022-05-24 Thread Bharath Rupireddy
On Sat, Apr 30, 2022 at 6:19 PM Bharath Rupireddy wrote: > > On Mon, Nov 29, 2021 at 1:30 AM SATYANARAYANA NARLAPURAM > wrote: > > > > Hi Hackers, > > > > When the standby couldn't connect to the primary it switches the XLog > > source from streaming to archive and continues in that state until

Re: Improving connection scalability (src/backend/storage/ipc/procarray.c)

2022-05-24 Thread Robert Haas
On Tue, May 24, 2022 at 11:28 AM Ranier Vilela wrote: > I think that I got something. You might have something, but it's pretty hard to tell based on looking at this patch. Whatever relevant changes it has are mixed with a bunch of changes that are probably not relevant. For example, it's hard to

Re: Reference column alias for common expressions

2022-05-24 Thread Tom Lane
Wood May writes: > Some databases (like Teradata) support the following syntax: > select col1, col2*20 as col2_1, col2_1*200 as col3_1 from your_table; > The last element in the target list can refer the second one using its > alias. > This feature is similar to some programming l

Re: PG15 beta1 sort performance regression due to Generation context change

2022-05-24 Thread Tom Lane
David Rowley writes: > On Tue, 24 May 2022 at 09:36, Tom Lane wrote: >> I think probably that could be made to work, since a Generation >> context should not contain all that many live blocks at any one time. > I've done a rough cut implementation of this and attached it here. > I've not done th

Re: Limiting memory allocation

2022-05-24 Thread Robert Haas
On Fri, May 20, 2022 at 7:09 PM Tomas Vondra wrote: > I wonder if we might eventually use this to define memory budgets. One > of the common questions I get is how do you restrict the user from > setting work_mem too high or doing too much memory-hungry things. > Currently there's no way to do tha

Re: Reference column alias for common expressions

2022-05-24 Thread Pantelis Theodosiou
On Tue, May 24, 2022 at 4:12 PM Wood May wrote: > > Hi, > Some databases (like Teradata) support the following syntax: > > select col1, col2*20 as col2_1, col2_1*200 as col3_1 from your_table; > > The last element in the target list can refer the second one using its > alias. > >

Improving connection scalability (src/backend/storage/ipc/procarray.c)

2022-05-24 Thread Ranier Vilela
Hi hackers, Inspired by Andre's works, I put efforts to try to improve GetSnapShotData(). I think that I got something. As is well known GetSnapShotData() is a critical function for Postgres performance, already demonstrated in other benchmarks. So any gain, no matter how small, makes a differenc

Reference column alias for common expressions

2022-05-24 Thread Wood May
Hi, Some databases (like Teradata) support the following syntax: select col1, col2*20 as col2_1, col2_1*200 as col3_1 from your_table; The last element in the target list can refer the second one using its alias. This feature is similar to some programming languages (like Lisp)'

Re: Shmem queue is not flushed if receiver is not yet attached

2022-05-24 Thread Robert Haas
On Thu, Mar 17, 2022 at 3:13 AM Pavan Deolasee wrote: > While testing on the current PG master, I noticed a problem between backends > communicating over a shared memory queue. I think `shm_mq_sendv()` fails to > flush the queue, even if `force_flush` is set to true, if the receiver is > not y

Re: PostgreSQL 15 Beta 1 release announcement draft

2022-05-24 Thread Robert Haas
On Tue, May 24, 2022 at 9:33 AM Jonathan S. Katz wrote: > However, I can relay your feedback to the packagers of these installers, > and I suggest you do the same. Isn't the issue that https://www.postgresql.org/download/windows/ doesn't have the link to the right place on the EDB site? https://

Re: Use Dblink without column defination

2022-05-24 Thread Peter Eisentraut
On 23.05.22 10:16, Chirag Karkera wrote: mesods=> select * from dblink('foreign_server','select * from ods_sch.emp') AS x(a int,b text);  a |    b ---+-  1 | Gohan  1 | Piccolo  1 | Tien (3 rows) This works fine when I specify which columns I want to select. Is there somethin

Re: Expand palloc/pg_malloc API

2022-05-24 Thread Peter Eisentraut
On 17.05.22 20:43, Tom Lane wrote: So I think Peter's got a good idea here (I might quibble with the details of some of these macros). But it's not really going to move the safety goalposts very far unless we make a concerted effort to make these be the style everywhere. Are we willing to do th

Re: PostgreSQL 15 Beta 1 release announcement draft

2022-05-24 Thread Jonathan S. Katz
On 5/24/22 12:57 AM, Jeff Janes wrote: On Sat, May 14, 2022 at 2:52 PM Jonathan S. Katz > wrote: Hi, Attached is a draft of the release announcement for the PostgreSQL 15 Beta 1 release. The goal of this announcement is to raise awareness around many

Re: Use Dblink without column defination

2022-05-24 Thread Chirag Karkera
Hi Team, Any update on this? Thank You. Regards, Chirag Karkera On Mon, 23 May, 2022, 1:46 pm Chirag Karkera, wrote: > Hi Team, > > Appreciate your time to look into this. > > To select from another database I try to use dblink or fdw extension of > Postgres, like this: > > mesods =>CREATE EX

Re: Build-farm - intermittent error in 031_column_list.pl

2022-05-24 Thread Amit Kapila
On Sat, May 21, 2022 at 9:03 AM Amit Kapila wrote: > > On Fri, May 20, 2022 at 4:01 PM Tomas Vondra > wrote: > > > Also, we'd probably have to ignore RelationSyncEntry for a while, which > > seems quite expensive. > > > > Yet another option could be that we continue using a historic snapshot > bu

Re: Multi-Master Logical Replication

2022-05-24 Thread Bruce Momjian
On Sat, May 14, 2022 at 12:20:05PM +0530, Amit Kapila wrote: > On Sat, May 14, 2022 at 12:33 AM Bruce Momjian wrote: > > > > Uh, without these features, what workload would this help with? > > > > To allow replication among multiple nodes when some of the nodes may > have pre-existing data. This

Re: PG15 beta1 sort performance regression due to Generation context change

2022-05-24 Thread David Rowley
On Tue, 24 May 2022 at 09:36, Tom Lane wrote: > > David Rowley writes: > > Handy wavy idea: It's probably too complex for now, and it also might > > be too much overhead, but having GenerationPointerGetChunk() do a > > binary search on a sorted-by-memory-address array of block pointers > > might

Re: Add --{no-,}bypassrls flags to createuser

2022-05-24 Thread Shinya Kato
On 2022-05-24 11:09, Michael Paquier wrote: On Mon, May 23, 2022 at 09:37:35AM -0700, Nathan Bossart wrote: Michael also requested a test for multiple -a switches and for fancier string patterns. Once that is taken care of, I think this can be marked as ready-for-committer. Looking at v7, t

Assert name/short_desc to prevent SHOW ALL segfault

2022-05-24 Thread Steve Chavez
Hello hackers, The DefineCustomStringVariable function(or any other DefineCustomXXXVariable) has a short_desc parameter that can be NULL and it's not apparent that this will lead to a segfault when SHOW ALL is used. This happens because the ShowAllGUCConfig function expects a non-NULL short_desc.

Re: bogus: logical replication rows/cols combinations

2022-05-24 Thread Amit Kapila
On Fri, May 20, 2022 at 8:36 AM Amit Kapila wrote: > > On Thu, May 19, 2022 at 7:54 PM Tom Lane wrote: > > > > Justin Pryzby writes: > > > On Thu, May 19, 2022 at 10:33:13AM +0530, Amit Kapila wrote: > > >> I have committed the first patch after fixing this part. It seems Tom > > >> is not very

Re: Zstandard support for toast compression

2022-05-24 Thread Nikolay Shaplov
В письме от пятница, 20 мая 2022 г. 23:17:42 MSK пользователь Stephen Frost написал: > While I generally agree that we want to provide extensibility in this > area, given that we already have zstd as a compile-time option and it > exists in other parts of the system, I don't think it makes sense

  1   2   >