RE: Added schema level support for publication.

2021-10-19 Thread tanghy.f...@fujitsu.com
On Tuesday, October 19, 2021 11:42 PM vignesh C wrote: > > This issue got induced in the v42 version, attached v43 patch has the > fixes for the same. > Thanks for your new patch. I confirmed that this issue has be fixed. All regression tests passed. I also tested V43 in some other scenarios

Re: [PATCH] Prefer getenv("HOME") to find the UNIX home directory

2021-10-19 Thread Kyotaro Horiguchi
At Tue, 19 Oct 2021 02:44:03 -0700, Anders Kaseorg wrote in > On 10/19/21 01:34, Kyotaro Horiguchi wrote: > > I tend to agree to this, but seeing ssh ignoring $HOME, I'm not sure > > it's safe that we follow the variable at least when accessing > > confidentiality(?) files. Since I don't underst

Re: TAP test for recovery_end_command

2021-10-19 Thread Michael Paquier
On Wed, Oct 06, 2021 at 06:49:10PM +0530, Amul Sul wrote: > Thanks for the suggestion, added the same in the attached version. Hmm. The run-time of 020_archive_status.p bumps from 4.7s to 5.8s on my laptop, so the change is noticeable. I agree that it would be good to have more coverage for thos

Re: LogicalChanges* and LogicalSubxact* wait events are never reported

2021-10-19 Thread Michael Paquier
On Wed, Oct 20, 2021 at 02:12:20PM +0900, Masahiro Ikeda wrote: > If my understanding is right, it's better to remove them since they make > users confused. Please see the attached patch. I confirmed that to make > check-world passes all tests. Yeah, I don't see the point in keeping these events a

Re: pg_receivewal starting position

2021-10-19 Thread Michael Paquier
On Tue, Oct 19, 2021 at 05:32:55PM +0200, Ronan Dunklau wrote: > Following recommendations, I stripped most of the features from the patch. > For > now we support only physical replication slots, and only provide the two > fields > of interest (restart_lsn, restart_tli) in addition to the slot

LogicalChanges* and LogicalSubxact* wait events are never reported

2021-10-19 Thread Masahiro Ikeda
Hi, When I read the documents and source code of wait evens, I found that the following wait events are never reported. * LogicalChangesRead: Waiting for a read from a logical changes file. * LogicalChangesWrite: Waiting for a write to a logical changes file. * LogicalSubxactRead: Waiting for a r

Re: pgsql: Document XLOG_INCLUDE_XID a little better

2021-10-19 Thread Dilip Kumar
On Mon, Oct 18, 2021 at 10:48 AM Amit Kapila wrote: > > Today, I have looked at this patch again and slightly changed a > comment, one of the function name and variable name. Do, let me know > if you or others have any suggestions for better names or otherwise? I > think we should backpatch this

Re: BUG #17220: ALTER INDEX ALTER COLUMN SET (..) with an optionless opclass makes index and table unusable

2021-10-19 Thread Michael Paquier
On Tue, Oct 19, 2021 at 02:40:04PM +, Bossart, Nathan wrote: > On 10/18/21, 11:49 PM, "Matthijs van der Vleuten" wrote: >> The test case doesn't seem entirely correct to me? The index being >> dropped (btree_tall_tbl_idx2) doesn't exist. > > This was fixed before it was committed [0]. Yes, m

Re: Fixing build of MSVC with OpenSSL 3.0.0

2021-10-19 Thread Michael Paquier
On Tue, Oct 19, 2021 at 01:09:28PM +0200, Daniel Gustafsson wrote: > The other proposal, making sure that we don't see a version 2.x.x creep in (in > case a packager decides to play cute like how has happened in other OS's) seem > sane to me, but I'm also not very well versed in Windows so you be t

Re: Skipping logical replication transactions on subscriber side

2021-10-19 Thread Greg Nancarrow
On Mon, Oct 18, 2021 at 12:34 PM Masahiko Sawada wrote: > > I've attached updated patches that incorporate all comments I got so far. > Minor comment on patch 17-0003 src/backend/replication/logical/worker.c (1) Typo in apply_handle_stream_abort() comment: /* Stop skipping transaction transact

Re: Postgres perl module namespace

2021-10-19 Thread Michael Paquier
On Tue, Oct 19, 2021 at 10:16:06PM +0200, Erik Rijkers wrote: >> [0001-move-perl-test-modules-to-PostgreSQL-Test-namespace.patch ] >> [0002-move-PostgreSQL-Test-PostgresVersion-up-in-the-names.patch] It seems to me that the hardest part is sorted out with the naming and pathing of the modules, so

RE: Skipping logical replication transactions on subscriber side

2021-10-19 Thread houzj.f...@fujitsu.com
On Mon, Oct 18, 2021 9:34 AM Masahiko Sawada wrote: > I've attached updated patches that incorporate all comments I got so far. Hi, Here are some minor comments for the patches. v17-0001-Add-a-subscription-errors-statistics-view-pg_sta.patch 1) + /* Clean up */ + if (not_ready_rel

Re: [RFC] building postgres with meson

2021-10-19 Thread Andres Freund
Hi, On 2021-10-19 18:49:43 -0700, Andres Freund wrote: > I wonder when it'll be faster to run 32bit ppc via qemu than natively :) Freebsd didn't seem to want to boot, but surprisingly a debian buster image started at least the installer without problems... Will probably take a while to see if it

Re: pg_upgrade test chatter

2021-10-19 Thread Alvaro Herrera
On 2021-Oct-19, Tom Lane wrote: > Yeah, my original thought had been to hack this at the test level. > However, I felt like it'd be worth adding this code because we could > apply it elsewhere in pg_regress.c to save several psql sessions > (and hence backend starts) per regression DB creation. T

Re: pg_upgrade test chatter

2021-10-19 Thread Tom Lane
Alvaro Herrera writes: > On 2021-Oct-19, Tom Lane wrote: >> We could dodge that, with modern versions of psql, by issuing >> two -c switches. > Isn't it easier to pass client_min_messages via PGOPTIONS? > PGOPTIONS="-c client_min_messages=warning" psql -c "drop database if exists > foo" Yeah,

Re: [RFC] building postgres with meson

2021-10-19 Thread Tom Lane
Andres Freund writes: > On 2021-10-19 21:26:53 -0400, Tom Lane wrote: >> As with the HPPA, a potential compromise is to spin up some newer >> BSD-ish system on it. I agree that OSX 10.4 is uninteresting as a >> software platform, but I'd like to keep 32-bit PPC represented in >> the farm. > I as

Re: pg_upgrade test chatter

2021-10-19 Thread Alvaro Herrera
On 2021-Oct-19, Tom Lane wrote: > I tried doing this as a one-liner change in pg_regress's > drop_database_if_exists(), but the idea fell over pretty > quickly, because what underlies that is a "psql -c" call: > > $ psql -c 'set client_min_messages = warning; drop database if exists foo' > ERROR:

Re: [RFC] building postgres with meson

2021-10-19 Thread Andres Freund
Hi, On 2021-10-19 21:26:53 -0400, Tom Lane wrote: > My notes say > > Currently running OSX 10.4.11 (last release of Tiger); although 10.5 > Leopard > supports PPCs, it refuses to install if CPU speed < 867MHz, well beyond > the > Cube's ability. Wikipedia does suggest it's possible

Re: [RFC] building postgres with meson

2021-10-19 Thread Andres Freund
Hi, On 2021-10-19 17:31:22 -0700, Andres Freund wrote: > I also need to make meson use our flex wrapper for the relevant versions... I > can see the warning that'd be fixed by it on macos CI. Will do that and push > it out to my github repo together with your changes. That turned out to be more w

Re: [RFC] building postgres with meson

2021-10-19 Thread Tom Lane
Andres Freund writes: > On 2021-10-19 15:22:15 -0400, Tom Lane wrote: >> I'm more concerned about the effort involved in getting meson going on some >> other old animals, such as prairiedog. > Yea, that's an *old* OS version. One version too old to have support for > @rpath, added in 10.5 :(. Is

Re: [RFC] building postgres with meson

2021-10-19 Thread Tom Lane
Andres Freund writes: > I wish we had a bit more consistency in the flags, so we could centralize > them. Seems there's no reason to not use -p -p and -b everywhere? I don't think we care enough about performance of most of the scanners to make them all backup-free, so -1 to that idea. We could

Re: [RFC] building postgres with meson

2021-10-19 Thread Andres Freund
Hi, On 2021-10-19 15:22:15 -0400, Tom Lane wrote: > Andres Freund writes: > > On 2021-10-12 01:37:21 -0700, Andres Freund wrote: > >> As far as I can tell the only OS that postgres currently supports that > >> meson doesn't support is HPUX. It'd likely be fairly easy to add > >> gcc-on-hpux suppo

Re: [RFC] building postgres with meson

2021-10-19 Thread Andres Freund
Hi, On 2021-10-19 17:57:31 -0400, John Naylor wrote: > I know this is still in the evaluation stage, but I did notice some > discrepencies in the Flex flags. With the attached patch, the read-only > data segment seems to match up pretty well now. Good catch. I think I just copied them around...

Re: Parallel vacuum workers prevent the oldest xmin from advancing

2021-10-19 Thread Masahiko Sawada
On Wed, Oct 20, 2021 at 3:07 AM Alvaro Herrera wrote: > > On 2021-Oct-19, Alvaro Herrera wrote: > Thank you for the comment. > > Hmm, I think this should happen before the transaction snapshot is > > established in the worker; perhaps immediately after calling > > StartParallelWorkerTransaction(

Re: ThisTimeLineID can be used uninitialized

2021-10-19 Thread Alvaro Herrera
On 2021-Oct-19, Andres Freund wrote: > Hi, > > On 2021-10-19 15:13:04 -0400, Robert Haas wrote: > > This is a followup to > > http://postgr.es/m/ca+tgmoz5a26c6oxkapafyuy_sx0vg6vxdd_q6asezsvrphd...@mail.gmail.com. > > I'm suspicious of the following code in CreateReplicationSlot: > > > > /* s

Re: Delegating superuser tasks to new security roles (Was: Granting control of SUSET gucs to non-superusers)

2021-10-19 Thread Stephen Frost
Greetings, On Tue, Oct 19, 2021 at 18:26 Mark Dilger wrote: > > > > On Oct 19, 2021, at 3:18 PM, Jeff Davis wrote: > > > > On Tue, 2021-10-19 at 13:17 -0700, Mark Dilger wrote: > >> Wouldn't it be much cleaner to have superuser bypass the trigger? > > > > Maybe it could be a user property like

Re: Delegating superuser tasks to new security roles (Was: Granting control of SUSET gucs to non-superusers)

2021-10-19 Thread Mark Dilger
> On Oct 19, 2021, at 3:18 PM, Jeff Davis wrote: > > On Tue, 2021-10-19 at 13:17 -0700, Mark Dilger wrote: >> Wouldn't it be much cleaner to have superuser bypass the trigger? > > Maybe it could be a user property like "BYPASS_EVENT_TRIGGERS", and > only superusers could adjust it (like the S

Re: ALTER INDEX .. RENAME allows to rename tables/views as well

2021-10-19 Thread Bossart, Nathan
On 10/19/21, 3:13 PM, "Alvaro Herrera" wrote: > On 2021-Oct-19, Bossart, Nathan wrote: > >> I did consider this, but I figured it might be better to keep the lock >> level consistent for a given object type no matter what the statement >> type is. I don't have a strong opinion about this, though.

Re: Delegating superuser tasks to new security roles (Was: Granting control of SUSET gucs to non-superusers)

2021-10-19 Thread Jeff Davis
On Tue, 2021-10-19 at 13:17 -0700, Mark Dilger wrote: > Wouldn't it be much cleaner to have superuser bypass the trigger? Maybe it could be a user property like "BYPASS_EVENT_TRIGGERS", and only superusers could adjust it (like the SUPERUSER and REPLICATION properties). I suppose it would default

Re: ALTER INDEX .. RENAME allows to rename tables/views as well

2021-10-19 Thread Alvaro Herrera
On 2021-Oct-19, Bossart, Nathan wrote: > I did consider this, but I figured it might be better to keep the lock > level consistent for a given object type no matter what the statement > type is. I don't have a strong opinion about this, though. Yeah, the problem is that if there is a concurrent

Re: [RFC] building postgres with meson

2021-10-19 Thread John Naylor
Hi, I know this is still in the evaluation stage, but I did notice some discrepencies in the Flex flags. With the attached patch, the read-only data segment seems to match up pretty well now. -- John Naylor EDB: http://www.enterprisedb.com sync-flex-flags-with-autoconf-build.patch Description:

Re: speed up verifying UTF-8

2021-10-19 Thread John Naylor
I've decided I'm not quite comfortable with the additional complexity in the build system introduced by the SIMD portion of the previous patches. It would make more sense if the pure C portion were unchanged, but with the shift-based DFA plus the bitwise ASCII check, we have a portable implementati

Re: CREATE ROLE IF NOT EXISTS

2021-10-19 Thread Isaac Morland
On Tue, 19 Oct 2021 at 16:12, David Christensen < david.christen...@crunchydata.com> wrote: > Greetings -hackers, > > Enclosed is a patch that implements CREATE ROLE IF NOT EXISTS (along with > the same support for USER/GROUP). This is a fairly straightforward > approach in that we do no validati

Re: Refactoring pg_dump's getTables()

2021-10-19 Thread Tom Lane
Daniel Gustafsson writes: > On 17 Oct 2021, at 22:05, Alvaro Herrera wrote: >> Maybe I would group together the changes that all require the same version >> test, rather than keeping the output columns in the same order. > I agree with that, if we're doing all this we might as well go all the wa

Re: Extending amcheck to check toast size and compression

2021-10-19 Thread Greg Stark
Right so here's a review. I think the patch is committable as is. It's an improvement and it does the job as promised. I do have some comments but I don't think they're serious issues and would actually be pretty happy committing it as is. Fwiw I didn't realize how short the patch was at first and

Re: ALTER INDEX .. RENAME allows to rename tables/views as well

2021-10-19 Thread Bossart, Nathan
On 10/19/21, 1:36 PM, "Alvaro Herrera" wrote: > I was about to push this when it occurred to me that it seems a bit > pointless to release AEL in order to retry with the lighter lock; once > we have AEL, let's just keep it and proceed. So how about the attached? I did consider this, but I figure

Re: ThisTimeLineID can be used uninitialized

2021-10-19 Thread Andres Freund
Hi, On 2021-10-19 15:13:04 -0400, Robert Haas wrote: > This is a followup to > http://postgr.es/m/ca+tgmoz5a26c6oxkapafyuy_sx0vg6vxdd_q6asezsvrphd...@mail.gmail.com. > I'm suspicious of the following code in CreateReplicationSlot: > > /* setup state for WalSndSegmentOpen */ > sendTimeLine

Re: ALTER INDEX .. RENAME allows to rename tables/views as well

2021-10-19 Thread Alvaro Herrera
I was about to push this when it occurred to me that it seems a bit pointless to release AEL in order to retry with the lighter lock; once we have AEL, let's just keep it and proceed. So how about the attached? I'm now thinking that this is to back-patch all the way to 12. -- Álvaro Herrera

Re: pg_upgrade test chatter

2021-10-19 Thread Bossart, Nathan
On 10/19/21, 12:37 PM, "Tom Lane" wrote: > Actually ... why shouldn't we suppress that by running the command > with client_min_messages = warning? This would have to be a change > to pg_regress, but I'm having a hard time thinking of cases where > quieting that message would be a problem. I was

Re: Delegating superuser tasks to new security roles (Was: Granting control of SUSET gucs to non-superusers)

2021-10-19 Thread Mark Dilger
> On Oct 19, 2021, at 12:28 PM, Jeff Davis wrote: > > On Mon, 2021-09-27 at 11:15 -0700, Mark Dilger wrote: >> Allow non-superusers to create event triggers. The logic already >> existed and is unchanged to handle event triggers owned by non- >> superusers and conditioning those triggers firi

Re: Postgres perl module namespace

2021-10-19 Thread Erik Rijkers
Op 19-10-2021 om 20:54 schreef Andrew Dunstan: Discussion has gone quiet and the tree is now relatively quiet, so now seems like a good time to do this. See attached patches. > [0001-move-perl-test-modules-to-PostgreSQL-Test-namespace.patch ] > [0002-move-PostgreSQL-Test-PostgresVersion-up-

CREATE ROLE IF NOT EXISTS

2021-10-19 Thread David Christensen
Greetings -hackers, Enclosed is a patch that implements CREATE ROLE IF NOT EXISTS (along with the same support for USER/GROUP). This is a fairly straightforward approach in that we do no validation of anything other than existence, with the user needing to ensure that permissions/grants are set u

Re: pg_upgrade test chatter

2021-10-19 Thread Tom Lane
I wrote: > "Bossart, Nathan" writes: >> I run 'make check-world' a lot, and I typically use parallelism and >> redirect stdout to /dev/null as suggested in the docs [0]. This seems >> to eliminate all of the test chatter except for this one message: >> NOTICE: database "regression" does not exis

Re: pg_stat_bgwriter.buffers_backend is pretty meaningless (and more?)

2021-10-19 Thread Andres Freund
Hi, On 2021-10-11 16:48:01 -0400, Melanie Plageman wrote: > On Fri, Oct 8, 2021 at 1:56 PM Andres Freund wrote: > > On 2021-10-01 16:05:31 -0400, Melanie Plageman wrote: > > > diff --git a/src/backend/utils/init/postinit.c > > > b/src/backend/utils/init/postinit.c > > > index 78bc64671e..fba5864

Re: Delegating superuser tasks to new security roles (Was: Granting control of SUSET gucs to non-superusers)

2021-10-19 Thread Jeff Davis
On Mon, 2021-09-27 at 11:15 -0700, Mark Dilger wrote: > Allow non-superusers to create event triggers. The logic already > existed and is unchanged to handle event triggers owned by non- > superusers and conditioning those triggers firing on the (trigger- > owner, role-performing-event) pair. The

cursor use vs pg_stat_statements

2021-10-19 Thread Andrew Dunstan
The problem I'm writing about (h/t Simon Riggs for finding it) is illustrated by the following snippet of java: public static void runtest(Connection conn) throws Exception { Statement stmt = conn.createStatement(); stmt.setFetchSize(10); ResultSet rs = stmt.execute

Re: [RFC] building postgres with meson

2021-10-19 Thread Tom Lane
Andres Freund writes: > On 2021-10-12 01:37:21 -0700, Andres Freund wrote: >> As far as I can tell the only OS that postgres currently supports that >> meson doesn't support is HPUX. It'd likely be fairly easy to add >> gcc-on-hpux support, a chunk more to add support for the proprietary >> ones.

ThisTimeLineID can be used uninitialized

2021-10-19 Thread Robert Haas
Hi, This is a followup to http://postgr.es/m/ca+tgmoz5a26c6oxkapafyuy_sx0vg6vxdd_q6asezsvrphd...@mail.gmail.com. I'm suspicious of the following code in CreateReplicationSlot: /* setup state for WalSndSegmentOpen */ sendTimeLineIsHistoric = false; sendTimeLine = ThisTimeLineID; The f

Re: [Proposal] Global temporary tables

2021-10-19 Thread Andrew Bille
Another thanks for the fix. It works for me. But I found another crash! On master with the v56 patches applied: initdb -D data pg_ctl -w -t 5 -D data -l server.log start echo "create global temp table t(i int4); insert into t values (1); vacuum t;" > tmp.sql psql < tmp.sql CREATE TABLE INSERT 0

Re: XTS cipher mode for cluster file encryption

2021-10-19 Thread Stephen Frost
Greetings, * Sasasu (i...@sasa.su) wrote: > On 2021/10/19 00:37, Robert Haas wrote: > >I think what we ought to be doing at > >this point is combining our efforts to try to get some things > >committed which make future work in this area committed - like that > >patch to preserve relfilenode and d

Re: parallelizing the archiver

2021-10-19 Thread Stephen Frost
Greetings, * Magnus Hagander (mag...@hagander.net) wrote: > Backwards compatibility is definitely a must, I'd say. Regardless of > exactly how the backwards-compatible pugin is shipped, it should be what's > turned on by default. I keep seeing this thrown around and I don't quite get why we feel

Re: XTS cipher mode for cluster file encryption

2021-10-19 Thread Stephen Frost
Greetings, * Tomas Vondra (tomas.von...@enterprisedb.com) wrote: > On 10/18/21 17:56, Stephen Frost wrote: > >* Tomas Vondra (tomas.von...@enterprisedb.com) wrote: > >>On 10/15/21 21:22, Stephen Frost wrote: > >>>Now, to address the concern around re-encrypting a block with the same > >>>key+IV bu

Re: [RFC] building postgres with meson

2021-10-19 Thread Andres Freund
Hi Tom, On 2021-10-12 01:37:21 -0700, Andres Freund wrote: > As far as I can tell the only OS that postgres currently supports that > meson doesn't support is HPUX. It'd likely be fairly easy to add > gcc-on-hpux support, a chunk more to add support for the proprietary > ones. Tom, wrt HPUX on pa

Re: [PATCH] test/ssl: rework the sslfiles Makefile target

2021-10-19 Thread Jacob Champion
On Tue, 2021-10-19 at 20:21 +0200, Daniel Gustafsson wrote: > > On 15 Oct 2021, at 14:01, Daniel Gustafsson wrote: > > The attached contains the requested fixes, and has been tested on all (by > > us) > > supported versions of OpenSSL. Unless there are objections I will apply > > this > > to ma

Re: [PATCH] test/ssl: rework the sslfiles Makefile target

2021-10-19 Thread Daniel Gustafsson
> On 15 Oct 2021, at 14:01, Daniel Gustafsson wrote: > The attached contains the requested fixes, and has been tested on all (by us) > supported versions of OpenSSL. Unless there are objections I will apply this > to master shortly. Which is now done. -- Daniel Gustafsson https:/

Re: ldap/t/001_auth.pl fails with openldap 2.5

2021-10-19 Thread Andres Freund
Hi, On 2021-10-10 00:45:41 -0400, Tom Lane wrote: > Andres Freund writes: > > Although I'm mildly tempted to rewrap the parameters, it's kinda odd how the > > trailing parameter on one line, has its value on the next line. > > I'm betting that perltidy did that. If you want to fix it so it > st

Re: Parallel vacuum workers prevent the oldest xmin from advancing

2021-10-19 Thread Alvaro Herrera
On 2021-Oct-19, Alvaro Herrera wrote: > Hmm, I think this should happen before the transaction snapshot is > established in the worker; perhaps immediately after calling > StartParallelWorkerTransaction(), or anyway not after > SetTransactionSnapshot. In fact, since SetTransactionSnapshot receive

Re: pg_upgrade test chatter

2021-10-19 Thread Tom Lane
"Bossart, Nathan" writes: > I run 'make check-world' a lot, and I typically use parallelism and > redirect stdout to /dev/null as suggested in the docs [0]. This seems > to eliminate all of the test chatter except for this one message: > NOTICE: database "regression" does not exist, ski

Re: UPDATE on Domain Array that is based on a composite key crashes

2021-10-19 Thread Zhihong Yu
On Tue, Oct 19, 2021 at 10:04 AM Tom Lane wrote: > [ please do not quote the entire thread when replying ] > > Zhihong Yu writes: > > Here is the patch. > > This patch seems quite misguided to me. The proximate cause of > the crash is that we're arriving at ExecEvalFieldStoreDeForm with > *op->

Re: UPDATE on Domain Array that is based on a composite key crashes

2021-10-19 Thread Tom Lane
[ please do not quote the entire thread when replying ] Zhihong Yu writes: > Here is the patch. This patch seems quite misguided to me. The proximate cause of the crash is that we're arriving at ExecEvalFieldStoreDeForm with *op->resnull and *op->resvalue both zero, which is a completely invali

Re: UPDATE on Domain Array that is based on a composite key crashes

2021-10-19 Thread Japin Li
On Tue, 19 Oct 2021 at 23:17, Zhihong Yu wrote: > On Tue, Oct 19, 2021 at 2:12 AM Zhihong Yu wrote: > >> >> >> On Tue, Oct 19, 2021 at 12:39 AM Onder Kalaci >> wrote: >> >>> Hi hackers, >>> >>> >>> >>> I couldn’t find a similar report to this one, so starting a new thread. I >>> can reproduce

Re: XTS cipher mode for cluster file encryption

2021-10-19 Thread Robert Haas
On Tue, Oct 19, 2021 at 11:46 AM Sasasu wrote: > As there are so many threat models, I propose to do the TDE feature by a > set of hooks. This is too invasive to do using hooks. We are inevitably going to need to make significant changes in core. -- Robert Haas EDB: http://www.enterprisedb.com

Unexpected behavior of updating domain array that is based on a composite

2021-10-19 Thread Japin Li
Hi, hackers While reading the patch in [1], I found there is an unexpected behavior when update the domain array that is based on a composite. Steps to reproduce: 1) CREATE TYPE two_ints as (if1 int, if2 int); CREATE DOMAIN domain AS two_ints CHECK ((VALUE).if1 > 0); CREATE TABLE domain_indire

Re: parallelizing the archiver

2021-10-19 Thread Robert Haas
On Tue, Oct 19, 2021 at 10:19 AM Magnus Hagander wrote: > But, is logical decoding really that great an example? I mean, we build > pgoutput.so as a library, we don't provide it compiled-in. So we could build > the "shell archiver" based on that pattern, in which case we should create a > postm

Re: parallelizing the archiver

2021-10-19 Thread Bossart, Nathan
On 10/19/21, 6:39 AM, "David Steele" wrote: > On 10/19/21 8:50 AM, Robert Haas wrote: >> I am not quite sure why we wouldn't just compile the functions into >> the server. Functions pointers can point to core functions as surely >> as loadable modules. The present design isn't too congenial to tha

Re: XTS cipher mode for cluster file encryption

2021-10-19 Thread Sasasu
On 2021/10/19 00:37, Robert Haas wrote: I think what we ought to be doing at this point is combining our efforts to try to get some things committed which make future work in this area committed - like that patch to preserve relfilenode and database OID, or maybe some patches to drive all of our

Re: Added schema level support for publication.

2021-10-19 Thread vignesh C
On Tue, Oct 19, 2021 at 11:23 AM tanghy.f...@fujitsu.com wrote: > > On Tuesday, October 19, 2021 12:57 PM Amit Kapila > wrote: > > > > On Tue, Oct 19, 2021 at 9:15 AM tanghy.f...@fujitsu.com > > wrote: > > > > > > On Monday, October 18, 2021 8:23 PM vignesh C > > wrote: > > > > > > > > Thanks

Re: Parallel vacuum workers prevent the oldest xmin from advancing

2021-10-19 Thread Alvaro Herrera
Hmm, I think this should happen before the transaction snapshot is established in the worker; perhaps immediately after calling StartParallelWorkerTransaction(), or anyway not after SetTransactionSnapshot. In fact, since SetTransactionSnapshot receives a 'sourceproc' argument, why not do it exactl

Re: pg_receivewal starting position

2021-10-19 Thread Ronan Dunklau
Hello, Following recommendations, I stripped most of the features from the patch. For now we support only physical replication slots, and only provide the two fields of interest (restart_lsn, restart_tli) in addition to the slot type (fixed at physical) to not paint ourselves in a corner. I al

Re: UPDATE on Domain Array that is based on a composite key crashes

2021-10-19 Thread Zhihong Yu
On Tue, Oct 19, 2021 at 2:12 AM Zhihong Yu wrote: > > > On Tue, Oct 19, 2021 at 12:39 AM Onder Kalaci > wrote: > >> Hi hackers, >> >> >> >> I couldn’t find a similar report to this one, so starting a new thread. I >> can reproduce this on v14.0 as well as PostgreSQL 12.5 (not tried below >> vers

Re: .ready and .done files considered harmful

2021-10-19 Thread Bossart, Nathan
On 10/19/21, 5:59 AM, "Robert Haas" wrote: > Nathan, I just realized we never closed the loop on this. Do you have > any thoughts? IMO the patch is in decent shape. Happy to address any feedback you might have on the latest patch [0]. Nathan [0] https://www.postgresql.org/message-id/attachmen

Re: BUG #17220: ALTER INDEX ALTER COLUMN SET (..) with an optionless opclass makes index and table unusable

2021-10-19 Thread Bossart, Nathan
On 10/18/21, 11:49 PM, "Matthijs van der Vleuten" wrote: > The test case doesn't seem entirely correct to me? The index being > dropped (btree_tall_tbl_idx2) doesn't exist. This was fixed before it was committed [0]. > Also, I don't believe this tests the case of dropping the index when > it pre

Re: parallelizing the archiver

2021-10-19 Thread Magnus Hagander
On Tue, Oct 19, 2021 at 2:50 PM Robert Haas wrote: > On Mon, Oct 18, 2021 at 7:25 PM Bossart, Nathan > wrote: > > I think the biggest question is where to put the archive_command > > module, which I've called shell_archive. The only existing directory > > that looked to me like it might work is

Re: parallelizing the archiver

2021-10-19 Thread David Steele
On 10/19/21 8:50 AM, Robert Haas wrote: On Mon, Oct 18, 2021 at 7:25 PM Bossart, Nathan wrote: I think the biggest question is where to put the archive_command module, which I've called shell_archive. The only existing directory that looked to me like it might work is src/test/modules. It mig

Re: Partial aggregates pushdown

2021-10-19 Thread Tomas Vondra
On 10/19/21 08:56, Alexander Pyhalov wrote: Hi. Tomas Vondra писал 2021-10-15 17:56: As for the proposed approach, it's probably good enough for the first version to restrict this to aggregates where the aggregate result is sufficient, i.e. we don't need any new export/import procedures. But i

Re: Refactoring pg_dump's getTables()

2021-10-19 Thread Tom Lane
Daniel Gustafsson writes: > On 17 Oct 2021, at 22:05, Alvaro Herrera wrote: >> Maybe I would group together the changes that all require the same version >> test, rather than keeping the output columns in the same order. > I agree with that, if we're doing all this we might as well go all the wa

pgstat_assert_is_up() can fail in walsender

2021-10-19 Thread Amit Langote
Hi, I can (almost) consistently reproduce $subject by executing the attached shell script, which I was using while constructing a test case for another thread. The backtrace on the assert failure is this: (gdb) bt #0 0x7fce0b018387 in raise () from /lib64/libc.so.6 #1 0x7fce0b019a78 in

Re: Refactoring pg_dump's getTables()

2021-10-19 Thread Daniel Gustafsson
> On 17 Oct 2021, at 22:05, Alvaro Herrera wrote: > > On 2021-Oct-16, Tom Lane wrote: > >> Attached is a proposed patch that refactors getTables() along the >> same lines as some previous work (eg 047329624, ed2c7f65b, daa9fe8a5) >> to avoid having multiple partially-redundant copies of the SQL

Re: when the startup process doesn't (logging startup delays)

2021-10-19 Thread Nitin Jadhav
> Apparently not, but here's a v2 anyway. In this version I made > enable_timeout_every() a three-argument function, so that the caller > can specify both the first time at which the timeout routine should be > called and the interval between them, instead of only the latter. That > seems to be mor

Re: .ready and .done files considered harmful

2021-10-19 Thread Robert Haas
On Fri, Sep 24, 2021 at 12:28 PM Robert Haas wrote: > On Thu, Sep 16, 2021 at 7:26 PM Bossart, Nathan wrote: > > What do you think? > > I think this is committable. I also went back and looked at your > previous proposal to do files in batches, and I think that's also > committable. After some re

Re: parallelizing the archiver

2021-10-19 Thread Robert Haas
On Mon, Oct 18, 2021 at 7:25 PM Bossart, Nathan wrote: > I think the biggest question is where to put the archive_command > module, which I've called shell_archive. The only existing directory > that looked to me like it might work is src/test/modules. It might be > rather bold to relegate this

Re: Added schema level support for publication.

2021-10-19 Thread Amit Kapila
On Mon, Oct 18, 2021 at 5:53 PM vignesh C wrote: > Few comments on latest set of patches: === 1. +/* + * Filter out the partitions whose parent tables was also specified in + * the publication. + */ +static List * +filter_out_partitions(List *relids) Can we name this

Re: Fixing build of MSVC with OpenSSL 3.0.0

2021-10-19 Thread Daniel Gustafsson
> On 19 Oct 2021, at 12:52, Michael Paquier wrote: > > On Tue, Oct 19, 2021 at 10:34:10AM +0200, Daniel Gustafsson wrote: >> I think we can tighten the check for GetOpenSSLVersion() a bit since we now >> now >> the range of version in the 1.x.x series. For these checks we know we want >> 1.1.x

Re: Add jsonlog log_destination for JSON server logs

2021-10-19 Thread Michael Paquier
On Fri, Oct 08, 2021 at 12:28:58PM +0900, Michael Paquier wrote: > 0001 and 0003 have been applied independently, attached is a rebased > version. Attached are rebased versions of the patch set, where I have done a cleaner split: - 0001 includes all the refactoring of the routines from elog.c. - 0

Re: Fixing build of MSVC with OpenSSL 3.0.0

2021-10-19 Thread Michael Paquier
On Tue, Oct 19, 2021 at 10:34:10AM +0200, Daniel Gustafsson wrote: > I think we can tighten the check for GetOpenSSLVersion() a bit since we now > now > the range of version in the 1.x.x series. For these checks we know we want > 1.1.x or 3.x.x, but never 2.x.x etc. > > How about the (untested)

Re: UPDATE on Domain Array that is based on a composite key crashes

2021-10-19 Thread Japin Li
On Tue, 19 Oct 2021 at 17:12, Zhihong Yu wrote: > On Tue, Oct 19, 2021 at 12:39 AM Onder Kalaci wrote: > >> Hi hackers, >> >> >> >> I couldn’t find a similar report to this one, so starting a new thread. I >> can reproduce this on v14.0 as well as PostgreSQL 12.5 (not tried below >> versions).

Re: Delegating superuser tasks to new security roles (Was: Granting control of SUSET gucs to non-superusers)

2021-10-19 Thread Ronan Dunklau
Le lundi 27 septembre 2021, 20:15:05 CEST Mark Dilger a écrit : > > On Sep 21, 2021, at 12:58 PM, Andrew Dunstan wrote: > > > > This patch set is failing to apply for me - it fails on patch 2. > > Thanks for looking! I have pulled together a new patch set which applies > cleanly against current

Re: [PATCH] Prefer getenv("HOME") to find the UNIX home directory

2021-10-19 Thread Anders Kaseorg
On 10/19/21 01:34, Kyotaro Horiguchi wrote: I tend to agree to this, but seeing ssh ignoring $HOME, I'm not sure it's safe that we follow the variable at least when accessing confidentiality(?) files. Since I don't understand the exact reasoning for the ssh's behavior so it's just my humbole opi

Re: UPDATE on Domain Array that is based on a composite key crashes

2021-10-19 Thread Zhihong Yu
On Tue, Oct 19, 2021 at 12:39 AM Onder Kalaci wrote: > Hi hackers, > > > > I couldn’t find a similar report to this one, so starting a new thread. I > can reproduce this on v14.0 as well as PostgreSQL 12.5 (not tried below > versions). > > > > Steps to reproduce: > > > > CREATE TYPE two_ints as (

Re: Error "initial slot snapshot too large" in create replication slot

2021-10-19 Thread Dilip Kumar
On Tue, Oct 12, 2021 at 11:30 AM Dilip Kumar wrote: > > On Tue, Oct 12, 2021 at 10:35 AM Kyotaro Horiguchi > wrote: > > > > At Tue, 12 Oct 2021 13:59:59 +0900 (JST), Kyotaro Horiguchi > > wrote in > > > So I came up with the attached version. > > > > Sorry, it was losing a piece of change. > >

Re: [PATCH] Prefer getenv("HOME") to find the UNIX home directory

2021-10-19 Thread Kyotaro Horiguchi
At Mon, 18 Oct 2021 19:23:50 -0300, Alvaro Herrera wrote in > On 2021-Oct-14, Anders Kaseorg wrote: > > > This is important for systems where many users share the same UID, and > > for test systems that change HOME to avoid interference with the > > user’s real home directory. It matches what

Re: Fixing build of MSVC with OpenSSL 3.0.0

2021-10-19 Thread Daniel Gustafsson
> On 19 Oct 2021, at 07:27, Michael Paquier wrote: > Looking at the MSIs of OpenSSL for Win64 and Win32, there are no > changes in the deliverable names or paths, meaning that something as > simple as the attached patch is enough to make the build pass. Makes sense. > Any opinions? I think we

UPDATE on Domain Array that is based on a composite key crashes

2021-10-19 Thread Onder Kalaci
Hi hackers, I couldn’t find a similar report to this one, so starting a new thread. I can reproduce this on v14.0 as well as PostgreSQL 12.5 (not tried below versions). Steps to reproduce: CREATE TYPE two_ints as (if1 int, if2 int); CREATE DOMAIN domain AS two_ints CHECK ((VALUE).if1 > 0); CREA

Re: Inconsistency in startup process's MyBackendId and procsignal array registration with ProcSignalInit()

2021-10-19 Thread Kyotaro Horiguchi
(This branch may should leave from this thread..) At Fri, 15 Oct 2021 15:00:57 +0900 (JST), Kyotaro Horiguchi wrote in > At Thu, 14 Oct 2021 10:53:06 -0700, Andres Freund wrote > in > > This'd get rid of the need of density *and* make SIInsertDataEntries() > > cheaper. > > Yes. So.. I trie