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

2022-08-11 Thread houzj.f...@fujitsu.com
On Wednesday, August 10, 2022 11:39 AM Amit Kapila wrote: > > On Tue, Aug 9, 2022 at 5:39 PM Amit Kapila wrote: > > > > On Tue, Aug 9, 2022 at 11:09 AM Dilip Kumar > wrote: > > > > > > Some more comments > > > > > > +/* > > > + * Exit if any relation is not in the READY state and if any

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

2022-08-11 Thread houzj.f...@fujitsu.com
On Tuesday, August 9, 2022 4:49 PM Kuroda, Hayato/黒田 隼人 wrote: > Dear Wang, > > Thanks for updating patch sets! Followings are comments about v20-0001. > > 1. config.sgml > > ``` > > Specifies maximum number of logical replication workers. This includes > both apply wor

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

2022-08-11 Thread houzj.f...@fujitsu.com
On Wednesday, August 10, 2022 5:40 PM Peter Smith wrote: > > Here are some review comments for the patch v20-0001: > == > > 1. doc/src/sgml/catalogs.sgml > > + p = apply changes directly using a background > + worker, if available, otherwise, it behaves the same as 't' > > The

Re: making relfilenodes 56 bits

2022-08-11 Thread Dilip Kumar
On Thu, Aug 11, 2022 at 10:58 AM Dilip Kumar wrote: > > On Tue, Aug 9, 2022 at 8:51 PM Robert Haas wrote: > > > > On Fri, Aug 5, 2022 at 3:25 AM Dilip Kumar wrote: > > > I think even if we start the range from the 4 billion we can not avoid > > > keeping two separate ranges for system and user t

Re: Remaining case where reltuples can become distorted across multiple VACUUM operations

2022-08-11 Thread Matthias van de Meent
On Mon, 8 Aug 2022 at 18:48, Peter Geoghegan wrote: > > On Mon, Aug 8, 2022 at 9:17 AM Matthias van de Meent > wrote: > > Because if a subset of the pages of a relation contains more tuples > > than your current total expected tuples in the table, you should > > update your expectations regardles

Re: Cleaning up historical portability baggage

2022-08-11 Thread Thomas Munro
Here's a new batch of these: Remove configure probe for sys/uio.h. Remove configure probes for sys/un.h and struct sockaddr_un. Remove configure probe for sys/select.h. Remove configure probes for sys/ipc.h, sys/sem.h, sys/shm.h. Remove configure probe for sys/resource.h and refactor. Remove confi

Re: designated initializers

2022-08-11 Thread Alvaro Herrera
Hello On 2022-Aug-10, Andres Freund wrote: > +1 I've fought with this one when fixing a conflict when rebasing a patch... Right -- pushed, thanks. -- Álvaro Herrera 48°01'N 7°57'E — https://www.EnterpriseDB.com/

Re: CFM Manager

2022-08-11 Thread Ibrar Ahmed
On Tue, Jul 5, 2022 at 4:31 PM Ibrar Ahmed wrote: > > > On Tue, Jul 5, 2022 at 8:50 AM Michael Paquier > wrote: > >> On Tue, Jul 05, 2022 at 08:17:26AM +0500, Ibrar Ahmed wrote: >> > If nobody has already volunteered for the next upcoming commitfest. >> > I'd like to volunteer. I think early to

Re: logical replication restrictions

2022-08-11 Thread Amit Kapila
On Tue, Aug 9, 2022 at 3:52 AM Euler Taveira wrote: > > On Wed, Aug 3, 2022, at 10:27 AM, Amit Kapila wrote: > > Your explanation makes sense to me. The other point to consider is > that there can be cases where we may not apply operation for the > transaction because of empty transactions (we don

Re: Avoid unecessary MemSet call (src/backend/utils/cache/relcache.c)

2022-08-11 Thread Peter Eisentraut
On 01.08.22 19:08, Ranier Vilela wrote: Like how https://github.com/postgres/postgres/commit/9fd45870c1436b477264c0c82eb195df52bc0919 New attempt to remove more MemSet calls, that are safe. Attached v3 patch

Re: Checking pgwin32_is_junction() errors

2022-08-11 Thread r . zharkov
On 2022-08-11 07:55, Thomas Munro wrote: I checked a few variants: 21.07.2022 15:11 HOME [\??\Volume{GUID}\] 09.08.2022 15:06 Test1 [\\?\Volume{GUID}\] 09.08.2022 15:06 Test2 [\\.\Volume{GUID}\] 09.08.2022 15:17 Test3 [\??\Volume{GUID}\] 09.08.2022 15:27

Re: Allow logical replication to copy tables in binary format

2022-08-11 Thread Amit Kapila
On Thu, Aug 11, 2022 at 7:34 AM Euler Taveira wrote: > > On Wed, Aug 10, 2022, at 12:03 PM, Melih Mutlu wrote: > > I see that logical replication subscriptions have an option to enable binary > [1]. > When it's enabled, subscription requests publisher to send data in binary > format. > But this

Re: Avoid unecessary MemSet call (src/backend/utils/cache/relcache.c)

2022-08-11 Thread Ranier Vilela
Em qui., 11 de ago. de 2022 às 07:38, Peter Eisentraut < peter.eisentr...@enterprisedb.com> escreveu: > On 01.08.22 19:08, Ranier Vilela wrote: > > Like how > > > https://github.com/postgres/postgres/commit/9fd45870c1436b477264c0c82eb195df52bc0919 > > < > https://github.com/postgres/postgres/commi

Re: Avoid unecessary MemSet call (src/backend/utils/cache/relcache.c)

2022-08-11 Thread Alvaro Herrera
On 2022-Aug-11, Ranier Vilela wrote: > According to: > https://interrupt.memfault.com/blog/c-struct-padding-initialization Did you actually read it? https://interrupt.memfault.com/blog/c-struct-padding-initialization#structure-zero-initialization : This looks great! However, it’s not obvious (f

Re: Avoid unecessary MemSet call (src/backend/utils/cache/relcache.c)

2022-08-11 Thread Ranier Vilela
Em qui., 11 de ago. de 2022 às 08:48, Alvaro Herrera < alvhe...@alvh.no-ip.org> escreveu: > On 2022-Aug-11, Ranier Vilela wrote: > > > According to: > > https://interrupt.memfault.com/blog/c-struct-padding-initialization > > Did you actually read it? > Yes, today. > > > https://interrupt.memfaul

Re: Avoid unecessary MemSet call (src/backend/utils/cache/relcache.c)

2022-08-11 Thread Julien Rouhaud
On Thu, Aug 11, 2022 at 08:51:53AM -0300, Ranier Vilela wrote: > Em qui., 11 de ago. de 2022 às 08:48, Alvaro Herrera < > alvhe...@alvh.no-ip.org> escreveu: > > > On 2022-Aug-11, Ranier Vilela wrote: > > > > > According to: > > > https://interrupt.memfault.com/blog/c-struct-padding-initialization

Use array as object (src/fe_utils/parallel_slot.c)

2022-08-11 Thread Ranier Vilela
Hi, One other case suspicious, which I think deserves a conference. At function wait_on_slots (src/fe_utils/parallel_slot.c) The variable "slots" are array, but at function call SetCancelConn, "slots" are used as an object, which at the very least would be suspicious. cancelconn wouldn't that be

Re: Allow logical replication to copy tables in binary format

2022-08-11 Thread Euler Taveira
On Thu, Aug 11, 2022, at 8:04 AM, Amit Kapila wrote: > On Thu, Aug 11, 2022 at 7:34 AM Euler Taveira wrote: > > > > The reason to use text format is that it is error prone. There are > > restrictions > > while using the binary format. For example, if your schema has different > > data > > types

Re: Allow logical replication to copy tables in binary format

2022-08-11 Thread Melih Mutlu
Euler Taveira , 11 Ağu 2022 Per, 16:27 tarihinde şunu yazdı: > On Thu, Aug 11, 2022, at 8:04 AM, Amit Kapila wrote: > > On Thu, Aug 11, 2022 at 7:34 AM Euler Taveira wrote: > > > > The reason to use text format is that it is error prone. There are > restrictions > > while using the binary format.

Re: tests and meson - test names and file locations

2022-08-11 Thread Andrew Dunstan
On 2022-08-11 Th 00:04, Andres Freund wrote: > > The runner now creates a test.start at the start of a test and either > test.success or test.failure at the end. That should make it pretty easy for > e.g. the buildfarm and CI to make the logs for a failed test easily > accessible. I've spent far

Re: tests and meson - test names and file locations

2022-08-11 Thread Tom Lane
Andrew Dunstan writes: > I also like that. I think we should take this opportunity for some > serious rationalization of this. Tests and associated data have grown > rather like Topsy, and we should fix that. So please don't feel too > constrained by current practice. I'm definitely -1 on that.

Re: tests and meson - test names and file locations

2022-08-11 Thread Andres Freund
Hi, On 2022-08-11 10:06:35 -0400, Andrew Dunstan wrote: > > Full log written to /tmp/meson/meson-logs/testlog.txt > > /tmp ? I often put throwaway buildtrees in /tmp. So this is just because my buildtree is in /tmp/meson, i.e. the log always is in $build_root/meson-logs/testlog.txt (there's also

Re: Cleaning up historical portability baggage

2022-08-11 Thread Tom Lane
Thomas Munro writes: > The most interesting things to say about these ones are: > * The concept of a no-Unix-socket build is removed. We should be > able to do that now, right? Peter E seemed to say approximately that > in the commit message for 797129e5. Or is there a thought that a new > ope

Re: tests and meson - test names and file locations

2022-08-11 Thread Andres Freund
Hi, On 2022-08-11 10:20:42 -0400, Tom Lane wrote: > Andrew Dunstan writes: > > I also like that. I think we should take this opportunity for some > > serious rationalization of this. Tests and associated data have grown > > rather like Topsy, and we should fix that. So please don't feel too > > c

Re: pg_upgrade test writes to source directory

2022-08-11 Thread Andres Freund
Hi, On 2022-06-01 10:55:28 -0400, Tom Lane wrote: > [...] I'm definitely not happy with the proposed changes to > 010_tab_completion.pl. My recollection is that those tests > were intentionally written to test tab completion involving a > directory name, but this change just loses that aspect ent

Re: pg_upgrade test writes to source directory

2022-08-11 Thread Tom Lane
Andres Freund writes: > On 2022-06-01 10:55:28 -0400, Tom Lane wrote: >> [...] I'm definitely not happy with the proposed changes to >> 010_tab_completion.pl. My recollection is that those tests >> were intentionally written to test tab completion involving a >> directory name, but this change ju

Re: tests and meson - test names and file locations

2022-08-11 Thread Tom Lane
Andres Freund writes: > I don't precisely know what Andrew was thinking of, but the relocation of log > files for example doesn't require many changes to .pl files - one change to > Utils.pm. The one exception to that is 010_tab_completion.pl, which encodes > tmp_check/ in its output. Ah. That s

Re: Switching XLog source from archive to streaming when primary available

2022-08-11 Thread Bharath Rupireddy
On Fri, Jul 8, 2022 at 9:16 PM Bharath Rupireddy wrote: > > On Sat, Jun 25, 2022 at 1:31 AM Cary Huang wrote: > > > > The following review has been posted through the commitfest application: > > make installcheck-world: tested, passed > > Implements feature: tested, passed > > Spec complia

Use SetInstallXLogFileSegmentActive() for setting XLogCtl->InstallXLogFileSegmentActive

2022-08-11 Thread Bharath Rupireddy
Hi, Here's a small patch replacing the explicit setting of XLogCtl->InstallXLogFileSegmentActive with the existing function SetInstallXLogFileSegmentActive(), removes duplicate code and saves 4 LOC. -- Bharath Rupireddy RDS Open Source Databases: https://aws.amazon.com/rds/postgresql/ v1-0001-

Re: Assertion failure in WaitForWALToBecomeAvailable state machine

2022-08-11 Thread Bharath Rupireddy
On Mon, Feb 14, 2022 at 1:44 PM Kyotaro Horiguchi wrote: > > At Fri, 11 Feb 2022 22:25:49 +0530, Bharath Rupireddy > wrote in > > > I don't think > > > > just making InstallXLogFileSegmentActive false is enough. By looking > > > > at the comment [1], it doesn't make sense to move ahead for resto

Re: hash_xlog_split_allocate_page: failed to acquire cleanup lock

2022-08-11 Thread vignesh C
On Wed, Aug 10, 2022 at 2:52 PM Amit Kapila wrote: > > On Wed, Aug 10, 2022 at 10:58 AM Andres Freund wrote: > > > > Hi, > > > > On 2022-08-09 20:21:19 -0700, Mark Dilger wrote: > > > > On Aug 9, 2022, at 7:26 PM, Andres Freund wrote: > > > > > > > > The relevant code triggering it: > > > > > >

Re: Avoid unecessary MemSet call (src/backend/utils/cache/relcache.c)

2022-08-11 Thread Ranier Vilela
Em qui., 11 de ago. de 2022 às 09:23, Julien Rouhaud escreveu: > On Thu, Aug 11, 2022 at 08:51:53AM -0300, Ranier Vilela wrote: > > Em qui., 11 de ago. de 2022 às 08:48, Alvaro Herrera < > > alvhe...@alvh.no-ip.org> escreveu: > > > > > On 2022-Aug-11, Ranier Vilela wrote: > > > > > > > According

Re: tests and meson - test names and file locations

2022-08-11 Thread Tom Lane
Andres Freund writes: > = Log and Data locations = > To make things like the selection of log files for a specific test easier, > I've so far set it up so that test data and logs are stored in a separate > directory from the sources. > testrun/// > I do wonder if we should put test data and log

Re: tests and meson - test names and file locations

2022-08-11 Thread Andrew Dunstan
On 2022-08-11 Th 11:06, Andres Freund wrote: > Hi, > > On 2022-08-11 10:20:42 -0400, Tom Lane wrote: >> Andrew Dunstan writes: >>> I also like that. I think we should take this opportunity for some >>> serious rationalization of this. Tests and associated data have grown >>> rather like Topsy, a

Re: SQL/JSON features for v15

2022-08-11 Thread Jonathan S. Katz
On 8/10/22 11:50 AM, Andrew Dunstan wrote: On 2022-08-09 Tu 16:58, Jonathan S. Katz wrote: Hi, (Personal hat, not RMT hat unless otherwise noted). This thread[1] raised some concerns around the implementation of the SQL/JSON features that are slated for v15, which includes an outstanding open

Re: PG 15 (and to a smaller degree 14) regression due to ExprEvalStep size

2022-08-11 Thread Jonathan S. Katz
On 8/10/22 9:27 AM, Amit Langote wrote: On Wed, Aug 10, 2022 at 3:57 AM Andres Freund wrote: One way this code could be drastically simplified is to force all type-coercions to go through the "io coercion" path, which could be implemented as a single execution step (which thus could trivially s

Re: Cleaning up historical portability baggage

2022-08-11 Thread Andres Freund
Hi, On 2022-08-11 10:52:51 -0400, Tom Lane wrote: > Thomas Munro writes: > > The most interesting things to say about these ones are: > > * The concept of a no-Unix-socket build is removed. We should be > > able to do that now, right? Peter E seemed to say approximately that > > in the commit

Re: Allow logical replication to copy tables in binary format

2022-08-11 Thread Euler Taveira
On Thu, Aug 11, 2022, at 10:46 AM, Melih Mutlu wrote: > If such restrictions are already the case for replication phase after initial > table sync, then it shouldn't prevent us from enabling binary option for > table sync. Right? I didn't carefully examine the COPY code but I won't expect signifi

Re: PG 15 (and to a smaller degree 14) regression due to ExprEvalStep size

2022-08-11 Thread Andres Freund
Hi, On 2022-08-11 13:08:27 -0400, Jonathan S. Katz wrote: > On 8/10/22 9:27 AM, Amit Langote wrote: > > On Wed, Aug 10, 2022 at 3:57 AM Andres Freund wrote: > > > One way this code could be drastically simplified is to force all > > > type-coercions to go through the "io coercion" path, which cou

Re: Cleaning up historical portability baggage

2022-08-11 Thread Tom Lane
Andres Freund writes: > On 2022-08-11 10:52:51 -0400, Tom Lane wrote: >> -- I won't be too surprised if we get pushback on that after 15.0 is out. > From what angle? If I knew that, it'd be because we'd already received the pushback. I'm just suspicious that very little beta testing happens on W

avoid negating LONG_MIN in cash_out()

2022-08-11 Thread Zhihong Yu
Hi, In cash_out(), we have the following code: if (value < 0) { /* make the amount positive for digit-reconstruction loop */ value = -value; The negation cannot be represented in type long when the value is LONG_MIN. It seems we can error out when LONG_MIN is detected inst

Re: avoid negating LONG_MIN in cash_out()

2022-08-11 Thread Tom Lane
Zhihong Yu writes: > In cash_out(), we have the following code: > if (value < 0) > { > /* make the amount positive for digit-reconstruction loop */ > value = -value; > The negation cannot be represented in type long when the value is LONG_MIN. Possibly not good, but it se

Re: avoid negating LONG_MIN in cash_out()

2022-08-11 Thread Zhihong Yu
On Thu, Aug 11, 2022 at 10:40 AM Tom Lane wrote: > Zhihong Yu writes: > > In cash_out(), we have the following code: > > if (value < 0) > > { > > /* make the amount positive for digit-reconstruction loop */ > > value = -value; > > > The negation cannot be represented in t

Re: avoid negating LONG_MIN in cash_out()

2022-08-11 Thread Zhihong Yu
On Thu, Aug 11, 2022 at 10:55 AM Zhihong Yu wrote: > > > On Thu, Aug 11, 2022 at 10:40 AM Tom Lane wrote: > >> Zhihong Yu writes: >> > In cash_out(), we have the following code: >> > if (value < 0) >> > { >> > /* make the amount positive for digit-reconstruction loop */ >> >

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

2022-08-11 Thread Robert Haas
On Wed, Aug 10, 2022 at 1:01 AM Dilip Kumar wrote: > Done, along with that, I have also got the hunk of smgropen and > smgrclose in ScanSourceDatabasePgClass() which I had in v1 patch[1]. > Because here we do not want to reuse the smgr of the pg_class again so > instead of closing at the end with

Re: tests and meson - test names and file locations

2022-08-11 Thread Andres Freund
Hi, On 2022-08-11 13:06:35 -0400, Tom Lane wrote: > Andres Freund writes: > > = Log and Data locations = > > > To make things like the selection of log files for a specific test easier, > > I've so far set it up so that test data and logs are stored in a separate > > directory from the sources.

Re: avoid negating LONG_MIN in cash_out()

2022-08-11 Thread David Rowley
On Fri, 12 Aug 2022 at 05:58, Zhihong Yu wrote: > Here is sample output with patch: > > # SELECT '-92233720368547758.085'::money; > ERROR: value "-92233720368547758.085" is out of range for type money > LINE 1: SELECT '-92233720368547758.085'::money; I'm struggling to follow along here. There ar

test failure with gcc-12 -O3 -march=native

2022-08-11 Thread Andres Freund
Hi, For my optimized builds I've long used -O3 -march=native. After one of the recent package updates (I'm not certain when exactly yet), the main regression tests started to fail for me with that. Oddly enough in opr_sanity: -- Ask access methods to validate opclasses -- (this replaces a lot o

Re: Postgres NOT IN vs NOT EXISTS optimization

2022-08-11 Thread Bruce Momjian
On Tue, Jun 14, 2022 at 12:09:16PM -0400, Tom Lane wrote: > "Dirschel, Steve" writes: > > Is Postgres able to drive the query the same way with the NOT IN as the > > NOT EXISTS is doing or is that only available if the query has a NOT > > EXISTS? > > NOT IN is not optimized very well in PG, becau

Re: avoid negating LONG_MIN in cash_out()

2022-08-11 Thread Zhihong Yu
On Thu, Aug 11, 2022 at 12:55 PM David Rowley wrote: > On Fri, 12 Aug 2022 at 05:58, Zhihong Yu wrote: > > Here is sample output with patch: > > > > # SELECT '-92233720368547758.085'::money; > > ERROR: value "-92233720368547758.085" is out of range for type money > > LINE 1: SELECT '-9223372036

Re: hash_xlog_split_allocate_page: failed to acquire cleanup lock

2022-08-11 Thread Andres Freund
Hi, On 2022-08-10 14:52:36 +0530, Amit Kapila wrote: > I think this could be the probable reason for failure though I didn't > try to debug/reproduce this yet. AFAIU, this is possible during > recovery/replay of WAL record XLOG_HASH_SPLIT_ALLOCATE_PAGE as via > XLogReadBufferForRedoExtended, we ca

Reducing planning time of large IN queries on primary key / unique columns

2022-08-11 Thread Souvik Bhattacherjee
Hi hackers, At ServiceNow, we frequently encounter queries with very large IN lists where the number of elements in the IN list range from a few hundred to several thousand. For a significant fraction of the queries, the IN clauses are constructed on primary key columns. While planning these queri

Re: Reducing planning time of large IN queries on primary key / unique columns

2022-08-11 Thread Souvik Bhattacherjee
(Re-posting with better formatting) Hi hackers, At ServiceNow, we frequently encounter queries with very large IN lists where the number of elements in the IN list range from a few hundred to several thousand. For a significant fraction of the queries, the IN clauses are constructed on primary k

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

2022-08-11 Thread Jacob Champion
On Wed, Aug 10, 2022 at 10:48 PM Drouvot, Bertrand wrote: > What do you think about adding a second field in ClientConnectionInfo > for the auth method (as suggested by Michael upthread)? Sure -- without a followup patch, it's not really tested, though. v2 adjusts set_authn_id() to copy the auth

Re: Reducing planning time of large IN queries on primary key / unique columns

2022-08-11 Thread Souvik Bhattacherjee
Hi hackers, (Sorry about the re-post. Another attempt at fixing the formatting) At ServiceNow, we frequently encounter queries with very large IN lists where the number of elements in the IN list range from a few hundred to several thousand. For a significant fraction of the queries, the IN claus

Re: Use SetInstallXLogFileSegmentActive() for setting XLogCtl->InstallXLogFileSegmentActive

2022-08-11 Thread Nathan Bossart
On Thu, Aug 11, 2022 at 09:42:18PM +0530, Bharath Rupireddy wrote: > Here's a small patch replacing the explicit setting of > XLogCtl->InstallXLogFileSegmentActive with the existing function > SetInstallXLogFileSegmentActive(), removes duplicate code and saves 4 > LOC. LGTM -- Nathan Bossart Ama

Re: O(n) tasks cause lengthy startups and checkpoints

2022-08-11 Thread Nathan Bossart
On Wed, Jul 06, 2022 at 09:51:10AM -0700, Nathan Bossart wrote: > Here's a new revision where I've attempted to address all the feedback I've > received thus far. Notably, the custodian now uses a queue for registering > tasks and determining which tasks to execute. Other changes include > splitt

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

2022-08-11 Thread Melanie Plageman
I've attached v27 of the patch. I've renamed IOPATH to IOCONTEXT. I also have added assertions to confirm that unexpected statistics are not being accumulated. There are also assorted other cleanups and changes. It would be good to confirm that the rows being skipped and cells that are NULL in t

Re: [BUG] Logical replication failure "ERROR: could not map filenode "base/13237/442428" to relation OID" with catalog modifying txns

2022-08-11 Thread Masahiko Sawada
On Thu, Aug 11, 2022 at 3:10 PM Amit Kapila wrote: > > On Mon, Aug 8, 2022 at 9:34 AM Amit Kapila wrote: > > > > On Wed, Aug 3, 2022 at 1:20 PM Masahiko Sawada > > wrote: > > > > > > > > > Oops, thanks for pointing it out. I've fixed it and attached updated > > > patches for all branches so as

Re: test failure with gcc-12 -O3 -march=native

2022-08-11 Thread Justin Pryzby
On Thu, Aug 11, 2022 at 01:03:43PM -0700, Andres Freund wrote: > Hi, > > For my optimized builds I've long used -O3 -march=native. After one of the On what kind of arch ? > Given that I did not encounter this problem with gcc-12 before, and that > gcc-12 has been released, it seems less likely t

Re: test failure with gcc-12 -O3 -march=native

2022-08-11 Thread Andres Freund
Hi, On 2022-08-11 20:06:02 -0500, Justin Pryzby wrote: > On Thu, Aug 11, 2022 at 01:03:43PM -0700, Andres Freund wrote: > > Hi, > > > > For my optimized builds I've long used -O3 -march=native. After one of the > > On what kind of arch ? x86-64 cascadelake. I've since debugged this further. It'

Re: avoid negating LONG_MIN in cash_out()

2022-08-11 Thread Tom Lane
Zhihong Yu writes: > How about patch v2 which uses the same check from cash_in() ? I'm not sure which part of this statement you're not getting: it is completely unacceptable for cash_out to fail on valid values of the type. And this value is valid. cash_in goes out of its way to take it, and y

Re: test failure with gcc-12 -O3 -march=native

2022-08-11 Thread Andres Freund
Hi, On 2022-08-11 18:24:16 -0700, Andres Freund wrote: > > > Given that I did not encounter this problem with gcc-12 before, and that > > > gcc-12 has been released, it seems less likely to be a bug in our code > > > highlighted by a new optimization and more likely to be a bug in a gcc > > > bug

Re: avoid negating LONG_MIN in cash_out()

2022-08-11 Thread Zhihong Yu
On Thu, Aug 11, 2022 at 6:28 PM Tom Lane wrote: > Zhihong Yu writes: > > How about patch v2 which uses the same check from cash_in() ? > > I'm not sure which part of this statement you're not getting: > it is completely unacceptable for cash_out to fail on valid > values of the type. And this v

Re: test failure with gcc-12 -O3 -march=native

2022-08-11 Thread Andres Freund
Hi, On 2022-08-11 19:08:14 -0700, Andres Freund wrote: > On 2022-08-11 18:24:16 -0700, Andres Freund wrote: > > I'm now bisecting... > > I found the commit triggering it [1]. Oddly it's a change from a few months > ago, and I can reconstruct from dpkg.log and shell history that I definitely > ran

Remove log_checkpoints = true from .pl tests

2022-08-11 Thread Bharath Rupireddy
Hi, With commit 64da07c41a8c0a680460cdafc79093736332b6cf making default value of log_checkpoints to on, do we need to remove explicit settings in perl tests to save some (5) LOC? Although, it's harmless, here's a tiny patch to remove them. -- Bharath Rupireddy RDS Open Source Databases: https://

Re: Remove log_checkpoints = true from .pl tests

2022-08-11 Thread Tom Lane
Bharath Rupireddy writes: > With commit 64da07c41a8c0a680460cdafc79093736332b6cf making default > value of log_checkpoints to on, do we need to remove explicit settings > in perl tests to save some (5) LOC? I'm not particularly eager to do that, because I think defaulting log_checkpoints to "on"

build remaining Flex files standalone

2022-08-11 Thread John Naylor
Starting a new thread to control clutter. [was: Re: [RFC] building postgres with meson] motivation: https://www.postgresql.org/message-id/20220810171935.7k5zgnjwqzalzmtm%40awork3.anarazel.de On Thu, Aug 11, 2022 at 11:07 AM Andres Freund wrote: > I think we should consider compiling it separate

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

2022-08-11 Thread Peter Smith
Here are some review comments for v20-0003: (Sorry - the reviews are time consuming, so I am lagging slightly behind the latest posted version) == 1. 1a. There are a few comment modifications in this patch (e.g. changing FROM "in an apply background worker" TO "using an apply background wo

Re: fix typos

2022-08-11 Thread John Naylor
I wrote: > On Thu, Aug 4, 2022 at 8:41 PM Tom Lane wrote: > > > > John Naylor writes: > > > > RepOriginId is a typedef for uint16, so this can't print the wrong answer, > > > but it is inconsistent with other uses. So it seems we don't need to > > > backpatch this one? > > > > Um ... if it's int