Re: Postgresql 10.4 installation issues on Ubuntu 14.05

2018-07-31 Thread vardenis pavardenis
2018-07-31 0:02 GMT+03:00 Adrian Klaver : > On 07/30/2018 10:33 AM, vardenis pavardenis wrote: > >> >> >> 2018-07-30 16:51 GMT+03:00 Adrian Klaver > >: >> >> On 07/30/2018 12:40 AM, vardenis pavardenis wrote: >> >> hello. >> thats interesting.

RE: Question on postgresql.conf

2018-07-31 Thread Lu, Dan
Thanks for your reply. I can start the database like this: pg_ctl start -D /hostname/postgres/data -l /hostname/postgres/log My data directory has the following file: postgres.cnf Content of the postgres.cnf contains only 1 line: include /nfs/global/postgres-.cnf Question: Can be a variable

RE: Question on postgresql.conf

2018-07-31 Thread Lu, Dan
Hi David, Which command? Can you give me an example? Say, I want to put the config file on a share drive so all my postgres configuration file can be seen in one location. /nfs/global/postgres-.cnf Example: /nfs/global/postgres-machine1.cnf /nfs/global/postgres-machine2.cnf

Re: Question on postgresql.conf

2018-07-31 Thread Fabio Pardi
Hi, you can read this: https://www.postgresql.org/docs/current/static/runtime-config-file-locations.html Basically you will start Postgres as pg_ctl -D /nfs/global/ but it expects to find a file postgresql.conf (i do not know any way to specify a different file name) inside

RE: Question on postgresql.conf

2018-07-31 Thread Lu, Dan
Is this the correct syntax for starting Postgres using a separate config_file for each host? We like to take advantage of the Unix variable “hostname” to source in the name of the file. Machine1: (notice we are using the `hostname` unix variable) pg_ctl start -D /hostname/postgres/data -l

Re: Postgresql 10.4 installation issues on Ubuntu 14.05

2018-07-31 Thread Adrian Klaver
On 07/31/2018 06:12 AM, vardenis pavardenis wrote: 2018-07-31 0:02 GMT+03:00 Adrian Klaver >: On 07/30/2018 10:33 AM, vardenis pavardenis wrote: 2018-07-30 16:51 GMT+03:00 Adrian Klaver mailto:adrian.kla...@aklaver.com>

Re: Question on postgresql.conf

2018-07-31 Thread Matt Zagrabelny
On Tue, Jul 31, 2018 at 9:21 AM, Tom Lane wrote: > "Lu, Dan" writes: > > Question: > > Can be a variable like `hostname` derived from Unix shell or > I have to hardcode the name of the host like " include > /nfs/global/postgres-host123.cnf > > Nope, you'd have to hard-code it. > > Of course,

Re: could not read block 0 in file : read only 0 of 8192 bytes when doing nasty on immutable index function

2018-07-31 Thread Andres Freund
Hi, On 2018-07-31 19:29:37 -0700, Peter Geoghegan wrote: > On Tue, Jul 31, 2018 at 7:02 PM, Andres Freund wrote: > > Not a fan of this comment. It doesn't really explain that well why it's > > needed here, but then goes on to a relatively general explanation of why > > cache invalidation is

Re: Question on postgresql.conf

2018-07-31 Thread Tom Lane
"Lu, Dan" writes: > Say, I want to put the config file on a share drive so all my postgres > configuration file can be seen in one location. > /nfs/global/postgres-.cnf What I'd do is make each data directory's postgresql.conf contain just this: include /nfs/global/postgres-.cnf and then just

Re: Restore relhaspkey in PostgreSQL Version 11 Beta

2018-07-31 Thread Melvin Davidson
> [2] https://www.postgresql.org/message-id/flat/20140317185255.20724.49675% > 40wrigleys.postgresql.org > > -- > David Rowley http://www.2ndQuadrant.com/ > PostgreSQL Development, 24x7 Support, Training & Services > >

Re: Restore relhaspkey in PostgreSQL Version 11 Beta

2018-07-31 Thread Peter Geoghegan
On Tue, Jul 31, 2018 at 7:47 AM, Melvin Davidson wrote: > I was hoping that at least one other person would see my point of view, but > by the > harsh replies I've been getting, I feel more like a whistle blower that > insiders > think I also should be made to "go away". You were bellicose from

Re: Question on postgresql.conf

2018-07-31 Thread Steve Atkins
> On Jul 31, 2018, at 10:59 AM, Dimitri Maziuk wrote: > > On 07/31/2018 12:33 PM, George Neuner wrote: > >> Is there some reason that postgresql.conf cannot be a link to your >> file? > > It's six of one, half a dozen of the other. The big problem is when the > network share is unavailable

Re: Question on postgresql.conf

2018-07-31 Thread Dimitri Maziuk
On 07/31/2018 12:33 PM, George Neuner wrote: > Is there some reason that postgresql.conf cannot be a link to your > file? It's six of one, half a dozen of the other. The big problem is when the network share is unavailable at host boot and all of your databases are belong to bitbucket. If you

Re: Question on postgresql.conf

2018-07-31 Thread Dimitri Maziuk
On 07/31/2018 01:05 PM, Steve Atkins wrote: > You'd do that with "include_dir 'conf.d'" or similar, I think, which > PostgreSQL > has in all current versions. So it does, huh. I guess it helps to read all the way to end of postgresql.conf sometimes... -- Dimitri Maziuk Programmer/sysadmin

Re: Question on postgresql.conf

2018-07-31 Thread Dimitri Maziuk
On 07/31/2018 01:16 PM, George Neuner wrote: > > I understand the problem with network shares - but the OP mentioned > only a "shared location", which could be just another directory on the > same device. Because the OP said also that there were other DBMS > being used in the same shop, I

Re: Strange behavior with missing column in SQL function

2018-07-31 Thread Tom Lane
Marcelo Lacerda writes: > Here's the code that reproduces the behavior: > http://paste.debian.net/1035412/ For the archives' sake, the issue of concern here is what error message to throw for CREATE OR REPLACE FUNCTION myfunction(myrow mytable) RETURNS INTEGER AS $$ SELECT myrow.c +

Re: alter table docs

2018-07-31 Thread Rob Sargent
I'm not anxious to see it back-patched. On 07/30/2018 04:25 PM, Tom Lane wrote: Rob Sargent writes: Exactly.  That that is in the "box" made me think a similar blurb for the non-index version should be there also. This seems to have been fixed in v11 but not back-patched.

Re: Question on postgresql.conf

2018-07-31 Thread George Neuner
On Mon, 30 Jul 2018 18:35:59 +, "Lu, Dan" wrote: >I am going through the PostgreSQL manual and came across a question >hoping you can help me. It appears the "postgresql.conf" file is >needed by default to start Postgres. Since we have standard with >other RDBMS to store the

Re: Question on postgresql.conf

2018-07-31 Thread Dimitri Maziuk
On 7/31/2018 9:36 AM, Matt Zagrabelny wrote: Or have puppet/chef/ansible/etc. write the correct config file based on your dynamic data. Postgres ain't orrible. I wonder if one actually needs as much host-specific config tuning in the first place... I haven't touched oracle in forever,

Re: Restore relhaspkey in PostgreSQL Version 11 Beta

2018-07-31 Thread Adrian Klaver
On 07/31/2018 07:47 AM, Melvin Davidson wrote: [2] https://www.postgresql.org/message-id/flat/20140317185255.20724.49675%40wrigleys.postgresql.org --  David Rowley

Re: Strange behavior with missing column in SQL function

2018-07-31 Thread Marcelo Lacerda
> CREATE OR REPLACE FUNCTION myfunction(myrow mytable) > RETURNS INTEGER AS $$ > SELECT myrow.c + myrow.b FROM myrow; > $$ LANGUAGE sql; > where "myrow" is a table with a different set of column names from > "mytable". The existing behavior for that is to seek the column name > in "myrow"

pg_basebackup without copying the logs

2018-07-31 Thread Johnes Castro
Hi is there any way to do pg_basebackup without copying the logs? Best Regards, Johnes Castro Tecnisys

Re: pg_basebackup without copying the logs

2018-07-31 Thread Adrian Klaver
On 07/31/2018 02:04 PM, Johnes Castro wrote: logging messages. I've noticed that in version 10, you have the -X none option. That refers to the transaction(WAL) logs. *De:* Adrian Klaver *Enviado:* terça-feira, 31

Re: pg_basebackup without copying the logs

2018-07-31 Thread Johnes Castro
>Not that I know of. Ok, Thanks for attention. De: Adrian Klaver Enviado: terça-feira, 31 de julho de 2018 19:05 Para: Johnes Castro Cc: pgsql-general Assunto: Re: pg_basebackup without copying the logs On 07/31/2018 01:59 PM, Johnes Castro wrote: Please reply

Re: pg_basebackup without copying the logs

2018-07-31 Thread Adrian Klaver
On 07/31/2018 01:42 PM, Johnes Castro wrote: Hi is there any way to do pg_basebackup without copying the logs? Are you talking about the transaction logs(WAL) or the logging messages? Best Regards, Johnes Castro Tecnisys -- Adrian Klaver adrian.kla...@aklaver.com

Re: pg_basebackup without copying the logs

2018-07-31 Thread Johnes Castro
logging messages. I've noticed that in version 10, you have the -X none option. De: Adrian Klaver Enviado: terça-feira, 31 de julho de 2018 18:57 Para: Johnes Castro; pgsql-gene...@postgresql.org Assunto: Re: pg_basebackup without copying the logs On

Re: How to prevent "no wait lock" after a connection drop

2018-07-31 Thread Tom Lane
=?iso-8859-9?B?RXJ0YW4gS/zn/Gtv8Gx1?= writes: > What I observe during my tests is that if I intentionally drop internet > connection during any stage of data transfer (that is mostly while inserting > to tables) application gives error and stop. For next sync operation (which > runs every 5 mins)

Re: pg_basebackup without copying the logs

2018-07-31 Thread Adrian Klaver
On 07/31/2018 01:59 PM, Johnes Castro wrote: Please reply to list also. Ccing list.  logging messages. Not that I know of. *De:* Adrian Klaver *Enviado:* terça-feira, 31 de julho de 2018 18:57 *Para:* Johnes

How to prevent "no wait lock" after a connection drop

2018-07-31 Thread Ertan Küçükoğlu
Hello, Using PostgreSQL 9.6.9 (will be PostgreSQL 10.4 in a month) running on Debian Stretch on a VPS server. I am collecting customer data from distributed locations. There will be around 50-70 locations uploading data. Customer data is on local FirebirdSQL database and there are about

Re: could not read block 0 in file : read only 0 of 8192 bytes when doing nasty on immutable index function

2018-07-31 Thread Andres Freund
On 2018-07-31 18:48:23 -0700, Peter Geoghegan wrote: > On Mon, Jul 9, 2018 at 11:32 AM, Andres Freund wrote: > > I assume we'll have to backpatch this issue, so I think it'd probably a > > good idea to put a specific CacheInvalidateHeapTuple() in there > > explicitly in the back branches, and do

Re: could not read block 0 in file : read only 0 of 8192 bytes when doing nasty on immutable index function

2018-07-31 Thread Peter Geoghegan
On Mon, Jul 9, 2018 at 11:32 AM, Andres Freund wrote: > I assume we'll have to backpatch this issue, so I think it'd probably a > good idea to put a specific CacheInvalidateHeapTuple() in there > explicitly in the back branches, and do the larger fix in 12. ISTM > there's some risks that it'd

Re: could not read block 0 in file : read only 0 of 8192 bytes when doing nasty on immutable index function

2018-07-31 Thread Peter Geoghegan
On Tue, Jul 31, 2018 at 7:02 PM, Andres Freund wrote: > Maybe expand a bit on this by saying that it's more likely "because > plan_create_index_workers() triggers a relcache entry to be (re-)built, > which previously did only happen in edge cases" or such? Okay. > Not a fan of this comment. It