RE: [bug?] Missed parallel safety checks, and wrong parallel safety

2021-05-10 Thread houzj.f...@fujitsu.com
> > Sometimes this is actually quite useful. You might know that, while > > the function is in general volatile, it is immutable in the particular > > way that you are using it. Or, perhaps, you are using the volatile > > function incidentally and it doesn't affect the output of your > > function a

Re: compute_query_id and pg_stat_statements

2021-05-10 Thread Fujii Masao
On 2021/05/11 15:04, Michael Paquier wrote: On Tue, Apr 27, 2021 at 02:25:04PM +0800, Julien Rouhaud wrote: On Mon, Apr 26, 2021 at 11:37:45AM -0700, Andres Freund wrote: On 2021-04-26 14:21:00 -0400, Tom Lane wrote: That's sounding like a pretty sane design, actually. Not sure about the s

Re: compute_query_id and pg_stat_statements

2021-05-10 Thread Michael Paquier
On Tue, Apr 27, 2021 at 02:25:04PM +0800, Julien Rouhaud wrote: > On Mon, Apr 26, 2021 at 11:37:45AM -0700, Andres Freund wrote: >> On 2021-04-26 14:21:00 -0400, Tom Lane wrote: >>> That's sounding like a pretty sane design, actually. Not sure about >>> the shared-library-name-with-fixed-function-

Re: [Patch] ALTER SYSTEM READ ONLY

2021-05-10 Thread Dilip Kumar
On Mon, May 10, 2021 at 10:25 PM Amul Sul wrote: > > Yes, we don't want any write slip in before UpdateFullPageWrites(). > Recently[1], we have decided to let the Checkpointed process call > XLogAcceptWrites() unconditionally. > > Here problem is that when a backend executes the > pg_prohibit_wal(

Re: Inaccurate error message when set fdw batch_size to 0

2021-05-10 Thread Bharath Rupireddy
On Mon, May 10, 2021 at 7:39 PM Tom Lane wrote: > > Bharath Rupireddy writes: > > On Mon, May 10, 2021 at 12:00 PM Tom Lane wrote: > >> Yeah, this error message seems outright buggy. However, it's a minor > >> matter. Also, some people think "positive" is the same thing as > >> "non-negative",

Re: Remove "FROM" in "DELETE FROM" when using tab-completion

2021-05-10 Thread Michael Paquier
On Mon, May 10, 2021 at 07:14:54PM +0530, Dilip Kumar wrote: > LGTM. No objections from me to what you are doing here. else if (TailMatches("DELETE", "FROM", MatchAny)) COMPLETE_WITH("USING", "WHERE"); - /* XXX: implement tab completion for DELETE ... USING */ Why are you remov

Re: PG 14 release notes, first draft

2021-05-10 Thread Laurenz Albe
On Mon, 2021-05-10 at 13:47 -0400, Bruce Momjian wrote: > Uh, I try to keep the first sentence short so people can scan it more > easily, so I am hesitant to make this change. I went with this change: > > > > > > When editing the previous query or a file with psq

Re: Inaccurate error message when set fdw batch_size to 0

2021-05-10 Thread Michael Paquier
On Mon, May 10, 2021 at 10:09:40AM -0400, Tom Lane wrote: > Bharath Rupireddy writes: >> if (value < 0) "requires a zero or positive integer value" >> if (value <= 0) "requires a positive integer value" > > I was thinking of avoiding the passive voice and writing > > "foo must be greater t

Re: update/delete and execution-time partition pruning

2021-05-10 Thread Amit Langote
On Tue, May 11, 2021 at 12:57 PM David Rowley wrote: > > On Tue, 11 May 2021 at 15:46, David Rowley wrote: > > I'll take care of this. > > Pushed. Thank you. -- Amit Langote EDB: http://www.enterprisedb.com

Re: Small issues with CREATE TABLE COMPRESSION

2021-05-10 Thread Dilip Kumar
On Tue, May 11, 2021 at 7:19 AM Michael Paquier wrote: > > > Patch looks good to me, I can not verify though because I don't have > > such an environment. Thanks for improving the patch. > > Thanks, I got that applied to finish the work of this thread for > beta1. At least this will give people

Re: Enhanced error message to include hint messages for redundant options error

2021-05-10 Thread Bharath Rupireddy
On Tue, May 11, 2021 at 2:47 AM Alvaro Herrera wrote: > > On 2021-May-10, vignesh C wrote: > > > That sounds fine to me, Attached v6 patch which has the changes for the > > same. > > What about defining a function (maybe a static inline function in > defrem.h) that is marked noreturn and receives

Re: update/delete and execution-time partition pruning

2021-05-10 Thread David Rowley
On Tue, 11 May 2021 at 15:46, David Rowley wrote: > I'll take care of this. Pushed. David

Re: PG 14 release notes, first draft

2021-05-10 Thread Amit Kapila
On Mon, May 10, 2021 at 7:30 PM Justin Pryzby wrote: > > Can these be merged: > Allow logical replication to stream long transactions to standbys (Dilip > Kumar, Tomas Vondra, Amit Kapila, Nikhil Sontakke) > Improve the logical replication API to allow streaming large in-progress > transaction

Re: PG 14 release notes, first draft

2021-05-10 Thread Peter Geoghegan
On Mon, May 10, 2021 at 7:18 PM Bruce Momjian wrote: > > On Mon, May 10, 2021 at 04:14:56PM -0700, Peter Geoghegan wrote: > > On Mon, May 10, 2021 at 3:58 PM Bruce Momjian wrote: > > > OK, you are confirming what Matthias suggested. I added these two > > > items, which both seem to apply only to

Re: Defer selection of asynchronous subplans until the executor initialization stage

2021-05-10 Thread Zhihong Yu
On Mon, May 10, 2021 at 8:45 PM Andrey Lepikhov wrote: > On 7/5/21 21:05, Etsuro Fujita wrote: > > I think it would be better to start a new thread for this, and add the > > patch to the next CF so that it doesn’t get lost. > > Current implementation of async append choose asynchronous subplans a

Re: update/delete and execution-time partition pruning

2021-05-10 Thread David Rowley
On Tue, 11 May 2021 at 15:36, Amit Langote wrote: > > We apparently forgot in 86dc90056df to remove a note in 5.11.4. > Partition Pruning saying this: > > > > Execution-time partition pruning currently only occurs for the > Append and MergeAppend node types. > It is not yet

Defer selection of asynchronous subplans until the executor initialization stage

2021-05-10 Thread Andrey Lepikhov
On 7/5/21 21:05, Etsuro Fujita wrote: I think it would be better to start a new thread for this, and add the patch to the next CF so that it doesn’t get lost. Current implementation of async append choose asynchronous subplans at the phase of an append plan creation. This is safe approach, but

Re: Corrected documentation of data type for the logical replication message formats.

2021-05-10 Thread Euler Taveira
On Mon, May 10, 2021, at 10:45 AM, vignesh C wrote: > I agree to specifying the actual dataypes like XLogRecPtr for lsn, > TimestampTz for timestamp, TransactionId for xid and Oid for the > object id. Attached v2 patch which is changed on similar lines. > Thoughts? Perhaps I didn't make myself clea

update/delete and execution-time partition pruning

2021-05-10 Thread Amit Langote
We apparently forgot in 86dc90056df to remove a note in 5.11.4. Partition Pruning saying this: Execution-time partition pruning currently only occurs for the Append and MergeAppend node types. It is not yet implemented for the ModifyTable node type, but that is likely

Re: walreceiver that is behind doesn't quit, send replies

2021-05-10 Thread Andres Freund
Hi, On 2021-05-10 19:27:55 -0700, Andres Freund wrote: > I've a couple times gotten into a situation where I was shutting down > the primary while the standby was behind, and the system appeared to > just lock up, with neither primary nor standby reacting to normal > shutdown attempts. This seems

Re: Asynchronous Append on postgres_fdw nodes.

2021-05-10 Thread Andrey Lepikhov
On 10/5/21 08:03, Etsuro Fujita wrote: On Fri, May 7, 2021 at 7:32 PM Andrey Lepikhov I think a simple fix for this would be just remove the check whether the instr->running flag is set or not in InstrUpdateTupleCount(). Attached is an updated patch, in which I also updated a comment in execnodes

Re: PG 14 release notes, first draft

2021-05-10 Thread Amit Langote
On Mon, May 10, 2021 at 11:40 PM Justin Pryzby wrote: > Same as the last couple years, I checked for missing items in the release > notes, running something like this. > > git log --cherry-pick --oneline origin/REL_13_STABLE...origin/master > > Should any of these be included? > > 86dc90056d Rewor

Re: PG 14 release notes, first draft

2021-05-10 Thread Bruce Momjian
On Mon, May 10, 2021 at 10:53:03PM +0900, Ian Lawrence Barwick wrote: > 2021年5月10日(月) 15:03 Bruce Momjian : > > > > I have committed the first draft of the PG 14 release notes. You can > > see the most current build of them here: > > > > https://momjian.us/pgsql_docs/release-14.html > > >

Re: Corrected documentation of data type for the logical replication message formats.

2021-05-10 Thread Peter Smith
On Mon, May 10, 2021 at 11:46 PM vignesh C wrote: > > On Sun, May 9, 2021 at 6:54 PM Euler Taveira wrote: > > > > On Sun, May 9, 2021, at 9:37 AM, vignesh C wrote: > > > > For some of the logical replication messages the data type documented > > was not correct, especially for lsn and xid. For ls

Re: PG 14 release notes, first draft

2021-05-10 Thread Bruce Momjian
On Mon, May 10, 2021 at 04:02:27PM +0300, Alexander Korotkov wrote: > Hi, Bruce! > > On Mon, May 10, 2021 at 9:03 AM Bruce Momjian wrote: > > I have committed the first draft of the PG 14 release notes. You can > > see the most current build of them here: > > > > https://momjian.us/pgsq

walreceiver that is behind doesn't quit, send replies

2021-05-10 Thread Andres Freund
Hi, There are no interrupt checks in the WalReceiverMain() sub-loop for receiving WAL. There's one above /* See if we can read data immediately */ len = walrcv_receive(wrconn, &buf, &wait_fd); but none in the loop below:

Re: PG 14 release notes, first draft

2021-05-10 Thread Bruce Momjian
On Mon, May 10, 2021 at 04:14:56PM -0700, Peter Geoghegan wrote: > On Mon, May 10, 2021 at 3:58 PM Bruce Momjian wrote: > > OK, you are confirming what Matthias suggested. I added these two > > items, which both seem to apply only to heap pages, not index pages: > > That's right -- these two rel

Re: Replication slot stats misgivings

2021-05-10 Thread Amit Kapila
On Fri, May 7, 2021 at 8:03 AM Amit Kapila wrote: > > Thanks for the summarization. I don't find anything that is left > unaddressed. I think we can wait for a day or two to see if Andres or > anyone else sees anything that is left unaddressed and then we can > close the open item. > I have close

Re: PG 14 release notes, first draft

2021-05-10 Thread Bruce Momjian
On Tue, May 11, 2021 at 12:35:28PM +1200, David Rowley wrote: > Thanks for making the updates. > > On Tue, 11 May 2021 at 05:07, Bruce Momjian wrote: > > > > On Mon, May 10, 2021 at 08:52:44PM +1200, David Rowley wrote: > > > > Improve the performance of parallel sequential scans (Thomas Munro,

Re: PG 14 release notes, first draft

2021-05-10 Thread Bruce Momjian
On Mon, May 10, 2021 at 07:50:14AM -0400, Joe Conway wrote: > On 5/10/21 2:03 AM, Bruce Momjian wrote: > > I have committed the first draft of the PG 14 release notes. You can > > see the most current build of them here: > > > > https://momjian.us/pgsql_docs/release-14.html > > > > I need c

Re: Small issues with CREATE TABLE COMPRESSION

2021-05-10 Thread Michael Paquier
On Mon, May 10, 2021 at 12:17:19PM +0530, Dilip Kumar wrote: > Even I was confused about that's the reason I used liblz4_static.lib, > but I see you have changed to liblz4.lib to make it consistent I > guess? That's the name the upstream code is using, yes. > Patch looks good to me, I can not ver

Re: Is element access after HASH_REMOVE ever OK?

2021-05-10 Thread Andres Freund
Hi, On 2021-05-10 20:15:41 -0400, Tom Lane wrote: > I wrote: > > ... Can we get rid of the unsafe > > access easily? > > Oh, shoulda read your second patch first. Looking at that, > I fear it might not be quite that simple, because the > comment on CheckAndSetLockHeld says very clearly > > * It

RE: Parallel scan with SubTransGetTopmostTransaction assert coredump

2021-05-10 Thread Pengchengliu
Hi Andres, Reproduce steps. 1, Modify and adjust NUM_SUBTRANS_BUFFERS to 128 from 32 in the file "src/include/access/subtrans.h" line number 15. 2, configure with enable assert and build it. 3, init a new database cluster. 4, modify postgres.conf and add some parameters as below. As the cor

RE: Parallel scan with SubTransGetTopmostTransaction assert coredump

2021-05-10 Thread Pengchengliu
Hi Andres, Reproduce steps. 1, Modify and adjust NUM_SUBTRANS_BUFFERS to 128 from 32 in the file "src/include/access/subtrans.h" line number 15. 2, configure with enable assert and build it. 3, init a new database cluster. 4, modify postgres.conf and add some parameters as below. As the cor

Re: seawasp failing, maybe in glibc allocator

2021-05-10 Thread Andres Freund
On 2021-05-11 12:16:44 +1200, Thomas Munro wrote: > OK we got the SIGABRT this time, but still no backtrace. If the > kernel's core_pattern is "core", gdb is installed, then considering > that the buildfarm core_file_glob is "core*" and the script version is > recent (REL_12), then I'm out of idea

Zeroing partial pages in walreceiver

2021-05-10 Thread Andres Freund
Hi, In https://www.postgresql.org/message-id/20210505010835.umylslxgq4a6rbwg%40alap3.anarazel.de I commented that we have a number of hacky workarounds to deal with the fact that walreceiver writes partial WAL pages into reycled segments. The problem with that practice is that within a page we c

Re: PG 14 release notes, first draft

2021-05-10 Thread David Rowley
Thanks for making the updates. On Tue, 11 May 2021 at 05:07, Bruce Momjian wrote: > > On Mon, May 10, 2021 at 08:52:44PM +1200, David Rowley wrote: > > > Improve the performance of parallel sequential scans (Thomas Munro, David > > > Rowley) > > > > I think it is worth mentioning "I/O" before "p

Re: seawasp failing, maybe in glibc allocator

2021-05-10 Thread Thomas Munro
On Mon, May 10, 2021 at 11:21 PM Fabien COELHO wrote: > > And of course this time it succeeded :-) > > Hmmm. ISTM that failures are on and off every few attempts. OK we got the SIGABRT this time, but still no backtrace. If the kernel's core_pattern is "core", gdb is installed, then considering t

Re: Is element access after HASH_REMOVE ever OK?

2021-05-10 Thread Tom Lane
I wrote: > ... Can we get rid of the unsafe > access easily? Oh, shoulda read your second patch first. Looking at that, I fear it might not be quite that simple, because the comment on CheckAndSetLockHeld says very clearly * It is callers responsibility that this function is called after * ac

Re: Is element access after HASH_REMOVE ever OK?

2021-05-10 Thread Tom Lane
Thomas Munro writes: > However, I noticed in passing that RemoveLocalLock() accesses > *locallock after removing it from the hash table (in assertion builds > only). So one question I have is whether it's actually a programming > rule that you can't do that (at most you can compare the pointer >

Is element access after HASH_REMOVE ever OK?

2021-05-10 Thread Thomas Munro
Hi, After hearing from a couple of directions about systems spending too much time scanning the local lock hash table, I wrote the trivial patch to put them in a linked list, before learning that people have considered that before, so I should probably go and read some history on that and find out

Re: Reducing opr_sanity test's runtime under CLOBBER_CACHE_ALWAYS

2021-05-10 Thread Andres Freund
Hi, On 2021-05-11 10:57:03 +1200, Thomas Munro wrote: > On Tue, May 11, 2021 at 8:52 AM Andres Freund wrote: > > ... If we did make the check support shared memory *and* > > partitioned tables, I could easily see it be a win for things like > > LockReleaseAll(). Errr, that's not even a shared ha

Re: PG 14 release notes, first draft

2021-05-10 Thread Peter Geoghegan
On Mon, May 10, 2021 at 3:58 PM Bruce Momjian wrote: > OK, you are confirming what Matthias suggested. I added these two > items, which both seem to apply only to heap pages, not index pages: That's right -- these two relate to heap pages only. I think that Matthias compared these two to bottom

Re: PG 14 release notes, first draft

2021-05-10 Thread Bruce Momjian
On Mon, May 10, 2021 at 07:54:24AM -0700, Peter Geoghegan wrote: > On Mon, May 10, 2021 at 4:44 AM Matthias van de Meent > wrote: > > I noticed that the improvement in bloat control in the HeapAM that I > > know of (3c3b8a4b, 0ff8bbde) weren't documented here. Although each > > can be considered m

Re: Reducing opr_sanity test's runtime under CLOBBER_CACHE_ALWAYS

2021-05-10 Thread Thomas Munro
On Tue, May 11, 2021 at 8:52 AM Andres Freund wrote: > ... If we did make the check support shared memory *and* > partitioned tables, I could easily see it be a win for things like > LockReleaseAll(). For that case, has the idea of maintaining a dlist of local locks been considered?

Re: Enhanced error message to include hint messages for redundant options error

2021-05-10 Thread Alvaro Herrera
On 2021-May-10, vignesh C wrote: > That sounds fine to me, Attached v6 patch which has the changes for the same. What about defining a function (maybe a static inline function in defrem.h) that is marked noreturn and receives the DefElem and optionally pstate, and throws the error? I think that

Re: Reducing opr_sanity test's runtime under CLOBBER_CACHE_ALWAYS

2021-05-10 Thread Andres Freund
Hi, On 2021-05-10 16:17:18 -0400, Tom Lane wrote: > I noticed that we already have counters that can tell whether a > catcache or dynahash table is empty, so I experimented with the > attached patch. Testing one of the slow queries from privileges.sql > (which might not be very representative of

Re: PG 14 release notes, first draft

2021-05-10 Thread Matthias van de Meent
On Mon, 10 May 2021 at 19:34, Bruce Momjian wrote: > > On Mon, May 10, 2021 at 01:44:12PM +0200, Matthias van de Meent wrote: > > On Mon, 10 May 2021 at 08:03, Bruce Momjian wrote: > > > > > > I have committed the first draft of the PG 14 release notes. You can > > > see the most current build

Re: Reducing opr_sanity test's runtime under CLOBBER_CACHE_ALWAYS

2021-05-10 Thread Tom Lane
Andres Freund writes: > On 2021-05-10 14:06:16 -0400, Tom Lane wrote: >> I wonder if there's anything we could do to make ResetCatalogCache >> faster? It wouldn't help much for normal execution of course, >> but it might do something to bring CCA testing time down out of >> the stratosphere. > W

Re: PG 14 release notes, first draft

2021-05-10 Thread John Naylor
Hi Bruce, Thanks for doing this work again! > Add date_bin function (John Naylor) > > WHAT DOES THIS DO? Hard to describe in a one-liner, but it lines up timestamps into regular intervals as specified by the user. It is more clear after seeing examples: https://www.postgresql.org/docs/devel/fun

Re: Reducing opr_sanity test's runtime under CLOBBER_CACHE_ALWAYS

2021-05-10 Thread Tom Lane
Andres Freund writes: > On 2021-05-10 14:06:16 -0400, Tom Lane wrote: >> I wonder if there's anything we could do to make ResetCatalogCache >> faster? It wouldn't help much for normal execution of course, >> but it might do something to bring CCA testing time down out of >> the stratosphere. > W

Re: Another modest proposal for reducing CLOBBER_CACHE_ALWAYS runtime

2021-05-10 Thread Tom Lane
David Rowley writes: > On Mon, 10 May 2021 at 18:04, Tom Lane wrote: >> real293m31.054s >> to >> real1m47.807s >> Yes, really. > That's quite impressive. > I've very much in favour of this change. Making it more realistic to > run the regression tests on a CLOBBER_CACHE_ALWAYS builds be

libpq_pipeline in tmp_install

2021-05-10 Thread Peter Eisentraut
The test program libpq_pipeline produced by the test suite in src/test/modules/libpq_pipeline/ is installed into tmp_install as part of make check. This isn't a real problem by itself, but I think it creates a bit of an asymmetric situation that might be worth cleaning up. Before, the content

Re: Reducing opr_sanity test's runtime under CLOBBER_CACHE_ALWAYS

2021-05-10 Thread Andres Freund
Hi, On 2021-05-10 14:06:16 -0400, Tom Lane wrote: > Hm. But constantly flushing the caches should mean that they're never > populated with very many entries at one time, which ought to forestall > that, at least to some extent. That's probably true... > I wonder if there's anything we could do

Re: AlterSubscription_refresh "wrconn" wrong variable?

2021-05-10 Thread Alvaro Herrera
On 2021-May-10, Peter Smith wrote: > PSA v5 of the patch. It is the same as v4 but with the v4-0001 part > omitted because that was already pushed. I made a few whitespace adjustments on Friday that I didn't get time to push, so I left the whole set to after the minors are finalized this week. I

Re: Reducing opr_sanity test's runtime under CLOBBER_CACHE_ALWAYS

2021-05-10 Thread Tom Lane
Andres Freund writes: > On 2021-05-08 15:44:57 -0400, Tom Lane wrote: >> I was able to complete a bisection using just that test, and >> got an unexpected result: most of the slowdown appeared at >> ab596105b (BRIN minmax-multi indexes). Apparently the additional >> time is simply from having to

Re: PG 14 release notes, first draft

2021-05-10 Thread Bruce Momjian
On Mon, May 10, 2021 at 07:39:17PM +0200, Laurenz Albe wrote: > On Mon, 2021-05-10 at 12:38 -0400, Bruce Momjian wrote: > > I came up with this release note text: > > > > > > > > > > > > When editing the previous query or a file with psql's \e, ignore the > > contents i

Re: Reducing opr_sanity test's runtime under CLOBBER_CACHE_ALWAYS

2021-05-10 Thread Andres Freund
Hi, On 2021-05-08 15:44:57 -0400, Tom Lane wrote: > In a nearby thread I bemoaned the fact that the core regression tests > seem to have gotten significantly slower in the last couple of months, > at least with CCA enabled: hyrax reports completing them in 12:52:44 > on 18 March, while its most re

Re: PG 14 release notes, first draft

2021-05-10 Thread Laurenz Albe
On Mon, 2021-05-10 at 12:38 -0400, Bruce Momjian wrote: > I came up with this release note text: > > > > > > When editing the previous query or a file with psql's \e, ignore the > contents if the editor exits without saving (Laurenz Albe) > > >

Re: PG 14 release notes, first draft

2021-05-10 Thread Bruce Momjian
On Mon, May 10, 2021 at 01:44:12PM +0200, Matthias van de Meent wrote: > On Mon, 10 May 2021 at 08:03, Bruce Momjian wrote: > > > > I have committed the first draft of the PG 14 release notes. You can > > see the most current build of them here: > > https://momjian.us/pgsql_docs/release-

Re: pg_stat_statements requires compute_query_id

2021-05-10 Thread Pavel Stehule
po 10. 5. 2021 v 19:03 odesílatel Maciek Sakrejda napsal: > On Mon, May 10, 2021 at 7:43 AM Julien Rouhaud wrote: > > On Mon, May 10, 2021 at 04:36:16PM +0200, Pavel Stehule wrote: > > > I expected just an empty column query_id and workable extension. This > > > doesn't look well. > > > > > > Mo

Re: PG 14 release notes, first draft

2021-05-10 Thread Bruce Momjian
On Mon, May 10, 2021 at 08:52:44PM +1200, David Rowley wrote: > On Mon, 10 May 2021 at 18:03, Bruce Momjian wrote: > > I need clarification on many items, and the document still needs its > > items properly ordered, and markup added. I also expect a lot of > > feedback. > > Thanks for drafting t

Re: pg_stat_statements requires compute_query_id

2021-05-10 Thread Maciek Sakrejda
On Mon, May 10, 2021 at 7:43 AM Julien Rouhaud wrote: > On Mon, May 10, 2021 at 04:36:16PM +0200, Pavel Stehule wrote: > > I expected just an empty column query_id and workable extension. This > > doesn't look well. > > > > More, it increases the (little bit) complexity of migration to Postgres 14

Re: PG 14 release notes, first draft

2021-05-10 Thread Bruce Momjian
On Mon, May 10, 2021 at 05:28:24PM +0900, Masahiko Sawada wrote: > On Mon, May 10, 2021 at 3:03 PM Bruce Momjian wrote: > > > > I have committed the first draft of the PG 14 release notes. You can > > see the most current build of them here: > > > > https://momjian.us/pgsql_docs/release-

Re: [Patch] ALTER SYSTEM READ ONLY

2021-05-10 Thread Amul Sul
On Mon, May 10, 2021 at 9:21 PM Robert Haas wrote: > > On Sun, May 9, 2021 at 1:26 AM Amul Sul wrote: > > The state in the control file also gets cleared. Though, after > > clearing in memory the state patch doesn't really do the immediate > > change to the control file, it relies on the next Upd

Re: PG 14 release notes, first draft

2021-05-10 Thread Bruce Momjian
On Mon, May 10, 2021 at 02:51:28PM +0800, Julien Rouhaud wrote: > On Mon, May 10, 2021 at 02:03:08AM -0400, Bruce Momjian wrote: > > I have committed the first draft of the PG 14 release notes. You can > > see the most current build of them here: > > > > https://momjian.us/pgsql_docs/release

Re: [PATCH] Identify LWLocks in tracepoints

2021-05-10 Thread Andres Freund
Hi, On 2021-05-10 12:14:46 -0400, Tom Lane wrote: > Andres Freund writes: > > Looks like it did, but turned out to have some unintended side-effects > > :(. > > The snapshot builds are now new: > > https://buildfarm.postgresql.org/cgi-bin/show_stage_log.pl?nm=flaviventris&dt=2021-05-10%2015%3A43%

Re: PG 14 release notes, first draft

2021-05-10 Thread Bruce Momjian
On Mon, May 10, 2021 at 08:16:16AM +0200, Laurenz Albe wrote: > On Mon, 2021-05-10 at 02:03 -0400, Bruce Momjian wrote: > > When using \e in psql, if the buffer is not modified by the editor, ignore > > the editor contents and leave the buffer unchanged (Laurenz Albe) > > The \ef and \ev commands

Re: [PATCH] Identify LWLocks in tracepoints

2021-05-10 Thread Tom Lane
Andres Freund writes: > Looks like it did, but turned out to have some unintended side-effects > :(. > The snapshot builds are now new: > https://buildfarm.postgresql.org/cgi-bin/show_stage_log.pl?nm=flaviventris&dt=2021-05-10%2015%3A43%3A56&stg=configure > configure:3966: ccache /usr/lib/gcc-snap

Re: [PATCH] Identify LWLocks in tracepoints

2021-05-10 Thread Andres Freund
On 2021-05-09 19:51:13 -0400, Tom Lane wrote: > Andres Freund writes: > > On 2021-05-08 13:13:47 -0400, Tom Lane wrote: > >> (I wonder why flaviventris and serinus are still using an "experimental" > >> compiler version that is now behind mainstream.) > > > The upgrade script didn't install the n

Re: Why do we have perl and sed versions of Gen_dummy_probes?

2021-05-10 Thread Tom Lane
Andrew Dunstan writes: > On 5/10/21 7:16 AM, Dagfinn Ilmari Mannsåker wrote: >> Peter Eisentraut writes: >>> This recipe doesn't produce a Gen_dummy_probes.pl that matches exactly >>> the one that is there now. If this is going to be the preferred method, >>> then we should generate it once so t

Re: [Patch] ALTER SYSTEM READ ONLY

2021-05-10 Thread Robert Haas
On Sun, May 9, 2021 at 1:26 AM Amul Sul wrote: > The state in the control file also gets cleared. Though, after > clearing in memory the state patch doesn't really do the immediate > change to the control file, it relies on the next UpdateControlFile() > to do that. But when will that happen? If

Re: [PATCH] Full support for index LP_DEAD hint bits on standby

2021-05-10 Thread Antonin Houska
Michail Nikolaev wrote: > After some correspondence with Peter Geoghegan (1) and his ideas, I > have reworked the patch a lot and now it is much more simple with even > better performance (no new WAL or conflict resolution, hot standby > feedback is unrelated). My review that started in [1] cont

Re: SQL-standard function body

2021-05-10 Thread Tom Lane
Peter Eisentraut writes: > On 27.04.21 18:16, Tom Lane wrote: >> That's kind of a lot of complication, and inefficiency, for a corner case >> that may never arise in practice. We've ignored the risk for default >> expressions, and AFAIR have yet to receive any field complaints about it. >> So may

Re: PG 14 release notes, first draft

2021-05-10 Thread Peter Geoghegan
On Mon, May 10, 2021 at 7:00 AM Justin Pryzby wrote: > | Allow VACUUM VERBOSE to report page deletion counts for each scan of an > index (Peter Geoghegan) > > I think "Allow" is wrong - should just say that VACUUM VERBOSE reports.. It's also not accurate, since the count of deleted pages was alw

Re: PG 14 release notes, first draft

2021-05-10 Thread Peter Geoghegan
On Mon, May 10, 2021 at 4:44 AM Matthias van de Meent wrote: > I noticed that the improvement in bloat control in the HeapAM that I > know of (3c3b8a4b, 0ff8bbde) weren't documented here. Although each > can be considered minor, they together can decrease the bloating > behaviour of certain worklo

Re: PG 14 release notes, first draft

2021-05-10 Thread Peter Geoghegan
On Sun, May 9, 2021 at 11:03 PM Bruce Momjian wrote: > I have committed the first draft of the PG 14 release notes. This definitely isn't necessary, since the commit in question was a totally mechanical thing that cleaned up a minor inconsistency: Initialize work_mem and maintenance_work_mem usi

Re: pg_stat_statements requires compute_query_id

2021-05-10 Thread Julien Rouhaud
Hi Pavel, On Mon, May 10, 2021 at 04:36:16PM +0200, Pavel Stehule wrote: > > I tested features of Postgres 14. The extension pg_stat_statements didn't > work to me until I enabled compute_query_id. Is it expected behaviour? Yes. > I expected just an empty column query_id and workable extension.

Re: SQL-standard function body

2021-05-10 Thread Peter Eisentraut
On 27.04.21 18:16, Tom Lane wrote: That's kind of a lot of complication, and inefficiency, for a corner case that may never arise in practice. We've ignored the risk for default expressions, and AFAIR have yet to receive any field complaints about it. So maybe it's okay to do the same for SQL-st

Re: PG 14 release notes, first draft

2021-05-10 Thread Justin Pryzby
Same as the last couple years, I checked for missing items in the release notes, running something like this. git log --cherry-pick --oneline origin/REL_13_STABLE...origin/master Should any of these be included? f82de5c46b Do COPY FROM encoding conversion/verification in larger chunks. 9e596b65f

pg_stat_statements requires compute_query_id

2021-05-10 Thread Pavel Stehule
Hi I tested features of Postgres 14. The extension pg_stat_statements didn't work to me until I enabled compute_query_id. Is it expected behaviour? I expected just an empty column query_id and workable extension. This doesn't look well. More, it increases the (little bit) complexity of migration

Re: GetSubscriptionRelations declares too many scan keys

2021-05-10 Thread Tom Lane
Julien Rouhaud writes: > On Mon, May 10, 2021 at 07:09:29PM +1000, Peter Smith wrote: >> Please search PG source code for "ScanData skey[1];" - there are >> dozens of precedents where other people felt the same as me for >> declaring single keys. > AFAICT there are 73 occurences vs 62 of the "Sca

Re: Inaccurate error message when set fdw batch_size to 0

2021-05-10 Thread Tom Lane
Bharath Rupireddy writes: > On Mon, May 10, 2021 at 12:00 PM Tom Lane wrote: >> Yeah, this error message seems outright buggy. However, it's a minor >> matter. Also, some people think "positive" is the same thing as >> "non-negative", so maybe we need less ambiguous wording? > Since value 0 ca

Re: PG 14 release notes, first draft

2021-05-10 Thread Justin Pryzby
Thanks for putting it together. I think these two should be merged: | Remove containment operators @ and ~ from contrib modules cube, hstore, intarray, and seg (Justin Pryzby) | Remove deprecated containment operators for built-in geometry data types (Justin Pryzby) | Improve autovacuum's ana

Re: [PATCH] Full support for index LP_DEAD hint bits on standby

2021-05-10 Thread Antonin Houska
Michail Nikolaev wrote: > > Sorry, I missed the fact that your example can be executed inside BEGIN - > > END > > block, in which case minRecoveryPoint won't advance after each command. > > No, the block is not executed as a single transaction, all commands > are separated transactions (see bel

Re: PG 14 release notes, first draft

2021-05-10 Thread Ian Lawrence Barwick
2021年5月10日(月) 15:03 Bruce Momjian : > > I have committed the first draft of the PG 14 release notes. You can > see the most current build of them here: > > https://momjian.us/pgsql_docs/release-14.html > > I need clarification on many items, and the document still needs its > items proper

Re: Corrected documentation of data type for the logical replication message formats.

2021-05-10 Thread vignesh C
On Sun, May 9, 2021 at 6:44 PM Peter Smith wrote: > > On Sun, May 9, 2021 at 10:38 PM vignesh C wrote: > > > > Hi, > > > > For some of the logical replication messages the data type documented > > was not correct, especially for lsn and xid. For lsn actual datatype > > used is uint64 but is docum

Re: Corrected documentation of data type for the logical replication message formats.

2021-05-10 Thread vignesh C
On Sun, May 9, 2021 at 6:54 PM Euler Taveira wrote: > > On Sun, May 9, 2021, at 9:37 AM, vignesh C wrote: > > For some of the logical replication messages the data type documented > was not correct, especially for lsn and xid. For lsn actual datatype > used is uint64 but is documented as int64, si

Re: Remove "FROM" in "DELETE FROM" when using tab-completion

2021-05-10 Thread Dilip Kumar
On Mon, May 10, 2021 at 5:57 PM tanghy.f...@fujitsu.com wrote: > > On Monday, May 10, 2021 4:15 PM, Julien Rouhaud wrote > >We should change all to DELETE FROM (apart from \help of course), and same > >for > >INSERT, change to INSERT INTO everywhere it makes sense. > > Thanks for the reply. Your

Re: row filtering for logical replication

2021-05-10 Thread Euler Taveira
On Mon, May 10, 2021, at 5:19 AM, Peter Smith wrote: > AFAIK this is the latest patch available, but FYI it no longer applies > cleanly on HEAD. Peter, the last patch is broken since f3b141c4825. I'm still working on it for the next CF. I already addressed the points suggested by Amit in his last r

Re: Enhanced error message to include hint messages for redundant options error

2021-05-10 Thread vignesh C
On Mon, May 10, 2021 at 6:00 AM houzj.f...@fujitsu.com wrote: > > > > > > > > > Thanks! The v5 patch looks good to me. Let's see if all > > > > > > > > agree on the goto duplicate_error approach which could reduce > > the LOC by ~80. > > > > > > > > > > > > > > I think the "goto duplicate_error" a

Re: [PATCH] Full support for index LP_DEAD hint bits on standby

2021-05-10 Thread Michail Nikolaev
Hello, Antonin. > Sorry, I missed the fact that your example can be executed inside BEGIN - END > block, in which case minRecoveryPoint won't advance after each command. No, the block is not executed as a single transaction, all commands are separated transactions (see below) > Actually I think

Re: PG 14 release notes, first draft

2021-05-10 Thread Alexander Korotkov
Hi, Bruce! On Mon, May 10, 2021 at 9:03 AM Bruce Momjian wrote: > I have committed the first draft of the PG 14 release notes. You can > see the most current build of them here: > > https://momjian.us/pgsql_docs/release-14.html > > I need clarification on many items, and the document st

compatibility issue - problem with migrating from Postgres 11

2021-05-10 Thread Pavel Stehule
Hi my customer reported an issue related to unsupported TABLESPACE pg_default for partitioned table: postgres=# CREATE TABLE IF NOT EXISTS foo2 ( data bytea, guid character varying(255) COLLATE pg_catalog."default" NOT NULL, part date NOT NULL, retention_period

postgres_fdw - make cached connection functions tests meaningful

2021-05-10 Thread Bharath Rupireddy
Hi, While working on [1], I got to know that there is a new GUC debug_invalidate_system_caches_always that has been introduced in v14. It can be used to switch off cache invalidation in CLOBBER_CACHE_ALWAYS builds which makes cache sensitive tests stable. Using this GUC, it is quite possible to ma

Re: Why do we have perl and sed versions of Gen_dummy_probes?

2021-05-10 Thread Andrew Dunstan
On 5/10/21 7:16 AM, Dagfinn Ilmari Mannsåker wrote: > Peter Eisentraut writes: > >> On 07.05.21 20:31, Andrew Dunstan wrote: >>> On 5/7/21 1:20 PM, Andres Freund wrote: On 2021-05-07 11:19:02 -0400, Andrew Dunstan wrote: > Here's a patch that adds the README and also adds a Makefile rec

RE: Remove "FROM" in "DELETE FROM" when using tab-completion

2021-05-10 Thread tanghy.f...@fujitsu.com
On Monday, May 10, 2021 4:15 PM, Julien Rouhaud wrote >We should change all to DELETE FROM (apart from \help of course), and same for >INSERT, change to INSERT INTO everywhere it makes sense. Thanks for the reply. Your advice sounds reasonable to me. So I tried to change all "DELETE" to "DELETE F

Re: Inherited UPDATE/DELETE vs async execution

2021-05-10 Thread Amit Langote
Fujita-san, On Sat, May 8, 2021 at 1:21 AM Etsuro Fujita wrote: > I noticed this while working on the > EXPLAIN-ANALYZE-for-async-capable-nodes issue: > > EXPLAIN (VERBOSE, COSTS OFF) > DELETE FROM async_pt; >QUERY PLAN > ---

Re: [PATCH] Identify LWLocks in tracepoints

2021-05-10 Thread Peter Eisentraut
On 05.05.21 06:20, Craig Ringer wrote: On Wed, 5 May 2021 at 09:15, Craig Ringer wrote: warning: suggest braces around empty body in an ‘if’ statement [-Wempty-body] 1322 |TRACE_POSTGRESQL_LWLOCK_WAIT_START(T_NAME(lock), mode); |

Re: PG 14 release notes, first draft

2021-05-10 Thread Joe Conway
On 5/10/21 2:03 AM, Bruce Momjian wrote: I have committed the first draft of the PG 14 release notes. You can see the most current build of them here: https://momjian.us/pgsql_docs/release-14.html I need clarification on many items, and the document still needs its items properly orde

  1   2   >