Re: [PATCH] Const'ify the arguments of ilist.c/ilist.h functions

2023-01-06 Thread Peter Eisentraut
On 23.11.22 14:57, Aleksander Alekseev wrote: Hi Andres, Thanks for the review! I don't think it is correct for any of these to add const. The only reason it works is because of casting etc. Fair enough. PFA the corrected patch v2. This patch version looks correct to me. It is almost the

Re: Generating code for query jumbling through gen_node_support.pl

2023-01-06 Thread Peter Eisentraut
On 07.12.22 08:56, Michael Paquier wrote: The location of the Nodes is quite invasive because we only care about that for T_Const now in the query jumbling, and this could be compensated with a third pg_node_attr() that tracks for the "int location" of a Node whether it should participate in the

Re: pglz compression performance, take two

2023-01-06 Thread Andrey Borodin
On Sun, Nov 27, 2022 at 10:43 AM Andrey Borodin wrote: > > PFA review fixes (step 1 is unchanged). Hello! Please find attached v8. Changes are mostly cosmetic: 1. 2 steps from previous message were squashed together 2. I tried to do a better commit message Thanks! Best regards, Andrey Borodin.

Re: Is OpenSSL AES-NI not available in pgcrypto?

2023-01-06 Thread agharta agharta
Hi Bruce, Thanks for reply. I've give up: i've found a slide in percona site about pgcrypto that said the developers of plugin intentionally introduces time consuming code to prevent brute force attacks. My queries involves pgcrypto only in a small number of record (about 2000), so at the end

Re: Schema variables - new implementation for Postgres 15 (typo)

2023-01-06 Thread Julien Rouhaud
Hi, On Fri, Jan 06, 2023 at 08:02:41PM +0100, Pavel Stehule wrote: > pá 6. 1. 2023 v 5:11 odesílatel Julien Rouhaud napsal: > > > > > +Datum > > +GetSessionVariableWithTypeCheck(Oid varid, bool *isNull, Oid > > expected_typid) > > +{ > > + SVariable svar; > > + > > + svar =

Re: Using WaitEventSet in the postmaster

2023-01-06 Thread Thomas Munro
On Sat, Jan 7, 2023 at 12:25 PM Andres Freund wrote: > On 2023-01-07 11:08:36 +1300, Thomas Munro wrote: > > 3. Is it OK to clobber the shared pending flag for SIGQUIT, SIGTERM, > > SIGINT? If you send all of these extremely rapidly, it's > > indeterminate which one will be seen by

Re: add PROCESS_MAIN to VACUUM

2023-01-06 Thread Nathan Bossart
rebased for cfbot -- Nathan Bossart Amazon Web Services: https://aws.amazon.com >From 7e72b0a9f06fdfa00d5320d4c3303e67788878aa Mon Sep 17 00:00:00 2001 From: Nathan Bossart Date: Thu, 29 Dec 2022 15:31:49 -0800 Subject: [PATCH v2 1/1] add PROCESS_MAIN to VACUUM ---

Re: allowing for control over SET ROLE

2023-01-06 Thread Noah Misch
On Wed, Jan 04, 2023 at 03:56:34PM -0500, Robert Haas wrote: > On Tue, Jan 3, 2023 at 5:03 PM Noah Misch wrote: > > I'd start with locations where the patch already added documentation. In > > the > > absence of documentation otherwise, a reasonable person could think WITH SET > > controls just

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

2023-01-06 Thread Dilip Kumar
On Fri, Jan 6, 2023 at 3:38 PM houzj.f...@fujitsu.com wrote: > Looks good, but I feel in pa_process_spooled_messages_if_required() function after getting the filestate the first check should be if (filestate== FS_EMPTY) return false. I mean why to process through all the states if it is empty

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

2023-01-06 Thread David Rowley
On Sat, 7 Jan 2023 at 02:11, Ankit Kumar Pandey wrote: > > On 05/01/23 12:53, David Rowley wrote: > >> > >> We *can* reuse Sorts where a more strict or equivalent sort order is > >> available. The question is how do we get the final WindowClause to do > >> something slightly more strict to save

Re: Support for dumping extended statistics

2023-01-06 Thread Bruce Momjian
On Thu, Jan 5, 2023 at 06:29:03PM +, Hari krishna Maddileti wrote: > Hi Team, > In order to restore dumped extended statistics (stxdndistinct, > stxddependencies, stxdmcv) we need to provide input functions to parse > pg_distinct/pg_dependency/pg_mcv_list strings. > > Today we get the ERROR

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

2023-01-06 Thread David Rowley
On Thu, 5 Jan 2023 at 04:11, Ankit Kumar Pandey wrote: > > Attaching test cases for this (+ small change in doc). > > Tested this in one of WIP branch where I had modified > select_active_windows and it failed > > as expected. > > Please let me know if something can be improved in this. Thanks

Re: Is OpenSSL AES-NI not available in pgcrypto?

2023-01-06 Thread Bruce Momjian
On Mon, Jan 2, 2023 at 05:57:38PM +0100, aghart...@gmail.com wrote: > So, a test with pgcrypto: > > select pgp_sym_encrypt(data::text, 'pwd') --default to aes128 > from generate_series('2022-01-01'::timestamp, '2022-12-31'::timestamp, '1 > hour'::interval) data > > vs > > select

Re: Add index scan progress to pg_stat_progress_vacuum

2023-01-06 Thread Imseih (AWS), Sami
> My point is whether we should show > indexes_total throughout the vacuum execution (even also in not > relevant phases such as heap scanning/vacuum/truncation). That is a good point. We should only show indexes_total and indexes_completed only during the relevant phases. V21 addresses this

Re: wake up logical workers after ALTER SUBSCRIPTION

2023-01-06 Thread Nathan Bossart
On Fri, Jan 06, 2023 at 05:31:26PM -0500, Tom Lane wrote: > I've pushed 0001 and 0002, which seem pretty uncontroversial. Thanks! > Attached is a rebased 0003, just to keep the cfbot happy. > I'm kind of wondering whether 0003 is worth the complexity TBH, > but in any case I ran out of time to

Re: GROUP BY ALL

2023-01-06 Thread Andrey Borodin
On Fri, Jan 6, 2023 at 1:56 PM Bruce Momjian wrote: > Because Postgres requires GROUP BY > of all non-aggregate columns of a target list, Postgres could certainly > automatically generate the GROUP BY. However, readers of the query > might not easily distinguish function calls from aggregates,

Re: Missing update of all_hasnulls in BRIN opclasses

2023-01-06 Thread Justin Pryzby
On Fri, Dec 30, 2022 at 01:18:36AM +0100, Tomas Vondra wrote: > + * Does the range already has NULL values? Either of the flags > can should say: "already have NULL values" > + * If we had NULLS, and the opclass didn't set allnulls=true, > set > + * the

Re: add \dpS to psql

2023-01-06 Thread Nathan Bossart
On Fri, Jan 06, 2023 at 06:52:33PM +, Dean Rasheed wrote: > Looking this over this, I have a couple of comments: Thanks for reviewing. > Firstly, I think it should allow \zS in the same fashion as \dpS, > since \z is an alias for \dp, so the 2 should be kept in sync. That seems reasonable

Re: Transparent column encryption

2023-01-06 Thread Justin Pryzby
"ON (CASE WHEN a.attrealtypid <> 0 THEN a.attrealtypid ELSE a.atttypid END = t.oid)\n" This breaks interoperability with older servers: ERROR: column a.attrealtypid does not exist Same in describe.c Find attached some typos and bad indentation. I'm sending this off now as I've already sat on

Re: New strategies for freezing, advancing relfrozenxid early

2023-01-06 Thread Peter Geoghegan
On Thu, Jan 5, 2023 at 10:19 AM Matthias van de Meent wrote: > Could this use something like autovacuum_cost_delay? I don't quite > like the use of arbitrary hardcoded millisecond delays It's not unlike (say) the way that there can sometimes be hardcoded waits inside GetMultiXactIdMembers(),

Re: Using WaitEventSet in the postmaster

2023-01-06 Thread Andres Freund
Hi, On 2023-01-07 11:08:36 +1300, Thomas Munro wrote: > 1. Is it OK that we are now using APIs that might throw, in places > where we weren't? I think so: we don't really expect WaitEventSet > APIs to throw unless something is pretty seriously wrong, and if you > hack things to inject failures

Re: New strategies for freezing, advancing relfrozenxid early

2023-01-06 Thread Peter Geoghegan
On Wed, Jan 4, 2023 at 5:21 PM Matthias van de Meent wrote: > Some reviews (untested; only code review so far) on these versions of > the patches: Thanks for the review! > > [PATCH v14 1/3] Add eager and lazy freezing strategies to VACUUM. > I don't think the mention of 'cutoff point' is

Re: postgres_fdw: using TABLESAMPLE to collect remote sample

2023-01-06 Thread Tomas Vondra
On 1/6/23 17:58, Tom Lane wrote: > Tomas Vondra writes: >> The one difference is that I realized the relkind check does not >> actually say we can't do sampling - it just means we can't use >> TABLESAMPLE to do it. We could still use "random()" ... > >> Furthermore, I don't think we should

Re: wake up logical workers after ALTER SUBSCRIPTION

2023-01-06 Thread Tom Lane
Nathan Bossart writes: > I found some additional places that should remove the last-start time from > the hash table. I've added those in v14. I've pushed 0001 and 0002, which seem pretty uncontroversial. Attached is a rebased 0003, just to keep the cfbot happy. I'm kind of wondering whether

Re: daitch_mokotoff module

2023-01-06 Thread Dag Lem
Alvaro Herrera writes: > On 2023-Jan-05, Dag Lem wrote: > >> Is there anything else I should do here, to avoid the status being >> incorrectly stuck at "Waiting for Author" again. > > Just mark it Needs Review for now. I'll be back from vacation on Jan > 11th and can have a look then (or

Re: Using WaitEventSet in the postmaster

2023-01-06 Thread Thomas Munro
On Fri, Dec 23, 2022 at 8:46 PM Thomas Munro wrote: > I pushed the small preliminary patches. Here's a rebase of the main patch. Here are some questions I have considered. Anyone got an opinion on point 3, in particular? 1. Is it OK that we are now using APIs that might throw, in places

Re: GROUP BY ALL

2023-01-06 Thread Bruce Momjian
On Mon, Dec 19, 2022 at 05:53:46PM +0100, Vik Fearing wrote: > I think this is a pretty terrible idea. If we want that kind of behavior, > we should just allow the GROUP BY to be omitted since without grouping sets, > it is kind of redundant anyway. > > I don't know what my opinion is on that.

Re: RFC: logical publication via inheritance root?

2023-01-06 Thread Jacob Champion
On Fri, Dec 9, 2022 at 10:21 AM Jacob Champion wrote: > Some inheritance hierarchies won't be "partitioned" hierarchies, of > course, but the user can simply not set that replication option for > those publications. The more I noodle around with this approach, the less I like it: it feels overly

Permute underscore separated components of columns before fuzzy matching

2023-01-06 Thread Arne Roland
Hello, we have the great fuzzy string match, that comes up with suggestions in the case of a typo of a column name. Since underscores are the de facto standard of separating words, it would also make sense to also generate suggestions, if the order of words gets mixed up. Example: If the user

Re: [PATCH] Expand character set for ltree labels

2023-01-06 Thread Andrew Dunstan
On 2023-01-06 Fr 11:29, Tom Lane wrote: > Andrew Dunstan writes: >> Regardless of the punycode issue, allowing hyphens in ltree labels seems >> quite reasonable. I haven't reviewed the patch yet, but if it's OK I >> intend to commit it. > No objection to allowing hyphens. If we're going to

Re: Cygwin cleanup

2023-01-06 Thread Thomas Munro
On Sat, Jan 7, 2023 at 3:40 AM Andrew Dunstan wrote: > OK, should I now try re-enabling TAP tests on lorikeet? Not before https://commitfest.postgresql.org/41/4032/ is committed. After that, it might be worth a try? I have no idea if the PANIC problem I mentioned last night would apply to

Re: Introduce "log_connection_stages" setting.

2023-01-06 Thread Jacob Champion
Hi, +1 for the idea! > +authenticated > +Logs the original identity that an authentication method > employs to identify a user. In most cases, the identity string equals the > PostgreSQL username, > +but some third-party authentication methods may alter the original >

Re: pgsql: Delay commit status checks until freezing executes.

2023-01-06 Thread Peter Geoghegan
On Tue, Jan 3, 2023 at 10:52 PM Peter Geoghegan wrote: > > And it'd make sense to have > > the explanation of why TransactionIdDidAbort() isn't the same as > > !TransactionIdDidCommit(), even for !TransactionIdIsInProgress() xacts, near > > the explanation for doing TransactionIdIsInProgress()

Re: Authentication fails for md5 connections if ~/.postgresql/postgresql.{crt and key} exist

2023-01-06 Thread Jim Jones
Hi Jelte, thanks for the message. You're right, an invalid cert path does solve the issue - I even use it for tests. Although it solves the authentication issue it still looks in my eyes like a non intuitive workaround/hack. Perhaps a new sslmode isn't the right place for this "feature"?

Re: add \dpS to psql

2023-01-06 Thread Dean Rasheed
On Wed, 28 Dec 2022 at 21:26, Nathan Bossart wrote: > > On Wed, Dec 28, 2022 at 02:46:23PM +0300, Maxim Orlov wrote: > > The patch applies with no problem, implements what it declared, CF bot is > > happy. > > Without patch \dpS shows 0 rows, after applying system objects are shown. > > Consider

Re: [PATCH] Add `verify-system` sslmode to use system CA pool for server cert

2023-01-06 Thread Jacob Champion
On Fri, Jan 6, 2023 at 2:18 AM Jelte Fennema wrote: > > Huge +1 from me. On Azure we're already using public CAs to sign certificates > for our managed postgres offerings[1][2]. Right now, our customers have to go > to the hassle of downloading a specific root cert or finding their OS default

Re: BUG #17717: Regression in vacuumdb (15 is slower than 10/11 and possible memory issue)

2023-01-06 Thread Tom Lane
Nathan Bossart writes: > On Thu, Dec 29, 2022 at 03:29:15PM -0500, Tom Lane wrote: >> I tried to make a patch along these lines, and soon hit a stumbling >> block: ONLY is a fully-reserved SQL keyword. I don't think this >> syntax is attractive enough to justify requiring people to >>

Re: Add a new pg_walinspect function to extract FPIs from WAL records

2023-01-06 Thread Bharath Rupireddy
On Fri, Jan 6, 2023 at 11:47 AM Bharath Rupireddy wrote: > > On Thu, Jan 5, 2023 at 6:51 PM Bharath Rupireddy > wrote: > > > > > I'm also wondering if it would make sense to extend the test coverage of > > > it (and pg_waldump) to "validate" that both > > > extracted images are the same and

Re: ATTACH PARTITION seems to ignore column generation status

2023-01-06 Thread Tom Lane
Amit Langote writes: > On Fri, Jan 6, 2023 at 3:53 AM Tom Lane wrote: >> I'm not sure to what extent it's sensible for partitions to have >> GENERATED columns that don't match their parent; but even if that's >> okay for payload columns I doubt we want to allow partitioning >> columns to be

Re: Support load balancing in libpq

2023-01-06 Thread Michael Banck
Hi, On Tue, Nov 29, 2022 at 02:57:08PM +, Jelte Fennema wrote: > Attached is a new version with the tests cleaned up a bit (more > comments mostly). > > @Michael, did you have a chance to look at the last version? Because I > feel that the patch is pretty much ready for a committer to look

Re: postgres_fdw: using TABLESAMPLE to collect remote sample

2023-01-06 Thread Tom Lane
Tomas Vondra writes: > The one difference is that I realized the relkind check does not > actually say we can't do sampling - it just means we can't use > TABLESAMPLE to do it. We could still use "random()" ... > Furthermore, I don't think we should silently disable sampling when the > user

Re: [PATCH] Expand character set for ltree labels

2023-01-06 Thread Tom Lane
Andrew Dunstan writes: > On 2022-10-05 We 18:05, Garen Torikian wrote: >> Therefore I have updated the patch with three much smaller changes: >> >> * Support for `-` in addition to `_` >> * Expanding the limit to 512 chars (from the existing 256); again it's >> not uncommon for non-English

Re: Logical replication - schema change not invalidating the relation cache

2023-01-06 Thread Tom Lane
vignesh C writes: > On Fri, 6 Jan 2023 at 04:32, Tom Lane wrote: >> Hm. I spent some time cleaning up this patch, and found that there's >> still a problem. ISTM that the row with value "3" ought to end up >> in the subscriber's sch2.t1 table, but it does not: the attached >> test script fails

Re: [PATCH] Expand character set for ltree labels

2023-01-06 Thread Andrew Dunstan
On 2022-10-05 We 18:05, Garen Torikian wrote: > After digging into it, you are completely correct. I had to do a bit > more reading to understand the relationships between UTF-8 and wchar, > but ultimately the existing locale support works for my use case. > > Therefore I have updated the patch

Re: [PATCH] Add `verify-system` sslmode to use system CA pool for server cert

2023-01-06 Thread Andrew Dunstan
On 2023-01-06 Fr 09:28, Jelte Fennema wrote: >> One reason might be that it doesn't give you any way not to fall back on >> the system store. > To not fall back to the system store you could still provide the exact path > to the CA cert file. I guess. I don't have strong feelings one way or

Re: Optimizing Node Files Support

2023-01-06 Thread Tom Lane
Ranier Vilela writes: > Em qua., 4 de jan. de 2023 às 19:39, Tom Lane escreveu: >> Yeah. The way that I'd been thinking of optimizing the copy functions >> was more or less as attached: continue to write all the COPY_SCALAR_FIELD >> macro calls, but just make them expand to no-ops after an

Re: Resolve UNKNOWN type to relevant type instead of text type while bulk update using values

2023-01-06 Thread Tom Lane
Ashutosh Bapat writes: > we cast a quoted value to UNKNOWN type, but this is a special value > null which can be casted to any SQL data type. Probably we could add a > ANYNULLTYPE or some such generic null type which can be casted to any > data type. Then a null value without any type is labeled

Re: Optimizing Node Files Support

2023-01-06 Thread Ranier Vilela
Em qua., 4 de jan. de 2023 às 19:39, Tom Lane escreveu: > vignesh C writes: > > The patch does not apply on top of HEAD as in [1], please post a rebased > patch: > > Yeah. The way that I'd been thinking of optimizing the copy functions > was more or less as attached: continue to write all the

Re: postgres_fdw: using TABLESAMPLE to collect remote sample

2023-01-06 Thread Tomas Vondra
I've pushed the comment/assert cleanup. Here's a cleaned up version of the relkind check. This is almost identical to the patch from yesterday (plus the renames and updates of comments for modified functions). The one difference is that I realized the relkind check does not actually say we can't

Re: Cygwin cleanup

2023-01-06 Thread Andrew Dunstan
On 2023-01-05 Th 16:39, Thomas Munro wrote: > On Fri, Jan 6, 2023 at 1:22 AM Thomas Munro wrote: >> https://cirrus-ci.com/task/5142810819559424 [still running at time of >> writing] >> >> Gotta run, but I'll check again in the morning to see if that does better... > Yes! Two successful runs

Re: [PATCH] Add `verify-system` sslmode to use system CA pool for server cert

2023-01-06 Thread Jelte Fennema
> One reason might be that it doesn't give you any way not to fall back on > the system store. To not fall back to the system store you could still provide the exact path to the CA cert file. > +1 for doing this, although I think client certs are less likely to have > been issued by a public CA.

Re: [PATCH] Add `verify-system` sslmode to use system CA pool for server cert

2023-01-06 Thread Andrew Dunstan
On 2023-01-06 Fr 05:17, Jelte Fennema wrote: > Huge +1 from me. On Azure we're already using public CAs to sign > certificates for our managed postgres offerings[1][2]. Right now, our > customers have to go to the hassle of downloading a specific root cert > or finding their OS default location.

Re: Resolve UNKNOWN type to relevant type instead of text type while bulk update using values

2023-01-06 Thread Ashutosh Bapat
On Thu, Jan 5, 2023 at 12:42 PM David G. Johnston wrote: > > The VALUES subquery has to produce its tabular output without being aware of > how the outer query is going to use it. The second column of your values > subquery lacks type information so the system chooses a default - text. > >

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

2023-01-06 Thread Ankit Kumar Pandey
Sorry if multiple mails has been sent for this. On 05/01/23 12:53, David Rowley wrote: We *can* reuse Sorts where a more strict or equivalent sort order is available.  The question is how do we get the final WindowClause to do something slightly more strict to save having to do anything for

Re: Add BufFileRead variants with short read and EOF detection

2023-01-06 Thread Peter Eisentraut
On 02.01.23 13:13, Amit Kapila wrote: 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()

Re: POC: Lock updated tuples in tuple_update() and tuple_delete()

2023-01-06 Thread Pavel Borisov
Hi, Alexander! On Thu, 5 Jan 2023 at 15:11, Alexander Korotkov wrote: > > On Wed, Jan 4, 2023 at 5:05 PM Alexander Korotkov > wrote: > > On Wed, Jan 4, 2023 at 3:43 PM Pavel Borisov wrote: > > > One more update of a patchset to avoid compiler warnings. > > > > Thank you for your help. I'm

Re: Fix showing XID of a spectoken lock in an incorrect field of pg_locks view.

2023-01-06 Thread Masahiko Sawada
On Fri, Jan 6, 2023 at 9:00 PM Amit Kapila wrote: > > On Thu, Jan 5, 2023 at 11:46 AM Masahiko Sawada wrote: > > > > Agreed. Attached the updated patch. > > > > Thanks, the patch looks good to me. I think it would be probably good > to backpatch this but it has the potential to break some

Re: [PATCH] psql: Add tab-complete for optional view parameters

2023-01-06 Thread Dean Rasheed
On Fri, 6 Jan 2023 at 11:52, vignesh C wrote: > > One suggestion: > Tab completion for "alter view v1 set (check_option =" is handled to > complete with CASCADED and LOCAL but the same is not handled for > create view: "create view viewname with ( check_option =" > + else if

Re: Fix showing XID of a spectoken lock in an incorrect field of pg_locks view.

2023-01-06 Thread Amit Kapila
On Thu, Jan 5, 2023 at 11:46 AM Masahiko Sawada wrote: > > Agreed. Attached the updated patch. > Thanks, the patch looks good to me. I think it would be probably good to backpatch this but it has the potential to break some monitoring scripts which were using the wrong columns for transaction id

Re: [PATCH] psql: Add tab-complete for optional view parameters

2023-01-06 Thread vignesh C
On Fri, 9 Dec 2022 at 16:01, Christoph Heiss wrote: > > Thanks for the review! > > On 12/8/22 12:19, Melih Mutlu wrote: > > Hi Christoph, > > > > I just took a quick look at your patch. > > Some suggestions: > > > > + else if (Matches("ALTER", "VIEW", MatchAny, "SET", "(")) > > +

Re: BUG: Postgres 14 + vacuum_defer_cleanup_age + FOR UPDATE + UPDATE

2023-01-06 Thread Michail Nikolaev
Hello! Thanks for checking the issue! > FWIW, I find that the "Assert(ItemIdIsNormal(lp));" at the top of > heap_lock_tuple() is the first thing that fails on my assert-enabled > build. Yes, the same for me: TRAP: failed Assert("ItemIdIsNormal(lp)"), File: "heapam.c", Line: 4292, PID:

Re: Cygwin cleanup

2023-01-06 Thread Thomas Munro
On Wed, Nov 9, 2022 at 2:04 PM Justin Pryzby wrote: > +data_sync_retry = on Sharing with the list some clues that Justin and I figured out about what that part is doing. Without it, you get failures like: PANIC: could not open file "pg_logical/snapshots/0-14FE6B0.snap": No such file or

Re: Improve tab completion for ALTER FUNCTION/PROCEDURE/ROUTINE

2023-01-06 Thread Dean Rasheed
On Thu, 5 Jan 2023 at 12:52, Dean Rasheed wrote: > > While playing around with this, I noticed that the "... SET SCHEMA" > case offers "FROM CURRENT" and "TO" as completions, which is > incorrect. It should really offer to complete with a list of schemas. > However, since that's a pre-existing

Re: [PATCH] pgbench: add multiconnect option

2023-01-06 Thread Jelte Fennema
This patch seems to have quite some use case overlap with my patch which adds load balancing to libpq itself: https://www.postgresql.org/message-id/flat/pr3pr83mb04768e2ff04818eeb2179949f7...@pr3pr83mb0476.eurprd83.prod.outlook.com My patch is only able to add "random" load balancing though, not

Re: Getting an error if we provide --enable-tap-tests switch on SLES 12

2023-01-06 Thread tushar
On 1/5/23 2:40 AM, Andres Freund wrote: Have you actually tested running the tests with the patch applied? Yes but getting an errors like t/006_edb_current_audit_logfile.pl .. Can't locate IPC/Run.pm in @INC (you may need to install the IPC::Run module) (@INC contains:

Re: [PATCH] Add `verify-system` sslmode to use system CA pool for server cert

2023-01-06 Thread Jelte Fennema
Huge +1 from me. On Azure we're already using public CAs to sign certificates for our managed postgres offerings[1][2]. Right now, our customers have to go to the hassle of downloading a specific root cert or finding their OS default location. Neither of these allow us to give users a simple

Issue attaching a table to a partitioned table with an auto-referenced foreign key

2023-01-06 Thread Guillaume Lelarge
Hello, One of our customers has an issue with partitions and foreign keys. He works on a v13, but the issue is also present on v15. I attach a SQL script showing the issue, and the results on 13.7, 13.9, and 15.1. But I'll explain the script here, and its behaviour on 13.9. There is one

Fix comments in gistxlogDelete, xl_heap_freeze_page and xl_btree_delete

2023-01-06 Thread Drouvot, Bertrand
Hi hackers, Please find attached a patch to $SUBJECT. The wrong comments have been discovered by Robert in [1]. Submitting this here as a separate thread so it does not get lost in the logical decoding on standby thread. [1]:

Re: Improve tab completion for ALTER FUNCTION/PROCEDURE/ROUTINE

2023-01-06 Thread Dean Rasheed
On Fri, 6 Jan 2023 at 02:38, vignesh C wrote: > > On Thu, 5 Jan 2023 at 18:22, Dean Rasheed wrote: > > > > That leads to the attached, which barring objections, I'll push shortly. > > The changes look good to me. > Pushed. Regards, Dean

Re: Minimal logical decoding on standbys

2023-01-06 Thread Drouvot, Bertrand
Hi, On 1/6/23 4:40 AM, Andres Freund wrote: Hi, Thomas, there's one point at the bottom wrt ConditionVariables that'd be interesting for you to comment on. On 2023-01-05 16:15:39 -0500, Robert Haas wrote: On Tue, Jan 3, 2023 at 2:42 AM Drouvot, Bertrand wrote: Please find attached v36,

convey privileges -> confer privileges

2023-01-06 Thread Erik Rijkers
Can we change 'convey' to 'confer' in these recent doc changes? Maybe 'convey a privilege' isn't exactly wrong but it leaves you wondering what exactly is meant. Thanks, Erik --- doc/src/sgml/ref/createuser.sgml.orig 2023-01-05 21:37:35.803839575 +0100 +++ doc/src/sgml/ref/createuser.sgml

Re: Sampling-based timing for EXPLAIN ANALYZE

2023-01-06 Thread Jelte Fennema
Nice addition! And the code looks pretty straight forward. The current patch triggers warnings: https://cirrus-ci.com/task/6016013976731648 Looks like you need to add void as the argument. Do you have some performance comparison between TIMING ON and TIMING SAMPLING? In InstrStartSampling

Re: Generate pg_stat_get_xact*() functions with Macros

2023-01-06 Thread Drouvot, Bertrand
Hi, On 1/6/23 12:21 AM, Andres Freund wrote: Hi, On 2023-01-05 15:19:54 -0500, Corey Huinker wrote: It does get me wondering, however, if we reordered the three typedefs to group like-typed registers together, we could make them an array with the names becoming defined constant index values

Re: [RFC] Add jit deform_counter

2023-01-06 Thread Pavel Stehule
Hi po 2. 1. 2023 v 17:55 odesílatel Dmitry Dolgov <9erthali...@gmail.com> napsal: > > 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

Re: Generate pg_stat_get_xact*() functions with Macros

2023-01-06 Thread Drouvot, Bertrand
Hi, On 1/5/23 9:19 PM, Corey Huinker wrote: I like code cleanups like this. It makes sense, it results in less code, and anyone doing a `git grep pg_stat_get_live_tuples` will quickly find the macro definition. Unsurprisingly, it passes `make check-world`. So I think it's good to go

Re: Authentication fails for md5 connections if ~/.postgresql/postgresql.{crt and key} exist

2023-01-06 Thread Jelte Fennema
The easiest way to achieve the same (without patching libpq) is by setting sslcert to something non-existent. While maybe not the most obvious way, I would consider this the recommended approach. (sorry for the resend Jim, my original message got blocked to the wider mailing list) On Fri, 6 Jan

Re: ATTACH PARTITION seems to ignore column generation status

2023-01-06 Thread Amit Langote
On Fri, Jan 6, 2023 at 3:53 AM Tom Lane wrote: > This does not seem good: > > regression=# create table pp (a int, b int) partition by range(a); > CREATE TABLE > regression=# create table cc (a int generated always as (b+1) stored, b int); > CREATE TABLE > regression=# alter table pp attach

Re: Add index scan progress to pg_stat_progress_vacuum

2023-01-06 Thread Masahiko Sawada
On Fri, Jan 6, 2023 at 12:07 PM Imseih (AWS), Sami wrote: > > >Similar to above three cases, vacuum can bypass index vacuuming if > >there are almost zero TIDs. Should we set indexes_total to 0 in this > >case too? If so, I think we can set both indexes_total and > >