Re: Added schema level support for publication.

2021-09-08 Thread Amit Kapila
On Mon, Aug 16, 2021 at 7:01 PM Tom Lane wrote: > > Peter Smith writes: > > Then the question from Peter E. [2] "Why can't I have a publication > > that publishes tables t1, t2, t3, *and* schemas s1, s2, s3." would > > have an intuitive solution like: > > > CREATE PUBLICATION pub1 > > FOR TABLE t

missing warning in pg_import_system_collations

2021-09-08 Thread Anton Voloshin
Hello hackers, In pg_import_system_collations() there is this fragment of code: enc = pg_get_encoding_from_locale(localebuf, false); if (enc < 0) { /* error message printed by pg_get_encoding_from_locale() */ continue; } However, false passed to pg_get_encoding_from_locale() mea

Re: [PROPOSAL] new diagnostic items for the dynamic sql

2021-09-08 Thread Dinesh Chemuduru
On Thu, 9 Sept 2021 at 11:07, Pavel Stehule wrote: > Hi > > I tested the last patch, and I think I found unwanted behavior. > > The value of PG_SQL_TEXT is not empty only when the error is related to > the parser stage. When the error is raised in the query evaluation stage, > then the value is e

Re: row filtering for logical replication

2021-09-08 Thread Peter Smith
PSA my new incremental patch (v28-0002) that introduces row filter validation for the publish mode "delete". The validation requires that any columns referred to in the filter expression must also be part of REPLICA IDENTITY or PK. [This v28-0001 is identical to the most recently posted rebased ba

Show redo LSN in checkpoint logs

2021-09-08 Thread Kyotaro Horiguchi
Hello. Sometimes, I needed to infer where a past checkpoint make wal segments unnecessary up to, or just to know the LSN at a past point in time. But there's no convenient source for that. The attached small patch enables me (or us) to do that by looking into server log files. > LOG: checkpoin

Re: [PROPOSAL] new diagnostic items for the dynamic sql

2021-09-08 Thread Pavel Stehule
Hi I tested the last patch, and I think I found unwanted behavior. The value of PG_SQL_TEXT is not empty only when the error is related to the parser stage. When the error is raised in the query evaluation stage, then the value is empty. I think this is too confusing. PL/pgSQL is a high level lan

Re: Improve logging when using Huge Pages

2021-09-08 Thread Kyotaro Horiguchi
Thanks! At Wed, 8 Sep 2021 07:52:35 +, "Shinoda, Noriyoshi (PN Japan FSIP)" wrote in > Hello, > > Thank you everyone for comments. > I have attached a patch that simply changed the message like the advice from > Horiguchi-san. > > > Even with the patch, there are still some cases where h

Re: strange case of "if ((a & b))"

2021-09-08 Thread Kyotaro Horiguchi
At Thu, 9 Sep 2021 13:28:54 +0900, Michael Paquier wrote in > On Tue, Sep 07, 2021 at 02:59:58PM +0900, Michael Paquier wrote: > > In 0002, everything is a boolean expression except for > > SpGistPageStoresNulls() and GistPageIsLeaf(). So that's a good > > cleanup overall. > > I looked again a

Re: Schema variables - new implementation for Postgres 15

2021-09-08 Thread Pavel Stehule
Hi fresh rebase Regards Pavel schema-variables-20210909.patch.gz Description: application/gzip

Re: drop tablespace failed when location contains .. on win32

2021-09-08 Thread Kyotaro Horiguchi
At Thu, 9 Sep 2021 12:44:45 +0900, Michael Paquier wrote in > On Thu, Sep 09, 2021 at 02:35:52AM +, wangsh.f...@fujitsu.com wrote: > > Do you mean changing the action of canonicalize_path(), like remove all the > > (..) ? > > > > I'm willing to fix this problem. > > Looking at canonicaliz

Re: strange case of "if ((a & b))"

2021-09-08 Thread Michael Paquier
On Tue, Sep 07, 2021 at 02:59:58PM +0900, Michael Paquier wrote: > In 0002, everything is a boolean expression except for > SpGistPageStoresNulls() and GistPageIsLeaf(). So that's a good > cleanup overall. I looked again at 0002 again yesterday, and that was an improvement for most of those locat

Re: Estimating HugePages Requirements?

2021-09-08 Thread Michael Paquier
On Thu, Sep 09, 2021 at 01:19:14PM +0900, Michael Paquier wrote: > I broke that again, so rebased as v9 attached. Well. -- Michael From 09b1f5a5e0e88a6d84bfc2f8a1bc410e21fb3775 Mon Sep 17 00:00:00 2001 From: Michael Paquier Date: Thu, 9 Sep 2021 13:10:24 +0900 Subject: [PATCH v9 1/2] Introduce hu

Re: PG Docs - CREATE SUBSCRIPTION option list order

2021-09-08 Thread Amit Kapila
On Wed, Sep 8, 2021 at 12:24 PM Peter Smith wrote: > > v2 --> v3 > > The subscription_parameter names are now split into 2 groups using > Amit's suggestion [1] on how to categorise them. > > I also made some grammar improvements to their descriptions. > I have made minor edits to your first patch

Re: Estimating HugePages Requirements?

2021-09-08 Thread Michael Paquier
On Wed, Sep 08, 2021 at 05:52:33PM +, Bossart, Nathan wrote: > Yeah, I did wonder about this. We're even listing it in the "Preset > Options" section in the docs. I updated this in the new patch set, > which is attached. I broke that again, so rebased as v9 attached. FWIW, I don't have an e

Re: Add jsonlog log_destination for JSON server logs

2021-09-08 Thread Michael Paquier
On Wed, Sep 08, 2021 at 10:58:51PM -0400, Greg Stark wrote: > Please just put a "format" field (or "channel" field -- the logging > daemon doesn't really care what format) with a list of defined formats > that can easily be extended in the future. If you want to steal the > high bit for "is last" a

Re: drop tablespace failed when location contains .. on win32

2021-09-08 Thread Michael Paquier
On Thu, Sep 09, 2021 at 02:35:52AM +, wangsh.f...@fujitsu.com wrote: > Do you mean changing the action of canonicalize_path(), like remove all the > (..) ? > > I'm willing to fix this problem. Looking at canonicalize_path(), we have already some logic around pending_strips to remove paths wh

Re: Add jsonlog log_destination for JSON server logs

2021-09-08 Thread Greg Stark
Fwiw I was shocked when I saw the t/f T/F kluge when I went to work on jsonlogging. That's the kind of dead-end short-sighted hack that just lays traps and barriers for future hackers to have to clean up before they can do the work they want to do. Please just put a "format" field (or "channel" fi

RE: drop tablespace failed when location contains .. on win32

2021-09-08 Thread wangsh.f...@fujitsu.com
Hi, > -Original Message- > From: Michael Paquier > > On Wed, Sep 08, 2021 at 08:54:25AM -0400, Andrew Dunstan wrote: > > That seems like a bug. It's not very canonical :-) > > Yes, better to fix that. I fear that more places are impacted than > just the tablespace code paths. > -- > M

Re: drop tablespace failed when location contains .. on win32

2021-09-08 Thread Michael Paquier
On Wed, Sep 08, 2021 at 08:54:25AM -0400, Andrew Dunstan wrote: > That seems like a bug. It's not very canonical :-) Yes, better to fix that. I fear that more places are impacted than just the tablespace code paths. -- Michael signature.asc Description: PGP signature

Re: Add jsonlog log_destination for JSON server logs

2021-09-08 Thread Michael Paquier
On Wed, Sep 08, 2021 at 08:46:44AM -0400, Andrew Dunstan wrote: > Yeah. A very simple change would be to use two different values for json > (say 'y' and 'n'). A slightly more principled scheme might use the top > bit for the end marker and the bottom 3 bits for the dest type (so up to > 8 types po

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

2021-09-08 Thread Michael Paquier
On Wed, Sep 08, 2021 at 07:32:03PM +, Jacob Champion wrote: > On Fri, 2021-09-03 at 23:21 +, Jacob Champion wrote: > > > One small-ish comment that I have is about all the .config files we > > > have at the root of src/test/ssl/, bloating the whole. I think that > > > it would be a bit cle

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

2021-09-08 Thread Melanie Plageman
On Fri, Aug 13, 2021 at 3:08 AM Andres Freund wrote: > > Hi, > > On 2021-08-11 16:11:34 -0400, Melanie Plageman wrote: > > On Tue, Aug 3, 2021 at 2:13 PM Andres Freund wrote: > > > > Also, I'm unsure how writing the buffer action stats out in > > > > pgstat_write_statsfiles() will work, since I t

Re: Estimating HugePages Requirements?

2021-09-08 Thread Michael Paquier
On Wed, Sep 08, 2021 at 04:10:41PM +0900, Fujii Masao wrote: > + {"shared_memory_size", PGC_INTERNAL, RESOURCES_MEM, > > When reading the applied code, I found the category of shared_memory_size > is RESOURCES_MEM. Why? This seems right because the parameter is related > to memory reso

Re: Regression in PG14 LookupFuncName

2021-09-08 Thread Tom Lane
Sven Klemm writes: > In PG12 and PG13 LookupFuncName would return procedures as well as > functions while in PG14 since commit e56bce5d [0] it would disregard > all procedures > and not return them as match. > Is this intended behaviour or an unintended side effect of the refactoring? It was inte

Regression in PG14 LookupFuncName

2021-09-08 Thread Sven Klemm
Hi hackers, In PG12 and PG13 LookupFuncName would return procedures as well as functions while in PG14 since commit e56bce5d [0] it would disregard all procedures and not return them as match. Is this intended behaviour or an unintended side effect of the refactoring? Sven [0] https://github.co

Re: [PATCH] support tab-completion for single quote input with equal sign

2021-09-08 Thread Jacob Champion
On Wed, 2021-09-08 at 17:08 -0400, Tom Lane wrote: > Jacob Champion writes: > > On Sat, 2021-09-04 at 11:32 -0400, Tom Lane wrote: > > > Independently of the concerns I raised, I'm wondering how come you > > > are getting different results. Which readline or libedit version > > > are you using, o

Re: Why does bootstrap and later initdb stages happen via client?

2021-09-08 Thread Andres Freund
Hi, On September 8, 2021 1:24:00 PM PDT, Andrew Dunstan wrote: > >On 9/8/21 3:07 PM, Andres Freund wrote: >> There of course is historical raisins for things happening in initdb - the >> setup logic didn't use to be C. But now that it is C, it seems a bit absurd >> to >> read bootstrap data in i

Re: [PATCH] support tab-completion for single quote input with equal sign

2021-09-08 Thread Tom Lane
Jacob Champion writes: > On Sat, 2021-09-04 at 11:32 -0400, Tom Lane wrote: >> Independently of the concerns I raised, I'm wondering how come you >> are getting different results. Which readline or libedit version >> are you using, on what platform? > Now you have me worried... > - Ubuntu 20.04

Re: unnesting multirange data types

2021-09-08 Thread Magnus Hagander
On Sun, Jul 18, 2021 at 8:20 PM Alexander Korotkov wrote: > > On Thu, Jul 15, 2021 at 10:27 PM Jonathan S. Katz > wrote: > > On 7/15/21 12:26 PM, Alexander Korotkov wrote: > > > On Thu, Jul 15, 2021 at 6:47 PM Tom Lane wrote: > > >> Yeah, that seems pretty horrid. I still don't like the way th

Re: Why does bootstrap and later initdb stages happen via client?

2021-09-08 Thread Andrew Dunstan
On 9/8/21 3:07 PM, Andres Freund wrote: > Hi, > > While hacking on AIO I wanted to build the windows portion from linux. That > works surprisingly well with cross-building using --host=x86_64-w64-mingw32 . > > What didn't work as well was running things under wine. It turns out that the > server

Re: refactoring basebackup.c

2021-09-08 Thread Robert Haas
On Wed, Sep 8, 2021 at 2:14 PM Jeevan Ladhe wrote: > To give an example, I put some logging statements, and I can see in the log: > " > bytes remaining in mysink->base.bbs_next->bbs_buffer: 16537 > input size to be compressed: 512 > estimated size for compressed buffer by LZ4F_compressBound(): 262

Re: Schema variables - new implementation for Postgres 15

2021-09-08 Thread Pavel Stehule
Hi Great, I also think that this is better to not confuse the user. > > postgres=# CREATE IMMUTABLE VARIABLE var1 AS date NOT NULL; > ERROR: IMMUTABLE NOT NULL variable requires default expression > > Working as expected. I have moved the patch to "Ready for committers". > Thanks for this

Why does bootstrap and later initdb stages happen via client?

2021-09-08 Thread Andres Freund
Hi, While hacking on AIO I wanted to build the windows portion from linux. That works surprisingly well with cross-building using --host=x86_64-w64-mingw32 . What didn't work as well was running things under wine. It turns out that the server itself works ok, but that initdb hangs because of a bu

Re: PROXY protocol support

2021-09-08 Thread Jacob Champion
On Tue, 2021-09-07 at 12:24 +0200, Magnus Hagander wrote: > On Wed, Jul 14, 2021 at 8:24 PM Jacob Champion wrote: > > On Mon, 2021-07-12 at 18:28 +0200, Magnus Hagander wrote: > > > Yeah, I have no problem being stricter than necessary, unless that > > > actually causes any interop problems. It's

Re: On login trigger: take three

2021-09-08 Thread Pavel Stehule
st 8. 9. 2021 v 20:23 odesílatel Daniel Gustafsson napsal: > > On 8 Sep 2021, at 16:02, Pavel Stehule wrote: > > > In the time when event triggers were introduced, managed services were > not too widely used like now. When we discussed this feature we thought > about environments when users have

Re: On login trigger: take three

2021-09-08 Thread Daniel Gustafsson
> On 8 Sep 2021, at 16:02, Pavel Stehule wrote: > In the time when event triggers were introduced, managed services were not > too widely used like now. When we discussed this feature we thought about > environments when users have no superuser rights and have no possibility to > go to single

Re: [PATCH] support tab-completion for single quote input with equal sign

2021-09-08 Thread Jacob Champion
On Sat, 2021-09-04 at 11:32 -0400, Tom Lane wrote: > Jacob Champion writes: > > t/010_tab_completion.pl .. 17/? > > # Failed test 'tab-completion after single quoted text input with > > equal sign' > > # at t/010_tab_completion.pl line 198. > > # Actual output was "CREATE SUB

Re: refactoring basebackup.c

2021-09-08 Thread Jeevan Ladhe
> > 0007 adds server-side compression; currently, it only supports > server-side compression using gzip, but I hope that it won't be hard > to generalize that to support LZ4 as well, and Andres told me he > thinks we should aim to support zstd since that library has built-in > parallel compression

Re: VARDATA_COMPRESSED_GET_COMPRESS_METHOD comment?

2021-09-08 Thread Tom Lane
Robert Haas writes: > On Wed, Sep 8, 2021 at 11:33 AM Christoph Berg wrote: >> How about "compressed-in-line Datum" like on the comment 5 lines above? > That seems reasonable to me, but I think Tom Lane is responsible for > the current form of that comment, so it'd be nice to hear what he > thin

Re: Estimating HugePages Requirements?

2021-09-08 Thread Bossart, Nathan
On 9/7/21, 8:50 PM, "Michael Paquier" wrote: > Switched the variable name to shared_memory_size_mb for easier > grepping, moved it to a more correct location with the other read-only > GUCS, and applied 0002. Well, 0001 here. Thanks! And thanks for cleaning up the small mistake in aa37a43. > +

Re: The Free Space Map: Problems and Opportunities

2021-09-08 Thread Peter Geoghegan
On Wed, Sep 8, 2021 at 9:35 AM Robert Haas wrote: > I'm not trying to argue for slimming down your patches to a size that > is so small that they no longer work. I was just explaining how the "eager physical rollback by pruning" thing works. > However, I *am* arguing that, like bottom-up index d

Re: .ready and .done files considered harmful

2021-09-08 Thread Dipesh Pandit
> > I guess we still have to pick one or the other, but I don't really > > know how to do that, since both methods seem to be relatively fine, > > and the scenarios where one is better than the other all feel a little > > bit contrived. I guess if no clear consensus emerges in the next week > > or

Re: [PATCH] Add tab-complete for backslash commands

2021-09-08 Thread Tom Lane
"tanghy.f...@fujitsu.com" writes: > Here is the updated patch in which I added the multiple-character versions > for backslash commands > and remove their corresponding single-character version. > Of course, for backslash commands with only single-character version, no > change added. Pushed.

Re: Schema variables - new implementation for Postgres 15

2021-09-08 Thread Gilles Darold
Le 08/09/2021 à 13:41, Pavel Stehule a écrit : Hi so 28. 8. 2021 v 11:57 odesílatel Gilles Darold > napsal: Hi, Review resume: This patch implements Schema Variables that are database objects that can hold a single or composite value following the d

Re: The Free Space Map: Problems and Opportunities

2021-09-08 Thread Robert Haas
On Wed, Sep 8, 2021 at 12:27 PM Peter Geoghegan wrote: > But these things are *highly* related. > > The RelationGetBufferForTuple() prune mechanism I described (that > targets aborted xact tuples and sets hint bits) is fundamentally built > on top of the idea of ownership of heap pages by backends

Re: VARDATA_COMPRESSED_GET_COMPRESS_METHOD comment?

2021-09-08 Thread Robert Haas
On Wed, Sep 8, 2021 at 11:33 AM Christoph Berg wrote: > How about "compressed-in-line Datum" like on the comment 5 lines above? That seems reasonable to me, but I think Tom Lane is responsible for the current form of that comment, so it'd be nice to hear what he thinks. -- Robert Haas EDB: http

Re: The Free Space Map: Problems and Opportunities

2021-09-08 Thread Peter Geoghegan
On Wed, Sep 8, 2021 at 8:20 AM Robert Haas wrote: > > I didn't mean to suggest that it had to happen in perfect lockstep. > > But I do think that it should be pretty close to perfect. What I > > actually do right now is prune an open page when it *appears* to be > > full inside the loop in Relatio

Re: [Proposal] Fully WAL logged CREATE DATABASE - No Checkpoints

2021-09-08 Thread Robert Haas
On Fri, Sep 3, 2021 at 5:54 PM Andres Freund wrote: > > I think we already have such a code in multiple places where we bypass the > > shared buffers for copying the relation > > e.g. index_copy_data(), heapam_relation_copy_data(). > > That's not at all comparable. We hold an exclusive lock on the

Re: Migração Postgresql 8.3 para versão Postgresql 9.3

2021-09-08 Thread Ranier Vilela
Em qua., 8 de set. de 2021 às 11:21, escreveu: > Bom dia, > > Estou com um problema para realizar a migração utilizando o comando > pg_upgrade. > > Ao executar ele está me mostrando um erro de incompatibilidade com o > formato data/hora. > > Pelo comando pg_controldata verifico que na base 8.3 o

Re: Fix erroneous parallel execution when modifying CTE is present in rewritten query

2021-09-08 Thread Tom Lane
Greg Nancarrow writes: > [ v1-0001-Propagate-CTE-property-flags-when-copying-a-CTE-list.patch ] Pushed with a couple of adjustments: * I rewrote the comment, mostly so as to include an explanation of how the error could be removed, in case anyone ever wants to go to the trouble. * The existing

Re: VARDATA_COMPRESSED_GET_COMPRESS_METHOD comment?

2021-09-08 Thread Christoph Berg
Re: Robert Haas > But I agree with you that referring to the argument to > VARDATA_COMPRESSED_GET_EXTSIZE or > VARDATA_COMPRESSED_GET_COMPRESS_METHOD as an "external compressed > Datum" doesn't seem quite right. It is compressed, but it is not > external, at least in the sense that I understand tha

Re: The Free Space Map: Problems and Opportunities

2021-09-08 Thread Robert Haas
On Tue, Sep 7, 2021 at 9:37 PM Peter Geoghegan wrote: > What I really like about the idea of doing the work in the foreground > (when it's clearly not going to be too much of a latency hit) is that > it would act as a natural form of backpressure. Right, that's fair. But, prune-before-evict can b

Re: LogwrtResult contended spinlock

2021-09-08 Thread Jaime Casanova
On Tue, Feb 02, 2021 at 08:19:19PM -0300, Alvaro Herrera wrote: > Hello, > > So I addressed about half of your comments in this version merely by > fixing silly bugs. The problem I had which I described as > "synchronization fails" was one of those silly bugs. > Hi Álvaro, Are we waiting for a

Re: PoC Refactor AM analyse API

2021-09-08 Thread Jaime Casanova
On Fri, Feb 19, 2021 at 12:06:12PM +1000, Denis Smirnov wrote: > Thanks for your review, Heikki. > > I have made the changes you have requested. > > 1. All modifications interconnected with column projection were reverted > (they should be added in https://commitfest.postgresql.org/31/2922 if th

Re: Use "superuser" instead of "super user" in code comments

2021-09-08 Thread Daniel Gustafsson
> On 7 Sep 2021, at 15:48, Bharath Rupireddy > wrote: > > On Tue, Sep 7, 2021 at 6:40 PM Daniel Gustafsson wrote: >> >>> On 7 Sep 2021, at 14:44, Bharath Rupireddy >>> wrote: >> >>> It seems like we use "superuser" as a standard term across the entire >>> code base i.e. error messages, docs

Re: Add option --drop-cascade for pg_dump/restore

2021-09-08 Thread Wu Haotian
Hi, here's the rebased patch. 0005-pg_dump-restore-add-drop-cascade-option.patch Description: Binary data

Re: Avoid stuck of pbgench due to skipped transactions

2021-09-08 Thread Fujii Masao
On 2021/09/07 18:24, Fabien COELHO wrote: Hello Fujii-san, Stop counting skipped transactions under -T as soon as the timer is exceeded. Because otherwise it can take a very long time to count all of them especially when quite a lot of them happen with unrealistically high rate setting in

Re: Bug in query rewriter - hasModifyingCTE not getting set

2021-09-08 Thread Tom Lane
Greg Nancarrow writes: > On Wed, Sep 8, 2021 at 8:00 AM Tom Lane wrote: >> Now, we could potentially make this work if we wrote code to run >> through the copied rtable entries (recursively) and increment the >> appropriate ctelevelsup fields by one. That would essentially >> have to be a varian

Migração Postgresql 8.3 para versão Postgresql 9.3

2021-09-08 Thread oswaldo . bregnoles
Bom dia, Estou com um problema para realizar a migração utilizando o comando pg_upgrade. Ao executar ele está me mostrando um erro de incompatibilidade com o formato data/hora. Pelo comando pg_controldata verifico que na base 8.3 o Tipo de data/hora é : números de pontos fluantes Já na base

Re: Postgres perl module namespace

2021-09-08 Thread Mark Dilger
> On Sep 7, 2021, at 9:00 PM, Noah Misch wrote: > > I wondered about using PGXS:: as the namespace for all these modules That immediately suggests perl modules wrapping C code, which is misleading for these. See `man perlxstut` — Mark Dilger EnterpriseDB: http://www.enterprisedb.com The En

Re: use AV worker items infrastructure for GIN pending list's cleanup

2021-09-08 Thread Jaime Casanova
On Mon, May 17, 2021 at 01:46:37PM +0900, Masahiko Sawada wrote: > On Mon, Apr 5, 2021 at 3:31 PM Jaime Casanova > wrote: > > > > Hi, > > > > When AV worker items where introduced 4 years ago, i was suggested that > > it could be used for other things like cleaning the pending list of GIN > > inde

Re: On login trigger: take three

2021-09-08 Thread Pavel Stehule
Hi > + {"enable_client_connection_trigger", PGC_SU_BACKEND, > DEVELOPER_OPTIONS, > + gettext_noop("Enables the client_connection event > trigger."), > + gettext_noop("In case of errors in the ON > client_connection EVENT TRIGGER procedure, " > ..and.. > +

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

2021-09-08 Thread Bharath Rupireddy
Hi, While working on one of the internal features, we found that it is a bit difficult to run pg_waldump for a normal user to know WAL info and stats of a running postgres database instance in the cloud. Many a times users or DBAs or developers would want to get and analyze following: 1) raw WAL r

Re: Possible missing segments in archiving on standby

2021-09-08 Thread Fujii Masao
On 2021/09/08 16:40, Kyotaro Horiguchi wrote: No. The discussion taken there is not about permanently missing .ready files, but about .ready files created out-of-order. So I don't think the outcome from the thread does *fix* this issue. Hmm... I don't think we want such extent of perfectne

Re: Non-decimal integer literals

2021-09-08 Thread Tom Lane
Vik Fearing writes: > On 8/16/21 11:51 AM, Peter Eisentraut wrote: >> Here is a patch to add support for hexadecimal, octal, and binary >> integer literals: >> >>     0x42E >>     0o112 >>     0b100101 >> >> per SQL:202x draft. > Is there any hope of adding the optional underscores? I see a po

Re: On login trigger: take three

2021-09-08 Thread Daniel Gustafsson
> On 19 Jul 2021, at 15:25, Greg Nancarrow wrote: > Attached a rebased patch (minor updates to the test code). I took a look at this, and while I like the proposed feature I think the patch has a bit more work required. +END IF; + +-- 2) Initialize some user session data + CREATE TEMP TA

Re: drop tablespace failed when location contains .. on win32

2021-09-08 Thread Andrew Dunstan
On 9/8/21 6:16 AM, wangsh.f...@fujitsu.com wrote: > Hi, > > I find a problem related to tablespace on win32(server2019). > >> postgres=# create tablespace tbs location >> 'C:\Users\postgres\postgres_install\aa\..\aa'; >> CREATE TABLESPACE >> postgres=# create table tbl(col int) tablespace tbs; >

Re: Parallelize correlated subqueries that execute within each worker

2021-09-08 Thread James Coleman
On Tue, Sep 7, 2021 at 11:06 AM Zhihong Yu wrote: > > > > On Tue, Sep 7, 2021 at 6:17 AM James Coleman wrote: >> >> On Wed, Sep 1, 2021 at 7:06 AM Daniel Gustafsson wrote: >> > >> > > On 7 May 2021, at 18:30, James Coleman wrote: >> > >> > > ..here we are now, and I finally have this patch clea

Re: Add jsonlog log_destination for JSON server logs

2021-09-08 Thread Andrew Dunstan
On 9/8/21 2:58 AM, Michael Paquier wrote: > On Wed, Sep 01, 2021 at 04:39:43PM -0400, Sehrope Sarkuni wrote: >> That makes the elog.c changes in the JSON logging patch minimal as all it's >> really doing is invoking the new write_jsonlog(...) function. > Looking at 0001, to do things in order. >

Re: Non-decimal integer literals

2021-09-08 Thread Vik Fearing
On 8/16/21 11:51 AM, Peter Eisentraut wrote: > Here is a patch to add support for hexadecimal, octal, and binary > integer literals: > >     0x42E >     0o112 >     0b100101 > > per SQL:202x draft. Is there any hope of adding the optional underscores? I see a potential problem there as SELECT 1

Re: Schema variables - new implementation for Postgres 15

2021-09-08 Thread Pavel Stehule
done. > I wrote a check that disables this case. Please, see the attached patch. I agree, so this case is confusing, and it is better to disable it. Regards Pavel > Except that I think this patch is ready for committers, so if there is no > other opinion in favor of restricting the use of IMMUTABLE with NOT NULL > and DEFAULT I will change the status to ready for committers. > > -- > Gilles Daroldhttp://www.darold.net/ > > schema-variables-20210908.patch.gz Description: application/gzip

RE: Allow escape in application_name

2021-09-08 Thread kuroda.hay...@fujitsu.com
Dear Horiguchi-san, Thank you for reviewing! I attached the fixed version. > Is "the previous comment" "the comment above"? Yeah, fixed. > + for (i = n -1; i >= 0; i--) > > You might want a space between - and 1. Fixed. > +parse_application_name(StringInfo buf, const char *name)

Re: row filtering for logical replication

2021-09-08 Thread Peter Smith
Hi Euler, As you probably know the "base" Row-Filter 27-0001 got seriously messed up by a recent commit that had lots of overlaps with your code [1]. e.g. It broke trying to apply on HEAD as follows: [postgres@CentOS7-x64 oss_postgres_RowFilter]$ git apply v27-0001-Row-filter-for-logical-replica

Re: RFC: Logging plan of the running query

2021-09-08 Thread torikoshia
On 2021-09-07 12:39, torikoshia wrote: On 2021-08-20 01:12, Fujii Masao wrote: On 2021/08/11 21:14, torikoshia wrote: As far as I looked into, pg_log_current_plan() can call InstrEndLoop() through ExplainNode(). I added a flag to ExplainState to avoid calling InstrEndLoop() when ExplainNode()

Re: Added schema level support for publication.

2021-09-08 Thread vignesh C
On Mon, Sep 6, 2021 at 6:56 AM houzj.f...@fujitsu.com wrote: > > From Thur, Sep 2, 2021 2:33 PM vignesh C wrote: > > On Wed, Sep 1, 2021 at 6:58 AM houzj.f...@fujitsu.com > > wrote: > > > > > > Here are some other comments for v23-000x patches. > > > 3) > > > > > > +

Re: Small documentation improvement for ALTER SUBSCRIPTION

2021-09-08 Thread Masahiko Sawada
On Tue, Sep 7, 2021 at 9:01 PM Daniel Gustafsson wrote: > > > On 7 Sep 2021, at 13:36, Peter Eisentraut > > wrote: > > > > On 12.08.21 04:52, Masahiko Sawada wrote: > >> On Wed, Aug 11, 2021 at 5:42 PM Daniel Gustafsson wrote: > >>> > On 11 Aug 2021, at 09:57, Masahiko Sawada wrote: > >>>

Re: Gather performance analysis

2021-09-08 Thread Dilip Kumar
On Wed, Sep 8, 2021 at 3:28 PM Tomas Vondra wrote: On 9/8/21 9:40 AM, Dilip Kumar wrote: > > > Maybe it can be misleading sometimes, but I feel sometimes it is more > > informative compared to the optimized build where it makes some function > > inline, and then it becomes really hard to distingu

Re: ResourceOwner refactoring

2021-09-08 Thread Aleksander Alekseev
Hi Heikki, > Yeah, needed some manual fixing, but here you go. Thanks for working on this! v8-0002 didn't apply to the current master, so I rebased it. See attached v9-* patches. I also included v9-0004 with some minor tweaks from me. I have several notes regarding the code. 1. Not sure if I un

drop tablespace failed when location contains .. on win32

2021-09-08 Thread wangsh.f...@fujitsu.com
Hi, I find a problem related to tablespace on win32(server2019). > postgres=# create tablespace tbs location > 'C:\Users\postgres\postgres_install\aa\..\aa'; > CREATE TABLESPACE > postgres=# create table tbl(col int) tablespace tbs; > ERROR: could not stat directory "pg_tblspc/16384/PG_15_20210

Re: Atomic rename feature for Windows.

2021-09-08 Thread Juan José Santamaría Flecha
On Thu, Jul 8, 2021 at 12:32 AM Victor Spirin wrote: > > > #if defined(_MSC_VER) && _MSC_VER >= 1900 > > -#define MIN_WINNT 0x0600 > > +#define MIN_WINNT 0x0A00 > > #else > > #define MIN_WINNT 0x0501 > > #endif > > This is a large bump for Studio >= 2015 I am afraid. That does not > > se

RE: [PATCH] Add tab-complete for backslash commands

2021-09-08 Thread tanghy.f...@fujitsu.com
On Wednesday, September 8, 2021 5:05 AM, Tom Lane wrote: >Sure, but he'd still get all the commands, just not all the possible >spellings of each one. And a person who's not sure what's available >is unlikely to be helped by an entry for "\c", because it's entirely >not clear which command that's

Re: The Free Space Map: Problems and Opportunities

2021-09-08 Thread Hannu Krosing
On Wed, Sep 8, 2021 at 6:52 AM Peter Geoghegan wrote: > > On Tue, Sep 7, 2021 at 5:25 AM Hannu Krosing wrote: > > Are you speaking of just heap pages here or also index pages ? > > Mostly heap pages, but FWIW I think it could work for index tuples > too, with retail index tuple deletion. Because

Re: row filtering for logical replication

2021-09-08 Thread Ajin Cherian
On Wed, Sep 1, 2021 at 9:23 PM Euler Taveira wrote: > > On Sun, Aug 29, 2021, at 11:14 PM, Peter Smith wrote: > > Here are the new v26* patches. This is a refactoring of the row-filter > caches to remove all the logic from the get_rel_sync_entry function > and delay it until if/when needed in the

Re: Proposal: More structured logging

2021-09-08 Thread Peter Eisentraut
On 01.09.21 10:00, Ronan Dunklau wrote: In-core it would open up the possibility to split log messages into different fields, for example the different statistics reported in the logs by VACUUM / ANALYZE VERBOSE and make it easier to consume the output without having to parse the message. Parsing

Re: public schema default ACL

2021-09-08 Thread Peter Eisentraut
On 04.09.21 18:18, Noah Misch wrote: I tried a couple of upgrade scenarios and it appeared to do the right thing. This patch is actually two separate changes: First, change the owner of the public schema to "pg_database_owner"; second, change the default privileges set on the public schema by in

Re: Added schema level support for publication.

2021-09-08 Thread Amit Kapila
On Wed, Sep 8, 2021 at 10:48 AM vignesh C wrote: > > On Tue, Sep 7, 2021 at 5:10 PM Amit Kapila wrote: > > > > On Tue, Sep 7, 2021 at 12:45 PM vignesh C wrote: > > > > > > On Fri, Sep 3, 2021 at 4:49 PM Amit Kapila > > > wrote: > > > > > > > > > > > 5. > > > > If I modify the search path to re

Re: Added missing invalidations for all tables publication

2021-09-08 Thread Amit Kapila
On Wed, Sep 8, 2021 at 7:57 AM houzj.f...@fujitsu.com wrote: > > > From Mon, Sep 6, 2021 1:56 PM Amit Kapila wrote: > > > On Tue, Aug 31, 2021 at 8:54 PM vignesh C wrote: > > > > Thanks for the comments, the attached v3 patch has the changes for > > > > the same. > > > > > > > > > > I think this

RE: Improve logging when using Huge Pages

2021-09-08 Thread Shinoda, Noriyoshi (PN Japan FSIP)
Hello, Thank you everyone for comments. I have attached a patch that simply changed the message like the advice from Horiguchi-san. > Even with the patch, there are still some cases where huge pages is disabled > silently. We should report something even in these cases? > For example, in the pl

Re: Gather performance analysis

2021-09-08 Thread Dilip Kumar
On Wed, Sep 8, 2021 at 12:03 PM Andres Freund wrote: > Hi, > > On 2021-09-08 11:45:16 +0530, Dilip Kumar wrote: > > On Wed, Sep 8, 2021 at 3:08 AM Andres Freund wrote: > > > > > > > Looking at this profile made me wonder if this was a build without > > > optimizations. The pg_atomic_read_u64()/p

Re: Possible missing segments in archiving on standby

2021-09-08 Thread Kyotaro Horiguchi
At Wed, 8 Sep 2021 16:01:22 +0900, Fujii Masao wrote in > > > On 2021/09/08 10:45, Kyotaro Horiguchi wrote: > > Anyway there's no guarantee on the archive ordering. As discussed in > > the nearby thread [1], newer segment is often archived earlier. I > > agree that that happens mainly on busy

RE: [PATCH] New default role allowing to change per-role/database settings

2021-09-08 Thread Shinya11.Kato
>Thanks for letting me know, I've attached a rebased v4 of this patch, no other >changes. I tried it, but when I used set command, tab completion did not work properly and an error occurred. --- postgres=> \conninfo You are connected to database "postgres" as user "aaa" via socket in "/tmp" at p

Re: Estimating HugePages Requirements?

2021-09-08 Thread Fujii Masao
On 2021/09/08 12:50, Michael Paquier wrote: On Tue, Sep 07, 2021 at 05:08:43PM +, Bossart, Nathan wrote: On 9/6/21, 9:00 PM, "Michael Paquier" wrote: + sprintf(buf, "%lu MB", size_mb); + SetConfigOption("shared_memory_size", buf, PGC_INTERNAL, PGC_S_OVERRIDE); One small-ish comment

Re: prevent immature WAL streaming

2021-09-08 Thread Kyotaro Horiguchi
At Tue, 7 Sep 2021 18:41:57 +, "Bossart, Nathan" wrote in > On 9/4/21, 10:26 AM, "Alvaro Herrera" wrote: > > Attached are the same patches as last night, except I added a test for > > XLOG_DEBUG where pertinent. (The elog(PANIC) is not made conditional on > > that, since it's a cross-check

Re: Possible missing segments in archiving on standby

2021-09-08 Thread Fujii Masao
On 2021/09/08 10:45, Kyotaro Horiguchi wrote: Anyway there's no guarantee on the archive ordering. As discussed in the nearby thread [1], newer segment is often archived earlier. I agree that that happens mainly on busy servers, though. The archiver is designed to handle such "gaps" and/or out-