[HACKERS] User defined data types in Logical Replication

2017-11-09 Thread Huong Dangminh
Hi,

We are getting the bellow error while trying use Logical Replication 
with user defined data types in a C program (when call elog function).

 ERROR:  XX000: cache lookup failed for type X

# X is remote type's oid

It occurs in worker.c:slot_store_error_callback function when remotetypoid not 
exist in local pg_type.

I have tried to write a patch (attached).
I think it is not kindly to change typename to the OID's one,
But I could not find the easy way to get typename from OID in the remote host.

--- 
Thanks and best regards, 
Dang Minh Huong 
NEC Solution Innovators, Ltd. 
http://www.nec-solutioninnovators.co.jp/en/



logicalrep_typmap.patch
Description: logicalrep_typmap.patch

-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers


Re: [HACKERS] [ANNOUNCE] PostgreSQL 10 Beta 1 Released!

2017-05-21 Thread Huong Dangminh
> From: Bruce Momjian [mailto:br...@momjian.us]
> Sent: Saturday, May 20, 2017 1:11 AM
> On Fri, May 19, 2017 at 04:10:09AM +0000, Huong Dangminh wrote:
> > Hi,
> >
> > > * 10 Beta Release Notes:
> > >   https://www.postgresql.org/docs/devel/static/release-10.html
> >
> > Just a minute thing, but changing of hot_standby default value is not fully
> noted in release-10.sgml.
> > Please find the attached patch.
> 
> Patch applied.  Sorry I missed this.  I must have been so focused on
> how to add the item that I forgot the commit details.
> 

Thanks!

---
Thanks and best regards,
Dang Minh Huong
NEC Solution Innovators, Ltd.
http://www.nec-solutioninnovators.co.jp/en/



-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers


Re: [HACKERS] [ANNOUNCE] PostgreSQL 10 Beta 1 Released!

2017-05-18 Thread Huong Dangminh
Hi,

> * 10 Beta Release Notes:
>   https://www.postgresql.org/docs/devel/static/release-10.html

Just a minute thing, but changing of hot_standby default value is not fully 
noted in release-10.sgml.
Please find the attached patch.


---
Thanks and best regards,
Dang Minh Huong
NEC Solution Innovators, Ltd.
http://www.nec-solutioninnovators.co.jp/en/


hot_standby_change_release_note_10.patch
Description: hot_standby_change_release_note_10.patch

-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers


Re: [HACKERS] [PostgreSQL 10] default of hot_standby should be "on"?

2017-04-27 Thread Huong Dangminh
> >>> I would refrain from doing that, having some parameters listed in the
> >>> tests makes the intention behind those perl routines clear.
> >
> > Hmm, you've got a point. But when we changed the default values
> > related to replication we dropped some explicitly settings from the
> > regression test code.
> 
> Looking at the patch. This is fine:
> -  # Change a setting and restart
> -  $node->append_conf('postgresql.conf', 'hot_standby = on');
> -  $node->restart();
> 
> But not that:
>  print $conf "wal_log_hints = on\n";
> -print $conf "hot_standby = on\n";
>  print $conf "max_connections = 10\n";
> 
> This is a minor point though.

Thanks, I attached the update patch.

---
Thanks and best regards,
Dang Minh Huong
NEC Solution Innovators, Ltd.
http://www.nec-solutioninnovators.co.jp/en/


hot_standby.patch
Description: hot_standby.patch

-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers


Re: [HACKERS] [PostgreSQL 10] default of hot_standby should be "on"?

2017-04-26 Thread Huong Dangminh
> On Thu, Apr 27, 2017 at 11:48 AM, Masahiko Sawada 
> wrote:
> > Thank you for updating the patch. Also maybe we can update line in
> > PostgresNode.pm where hot_standby is set to on explicitly.
> 
> I would refrain from doing that, having some parameters listed in the
> tests makes the intention behind those perl routines clear.
> --
> Michael

Thanks, attached patch update PostgresNode.pm file.
I also did the regression test and found no problem.

# sorry Sawada-san, Michael-san, because of security restriction
# we could not mail to gmail address from our environment.

--- 
Thanks and best regards, 
Dang Minh Huong 
NEC Solution Innovators, Ltd. 
http://www.nec-solutioninnovators.co.jp/en/



hot_standby.patch
Description: hot_standby.patch

-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers


Re: [HACKERS] [PostgreSQL 10] default of hot_standby should be "on"?

2017-04-26 Thread Huong Dangminh
Thanks all for your comments.

> Magnus Hagander  writes:
> > +1. I definitely think we should do it, and 10 would be the time to do
> it.
> 
> Agreed.  It's mainly a historical accident that the default is what it
> is,
> I think.
> 
> > I wonder if we should also consider changing the standby error message
> to
> > be a WARNING instead of an ERROR. So that if you try to start up a standby
> > with hot_standby=on but master with wal_level=replica it would turn into
> a
> > cold standby.
> 
> I'm -1 for that: if you fat-finger the configuration, you should be told
> about it, not have the system start up in an unintended mode that lacks
> critical functionality.
> 
>   regards, tom lane

I attached the patch which also update manual as the mention of sawada-san.

--- 
Thanks and best regards, 
Dang Minh Huong 
NEC Solution Innovators, Ltd. 
http://www.nec-solutioninnovators.co.jp/en/


hot_standby.patch
Description: hot_standby.patch

-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers


[HACKERS] [PostgreSQL 10] default of hot_standby should be "on"?

2017-04-25 Thread Huong Dangminh
Hi,

Default for hot_standby parameter should be "on" from PostgreSQL 10?

In PostgreSQL 10, -w option is default for [pg_ctl start]. 
So in order to start standby we have to setting hot_standby to "on" or 
start standby with -W option. 

Change hot_standby to "on" will fix this inconvenience.
wal_level is also changed default to "replica" in PostgreSQL 10, 
this might not be affect to primary.

Just a little bit but I attached the patch.
---
Thanks and best regards, 
Dang Minh Huong 
NEC Solution Innovators, Ltd. 
http://www.nec-solutioninnovators.co.jp/en/



hot_standby.patch
Description: hot_standby.patch

-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers


[HACKERS] Failed with build PostgreSQL in Windows ("--with-perl" option)

2017-03-27 Thread Huong Dangminh
Hi,

We have trying to build PostgreSQL in Windows Environment.

When build with options "--with-perl" (by setting config.pl file),
Builder not found "perl\d+.lib" file in "C:\Perl\lib\CORE\" folder,
so it ended with the messages bellow.

  "could not identify perl library version:  at src/tools/msvc/Mkvcbuild.pm 
line 590"

Manual said that "ActiveState Perl version 5.8 or later is required".
https://www.postgresql.org/docs/9.6/static/install-windows-full.html#AEN30798

But in version 5.22 or 5.24 (ActiveState Perl's currently community version),
we not found the above lib file.

What version of ActiveState Perl is suitable for PostgreSQL builder?
Or is there another solutions for "--with-perl" building in Windows?


Thanks and best regards,
---
Dang Minh Huong
NEC Solution Innovators, Ltd.
http://www.nec-solutioninnovators.co.jp/en/



-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers


[HACKERS] backpatch for REL9_4_STABLE of commit 40482e606733675eb9e5b2f7221186cf81352da1

2016-02-08 Thread Huong Dangminh
Hi,

I think this fixed is also required for REL9_4_STABLE.
Please confirm the attached patch.

Thanks and best regards,
Dang Minh Huong
NEC Solution Innovators, Ltd.
http://www.nec-solutioninnovators.co.jp/en/



ecpg.9.4.patch
Description: ecpg.9.4.patch

-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers


[HACKERS] Window2012R2: initdb error: "The current directory is invalid."

2016-01-19 Thread Huong Dangminh
Hi all,

I have failed in execute initdb in "c:\Windows\Temp\dir" folder as 
reproduce logs below. The OS's messages "The current directory is invalid." 
was returned.

I think it is a specification of Window2012R2 (because i could not reproduce
In Windows 7) but not PostgreSQL's problem.
But is it need to be do something in PostgreSQL sir?

I found that the ERROR messages produced when bootstrap_template1 (initdb.c)
execute PG_CMD_OPEN (_popen function). 
_popen not failed but OS produced "The current directory is invalid." message,
postgres did not start, and _pclose is returned with 1 make initdb failed.

May be, Window2012R2 does not permit to execute postgres command with
none privilege permission in this case, I think so.

--- Reproduce Environment ---
OS: Window2012R2
PostgreSQL: 9.5
Command: initdb
Execute User: Administrator
Execute folder: c:\Windows\Temp\dir
---

--- Reproduce log ---
c:\Windows\Temp>mkdir dir
c:\Windows\Temp>cd dir
c:\Windows\Temp\dir>
c:\Windows\Temp\dir>cmd /c ""C:\Program Files\PostgreSQL\9.5\bin\initdb" 
--locale=C -D "c:\testdb" -d -n"
Running in debug mode.
Running in noclean mode.  Mistakes will not be cleaned up.
Running in debug mode.
Running in noclean mode.  Mistakes will not be cleaned up.
The files belonging to this database system will be owned by user 
"Administrator".
This user must also own the server process.

VERSION=9.5.0
PGDATA=c:/testdb
share_path=C:/Program Files/PostgreSQL/9.5/share
PGPATH=C:/Program Files/PostgreSQL/9.5/bin
POSTGRES_SUPERUSERNAME=Administrator
POSTGRES_BKI=C:/Program Files/PostgreSQL/9.5/share/postgres.bki
POSTGRES_DESCR=C:/Program Files/PostgreSQL/9.5/share/postgres.description
POSTGRES_SHDESCR=C:/Program Files/PostgreSQL/9.5/share/postgres.shdescription
POSTGRESQL_CONF_SAMPLE=C:/Program 
Files/PostgreSQL/9.5/share/postgresql.conf.sample
PG_HBA_SAMPLE=C:/Program Files/PostgreSQL/9.5/share/pg_hba.conf.sample
PG_IDENT_SAMPLE=C:/Program Files/PostgreSQL/9.5/share/pg_ident.conf.sample
The database cluster will be initialized with locale "C".
The default database encoding has accordingly been set to "SQL_ASCII".
The default text search configuration will be set to "english".

Data page checksums are disabled.

creating directory c:/testdb ... ok
creating subdirectories ... ok
selecting default max_connections ... 10
selecting default shared_buffers ... 400kB
selecting dynamic shared memory implementation ... windows
creating configuration files ... ok
creating template1 database in c:/testdb/base/1 ... The current directory is 
invalid.
child process exited with exit code 1
initdb: data directory "c:/testdb" not removed at user's request

c:\Windows\Temp\dir>
---

Best regards,
Dang Minh Huong
NEC Solution Innovators, Ltd.
http://www.nec-solutioninnovators.co.jp/en/



-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers