Re: Schema variables - new implementation for Postgres 15

2022-01-23 Thread Julien Rouhaud
Hi, On Fri, Jan 21, 2022 at 09:23:34PM +0100, Pavel Stehule wrote: > > I am sending updated patches I've been looking a bit deeper at the feature and I noticed that there's no locking involved around the session variable usage, and I don't think that's ok. AFAICS any variable used in a session

Re: Schema variables - new implementation for Postgres 15

2022-01-23 Thread Pavel Stehule
ne 23. 1. 2022 v 9:10 odesílatel Julien Rouhaud napsal: > Hi, > > On Fri, Jan 21, 2022 at 09:23:34PM +0100, Pavel Stehule wrote: > > > > I am sending updated patches > > I've been looking a bit deeper at the feature and I noticed that there's no > locking involved around the session variable usag

Re: Schema variables - new implementation for Postgres 15

2022-01-23 Thread Julien Rouhaud
Hi, On Sun, Jan 23, 2022 at 09:25:56AM +0100, Pavel Stehule wrote: > ne 23. 1. 2022 v 9:10 odesílatel Julien Rouhaud napsal: > > Isn't there enough stability of the system cache? sinval is sent at the > moment when changes in the system catalog are visible. So inside query > execution I don't se

Re: [PATCH] reduce page overlap of GiST indexes built using sorted method

2022-01-23 Thread Andrey Borodin
> 19 янв. 2022 г., в 09:31, Andrey Borodin написал(а): >> >> I've addressed Andrey Borodin's concerns about v2 of this patch by Aliaksandr >> Kalenik in attached version. > > Thank you! I'll make a new iteration of review. From a first glance > everything looks good, but gist_sorted_build_p

Re: WIP: System Versioned Temporal Table

2022-01-23 Thread Trevor Gross
Chiming in as a user, not so much a developer - I've been using system versioned tables in MariaDB for about half a year now, would just like to add some feedback about what they did right and wrong and how PG could learn from their mistakes & successes. > 2. Putting data in a side table. This mak

Re: Fix BUG #17335: Duplicate result rows in Gather node

2022-01-23 Thread Yura Sokolov
В Чт, 20/01/2022 в 09:32 +1300, David Rowley пишет: > On Fri, 31 Dec 2021 at 00:14, Yura Sokolov wrote: > > Suggested quick (and valid) fix in the patch attached: > > - If Append has single child, then copy its parallel awareness. > > I've been looking at this and I've gone through changing my mi

current_schema will not use an text index ?

2022-01-23 Thread Marcos Pegoraro
On a multi tenant server, with hundreds of schemas with same structure, I have an audit table shared with all of them. When any record is deleted I add on this table tenant, table and PK values, just that. Something like this: drop table if exists audit; create table audit(id serial primary key, c

Re: Schema variables - new implementation for Postgres 15

2022-01-23 Thread Pavel Stehule
Hi ne 23. 1. 2022 v 9:52 odesílatel Julien Rouhaud napsal: > Hi, > > On Sun, Jan 23, 2022 at 09:25:56AM +0100, Pavel Stehule wrote: > > ne 23. 1. 2022 v 9:10 odesílatel Julien Rouhaud > napsal: > > > > Isn't there enough stability of the system cache? sinval is sent at the > > moment when chang

Re: Schema variables - new implementation for Postgres 15

2022-01-23 Thread Julien Rouhaud
Hi, Le dim. 23 janv. 2022 à 22:34, Pavel Stehule a écrit : > I tested it now. a sinval message is waiting on the transaction end. So > when a variable is used, then it is working fine until the transaction ends. > But when the session makes some DDL, then send sinval to self, and at this > mome

Re: current_schema will not use an text index ?

2022-01-23 Thread Tom Lane
Marcos Pegoraro writes: > customer_schema text, --here is the problem, a text column. > Until version 11 my select was using that index correctly. Then I´ve > upgraded to 14.1, then ... > explain analyze select customer_schema, pk from audit where customer_schema > = current_schema and table_nam

Re: Warning in geqo_main.c from clang 13

2022-01-23 Thread Tom Lane
Thomas Munro writes: > On Sun, Jan 23, 2022 at 11:34 AM Tom Lane wrote: >> We're starting to see more buildfarm animals producing this warning, >> so I took another look, and thought of a slightly less invasive way to >> silence it. I confirmed this works with clang 13.0.0 on Fedora 35. > LGTM.

PSA: Autoconf has risen from the dead

2022-01-23 Thread Tom Lane
While chasing something else, I was surprised to learn that the Autoconf project has started to make releases again. There are 2.70 (2020-12-08) and 2.71 (2021-01-28) versions available at https://ftp.gnu.org/gnu/autoconf/ Right now, I'm not sure we care; there seems to be more enthusiasm for swi

Re: psql - add SHOW_ALL_RESULTS option

2022-01-23 Thread Fabien COELHO
Hallo Peter, Attached v14 moves the status extraction before the possible clear. I've added a couple of results = NULL after such calls in the code. In the psql.sql test file, the test I previously added concluded with \set ECHO none, which was a mistake that I have now fixed. As a result,

Re: fairywren is generating bogus BASE_BACKUP commands

2022-01-23 Thread Andrew Dunstan
On 1/21/22 22:43, Thomas Munro wrote: > On Sat, Jan 22, 2022 at 3:55 PM Robert Haas wrote: >> On Fri, Jan 21, 2022 at 5:35 PM Andrew Dunstan wrote: >>> # See https://www.msys2.org/wiki/Porting/#filesystem-namespaces >>> local $ENV{MSYS2_ARG_CONV_EXCL} = $source_ts_prefix; >>> Probably in

Re: PSA: Autoconf has risen from the dead

2022-01-23 Thread Joel Jacobson
On Sun, Jan 23, 2022, at 17:29, Tom Lane wrote: >While chasing something else, I was surprised to learn that the >Autoconf project has started to make releases again. There are >2.70 (2020-12-08) and 2.71 (2021-01-28) versions available at >https://ftp.gnu.org/gnu/autoconf/ > >Right now, I'm not s

Bogus duplicate command issued in pg_dump

2022-01-23 Thread Tom Lane
While investigating for 353708e1f, I happened to notice that pg_dump's binary_upgrade_set_type_oids_by_type_oid() contains PQExpBuffer upgrade_query = createPQExpBuffer(); ... appendPQExpBuffer(upgrade_query, "SELECT typarray " ... res = ExecuteSqlQueryFor

Re: PSA: Autoconf has risen from the dead

2022-01-23 Thread Tom Lane
"Joel Jacobson" writes: > I don't have much experience in this area, but I noted there is > an AC_CACHE_SAVE feature to speed up rerunning ./configure, > necessary when it stops with an error due to some missing dependency. > Is there a good reason why AC_CACHE_SAVE is not used? Dunno ... it look

Re: Bogus duplicate command issued in pg_dump

2022-01-23 Thread David G. Johnston
On Sun, Jan 23, 2022 at 11:31 AM Tom Lane wrote: > > res = ExecuteSqlQueryForSingleRow(fout, upgrade_query->data); > ... > appendPQExpBuffer(upgrade_query, > "SELECT t.oid, t.typarray " > ... > res = ExecuteSqlQueryForSingleRow(fou

Re: fairywren is generating bogus BASE_BACKUP commands

2022-01-23 Thread Robert Haas
On Sun, Jan 23, 2022 at 12:20 PM Andrew Dunstan wrote: > It's not as simple as that :-( But you're on the right track. My > suggestion above doesn't work. > > The rule for paths is: when you're passing a path to an external program > that's not msys aware (typically, one of our build artefacts l

Re: Bogus duplicate command issued in pg_dump

2022-01-23 Thread Tom Lane
"David G. Johnston" writes: > I just spent 10 minutes thinking you were wrong because I confused the > upgrade_query and upgrade_buffer variables in that function. > You might just as well have fixed the first upgrade_query command to be > print instead of append. And, better yet, renamed its va

Re: fairywren is generating bogus BASE_BACKUP commands

2022-01-23 Thread Tom Lane
Robert Haas writes: > Maybe we need to have a README in the tree somewhere that tries to > explain this. Or maybe we should make our build artifacts msys-aware, > if that's possible, so that this just works. Or maybe supporting msys > is not worth the trouble. I've been wondering that last myself

Re: XLogReadRecord() error in XlogReadTwoPhaseData()

2022-01-23 Thread Thomas Munro
On Sun, Jan 23, 2022 at 7:52 AM Noah Misch wrote: > Attached. With this, kittiwake has survived 8.5hr of 003_cic_2pc.pl. Without > the patch, it failed many times, always within 1.3hr. For easier review, this > patch uses the new behavior on all platforms. Before commit and back-patch, I > pla

Re: Replace uses of deprecated Python module distutils.sysconfig

2022-01-23 Thread Tom Lane
I wrote: > Based on the buildfarm results so far, the problem can be described > as "some installations say /usr/local when they should have said /usr". > I experimented with the attached delta patch and it fixes the problem > on my Debian 9 image. (I don't know Python, so there may be a better >

Re: fairywren is generating bogus BASE_BACKUP commands

2022-01-23 Thread Andrew Dunstan
On 1/23/22 15:07, Tom Lane wrote: > Robert Haas writes: >> Maybe we need to have a README in the tree somewhere that tries to >> explain this. Or maybe we should make our build artifacts msys-aware, >> if that's possible, so that this just works. Or maybe supporting msys >> is not worth the trou

Re: fairywren is generating bogus BASE_BACKUP commands

2022-01-23 Thread Tom Lane
Andrew Dunstan writes: > The most common issues we get are around this issue of virtualized paths > in the TAP tests. If people followed the rule I suggested upthread, 99% > of those problems would go away. I realize it's annoying - I've been > caught by it myself on more than one occasion. Maybe

Re: Support for NSS as a libpq TLS backend

2022-01-23 Thread Andres Freund
Hi, On 2022-01-18 13:42:54 +0100, Daniel Gustafsson wrote: > Fixed, I had made a mistake in the OpenSSL.pm testcode and failed to catch it > in testing. > +task: > + name: Linux - Debian Bullseye (nss) > [ copy of a bunch of code ] I also needed similar-but-not-quite-equivalent tasks for the m

Re: fairywren is generating bogus BASE_BACKUP commands

2022-01-23 Thread Andres Freund
Hi, On 2022-01-23 16:09:01 -0500, Andrew Dunstan wrote: > Msys is a unix-like environment that is useful to build Postgres. It's > not intended as a general runtime environment. We therefore don't build > msys-aware Postgres. We use msys to build standalone Postgres binaries > that don't need or u

Re: row filtering for logical replication

2022-01-23 Thread Peter Smith
FYI - I noticed the cfbot is reporting a failed test case [1] for the latest v69 patch set. [21:09:32.183] # Failed test 'check replicated inserts on subscriber' [21:09:32.183] # at t/025_rep_changes_for_schema.pl line 202. [21:09:32.183] # got: '21|1|2139062143' [21:09:32.183] # expected: '21|1|2

Re: Avoiding smgrimmedsync() during nbtree index builds

2022-01-23 Thread Andres Freund
Hi, On 2022-01-11 12:10:54 -0500, Melanie Plageman wrote: > On Mon, Jan 10, 2022 at 5:50 PM Melanie Plageman > wrote: > > > > I have attached a v3 which includes two commits -- one of which > > implements the directmgr API and uses it and the other which adds > > functionality to use either direc

Re: pg_basebackup fsyncs some files despite --no-sync (was: Adding CI to our tree)

2022-01-23 Thread Andres Freund
Hi, On 2022-01-21 12:00:57 -0800, Andres Freund wrote: > The attached patch adds no-sync handling to the manifest rename, as well as > one case in the directory wal method. Pushed that. Greetings, Andres Freund

Re: [PATCH] reduce page overlap of GiST indexes built using sorted method

2022-01-23 Thread Andres Freund
Hi, On 2022-01-18 23:26:05 +0300, sergei sh. wrote: > I've addressed Andrey Borodin's concerns about v2 of this patch by > Aliaksandr > Kalenik in attached version. Change list: > * Number of pages to collect moved to GUC parameter > "gist_sorted_build_page_buffer_size". > * GistSortedBuildPageSta

Re: XLogReadRecord() error in XlogReadTwoPhaseData()

2022-01-23 Thread Andres Freund
Hi, On 2022-01-24 09:42:13 +1300, Thomas Munro wrote: > On Sun, Jan 23, 2022 at 7:52 AM Noah Misch wrote: > > Future work can benchmark the new behavior and, if it performs well, make > > it unconditional in v15+. I would expect performance to be unchanged or > > slightly better, because the new

Re: fairywren is generating bogus BASE_BACKUP commands

2022-01-23 Thread Andrew Dunstan
On 1/23/22 16:31, Andres Freund wrote: >> The most common issues we get are around this issue of virtualized paths >> in the TAP tests. If people followed the rule I suggested upthread, 99% >> of those problems would go away. I realize it's annoying - I've been >> caught by it myself on more than

Re: Replace uses of deprecated Python module distutils.sysconfig

2022-01-23 Thread Andres Freund
Hi, On 2022-01-23 16:06:21 -0500, Tom Lane wrote: > I wrote: > > Based on the buildfarm results so far, the problem can be described > > as "some installations say /usr/local when they should have said /usr". > > I experimented with the attached delta patch and it fixes the problem > > on my Debia

Re: Replace uses of deprecated Python module distutils.sysconfig

2022-01-23 Thread Andres Freund
Hi, On 2022-01-23 16:06:21 -0500, Tom Lane wrote: > (I don't know > enough about Debian packaging to find the smoking gun though; > what apt-get claims is the source package contains no trace of > this diff.) There's no sign of comparable changes in > /usr/lib/python3.5/sysconfig.py on the same m

Re: Replace uses of deprecated Python module distutils.sysconfig

2022-01-23 Thread Tom Lane
Andres Freund writes: > On 2022-01-23 16:06:21 -0500, Tom Lane wrote: >> +'posix_local': { >> +'stdlib': '{base}/lib/python{py_version_short}', >> +'platstdlib': '{platbase}/lib/python{py_version_short}', >> +'purelib': >> '{base}/local/lib/python{py_version_short}/dis

Re: WIP: System Versioned Temporal Table

2022-01-23 Thread Corey Huinker
> > > > 2. Putting data in a side table. This makes DROP SYSTEM VERSIONING > > fairly trivial, but it complicates many DDL commands (please make a > > list?) and requires the optimizer to know about this and cater to it, > > possibly complicating plans. Neither issue is insurmountable, but it > > b

Re: Replace uses of deprecated Python module distutils.sysconfig

2022-01-23 Thread Andres Freund
Hi, On 2022-01-23 18:11:41 -0500, Tom Lane wrote: > It may be that one of the other "scheme" values accurately describes > Debian's actual layout of this package. I didn't check, because the > scheme is defined to be platform-specific. posix_prefix does, as far as I can see. > Specifying a par

Re: Replace uses of deprecated Python module distutils.sysconfig

2022-01-23 Thread Tom Lane
Andres Freund writes: > The relevant part of distutils-install-layout.diff explaining this is: > +(0) > + Starting with Python-2.6 Debian/Ubuntu uses for the Python which comes > within > + the Linux distribution a non-default name for the installation directory. > This > + is to avoid ov

Re: XLogReadRecord() error in XlogReadTwoPhaseData()

2022-01-23 Thread Noah Misch
On Mon, Jan 24, 2022 at 09:42:13AM +1300, Thomas Munro wrote: > I'm less > sure it makes sense to do anything to support the presumed bogus > zeroes bug for (probably) no real users, especially before we've even > reported it and heard some analysis, for example acceptance that it's > broken and co

Re: Replace uses of deprecated Python module distutils.sysconfig

2022-01-23 Thread Tom Lane
Andres Freund writes: > On 2022-01-23 18:11:41 -0500, Tom Lane wrote: >> Anyway, trying to figure out whether we're on a Debian package with this >> mistake doesn't seem any cleaner than what I proposed. (In particular, >> blindly changing to a different scheme without a check to see what's reall

Re: Replace uses of deprecated Python module distutils.sysconfig

2022-01-23 Thread Andres Freund
Hi, On 2022-01-23 18:31:44 -0500, Tom Lane wrote: > Andres Freund writes: > > On 2022-01-23 18:11:41 -0500, Tom Lane wrote: > >> Anyway, trying to figure out whether we're on a Debian package with this > >> mistake doesn't seem any cleaner than what I proposed. (In particular, > >> blindly chang

Re: XLogReadRecord() error in XlogReadTwoPhaseData()

2022-01-23 Thread Thomas Munro
On Mon, Jan 24, 2022 at 12:29 PM Noah Misch wrote: > On Mon, Jan 24, 2022 at 09:42:13AM +1300, Thomas Munro wrote: > > I'm less > > sure it makes sense to do anything to support the presumed bogus > > zeroes bug for (probably) no real users, especially before we've even > > reported it and heard s

Re: Replace uses of deprecated Python module distutils.sysconfig

2022-01-23 Thread Tom Lane
I wrote: > Yeah, but we don't know whether there are any versions of the Debian > packaging in which they fixed the file layout, so that 'posix_local' > actually does describe the layout. Actually ... scraping the buildfarm to see what we're currently finding shows that the following machines are

Re: Replace uses of deprecated Python module distutils.sysconfig

2022-01-23 Thread Tom Lane
Andres Freund writes: > On 2022-01-23 18:31:44 -0500, Tom Lane wrote: >> Yeah, but we don't know whether there are any versions of the Debian >> packaging in which they fixed the file layout, so that 'posix_local' >> actually does describe the layout. > I think posix_local try to achieve somethin

Re: fairywren is generating bogus BASE_BACKUP commands

2022-01-23 Thread Andres Freund
Hi, On 2022-01-23 17:38:26 -0500, Andrew Dunstan wrote: > Nice idea. I have a suspicion that it's going to be harder than you > think, but I'll be very happy to be proved wrong. FWIW, a manual invocation of the pg_basebackup tests works via a ucrt perl (ucrt64/mingw-w64-ucrt-x86_64-perl package).

Re: XLogReadRecord() error in XlogReadTwoPhaseData()

2022-01-23 Thread Noah Misch
On Mon, Jan 24, 2022 at 12:49:16PM +1300, Thomas Munro wrote: > On Mon, Jan 24, 2022 at 12:29 PM Noah Misch wrote: > > On Mon, Jan 24, 2022 at 09:42:13AM +1300, Thomas Munro wrote: > > > I'm less > > > sure it makes sense to do anything to support the presumed bogus > > > zeroes bug for (probably)

Re: Index Skip Scan (new UniqueKeys)

2022-01-23 Thread Zhihong Yu
On Sat, Jan 22, 2022 at 1:32 PM Dmitry Dolgov <9erthali...@gmail.com> wrote: > > On Fri, May 21, 2021 at 05:31:38PM +0200, Dmitry Dolgov wrote: > > Hi, > > > > Here is another take on the patch with a couple of changes: > > > > * I've removed for now UniqueKeys parts. The interaction of skip scan

Re: XLogReadRecord() error in XlogReadTwoPhaseData()

2022-01-23 Thread Tom Lane
Noah Misch writes: > On Mon, Jan 24, 2022 at 12:49:16PM +1300, Thomas Munro wrote: >> Trying out a new idea: what if we could tell the buildfarm website >> that a certain test is currently expected to fail for reasons we can't >> fix yet (configuration change needed but owner not responding, or >>

Re: Replace uses of deprecated Python module distutils.sysconfig

2022-01-23 Thread Andres Freund
Hi, On 2022-01-23 19:00:41 -0500, Tom Lane wrote: > Andres Freund writes: > > On 2022-01-23 18:31:44 -0500, Tom Lane wrote: > >> Yeah, but we don't know whether there are any versions of the Debian > >> packaging in which they fixed the file layout, so that 'posix_local' > >> actually does descri

Re: XLogReadRecord() error in XlogReadTwoPhaseData()

2022-01-23 Thread Andres Freund
On January 23, 2022 3:29:27 PM PST >(a) Modify the tests so the affected animals can skip affected tests by >setting an environment variable, named PG_TEST_HAS_WAL_READ_BUG or similar. Why not just detect the problem in the tap test and skip, rather than requiring multiple buildfarm configs to

Re: XLogReadRecord() error in XlogReadTwoPhaseData()

2022-01-23 Thread Noah Misch
On Sun, Jan 23, 2022 at 05:03:04PM -0800, Andres Freund wrote: > On January 23, 2022 3:29:27 PM PST > >(a) Modify the tests so the affected animals can skip affected tests by > >setting an environment variable, named PG_TEST_HAS_WAL_READ_BUG or similar. > > Why not just detect the problem in the t

Re: XLogReadRecord() error in XlogReadTwoPhaseData()

2022-01-23 Thread Andres Freund
Hi, On 2022-01-23 17:17:59 -0800, Noah Misch wrote: > On Sun, Jan 23, 2022 at 05:03:04PM -0800, Andres Freund wrote: > > On January 23, 2022 3:29:27 PM PST > > >(a) Modify the tests so the affected animals can skip affected tests by > > >setting an environment variable, named PG_TEST_HAS_WAL_READ_

Re: Replace uses of deprecated Python module distutils.sysconfig

2022-01-23 Thread Tom Lane
Andres Freund writes: > I think this might be problem on our own end, actually. The > distutils.sysconfig > code did > a = '-I' + distutils.sysconfig.get_python_inc(False) > b = '-I' + distutils.sysconfig.get_python_inc(True) > which the patch upthread changed to > +a = '-I' + sysconfig.get_path

Re: pg_upgrade should truncate/remove its logs before running

2022-01-23 Thread Michael Paquier
On Thu, Jan 20, 2022 at 07:51:37PM +0900, Michael Paquier wrote: > Neat idea. That would work fine for my case. So I am fine to stick > with this suggestion. I have been looking at this idea, and the result is quite nice, being simpler than anything that has been proposed on this thread yet. W

Re: XLogReadRecord() error in XlogReadTwoPhaseData()

2022-01-23 Thread Noah Misch
On Sun, Jan 23, 2022 at 05:40:54PM -0800, Andres Freund wrote: > On 2022-01-23 17:17:59 -0800, Noah Misch wrote: > > On Sun, Jan 23, 2022 at 05:03:04PM -0800, Andres Freund wrote: > > > On January 23, 2022 3:29:27 PM PST > > > >(a) Modify the tests so the affected animals can skip affected tests by

Re: XLogReadRecord() error in XlogReadTwoPhaseData()

2022-01-23 Thread Michael Paquier
On Sun, Jan 23, 2022 at 06:10:07PM -0800, Noah Misch wrote: > Could do that. Every run that doesn't get the flaky failure will print a > message like "TODO passed: 3-5", though the test file could mitigate that by > declaring the TODO only on configurations where we expect a failure. The > 027_s

Re: Replace uses of deprecated Python module distutils.sysconfig

2022-01-23 Thread Andres Freund
Hi, On 2022-01-23 20:50:23 -0500, Tom Lane wrote: > Andres Freund writes: > > I think this might be problem on our own end, actually. The > > distutils.sysconfig > > code did > > a = '-I' + distutils.sysconfig.get_python_inc(False) > > b = '-I' + distutils.sysconfig.get_python_inc(True) > > whic

Re: XLogReadRecord() error in XlogReadTwoPhaseData()

2022-01-23 Thread Tom Lane
Michael Paquier writes: > On Sun, Jan 23, 2022 at 06:10:07PM -0800, Noah Misch wrote: >> Could do that. Every run that doesn't get the flaky failure will print a >> message like "TODO passed: 3-5", though the test file could mitigate that by >> declaring the TODO only on configurations where we

Re: Bogus duplicate command issued in pg_dump

2022-01-23 Thread Michael Paquier
On Sun, Jan 23, 2022 at 01:31:03PM -0500, Tom Lane wrote: > We could consider a more global change to get rid of using > appendPQExpBuffer where it's not absolutely necessary, so that > there are fewer bad examples to copy. Another idea is to deem > it an anti-pattern to end a query with a semicol

Re: Replace uses of deprecated Python module distutils.sysconfig

2022-01-23 Thread Tom Lane
Andres Freund writes: > No, not really. There generally seems to be very little documentation about > what one is supposed to use when embedding python (rather than building a > python module). The only thing I really see is: > https://docs.python.org/3/extending/embedding.html#compiling-and-link

Re: XLogReadRecord() error in XlogReadTwoPhaseData()

2022-01-23 Thread Andres Freund
Hi, On 2022-01-23 18:10:07 -0800, Noah Misch wrote: > On Sun, Jan 23, 2022 at 05:40:54PM -0800, Andres Freund wrote: > > Test::more's description: "If it's something the programmer hasn't done yet, > > use TODO. This is for any code you haven't written yet, or bugs you have yet > > to fix, but wan

Re: XLogReadRecord() error in XlogReadTwoPhaseData()

2022-01-23 Thread Andres Freund
On 2022-01-23 21:25:04 -0500, Tom Lane wrote: > Michael Paquier writes: > > On Sun, Jan 23, 2022 at 06:10:07PM -0800, Noah Misch wrote: > >> Could do that. Every run that doesn't get the flaky failure will print a > >> message like "TODO passed: 3-5", though the test file could mitigate that >

Re: Replace uses of deprecated Python module distutils.sysconfig

2022-01-23 Thread Andres Freund
Hi, On 2022-01-23 21:31:52 -0500, Tom Lane wrote: > Andres Freund writes: > > No, not really. There generally seems to be very little documentation about > > what one is supposed to use when embedding python (rather than building a > > python module). The only thing I really see is: > > > https:/

Re: row filtering for logical replication

2022-01-23 Thread Amit Kapila
On Sat, Jan 22, 2022 at 8:45 PM Alvaro Herrera wrote: > > On 2022-Jan-22, Amit Kapila wrote: > > > CREATE TABLE parent (a int primary key, b int not null, c varchar) > > PARTITION BY RANGE(a); > > CREATE TABLE child PARTITION OF parent FOR VALUES FROM (0) TO (250); > > CREATE UNIQUE INDEX b_index

Re: Skipping logical replication transactions on subscriber side

2022-01-23 Thread Masahiko Sawada
On Fri, Jan 21, 2022 at 9:13 PM Amit Kapila wrote: > > On Fri, Jan 21, 2022 at 5:25 PM Amit Kapila wrote: > > > > On Fri, Jan 21, 2022 at 10:10 AM Masahiko Sawada > > wrote: > > > > > > > Few things that I think we can improve in 028_skip_xact.pl are as follows: > > > > After CREATE SUBSCRIPTIO

Re: Skipping logical replication transactions on subscriber side

2022-01-23 Thread Masahiko Sawada
On Fri, Jan 21, 2022 at 8:55 PM Amit Kapila wrote: > > On Fri, Jan 21, 2022 at 10:10 AM Masahiko Sawada > wrote: > > > > On Fri, Jan 21, 2022 at 1:20 PM Amit Kapila wrote: > > > > > > What do we want to indicate by [, ... ]? To me, it appears like > > > multiple options but that is not what we

Re: On login trigger: take three

2022-01-23 Thread Greg Nancarrow
On Mon, Dec 6, 2021 at 12:10 PM Greg Nancarrow wrote: > > I've attached a re-based version (no functional changes from the > previous) to fix cfbot failures. > I've attached a re-based version (no functional changes from the previous) to fix cfbot failures. Regards, Greg Nancarrow Fujitsu Austra

typos

2022-01-23 Thread Justin Pryzby
Most of this is new in v15 or doesn't affect user-facing docs so doesn't need to be backpatched. Feel free to ignore this for now and revisit in April... @Michael: I'm not sure what this is trying to say. 1e9475694b0ae2cf1204d01d2ef6ad86f3c7cac8 + First, scan the directory where the WAL segm

Re: Replace uses of deprecated Python module distutils.sysconfig

2022-01-23 Thread Tom Lane
Andres Freund writes: > To avoid too noisy breakages, we could have python.m4 emit INCLUDEPY and then > search the bf logs in a day or three? +1, it'd give us some info without breaking the farm. regards, tom lane

Re: Skipping logical replication transactions on subscriber side

2022-01-23 Thread Amit Kapila
On Mon, Jan 24, 2022 at 8:24 AM Masahiko Sawada wrote: > > On Fri, Jan 21, 2022 at 9:13 PM Amit Kapila wrote: > > > > On Fri, Jan 21, 2022 at 5:25 PM Amit Kapila wrote: > > > > > > On Fri, Jan 21, 2022 at 10:10 AM Masahiko Sawada > > > wrote: > > > > > > > > > > Few things that I think we can

makefiles writing to $@ should first write to $@.new

2022-01-23 Thread Justin Pryzby
There are many Makefile rules like foo: bar ./tool $< > $@ If the rule is interrupted (due to ^C or ENOSPC), foo can be 0 bytes or partially written, but won't be rebuilt until someone runs distclean or debugs it and removes the individual file, as I did for errcodes.h. It'd be better if

Re: Catalog version access

2022-01-23 Thread Michael Paquier
On Mon, Aug 16, 2021 at 06:12:54PM +, Bossart, Nathan wrote: > I was looking at the --check switch for the postgres binary recently > [0], and this sounds like something that might fit in nicely there. > In the attached patch, --check will also check the control file if one > exists. This woul

Re: Skipping logical replication transactions on subscriber side

2022-01-23 Thread Amit Kapila
On Sat, Jan 22, 2022 at 9:51 PM David G. Johnston wrote: > > So long as the ALTER command errors when asked to skip those IDs there isn't > any reason for an end-user, who likely doesn't know or care that 1 and 2 are > special, to be concerned about them (the only two invalid values) while > re

Re: makefiles writing to $@ should first write to $@.new

2022-01-23 Thread Michael Paquier
On Sun, Jan 23, 2022 at 09:23:05PM -0600, Justin Pryzby wrote: > If the rule is interrupted (due to ^C or ENOSPC), foo can be 0 bytes or > partially written, but won't be rebuilt until someone runs distclean or debugs > it and removes the individual file, as I did for errcodes.h. Honestly, I am no

Re: row filtering for logical replication

2022-01-23 Thread Amit Kapila
On Fri, Jan 21, 2022 at 2:56 PM Greg Nancarrow wrote: > > On Thu, Jan 20, 2022 at 12:12 PM houzj.f...@fujitsu.com > wrote: > > (3) pgoutput_row_filter_exec_expr > pgoutput_row_filter_exec_expr() returns false if "isnull" is true, > otherwise (if "isnull" is false) returns the value of "ret" > (tr

Re: Replace uses of deprecated Python module distutils.sysconfig

2022-01-23 Thread Andres Freund
Hi, On 2022-01-23 18:53:01 -0800, Andres Freund wrote: > I don't really understand what the various "platform" variables / paths are > supposed to do. The code says: > def get_python_inc(plat_specific=0, prefix=None): > """Return the directory containing installed Python header files. > >

Re: fairywren is generating bogus BASE_BACKUP commands

2022-01-23 Thread Robert Haas
On Sun, Jan 23, 2022 at 4:09 PM Andrew Dunstan wrote: > The most common issues we get are around this issue of virtualized paths > in the TAP tests. If people followed the rule I suggested upthread, 99% > of those problems would go away. Well, that makes it sound like it's the fault of people for

Re: [PATCH] Implement INSERT SET syntax

2022-01-23 Thread Justin Pryzby
Hi, On Fri, Jan 21, 2022 at 05:24:51PM +0800, wenjing zeng wrote: > Since this feature adds INSERT OVERRIDING SET syntax, it is recommended to > add some related testcases. Thanks for proposing some more tests. Note that your patch caused Gareth's patches to break under the cfbot. http://cfbot.

Re: [BUG]Update Toast data failure in logical replication

2022-01-23 Thread Michael Paquier
On Wed, Aug 11, 2021 at 06:14:55PM +0530, Dilip Kumar wrote: > Right Amit, are you planning to look more at this patch? It has been a couple of months since the last update, and this is still a bug as far as I understand. FWIW, I find the API changes of HeapDetermineModifiedColumns() and Extract

Re: makefiles writing to $@ should first write to $@.new

2022-01-23 Thread Julien Rouhaud
Hi, On Mon, Jan 24, 2022 at 12:41:49PM +0900, Michael Paquier wrote: > On Sun, Jan 23, 2022 at 09:23:05PM -0600, Justin Pryzby wrote: > > If the rule is interrupted (due to ^C or ENOSPC), foo can be 0 bytes or > > partially written, but won't be rebuilt until someone runs distclean or > > debugs

Re: Bogus duplicate command issued in pg_dump

2022-01-23 Thread David G. Johnston
On Sun, Jan 23, 2022 at 7:25 PM Michael Paquier wrote: > On Sun, Jan 23, 2022 at 01:31:03PM -0500, Tom Lane wrote: > > We could consider a more global change to get rid of using > > appendPQExpBuffer where it's not absolutely necessary, so that > > there are fewer bad examples to copy. Another i

Re: Skipping logical replication transactions on subscriber side

2022-01-23 Thread David G. Johnston
On Sun, Jan 23, 2022 at 8:35 PM Amit Kapila wrote: > > I really dislike the user experience this provides, and given it is new > in v15 (and right now this table seems to exist solely to support this > feature) changing this seems within the realm of possibility. I have to > imagine these workers

Re: row filtering for logical replication

2022-01-23 Thread Greg Nancarrow
On Mon, Jan 24, 2022 at 2:47 PM Amit Kapila wrote: > > > (3) pgoutput_row_filter_exec_expr > > pgoutput_row_filter_exec_expr() returns false if "isnull" is true, > > otherwise (if "isnull" is false) returns the value of "ret" > > (true/false). > > So the following elog needs to be changed (Peter S

Re: POC: GROUP BY optimization

2022-01-23 Thread Andrey Lepikhov
On 22/1/2022 01:34, Tomas Vondra wrote: The other thing we could do is reduce the coefficient gradually - so it'd be 1.5 for the first pathkey, then 1.25 for the next one, and so on. But it seems somewhat arbitrary (I certainly don't have some sound theoretical justification ...). I think, it

Re: RFC: Logging plan of the running query

2022-01-23 Thread torikoshia
On 2022-01-14 15:38, Julien Rouhaud wrote: Hi, On Fri, Jan 07, 2022 at 09:54:31PM +0900, Fujii Masao wrote: I ran the following query every 0.1s by using \watch psql command from three different sessions while make installcheck test was running. SELECT pg_log_query_plan(pid) FROM pg_sta

Re: row filtering for logical replication

2022-01-23 Thread Greg Nancarrow
On Mon, Jan 24, 2022 at 8:36 AM Peter Smith wrote: > > FYI - I noticed the cfbot is reporting a failed test case [1] for the > latest v69 patch set. > > [21:09:32.183] # Failed test 'check replicated inserts on subscriber' > [21:09:32.183] # at t/025_rep_changes_for_schema.pl line 202. > [21:09:32

Re: row filtering for logical replication

2022-01-23 Thread Peter Smith
On Fri, Jan 21, 2022 at 2:04 PM Amit Kapila wrote: > > On Thu, Jan 20, 2022 at 7:56 PM Alvaro Herrera > wrote: > > > > > > Maybe this was meant to be "validate RF > > > > expressions" and return, perhaps, a bitmapset of all invalid columns > > > > referenced? > > > > > > Currently, we stop as s

RE: Skipping logical replication transactions on subscriber side

2022-01-23 Thread tanghy.f...@fujitsu.com
On Fri, Jan 21, 2022 7:55 PM Amit Kapila wrote: > > 2. > +stop_skipping_changes(bool clear_subskipxid, XLogRecPtr origin_lsn, > + TimestampTz origin_timestamp) > +{ > + Assert(is_skipping_changes()); > + > + ereport(LOG, > + (errmsg("done skipping logical replication transaction %u", > + skip_x

Re: row filtering for logical replication

2022-01-23 Thread Peter Smith
On Mon, Jan 24, 2022 at 4:53 PM Peter Smith wrote: > > On Fri, Jan 21, 2022 at 2:04 PM Amit Kapila wrote: > > > > On Thu, Jan 20, 2022 at 7:56 PM Alvaro Herrera > > wrote: > > > > > > > > Maybe this was meant to be "validate RF > > > > > expressions" and return, perhaps, a bitmapset of all inv

Re: row filtering for logical replication

2022-01-23 Thread Amit Kapila
On Mon, Jan 24, 2022 at 10:29 AM Greg Nancarrow wrote: > > On Mon, Jan 24, 2022 at 2:47 PM Amit Kapila wrote: > > > > > (3) pgoutput_row_filter_exec_expr > > > pgoutput_row_filter_exec_expr() returns false if "isnull" is true, > > > otherwise (if "isnull" is false) returns the value of "ret" > >

Re: Skipping logical replication transactions on subscriber side

2022-01-23 Thread Masahiko Sawada
On Mon, Jan 24, 2022 at 1:49 PM David G. Johnston wrote: > > On Sun, Jan 23, 2022 at 8:35 PM Amit Kapila wrote: >> >> > I really dislike the user experience this provides, and given it is new in >> > v15 (and right now this table seems to exist solely to support this >> > feature) changing this

Re: typos

2022-01-23 Thread Michael Paquier
On Sun, Jan 23, 2022 at 09:00:01PM -0600, Justin Pryzby wrote: > Feel free to ignore this for now and revisit in April... I don't mind fixing that now. That means less to do later. > @Michael: I'm not sure what this is trying to say. > 1e9475694b0ae2cf1204d01d2ef6ad86f3c7cac8 > + First, sca

Re: typos

2022-01-23 Thread Justin Pryzby
On Mon, Jan 24, 2022 at 04:01:47PM +0900, Michael Paquier wrote: > On Sun, Jan 23, 2022 at 09:00:01PM -0600, Justin Pryzby wrote: > > Feel free to ignore this for now and revisit in April... > > I don't mind fixing that now. That means less to do later. Thanks. > > @Michael: I'm not sure what t

Error running configure on Mac

2022-01-23 Thread samay sharma
Hi, I was trying to build Postgres from source on my Mac (MacOS Monterey 12.1) and ran into an error when running configure. ./configure ... checking for gcc option to accept ISO C99... unsupported configure: error: C compiler "gcc" does not support C99 When I do gcc --version I see: Confi

Re: Error running configure on Mac

2022-01-23 Thread Tom Lane
samay sharma writes: > I was trying to build Postgres from source on my Mac (MacOS Monterey 12.1) > and ran into an error when running configure. Works for me, and for other developers, and for assorted buildfarm animals. > checking for gcc option to accept ISO C99... unsupported > configure: er

Re: [PATCH] Full support for index LP_DEAD hint bits on standby

2022-01-23 Thread Michail Nikolaev
Hello, Justin. Thanks for your attention. After some investigation, I think I have found the problem. It is caused by XLOG_RUNNING_XACTS at an undetermined moment (some test parts rely on it). Now test waits for XLOG_RUNNING_XACTS to happen (maximum is 15s) and proceed forward. I'll move entry b

Re: Printing backtrace of postgres processes

2022-01-23 Thread torikoshia
On 2022-01-14 19:48, Bharath Rupireddy wrote: On Sat, Nov 20, 2021 at 11:50 AM Bharath Rupireddy wrote: On Fri, Nov 19, 2021 at 4:07 PM vignesh C wrote: > The Attached v15 patch has the fixes for the same. Thanks. The v15 patch LGTM and the cf bot is happy hence marking it as RfC. The pat

Re: Error running configure on Mac

2022-01-23 Thread samay sharma
On Sun, Jan 23, 2022 at 11:14 PM Tom Lane wrote: > samay sharma writes: > > I was trying to build Postgres from source on my Mac (MacOS Monterey > 12.1) > > and ran into an error when running configure. > > Works for me, and for other developers, and for assorted buildfarm > animals. > > > check

Re: row filtering for logical replication

2022-01-23 Thread Greg Nancarrow
On Mon, Jan 24, 2022 at 5:09 PM Amit Kapila wrote: > > On Mon, Jan 24, 2022 at 10:29 AM Greg Nancarrow wrote: > > > > On Mon, Jan 24, 2022 at 2:47 PM Amit Kapila wrote: > > > > > > > (3) pgoutput_row_filter_exec_expr > > > > pgoutput_row_filter_exec_expr() returns false if "isnull" is true, > >

  1   2   >