On Tue, May 21, 2019 at 06:57:36PM -0700, Adrian Klaver wrote:
> On 5/21/19 6:34 PM, Justin Pryzby wrote:
> >Is it still impossible to distinguish whether a row was inserted vs updated ?
>
> You will need to be more specific.
Sorry, I mean with UPSERT / "INSERT .. ON CONFLICT DO UPDATE", is it po
On 5/21/19 6:34 PM, Justin Pryzby wrote:
Is it still impossible to distinguish whether a row was inserted vs updated ?
You will need to be more specific.
On a hunch, see transition relation info here:
https://www.postgresql.org/docs/10/sql-createtrigger.html
The latest I can see is here:
ht
Is it still impossible to distinguish whether a row was inserted vs updated ?
The latest I can see is here:
https://wiki.postgresql.org/wiki/UPSERT#RETURNING_behavior
..but I'm hopeful that the 4 year old wiki page is out of date.
Justin
> On May 20, 2019, at 5:31 PM, Tom Lane wrote:
>
> Well, you're the only one who's seen this problem, and none of the
> rest of us have any idea how to reproduce it. So if you want something
> to get done in a timely fashion, it's up to you to show us a test case.
So, we had success.
We look
On Tue, May 21, 2019 at 12:24 PM Rich Shepard
wrote:
> On Tue, 21 May 2019, Francisco Olarte wrote:
>
> > From how you say it, I assume you have some data in your original
> > dumps which can relate boths, lets assume it's org_name, but may be an
> > org-code. If you do not have it it means you c
On Tue, 21 May 2019, Will Hartung wrote:
You can either use a script for the entire process, or, convert the people
table to INSERT statements that have a SELECT for the foreign key as part
of the insert.
INSERT INTO PEOPLE (id, name, org_id) VALUES (1, ‘Bob’, (SELECT org_id
FROM org WHERE org_
=?UTF-8?Q?Fabr=C3=ADzio_de_Royes_Mello?= writes:
> Em ter, 21 de mai de 2019 às 14:41, Tom Lane escreveu:
>> It's a view, not a table, so I don't think you need
>> allow_system_table_mods. A quick test here says that being
>> superuser is enough to do a CREATE OR REPLACE VIEW on it.
> Interesti
> On May 21, 2019, at 9:56 AM, Rich Shepard wrote:
>
> I could insert all new rows into the organizations table, then produce a
> list of the org_id and org_name to manually insert the foreign key in the
> related people table. Time and effort intense.
You can either use a script for the entire
On 5/21/19 12:27 PM, Rich Shepard wrote:
On Tue, 21 May 2019, Michael Lewis wrote:
For each row-
Insert into organizations table if the record does not exist, returning ID.
Insert into people using that ID.
Michael,
The org_id will not exist until I run the insert script.
Else, load all th
Em ter, 21 de mai de 2019 às 14:41, Tom Lane escreveu:
>
> =?UTF-8?Q?Fabr=C3=ADzio_de_Royes_Mello?= writes:
> > As I said before to change system catalog you should set
> > "allow_system_table_mods=on" and restart PostgreSQL service.
> > After that you'll able to recreate the
"pg_catalog.pg_publi
=?UTF-8?Q?Fabr=C3=ADzio_de_Royes_Mello?= writes:
> As I said before to change system catalog you should set
> "allow_system_table_mods=on" and restart PostgreSQL service.
> After that you'll able to recreate the "pg_catalog.pg_publication_tables"
> system view. (You can use the Tom's suggestion us
On Tue, 21 May 2019, Adrian Klaver wrote:
The other way is to create the org_id for each organization ahead of time
and put it into the data file. Either way you have create the org_id for
the FK relationship, it is just a matter of where and when.
Adrian,
I had thought of that but overlooked
Em ter, 21 de mai de 2019 às 14:17, PegoraroF10
escreveu:
>
> Restart Postgres means exactly what ? We tried just restart the service
but
> we tried to refresh publication the old view was used because it took
2hours
> and gave us a timeout.
>
As I said before to change system catalog you should
On Tue, 21 May 2019, Michael Lewis wrote:
For each row-
Insert into organizations table if the record does not exist, returning ID.
Insert into people using that ID.
Michael,
The org_id will not exist until I run the insert script.
Else, load all the data with empty ID column on person tabl
On 5/21/19 10:22 AM, Rich Shepard wrote:
On Tue, 21 May 2019, Adrian Klaver wrote:
Well you are not going to know the org_id until the organization table
is loaded, which means something like:
1) First run through file load the organizations table.
2) Build a mapping of org_id to organizatio
On Tue, 21 May 2019, Francisco Olarte wrote:
From how you say it, I assume you have some data in your original
dumps which can relate boths, lets assume it's org_name, but may be an
org-code. If you do not have it it means you cannot match people to
orgs in your data, all is lost.
Francisco,
For each row-
Insert into organizations table if the record does not exist, returning ID.
Insert into people using that ID.
Else, load all the data with empty ID column on person table,then just
update the person table afterward and drop the org name column.
Perhaps I am missing something.
On Tue, 21 May 2019, Adrian Klaver wrote:
Well you are not going to know the org_id until the organization table is
loaded, which means something like:
1) First run through file load the organizations table.
2) Build a mapping of org_id to organization.
3) Run through data file again and loa
Rich:
On Tue, May 21, 2019 at 6:56 PM Rich Shepard wrote:
> I'm cleaning and formatting a 800-line data file to be inserted into a
> database. Some of the input file fields will be inserted into an
> 'organizations' table letting postgres assign sequential org_id numbers.
> Other fields will be i
Restart Postgres means exactly what ? We tried just restart the service but
we tried to refresh publication the old view was used because it took 2hours
and gave us a timeout.
I found some people talking that I need to initdb, but initdb means recreate
entirely my database or just reinstall my pos
I cannot because we created a replication for ALL TABLES
--
Sent from: http://www.postgresql-archive.org/PostgreSQL-general-f1843780.html
On 5/21/19 9:56 AM, Rich Shepard wrote:
I'm cleaning and formatting a 800-line data file to be inserted into a
database. Some of the input file fields will be inserted into an
'organizations' table letting postgres assign sequential org_id numbers.
Other fields will be inserted into a separate 'p
I'm cleaning and formatting a 800-line data file to be inserted into a
database. Some of the input file fields will be inserted into an
'organizations' table letting postgres assign sequential org_id numbers.
Other fields will be inserted into a separate 'people' table associated with
each organiz
Hello.I'm not sure which replications issues you have, and I never used
Wall-E before, but I get some issues with PotgreSql 10 and Barman.
Try starting the primary server at first, when it finish to recovery
this should start as primary, if not then go to the postgresql data
directory and rename th
Hi Daulat,
I believe that the error message is referring to the system user, not
the database one.
docker exec --help | grep -- -u
-u, --user string Username or UID (format:
[:])
regards,
fabio pardi
On 5/21/19 2:42 PM, Daulat Ram wrote:
> Hello team,
>
>
>
> I have databas
Hello team,
I have database & users created inside the docker but we are getting
connection issue while trying to connect to database using user created in
postgres.
docker exec -it -u test b8e7ejb1e31d bash
unable to find user test: no matching entries in passwd file
Regards,
Daulat
Hi,
We have primary and standby PostgreSQL cluster setup and also we have PITR
enabled on it. To improve the recovery time we are thinking of recovering
the database to both primary and standby at the same time.
These are the steps we are following:
1. Restore the base backup to the both primar
27 matches
Mail list logo