Re: How to gracefully keep my specific index in memory ?

2019-08-12 Thread James(王旭)
Thanks Laurenz Albe for reply. Unfortunately this index is only frequently used during a certain period of time(such as 9:30am - 12:00am) .I usually encounter slow load of this index during some other time. Then it seems to me the only answer for this case would be the pgprewarm and pg_cron ?

Re: question about client/server version mismatches

2019-08-12 Thread Michael Paquier
On Tue, Aug 13, 2019 at 12:45:35PM +1000, raf wrote: > Since the backup itself was from a 9.5.12 server, it > seems that the 9.6 parameter, idle_in_transaction_session_timeout, > must have been set by the 9.6 client even though it was > connected to a 9.5 server. Is that expected behaviour? Yes,

question about client/server version mismatches

2019-08-12 Thread raf
Hi, macos-10.11.6 postgresql-9.5.16 (server) postgresql-9.6.12 (client) I've just rebooted my macos laptop for the first time in months and have started having a problem loading database backups there. I get this error output: pg_restore: [archiver (db)] Error while INITIALIZING:

Re: "Locking rows"

2019-08-12 Thread Adrian Klaver
On 8/12/19 1:07 PM, stan wrote: On Mon, Aug 12, 2019 at 12:14:25PM -0700, Adrian Klaver wrote: On 8/12/19 10:51 AM, stan wrote: I have a customer requirement/desire. The system is (among other things) essentially a employee time sheet. The manager wants for an employee to not be able to modify

Re: "Locking rows"

2019-08-12 Thread Adrian Klaver
On 8/12/19 10:51 AM, stan wrote: I have a customer requirement/desire. The system is (among other things) essentially a employee time sheet. The manager wants for an employee to not be able to modify a given row in the table they enter time into once it is committed. I personally see issues with

"Locking rows"

2019-08-12 Thread stan
I have a customer requirement/desire. The system is (among other things) essentially a employee time sheet. The manager wants for an employee to not be able to modify a given row in the table they enter time into once it is committed. I personally see issues with this, but I am willing to try to

Re: Subject: Re: constrain with MATCH full and NULL values in referenced table

2019-08-12 Thread stan
On Mon, Aug 12, 2019 at 10:40:20AM -0700, Adrian Klaver wrote: > On 8/12/19 10:30 AM, stan wrote: > > > > The task_instance table is the one the original question was in > > > > reference > > > > to. > > > > > > > > CREATE TABLE employee ( > > > > employee_keyinteger DEFAULT >

Re: Subject: Re: constrain with MATCH full and NULL values in referenced table

2019-08-12 Thread Adrian Klaver
On 8/12/19 10:30 AM, stan wrote: The task_instance table is the one the original question was in reference to. CREATE TABLE employee ( employee_keyinteger DEFAULT nextval('employee_key_serial') PRIMARY KEY , id varchar(5) NOT NULL UNIQUE ,

Re: Subject: Re: constrain with MATCH full and NULL values in referenced table

2019-08-12 Thread stan
On Mon, Aug 12, 2019 at 10:16:41AM -0700, Adrian Klaver wrote: > On 8/12/19 10:06 AM, stan wrote: > > Cc: pgsql-general.lists.postgresql@panix.com > > Subject: Re: constrain with MATCH full and NULL values in referenced table > > User-Agent: Mutt/1.12.1 (2019-06-15) > > X-Editor: gVim > > > >

wal receiver stops for 2 hour

2019-08-12 Thread Олег Самойлов
Hi all. PostgeewSQL 11.4 on Centos 7. I created a test bed on VirtualBox and test HA cluster by random failures in loop. Sometime, in case of longest switching from failure, I get strange behaviour. The walreceiver is stopped by timeout, but don't restarted for 2 hours. May be I agree with

Re: Subject: Re: constrain with MATCH full and NULL values in referenced table

2019-08-12 Thread Adrian Klaver
On 8/12/19 10:06 AM, stan wrote: Cc: pgsql-general.lists.postgresql@panix.com Subject: Re: constrain with MATCH full and NULL values in referenced table User-Agent: Mutt/1.12.1 (2019-06-15) X-Editor: gVim On Mon, Aug 12, 2019 at 06:22:54PM +0200, Francisco Olarte wrote: Stan: On Mon, Aug

Subject: Re: constrain with MATCH full and NULL values in referenced table

2019-08-12 Thread stan
Cc: pgsql-general.lists.postgresql@panix.com Subject: Re: constrain with MATCH full and NULL values in referenced table User-Agent: Mutt/1.12.1 (2019-06-15) X-Editor: gVim On Mon, Aug 12, 2019 at 06:22:54PM +0200, Francisco Olarte wrote: > Stan: > > On Mon, Aug 12, 2019 at 5:11 PM stan

Re: constrain with MATCH full and NULL values in referenced table

2019-08-12 Thread Francisco Olarte
Stan: On Mon, Aug 12, 2019 at 5:11 PM stan wrote: > > I am creating a table that has 2 values in it which are keys pointing to 2 > other tables. I need for the UNIQUE combination of these 2 keys to exist in > a fourth table. It has been recommended to use a foreign key constraint with > the

Re: constrain with MATCH full and NULL values in referenced table

2019-08-12 Thread Adrian Klaver
On 8/12/19 8:51 AM, stan wrote: Please reply to list also. Ccing list. On Mon, Aug 12, 2019 at 08:17:33AM -0700, Adrian Klaver wrote: On 8/12/19 8:11 AM, stan wrote: I am creating a table that has 2 values in it which are keys pointing to 2 other tables. I need for the UNIQUE combination of

Invitation for OSS Community Research based in the University of Leeds! Many Thanks!

2019-08-12 Thread Xinming Guo
Dear PostgreSQL Community Members, I am a master student based at the University of Leeds (UK), and currently working on a research investigating the relationships between open source software community culture, governance and structure, motivation of participation and the innovation

Re: constrain with MATCH full and NULL values in referenced table

2019-08-12 Thread Tom Lane
stan writes: > I am creating a table that has 2 values in it which are keys pointing to 2 > other tables. I need for the UNIQUE combination of these 2 keys to exist in > a fourth table. It has been recommended to use a foreign key constraint with > the MATCH FULL parameter. > Here is my

Re: constrain with MATCH full and NULL values in referenced table

2019-08-12 Thread Adrian Klaver
On 8/12/19 8:11 AM, stan wrote: I am creating a table that has 2 values in it which are keys pointing to 2 other tables. I need for the UNIQUE combination of these 2 keys to exist in a fourth table. It has been recommended to use a foreign key constraint with the MATCH FULL parameter. Without

constrain with MATCH full and NULL values in referenced table

2019-08-12 Thread stan
I am creating a table that has 2 values in it which are keys pointing to 2 other tables. I need for the UNIQUE combination of these 2 keys to exist in a fourth table. It has been recommended to use a foreign key constraint with the MATCH FULL parameter. Here is my question, does this deal with

Re: Fwd: Postgres HA - pacemaker RA do not support auto failback

2019-08-12 Thread Adrien Nayrat
On 8/12/19 2:57 PM, Shital A wrote: > > > Hello, > > Postgres version : 9.6 > OS:Rhel 7.6 > > We are working on HA setup for postgres cluster of two nodes in active-passive > mode.  > > Installed:  > Pacemaker 1.1.19 > Corosync 2.4.3 > > The pacemaker agent with this installation doesn't

Fwd: Postgres HA - pacemaker RA do not support auto failback

2019-08-12 Thread Shital A
Hello, Postgres version : 9.6 OS:Rhel 7.6 We are working on HA setup for postgres cluster of two nodes in active-passive mode. Installed: Pacemaker 1.1.19 Corosync 2.4.3 The pacemaker agent with this installation doesn't support automatic failback. What I mean by that is explained below: 1.

Re: How to gracefully keep my specific index in memory ?

2019-08-12 Thread Laurenz Albe
James(王旭) wrote: > As the title,How to keep a specific index in memory gracefully? > > After some statistical query, I can determine that not all indexes can be fit > into memory, > but one of the most frequently used indexes(say idx_xyz) can be definitely > fit into > memory(specifically ,[the

Re: PostgreSQL lock file

2019-08-12 Thread Олег Самойлов
> Best practice for this sort of thing is considered to be to run the two > Postgres instances under different user IDs. That avoids them thinking > that the other one's lock files are relevant, and it provides an extra > layer of security against possible conflicts between the two instances. >

How to gracefully keep my specific index in memory ?

2019-08-12 Thread James(王旭)
Hello: As the title,How to keep a specific index in memory gracefully? After some statistical query, I can determine that not all indexes can be fit into memory, but one of the most frequently used indexes(say idx_xyz) can be definitely fit into memory(specifically ,[the size of idx_xyz]=20%

Re: Postgres Database Backup Size

2019-08-12 Thread Laurenz Albe
Shiwangini Shishulkar wrote: > Any way to reduce backup size of postgres backups or it's default behavior of > postgres to take backups which are double in size? The smallest backup would be a compressed custom format "pg_dump": pg_dump -F c -Z 9 ... I is very unusual for a custom format

Postgres Database Backup Size

2019-08-12 Thread Shiwangini Shishulkar
Hi, Here , we have first tried with .BAK backups. For, 43GB database-> the backup size was ~86GB. Then, I configured backup with .sql file. Here it was ~70GB for the same database size. Next, now our database size keeps increasing. As well as backup size is also increasing. Now, backup size is