Re: pg_dump new feature: exporting functions only. Bad or good idea ?

2022-03-25 Thread Daniel Gustafsson
> On 25 Mar 2022, at 01:40, Tom Lane wrote: > > "David G. Johnston" writes: >> The extension object type does not seem to have gotten the >> --exclude-extension capability that it would need to conform to the general >> design exemplified by --table and hopefully extended out to the routine >> o

Re: SQL/JSON: JSON_TABLE

2022-03-25 Thread Zhihong Yu
On Fri, Mar 25, 2022 at 1:30 PM Andrew Dunstan wrote: > > On 3/22/22 10:55, Daniel Gustafsson wrote: > >> On 22 Mar 2022, at 16:31, Andrew Dunstan wrote: > >> I'm planning on pushing the functions patch set this week and json-table > >> next week. > > My comments from 30827b3c-edf6-4d41-bbf1-298

Re: [PATCH] Enable SSL library detection via PQsslAttribute

2022-03-25 Thread Jacob Champion
On Fri, 2022-03-25 at 15:32 -0400, Robert Haas wrote: > On Mon, Feb 28, 2022 at 3:21 PM Jacob Champion wrote: > > v3 rebases over Andres' changes and actually adds the Perl driver that > > I missed the git-add for. > > This seems totally reasonable. However, I think it should update the > documen

Re: pgsql: Add 'basebackup_to_shell' contrib module.

2022-03-25 Thread Andres Freund
Hi, On 2022-03-25 13:52:11 -0400, Robert Haas wrote: > On Fri, Mar 25, 2022 at 12:36 PM Andres Freund wrote: > > Create a CF entry for it, or enable CI on a github repo? > > I created a CF entry for it. Then I had to try to Google around to > find the URL from the cfbot, because it's not even lin

Re: pg_dump new feature: exporting functions only. Bad or good idea ?

2022-03-25 Thread Daniel Gustafsson
> On 25 Mar 2022, at 19:37, Tom Lane wrote: > I'd vote for changing the behavior of --table rather than trying to > be bug-compatible with this decision. Agreed. Question is what to do for "-t pg_class", should we still forbid dumping system catalogs when they are pattern matched without wildca

Re: [PATCH] Enable SSL library detection via PQsslAttribute

2022-03-25 Thread Daniel Gustafsson
> On 25 Mar 2022, at 22:25, Jacob Champion wrote: > On Fri, 2022-03-25 at 15:32 -0400, Robert Haas wrote: >> This seems totally reasonable. However, I think it should update the >> documentation somehow. > > Done in v4. I would prefer to not introduce a for this, I think adding it as a under

Re: Deparsing rewritten query

2022-03-25 Thread Tom Lane
Julien Rouhaud writes: > I'm attaching the correct patch this time, sorry about that. While I'm okay with this in principle, as it stands it fails headerscheck/cpluspluscheck: $ src/tools/pginclude/headerscheck In file included from /tmp/headerscheck.Oi8jj3/test.c:2: ./src/include/utils/ruleuti

Re: pgsql: Add 'basebackup_to_shell' contrib module.

2022-03-25 Thread Thomas Munro
On Sat, Mar 26, 2022 at 9:55 AM Thomas Munro wrote: > https://api.cirrus-ci.com/v1/artifact/task/5637156969381888/log/contrib/basebackup_to_shell/tmp_check/log/regress_log_001_basic This line doesn't look too healthy: pg_basebackup: error: backup failed: ERROR: shell command "type con > "C:cirr

Re: pg_dump new feature: exporting functions only. Bad or good idea ?

2022-03-25 Thread Tom Lane
Daniel Gustafsson writes: >> On 25 Mar 2022, at 19:37, Tom Lane wrote: >> I'd vote for changing the behavior of --table rather than trying to >> be bug-compatible with this decision. > Agreed. Question is what to do for "-t pg_class", should we still forbid > dumping system catalogs when they a

Re: [PATCH] Enable SSL library detection via PQsslAttribute

2022-03-25 Thread Tom Lane
Jacob Champion writes: > Do I need to merge my tiny test program into the libpq_pipeline tests? Doesn't seem worth the trouble to me, notably because you'd then have to cope with non-SSL builds too. regards, tom lane

Re: pg_dump new feature: exporting functions only. Bad or good idea ?

2022-03-25 Thread David G. Johnston
On Fri, Mar 25, 2022 at 2:55 PM Tom Lane wrote: > Daniel Gustafsson writes: > >> On 25 Mar 2022, at 19:37, Tom Lane wrote: > >> I'd vote for changing the behavior of --table rather than trying to > >> be bug-compatible with this decision. > > > Agreed. Question is what to do for "-t pg_class",

Re: pg_dump new feature: exporting functions only. Bad or good idea ?

2022-03-25 Thread Tom Lane
"David G. Johnston" writes: > If we want to choose the other position I would just go with > "--[no]-system-objects" options to toggle whether pattern matching grabs > them by default (defaulting to no) and if someone wants to enable them for > only specific object types they can --system-objects

Re: make MaxBackends available in _PG_init

2022-03-25 Thread Andres Freund
Hi, On 2022-03-25 14:35:42 +0800, Julien Rouhaud wrote: > On Fri, Mar 25, 2022 at 02:08:09PM +0900, Michael Paquier wrote: > > On Fri, Mar 25, 2022 at 11:11:46AM +0800, Julien Rouhaud wrote: > > > As an example, here's a POC for a new shmem_request_hook hook after > > > _PG_init(). > > > With it

Re: [PATCH] Enable SSL library detection via PQsslAttribute

2022-03-25 Thread Jacob Champion
On Fri, 2022-03-25 at 18:00 -0400, Tom Lane wrote: > Jacob Champion writes: > > Do I need to merge my tiny test program into the libpq_pipeline tests? > > Doesn't seem worth the trouble to me, notably because you'd > then have to cope with non-SSL builds too. Fine by me. v5 moves the docs out o

Re: Add LZ4 compression in pg_dump

2022-03-25 Thread gkokolatos
--- Original Message --- On Saturday, March 26th, 2022 at 12:13 AM, Rachel Heaton wrote: > On Fri, Mar 25, 2022 at 6:22 AM Justin Pryzby pry...@telsasoft.com wrote: > > > On Fri, Mar 25, 2022 at 01:20:47AM -0400, Greg Stark wrote: > > > > > It seems development on this has stalled. I

Re: pg_dump new feature: exporting functions only. Bad or good idea ?

2022-03-25 Thread Michael Paquier
On Fri, Mar 25, 2022 at 10:09:33PM +0100, Daniel Gustafsson wrote: > Agreed. In this case it seems that adding --exclude-extension would make > sense > to keep conistency. I took a quick stab at doing so with the attached while > we're here. src/test/modules/test_pg_dump would be the best place

Re: Column Filtering in Logical Replication

2022-03-25 Thread Tomas Vondra
On 3/25/22 04:10, Amit Kapila wrote: > On Fri, Mar 25, 2022 at 5:44 AM Tomas Vondra > wrote: >> >> Attached is a patch, rebased on top of the sequence decoding stuff I >> pushed earlier today, also including the comments rewording, and >> renaming the "transform" function. >> >> I'll go over it

Re: Column Filtering in Logical Replication

2022-03-25 Thread Tomas Vondra
On 3/21/22 15:12, Amit Kapila wrote: > On Sat, Mar 19, 2022 at 11:11 PM Tomas Vondra > wrote: >> >> On 3/19/22 18:11, Tomas Vondra wrote: >>> Fix a compiler warning reported by cfbot. >> >> Apologies, I failed to actually commit the fix. So here we go again. >> > > Few comments: > ===

Re: Column Filtering in Logical Replication

2022-03-25 Thread Tomas Vondra
On 3/26/22 01:18, Tomas Vondra wrote: > > ... > > I went over the patch again, polished the commit message a bit, and > pushed. May the buildfarm be merciful! > There's a couple failures immediately after the push, which caused me a minor heart attack. But it seems all of those are strange failu

Re: ubsan

2022-03-25 Thread Andres Freund
Hi, On 2022-03-23 15:55:28 -0700, Andres Freund wrote: > Originally I'd planned to mix them into existing members, but I think it'd be > better to have dedicated ones. Applied for a few new buildfarm names for: > {gcc,clang}-{-fsanitize=undefined,-fsanitize=address}. They're now enabled... taman

Re: pgsql: Add 'basebackup_to_shell' contrib module.

2022-03-25 Thread Justin Pryzby
On Fri, Mar 25, 2022 at 02:27:07PM -0700, Andres Freund wrote: > On 2022-03-25 13:52:11 -0400, Robert Haas wrote: > > On Fri, Mar 25, 2022 at 12:36 PM Andres Freund wrote: > > > Create a CF entry for it, or enable CI on a github repo? > > > > I created a CF entry for it. Then I had to try to Googl

RE: Column Filtering in Logical Replication

2022-03-25 Thread Shinoda, Noriyoshi (PN Japan FSIP)
Hello, The 'prattrs' column has been added to the pg_publication_rel catalog, but the current commit to catalog.sgml seems to have added it to pg_publication_namespace. The attached patch fixes this. Regards, Noriyoshi Shinoda -Original Message- From: Tomas Vondra Sent: Saturday, Ma

Re: pg_walinspect - a new extension to get raw WAL data and WAL stats

2022-03-25 Thread Bharath Rupireddy
On Fri, Mar 25, 2022 at 8:37 PM RKN Sai Krishna wrote: > > Hi Bharath, > > First look at the patch, bear with me if any of the following comments are > repeated. Thanks RKN, for playing around with the patches. > 1. With pg_get_wal_record(lsn), say a WAL record start, end lsn range > contains

Remove an unused function GetWalRcvWriteRecPtr

2022-03-25 Thread Bharath Rupireddy
Hi, The function GetWalRcvWriteRecPtr isn't being used anywhere, however pg_atomic_read_u64(&walrcv->writtenUpto); (reading writtenUpto without spinlock) is being used directly in pg_stat_get_wal_receiver walreceiver.c. We either make use of the function instead of pg_atomic_read_u64(&walrcv->writ

Re: pg_tablespace_location() failure with allow_in_place_tablespaces

2022-03-25 Thread Michael Paquier
On Thu, Mar 24, 2022 at 04:41:30PM +1300, Thomas Munro wrote: > As mentioned, I was unhappy with the lack of error checking for that > interface, and I've started a new thread about that, but then I > started wondering if we missed a trick here: get_dirent_type() contain > code that wants to return

Re: Remove an unused function GetWalRcvWriteRecPtr

2022-03-25 Thread Michael Paquier
On Sat, Mar 26, 2022 at 10:51:15AM +0530, Bharath Rupireddy wrote: > The function GetWalRcvWriteRecPtr isn't being used anywhere, however > pg_atomic_read_u64(&walrcv->writtenUpto); (reading writtenUpto without > spinlock) is being used directly in pg_stat_get_wal_receiver > walreceiver.c. We eithe

Re: Add LZ4 compression in pg_dump

2022-03-25 Thread Michael Paquier
On Fri, Mar 25, 2022 at 11:43:17PM +, gkokola...@pm.me wrote: > On Saturday, March 26th, 2022 at 12:13 AM, Rachel Heaton > wrote: >> Here is an updated patchset from Georgios, with minor assistance from myself. >> The comments above should be addressed, but please let us know if > > A small

Re: Corruption during WAL replay

2022-03-25 Thread Michael Paquier
On Fri, Mar 25, 2022 at 10:34:49AM -0400, Tom Lane wrote: > Robert Haas writes: >> On Fri, Mar 25, 2022 at 10:02 AM Tom Lane wrote: >>> Adding another 16 bits won't get you to that, sadly. Yeah, it *might* >>> extend the MTTF to more than the project's likely lifespan, but that >>> doesn't mean

Re: pg_relation_size on partitioned table

2022-03-25 Thread Michael Paquier
On Fri, Mar 25, 2022 at 08:52:40PM +0800, Japin Li wrote: > Could we provide a function to get the total size of the partition table > though the partitioned table name? Maybe we can extend > the pg_relation_size() to get the total size of partition tables through > the partitioned table name. Th

Re: Add LZ4 compression in pg_dump

2022-03-25 Thread Justin Pryzby
On Sat, Mar 26, 2022 at 02:57:50PM +0900, Michael Paquier wrote: > I have a question about 0002, actually. What has led you to the > conclusion that this code is dead and could be removed? See 0001 and the manpage. + 'pg_dump: compression is not supported by tar archive format');

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

2022-03-25 Thread Michael Paquier
On Thu, Mar 24, 2022 at 05:44:06PM +, Jacob Champion wrote: > On Wed, 2022-03-23 at 16:54 -0700, Andres Freund wrote: >> Another option would be to make it a GUC. With a bit of care it could be >> automatically synced by the existing parallelism infrastructure... > > Like a write-once, PGC_INT

Re: Use "WAL segment" instead of "log segment" consistently in user-facing messages

2022-03-25 Thread Bharath Rupireddy
On Wed, Mar 2, 2022 at 11:41 AM Bharath Rupireddy wrote: > > Please review the v2 patch set. Had to rebase. Attaching v3 patch set. Regards, Bharath Rupireddy. v3-0001-Use-WAL-segment-instead-of-log-segment.patch Description: Binary data v3-0002-Replace-log-record-with-WAL-record-in-docs.pat

Re: Accommodate startup process in a separate ProcState array slot instead of in MaxBackends slots.

2022-03-25 Thread Bharath Rupireddy
On Sat, Mar 26, 2022 at 1:20 AM Robert Haas wrote: > > On Sat, Feb 12, 2022 at 6:26 AM Bharath Rupireddy > wrote: > > FWIW, here's a patch just adding a comment on how the startup process > > can get a free procState array slot even when SInvalShmemSize hasn't > > accounted for it. > > I don't th

<    1   2