Re: pgsql: pgstat: Bring up pgstat in BaseInit() to fix uninitialized use o

2021-08-16 Thread Amit Kapila
On Tue, Aug 17, 2021 at 10:54 AM Amit Kapila wrote: > > On Mon, Aug 16, 2021 at 8:18 PM Dilip Kumar wrote: > > > > On Fri, Aug 13, 2021 at 9:29 PM Andres Freund wrote: > > > > > > I think we can extend this API but I guess it is better to then do it > > > > for dsm-based as well so that these ge

Re: ECPG bug fix: DECALRE STATEMENT and DEALLOCATE, DESCRIBE

2021-08-16 Thread Michael Paquier
On Mon, Aug 16, 2021 at 12:06:16PM +0200, Michael Meskes wrote: > You patch removes the warning but by doing that also removes the > feature that is being tested. Oops. If kept this way, this test scenario is going to need a comment to explain exactly that. > I'm not sure what's the best way to

Re: Diagnostic comment in LogicalIncreaseXminForSlot

2021-08-16 Thread Ashutosh Bapat
Hi Amit and Andres, Here's updated patch On Mon, Aug 9, 2021 at 11:14 AM Ashutosh Bapat < ashutosh.ba...@enterprisedb.com> wrote: > > > On Sat, Aug 7, 2021 at 11:40 AM Andres Freund wrote: > >> Hi, >> >> On 2021-07-12 17:28:15 +0530, Ashutosh Bapat wrote: >> > On Mon, Jul 12, 2021 at 8:39 AM Ami

Re: A problem in ExecModifyTable

2021-08-16 Thread David Rowley
On Tue, 17 Aug 2021 at 15:56, 李杰(慎追) wrote: > According to my understanding, the parent table of a partitioned table does > not store any tuples. > Then why is "relkind = = RELKIND_PARTITIONED_TABLE" suddenly added here ? We'll need some sort of ResultRelInfo in the case that all partitions are

Re: Skipping logical replication transactions on subscriber side

2021-08-16 Thread Amit Kapila
On Tue, Aug 17, 2021 at 10:46 AM Masahiko Sawada wrote: > > On Mon, Aug 16, 2021 at 5:30 PM Greg Nancarrow wrote: > > > > On Mon, Aug 16, 2021 at 5:54 PM houzj.f...@fujitsu.com > > wrote: > > > > > > Here is another comment: > > > > > > +char * > > > +logicalrep_message_type(LogicalRepMsgType ac

Re: pgsql: pgstat: Bring up pgstat in BaseInit() to fix uninitialized use o

2021-08-16 Thread Amit Kapila
On Mon, Aug 16, 2021 at 8:18 PM Dilip Kumar wrote: > > On Fri, Aug 13, 2021 at 9:29 PM Andres Freund wrote: > > > > I think we can extend this API but I guess it is better to then do it > > > for dsm-based as well so that these get tracked via resowner. > > > > DSM segments are resowner managed a

Re: Skipping logical replication transactions on subscriber side

2021-08-16 Thread Masahiko Sawada
On Mon, Aug 16, 2021 at 5:30 PM Greg Nancarrow wrote: > > On Mon, Aug 16, 2021 at 5:54 PM houzj.f...@fujitsu.com > wrote: > > > > Here is another comment: > > > > +char * > > +logicalrep_message_type(LogicalRepMsgType action) > > +{ > > ... > > + case LOGICAL_REP_MSG_STREAM_END: > >

Re: Allow parallel DISTINCT

2021-08-16 Thread David Rowley
On Wed, 11 Aug 2021 at 16:51, David Rowley wrote: > The patch is just some plumbing work to connect all the correct paths > up to make it work. It's all fairly trivial. I looked at this patch again and realise that it could be done a bit better. For example, the previous version set the distinct_

Re: Skipping logical replication transactions on subscriber side

2021-08-16 Thread Masahiko Sawada
On Mon, Aug 16, 2021 at 3:59 PM houzj.f...@fujitsu.com wrote: > > On Thu, Aug 12, 2021 1:53 PM Masahiko Sawada wrote: > > I've attached the updated patches. FYI I've included the patch > > (v8-0005) that fixes the assertion failure during shared fileset cleanup to > > make > > cfbot tests happy.

Re: return correct error code from pgtls_init

2021-08-16 Thread Michael Paquier
On Tue, Jun 01, 2021 at 06:56:42PM -0700, Zhihong Yu wrote: > Looking at the -1 return, e.g. > > pq_lockarray = malloc(sizeof(pthread_mutex_t) * > CRYPTO_num_locks()); > > when pq_lockarray is NULL. We can return errno. > > I didn't change call to pthread_mutex_lock() because PGTHREA

A problem in ExecModifyTable

2021-08-16 Thread 李杰(慎追)
Hi hackers, Recently, I noticed a great patch in pg 14. "Rework planning and execution of UPDATE and DELETE. (86dc90056dfdbd9d1b891718d2e5614e3e432f35)" This changes the DML execution of the partitioned table and makes it more friendly. But I am very confused about the following changes: ``` +

Re: PG14: Avoid checking output-buffer-length for every encoded byte during pg_hex_encode

2021-08-16 Thread Michael Paquier
On Mon, Aug 16, 2021 at 02:06:31PM -0300, Ranier Vilela wrote: > uint64 and size_t in 64 bits are equivalents. > uint64 and size_t in 32 bits can be weird, but anyway size_t at 32 bits can > handle 1GB. There is usually a reason why things are done as they are, so before suggesting changing someth

Re: Skipping logical replication transactions on subscriber side

2021-08-16 Thread Greg Nancarrow
On Thu, Aug 12, 2021 at 3:54 PM Masahiko Sawada wrote: > > I've attached the updated patches. FYI I've included the patch > (v8-0005) that fixes the assertion failure during shared fileset > cleanup to make cfbot tests happy. > Another comment on the 0001 patch: as there is now a mix of setting "

Re: Some RELKIND macro refactoring

2021-08-16 Thread Michael Paquier
On Mon, Aug 16, 2021 at 10:22:50AM -0400, Alvaro Herrera wrote: > Partitioned tables are not listed here, but IIRC there's a patch to let > partitioned tables have a table AM so that their partitions inherit it. This was raised in the thread for ALTER TABLE SET ACCESS METHOD (see patch 0002): http

Re: Is it worth pushing conditions to sublink/subplan?

2021-08-16 Thread Wenjing
> 2021年8月16日 17:15,Wenjing 写道: > > Hi Hackers, > > Recently, a issue has been bothering me, This is about conditional push-down > in SQL. > I use cases from regression testing as an example. > I found that the conditions (B =1) can be pushed down into the subquery, > However, it cannot be

Re: PG14: Avoid checking output-buffer-length for every encoded byte during pg_hex_encode

2021-08-16 Thread Michael Paquier
On Sun, Aug 15, 2021 at 02:58:59PM +, Hans Buschmann wrote: > If it seems useful somebody could enter it as an open item / > resolved item for pg14 after beta 3. Hmm. Using SQLs like the following to stress pg_hex_encode(), I can see a measurable difference easily, so no need of pg_dump or an

Re: Added schema level support for publication.

2021-08-16 Thread Peter Smith
On Mon, Aug 16, 2021 at 11:31 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

Re: The Free Space Map: Problems and Opportunities

2021-08-16 Thread Peter Geoghegan
On Mon, Aug 16, 2021 at 5:15 PM Peter Geoghegan wrote: > Another concern is knock on effects *after* any initial problematic > updates -- that's certainly not where it ends. Every action has > consequences, and these consequences themselves have consequences. By > migrating a row from an earlier b

Re: The Free Space Map: Problems and Opportunities

2021-08-16 Thread Peter Geoghegan
On Mon, Aug 16, 2021 at 3:49 PM Bruce Momjian wrote: > OK, here is my feedback. First, I understand the space > reservation/soccer idea, but I am also concerned that adding space > reservation could improve some things and make others worse. That is definitely a legitimate concern. There is a t

Re: archive status ".ready" files may be created too early

2021-08-16 Thread alvhe...@alvh.no-ip.org
So why do we call this structure "record boundary map", when the boundaries it refers to are segment boundaries? I think we should call it "segment boundary map" instead ... and also I think we should use that name in the lock that protects it, so instead of ArchNotifyLock, it could be SegmentBoun

Re: Re[5]: On login trigger: take three

2021-08-16 Thread Greg Nancarrow
On Tue, Aug 17, 2021 at 1:11 AM Ivan Panchenko wrote: > > Does it mean that "RAISE NOTICE" should’t be used, or behaves unexpectedly in > logon triggers? Should we mention this in the docs? > No I don't believe so, it was just that that part of the test framework (sub poll_query_until) had been

Re: Allow composite foreign keys to reference a superset of unique constraint columns?

2021-08-16 Thread David G. Johnston
On Mon, Aug 16, 2021 at 4:37 PM Paul Martinez wrote: > > It seems like a somewhat useful feature. If people think it would be > useful to > implement, I might take a stab at it when I have time. > > This doesn't seem useful enough for us to be the only implementation to go above and beyond the SQ

Allow composite foreign keys to reference a superset of unique constraint columns?

2021-08-16 Thread Paul Martinez
Hey, hackers! While working with some foreign keys, I noticed some mildly unexpected behavior. The columns referenced by a unique constraint must naturally have a unique constraint on them: CREATE TABLE foo (a integer); CREATE TABLE bar (x integer REFERENCES foo(a)); > ERROR: there is no unique

Re: The Free Space Map: Problems and Opportunities

2021-08-16 Thread Bruce Momjian
On Mon, Aug 16, 2021 at 10:35:45AM -0700, Peter Geoghegan wrote: > I have suspected that there are serious design issues with the FSM > (and related heapam code like hio.c) for several years now [1]. This > has a lot to do with the experience of using Jan Wieck's BenchmarkSQL > implementation of TP

Re: Autovacuum on partitioned table (autoanalyze)

2021-08-16 Thread Justin Pryzby
On Mon, Aug 16, 2021 at 05:42:48PM -0400, Álvaro Herrera wrote: > On 2021-Aug-16, Álvaro Herrera wrote: > > > Here's the reversal patch for the 14 branch. (It applies cleanly to > > master, but the unused member of PgStat_StatTabEntry needs to be > > removed and catversion bumped). > > I have pu

Re: Autovacuum on partitioned table (autoanalyze)

2021-08-16 Thread Álvaro Herrera
On 2021-Aug-16, Álvaro Herrera wrote: > Here's the reversal patch for the 14 branch. (It applies cleanly to > master, but the unused member of PgStat_StatTabEntry needs to be > removed and catversion bumped). I have pushed this to both branches. (I did not remove the item from the release notes

Re: Reducing memory consumption for pending inval messages

2021-08-16 Thread Tom Lane
"Bossart, Nathan" writes: > On 5/30/21, 10:22 AM, "Tom Lane" wrote: >> We can do a lot better, by exploiting what we know about the usage >> patterns of invalidation requests. > I spent some time looking through this patch, and it seems reasonable > to me. Thanks for reviewing! >> There is one

Re: Reducing memory consumption for pending inval messages

2021-08-16 Thread Bossart, Nathan
On 5/30/21, 10:22 AM, "Tom Lane" wrote: > We can do a lot better, by exploiting what we know about the usage > patterns of invalidation requests. New requests are always added to > the latest sublist, and the only management actions are (1) merge > latest sublist into next-to-latest sublist, or (

Re: badly calculated width of emoji in psql

2021-08-16 Thread John Naylor
On Mon, Aug 16, 2021 at 1:04 PM Jacob Champion wrote: > > On Mon, 2021-08-16 at 11:24 -0400, John Naylor wrote: > > > > On Sun, Aug 15, 2021 at 10:45 PM Michael Paquier wrote: > > > > > How large do libpgcommon deliverables get with this patch? Skimming > > > through the patch, that just looks l

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

2021-08-16 Thread Robert Haas
On Sat, Aug 14, 2021 at 5:47 PM Justin Pryzby wrote: > Should this feature distinguish between crash recovery and archive recovery on > a hot standby ? Otherwise the standby will display this all the time. > > 2021-08-14 16:13:33.139 CDT startup[11741] LOG: redo in progress, elapsed > time: 124

ALTER TYPE vs extension membership (was Re: BUG #17144: Upgrade from v13 to v14 with the cube extension failed)

2021-08-16 Thread Tom Lane
I wrote: > Hm, thanks. This does not seem to be a problem with pg_upgrade per se; > you can reproduce it with > regression=# CREATE EXTENSION cube VERSION '1.4'; > CREATE EXTENSION > regression=# CREATE EXTENSION earthdistance; > CREATE EXTENSION > regression=# ALTER EXTENSION "cube" UPDATE; > ER

Re: [PATCH] Native spinlock support on RISC-V

2021-08-16 Thread Tom Lane
Daniel Gustafsson writes: > There didn’t seem to be anything left here (at least until there is hardware > in > the buildfarm) so I took the liberty to close it as committed in the CF app. Ah, sorry, I did not realize there was a CF entry. regards, tom lane

Re: [PATCH] Native spinlock support on RISC-V

2021-08-16 Thread Daniel Gustafsson
> On 13 Aug 2021, at 20:09, Tom Lane wrote: > ..I split it off to its own code block and pushed it. There didn’t seem to be anything left here (at least until there is hardware in the buildfarm) so I took the liberty to close it as committed in the CF app. -- Daniel Gustafsson ht

Re: Emit namespace in post-copy output

2021-08-16 Thread Daniel Gustafsson
> On 28 Jul 2021, at 16:15, Daniel Gustafsson wrote: > I took a look at this I agree with the reviewer that it's a good change. Pushed to master, thanks! -- Daniel Gustafsson https://vmware.com/

The Free Space Map: Problems and Opportunities

2021-08-16 Thread Peter Geoghegan
I have suspected that there are serious design issues with the FSM (and related heapam code like hio.c) for several years now [1]. This has a lot to do with the experience of using Jan Wieck's BenchmarkSQL implementation of TPC-C [2][3][4]. It clearly makes Postgres exhibit pathological performance

Re: Autovacuum on partitioned table (autoanalyze)

2021-08-16 Thread Álvaro Herrera
Another possible problem is that before the revert, we accept ALTER TABLE some_partitioned_table SET (autovacuum_enabled=on/off); (also autovacuum_analyze_scale_factor and autovacuum_analyze_threshold) but after the revert this is will throw a syntax error. What do people think we should do about

Re: PG14: Avoid checking output-buffer-length for every encoded byte during pg_hex_encode

2021-08-16 Thread Ranier Vilela
Em seg., 16 de ago. de 2021 às 13:19, Hans Buschmann escreveu: > -- > *Von:* Ranier Vilela > *Gesendet:* Montag, 16. August 2021 17:04 > *An:* Hans Buschmann > *Cc:* pgsql-hack...@postgresql.org > *Betreff:* Re: PG14: Avoid checking output-buffer-length for every > en

Re: badly calculated width of emoji in psql

2021-08-16 Thread Jacob Champion
On Mon, 2021-08-16 at 11:24 -0400, John Naylor wrote: > > On Sun, Aug 15, 2021 at 10:45 PM Michael Paquier wrote: > > > How large do libpgcommon deliverables get with this patch? Skimming > > through the patch, that just looks like a couple of bytes, still. > > More like a couple thousand byte

Re: Autovacuum on partitioned table (autoanalyze)

2021-08-16 Thread Álvaro Herrera
On 2021-Aug-16, Tom Lane wrote: > =?utf-8?Q?=C3=81lvaro?= Herrera writes: > > Here's the reversal patch for the 14 branch. (It applies cleanly to > > master, but the unused member of PgStat_StatTabEntry needs to be > > removed and catversion bumped). > > I don't follow the connection to catvers

AW: PG14: Avoid checking output-buffer-length for every encoded byte during pg_hex_encode

2021-08-16 Thread Hans Buschmann
Von: Ranier Vilela Gesendet: Montag, 16. August 2021 17:04 An: Hans Buschmann Cc: pgsql-hack...@postgresql.org Betreff: Re: PG14: Avoid checking output-buffer-length for every encoded byte during pg_hex_encode Hello Ranier, Thank you for your quick response. >

Re: Autovacuum on partitioned table (autoanalyze)

2021-08-16 Thread Tom Lane
=?utf-8?Q?=C3=81lvaro?= Herrera writes: > Here's the reversal patch for the 14 branch. (It applies cleanly to > master, but the unused member of PgStat_StatTabEntry needs to be > removed and catversion bumped). I don't follow the connection to catversion? I agree that we probably don't want to

Re: Slightly improve initdb --sync-only option's help message

2021-08-16 Thread Gurjeet Singh
On Mon, Aug 16, 2021 at 4:42 AM Daniel Gustafsson wrote: > > > On 30 Jul 2021, at 18:27, Bossart, Nathan wrote: > > > > On 7/30/21, 2:22 AM, "Daniel Gustafsson" wrote: > >> LGTM. I took the liberty to rephrase the "and exit" part of the initdb > >> help > >> output match the other exiting opti

Re: call popcount32/64 directly on non-x86 platforms

2021-08-16 Thread John Naylor
I wrote: > On Thu, Aug 12, 2021 at 1:26 AM David Rowley wrote: > > Closer, but I don't see why there's any need to make the fast and slow > > functions external. It should be perfectly fine to keep them static. > > > > I didn't test the performance, but the attached works for me. > > Thanks for t

Re: Window Function "Run Conditions"

2021-08-16 Thread Zhihong Yu
On Mon, Aug 16, 2021 at 3:28 AM David Rowley wrote: > On Thu, 1 Jul 2021 at 21:11, David Rowley wrote: > > 1) Unsure of the API to the prosupport function. I wonder if the > > prosupport function should just be able to say if the function is > > either monotonically increasing or decreasing or

Re: Autovacuum on partitioned table (autoanalyze)

2021-08-16 Thread Álvaro Herrera
Here's the reversal patch for the 14 branch. (It applies cleanly to master, but the unused member of PgStat_StatTabEntry needs to be removed and catversion bumped). -- Álvaro Herrera 39°49'30"S 73°17'W — https://www.EnterpriseDB.com/ Maybe there's lots of data loss but the records of

Re: PoC/WIP: Extended statistics on expressions

2021-08-16 Thread Tomas Vondra
On 8/16/21 3:32 AM, Justin Pryzby wrote: On Mon, Dec 07, 2020 at 03:15:17PM +0100, Tomas Vondra wrote: Looking at the current behaviour, there are a couple of things that seem a little odd, even though they are understandable. For example, the fact that CREATE STATISTICS s (expressions) ON

Re: Non-decimal integer literals

2021-08-16 Thread John Naylor
On Mon, Aug 16, 2021 at 5:52 AM Peter Eisentraut < peter.eisentr...@enterprisedb.com> wrote: > > Here is a patch to add support for hexadecimal, octal, and binary > integer literals: > > 0x42E > 0o112 > 0b100101 > > per SQL:202x draft. > > This adds support in the lexer as well as in

Re: badly calculated width of emoji in psql

2021-08-16 Thread John Naylor
On Sun, Aug 15, 2021 at 10:45 PM Michael Paquier wrote: > > On Thu, Aug 12, 2021 at 05:13:31PM -0400, John Naylor wrote: > > I'm a bit concerned about the build dependencies not working right, but > > it's not clear it's even due to the patch. I'll spend some time > > investigating next week. > >

Re[5]: On login trigger: take three

2021-08-16 Thread Ivan Panchenko
  Hi Greg,   >Среда, 7 июля 2021, 3:55 +03:00 от Greg Nancarrow : >  >On Sun, Jul 4, 2021 at 1:21 PM vignesh C < vignes...@gmail.com > wrote: >> >> CFBot shows the following failure: >> # poll_query_until timed out executing this query: >> # SELECT '0/3046250' <= replay_lsn AND state = 'streaming

Re: PG14: Avoid checking output-buffer-length for every encoded byte during pg_hex_encode

2021-08-16 Thread Ranier Vilela
Welcome. Em seg., 16 de ago. de 2021 às 05:46, Hans Buschmann escreveu: > During some development on encoding-related parts of postgres I stumbled > over the new length-checking-code in common/hex.c/pg_hex_encode. > > Differently when comparing it to all versions before the > output-buffer-lengt

Re: POC: Cleaning up orphaned files using undo logs

2021-08-16 Thread Dmitry Dolgov
> On Wed, Jun 30, 2021 at 07:41:16PM +0200, Antonin Houska wrote: > Antonin Houska wrote: > > > tsunakawa.ta...@fujitsu.com wrote: > > > > > I'm crawling like a snail to read the patch set. Below are my first set > > > of review comments, which are all minor. > > > > Thanks. > > I've added the

Re: pgsql: pgstat: Bring up pgstat in BaseInit() to fix uninitialized use o

2021-08-16 Thread Dilip Kumar
On Fri, Aug 13, 2021 at 9:29 PM Andres Freund wrote: > > I think we can extend this API but I guess it is better to then do it > > for dsm-based as well so that these get tracked via resowner. > > DSM segments are resowner managed already, so it's not obvious that that'd buy > us much? Although I

Re: Some RELKIND macro refactoring

2021-08-16 Thread Alvaro Herrera
On 2021-Aug-16, Peter Eisentraut wrote: > + if (rel->rd_rel->relkind == RELKIND_INDEX || > + rel->rd_rel->relkind == RELKIND_SEQUENCE) > + RelationCreateStorage(rel->rd_node, relpersistence); > + else if (RELKIND_HAS_TABLE_AM(rel->rd_

Re: Autovacuum on partitioned table (autoanalyze)

2021-08-16 Thread Álvaro Herrera
On 2021-Aug-13, Álvaro Herrera wrote: > Some doc changes are pending, and some more commentary in parts of the > code, but I think this is much more sensible. I do lament the lack of > a syscache for pg_inherits. Thinking about this again, this one here is the killer problem, I think; this behav

Re: CI/windows docker vs "am a service" autodetection on windows

2021-08-16 Thread Magnus Hagander
On Fri, Aug 13, 2021 at 3:03 PM Andres Freund wrote: > > Hi, > > Magnus, Michael, Anyone - I'd appreciate a look. > > On 2021-03-05 12:55:37 -0800, Andres Freund wrote: > > > After fighting with a windows VM for a bit (ugh), it turns out that yes, > > > there is stderr, but that fileno(stderr) ret

Re: Added schema level support for publication.

2021-08-16 Thread Tom Lane
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 t1,t2,t3 AND > FOR ALL TABLES IN SCHEMA s1,s2,s3; That seems a b

Some RELKIND macro refactoring

2021-08-16 Thread Peter Eisentraut
Attached patches introduce more macros to group some RELKIND_* macros: - RELKIND_HAS_PARTITIONS() - RELKIND_HAS_TABLESPACE() - RELKIND_HAS_TABLE_AM() - RELKIND_HAS_INDEX_AM() I collected those mainly while working on the relkind error messages patch [0]. I think they improve the self-documenta

Re: PoC/WIP: Extended statistics on expressions

2021-08-16 Thread Tomas Vondra
On 8/16/21 3:31 AM, Justin Pryzby wrote: On 1/22/21 5:01 AM, Justin Pryzby wrote: In any case, why are there so many parentheses ? On Fri, Jan 22, 2021 at 02:09:04PM +0100, Tomas Vondra wrote: That's a bug in pg_get_statisticsobj_worker, probably. It shouldn't be adding extra parentheses,

Re: Slightly improve initdb --sync-only option's help message

2021-08-16 Thread Daniel Gustafsson
> On 30 Jul 2021, at 18:27, Bossart, Nathan wrote: > > On 7/30/21, 2:22 AM, "Daniel Gustafsson" wrote: >> LGTM. I took the liberty to rephrase the "and exit" part of the initdb help >> output match the other exiting options in there. Barring objections, I think >> this is ready. > > LGTM. Th

RE: Why timestamptz_pl_interval and timestamptz_mi_interval are not immutable?

2021-08-16 Thread Floris Van Nee
> > What do I miss? > > -- > Best regards, > Alexander Pyhalov, > Postgres Professional > See for example around DST changes postgres=# begin; BEGIN postgres =# show timezone; TimeZone -- Europe/Amsterdam (1 row) postgres=# select '2021-03-27 15:00 +0100'::timestamp

Why timestamptz_pl_interval and timestamptz_mi_interval are not immutable?

2021-08-16 Thread Alexander Pyhalov
Hi. I'm currently looking on pushing down SQLValue expressions to foreign servers and was surprised that two timestamptz-related functions are not immutable. I see that this was changed in commit commit 1ab415596d1de61561d0de8fe9da4aea207adca4 Author: Tom Lane Date: Mon Oct 4 22:13:14 2004

Re: Window Function "Run Conditions"

2021-08-16 Thread David Rowley
On Thu, 1 Jul 2021 at 21:11, David Rowley wrote: > 1) Unsure of the API to the prosupport function. I wonder if the > prosupport function should just be able to say if the function is > either monotonically increasing or decreasing or neither then have > core code build a qual. That would make t

Re: ECPG bug fix: DECALRE STATEMENT and DEALLOCATE, DESCRIBE

2021-08-16 Thread Michael Meskes
> > (1) There should be no output to stderr in the tests.  Why isn't > > this > > message being caught and redirected to the normal test output file? > > These are generated during the compilation of the tests with the > pre-processor, so that's outside the test runs. This is actually a deeper is

Non-decimal integer literals

2021-08-16 Thread Peter Eisentraut
Here is a patch to add support for hexadecimal, octal, and binary integer literals: 0x42E 0o112 0b100101 per SQL:202x draft. This adds support in the lexer as well as in the integer type input functions. Those core parts are straightforward enough, but there are a bunch of othe

Is it worth pushing conditions to sublink/subplan?

2021-08-16 Thread Wenjing
Hi Hackers, Recently, a issue has been bothering me, This is about conditional push-down in SQL. I use cases from regression testing as an example. I found that the conditions (B =1) can be pushed down into the subquery, However, it cannot be pushed down to sublink/subplan. If a sublink/subpla

PG14: Avoid checking output-buffer-length for every encoded byte during pg_hex_encode

2021-08-16 Thread Hans Buschmann
During some development on encoding-related parts of postgres I stumbled over the new length-checking-code in common/hex.c/pg_hex_encode. Differently when comparing it to all versions before the output-buffer-length is checked during encoding of every individual source byte. This may impose qui

Re: Failure of subscription tests with topminnow

2021-08-16 Thread Amit Kapila
On Mon, Aug 16, 2021 at 9:24 AM Michael Paquier wrote: > > Hi all, > > topminnow has just failed in a weird fashion: > https://buildfarm.postgresql.org/cgi-bin/show_log.pl?nm=topminnow&dt=2021-08-15%2013%3A24%3A58 > # SELECT pid != FROM pg_stat_replication WHERE application_name = 'tap_sub'; > #

Re: Skipping logical replication transactions on subscriber side

2021-08-16 Thread Greg Nancarrow
On Mon, Aug 16, 2021 at 5:54 PM houzj.f...@fujitsu.com wrote: > > Here is another comment: > > +char * > +logicalrep_message_type(LogicalRepMsgType action) > +{ > ... > + case LOGICAL_REP_MSG_STREAM_END: > + return "STREAM END"; > ... > > I think most the existi

RE: Skipping logical replication transactions on subscriber side

2021-08-16 Thread houzj.f...@fujitsu.com
Monday, August 16, 2021 3:00 PM Hou, Zhijie wrote: > On Thu, Aug 12, 2021 1:53 PM Masahiko Sawada wrote: > > I've attached the updated patches. FYI I've included the patch > > (v8-0005) that fixes the assertion failure during shared fileset > > cleanup to make cfbot tests happy. > > Hi, > > Than

Re: ECPG bug fix: DECALRE STATEMENT and DEALLOCATE, DESCRIBE

2021-08-16 Thread Michael Paquier
On Wed, Aug 11, 2021 at 10:41:59PM +0200, Michael Meskes wrote: > I'm not sure I understand. Any usage of DECLARE STATEMENT makes the > file need the current version of ecpg anyway. On the other hand > DEALLOCATE did not change its behavior if no DECLARE STATEMENT was > issued, or what did I miss?

RE: Skipping logical replication transactions on subscriber side

2021-08-16 Thread houzj.f...@fujitsu.com
On Thu, Aug 12, 2021 1:53 PM Masahiko Sawada wrote: > I've attached the updated patches. FYI I've included the patch > (v8-0005) that fixes the assertion failure during shared fileset cleanup to > make > cfbot tests happy. Hi, Thanks for the new patches. I have a few comments on the v8-0001 pat