RE: libpq debug log

2021-03-10 Thread tsunakawa.ta...@fujitsu.com
From: Kyotaro Horiguchi > Right. So something like this? > > unsigned char p; > > p = buf + *cursor; > result = (uint32) (*p << 24) + (*(p + 1)) << 16 + ...); Yes, that would work (if p is a pointer), but I think memcpy() is enough like pqGetInt() does. Regards Takayuki Tsunakawa

Re: shared-memory based stats collector

2021-03-10 Thread Andres Freund
Hi, On 2021-03-10 17:51:37 +0900, Kyotaro Horiguchi wrote: > From ed2fb2fca47fccbf9af1538688aab8334cf6470c Mon Sep 17 00:00:00 2001 > From: Kyotaro Horiguchi > Date: Fri, 13 Mar 2020 16:58:03 +0900 > Subject: [PATCH v52 1/7] sequential scan for dshash > > Dshash did not allow scan the all entrie

Re: libpq debug log

2021-03-10 Thread Kyotaro Horiguchi
At Thu, 11 Mar 2021 04:12:57 +, "tsunakawa.ta...@fujitsu.com" wrote in > From: Kyotaro Horiguchi > > Right. So something like this? > > > > unsigned char p; > > > > p = buf + *cursor; > > result = (uint32) (*p << 24) + (*(p + 1)) << 16 + ...); > > Yes, that would work (if p is a pointer)

Re: [HACKERS] Custom compression methods

2021-03-10 Thread Dilip Kumar
On Thu, Mar 11, 2021 at 8:50 AM Justin Pryzby wrote: > > Looking at v23-0002-alter-table-set-compression, ATRewriteTable() was calling > CompareCompressionMethodAndDecompress(). While changing the compression method user might be just interested to compress the future tuple with the new compress

Re: shared-memory based stats collector

2021-03-10 Thread Kyotaro Horiguchi
At Wed, 10 Mar 2021 19:21:00 -0800, Andres Freund wrote in > Hi, > > Two minor nits: Thanks for the comments! > On 2021-03-10 21:47:51 +0900, Fujii Masao wrote: > > +/* Shared memory area for archiver process */ > > +typedef struct PgArchData > > +{ > > + Latch *latch;

Re: Huge memory consumption on partitioned table with FKs

2021-03-10 Thread Tatsuro Yamada
On 2021/03/11 9:39, Amit Langote wrote: On Thu, Mar 11, 2021 at 4:25 AM Tom Lane wrote: Amit Langote writes: On Wed, Mar 10, 2021 at 8:37 AM Tom Lane wrote: Hmm. So, the key point is that the values coming from the partitioned child table are injected into the test query as parameters, not

Re: shared-memory based stats collector

2021-03-10 Thread Fujii Masao
On 2021/03/11 13:42, Kyotaro Horiguchi wrote: At Wed, 10 Mar 2021 19:21:00 -0800, Andres Freund wrote in Hi, Two minor nits: Thanks for the comments! On 2021-03-10 21:47:51 +0900, Fujii Masao wrote: +/* Shared memory area for archiver process */ +typedef struct PgArchData +{ + La

Re: PostmasterIsAlive() in recovery (non-USE_POST_MASTER_DEATH_SIGNAL builds)

2021-03-10 Thread Michael Paquier
On Thu, Mar 11, 2021 at 04:37:39PM +1300, Thomas Munro wrote: > Michael, when you said "That's pretty hack-ish, still efficient" in > reference to this code: > >> - if (IsUnderPostmaster && !PostmasterIsAlive()) >> + if (IsUnderPostmaster && >> +#ifndef USE_POSTMASTER_DEATH_SIGNAL >> + c

RE: Parallel INSERT (INTO ... SELECT ...)

2021-03-10 Thread tsunakawa.ta...@fujitsu.com
From: Amit Kapila > Now, coming back to Hou-San's patch to introduce a GUC and reloption > for this feature, I think both of those make sense to me because when > the feature is enabled via GUC, one might want to disable it for > partitioned tables? Do we agree on that part or someone thinks > oth

Re: Freeze the inserted tuples during CTAS?

2021-03-10 Thread Masahiko Sawada
On Wed, Mar 10, 2021 at 3:57 PM Paul Guo wrote: > > > On Mar 3, 2021, at 1:35 PM, Masahiko Sawada wrote: > >> On Sun, Feb 21, 2021 at 4:46 PM Paul Guo wrote: > >> Attached is the v2 version that fixes a test failure due to plan change > >> (bitmap index scan -> index only scan). > > > I think t

Re: [PATCH] pg_permissions

2021-03-10 Thread Joel Jacobson
New version attached. Changes: * Added documentation in catalogs.sgml * Dropped "objsubid" from pg_ownerships since columns have no owner, only tables Do we prefer "pg_permissions" or "pg_privileges"? I can see "privileges" occur 2325 times in the sources, while "permissions" occur only 1097 ti

Re: Queries for PostgreSQL DDL convert

2021-03-10 Thread Julien Rouhaud
On Wed, Mar 10, 2021 at 04:09:49PM +0800, 杨逸存 wrote: > Dear hacker: >     I am a student from Nanjing University. I have some troubles > about DDL statement convertion. I have several MySQL DDL statements > from MySQL dump command. Now I wanna convert the statements' grammar so > that they can b

Re: POC: Cleaning up orphaned files using undo logs

2021-03-10 Thread Antonin Houska
tsunakawa.ta...@fujitsu.com wrote: > I'm crawling like a snail to read the patch set. Below are my first set of > review comments, which are all minor. Thanks. I will check your comments when I'll be preparing the next version of the patch. -- Antonin Houska Web: https://www.cybertec-postgre

Re: Parallel INSERT (INTO ... SELECT ...)

2021-03-10 Thread Amit Langote
On Wed, Mar 10, 2021 at 6:18 PM Amit Kapila wrote: > On Mon, Mar 8, 2021 at 7:19 PM Amit Langote wrote: > > I just read through v25 and didn't find anything to complain about. > > Thanks a lot, pushed now! Amit L., your inputs are valuable for this work. Glad I could be of help. Really apprecia

Re: [PATCH] Identify LWLocks in tracepoints

2021-03-10 Thread Peter Eisentraut
On 10.03.21 06:38, Craig Ringer wrote: On Wed, 3 Mar 2021 at 20:50, David Steele > wrote: On 1/22/21 6:02 AM, Peter Eisentraut wrote: This patch set no longer applies: http://cfbot.cputube.org/patch_32_2927.log

<    1   2