Re: Scriptable way to validate a pg_dump restore ?

2024-01-30 Thread Shaheed Haque
On Tue, 30 Jan 2024, 05:02 Adrian Klaver, wrote: > On 1/29/24 11:35, Shaheed Haque wrote: > > > > > > On Tue, 30 Jan 2024, 00:27 Adrian Klaver, > > wrote: > > > > On 1/29/24 10:12, Shaheed Haque wrote: > > > > > > > > > > Yes. But I was under the

Re: Scriptable way to validate a pg_dump restore ?

2024-01-30 Thread Shaheed Haque
On Tue, 30 Jan 2024, 05:02 Adrian Klaver, wrote: > On 1/29/24 11:35, Shaheed Haque wrote: > > > > > > On Tue, 30 Jan 2024, 00:27 Adrian Klaver, > > wrote: > > > > On 1/29/24 10:12, Shaheed Haque wrote: > > > > > > > > > > Yes. But I was under the

Re: Scriptable way to validate a pg_dump restore ?

2024-01-29 Thread Adrian Klaver
On 1/29/24 11:35, Shaheed Haque wrote: On Tue, 30 Jan 2024, 00:27 Adrian Klaver, > wrote: On 1/29/24 10:12, Shaheed Haque wrote: > > Yes. But I was under the impression that the initial copy of logical > replication was the same? >

Re: Scriptable way to validate a pg_dump restore ?

2024-01-29 Thread Shaheed Haque
On Tue, 30 Jan 2024, 00:27 Adrian Klaver, wrote: > On 1/29/24 10:12, Shaheed Haque wrote: > > > > > > Yes. But I was under the impression that the initial copy of logical > > replication was the same? > > > > Are you taking about the copy_data option to WITH? > > If so yes and no. > > Yes as it

Re: Scriptable way to validate a pg_dump restore ?

2024-01-29 Thread Laura Smith
On Monday, 29 January 2024 at 09:06, Ron Johnson wrote: > > That's kinda like being asked to prove that rocks always fall when you drop > them. Either you trust physics, because physics has always worked, or you > must watch every rock, because next time it might not fall. The analogy is

Re: Scriptable way to validate a pg_dump restore ?

2024-01-29 Thread Adrian Klaver
On 1/29/24 10:12, Shaheed Haque wrote: Yes. But I was under the impression that the initial copy of logical replication was the same? Are you taking about the copy_data option to WITH? If so yes and no. Yes as it uses COPY to transfer the data. No as what COPY transfers can be

Re: Scriptable way to validate a pg_dump restore ?

2024-01-29 Thread Shaheed Haque
On Mon, 29 Jan 2024, 23:57 Adrian Klaver, wrote: > On 1/29/24 09:28, Shaheed Haque wrote: > > > > > > Right, for me, state, not just record count is what I'm interested in > > (for the initial full table copy part of replication). So, given the > > explanation about the possible per-table

Re: Scriptable way to validate a pg_dump restore ?

2024-01-29 Thread Adrian Klaver
On 1/29/24 09:28, Shaheed Haque wrote: Right, for me, state, not just record count is what I'm interested in (for the initial full table copy part of replication). So, given the explanation about the possible per-table window, is there some property of the table that could be used to

Re: Scriptable way to validate a pg_dump restore ?

2024-01-29 Thread Shaheed Haque
On Mon, 29 Jan 2024, 22:52 Adrian Klaver, wrote: > On 1/29/24 00:12, Laura Smith wrote: > > Hi > > > > Let's say I've got a scenario where I'm doing a pg_dump replication > rather than online streaming, e.g. due to air-gap or whatever. > > > > Is there a scriptable way to validate the restore ?

Re: Scriptable way to validate a pg_dump restore ?

2024-01-29 Thread Adrian Klaver
On 1/29/24 00:12, Laura Smith wrote: Hi Let's say I've got a scenario where I'm doing a pg_dump replication rather than online streaming, e.g. due to air-gap or whatever. Is there a scriptable way to validate the restore ?  e.g. using doing something clever with ctid or something to ensure

Re: Scriptable way to validate a pg_dump restore ?

2024-01-29 Thread Ron Johnson
On Mon, Jan 29, 2024 at 3:12 AM Laura Smith < n5d9xq3ti233xiyif...@protonmail.ch> wrote: > Hi > > Let's say I've got a scenario where I'm doing a pg_dump replication rather > than online streaming, e.g. due to air-gap or whatever. > > Is there a scriptable way to validate the restore ? e.g.

Re: Scriptable way to validate a pg_dump restore ?

2024-01-29 Thread Shaheed Haque
I'd also like to know how to do this. The current approaches seem, afaict, to involve making on both end of the connection. Even given the inherently racy nature of the issue, that seems unwieldy to me.

Scriptable way to validate a pg_dump restore ?

2024-01-29 Thread Laura Smith
Hi Let's say I've got a scenario where I'm doing a pg_dump replication rather than online streaming, e.g. due to air-gap or whatever. Is there a scriptable way to validate the restore ?  e.g. using doing something clever with ctid or something to ensure both the schema and all its rows were