Re: [Proposal] Global temporary tables

2021-10-12 Thread Andrew Bille
Thanks for the fix. It works for me. Now I'm exploring another crash related to GTT, but I need a few days to present a simple repro. On Sat, Oct 9, 2021 at 2:41 PM wenjing wrote: > > Thank you for pointing it out. > This is a bug that occurs during transaction rollback and process exit, I > fi

Re: should we allow users with a predefined role to access pg_backend_memory_contexts view and pg_log_backend_memory_contexts function?gr

2021-10-12 Thread Bharath Rupireddy
On Wed, Oct 13, 2021 at 7:48 AM Bossart, Nathan wrote: > > On 10/12/21, 6:26 PM, "Michael Paquier" wrote: > > On Tue, Oct 12, 2021 at 08:33:19PM -0400, Stephen Frost wrote: > >> I would think we would do both…. That is- move to using GRANT/REVOKE, and > >> then just include a GRANT to pg_read_all

Re: prevent immature WAL streaming

2021-10-12 Thread Amul Sul
Hi, On Thu, Oct 7, 2021 at 6:57 PM Alvaro Herrera wrote: > > On 2021-Oct-07, Amul Sul wrote: > > > Make sense, thanks for the explanation. > > You're welcome. Also, I forgot: thank you for taking the time to review > the code. Much appreciated. :) > > I have one more question, regarding the

Re: should we allow users with a predefined role to access pg_backend_memory_contexts view and pg_log_backend_memory_contexts function?gr

2021-10-12 Thread Bharath Rupireddy
On Wed, Oct 13, 2021 at 6:55 AM Michael Paquier wrote: > > On Tue, Oct 12, 2021 at 08:33:19PM -0400, Stephen Frost wrote: > > I would think we would do both…. That is- move to using GRANT/REVOKE, and > > then just include a GRANT to pg_read_all_stats. > > > > Or not. I can see the argument that, b

Re: Reset snapshot export state on the transaction abort

2021-10-12 Thread Dilip Kumar
On Wed, Oct 13, 2021 at 10:17 AM Michael Paquier wrote: > > On Mon, Oct 11, 2021 at 08:46:32PM +0530, Dilip Kumar wrote: > > As reported at [1], if the transaction is aborted during export > > snapshot then ExportInProgress and SavedResourceOwnerDuringExport are > > not getting reset and that is t

Re: Improve the HINT message of the ALTER command for postgres_fdw

2021-10-12 Thread Bharath Rupireddy
On Tue, Oct 12, 2021 at 11:11 PM Fujii Masao wrote: > BTW, I found file_fdw.c, dblink.c, postgres_fdw/option.c and foreign.c > use different error codes for the same error message as follows. > They should use the same error code? If yes, ISTM that > ERRCODE_FDW_INVALID_OPTION_NAME is better becau

lastOverflowedXid does not handle transaction ID wraparound

2021-10-12 Thread Stan Hu
In a blog post (https://about.gitlab.com/blog/2021/09/29/why-we-spent-the-last-month-eliminating-postgresql-subtransactions/), I described how PostgreSQL can enter into a suboverflow condition on the replica under a number of conditions: 1. A long transaction starts. 2. A single SAVEPOINT is issu

Re: Reset snapshot export state on the transaction abort

2021-10-12 Thread Michael Paquier
On Mon, Oct 11, 2021 at 08:46:32PM +0530, Dilip Kumar wrote: > As reported at [1], if the transaction is aborted during export > snapshot then ExportInProgress and SavedResourceOwnerDuringExport are > not getting reset and that is throwing an error > "clearing exported snapshot in wrong transaction

Re: Bug in DefineRange() with multiranges

2021-10-12 Thread Michael Paquier
On Tue, Oct 12, 2021 at 08:52:29AM +0300, Sergey Shinderuk wrote: > Thanks, here is a patch. Looks fine seen from here, so I'll apply shortly. I was initially tempted to do pstrdup() on the object name returned by QualifiedNameGetCreationNamespace(), but just removing the pfree() is simpler.

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

2021-10-12 Thread Michael Paquier
On Wed, Oct 13, 2021 at 12:06:32AM +, Bossart, Nathan wrote: > At first glance, it looks like ALTER INDEX .. ALTER COLUMN ... SET > uses the wrong validation function. I've attached a patch where I've > attempted to fix that and added some tests. The gap is larger than than, because ALTER IND

Re: [BUG] Unexpected action when publishing partition tables

2021-10-12 Thread Amit Langote
Hi Amit, On Fri, Oct 8, 2021 at 12:47 PM Amit Kapila wrote: > On Thu, Oct 7, 2021 at 12:39 PM Amit Langote wrote: > > Sorry that I didn't comment on this earlier, but I think either > > GetPubPartitionOptionRelations() or InvalidatePublicationRels() > > introduced in the commit 4548c76738b shoul

Re: Feature Request: Allow additional special characters at the beginning of the name.

2021-10-12 Thread Tom Lane
Mark Simon writes: > I’m not asking for a change in how PostgreSQL manages variables, but > whether it’s possible to allow the @ sign, and possibly the $ sign to > start a variable name. @ is allowed in operator names, and indeed is used in (mumble select count(*) ...) 59 built-in operators. S

RE: Added schema level support for publication.

2021-10-12 Thread houzj.f...@fujitsu.com
On Tuesday, October 12, 2021 9:15 PM vignesh C > Attached v40 patch has the fix for the above comments. Thanks for the update, I have some minor issues about partition related behavior. 1) Tang tested and discussed this issue with me. The testcase is: We publish a schema and there is a partiti

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

2021-10-12 Thread Bossart, Nathan
On 10/12/21, 5:31 PM, "Vik Fearing" wrote: > On 10/13/21 2:06 AM, Bossart, Nathan wrote: >> Moving to pgsql-hackers@. >> >> At first glance, it looks like ALTER INDEX .. ALTER COLUMN ... SET >> uses the wrong validation function. I've attached a patch where I've >> attempted to fix that and added

Re: should we allow users with a predefined role to access pg_backend_memory_contexts view and pg_log_backend_memory_contexts function?gr

2021-10-12 Thread Bossart, Nathan
On 10/12/21, 6:26 PM, "Michael Paquier" wrote: > On Tue, Oct 12, 2021 at 08:33:19PM -0400, Stephen Frost wrote: >> I would think we would do both…. That is- move to using GRANT/REVOKE, and >> then just include a GRANT to pg_read_all_stats. >> >> Or not. I can see the argument that, because it jus

Re: Skipping logical replication transactions on subscriber side

2021-10-12 Thread Greg Nancarrow
On Tue, Oct 12, 2021 at 4:00 PM Masahiko Sawada wrote: > > I've attached updated patches. > Some comments for the v16-0001 patch: src/backend/postmaster/pgstat.c (1) pgstat_vacuum_subworker_stat() Remove "the" from beginning of the following comment line: + * the all the dead subscription wo

Feature Request: Allow additional special characters at the beginning of the name.

2021-10-12 Thread Mark Simon
I am very new to this list, so I don’t know whether this is the right place. Microsoft SQL and MySQL both use the @ sign at the beginning of their variables. The most obvious benefit of this is that it is very easy to distinguish between variable names and column names. I’m not asking for a c

Re: pg_upgrade test for binary compatibility of core data types

2021-10-12 Thread Michael Paquier
On Mon, Oct 11, 2021 at 02:38:12PM +0900, Michael Paquier wrote: > For now, attached is a patch to address the issues with test.sh that I > am planning to backpatch. This fixes the facility on HEAD, while > minimizing the diffs between the dumps. We could do more, like a > s/PROCEDURE/FUNCTION/ b

Re: should we allow users with a predefined role to access pg_backend_memory_contexts view and pg_log_backend_memory_contexts function?gr

2021-10-12 Thread Michael Paquier
On Tue, Oct 12, 2021 at 08:33:19PM -0400, Stephen Frost wrote: > I would think we would do both…. That is- move to using GRANT/REVOKE, and > then just include a GRANT to pg_read_all_stats. > > Or not. I can see the argument that, because it just goes into the log, > that it doesn’t make sense to g

Re: [RFC] building postgres with meson

2021-10-12 Thread Andres Freund
Hi, On 2021-10-12 13:42:56 -0700, Andres Freund wrote: > On 2021-10-12 16:02:14 -0400, Andrew Dunstan wrote: > > You do that by putting a path to it at the start of the PATH. The wrinkle in > > this is that you need prove to point to one that understands virtual > > paths. So you do something like

Re: should we allow users with a predefined role to access pg_backend_memory_contexts view and pg_log_backend_memory_contexts function?

2021-10-12 Thread Stephen Frost
Greetings, On Tue, Oct 12, 2021 at 20:26 Bossart, Nathan wrote: > On 10/9/21, 2:12 AM, "Bharath Rupireddy" < > bharath.rupireddyforpostg...@gmail.com> wrote: > > Here's the v1, please review it further. > > Thanks for the patch. > > - /* Only allow superusers to log memory contexts. */ > -

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

2021-10-12 Thread Vik Fearing
On 10/13/21 2:06 AM, Bossart, Nathan wrote: > On 10/11/21, 11:03 AM, "Vik Fearing" wrote: >> On 10/11/21 5:25 PM, PG Bug reporting form wrote: >>> >>> User 'musttu' on IRC reported the following bug: After running "ALTER INDEX >>> some_idx ALTER COLUMN expr SET (n_distinct=100)", the index and tab

Re: should we allow users with a predefined role to access pg_backend_memory_contexts view and pg_log_backend_memory_contexts function?

2021-10-12 Thread Bossart, Nathan
On 10/9/21, 2:12 AM, "Bharath Rupireddy" wrote: > Here's the v1, please review it further. Thanks for the patch. - /* Only allow superusers to log memory contexts. */ - if (!superuser()) + /* +* Only superusers or members of pg_read_all_stats can log memory contexts.

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

2021-10-12 Thread Kyotaro Horiguchi
At Tue, 12 Oct 2021 14:57:58 +0530, Bharath Rupireddy wrote in > On Tue, Oct 12, 2021 at 2:03 PM Kyotaro Horiguchi > wrote: > > > [1] - > > > https://www.postgresql.org/message-id/CALj2ACXZ_o7rcOb7-Rs96P0d%3DEi%2Bnvf_WZ-Meky7Vv%2BnQNFYjQ%40mail.gmail.com > > > > The patch does this: > > > >

Re: [RFC] building postgres with meson

2021-10-12 Thread Andres Freund
Hi, On 2021-10-13 01:19:27 +0200, Josef Šimánek wrote: > I tried to clean and start from scratch, but I'm getting different > error probably related to wrongly configured JIT (LLVM wasn't found > during meson setup). I'll debug on my side to provide more info. ../src/backend/jit/jit.c:91:73: erro

Re: storing an explicit nonce

2021-10-12 Thread Bruce Momjian
On Wed, Oct 13, 2021 at 12:48:51AM +0300, Ants Aasma wrote: > On Wed, 13 Oct 2021 at 00:25, Bruce Momjian wrote: > > On Tue, Oct 12, 2021 at 11:21:28PM +0300, Ants Aasma wrote: > > Page encrypting to all zeros is for all practical purposes impossible to > hit. > > Basically an att

Re: [RFC] building postgres with meson

2021-10-12 Thread Josef Šimánek
út 12. 10. 2021 v 19:17 odesílatel Andres Freund napsal: > > Hi, > > On 2021-10-12 17:21:50 +0200, Josef Šimánek wrote: > > > # build (uses automatically as many cores as available) > > > ninja > > > > I'm getting errors at this step. You can find my output at > > https://pastebin.com/Ar5VqfFG. Se

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

2021-10-12 Thread Jeremy Schneider
On 10/10/21 23:27, Masahiko Sawada wrote: > > After more thought, given DDLs are not likely to happen than DML in > practice, ... I haven't looked closely at the patch, but I'd be careful about workloads where people create and drop "temporary tables". I've seen this pattern used a few times, esp

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

2021-10-12 Thread Andres Freund
Hi, On 2021-10-11 15:24:46 +0900, Fujii Masao wrote: > How about modifying SharedInvalBackendInit() so that it accepts > BackendId as an argument and allocates the ProcState entry of > the specified BackendId? That is, the startup process determines > that its BackendId is "MaxBackends + MyAuxProc

Re: Temporary tables versus wraparound... again

2021-10-12 Thread Greg Stark
Here's an updated patch. I added some warning messages to autovacuum. One thing I learned trying to debug this situation in production is that it's nigh impossible to find the pid of the session using a temporary schema. The number in the schema refers to the backendId in the sinval stuff for whic

Re: storing an explicit nonce

2021-10-12 Thread Stephen Frost
Greetings, On Tue, Oct 12, 2021 at 17:49 Ants Aasma wrote: > > On Wed, 13 Oct 2021 at 00:25, Bruce Momjian wrote: > >> On Tue, Oct 12, 2021 at 11:21:28PM +0300, Ants Aasma wrote: >> > On Tue, 12 Oct 2021 at 16:14, Bruce Momjian wrote: >> > >> > Well, how do you detect an all-zero page vs a

Re: storing an explicit nonce

2021-10-12 Thread Ants Aasma
On Wed, 13 Oct 2021 at 00:25, Bruce Momjian wrote: > On Tue, Oct 12, 2021 at 11:21:28PM +0300, Ants Aasma wrote: > > On Tue, 12 Oct 2021 at 16:14, Bruce Momjian wrote: > > > > Well, how do you detect an all-zero page vs a page that encrypted to > all > > zeros? > > > > Page encrypting to

Re: storing an explicit nonce

2021-10-12 Thread Bruce Momjian
On Tue, Oct 12, 2021 at 11:21:28PM +0300, Ants Aasma wrote: > On Tue, 12 Oct 2021 at 16:14, Bruce Momjian wrote: > > Well, how do you detect an all-zero page vs a page that encrypted to all > zeros? > > Page encrypting to all zeros is for all practical purposes impossible to hit. > Basic

Re: pg14 psql broke \d datname.nspname.relname

2021-10-12 Thread Mark Dilger
> On Oct 12, 2021, at 10:18 AM, Mark Dilger > wrote: > > Here is a WIP patch that restores the old behavior, just so you can eyeball > how large it is. (It passes check-world and I've read it over once, but I'm > not ready to stand by this as correct quite yet.) I need to add a regression

Re: [RFC] building postgres with meson

2021-10-12 Thread Andres Freund
Hi, On 2021-10-12 15:55:22 -0400, John Naylor wrote: > On Tue, Oct 12, 2021 at 4:37 AM Andres Freund wrote: > The build code looks pretty approachable for someone with no prior > exposure, and feels pretty nice when running it That's part of what attracted me... > (I couldn't get a build worki

Re: [RFC] building postgres with meson

2021-10-12 Thread Andres Freund
Hi, On 2021-10-12 16:02:14 -0400, Andrew Dunstan wrote: > You need to build against a native perl, like Strawberry or ActiveState. > (I have had mixed success with Strawberry) Do you understand why that is needed? > You do that by putting a path to it at the start of the PATH. The wrinkle in >

Re: storing an explicit nonce

2021-10-12 Thread Ants Aasma
On Tue, 12 Oct 2021 at 16:14, Bruce Momjian wrote: > Well, how do you detect an all-zero page vs a page that encrypted to all > zeros? > Page encrypting to all zeros is for all practical purposes impossible to hit. Basically an attacker would have to be able to arbitrarily set the whole contents

Re: [RFC] building postgres with meson

2021-10-12 Thread Andrew Dunstan
On 10/12/21 3:29 PM, Andres Freund wrote: > > Does that recipe get you to a build where ./configure --with-perl succeeds? > > I see this here: > > checking for Perl archlibexp... /usr/lib/perl5/core_perl > checking for Perl privlibexp... /usr/share/perl5/core_perl > checking for Perl useshrplib..

Re: [RFC] building postgres with meson

2021-10-12 Thread John Naylor
On Tue, Oct 12, 2021 at 4:37 AM Andres Freund wrote: [Meson prototype] The build code looks pretty approachable for someone with no prior exposure, and feels pretty nice when running it (I couldn't get a build working but I'll leave that aside for now). > As far as I can tell the only OS that p

Re: [RFC] building postgres with meson

2021-10-12 Thread Andres Freund
Hi, On 2021-10-12 14:37:04 -0400, Andrew Dunstan wrote: > On 10/12/21 2:09 PM, Andres Freund wrote: > >> Hm. Yea, the perl thing is my fault - you should be able to get past it > >> with > >> -Dperl=disabled, and I'll take a look at fixing the perl detection. (*) > > This is a weird one. I don't

Re: pg14 psql broke \d datname.nspname.relname

2021-10-12 Thread Mark Dilger
> On Oct 12, 2021, at 10:54 AM, Robert Haas wrote: > > On Tue, Oct 12, 2021 at 1:18 PM Mark Dilger > wrote: >> Here is a WIP patch that restores the old behavior, just so you can eyeball >> how large it is. > > I guess that's not that bad. Why did we end up with the behavior that > the curr

Re: [RFC] building postgres with meson

2021-10-12 Thread Andrew Dunstan
On 10/12/21 2:37 PM, Andrew Dunstan wrote: > On 10/12/21 2:09 PM, Andres Freund wrote: >> Hi, >> >> On 2021-10-12 09:59:26 -0700, Andres Freund wrote: >>> On 2021-10-12 11:50:03 -0400, Andrew Dunstan wrote: It hung because it expected the compiler to be 'ccache cc'. Hanging in such a ca

Re: [RFC] building postgres with meson

2021-10-12 Thread Andres Freund
Hi, On 2021-10-12 09:15:41 -0700, Andres Freund wrote: > > For example, at the time, gcc on macOS was not supported. Meson thought, if > > you are on macOS, you are surely using the Apple compiler, and it supports > > these options. > > I'm pretty sure this one now can just be overridden with CC=

Re: [RFC] building postgres with meson

2021-10-12 Thread Andrew Dunstan
On 10/12/21 2:23 PM, Andres Freund wrote: > Hi, > > On 2021-10-12 14:11:39 -0400, Andrew Dunstan wrote: >> On 10/12/21 12:59 PM, Andres Freund wrote: >>> If you repro the hanging, what's the last bit in meson-logs/meson-log.txt? >> Here's the entire thing >> Sanity check compiler command line: cc

Re: [RFC] building postgres with meson

2021-10-12 Thread Andrew Dunstan
On 10/12/21 2:09 PM, Andres Freund wrote: > Hi, > > On 2021-10-12 09:59:26 -0700, Andres Freund wrote: >> On 2021-10-12 11:50:03 -0400, Andrew Dunstan wrote: >>> It hung because it expected the compiler to be 'ccache cc'. Hanging in >>> such a case is kinda unforgivable. I remedied that by settin

Re: [RFC] building postgres with meson

2021-10-12 Thread Andres Freund
Hi, On 2021-10-12 14:11:39 -0400, Andrew Dunstan wrote: > On 10/12/21 12:59 PM, Andres Freund wrote: > > If you repro the hanging, what's the last bit in meson-logs/meson-log.txt? > Here's the entire thing > Sanity check compiler command line: ccache cc sanitycheckc.c -o > sanitycheckc.exe -D_FI

Re: [RFC] building postgres with meson

2021-10-12 Thread Andrew Dunstan
On 10/12/21 12:59 PM, Andres Freund wrote: > > > If you repro the hanging, what's the last bit in meson-logs/meson-log.txt? Here's the entire thing # cat  C:/tools/msys64/home/Administrator/postgresql/build/meson-logs/meson-log.txt Build started at 2021-10-12T18:08:34.387568 Main binary: C:/

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

2021-10-12 Thread Fujii Masao
On 2021/10/12 16:39, Bharath Rupireddy wrote: Otherwise, we could discard defining MyBackendId in auxprocess.c and define the MyBackendId in the SharedInvalBackendInit itself as this is the function that defines the MyBackendId for everyone whoever requires it. I prefer this approach over what

Re: [RFC] building postgres with meson

2021-10-12 Thread Andres Freund
Hi, On 2021-10-12 09:59:26 -0700, Andres Freund wrote: > On 2021-10-12 11:50:03 -0400, Andrew Dunstan wrote: > > It hung because it expected the compiler to be 'ccache cc'. Hanging in > > such a case is kinda unforgivable. I remedied that by setting 'CC=gcc' > > but it then errored out looking for

Re: pg14 psql broke \d datname.nspname.relname

2021-10-12 Thread Robert Haas
On Tue, Oct 12, 2021 at 1:18 PM Mark Dilger wrote: > Here is a WIP patch that restores the old behavior, just so you can eyeball > how large it is. I guess that's not that bad. Why did we end up with the behavior that the current comment describes this way? "(Additional dots in the name portion

Re: Improve the HINT message of the ALTER command for postgres_fdw

2021-10-12 Thread Fujii Masao
On 2021/10/12 19:57, bt21masumurak wrote: I made new patch based on those comments. Thanks for updating the patch! -errhint("HOGEHOGEValid options in this context are: %s", -buf.data))); The pat

Re: refactoring basebackup.c

2021-10-12 Thread Robert Haas
On Tue, Oct 5, 2021 at 5:51 AM Jeevan Ladhe wrote: > I have fixed the autoFlush issue. Basically, I was wrongly initializing > the lz4 preferences in bbsink_lz4_begin_archive() instead of > bbsink_lz4_begin_backup(). I have fixed the issue in the attached > patch, please have a look at it. Thanks

Re: pg14 psql broke \d datname.nspname.relname

2021-10-12 Thread Mark Dilger
> On Oct 12, 2021, at 10:01 AM, Robert Haas wrote: > > On Tue, Oct 12, 2021 at 12:44 PM Peter Geoghegan wrote: >> You're asking us to imagine a counterfactual. But this counterfactual >> bug report would have to describe a real practical problem. > > Yes. And I think this one should be held

Re: pg14 psql broke \d datname.nspname.relname

2021-10-12 Thread Mark Dilger
> On Oct 12, 2021, at 10:03 AM, Robert Haas wrote: > > On Tue, Oct 12, 2021 at 12:57 PM Justin Pryzby wrote: >> I think there's an easy answer here that would satisfy everyone; two patches: >> 0001 to fix the unintentional behavior change; >> 0002 to reject garbage input: anything with more th

Re: [RFC] building postgres with meson

2021-10-12 Thread Andres Freund
Hi, On 2021-10-12 17:21:50 +0200, Josef Šimánek wrote: > > # build (uses automatically as many cores as available) > > ninja > > I'm getting errors at this step. You can find my output at > https://pastebin.com/Ar5VqfFG. Setup went well without errors. Is that > expected for now? Thanks, that's

Re: pg14 psql broke \d datname.nspname.relname

2021-10-12 Thread Robert Haas
On Tue, Oct 12, 2021 at 12:57 PM Justin Pryzby wrote: > I think there's an easy answer here that would satisfy everyone; two patches: > 0001 to fix the unintentional behavior change; > 0002 to reject garbage input: anything with more than 3 dot-separated > components, or with 3 components whe

Re: pg14 psql broke \d datname.nspname.relname

2021-10-12 Thread Robert Haas
On Tue, Oct 12, 2021 at 12:44 PM Peter Geoghegan wrote: > You're asking us to imagine a counterfactual. But this counterfactual > bug report would have to describe a real practical problem. Yes. And I think this one should be held to the same standard: \d mydb.myschema.mytable not working is pote

Re: [RFC] building postgres with meson

2021-10-12 Thread Andres Freund
Hi, On 2021-10-12 11:50:03 -0400, Andrew Dunstan wrote: > It hung because it expected the compiler to be 'ccache cc'. Hanging in > such a case is kinda unforgivable. I remedied that by setting 'CC=gcc' > but it then errored out looking for perl libs. I think msys2 is going to > be a bit difficult

Re: pg14 psql broke \d datname.nspname.relname

2021-10-12 Thread Justin Pryzby
I understand Tom's position to be that the behavior should be changed back, since it was 1) unintentional; and 2) breaks legitimate use (when the datname matches current_database). I think there's an easy answer here that would satisfy everyone; two patches: 0001 to fix the unintentional behavior

Re: pg14 psql broke \d datname.nspname.relname

2021-10-12 Thread Vik Fearing
On 10/12/21 5:19 PM, Stephen Frost wrote: > Greetings, > > * Robert Haas (robertmh...@gmail.com) wrote: >> On Tue, Oct 12, 2021 at 10:31 AM Tom Lane wrote: >>> If the behavior v14 had implemented were "throw an error if the >>> first word doesn't match the current database name", perhaps nobody >

Re: pg14 psql broke \d datname.nspname.relname

2021-10-12 Thread Peter Geoghegan
On Tue, Oct 12, 2021 at 7:41 AM Robert Haas wrote: > Oh, give me a break. The previous behavior obviously hasn't been > tested either, and is broken on its face. If someone *had* complained > about it, I imagine you would have promptly fixed it and likely > back-patched the fix, probably in under

Re: [RFC] building postgres with meson

2021-10-12 Thread Andres Freund
Hi, On 2021-10-12 15:30:57 +0200, Peter Eisentraut wrote: > I played with $subject a few years ago and liked it. I think, like you > said, meson is the best way forward. I support this project. Cool. > One problem I noticed back then was that some choices that we currently > determine ourselv

Re: [RFC] building postgres with meson

2021-10-12 Thread Andrew Dunstan
On 10/12/21 11:28 AM, Andrew Dunstan wrote: > On 10/12/21 4:37 AM, Andres Freund wrote: >> # setup build directory >> meson setup build --buildtype debug > I took this for an outing on msys2 and it just seems to hang. If it's not > hanging it's unbelievably slow. > > It hung because it expected

Re: [RFC] building postgres with meson

2021-10-12 Thread Tom Lane
Robert Haas writes: > I think we're going to need some solution to this problem. We have too > many people here with strong opinions about questions like this for me > to feel good about the idea that we're going to collectively be OK > with leaving these sorts of decisions up to some other projec

Re: [RFC] building postgres with meson

2021-10-12 Thread Andrew Dunstan
On 10/12/21 4:37 AM, Andres Freund wrote: > # setup build directory > meson setup build --buildtype debug I took this for an outing on msys2 and it just seems to hang. If it's not hanging it's unbelievably slow. cheers andrew -- Andrew Dunstan EDB: https://www.enterprisedb.com

Re: [RFC] building postgres with meson

2021-10-12 Thread Josef Šimánek
. út 12. 10. 2021 v 10:37 odesílatel Andres Freund napsal: > > Hi, > > For the last year or so I've on and off tinkered with $subject. I think > it's in a state worth sharing now. First, let's look at a little > comparison. > > My workstation: > > non-cached configure: > current:11.80s

Re: pg14 psql broke \d datname.nspname.relname

2021-10-12 Thread Stephen Frost
Greetings, * Robert Haas (robertmh...@gmail.com) wrote: > On Tue, Oct 12, 2021 at 10:31 AM Tom Lane wrote: > > If the behavior v14 had implemented were "throw an error if the > > first word doesn't match the current database name", perhaps nobody > > would have questioned it. But that's not what

Re: [RFC] building postgres with meson

2021-10-12 Thread Andrew Dunstan
On 10/12/21 4:37 AM, Andres Freund wrote: > git remote add andres g...@github.com:anarazel/postgres.git ITYM: git remote add andres git://github.com/anarazel/postgres.git cheers andrew   -- Andrew Dunstan EDB: https://www.enterprisedb.com

Re: [RFC] building postgres with meson

2021-10-12 Thread Robert Haas
On Tue, Oct 12, 2021 at 9:31 AM Peter Eisentraut wrote: > One problem I noticed back then was that some choices that we currently > determine ourselves in configure or the makefiles are hardcoded in > meson. For example, at the time, gcc on macOS was not supported. Meson > thought, if you are on

Re: storing an explicit nonce

2021-10-12 Thread Robert Haas
On Tue, Oct 12, 2021 at 10:39 AM Stephen Frost wrote: > Using fake LSNs isn't new.. how is this not a concern already then? > > Also wondering why the buffer manager would care about the LSN on pages > which are not BM_PERMANENT..? > > I'll admit that I might certainly be missing something here.

Re: pg14 psql broke \d datname.nspname.relname

2021-10-12 Thread Robert Haas
On Tue, Oct 12, 2021 at 10:31 AM Tom Lane wrote: > If the behavior v14 had implemented were "throw an error if the > first word doesn't match the current database name", perhaps nobody > would have questioned it. But that's not what we have. It's fairly > clear that neither you nor Mark thought

Re: storing an explicit nonce

2021-10-12 Thread Stephen Frost
Greetings, * Robert Haas (robertmh...@gmail.com) wrote: > On Mon, Oct 11, 2021 at 1:30 PM Stephen Frost wrote: > > Regarding unlogged LSNs at least, I would think that we'd want to > > actually use GetFakeLSNForUnloggedRel() instead of just having it zero'd > > out. The fixed value for GiST inde

Re: pg14 psql broke \d datname.nspname.relname

2021-10-12 Thread Mark Dilger
> On Oct 12, 2021, at 7:30 AM, Tom Lane wrote: > > If the behavior v14 had implemented were "throw an error if the > first word doesn't match the current database name", perhaps nobody > would have questioned it. But that's not what we have. It's fairly > clear that neither you nor Mark thou

Re: storing an explicit nonce

2021-10-12 Thread Robert Haas
On Mon, Oct 11, 2021 at 1:30 PM Stephen Frost wrote: > Regarding unlogged LSNs at least, I would think that we'd want to > actually use GetFakeLSNForUnloggedRel() instead of just having it zero'd > out. The fixed value for GiST index pages is just during the index > build process, as I recall, an

Re: pg14 psql broke \d datname.nspname.relname

2021-10-12 Thread Tom Lane
Robert Haas writes: > On Mon, Oct 11, 2021 at 10:33 PM Peter Geoghegan wrote: >> Being lenient here just doesn't have much downside in practice, as >> evidenced by the total lack of complaints about that lenience. > I find it kind of surprising to find everyone agreeing with this > argument. If

Re: storing an explicit nonce

2021-10-12 Thread Robert Haas
On Thu, Oct 7, 2021 at 11:05 PM Stephen Frost wrote: > Sure, I get that. Would be awesome if all these things were clearly > documented somewhere but I've never been able to find it quite as > explicitly laid out as one would like. :-( > specifically: Appendix C: Tweaks > > Quoting a couple of

Re: pg14 psql broke \d datname.nspname.relname

2021-10-12 Thread Robert Haas
On Mon, Oct 11, 2021 at 10:33 PM Peter Geoghegan wrote: > On Mon, Oct 11, 2021 at 7:09 PM Mark Dilger > wrote: > > I was just wondering when it might be time to stop being lenient in psql > > and instead reject malformed identifiers. > > I suppose that I probably wouldn't have chosen this behavi

Re: Gather performance analysis

2021-10-12 Thread Dilip Kumar
On Tue, Oct 12, 2021 at 6:41 PM Tomas Vondra wrote: > > On 9/28/21 14:00, Dilip Kumar wrote: > > > > I think that would be great, can we just test this specific target > > where we are seeing a huge dip with the patch, e.g. > > with 1000 rows, 10 columns and 4 threads, and queue size 64k. In

Re: automatically generating node support functions

2021-10-12 Thread Andrew Dunstan
On 10/11/21 10:22 AM, Peter Eisentraut wrote: > > On 15.09.21 21:01, Peter Eisentraut wrote: >> On 17.08.21 16:36, Peter Eisentraut wrote: >>> Here is another set of preparatory patches that clean up various >>> special cases and similar in the node support. >> >> This set of patches has been com

Re: Make query ID more portable

2021-10-12 Thread Bruce Momjian
On Tue, Oct 12, 2021 at 09:40:47AM -0400, Tom Lane wrote: > Andrey Lepikhov writes: > > But core jumbling code is good, fast and much easier in support. > > It won't be fast once you stick a bunch of catalog lookups into it. > I think this is fine as an extension, but it has no chance of being >

Re: Make query ID more portable

2021-10-12 Thread Tom Lane
Andrey Lepikhov writes: > But core jumbling code is good, fast and much easier in support. It won't be fast once you stick a bunch of catalog lookups into it. I think this is fine as an extension, but it has no chance of being accepted in core, just on performance grounds. (I'm also not sure tha

Re: [RFC] building postgres with meson

2021-10-12 Thread Peter Eisentraut
On 12.10.21 10:37, Andres Freund wrote: For the last year or so I've on and off tinkered with $subject. I think it's in a state worth sharing now. First, let's look at a little comparison. I played with $subject a few years ago and liked it. I think, like you said, meson is the best way for

Re: storing an explicit nonce

2021-10-12 Thread Bruce Momjian
On Tue, Oct 12, 2021 at 08:49:28AM -0400, Stephen Frost wrote: > * Bruce Momjian (br...@momjian.us) wrote: > > I thought he was saying that when you extend a file, you might have to > > extend it with all zeros, rather than being able to extend it with > > an actual encrypted page of zeros. For ex

Re: automatically generating node support functions

2021-10-12 Thread Peter Eisentraut
On 12.10.21 03:06, Corey Huinker wrote: build support and made the Perl code more portable, so that the cfbot doesn't have to be sad. Was this also the reason for doing the output with print statements rather than using one of the templating libraries? I'm mostly just curious, and cer

Question about building an exportable snapshop

2021-10-12 Thread Dilip Kumar
While working on the issue [1], I realize that if a subtransaction hasn't done any catalog change then we don't add this in the commit xid list even if we are building a full snapshot [2]. That means when we will convert this to the MVCC snapshot we will add this to a running xid list. If my unde

Re: storing an explicit nonce

2021-10-12 Thread Stephen Frost
Greetings, * Bruce Momjian (br...@momjian.us) wrote: > On Tue, Oct 12, 2021 at 08:25:52AM -0400, Stephen Frost wrote: > > * Bruce Momjian (br...@momjian.us) wrote: > > > On Tue, Oct 12, 2021 at 08:40:17AM +0300, Ants Aasma wrote: > > > > On Mon, 11 Oct 2021 at 22:15, Bruce Momjian wrote: > > > >

Re: storing an explicit nonce

2021-10-12 Thread Bruce Momjian
On Tue, Oct 12, 2021 at 08:25:52AM -0400, Stephen Frost wrote: > Greetings, > > * Bruce Momjian (br...@momjian.us) wrote: > > On Tue, Oct 12, 2021 at 08:40:17AM +0300, Ants Aasma wrote: > > > On Mon, 11 Oct 2021 at 22:15, Bruce Momjian wrote: > > > > > > > Yes, that's the direction that I wa

Re: storing an explicit nonce

2021-10-12 Thread Stephen Frost
Greetings, * Bruce Momjian (br...@momjian.us) wrote: > On Tue, Oct 12, 2021 at 08:40:17AM +0300, Ants Aasma wrote: > > On Mon, 11 Oct 2021 at 22:15, Bruce Momjian wrote: > > > > > Yes, that's the direction that I was thinking also and specifically > > with > > > XTS as the encryption al

Re: [Patch] ALTER SYSTEM READ ONLY

2021-10-12 Thread Amul Sul
On Thu, Oct 7, 2021 at 6:21 PM Amul Sul wrote: > > On Thu, Oct 7, 2021 at 5:56 AM Jaime Casanova > wrote: > > > > On Tue, Oct 05, 2021 at 04:11:58PM +0530, Amul Sul wrote: > > >On Mon, Oct 4, 2021 at 1:57 PM Rushabh Lathia > > > wrote: > > > > > > > > I tried to apply the patch on the master

Re: dfmgr additional ABI version fields

2021-10-12 Thread Peter Eisentraut
So here is a patch. This does what I had in mind as a use case. Obviously, the naming and wording can be tuned. Input from other vendors is welcome. From 837680c2195a04bf1f1ecf567fadc3a3d69087fa Mon Sep 17 00:00:00 2001 From: Peter Eisentraut Date: Tue, 12 Oct 2021 14:08:10 +0200 Subject: [PAT

Re: storing an explicit nonce

2021-10-12 Thread Bruce Momjian
On Tue, Oct 12, 2021 at 08:40:17AM +0300, Ants Aasma wrote: > On Mon, 11 Oct 2021 at 22:15, Bruce Momjian wrote: > > > Yes, that's the direction that I was thinking also and specifically with > > XTS as the encryption algorithm to allow us to exclude the LSN but keep > > everything el

Re: Skipping logical replication transactions on subscriber side

2021-10-12 Thread Greg Nancarrow
On Tue, Oct 12, 2021 at 4:00 PM Masahiko Sawada wrote: > > I've attached updated patches. > Some comments for the v16-0003 patch: (1) doc/src/sgml/logical-replication.sgml The output from "SELECT * FROM pg_stat_subscription_errors;" still shows "last_failed_time" instead of "last_error_time".

Re: Improve the HINT message of the ALTER command for postgres_fdw

2021-10-12 Thread bt21masumurak
Hi Thank you for your comments. It seems like the change proposed for postgres_fdw_validator is similar to what file_fdw is doing in file_fdw_validator. I think we also need to do the same change in dblink_fdw_validator and postgresql_fdw_validator as well. Agreed. While on this, it's bet

preserve timestamps when installing headers

2021-10-12 Thread Alexander Kuzmenkov
Hi hackers, I noticed that `make install` updates modification time for all installed headers. This leads to recompilation of all dependent objects, which is inconvenient for example when working on a third-party extension. A way to solve this would be to pass `INSTALL="install -p"` to `configure`

Re: Make query ID more portable

2021-10-12 Thread Andrey Lepikhov
On 12/10/21 13:35, Julien Rouhaud wrote: Hi, On Tue, Oct 12, 2021 at 4:12 PM Andrey V. Lepikhov wrote: See the patch in attachment as an POC. Main idea here is to break JumbleState down to a 'clocations' part that can be really interested in a post parse hook and a 'context data', that needed

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

2021-10-12 Thread Bharath Rupireddy
On Tue, Oct 12, 2021 at 2:03 PM Kyotaro Horiguchi wrote: > > [1] - > > https://www.postgresql.org/message-id/CALj2ACXZ_o7rcOb7-Rs96P0d%3DEi%2Bnvf_WZ-Meky7Vv%2BnQNFYjQ%40mail.gmail.com > > The patch does this: > > case StartupProcess: > + MyBackendId = MaxBack

Re: [RFC] building postgres with meson

2021-10-12 Thread Andres Freund
Hi, On 2021-10-12 01:37:21 -0700, Andres Freund wrote: > non-cached build (world-bin): > current:40.46s > ninja: 7.31s Interestingly this is pretty close to the minimum achievable on my machine from the buildsystem perspective. A build with -fuse-ld=lld, which the above didn't

Re: Make query ID more portable

2021-10-12 Thread Julien Rouhaud
Hi, On Tue, Oct 12, 2021 at 4:12 PM Andrey V. Lepikhov wrote: > > QueryID is good tool for query analysis. I want to improve core jumbling > machinery in two ways: > 1. QueryID value should survive dump/restore of a database (use fully > qualified name of table instead of relid). > 2. QueryID cou

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

2021-10-12 Thread Kyotaro Horiguchi
At Tue, 12 Oct 2021 13:09:47 +0530, Bharath Rupireddy wrote in > On Mon, Oct 11, 2021 at 8:59 PM Fujii Masao > wrote: > > > > On 2021/10/11 19:46, Bharath Rupireddy wrote: > > > If we do the above, then the problem might arise if somebody calls > > > SICleanupQueue and wants to signal the star

Make query ID more portable

2021-10-12 Thread Andrey V. Lepikhov
Hi, QueryID is good tool for query analysis. I want to improve core jumbling machinery in two ways: 1. QueryID value should survive dump/restore of a database (use fully qualified name of table instead of relid). 2. QueryID could represent more general class of queries: for example, it can be

  1   2   >