[Commitfest 2023-01] has started

2023-01-02 Thread vignesh C
Hi All, Just a reminder that Commitfest 2023-01 has started. There are many patches based on the latest run from [1] which require a) Rebased on top of head b) Fix compilation failures c) Fix test failure, please have a look and rebase it so that it is easy for the reviewers and committers: 1.

Re: typos

2023-01-02 Thread Amit Kapila
On Tue, Jan 3, 2023 at 12:58 PM Michael Paquier wrote: > > On Fri, Dec 30, 2022 at 05:12:57PM -0600, Justin Pryzby wrote: > > # Use larger ccache cache, as this task compiles with multiple compilers > / > # flag combinations > -CCACHE_MAXSIZE: "1GB" > +CCACHE_MAXSIZE: "1G" > >

Re: typos

2023-01-02 Thread Michael Paquier
On Fri, Dec 30, 2022 at 05:12:57PM -0600, Justin Pryzby wrote: # Use larger ccache cache, as this task compiles with multiple compilers / # flag combinations -CCACHE_MAXSIZE: "1GB" +CCACHE_MAXSIZE: "1G" In 0006, I am not sure how much this matters. Perhaps somebody more fluent

Re: Todo: Teach planner to evaluate multiple windows in the optimal order

2023-01-02 Thread Ankit Kumar Pandey
On 03/01/23 08:21, David Rowley wrote: On Mon, 26 Dec 2022 at 02:04, Ankit Kumar Pandey wrote: Point #1 In the above query Oracle 10g performs 2 sorts, DB2 and Sybase perform 3 sorts. We also perform 3. This shouldn't be too hard to do. See the code in select_active_windows(). You'll

Re: Time delayed LR (WAS Re: logical replication restrictions)

2023-01-02 Thread vignesh C
On Tue, 27 Dec 2022 at 14:59, Hayato Kuroda (Fujitsu) wrote: > Note that more than half of the modifications are done by Osumi-san. 1) This global variable can be removed as it is used only in send_feedback which is called from maybe_delay_apply so we could pass it as a function argument: + *

Re: [PATCH] Improve ability to display optimizer analysis using OPTIMIZER_DEBUG

2023-01-02 Thread Ankit Kumar Pandey
On 03/01/23 08:38, David Rowley wrote: I'm with Tom on this. I've never once used this feature to try to figure out why a certain plan was chosen or not chosen. I'd really rather not see us compiling all that debug code in by default unless it's actually going to be useful to a meaningful

Re: Allow placeholders in ALTER ROLE w/o superuser

2023-01-02 Thread Alexander Korotkov
On Mon, Jan 2, 2023 at 6:42 PM Justin Pryzby wrote: > On Mon, Jan 02, 2023 at 06:14:48PM +0300, Alexander Korotkov wrote: > > I'm going to push this if no objections. > > I also suggest that meson.build should not copy regress_args. Good point, thanks. -- Regards, Alexander Korotkov

Re: wake up logical workers after ALTER SUBSCRIPTION

2023-01-02 Thread Amit Kapila
On Wed, Dec 7, 2022 at 11:42 PM Nathan Bossart wrote: > > On Wed, Dec 07, 2022 at 02:07:11PM +0300, Melih Mutlu wrote: > > Do we also need to wake up all sync workers too? Even if not, I'm not > > actually sure whether doing that would harm anything though. > > Just asking since currently the

Re: Add a test to ldapbindpasswd

2023-01-02 Thread Julien Rouhaud
Hi, On Mon, Jan 02, 2023 at 09:45:27AM -0500, Andrew Dunstan wrote: > > On 2023-01-01 Su 18:31, Andrew Dunstan wrote: > > Let's see how we fare with this patch. > > > > > > Not so well :-(. This version tries to make the tests totally > independent, as they should be. That's an attempt to get the

Re: wake up logical workers after ALTER SUBSCRIPTION

2023-01-02 Thread Amit Kapila
On Thu, Dec 15, 2022 at 4:47 AM Nathan Bossart wrote: > > On Wed, Dec 14, 2022 at 02:02:58PM -0500, Tom Lane wrote: > > Maybe we could have workers that are exiting for that reason set a > > flag saying "please restart me without delay"? > > That helps a bit, but there are still delays when

RADIUS tests and improvements

2023-01-02 Thread Thomas Munro
Hi, Here's a draft patch to tackle a couple of TODOs in the RADIUS code in auth.c. The first change is to replace select() with a standard latch loop that responds to interrupts, postmaster death etc promptly. It's not really too much of a big deal because the timeout was only 3 seconds

Re: [PATCH] Improve ability to display optimizer analysis using OPTIMIZER_DEBUG

2023-01-02 Thread David Rowley
On Mon, 26 Dec 2022 at 08:05, Ankit Kumar Pandey wrote: > Also, inputs from other hackers are welcomed here. I'm with Tom on this. I've never once used this feature to try to figure out why a certain plan was chosen or not chosen. Do you actually have a need for this or are you just trying to

Re: Todo: Teach planner to evaluate multiple windows in the optimal order

2023-01-02 Thread David Rowley
On Mon, 26 Dec 2022 at 02:04, Ankit Kumar Pandey wrote: > Point #1 > > In the above query Oracle 10g performs 2 sorts, DB2 and Sybase perform 3 > sorts. We also perform 3. This shouldn't be too hard to do. See the code in select_active_windows(). You'll likely want to pay attention to the

Re: CFM for 2023-01

2023-01-02 Thread vignesh C
On Tue, 3 Jan 2023 at 07:52, Michael Paquier wrote: > > On Wed, Dec 28, 2022 at 10:52:38AM +0530, vignesh C wrote: > > If no one has volunteered for the upcoming (January 2023) commitfest. > > I would like to volunteer for it. > > If you want to be up to the task, that would be great, of course.

Re: [PATCH] random_normal function

2023-01-02 Thread Tom Lane
Michael Paquier writes: > FYI, here is the failure: > [21:23:10.814] In file included from pg_prng.c:27: > [21:23:10.814] ../../src/include/utils/float.h:46:16: error: ‘struct > Node’ declared inside parameter list will not be visible outside of > this definition or declaration [-Werror] >

Re: New strategies for freezing, advancing relfrozenxid early

2023-01-02 Thread Jeff Davis
On Mon, 2023-01-02 at 11:45 -0800, Peter Geoghegan wrote: > What do you think of the wording adjustments in the attached patch? > It's based on your suggested wording. Great, thank you. -- Jeff Davis PostgreSQL Contributor Team - AWS

Re: [PATCH] random_normal function

2023-01-02 Thread Michael Paquier
On Fri, Dec 30, 2022 at 09:58:04PM -0600, Justin Pryzby wrote: > This is still failing tests - did you enable cirrusci on your own github > account to run available checks on the patch ? FYI, here is the failure: [21:23:10.814] In file included from pg_prng.c:27: [21:23:10.814]

Re: CFM for 2023-01

2023-01-02 Thread Michael Paquier
On Wed, Dec 28, 2022 at 10:52:38AM +0530, vignesh C wrote: > If no one has volunteered for the upcoming (January 2023) commitfest. > I would like to volunteer for it. If you want to be up to the task, that would be great, of course. For now, I have switched the CF as in progress. -- Michael

Re: Simplify standby state machine a bit in WaitForWALToBecomeAvailable()

2023-01-02 Thread Michael Paquier
On Fri, Dec 30, 2022 at 10:32:57AM -0800, Nathan Bossart wrote: > This looks correct to me. The only thing that stood out to me was the loop > through 'tles' in XLogFileReadyAnyTLI. With this change, we'd loop through > the timelines for both XLOG_FROM_PG_ARCHIVE and XLOG_FROM_PG_WAL, whereas >

Re: perl 5.36, C99, -Wdeclaration-after-statement -Wshadow=compatible-local

2023-01-02 Thread Andres Freund
On 2023-01-02 15:46:36 -0800, Andres Freund wrote: > On 2022-12-29 13:40:13 -0800, Andres Freund wrote: > > > > Should we backpatch this? Given the volume of warnings it's probably a > > > > good > > > > idea. But I'd let it step in HEAD for a few days of buildfarm coverage > > > > first. > > >

Re: Infinite Interval

2023-01-02 Thread Joseph Koshakow
I have another patch, this one adds validations to operations that return intervals and updated error messages. I tried to give all of the error messages meaningful text, but I'm starting to think that almost all of them should just say "interval out of range". The current approach may reveal some

Doc: Rework contrib appendix -- informative titles, tweaked sentences

2023-01-02 Thread Karl O. Pinc
Hi, Attached is a patch: contrib_v1.patch It modifies Appendix F, the contrib directory. It adds brief text into the titles shown in the table of contents so it's easier to tell what each module does. It also suffixes [trusted] or [obsolete] on the relevant titles. I added the word

Re: perl 5.36, C99, -Wdeclaration-after-statement -Wshadow=compatible-local

2023-01-02 Thread Andres Freund
Hi, On 2022-12-29 13:40:13 -0800, Andres Freund wrote: > > > Should we backpatch this? Given the volume of warnings it's probably a > > > good > > > idea. But I'd let it step in HEAD for a few days of buildfarm coverage > > > first. > > > > +1 to both points. > > Pushed to HEAD. I haven't

Re: daitch_mokotoff module

2023-01-02 Thread Dag Lem
Sorry about the latest unfinished email - don't know what key combination I managed to hit there. Alvaro Herrera writes: > Hello > > On 2022-Dec-23, Dag Lem wrote: > [...] > > So, yes, I'm proposing that we returns those as array elements and that > @> is used to match them. > Looking into

Re: daitch_mokotoff module

2023-01-02 Thread Dag Lem
Alvaro Herrera writes: > Hello > > On 2022-Dec-23, Dag Lem wrote: > [...] > So, yes, I'm proposing that we returns those as array elements and that > @> is used to match them. Looking into the array operators I guess that to match such arrays directly one would actually use && (overlaps)

TAP tests for psql \g piped into program

2023-01-02 Thread Daniel Verite
Hi, This is a follow-up to commit d2a44904 from the 2022-11 CF [1] The TAP tests were left out with the suggestion to use Perl instead of cat (Unix) / findstr (Windows) as the program to pipe into. PFA a patch implementing that suggestion. [1] https://commitfest.postgresql.org/40/4000/ Best

Re: An oversight in ExecInitAgg for grouping sets

2023-01-02 Thread Tom Lane
Richard Guo writes: > On Thu, Dec 22, 2022 at 2:02 PM Richard Guo wrote: >> If it is an empty grouping set, its length will be zero, and accessing >> phasedata->eqfunctions[length - 1] is not right. > Attached is a trivial patch for the fix. Agreed, that's a latent bug. It's only latent

Re: Reduce timing overhead of EXPLAIN ANALYZE using rdtsc?

2023-01-02 Thread Maciek Sakrejda
On Fri, Jul 15, 2022 at 11:21 AM Maciek Sakrejda wrote: > On Fri, Jul 1, 2022 at 10:26 AM Andres Freund wrote: > > On 2022-07-01 01:23:01 -0700, Lukas Fittl wrote: > >... > > > Known WIP problems with this patch version: > > > > > > * There appears to be a timing discrepancy I haven't yet worked

Re: Reduce timing overhead of EXPLAIN ANALYZE using rdtsc?

2023-01-02 Thread Lukas Fittl
Hi David, Thanks for continuing to work on this patch, and my apologies for silence on the patch. Its been hard to make time, and especially so because I typically develop on an ARM-based macOS system where I can't test this directly - hence my tests with virtualized EC2 instances, where I ran

Re: New strategies for freezing, advancing relfrozenxid early

2023-01-02 Thread Peter Geoghegan
On Sat, Dec 31, 2022 at 12:45 PM Peter Geoghegan wrote: > On Sat, Dec 31, 2022 at 11:46 AM Jeff Davis wrote: > > "We have no freeze plans to execute, so there's no cost to following > > the freeze path. This is important in the case where the page is > > entirely frozen already, so that the page

Re: Why is char an internal-use category

2023-01-02 Thread Tom Lane
Dave Cramer writes: > I see in v15 there is a note that there is a new category for "char" > however it is categorized as "internal use" > I would think that char and char(n) would be used by external programs as a > user type. "char" (with quotes) is not at all the same type as char without

Why is char an internal-use category

2023-01-02 Thread Dave Cramer
I see in v15 there is a note that there is a new category for "char" however it is categorized as "internal use" I would think that char and char(n) would be used by external programs as a user type. Dave Cramer

Re: Infinite Interval

2023-01-02 Thread Joseph Koshakow
On Mon, Jan 2, 2023 at 1:21 PM Joseph Koshakow wrote: > > On Sat, Dec 31, 2022 at 12:09 AM jian he wrote: > > In float8, select float8 'inf' / float8 'inf' return NaN. Now in your patch > > select interval 'infinity' / float8 'infinity'; returns infinity. > > I am not sure it's right. I found

Re: Fixing a couple of buglets in how VACUUM sets visibility map bits

2023-01-02 Thread Peter Geoghegan
On Sat, Dec 31, 2022 at 4:53 PM Peter Geoghegan wrote: > The first patch makes sure that the snapshotConflictHorizon cutoff > (XID cutoff for recovery conflicts) is never a special XID, unless > that XID is InvalidTransactionId, which is interpreted as a > snapshotConflictHorizon value that will

Re: MERGE ... WHEN NOT MATCHED BY SOURCE

2023-01-02 Thread Dean Rasheed
On Fri, 30 Dec 2022 at 16:56, Dean Rasheed wrote: > > Attached is a WIP patch. > Updated patch attached, now with updated docs and some other minor tidying up. Regards, Dean diff --git a/doc/src/sgml/mvcc.sgml b/doc/src/sgml/mvcc.sgml new file mode 100644 index b87ad5c..1482ede ---

Re: Infinite Interval

2023-01-02 Thread Joseph Koshakow
On Sat, Dec 31, 2022 at 12:09 AM jian he wrote: > In float8, select float8 'inf' / float8 'inf' return NaN. Now in your patch > select interval 'infinity' / float8 'infinity'; returns infinity. > I am not sure it's right. I found this related post >

Re: Allow pageinspect's bt_page_stats function to return a set of rows instead of a single row

2023-01-02 Thread Tom Lane
Hamid Akhtar writes: > I wasn't aware of the meson.build file. Attached is the latest version of > the patch that contains the updated meson.build. Pushed with minor corrections, plus one major one: you missed the point of aeaaf520f, that pageinspect functions that touch relations need to be

Is OpenSSL AES-NI not available in pgcrypto?

2023-01-02 Thread aghart...@gmail.com
Hi all, A question, may I wrong. I've a Rocky Linux 8 with OpenSSL 1.1.1 FIPS  and Intel cpu with aes support (cat /proc/cpuinfo | grep aes) Test made with openssl gives me a huge performance with aes enabled vs not: "openssl speed -elapsed -evp aes-128-cbc" is about 5 time faster than

Re: [RFC] Add jit deform_counter

2023-01-02 Thread Dmitry Dolgov
> On Sun, Dec 25, 2022 at 06:55:02PM +0100, Pavel Stehule wrote: > there are some problems with stability of regress tests > > http://cfbot.cputube.org/dmitry-dolgov.html Looks like this small change predates moving to meson, the attached version should help. >From

Re: CAST(... ON DEFAULT) - WIP build on top of Error-Safe User Functions

2023-01-02 Thread Tom Lane
Corey Huinker writes: > The proposed changes are as follows: > CAST(expr AS typename) > continues to behave as before. > CAST(expr AS typename ERROR ON ERROR) > has the identical behavior as the unadorned CAST() above. > CAST(expr AS typename NULL ON ERROR) > will use error-safe

Re: verbose mode for pg_input_error_message?

2023-01-02 Thread Tom Lane
Andrew Dunstan writes: > I've been wondering if it might be a good idea to have a third parameter > for pg_input_error_message() which would default to false, but which if > true would cause it to emit the detail and hint fields, if any, as well > as the message field from the error_data. I

Re: Allow placeholders in ALTER ROLE w/o superuser

2023-01-02 Thread Justin Pryzby
On Mon, Jan 02, 2023 at 06:14:48PM +0300, Alexander Korotkov wrote: > I'm going to push this if no objections. I also suggest that meson.build should not copy regress_args. -- Justin

verbose mode for pg_input_error_message?

2023-01-02 Thread Andrew Dunstan
I've been wondering if it might be a good idea to have a third parameter for pg_input_error_message() which would default to false, but which if true would cause it to emit the detail and hint fields, if any,  as well as the message field from the error_data. Thoughts? cheers andrew --

Re: Allow placeholders in ALTER ROLE w/o superuser

2023-01-02 Thread Alexander Korotkov
Justin, Tom, Pavel, thank you for catching this. On Mon, Jan 2, 2023 at 11:54 AM Pavel Borisov wrote: > I completely agree with your analysis. Fixes by 3f0e786ccbf5 to oat > and the other modules tests came just a couple of days before > committing the main pg_db_role_setting commit 096dd80f3c

Re: Add a test to ldapbindpasswd

2023-01-02 Thread Andrew Dunstan
On 2023-01-01 Su 18:31, Andrew Dunstan wrote: > On 2023-01-01 Su 14:02, Thomas Munro wrote: >> On Mon, Jan 2, 2023 at 3:04 AM Andrew Dunstan wrote: >>> On 2022-12-19 Mo 11:16, Andrew Dunstan wrote: There is currently no test for the use of ldapbindpasswd in the pg_hba.conf file. This

Re: Reduce timing overhead of EXPLAIN ANALYZE using rdtsc?

2023-01-02 Thread David Geier
Hi, I re-based again on master and applied the following changes: I removed the fallback for obtaining the TSC frequency from /proc/cpu as suggested by Andres. Worst-case we fall back to clock_gettime(). I added code to obtain the TSC frequency via CPUID when under a hypervisor. I had to

Re: Data loss on logical replication, 12.12 to 14.5, ALTER SUBSCRIPTION

2023-01-02 Thread Amit Kapila
On Wed, Dec 28, 2022 at 4:52 PM Michail Nikolaev wrote: > > Hello. > > > None of these entries are from the point mentioned by you [1] > > yesterday where you didn't find the corresponding data in the > > subscriber. How did you identify that the entries corresponding to > > that timing were

Bug in check for unreachable MERGE WHEN clauses

2023-01-02 Thread Dean Rasheed
Re-reading my latest MERGE patch, I realised there is a trivial, pre-existing bug in the check for unreachable WHEN clauses, which means it won't spot an unreachable WHEN clause if it doesn't have an AND condition. So the checks need to be re-ordered, as in the attached. Regards, Dean diff --git

Re: Add BufFileRead variants with short read and EOF detection

2023-01-02 Thread Amit Kapila
On Wed, Dec 28, 2022 at 4:17 PM Peter Eisentraut wrote: > > Most callers of BufFileRead() want to check whether they read the full > specified length. Checking this at every call site is very tedious. > This patch provides additional variants BufFileReadExact() and > BufFileReadMaybeEOF() that

Sampling-based timing for EXPLAIN ANALYZE

2023-01-02 Thread Lukas Fittl
Hi, Since EXPLAIN ANALYZE with TIMING ON still carries noticeable overhead on modern hardware (despite time sources being faster), I'd like to propose a new setting EXPLAIN ANALYZE, called "TIMING SAMPLING", as compared to TIMING ON. This new timing mode uses a timer on a fixed recurring

Re: heapgettup refactoring

2023-01-02 Thread Peter Eisentraut
On 30.11.22 23:34, Melanie Plageman wrote: I have attached a patchset with only the code changes contained in the previous patch 0003. I have broken the refactoring down into many smaller pieces for ease of review. To keep this moving along a bit, I have committed your 0002, which I think is

Re: Allow placeholders in ALTER ROLE w/o superuser

2023-01-02 Thread Pavel Borisov
Hi, Justin! On Wed, 28 Dec 2022 at 21:28, Justin Pryzby wrote: > > On Tue, Dec 27, 2022 at 11:29:40PM -0500, Tom Lane wrote: > > Justin Pryzby writes: > > > This fails when run more than once: > > > time meson test --setup running --print > > > test_pg_db_role_setting-running/regress > > > >

Re: [DOCS] Stats views and functions not in order?

2023-01-02 Thread Peter Eisentraut
On 08.12.22 03:30, Peter Smith wrote: PSA patches for v9* v9-0001 - Now the table rows are ordered per PeterE's suggestions [1] committed v9-0002 - All the review comments from DavidJ [2] are addressed I'm not sure about this one. It removes the "see [link] for details" phrases and

Re: Support logical replication of DDLs

2023-01-02 Thread vignesh C
On Wed, 7 Dec 2022 at 17:50, Alvaro Herrera wrote: > > I think this patch is split badly. > > You have: > > 0001 an enormous patch including some required infrastructure, plus the > DDL deparsing bits themselves. > > 0002 another enormous (though not as much) patch, this time for > DDL